fcr-ui-scene 3.6.4 → 3.7.1

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 (468) hide show
  1. package/lib/creator.d.ts +4 -3
  2. package/lib/creator.js +146 -111
  3. package/lib/electron/app.js +1 -1
  4. package/lib/electron/bootstrap-sdk.js +49 -4
  5. package/lib/electron/injections.d.ts +5 -1
  6. package/lib/electron/injections.js +14 -2
  7. package/lib/electron/ipc/type.d.ts +8 -4
  8. package/lib/electron/ipc/type.js +10 -4
  9. package/lib/electron/logger.js +1 -1
  10. package/lib/electron/main.js +5 -2
  11. package/lib/electron/preload.js +34 -5
  12. package/lib/fragments/annotation/index.d.ts +2 -2
  13. package/lib/fragments/annotation/index.js +38 -28
  14. package/lib/fragments/annotation/libs.d.ts +2 -2
  15. package/lib/fragments/annotation/store.d.ts +21 -4
  16. package/lib/fragments/annotation/store.js +281 -84
  17. package/lib/fragments/annotation/style.css +9 -0
  18. package/lib/{modules/annotation/components → fragments/annotation}/toolbar/components/item/item.js +1 -1
  19. package/lib/{modules/annotation/components → fragments/annotation}/toolbar/components/pen-tool/pen-panel/index.js +1 -1
  20. package/lib/{modules/annotation/components → fragments/annotation}/toolbar/store.d.ts +26 -2
  21. package/lib/{modules/annotation/components → fragments/annotation}/toolbar/store.js +57 -8
  22. package/lib/{modules/annotation/components → fragments/annotation}/toolbar/view.js +36 -3
  23. package/lib/fragments/annotation/view.d.ts +1 -0
  24. package/lib/fragments/annotation/view.js +52 -10
  25. package/lib/modules/action-bar/components/apps/index.js +54 -38
  26. package/lib/modules/action-bar/components/chat/index.js +13 -34
  27. package/lib/modules/action-bar/components/collapse/index.js +1 -1
  28. package/lib/modules/action-bar/components/leave/index.js +9 -9
  29. package/lib/modules/action-bar/components/more/index.js +26 -27
  30. package/lib/modules/action-bar/components/participants/index.js +23 -39
  31. package/lib/modules/action-bar/components/record/index.js +7 -13
  32. package/lib/modules/action-bar/components/screen-share/index.js +4 -24
  33. package/lib/modules/action-bar/components/security/index.js +29 -34
  34. package/lib/modules/action-bar/components/settings/index.js +13 -19
  35. package/lib/modules/action-bar/index.d.ts +4 -0
  36. package/lib/modules/action-bar/index.js +3 -1
  37. package/lib/modules/action-bar/store.d.ts +16 -6
  38. package/lib/modules/action-bar/store.js +63 -25
  39. package/lib/modules/action-bar/types.d.ts +3 -3
  40. package/lib/modules/action-bar/view.js +2 -3
  41. package/lib/modules/annotation/annotation-index.d.ts +2 -0
  42. package/lib/modules/annotation/annotation-index.js +80 -0
  43. package/lib/modules/annotation/annotation-toolbar-store.d.ts +82 -0
  44. package/lib/modules/annotation/annotation-toolbar-store.js +501 -0
  45. package/lib/modules/annotation/components/color-picker/components/color.d.ts +5 -0
  46. package/lib/modules/annotation/components/color-picker/components/color.js +38 -0
  47. package/lib/modules/annotation/components/color-picker/components/panel.d.ts +1 -0
  48. package/lib/modules/annotation/components/color-picker/components/panel.js +109 -0
  49. package/lib/modules/annotation/components/color-picker/components/picker.d.ts +1 -0
  50. package/lib/modules/annotation/components/color-picker/components/picker.js +75 -0
  51. package/lib/modules/annotation/components/color-picker/index.d.ts +2 -0
  52. package/lib/modules/annotation/components/color-picker/index.js +47 -0
  53. package/lib/modules/annotation/components/eraser-picker.d.ts +4 -0
  54. package/lib/modules/annotation/components/eraser-picker.js +144 -0
  55. package/lib/modules/annotation/components/expansion/index.d.ts +1 -0
  56. package/lib/modules/annotation/components/expansion/index.js +100 -0
  57. package/lib/modules/annotation/components/extra-tool-picker.d.ts +1 -0
  58. package/lib/modules/annotation/components/extra-tool-picker.js +62 -0
  59. package/lib/modules/annotation/components/history.d.ts +2 -0
  60. package/lib/modules/annotation/components/history.js +78 -0
  61. package/lib/modules/annotation/components/icons/fold-icon.d.ts +2 -0
  62. package/lib/modules/annotation/components/icons/fold-icon.js +41 -0
  63. package/lib/modules/annotation/components/icons/move-icon.d.ts +1 -0
  64. package/lib/modules/annotation/components/icons/move-icon.js +66 -0
  65. package/lib/modules/annotation/components/item/index.d.ts +1 -0
  66. package/lib/modules/annotation/components/item/index.js +43 -0
  67. package/lib/modules/annotation/components/move-handle.d.ts +5 -0
  68. package/lib/modules/annotation/components/move-handle.js +134 -0
  69. package/lib/modules/annotation/components/pen-picker.d.ts +4 -0
  70. package/lib/modules/annotation/components/pen-picker.js +155 -0
  71. package/lib/modules/annotation/components/screen-capture-picker.d.ts +4 -0
  72. package/lib/modules/annotation/components/screen-capture-picker.js +85 -0
  73. package/lib/modules/annotation/components/shape-picker.d.ts +4 -0
  74. package/lib/modules/annotation/components/shape-picker.js +210 -0
  75. package/lib/modules/annotation/hooks/index.d.ts +14 -0
  76. package/lib/modules/annotation/hooks/index.js +292 -0
  77. package/lib/modules/annotation/index.d.ts +4 -1
  78. package/lib/modules/annotation/index.js +20 -22
  79. package/lib/modules/annotation/store.d.ts +59 -18
  80. package/lib/modules/annotation/store.js +503 -263
  81. package/lib/modules/annotation/style.css +10 -0
  82. package/lib/modules/annotation/view.js +9 -11
  83. package/lib/modules/chat/chat-room-store.js +5 -2
  84. package/lib/modules/chat/components/chat-select/index.js +1 -1
  85. package/lib/modules/chat/components/chat-select/select-item/index.js +10 -3
  86. package/lib/modules/chat/components/message-list/message-item/index.js +4 -2
  87. package/lib/modules/chat/index.d.ts +2 -0
  88. package/lib/modules/chat/index.js +13 -3
  89. package/lib/modules/chat/store.d.ts +3 -0
  90. package/lib/modules/chat/store.js +12 -6
  91. package/lib/modules/chat/types.d.ts +1 -0
  92. package/lib/modules/chat/types.js +2 -1
  93. package/lib/modules/chat/util.js +2 -1
  94. package/lib/modules/chat/view.js +6 -3
  95. package/lib/modules/{action-bar/components → components}/apps/app-item/index.d.ts +1 -1
  96. package/lib/modules/components/apps/app-list.d.ts +3 -0
  97. package/lib/modules/{action-bar/components → components}/apps/app-list.js +2 -4
  98. package/lib/modules/components/apps/types.d.ts +14 -0
  99. package/lib/modules/components/apps/types.js +6 -0
  100. package/lib/modules/components/device-control/components/carmera/index.js +71 -68
  101. package/lib/modules/components/device-control/components/microphone/index.js +99 -97
  102. package/lib/modules/components/device-control/store.d.ts +1 -1
  103. package/lib/modules/components/member-window/components/member-actions/components/audio-control.js +7 -7
  104. package/lib/modules/components/member-window/components/member-actions/components/icon-buttons/index.d.ts +0 -2
  105. package/lib/modules/components/member-window/components/member-actions/components/icon-buttons/index.js +4 -7
  106. package/lib/modules/components/member-window/components/member-actions/components/icon-status.d.ts +0 -1
  107. package/lib/modules/components/member-window/components/member-actions/components/icon-status.js +19 -36
  108. package/lib/modules/components/member-window/components/member-actions/components/more-actions.d.ts +1 -0
  109. package/lib/modules/components/member-window/components/member-actions/components/more-actions.js +9 -2
  110. package/lib/modules/components/member-window/components/member-actions/components/user-info.js +0 -3
  111. package/lib/modules/components/member-window/components/member-actions/components/user-tag.js +15 -11
  112. package/lib/modules/components/member-window/components/member-actions/index.js +10 -2
  113. package/lib/modules/components/member-window/components/member-actions/libs/index.js +2 -2
  114. package/lib/modules/components/member-window/components/video-player/components/local-video-player-with-zoom.d.ts +12 -0
  115. package/lib/modules/components/member-window/components/video-player/components/local-video-player-with-zoom.js +75 -0
  116. package/lib/modules/components/member-window/components/video-player/components/local-video-player.d.ts +1 -7
  117. package/lib/modules/components/member-window/components/video-player/components/local-video-player.js +7 -47
  118. package/lib/modules/components/member-window/components/video-player/components/remote-video-player-with-zoom.d.ts +12 -0
  119. package/lib/modules/components/member-window/components/video-player/components/remote-video-player-with-zoom.js +68 -0
  120. package/lib/modules/components/member-window/components/video-player/components/remote-video-player.d.ts +1 -9
  121. package/lib/modules/components/member-window/components/video-player/components/remote-video-player.js +7 -49
  122. package/lib/modules/components/member-window/components/video-player/components/zoomable-container.d.ts +15 -0
  123. package/lib/modules/components/member-window/components/video-player/components/zoomable-container.js +255 -0
  124. package/lib/modules/components/member-window/components/video-player/index.d.ts +2 -0
  125. package/lib/modules/components/member-window/components/video-player/index.js +8 -2
  126. package/lib/modules/components/member-window/index.css +16 -6
  127. package/lib/modules/components/member-window/index.d.ts +1 -1
  128. package/lib/modules/components/member-window/index.js +12 -4
  129. package/lib/modules/components/member-window/types.d.ts +2 -0
  130. package/lib/modules/components/security-menu/index.js +6 -5
  131. package/lib/modules/control-bar/components/annotation-button/index.js +21 -8
  132. package/lib/modules/control-bar/components/more-actions/index.css +13 -0
  133. package/lib/modules/control-bar/components/more-actions/index.js +1 -1
  134. package/lib/modules/control-bar/components/share-audio/index.css +90 -0
  135. package/lib/modules/control-bar/components/share-audio/index.d.ts +15 -0
  136. package/lib/modules/control-bar/components/share-audio/index.js +173 -0
  137. package/lib/modules/control-bar/components/share-state-nav/index.css +5 -0
  138. package/lib/modules/control-bar/components/share-state-nav/index.js +14 -2
  139. package/lib/modules/control-bar/index.d.ts +2 -0
  140. package/lib/modules/control-bar/index.js +9 -1
  141. package/lib/modules/control-bar/store.d.ts +16 -7
  142. package/lib/modules/control-bar/store.js +36 -12
  143. package/lib/modules/control-bar/view.d.ts +4 -0
  144. package/lib/modules/control-bar/view.js +180 -90
  145. package/lib/modules/device-pretest/store.d.ts +1 -1
  146. package/lib/modules/dialog/components/dialog-container/component/body.d.ts +1 -1
  147. package/lib/modules/dialog/components/dialog-container/index.css +1 -0
  148. package/lib/modules/dialog/components/dialog-container/index.d.ts +2 -1
  149. package/lib/modules/dialog/components/dialog-container/index.js +27 -10
  150. package/lib/modules/dialog/components/host-area-container/index.js +4 -4
  151. package/lib/modules/dialog/components/normal-window/index.d.ts +19 -0
  152. package/lib/modules/dialog/components/normal-window/index.js +69 -0
  153. package/lib/modules/dialog/{components → dialogs}/annotation-tool/index.js +17 -15
  154. package/lib/modules/dialog/dialogs/chat/components/actions.d.ts +1 -0
  155. package/lib/modules/dialog/dialogs/chat/components/actions.js +33 -0
  156. package/lib/modules/dialog/{components → dialogs}/chat/index.d.ts +1 -1
  157. package/lib/modules/dialog/dialogs/chat/index.js +59 -0
  158. package/lib/modules/dialog/dialogs/confirm-leave-meeting/index.d.ts +6 -0
  159. package/lib/modules/dialog/{components → dialogs}/confirm-leave-meeting/index.js +13 -37
  160. package/lib/modules/dialog/{components → dialogs}/connection-gateway/index.js +19 -12
  161. package/lib/modules/dialog/{components → dialogs}/control-bar/index.js +2 -2
  162. package/lib/modules/dialog/{components → dialogs}/device-setting/index.js +20 -13
  163. package/lib/modules/dialog/dialogs/end-meeting/index.d.ts +12 -0
  164. package/lib/modules/dialog/dialogs/end-meeting/index.js +45 -0
  165. package/lib/modules/dialog/{components/interpreter/electron.js → dialogs/interpreter/index.js} +17 -11
  166. package/lib/modules/dialog/dialogs/invite/index.d.ts +3 -0
  167. package/lib/modules/dialog/{components → dialogs}/invite/index.js +9 -25
  168. package/lib/modules/dialog/dialogs/live-streaming/index.d.ts +2 -0
  169. package/lib/modules/dialog/{components → dialogs}/live-streaming/index.js +11 -34
  170. package/lib/modules/dialog/dialogs/participant/components/actions.d.ts +1 -0
  171. package/lib/modules/dialog/dialogs/participant/components/actions.js +32 -0
  172. package/lib/modules/dialog/dialogs/participant/components/title.d.ts +1 -0
  173. package/lib/modules/dialog/dialogs/participant/components/title.js +19 -0
  174. package/lib/modules/dialog/dialogs/participant/index.d.ts +2 -0
  175. package/lib/modules/dialog/dialogs/participant/index.js +53 -0
  176. package/lib/modules/dialog/dialogs/pre-setting/index.js +62 -0
  177. package/lib/modules/dialog/dialogs/rename/index.js +35 -0
  178. package/lib/modules/dialog/{components → dialogs}/share-screen-selection/index.js +1 -1
  179. package/lib/modules/dialog/{components → dialogs}/video-window/index.js +11 -8
  180. package/lib/modules/dialog/{components → dialogs}/whiteboard/index.js +2 -3
  181. package/lib/modules/dialog/{components → dialogs}/widget/electron.js +1 -1
  182. package/lib/modules/dialog/{components → dialogs}/widget/index.js +1 -1
  183. package/lib/modules/dialog/hooks/use-web-drag.d.ts +8 -0
  184. package/lib/modules/dialog/hooks/use-web-drag.js +73 -0
  185. package/lib/modules/dialog/hooks/useElectron.d.ts +2 -7
  186. package/lib/modules/dialog/hooks/useElectron.js +46 -156
  187. package/lib/modules/dialog/index.d.ts +4 -0
  188. package/lib/modules/dialog/index.js +4 -2
  189. package/lib/modules/dialog/level-config.d.ts +11 -0
  190. package/lib/modules/dialog/level-config.js +21 -0
  191. package/lib/modules/dialog/store.d.ts +15 -6
  192. package/lib/modules/dialog/store.js +40 -54
  193. package/lib/modules/dialog/type.d.ts +15 -12
  194. package/lib/modules/event-confirm/components/window/index.d.ts +1 -4
  195. package/lib/modules/event-confirm/components/window/index.js +34 -23
  196. package/lib/modules/event-confirm/index.d.ts +2 -0
  197. package/lib/modules/event-confirm/index.js +3 -2
  198. package/lib/modules/event-confirm/store.d.ts +9 -1
  199. package/lib/modules/event-confirm/store.js +24 -16
  200. package/lib/modules/event-confirm/view.js +11 -22
  201. package/lib/modules/event-sound/index.d.ts +2 -0
  202. package/lib/modules/event-sound/index.js +8 -1
  203. package/lib/modules/event-toast/index.css +10 -0
  204. package/lib/modules/event-toast/store.d.ts +1 -1
  205. package/lib/modules/event-toast/store.js +17 -15
  206. package/lib/modules/event-toast/view.js +2 -1
  207. package/lib/modules/interpreter/interpreter-list/interpreter-item/components/pick-user/index.js +4 -2
  208. package/lib/modules/interpreter/interpreter-list/interpreter-item/components/pick-user/option-Item.js +2 -1
  209. package/lib/modules/interpreter/store.d.ts +1 -0
  210. package/lib/modules/interpreter/store.js +12 -5
  211. package/lib/modules/interpreter/view.js +7 -1
  212. package/lib/modules/layout/components/Aside.js +4 -0
  213. package/lib/modules/layout/components/Carousel.js +3 -1
  214. package/lib/modules/layout/components/CommonVideoRenderer.d.ts +3 -1
  215. package/lib/modules/layout/components/CommonVideoRenderer.js +13 -9
  216. package/lib/modules/layout/components/Gallery.js +11 -3
  217. package/lib/modules/layout/index.css +1 -0
  218. package/lib/modules/layout/index.d.ts +2 -0
  219. package/lib/modules/layout/index.js +4 -3
  220. package/lib/modules/layout/store.d.ts +9 -5
  221. package/lib/modules/layout/store.js +38 -46
  222. package/lib/modules/participant/components/confirm-input/index.css +4 -0
  223. package/lib/modules/participant/components/confirm-input/index.d.ts +1 -0
  224. package/lib/modules/participant/components/confirm-input/index.js +2 -1
  225. package/lib/modules/participant/components/participants/components/participants/components/attendee/index.js +2 -1
  226. package/lib/modules/participant/components/participants/components/participants/index.js +11 -3
  227. package/lib/modules/participant/components/participants/components/render-user/components/attendee/index.js +7 -3
  228. package/lib/modules/participant/components/participants/types.d.ts +1 -0
  229. package/lib/modules/participant/store.d.ts +2 -1
  230. package/lib/modules/participant/store.js +23 -9
  231. package/lib/modules/phone-audio-connect/store.d.ts +4 -4
  232. package/lib/modules/setting/audio-settings/audio-settings.js +6 -17
  233. package/lib/modules/setting/config.d.ts +16 -0
  234. package/lib/modules/setting/config.js +17 -1
  235. package/lib/modules/setting/index.d.ts +2 -4
  236. package/lib/modules/setting/index.js +7 -16
  237. package/lib/modules/setting/minutes-settings/minutes-settings.js +0 -4
  238. package/lib/modules/setting/state/index.js +5 -5
  239. package/lib/modules/setting/store.d.ts +37 -33
  240. package/lib/modules/setting/store.js +275 -261
  241. package/lib/modules/setting/translate-settings/language-select.js +0 -2
  242. package/lib/modules/setting/video-settings/video-settings-basic.js +6 -6
  243. package/lib/modules/setting/video-settings/video-settings.js +2 -2
  244. package/lib/modules/setting/view.js +1 -1
  245. package/lib/modules/share-screen/components/control-bar/index.css +75 -0
  246. package/lib/modules/share-screen/components/control-bar/index.d.ts +3 -0
  247. package/lib/modules/share-screen/components/control-bar/index.js +88 -0
  248. package/lib/modules/share-screen/components/control-bar/items/annotation-edit-btn/index.d.ts +8 -0
  249. package/lib/modules/share-screen/components/control-bar/items/annotation-edit-btn/index.js +46 -0
  250. package/lib/modules/share-screen/components/control-bar/items/full-container-btn/index.d.ts +6 -0
  251. package/lib/modules/share-screen/components/control-bar/items/full-container-btn/index.js +32 -0
  252. package/lib/modules/share-screen/components/control-bar/items/original-size-btn/index.d.ts +6 -0
  253. package/lib/modules/share-screen/components/control-bar/items/original-size-btn/index.js +32 -0
  254. package/lib/modules/share-screen/components/control-bar/items/zoom-in-btn/index.d.ts +6 -0
  255. package/lib/modules/share-screen/components/control-bar/items/zoom-in-btn/index.js +32 -0
  256. package/lib/modules/share-screen/components/control-bar/items/zoom-out-btn/index.d.ts +6 -0
  257. package/lib/modules/share-screen/components/control-bar/items/zoom-out-btn/index.js +32 -0
  258. package/lib/modules/share-screen/components/selection/index.js +28 -14
  259. package/lib/modules/share-screen/components/share-scenario/index.d.ts +5 -0
  260. package/lib/modules/share-screen/components/share-scenario/index.js +47 -0
  261. package/lib/modules/share-screen/index.d.ts +4 -2
  262. package/lib/modules/share-screen/index.js +11 -2
  263. package/lib/modules/share-screen/store.d.ts +32 -11
  264. package/lib/modules/share-screen/store.js +273 -192
  265. package/lib/modules/share-screen/view.js +2 -2
  266. package/lib/modules/state-bar/index.js +2 -3
  267. package/lib/modules/state-bar/layout-config.d.ts +2 -4
  268. package/lib/modules/state-bar/layout-config.js +10 -5
  269. package/lib/modules/state-bar/live-streaming-state.js +0 -1
  270. package/lib/modules/state-bar/store.d.ts +7 -7
  271. package/lib/modules/state-bar/store.js +17 -15
  272. package/lib/modules/state-bar/view.js +19 -23
  273. package/lib/modules/video-window/components/members/index.js +3 -2
  274. package/lib/modules/video-window/index.js +0 -3
  275. package/lib/modules/waiting-room-layout/index.css +3 -3
  276. package/lib/modules/waiting-room-layout/index.js +2 -2
  277. package/lib/modules/waiting-room-layout/view.js +1 -0
  278. package/lib/modules/whiteboard/components/control-bar/index.js +2 -2
  279. package/lib/modules/whiteboard/components/control-bar/store.d.ts +4 -1
  280. package/lib/modules/whiteboard/components/control-bar/store.js +4 -2
  281. package/lib/modules/whiteboard/components/toolbar/components/pen-picker.js +4 -4
  282. package/lib/modules/whiteboard/components/toolbar/hooks/index.d.ts +0 -14
  283. package/lib/modules/whiteboard/components/toolbar/hooks/index.js +4 -155
  284. package/lib/modules/whiteboard/components/toolbar/store.d.ts +4 -2
  285. package/lib/modules/whiteboard/components/toolbar/store.js +37 -25
  286. package/lib/modules/whiteboard/components/toolbar/style.css +1 -0
  287. package/lib/modules/whiteboard/index.d.ts +3 -1
  288. package/lib/modules/whiteboard/index.js +26 -23
  289. package/lib/modules/widget/view.js +4 -0
  290. package/lib/providers/ability-provider.d.ts +2 -0
  291. package/lib/providers/annotation-provider.d.ts +43 -47
  292. package/lib/providers/annotation-provider.js +94 -142
  293. package/lib/providers/app-list-provider.d.ts +98 -0
  294. package/lib/providers/app-list-provider.js +251 -0
  295. package/lib/providers/device-provider.d.ts +31 -23
  296. package/lib/providers/device-provider.js +495 -444
  297. package/lib/providers/device-stream-provider.js +2 -2
  298. package/lib/providers/event-provider.d.ts +0 -4
  299. package/lib/providers/event-provider.js +0 -10
  300. package/lib/providers/interpreter-provider.js +10 -7
  301. package/lib/providers/privilege-provider.d.ts +1 -1
  302. package/lib/providers/privilege-provider.js +3 -2
  303. package/lib/providers/renderer-provider.d.ts +1 -0
  304. package/lib/providers/renderer-provider.js +7 -2
  305. package/lib/providers/room-provider.d.ts +5 -1
  306. package/lib/providers/room-provider.js +44 -16
  307. package/lib/providers/screen-share-provider.d.ts +73 -17
  308. package/lib/providers/screen-share-provider.js +222 -100
  309. package/lib/providers/sharing-provider.d.ts +0 -1
  310. package/lib/providers/sharing-provider.js +3 -9
  311. package/lib/providers/user-setting-storage-provider.d.ts +1 -0
  312. package/lib/providers/user-setting-storage-provider.js +5 -12
  313. package/lib/providers/widget-provider.d.ts +19 -0
  314. package/lib/providers/widget-provider.js +28 -2
  315. package/lib/runtime.d.ts +10 -1
  316. package/lib/scenes/main-scene.d.ts +12 -2
  317. package/lib/scenes/main-scene.js +54 -28
  318. package/lib/scenes/waiting-scene.d.ts +11 -0
  319. package/lib/scenes/waiting-scene.js +34 -8
  320. package/lib/schema.d.ts +6 -0
  321. package/lib/schema.js +5 -1
  322. package/lib/shared-data-source/annotation-data.d.ts +17 -0
  323. package/lib/shared-data-source/annotation-data.js +110 -0
  324. package/lib/shared-data-source/app-list-data.d.ts +34 -0
  325. package/lib/shared-data-source/app-list-data.js +133 -0
  326. package/lib/shared-data-source/config.d.ts +26 -7
  327. package/lib/shared-data-source/config.js +29 -11
  328. package/lib/shared-data-source/confirm-data.d.ts +25 -0
  329. package/lib/shared-data-source/confirm-data.js +97 -0
  330. package/lib/shared-data-source/interpreter.d.ts +1 -0
  331. package/lib/shared-data-source/layout-data.d.ts +2 -0
  332. package/lib/shared-data-source/layout-data.js +14 -3
  333. package/lib/shared-data-source/meeting-time.d.ts +23 -1
  334. package/lib/shared-data-source/meeting-time.js +160 -43
  335. package/lib/shared-data-source/member-data.d.ts +10 -9
  336. package/lib/shared-data-source/member-data.js +55 -48
  337. package/lib/shared-data-source/screen-share-data.d.ts +100 -17
  338. package/lib/shared-data-source/screen-share-data.js +142 -22
  339. package/lib/shared-data-source/setting.d.ts +36 -4
  340. package/lib/shared-data-source/setting.js +92 -57
  341. package/lib/shared-data-source/video-window.d.ts +3 -0
  342. package/lib/shared-data-source/video-window.js +52 -30
  343. package/lib/shared-data-source/waiting-room.js +4 -2
  344. package/lib/translations/enUS.d.ts +62 -7
  345. package/lib/translations/enUS.js +71 -14
  346. package/lib/translations/zhCN.d.ts +62 -7
  347. package/lib/translations/zhCN.js +73 -16
  348. package/lib/type.d.ts +23 -5
  349. package/lib/type.js +6 -2
  350. package/lib/ui-manager.d.ts +5 -16
  351. package/lib/ui-manager.js +15 -57
  352. package/lib/ui-scene.d.ts +31 -6
  353. package/lib/ui-scene.js +180 -169
  354. package/lib/utilities/constant.d.ts +67 -63
  355. package/lib/utilities/constant.js +65 -61
  356. package/lib/utilities/dialog-utils.d.ts +66 -0
  357. package/lib/utilities/dialog-utils.js +188 -0
  358. package/lib/utilities/logger.js +3 -3
  359. package/lib/utilities/meeting-detail.js +1 -1
  360. package/lib/utilities/parameters.d.ts +1 -0
  361. package/lib/utilities/parameters.js +5 -1
  362. package/lib/utilities/renderer-event.d.ts +1 -1
  363. package/lib/utilities/screen-capture-permission.d.ts +1 -0
  364. package/lib/utilities/screen-capture-permission.js +9 -1
  365. package/lib/utilities/tools.d.ts +0 -66
  366. package/lib/utilities/tools.js +9 -186
  367. package/package.json +5 -6
  368. package/public/index.html +11 -1
  369. package/lib/modules/action-bar/components/apps/app-list.d.ts +0 -3
  370. package/lib/modules/action-bar/components/apps/useAppItemOptions.d.ts +0 -17
  371. package/lib/modules/action-bar/components/apps/useAppItemOptions.js +0 -30
  372. package/lib/modules/action-bar/components/apps/useBeautyBackground.d.ts +0 -10
  373. package/lib/modules/action-bar/components/apps/useBeautyBackground.js +0 -36
  374. package/lib/modules/action-bar/components/apps/useInterpreter.d.ts +0 -14
  375. package/lib/modules/action-bar/components/apps/useInterpreter.js +0 -37
  376. package/lib/modules/action-bar/components/apps/useLiveStreaming.d.ts +0 -16
  377. package/lib/modules/action-bar/components/apps/useLiveStreaming.js +0 -41
  378. package/lib/modules/action-bar/components/apps/useWidgetList.d.ts +0 -10
  379. package/lib/modules/action-bar/components/apps/useWidgetList.js +0 -39
  380. package/lib/modules/annotation/components/control-bar/index.css +0 -48
  381. package/lib/modules/annotation/components/control-bar/index.d.ts +0 -3
  382. package/lib/modules/annotation/components/control-bar/index.js +0 -142
  383. package/lib/modules/annotation/components/toolbar/index.d.ts +0 -0
  384. package/lib/modules/annotation/components/toolbar/index.js +0 -1
  385. package/lib/modules/dialog/components/chat/electron.d.ts +0 -2
  386. package/lib/modules/dialog/components/chat/electron.js +0 -35
  387. package/lib/modules/dialog/components/chat/index.js +0 -67
  388. package/lib/modules/dialog/components/confirm-leave-meeting/index.d.ts +0 -6
  389. package/lib/modules/dialog/components/connection-gateway/electron.d.ts +0 -5
  390. package/lib/modules/dialog/components/connection-gateway/electron.js +0 -33
  391. package/lib/modules/dialog/components/device-setting/electron.d.ts +0 -2
  392. package/lib/modules/dialog/components/device-setting/electron.js +0 -37
  393. package/lib/modules/dialog/components/interpreter/electron.d.ts +0 -2
  394. package/lib/modules/dialog/components/interpreter/index.js +0 -33
  395. package/lib/modules/dialog/components/invite/index.d.ts +0 -3
  396. package/lib/modules/dialog/components/live-streaming/index.d.ts +0 -4
  397. package/lib/modules/dialog/components/participant/electron.d.ts +0 -2
  398. package/lib/modules/dialog/components/participant/electron.js +0 -35
  399. package/lib/modules/dialog/components/participant/index.d.ts +0 -2
  400. package/lib/modules/dialog/components/participant/index.js +0 -65
  401. package/lib/modules/dialog/components/pre-setting/electron.d.ts +0 -2
  402. package/lib/modules/dialog/components/pre-setting/electron.js +0 -51
  403. package/lib/modules/dialog/components/pre-setting/index.js +0 -38
  404. package/lib/modules/dialog/components/pre-setting-container/component/body.d.ts +0 -8
  405. package/lib/modules/dialog/components/pre-setting-container/component/body.js +0 -78
  406. package/lib/modules/dialog/components/pre-setting-container/index.css +0 -82
  407. package/lib/modules/dialog/components/pre-setting-container/index.d.ts +0 -18
  408. package/lib/modules/dialog/components/pre-setting-container/index.js +0 -116
  409. package/lib/modules/dialog/components/rename/index.js +0 -72
  410. package/lib/modules/dialog/dialogs.d.ts +0 -3
  411. package/lib/modules/dialog/dialogs.js +0 -28
  412. package/lib/utilities/setting-config-storage.d.ts +0 -18
  413. package/lib/utilities/setting-config-storage.js +0 -133
  414. /package/lib/{modules/annotation/components → fragments/annotation}/toolbar/components/color-tool/color-panel/index.d.ts +0 -0
  415. /package/lib/{modules/annotation/components → fragments/annotation}/toolbar/components/color-tool/color-panel/index.js +0 -0
  416. /package/lib/{modules/annotation/components → fragments/annotation}/toolbar/components/color-tool/index.d.ts +0 -0
  417. /package/lib/{modules/annotation/components → fragments/annotation}/toolbar/components/color-tool/index.js +0 -0
  418. /package/lib/{modules/annotation/components → fragments/annotation}/toolbar/components/graphic-tool/graphic-panel/index.d.ts +0 -0
  419. /package/lib/{modules/annotation/components → fragments/annotation}/toolbar/components/graphic-tool/graphic-panel/index.js +0 -0
  420. /package/lib/{modules/annotation/components → fragments/annotation}/toolbar/components/graphic-tool/graphic-panel/libs.d.ts +0 -0
  421. /package/lib/{modules/annotation/components → fragments/annotation}/toolbar/components/graphic-tool/graphic-panel/libs.js +0 -0
  422. /package/lib/{modules/annotation/components → fragments/annotation}/toolbar/components/graphic-tool/index.d.ts +0 -0
  423. /package/lib/{modules/annotation/components → fragments/annotation}/toolbar/components/graphic-tool/index.js +0 -0
  424. /package/lib/{modules/annotation/components → fragments/annotation}/toolbar/components/item/item.d.ts +0 -0
  425. /package/lib/{modules/annotation/components → fragments/annotation}/toolbar/components/item/style.css +0 -0
  426. /package/lib/{modules/annotation/components → fragments/annotation}/toolbar/components/panel/index.d.ts +0 -0
  427. /package/lib/{modules/annotation/components → fragments/annotation}/toolbar/components/panel/index.js +0 -0
  428. /package/lib/{modules/annotation/components → fragments/annotation}/toolbar/components/panel/style.css +0 -0
  429. /package/lib/{modules/annotation/components → fragments/annotation}/toolbar/components/pen-tool/index.d.ts +0 -0
  430. /package/lib/{modules/annotation/components → fragments/annotation}/toolbar/components/pen-tool/index.js +0 -0
  431. /package/lib/{modules/annotation/components → fragments/annotation}/toolbar/components/pen-tool/pen-panel/index.d.ts +0 -0
  432. /package/lib/{modules/annotation/components → fragments/annotation}/toolbar/components/tips/index.d.ts +0 -0
  433. /package/lib/{modules/annotation/components → fragments/annotation}/toolbar/components/tips/index.js +0 -0
  434. /package/lib/{modules/annotation/components → fragments/annotation}/toolbar/components/tips/style.css +0 -0
  435. /package/lib/{modules/annotation/components → fragments/annotation}/toolbar/style.css +0 -0
  436. /package/lib/{modules/annotation/components → fragments/annotation}/toolbar/view.d.ts +0 -0
  437. /package/lib/modules/{action-bar/components → components}/apps/app-item/index.css +0 -0
  438. /package/lib/modules/{action-bar/components → components}/apps/app-item/index.js +0 -0
  439. /package/lib/modules/{action-bar/components → components}/apps/index.css +0 -0
  440. /package/lib/modules/dialog/{components → dialogs}/annotation-tool/index.d.ts +0 -0
  441. /package/lib/modules/dialog/{components → dialogs}/confirm/index.d.ts +0 -0
  442. /package/lib/modules/dialog/{components → dialogs}/confirm/index.js +0 -0
  443. /package/lib/modules/dialog/{components → dialogs}/connection-gateway/index.d.ts +0 -0
  444. /package/lib/modules/dialog/{components → dialogs}/connection-gateway/tabs.d.ts +0 -0
  445. /package/lib/modules/dialog/{components → dialogs}/connection-gateway/tabs.js +0 -0
  446. /package/lib/modules/dialog/{components → dialogs}/control-bar/index.d.ts +0 -0
  447. /package/lib/modules/dialog/{components → dialogs}/device-setting/index.css +0 -0
  448. /package/lib/modules/dialog/{components → dialogs}/device-setting/index.d.ts +0 -0
  449. /package/lib/modules/dialog/{components → dialogs}/interpreter/index.css +0 -0
  450. /package/lib/modules/dialog/{components → dialogs}/interpreter/index.d.ts +0 -0
  451. /package/lib/modules/dialog/{components → dialogs}/pre-setting/index.css +0 -0
  452. /package/lib/modules/dialog/{components → dialogs}/pre-setting/index.d.ts +0 -0
  453. /package/lib/modules/dialog/{components → dialogs}/rename/index.d.ts +0 -0
  454. /package/lib/modules/dialog/{components → dialogs}/share-screen-selection/index.d.ts +0 -0
  455. /package/lib/modules/dialog/{components → dialogs}/system-preference/assets/bg1.png +0 -0
  456. /package/lib/modules/dialog/{components → dialogs}/system-preference/assets/bg2.png +0 -0
  457. /package/lib/modules/dialog/{components → dialogs}/system-preference/assets/fcr_png_host.png +0 -0
  458. /package/lib/modules/dialog/{components → dialogs}/system-preference/electron.d.ts +0 -0
  459. /package/lib/modules/dialog/{components → dialogs}/system-preference/electron.js +0 -0
  460. /package/lib/modules/dialog/{components → dialogs}/system-preference/index.css +0 -0
  461. /package/lib/modules/dialog/{components → dialogs}/system-preference/index.d.ts +0 -0
  462. /package/lib/modules/dialog/{components → dialogs}/system-preference/index.js +0 -0
  463. /package/lib/modules/dialog/{components → dialogs}/toast/index.d.ts +0 -0
  464. /package/lib/modules/dialog/{components → dialogs}/toast/index.js +0 -0
  465. /package/lib/modules/dialog/{components → dialogs}/video-window/index.d.ts +0 -0
  466. /package/lib/modules/dialog/{components → dialogs}/whiteboard/index.d.ts +0 -0
  467. /package/lib/modules/dialog/{components → dialogs}/widget/electron.d.ts +0 -0
  468. /package/lib/modules/dialog/{components → dialogs}/widget/index.d.ts +0 -0
@@ -0,0 +1,501 @@
1
+ "use strict";
2
+
3
+ require("core-js/modules/es.symbol.js");
4
+ require("core-js/modules/es.symbol.description.js");
5
+ require("core-js/modules/es.symbol.to-primitive.js");
6
+ require("core-js/modules/es.error.cause.js");
7
+ require("core-js/modules/es.error.to-string.js");
8
+ require("core-js/modules/es.array.is-array.js");
9
+ require("core-js/modules/es.date.to-primitive.js");
10
+ require("core-js/modules/es.function.name.js");
11
+ require("core-js/modules/es.map.js");
12
+ require("core-js/modules/es.number.constructor.js");
13
+ require("core-js/modules/es.object.create.js");
14
+ require("core-js/modules/es.object.define-property.js");
15
+ require("core-js/modules/es.object.get-own-property-descriptor.js");
16
+ require("core-js/modules/esnext.function.metadata.js");
17
+ require("core-js/modules/esnext.map.delete-all.js");
18
+ require("core-js/modules/esnext.map.emplace.js");
19
+ require("core-js/modules/esnext.map.every.js");
20
+ require("core-js/modules/esnext.map.filter.js");
21
+ require("core-js/modules/esnext.map.find.js");
22
+ require("core-js/modules/esnext.map.find-key.js");
23
+ require("core-js/modules/esnext.map.includes.js");
24
+ require("core-js/modules/esnext.map.key-of.js");
25
+ require("core-js/modules/esnext.map.map-keys.js");
26
+ require("core-js/modules/esnext.map.map-values.js");
27
+ require("core-js/modules/esnext.map.merge.js");
28
+ require("core-js/modules/esnext.map.reduce.js");
29
+ require("core-js/modules/esnext.map.some.js");
30
+ require("core-js/modules/esnext.map.update.js");
31
+ require("core-js/modules/esnext.symbol.metadata.js");
32
+ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
33
+ var _typeof = require("@babel/runtime/helpers/typeof");
34
+ Object.defineProperty(exports, "__esModule", {
35
+ value: true
36
+ });
37
+ exports.AnnotationReceiverToolbarStore = exports.AnnotationReceiverToolbarContext = void 0;
38
+ var _regenerator = _interopRequireDefault(require("@babel/runtime/regenerator"));
39
+ require("core-js/modules/es.array.concat.js");
40
+ require("core-js/modules/es.array.iterator.js");
41
+ require("core-js/modules/es.array.push.js");
42
+ require("core-js/modules/es.function.bind.js");
43
+ require("core-js/modules/es.object.to-string.js");
44
+ require("core-js/modules/es.string.iterator.js");
45
+ require("core-js/modules/es.weak-map.js");
46
+ require("core-js/modules/esnext.weak-map.delete-all.js");
47
+ require("core-js/modules/esnext.weak-map.emplace.js");
48
+ require("core-js/modules/web.dom-collections.iterator.js");
49
+ require("core-js/modules/web.timers.js");
50
+ var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));
51
+ var _asyncToGenerator2 = _interopRequireDefault(require("@babel/runtime/helpers/asyncToGenerator"));
52
+ var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime/helpers/classCallCheck"));
53
+ var _createClass2 = _interopRequireDefault(require("@babel/runtime/helpers/createClass"));
54
+ var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
55
+ var _mobx = require("mobx");
56
+ var _type = require("../whiteboard/type");
57
+ var _react = require("react");
58
+ var _enums = require("fcr-core/lib/room-control/whiteboard-control/enums");
59
+ var _libs = _interopRequireDefault(require("../whiteboard/components/switch-theme/libs"));
60
+ var _tinycolor = _interopRequireDefault(require("tinycolor2"));
61
+ var _decorator = require("agora-foundation/lib/decorator");
62
+ var _imports = require("fcr-core/lib/imports");
63
+ var _utils = require("../whiteboard/utils");
64
+ var _dayjs = _interopRequireDefault(require("dayjs"));
65
+ var _constant = require("../../utilities/constant");
66
+ var _AnnotationReceiverToolbarStore;
67
+ var _initProto, _init_observables, _resetToolbarVarsDecs, _redoDecs, _undoDecs, _cleanDecs, _setToolDecs, _setPenDecs, _setShapeDecs, _setStrokeColorDecs, _setStrokeWidthDecs, _clickExpansionToolDecs, _setToolbarPositionDecs, _dragToolbarDecs, _releaseToolbarDecs, _captureScreenDecs, _saveDraftDecs, _setThemeDecs, _setCommonColorDecs, _repositionToolbarDecs, _getSnapshotImageDecs, _ref;
68
+ function _classPrivateFieldInitSpec(e, t, a) { _checkPrivateRedeclaration(e, t), t.set(e, a); }
69
+ function _checkPrivateRedeclaration(e, t) { if (t.has(e)) throw new TypeError("Cannot initialize the same private elements twice on an object"); }
70
+ function _classPrivateFieldSet(s, a, r) { return s.set(_assertClassBrand(s, a), r), r; }
71
+ function _classPrivateFieldGet(s, a) { return s.get(_assertClassBrand(s, a)); }
72
+ function _assertClassBrand(e, t, n) { if ("function" == typeof e ? e === t : e.has(t)) return arguments.length < 3 ? t : n; throw new TypeError("Private element is not present on this object"); }
73
+ function _applyDecs(e, t, r, n, o, a) { function i(e, t, r) { return function (n, o) { return r && r(n), e[t].call(n, o); }; } function c(e, t) { for (var r = 0; r < e.length; r++) e[r].call(t); return t; } function s(e, t, r, n) { if ("function" != typeof e && (n || void 0 !== e)) throw new TypeError(t + " must " + (r || "be") + " a function" + (n ? "" : " or undefined")); return e; } function applyDec(e, t, r, n, o, a, c, u, l, f, p, d, h) { function m(e) { if (!h(e)) throw new TypeError("Attempted to access private element on non-instance"); } var y, v = t[0], g = t[3], b = !u; if (!b) { r || Array.isArray(v) || (v = [v]); var w = {}, S = [], A = 3 === o ? "get" : 4 === o || d ? "set" : "value"; f ? (p || d ? w = { get: _setFunctionName(function () { return g(this); }, n, "get"), set: function set(e) { t[4](this, e); } } : w[A] = g, p || _setFunctionName(w[A], n, 2 === o ? "" : A)) : p || (w = Object.getOwnPropertyDescriptor(e, n)); } for (var P = e, j = v.length - 1; j >= 0; j -= r ? 2 : 1) { var D = v[j], E = r ? v[j - 1] : void 0, I = {}, O = { kind: ["field", "accessor", "method", "getter", "setter", "class"][o], name: n, metadata: a, addInitializer: function (e, t) { if (e.v) throw Error("attempted to call addInitializer after decoration was finished"); s(t, "An initializer", "be", !0), c.push(t); }.bind(null, I) }; try { if (b) (y = s(D.call(E, P, O), "class decorators", "return")) && (P = y);else { var k, F; O["static"] = l, O["private"] = f, f ? 2 === o ? k = function k(e) { return m(e), w.value; } : (o < 4 && (k = i(w, "get", m)), 3 !== o && (F = i(w, "set", m))) : (k = function k(e) { return e[n]; }, (o < 2 || 4 === o) && (F = function F(e, t) { e[n] = t; })); var N = O.access = { has: f ? h.bind() : function (e) { return n in e; } }; if (k && (N.get = k), F && (N.set = F), P = D.call(E, d ? { get: w.get, set: w.set } : w[A], O), d) { if ("object" == _typeof(P) && P) (y = s(P.get, "accessor.get")) && (w.get = y), (y = s(P.set, "accessor.set")) && (w.set = y), (y = s(P.init, "accessor.init")) && S.push(y);else if (void 0 !== P) throw new TypeError("accessor decorators must return an object with get, set, or init properties or void 0"); } else s(P, (p ? "field" : "method") + " decorators", "return") && (p ? S.push(P) : w[A] = P); } } finally { I.v = !0; } } return (p || d) && u.push(function (e, t) { for (var r = S.length - 1; r >= 0; r--) t = S[r].call(e, t); return t; }), p || b || (f ? d ? u.push(i(w, "get"), i(w, "set")) : u.push(2 === o ? w[A] : i.call.bind(w[A])) : Object.defineProperty(e, n, w)), P; } function u(e, t) { return Object.defineProperty(e, Symbol.metadata || Symbol["for"]("Symbol.metadata"), { configurable: !0, enumerable: !0, value: t }); } if (arguments.length >= 6) var l = a[Symbol.metadata || Symbol["for"]("Symbol.metadata")]; var f = Object.create(null == l ? null : l), p = function (e, t, r, n) { var o, a, i = [], s = function s(t) { return _checkInRHS(t) === e; }, u = new Map(); function l(e) { e && i.push(c.bind(null, e)); } for (var f = 0; f < t.length; f++) { var p = t[f]; if (Array.isArray(p)) { var d = p[1], h = p[2], m = p.length > 3, y = 16 & d, v = !!(8 & d), g = 0 == (d &= 7), b = h + "/" + v; if (!g && !m) { var w = u.get(b); if (!0 === w || 3 === w && 4 !== d || 4 === w && 3 !== d) throw Error("Attempted to decorate a public method/accessor that has the same name as a previously decorated public method/accessor. This is not currently supported by the decorators plugin. Property name was: " + h); u.set(b, !(d > 2) || d); } applyDec(v ? e : e.prototype, p, y, m ? "#" + h : _toPropertyKey(h), d, n, v ? a = a || [] : o = o || [], i, v, m, g, 1 === d, v && m ? s : r); } } return l(o), l(a), i; }(e, t, o, f); return r.length || u(e, f), { e: p, get c() { var t = []; return r.length && [u(applyDec(e, [r], n, e.name, 5, f, t), f), c.bind(null, t, e)]; } }; }
74
+ function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
75
+ function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
76
+ function _setFunctionName(e, t, n) { "symbol" == _typeof(t) && (t = (t = t.description) ? "[" + t + "]" : ""); try { Object.defineProperty(e, "name", { configurable: !0, value: n ? n + " " + t : t }); } catch (e) {} return e; }
77
+ function _checkInRHS(e) { if (Object(e) !== e) throw TypeError("right-hand side of 'in' should be an object, got " + (null !== e ? _typeof(e) : "null")); return e; }
78
+ var colors = ['#EFEFEF', '#FFEC42', '#FFB545', '#E44A19', '#4A4C5F', '#A1C573', '#51BD69', '#EB47A2', '#0E0E0E', '#50E3C2', '#547AFF', '#79479F'];
79
+ var _A = /*#__PURE__*/new WeakMap();
80
+ _ref = (_resetToolbarVarsDecs = [_mobx.action, _mobx.action.bound], _redoDecs = [_mobx.action, _mobx.action.bound], _undoDecs = [_mobx.action, _mobx.action.bound], _cleanDecs = [_mobx.action, _mobx.action.bound], _setToolDecs = [_mobx.action, _mobx.action.bound], _setPenDecs = [_mobx.action, _mobx.action.bound], _setShapeDecs = [_mobx.action, _mobx.action.bound], _setStrokeColorDecs = [_mobx.action, _mobx.action.bound], _setStrokeWidthDecs = [_mobx.action, _mobx.action.bound], _clickExpansionToolDecs = [_mobx.action, _mobx.action.bound], _setToolbarPositionDecs = [_mobx.action, _mobx.action.bound], _dragToolbarDecs = [_mobx.action, _mobx.action.bound], _releaseToolbarDecs = [_mobx.action, _mobx.action.bound], _captureScreenDecs = [_mobx.action, _mobx.action.bound], _saveDraftDecs = [_mobx.action, _mobx.action.bound], _setThemeDecs = [_mobx.action, _mobx.action.bound], _setCommonColorDecs = [_mobx.action, _mobx.action.bound], _repositionToolbarDecs = [_mobx.action, _mobx.action.bound], _getSnapshotImageDecs = [_mobx.action, _mobx.action.bound], "_boardMainWindow");
81
+ var AnnotationReceiverToolbarStore = exports.AnnotationReceiverToolbarStore = /*#__PURE__*/function () {
82
+ function AnnotationReceiverToolbarStore(_whiteboardControl, _roomControl, _annotationProvider, _eventProvider, _sharedAnnotationDataSource) {
83
+ var _this = this;
84
+ (0, _classCallCheck2["default"])(this, AnnotationReceiverToolbarStore);
85
+ (0, _defineProperty2["default"])(this, _ref, (_initProto(this), undefined));
86
+ (0, _defineProperty2["default"])(this, "_lastStrokeWidth", 0);
87
+ (0, _defineProperty2["default"])(this, "_boardObserver", {
88
+ onRedoStateUpdated: function onRedoStateUpdated(enable) {
89
+ _this.observables.redoSteps = enable;
90
+ },
91
+ onUndoStateUpdated: function onUndoStateUpdated(enable) {
92
+ _this.observables.undoSteps = enable;
93
+ }
94
+ });
95
+ (0, _defineProperty2["default"])(this, "_whiteboardObserver", {
96
+ onConnectionStateUpdated: function onConnectionStateUpdated(state) {
97
+ if (!_this._whiteboardControl) {
98
+ return;
99
+ }
100
+ if (state === _imports.AgoraRteConnectionState.CONNECTED) {
101
+ var _this$_boardMainWindo;
102
+ _this._boardMainWindow = _this._whiteboardControl.getMainWindow();
103
+ _this._lastStrokeWidth = 0;
104
+ (_this$_boardMainWindo = _this._boardMainWindow) === null || _this$_boardMainWindo === void 0 || _this$_boardMainWindo.addObserver(_this._boardObserver);
105
+ } else {
106
+ var _this$_boardMainWindo2;
107
+ (_this$_boardMainWindo2 = _this._boardMainWindow) === null || _this$_boardMainWindo2 === void 0 || _this$_boardMainWindo2.removeObserver(_this._boardObserver);
108
+ }
109
+ }
110
+ });
111
+ (0, _defineProperty2["default"])(this, "_uiEventObserver", {
112
+ onEvent: this._onUiEvent.bind(this)
113
+ });
114
+ _classPrivateFieldInitSpec(this, _A, _init_observables(this, {
115
+ currentTool: _enums.FcrBoardToolType.CURVE,
116
+ currentShape: undefined,
117
+ currentColor: colors[2],
118
+ currentStrokeWidth: 2,
119
+ currentThemeType: (0, _libs["default"])()[0],
120
+ toolbarPosition: {
121
+ x: 0,
122
+ y: 0
123
+ },
124
+ toolbarReleased: true,
125
+ toolbarDockPosition: {
126
+ x: 0,
127
+ y: 0,
128
+ placement: 'left'
129
+ },
130
+ redoSteps: true,
131
+ undoSteps: true,
132
+ lastPen: undefined,
133
+ lastShape: undefined,
134
+ maxCountVisibleTools: 4,
135
+ layoutReady: true,
136
+ colors: colors,
137
+ commonColorIndex: 0,
138
+ background: '#fff',
139
+ commonColors: ['#FFC908', '#4262FF'],
140
+ progress: 0
141
+ }));
142
+ this._whiteboardControl = _whiteboardControl;
143
+ this._roomControl = _roomControl;
144
+ this._annotationProvider = _annotationProvider;
145
+ this._eventProvider = _eventProvider;
146
+ this._sharedAnnotationDataSource = _sharedAnnotationDataSource;
147
+ this._whiteboardControl.addObserver(this._whiteboardObserver);
148
+ this._eventProvider.addObserver(this._uiEventObserver);
149
+ }
150
+ return (0, _createClass2["default"])(AnnotationReceiverToolbarStore, [{
151
+ key: "observables",
152
+ get: function get() {
153
+ return _classPrivateFieldGet(_A, this);
154
+ },
155
+ set: function set(v) {
156
+ _classPrivateFieldSet(_A, this, v);
157
+ }
158
+ }, {
159
+ key: "roomInfo",
160
+ get: function get() {
161
+ return this._roomControl.getRoomInfo();
162
+ }
163
+ }, {
164
+ key: "boardMainWindow",
165
+ get: function get() {
166
+ return this._sharedAnnotationDataSource.boardMainWindow;
167
+ }
168
+ }, {
169
+ key: "_onUiEvent",
170
+ value: function () {
171
+ var _onUiEvent2 = (0, _asyncToGenerator2["default"])(/*#__PURE__*/_regenerator["default"].mark(function _callee(event, params) {
172
+ var _t;
173
+ return _regenerator["default"].wrap(function (_context) {
174
+ while (1) switch (_context.prev = _context.next) {
175
+ case 0:
176
+ _t = event;
177
+ _context.next = _t === _constant.FcrUIAction.RESET_WHITEBOARD_TOOLBAR_VARS ? 1 : 2;
178
+ break;
179
+ case 1:
180
+ this.resetToolbarVars();
181
+ return _context.abrupt("continue", 2);
182
+ case 2:
183
+ case "end":
184
+ return _context.stop();
185
+ }
186
+ }, _callee, this);
187
+ }));
188
+ function _onUiEvent(_x, _x2) {
189
+ return _onUiEvent2.apply(this, arguments);
190
+ }
191
+ return _onUiEvent;
192
+ }()
193
+ }, {
194
+ key: "resetToolbarVars",
195
+ value: function resetToolbarVars() {
196
+ if (this._boardMainWindow) {
197
+ this.setStrokeColor(colors[2]);
198
+ this.setStrokeWidth(2);
199
+ this.setPen(_type.FcrBoardShape.Curve);
200
+ }
201
+ }
202
+ }, {
203
+ key: "annotationHasStart",
204
+ get: function get() {
205
+ return this._sharedAnnotationDataSource.annotationHasStart;
206
+ }
207
+ }, {
208
+ key: "redo",
209
+ value: function redo() {
210
+ var _this$boardMainWindow;
211
+ (_this$boardMainWindow = this.boardMainWindow) === null || _this$boardMainWindow === void 0 || _this$boardMainWindow.redo();
212
+ }
213
+ }, {
214
+ key: "undo",
215
+ value: function undo() {
216
+ var _this$boardMainWindow2;
217
+ (_this$boardMainWindow2 = this.boardMainWindow) === null || _this$boardMainWindow2 === void 0 || _this$boardMainWindow2.undo();
218
+ }
219
+ }, {
220
+ key: "clean",
221
+ value: function clean() {
222
+ var _this$boardMainWindow3;
223
+ (_this$boardMainWindow3 = this.boardMainWindow) === null || _this$boardMainWindow3 === void 0 || _this$boardMainWindow3.clean();
224
+ }
225
+ }, {
226
+ key: "setTool",
227
+ value: function setTool(tool) {
228
+ var _this$boardMainWindow4;
229
+ this.observables.currentTool = tool;
230
+ this.observables.currentShape = undefined;
231
+ (_this$boardMainWindow4 = this.boardMainWindow) === null || _this$boardMainWindow4 === void 0 || _this$boardMainWindow4.setToolType(tool);
232
+ }
233
+ }, {
234
+ key: "setPen",
235
+ value: function setPen(shape) {
236
+ var _this$boardMainWindow5, _this$boardMainWindow6, _this$boardMainWindow7;
237
+ this.observables.currentShape = shape;
238
+ this.observables.lastPen = shape;
239
+ this.observables.currentTool = this._convertShapeToBoardToolType(shape);
240
+ (_this$boardMainWindow5 = this.boardMainWindow) === null || _this$boardMainWindow5 === void 0 || _this$boardMainWindow5.setToolType(this._convertShapeToBoardToolType(shape));
241
+ (_this$boardMainWindow6 = this.boardMainWindow) === null || _this$boardMainWindow6 === void 0 || _this$boardMainWindow6.setStrokeWidth(this.observables.currentStrokeWidth);
242
+ (_this$boardMainWindow7 = this.boardMainWindow) === null || _this$boardMainWindow7 === void 0 || _this$boardMainWindow7.setStrokeColor((0, _tinycolor["default"])(this.observables.currentColor).toRgb());
243
+ }
244
+ }, {
245
+ key: "setShape",
246
+ value: function setShape(shape) {
247
+ var _this$boardMainWindow8, _this$boardMainWindow9, _this$boardMainWindow0;
248
+ this.observables.currentShape = shape;
249
+ this.observables.lastShape = shape;
250
+ this.observables.currentTool = this._convertShapeToBoardToolType(shape);
251
+ (_this$boardMainWindow8 = this.boardMainWindow) === null || _this$boardMainWindow8 === void 0 || _this$boardMainWindow8.setToolType(this._convertShapeToBoardToolType(shape));
252
+ (_this$boardMainWindow9 = this.boardMainWindow) === null || _this$boardMainWindow9 === void 0 || _this$boardMainWindow9.setStrokeWidth(this.observables.currentStrokeWidth);
253
+ (_this$boardMainWindow0 = this.boardMainWindow) === null || _this$boardMainWindow0 === void 0 || _this$boardMainWindow0.setStrokeColor((0, _tinycolor["default"])(this.observables.currentColor).toRgb());
254
+ }
255
+ }, {
256
+ key: "setStrokeColor",
257
+ value: function setStrokeColor(color) {
258
+ var _this$boardMainWindow1;
259
+ this.observables.currentColor = color;
260
+ (_this$boardMainWindow1 = this.boardMainWindow) === null || _this$boardMainWindow1 === void 0 || _this$boardMainWindow1.setStrokeColor((0, _tinycolor["default"])(color).toRgb());
261
+ }
262
+ }, {
263
+ key: "setStrokeWidth",
264
+ value: function setStrokeWidth(strokeWidth) {
265
+ var _this$boardMainWindow10;
266
+ this.observables.currentStrokeWidth = strokeWidth;
267
+ (_this$boardMainWindow10 = this.boardMainWindow) === null || _this$boardMainWindow10 === void 0 || _this$boardMainWindow10.setStrokeWidth(strokeWidth);
268
+ }
269
+ }, {
270
+ key: "clickExpansionTool",
271
+ value: function clickExpansionTool() {}
272
+ }, {
273
+ key: "setToolbarPosition",
274
+ value: function setToolbarPosition(pos) {
275
+ this.observables.toolbarPosition = pos;
276
+ }
277
+ }, {
278
+ key: "dragToolbar",
279
+ value: function dragToolbar() {
280
+ this.observables.toolbarReleased = false;
281
+ }
282
+ }, {
283
+ key: "releaseToolbar",
284
+ value: function releaseToolbar() {
285
+ this.observables.toolbarReleased = true;
286
+ this._updateDockPlacement();
287
+ this.repositionToolbar();
288
+ }
289
+ }, {
290
+ key: "captureScreen",
291
+ value: function captureScreen() {
292
+ var hideWindow = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false;
293
+ window.runtime.captureScreen({
294
+ hideWindow: hideWindow
295
+ });
296
+ }
297
+ }, {
298
+ key: "saveDraft",
299
+ value: function saveDraft() {
300
+ this._getSnapshotImage();
301
+ }
302
+ }, {
303
+ key: "setTheme",
304
+ value: function setTheme(theme) {
305
+ this._setBackgroundColor(theme.background);
306
+ this.observables.colors = theme.colors;
307
+ this.observables.currentThemeType = theme;
308
+ }
309
+ }, {
310
+ key: "setCommonColor",
311
+ value: function setCommonColor(color) {
312
+ if (this.observables.commonColors.length < 2) this.observables.commonColors.push(color);
313
+ if (this.observables.commonColors.length === 2) {
314
+ this.observables.commonColors = [color, this.observables.commonColors[0]];
315
+ }
316
+ }
317
+ }, {
318
+ key: "repositionToolbar",
319
+ value: function repositionToolbar() {
320
+ var toolbarDom = document.querySelector(".".concat(_utils.toolbarClassName));
321
+ var containerDom = document.querySelector(".".concat(_utils.windowClassName));
322
+ if (containerDom && toolbarDom) {
323
+ setTimeout(this._updateMaxVisibleTools);
324
+ // wait until the UI rerenders, then actual dimensions can be obtained
325
+ setTimeout(this._updateDockPosition);
326
+ }
327
+ }
328
+ }, {
329
+ key: "release",
330
+ value: function release() {
331
+ var _this$_boardMainWindo3;
332
+ this._eventProvider.removeObserver(this._uiEventObserver);
333
+ (_this$_boardMainWindo3 = this._boardMainWindow) === null || _this$_boardMainWindo3 === void 0 || _this$_boardMainWindo3.removeObserver(this._boardObserver);
334
+ this._whiteboardControl.removeObserver(this._whiteboardObserver);
335
+ }
336
+ }, {
337
+ key: "_updateDockPlacement",
338
+ value: function _updateDockPlacement() {
339
+ var _this2 = this;
340
+ var toolbarDom = document.querySelector(".".concat(_utils.toolbarClassName));
341
+ var containerDom = document.querySelector(".".concat(_utils.windowClassName));
342
+ if (containerDom && toolbarDom) {
343
+ var containerClientRect = containerDom.getBoundingClientRect();
344
+ var toolbarClientRect = toolbarDom.getBoundingClientRect();
345
+ var toolbarCenterPos = toolbarClientRect.left - containerClientRect.left + toolbarClientRect.width / 2;
346
+ (0, _mobx.runInAction)(function () {
347
+ if (toolbarCenterPos > containerClientRect.width / 2) {
348
+ // right
349
+ _this2.observables.toolbarDockPosition.placement = 'right';
350
+ } else {
351
+ // left
352
+ _this2.observables.toolbarDockPosition.placement = 'left';
353
+ }
354
+ });
355
+ }
356
+ }
357
+ }, {
358
+ key: "_updateDockPosition",
359
+ value: function _updateDockPosition() {
360
+ var _this3 = this;
361
+ var toolbarDom = document.querySelector(".".concat(_utils.toolbarClassName));
362
+ var containerDom = document.querySelector(".".concat(_utils.windowClassName));
363
+ if (containerDom && toolbarDom) {
364
+ var containerClientRect = containerDom.getBoundingClientRect();
365
+ var toolbarClientRect = toolbarDom.getBoundingClientRect();
366
+ var toolbarOffsetTop = 4;
367
+ (0, _mobx.runInAction)(function () {
368
+ if (_this3.observables.toolbarDockPosition.placement === 'right') {
369
+ // right
370
+ _this3.observables.toolbarDockPosition = {
371
+ x: containerClientRect.width - toolbarClientRect.width,
372
+ y: toolbarOffsetTop,
373
+ placement: 'right'
374
+ };
375
+ } else {
376
+ // left
377
+ _this3.observables.toolbarDockPosition = {
378
+ x: 0,
379
+ y: toolbarOffsetTop,
380
+ placement: 'left'
381
+ };
382
+ }
383
+ });
384
+ }
385
+ }
386
+ }, {
387
+ key: "_updateMaxVisibleTools",
388
+ value: function _updateMaxVisibleTools() {
389
+ var _this4 = this;
390
+ var containerDom = document.querySelector(".".concat(_utils.windowClassName));
391
+ if (containerDom) {
392
+ var containerClientRect = containerDom.getBoundingClientRect();
393
+ var placement = this.observables.toolbarDockPosition.placement;
394
+ (0, _mobx.runInAction)(function () {
395
+ if (placement === 'right') {
396
+ var availableHeight = containerClientRect.height - _utils.verticalPadding - _utils.defaultToolsRetain - _utils.sceneNavHeight;
397
+ _this4.observables.maxCountVisibleTools = Math.floor(availableHeight / _utils.heightPerTool);
398
+ if (_this4.observables.maxCountVisibleTools >= 9) {
399
+ var visibleTools = _this4.observables.maxCountVisibleTools;
400
+ _this4.observables.maxCountVisibleTools += Math.floor((availableHeight - visibleTools * _utils.heightPerTool) / _utils.heightPerColor);
401
+ }
402
+ } else {
403
+ var _availableHeight = containerClientRect.height - _utils.verticalPadding - _utils.defaultToolsRetain - _utils.sceneNavHeight;
404
+ _this4.observables.maxCountVisibleTools = Math.floor(_availableHeight / _utils.heightPerTool);
405
+ if (_this4.observables.maxCountVisibleTools >= 9) {
406
+ var _visibleTools = _this4.observables.maxCountVisibleTools;
407
+ _this4.observables.maxCountVisibleTools += Math.floor((_availableHeight - _visibleTools * _utils.heightPerTool) / _utils.heightPerColor);
408
+ }
409
+ }
410
+ });
411
+ }
412
+ }
413
+ }, {
414
+ key: "_setBackgroundColor",
415
+ value: function _setBackgroundColor(bgColor) {
416
+ var _this$_whiteboardCont;
417
+ var color = bgColor || 'white';
418
+ (_this$_whiteboardCont = this._whiteboardControl) === null || _this$_whiteboardCont === void 0 || _this$_whiteboardCont.setBackgroundColor(color);
419
+ }
420
+ }, {
421
+ key: "_getSnapshotImage",
422
+ value: function () {
423
+ var _getSnapshotImage2 = (0, _asyncToGenerator2["default"])(/*#__PURE__*/_regenerator["default"].mark(function _callee2() {
424
+ var _this5 = this;
425
+ var mainWindow, progress, imageData;
426
+ return _regenerator["default"].wrap(function (_context2) {
427
+ while (1) switch (_context2.prev = _context2.next) {
428
+ case 0:
429
+ this.observables.progress = 0;
430
+ mainWindow = this.boardMainWindow;
431
+ if (!mainWindow) {
432
+ _context2.next = 2;
433
+ break;
434
+ }
435
+ progress = setInterval(function () {
436
+ if (_this5.observables.progress < 100) {
437
+ _this5.observables.progress += 1;
438
+ } else {
439
+ clearInterval(progress);
440
+ }
441
+ }, 4);
442
+ _context2.next = 1;
443
+ return mainWindow.getSnapshotImage();
444
+ case 1:
445
+ imageData = _context2.sent;
446
+ (0, _mobx.runInAction)(function () {
447
+ setTimeout(function () {
448
+ var _this5$roomInfo;
449
+ _this5.observables.progress = 100;
450
+ clearInterval(progress);
451
+ var fileName = "".concat((_this5$roomInfo = _this5.roomInfo) === null || _this5$roomInfo === void 0 ? void 0 : _this5$roomInfo.roomName, "_").concat((0, _dayjs["default"])().format('YYYYMMDD_HHmmSSS'), ".jpg");
452
+ (0, _utils.downloadImageData)(imageData, fileName);
453
+
454
+ // this._uiEventStore?.showToast({
455
+ // type: 'info',
456
+ // message: transI18n('fmt_screenshare_whiteboard_tips_savedsuccessfully'),
457
+ // });
458
+ }, 400);
459
+ });
460
+ case 2:
461
+ case "end":
462
+ return _context2.stop();
463
+ }
464
+ }, _callee2, this);
465
+ }));
466
+ function _getSnapshotImage() {
467
+ return _getSnapshotImage2.apply(this, arguments);
468
+ }
469
+ return _getSnapshotImage;
470
+ }()
471
+ }, {
472
+ key: "_convertShapeToBoardToolType",
473
+ value: function _convertShapeToBoardToolType(shape) {
474
+ switch (shape) {
475
+ case _type.FcrBoardShape.Arrow:
476
+ return _enums.FcrBoardToolType.ARROW;
477
+ case _type.FcrBoardShape.Curve:
478
+ return _enums.FcrBoardToolType.CURVE;
479
+ case _type.FcrBoardShape.Ellipse:
480
+ return _enums.FcrBoardToolType.ELLIPSE;
481
+ case _type.FcrBoardShape.Pentagram:
482
+ return _enums.FcrBoardToolType.PENTAGRAM;
483
+ case _type.FcrBoardShape.Rectangle:
484
+ return _enums.FcrBoardToolType.RECTANGLE;
485
+ case _type.FcrBoardShape.Rhombus:
486
+ return _enums.FcrBoardToolType.RHOMBUS;
487
+ case _type.FcrBoardShape.Straight:
488
+ return _enums.FcrBoardToolType.STRAIGHT;
489
+ case _type.FcrBoardShape.Triangle:
490
+ return _enums.FcrBoardToolType.TRIANGLE;
491
+ default:
492
+ return _enums.FcrBoardToolType.NONE;
493
+ }
494
+ }
495
+ }]);
496
+ }();
497
+ _AnnotationReceiverToolbarStore = AnnotationReceiverToolbarStore;
498
+ var _applyDecs$e = (0, _slicedToArray2["default"])(_applyDecs(_AnnotationReceiverToolbarStore, [[_mobx.observable, 1, "observables"], [_decorator.bound, 2, "_onUiEvent"], [_resetToolbarVarsDecs, 18, "resetToolbarVars"], [_redoDecs, 18, "redo"], [_undoDecs, 18, "undo"], [_cleanDecs, 18, "clean"], [_setToolDecs, 18, "setTool"], [_setPenDecs, 18, "setPen"], [_setShapeDecs, 18, "setShape"], [_setStrokeColorDecs, 18, "setStrokeColor"], [_setStrokeWidthDecs, 18, "setStrokeWidth"], [_clickExpansionToolDecs, 18, "clickExpansionTool"], [_setToolbarPositionDecs, 18, "setToolbarPosition"], [_dragToolbarDecs, 18, "dragToolbar"], [_releaseToolbarDecs, 18, "releaseToolbar"], [_captureScreenDecs, 18, "captureScreen"], [_saveDraftDecs, 18, "saveDraft"], [_setThemeDecs, 18, "setTheme"], [_setCommonColorDecs, 18, "setCommonColor"], [_repositionToolbarDecs, 18, "repositionToolbar"], [_decorator.bound, 2, "release"], [_decorator.bound, 2, "_updateDockPlacement"], [_decorator.bound, 2, "_updateDockPosition"], [_decorator.bound, 2, "_updateMaxVisibleTools"], [_decorator.bound, 2, "_setBackgroundColor"], [_getSnapshotImageDecs, 18, "_getSnapshotImage"]], []).e, 2);
499
+ _init_observables = _applyDecs$e[0];
500
+ _initProto = _applyDecs$e[1];
501
+ var AnnotationReceiverToolbarContext = exports.AnnotationReceiverToolbarContext = /*#__PURE__*/(0, _react.createContext)({});
@@ -0,0 +1,5 @@
1
+ import { FC } from 'react';
2
+ export declare const Color: FC<{
3
+ value: string;
4
+ showCurrentColor: boolean;
5
+ }>;
@@ -0,0 +1,38 @@
1
+ "use strict";
2
+
3
+ require("core-js/modules/es.object.define-property.js");
4
+ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
5
+ Object.defineProperty(exports, "__esModule", {
6
+ value: true
7
+ });
8
+ exports.Color = void 0;
9
+ var _mobxReact = require("mobx-react");
10
+ var _react = require("react");
11
+ var _classnames = _interopRequireDefault(require("classnames"));
12
+ var _annotationToolbarStore = require("../../../annotation-toolbar-store");
13
+ var _jsxRuntime = require("react/jsx-runtime");
14
+ var Color = exports.Color = (0, _mobxReact.observer)(function (_ref) {
15
+ var value = _ref.value;
16
+ var _useContext = (0, _react.useContext)(_annotationToolbarStore.AnnotationReceiverToolbarContext),
17
+ _useContext$observabl = _useContext.observables,
18
+ currentColor = _useContext$observabl.currentColor,
19
+ currentShape = _useContext$observabl.currentShape,
20
+ setStrokeColor = _useContext.setStrokeColor;
21
+ var isActive = currentColor === value;
22
+ var isDisabled = !currentShape;
23
+ var cls = (0, _classnames["default"])('fcr-board-toolbar__color-item', {
24
+ 'fcr-board-toolbar__color-item--active': isActive,
25
+ 'fcr-board-toolbar__color-item--disabled': isDisabled
26
+ });
27
+ var handleClick = function handleClick() {
28
+ setStrokeColor(value);
29
+ };
30
+ var style = {
31
+ backgroundColor: value
32
+ };
33
+ return /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
34
+ className: cls,
35
+ onClick: isDisabled ? undefined : handleClick,
36
+ style: style
37
+ });
38
+ });
@@ -0,0 +1 @@
1
+ export declare const ColorPickerPanel: () => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,109 @@
1
+ "use strict";
2
+
3
+ require("core-js/modules/es.object.define-property.js");
4
+ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
5
+ Object.defineProperty(exports, "__esModule", {
6
+ value: true
7
+ });
8
+ exports.ColorPickerPanel = void 0;
9
+ var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));
10
+ require("core-js/modules/es.array.includes.js");
11
+ require("core-js/modules/es.array.map.js");
12
+ require("core-js/modules/es.object.to-string.js");
13
+ require("core-js/modules/es.string.includes.js");
14
+ require("core-js/modules/esnext.iterator.constructor.js");
15
+ require("core-js/modules/esnext.iterator.map.js");
16
+ var _mobxReact = require("mobx-react");
17
+ var _react = require("react");
18
+ var _button = require("agora-ui-foundation/lib/components/button");
19
+ var _popover = require("agora-ui-foundation/lib/components/popover");
20
+ var _classnames = _interopRequireDefault(require("classnames"));
21
+ var _icon = require("agora-ui-foundation/lib/components/icon");
22
+ var _type = require("agora-ui-foundation/lib/components/icon/type");
23
+ var _i18n = require("agora-ui-foundation/lib/i18n");
24
+ var _annotationToolbarStore = require("../../../annotation-toolbar-store");
25
+ var _jsxRuntime = require("react/jsx-runtime");
26
+ var ColorPickerPanel = exports.ColorPickerPanel = (0, _mobxReact.observer)(function () {
27
+ var _useContext = (0, _react.useContext)(_annotationToolbarStore.AnnotationReceiverToolbarContext),
28
+ _useContext$observabl = _useContext.observables,
29
+ colors = _useContext$observabl.colors,
30
+ currentColor = _useContext$observabl.currentColor;
31
+ var transI18n = (0, _i18n.useI18n)();
32
+ return /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
33
+ className: "fcr-board-toolbar-panel fcr-board-toolbar-panel--color",
34
+ children: [colors === null || colors === void 0 ? void 0 : colors.map(function (color) {
35
+ return /*#__PURE__*/(0, _jsxRuntime.jsx)(CommonColorMenu, {
36
+ isActive: currentColor === color,
37
+ color: color
38
+ }, color);
39
+ }), /*#__PURE__*/(0, _jsxRuntime.jsx)("footer", {
40
+ className: "fcr-board-toolbar-panel--footer",
41
+ children: transI18n('fmt_screenshare_whiteboard_tips_righclick')
42
+ })]
43
+ });
44
+ });
45
+ var CommonColorMenu = (0, _mobxReact.observer)(function (_ref) {
46
+ var color = _ref.color,
47
+ isActive = _ref.isActive;
48
+ var _useState = (0, _react.useState)(false),
49
+ _useState2 = (0, _slicedToArray2["default"])(_useState, 2),
50
+ visibleMenu = _useState2[0],
51
+ setMenuVisible = _useState2[1];
52
+ var _useContext2 = (0, _react.useContext)(_annotationToolbarStore.AnnotationReceiverToolbarContext),
53
+ setStrokeColor = _useContext2.setStrokeColor,
54
+ setCommonColor = _useContext2.setCommonColor,
55
+ commonColors = _useContext2.observables.commonColors;
56
+ var cls = (0, _classnames["default"])({
57
+ 'fcr-board-toolbar__picker-color--active': isActive,
58
+ 'fcr-board-toolbar__picker-color--border': ['#E2E2E2', '#FFFFFF', '#EFEFEF'].includes(color)
59
+ });
60
+ var transI18n = (0, _i18n.useI18n)();
61
+ return /*#__PURE__*/(0, _jsxRuntime.jsx)(_popover.FcrPopover, {
62
+ showArrow: false,
63
+ visible: visibleMenu,
64
+ overlayInnerStyle: {
65
+ borderRadius: '4px',
66
+ padding: '5px',
67
+ boxShadow: 'var(--fcr_web_light_dropup)',
68
+ width: 'auto'
69
+ },
70
+ overlayClassName: "fcr-board-toolbar__set-common__overlay",
71
+ placement: "right",
72
+ content: /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
73
+ onMouseLeave: function onMouseLeave() {
74
+ return setMenuVisible(false);
75
+ },
76
+ children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_button.FcrButton, {
77
+ type: "gray",
78
+ block: true,
79
+ size: "XXS",
80
+ shape: "rounded",
81
+ onClick: function onClick() {
82
+ setMenuVisible(false);
83
+ setCommonColor(color);
84
+ },
85
+ children: transI18n('fmt_screenshare_whiteboard_button_setcolor')
86
+ })
87
+ }),
88
+ children: /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
89
+ className: cls,
90
+ onClick: function onClick() {
91
+ return setStrokeColor(color);
92
+ },
93
+ onContextMenu: function onContextMenu(e) {
94
+ e.preventDefault();
95
+ setMenuVisible(true);
96
+ },
97
+ style: {
98
+ color: color,
99
+ background: color
100
+ },
101
+ children: commonColors.includes(color) && /*#__PURE__*/(0, _jsxRuntime.jsx)(_icon.FcrIcon, {
102
+ type: _type.FcrIconType.FCR_CHOOSEIT,
103
+ colors: {
104
+ iconPrimary: '#fff'
105
+ }
106
+ })
107
+ }, color)
108
+ });
109
+ });
@@ -0,0 +1 @@
1
+ export declare const Picker: () => import("react/jsx-runtime").JSX.Element;