fcr-ui-scene-mobile 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/assets/ground_glass_bg.png +0 -0
- package/lib/base.d.ts +11 -0
- package/lib/base.js +39 -0
- package/lib/common/device-store.d.ts +86 -0
- package/lib/common/device-store.js +642 -0
- package/lib/common/device-stream-store.d.ts +26 -0
- package/lib/common/device-stream-store.js +298 -0
- package/lib/common/event-store.d.ts +124 -0
- package/lib/common/event-store.js +249 -0
- package/lib/common/global-context.d.ts +11 -0
- package/lib/common/global-context.js +9 -0
- package/lib/common/member-list-data-source.d.ts +28 -0
- package/lib/common/member-list-data-source.js +305 -0
- package/lib/common/participant-store.d.ts +195 -0
- package/lib/common/participant-store.js +1577 -0
- package/lib/common/security-store.d.ts +119 -0
- package/lib/common/security-store.js +948 -0
- package/lib/common/setting-store.d.ts +181 -0
- package/lib/common/setting-store.js +797 -0
- package/lib/common/type.d.ts +73 -0
- package/lib/common/type.js +22 -0
- package/lib/config/default-config.d.ts +32 -0
- package/lib/config/default-config.js +39 -0
- package/lib/config/setting-config.d.ts +16 -0
- package/lib/config/setting-config.js +17 -0
- package/lib/creator.d.ts +10 -0
- package/lib/creator.js +49 -0
- package/lib/global.d.ts +8 -0
- package/lib/hooks/meeting-time.d.ts +15 -0
- package/lib/hooks/meeting-time.js +92 -0
- package/lib/hooks/useIsNodePresent.d.ts +4 -0
- package/lib/hooks/useIsNodePresent.js +53 -0
- package/lib/hooks/useOnRefMount.d.ts +2 -0
- package/lib/hooks/useOnRefMount.js +27 -0
- package/lib/index.d.ts +6 -0
- package/lib/index.js +50 -0
- package/lib/mobile-global.css +28 -0
- package/lib/modules/action-bar/bottom-icons.d.ts +17 -0
- package/lib/modules/action-bar/bottom-icons.js +160 -0
- package/lib/modules/action-bar/context.d.ts +2 -0
- package/lib/modules/action-bar/context.js +9 -0
- package/lib/modules/action-bar/index.css +33 -0
- package/lib/modules/action-bar/index.d.ts +27 -0
- package/lib/modules/action-bar/index.js +46 -0
- package/lib/modules/action-bar/member-list-popup/attendee/index.css +130 -0
- package/lib/modules/action-bar/member-list-popup/attendee/index.d.ts +19 -0
- package/lib/modules/action-bar/member-list-popup/attendee/index.js +252 -0
- package/lib/modules/action-bar/member-list-popup/attendee/list.d.ts +1 -0
- package/lib/modules/action-bar/member-list-popup/attendee/list.js +82 -0
- package/lib/modules/action-bar/member-list-popup/index.css +35 -0
- package/lib/modules/action-bar/member-list-popup/index.d.ts +7 -0
- package/lib/modules/action-bar/member-list-popup/index.js +40 -0
- package/lib/modules/action-bar/member-list-popup/participant-more-actions/index.css +0 -0
- package/lib/modules/action-bar/member-list-popup/participant-more-actions/index.d.ts +12 -0
- package/lib/modules/action-bar/member-list-popup/participant-more-actions/index.js +58 -0
- package/lib/modules/action-bar/more-popup/index.css +71 -0
- package/lib/modules/action-bar/more-popup/index.d.ts +2 -0
- package/lib/modules/action-bar/more-popup/index.js +126 -0
- package/lib/modules/action-bar/store.d.ts +196 -0
- package/lib/modules/action-bar/store.js +1425 -0
- package/lib/modules/action-bar/type.d.ts +6 -0
- package/lib/modules/action-bar/type.js +13 -0
- package/lib/modules/action-bar/view.d.ts +2 -0
- package/lib/modules/action-bar/view.js +75 -0
- package/lib/modules/audio-stream/ index.d.ts +19 -0
- package/lib/modules/audio-stream/ index.js +109 -0
- package/lib/modules/audio-stream/index.d.ts +25 -0
- package/lib/modules/audio-stream/index.js +135 -0
- package/lib/modules/chat/chat-bar/index.css +97 -0
- package/lib/modules/chat/chat-bar/index.d.ts +12 -0
- package/lib/modules/chat/chat-bar/index.js +129 -0
- package/lib/modules/chat/chat-notification/index.css +71 -0
- package/lib/modules/chat/chat-notification/index.d.ts +3 -0
- package/lib/modules/chat/chat-notification/index.js +75 -0
- package/lib/modules/chat/chat-select/index.css +183 -0
- package/lib/modules/chat/chat-select/index.d.ts +12 -0
- package/lib/modules/chat/chat-select/index.js +223 -0
- package/lib/modules/chat/contex.d.ts +2 -0
- package/lib/modules/chat/contex.js +9 -0
- package/lib/modules/chat/demo-wrapper.d.ts +1 -0
- package/lib/modules/chat/demo-wrapper.js +42 -0
- package/lib/modules/chat/index.css +108 -0
- package/lib/modules/chat/index.d.ts +28 -0
- package/lib/modules/chat/index.dev.d.ts +1 -0
- package/lib/modules/chat/index.dev.js +58 -0
- package/lib/modules/chat/index.js +208 -0
- package/lib/modules/chat/message-list.d.ts +22 -0
- package/lib/modules/chat/message-list.js +617 -0
- package/lib/modules/chat/mock.d.ts +2 -0
- package/lib/modules/chat/mock.js +283 -0
- package/lib/modules/chat/store.d.ts +183 -0
- package/lib/modules/chat/store.js +1101 -0
- package/lib/modules/chat/util.d.ts +6 -0
- package/lib/modules/chat/util.js +69 -0
- package/lib/modules/chat/view.d.ts +11 -0
- package/lib/modules/chat/view.js +414 -0
- package/lib/modules/layout/bottom-drawer/index.css +34 -0
- package/lib/modules/layout/bottom-drawer/index.d.ts +3 -0
- package/lib/modules/layout/bottom-drawer/index.js +129 -0
- package/lib/modules/layout/components/Layout.d.ts +1 -0
- package/lib/modules/layout/components/Layout.js +98 -0
- package/lib/modules/layout/components/equip-request-popup/index.css +30 -0
- package/lib/modules/layout/components/equip-request-popup/index.d.ts +3 -0
- package/lib/modules/layout/components/equip-request-popup/index.js +78 -0
- package/lib/modules/layout/components/index.css +78 -0
- package/lib/modules/layout/components/index.d.ts +2 -0
- package/lib/modules/layout/components/index.js +25 -0
- package/lib/modules/layout/context.d.ts +2 -0
- package/lib/modules/layout/context.js +9 -0
- package/lib/modules/layout/drawer-header/index.css +27 -0
- package/lib/modules/layout/drawer-header/index.d.ts +10 -0
- package/lib/modules/layout/drawer-header/index.js +54 -0
- package/lib/modules/layout/index.css +22 -0
- package/lib/modules/layout/index.d.ts +8 -0
- package/lib/modules/layout/index.js +47 -0
- package/lib/modules/layout/store.d.ts +59 -0
- package/lib/modules/layout/store.js +379 -0
- package/lib/modules/layout/type.d.ts +65 -0
- package/lib/modules/layout/type.js +52 -0
- package/lib/modules/layout/view.d.ts +2 -0
- package/lib/modules/layout/view.js +10 -0
- package/lib/modules/member-layout/context.d.ts +2 -0
- package/lib/modules/member-layout/context.js +9 -0
- package/lib/modules/member-layout/data.d.ts +2 -0
- package/lib/modules/member-layout/data.js +304 -0
- package/lib/modules/member-layout/grid/index.css +98 -0
- package/lib/modules/member-layout/grid/index.d.ts +21 -0
- package/lib/modules/member-layout/grid/index.js +316 -0
- package/lib/modules/member-layout/index.css +88 -0
- package/lib/modules/member-layout/index.d.ts +8 -0
- package/lib/modules/member-layout/index.js +45 -0
- package/lib/modules/member-layout/share-toast/index.css +30 -0
- package/lib/modules/member-layout/share-toast/index.d.ts +5 -0
- package/lib/modules/member-layout/share-toast/index.js +43 -0
- package/lib/modules/member-layout/speaker/index.css +30 -0
- package/lib/modules/member-layout/speaker/index.d.ts +9 -0
- package/lib/modules/member-layout/speaker/index.js +28 -0
- package/lib/modules/member-layout/store.d.ts +70 -0
- package/lib/modules/member-layout/store.js +479 -0
- package/lib/modules/member-layout/user/index.css +121 -0
- package/lib/modules/member-layout/user/index.d.ts +34 -0
- package/lib/modules/member-layout/user/index.js +355 -0
- package/lib/modules/member-layout/user/types.d.ts +16 -0
- package/lib/modules/member-layout/user/types.js +6 -0
- package/lib/modules/member-layout/view.d.ts +2 -0
- package/lib/modules/member-layout/view.js +225 -0
- package/lib/modules/state-bar/context.d.ts +2 -0
- package/lib/modules/state-bar/context.js +9 -0
- package/lib/modules/state-bar/index.css +79 -0
- package/lib/modules/state-bar/index.d.ts +17 -0
- package/lib/modules/state-bar/index.js +55 -0
- package/lib/modules/state-bar/leaving-room/index.css +14 -0
- package/lib/modules/state-bar/leaving-room/index.d.ts +7 -0
- package/lib/modules/state-bar/leaving-room/index.js +38 -0
- package/lib/modules/state-bar/meeting-detail/index.css +72 -0
- package/lib/modules/state-bar/meeting-detail/index.d.ts +2 -0
- package/lib/modules/state-bar/meeting-detail/index.js +59 -0
- package/lib/modules/state-bar/meeting-detail/meeting-info/copy.d.ts +4 -0
- package/lib/modules/state-bar/meeting-detail/meeting-info/copy.js +81 -0
- package/lib/modules/state-bar/meeting-detail/meeting-info/index.css +92 -0
- package/lib/modules/state-bar/meeting-detail/meeting-info/index.d.ts +2 -0
- package/lib/modules/state-bar/meeting-detail/meeting-info/index.js +188 -0
- package/lib/modules/state-bar/meeting-detail/net-quality/index.css +27 -0
- package/lib/modules/state-bar/meeting-detail/net-quality/index.d.ts +2 -0
- package/lib/modules/state-bar/meeting-detail/net-quality/index.js +87 -0
- package/lib/modules/state-bar/store.d.ts +76 -0
- package/lib/modules/state-bar/store.js +561 -0
- package/lib/modules/state-bar/view.d.ts +7 -0
- package/lib/modules/state-bar/view.js +215 -0
- package/lib/modules/whiteboard/app.d.ts +2 -0
- package/lib/modules/whiteboard/app.js +41 -0
- package/lib/modules/whiteboard/components/control-bar/index.css +53 -0
- package/lib/modules/whiteboard/components/control-bar/index.d.ts +2 -0
- package/lib/modules/whiteboard/components/control-bar/index.js +156 -0
- package/lib/modules/whiteboard/components/control-bar/store.d.ts +35 -0
- package/lib/modules/whiteboard/components/control-bar/store.js +288 -0
- package/lib/modules/whiteboard/components/loading/index.css +76 -0
- package/lib/modules/whiteboard/components/loading/index.d.ts +2 -0
- package/lib/modules/whiteboard/components/loading/index.js +68 -0
- package/lib/modules/whiteboard/components/loading/loading.png +0 -0
- package/lib/modules/whiteboard/components/multi-window/index.css +65 -0
- package/lib/modules/whiteboard/components/multi-window/index.d.ts +5 -0
- package/lib/modules/whiteboard/components/multi-window/index.js +39 -0
- package/lib/modules/whiteboard/components/pagination/index.css +228 -0
- package/lib/modules/whiteboard/components/pagination/index.d.ts +15 -0
- package/lib/modules/whiteboard/components/pagination/index.js +163 -0
- package/lib/modules/whiteboard/components/pagination/store.d.ts +18 -0
- package/lib/modules/whiteboard/components/pagination/store.js +17 -0
- package/lib/modules/whiteboard/components/progress/index.d.ts +5 -0
- package/lib/modules/whiteboard/components/progress/index.js +43 -0
- package/lib/modules/whiteboard/components/progress/style.css +52 -0
- package/lib/modules/whiteboard/components/scene-pagination.d.ts +1 -0
- package/lib/modules/whiteboard/components/scene-pagination.js +30 -0
- package/lib/modules/whiteboard/components/switch-theme/index.css +98 -0
- package/lib/modules/whiteboard/components/switch-theme/index.d.ts +3 -0
- package/lib/modules/whiteboard/components/switch-theme/index.js +89 -0
- package/lib/modules/whiteboard/components/switch-theme/item.d.ts +9 -0
- package/lib/modules/whiteboard/components/switch-theme/item.js +53 -0
- package/lib/modules/whiteboard/components/switch-theme/libs.d.ts +4 -0
- package/lib/modules/whiteboard/components/switch-theme/libs.js +29 -0
- package/lib/modules/whiteboard/components/toolbar/ style.css +588 -0
- package/lib/modules/whiteboard/components/toolbar/components/color-picker/components/color.d.ts +5 -0
- package/lib/modules/whiteboard/components/toolbar/components/color-picker/components/color.js +38 -0
- package/lib/modules/whiteboard/components/toolbar/components/color-picker/components/panel.d.ts +1 -0
- package/lib/modules/whiteboard/components/toolbar/components/color-picker/components/panel.js +107 -0
- package/lib/modules/whiteboard/components/toolbar/components/color-picker/components/picker.d.ts +1 -0
- package/lib/modules/whiteboard/components/toolbar/components/color-picker/components/picker.js +59 -0
- package/lib/modules/whiteboard/components/toolbar/components/color-picker/index.d.ts +2 -0
- package/lib/modules/whiteboard/components/toolbar/components/color-picker/index.js +44 -0
- package/lib/modules/whiteboard/components/toolbar/components/eraser-picker.d.ts +4 -0
- package/lib/modules/whiteboard/components/toolbar/components/eraser-picker.js +89 -0
- package/lib/modules/whiteboard/components/toolbar/components/extra-tool-picker.d.ts +1 -0
- package/lib/modules/whiteboard/components/toolbar/components/extra-tool-picker.js +63 -0
- package/lib/modules/whiteboard/components/toolbar/components/history.d.ts +2 -0
- package/lib/modules/whiteboard/components/toolbar/components/history.js +46 -0
- package/lib/modules/whiteboard/components/toolbar/components/icons/fold-icon.d.ts +2 -0
- package/lib/modules/whiteboard/components/toolbar/components/icons/fold-icon.js +39 -0
- package/lib/modules/whiteboard/components/toolbar/components/icons/move-icon.d.ts +1 -0
- package/lib/modules/whiteboard/components/toolbar/components/icons/move-icon.js +66 -0
- package/lib/modules/whiteboard/components/toolbar/components/move-handle.d.ts +5 -0
- package/lib/modules/whiteboard/components/toolbar/components/move-handle.js +134 -0
- package/lib/modules/whiteboard/components/toolbar/components/pen-picker.d.ts +4 -0
- package/lib/modules/whiteboard/components/toolbar/components/pen-picker.js +106 -0
- package/lib/modules/whiteboard/components/toolbar/components/shape-picker.d.ts +4 -0
- package/lib/modules/whiteboard/components/toolbar/components/shape-picker.js +168 -0
- package/lib/modules/whiteboard/components/toolbar/hooks/index.d.ts +14 -0
- package/lib/modules/whiteboard/components/toolbar/hooks/index.js +211 -0
- package/lib/modules/whiteboard/components/toolbar/index.d.ts +2 -0
- package/lib/modules/whiteboard/components/toolbar/index.js +183 -0
- package/lib/modules/whiteboard/components/toolbar/store.d.ts +51 -0
- package/lib/modules/whiteboard/components/toolbar/store.js +248 -0
- package/lib/modules/whiteboard/context.d.ts +69 -0
- package/lib/modules/whiteboard/context.js +36 -0
- package/lib/modules/whiteboard/index.d.ts +119 -0
- package/lib/modules/whiteboard/index.js +1134 -0
- package/lib/modules/whiteboard/style.css +143 -0
- package/lib/modules/whiteboard/type.d.ts +94 -0
- package/lib/modules/whiteboard/type.js +89 -0
- package/lib/modules/whiteboard/utils.d.ts +12 -0
- package/lib/modules/whiteboard/utils.js +36 -0
- package/lib/plugins/css-preset-plugin.d.ts +1 -0
- package/lib/plugins/css-preset-plugin.js +29 -0
- package/lib/plugins/module-dev-plugin.d.ts +12 -0
- package/lib/plugins/module-dev-plugin.js +183 -0
- package/lib/plugins/multi-lang-plugin.d.ts +1 -0
- package/lib/plugins/multi-lang-plugin.js +19 -0
- package/lib/plugins/rtm-plugin.d.ts +1 -0
- package/lib/plugins/rtm-plugin.js +5 -0
- package/lib/plugins/web-rtc-plugin.d.ts +1 -0
- package/lib/plugins/web-rtc-plugin.js +5 -0
- package/lib/translations/enUS.d.ts +1855 -0
- package/lib/translations/enUS.js +1895 -0
- package/lib/translations/zhCN.d.ts +1852 -0
- package/lib/translations/zhCN.js +1892 -0
- package/lib/type.d.ts +121 -0
- package/lib/type.js +46 -0
- package/lib/ui-manager.d.ts +32 -0
- package/lib/ui-manager.js +426 -0
- package/lib/ui-scene.d.ts +14 -0
- package/lib/ui-scene.js +141 -0
- package/lib/utilities/board-context.d.ts +4 -0
- package/lib/utilities/board-context.js +12 -0
- package/lib/utilities/constant.d.ts +286 -0
- package/lib/utilities/constant.js +271 -0
- package/lib/utilities/copyText.d.ts +2 -0
- package/lib/utilities/copyText.js +43 -0
- package/lib/utilities/extract.d.ts +5 -0
- package/lib/utilities/extract.js +117 -0
- package/lib/utilities/hooks.d.ts +14 -0
- package/lib/utilities/hooks.js +101 -0
- package/lib/utilities/mute-action.d.ts +4 -0
- package/lib/utilities/mute-action.js +48 -0
- package/lib/utilities/parameters.d.ts +7 -0
- package/lib/utilities/parameters.js +20 -0
- package/lib/utilities/regex.d.ts +1 -0
- package/lib/utilities/regex.js +14 -0
- package/lib/utilities/tools.d.ts +27 -0
- package/lib/utilities/tools.js +169 -0
- package/lib/utilities/useNamespace.d.ts +15 -0
- package/lib/utilities/useNamespace.js +66 -0
- package/package.json +63 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const isPhoneNumber: (invitePhoneNumber: string) => boolean;
|
|
@@ -0,0 +1,14 @@
|
|
|
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.isPhoneNumber = void 0;
|
|
8
|
+
require("core-js/modules/es.regexp.exec.js");
|
|
9
|
+
require("core-js/modules/es.regexp.test.js");
|
|
10
|
+
var isPhoneNumber = exports.isPhoneNumber = function isPhoneNumber(invitePhoneNumber) {
|
|
11
|
+
if (typeof invitePhoneNumber !== 'string') return false;
|
|
12
|
+
var reg = /^1[3-9]\d{9}$/;
|
|
13
|
+
return reg.test(invitePhoneNumber);
|
|
14
|
+
};
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
export declare const uint8ArrayToImageData: (target: {
|
|
2
|
+
buffer?: Uint8Array;
|
|
3
|
+
width?: number;
|
|
4
|
+
height?: number;
|
|
5
|
+
}) => string;
|
|
6
|
+
declare class LocalStorage {
|
|
7
|
+
set(key: string, value: string): void;
|
|
8
|
+
get(key: string): string | null;
|
|
9
|
+
remove(key: string): void;
|
|
10
|
+
clear(): void;
|
|
11
|
+
}
|
|
12
|
+
export declare const storage: LocalStorage;
|
|
13
|
+
export declare const ASIDE_WIDTH = "aside_width";
|
|
14
|
+
export declare const PARTICIPANT_POSITION = "participant_position";
|
|
15
|
+
export declare const convertToFixedNumber: (value: number, divisor?: number, fractionDigits?: number) => number;
|
|
16
|
+
export declare const matchVirtualSoundCardPattern: (deviceName: string) => boolean;
|
|
17
|
+
export declare const isResourceZipUrl: (url: string) => boolean;
|
|
18
|
+
export declare const isPngOrJpg: (path: string) => boolean;
|
|
19
|
+
export declare const isMp4: (path: string) => boolean;
|
|
20
|
+
export declare function getFileNameWithoutExtension(filePath: string): string;
|
|
21
|
+
export declare const setLanguage: (language: string) => void;
|
|
22
|
+
export declare const getLanguage: () => string | null;
|
|
23
|
+
export declare const waitUntil: (prediction: () => boolean | Promise<boolean>, memo?: string, intervalMs?: number) => Promise<void>;
|
|
24
|
+
export declare const isIOS: () => boolean;
|
|
25
|
+
export declare const isWeChat: () => boolean;
|
|
26
|
+
export declare const isNeedAskAutoRun: () => boolean;
|
|
27
|
+
export {};
|
|
@@ -0,0 +1,169 @@
|
|
|
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.convertToFixedNumber = exports.PARTICIPANT_POSITION = exports.ASIDE_WIDTH = void 0;
|
|
9
|
+
exports.getFileNameWithoutExtension = getFileNameWithoutExtension;
|
|
10
|
+
exports.waitUntil = exports.uint8ArrayToImageData = exports.storage = exports.setLanguage = exports.matchVirtualSoundCardPattern = exports.isWeChat = exports.isResourceZipUrl = exports.isPngOrJpg = exports.isNeedAskAutoRun = exports.isMp4 = exports.isIOS = exports.getLanguage = void 0;
|
|
11
|
+
var _regenerator = _interopRequireDefault(require("@babel/runtime/regenerator"));
|
|
12
|
+
require("core-js/modules/es.array.concat.js");
|
|
13
|
+
require("core-js/modules/es.array.includes.js");
|
|
14
|
+
require("core-js/modules/es.array.reduce.js");
|
|
15
|
+
require("core-js/modules/es.number.constructor.js");
|
|
16
|
+
require("core-js/modules/es.number.to-fixed.js");
|
|
17
|
+
require("core-js/modules/es.object.to-string.js");
|
|
18
|
+
require("core-js/modules/es.promise.js");
|
|
19
|
+
require("core-js/modules/es.regexp.exec.js");
|
|
20
|
+
require("core-js/modules/es.regexp.test.js");
|
|
21
|
+
require("core-js/modules/es.string.ends-with.js");
|
|
22
|
+
require("core-js/modules/es.string.includes.js");
|
|
23
|
+
require("core-js/modules/es.string.match.js");
|
|
24
|
+
require("core-js/modules/esnext.async-iterator.reduce.js");
|
|
25
|
+
require("core-js/modules/esnext.iterator.constructor.js");
|
|
26
|
+
require("core-js/modules/esnext.iterator.reduce.js");
|
|
27
|
+
var _asyncToGenerator2 = _interopRequireDefault(require("@babel/runtime/helpers/asyncToGenerator"));
|
|
28
|
+
var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime/helpers/classCallCheck"));
|
|
29
|
+
var _createClass2 = _interopRequireDefault(require("@babel/runtime/helpers/createClass"));
|
|
30
|
+
var _schedule = require("agora-foundation/lib/schedule");
|
|
31
|
+
var _logger = require("agora-foundation/lib/logger");
|
|
32
|
+
var uint8ArrayToImageData = exports.uint8ArrayToImageData = function uint8ArrayToImageData(target) {
|
|
33
|
+
var _target$buffer;
|
|
34
|
+
if (!target || !(target !== null && target !== void 0 && (_target$buffer = target.buffer) !== null && _target$buffer !== void 0 && _target$buffer.length)) {
|
|
35
|
+
return '';
|
|
36
|
+
}
|
|
37
|
+
var canvas = document.createElement('canvas');
|
|
38
|
+
var ctx = canvas.getContext('2d');
|
|
39
|
+
if (!ctx) return '';
|
|
40
|
+
var width = canvas.width = target.width;
|
|
41
|
+
var height = canvas.height = target.height;
|
|
42
|
+
var rowBytes = width * 4;
|
|
43
|
+
for (var row = 0; row < height; row++) {
|
|
44
|
+
var srow = row;
|
|
45
|
+
var imageData = ctx.createImageData(width, 1);
|
|
46
|
+
var start = srow * width * 4;
|
|
47
|
+
for (var i = 0; i < rowBytes; ++i) {
|
|
48
|
+
imageData.data[i] = target.buffer[start + i];
|
|
49
|
+
}
|
|
50
|
+
ctx.putImageData(imageData, 0, row);
|
|
51
|
+
}
|
|
52
|
+
return canvas.toDataURL('image/png');
|
|
53
|
+
};
|
|
54
|
+
var LocalStorage = /*#__PURE__*/function () {
|
|
55
|
+
function LocalStorage() {
|
|
56
|
+
(0, _classCallCheck2["default"])(this, LocalStorage);
|
|
57
|
+
}
|
|
58
|
+
return (0, _createClass2["default"])(LocalStorage, [{
|
|
59
|
+
key: "set",
|
|
60
|
+
value: function set(key, value) {
|
|
61
|
+
localStorage.setItem(key, value);
|
|
62
|
+
}
|
|
63
|
+
}, {
|
|
64
|
+
key: "get",
|
|
65
|
+
value: function get(key) {
|
|
66
|
+
return localStorage.getItem(key);
|
|
67
|
+
}
|
|
68
|
+
}, {
|
|
69
|
+
key: "remove",
|
|
70
|
+
value: function remove(key) {
|
|
71
|
+
localStorage.removeItem(key);
|
|
72
|
+
}
|
|
73
|
+
}, {
|
|
74
|
+
key: "clear",
|
|
75
|
+
value: function clear() {
|
|
76
|
+
localStorage.clear();
|
|
77
|
+
}
|
|
78
|
+
}]);
|
|
79
|
+
}();
|
|
80
|
+
var storage = exports.storage = new LocalStorage();
|
|
81
|
+
var ASIDE_WIDTH = exports.ASIDE_WIDTH = 'aside_width';
|
|
82
|
+
var PARTICIPANT_POSITION = exports.PARTICIPANT_POSITION = 'participant_position';
|
|
83
|
+
var convertToFixedNumber = exports.convertToFixedNumber = function convertToFixedNumber(value) {
|
|
84
|
+
var divisor = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 100;
|
|
85
|
+
var fractionDigits = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 2;
|
|
86
|
+
return Number((value / divisor).toFixed(fractionDigits));
|
|
87
|
+
};
|
|
88
|
+
var virtualSoundCardPatternList = [/BlackHole/i, /SoundFlower/i, /AgoraALD/i];
|
|
89
|
+
var matchVirtualSoundCardPattern = exports.matchVirtualSoundCardPattern = function matchVirtualSoundCardPattern(deviceName) {
|
|
90
|
+
return virtualSoundCardPatternList.reduce(function (prev, pattern) {
|
|
91
|
+
pattern.test(deviceName) && (prev = true);
|
|
92
|
+
return prev;
|
|
93
|
+
}, false);
|
|
94
|
+
};
|
|
95
|
+
var isResourceZipUrl = exports.isResourceZipUrl = function isResourceZipUrl(url) {
|
|
96
|
+
if (!url || typeof url !== 'string') return false;
|
|
97
|
+
var regex = /^https?:\/\/.+\.(zip)(\?.*)?$/i;
|
|
98
|
+
return regex.test(url);
|
|
99
|
+
};
|
|
100
|
+
var isPngOrJpg = exports.isPngOrJpg = function isPngOrJpg(path) {
|
|
101
|
+
if (!path || typeof path !== 'string') return false;
|
|
102
|
+
return path.endsWith('.png') || path.endsWith('.jpg');
|
|
103
|
+
};
|
|
104
|
+
var isMp4 = exports.isMp4 = function isMp4(path) {
|
|
105
|
+
if (!path || typeof path !== 'string') return false;
|
|
106
|
+
return path.endsWith('.mp4');
|
|
107
|
+
};
|
|
108
|
+
function getFileNameWithoutExtension(filePath) {
|
|
109
|
+
var match = filePath.match(/([^\\/]+)(?=\.\w+$)/);
|
|
110
|
+
var result = match ? match[1] : '';
|
|
111
|
+
return result !== null && result !== void 0 ? result : '';
|
|
112
|
+
}
|
|
113
|
+
var setLanguage = exports.setLanguage = function setLanguage(language) {
|
|
114
|
+
storage.set('$$fcr_language', language);
|
|
115
|
+
};
|
|
116
|
+
var getLanguage = exports.getLanguage = function getLanguage() {
|
|
117
|
+
return storage.get('$$fcr_language');
|
|
118
|
+
};
|
|
119
|
+
var waitUntil = exports.waitUntil = /*#__PURE__*/function () {
|
|
120
|
+
var _ref = (0, _asyncToGenerator2["default"])(/*#__PURE__*/_regenerator["default"].mark(function _callee2(prediction, memo) {
|
|
121
|
+
var intervalMs,
|
|
122
|
+
logger,
|
|
123
|
+
_args2 = arguments;
|
|
124
|
+
return _regenerator["default"].wrap(function _callee2$(_context2) {
|
|
125
|
+
while (1) switch (_context2.prev = _context2.next) {
|
|
126
|
+
case 0:
|
|
127
|
+
intervalMs = _args2.length > 2 && _args2[2] !== undefined ? _args2[2] : 100;
|
|
128
|
+
logger = (0, _logger.getLogger)();
|
|
129
|
+
return _context2.abrupt("return", new Promise(function (resolve) {
|
|
130
|
+
var task = _schedule.AgoraScheduler.shared.addPollingTask(/*#__PURE__*/(0, _asyncToGenerator2["default"])(/*#__PURE__*/_regenerator["default"].mark(function _callee() {
|
|
131
|
+
var isTrue;
|
|
132
|
+
return _regenerator["default"].wrap(function _callee$(_context) {
|
|
133
|
+
while (1) switch (_context.prev = _context.next) {
|
|
134
|
+
case 0:
|
|
135
|
+
isTrue = prediction();
|
|
136
|
+
logger.info("[wait-until] predict ".concat(memo, ": ").concat(isTrue));
|
|
137
|
+
if (isTrue) {
|
|
138
|
+
task.stop();
|
|
139
|
+
resolve();
|
|
140
|
+
}
|
|
141
|
+
case 3:
|
|
142
|
+
case "end":
|
|
143
|
+
return _context.stop();
|
|
144
|
+
}
|
|
145
|
+
}, _callee);
|
|
146
|
+
})), intervalMs, false);
|
|
147
|
+
}));
|
|
148
|
+
case 3:
|
|
149
|
+
case "end":
|
|
150
|
+
return _context2.stop();
|
|
151
|
+
}
|
|
152
|
+
}, _callee2);
|
|
153
|
+
}));
|
|
154
|
+
return function waitUntil(_x, _x2) {
|
|
155
|
+
return _ref.apply(this, arguments);
|
|
156
|
+
};
|
|
157
|
+
}();
|
|
158
|
+
var isIOS = exports.isIOS = function isIOS() {
|
|
159
|
+
var userAgent = navigator.userAgent;
|
|
160
|
+
var platform = navigator.platform;
|
|
161
|
+
return /iPad|iPhone|iPod/.test(userAgent) || platform === 'MacIntel' && navigator.maxTouchPoints > 1;
|
|
162
|
+
};
|
|
163
|
+
var isWeChat = exports.isWeChat = function isWeChat() {
|
|
164
|
+
var ua = navigator.userAgent.toLowerCase();
|
|
165
|
+
return ua.includes('micromessenger');
|
|
166
|
+
};
|
|
167
|
+
var isNeedAskAutoRun = exports.isNeedAskAutoRun = function isNeedAskAutoRun() {
|
|
168
|
+
return isIOS() && isWeChat();
|
|
169
|
+
};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
export declare const useNamespace: (block: string) => {
|
|
2
|
+
namespace: string;
|
|
3
|
+
b: (blockSuffix?: string) => string;
|
|
4
|
+
e: (element?: string) => string;
|
|
5
|
+
m: (modifier?: string) => string;
|
|
6
|
+
be: (blockSuffix?: string, element?: string) => string;
|
|
7
|
+
em: (element?: string, modifier?: string) => string;
|
|
8
|
+
bm: (blockSuffix?: string, modifier?: string) => string;
|
|
9
|
+
bem: (blockSuffix?: string, element?: string, modifier?: string) => string;
|
|
10
|
+
is: {
|
|
11
|
+
(name: string, state: boolean | undefined): string;
|
|
12
|
+
(name: string): string;
|
|
13
|
+
};
|
|
14
|
+
};
|
|
15
|
+
export type UseNamespaceReturn = ReturnType<typeof useNamespace>;
|
|
@@ -0,0 +1,66 @@
|
|
|
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.useNamespace = void 0;
|
|
8
|
+
require("core-js/modules/es.array.concat.js");
|
|
9
|
+
var defaultNamespace = 'fcr';
|
|
10
|
+
var statePrefix = 'is-';
|
|
11
|
+
var _bem = function _bem(namespace, block, blockSuffix, element, modifier) {
|
|
12
|
+
var cls = "".concat(namespace, "-").concat(block);
|
|
13
|
+
if (blockSuffix) {
|
|
14
|
+
cls += "-".concat(blockSuffix);
|
|
15
|
+
}
|
|
16
|
+
if (element) {
|
|
17
|
+
cls += "__".concat(element);
|
|
18
|
+
}
|
|
19
|
+
if (modifier) {
|
|
20
|
+
cls += "--".concat(modifier);
|
|
21
|
+
}
|
|
22
|
+
return cls;
|
|
23
|
+
};
|
|
24
|
+
var useNamespace = exports.useNamespace = function useNamespace(block) {
|
|
25
|
+
var namespace = defaultNamespace;
|
|
26
|
+
var b = function b() {
|
|
27
|
+
var blockSuffix = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '';
|
|
28
|
+
return _bem(namespace, block, blockSuffix, '', '');
|
|
29
|
+
};
|
|
30
|
+
var e = function e(element) {
|
|
31
|
+
return element ? _bem(namespace, block, '', element, '') : '';
|
|
32
|
+
};
|
|
33
|
+
var m = function m(modifier) {
|
|
34
|
+
return modifier ? _bem(namespace, block, '', '', modifier) : '';
|
|
35
|
+
};
|
|
36
|
+
var be = function be(blockSuffix, element) {
|
|
37
|
+
return blockSuffix && element ? _bem(namespace, block, blockSuffix, element, '') : '';
|
|
38
|
+
};
|
|
39
|
+
var em = function em(element, modifier) {
|
|
40
|
+
return element && modifier ? _bem(namespace, block, '', element, modifier) : '';
|
|
41
|
+
};
|
|
42
|
+
var bm = function bm(blockSuffix, modifier) {
|
|
43
|
+
return blockSuffix && modifier ? _bem(namespace, block, blockSuffix, '', modifier) : '';
|
|
44
|
+
};
|
|
45
|
+
var bem = function bem(blockSuffix, element, modifier) {
|
|
46
|
+
return blockSuffix && element && modifier ? _bem(namespace, block, blockSuffix, element, modifier) : '';
|
|
47
|
+
};
|
|
48
|
+
var is = function is(name) {
|
|
49
|
+
for (var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
|
|
50
|
+
args[_key - 1] = arguments[_key];
|
|
51
|
+
}
|
|
52
|
+
var state = args.length >= 1 ? args[0] : true;
|
|
53
|
+
return name && state ? "".concat(statePrefix).concat(name) : '';
|
|
54
|
+
};
|
|
55
|
+
return {
|
|
56
|
+
namespace: namespace,
|
|
57
|
+
b: b,
|
|
58
|
+
e: e,
|
|
59
|
+
m: m,
|
|
60
|
+
be: be,
|
|
61
|
+
em: em,
|
|
62
|
+
bm: bm,
|
|
63
|
+
bem: bem,
|
|
64
|
+
is: is
|
|
65
|
+
};
|
|
66
|
+
};
|
package/package.json
ADDED
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "fcr-ui-scene-mobile",
|
|
3
|
+
"version": "3.4.0",
|
|
4
|
+
"main": "lib/index.js",
|
|
5
|
+
"repository": "ssh://git@git.agoralab.co/aduc/fcr-ui-scene-mobile.git",
|
|
6
|
+
"author": "agora.io",
|
|
7
|
+
"license": "MIT",
|
|
8
|
+
"scripts": {
|
|
9
|
+
"prepare": "husky",
|
|
10
|
+
"dev": "agora-tc-dev-server",
|
|
11
|
+
"test": "agora-tc-test-karma-browser",
|
|
12
|
+
"build": "agora-tc-transpile"
|
|
13
|
+
},
|
|
14
|
+
"dependencies": {
|
|
15
|
+
"@react-spring/web": "^9.7.3",
|
|
16
|
+
"@use-gesture/react": "^10.3.1",
|
|
17
|
+
"classnames": "^2.5.1",
|
|
18
|
+
"core-js": "^3.33.3",
|
|
19
|
+
"dayjs": "^1.10.4",
|
|
20
|
+
"js-md5": "^0.8.3",
|
|
21
|
+
"lodash": "^4.17.21",
|
|
22
|
+
"mobx": "^6.12.3",
|
|
23
|
+
"mobx-react": "^9.1.1",
|
|
24
|
+
"mobx-utils": "^6.0.8",
|
|
25
|
+
"react": "^17.0.2",
|
|
26
|
+
"react-dom": "^17.0.2",
|
|
27
|
+
"react-rnd": "^10.4.1",
|
|
28
|
+
"react-use-measure": "^2.1.1",
|
|
29
|
+
"react-virtualized": "^9.22.5",
|
|
30
|
+
"tinycolor2": "^1.6.0",
|
|
31
|
+
"pidusage": "^3.0.2",
|
|
32
|
+
"systeminformation": "^5.22.11",
|
|
33
|
+
"jszip": "^3.10.1",
|
|
34
|
+
"winston": "^3.16.0",
|
|
35
|
+
"agora-foundation": "^3.4.0",
|
|
36
|
+
"agora-ui-foundation": "^3.4.0",
|
|
37
|
+
"fcr-core": "^3.4.0"
|
|
38
|
+
},
|
|
39
|
+
"devDependencies": {
|
|
40
|
+
"@babel/core": "^7.23.5",
|
|
41
|
+
"@babel/plugin-proposal-decorators": "^7.23.5",
|
|
42
|
+
"@babel/plugin-transform-runtime": "^7.13.15",
|
|
43
|
+
"@babel/preset-env": "^7.23.5",
|
|
44
|
+
"@babel/preset-react": "^7.24.1",
|
|
45
|
+
"@babel/preset-typescript": "^7.23.3",
|
|
46
|
+
"@types/jasmine": "^5.1.4",
|
|
47
|
+
"@types/lodash": "^4.17.0",
|
|
48
|
+
"@types/react": "^17.0.2",
|
|
49
|
+
"@types/react-dom": "^17.0.11",
|
|
50
|
+
"@types/react-virtualized": "^9.21.30",
|
|
51
|
+
"@types/tinycolor2": "^1.4.6",
|
|
52
|
+
"core-js": "^3.33.3",
|
|
53
|
+
"husky": "^9.0.11",
|
|
54
|
+
"lint-staged": "^15.2.2",
|
|
55
|
+
"prettier": "^3.2.5",
|
|
56
|
+
"react-hot-loader": "^4.13.1",
|
|
57
|
+
"tslib": "^2.6.2",
|
|
58
|
+
"agora-toolchain": "^3.4.0"
|
|
59
|
+
},
|
|
60
|
+
"lint-staged": {
|
|
61
|
+
"*.{ts,tsx,html,css}": "prettier --write"
|
|
62
|
+
}
|
|
63
|
+
}
|