fcr-ui-scene 3.9.0-alpha → 3.9.1-alpha

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 (208) hide show
  1. package/lib/creator/provider-initializer.browser.js +4 -2
  2. package/lib/creator/provider-initializer.electron.js +13 -5
  3. package/lib/electron/injections.d.ts +1 -0
  4. package/lib/electron/injections.js +4 -1
  5. package/lib/electron/preload.js +1 -0
  6. package/lib/fragments/annotation/style.css +1 -0
  7. package/lib/fragments/whiteboard/style.css +4 -0
  8. package/lib/modules/action-bar/main-scene/store.base.d.ts +1 -0
  9. package/lib/modules/action-bar/main-scene/store.base.js +5 -0
  10. package/lib/modules/audio-stream/index.d.ts +2 -0
  11. package/lib/modules/audio-stream/index.js +33 -1
  12. package/lib/modules/chat/chat-room-store.js +4 -2
  13. package/lib/modules/chat/index.js +1 -1
  14. package/lib/modules/chat/store.d.ts +1 -1
  15. package/lib/modules/chat/store.js +4 -2
  16. package/lib/modules/components/device-control/store.base.d.ts +1 -0
  17. package/lib/modules/components/device-control/store.base.js +22 -3
  18. package/lib/modules/components/leave-meeting/index.js +3 -2
  19. package/lib/modules/components/leave-meeting/main-scene/store.d.ts +1 -0
  20. package/lib/modules/components/leave-meeting/main-scene/store.js +6 -1
  21. package/lib/modules/components/leave-meeting/store.base.d.ts +1 -0
  22. package/lib/modules/components/leave-meeting/store.base.js +1 -1
  23. package/lib/modules/components/leave-meeting/waiting-scene/store.d.ts +1 -0
  24. package/lib/modules/components/leave-meeting/waiting-scene/store.js +6 -1
  25. package/lib/modules/components/member-window/components/member-actions/components/icon-status.js +7 -10
  26. package/lib/modules/components/member-window/components/member-actions/components/more-actions.js +2 -2
  27. package/lib/modules/components/member-window/components/member-actions/index.js +0 -7
  28. package/lib/modules/components/member-window/components/member-actions/store.js +1 -1
  29. package/lib/modules/components/member-window/index.js +1 -1
  30. package/lib/modules/components/tab-frame/index.css +12 -1
  31. package/lib/modules/components/tab-frame/index.js +4 -1
  32. package/lib/modules/control-bar/components/share-state-nav/index.js +1 -3
  33. package/lib/modules/control-bar/mouse-event-bridge.d.ts +23 -0
  34. package/lib/modules/control-bar/mouse-event-bridge.js +87 -0
  35. package/lib/modules/control-bar/store.d.ts +3 -2
  36. package/lib/modules/control-bar/store.js +17 -29
  37. package/lib/modules/control-bar/type.d.ts +0 -1
  38. package/lib/modules/control-bar/view.js +21 -17
  39. package/lib/modules/dialog/dialogs/connection-gateway/tabs.js +3 -2
  40. package/lib/modules/dialog/dialogs/invite/index.js +6 -24
  41. package/lib/modules/invite/components/copy-info.css +72 -0
  42. package/lib/modules/invite/components/copy-info.d.ts +3 -0
  43. package/lib/modules/invite/components/copy-info.js +144 -0
  44. package/lib/modules/invite/components/pstn-invite.js +3 -15
  45. package/lib/modules/invite/components/voip-invite.js +10 -1
  46. package/lib/modules/invite/enums.d.ts +3 -1
  47. package/lib/modules/invite/enums.js +2 -0
  48. package/lib/modules/invite/store.d.ts +4 -1
  49. package/lib/modules/invite/store.js +37 -13
  50. package/lib/modules/invite/view.js +41 -20
  51. package/lib/modules/layout/store.base.d.ts +2 -1
  52. package/lib/modules/layout/store.base.js +20 -23
  53. package/lib/modules/participant/components/confirm-input/index.css +67 -1
  54. package/lib/modules/participant/components/confirm-input/index.js +16 -13
  55. package/lib/modules/participant/components/participants/components/render-user/components/attendee/index.css +4 -0
  56. package/lib/modules/participant/store.base.d.ts +1 -0
  57. package/lib/modules/participant/store.base.js +34 -7
  58. package/lib/modules/pc-audio-connect/main-scene/store.d.ts +2 -0
  59. package/lib/modules/pc-audio-connect/main-scene/store.js +12 -2
  60. package/lib/modules/pc-audio-connect/view.js +4 -2
  61. package/lib/modules/phone-audio-connect/store.d.ts +6 -4
  62. package/lib/modules/phone-audio-connect/store.js +12 -1
  63. package/lib/modules/phone-audio-connect/view.js +6 -4
  64. package/lib/modules/secondary-window/index.js +2 -2
  65. package/lib/modules/secondary-window/store.d.ts +3 -0
  66. package/lib/modules/secondary-window/store.js +16 -1
  67. package/lib/modules/secondary-window/view.js +96 -72
  68. package/lib/modules/toast-manager/type.d.ts +2 -1
  69. package/lib/modules/toast-manager/type.js +4 -1
  70. package/lib/plugins/module-dev-plugin.js +4 -4
  71. package/lib/providers/ability-provider.d.ts +15 -0
  72. package/lib/providers/ability-provider.js +13 -1
  73. package/lib/providers/mouse-detect/provider.d.ts +2 -0
  74. package/lib/providers/mouse-detect/provider.empty.d.ts +14 -0
  75. package/lib/providers/mouse-detect/provider.empty.js +47 -0
  76. package/lib/providers/mouse-detect/provider.js +13 -4
  77. package/lib/providers/mouse-detect/type.d.ts +2 -0
  78. package/lib/providers/phone-audio-provider.d.ts +31 -5
  79. package/lib/providers/phone-audio-provider.js +83 -22
  80. package/lib/providers/user-audio-volume-provider.d.ts +6 -0
  81. package/lib/providers/user-audio-volume-provider.js +3 -2
  82. package/lib/runtime.d.ts +1 -0
  83. package/lib/scenes/main-scene.js +2 -1
  84. package/lib/shared-data/chat-data.d.ts +19 -0
  85. package/lib/shared-data/chat-data.js +54 -7
  86. package/lib/shared-data/member-data.d.ts +9 -1
  87. package/lib/shared-data/member-data.js +46 -17
  88. package/lib/shared-data/video-window.js +8 -4
  89. package/lib/translations/enUS.d.ts +245 -1
  90. package/lib/translations/enUS.js +247 -3
  91. package/lib/translations/zhCN.d.ts +245 -1
  92. package/lib/translations/zhCN.js +246 -2
  93. package/lib/utilities/os.d.ts +1 -0
  94. package/lib/utilities/os.js +15 -0
  95. package/lib/utilities/renderer.d.ts +1 -0
  96. package/lib/utilities/renderer.js +7 -1
  97. package/lib-es/creator/provider-initializer.browser.js +4 -2
  98. package/lib-es/creator/provider-initializer.electron.js +11 -3
  99. package/lib-es/electron/injections.js +3 -0
  100. package/lib-es/electron/preload.js +2 -1
  101. package/lib-es/fragments/annotation/style.css +1 -0
  102. package/lib-es/fragments/whiteboard/style.css +4 -0
  103. package/lib-es/modules/action-bar/main-scene/store.base.js +5 -0
  104. package/lib-es/modules/audio-stream/index.js +33 -1
  105. package/lib-es/modules/chat/chat-room-store.js +4 -2
  106. package/lib-es/modules/chat/index.js +1 -1
  107. package/lib-es/modules/chat/store.js +4 -2
  108. package/lib-es/modules/components/device-control/store.base.js +22 -3
  109. package/lib-es/modules/components/leave-meeting/index.js +3 -2
  110. package/lib-es/modules/components/leave-meeting/main-scene/store.js +6 -1
  111. package/lib-es/modules/components/leave-meeting/store.base.js +1 -1
  112. package/lib-es/modules/components/leave-meeting/waiting-scene/store.js +6 -1
  113. package/lib-es/modules/components/member-window/components/member-actions/components/icon-status.js +7 -10
  114. package/lib-es/modules/components/member-window/components/member-actions/components/more-actions.js +2 -2
  115. package/lib-es/modules/components/member-window/components/member-actions/index.js +0 -7
  116. package/lib-es/modules/components/member-window/components/member-actions/store.js +1 -1
  117. package/lib-es/modules/components/member-window/index.js +1 -1
  118. package/lib-es/modules/components/tab-frame/index.css +12 -1
  119. package/lib-es/modules/components/tab-frame/index.js +4 -1
  120. package/lib-es/modules/control-bar/components/share-state-nav/index.js +1 -3
  121. package/lib-es/modules/control-bar/mouse-event-bridge.js +79 -0
  122. package/lib-es/modules/control-bar/store.js +18 -30
  123. package/lib-es/modules/control-bar/view.js +21 -17
  124. package/lib-es/modules/dialog/dialogs/connection-gateway/tabs.js +3 -2
  125. package/lib-es/modules/dialog/dialogs/invite/index.js +6 -24
  126. package/lib-es/modules/invite/components/copy-info.css +72 -0
  127. package/lib-es/modules/invite/components/copy-info.js +137 -0
  128. package/lib-es/modules/invite/components/pstn-invite.js +3 -15
  129. package/lib-es/modules/invite/components/voip-invite.js +10 -1
  130. package/lib-es/modules/invite/enums.js +2 -0
  131. package/lib-es/modules/invite/store.js +38 -14
  132. package/lib-es/modules/invite/view.js +43 -22
  133. package/lib-es/modules/layout/store.base.js +20 -23
  134. package/lib-es/modules/participant/components/confirm-input/index.css +67 -1
  135. package/lib-es/modules/participant/components/confirm-input/index.js +16 -13
  136. package/lib-es/modules/participant/components/participants/components/render-user/components/attendee/index.css +4 -0
  137. package/lib-es/modules/participant/store.base.js +34 -7
  138. package/lib-es/modules/pc-audio-connect/main-scene/store.js +12 -2
  139. package/lib-es/modules/pc-audio-connect/view.js +4 -2
  140. package/lib-es/modules/phone-audio-connect/store.js +12 -1
  141. package/lib-es/modules/phone-audio-connect/view.js +6 -4
  142. package/lib-es/modules/secondary-window/index.js +2 -2
  143. package/lib-es/modules/secondary-window/store.js +16 -1
  144. package/lib-es/modules/secondary-window/view.js +97 -73
  145. package/lib-es/modules/toast-manager/type.js +4 -1
  146. package/lib-es/plugins/module-dev-plugin.js +4 -4
  147. package/lib-es/providers/ability-provider.js +13 -1
  148. package/lib-es/providers/mouse-detect/provider.empty.js +39 -0
  149. package/lib-es/providers/mouse-detect/provider.js +13 -4
  150. package/lib-es/providers/phone-audio-provider.js +109 -48
  151. package/lib-es/providers/user-audio-volume-provider.js +3 -2
  152. package/lib-es/scenes/main-scene.js +3 -2
  153. package/lib-es/shared-data/chat-data.js +55 -8
  154. package/lib-es/shared-data/member-data.js +46 -17
  155. package/lib-es/shared-data/video-window.js +8 -4
  156. package/lib-es/translations/enUS.js +247 -3
  157. package/lib-es/translations/zhCN.js +246 -2
  158. package/lib-es/utilities/os.js +8 -0
  159. package/lib-es/utilities/renderer.js +7 -1
  160. package/lib-es/utilities/shared-storage.js +2 -2
  161. package/package.json +6 -6
  162. package/lib/modules/connection-gateway/components/computer/index.css +0 -12
  163. package/lib/modules/connection-gateway/components/computer/index.d.ts +0 -3
  164. package/lib/modules/connection-gateway/components/computer/index.js +0 -66
  165. package/lib/modules/connection-gateway/components/phone/components/callinfo/index.css +0 -36
  166. package/lib/modules/connection-gateway/components/phone/components/callinfo/index.d.ts +0 -10
  167. package/lib/modules/connection-gateway/components/phone/components/callinfo/index.js +0 -78
  168. package/lib/modules/connection-gateway/components/phone/components/calling/index.css +0 -72
  169. package/lib/modules/connection-gateway/components/phone/components/calling/index.d.ts +0 -7
  170. package/lib/modules/connection-gateway/components/phone/components/calling/index.js +0 -58
  171. package/lib/modules/connection-gateway/components/phone/components/remeber/index.css +0 -10
  172. package/lib/modules/connection-gateway/components/phone/components/remeber/index.d.ts +0 -5
  173. package/lib/modules/connection-gateway/components/phone/components/remeber/index.js +0 -24
  174. package/lib/modules/connection-gateway/components/phone/components/useing/index.css +0 -46
  175. package/lib/modules/connection-gateway/components/phone/components/useing/index.d.ts +0 -3
  176. package/lib/modules/connection-gateway/components/phone/components/useing/index.js +0 -36
  177. package/lib/modules/connection-gateway/components/phone/index.css +0 -49
  178. package/lib/modules/connection-gateway/components/phone/index.d.ts +0 -3
  179. package/lib/modules/connection-gateway/components/phone/index.js +0 -185
  180. package/lib/modules/connection-gateway/enums.d.ts +0 -4
  181. package/lib/modules/connection-gateway/enums.js +0 -12
  182. package/lib/modules/connection-gateway/index.css +0 -6
  183. package/lib/modules/connection-gateway/index.d.ts +0 -10
  184. package/lib/modules/connection-gateway/index.js +0 -78
  185. package/lib/modules/connection-gateway/store.d.ts +0 -68
  186. package/lib/modules/connection-gateway/store.js +0 -713
  187. package/lib/modules/connection-gateway/types.d.ts +0 -8
  188. package/lib/modules/connection-gateway/types.js +0 -6
  189. package/lib/modules/connection-gateway/view.d.ts +0 -1
  190. package/lib/modules/connection-gateway/view.js +0 -39
  191. package/lib-es/modules/connection-gateway/components/computer/index.css +0 -12
  192. package/lib-es/modules/connection-gateway/components/computer/index.js +0 -59
  193. package/lib-es/modules/connection-gateway/components/phone/components/callinfo/index.css +0 -36
  194. package/lib-es/modules/connection-gateway/components/phone/components/callinfo/index.js +0 -71
  195. package/lib-es/modules/connection-gateway/components/phone/components/calling/index.css +0 -72
  196. package/lib-es/modules/connection-gateway/components/phone/components/calling/index.js +0 -51
  197. package/lib-es/modules/connection-gateway/components/phone/components/remeber/index.css +0 -10
  198. package/lib-es/modules/connection-gateway/components/phone/components/remeber/index.js +0 -17
  199. package/lib-es/modules/connection-gateway/components/phone/components/useing/index.css +0 -46
  200. package/lib-es/modules/connection-gateway/components/phone/components/useing/index.js +0 -29
  201. package/lib-es/modules/connection-gateway/components/phone/index.css +0 -49
  202. package/lib-es/modules/connection-gateway/components/phone/index.js +0 -177
  203. package/lib-es/modules/connection-gateway/enums.js +0 -5
  204. package/lib-es/modules/connection-gateway/index.css +0 -6
  205. package/lib-es/modules/connection-gateway/index.js +0 -60
  206. package/lib-es/modules/connection-gateway/store.js +0 -707
  207. package/lib-es/modules/connection-gateway/types.js +0 -1
  208. package/lib-es/modules/connection-gateway/view.js +0 -31
@@ -0,0 +1,144 @@
1
+ "use strict";
2
+
3
+ require("core-js/modules/es.object.define-property.js");
4
+ Object.defineProperty(exports, "__esModule", {
5
+ value: true
6
+ });
7
+ exports["default"] = void 0;
8
+ require("core-js/modules/es.regexp.exec.js");
9
+ require("core-js/modules/es.string.replace.js");
10
+ var _i18n = require("agora-ui-foundation/lib/i18n");
11
+ require("./copy-info.css");
12
+ var _button = require("agora-ui-foundation/lib/components/button");
13
+ var _react = require("react");
14
+ var _copyText = require("agora-ui-foundation/lib/utilities/copy-text");
15
+ var _type = require("../../toast-manager/type");
16
+ var _store = require("../store");
17
+ var _icon = require("agora-ui-foundation/lib/components/icon");
18
+ var _type2 = require("agora-ui-foundation/lib/components/icon/type");
19
+ var _tools = require("agora-foundation/lib/utilities/tools");
20
+ var _meetingDetail = require("../../../utilities/meeting-detail");
21
+ var _jsxRuntime = require("react/jsx-runtime");
22
+ var CopyInfo = function CopyInfo() {
23
+ var transI18n = (0, _i18n.useI18n)();
24
+ var _useContext = (0, _react.useContext)(_store.StoreContext),
25
+ _useContext$roomInfo = _useContext.roomInfo,
26
+ inviteLink = _useContext$roomInfo.inviteLink,
27
+ roomId = _useContext$roomInfo.roomId,
28
+ roomName = _useContext$roomInfo.roomName,
29
+ password = _useContext$roomInfo.password,
30
+ showToast = _useContext.showToast,
31
+ roomDetailCopyText = _useContext.roomDetailCopyText,
32
+ localUserName = _useContext.localUserName,
33
+ meetingId = _useContext.meetingId,
34
+ roomSchedule = _useContext.roomSchedule;
35
+ var duration = (roomSchedule === null || roomSchedule === void 0 ? void 0 : roomSchedule.duration) || 0;
36
+ var startTime = (roomSchedule === null || roomSchedule === void 0 ? void 0 : roomSchedule.startTime) || 0;
37
+ function handleCopyMeetingId(copyContent) {
38
+ if (!copyContent) return;
39
+ var content = meetingId ? copyContent : copyContent.replace(/\s+/g, '');
40
+ (0, _copyText.copyText)(content).then(function () {
41
+ showToast({
42
+ key: _type.FcrUIToastKey.FMT_STATUSBAR_STATUS_COPPIED
43
+ });
44
+ })["catch"](function () {
45
+ showToast({
46
+ key: _type.FcrUIToastKey.FMT_INFORMATION_TIPS_NUMBERCOPYFAILED
47
+ });
48
+ });
49
+ }
50
+ var handleCopyMeetingDetail = (0, _react.useCallback)(function () {
51
+ (0, _copyText.copyText)(roomDetailCopyText).then(function () {
52
+ showToast({
53
+ key: _type.FcrUIToastKey.FMT_STATUSBAR_STATUS_COPPIED
54
+ });
55
+ });
56
+ }, []);
57
+ var displayMeetingId = (0, _tools.renderMeetingId)(meetingId, roomId);
58
+ return /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
59
+ className: "fcr-invite-copy-info",
60
+ children: [/*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
61
+ className: "fcr-invite-copy-info-content",
62
+ children: [/*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
63
+ className: "fcr-invite-copy-info-title",
64
+ children: transI18n('fmt_link_invitation', {
65
+ reason1: localUserName
66
+ })
67
+ }), /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
68
+ className: "fcr-invite-copy-info-content-item",
69
+ children: [/*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
70
+ className: "fcr-invite-copy-info-content-item-label",
71
+ children: transI18n('fmt_meetinginfo_room_topic')
72
+ }), /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
73
+ className: "fcr-invite-copy-info-content-item-value",
74
+ children: roomName
75
+ })]
76
+ }), /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
77
+ className: "fcr-invite-copy-info-content-item",
78
+ children: [/*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
79
+ className: "fcr-invite-copy-info-content-item-label",
80
+ children: transI18n('fmt_meetingInfo_window_info_meetingID')
81
+ }), /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
82
+ className: "fcr-invite-copy-info-content-item-value fcr-invite-copy-info-content-item-value-meeting-id",
83
+ children: [/*#__PURE__*/(0, _jsxRuntime.jsx)("span", {
84
+ children: displayMeetingId
85
+ }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_icon.FcrIcon, {
86
+ onClick: function onClick() {
87
+ return handleCopyMeetingId(displayMeetingId);
88
+ },
89
+ type: _type2.FcrIconType.FCR_COPY_ICON,
90
+ size: 20,
91
+ colors: {
92
+ iconPrimary: 'var(--fcr_ui_scene_icontext1)'
93
+ }
94
+ })]
95
+ })]
96
+ }), password && /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
97
+ className: "fcr-invite-copy-info-content-item",
98
+ children: [/*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
99
+ className: "fcr-invite-copy-info-content-item-label",
100
+ children: transI18n('fmt_premeeting_joinroom_mobile_tips_password')
101
+ }), /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
102
+ className: "fcr-invite-copy-info-content-item-value fcr-invite-copy-info-content-item-value-meeting-id",
103
+ children: [/*#__PURE__*/(0, _jsxRuntime.jsx)("span", {
104
+ children: password
105
+ }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_icon.FcrIcon, {
106
+ onClick: function onClick() {
107
+ return handleCopyMeetingId(password);
108
+ },
109
+ type: _type2.FcrIconType.FCR_COPY_ICON,
110
+ size: 20,
111
+ colors: {
112
+ iconPrimary: 'var(--fcr_ui_scene_icontext1)'
113
+ }
114
+ })]
115
+ })]
116
+ }), /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
117
+ className: "fcr-invite-copy-info-content-item",
118
+ children: [/*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
119
+ className: "fcr-invite-copy-info-content-item-label",
120
+ children: transI18n('fmt_invitepage_label_invite_link')
121
+ }), /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
122
+ className: "fcr-invite-copy-info-content-item-value",
123
+ children: inviteLink
124
+ })]
125
+ }), /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
126
+ className: "fcr-invite-copy-info-content-item",
127
+ children: [/*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
128
+ className: "fcr-invite-copy-info-content-item-label",
129
+ children: transI18n('fmt_ai_summary_create_labels_meeting_time')
130
+ }), /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
131
+ className: "fcr-invite-copy-info-content-item-value",
132
+ children: (0, _meetingDetail.generateMeetingDuration)(startTime || 0, duration)
133
+ })]
134
+ })]
135
+ }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_button.FcrButton, {
136
+ type: "secondary-bordered",
137
+ size: "XS",
138
+ onClick: handleCopyMeetingDetail,
139
+ className: "invite__pstn-invite-copyinfo",
140
+ children: transI18n('fmt_popup_button_meetinginfor')
141
+ })]
142
+ });
143
+ };
144
+ var _default = exports["default"] = CopyInfo;
@@ -170,9 +170,9 @@ var PSTNInvite = exports.PSTNInvite = (0, _mobxReact.observer)(function () {
170
170
  setIsInvitePhoneNumberError(true);
171
171
  }
172
172
  };
173
- return /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
173
+ return /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
174
174
  className: "invite__pstn-invite",
175
- children: [/*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
175
+ children: /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
176
176
  className: "invite__pstn-invite__phone",
177
177
  children: [!isPstnCalling ? /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
178
178
  className: "invite__pstn-invite_edit_phone",
@@ -246,18 +246,6 @@ var PSTNInvite = exports.PSTNInvite = (0, _mobxReact.observer)(function () {
246
246
  size: "XS",
247
247
  children: !isPstnCalling ? transI18n('fmt_pstn_label_phonecall') : transI18n('fmt_pstn_button_hangupphone')
248
248
  })]
249
- }), /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
250
- className: "invite__pstn-invite-divider",
251
- children: /*#__PURE__*/(0, _jsxRuntime.jsx)("span", {
252
- className: "invite__pstn-invite-divider-content",
253
- children: transI18n('fmt_pstn_label_or')
254
- })
255
- }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_button.FcrButton, {
256
- type: "secondary-bordered",
257
- size: "XS",
258
- onClick: handleCopyMeetingDetail,
259
- className: "invite__pstn-invite-copyinfo",
260
- children: transI18n('fmt_popup_button_meetinginfor')
261
- })]
249
+ })
262
250
  });
263
251
  });
@@ -27,6 +27,8 @@ var _i18n = require("agora-ui-foundation/lib/i18n");
27
27
  var _errorTips = require("./error-tips");
28
28
  var _enums = require("../enums");
29
29
  require("./voip-invite.css");
30
+ var _regex = require("agora-foundation/lib/utilities/regex");
31
+ var _type3 = require("../../toast-manager/type");
30
32
  var _jsxRuntime = require("react/jsx-runtime");
31
33
  var VoipInvite = exports.VoipInvite = (0, _mobxReact.observer)(function () {
32
34
  var _calledVoipInfo$state;
@@ -53,12 +55,19 @@ var VoipInvite = exports.VoipInvite = (0, _mobxReact.observer)(function () {
53
55
  isVoipCalling = _useContext.isVoipCalling,
54
56
  startSessionByVoip = _useContext.startSessionByVoip,
55
57
  stopSession = _useContext.stopSession,
56
- calledVoipInfo = _useContext.calledVoipInfo;
58
+ calledVoipInfo = _useContext.calledVoipInfo,
59
+ showToast = _useContext.showToast;
57
60
  var _useState9 = (0, _react.useState)(false),
58
61
  _useState0 = (0, _slicedToArray2["default"])(_useState9, 2),
59
62
  isLoading = _useState0[0],
60
63
  setIsLoading = _useState0[1];
61
64
  var handleCallVoip = function handleCallVoip() {
65
+ if ((0, _regex.isPhoneNumber)(callVoip)) {
66
+ showToast({
67
+ key: _type3.FcrUIToastKey.FMT_SIP_TIPS_ENTER_CORRECT_NUMBER
68
+ });
69
+ return;
70
+ }
62
71
  checkInput(callVoip, setIsError);
63
72
  if (callVoip.trim().length === 0) {
64
73
  return;
@@ -1,6 +1,8 @@
1
1
  export declare enum InviteType {
2
2
  PSTN = "PSTN",
3
- VOIP = "VOIP"
3
+ VOIP = "VOIP",
4
+ COPY = "COPY",
5
+ WIDGET = "WIDGET"
4
6
  }
5
7
  export declare enum CallType {
6
8
  INCOMING = "incoming",
@@ -8,6 +8,8 @@ exports.VoipType = exports.InviteType = exports.InviteStatus = exports.CallType
8
8
  var InviteType = exports.InviteType = /*#__PURE__*/function (InviteType) {
9
9
  InviteType["PSTN"] = "PSTN";
10
10
  InviteType["VOIP"] = "VOIP";
11
+ InviteType["COPY"] = "COPY";
12
+ InviteType["WIDGET"] = "WIDGET";
11
13
  return InviteType;
12
14
  }({});
13
15
  var CallType = exports.CallType = /*#__PURE__*/function (CallType) {
@@ -15,6 +15,8 @@ export default class InviteStore implements FcrUIManagedObject {
15
15
  private _widgetProvider;
16
16
  private _roomConnectorControl;
17
17
  private _dialogProvider;
18
+ private _abilityProvider;
19
+ private _phoneAudioConnectorProvider;
18
20
  private _dialogProviderObserver;
19
21
  accessor roomInfo: FcrRoomInfo;
20
22
  accessor roomSchedule: FcrRoomSchedule;
@@ -41,9 +43,10 @@ export default class InviteStore implements FcrUIManagedObject {
41
43
  get meetingTimeStatus(): import("../../shared-data/meeting-time").MeetingStatus;
42
44
  get meetingTime(): string;
43
45
  get roomId(): string;
46
+ get showInvitePstnTab(): boolean;
47
+ get showInviteVoipTab(): boolean;
44
48
  get widgetConfigByContacts(): import("../../type").FcrUIWebWidgetConfig | undefined;
45
49
  constructor({ objectManager }: InviteStoreArgs);
46
- closeInviteDialog(): void;
47
50
  release(): void;
48
51
  stopSession(type: 'pstn' | 'voip'): Promise<void>;
49
52
  startSessionByPhone({ phoneNumber, userName, zone }: PstnInfo): Promise<void>;
@@ -38,10 +38,13 @@ Object.defineProperty(exports, "__esModule", {
38
38
  });
39
39
  exports["default"] = exports.StoreContext = void 0;
40
40
  var _regenerator = _interopRequireDefault(require("@babel/runtime/regenerator"));
41
+ require("core-js/modules/es.array.concat.js");
41
42
  require("core-js/modules/es.array.find.js");
43
+ require("core-js/modules/es.array.includes.js");
42
44
  require("core-js/modules/es.array.iterator.js");
43
45
  require("core-js/modules/es.array.map.js");
44
46
  require("core-js/modules/es.object.to-string.js");
47
+ require("core-js/modules/es.string.includes.js");
45
48
  require("core-js/modules/es.string.iterator.js");
46
49
  require("core-js/modules/es.weak-map.js");
47
50
  require("core-js/modules/esnext.iterator.constructor.js");
@@ -66,6 +69,7 @@ var _objectManager = require("../../object-manager");
66
69
  var _logger = require("../../utilities/logger");
67
70
  var _meetingDetail = require("../../utilities/meeting-detail");
68
71
  var _constant = require("../../utilities/constant");
72
+ var _type3 = require("../toast-manager/type");
69
73
  var _InviteStore;
70
74
  var _initProto, _init_InviteStatus, _init_isPstnCalling, _init_isVoipCalling, _init_ipInfo, _init_phoneInfo, _init_calledPstnInfo, _init_calledVoipInfo, _stopSessionDecs, _startSessionByPhoneDecs, _startSessionByVoipDecs, _showToastDecs, _getRoomConnectorIpInfoDecs, _getRoomConnectorPhoneInfoDecs, _handleErrorDecs, _updateInviteStatusDecs, _resetpstnStatusDecs, _resetVoipStatusDecs, _handlePhoneConnectorSessionStateUpdatedDecs, _handleIPConnectorSessionStateUpdatedDecs, _ref;
71
75
  function _classPrivateFieldInitSpec(e, t, a) { _checkPrivateRedeclaration(e, t), t.set(e, a); }
@@ -149,6 +153,8 @@ var InviteStore = exports["default"] = /*#__PURE__*/function () {
149
153
  // Get all required objects from objectManager
150
154
 
151
155
  this._mainRoomControl = objectManager.getObject(_objectManager.FcrUIObjectKeys.P_MAIN_ROOM_CONTROL_PROVIDER).mainRoomControl;
156
+ this._abilityProvider = objectManager.getObject(_objectManager.FcrUIObjectKeys.P_ABILITY_PROVIDER);
157
+ this._phoneAudioConnectorProvider = objectManager.getObject(_objectManager.FcrUIObjectKeys.P_PHONE_AUDIO_CONNECTOR_PROVIDER);
152
158
  this._messageProvider = objectManager.getObject(_objectManager.FcrUIObjectKeys.P_MESSAGE_PROVIDER);
153
159
  this._roomConnectorControl = this._mainRoomControl.getRoomConnectorControl();
154
160
  this._sharedMemberDataSource = objectManager.getObject(_objectManager.FcrUIObjectKeys.S_SHARED_MEMBER_DATA_SOURCE);
@@ -305,6 +311,26 @@ var InviteStore = exports["default"] = /*#__PURE__*/function () {
305
311
  get: function get() {
306
312
  return this.roomInfo.roomId;
307
313
  }
314
+ }, {
315
+ key: "showInvitePstnTab",
316
+ get: function get() {
317
+ var types = this._phoneAudioConnectorProvider.getCallOutTypeArray();
318
+ var hasPstnPermission = types.includes(_type.FcrPhoneConnectorSessionTypeToStringMap[_type.FcrPhoneConnectorSessionType.PSTN]);
319
+ var hasVoltePermission = types.includes(_type.FcrPhoneConnectorSessionTypeToStringMap[_type.FcrPhoneConnectorSessionType.VOLTE]);
320
+ var isPstnCallOutSupported = this._abilityProvider.isCallOutAbilitySupported() && hasPstnPermission;
321
+ var isVolteCallOutSupported = this._abilityProvider.isCallOutVolteAbilitySupported() && hasVoltePermission;
322
+ return isPstnCallOutSupported || isVolteCallOutSupported;
323
+ }
324
+ }, {
325
+ key: "showInviteVoipTab",
326
+ get: function get() {
327
+ var types = this._phoneAudioConnectorProvider.getCallOutTypeArray();
328
+ var hasH323Permission = types.includes(_type.FcrIPConnectorSessionTypeToStringMap[_type.FcrIPConnectorSessionType.H323]);
329
+ var hasSipPermission = types.includes(_type.FcrIPConnectorSessionTypeToStringMap[_type.FcrIPConnectorSessionType.SIP]);
330
+ var isH323CallOutSupported = this._abilityProvider.isCallOutH323AbilitySupported() && hasH323Permission;
331
+ var isSipCallOutSupported = this._abilityProvider.isCallOutSipAbilitySupported() && hasSipPermission;
332
+ return isH323CallOutSupported || isSipCallOutSupported;
333
+ }
308
334
  }, {
309
335
  key: "widgetConfigByContacts",
310
336
  get: function get() {
@@ -313,16 +339,6 @@ var InviteStore = exports["default"] = /*#__PURE__*/function () {
313
339
  });
314
340
  return contacts;
315
341
  }
316
- }, {
317
- key: "closeInviteDialog",
318
- value: function closeInviteDialog() {
319
- if (this._pstnSessionId) {
320
- this.stopSession('pstn');
321
- }
322
- if (this._voipSessionId) {
323
- this.stopSession('voip');
324
- }
325
- }
326
342
  }, {
327
343
  key: "release",
328
344
  value: function release() {
@@ -372,11 +388,12 @@ var InviteStore = exports["default"] = /*#__PURE__*/function () {
372
388
  key: "startSessionByPhone",
373
389
  value: function () {
374
390
  var _startSessionByPhone = (0, _asyncToGenerator2["default"])(/*#__PURE__*/_regenerator["default"].mark(function _callee2(_ref4) {
375
- var phoneNumber, userName, zone, _t2;
391
+ var phoneNumber, userName, zone, type, _t2;
376
392
  return _regenerator["default"].wrap(function (_context2) {
377
393
  while (1) switch (_context2.prev = _context2.next) {
378
394
  case 0:
379
395
  phoneNumber = _ref4.phoneNumber, userName = _ref4.userName, zone = _ref4.zone;
396
+ type = this._phoneAudioConnectorProvider.getPhoneCallOutType();
380
397
  this.isPstnCalling = true;
381
398
  this.calledPstnInfo = {
382
399
  phoneNumber: phoneNumber,
@@ -387,7 +404,8 @@ var InviteStore = exports["default"] = /*#__PURE__*/function () {
387
404
  _context2.next = 2;
388
405
  return this._roomConnectorControl.startSessionByPhone({
389
406
  phoneNumber: phoneNumber,
390
- userName: userName
407
+ userName: userName,
408
+ type: type
391
409
  });
392
410
  case 2:
393
411
  this._pstnSessionId = _context2.sent;
@@ -397,7 +415,7 @@ var InviteStore = exports["default"] = /*#__PURE__*/function () {
397
415
  case 3:
398
416
  _context2.prev = 3;
399
417
  _t2 = _context2["catch"](1);
400
- this.handleError(this.calledVoipInfo, _t2, 'voip');
418
+ this.handleError(this.calledVoipInfo, _t2, 'pstn');
401
419
  case 4:
402
420
  case "end":
403
421
  return _context2.stop();
@@ -501,6 +519,12 @@ var InviteStore = exports["default"] = /*#__PURE__*/function () {
501
519
  value: function handleError(info, error, sessionType) {
502
520
  var _this2 = this;
503
521
  this.updateInviteStatus(info, _enums.InviteStatus.ERROR);
522
+ this.showToast({
523
+ key: _type3.FcrUIToastKey.ERR_MESSAGE,
524
+ params: {
525
+ message: "code: ".concat(error.code, ", message: ").concat(error.message)
526
+ }
527
+ });
504
528
  setTimeout(function () {
505
529
  if (sessionType === 'pstn') {
506
530
  _this2.isPstnCalling = false;
@@ -17,33 +17,54 @@ var _i18n = require("agora-ui-foundation/lib/i18n");
17
17
  var _tabFrame = _interopRequireDefault(require("../components/tab-frame"));
18
18
  var _enums = require("./enums");
19
19
  var _store = require("./store");
20
+ var _copyInfo = _interopRequireDefault(require("./components/copy-info"));
20
21
  var _jsxRuntime = require("react/jsx-runtime");
21
22
  var View = exports.View = (0, _mobxReact.observer)(function (props) {
22
23
  var contactsChildren = props.contactsChildren;
23
24
  var _useContext = (0, _react.useContext)(_store.StoreContext),
24
- widgetConfigByContacts = _useContext.widgetConfigByContacts;
25
- var widgetConfigByContactsId = widgetConfigByContacts === null || widgetConfigByContacts === void 0 ? void 0 : widgetConfigByContacts.id;
26
- var _useState = (0, _react.useState)(_enums.InviteType.PSTN),
25
+ widgetConfigByContacts = _useContext.widgetConfigByContacts,
26
+ showInviteVoipTab = _useContext.showInviteVoipTab,
27
+ showInvitePstnTab = _useContext.showInvitePstnTab;
28
+ var transI18n = (0, _i18n.useI18n)();
29
+ var _useState = (0, _react.useState)(_enums.InviteType.COPY),
27
30
  _useState2 = (0, _slicedToArray2["default"])(_useState, 2),
28
31
  currentInviteType = _useState2[0],
29
32
  setCurrentInviteType = _useState2[1];
30
- var transI18n = (0, _i18n.useI18n)();
31
- var tabs = [{
32
- label: "".concat(transI18n('fmt_pstn_label_phonecall')),
33
- key: _enums.InviteType.PSTN,
34
- content: /*#__PURE__*/(0, _jsxRuntime.jsx)(_pstnInvite.PSTNInvite, {})
35
- }, {
36
- label: "".concat(transI18n('fmt_sip_options_H323')),
37
- key: _enums.InviteType.VOIP,
38
- content: /*#__PURE__*/(0, _jsxRuntime.jsx)(_voipInvite.VoipInvite, {})
39
- }];
40
- if (widgetConfigByContacts) {
41
- tabs.push({
42
- label: widgetConfigByContacts.name,
43
- key: widgetConfigByContactsId,
44
- content: contactsChildren
45
- });
46
- }
33
+ var tabs = (0, _react.useMemo)(function () {
34
+ var tabs = [{
35
+ label: transI18n('fmt_invitepage_label_by_invitation'),
36
+ key: _enums.InviteType.COPY,
37
+ content: /*#__PURE__*/(0, _jsxRuntime.jsx)(_copyInfo["default"], {})
38
+ }];
39
+ if (showInvitePstnTab) {
40
+ tabs.push({
41
+ label: "".concat(transI18n('fmt_pstn_label_phonecall')),
42
+ key: _enums.InviteType.PSTN,
43
+ content: /*#__PURE__*/(0, _jsxRuntime.jsx)(_pstnInvite.PSTNInvite, {})
44
+ });
45
+ }
46
+ if (showInviteVoipTab) {
47
+ tabs.push({
48
+ label: transI18n('fmt_invitepage_label_meeting_connector'),
49
+ key: _enums.InviteType.VOIP,
50
+ content: /*#__PURE__*/(0, _jsxRuntime.jsx)(_voipInvite.VoipInvite, {})
51
+ });
52
+ }
53
+ if (widgetConfigByContacts) {
54
+ tabs.push({
55
+ key: _enums.InviteType.WIDGET,
56
+ label: widgetConfigByContacts.name,
57
+ content: /*#__PURE__*/(0, _jsxRuntime.jsx)(_jsxRuntime.Fragment, {
58
+ children: contactsChildren
59
+ })
60
+ });
61
+ }
62
+ var isSingleTab = tabs.length === 1;
63
+ if (isSingleTab && tabs[0].key === _enums.InviteType.COPY) {
64
+ tabs[0].label = transI18n('fmt_invitepage_label_meeting_details');
65
+ }
66
+ return tabs;
67
+ }, [transI18n, widgetConfigByContacts, contactsChildren, showInvitePstnTab, showInviteVoipTab]);
47
68
  return /*#__PURE__*/(0, _jsxRuntime.jsx)(_tabFrame["default"], {
48
69
  activeKey: currentInviteType,
49
70
  onChange: function onChange(key) {
@@ -30,6 +30,7 @@ export declare abstract class LayoutStoreBase implements FcrLayoutSlots, FcrUIEv
30
30
  private _sharedLayoutDataSource;
31
31
  private _sharedSettingDataSource;
32
32
  private _sharedMemberDataSource;
33
+ private _sharedChatDataSource;
33
34
  private _chatProvider;
34
35
  private _pinDataSource;
35
36
  private _sharedScreenShareDataSource;
@@ -52,7 +53,7 @@ export declare abstract class LayoutStoreBase implements FcrLayoutSlots, FcrUIEv
52
53
  accessor barLocked: boolean;
53
54
  accessor barHidden: boolean;
54
55
  accessor asideWidth: number;
55
- accessor chatRoomState: FcrChatRoomConnectionState;
56
+ get chatRoomState(): FcrChatRoomConnectionState;
56
57
  accessor whiteboardActive: boolean;
57
58
  accessor ownerUser: FcrUserInfo | undefined;
58
59
  get streamControl(): FcrStreamControl;
@@ -83,7 +83,7 @@ var _objectManager = require("../../object-manager");
83
83
  var _type7 = require("../secondary-window/type");
84
84
  var _type8 = require("../../modules/toast-manager/type");
85
85
  var _LayoutStoreBase;
86
- var _initProto, _participantDecs, _init_participant, _chatDecs, _init_chat, _chatActionDecs, _init_chatAction, _stateBarDecs, _init_stateBar, _actionBarDecs, _init_actionBar, _layersDecs, _init_layers, _whiteboardDecs, _init_whiteboard, _annotationDecs, _init_annotation, _screenShareControlDecs, _init_screenShareControl, _subtitlesDecs, _init_subtitles, _subtitlesHistoryDecs, _init_subtitlesHistory, _subtitlesHistorySettingsDecs, _init_subtitlesHistorySettings, _init_collapsed, _init_aside, _init_barHovering, _init_barLocked, _init_barHidden, _init_asideWidth, _init_chatRoomState, _init_whiteboardActive, _init_ownerUser, _addPinMessageDecs, _cancelPinMessageDecs, _setWhiteboardActiveDecs, _setAsideWidthDecs, _updateSlotsDecs, _toggleLayoutDecs, _toggleCollapsedDecs, _toggleAsideDecs, _asideWidthChangedDecs, _toggleLayoutBarLockDecs, _toggleLayoutBarHiddenDecs, _resetLockTimerDecs, _setHoveringHandlerDecs, _setHoveringLeaveHandlerDecs, _setScreenShareSpeakerViewSizeDecs, _handleLiveLayoutChangeDecs, _onUserInfoUpdatedDecs, _handleLayoutUpdatedDecs, _init__handleLayoutUpdated, _handleMainListLengthChangedDecs, _handleMainListChangedDecs, _setBarHoveringDecs, _handleConnectionUpdatedDecs, _findVideoWindowByUserIdDecs, _onRemoteUsersLeftDecs, _ref;
86
+ var _initProto, _participantDecs, _init_participant, _chatDecs, _init_chat, _chatActionDecs, _init_chatAction, _stateBarDecs, _init_stateBar, _actionBarDecs, _init_actionBar, _layersDecs, _init_layers, _whiteboardDecs, _init_whiteboard, _annotationDecs, _init_annotation, _screenShareControlDecs, _init_screenShareControl, _subtitlesDecs, _init_subtitles, _subtitlesHistoryDecs, _init_subtitlesHistory, _subtitlesHistorySettingsDecs, _init_subtitlesHistorySettings, _init_collapsed, _init_aside, _init_barHovering, _init_barLocked, _init_barHidden, _init_asideWidth, _init_whiteboardActive, _init_ownerUser, _addPinMessageDecs, _cancelPinMessageDecs, _setWhiteboardActiveDecs, _setAsideWidthDecs, _updateSlotsDecs, _toggleLayoutDecs, _toggleCollapsedDecs, _toggleAsideDecs, _asideWidthChangedDecs, _toggleLayoutBarLockDecs, _toggleLayoutBarHiddenDecs, _resetLockTimerDecs, _setHoveringHandlerDecs, _setHoveringLeaveHandlerDecs, _setScreenShareSpeakerViewSizeDecs, _handleLiveLayoutChangeDecs, _onUserInfoUpdatedDecs, _handleLayoutUpdatedDecs, _init__handleLayoutUpdated, _handleMainListLengthChangedDecs, _handleMainListChangedDecs, _setBarHoveringDecs, _handleConnectionUpdatedDecs, _findVideoWindowByUserIdDecs, _onRemoteUsersLeftDecs, _ref;
87
87
  function _classPrivateFieldInitSpec(e, t, a) { _checkPrivateRedeclaration(e, t), t.set(e, a); }
88
88
  function _checkPrivateRedeclaration(e, t) { if (t.has(e)) throw new TypeError("Cannot initialize the same private elements twice on an object"); }
89
89
  function _classPrivateFieldSet(s, a, r) { return s.set(_assertClassBrand(s, a), r), r; }
@@ -114,7 +114,6 @@ var _Q = /*#__PURE__*/new WeakMap();
114
114
  var _R = /*#__PURE__*/new WeakMap();
115
115
  var _S = /*#__PURE__*/new WeakMap();
116
116
  var _T = /*#__PURE__*/new WeakMap();
117
- var _U = /*#__PURE__*/new WeakMap();
118
117
  _ref = (_participantDecs = [_mobx.observable, _mobx.observable.ref], _chatDecs = [_mobx.observable, _mobx.observable.ref], _chatActionDecs = [_mobx.observable, _mobx.observable.ref], _stateBarDecs = [_mobx.observable, _mobx.observable.ref], _actionBarDecs = [_mobx.observable, _mobx.observable.ref], _layersDecs = [_mobx.observable, _mobx.observable.ref], _whiteboardDecs = [_mobx.observable, _mobx.observable.ref], _annotationDecs = [_mobx.observable, _mobx.observable.ref], _screenShareControlDecs = [_mobx.observable, _mobx.observable.ref], _subtitlesDecs = [_mobx.observable, _mobx.observable.ref], _subtitlesHistoryDecs = [_mobx.observable, _mobx.observable.ref], _subtitlesHistorySettingsDecs = [_mobx.observable, _mobx.observable.ref], _addPinMessageDecs = [_mobx.action, _mobx.action.bound], _cancelPinMessageDecs = [_mobx.action, _mobx.action.bound], _setWhiteboardActiveDecs = [_mobx.action, _mobx.action.bound], _setAsideWidthDecs = [_mobx.action, _mobx.action.bound], _updateSlotsDecs = [_mobx.action, _mobx.action.bound], _toggleLayoutDecs = [_mobx.action, _mobx.action.bound], _toggleCollapsedDecs = [_mobx.action, _mobx.action.bound], _toggleAsideDecs = [_mobx.action, _mobx.action.bound], _asideWidthChangedDecs = [_mobx.action, _mobx.action.bound], _toggleLayoutBarLockDecs = [_mobx.action, _mobx.action.bound], _toggleLayoutBarHiddenDecs = [_mobx.action, _mobx.action.bound], _resetLockTimerDecs = [_mobx.action, _mobx.action.bound], _setHoveringHandlerDecs = [_mobx.action, _mobx.action.bound], _setHoveringLeaveHandlerDecs = [_mobx.action, _mobx.action.bound], _setScreenShareSpeakerViewSizeDecs = [(0, _decorator.debounced)(400), _decorator.bound], _handleLiveLayoutChangeDecs = [_mobx.action, _mobx.action.bound], _onUserInfoUpdatedDecs = [_mobx.action, _mobx.action.bound], _handleLayoutUpdatedDecs = [_mobx.action, _mobx.action.bound], _handleMainListLengthChangedDecs = [_mobx.action, _mobx.action.bound], _handleMainListChangedDecs = [_mobx.action, _mobx.action.bound], _setBarHoveringDecs = [_mobx.action, _mobx.action.bound], _handleConnectionUpdatedDecs = [_mobx.action, _mobx.action.bound], _findVideoWindowByUserIdDecs = [_mobx.action, _mobx.action.bound], _onRemoteUsersLeftDecs = [_mobx.action, _mobx.action.bound], "logger");
119
118
  var LayoutStoreBase = exports.LayoutStoreBase = /*#__PURE__*/function () {
120
119
  function LayoutStoreBase(_ref2) {
@@ -148,9 +147,8 @@ var LayoutStoreBase = exports.LayoutStoreBase = /*#__PURE__*/function () {
148
147
  _classPrivateFieldInitSpec(this, _P, _init_barLocked(this, true));
149
148
  _classPrivateFieldInitSpec(this, _Q, _init_barHidden(this, false));
150
149
  _classPrivateFieldInitSpec(this, _R, _init_asideWidth(this, _view.MinAsideWidth));
151
- _classPrivateFieldInitSpec(this, _S, _init_chatRoomState(this, _type4.FcrChatRoomConnectionState.Disconnected));
152
- _classPrivateFieldInitSpec(this, _T, _init_whiteboardActive(this, false));
153
- _classPrivateFieldInitSpec(this, _U, _init_ownerUser(this, undefined));
150
+ _classPrivateFieldInitSpec(this, _S, _init_whiteboardActive(this, false));
151
+ _classPrivateFieldInitSpec(this, _T, _init_ownerUser(this, undefined));
154
152
  (0, _defineProperty2["default"])(this, "getAllowedOperations", (0, _mobxUtils.computedFn)(function (targetRole, isSelf) {
155
153
  return _this._privilegeProvider.getAllowedOperations(targetRole, isSelf);
156
154
  }));
@@ -176,6 +174,7 @@ var LayoutStoreBase = exports.LayoutStoreBase = /*#__PURE__*/function () {
176
174
  this._privilegeProvider = objectManager.getObject(_objectManager.FcrUIObjectKeys.P_PRIVILEGE_PROVIDER);
177
175
  this._sharedSettingDataSource = objectManager.getObject(_objectManager.FcrUIObjectKeys.S_SHARED_SETTING_DATA_SOURCE);
178
176
  this._sharedInterpreterDataSource = objectManager.getObject(_objectManager.FcrUIObjectKeys.S_SHARED_INTERPRETER_DATA_SOURCE);
177
+ this._sharedChatDataSource = objectManager.getObject(_objectManager.FcrUIObjectKeys.S_SHARED_CHAT_DATA_SOURCE);
179
178
  this._chatProvider = objectManager.getObject(_objectManager.FcrUIObjectKeys.P_CHAT_PROVIDER);
180
179
  this._sharedUserAudioVolumeDataSource = objectManager.getObject(_objectManager.FcrUIObjectKeys.S_SHARED_USER_AUDIO_VOLUME_DATA_SOURCE);
181
180
  this._videoWindowDataSource = objectManager.getObject(_objectManager.FcrUIObjectKeys.S_SHARED_VIDEO_WINDOW_DATA_SOURCE);
@@ -183,7 +182,7 @@ var LayoutStoreBase = exports.LayoutStoreBase = /*#__PURE__*/function () {
183
182
  this._pinDataSource = objectManager.getObject(_objectManager.FcrUIObjectKeys.S_SHARED_PIN_DATA_SOURCE);
184
183
  this._sharedScreenShareDataSource = objectManager.getObject(_objectManager.FcrUIObjectKeys.S_SHARED_SCREEN_SHARE_DATA_SOURCE);
185
184
  this._annotationProvider = objectManager.getObject(_objectManager.FcrUIObjectKeys.P_ANNOTATION_PROVIDER);
186
- this.chatRoomState = this._chatRoomControl.getConnectionState();
185
+ this._sharedChatDataSource.setConnectionState(_type6.FcrUIRoomType.MAIN_ROOM, this._chatRoomControl.getConnectionState());
187
186
  }
188
187
  return (0, _createClass2["default"])(LayoutStoreBase, [{
189
188
  key: "participant",
@@ -332,26 +331,24 @@ var LayoutStoreBase = exports.LayoutStoreBase = /*#__PURE__*/function () {
332
331
  }, {
333
332
  key: "chatRoomState",
334
333
  get: function get() {
335
- return _classPrivateFieldGet(_S, this);
336
- },
337
- set: function set(v) {
338
- _classPrivateFieldSet(_S, this, v);
334
+ var _this$_sharedChatData, _this$_sharedChatData2;
335
+ return (_this$_sharedChatData = (_this$_sharedChatData2 = this._sharedChatDataSource) === null || _this$_sharedChatData2 === void 0 ? void 0 : _this$_sharedChatData2.currentConnectionState) !== null && _this$_sharedChatData !== void 0 ? _this$_sharedChatData : _type4.FcrChatRoomConnectionState.Disconnected;
339
336
  }
340
337
  }, {
341
338
  key: "whiteboardActive",
342
339
  get: function get() {
343
- return _classPrivateFieldGet(_T, this);
340
+ return _classPrivateFieldGet(_S, this);
344
341
  },
345
342
  set: function set(v) {
346
- _classPrivateFieldSet(_T, this, v);
343
+ _classPrivateFieldSet(_S, this, v);
347
344
  }
348
345
  }, {
349
346
  key: "ownerUser",
350
347
  get: function get() {
351
- return _classPrivateFieldGet(_U, this);
348
+ return _classPrivateFieldGet(_T, this);
352
349
  },
353
350
  set: function set(v) {
354
- _classPrivateFieldSet(_U, this, v);
351
+ _classPrivateFieldSet(_T, this, v);
355
352
  }
356
353
  }, {
357
354
  key: "streamControl",
@@ -1219,9 +1216,10 @@ var LayoutStoreBase = exports.LayoutStoreBase = /*#__PURE__*/function () {
1219
1216
  }
1220
1217
  }, {
1221
1218
  key: "_handleConnectionUpdated",
1222
- value: function _handleConnectionUpdated(_, state) {
1223
- this.logger.info('layout store handleConnectionUpdated', state);
1224
- this.chatRoomState = state;
1219
+ value: function _handleConnectionUpdated(_, state, roomType) {
1220
+ this.logger.info('layout store handleConnectionUpdated', state, roomType);
1221
+ // 连接状态已由共享数据源统一管理,这里不需要再更新
1222
+ // 共享数据源会在收到回调时自动更新状态
1225
1223
  }
1226
1224
  }, {
1227
1225
  key: "_findVideoWindowByUserId",
@@ -1319,7 +1317,7 @@ var LayoutStoreBase = exports.LayoutStoreBase = /*#__PURE__*/function () {
1319
1317
  }]);
1320
1318
  }();
1321
1319
  _LayoutStoreBase = LayoutStoreBase;
1322
- var _applyDecs$e = (0, _slicedToArray2["default"])(_applyDecs(_LayoutStoreBase, [[_participantDecs, 17, "participant"], [_chatDecs, 17, "chat"], [_chatActionDecs, 17, "chatAction"], [_stateBarDecs, 17, "stateBar"], [_actionBarDecs, 17, "actionBar"], [_layersDecs, 17, "layers"], [_whiteboardDecs, 17, "whiteboard"], [_annotationDecs, 17, "annotation"], [_screenShareControlDecs, 17, "screenShareControl"], [_subtitlesDecs, 17, "subtitles"], [_subtitlesHistoryDecs, 17, "subtitlesHistory"], [_subtitlesHistorySettingsDecs, 17, "subtitlesHistorySettings"], [_mobx.observable, 1, "collapsed"], [_mobx.observable, 1, "aside"], [_mobx.observable, 1, "barHovering"], [_mobx.observable, 1, "barLocked"], [_mobx.observable, 1, "barHidden"], [_mobx.observable, 1, "asideWidth"], [_mobx.observable, 1, "chatRoomState"], [_mobx.observable, 1, "whiteboardActive"], [_mobx.observable, 1, "ownerUser"], [_mobx.computed, 3, "isWaterMarkEnabled"], [_mobx.computed, 3, "isMulti"], [_mobx.computed, 3, "layout"], [_mobx.computed, 3, "manualLayout"], [_mobx.computed, 3, "scalcValue"], [_mobx.computed, 3, "sourceList"], [_mobx.computed, 3, "layoutMainList"], [_mobx.computed, 3, "mainList"], [_mobx.computed, 3, "spotlightStreamId"], [_mobx.computed, 3, "foldList"], [_mobx.computed, 3, "galleryList"], [_mobx.computed, 3, "isMainWindowInScreenSharing"], [_mobx.computed, 3, "isCurrentUserInBoardSharing"], [_mobx.computed, 3, "asideLayout"], [_mobx.computed, 3, "carouselList"], [_mobx.computed, 3, "hasPinnedStream"], [_mobx.computed, 3, "isRobot"], [_mobx.computed, 3, "findSpotlightUser"], [_mobx.computed, 3, "isWhoISpeakingActive"], [_mobx.computed, 3, "microphoneEnabled"], [_mobx.computed, 3, "cameraEnabled"], [_mobx.computed, 3, "galleryMaxSize"], [_mobx.computed, 3, "asideContent"], [_mobx.computed, 3, "participantsRenderAt"], [_mobx.computed, 3, "chatRenderAt"], [_mobx.computed, 3, "subtitlesHistoryRenderAt"], [_decorator.bound, 2, "getWaterMarkContent"], [_decorator.bound, 2, "hasMutePermission"], [_decorator.bound, 2, "hasUnmutePermission"], [_decorator.bound, 2, "hasRequestStartAudioPermission"], [_decorator.bound, 2, "toggleMainStream"], [_addPinMessageDecs, 18, "addPinMessage"], [_cancelPinMessageDecs, 18, "cancelPinMessage"], [_decorator.bound, 2, "addPin"], [_decorator.bound, 2, "removePin"], [_decorator.bound, 2, "setVideoOrientation"], [_decorator.bound, 2, "setAllowChat"], [_decorator.bound, 2, "handleSetPinState"], [_setWhiteboardActiveDecs, 18, "setWhiteboardActive"], [_setAsideWidthDecs, 18, "setAsideWidth"], [_updateSlotsDecs, 18, "updateSlots"], [_decorator.bound, 2, "closeParticipantFromAside"], [_decorator.bound, 2, "moveParticipantFromAsideToDialog"], [_decorator.bound, 2, "closeChatFromAside"], [_decorator.bound, 2, "closeAsideChat"], [_decorator.bound, 2, "moveChatFromAsideToDialog"], [_decorator.bound, 2, "openPrivateChat"], [_decorator.bound, 2, "openRenameDialog"], [_decorator.bound, 2, "closeSubtitlesHistoryFromAside"], [_decorator.bound, 2, "moveSubtitlesHistoryFromAsideToDialog"], [_toggleLayoutDecs, 18, "toggleLayout"], [_toggleCollapsedDecs, 18, "toggleCollapsed"], [_toggleAsideDecs, 18, "toggleAside"], [_asideWidthChangedDecs, 18, "asideWidthChanged"], [_toggleLayoutBarLockDecs, 18, "toggleLayoutBarLock"], [_toggleLayoutBarHiddenDecs, 18, "toggleLayoutBarHidden"], [_resetLockTimerDecs, 18, "resetLockTimer"], [_setHoveringHandlerDecs, 18, "setHoveringHandler"], [_setHoveringLeaveHandlerDecs, 18, "setHoveringLeaveHandler"], [_setScreenShareSpeakerViewSizeDecs, 2, "setScreenShareSpeakerViewSize"], [_handleLiveLayoutChangeDecs, 18, "handleLiveLayoutChange"], [_onUserInfoUpdatedDecs, 18, "onUserInfoUpdated"], [_decorator.bound, 2, "stopLocalPreview"], [_decorator.bound, 2, "startLocalPreview"], [_decorator.bound, 2, "setAllowChatWithPayload"], [_decorator.bound, 2, "setScaleValue"], [_decorator.bound, 2, "muteAudio"], [_decorator.bound, 2, "setControlbarEnabled"], [_decorator.bound, 2, "sendParticipantEvent"], [_decorator.bound, 2, "onEvent"], [_decorator.bound, 2, "_addListeners"], [_mobx.computed, 3, "_hasVideoStreamUser"], [_handleMainListLengthChangedDecs, 18, "_handleMainListLengthChanged"], [_handleMainListChangedDecs, 18, "_handleMainListChanged"], [_mobx.action, 2, "_switchToSpeaker"], [_mobx.action, 2, "_switchToGallery"], [_setBarHoveringDecs, 18, "_setBarHovering"], [_handleConnectionUpdatedDecs, 18, "_handleConnectionUpdated"], [_findVideoWindowByUserIdDecs, 18, "_findVideoWindowByUserId"], [_onRemoteUsersLeftDecs, 18, "_onRemoteUsersLeft"], [_decorator.bound, 2, "_handleLiveStreamingStateUpdated"], [_decorator.bound, 2, "_handleStreamAdded"], [_decorator.bound, 2, "_onStreamsAdded"], [_decorator.bound, 2, "_onStreamsUpdated"], [_decorator.bound, 2, "_onStreamsRemoved"], [_handleLayoutUpdatedDecs, 16, "_handleLayoutUpdated"]], []).e, 23);
1320
+ var _applyDecs$e = (0, _slicedToArray2["default"])(_applyDecs(_LayoutStoreBase, [[_participantDecs, 17, "participant"], [_chatDecs, 17, "chat"], [_chatActionDecs, 17, "chatAction"], [_stateBarDecs, 17, "stateBar"], [_actionBarDecs, 17, "actionBar"], [_layersDecs, 17, "layers"], [_whiteboardDecs, 17, "whiteboard"], [_annotationDecs, 17, "annotation"], [_screenShareControlDecs, 17, "screenShareControl"], [_subtitlesDecs, 17, "subtitles"], [_subtitlesHistoryDecs, 17, "subtitlesHistory"], [_subtitlesHistorySettingsDecs, 17, "subtitlesHistorySettings"], [_mobx.observable, 1, "collapsed"], [_mobx.observable, 1, "aside"], [_mobx.observable, 1, "barHovering"], [_mobx.observable, 1, "barLocked"], [_mobx.observable, 1, "barHidden"], [_mobx.observable, 1, "asideWidth"], [_mobx.computed, 3, "chatRoomState"], [_mobx.observable, 1, "whiteboardActive"], [_mobx.observable, 1, "ownerUser"], [_mobx.computed, 3, "isWaterMarkEnabled"], [_mobx.computed, 3, "isMulti"], [_mobx.computed, 3, "layout"], [_mobx.computed, 3, "manualLayout"], [_mobx.computed, 3, "scalcValue"], [_mobx.computed, 3, "sourceList"], [_mobx.computed, 3, "layoutMainList"], [_mobx.computed, 3, "mainList"], [_mobx.computed, 3, "spotlightStreamId"], [_mobx.computed, 3, "foldList"], [_mobx.computed, 3, "galleryList"], [_mobx.computed, 3, "isMainWindowInScreenSharing"], [_mobx.computed, 3, "isCurrentUserInBoardSharing"], [_mobx.computed, 3, "asideLayout"], [_mobx.computed, 3, "carouselList"], [_mobx.computed, 3, "hasPinnedStream"], [_mobx.computed, 3, "isRobot"], [_mobx.computed, 3, "findSpotlightUser"], [_mobx.computed, 3, "isWhoISpeakingActive"], [_mobx.computed, 3, "microphoneEnabled"], [_mobx.computed, 3, "cameraEnabled"], [_mobx.computed, 3, "galleryMaxSize"], [_mobx.computed, 3, "asideContent"], [_mobx.computed, 3, "participantsRenderAt"], [_mobx.computed, 3, "chatRenderAt"], [_mobx.computed, 3, "subtitlesHistoryRenderAt"], [_decorator.bound, 2, "getWaterMarkContent"], [_decorator.bound, 2, "hasMutePermission"], [_decorator.bound, 2, "hasUnmutePermission"], [_decorator.bound, 2, "hasRequestStartAudioPermission"], [_decorator.bound, 2, "toggleMainStream"], [_addPinMessageDecs, 18, "addPinMessage"], [_cancelPinMessageDecs, 18, "cancelPinMessage"], [_decorator.bound, 2, "addPin"], [_decorator.bound, 2, "removePin"], [_decorator.bound, 2, "setVideoOrientation"], [_decorator.bound, 2, "setAllowChat"], [_decorator.bound, 2, "handleSetPinState"], [_setWhiteboardActiveDecs, 18, "setWhiteboardActive"], [_setAsideWidthDecs, 18, "setAsideWidth"], [_updateSlotsDecs, 18, "updateSlots"], [_decorator.bound, 2, "closeParticipantFromAside"], [_decorator.bound, 2, "moveParticipantFromAsideToDialog"], [_decorator.bound, 2, "closeChatFromAside"], [_decorator.bound, 2, "closeAsideChat"], [_decorator.bound, 2, "moveChatFromAsideToDialog"], [_decorator.bound, 2, "openPrivateChat"], [_decorator.bound, 2, "openRenameDialog"], [_decorator.bound, 2, "closeSubtitlesHistoryFromAside"], [_decorator.bound, 2, "moveSubtitlesHistoryFromAsideToDialog"], [_toggleLayoutDecs, 18, "toggleLayout"], [_toggleCollapsedDecs, 18, "toggleCollapsed"], [_toggleAsideDecs, 18, "toggleAside"], [_asideWidthChangedDecs, 18, "asideWidthChanged"], [_toggleLayoutBarLockDecs, 18, "toggleLayoutBarLock"], [_toggleLayoutBarHiddenDecs, 18, "toggleLayoutBarHidden"], [_resetLockTimerDecs, 18, "resetLockTimer"], [_setHoveringHandlerDecs, 18, "setHoveringHandler"], [_setHoveringLeaveHandlerDecs, 18, "setHoveringLeaveHandler"], [_setScreenShareSpeakerViewSizeDecs, 2, "setScreenShareSpeakerViewSize"], [_handleLiveLayoutChangeDecs, 18, "handleLiveLayoutChange"], [_onUserInfoUpdatedDecs, 18, "onUserInfoUpdated"], [_decorator.bound, 2, "stopLocalPreview"], [_decorator.bound, 2, "startLocalPreview"], [_decorator.bound, 2, "setAllowChatWithPayload"], [_decorator.bound, 2, "setScaleValue"], [_decorator.bound, 2, "muteAudio"], [_decorator.bound, 2, "setControlbarEnabled"], [_decorator.bound, 2, "sendParticipantEvent"], [_decorator.bound, 2, "onEvent"], [_decorator.bound, 2, "_addListeners"], [_mobx.computed, 3, "_hasVideoStreamUser"], [_handleMainListLengthChangedDecs, 18, "_handleMainListLengthChanged"], [_handleMainListChangedDecs, 18, "_handleMainListChanged"], [_mobx.action, 2, "_switchToSpeaker"], [_mobx.action, 2, "_switchToGallery"], [_setBarHoveringDecs, 18, "_setBarHovering"], [_handleConnectionUpdatedDecs, 18, "_handleConnectionUpdated"], [_findVideoWindowByUserIdDecs, 18, "_findVideoWindowByUserId"], [_onRemoteUsersLeftDecs, 18, "_onRemoteUsersLeft"], [_decorator.bound, 2, "_handleLiveStreamingStateUpdated"], [_decorator.bound, 2, "_handleStreamAdded"], [_decorator.bound, 2, "_onStreamsAdded"], [_decorator.bound, 2, "_onStreamsUpdated"], [_decorator.bound, 2, "_onStreamsRemoved"], [_handleLayoutUpdatedDecs, 16, "_handleLayoutUpdated"]], []).e, 22);
1323
1321
  _init_participant = _applyDecs$e[0];
1324
1322
  _init_chat = _applyDecs$e[1];
1325
1323
  _init_chatAction = _applyDecs$e[2];
@@ -1338,9 +1336,8 @@ _init_barHovering = _applyDecs$e[14];
1338
1336
  _init_barLocked = _applyDecs$e[15];
1339
1337
  _init_barHidden = _applyDecs$e[16];
1340
1338
  _init_asideWidth = _applyDecs$e[17];
1341
- _init_chatRoomState = _applyDecs$e[18];
1342
- _init_whiteboardActive = _applyDecs$e[19];
1343
- _init_ownerUser = _applyDecs$e[20];
1344
- _init__handleLayoutUpdated = _applyDecs$e[21];
1345
- _initProto = _applyDecs$e[22];
1339
+ _init_whiteboardActive = _applyDecs$e[18];
1340
+ _init_ownerUser = _applyDecs$e[19];
1341
+ _init__handleLayoutUpdated = _applyDecs$e[20];
1342
+ _initProto = _applyDecs$e[21];
1346
1343
  var StoreContext = exports.StoreContext = /*#__PURE__*/(0, _react.createContext)(null);