fcr-ui-scene 3.9.0 → 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 (199) hide show
  1. package/lib/creator/provider-initializer.browser.js +2 -1
  2. package/lib/creator/provider-initializer.electron.js +11 -4
  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/modules/action-bar/main-scene/store.base.d.ts +1 -0
  7. package/lib/modules/action-bar/main-scene/store.base.js +5 -0
  8. package/lib/modules/audio-stream/index.d.ts +2 -0
  9. package/lib/modules/audio-stream/index.js +33 -1
  10. package/lib/modules/chat/index.js +1 -1
  11. package/lib/modules/chat/store.d.ts +1 -1
  12. package/lib/modules/chat/store.js +4 -2
  13. package/lib/modules/components/device-control/store.base.d.ts +1 -0
  14. package/lib/modules/components/device-control/store.base.js +22 -3
  15. package/lib/modules/components/leave-meeting/index.js +3 -2
  16. package/lib/modules/components/leave-meeting/main-scene/store.d.ts +1 -0
  17. package/lib/modules/components/leave-meeting/main-scene/store.js +6 -1
  18. package/lib/modules/components/leave-meeting/store.base.d.ts +1 -0
  19. package/lib/modules/components/leave-meeting/store.base.js +1 -1
  20. package/lib/modules/components/leave-meeting/waiting-scene/store.d.ts +1 -0
  21. package/lib/modules/components/leave-meeting/waiting-scene/store.js +6 -1
  22. package/lib/modules/components/member-window/components/member-actions/components/icon-status.js +7 -10
  23. package/lib/modules/components/member-window/components/member-actions/components/more-actions.js +2 -2
  24. package/lib/modules/components/member-window/components/member-actions/index.js +0 -7
  25. package/lib/modules/components/member-window/components/member-actions/store.js +1 -1
  26. package/lib/modules/components/member-window/index.js +1 -1
  27. package/lib/modules/components/tab-frame/index.css +12 -1
  28. package/lib/modules/components/tab-frame/index.js +4 -1
  29. package/lib/modules/control-bar/components/share-state-nav/index.js +1 -3
  30. package/lib/modules/control-bar/mouse-event-bridge.d.ts +23 -0
  31. package/lib/modules/control-bar/mouse-event-bridge.js +87 -0
  32. package/lib/modules/control-bar/store.d.ts +1 -1
  33. package/lib/modules/control-bar/store.js +10 -27
  34. package/lib/modules/control-bar/type.d.ts +0 -1
  35. package/lib/modules/control-bar/view.js +9 -16
  36. package/lib/modules/dialog/dialogs/connection-gateway/tabs.js +3 -2
  37. package/lib/modules/dialog/dialogs/invite/index.js +6 -24
  38. package/lib/modules/invite/components/copy-info.css +72 -0
  39. package/lib/modules/invite/components/copy-info.d.ts +3 -0
  40. package/lib/modules/invite/components/copy-info.js +144 -0
  41. package/lib/modules/invite/components/pstn-invite.js +3 -15
  42. package/lib/modules/invite/components/voip-invite.js +10 -1
  43. package/lib/modules/invite/enums.d.ts +3 -1
  44. package/lib/modules/invite/enums.js +2 -0
  45. package/lib/modules/invite/store.d.ts +4 -1
  46. package/lib/modules/invite/store.js +37 -13
  47. package/lib/modules/invite/view.js +41 -20
  48. package/lib/modules/layout/store.base.d.ts +2 -1
  49. package/lib/modules/layout/store.base.js +20 -23
  50. package/lib/modules/participant/components/confirm-input/index.css +67 -1
  51. package/lib/modules/participant/components/confirm-input/index.js +16 -13
  52. package/lib/modules/participant/components/participants/components/render-user/components/attendee/index.css +4 -0
  53. package/lib/modules/participant/store.base.d.ts +1 -0
  54. package/lib/modules/participant/store.base.js +34 -7
  55. package/lib/modules/pc-audio-connect/main-scene/store.d.ts +2 -0
  56. package/lib/modules/pc-audio-connect/main-scene/store.js +12 -2
  57. package/lib/modules/pc-audio-connect/view.js +4 -2
  58. package/lib/modules/phone-audio-connect/store.d.ts +6 -4
  59. package/lib/modules/phone-audio-connect/store.js +12 -1
  60. package/lib/modules/phone-audio-connect/view.js +6 -4
  61. package/lib/modules/secondary-window/index.js +2 -2
  62. package/lib/modules/secondary-window/store.d.ts +3 -0
  63. package/lib/modules/secondary-window/store.js +16 -1
  64. package/lib/modules/secondary-window/view.js +96 -72
  65. package/lib/modules/toast-manager/type.d.ts +2 -1
  66. package/lib/modules/toast-manager/type.js +4 -1
  67. package/lib/plugins/module-dev-plugin.js +4 -4
  68. package/lib/providers/ability-provider.d.ts +15 -0
  69. package/lib/providers/ability-provider.js +13 -1
  70. package/lib/providers/mouse-detect/provider.d.ts +2 -0
  71. package/lib/providers/mouse-detect/provider.empty.d.ts +14 -0
  72. package/lib/providers/mouse-detect/provider.empty.js +47 -0
  73. package/lib/providers/mouse-detect/provider.js +13 -4
  74. package/lib/providers/mouse-detect/type.d.ts +2 -0
  75. package/lib/providers/phone-audio-provider.d.ts +31 -5
  76. package/lib/providers/phone-audio-provider.js +83 -22
  77. package/lib/runtime.d.ts +1 -0
  78. package/lib/scenes/main-scene.js +2 -1
  79. package/lib/shared-data/chat-data.d.ts +19 -0
  80. package/lib/shared-data/chat-data.js +54 -7
  81. package/lib/shared-data/member-data.d.ts +9 -1
  82. package/lib/shared-data/member-data.js +46 -17
  83. package/lib/shared-data/video-window.js +8 -4
  84. package/lib/translations/enUS.d.ts +245 -1
  85. package/lib/translations/enUS.js +247 -3
  86. package/lib/translations/zhCN.d.ts +245 -1
  87. package/lib/translations/zhCN.js +246 -2
  88. package/lib/utilities/os.d.ts +1 -0
  89. package/lib/utilities/os.js +15 -0
  90. package/lib/utilities/renderer.d.ts +1 -0
  91. package/lib/utilities/renderer.js +7 -1
  92. package/lib-es/creator/provider-initializer.browser.js +2 -1
  93. package/lib-es/creator/provider-initializer.electron.js +9 -2
  94. package/lib-es/electron/injections.js +3 -0
  95. package/lib-es/electron/preload.js +2 -1
  96. package/lib-es/modules/action-bar/main-scene/store.base.js +5 -0
  97. package/lib-es/modules/audio-stream/index.js +33 -1
  98. package/lib-es/modules/chat/index.js +1 -1
  99. package/lib-es/modules/chat/store.js +4 -2
  100. package/lib-es/modules/components/device-control/store.base.js +22 -3
  101. package/lib-es/modules/components/leave-meeting/index.js +3 -2
  102. package/lib-es/modules/components/leave-meeting/main-scene/store.js +6 -1
  103. package/lib-es/modules/components/leave-meeting/store.base.js +1 -1
  104. package/lib-es/modules/components/leave-meeting/waiting-scene/store.js +6 -1
  105. package/lib-es/modules/components/member-window/components/member-actions/components/icon-status.js +7 -10
  106. package/lib-es/modules/components/member-window/components/member-actions/components/more-actions.js +2 -2
  107. package/lib-es/modules/components/member-window/components/member-actions/index.js +0 -7
  108. package/lib-es/modules/components/member-window/components/member-actions/store.js +1 -1
  109. package/lib-es/modules/components/member-window/index.js +1 -1
  110. package/lib-es/modules/components/tab-frame/index.css +12 -1
  111. package/lib-es/modules/components/tab-frame/index.js +4 -1
  112. package/lib-es/modules/control-bar/components/share-state-nav/index.js +1 -3
  113. package/lib-es/modules/control-bar/mouse-event-bridge.js +79 -0
  114. package/lib-es/modules/control-bar/store.js +11 -28
  115. package/lib-es/modules/control-bar/view.js +9 -16
  116. package/lib-es/modules/dialog/dialogs/connection-gateway/tabs.js +3 -2
  117. package/lib-es/modules/dialog/dialogs/invite/index.js +6 -24
  118. package/lib-es/modules/invite/components/copy-info.css +72 -0
  119. package/lib-es/modules/invite/components/copy-info.js +137 -0
  120. package/lib-es/modules/invite/components/pstn-invite.js +3 -15
  121. package/lib-es/modules/invite/components/voip-invite.js +10 -1
  122. package/lib-es/modules/invite/enums.js +2 -0
  123. package/lib-es/modules/invite/store.js +38 -14
  124. package/lib-es/modules/invite/view.js +43 -22
  125. package/lib-es/modules/layout/store.base.js +20 -23
  126. package/lib-es/modules/participant/components/confirm-input/index.css +67 -1
  127. package/lib-es/modules/participant/components/confirm-input/index.js +16 -13
  128. package/lib-es/modules/participant/components/participants/components/render-user/components/attendee/index.css +4 -0
  129. package/lib-es/modules/participant/store.base.js +34 -7
  130. package/lib-es/modules/pc-audio-connect/main-scene/store.js +12 -2
  131. package/lib-es/modules/pc-audio-connect/view.js +4 -2
  132. package/lib-es/modules/phone-audio-connect/store.js +12 -1
  133. package/lib-es/modules/phone-audio-connect/view.js +6 -4
  134. package/lib-es/modules/secondary-window/index.js +2 -2
  135. package/lib-es/modules/secondary-window/store.js +16 -1
  136. package/lib-es/modules/secondary-window/view.js +97 -73
  137. package/lib-es/modules/toast-manager/type.js +4 -1
  138. package/lib-es/plugins/module-dev-plugin.js +4 -4
  139. package/lib-es/providers/ability-provider.js +13 -1
  140. package/lib-es/providers/mouse-detect/provider.empty.js +39 -0
  141. package/lib-es/providers/mouse-detect/provider.js +13 -4
  142. package/lib-es/providers/phone-audio-provider.js +109 -48
  143. package/lib-es/scenes/main-scene.js +3 -2
  144. package/lib-es/shared-data/chat-data.js +55 -8
  145. package/lib-es/shared-data/member-data.js +46 -17
  146. package/lib-es/shared-data/video-window.js +8 -4
  147. package/lib-es/translations/enUS.js +247 -3
  148. package/lib-es/translations/zhCN.js +246 -2
  149. package/lib-es/utilities/os.js +8 -0
  150. package/lib-es/utilities/renderer.js +7 -1
  151. package/lib-es/utilities/shared-storage.js +2 -2
  152. package/package.json +6 -6
  153. package/lib/modules/connection-gateway/components/computer/index.css +0 -12
  154. package/lib/modules/connection-gateway/components/computer/index.d.ts +0 -3
  155. package/lib/modules/connection-gateway/components/computer/index.js +0 -66
  156. package/lib/modules/connection-gateway/components/phone/components/callinfo/index.css +0 -36
  157. package/lib/modules/connection-gateway/components/phone/components/callinfo/index.d.ts +0 -10
  158. package/lib/modules/connection-gateway/components/phone/components/callinfo/index.js +0 -78
  159. package/lib/modules/connection-gateway/components/phone/components/calling/index.css +0 -72
  160. package/lib/modules/connection-gateway/components/phone/components/calling/index.d.ts +0 -7
  161. package/lib/modules/connection-gateway/components/phone/components/calling/index.js +0 -58
  162. package/lib/modules/connection-gateway/components/phone/components/remeber/index.css +0 -10
  163. package/lib/modules/connection-gateway/components/phone/components/remeber/index.d.ts +0 -5
  164. package/lib/modules/connection-gateway/components/phone/components/remeber/index.js +0 -24
  165. package/lib/modules/connection-gateway/components/phone/components/useing/index.css +0 -46
  166. package/lib/modules/connection-gateway/components/phone/components/useing/index.d.ts +0 -3
  167. package/lib/modules/connection-gateway/components/phone/components/useing/index.js +0 -36
  168. package/lib/modules/connection-gateway/components/phone/index.css +0 -49
  169. package/lib/modules/connection-gateway/components/phone/index.d.ts +0 -3
  170. package/lib/modules/connection-gateway/components/phone/index.js +0 -185
  171. package/lib/modules/connection-gateway/enums.d.ts +0 -4
  172. package/lib/modules/connection-gateway/enums.js +0 -12
  173. package/lib/modules/connection-gateway/index.css +0 -6
  174. package/lib/modules/connection-gateway/index.d.ts +0 -10
  175. package/lib/modules/connection-gateway/index.js +0 -78
  176. package/lib/modules/connection-gateway/store.d.ts +0 -68
  177. package/lib/modules/connection-gateway/store.js +0 -713
  178. package/lib/modules/connection-gateway/types.d.ts +0 -8
  179. package/lib/modules/connection-gateway/types.js +0 -6
  180. package/lib/modules/connection-gateway/view.d.ts +0 -1
  181. package/lib/modules/connection-gateway/view.js +0 -39
  182. package/lib-es/modules/connection-gateway/components/computer/index.css +0 -12
  183. package/lib-es/modules/connection-gateway/components/computer/index.js +0 -59
  184. package/lib-es/modules/connection-gateway/components/phone/components/callinfo/index.css +0 -36
  185. package/lib-es/modules/connection-gateway/components/phone/components/callinfo/index.js +0 -71
  186. package/lib-es/modules/connection-gateway/components/phone/components/calling/index.css +0 -72
  187. package/lib-es/modules/connection-gateway/components/phone/components/calling/index.js +0 -51
  188. package/lib-es/modules/connection-gateway/components/phone/components/remeber/index.css +0 -10
  189. package/lib-es/modules/connection-gateway/components/phone/components/remeber/index.js +0 -17
  190. package/lib-es/modules/connection-gateway/components/phone/components/useing/index.css +0 -46
  191. package/lib-es/modules/connection-gateway/components/phone/components/useing/index.js +0 -29
  192. package/lib-es/modules/connection-gateway/components/phone/index.css +0 -49
  193. package/lib-es/modules/connection-gateway/components/phone/index.js +0 -177
  194. package/lib-es/modules/connection-gateway/enums.js +0 -5
  195. package/lib-es/modules/connection-gateway/index.css +0 -6
  196. package/lib-es/modules/connection-gateway/index.js +0 -60
  197. package/lib-es/modules/connection-gateway/store.js +0 -707
  198. package/lib-es/modules/connection-gateway/types.js +0 -1
  199. package/lib-es/modules/connection-gateway/view.js +0 -31
@@ -1,72 +0,0 @@
1
- .connector-phone-connecting {
2
- width: 305px;
3
- height: 100px;
4
- border-radius: var(--fcr_cornerradius_xl);
5
- background: var(--fcr_ui_scene_ramp_green1);
6
- display: flex;
7
- align-items: center;
8
- margin-bottom: 16px;
9
- flex-shrink: 0;
10
- }
11
- .connector-phone-connecting_icon {
12
- margin: 13px;
13
- width: 84px;
14
- height: 84px;
15
- display: flex;
16
- align-items: center;
17
- justify-content: center;
18
- }
19
- .connector-phone-connecting_icon-calling {
20
- width: 50px;
21
- height: 50px;
22
- background: var(--fcr_ui_scene_ramp_lightgreen6);
23
- display: flex;
24
- justify-content: center;
25
- align-items: center;
26
- border-radius: 50%;
27
- }
28
- .connector-phone-connecting_content {
29
- display: flex;
30
- flex-direction: column;
31
- align-items: center;
32
- flex: 1;
33
- }
34
- .connector-phone-connecting_region {
35
- color: var(--fcr_ui_scene_icontext2);
36
- font-size: 12px;
37
- text-align: left;
38
- display: block;
39
- width: 129px;
40
- }
41
- .connector-phone-connecting_number {
42
- font-size: 20px;
43
- color: var(--fcr_ui_scene_icontext1);
44
- font-weight: 900;
45
- line-height: 1;
46
- }
47
- .connector-phone-connecting_action {
48
- background: var(--fcr_ui_scene_ramp_green1);
49
- color: var(--fcr_ui_scene_ramp_green6);
50
- border-radius: var(--fcr_cornerradius_l);
51
- font-size: 12px;
52
- height: 22px;
53
- line-height: 22px;
54
- padding: 0 10px;
55
- margin: 10px 0 10px;
56
- }
57
- .connector-phone-connecting.failure {
58
- background: var(--fcr_ui_scene_ramp_red1);
59
- }
60
- .connector-phone-connecting.failure .connector-phone-connecting_action {
61
- color: var(--fcr_ui_scene_ramp_red6);
62
- background: var(--fcr_ui_scene_ramp_red1);
63
- }
64
- .connector-phone-connecting.failure .connector-phone-connecting_icon-failure {
65
- background: var(--fcr_ui_scene_ramp_red6);
66
- width: 50px;
67
- height: 50px;
68
- border-radius: 50%;
69
- display: flex;
70
- align-items: center;
71
- justify-content: center;
72
- }
@@ -1,7 +0,0 @@
1
- import './index.css';
2
- export declare const CallingPhone: (props: {
3
- failure: boolean;
4
- number: string;
5
- region?: string;
6
- reason?: string;
7
- }) => import("react/jsx-runtime").JSX.Element;
@@ -1,58 +0,0 @@
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.CallingPhone = void 0;
8
- var _actionPhone = require("agora-ui-foundation/lib/components/action-phone");
9
- require("./index.css");
10
- var _icon = require("agora-ui-foundation/lib/components/icon");
11
- var _type = require("agora-ui-foundation/lib/components/icon/type");
12
- var _jsxRuntime = require("react/jsx-runtime");
13
- var CallingPhone = exports.CallingPhone = function CallingPhone(props) {
14
- var failure = props.failure,
15
- number = props.number,
16
- region = props.region,
17
- reason = props.reason;
18
- return /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
19
- className: "connector-phone-connecting ".concat(failure ? 'failure' : ''),
20
- children: [/*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
21
- className: "connector-phone-connecting_icon",
22
- children: failure ? /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
23
- className: "connector-phone-connecting_icon-failure",
24
- children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_icon.FcrIcon, {
25
- type: _type.FcrIconType.FCR_PHONECALL3,
26
- size: 32,
27
- colors: {
28
- iconPrimary: 'var(--fcr_ui_scene_white10)'
29
- }
30
- })
31
- }) : /*#__PURE__*/(0, _jsxRuntime.jsx)(_actionPhone.FcrActionPhone, {
32
- icon: /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
33
- className: "connector-phone-connecting_icon-calling",
34
- children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_icon.FcrIcon, {
35
- type: _type.FcrIconType.FCR_PHONECALL3,
36
- colors: {
37
- iconPrimary: 'var(--fcr_ui_scene_white10)'
38
- },
39
- size: 32
40
- })
41
- }),
42
- size: "medium"
43
- })
44
- }), /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
45
- className: "connector-phone-connecting_content",
46
- children: [region && /*#__PURE__*/(0, _jsxRuntime.jsx)("span", {
47
- className: "connector-phone-connecting_region",
48
- children: region || '+86'
49
- }), number && /*#__PURE__*/(0, _jsxRuntime.jsx)("span", {
50
- className: "connector-phone-connecting_number",
51
- children: number || '-'
52
- }), /*#__PURE__*/(0, _jsxRuntime.jsx)("span", {
53
- className: "connector-phone-connecting_action",
54
- children: reason
55
- })]
56
- })]
57
- });
58
- };
@@ -1,10 +0,0 @@
1
- .connector-phone_remember {
2
- display: flex;
3
- font-size: 12px;
4
- align-items: center;
5
- margin-bottom: 16px;
6
- color: var(--fcr_ui_scene_icontext1);
7
- }
8
- .connector-phone_remember .fcr-checkbox {
9
- margin-right: 4px;
10
- }
@@ -1,5 +0,0 @@
1
- import './index.css';
2
- export declare const ConnectionRemember: (props: {
3
- checked: boolean;
4
- onChange: (state: boolean) => void;
5
- }) => import("react/jsx-runtime").JSX.Element;
@@ -1,24 +0,0 @@
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.ConnectionRemember = void 0;
8
- var _checkbox = require("agora-ui-foundation/lib/components/checkbox");
9
- require("./index.css");
10
- var _i18n = require("agora-ui-foundation/lib/i18n");
11
- var _jsxRuntime = require("react/jsx-runtime");
12
- var ConnectionRemember = exports.ConnectionRemember = function ConnectionRemember(props) {
13
- var checked = props.checked,
14
- onChange = props.onChange;
15
- return /*#__PURE__*/(0, _jsxRuntime.jsxs)("label", {
16
- className: "connector-phone_remember",
17
- children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_checkbox.FcrCheckbox, {
18
- checked: checked,
19
- onChange: onChange
20
- }), /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
21
- children: (0, _i18n.transI18n)('fmt_pstn_options_rememberphone')
22
- })]
23
- });
24
- };
@@ -1,46 +0,0 @@
1
- .connector-phone-using {
2
- width: 376px;
3
- height: 128px;
4
- display: flex;
5
- justify-content: center;
6
- align-items: center;
7
- background: var(--fcr_ui_scene_ramp_green1);
8
- border-radius: var(--fcr_cornerradius_l);
9
- flex-direction: column;
10
- margin-bottom: 20px;
11
- margin-top: 11px;
12
- flex-shrink: 0;
13
- }
14
- .connector-phone-using.outgoing-call {
15
- width: 300px;
16
- height: 100px;
17
- }
18
- .connector-phone-using_number {
19
- color: var(--fcr_ui_scene_ramp_green6);
20
- font-size: 20px;
21
- font-weight: 900;
22
- line-height: 1;
23
- margin-bottom: 10px;
24
- }
25
- .connector-phone-using_icon-dot {
26
- background: var(--fcr_ui_scene_white10);
27
- display: inline-block;
28
- width: 8px;
29
- height: 8px;
30
- margin-right: 5px;
31
- border-radius: 50%;
32
- }
33
- .connector-phone-using_number sub.connector-phone-using_region {
34
- font-size: 12px;
35
- color: var(--fcr_ui_scene_icontext3);
36
- font-weight: 500;
37
- margin-right: 6px;
38
- vertical-align: middle;
39
- bottom: inherit;
40
- }
41
- .connector-phone-using_button {
42
- background: var(--fcr_ui_scene_ramp_green6);
43
- }
44
- .connector-phone-using .connector-phone_remember {
45
- margin: 0;
46
- }
@@ -1,3 +0,0 @@
1
- import './index.css';
2
- import { FC, PropsWithChildren } from 'react';
3
- export declare const ConnectionUsing: FC<PropsWithChildren<{}>>;
@@ -1,36 +0,0 @@
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.ConnectionUsing = void 0;
8
- var _button = require("agora-ui-foundation/lib/components/button");
9
- require("./index.css");
10
- var _mobxReact = require("mobx-react");
11
- var _react = require("react");
12
- var _store = require("../../../../store");
13
- var _i18n = require("agora-ui-foundation/lib/i18n");
14
- var _jsxRuntime = require("react/jsx-runtime");
15
- var ConnectionUsing = exports.ConnectionUsing = (0, _mobxReact.observer)(function (_ref) {
16
- var children = _ref.children;
17
- var _useContext = (0, _react.useContext)(_store.StoreContext),
18
- connectSession = _useContext.connectSession,
19
- outgoingCall = _useContext.outgoingCall;
20
- return /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
21
- className: "connector-phone-using ".concat(outgoingCall ? 'outgoing-call' : ''),
22
- children: [outgoingCall && /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
23
- className: "connector-phone-using_number",
24
- children: [/*#__PURE__*/(0, _jsxRuntime.jsx)("sub", {
25
- className: "connector-phone-using_region",
26
- children: "+86"
27
- }), connectSession === null || connectSession === void 0 ? void 0 : connectSession.phoneNumber]
28
- }), /*#__PURE__*/(0, _jsxRuntime.jsxs)(_button.FcrButton, {
29
- size: "XXS",
30
- className: "connector-phone-using_button",
31
- children: [/*#__PURE__*/(0, _jsxRuntime.jsx)("span", {
32
- className: "connector-phone-using_icon-dot"
33
- }), (0, _i18n.transI18n)('fmt_pstn_label_viaphone')]
34
- }), children]
35
- });
36
- });
@@ -1,49 +0,0 @@
1
- .connector-phone {
2
- width: 100%;
3
- height: 450px;
4
- display: flex;
5
- flex-direction: column;
6
- align-items: center;
7
- }
8
- .connector-phone_inner {
9
- display: flex;
10
- flex-direction: column;
11
- width: 260px;
12
- align-items: center;
13
- }
14
- .connector-phone_selector {
15
- margin-bottom: 20px;
16
- height: 32px;
17
- margin-top: 21px;
18
- width: 100%;
19
- }
20
- .connector-phone_selector_errmsg {
21
- color: var(--fcr_ui_scene_ramp_red6);
22
- font-size: 12px;
23
- text-align: right;
24
- }
25
- .connector-phone_selector .fcr-select {
26
- margin-bottom: 20px;
27
- border-color: var(--fcr_web_ui_scene_line4);
28
- width: 260px;
29
- background-color: var(--fcr_ui_scene_input2);
30
- }
31
- .connector-phone_callme-button {
32
- background: var(--fcr_ui_scene_ramp_green6);
33
- margin-bottom: 20px;
34
- }
35
- .connector-phone_hangup-button {
36
- margin-bottom: 20px;
37
- }
38
- .connector-phone-alert {
39
- background: var(--fcr_ui_scene_ramp_green1);
40
- color: var(--fcr_ui_scene_ramp_green6);
41
- border-radius: var(--fcr_cornerradius_l);
42
- min-height: 40px;
43
- line-height: 1.5;
44
- width: 376px;
45
- font-size: 13px;
46
- text-align: center;
47
- margin-bottom: 10px;
48
- padding: 10px;
49
- }
@@ -1,3 +0,0 @@
1
- import './index.css';
2
- declare const ConnectFromPhone: () => import("react/jsx-runtime").JSX.Element;
3
- export default ConnectFromPhone;
@@ -1,185 +0,0 @@
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["default"] = void 0;
9
- require("core-js/modules/es.array.map.js");
10
- require("core-js/modules/es.object.to-string.js");
11
- require("core-js/modules/esnext.iterator.constructor.js");
12
- require("core-js/modules/esnext.iterator.map.js");
13
- var _toConsumableArray2 = _interopRequireDefault(require("@babel/runtime/helpers/toConsumableArray"));
14
- var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));
15
- var _button = require("agora-ui-foundation/lib/components/button");
16
- var _divider = _interopRequireDefault(require("agora-ui-foundation/lib/components/divider"));
17
- var _zonePhone = require("agora-ui-foundation/lib/components/zone-phone");
18
- var _regex = require("agora-foundation/lib/utilities/regex");
19
- var _calling = require("./components/calling");
20
- var _callinfo = _interopRequireDefault(require("./components/callinfo"));
21
- var _mobxReact = require("mobx-react");
22
- var _useing = require("./components/useing");
23
- var _remeber = require("./components/remeber");
24
- var _react = require("react");
25
- var _store = require("../../store");
26
- var _type = require("fcr-core/lib/room-control/room-connector-control/type");
27
- require("./index.css");
28
- var _i18n = require("agora-ui-foundation/lib/i18n");
29
- var _type2 = require("../../../../type");
30
- var _jsxRuntime = require("react/jsx-runtime");
31
- var ConnectFromPhone = (0, _mobxReact.observer)(function () {
32
- var _useContext = (0, _react.useContext)(_store.StoreContext),
33
- phoneCallState = _useContext.phoneCallState,
34
- regionChangeHandler = _useContext.regionChangeHandler,
35
- currentRegion = _useContext.currentRegion,
36
- connectInfo = _useContext.connectInfo,
37
- rememberedNumberList = _useContext.rememberedNumberList,
38
- rememberMe = _useContext.rememberMe,
39
- startCall = _useContext.startCall,
40
- stopCall = _useContext.stopCall,
41
- setCurrentCallInfo = _useContext.setCurrentCallInfo,
42
- currentCallInfo = _useContext.currentCallInfo,
43
- setRememberMe = _useContext.setRememberMe,
44
- connectType = _useContext.connectType,
45
- calling = _useContext.calling,
46
- phoneCallReason = _useContext.phoneCallReason,
47
- outgoingCall = _useContext.outgoingCall,
48
- isHangup = _useContext.isHangup,
49
- hasPstnStream = _useContext.hasPstnStream,
50
- hasOwnPstnStream = _useContext.hasOwnPstnStream,
51
- hasNeedMergedStream = _useContext.hasNeedMergedStream;
52
- var transI18n = (0, _i18n.useI18n)();
53
- var _useState = (0, _react.useState)(''),
54
- _useState2 = (0, _slicedToArray2["default"])(_useState, 2),
55
- errorMessage = _useState2[0],
56
- setErrorMessage = _useState2[1];
57
- var _useState3 = (0, _react.useState)(false),
58
- _useState4 = (0, _slicedToArray2["default"])(_useState3, 2),
59
- isRejectedState = _useState4[0],
60
- setRejected = _useState4[1];
61
- var _useState5 = (0, _react.useState)(false),
62
- _useState6 = (0, _slicedToArray2["default"])(_useState5, 2),
63
- isStaticState = _useState6[0],
64
- setStaticState = _useState6[1];
65
- var _useState7 = (0, _react.useState)(false),
66
- _useState8 = (0, _slicedToArray2["default"])(_useState7, 2),
67
- isRingingState = _useState8[0],
68
- setRingingState = _useState8[1];
69
- var _useState9 = (0, _react.useState)(false),
70
- _useState0 = (0, _slicedToArray2["default"])(_useState9, 2),
71
- isAcceptingState = _useState0[0],
72
- setAcceptingState = _useState0[1];
73
- var validateNumberHandler = function validateNumberHandler(value) {
74
- if (!value) {
75
- setErrorMessage(transI18n('fmt_PSTN_tips_unempty'));
76
- return false;
77
- }
78
- if (!(0, _regex.isPhoneNumber)(value)) {
79
- setErrorMessage(transI18n('fmt_PSTN_tips_formaterror'));
80
- return false;
81
- }
82
- setErrorMessage('');
83
- return true;
84
- };
85
- var handleCallSelf = function handleCallSelf() {
86
- var phone = currentCallInfo.phone;
87
- if (!validateNumberHandler(phone)) return;
88
- startCall();
89
- };
90
- var isPhoneAudioConnected = connectType === _type2.FcrUIConnectType.PHONE;
91
- (0, _react.useEffect)(function () {
92
- setRejected(phoneCallState === _type.FcrRoomConnectorSessionState.END && phoneCallReason === _type.FcrRoomConnectorSessionReason.REJECT);
93
- setStaticState(phoneCallReason === _type.FcrRoomConnectorSessionReason.NONE && phoneCallState === _type.FcrRoomConnectorSessionState.CALLING);
94
- setRingingState(phoneCallState === _type.FcrRoomConnectorSessionState.RINGING && phoneCallReason === _type.FcrRoomConnectorSessionReason.NONE);
95
- setAcceptingState(phoneCallReason === _type.FcrRoomConnectorSessionReason.ACCEPTED && phoneCallState === _type.FcrRoomConnectorSessionState.END);
96
- }, [phoneCallState, phoneCallReason]);
97
- return /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
98
- className: "connector-phone",
99
- children: [(isStaticState && !isAcceptingState && !hasOwnPstnStream || hasPstnStream && !hasOwnPstnStream) && /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
100
- className: "connector-phone_inner",
101
- children: [/*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
102
- className: "connector-phone_selector",
103
- children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_zonePhone.FcrZonePhone, {
104
- zoneDefault: currentCallInfo.zone || '+86',
105
- phoneDefault: currentCallInfo.phone || '',
106
- zoneOptions: [{
107
- text: transI18n('fmt_PSTN_status_china'),
108
- value: '+86'
109
- }, {
110
- text: transI18n('fmt_PSTN_status_usa'),
111
- value: '+1'
112
- }],
113
- phoneOptions: (0, _toConsumableArray2["default"])(rememberedNumberList.map(function (_ref) {
114
- var text = _ref.zone,
115
- value = _ref.phone;
116
- return {
117
- text: text,
118
- value: value
119
- };
120
- })),
121
- onChange: function onChange(zone, phone) {
122
- setCurrentCallInfo({
123
- zone: zone,
124
- phone: phone
125
- });
126
- },
127
- onInputBlur: function onInputBlur() {
128
- return validateNumberHandler(currentCallInfo.phone);
129
- }
130
- }), errorMessage && /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
131
- className: "connector-phone_selector_errmsg",
132
- children: errorMessage
133
- })]
134
- }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_remeber.ConnectionRemember, {
135
- checked: rememberMe,
136
- onChange: setRememberMe
137
- })]
138
- }), (isPhoneAudioConnected || isAcceptingState) && hasOwnPstnStream && /*#__PURE__*/(0, _jsxRuntime.jsx)(_useing.ConnectionUsing, {}), isStaticState && !hasOwnPstnStream && /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
139
- className: "connector-phone_inner",
140
- children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_button.FcrButton, {
141
- size: "XS",
142
- block: true,
143
- styleType: "success",
144
- className: "connector-phone_callme-button",
145
- onClick: handleCallSelf,
146
- loading: calling,
147
- children: transI18n('fmt_pstn_button_callme')
148
- })
149
- }), (isRingingState || !isStaticState) && !isAcceptingState && /*#__PURE__*/(0, _jsxRuntime.jsx)(_calling.CallingPhone, {
150
- failure: !isRingingState,
151
- number: outgoingCall ? currentCallInfo.phone : '',
152
- region: outgoingCall ? currentCallInfo.zone : '',
153
- reason: isRingingState ? transI18n('fmt_pstn_status_calling') : isRejectedState ? transI18n('fmt_pstn_status_hungup') : isHangup ? transI18n('fmt_PSTN_status_hangup') : transI18n('fmt_pstn_status_failed')
154
- }), (isRingingState || isAcceptingState || !isStaticState) && /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
155
- className: "connector-phone_inner",
156
- children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_button.FcrButton, {
157
- size: "XS",
158
- block: true,
159
- styleType: "danger",
160
- className: "connector-phone_hangup-button",
161
- disabled: !isAcceptingState && !isRingingState,
162
- onClick: stopCall,
163
- children: transI18n('fmt_pstn_button_hangupphone')
164
- })
165
- }), (outgoingCall || isStaticState) && (!hasOwnPstnStream || isAcceptingState) && /*#__PURE__*/(0, _jsxRuntime.jsx)(_divider["default"], {
166
- style: {
167
- margin: '10px 0 12px'
168
- },
169
- type: "horizontal",
170
- size: "0.4px",
171
- children: transI18n('fmt_pstn_label_dialinphone')
172
- }), hasPstnStream && !outgoingCall && !hasOwnPstnStream && hasNeedMergedStream && /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
173
- className: "connector-phone-alert",
174
- children: transI18n('fmt_pstn_label_alreadyin', {
175
- reason1: connectInfo === null || connectInfo === void 0 ? void 0 : connectInfo.phoneUserId
176
- })
177
- }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_callinfo["default"], {
178
- disabled: phoneCallState === _type.FcrRoomConnectorSessionState.END,
179
- onChange: regionChangeHandler,
180
- value: currentRegion,
181
- info: connectInfo
182
- })]
183
- });
184
- });
185
- var _default = exports["default"] = ConnectFromPhone;
@@ -1,4 +0,0 @@
1
- export declare enum ConnectorRegion {
2
- CHINA = 1,
3
- AMERICA = 2
4
- }
@@ -1,12 +0,0 @@
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.ConnectorRegion = void 0;
8
- var ConnectorRegion = exports.ConnectorRegion = /*#__PURE__*/function (ConnectorRegion) {
9
- ConnectorRegion[ConnectorRegion["CHINA"] = 1] = "CHINA";
10
- ConnectorRegion[ConnectorRegion["AMERICA"] = 2] = "AMERICA";
11
- return ConnectorRegion;
12
- }({});
@@ -1,6 +0,0 @@
1
- .connector-frame {
2
- display: flex;
3
- flex-direction: column;
4
- height: 100%;
5
- width: 100%;
6
- }
@@ -1,10 +0,0 @@
1
- import { UIModule } from '../../base';
2
- import ConnectionGatewayStore from './store';
3
- import './index.css';
4
- export declare class ConnectionGatewayUIModule extends UIModule {
5
- private _store;
6
- get store(): ConnectionGatewayStore;
7
- onNodeWillActive(): void;
8
- onNodeWillInactive(): void;
9
- getComponent(): import("react/jsx-runtime").JSX.Element;
10
- }
@@ -1,78 +0,0 @@
1
- "use strict";
2
-
3
- require("core-js/modules/es.array.iterator.js");
4
- require("core-js/modules/es.object.define-property.js");
5
- require("core-js/modules/es.object.get-own-property-descriptor.js");
6
- require("core-js/modules/es.object.to-string.js");
7
- require("core-js/modules/es.reflect.construct.js");
8
- require("core-js/modules/es.string.iterator.js");
9
- require("core-js/modules/es.weak-map.js");
10
- require("core-js/modules/esnext.weak-map.delete-all.js");
11
- require("core-js/modules/esnext.weak-map.emplace.js");
12
- require("core-js/modules/web.dom-collections.iterator.js");
13
- var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
14
- var _typeof = require("@babel/runtime/helpers/typeof");
15
- Object.defineProperty(exports, "__esModule", {
16
- value: true
17
- });
18
- exports.ConnectionGatewayUIModule = void 0;
19
- require("core-js/modules/es.error.cause.js");
20
- require("core-js/modules/es.error.to-string.js");
21
- require("core-js/modules/es.array.concat.js");
22
- var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime/helpers/classCallCheck"));
23
- var _createClass2 = _interopRequireDefault(require("@babel/runtime/helpers/createClass"));
24
- var _possibleConstructorReturn2 = _interopRequireDefault(require("@babel/runtime/helpers/possibleConstructorReturn"));
25
- var _getPrototypeOf2 = _interopRequireDefault(require("@babel/runtime/helpers/getPrototypeOf"));
26
- var _inherits2 = _interopRequireDefault(require("@babel/runtime/helpers/inherits"));
27
- var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
28
- var _base = require("../../base");
29
- var _store = _interopRequireWildcard(require("./store"));
30
- var _view = require("./view");
31
- require("./index.css");
32
- var _jsxRuntime = require("react/jsx-runtime");
33
- function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function _interopRequireWildcard(e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, "default": e }; if (null === e || "object" != _typeof(e) && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (var _t in e) "default" !== _t && {}.hasOwnProperty.call(e, _t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, _t)) && (i.get || i.set) ? o(f, _t, i) : f[_t] = e[_t]); return f; })(e, t); }
34
- function _callSuper(t, o, e) { return o = (0, _getPrototypeOf2["default"])(o), (0, _possibleConstructorReturn2["default"])(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], (0, _getPrototypeOf2["default"])(t).constructor) : o.apply(t, e)); }
35
- function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
36
- var ConnectionGatewayUIModule = exports.ConnectionGatewayUIModule = /*#__PURE__*/function (_UIModule) {
37
- function ConnectionGatewayUIModule() {
38
- var _this;
39
- (0, _classCallCheck2["default"])(this, ConnectionGatewayUIModule);
40
- for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
41
- args[_key] = arguments[_key];
42
- }
43
- _this = _callSuper(this, ConnectionGatewayUIModule, [].concat(args));
44
- (0, _defineProperty2["default"])(_this, "_store", null);
45
- return _this;
46
- }
47
- (0, _inherits2["default"])(ConnectionGatewayUIModule, _UIModule);
48
- return (0, _createClass2["default"])(ConnectionGatewayUIModule, [{
49
- key: "store",
50
- get: function get() {
51
- if (!this._store) {
52
- throw new Error('ConnectionGatewayStore is not initialized');
53
- }
54
- return this._store;
55
- }
56
- }, {
57
- key: "onNodeWillActive",
58
- value: function onNodeWillActive() {
59
- var args = {
60
- objectManager: this.objectManager
61
- };
62
- this._store = new _store["default"](args);
63
- }
64
- }, {
65
- key: "onNodeWillInactive",
66
- value: function onNodeWillInactive() {
67
- this.store.release();
68
- }
69
- }, {
70
- key: "getComponent",
71
- value: function getComponent() {
72
- return /*#__PURE__*/(0, _jsxRuntime.jsx)(_store.StoreContext.Provider, {
73
- value: this.store,
74
- children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_view.View, {})
75
- });
76
- }
77
- }]);
78
- }(_base.UIModule);