agora-ui-foundation 3.3.1 → 3.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/components/action-bar/device/index.d.ts +3 -1
- package/lib/components/action-bar/device/index.js +8 -2
- package/lib/components/action-bar/device/mobile.d.ts +12 -0
- package/lib/components/action-bar/device/mobile.js +103 -0
- package/lib/components/avatar/index.d.ts +1 -0
- package/lib/components/avatar/index.js +23 -6
- package/lib/components/button/index.css +2 -1
- package/lib/components/camera-state-mobile/index.d.ts +7 -0
- package/lib/components/camera-state-mobile/index.js +29 -0
- package/lib/components/chat-manager/index.js +18 -14
- package/lib/components/chat-wrapper/index.d.ts +4 -0
- package/lib/components/chat-wrapper/index.js +4 -2
- package/lib/components/chat-wrapper-mobile/index.css +96 -0
- package/lib/components/chat-wrapper-mobile/index.d.ts +34 -0
- package/lib/components/chat-wrapper-mobile/index.js +232 -0
- package/lib/components/chat-wrapper-mobile/index.stories.d.ts +5 -0
- package/lib/components/chat-wrapper-mobile/index.stories.js +56 -0
- package/lib/components/checkbox/index.d.ts +1 -0
- package/lib/components/checkbox/index.js +15 -6
- package/lib/components/close-icon/index.css +9 -0
- package/lib/components/close-icon/index.d.ts +2 -0
- package/lib/components/close-icon/index.js +25 -0
- package/lib/components/confirm-content/index.css +23 -15
- package/lib/components/confirm-content/index.d.ts +9 -3
- package/lib/components/confirm-content/index.js +14 -8
- package/lib/components/dialog/confirm.d.ts +3 -1
- package/lib/components/dialog/confirm.js +11 -0
- package/lib/components/drop-menu/index.css +4 -2
- package/lib/components/drop-menu/index.d.ts +1 -1
- package/lib/components/drop-menu/index.js +7 -1
- package/lib/components/icon/mic.d.ts +2 -1
- package/lib/components/icon/mic.js +6 -2
- package/lib/components/icon/paths/chat_private.d.ts +3 -0
- package/lib/components/icon/paths/chat_private.js +20 -0
- package/lib/components/icon/paths/chevron_right.d.ts +3 -0
- package/lib/components/icon/paths/chevron_right.js +22 -0
- package/lib/components/icon/paths/fcr_chat_on.js +1 -1
- package/lib/components/icon/paths/fcr_close2.js +2 -4
- package/lib/components/icon/paths/fcr_cohost1.d.ts +3 -0
- package/lib/components/icon/paths/fcr_cohost1.js +22 -0
- package/lib/components/icon/paths/fcr_copy2.d.ts +3 -0
- package/lib/components/icon/paths/fcr_copy2.js +22 -0
- package/lib/components/icon/paths/fcr_copy_icon.d.ts +3 -0
- package/lib/components/icon/paths/fcr_copy_icon.js +22 -0
- package/lib/components/icon/paths/fcr_defaultpage.d.ts +3 -0
- package/lib/components/icon/paths/fcr_defaultpage.js +656 -0
- package/lib/components/icon/paths/fcr_endmeeting.js +1 -1
- package/lib/components/icon/paths/fcr_gototop.d.ts +3 -0
- package/lib/components/icon/paths/fcr_gototop.js +22 -0
- package/lib/components/icon/paths/fcr_host.d.ts +1 -1
- package/lib/components/icon/paths/fcr_host.js +5 -3
- package/lib/components/icon/paths/fcr_host2.js +1 -2
- package/lib/components/icon/paths/fcr_interpretation2.js +2 -2
- package/lib/components/icon/paths/fcr_live2.d.ts +3 -0
- package/lib/components/icon/paths/fcr_live2.js +23 -0
- package/lib/components/icon/paths/fcr_mobile_arrow_left.d.ts +3 -0
- package/lib/components/icon/paths/fcr_mobile_arrow_left.js +20 -0
- package/lib/components/icon/paths/fcr_mobile_camera2.js +1 -1
- package/lib/components/icon/paths/fcr_mobile_cameraoff2.d.ts +3 -0
- package/lib/components/icon/paths/fcr_mobile_cameraoff2.js +22 -0
- package/lib/components/icon/paths/fcr_mobile_sharescreen.js +1 -1
- package/lib/components/icon/paths/fcr_rename.d.ts +1 -1
- package/lib/components/icon/paths/fcr_rename.js +2 -2
- package/lib/components/icon/paths/fcr_rename2.d.ts +3 -0
- package/lib/components/icon/paths/fcr_rename2.js +22 -0
- package/lib/components/icon/paths/fcr_screensharing_1.js +1 -1
- package/lib/components/icon/paths/fcr_setting2.d.ts +3 -0
- package/lib/components/icon/paths/fcr_setting2.js +22 -0
- package/lib/components/icon/paths/fcr_simultaneousinterpretation_off.js +1 -1
- package/lib/components/icon/paths/fcr_simultaneousinterpretation_on.js +1 -1
- package/lib/components/icon/paths/fcr_translanguage.d.ts +1 -1
- package/lib/components/icon/paths/fcr_translanguage.js +8 -15
- package/lib/components/icon/paths/fcr_videorotation2.d.ts +3 -0
- package/lib/components/icon/paths/fcr_videorotation2.js +20 -0
- package/lib/components/icon/svg-dict.d.ts +1 -1
- package/lib/components/icon/svg-exports.d.ts +23 -2
- package/lib/components/icon/svg-exports.js +52 -9
- package/lib/components/icon/type.d.ts +24 -3
- package/lib/components/icon/type.js +23 -2
- package/lib/components/icon-button/index.css +1 -1
- package/lib/components/icon-phone-call/index.d.ts +1 -0
- package/lib/components/icon-phone-call/index.js +4 -2
- package/lib/components/input/index.js +3 -0
- package/lib/components/input-number/index.js +3 -2
- package/lib/components/live-streaming/container.css +2 -1
- package/lib/components/live-streaming/container.js +2 -2
- package/lib/components/message-bubble/index.d.ts +1 -0
- package/lib/components/message-bubble/index.js +4 -2
- package/lib/components/message-label-mobile/index.css +95 -0
- package/lib/components/message-label-mobile/index.d.ts +14 -0
- package/lib/components/message-label-mobile/index.js +77 -0
- package/lib/components/message-label-mobile/index.stories.d.ts +5 -0
- package/lib/components/message-label-mobile/index.stories.js +231 -0
- package/lib/components/message-textarea/index.d.ts +4 -0
- package/lib/components/message-textarea/index.js +9 -8
- package/lib/components/message-textarea-mobile/index.css +155 -0
- package/lib/components/message-textarea-mobile/index.d.ts +25 -0
- package/lib/components/message-textarea-mobile/index.js +225 -0
- package/lib/components/message-textarea-mobile/index.stories.d.ts +5 -0
- package/lib/components/message-textarea-mobile/index.stories.js +72 -0
- package/lib/components/microphone-state-mobile/index.d.ts +8 -0
- package/lib/components/microphone-state-mobile/index.js +50 -0
- package/lib/components/participants/attendee/index.css +33 -0
- package/lib/components/participants/attendee/index.d.ts +2 -1
- package/lib/components/participants/attendee/index.js +1 -0
- package/lib/components/participants/index.css +11 -0
- package/lib/components/participants/index.d.ts +2 -0
- package/lib/components/participants/index.js +10 -5
- package/lib/components/participants/participants-more/index.css +40 -8
- package/lib/components/participants/participants-more/index.js +63 -18
- package/lib/components/popover/index.js +5 -2
- package/lib/components/popup/hooks/index.d.ts +3 -0
- package/lib/components/popup/hooks/index.js +21 -0
- package/lib/components/popup/hooks/useIsomorphicLayoutEffect/index.d.ts +3 -0
- package/lib/components/popup/hooks/useIsomorphicLayoutEffect/index.js +12 -0
- package/lib/components/popup/hooks/useUnmountedRef/index.d.ts +2 -0
- package/lib/components/popup/hooks/useUnmountedRef/index.js +19 -0
- package/lib/components/popup/index.d.ts +3 -0
- package/lib/components/popup/index.js +10 -0
- package/lib/components/popup/popup-base-props.d.ts +35 -0
- package/lib/components/popup/popup-base-props.js +20 -0
- package/lib/components/popup/popup.css +78 -0
- package/lib/components/popup/popup.d.ts +8 -0
- package/lib/components/popup/popup.js +167 -0
- package/lib/components/popup/utils/can-use-dom.d.ts +1 -0
- package/lib/components/popup/utils/can-use-dom.js +8 -0
- package/lib/components/popup/utils/get-container.d.ts +2 -0
- package/lib/components/popup/utils/get-container.js +11 -0
- package/lib/components/popup/utils/get-scroll-parent.d.ts +3 -0
- package/lib/components/popup/utils/get-scroll-parent.js +31 -0
- package/lib/components/popup/utils/isBrowser.d.ts +2 -0
- package/lib/components/popup/utils/isBrowser.js +9 -0
- package/lib/components/popup/utils/native-props.d.ts +8 -0
- package/lib/components/popup/utils/native-props.js +48 -0
- package/lib/components/popup/utils/render-to-container.d.ts +3 -0
- package/lib/components/popup/utils/render-to-container.js +17 -0
- package/lib/components/popup/utils/should-render.d.ts +10 -0
- package/lib/components/popup/utils/should-render.js +20 -0
- package/lib/components/popup/utils/supports-passive.d.ts +1 -0
- package/lib/components/popup/utils/supports-passive.js +20 -0
- package/lib/components/popup/utils/use-initialized.d.ts +1 -0
- package/lib/components/popup/utils/use-initialized.js +15 -0
- package/lib/components/popup/utils/use-inner-visible.d.ts +1 -0
- package/lib/components/popup/utils/use-inner-visible.js +21 -0
- package/lib/components/popup/utils/use-lock-scroll.d.ts +2 -0
- package/lib/components/popup/utils/use-lock-scroll.js +89 -0
- package/lib/components/popup/utils/use-touch.d.ts +16 -0
- package/lib/components/popup/utils/use-touch.js +70 -0
- package/lib/components/popup/utils/with-default-props.d.ts +9 -0
- package/lib/components/popup/utils/with-default-props.js +48 -0
- package/lib/components/popup/utils/with-stop-propagation.d.ts +4 -0
- package/lib/components/popup/utils/with-stop-propagation.js +73 -0
- package/lib/components/room-screen-share-state-bar/camera-state/index.d.ts +2 -0
- package/lib/components/room-screen-share-state-bar/camera-state/index.js +15 -3
- package/lib/components/select/index.css +44 -0
- package/lib/components/select/index.d.ts +39 -4
- package/lib/components/select/index.js +111 -17
- package/lib/components/switch/index.css +0 -1
- package/lib/components/switch/mobile.css +64 -0
- package/lib/components/switch/mobile.d.ts +30 -0
- package/lib/components/switch/mobile.js +41 -0
- package/lib/components/toast/index.js +1 -0
- package/lib/components/watermark/mobile.css +4 -0
- package/lib/components/watermark/mobile.d.ts +47 -0
- package/lib/components/watermark/mobile.js +174 -0
- package/lib/components/window-header/index.css +1 -1
- package/lib/components/zone-phone/index.js +3 -2
- package/lib/hooks/use-click-anywhere.d.ts +1 -1
- package/lib/hooks/use-click-anywhere.js +7 -7
- package/lib/theme/fcr-ui-config.d.ts +4 -0
- package/lib/theme/fcr-ui-config.js +10 -6
- package/lib/utilities/click-anywhere.d.ts +1 -1
- package/lib/utilities/click-anywhere.js +5 -4
- package/package.json +6 -4
- package/lib/components/device-settings/common/my-i18n.d.ts +0 -52
- package/lib/components/device-settings/common/my-i18n.js +0 -62
- package/lib/components/icon/paths/fcr_mirrorimage_off.svg +0 -4
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
import { FC } from 'react';
|
|
2
2
|
import './index.css';
|
|
3
|
-
export declare const AudioRecordinDeviceIcon: ({ size, micEnabled, volume, }: {
|
|
3
|
+
export declare const AudioRecordinDeviceIcon: ({ size, micEnabled, volume, pathColor, stopStartColor, }: {
|
|
4
4
|
size?: number;
|
|
5
5
|
micEnabled?: boolean;
|
|
6
6
|
volume?: number;
|
|
7
|
+
pathColor?: string;
|
|
8
|
+
stopStartColor?: string;
|
|
7
9
|
}) => import("react/jsx-runtime").JSX.Element;
|
|
8
10
|
export declare const MicrophoneDevice: FC;
|
|
9
11
|
export declare const CameraDevice: FC;
|
|
@@ -25,7 +25,11 @@ var AudioRecordinDeviceIcon = exports.AudioRecordinDeviceIcon = function AudioRe
|
|
|
25
25
|
_ref$micEnabled = _ref.micEnabled,
|
|
26
26
|
micEnabled = _ref$micEnabled === void 0 ? false : _ref$micEnabled,
|
|
27
27
|
_ref$volume = _ref.volume,
|
|
28
|
-
volume = _ref$volume === void 0 ? 0 : _ref$volume
|
|
28
|
+
volume = _ref$volume === void 0 ? 0 : _ref$volume,
|
|
29
|
+
_ref$pathColor = _ref.pathColor,
|
|
30
|
+
pathColor = _ref$pathColor === void 0 ? 'white' : _ref$pathColor,
|
|
31
|
+
_ref$stopStartColor = _ref.stopStartColor,
|
|
32
|
+
stopStartColor = _ref$stopStartColor === void 0 ? 'white' : _ref$stopStartColor;
|
|
29
33
|
var muteColor = {
|
|
30
34
|
iconPrimary: "var(--fcr_ui_scene_ramp_red6)",
|
|
31
35
|
iconSecondary: 'var(--fcr_ui_scene_ramp_red6)'
|
|
@@ -38,7 +42,9 @@ var AudioRecordinDeviceIcon = exports.AudioRecordinDeviceIcon = function AudioRe
|
|
|
38
42
|
}) : /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
39
43
|
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_microphoneIndicator.MicrophoneIndicator, {
|
|
40
44
|
size: size,
|
|
41
|
-
voicePercent: volume
|
|
45
|
+
voicePercent: volume,
|
|
46
|
+
pathColor: pathColor,
|
|
47
|
+
stopStartColor: stopStartColor
|
|
42
48
|
})
|
|
43
49
|
});
|
|
44
50
|
};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import './index.css';
|
|
2
|
+
export declare const AudioRecordinDeviceIcon: ({ size, micEnabled, volume, }: {
|
|
3
|
+
size?: number;
|
|
4
|
+
micEnabled?: boolean;
|
|
5
|
+
volume?: number;
|
|
6
|
+
}) => import("react/jsx-runtime").JSX.Element;
|
|
7
|
+
export declare const MicrophoneDevice: ({ isMuted }: {
|
|
8
|
+
isMuted: boolean;
|
|
9
|
+
}) => import("react/jsx-runtime").JSX.Element;
|
|
10
|
+
export declare const CameraDevice: ({ isMuted }: {
|
|
11
|
+
isMuted: boolean;
|
|
12
|
+
}) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,103 @@
|
|
|
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.MicrophoneDevice = exports.CameraDevice = exports.AudioRecordinDeviceIcon = void 0;
|
|
9
|
+
require("core-js/modules/web.timers.js");
|
|
10
|
+
var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));
|
|
11
|
+
var _react = require("react");
|
|
12
|
+
require("./index.css");
|
|
13
|
+
var _icon = require("../../icon");
|
|
14
|
+
var _type = require("../../icon/type");
|
|
15
|
+
var _microphoneIndicator = require("../../microphone-indicator");
|
|
16
|
+
var _i18n = require("../../../i18n");
|
|
17
|
+
var _jsxRuntime = require("react/jsx-runtime");
|
|
18
|
+
var AudioRecordinDeviceIcon = exports.AudioRecordinDeviceIcon = function AudioRecordinDeviceIcon(_ref) {
|
|
19
|
+
var _ref$size = _ref.size,
|
|
20
|
+
size = _ref$size === void 0 ? 32 : _ref$size,
|
|
21
|
+
_ref$micEnabled = _ref.micEnabled,
|
|
22
|
+
micEnabled = _ref$micEnabled === void 0 ? false : _ref$micEnabled,
|
|
23
|
+
_ref$volume = _ref.volume,
|
|
24
|
+
volume = _ref$volume === void 0 ? 0 : _ref$volume;
|
|
25
|
+
var muteColor = {
|
|
26
|
+
iconPrimary: "var(--fcr_ui_scene_ramp_red6)",
|
|
27
|
+
iconSecondary: 'var(--fcr_ui_scene_ramp_red6)'
|
|
28
|
+
};
|
|
29
|
+
return !micEnabled ? /*#__PURE__*/(0, _jsxRuntime.jsx)(_icon.FcrIcon, {
|
|
30
|
+
type: _type.FcrIconType.FCR_NOMUTE,
|
|
31
|
+
colors: muteColor,
|
|
32
|
+
size: size
|
|
33
|
+
}) : /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
34
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_microphoneIndicator.MicrophoneIndicator, {
|
|
35
|
+
size: size,
|
|
36
|
+
voicePercent: volume
|
|
37
|
+
})
|
|
38
|
+
});
|
|
39
|
+
};
|
|
40
|
+
var MicrophoneDevice = exports.MicrophoneDevice = function MicrophoneDevice(_ref2) {
|
|
41
|
+
var isMuted = _ref2.isMuted;
|
|
42
|
+
var t = (0, _i18n.useI18n)();
|
|
43
|
+
var _useState = (0, _react.useState)(0),
|
|
44
|
+
_useState2 = (0, _slicedToArray2["default"])(_useState, 2),
|
|
45
|
+
volume = _useState2[0],
|
|
46
|
+
setVolume = _useState2[1];
|
|
47
|
+
(0, _react.useEffect)(function () {
|
|
48
|
+
var timer = setInterval(function () {
|
|
49
|
+
setVolume(11 + Math.floor(Math.random() * 90));
|
|
50
|
+
}, 1000);
|
|
51
|
+
return function () {
|
|
52
|
+
return clearInterval(timer);
|
|
53
|
+
};
|
|
54
|
+
}, []);
|
|
55
|
+
var title = (0, _react.useMemo)(function () {
|
|
56
|
+
return !isMuted ? t('fmt_device_label_audio_mute') : t('fmt_device_label_audio_unmute');
|
|
57
|
+
}, [isMuted]);
|
|
58
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
59
|
+
className: "fcr-action-bar-item-wrapper",
|
|
60
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
61
|
+
className: "fcr-action-bar-device",
|
|
62
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
|
|
63
|
+
className: "fcr-action-bar-device-inner",
|
|
64
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(AudioRecordinDeviceIcon, {
|
|
65
|
+
micEnabled: !isMuted,
|
|
66
|
+
volume: volume
|
|
67
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
68
|
+
className: "fcr-action-bar-device-text",
|
|
69
|
+
children: title
|
|
70
|
+
})]
|
|
71
|
+
})
|
|
72
|
+
})
|
|
73
|
+
});
|
|
74
|
+
};
|
|
75
|
+
var CameraDevice = exports.CameraDevice = function CameraDevice(_ref3) {
|
|
76
|
+
var isMuted = _ref3.isMuted;
|
|
77
|
+
var t = (0, _i18n.useI18n)();
|
|
78
|
+
var muteColor = {
|
|
79
|
+
iconPrimary: !isMuted ? "var(--fcr_web_ui_scene_mainicon1)" : 'var(--fcr_ui_scene_ramp_red6)',
|
|
80
|
+
iconSecondary: 'var(--fcr_ui_scene_ramp_red6)'
|
|
81
|
+
};
|
|
82
|
+
var icon = !isMuted ? _type.FcrIconType.FCR_CAMERA : _type.FcrIconType.FCR_CAMERAOFF;
|
|
83
|
+
var title = (0, _react.useMemo)(function () {
|
|
84
|
+
return !isMuted ? t('fmt_toolbar_label_camera') : t('fmt_toolbar_options_enablecamera');
|
|
85
|
+
}, [isMuted]);
|
|
86
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
87
|
+
className: "fcr-action-bar-item-wrapper",
|
|
88
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
89
|
+
className: "fcr-action-bar-device",
|
|
90
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
|
|
91
|
+
className: "fcr-action-bar-device-inner",
|
|
92
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_icon.FcrIcon, {
|
|
93
|
+
type: icon,
|
|
94
|
+
colors: muteColor,
|
|
95
|
+
size: 32
|
|
96
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
97
|
+
className: "fcr-action-bar-device-text",
|
|
98
|
+
children: title
|
|
99
|
+
})]
|
|
100
|
+
})
|
|
101
|
+
})
|
|
102
|
+
});
|
|
103
|
+
};
|
|
@@ -1,17 +1,29 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
+
require("core-js/modules/es.array.iterator.js");
|
|
3
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.string.iterator.js");
|
|
8
|
+
require("core-js/modules/es.weak-map.js");
|
|
9
|
+
require("core-js/modules/esnext.weak-map.delete-all.js");
|
|
10
|
+
require("core-js/modules/esnext.weak-map.emplace.js");
|
|
11
|
+
require("core-js/modules/web.dom-collections.iterator.js");
|
|
4
12
|
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
13
|
+
var _typeof = require("@babel/runtime/helpers/typeof");
|
|
5
14
|
Object.defineProperty(exports, "__esModule", {
|
|
6
15
|
value: true
|
|
7
16
|
});
|
|
8
17
|
exports.FcrAvatar = void 0;
|
|
9
|
-
require("core-js/modules/es.array.concat.js");
|
|
10
18
|
var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));
|
|
11
|
-
|
|
19
|
+
require("core-js/modules/es.array.concat.js");
|
|
20
|
+
require("core-js/modules/es.string.trim.js");
|
|
21
|
+
var _react = _interopRequireWildcard(require("react"));
|
|
12
22
|
require("./index.css");
|
|
13
23
|
var _helper = require("./helper");
|
|
14
24
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
25
|
+
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }
|
|
26
|
+
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof(e) && "function" != typeof e) return { "default": e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n["default"] = e, t && t.set(e, n), n; }
|
|
15
27
|
var FcrAvatar = exports.FcrAvatar = function FcrAvatar(_ref) {
|
|
16
28
|
var size = _ref.size,
|
|
17
29
|
textSize = _ref.textSize,
|
|
@@ -19,9 +31,13 @@ var FcrAvatar = exports.FcrAvatar = function FcrAvatar(_ref) {
|
|
|
19
31
|
icon = _ref.icon,
|
|
20
32
|
backgroundColor = _ref.backgroundColor,
|
|
21
33
|
onClick = _ref.onClick,
|
|
22
|
-
isShowFirstLetter = _ref.isShowFirstLetter
|
|
23
|
-
|
|
24
|
-
var
|
|
34
|
+
isShowFirstLetter = _ref.isShowFirstLetter,
|
|
35
|
+
borderRadius = _ref.borderRadius;
|
|
36
|
+
var name = (0, _react.useMemo)(function () {
|
|
37
|
+
return nickName ? nickName.trim() : nickName;
|
|
38
|
+
}, [nickName]);
|
|
39
|
+
var color = backgroundColor || (0, _helper.getNameColor)(name);
|
|
40
|
+
var _splitName = (0, _helper.splitName)(name),
|
|
25
41
|
_splitName2 = (0, _slicedToArray2["default"])(_splitName, 2),
|
|
26
42
|
first = _splitName2[0],
|
|
27
43
|
last = _splitName2[1];
|
|
@@ -32,7 +48,8 @@ var FcrAvatar = exports.FcrAvatar = function FcrAvatar(_ref) {
|
|
|
32
48
|
width: size,
|
|
33
49
|
height: size,
|
|
34
50
|
background: color,
|
|
35
|
-
fontSize: textSize
|
|
51
|
+
fontSize: textSize,
|
|
52
|
+
borderRadius: borderRadius || ''
|
|
36
53
|
},
|
|
37
54
|
children: !!icon ? icon : /*#__PURE__*/(0, _jsxRuntime.jsx)("span", {
|
|
38
55
|
children: isShowFirstLetter ? first : "".concat(first).concat(last)
|
|
@@ -11,6 +11,7 @@
|
|
|
11
11
|
width: fit-content;
|
|
12
12
|
flex-shrink: 0;
|
|
13
13
|
}
|
|
14
|
+
|
|
14
15
|
.fcr-button-block {
|
|
15
16
|
width: 100%;
|
|
16
17
|
}
|
|
@@ -504,7 +505,7 @@
|
|
|
504
505
|
|
|
505
506
|
/** rounded **/
|
|
506
507
|
.fcr-button-rounded {
|
|
507
|
-
border-radius: var(--
|
|
508
|
+
border-radius: var(--fcr_cornerradius_m);
|
|
508
509
|
}
|
|
509
510
|
.fcr-button-circle {
|
|
510
511
|
border-radius: var(--fcr_cornerradius_round);
|
|
@@ -0,0 +1,29 @@
|
|
|
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.CameraStateMobile = void 0;
|
|
8
|
+
var _icon = require("../icon");
|
|
9
|
+
var _type = require("../icon/type");
|
|
10
|
+
var _jsxRuntime = require("react/jsx-runtime");
|
|
11
|
+
var CameraStateMobile = exports.CameraStateMobile = function CameraStateMobile(props) {
|
|
12
|
+
var isCameraMuted = props.isCameraMuted,
|
|
13
|
+
_props$size = props.size,
|
|
14
|
+
size = _props$size === void 0 ? 20 : _props$size,
|
|
15
|
+
ignoreColor = props.ignoreColor;
|
|
16
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_jsxRuntime.Fragment, {
|
|
17
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_icon.FcrIcon, {
|
|
18
|
+
type: isCameraMuted ? _type.FcrIconType.FCR_CAMERAOFF : _type.FcrIconType.FCR_CAMERA,
|
|
19
|
+
colors: ignoreColor ? {
|
|
20
|
+
iconPrimary: 'var(--fcr_web_ui_scene_mainicon1)',
|
|
21
|
+
iconSecondary: 'var(--fcr_web_ui_scene_mainicon1)'
|
|
22
|
+
} : {
|
|
23
|
+
iconPrimary: isCameraMuted ? 'var(--fcr_ui_scene_white10)' : 'var(--fcr_web_ui_scene_mainicon1)',
|
|
24
|
+
iconSecondary: isCameraMuted ? 'var(--fcr_ui_scene_white10)' : 'var(--fcr_web_ui_scene_mainicon1)'
|
|
25
|
+
},
|
|
26
|
+
size: size
|
|
27
|
+
})
|
|
28
|
+
});
|
|
29
|
+
};
|
|
@@ -133,30 +133,34 @@ var ChatManager = exports.ChatManager = function ChatManager(_ref2) {
|
|
|
133
133
|
var closePopover = function closePopover() {
|
|
134
134
|
setManagerVisible(false);
|
|
135
135
|
};
|
|
136
|
+
var popoverContent = (0, _react.useMemo)(function () {
|
|
137
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
138
|
+
onClick: closePopover,
|
|
139
|
+
className: "fcr_chat_drop_menu",
|
|
140
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_dropMenu.FcrDropMenu, {
|
|
141
|
+
title: t('fmt_chat_setting_value'),
|
|
142
|
+
options: actions.map(function (data) {
|
|
143
|
+
return _objectSpread(_objectSpread({}, data), {}, {
|
|
144
|
+
classNames: allowChatLevel === data.key ? 'fcr-drop-menu-option-primary-selected' : ''
|
|
145
|
+
});
|
|
146
|
+
})
|
|
147
|
+
})
|
|
148
|
+
});
|
|
149
|
+
}, [allowChatLevel, actions]);
|
|
136
150
|
if (!isManager) return null;
|
|
137
151
|
return /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
138
152
|
id: "fcr_chat_manager",
|
|
139
153
|
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_popover.FcrPopover, {
|
|
140
154
|
visible: managerVisible,
|
|
141
155
|
trigger: "click",
|
|
142
|
-
placement: "bottom"
|
|
143
|
-
overlayClassName
|
|
156
|
+
placement: "bottom"
|
|
157
|
+
// overlayClassName={'fcr_chat_manager_popover_overlay'}
|
|
158
|
+
,
|
|
144
159
|
overlayInnerStyle: {
|
|
145
160
|
boxShadow: 'none',
|
|
146
161
|
border: 'none'
|
|
147
162
|
},
|
|
148
|
-
content:
|
|
149
|
-
onClick: closePopover,
|
|
150
|
-
className: "fcr_chat_drop_menu",
|
|
151
|
-
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_dropMenu.FcrDropMenu, {
|
|
152
|
-
title: t('fmt_chat_setting_value'),
|
|
153
|
-
options: actions.map(function (data) {
|
|
154
|
-
return _objectSpread(_objectSpread({}, data), {}, {
|
|
155
|
-
classNames: allowChatLevel === data.key ? 'fcr-drop-menu-option-primary-selected' : ''
|
|
156
|
-
});
|
|
157
|
-
})
|
|
158
|
-
})
|
|
159
|
-
}),
|
|
163
|
+
content: popoverContent,
|
|
160
164
|
onVisibleChange: function onVisibleChange(visible) {
|
|
161
165
|
setManagerVisible(visible);
|
|
162
166
|
},
|
|
@@ -21,6 +21,10 @@ export interface ChatWrapperProps {
|
|
|
21
21
|
defaultMsg?: string;
|
|
22
22
|
updateChatTextMsg?: (msg: string) => void;
|
|
23
23
|
privateTarget: string;
|
|
24
|
+
autoSizeParams?: {
|
|
25
|
+
minHeight?: number;
|
|
26
|
+
maxHeight?: number;
|
|
27
|
+
};
|
|
24
28
|
}
|
|
25
29
|
export declare const CHAT_WRAPPER_CLASS = "fcr-chat-wrapper";
|
|
26
30
|
export declare const ChatWrapper: React.FC<React.PropsWithChildren<ChatWrapperProps>>;
|
|
@@ -57,7 +57,8 @@ var ChatWrapper = exports.ChatWrapper = function ChatWrapper(_ref) {
|
|
|
57
57
|
_ref$defaultMsg = _ref.defaultMsg,
|
|
58
58
|
defaultMsg = _ref$defaultMsg === void 0 ? '' : _ref$defaultMsg,
|
|
59
59
|
updateChatTextMsg = _ref.updateChatTextMsg,
|
|
60
|
-
privateTarget = _ref.privateTarget
|
|
60
|
+
privateTarget = _ref.privateTarget,
|
|
61
|
+
autoSizeParams = _ref.autoSizeParams;
|
|
61
62
|
var cls = (0, _classnames["default"])(CHAT_WRAPPER_CLASS, (0, _defineProperty2["default"])({}, "".concat(CHAT_WRAPPER_CLASS, "-radius"), singling));
|
|
62
63
|
var _useState = (0, _react.useState)(false),
|
|
63
64
|
_useState2 = (0, _slicedToArray2["default"])(_useState, 2),
|
|
@@ -222,7 +223,8 @@ var ChatWrapper = exports.ChatWrapper = function ChatWrapper(_ref) {
|
|
|
222
223
|
},
|
|
223
224
|
handleClickUploadImage: handleClickUploadImage,
|
|
224
225
|
defaultMsg: defaultMsg,
|
|
225
|
-
updateChatTextMsg: updateChatTextMsg
|
|
226
|
+
updateChatTextMsg: updateChatTextMsg,
|
|
227
|
+
autoSizeParams: autoSizeParams
|
|
226
228
|
})]
|
|
227
229
|
})
|
|
228
230
|
})]
|
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
/* chat wrapper */
|
|
2
|
+
.fcr-chat-wrapper-mobile {
|
|
3
|
+
height: 100%;
|
|
4
|
+
width: 100%;
|
|
5
|
+
background: var(--fcr_mobile_ui_scene_color_popup_fill2);
|
|
6
|
+
|
|
7
|
+
display: flex;
|
|
8
|
+
justify-content: space-between;
|
|
9
|
+
flex: 1;
|
|
10
|
+
flex-direction: column;
|
|
11
|
+
grid-template-rows: auto 0fr;
|
|
12
|
+
position: relative;
|
|
13
|
+
|
|
14
|
+
min-width: 320px;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
.fcr-chat-wrapper-mobile .fcr-chat-wrapper-radius {
|
|
18
|
+
border-radius: var(--fcr_cornerradius_m);
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
/* chat container */
|
|
22
|
+
.fcr-chat-wrapper-mobile .fcr-chat-container-wrapper {
|
|
23
|
+
position: relative;
|
|
24
|
+
overflow: hidden;
|
|
25
|
+
|
|
26
|
+
display: flex;
|
|
27
|
+
flex: 1;
|
|
28
|
+
flex-direction: column;
|
|
29
|
+
height: 100%;
|
|
30
|
+
width: 100%;
|
|
31
|
+
flex: 1;
|
|
32
|
+
|
|
33
|
+
min-height: 113px;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
.fcr-chat-wrapper-mobile .fcr-chat-top-bar {
|
|
37
|
+
position: sticky;
|
|
38
|
+
top: 0;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
.fcr-chat-wrapper-mobile .fcr-chat-container {
|
|
42
|
+
scrollbar-width: none;
|
|
43
|
+
|
|
44
|
+
display: flex;
|
|
45
|
+
flex: 1;
|
|
46
|
+
flex-direction: column;
|
|
47
|
+
align-items: center;
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
/* chat input */
|
|
51
|
+
.fcr-chat-msg-box {
|
|
52
|
+
display: flex;
|
|
53
|
+
flex-direction: column;
|
|
54
|
+
align-self: flex-end;
|
|
55
|
+
width: 100%;
|
|
56
|
+
padding: 0 4px 5px;
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
.fcr-chat-wrapper-mobile .fcr-chat-container .ReactVirtualized__Grid__innerScrollContainer {
|
|
60
|
+
min-height: 100%;
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
.fcr-chat-wrapper-mobile .fcr-user-offline-nickname {
|
|
64
|
+
font-weight: 600;
|
|
65
|
+
max-width: 75px;
|
|
66
|
+
white-space: nowrap;
|
|
67
|
+
display: inline-block;
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
.fcr-chat-wrapper-mobile .fcr-user-offline-txt {
|
|
71
|
+
font-weight: 400;
|
|
72
|
+
|
|
73
|
+
word-break: break-word;
|
|
74
|
+
margin-left: 4px;
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
.fcr-chat-wrapper-mobile .fcr-blink-content--user-state {
|
|
78
|
+
display: flex;
|
|
79
|
+
flex-direction: row;
|
|
80
|
+
justify-content: center;
|
|
81
|
+
align-items: center;
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
.fcr-chat-wrapper-mobile .fcr-blink-content--user-state p {
|
|
85
|
+
margin: unset;
|
|
86
|
+
font-family: Inter;
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
.fcr-chat-wrapper-mobile .fcr-chat-msg-box .fcr-text-bubble {
|
|
90
|
+
width: 100%;
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
.fcr-chat-wrapper-mobile .fcr-message-bar .fcr-text-bubble {
|
|
94
|
+
justify-content: flex-start;
|
|
95
|
+
width: auto;
|
|
96
|
+
}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import React, { CSSProperties } from 'react';
|
|
2
|
+
import './index.css';
|
|
3
|
+
export interface ChatWrapperProps {
|
|
4
|
+
msgBarElement?: any;
|
|
5
|
+
errorMsg?: string;
|
|
6
|
+
forbiddenTxt?: string;
|
|
7
|
+
styles?: CSSProperties;
|
|
8
|
+
singling?: boolean;
|
|
9
|
+
forbidden?: boolean;
|
|
10
|
+
isHost?: boolean;
|
|
11
|
+
handMsg?: (msg: string) => void;
|
|
12
|
+
onClose?: () => void;
|
|
13
|
+
onTypeChange?: () => void;
|
|
14
|
+
onSelectCancel?: () => void;
|
|
15
|
+
onSelectConfirm?: () => void;
|
|
16
|
+
multiSelectActive?: boolean;
|
|
17
|
+
selectCnt?: number;
|
|
18
|
+
targetUserIsOnline?: boolean;
|
|
19
|
+
selectTargetNickname?: string;
|
|
20
|
+
handleClickUploadImage?: () => void;
|
|
21
|
+
defaultMsg?: string;
|
|
22
|
+
updateChatTextMsg?: (textMsgInfo: {
|
|
23
|
+
textMsg: string;
|
|
24
|
+
height: number;
|
|
25
|
+
}) => void;
|
|
26
|
+
privateTarget: string;
|
|
27
|
+
autoSizeParams?: {
|
|
28
|
+
minHeight?: number;
|
|
29
|
+
maxHeight?: number;
|
|
30
|
+
initHeight?: number;
|
|
31
|
+
};
|
|
32
|
+
}
|
|
33
|
+
export declare const CHAT_WRAPPER_CLASS = "fcr-chat-wrapper-mobile";
|
|
34
|
+
export declare const ChatWrapper: React.FC<React.PropsWithChildren<ChatWrapperProps>>;
|