fcr-ui-scene 3.5.1 → 3.6.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 (379) hide show
  1. package/lib/creator.d.ts +14 -0
  2. package/lib/creator.js +239 -14
  3. package/lib/electron/app.js +0 -21
  4. package/lib/electron/bootstrap-sdk.js +136 -7
  5. package/lib/electron/injections.d.ts +19 -7
  6. package/lib/electron/injections.js +206 -77
  7. package/lib/electron/ipc/ipc.d.ts +26 -0
  8. package/lib/electron/ipc/ipc.js +137 -0
  9. package/lib/electron/ipc/type.d.ts +11 -0
  10. package/lib/electron/ipc/type.js +19 -0
  11. package/lib/electron/logger.js +1 -1
  12. package/lib/electron/main.js +1 -1
  13. package/lib/electron/plugins/meeting-state.d.ts +1 -0
  14. package/lib/electron/plugins/meeting-state.js +3 -3
  15. package/lib/electron/plugins/screenshot.js +2 -2
  16. package/lib/electron/preload.js +67 -5
  17. package/lib/electron/window.js +0 -2
  18. package/lib/global.css +21 -0
  19. package/lib/modules/action-bar/components/apps/index.js +1 -0
  20. package/lib/modules/action-bar/components/apps/useWidgetList.js +1 -1
  21. package/lib/modules/action-bar/components/item/index.d.ts +2 -0
  22. package/lib/modules/action-bar/components/item/index.js +4 -2
  23. package/lib/modules/action-bar/components/leave/index.js +1 -0
  24. package/lib/modules/action-bar/components/more/index.js +1 -0
  25. package/lib/modules/action-bar/components/record/index.js +43 -106
  26. package/lib/modules/action-bar/components/record/popover.d.ts +4 -0
  27. package/lib/modules/action-bar/components/record/popover.js +57 -0
  28. package/lib/modules/action-bar/components/record/stop-record-dialog.js +1 -0
  29. package/lib/modules/action-bar/components/screen-share/index.js +15 -3
  30. package/lib/modules/action-bar/components/screen-share/submenu.js +2 -2
  31. package/lib/modules/action-bar/components/security/index.js +2 -1
  32. package/lib/modules/action-bar/components/smaller/index.js +1 -1
  33. package/lib/modules/action-bar/components/trigger-output-language/index.js +17 -22
  34. package/lib/modules/action-bar/components/trigger-subscribe-language/index.js +2 -1
  35. package/lib/modules/action-bar/index.css +3 -2
  36. package/lib/modules/action-bar/index.js +2 -1
  37. package/lib/modules/action-bar/store.d.ts +5 -0
  38. package/lib/modules/action-bar/store.js +30 -12
  39. package/lib/modules/action-bar/types.d.ts +1 -0
  40. package/lib/modules/chat/chat-room-store.js +1 -1
  41. package/lib/modules/chat/components/chat-bar/index.d.ts +1 -1
  42. package/lib/modules/chat/components/chat-bar/index.js +5 -3
  43. package/lib/modules/chat/components/chat-select/select-item/index.js +1 -1
  44. package/lib/modules/chat/components/message-list/index.js +1 -2
  45. package/lib/modules/chat/components/message-list/message-item/index.d.ts +0 -1
  46. package/lib/modules/chat/components/message-list/message-item/index.js +9 -10
  47. package/lib/modules/chat/index.css +24 -0
  48. package/lib/modules/chat/view.js +13 -3
  49. package/lib/modules/components/device-control/components/carmera/index.js +4 -5
  50. package/lib/modules/components/device-control/components/microphone/index.js +4 -5
  51. package/lib/modules/components/device-control/index.css +6 -3
  52. package/lib/modules/components/leave-meeting/components/assign-host.js +26 -4
  53. package/lib/modules/components/leave-meeting/components/index.css +35 -0
  54. package/lib/modules/components/leave-meeting/index.js +1 -0
  55. package/lib/modules/components/leave-meeting/store.js +25 -67
  56. package/lib/modules/components/member-window/components/member-actions/components/audio-control.js +3 -2
  57. package/lib/modules/components/member-window/components/member-actions/components/icon-buttons/index.js +1 -1
  58. package/lib/modules/components/member-window/components/member-actions/components/icon-status.js +10 -9
  59. package/lib/modules/components/member-window/components/member-actions/components/more-actions.js +2 -2
  60. package/lib/modules/components/member-window/components/member-actions/components/user-info.js +1 -1
  61. package/lib/modules/components/member-window/components/member-actions/index.js +2 -2
  62. package/lib/modules/components/member-window/components/video-player/components/remote-video-player.js +3 -14
  63. package/lib/modules/components/member-window/index.css +18 -7
  64. package/lib/modules/components/member-window/types.d.ts +1 -1
  65. package/lib/modules/components/security-menu/index.css +2 -2
  66. package/lib/modules/components/security-menu/index.js +80 -28
  67. package/lib/modules/components/tab-frame/index.css +1 -1
  68. package/lib/modules/control-bar/components/meeting-details/index.css +1 -1
  69. package/lib/modules/control-bar/components/meeting-details/index.js +15 -9
  70. package/lib/modules/control-bar/components/more-actions/index.js +3 -21
  71. package/lib/modules/control-bar/components/share-state-nav/index.js +4 -20
  72. package/lib/modules/control-bar/index.d.ts +2 -0
  73. package/lib/modules/control-bar/index.js +3 -1
  74. package/lib/modules/control-bar/store.d.ts +11 -2
  75. package/lib/modules/control-bar/store.js +103 -95
  76. package/lib/modules/control-bar/view.js +1 -6
  77. package/lib/modules/device-pretest/audio-preview/speaker-detection.js +1 -1
  78. package/lib/modules/dialog/components/chat/electron.d.ts +1 -3
  79. package/lib/modules/dialog/components/chat/index.js +24 -17
  80. package/lib/modules/dialog/components/confirm-leave-meeting/index.d.ts +6 -0
  81. package/lib/modules/dialog/components/confirm-leave-meeting/index.js +86 -0
  82. package/lib/modules/dialog/components/control-bar/index.d.ts +1 -2
  83. package/lib/modules/dialog/components/control-bar/index.js +5 -17
  84. package/lib/modules/dialog/components/dialog-container/component/body.d.ts +1 -0
  85. package/lib/modules/dialog/components/dialog-container/component/body.js +4 -2
  86. package/lib/modules/dialog/components/dialog-container/index.css +2 -1
  87. package/lib/modules/dialog/components/dialog-container/index.d.ts +1 -0
  88. package/lib/modules/dialog/components/dialog-container/index.js +3 -1
  89. package/lib/modules/dialog/components/participant/index.d.ts +0 -1
  90. package/lib/modules/dialog/components/participant/index.js +15 -24
  91. package/lib/modules/dialog/components/pre-setting/electron.d.ts +2 -0
  92. package/lib/modules/dialog/components/pre-setting/electron.js +51 -0
  93. package/lib/modules/dialog/components/pre-setting/index.css +26 -0
  94. package/lib/modules/dialog/components/pre-setting/index.d.ts +6 -0
  95. package/lib/modules/dialog/components/pre-setting/index.js +38 -0
  96. package/lib/modules/dialog/components/pre-setting-container/component/body.d.ts +8 -0
  97. package/lib/modules/dialog/components/pre-setting-container/component/body.js +80 -0
  98. package/lib/modules/dialog/components/pre-setting-container/index.css +82 -0
  99. package/lib/modules/dialog/components/pre-setting-container/index.d.ts +18 -0
  100. package/lib/modules/dialog/components/pre-setting-container/index.js +117 -0
  101. package/lib/modules/dialog/components/rename/index.d.ts +4 -0
  102. package/lib/modules/dialog/components/rename/index.js +72 -0
  103. package/lib/modules/dialog/components/video-window/index.js +18 -16
  104. package/lib/modules/dialog/components/widget/electron.d.ts +2 -1
  105. package/lib/modules/dialog/components/widget/electron.js +3 -2
  106. package/lib/modules/dialog/components/widget/index.d.ts +2 -1
  107. package/lib/modules/dialog/components/widget/index.js +4 -6
  108. package/lib/modules/dialog/dialogs.d.ts +1 -0
  109. package/lib/modules/dialog/dialogs.js +3 -2
  110. package/lib/modules/dialog/hooks/useElectron.d.ts +2 -0
  111. package/lib/modules/dialog/hooks/useElectron.js +11 -13
  112. package/lib/modules/dialog/index.d.ts +2 -0
  113. package/lib/modules/dialog/index.js +2 -1
  114. package/lib/modules/dialog/store.d.ts +8 -3
  115. package/lib/modules/dialog/store.js +38 -26
  116. package/lib/modules/dialog/type.d.ts +1 -0
  117. package/lib/modules/dialog/view.js +2 -1
  118. package/lib/modules/event-confirm/index.d.ts +2 -0
  119. package/lib/modules/event-confirm/index.js +2 -1
  120. package/lib/modules/event-confirm/store.d.ts +9 -1
  121. package/lib/modules/event-confirm/store.js +94 -8
  122. package/lib/modules/event-confirm/view.js +55 -46
  123. package/lib/modules/{sound-effect → event-sound}/index.d.ts +3 -2
  124. package/lib/modules/{sound-effect → event-sound}/index.js +9 -5
  125. package/lib/modules/event-toast/store.js +2 -0
  126. package/lib/modules/interpreter/dialog-content/index.js +4 -1
  127. package/lib/modules/interpreter/index.d.ts +2 -0
  128. package/lib/modules/interpreter/index.js +2 -1
  129. package/lib/modules/interpreter/interpreter-list/interpreter-item/components/pick-language/index.js +3 -0
  130. package/lib/modules/interpreter/store.d.ts +2 -2
  131. package/lib/modules/interpreter/store.js +30 -24
  132. package/lib/modules/interpreter/type.d.ts +2 -0
  133. package/lib/modules/invite/components/pstn-invite.js +3 -9
  134. package/lib/modules/invite/components/voip-invite.css +26 -0
  135. package/lib/modules/invite/components/voip-invite.d.ts +1 -0
  136. package/lib/modules/invite/components/voip-invite.js +8 -11
  137. package/lib/modules/invite/index.css +16 -3
  138. package/lib/modules/invite/index.d.ts +2 -1
  139. package/lib/modules/invite/index.js +2 -1
  140. package/lib/modules/invite/store.d.ts +5 -1
  141. package/lib/modules/invite/store.js +8 -1
  142. package/lib/modules/layout/components/Carousel.d.ts +1 -1
  143. package/lib/modules/layout/components/Carousel.js +16 -118
  144. package/lib/modules/layout/components/CommonVideoRenderer.d.ts +13 -0
  145. package/lib/modules/layout/components/CommonVideoRenderer.js +214 -0
  146. package/lib/modules/layout/components/Gallery.d.ts +1 -0
  147. package/lib/modules/layout/components/Gallery.js +62 -205
  148. package/lib/modules/layout/components/index.css +17 -34
  149. package/lib/modules/layout/index.d.ts +2 -0
  150. package/lib/modules/layout/index.js +2 -1
  151. package/lib/modules/layout/store.d.ts +5 -2
  152. package/lib/modules/layout/store.js +47 -39
  153. package/lib/modules/layout/type.d.ts +4 -0
  154. package/lib/modules/layout/type.js +6 -1
  155. package/lib/modules/live-streaming/store.d.ts +1 -0
  156. package/lib/modules/live-streaming/store.js +19 -8
  157. package/lib/modules/participant/components/confirm-input/index.d.ts +4 -4
  158. package/lib/modules/participant/components/confirm-input/index.js +74 -6
  159. package/lib/modules/participant/components/participants/components/footer/components/drop-menu/index.css +27 -3
  160. package/lib/modules/participant/components/participants/components/footer/components/footer/index.css +4 -0
  161. package/lib/modules/participant/components/participants/components/footer/components/footer/index.js +3 -2
  162. package/lib/modules/participant/components/participants/components/participants/components/attendee/index.css +4 -3
  163. package/lib/modules/participant/components/participants/components/participants/components/attendee/index.js +1 -0
  164. package/lib/modules/participant/components/participants/components/participants/components/participants-more/index.css +9 -1
  165. package/lib/modules/participant/components/participants/components/participants/components/participants-more/index.js +1 -1
  166. package/lib/modules/participant/components/participants/components/participants/index.css +1 -0
  167. package/lib/modules/participant/components/participants/components/render-user/components/attendee/index.css +18 -0
  168. package/lib/modules/participant/components/participants/components/render-user/components/attendee/index.js +12 -5
  169. package/lib/modules/participant/components/participants/components/render-user/components/user-action/components/move-actions-popover/index.js +1 -8
  170. package/lib/modules/participant/index.css +6 -0
  171. package/lib/modules/participant/index.d.ts +1 -0
  172. package/lib/modules/participant/index.js +9 -0
  173. package/lib/modules/participant/store.d.ts +6 -0
  174. package/lib/modules/participant/store.js +130 -96
  175. package/lib/modules/pc-audio-connect/store.js +1 -1
  176. package/lib/modules/phone-audio-connect/index.d.ts +2 -0
  177. package/lib/modules/phone-audio-connect/index.js +2 -1
  178. package/lib/modules/phone-audio-connect/store.d.ts +4 -1
  179. package/lib/modules/phone-audio-connect/store.js +4 -2
  180. package/lib/modules/setting/audio-settings/audio-settings.js +70 -48
  181. package/lib/modules/setting/audio-settings/index.css +23 -6
  182. package/lib/modules/setting/general-settings/general-settings.d.ts +1 -2
  183. package/lib/modules/setting/general-settings/general-settings.js +111 -37
  184. package/lib/modules/setting/general-settings/index.css +15 -0
  185. package/lib/modules/setting/index.d.ts +4 -1
  186. package/lib/modules/setting/index.js +7 -4
  187. package/lib/modules/setting/state/index.js +1 -1
  188. package/lib/modules/setting/store.d.ts +24 -11
  189. package/lib/modules/setting/store.js +203 -142
  190. package/lib/modules/setting/video-settings/index.css +13 -2
  191. package/lib/modules/setting/video-settings/video-settings-basic.js +18 -27
  192. package/lib/modules/setting/video-settings/video-settings.d.ts +0 -2
  193. package/lib/modules/setting/video-settings/video-settings.js +3 -2
  194. package/lib/modules/setting/view.d.ts +11 -2
  195. package/lib/modules/setting/view.js +93 -71
  196. package/lib/modules/share-screen/components/selection/index.js +6 -2
  197. package/lib/modules/share-screen/index.d.ts +4 -1
  198. package/lib/modules/share-screen/index.js +3 -1
  199. package/lib/modules/share-screen/store.d.ts +15 -5
  200. package/lib/modules/share-screen/store.js +105 -59
  201. package/lib/modules/share-screen/view.js +1 -1
  202. package/lib/modules/state-bar/index.css +4 -2
  203. package/lib/modules/state-bar/index.d.ts +2 -0
  204. package/lib/modules/state-bar/index.js +2 -1
  205. package/lib/modules/state-bar/layout-config.js +1 -0
  206. package/lib/modules/state-bar/live-streaming-state.js +1 -0
  207. package/lib/modules/state-bar/meeting-detail.css +10 -1
  208. package/lib/modules/state-bar/meeting-details.js +42 -26
  209. package/lib/modules/state-bar/meeting-network-state.css +8 -0
  210. package/lib/modules/state-bar/meeting-time.js +9 -20
  211. package/lib/modules/state-bar/store.d.ts +5 -1
  212. package/lib/modules/state-bar/store.js +10 -3
  213. package/lib/modules/state-bar/view.js +17 -6
  214. package/lib/modules/video-window/components/members/index.js +0 -3
  215. package/lib/modules/waiting-room-layout/index.css +13 -0
  216. package/lib/modules/waiting-room-layout/index.d.ts +2 -1
  217. package/lib/modules/waiting-room-layout/index.js +2 -1
  218. package/lib/modules/waiting-room-layout/store.d.ts +12 -1
  219. package/lib/modules/waiting-room-layout/store.js +42 -6
  220. package/lib/modules/waiting-room-layout/view.js +22 -5
  221. package/lib/modules/whiteboard/components/control-bar/index.css +1 -1
  222. package/lib/modules/whiteboard/components/switch-theme/libs.d.ts +1 -1
  223. package/lib/modules/whiteboard/components/switch-theme/libs.js +3 -1
  224. package/lib/modules/whiteboard/components/toolbar/ style.css +1 -0
  225. package/lib/modules/whiteboard/components/toolbar/components/color-picker/components/panel.js +1 -0
  226. package/lib/modules/whiteboard/components/toolbar/components/color-picker/components/picker.js +1 -0
  227. package/lib/modules/whiteboard/components/toolbar/components/eraser-picker.js +3 -14
  228. package/lib/modules/whiteboard/components/toolbar/components/expansion/index.d.ts +1 -0
  229. package/lib/modules/whiteboard/components/toolbar/components/expansion/index.js +83 -0
  230. package/lib/modules/whiteboard/components/toolbar/components/extra-tool-picker.js +2 -2
  231. package/lib/modules/whiteboard/components/toolbar/components/history.js +3 -3
  232. package/lib/modules/whiteboard/components/toolbar/components/item/index.d.ts +1 -0
  233. package/lib/modules/whiteboard/components/toolbar/components/item/index.js +42 -0
  234. package/lib/modules/whiteboard/components/toolbar/components/pen-picker.js +2 -2
  235. package/lib/modules/whiteboard/components/toolbar/components/screen-capture-picker.js +2 -2
  236. package/lib/modules/whiteboard/components/toolbar/components/shape-picker.js +3 -3
  237. package/lib/modules/whiteboard/components/toolbar/hooks/index.js +6 -6
  238. package/lib/modules/whiteboard/components/toolbar/index.js +9 -113
  239. package/lib/modules/whiteboard/components/toolbar/store.d.ts +18 -0
  240. package/lib/modules/whiteboard/components/toolbar/store.js +276 -83
  241. package/lib/modules/whiteboard/context.d.ts +1 -2
  242. package/lib/modules/whiteboard/index.d.ts +1 -14
  243. package/lib/modules/whiteboard/index.js +131 -426
  244. package/lib/modules/whiteboard/view.js +12 -10
  245. package/lib/modules/widget/sdk.js +2 -1
  246. package/lib/object-manager.d.ts +8 -0
  247. package/lib/object-manager.js +75 -0
  248. package/lib/plugins/browser-runtime-plugin.js +19 -14
  249. package/lib/providers/ability-provider.d.ts +8 -0
  250. package/lib/providers/ability-provider.js +14 -0
  251. package/lib/providers/device-privilege-provider.d.ts +1 -0
  252. package/lib/providers/device-privilege-provider.js +53 -75
  253. package/lib/providers/device-provider.d.ts +18 -8
  254. package/lib/providers/device-provider.js +397 -209
  255. package/lib/providers/device-stream-provider.js +0 -4
  256. package/lib/providers/dialog-provider.d.ts +1 -0
  257. package/lib/providers/dialog-provider.js +4 -18
  258. package/lib/providers/event-provider.js +45 -2
  259. package/lib/providers/interpreter-provider.d.ts +4 -0
  260. package/lib/providers/interpreter-provider.js +166 -137
  261. package/lib/providers/message-provider.js +44 -2
  262. package/lib/providers/privilege-provider.d.ts +33 -0
  263. package/lib/providers/privilege-provider.js +120 -45
  264. package/lib/providers/room-provider.d.ts +12 -10
  265. package/lib/providers/room-provider.js +162 -262
  266. package/lib/providers/screen-share-provider.d.ts +4 -0
  267. package/lib/providers/screen-share-provider.js +3 -6
  268. package/lib/providers/widget-provider.js +6 -4
  269. package/lib/runtime.d.ts +20 -8
  270. package/lib/scenes/main-scene.d.ts +2 -0
  271. package/lib/scenes/main-scene.js +95 -37
  272. package/lib/scenes/waiting-scene.js +16 -13
  273. package/lib/schema.d.ts +55 -32
  274. package/lib/schema.js +23 -9
  275. package/lib/shared-data-source/config.d.ts +6 -2
  276. package/lib/shared-data-source/config.js +81 -10
  277. package/lib/shared-data-source/member-data.d.ts +16 -20
  278. package/lib/shared-data-source/member-data.js +121 -110
  279. package/lib/shared-data-source/screen-share-data-source.d.ts +37 -0
  280. package/lib/shared-data-source/screen-share-data-source.js +134 -0
  281. package/lib/shared-data-source/security-data.d.ts +1 -0
  282. package/lib/shared-data-source/security-data.js +3 -5
  283. package/lib/shared-data-source/setting.d.ts +1 -0
  284. package/lib/shared-data-source/setting.js +33 -17
  285. package/lib/shared-data-source/video-window.d.ts +3 -3
  286. package/lib/shared-data-source/video-window.js +55 -38
  287. package/lib/translations/enUS.d.ts +48 -1
  288. package/lib/translations/enUS.js +101 -17
  289. package/lib/translations/zhCN.d.ts +48 -1
  290. package/lib/translations/zhCN.js +88 -4
  291. package/lib/type.d.ts +40 -20
  292. package/lib/type.js +14 -1
  293. package/lib/ui-manager.d.ts +11 -9
  294. package/lib/ui-manager.js +118 -29
  295. package/lib/ui-scene.d.ts +7 -4
  296. package/lib/ui-scene.js +111 -128
  297. package/lib/utilities/constant.d.ts +3 -1
  298. package/lib/utilities/constant.js +2 -0
  299. package/lib/utilities/copyText.js +15 -11
  300. package/lib/utilities/default-config.d.ts +2 -0
  301. package/lib/utilities/default-config.js +11 -5
  302. package/lib/utilities/i18n-common-data.d.ts +2 -0
  303. package/lib/utilities/i18n-common-data.js +15 -0
  304. package/lib/utilities/logger.d.ts +0 -1
  305. package/lib/utilities/logger.js +3 -4
  306. package/lib/utilities/renderer.d.ts +0 -9
  307. package/lib/utilities/renderer.js +1 -70
  308. package/lib/utilities/screen.js +3 -1
  309. package/lib/utilities/setting-config-storage.d.ts +6 -1
  310. package/lib/utilities/setting-config-storage.js +21 -4
  311. package/lib/utilities/tools.d.ts +7 -6
  312. package/lib/utilities/tools.js +56 -44
  313. package/lib/utilities/ui-resources.d.ts +6 -0
  314. package/lib/utilities/ui-resources.js +47 -9
  315. package/lib/waiting-room-control-manager.d.ts +4 -4
  316. package/lib/waiting-room-control-manager.js +29 -9
  317. package/package.json +6 -6
  318. package/public/assets/browser/images/default1.jpg +0 -0
  319. package/public/assets/browser/images/default2.jpg +0 -0
  320. package/public/assets/browser/images/default3.jpg +0 -0
  321. package/public/assets/browser/images/default4.jpg +0 -0
  322. package/public/assets/browser/images/default5.jpg +0 -0
  323. package/public/assets/browser/images/default6.jpg +0 -0
  324. package/public/assets/browser/images/default7.jpg +0 -0
  325. package/public/assets/browser/sound_effects/pretest.mp3 +0 -0
  326. package/public/assets/browser/sound_effects/recording_started.mp3 +0 -0
  327. package/public/assets/browser/sound_effects/remote_user_joined.mp3 +0 -0
  328. package/public/assets/browser/sound_effects/speaker_test.mp3 +0 -0
  329. package/public/assets/browser/videos/default8.mp4 +0 -0
  330. package/public/assets/browser/videos/default9.mp4 +0 -0
  331. package/public/assets/electron/images/default1.jpg +0 -0
  332. package/public/assets/electron/images/default2.jpg +0 -0
  333. package/public/assets/electron/sound_effects/pretest.mp3 +0 -0
  334. package/public/assets/electron/videos/default8.mp4 +0 -0
  335. package/public/index.html +103 -82
  336. package/lib/hooks/meeting-time.d.ts +0 -15
  337. package/lib/hooks/meeting-time.js +0 -92
  338. package/lib/login-confirm-dialog.d.ts +0 -13
  339. package/lib/login-confirm-dialog.js +0 -85
  340. package/lib/modules/action-bar/components/apps/appitems.d.ts +0 -3
  341. package/lib/modules/action-bar/components/apps/appitems.js +0 -45
  342. package/lib/modules/components/member-window/components/member-board.d.ts +0 -2
  343. package/lib/modules/components/member-window/components/member-board.js +0 -63
  344. package/lib/modules/dialog/components/system-preference/bg1.png +0 -0
  345. package/lib/modules/dialog/components/system-preference/bg2.png +0 -0
  346. package/lib/modules/dialog/types/index.d.ts +0 -70
  347. package/lib/modules/participant/components/attendee/components/microphone-indicator/index.d.ts +0 -6
  348. package/lib/modules/participant/components/attendee/components/microphone-indicator/index.js +0 -28
  349. package/lib/modules/participant/components/attendee/components/user-avatar/index.d.ts +0 -7
  350. package/lib/modules/participant/components/attendee/components/user-avatar/index.js +0 -39
  351. package/lib/modules/participant/components/attendee/index.css +0 -69
  352. package/lib/modules/participant/components/attendee/index.d.ts +0 -4
  353. package/lib/modules/participant/components/attendee/index.js +0 -337
  354. package/lib/modules/participant/components/drop-menu/index.css +0 -60
  355. package/lib/modules/participant/components/drop-menu/index.d.ts +0 -2
  356. package/lib/modules/participant/components/drop-menu/index.js +0 -189
  357. package/lib/modules/participant/components/footer/buttons.d.ts +0 -6
  358. package/lib/modules/participant/components/footer/buttons.js +0 -52
  359. package/lib/modules/participant/components/footer/index.d.ts +0 -4
  360. package/lib/modules/participant/components/footer/index.js +0 -37
  361. package/lib/modules/participant/components/merge/index.d.ts +0 -11
  362. package/lib/modules/participant/components/merge/index.js +0 -49
  363. package/lib/modules/participant/components/rename/index.d.ts +0 -4
  364. package/lib/modules/participant/components/rename/index.js +0 -45
  365. package/lib/modules/participant/components/user-action/index.d.ts +0 -17
  366. package/lib/modules/participant/components/user-action/index.js +0 -169
  367. package/lib/modules/video-window/deviceState/index.d.ts +0 -16
  368. package/lib/modules/video-window/deviceState/index.js +0 -75
  369. package/lib/modules/video-window/members/index.css +0 -51
  370. package/lib/modules/video-window/members/index.d.ts +0 -2
  371. package/lib/modules/video-window/members/index.js +0 -157
  372. package/lib/modules/video-window/speaking/index.css +0 -69
  373. package/lib/modules/video-window/speaking/index.d.ts +0 -3
  374. package/lib/modules/video-window/speaking/index.js +0 -57
  375. package/lib/modules/video-window/topControl/index.css +0 -35
  376. package/lib/modules/video-window/topControl/index.d.ts +0 -3
  377. package/lib/modules/video-window/topControl/index.js +0 -92
  378. /package/lib/modules/{sound-effect → event-sound}/sound-effect-player.d.ts +0 -0
  379. /package/lib/modules/{sound-effect → event-sound}/sound-effect-player.js +0 -0
@@ -102,12 +102,10 @@ var _inherits2 = _interopRequireDefault(require("@babel/runtime/helpers/inherits
102
102
  var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
103
103
  var _type = require("./type");
104
104
  var _view = require("./view");
105
- var _context3 = require("./context");
105
+ var _context2 = require("./context");
106
106
  var _mobx = require("mobx");
107
107
  var _utils = require("./utils");
108
108
  var _decorator = require("agora-foundation/lib/decorator");
109
- var _tinycolor = _interopRequireDefault(require("tinycolor2"));
110
- var _dayjs = _interopRequireDefault(require("dayjs"));
111
109
  var _multiWindow = require("./components/multi-window");
112
110
  var _constant = require("../../utilities/constant");
113
111
  var _store = require("./components/toolbar/store");
@@ -116,7 +114,6 @@ var _store2 = require("./components/control-bar/store");
116
114
  var _reactDom = _interopRequireDefault(require("react-dom"));
117
115
  var _type2 = require("fcr-core/lib/type");
118
116
  var _fcrCore = require("fcr-core");
119
- var _enums = require("fcr-core/lib/room-control/whiteboard-control/enums");
120
117
  var _libs = _interopRequireDefault(require("./components/switch-theme/libs"));
121
118
  var _types = require("fcr-core/lib/room-control/whiteboard-control/types");
122
119
  var _i18n = require("agora-ui-foundation/lib/i18n");
@@ -124,7 +121,7 @@ var _type3 = require("agora-ui-foundation/lib/components/icon/type");
124
121
  var _logger = require("../../utilities/logger");
125
122
  var _jsxRuntime = require("react/jsx-runtime");
126
123
  var _FcrWhiteboardUIModule;
127
- var _initProto, _init__lonelyWindowState, _init__ownerUser, _init__isHost, _init__boardBackground, _init__localUser, _onPropertiesUpdateDecs, _mountDecs, _unmountDecs, _unloadDecs, _boardUIEventsDecs, _createToolbarUIContextDecs, _repositionToolbarDecs, _updateRedoDecs, _updateUndoDecs, _setConnectionStateDecs, _getSnapshotImageDecs, _openLonelyWindowDecs, _setJoinSuccessedDecs, _ref;
124
+ var _initProto, _init__lonelyWindowState, _init__ownerUser, _init__isHost, _init__boardBackground, _init__localUser, _onPropertiesUpdateDecs, _mountDecs, _unmountDecs, _unloadDecs, _setBackgroundDecs, _boardUIEventsDecs, _repositionToolbarDecs, _setConnectionStateDecs, _openLonelyWindowDecs, _setJoinSuccessedDecs, _ref;
128
125
  function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
129
126
  function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { (0, _defineProperty2["default"])(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
130
127
  function _callSuper(t, o, e) { return o = (0, _getPrototypeOf2["default"])(o), (0, _possibleConstructorReturn2["default"])(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], (0, _getPrototypeOf2["default"])(t).constructor) : o.apply(t, e)); }
@@ -144,7 +141,7 @@ var _B = /*#__PURE__*/new WeakMap();
144
141
  var _C = /*#__PURE__*/new WeakMap();
145
142
  var _D = /*#__PURE__*/new WeakMap();
146
143
  var _E = /*#__PURE__*/new WeakMap();
147
- _ref = (_onPropertiesUpdateDecs = [_mobx.action, _mobx.action.bound], _mountDecs = [_mobx.action, _mobx.action.bound], _unmountDecs = [_mobx.action, _mobx.action.bound], _unloadDecs = [_mobx.action, _mobx.action.bound], _boardUIEventsDecs = [_mobx.action, _mobx.action.bound], _createToolbarUIContextDecs = [_mobx.action, _mobx.action.bound], _repositionToolbarDecs = [_mobx.action, _mobx.action.bound], _updateRedoDecs = [_mobx.action, _mobx.action.bound], _updateUndoDecs = [_mobx.action, _mobx.action.bound], _setConnectionStateDecs = [_mobx.action, _mobx.action.bound], _getSnapshotImageDecs = [_mobx.action, _mobx.action.bound], _openLonelyWindowDecs = [_mobx.action, _mobx.action.bound], _setJoinSuccessedDecs = [_mobx.action, _mobx.action.bound], "_disposers");
144
+ _ref = (_onPropertiesUpdateDecs = [_mobx.action, _mobx.action.bound], _mountDecs = [_mobx.action, _mobx.action.bound], _unmountDecs = [_mobx.action, _mobx.action.bound], _unloadDecs = [_mobx.action, _mobx.action.bound], _setBackgroundDecs = [_mobx.action, _mobx.action.bound], _boardUIEventsDecs = [_mobx.action, _mobx.action.bound], _repositionToolbarDecs = [_mobx.action, _mobx.action.bound], _setConnectionStateDecs = [_mobx.action, _mobx.action.bound], _openLonelyWindowDecs = [_mobx.action, _mobx.action.bound], _setJoinSuccessedDecs = [_mobx.action, _mobx.action.bound], "_disposers");
148
145
  var FcrWhiteboardUIModule = exports.FcrWhiteboardUIModule = /*#__PURE__*/function (_UIModule) {
149
146
  function FcrWhiteboardUIModule() {
150
147
  var _this;
@@ -155,19 +152,72 @@ var FcrWhiteboardUIModule = exports.FcrWhiteboardUIModule = /*#__PURE__*/functio
155
152
  _this = _callSuper(this, FcrWhiteboardUIModule, [].concat(args));
156
153
  (0, _defineProperty2["default"])(_this, _ref, (_initProto(_this), []));
157
154
  (0, _defineProperty2["default"])(_this, "_connectionState", _fcrCore.FcrConnectionState.DISCONNECTED);
158
- (0, _defineProperty2["default"])(_this, "_defaultBoardState", {
159
- tool: _enums.FcrBoardToolType.LASER_POINTER,
160
- strokeColor: '#fed130',
161
- strokeWidth: 2
162
- });
163
155
  (0, _defineProperty2["default"])(_this, "_initWidth", 1920);
164
156
  (0, _defineProperty2["default"])(_this, "_initHeight", 1220);
165
157
  (0, _defineProperty2["default"])(_this, "_joinSuccessed", false);
166
158
  (0, _defineProperty2["default"])(_this, "_isActive", false);
167
159
  (0, _defineProperty2["default"])(_this, "_timer", null);
168
160
  (0, _defineProperty2["default"])(_this, "_isMyBoard", false);
169
- (0, _defineProperty2["default"])(_this, "_t", function (t) {
170
- return '';
161
+ (0, _defineProperty2["default"])(_this, "_boardObserver", {
162
+ onActive: function onActive(_, operatorUser) {
163
+ return _this.onPropertiesUpdate({
164
+ operatorUser: operatorUser
165
+ });
166
+ },
167
+ onInactive: function onInactive(reason, operatorUser) {
168
+ var _this$_localUser, _this$_ownerUser, _this$_ownerUser2;
169
+ var currentUserId = (_this$_localUser = _this._localUser) === null || _this$_localUser === void 0 ? void 0 : _this$_localUser.userId;
170
+ var isSeize = reason === _types.FcrBoardInactiveReason.SEIZE;
171
+ var isMeOperated = (operatorUser === null || operatorUser === void 0 ? void 0 : operatorUser.userId) === currentUserId;
172
+ var isMeOwner = ((_this$_ownerUser = _this._ownerUser) === null || _this$_ownerUser === void 0 ? void 0 : _this$_ownerUser.userId) === currentUserId;
173
+ _this.logger.info("Fcr board has inactive effect, the reason is ".concat(reason, ", the operator is ").concat(operatorUser === null || operatorUser === void 0 ? void 0 : operatorUser.userName, ", the owner is ").concat((_this$_ownerUser2 = _this._ownerUser) === null || _this$_ownerUser2 === void 0 ? void 0 : _this$_ownerUser2.userName));
174
+ isSeize && !isMeOperated && isMeOwner && _this._alertWhenReplace(operatorUser);
175
+ _this.onDestroy({
176
+ operatorUser: operatorUser
177
+ });
178
+ },
179
+ onBackgroundColorUpdated: _this._setBackground,
180
+ onConnectionStateUpdated: function () {
181
+ var _onConnectionStateUpdated = (0, _asyncToGenerator2["default"])(/*#__PURE__*/_regenerator["default"].mark(function _callee(state) {
182
+ var _this$_whiteboardCont, _this$_whiteboardCont2, mainWindow, _this$_whiteboardCont3, ownerUserId, isActive, _this$_userControl, ownerUser;
183
+ return _regenerator["default"].wrap(function _callee$(_context) {
184
+ while (1) switch (_context.prev = _context.next) {
185
+ case 0:
186
+ _this.logger.info('Fcr board connection state changed to', state);
187
+ _this._setConnectionState(state);
188
+ if (state === _fcrCore.FcrConnectionState.DISCONNECTED) {
189
+ if (_this._joined) {
190
+ (_this$_whiteboardCont = _this._whiteboardControl) === null || _this$_whiteboardCont === void 0 || _this$_whiteboardCont.open();
191
+ } else {
192
+ _this.unmount();
193
+ _this.unload();
194
+ }
195
+ }
196
+ if (state === _fcrCore.FcrConnectionState.CONNECTED) {
197
+ _this._setJoinSuccessed(true);
198
+ mainWindow = (_this$_whiteboardCont2 = _this._whiteboardControl) === null || _this$_whiteboardCont2 === void 0 ? void 0 : _this$_whiteboardCont2.getMainWindow();
199
+ _this.logger.info('Fcr board join success');
200
+ if (_this._whiteboardControl) {
201
+ _this$_whiteboardCont3 = _this._whiteboardControl.getBoardActiveInfo(), ownerUserId = _this$_whiteboardCont3.ownerUserId, isActive = _this$_whiteboardCont3.isActive;
202
+ if (isActive) {
203
+ ownerUser = (_this$_userControl = _this._userControl) === null || _this$_userControl === void 0 ? void 0 : _this$_userControl.getUser(ownerUserId);
204
+ _this._controlbarStore.ownerUser = ownerUser;
205
+ }
206
+ }
207
+ _this._boardMainWindow = mainWindow;
208
+ _this.mount();
209
+ }
210
+ case 4:
211
+ case "end":
212
+ return _context.stop();
213
+ }
214
+ }, _callee);
215
+ }));
216
+ function onConnectionStateUpdated(_x) {
217
+ return _onConnectionStateUpdated.apply(this, arguments);
218
+ }
219
+ return onConnectionStateUpdated;
220
+ }()
171
221
  });
172
222
  (0, _defineProperty2["default"])(_this, "logger", (0, _logger.createLogger)({
173
223
  prefix: 'FcrWhiteboardUIModule'
@@ -263,8 +313,7 @@ var FcrWhiteboardUIModule = exports.FcrWhiteboardUIModule = /*#__PURE__*/functio
263
313
  this._roomControl = (_this$currentRoomCont = this.currentRoomControlProvider) === null || _this$currentRoomCont === void 0 ? void 0 : _this$currentRoomCont.currentRoomControl;
264
314
  this._securityStore = this.privilegeProvider;
265
315
  this._whiteboardControl = this._roomControl.getBoardControl();
266
- this._whiteboardControl.addObserver(this._boardObservble());
267
- this._toolbarStore = new _store.ToolbarStore();
316
+ this._toolbarStore = new _store.ToolbarStore(this._whiteboardControl, this._roomControl);
268
317
  var streamControl = this._roomControl.getStreamControl();
269
318
  var userControl = this._roomControl.getUserControl();
270
319
  this._userControl = userControl;
@@ -274,26 +323,7 @@ var FcrWhiteboardUIModule = exports.FcrWhiteboardUIModule = /*#__PURE__*/functio
274
323
  userControl: userControl,
275
324
  securityStore: this.privilegeProvider
276
325
  });
277
- this._whiteboardControl.addObserver({
278
- onActive: function onActive(ownerId, operatorUser) {
279
- _this2.onPropertiesUpdate({
280
- operatorUser: operatorUser
281
- });
282
- },
283
- onInactive: function onInactive(reason, operatorUser) {
284
- var _this2$_localUser, _this2$_ownerUser;
285
- var currentUserId = (_this2$_localUser = _this2._localUser) === null || _this2$_localUser === void 0 ? void 0 : _this2$_localUser.userId;
286
- if (reason === _types.FcrBoardInactiveReason.SEIZE && (operatorUser === null || operatorUser === void 0 ? void 0 : operatorUser.userId) !== currentUserId && ((_this2$_ownerUser = _this2._ownerUser) === null || _this2$_ownerUser === void 0 ? void 0 : _this2$_ownerUser.userId) === currentUserId) {
287
- _this2._alertWhenReplace(operatorUser);
288
- }
289
- _this2.onDestroy({
290
- operatorUser: operatorUser
291
- });
292
- },
293
- onBackgroundColorUpdated: function onBackgroundColorUpdated(color) {
294
- _this2._setBackground(color);
295
- }
296
- });
326
+ this._whiteboardControl.addObserver(this._boardObserver);
297
327
  streamControl.addObserver({
298
328
  onStreamsRemoved: function onStreamsRemoved(roomId, events) {
299
329
  var isReplaced = events.find(function (event) {
@@ -301,8 +331,8 @@ var FcrWhiteboardUIModule = exports.FcrWhiteboardUIModule = /*#__PURE__*/functio
301
331
  return ((_event$cause = event.cause) === null || _event$cause === void 0 ? void 0 : _event$cause.data.reason) === _types.FcrBoardInactiveReason.SEIZE;
302
332
  });
303
333
  var isMyStream = events.some(function (event) {
304
- var _this2$_localUser2;
305
- return event.modifiedStream.owner.userId === ((_this2$_localUser2 = _this2._localUser) === null || _this2$_localUser2 === void 0 ? void 0 : _this2$_localUser2.userId);
334
+ var _this2$_localUser;
335
+ return event.modifiedStream.owner.userId === ((_this2$_localUser = _this2._localUser) === null || _this2$_localUser === void 0 ? void 0 : _this2$_localUser.userId);
306
336
  });
307
337
  if (isReplaced && isMyStream) {
308
338
  _this2._alertWhenReplace(isReplaced === null || isReplaced === void 0 ? void 0 : isReplaced.operatorUser);
@@ -322,8 +352,8 @@ var FcrWhiteboardUIModule = exports.FcrWhiteboardUIModule = /*#__PURE__*/functio
322
352
  });
323
353
  userControl.addObserver({
324
354
  onUserInfoUpdated: function onUserInfoUpdated(_, event) {
325
- var _this2$_localUser3;
326
- if (event.modifiedUser.userId === ((_this2$_localUser3 = _this2._localUser) === null || _this2$_localUser3 === void 0 ? void 0 : _this2$_localUser3.userId)) {
355
+ var _this2$_localUser2;
356
+ if (event.modifiedUser.userId === ((_this2$_localUser2 = _this2._localUser) === null || _this2$_localUser2 === void 0 ? void 0 : _this2$_localUser2.userId)) {
327
357
  _this2._localUser = event.modifiedUser;
328
358
  _this2._isHost = [_type2.FcrUserRole.HOST, _type2.FcrUserRole.COHOST].includes(_this2._localUser.userRole);
329
359
  }
@@ -336,11 +366,13 @@ var FcrWhiteboardUIModule = exports.FcrWhiteboardUIModule = /*#__PURE__*/functio
336
366
  this._localUser = this._userControl.getLocalUser();
337
367
  this._isHost = [_type2.FcrUserRole.HOST, _type2.FcrUserRole.COHOST].includes(this._localUser.userRole);
338
368
  window.addEventListener('resize', this._resetCanvasPosition);
339
- var activeInfo = this._whiteboardControl.getBoardActiveInfo();
340
- this._isActive = activeInfo.isActive;
341
- if (this._isActive) {
369
+ var _this$_whiteboardCont4 = this._whiteboardControl.getBoardActiveInfo(),
370
+ ownerUserId = _this$_whiteboardCont4.ownerUserId,
371
+ isActive = _this$_whiteboardCont4.isActive;
372
+ this._isActive = isActive;
373
+ if (isActive) {
342
374
  this._checkBoard();
343
- this._ownerUser = this._userControl.getUser(activeInfo.ownerUserId);
375
+ this._ownerUser = this._userControl.getUser(ownerUserId);
344
376
  this._boardBackground = this._whiteboardControl.getBackgroundColor();
345
377
  }
346
378
  }
@@ -352,10 +384,10 @@ var FcrWhiteboardUIModule = exports.FcrWhiteboardUIModule = /*#__PURE__*/functio
352
384
  }, {
353
385
  key: "getComponent",
354
386
  value: function getComponent(dom) {
355
- var component = /*#__PURE__*/(0, _jsxRuntime.jsx)(_context3.BoardUIContext.Provider, {
387
+ var component = /*#__PURE__*/(0, _jsxRuntime.jsx)(_context2.BoardUIContext.Provider, {
356
388
  value: this._boardStore,
357
389
  children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_store.ToolbarContext.Provider, {
358
- value: this._createToolbarUIContext(),
390
+ value: this._toolbarStore,
359
391
  children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_store2.WhiteboardControlBarUIContext.Provider, {
360
392
  value: this._controlbarStore,
361
393
  children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_multiWindow.MultiWindowWidgetDialog, {
@@ -377,16 +409,16 @@ var FcrWhiteboardUIModule = exports.FcrWhiteboardUIModule = /*#__PURE__*/functio
377
409
  }, {
378
410
  key: "onEvent",
379
411
  value: function onEvent(event, payload) {
380
- var _this$_whiteboardCont2;
412
+ var _this$_whiteboardCont6;
381
413
  switch (event) {
382
414
  case _constant.FcrUIAction.OPEN_WHITEBOARD:
383
415
  if (!this._isActive) {
384
- var _this$_whiteboardCont;
385
- (_this$_whiteboardCont = this._whiteboardControl) === null || _this$_whiteboardCont === void 0 || _this$_whiteboardCont.active();
416
+ var _this$_whiteboardCont5;
417
+ (_this$_whiteboardCont5 = this._whiteboardControl) === null || _this$_whiteboardCont5 === void 0 || _this$_whiteboardCont5.active();
386
418
  }
387
419
  break;
388
420
  case _constant.FcrUIAction.CLOSE_WHITEBOARD:
389
- (_this$_whiteboardCont2 = this._whiteboardControl) === null || _this$_whiteboardCont2 === void 0 || _this$_whiteboardCont2.inactive();
421
+ (_this$_whiteboardCont6 = this._whiteboardControl) === null || _this$_whiteboardCont6 === void 0 || _this$_whiteboardCont6.inactive();
390
422
  break;
391
423
  case _constant.FcrUIAction.WHITEBOARD_CHANGED:
392
424
  this._setCanvasBound(payload.action);
@@ -398,7 +430,6 @@ var FcrWhiteboardUIModule = exports.FcrWhiteboardUIModule = /*#__PURE__*/functio
398
430
  if (payload.action === _type.WhiteboardControlbarEvents.ENABLE_CONTROL) {
399
431
  var _this$_boardStore;
400
432
  (_this$_boardStore = this._boardStore) === null || _this$_boardStore === void 0 || _this$_boardStore.setWriteEnable(payload.payload);
401
- if (!payload.payload) this._resetToolIfNeed();
402
433
  break;
403
434
  }
404
435
  break;
@@ -432,10 +463,10 @@ var FcrWhiteboardUIModule = exports.FcrWhiteboardUIModule = /*#__PURE__*/functio
432
463
  }, {
433
464
  key: "onDestroy",
434
465
  value: function onDestroy(params) {
435
- var _this$_securityStore2, _this$_localUser;
466
+ var _this$_securityStore2, _this$_localUser2;
436
467
  var _ref2 = params || {},
437
468
  operatorUser = _ref2.operatorUser;
438
- if ((_this$_securityStore2 = this._securityStore) !== null && _this$_securityStore2 !== void 0 && _this$_securityStore2.hasStartScreenSharePermission() && (operatorUser === null || operatorUser === void 0 ? void 0 : operatorUser.userId) !== ((_this$_localUser = this._localUser) === null || _this$_localUser === void 0 ? void 0 : _this$_localUser.userId) && this._isActive) {
469
+ if ((_this$_securityStore2 = this._securityStore) !== null && _this$_securityStore2 !== void 0 && _this$_securityStore2.hasStartScreenSharePermission() && (operatorUser === null || operatorUser === void 0 ? void 0 : operatorUser.userId) !== ((_this$_localUser2 = this._localUser) === null || _this$_localUser2 === void 0 ? void 0 : _this$_localUser2.userId) && this._isActive) {
439
470
  var _this$_uiEventStore2;
440
471
  (_this$_uiEventStore2 = this._uiEventStore) === null || _this$_uiEventStore2 === void 0 || _this$_uiEventStore2.showToast({
441
472
  message: this._isMyBoard ? (0, _i18n.transI18n)('fmt_screenshare_whiteboard_tips_stoppedboard') : (0, _i18n.transI18n)('fmt_screenshare_whiteboard_tips_stopped'),
@@ -465,21 +496,31 @@ var FcrWhiteboardUIModule = exports.FcrWhiteboardUIModule = /*#__PURE__*/functio
465
496
  _boardDom.appendChild(view);
466
497
  _boardMainWindow.setContainerSizeRatio(aspectRatio);
467
498
  this._addDisposers();
468
- this._resetToolIfNeed();
469
499
  this._repositionToolbar();
470
500
  if (this._boardMainWindow) {
471
- var _this$_whiteboardCont3, _this$_userControl, _this$_ownerUser, _this$_localUser2, _this$_boardStore2, _this$_boardStore3, _this$_uiEventStore3;
472
- this._setBackground(((_this$_whiteboardCont3 = this._whiteboardControl) === null || _this$_whiteboardCont3 === void 0 ? void 0 : _this$_whiteboardCont3.getBackgroundColor()) || this._boardBackground);
473
- this._toolbarStore.observables.layoutReady = [_type.LonelyWindowState.CLOSE, _type.LonelyWindowState.DEFAULT].includes(this._lonelyWindowState);
474
- var activeInfo = this._whiteboardControl.getBoardActiveInfo();
475
- this._ownerUser = (_this$_userControl = this._userControl) === null || _this$_userControl === void 0 ? void 0 : _this$_userControl.getUser(activeInfo.ownerUserId);
476
- this._isMyBoard = ((_this$_ownerUser = this._ownerUser) === null || _this$_ownerUser === void 0 ? void 0 : _this$_ownerUser.userId) === ((_this$_localUser2 = this._localUser) === null || _this$_localUser2 === void 0 ? void 0 : _this$_localUser2.userId);
477
- (_this$_boardStore2 = this._boardStore) === null || _this$_boardStore2 === void 0 || _this$_boardStore2.setPrivilege(this._isMyBoard || this._isHost);
478
- (_this$_boardStore3 = this._boardStore) === null || _this$_boardStore3 === void 0 || _this$_boardStore3.setWriteEnable(this._isMyBoard || this._isHost);
479
- (_this$_uiEventStore3 = this._uiEventStore) === null || _this$_uiEventStore3 === void 0 || _this$_uiEventStore3.sendEvent(_constant.FcrUIAction.WHITEBOARD_CHANGED, {
480
- action: _type.WhiteboardBaseEvents.SET_OWNER_USER_ID,
481
- payload: activeInfo.ownerUserId
482
- });
501
+ var _this$_whiteboardCont7;
502
+ this._setBackground(((_this$_whiteboardCont7 = this._whiteboardControl) === null || _this$_whiteboardCont7 === void 0 ? void 0 : _this$_whiteboardCont7.getBackgroundColor()) || this._boardBackground);
503
+ // this._toolbarStore!.observables.layoutReady = [
504
+ // LonelyWindowState.CLOSE,
505
+ // LonelyWindowState.DEFAULT,
506
+ // ].includes(this._lonelyWindowState);
507
+
508
+ var _getBoardActiveInfo = this._whiteboardControl.getBoardActiveInfo(),
509
+ ownerUserId = _getBoardActiveInfo.ownerUserId,
510
+ isActive = _getBoardActiveInfo.isActive;
511
+ if (isActive) {
512
+ var _this$_userControl2, _this$_ownerUser3, _this$_localUser3, _this$_boardStore2, _this$_boardStore3, _this$_uiEventStore3;
513
+ this._ownerUser = (_this$_userControl2 = this._userControl) === null || _this$_userControl2 === void 0 ? void 0 : _this$_userControl2.getUser(ownerUserId);
514
+ this._isMyBoard = ((_this$_ownerUser3 = this._ownerUser) === null || _this$_ownerUser3 === void 0 ? void 0 : _this$_ownerUser3.userId) === ((_this$_localUser3 = this._localUser) === null || _this$_localUser3 === void 0 ? void 0 : _this$_localUser3.userId);
515
+ (_this$_boardStore2 = this._boardStore) === null || _this$_boardStore2 === void 0 || _this$_boardStore2.setPrivilege(this._isMyBoard || this._isHost);
516
+ (_this$_boardStore3 = this._boardStore) === null || _this$_boardStore3 === void 0 || _this$_boardStore3.setWriteEnable(this._isMyBoard || this._isHost);
517
+ (_this$_uiEventStore3 = this._uiEventStore) === null || _this$_uiEventStore3 === void 0 || _this$_uiEventStore3.sendEvent(_constant.FcrUIAction.WHITEBOARD_CHANGED, {
518
+ action: _type.WhiteboardBaseEvents.SET_OWNER_USER_ID,
519
+ payload: ownerUserId
520
+ });
521
+ } else {
522
+ this.logger.warn('whiteboard mount, getBoardActiveInfo activeInfo isActive is false , ownerUserId is null');
523
+ }
483
524
  }
484
525
  }
485
526
  }
@@ -521,7 +562,7 @@ var FcrWhiteboardUIModule = exports.FcrWhiteboardUIModule = /*#__PURE__*/functio
521
562
  var bgColor = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '#ffffff';
522
563
  if (this._boardMainWindow) {
523
564
  var _this$_boardMainWindo;
524
- var themes = (0, _libs["default"])(this._t);
565
+ var themes = (0, _libs["default"])();
525
566
  var _ref3 = themes.find(function (theme) {
526
567
  return theme.background === bgColor;
527
568
  }) || {
@@ -534,20 +575,6 @@ var FcrWhiteboardUIModule = exports.FcrWhiteboardUIModule = /*#__PURE__*/functio
534
575
  }
535
576
  }
536
577
  }
537
- }, {
538
- key: "_resetToolIfNeed",
539
- value: function _resetToolIfNeed() {
540
- var _this$_toolbarContext, _this$_toolbarContext2, _this$_toolbarContext3;
541
- // if (this._boardMainWindow?.mounted) {
542
- var _this$_defaultBoardSt = this._defaultBoardState,
543
- strokeColor = _this$_defaultBoardSt.strokeColor,
544
- strokeWidth = _this$_defaultBoardSt.strokeWidth,
545
- tool = _this$_defaultBoardSt.tool;
546
- (_this$_toolbarContext = this._toolbarContext) === null || _this$_toolbarContext === void 0 || _this$_toolbarContext.setStrokeColor(strokeColor);
547
- (_this$_toolbarContext2 = this._toolbarContext) === null || _this$_toolbarContext2 === void 0 || _this$_toolbarContext2.setStrokeWidth(strokeWidth);
548
- (_this$_toolbarContext3 = this._toolbarContext) === null || _this$_toolbarContext3 === void 0 || _this$_toolbarContext3.setTool(tool);
549
- // }
550
- }
551
578
  }, {
552
579
  key: "_checkBoard",
553
580
  value: function _checkBoard() {
@@ -693,208 +720,10 @@ var FcrWhiteboardUIModule = exports.FcrWhiteboardUIModule = /*#__PURE__*/functio
693
720
  observables: observables
694
721
  }, this._boardUIEvents(observables));
695
722
  }
696
- }, {
697
- key: "_createToolbarUIContext",
698
- value: function _createToolbarUIContext() {
699
- var _this5 = this;
700
- var observables = this._toolbarStore.observables;
701
- this._toolbarContext = {
702
- observables: observables,
703
- redo: function redo() {
704
- var _this5$_boardMainWind;
705
- return (_this5$_boardMainWind = _this5._boardMainWindow) === null || _this5$_boardMainWind === void 0 ? void 0 : _this5$_boardMainWind.redo();
706
- },
707
- undo: function undo() {
708
- var _this5$_boardMainWind2;
709
- return (_this5$_boardMainWind2 = _this5._boardMainWindow) === null || _this5$_boardMainWind2 === void 0 ? void 0 : _this5$_boardMainWind2.undo();
710
- },
711
- clean: function clean() {
712
- var _this5$_boardMainWind3;
713
- return (_this5$_boardMainWind3 = _this5._boardMainWindow) === null || _this5$_boardMainWind3 === void 0 ? void 0 : _this5$_boardMainWind3.clean();
714
- },
715
- saveDraft: function saveDraft() {
716
- return _this5._getSnapshotImage();
717
- },
718
- clickExpansionTool: function clickExpansionTool() {},
719
- setToolbarPosition: function setToolbarPosition(pos) {
720
- return observables.toolbarPosition = pos;
721
- },
722
- dragToolbar: function dragToolbar() {
723
- return observables.toolbarReleased = false;
724
- },
725
- setTool: function setTool(tool) {
726
- var _this5$_boardMainWind4;
727
- observables.currentTool = tool;
728
- observables.currentShape = undefined;
729
- (_this5$_boardMainWind4 = _this5._boardMainWindow) === null || _this5$_boardMainWind4 === void 0 || _this5$_boardMainWind4.setToolType(tool);
730
- },
731
- setPen: function setPen(shape) {
732
- var _this5$_boardMainWind5, _this5$_boardMainWind6, _this5$_boardMainWind7;
733
- observables.currentShape = shape;
734
- observables.lastPen = shape;
735
- observables.currentTool = undefined;
736
- (_this5$_boardMainWind5 = _this5._boardMainWindow) === null || _this5$_boardMainWind5 === void 0 || _this5$_boardMainWind5.setToolType(_this5._convertShapeToBoardToolType(shape));
737
- (_this5$_boardMainWind6 = _this5._boardMainWindow) === null || _this5$_boardMainWind6 === void 0 || _this5$_boardMainWind6.setStrokeWidth(observables.currentStrokeWidth);
738
- (_this5$_boardMainWind7 = _this5._boardMainWindow) === null || _this5$_boardMainWind7 === void 0 || _this5$_boardMainWind7.setStrokeColor((0, _tinycolor["default"])(observables.currentColor).toRgb());
739
- },
740
- setShape: function setShape(shape) {
741
- var _this5$_boardMainWind8, _this5$_boardMainWind9, _this5$_boardMainWind10;
742
- observables.currentShape = shape;
743
- observables.lastShape = shape;
744
- observables.currentTool = undefined;
745
- (_this5$_boardMainWind8 = _this5._boardMainWindow) === null || _this5$_boardMainWind8 === void 0 || _this5$_boardMainWind8.setToolType(_this5._convertShapeToBoardToolType(shape));
746
- (_this5$_boardMainWind9 = _this5._boardMainWindow) === null || _this5$_boardMainWind9 === void 0 || _this5$_boardMainWind9.setStrokeWidth(observables.currentStrokeWidth);
747
- (_this5$_boardMainWind10 = _this5._boardMainWindow) === null || _this5$_boardMainWind10 === void 0 || _this5$_boardMainWind10.setStrokeColor((0, _tinycolor["default"])(observables.currentColor).toRgb());
748
- },
749
- setStrokeColor: function setStrokeColor(color) {
750
- var _this5$_boardMainWind11;
751
- observables.currentColor = color;
752
- (_this5$_boardMainWind11 = _this5._boardMainWindow) === null || _this5$_boardMainWind11 === void 0 || _this5$_boardMainWind11.setStrokeColor((0, _tinycolor["default"])(color).toRgb());
753
- },
754
- setStrokeWidth: function setStrokeWidth(strokeWidth) {
755
- var _this5$_boardMainWind12;
756
- observables.currentStrokeWidth = strokeWidth;
757
- (_this5$_boardMainWind12 = _this5._boardMainWindow) === null || _this5$_boardMainWind12 === void 0 || _this5$_boardMainWind12.setStrokeWidth(strokeWidth);
758
- },
759
- releaseToolbar: function releaseToolbar() {
760
- observables.toolbarReleased = true;
761
- _this5._updateDockPlacement();
762
- _this5._repositionToolbar();
763
- },
764
- captureScreen: function captureScreen() {
765
- var hideWindow = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false;
766
- window.runtime.captureScreen({
767
- hideWindow: hideWindow
768
- });
769
- },
770
- setTheme: (0, _mobx.action)(function (theme) {
771
- _this5._setBackgroundColor(theme.background);
772
- observables.colors = theme.colors;
773
- observables.currentThemeType = theme;
774
- }),
775
- setCommonColor: (0, _mobx.action)(function (color) {
776
- if (observables.commonColors.length < 2) observables.commonColors.push(color);
777
- if (observables.commonColors.length === 2) {
778
- observables.commonColors = [color, observables.commonColors[0]];
779
- }
780
- })
781
- };
782
- return this._toolbarContext;
783
- }
784
- }, {
785
- key: "_updateDockPosition",
786
- value: function _updateDockPosition() {
787
- if (this._toolbarContext) {
788
- var toolbarDom = document.querySelector(".".concat(_utils.toolbarClassName));
789
- var containerDom = document.querySelector(".".concat(_utils.windowClassName));
790
- if (containerDom && toolbarDom) {
791
- var containerClientRect = containerDom.getBoundingClientRect();
792
- var toolbarClientRect = toolbarDom.getBoundingClientRect();
793
- var toolbarOffsetTop = 4;
794
- var toolbarContext = this._toolbarContext;
795
- (0, _mobx.runInAction)(function () {
796
- if (toolbarContext.observables.toolbarDockPosition.placement === 'right') {
797
- // right
798
- toolbarContext.observables.toolbarDockPosition = {
799
- x: containerClientRect.width - toolbarClientRect.width,
800
- y: toolbarOffsetTop,
801
- placement: 'right'
802
- };
803
- } else {
804
- // left
805
- toolbarContext.observables.toolbarDockPosition = {
806
- x: 0,
807
- y: toolbarOffsetTop,
808
- placement: 'left'
809
- };
810
- }
811
- });
812
- }
813
- }
814
- }
815
- }, {
816
- key: "_updateDockPlacement",
817
- value: function _updateDockPlacement() {
818
- if (this._toolbarContext) {
819
- var toolbarDom = document.querySelector(".".concat(_utils.toolbarClassName));
820
- var containerDom = document.querySelector(".".concat(_utils.windowClassName));
821
- if (containerDom && toolbarDom) {
822
- var containerClientRect = containerDom.getBoundingClientRect();
823
- var toolbarClientRect = toolbarDom.getBoundingClientRect();
824
- var toolbarCenterPos = toolbarClientRect.left - containerClientRect.left + toolbarClientRect.width / 2;
825
- var toolbarContext = this._toolbarContext;
826
- (0, _mobx.runInAction)(function () {
827
- if (toolbarCenterPos > containerClientRect.width / 2) {
828
- // right
829
- toolbarContext.observables.toolbarDockPosition.placement = 'right';
830
- } else {
831
- // left
832
- toolbarContext.observables.toolbarDockPosition.placement = 'left';
833
- }
834
- });
835
- }
836
- }
837
- }
838
723
  }, {
839
724
  key: "_repositionToolbar",
840
725
  value: function _repositionToolbar() {
841
- if (this._toolbarContext) {
842
- var toolbarDom = document.querySelector(".".concat(_utils.toolbarClassName));
843
- var containerDom = document.querySelector(".".concat(_utils.windowClassName));
844
- if (containerDom && toolbarDom) {
845
- setTimeout(this._updateMaxVisibleTools);
846
- // wait until the UI rerenders, then actual dimensions can be obtained
847
- setTimeout(this._updateDockPosition);
848
- }
849
- }
850
- }
851
- }, {
852
- key: "_updateMaxVisibleTools",
853
- value: function _updateMaxVisibleTools() {
854
- var containerDom = document.querySelector(".".concat(_utils.windowClassName));
855
- if (this._toolbarContext && containerDom) {
856
- var containerClientRect = containerDom.getBoundingClientRect();
857
- var placement = this._toolbarContext.observables.toolbarDockPosition.placement;
858
- var toolbarContext = this._toolbarContext;
859
- (0, _mobx.runInAction)(function () {
860
- if (placement === 'right') {
861
- var availableHeight = containerClientRect.height - _utils.verticalPadding - _utils.defaultToolsRetain - _utils.sceneNavHeight;
862
- toolbarContext.observables.maxCountVisibleTools = Math.floor(availableHeight / _utils.heightPerTool);
863
- if (toolbarContext.observables.maxCountVisibleTools >= 9) {
864
- var visibleTools = toolbarContext.observables.maxCountVisibleTools;
865
- toolbarContext.observables.maxCountVisibleTools += Math.floor((availableHeight - visibleTools * _utils.heightPerTool) / _utils.heightPerColor);
866
- }
867
- } else {
868
- var _availableHeight = containerClientRect.height - _utils.verticalPadding - _utils.defaultToolsRetain - _utils.sceneNavHeight;
869
- toolbarContext.observables.maxCountVisibleTools = Math.floor(_availableHeight / _utils.heightPerTool);
870
- if (toolbarContext.observables.maxCountVisibleTools >= 9) {
871
- var _visibleTools = toolbarContext.observables.maxCountVisibleTools;
872
- toolbarContext.observables.maxCountVisibleTools += Math.floor((_availableHeight - _visibleTools * _utils.heightPerTool) / _utils.heightPerColor);
873
- }
874
- }
875
- });
876
- }
877
- }
878
- }, {
879
- key: "_setBackgroundColor",
880
- value: function _setBackgroundColor(bgColor) {
881
- var _this$_whiteboardCont4;
882
- var color = bgColor || 'white';
883
- (_this$_whiteboardCont4 = this._whiteboardControl) === null || _this$_whiteboardCont4 === void 0 || _this$_whiteboardCont4.setBackgroundColor(color);
884
- }
885
- }, {
886
- key: "_updateRedo",
887
- value: function _updateRedo(steps) {
888
- if (this._toolbarContext) {
889
- this._toolbarContext.observables.redoSteps = steps;
890
- }
891
- }
892
- }, {
893
- key: "_updateUndo",
894
- value: function _updateUndo(steps) {
895
- if (this._toolbarContext) {
896
- this._toolbarContext.observables.undoSteps = steps;
897
- }
726
+ this._toolbarStore.repositionToolbar();
898
727
  }
899
728
  }, {
900
729
  key: "_setConnectionState",
@@ -907,10 +736,10 @@ var FcrWhiteboardUIModule = exports.FcrWhiteboardUIModule = /*#__PURE__*/functio
907
736
  }, {
908
737
  key: "_open",
909
738
  value: function _open() {
910
- var _this$_whiteboardCont5;
739
+ var _this$_whiteboardCont8;
911
740
  this._joined = true;
912
741
  this._initialized = true;
913
- (_this$_whiteboardCont5 = this._whiteboardControl) === null || _this$_whiteboardCont5 === void 0 || _this$_whiteboardCont5.open();
742
+ (_this$_whiteboardCont8 = this._whiteboardControl) === null || _this$_whiteboardCont8 === void 0 || _this$_whiteboardCont8.open();
914
743
  }
915
744
  }, {
916
745
  key: "_close",
@@ -921,63 +750,13 @@ var FcrWhiteboardUIModule = exports.FcrWhiteboardUIModule = /*#__PURE__*/functio
921
750
  this._whiteboardControl.close();
922
751
  }
923
752
  }
924
- }, {
925
- key: "_getSnapshotImage",
926
- value: function () {
927
- var _getSnapshotImage2 = (0, _asyncToGenerator2["default"])(/*#__PURE__*/_regenerator["default"].mark(function _callee() {
928
- var _this6 = this;
929
- var mainWindow, progress, imageData;
930
- return _regenerator["default"].wrap(function _callee$(_context) {
931
- while (1) switch (_context.prev = _context.next) {
932
- case 0:
933
- this._boardStore.observables.progress = 0;
934
- mainWindow = this._boardMainWindow;
935
- if (!mainWindow) {
936
- _context.next = 8;
937
- break;
938
- }
939
- progress = setInterval(function () {
940
- if (_this6._boardStore && _this6._boardStore.observables.progress < 100) {
941
- _this6._boardStore.observables.progress += 1;
942
- } else {
943
- clearInterval(progress);
944
- }
945
- }, 4);
946
- _context.next = 6;
947
- return mainWindow.getSnapshotImage();
948
- case 6:
949
- imageData = _context.sent;
950
- (0, _mobx.runInAction)(function () {
951
- setTimeout(function () {
952
- var _getRoomInfo, _this6$_uiEventStore;
953
- _this6._boardStore.observables.progress = 100;
954
- clearInterval(progress);
955
- var fileName = "".concat((_getRoomInfo = _this6._roomControl.getRoomInfo()) === null || _getRoomInfo === void 0 ? void 0 : _getRoomInfo.roomName, "_").concat((0, _dayjs["default"])().format('YYYYMMDD_HHmmSSS'), ".jpg");
956
- (0, _utils.downloadImageData)(imageData, fileName);
957
- (_this6$_uiEventStore = _this6._uiEventStore) === null || _this6$_uiEventStore === void 0 || _this6$_uiEventStore.showToast({
958
- type: 'info',
959
- message: (0, _i18n.transI18n)('fmt_screenshare_whiteboard_tips_savedsuccessfully')
960
- });
961
- }, 400);
962
- });
963
- case 8:
964
- case "end":
965
- return _context.stop();
966
- }
967
- }, _callee, this);
968
- }));
969
- function _getSnapshotImage() {
970
- return _getSnapshotImage2.apply(this, arguments);
971
- }
972
- return _getSnapshotImage;
973
- }()
974
753
  }, {
975
754
  key: "_openLonelyWindow",
976
755
  value: function _openLonelyWindow() {
977
756
  var _this$_uiEventStore5, _this$_uiEventStore6;
978
757
  (_this$_uiEventStore5 = this._uiEventStore) === null || _this$_uiEventStore5 === void 0 || _this$_uiEventStore5.openDialog(_constant.FcrUIDialogKey.WHITEBOARD);
979
758
  (_this$_uiEventStore6 = this._uiEventStore) === null || _this$_uiEventStore6 === void 0 || _this$_uiEventStore6.openDialog(_constant.FcrUIDialogKey.TOOLBAR);
980
- this._toolbarStore.observables.layoutReady = false;
759
+ // this._toolbarStore!.observables.layoutReady = false;
981
760
  this._open();
982
761
  }
983
762
  }, {
@@ -987,85 +766,35 @@ var FcrWhiteboardUIModule = exports.FcrWhiteboardUIModule = /*#__PURE__*/functio
987
766
  this._boardStore.observables.joinSuccessed = joinSuccessed;
988
767
  }
989
768
  }
990
- }, {
991
- key: "_boardObservble",
992
- value: function _boardObservble() {
993
- var _this7 = this;
994
- return {
995
- onConnectionStateUpdated: function () {
996
- var _onConnectionStateUpdated = (0, _asyncToGenerator2["default"])(/*#__PURE__*/_regenerator["default"].mark(function _callee2(state) {
997
- var _this7$_whiteboardCon, _this7$_whiteboardCon2, mainWindow, _this7$_userControl, _this7$_whiteboardCon3, ownerUserId, ownerUser;
998
- return _regenerator["default"].wrap(function _callee2$(_context2) {
999
- while (1) switch (_context2.prev = _context2.next) {
1000
- case 0:
1001
- _this7.logger.info('Fcr board connection state changed to', state);
1002
- _this7._setConnectionState(state);
1003
- if (state === _fcrCore.FcrConnectionState.DISCONNECTED) {
1004
- if (_this7._joined) {
1005
- (_this7$_whiteboardCon = _this7._whiteboardControl) === null || _this7$_whiteboardCon === void 0 || _this7$_whiteboardCon.open();
1006
- } else {
1007
- _this7.unmount();
1008
- _this7.unload();
1009
- }
1010
- }
1011
- if (state === _fcrCore.FcrConnectionState.CONNECTED) {
1012
- _this7._setJoinSuccessed(true);
1013
- mainWindow = (_this7$_whiteboardCon2 = _this7._whiteboardControl) === null || _this7$_whiteboardCon2 === void 0 ? void 0 : _this7$_whiteboardCon2.getMainWindow();
1014
- _this7.logger.info('Fcr board join success');
1015
- if (_this7._whiteboardControl) {
1016
- _this7$_whiteboardCon3 = _this7._whiteboardControl.getBoardActiveInfo(), ownerUserId = _this7$_whiteboardCon3.ownerUserId;
1017
- ownerUser = (_this7$_userControl = _this7._userControl) === null || _this7$_userControl === void 0 ? void 0 : _this7$_userControl.getUser(ownerUserId);
1018
- _this7._controlbarStore.ownerUser = ownerUser;
1019
- }
1020
- mainWindow.addObserver({
1021
- onRedoStateUpdated: _this7._updateRedo,
1022
- onUndoStateUpdated: _this7._updateUndo
1023
- });
1024
- _this7._boardMainWindow = mainWindow;
1025
- _this7.mount();
1026
- }
1027
- case 4:
1028
- case "end":
1029
- return _context2.stop();
1030
- }
1031
- }, _callee2);
1032
- }));
1033
- function onConnectionStateUpdated(_x) {
1034
- return _onConnectionStateUpdated.apply(this, arguments);
1035
- }
1036
- return onConnectionStateUpdated;
1037
- }()
1038
- };
1039
- }
1040
769
  }, {
1041
770
  key: "_addDisposers",
1042
771
  value: function _addDisposers() {
1043
- var _this8 = this;
772
+ var _this5 = this;
1044
773
  this._disposers.push((0, _mobx.reaction)(function () {
1045
- return _this8.hasPrivilege;
774
+ return _this5.hasPrivilege;
1046
775
  }, function (privilege) {
1047
- var _this8$_boardStore, _this8$_boardStore2;
1048
- var p = privilege || _this8._isHost || _this8._isMyBoard;
1049
- (_this8$_boardStore = _this8._boardStore) === null || _this8$_boardStore === void 0 || _this8$_boardStore.setWriteEnable(_this8._isHost || _this8._isMyBoard);
1050
- (_this8$_boardStore2 = _this8._boardStore) === null || _this8$_boardStore2 === void 0 || _this8$_boardStore2.setPrivilege(p);
776
+ var _this5$_boardStore, _this5$_boardStore2;
777
+ var p = privilege || _this5._isHost || _this5._isMyBoard;
778
+ (_this5$_boardStore = _this5._boardStore) === null || _this5$_boardStore === void 0 || _this5$_boardStore.setWriteEnable(_this5._isHost || _this5._isMyBoard);
779
+ (_this5$_boardStore2 = _this5._boardStore) === null || _this5$_boardStore2 === void 0 || _this5$_boardStore2.setPrivilege(p);
1051
780
  }), (0, _mobx.reaction)(function () {
1052
- return _this8._boardStore.observables.writeEnabled;
781
+ return _this5._boardStore.observables.writeEnabled;
1053
782
  }, function (writeEnabled) {
1054
- if (writeEnabled) setTimeout(_this8._repositionToolbar, 0);
783
+ if (writeEnabled) setTimeout(_this5._repositionToolbar, 0);
1055
784
  }), (0, _mobx.reaction)(function () {
1056
- return _this8._localUser;
785
+ return _this5._localUser;
1057
786
  }, function (user) {
1058
- var _this8$_boardStore3;
1059
- _this8._isHost = [_type2.FcrUserRole.HOST, _type2.FcrUserRole.COHOST].includes(user.userRole);
1060
- var hasPrivilege = _this8.hasPrivilege || _this8._isHost || _this8._isMyBoard;
1061
- (_this8$_boardStore3 = _this8._boardStore) === null || _this8$_boardStore3 === void 0 || _this8$_boardStore3.setPrivilege(hasPrivilege);
1062
- _this8._boardStore.setWriteEnable(_this8._isHost || _this8._isMyBoard);
787
+ var _this5$_boardStore3;
788
+ _this5._isHost = [_type2.FcrUserRole.HOST, _type2.FcrUserRole.COHOST].includes(user.userRole);
789
+ var hasPrivilege = _this5.hasPrivilege || _this5._isHost || _this5._isMyBoard;
790
+ (_this5$_boardStore3 = _this5._boardStore) === null || _this5$_boardStore3 === void 0 || _this5$_boardStore3.setPrivilege(hasPrivilege);
791
+ _this5._boardStore.setWriteEnable(_this5._isHost || _this5._isMyBoard);
1063
792
  }));
1064
793
  }
1065
794
  }, {
1066
795
  key: "_alertWhenReplace",
1067
796
  value: function _alertWhenReplace(userInfo) {
1068
- var _this9 = this;
797
+ var _this6 = this;
1069
798
  var userRole = userInfo.userRole,
1070
799
  userName = userInfo.userName;
1071
800
  var dialogId = this._uiEventStore.openConfirmDialog({
@@ -1075,45 +804,21 @@ var FcrWhiteboardUIModule = exports.FcrWhiteboardUIModule = /*#__PURE__*/functio
1075
804
  showCancel: false,
1076
805
  icon: _type3.FcrIconType.FCR_SCREENSHARING,
1077
806
  onOk: function onOk() {
1078
- var _this9$_uiEventStore;
1079
- (_this9$_uiEventStore = _this9._uiEventStore) === null || _this9$_uiEventStore === void 0 || _this9$_uiEventStore.closeConfirm(dialogId);
807
+ var _this6$_uiEventStore;
808
+ (_this6$_uiEventStore = _this6._uiEventStore) === null || _this6$_uiEventStore === void 0 || _this6$_uiEventStore.closeConfirm(dialogId);
1080
809
  },
1081
810
  onCancel: function onCancel() {
1082
- var _this9$_uiEventStore2;
1083
- (_this9$_uiEventStore2 = _this9._uiEventStore) === null || _this9$_uiEventStore2 === void 0 || _this9$_uiEventStore2.closeConfirm(dialogId);
811
+ var _this6$_uiEventStore2;
812
+ (_this6$_uiEventStore2 = _this6._uiEventStore) === null || _this6$_uiEventStore2 === void 0 || _this6$_uiEventStore2.closeConfirm(dialogId);
1084
813
  },
1085
814
  width: 400,
1086
815
  height: 160
1087
816
  });
1088
817
  }
1089
- }, {
1090
- key: "_convertShapeToBoardToolType",
1091
- value: function _convertShapeToBoardToolType(shape) {
1092
- switch (shape) {
1093
- case _enums.FcrBoardShape.Arrow:
1094
- return _enums.FcrBoardToolType.ARROW;
1095
- case _enums.FcrBoardShape.Curve:
1096
- return _enums.FcrBoardToolType.CURVE;
1097
- case _enums.FcrBoardShape.Ellipse:
1098
- return _enums.FcrBoardToolType.ELLIPSE;
1099
- case _enums.FcrBoardShape.Pentagram:
1100
- return _enums.FcrBoardToolType.PENTAGRAM;
1101
- case _enums.FcrBoardShape.Rectangle:
1102
- return _enums.FcrBoardToolType.RECTANGLE;
1103
- case _enums.FcrBoardShape.Rhombus:
1104
- return _enums.FcrBoardToolType.RHOMBUS;
1105
- case _enums.FcrBoardShape.Straight:
1106
- return _enums.FcrBoardToolType.STRAIGHT;
1107
- case _enums.FcrBoardShape.Triangle:
1108
- return _enums.FcrBoardToolType.TRIANGLE;
1109
- default:
1110
- return _enums.FcrBoardToolType.NONE;
1111
- }
1112
- }
1113
818
  }]);
1114
819
  }(_base.UIModule);
1115
820
  _FcrWhiteboardUIModule = FcrWhiteboardUIModule;
1116
- var _applyDecs$e = _applyDecs(_FcrWhiteboardUIModule, [[_mobx.observable, 1, "_lonelyWindowState"], [_mobx.observable, 1, "_ownerUser"], [_mobx.observable, 1, "_isHost"], [_mobx.observable, 1, "_boardBackground"], [_mobx.observable, 1, "_localUser"], [_mobx.computed, 3, "hasPrivilege"], [_onPropertiesUpdateDecs, 18, "onPropertiesUpdate"], [_mountDecs, 18, "mount"], [_unmountDecs, 18, "unmount"], [_unloadDecs, 18, "unload"], [_boardUIEventsDecs, 18, "_boardUIEvents"], [_decorator.bound, 2, "_setCanvasBound"], [_decorator.bound, 2, "_resetCanvasPosition"], [_createToolbarUIContextDecs, 18, "_createToolbarUIContext"], [_decorator.bound, 2, "_updateDockPosition"], [_decorator.bound, 2, "_updateDockPlacement"], [_repositionToolbarDecs, 18, "_repositionToolbar"], [_decorator.bound, 2, "_updateMaxVisibleTools"], [_decorator.bound, 2, "_setBackgroundColor"], [_updateRedoDecs, 18, "_updateRedo"], [_updateUndoDecs, 18, "_updateUndo"], [_setConnectionStateDecs, 18, "_setConnectionState"], [_decorator.bound, 2, "_close"], [_getSnapshotImageDecs, 18, "_getSnapshotImage"], [_openLonelyWindowDecs, 18, "_openLonelyWindow"], [_setJoinSuccessedDecs, 18, "_setJoinSuccessed"]], [], 0, void 0, _base.UIModule).e;
821
+ var _applyDecs$e = _applyDecs(_FcrWhiteboardUIModule, [[_mobx.observable, 1, "_lonelyWindowState"], [_mobx.observable, 1, "_ownerUser"], [_mobx.observable, 1, "_isHost"], [_mobx.observable, 1, "_boardBackground"], [_mobx.observable, 1, "_localUser"], [_mobx.computed, 3, "hasPrivilege"], [_onPropertiesUpdateDecs, 18, "onPropertiesUpdate"], [_mountDecs, 18, "mount"], [_unmountDecs, 18, "unmount"], [_unloadDecs, 18, "unload"], [_setBackgroundDecs, 18, "_setBackground"], [_boardUIEventsDecs, 18, "_boardUIEvents"], [_decorator.bound, 2, "_setCanvasBound"], [_decorator.bound, 2, "_resetCanvasPosition"], [_repositionToolbarDecs, 18, "_repositionToolbar"], [_setConnectionStateDecs, 18, "_setConnectionState"], [_decorator.bound, 2, "_close"], [_openLonelyWindowDecs, 18, "_openLonelyWindow"], [_setJoinSuccessedDecs, 18, "_setJoinSuccessed"]], [], 0, void 0, _base.UIModule).e;
1117
822
  var _applyDecs$e2 = (0, _slicedToArray2["default"])(_applyDecs$e, 6);
1118
823
  _init__lonelyWindowState = _applyDecs$e2[0];
1119
824
  _init__ownerUser = _applyDecs$e2[1];