ref: Improve TS files (#12130)

Remove unnecessary ts-ignores
Change any to actual types
Fix eslint rule
This commit is contained in:
Robert Pintilii 2022-09-06 20:32:20 +03:00 committed by GitHub
parent db988f6e62
commit efb69d5382
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
120 changed files with 262 additions and 345 deletions

View File

@ -21,7 +21,9 @@ module.exports = {
'no-shadow': 'off', 'no-shadow': 'off',
'@typescript-eslint/no-shadow': [ 'error' ], '@typescript-eslint/no-shadow': [ 'error' ],
'typescript-sort-keys/interface': 'error', 'typescript-sort-keys/interface': 'error',
'typescript-sort-keys/string-enum': 'error' 'typescript-sort-keys/string-enum': 'error',
'object-curly-spacing': 'off',
'@typescript-eslint/object-curly-spacing': [ 'error', 'always' ]
}, },
'plugins': [ '@typescript-eslint', 'typescript-sort-keys' ], 'plugins': [ '@typescript-eslint', 'typescript-sort-keys' ],
'extends': [ 'extends': [

View File

@ -11,7 +11,7 @@ export const MEDIA_TYPE_TO_WHITELIST_STORE_KEY: { [key: string]: string } = {
/** /**
* Mapping between a media type and the pending reducer key. * Mapping between a media type and the pending reducer key.
*/ */
export const MEDIA_TYPE_TO_PENDING_STORE_KEY: {[key: string]: string} = { export const MEDIA_TYPE_TO_PENDING_STORE_KEY: { [key: string]: 'pendingAudio' | 'pendingVideo' } = {
[MEDIA_TYPE.AUDIO]: 'pendingAudio', [MEDIA_TYPE.AUDIO]: 'pendingAudio',
[MEDIA_TYPE.VIDEO]: 'pendingVideo' [MEDIA_TYPE.VIDEO]: 'pendingVideo'
}; };

View File

@ -4,6 +4,7 @@ import {
PARTICIPANT_LEFT, PARTICIPANT_LEFT,
PARTICIPANT_UPDATED PARTICIPANT_UPDATED
} from '../base/participants/actionTypes'; } from '../base/participants/actionTypes';
import { Participant } from '../base/participants/types';
import ReducerRegistry from '../base/redux/ReducerRegistry'; import ReducerRegistry from '../base/redux/ReducerRegistry';
import { import {
@ -47,11 +48,11 @@ export interface IAVModerationState {
* @private * @private
* @returns {boolean} - Whether state instance was modified. * @returns {boolean} - Whether state instance was modified.
*/ */
function _updatePendingParticipant(mediaType: MediaType, participant: any, state: any = {}) { function _updatePendingParticipant(mediaType: MediaType, participant: Participant, state: IAVModerationState) {
let arrayItemChanged = false; let arrayItemChanged = false;
const storeKey = MEDIA_TYPE_TO_PENDING_STORE_KEY[mediaType]; const storeKey = MEDIA_TYPE_TO_PENDING_STORE_KEY[mediaType];
const arr = state[storeKey]; const arr = state[storeKey];
const newArr = arr.map((pending: { id: string}) => { const newArr = arr.map((pending: { id: string }) => {
if (pending.id === participant.id) { if (pending.id === participant.id) {
arrayItemChanged = true; arrayItemChanged = true;

View File

@ -4,7 +4,7 @@ import clsx from 'clsx';
import React, { useEffect, useState } from 'react'; import React, { useEffect, useState } from 'react';
import Icon from '../icons/components/Icon'; import Icon from '../icons/components/Icon';
import { IconCheck, IconCopy } from '../icons/svg/index'; import { IconCheck, IconCopy } from '../icons/svg';
import { withPixelLineHeight } from '../styles/functions.web'; import { withPixelLineHeight } from '../styles/functions.web';
import { Theme } from '../ui/types'; import { Theme } from '../ui/types';
import { copyText } from '../util/helpers'; import { copyText } from '../util/helpers';

View File

@ -2,7 +2,6 @@ import { makeStyles } from '@material-ui/styles';
import clsx from 'clsx'; import clsx from 'clsx';
import React, { ReactNode } from 'react'; import React, { ReactNode } from 'react';
// @ts-ignore
import { ACTION_TRIGGER } from '../../../participants-pane/constants'; import { ACTION_TRIGGER } from '../../../participants-pane/constants';
import { isMobileBrowser } from '../../environment/utils'; import { isMobileBrowser } from '../../environment/utils';
import participantsPaneTheme from '../themes/participantsPaneTheme.json'; import participantsPaneTheme from '../themes/participantsPaneTheme.json';
@ -17,7 +16,7 @@ type Props = {
/** /**
* List item container class name. * List item container class name.
*/ */
className: string, className?: string,
/** /**
* Whether or not the actions should be hidden. * Whether or not the actions should be hidden.
@ -32,7 +31,7 @@ type Props = {
/** /**
* Id of the container. * Id of the container.
*/ */
id: string, id?: string,
/** /**
* Indicators to be displayed on the list item. * Indicators to be displayed on the list item.
@ -47,17 +46,17 @@ type Props = {
/** /**
* Click handler. * Click handler.
*/ */
onClick: (e?: React.MouseEvent) => void, onClick?: (e?: React.MouseEvent) => void,
/** /**
* Long press handler. * Long press handler.
*/ */
onLongPress: (e?: EventTarget) => void, onLongPress?: (e?: EventTarget) => void,
/** /**
* Mouse leave handler. * Mouse leave handler.
*/ */
onMouseLeave: (e?: React.MouseEvent) => void, onMouseLeave?: (e?: React.MouseEvent) => void,
/** /**
* Data test id. * Data test id.
@ -204,7 +203,7 @@ const ListItem = ({
function _onTouchStart(e: React.TouchEvent) { function _onTouchStart(e: React.TouchEvent) {
const target = e.touches[0].target; const target = e.touches[0].target;
timeoutHandler = window.setTimeout(() => onLongPress(target), 600); timeoutHandler = window.setTimeout(() => onLongPress?.(target), 600);
} }
/** /**

View File

@ -41,23 +41,24 @@ const DEFAULT_STATE = {
}; };
export interface IConferenceState { export interface IConferenceState {
authEnabled?: boolean|undefined; authEnabled?: boolean;
authLogin?: string|undefined; authLogin?: string;
authRequired?: Object; authRequired?: Object;
conference: any|undefined; conference?: any;
conferenceTimestamp?: number; conferenceTimestamp?: number;
e2eeSupported: boolean|undefined; e2eeSupported?: boolean;
error?: Error;
followMeEnabled?: boolean; followMeEnabled?: boolean;
joining: Object|undefined; joining?: Object;
leaving: Object|undefined; leaving?: Object;
localSubject?: string; localSubject?: string;
locked: string|undefined; locked?: string;
membersOnly: boolean|undefined; membersOnly?: Object;
obfuscatedRoom?: string; obfuscatedRoom?: string;
obfuscatedRoomSource?: string; obfuscatedRoomSource?: string;
p2p?: Object; p2p?: Object;
password: string|undefined; password?: string;
passwordRequired: boolean|undefined; passwordRequired?: Object;
pendingSubjectChange?: string; pendingSubjectChange?: string;
room?: Object; room?: Object;
startAudioMutedPolicy?: boolean; startAudioMutedPolicy?: boolean;
@ -152,7 +153,8 @@ ReducerRegistry.register<IConferenceState>('features/base/conference',
* @returns {Object} The new state of the feature base/conference after the * @returns {Object} The new state of the feature base/conference after the
* reduction of the specified action. * reduction of the specified action.
*/ */
function _authStatusChanged(state: any, { authEnabled, authLogin }: {authEnabled: boolean, authLogin: string}) { function _authStatusChanged(state: IConferenceState,
{ authEnabled, authLogin }: { authEnabled: boolean, authLogin: string }) {
return assign(state, { return assign(state, {
authEnabled, authEnabled,
authLogin authLogin
@ -169,7 +171,7 @@ function _authStatusChanged(state: any, { authEnabled, authLogin }: {authEnabled
* @returns {Object} The new state of the feature base/conference after the * @returns {Object} The new state of the feature base/conference after the
* reduction of the specified action. * reduction of the specified action.
*/ */
function _conferenceFailed(state: any, { conference, error }: {conference: Object, error: any}) { function _conferenceFailed(state: IConferenceState, { conference, error }: { conference: Object, error: Error }) {
// The current (similar to getCurrentConference in // The current (similar to getCurrentConference in
// base/conference/functions.any.js) conference which is joining or joined: // base/conference/functions.any.js) conference which is joining or joined:
const conference_ = state.conference || state.joining; const conference_ = state.conference || state.joining;
@ -235,7 +237,7 @@ function _conferenceFailed(state: any, { conference, error }: {conference: Objec
* @returns {Object} The new state of the feature base/conference after the * @returns {Object} The new state of the feature base/conference after the
* reduction of the specified action. * reduction of the specified action.
*/ */
function _conferenceJoined(state: any, { conference }: {conference: any}) { function _conferenceJoined(state: IConferenceState, { conference }: { conference: any }) {
// FIXME The indicator which determines whether a JitsiConference is locked // FIXME The indicator which determines whether a JitsiConference is locked
// i.e. password-protected is private to lib-jitsi-meet. However, the // i.e. password-protected is private to lib-jitsi-meet. However, the
// library does not fire LOCK_STATE_CHANGED upon joining a JitsiConference // library does not fire LOCK_STATE_CHANGED upon joining a JitsiConference
@ -281,7 +283,8 @@ function _conferenceJoined(state: any, { conference }: {conference: any}) {
* @returns {Object} The next/new state of the feature base/conference after the * @returns {Object} The next/new state of the feature base/conference after the
* reduction of the specified action. * reduction of the specified action.
*/ */
function _conferenceLeftOrWillLeave(state: any, { conference, type }: {conference: Object, type: string}) { function _conferenceLeftOrWillLeave(state: IConferenceState, { conference, type }:
{ conference: Object, type: string }) {
const nextState = { ...state }; const nextState = { ...state };
// The redux action CONFERENCE_LEFT is the last time that we should be // The redux action CONFERENCE_LEFT is the last time that we should be
@ -293,8 +296,8 @@ function _conferenceLeftOrWillLeave(state: any, { conference, type }: {conferenc
// due clean-up like leaving the associated room, but the instance is no // due clean-up like leaving the associated room, but the instance is no
// longer the focus of the attention of the user and, consequently, the app. // longer the focus of the attention of the user and, consequently, the app.
for (const p in state) { for (const p in state) {
if (state[p] === conference) { if (state[p as keyof IConferenceState] === conference) {
nextState[p] = undefined; nextState[p as keyof IConferenceState] = undefined;
switch (p) { switch (p) {
case 'conference': case 'conference':
@ -335,7 +338,7 @@ function _conferenceLeftOrWillLeave(state: any, { conference, type }: {conferenc
* @returns {Object} The new state of the feature base/conference after the * @returns {Object} The new state of the feature base/conference after the
* reduction of the specified action. * reduction of the specified action.
*/ */
function _conferenceWillJoin(state: any, { conference }: {conference: Object}) { function _conferenceWillJoin(state: IConferenceState, { conference }: { conference: Object }) {
return assign(state, { return assign(state, {
error: undefined, error: undefined,
joining: conference joining: conference
@ -352,7 +355,7 @@ function _conferenceWillJoin(state: any, { conference }: {conference: Object}) {
* @returns {Object} The new state of the feature base/conference after the * @returns {Object} The new state of the feature base/conference after the
* reduction of the specified action. * reduction of the specified action.
*/ */
function _lockStateChanged(state: any, { conference, locked }: {conference: Object, locked: boolean}) { function _lockStateChanged(state: IConferenceState, { conference, locked }: { conference: Object, locked: boolean }) {
if (state.conference !== conference) { if (state.conference !== conference) {
return state; return state;
} }
@ -373,7 +376,7 @@ function _lockStateChanged(state: any, { conference, locked }: {conference: Obje
* @returns {Object} The new state of the feature base/conference after the * @returns {Object} The new state of the feature base/conference after the
* reduction of the specified action. * reduction of the specified action.
*/ */
function _p2pStatusChanged(state: any, action: any) { function _p2pStatusChanged(state: IConferenceState, action: any) {
return set(state, 'p2p', action.p2p); return set(state, 'p2p', action.p2p);
} }
@ -386,8 +389,8 @@ function _p2pStatusChanged(state: any, action: any) {
* @returns {Object} The new state of the feature base/conference after the * @returns {Object} The new state of the feature base/conference after the
* reduction of the specified action. * reduction of the specified action.
*/ */
function _setPassword(state: any, { conference, method, password } function _setPassword(state: IConferenceState, { conference, method, password }
: {conference: any, method: Object, password: string}) { : { conference: any, method: Object, password: string }) {
switch (method) { switch (method) {
case conference.join: case conference.join:
return assign(state, { return assign(state, {
@ -434,7 +437,7 @@ function _setPassword(state: any, { conference, method, password }
* @returns {Object} The new state of the feature base/conference after the * @returns {Object} The new state of the feature base/conference after the
* reduction of the specified action. * reduction of the specified action.
*/ */
function _setRoom(state: any, action: any) { function _setRoom(state: IConferenceState, action: any) {
let { room } = action; let { room } = action;
if (!isRoomValid(room)) { if (!isRoomValid(room)) {

View File

@ -144,7 +144,7 @@ export interface IConfig {
callStatsSecret?: string; callStatsSecret?: string;
channelLastN?: number; channelLastN?: number;
chromeExtensionBanner?: { chromeExtensionBanner?: {
chromeExtensionsInfo?: Array<{id: string; path: string}>; chromeExtensionsInfo?: Array<{ id: string; path: string }>;
edgeUrl?: string; edgeUrl?: string;
url?: string; url?: string;
}; };
@ -373,7 +373,7 @@ export interface IConfig {
iceTransportPolicy?: string; iceTransportPolicy?: string;
preferH264?: boolean; preferH264?: boolean;
preferredCodec?: string; preferredCodec?: string;
stunServers?: Array<{urls: string}>; stunServers?: Array<{ urls: string }>;
}; };
participantsPane?: { participantsPane?: {
hideModeratorSettingsTab?: boolean; hideModeratorSettingsTab?: boolean;

View File

@ -150,7 +150,7 @@ function _getInitialState() {
* @private * @private
* @returns {Object} The new state after the reduction of the specified action. * @returns {Object} The new state after the reduction of the specified action.
*/ */
function _setConfig(state: IConfig, { config }: {config: IConfig}) { function _setConfig(state: IConfig, { config }: { config: IConfig }) {
// eslint-disable-next-line no-param-reassign // eslint-disable-next-line no-param-reassign
config = _translateLegacyConfig(config); config = _translateLegacyConfig(config);
@ -457,7 +457,7 @@ function _translateLegacyConfig(oldValue: IConfig) {
* @private * @private
* @returns {Object} The new state after the reduction of the specified action. * @returns {Object} The new state after the reduction of the specified action.
*/ */
function _updateConfig(state: IConfig, { config }: {config: IConfig}) { function _updateConfig(state: IConfig, { config }: { config: IConfig }) {
const newState = _.merge({}, state, config); const newState = _.merge({}, state, config);
_cleanupConfig(newState); _cleanupConfig(newState);

View File

@ -14,9 +14,8 @@ import React from 'react';
import { WithTranslation } from 'react-i18next'; import { WithTranslation } from 'react-i18next';
import { translate } from '../../../i18n/functions'; import { translate } from '../../../i18n/functions';
import { IconClose } from '../../../icons/svg/index'; import { IconClose } from '../../../icons/svg';
// @ts-ignore import { withPixelLineHeight } from '../../../styles/functions.web';
import { withPixelLineHeight } from '../../../styles/functions';
import Button from '../../../ui/components/web/Button'; import Button from '../../../ui/components/web/Button';
import { BUTTON_TYPES } from '../../../ui/constants'; import { BUTTON_TYPES } from '../../../ui/constants';

View File

@ -26,8 +26,7 @@ const browserNameToCheck = {
safari: browser.isSafari.bind(browser) safari: browser.isSafari.bind(browser)
}; };
// eslint-disable-next-line no-var declare let interfaceConfig: any;
declare var interfaceConfig: any;
/** /**
* Returns whether or not jitsi is optimized and targeted for the provided * Returns whether or not jitsi is optimized and targeted for the provided

View File

@ -1,6 +1,5 @@
// eslint-disable-next-line no-var declare let config: any;
declare var config: any;
/** /**
* Custom language detection, just returns the config property if any. * Custom language detection, just returns the config property if any.

View File

@ -1,6 +1,5 @@
// eslint-disable-next-line no-var declare let navigator: any;
declare var navigator: any;
/** /**
* Custom language detection, just returns the config property if any. * Custom language detection, just returns the config property if any.

View File

@ -1,5 +1,4 @@
// eslint-disable-next-line no-var declare let APP: any;
declare var APP: any;
import COUNTRIES_RESOURCES from 'i18n-iso-countries/langs/en.json'; import COUNTRIES_RESOURCES from 'i18n-iso-countries/langs/en.json';
import i18next from 'i18next'; import i18next from 'i18next';

View File

@ -3,8 +3,7 @@ import BrowserLanguageDetector from 'i18next-browser-languagedetector';
import configLanguageDetector from './configLanguageDetector'; import configLanguageDetector from './configLanguageDetector';
import customNavigatorDetector from './customNavigatorDetector'; import customNavigatorDetector from './customNavigatorDetector';
// eslint-disable-next-line no-var declare let interfaceConfig: any;
declare var interfaceConfig: any;
/** /**
* The ordered list (by name) of language detectors to be utilized as backends * The ordered list (by name) of language detectors to be utilized as backends

View File

@ -1,9 +1,8 @@
/* eslint-disable import/order */ /* eslint-disable lines-around-comment */
import React, { useCallback } from 'react'; import React, { useCallback } from 'react';
// @ts-ignore // @ts-ignore
import { Container } from '../../react/base'; import { Container } from '../../react/base';
// @ts-ignore // @ts-ignore
import { styleTypeToObject } from '../../styles'; import { styleTypeToObject } from '../../styles';

View File

@ -5,12 +5,12 @@ export type Props = {
/** /**
* An SVG icon to be rendered as the content of the label. * An SVG icon to be rendered as the content of the label.
*/ */
icon: Function, icon?: Function,
/** /**
* String or component that will be rendered as the label itself. * String or component that will be rendered as the label itself.
*/ */
text: string text?: string
}; };
/** /**

View File

@ -14,7 +14,7 @@ type Props = AbstractProps & {
/** /**
* Own CSS class name. * Own CSS class name.
*/ */
className: string, className?: string,
/** /**
* An object containing the CSS classes. * An object containing the CSS classes.
@ -24,7 +24,7 @@ type Props = AbstractProps & {
/** /**
* The color of the label. * The color of the label.
*/ */
color: string, color?: string,
/** /**
@ -35,7 +35,7 @@ type Props = AbstractProps & {
/** /**
* HTML ID attribute to add to the root of {@code Label}. * HTML ID attribute to add to the root of {@code Label}.
*/ */
id: string, id?: string,
/** /**
* Click handler if any. * Click handler if any.

View File

@ -42,6 +42,6 @@ ReducerRegistry.register<ILastNState>('features/base/lastn', (state = {}, action
* @private * @private
* @returns {Object} The new state after the reduction of the specified action. * @returns {Object} The new state after the reduction of the specified action.
*/ */
function _setConfig(state: ILastNState, { config }: {config: IConfig}) { function _setConfig(state: ILastNState, { config }: { config: IConfig }) {
return set(state, 'lastNLimits', validateLastNLimits(config.lastNLimits)); return set(state, 'lastNLimits', validateLastNLimits(config.lastNLimits));
} }

View File

@ -35,7 +35,7 @@ export default class JitsiMeetInMemoryLogStorage {
* representing log lines or aggregated lines objects. * representing log lines or aggregated lines objects.
* @returns {void} * @returns {void}
*/ */
storeLogs(logEntries: (string|{text: string})[]) { storeLogs(logEntries: (string|{ text: string })[]) {
for (let i = 0, len = logEntries.length; i < len; i++) { for (let i = 0, len = logEntries.length; i < len; i++) {
const logEntry = logEntries[i]; const logEntry = logEntries[i];

View File

@ -2,6 +2,7 @@
// @ts-ignore // @ts-ignore
import Logger from '@jitsi/logger'; import Logger from '@jitsi/logger';
import { IStore } from '../../app/types';
import { APP_WILL_MOUNT } from '../app/actionTypes'; import { APP_WILL_MOUNT } from '../app/actionTypes';
// @ts-ignore // @ts-ignore
import { CONFERENCE_JOINED, getCurrentConference } from '../conference'; import { CONFERENCE_JOINED, getCurrentConference } from '../conference';
@ -64,7 +65,7 @@ MiddlewareRegistry.register(store => next => action => {
* @returns {Object} The new state that is the result of the reduction of the * @returns {Object} The new state that is the result of the reduction of the
* specified {@code action}. * specified {@code action}.
*/ */
function _appWillMount({ getState }: {getState: Function}, next: Function, action: any) { function _appWillMount({ getState }: IStore, next: Function, action: any) {
const { config } = getState()['features/base/logging']; const { config } = getState()['features/base/logging'];
_setLogLevels(Logger, config); _setLogLevels(Logger, config);
@ -90,7 +91,7 @@ function _appWillMount({ getState }: {getState: Function}, next: Function, actio
* @private * @private
* @returns {*} * @returns {*}
*/ */
function _conferenceJoined({ getState }: { getState: Function }, next: Function, action: any) { function _conferenceJoined({ getState }: IStore, next: Function, action: any) {
// Wait until the joined event is processed, so that the JitsiMeetLogStorage // Wait until the joined event is processed, so that the JitsiMeetLogStorage
// will be ready. // will be ready.
@ -137,7 +138,7 @@ function _conferenceJoined({ getState }: { getState: Function }, next: Function,
* @private * @private
* @returns {void} * @returns {void}
*/ */
function _initLogging({ dispatch, getState }: {dispatch: Function, getState: Function}, function _initLogging({ dispatch, getState }: IStore,
loggingConfig: any, isTestingEnabled: boolean) { loggingConfig: any, isTestingEnabled: boolean) {
const { logCollector } = getState()['features/base/logging']; const { logCollector } = getState()['features/base/logging'];
@ -194,7 +195,7 @@ function _initLogging({ dispatch, getState }: {dispatch: Function, getState: Fun
* @returns {Object} The new state that is the result of the reduction of the * @returns {Object} The new state that is the result of the reduction of the
* specified {@code action}. * specified {@code action}.
*/ */
function _libWillInit({ getState }: { getState: Function }, next: Function, action: any) { function _libWillInit({ getState }: IStore, next: Function, action: any) {
// Adding the if in order to preserve the logic for web after enabling // Adding the if in order to preserve the logic for web after enabling
// LIB_WILL_INIT action for web in initLib action. // LIB_WILL_INIT action for web in initLib action.
if (typeof APP === 'undefined') { if (typeof APP === 'undefined') {
@ -218,7 +219,7 @@ function _libWillInit({ getState }: { getState: Function }, next: Function, acti
* @returns {Object} The new state that is the result of the reduction of the * @returns {Object} The new state that is the result of the reduction of the
* specified action. * specified action.
*/ */
function _setConfig({ dispatch }: { dispatch: Function }, next: Function, action: any) { function _setConfig({ dispatch }: IStore, next: Function, action: any) {
const result = next(action); const result = next(action);
dispatch(setLoggingConfig(action.config?.logging)); dispatch(setLoggingConfig(action.config?.logging));
@ -240,7 +241,7 @@ function _setConfig({ dispatch }: { dispatch: Function }, next: Function, action
* @returns {Object} The new state that is the result of the reduction of the * @returns {Object} The new state that is the result of the reduction of the
* specified {@code action}. * specified {@code action}.
*/ */
function _setLoggingConfig({ dispatch, getState }: { dispatch: Function, getState: Function }, function _setLoggingConfig({ dispatch, getState }: IStore,
next: Function, action: any) { next: Function, action: any) {
const result = next(action); const result = next(action);
const newValue = getState()['features/base/logging'].config; const newValue = getState()['features/base/logging'].config;

View File

@ -62,7 +62,11 @@ export interface ILoggingState {
[key: string]: LogLevel; [key: string]: LogLevel;
} }
}; };
logCollector?: Object; logCollector?: {
flush: () => void;
start: () => void;
stop: () => void;
};
} }
ReducerRegistry.register<ILoggingState>( ReducerRegistry.register<ILoggingState>(

View File

@ -15,7 +15,7 @@ export type MediaType = 'audio' | 'video' | 'presenter' | 'screenshare';
* *
* @enum {string} * @enum {string}
*/ */
export const MEDIA_TYPE: {[key: string]: MediaType} = { export const MEDIA_TYPE: { [key: string]: MediaType } = {
AUDIO: 'audio', AUDIO: 'audio',
PRESENTER: 'presenter', PRESENTER: 'presenter',
SCREENSHARE: 'screenshare', SCREENSHARE: 'screenshare',

View File

@ -1,18 +1,15 @@
/* eslint-disable import/order */ /* eslint-disable lines-around-comment */
import './middleware.any.js'; import './middleware.any.js';
import { IStore } from '../../app/types'; import { IStore } from '../../app/types';
// @ts-ignore // @ts-ignore
import { NOTIFICATION_TIMEOUT_TYPE, showNotification } from '../../notifications'; import { showNotification } from '../../notifications/actions';
import { NOTIFICATION_TIMEOUT_TYPE } from '../../notifications/constants';
import LocalRecordingManager from '../../recording/components/Recording/LocalRecordingManager.web'; import LocalRecordingManager from '../../recording/components/Recording/LocalRecordingManager.web';
// @ts-ignore // @ts-ignore
import StopRecordingDialog from '../../recording/components/Recording/web/StopRecordingDialog'; import StopRecordingDialog from '../../recording/components/Recording/web/StopRecordingDialog';
// @ts-ignore // @ts-ignore
import { openDialog } from '../dialog'; import { openDialog } from '../dialog';
import MiddlewareRegistry from '../redux/MiddlewareRegistry'; import MiddlewareRegistry from '../redux/MiddlewareRegistry';
import { SET_VIDEO_MUTED } from './actionTypes'; import { SET_VIDEO_MUTED } from './actionTypes';

View File

@ -299,7 +299,7 @@ function _storeVideoTransform(state: IVideoState, { streamId, transform }: { str
* @private * @private
* @returns {Object} * @returns {Object}
*/ */
function _trackRemoved(state: IVideoState, { track: { jitsiTrack } } : {track: {jitsiTrack: any}}) { function _trackRemoved(state: IVideoState, { track: { jitsiTrack } } : { track: { jitsiTrack: any } }) {
if (jitsiTrack) { if (jitsiTrack) {
const streamId = jitsiTrack.getStreamId(); const streamId = jitsiTrack.getStreamId();

View File

@ -1,7 +1,8 @@
import { Dispatch } from 'redux'; import { Dispatch } from 'redux';
// @ts-ignore // @ts-ignore
import { NOTIFICATION_TIMEOUT_TYPE, showNotification } from '../../notifications'; import { showNotification } from '../../notifications/actions';
import { NOTIFICATION_TIMEOUT_TYPE } from '../../notifications/constants';
import { set } from '../redux/functions'; import { set } from '../redux/functions';
import { import {
@ -37,7 +38,7 @@ import {
getParticipantById getParticipantById
} from './functions'; } from './functions';
import logger from './logger'; import logger from './logger';
import { Participant } from './reducer'; import { Participant } from './types';
/** /**
* Create an action for when dominant speaker changes. * Create an action for when dominant speaker changes.

View File

@ -1,4 +1,4 @@
import { IconPhone } from '../icons/svg/index'; import { IconPhone } from '../icons/svg';
/** /**
* The relative path to the default/stock avatar (image) file used on both * The relative path to the default/stock avatar (image) file used on both

View File

@ -22,7 +22,7 @@ import { createDeferred } from '../util/helpers';
import { JIGASI_PARTICIPANT_ICON, MAX_DISPLAY_NAME_LENGTH, PARTICIPANT_ROLE } from './constants'; import { JIGASI_PARTICIPANT_ICON, MAX_DISPLAY_NAME_LENGTH, PARTICIPANT_ROLE } from './constants';
// @ts-ignore // @ts-ignore
import { preloadImage } from './preloadImage'; import { preloadImage } from './preloadImage';
import { Participant } from './reducer'; import { Participant } from './types';
/** /**
* Temp structures for avatar urls to be checked/preloaded. * Temp structures for avatar urls to be checked/preloaded.

View File

@ -18,8 +18,8 @@ import {
SET_LOADABLE_AVATAR_URL SET_LOADABLE_AVATAR_URL
} from './actionTypes'; } from './actionTypes';
import { LOCAL_PARTICIPANT_DEFAULT_ID, PARTICIPANT_ROLE } from './constants'; import { LOCAL_PARTICIPANT_DEFAULT_ID, PARTICIPANT_ROLE } from './constants';
// @ts-ignore
import { isParticipantModerator } from './functions'; import { isParticipantModerator } from './functions';
import { LocalParticipant, Participant } from './types';
/** /**
* Participant object. * Participant object.
@ -38,45 +38,6 @@ import { isParticipantModerator } from './functions';
* @property {string} email - Participant email. * @property {string} email - Participant email.
*/ */
export interface Participant {
avatarURL?: string;
botType?: string;
conference?: Object;
connectionStatus?: string;
dominantSpeaker?: boolean;
e2eeSupported?: boolean;
email?: string;
features?: {
'screen-sharing'?: boolean;
};
id: string;
isFakeParticipant?: boolean;
isJigasi?: boolean;
isLocalScreenShare?: boolean;
isReplacing?: number;
isVirtualScreenshareParticipant?: boolean;
loadableAvatarUrl?: string;
loadableAvatarUrlUseCORS?: boolean;
local?: boolean;
name?: string;
pinned?: boolean;
presence?: string;
raisedHandTimestamp?: number;
remoteControlSessionStatus?: boolean;
role?: string;
supportsRemoteControl?: boolean;
}
export interface LocalParticipant extends Participant {
audioOutputDeviceId?: string;
cameraDeviceId?: string;
micDeviceId?: string;
startWithAudioMuted?: boolean;
startWithVideoMuted?: boolean;
userSelectedMicDeviceId?: string;
userSelectedMicDeviceLabel?: string;
}
/** /**
* The participant properties which cannot be updated through * The participant properties which cannot be updated through
* {@link PARTICIPANT_UPDATED}. They either identify the participant or can only * {@link PARTICIPANT_UPDATED}. They either identify the participant or can only
@ -121,7 +82,7 @@ export interface IParticipantsState {
localScreenShare?: Participant; localScreenShare?: Participant;
overwrittenNameList: Object; overwrittenNameList: Object;
pinnedParticipant?: string; pinnedParticipant?: string;
raisedHandsQueue: Array<{ id: string; raisedHandTimestamp: number;}>; raisedHandsQueue: Array<{ id: string; raisedHandTimestamp: number; }>;
remote: Map<string, Participant>; remote: Map<string, Participant>;
sortedRemoteParticipants: Map<string, string>; sortedRemoteParticipants: Map<string, string>;
sortedRemoteScreenshares: Map<string, string>; sortedRemoteScreenshares: Map<string, string>;
@ -505,9 +466,7 @@ function _isEveryoneModerator(state: IParticipantsState) {
* @private * @private
* @returns {Participant} * @returns {Participant}
*/ */
function _participant(state: Participant|LocalParticipant = { function _participant(state: Participant|LocalParticipant = { id: '' }, action: any): Participant|LocalParticipant {
id: '',
name: '' }, action: any): Participant|LocalParticipant {
switch (action.type) { switch (action.type) {
case SET_LOADABLE_AVATAR_URL: case SET_LOADABLE_AVATAR_URL:
case PARTICIPANT_UPDATED: { case PARTICIPANT_UPDATED: {
@ -543,7 +502,7 @@ function _participant(state: Participant|LocalParticipant = {
* base/participants after the reduction of the specified * base/participants after the reduction of the specified
* {@code action}. * {@code action}.
*/ */
function _participantJoined({ participant }: {participant: Participant}) { function _participantJoined({ participant }: { participant: Participant }) {
const { const {
avatarURL, avatarURL,
botType, botType,

View File

@ -0,0 +1,38 @@
export interface Participant {
avatarURL?: string;
botType?: string;
conference?: Object;
connectionStatus?: string;
dominantSpeaker?: boolean;
e2eeSupported?: boolean;
email?: string;
features?: {
'screen-sharing'?: boolean;
};
id: string;
isFakeParticipant?: boolean;
isJigasi?: boolean;
isLocalScreenShare?: boolean;
isReplacing?: number;
isVirtualScreenshareParticipant?: boolean;
loadableAvatarUrl?: string;
loadableAvatarUrlUseCORS?: boolean;
local?: boolean;
name?: string;
pinned?: boolean;
presence?: string;
raisedHandTimestamp?: number;
remoteControlSessionStatus?: boolean;
role?: string;
supportsRemoteControl?: boolean;
}
export interface LocalParticipant extends Participant {
audioOutputDeviceId?: string;
cameraDeviceId?: string;
micDeviceId?: string;
startWithAudioMuted?: boolean;
startWithVideoMuted?: boolean;
userSelectedMicDeviceId?: string;
userSelectedMicDeviceLabel?: string;
}

View File

@ -3,7 +3,7 @@ import clsx from 'clsx';
import React, { ReactNode, useCallback } from 'react'; import React, { ReactNode, useCallback } from 'react';
import Icon from '../../../icons/components/Icon'; import Icon from '../../../icons/components/Icon';
import { IconArrowDown } from '../../../icons/svg/index'; import { IconArrowDown } from '../../../icons/svg';
import { withPixelLineHeight } from '../../../styles/functions.web'; import { withPixelLineHeight } from '../../../styles/functions.web';
type Props = { type Props = {

View File

@ -6,11 +6,9 @@ import { WithTranslation } from 'react-i18next';
import { IState } from '../../../../app/types'; import { IState } from '../../../../app/types';
import { translate } from '../../../i18n/functions'; import { translate } from '../../../i18n/functions';
import Icon from '../../../icons/components/Icon'; import Icon from '../../../icons/components/Icon';
import { IconArrowDownSmall, IconWifi1Bar, IconWifi2Bars, IconWifi3Bars } from '../../../icons/svg/index'; import { IconArrowDownSmall, IconWifi1Bar, IconWifi2Bars, IconWifi3Bars } from '../../../icons/svg';
import { connect } from '../../../redux/functions'; import { connect } from '../../../redux/functions';
// @ts-ignore
import { PREJOIN_DEFAULT_CONTENT_WIDTH } from '../../../ui/components/variables'; import { PREJOIN_DEFAULT_CONTENT_WIDTH } from '../../../ui/components/variables';
// @ts-ignore
import { CONNECTION_TYPE } from '../../constants'; import { CONNECTION_TYPE } from '../../constants';
// @ts-ignore // @ts-ignore
import { getConnectionData } from '../../functions'; import { getConnectionData } from '../../functions';
@ -121,7 +119,13 @@ const useStyles = makeStyles((theme: any) => {
}; };
}); });
const CONNECTION_TYPE_MAP: any = { const CONNECTION_TYPE_MAP: {
[key: string]: {
connectionClass: string;
connectionText: string;
icon: Function;
}
} = {
[CONNECTION_TYPE.POOR]: { [CONNECTION_TYPE.POOR]: {
connectionClass: 'con-status--poor', connectionClass: 'con-status--poor',
icon: IconWifi1Bar, icon: IconWifi1Bar,

View File

@ -1,5 +1,3 @@
// @flow
export const CONNECTION_TYPE = { export const CONNECTION_TYPE = {
GOOD: 'good', GOOD: 'good',
NON_OPTIMAL: 'nonOptimal', NON_OPTIMAL: 'nonOptimal',

View File

@ -3,7 +3,6 @@ import React from 'react';
import { TouchableRipple } from 'react-native-paper'; import { TouchableRipple } from 'react-native-paper';
import Icon from '../../../icons/components/Icon'; import Icon from '../../../icons/components/Icon';
// @ts-ignore
import BaseTheme from '../../../ui/components/BaseTheme.native'; import BaseTheme from '../../../ui/components/BaseTheme.native';
import { BUTTON_TYPES } from '../../../ui/constants'; import { BUTTON_TYPES } from '../../../ui/constants';
import { IconButtonProps } from '../../types'; import { IconButtonProps } from '../../types';

View File

@ -1,12 +1,10 @@
/* eslint-disable import/order */
// @ts-ignore // @ts-ignore
import Bourne from '@hapi/bourne'; import Bourne from '@hapi/bourne';
// eslint-disable-next-line lines-around-comment
// @ts-ignore // @ts-ignore
import { jitsiLocalStorage } from '@jitsi/js-utils'; import { jitsiLocalStorage } from '@jitsi/js-utils';
import md5 from 'js-md5'; import md5 from 'js-md5';
// @ts-ignore
import logger from './logger'; import logger from './logger';
declare let __DEV__: any; declare let __DEV__: any;
@ -29,7 +27,7 @@ declare type PersistencyConfigMap = { [name: string]: ElementConfig };
*/ */
class PersistenceRegistry { class PersistenceRegistry {
_checksum = ''; _checksum = '';
_defaultStates: { [name: string ]: Object|undefined} = {}; _defaultStates: { [name: string ]: Object|undefined } = {};
_elements: PersistencyConfigMap = {}; _elements: PersistencyConfigMap = {};
/** /**

View File

@ -1,9 +1,6 @@
/* eslint-disable import/order */
import { Store } from 'redux'; import { Store } from 'redux';
import { equals } from './functions'; import { equals } from './functions';
// @ts-ignore
import logger from './logger'; import logger from './logger';
/** /**

View File

@ -1,5 +1,3 @@
// @flow
import { getLogger } from '../logging/functions'; import { getLogger } from '../logging/functions';
export default getLogger('features/base/redux'); export default getLogger('features/base/redux');

View File

@ -1,7 +1,6 @@
/* eslint-disable lines-around-comment */ /* eslint-disable lines-around-comment */
import { translate } from '../../../../base/i18n/functions'; import { translate } from '../../../../base/i18n/functions';
// @ts-ignore import { IconSettings } from '../../../../base/icons/svg';
import { IconSettings } from '../../../../base/icons';
// @ts-ignore // @ts-ignore
import { AbstractButton, type AbstractButtonProps } from '../../../../base/toolbox/components'; import { AbstractButton, type AbstractButtonProps } from '../../../../base/toolbox/components';
// @ts-ignore // @ts-ignore

View File

@ -12,8 +12,6 @@ import {
import Icon from '../../../icons/components/Icon'; import Icon from '../../../icons/components/Icon';
import { IconCloseCircle } from '../../../icons/svg'; import { IconCloseCircle } from '../../../icons/svg';
// eslint-disable-next-line lines-around-comment
// @ts-ignore
import BaseTheme from '../../../ui/components/BaseTheme.native'; import BaseTheme from '../../../ui/components/BaseTheme.native';
import { InputProps } from '../types'; import { InputProps } from '../types';

View File

@ -1,4 +1,3 @@
// @ts-ignore
import BaseTheme from '../../../ui/components/BaseTheme.native'; import BaseTheme from '../../../ui/components/BaseTheme.native';
const BUTTON_HEIGHT = BaseTheme.spacing[7]; const BUTTON_HEIGHT = BaseTheme.spacing[7];

View File

@ -1,4 +1,3 @@
// @ts-ignore
import BaseTheme from '../../../ui/components/BaseTheme.native'; import BaseTheme from '../../../ui/components/BaseTheme.native';
export default { export default {

View File

@ -6,8 +6,6 @@ import { isMobileBrowser } from '../../../environment/utils';
import Icon from '../../../icons/components/Icon'; import Icon from '../../../icons/components/Icon';
import { IconCheckMark } from '../../../icons/svg'; import { IconCheckMark } from '../../../icons/svg';
import { withPixelLineHeight } from '../../../styles/functions.web'; import { withPixelLineHeight } from '../../../styles/functions.web';
// eslint-disable-next-line lines-around-comment
// @ts-ignore
import BaseTheme from '../BaseTheme.web'; import BaseTheme from '../BaseTheme.web';
interface CheckboxProps { interface CheckboxProps {

View File

@ -5,7 +5,7 @@ import TextareaAutosize from 'react-textarea-autosize';
import { isMobileBrowser } from '../../../environment/utils'; import { isMobileBrowser } from '../../../environment/utils';
import Icon from '../../../icons/components/Icon'; import Icon from '../../../icons/components/Icon';
import { IconCloseCircle } from '../../../icons/svg/index'; import { IconCloseCircle } from '../../../icons/svg';
import { withPixelLineHeight } from '../../../styles/functions.web'; import { withPixelLineHeight } from '../../../styles/functions.web';
import { Theme } from '../../../ui/types'; import { Theme } from '../../../ui/types';
import { InputProps } from '../types'; import { InputProps } from '../types';

View File

@ -56,7 +56,7 @@ function _onUserInteractionReceived(dispatch: Function, event: any) {
* @private * @private
* @returns {void} * @returns {void}
*/ */
function _startListeningForUserInteraction({ dispatch }: {dispatch: Function}) { function _startListeningForUserInteraction({ dispatch }: { dispatch: Function }) {
_stopListeningForUserInteraction(); _stopListeningForUserInteraction();
userInteractionListener = _onUserInteractionReceived.bind(null, dispatch); userInteractionListener = _onUserInteractionReceived.bind(null, dispatch);

View File

@ -1,5 +1,4 @@
// eslint-disable-next-line no-var declare let JitsiMeetJS: any;
declare var JitsiMeetJS: any;
/** /**
* Loads a script from a specific URL. The script will be interpreted upon load. * Loads a script from a specific URL. The script will be interpreted upon load.

View File

@ -221,7 +221,7 @@ function _objectToURLParamsArray(obj = {}) {
export function parseStandardURIString(str: string) { export function parseStandardURIString(str: string) {
/* eslint-disable no-param-reassign */ /* eslint-disable no-param-reassign */
const obj: {[key: string]: any} = { const obj: { [key: string]: any } = {
toString: _standardURIToString toString: _standardURIToString
}; };
@ -452,7 +452,7 @@ export function toURLString(obj?: (Object | string)): string|undefined|null {
* @returns {string} - A {@code String} representation of the specified * @returns {string} - A {@code String} representation of the specified
* {@code Object}. * {@code Object}.
*/ */
export function urlObjectToString(o: {[key: string]: any}): string|undefined { export function urlObjectToString(o: { [key: string]: any }): string|undefined {
// First normalize the given url. It come as o.url or split into o.serverURL // First normalize the given url. It come as o.url or split into o.serverURL
// and o.room. // and o.room.
let tmp; let tmp;

View File

@ -6,7 +6,7 @@ import type { Dispatch } from 'redux';
import { IState } from '../../../app/types'; import { IState } from '../../../app/types';
import { isMobileBrowser } from '../../../base/environment/utils'; import { isMobileBrowser } from '../../../base/environment/utils';
import { translate } from '../../../base/i18n/functions'; import { translate } from '../../../base/i18n/functions';
import { IconPlane, IconSmile } from '../../../base/icons/svg/index'; import { IconPlane, IconSmile } from '../../../base/icons/svg';
import { connect } from '../../../base/redux/functions'; import { connect } from '../../../base/redux/functions';
import Button from '../../../base/ui/components/web/Button'; import Button from '../../../base/ui/components/web/Button';
import Input from '../../../base/ui/components/web/Input'; import Input from '../../../base/ui/components/web/Input';

View File

@ -3,7 +3,6 @@ import throttle from 'lodash/throttle';
import React, { RefObject } from 'react'; import React, { RefObject } from 'react';
import { scrollIntoView } from 'seamless-scroll-polyfill'; import { scrollIntoView } from 'seamless-scroll-polyfill';
// @ts-ignore
import { MESSAGE_TYPE_REMOTE } from '../../constants'; import { MESSAGE_TYPE_REMOTE } from '../../constants';
import AbstractMessageContainer, { Props } from '../AbstractMessageContainer'; import AbstractMessageContainer, { Props } from '../AbstractMessageContainer';

View File

@ -4,7 +4,7 @@ import { WithTranslation } from 'react-i18next';
import { translate } from '../../../base/i18n/functions'; import { translate } from '../../../base/i18n/functions';
import Icon from '../../../base/icons/components/Icon'; import Icon from '../../../base/icons/components/Icon';
import { IconArrowDown } from '../../../base/icons/svg/index'; import { IconArrowDown } from '../../../base/icons/svg';
import { withPixelLineHeight } from '../../../base/styles/functions.web'; import { withPixelLineHeight } from '../../../base/styles/functions.web';
export interface INewMessagesButtonProps extends WithTranslation { export interface INewMessagesButtonProps extends WithTranslation {

View File

@ -1,6 +1,6 @@
import { v4 as uuidv4 } from 'uuid'; import { v4 as uuidv4 } from 'uuid';
import { LocalParticipant, Participant } from '../base/participants/reducer'; import { LocalParticipant, Participant } from '../base/participants/types';
import ReducerRegistry from '../base/redux/ReducerRegistry'; import ReducerRegistry from '../base/redux/ReducerRegistry';
import { import {

View File

@ -2,8 +2,7 @@
import React from 'react'; import React from 'react';
import Icon from '../../../../base/icons/components/Icon'; import Icon from '../../../../base/icons/components/Icon';
import { IconVolumeEmpty } from '../../../../base/icons/svg/index'; import { IconVolumeEmpty } from '../../../../base/icons/svg';
// @ts-ignore
import BaseTheme from '../../../../base/ui/components/BaseTheme.native'; import BaseTheme from '../../../../base/ui/components/BaseTheme.native';
/** /**

View File

@ -1,9 +1,7 @@
/* eslint-disable lines-around-comment */
import React from 'react'; import React from 'react';
import Icon from '../../../../base/icons/components/Icon'; import Icon from '../../../../base/icons/components/Icon';
import { IconHangup } from '../../../../base/icons/svg/index'; import { IconHangup } from '../../../../base/icons/svg';
// @ts-ignore
import BaseTheme from '../../../../base/ui/components/BaseTheme.native'; import BaseTheme from '../../../../base/ui/components/BaseTheme.native';
/** /**

View File

@ -14,7 +14,7 @@ import { IState } from '../../../../app/types';
// @ts-ignore // @ts-ignore
import { getFeatureFlag, AUDIO_MUTE_BUTTON_ENABLED } from '../../../../base/flags'; import { getFeatureFlag, AUDIO_MUTE_BUTTON_ENABLED } from '../../../../base/flags';
import Icon from '../../../../base/icons/components/Icon'; import Icon from '../../../../base/icons/components/Icon';
import { IconMicrophone, IconMicrophoneEmptySlash } from '../../../../base/icons/svg/index'; import { IconMicrophone, IconMicrophoneEmptySlash } from '../../../../base/icons/svg';
import { MEDIA_TYPE } from '../../../../base/media/constants'; import { MEDIA_TYPE } from '../../../../base/media/constants';
// @ts-ignore // @ts-ignore
import { isLocalTrackMuted } from '../../../../base/tracks'; import { isLocalTrackMuted } from '../../../../base/tracks';

View File

@ -45,7 +45,7 @@ type Props = {
* @returns {JSX.Element} * @returns {JSX.Element}
*/ */
const TitleBar = (props: Props) : JSX.Element => { const TitleBar = (props: Props) : JSX.Element => {
const localParticipant: any = useSelector(getLocalParticipant); const localParticipant = useSelector(getLocalParticipant);
const localParticipantId = localParticipant?.id; const localParticipantId = localParticipant?.id;
return (<> return (<>

View File

@ -5,9 +5,8 @@ import { useTranslation } from 'react-i18next';
import { useDispatch, useSelector } from 'react-redux'; import { useDispatch, useSelector } from 'react-redux';
import { IState } from '../../../app/types'; import { IState } from '../../../app/types';
import { IconRaisedHand } from '../../../base/icons/svg/index'; import { IconRaisedHand } from '../../../base/icons/svg';
// @ts-ignore import Label from '../../../base/label/components/web/Label';
import { Label } from '../../../base/label';
// @ts-ignore // @ts-ignore
import { Tooltip } from '../../../base/tooltip'; import { Tooltip } from '../../../base/tooltip';
import BaseTheme from '../../../base/ui/components/BaseTheme.web'; import BaseTheme from '../../../base/ui/components/BaseTheme.web';

View File

@ -67,11 +67,11 @@ class DisplayNameLabel extends React.Component<Props> {
* @param {Props} ownProps - The own props of the component. * @param {Props} ownProps - The own props of the component.
* @returns {Props} * @returns {Props}
*/ */
function _mapStateToProps(state: IState, ownProps: any) { function _mapStateToProps(state: IState, ownProps: Partial<Props>) {
const participant = getParticipantById(state, ownProps.participantId); const participant = getParticipantById(state, ownProps.participantId ?? '');
return { return {
_participantName: getParticipantDisplayName(state, ownProps.participantId), _participantName: getParticipantDisplayName(state, ownProps.participantId ?? ''),
_render: participant && (!participant?.local || ownProps.contained) && !participant?.isFakeParticipant _render: participant && (!participant?.local || ownProps.contained) && !participant?.isFakeParticipant
}; };
} }

View File

@ -8,7 +8,7 @@ import { IState } from '../../../app/types';
// @ts-ignore // @ts-ignore
import { isDisplayNameVisible } from '../../../base/config/functions.any'; import { isDisplayNameVisible } from '../../../base/config/functions.any';
import { getLocalParticipant, getParticipantDisplayName } from '../../../base/participants/functions'; import { getLocalParticipant, getParticipantDisplayName } from '../../../base/participants/functions';
import { Participant } from '../../../base/participants/reducer'; import { Participant } from '../../../base/participants/types';
import { withPixelLineHeight } from '../../../base/styles/functions.web'; import { withPixelLineHeight } from '../../../base/styles/functions.web';
// @ts-ignore // @ts-ignore
import { getLargeVideoParticipant } from '../../../large-video/functions'; import { getLargeVideoParticipant } from '../../../large-video/functions';

View File

@ -9,7 +9,7 @@ import styles from './styles';
interface Props { interface Props {
uri?: any; uri?: string;
} }
/** /**
@ -18,7 +18,7 @@ interface Props {
* @param {Props} props - The props of the component. * @param {Props} props - The props of the component.
* @returns {ReactElement} * @returns {ReactElement}
*/ */
const BrandingImageBackground: React.FC<Props> = ({ uri }:Props) => { const BrandingImageBackground: React.FC<Props> = ({ uri }: Props) => {
const imageType = uri?.substr(uri.lastIndexOf('/') + 1); const imageType = uri?.substr(uri.lastIndexOf('/') + 1);
const imgSrc = uri ? uri : undefined; const imgSrc = uri ? uri : undefined;
@ -41,7 +41,7 @@ const BrandingImageBackground: React.FC<Props> = ({ uri }:Props) => {
// with the smallest Y value of the viewport. // with the smallest Y value of the viewport.
preserveAspectRatio = 'xMinYMin' preserveAspectRatio = 'xMinYMin'
style = { styles.brandingImageBackgroundSvg as StyleProp<ViewStyle> } style = { styles.brandingImageBackgroundSvg as StyleProp<ViewStyle> }
uri = { imgSrc } uri = { imgSrc ?? null }
viewBox = '0 0 400 650' viewBox = '0 0 400 650'
width = '100%' /> width = '100%' />
); );

View File

@ -228,7 +228,7 @@ ReducerRegistry.register<IDynamicBrandingState>(STORE_NAME, (state = DEFAULT_STA
* @private * @private
* @returns {{Props}} * @returns {{Props}}
*/ */
function formatImages(images: Array<string> | Array<{src: string; tooltip?: string}>): Array<Image> { function formatImages(images: Array<string> | Array<{ src: string; tooltip?: string }>): Array<Image> {
return images.map((img, i) => { return images.map((img, i) => {
let src; let src;
let tooltip; let tooltip;

View File

@ -19,8 +19,8 @@ import { getSourceNameSignalingFeatureFlag, getToolbarButtons } from '../../../b
import { isMobileBrowser } from '../../../base/environment/utils'; import { isMobileBrowser } from '../../../base/environment/utils';
import { translate } from '../../../base/i18n/functions'; import { translate } from '../../../base/i18n/functions';
import Icon from '../../../base/icons/components/Icon'; import Icon from '../../../base/icons/components/Icon';
import { IconMenuDown, IconMenuUp } from '../../../base/icons/svg/index'; import { IconMenuDown, IconMenuUp } from '../../../base/icons/svg';
import { Participant } from '../../../base/participants/reducer'; import { Participant } from '../../../base/participants/types';
import { connect } from '../../../base/redux/functions'; import { connect } from '../../../base/redux/functions';
// @ts-ignore // @ts-ignore
import { shouldHideSelfView } from '../../../base/settings/functions.any'; import { shouldHideSelfView } from '../../../base/settings/functions.any';
@ -611,7 +611,7 @@ class Filmstrip extends PureComponent <Props, State> {
* @param {Object} data - An object with the indexes identifying the ThumbnailWrapper instance. * @param {Object} data - An object with the indexes identifying the ThumbnailWrapper instance.
* @returns {string} - The key. * @returns {string} - The key.
*/ */
_gridItemKey({ columnIndex, rowIndex }: {columnIndex: number, rowIndex: number}) { _gridItemKey({ columnIndex, rowIndex }: { columnIndex: number, rowIndex: number }) {
const { const {
_disableSelfView, _disableSelfView,
_columns, _columns,
@ -887,7 +887,7 @@ class Filmstrip extends PureComponent <Props, State> {
* @private * @private
* @returns {Props} * @returns {Props}
*/ */
function _mapStateToProps(state: IState, ownProps: any) { function _mapStateToProps(state: IState, ownProps: Partial<Props>) {
const { _hasScroll = false, filmstripType, _topPanelFilmstrip, _remoteParticipants } = ownProps; const { _hasScroll = false, filmstripType, _topPanelFilmstrip, _remoteParticipants } = ownProps;
const toolbarButtons = getToolbarButtons(state); const toolbarButtons = getToolbarButtons(state);
const { testing = {}, iAmRecorder } = state['features/base/config']; const { testing = {}, iAmRecorder } = state['features/base/config'];
@ -935,7 +935,7 @@ function _mapStateToProps(state: IState, ownProps: any) {
_mainFilmstripVisible: visible, _mainFilmstripVisible: visible,
_maxFilmstripWidth: clientWidth - MIN_STAGE_VIEW_WIDTH, _maxFilmstripWidth: clientWidth - MIN_STAGE_VIEW_WIDTH,
_maxTopPanelHeight: clientHeight - MIN_STAGE_VIEW_HEIGHT, _maxTopPanelHeight: clientHeight - MIN_STAGE_VIEW_HEIGHT,
_remoteParticipantsLength: _remoteParticipants.length, _remoteParticipantsLength: _remoteParticipants?.length,
_thumbnailsReordered: enableThumbnailReordering, _thumbnailsReordered: enableThumbnailReordering,
_topPanelHeight: topPanelHeight.current, _topPanelHeight: topPanelHeight.current,
_topPanelMaxHeight: topPanelHeight.current || TOP_FILMSTRIP_HEIGHT, _topPanelMaxHeight: topPanelHeight.current || TOP_FILMSTRIP_HEIGHT,

View File

@ -3,7 +3,7 @@ import React from 'react';
import { useSelector } from 'react-redux'; import { useSelector } from 'react-redux';
import { IState } from '../../../app/types'; import { IState } from '../../../app/types';
import { IconPinParticipant } from '../../../base/icons/svg/index'; import { IconPinParticipant } from '../../../base/icons/svg';
import { getParticipantById } from '../../../base/participants/functions'; import { getParticipantById } from '../../../base/participants/functions';
import BaseIndicator from '../../../base/react/components/web/BaseIndicator'; import BaseIndicator from '../../../base/react/components/web/BaseIndicator';
// eslint-disable-next-line lines-around-comment // eslint-disable-next-line lines-around-comment
@ -57,7 +57,7 @@ const PinnedIndicator = ({
}: Props) => { }: Props) => {
const stageFilmstrip = useSelector(isStageFilmstripAvailable); const stageFilmstrip = useSelector(isStageFilmstripAvailable);
const pinned = useSelector((state: IState) => getParticipantById(state, participantId))?.pinned; const pinned = useSelector((state: IState) => getParticipantById(state, participantId))?.pinned;
const activePinnedParticipants: Array<{participantId: string; pinned: boolean}> const activePinnedParticipants: Array<{ participantId: string; pinned: boolean }>
= useSelector(getPinnedActiveParticipants); = useSelector(getPinnedActiveParticipants);
const isPinned = activePinnedParticipants.find(p => p.participantId === participantId); const isPinned = activePinnedParticipants.find(p => p.participantId === participantId);
const styles = useStyles(); const styles = useStyles();

View File

@ -3,9 +3,9 @@ import React from 'react';
import { useSelector } from 'react-redux'; import { useSelector } from 'react-redux';
import { IState } from '../../../app/types'; import { IState } from '../../../app/types';
import { IconRaisedHand } from '../../../base/icons/svg/index'; import { IconRaisedHand } from '../../../base/icons/svg';
import { getParticipantById, hasRaisedHand } from '../../../base/participants/functions'; import { getParticipantById, hasRaisedHand } from '../../../base/participants/functions';
import { Participant } from '../../../base/participants/reducer'; import { Participant } from '../../../base/participants/types';
import BaseIndicator from '../../../base/react/components/web/BaseIndicator'; import BaseIndicator from '../../../base/react/components/web/BaseIndicator';
import BaseTheme from '../../../base/ui/components/BaseTheme.web'; import BaseTheme from '../../../base/ui/components/BaseTheme.web';

View File

@ -22,7 +22,7 @@ import {
getParticipantByIdOrUndefined, getParticipantByIdOrUndefined,
hasRaisedHand hasRaisedHand
} from '../../../base/participants/functions'; } from '../../../base/participants/functions';
import { Participant } from '../../../base/participants/reducer'; import { Participant } from '../../../base/participants/types';
import { connect } from '../../../base/redux/functions'; import { connect } from '../../../base/redux/functions';
import { ASPECT_RATIO_NARROW } from '../../../base/responsive-ui/constants'; import { ASPECT_RATIO_NARROW } from '../../../base/responsive-ui/constants';
// @ts-ignore // @ts-ignore

View File

@ -1,10 +1,10 @@
/* eslint-disable lines-around-comment */ /* eslint-disable lines-around-comment */
import { makeStyles, createStyles } from '@material-ui/core'; import { makeStyles, createStyles } from '@material-ui/core';
import React, { useCallback } from 'react'; import React, { useCallback } from 'react';
import { WithTranslation } from 'react-i18next';
import { useStore } from 'react-redux'; import { useStore } from 'react-redux';
// @ts-ignore import { translate } from '../../base/i18n/functions';
import { translate } from '../../base/i18n';
import { Theme } from '../../base/ui/types'; import { Theme } from '../../base/ui/types';
// @ts-ignore // @ts-ignore
import { setSeeWhatIsBeingShared } from '../actions.web'; import { setSeeWhatIsBeingShared } from '../actions.web';
@ -72,7 +72,7 @@ const useStyles = makeStyles((theme: Theme) => createStyles({
* *
* @returns {ReactElement} * @returns {ReactElement}
*/ */
const ScreenSharePlaceholder: React.FC<{ t: Function }> = ({ t }) => { const ScreenSharePlaceholder: React.FC<WithTranslation> = ({ t }) => {
const classes = useStyles(); const classes = useStyles();
const store = useStore(); const store = useStore();

View File

@ -1,6 +1,6 @@
// @ts-ignore // @ts-ignore
import { CONFERENCE_JOINED, CONFERENCE_LEFT, SET_PASSWORD } from '../base/conference'; import { CONFERENCE_JOINED, CONFERENCE_LEFT, SET_PASSWORD } from '../base/conference';
import { Participant } from '../base/participants/reducer'; import { Participant } from '../base/participants/types';
import ReducerRegistry from '../base/redux/ReducerRegistry'; import ReducerRegistry from '../base/redux/ReducerRegistry';
import { import {

View File

@ -4,8 +4,8 @@ import { Dispatch } from 'redux';
// @ts-ignore // @ts-ignore
import { getLocalJitsiAudioTrack } from '../base/tracks'; import { getLocalJitsiAudioTrack } from '../base/tracks';
// @ts-ignore // @ts-ignore
import { NOTIFICATION_TIMEOUT_TYPE, showErrorNotification } from '../notifications'; import { showErrorNotification } from '../notifications';
// @ts-ignore import { NOTIFICATION_TIMEOUT_TYPE } from '../notifications/constants';
import { NoiseSuppressionEffect } from '../stream-effects/noise-suppression/NoiseSuppressionEffect'; import { NoiseSuppressionEffect } from '../stream-effects/noise-suppression/NoiseSuppressionEffect';
import { SET_NOISE_SUPPRESSION_ENABLED } from './actionTypes'; import { SET_NOISE_SUPPRESSION_ENABLED } from './actionTypes';

View File

@ -4,7 +4,7 @@ import { translate } from '../../base/i18n/functions';
import { import {
IconNoiseSuppressionOn, IconNoiseSuppressionOn,
IconNoiseSuppressionOff IconNoiseSuppressionOff
} from '../../base/icons/svg/index'; } from '../../base/icons/svg';
import { connect } from '../../base/redux/functions'; import { connect } from '../../base/redux/functions';
import { import {
AbstractButton, AbstractButton,

View File

@ -1,7 +1,8 @@
/* eslint-disable lines-around-comment */ /* eslint-disable lines-around-comment */
import { IState } from '../app/types'; import { IState } from '../app/types';
// @ts-ignore // @ts-ignore
import { NOTIFICATION_TIMEOUT_TYPE, showWarningNotification } from '../notifications'; import { showWarningNotification } from '../notifications';
import { NOTIFICATION_TIMEOUT_TYPE } from '../notifications/constants';
// @ts-ignore // @ts-ignore
import { isScreenAudioShared } from '../screen-share'; import { isScreenAudioShared } from '../screen-share';

View File

@ -1,4 +1,3 @@
// @ts-ignore
import { getLogger } from '../base/logging/functions'; import { getLogger } from '../base/logging/functions';
export default getLogger('features/noise-suppression'); export default getLogger('features/noise-suppression');

View File

@ -55,7 +55,7 @@ ReducerRegistry.register<IOverlayState>('features/overlay', (state = {}, action)
*/ */
function _mediaPermissionPromptVisibilityChanged( function _mediaPermissionPromptVisibilityChanged(
state: IOverlayState, state: IOverlayState,
{ browser, isVisible }: {browser?: string, isVisible?: boolean}) { { browser, isVisible }: { browser?: string, isVisible?: boolean }) {
return assign(state, { return assign(state, {
browser, browser,
isMediaPermissionPromptVisible: isVisible isMediaPermissionPromptVisible: isVisible
@ -74,7 +74,7 @@ function _mediaPermissionPromptVisibilityChanged(
*/ */
function _toggleSlowGUMOverlay( function _toggleSlowGUMOverlay(
state: IOverlayState, state: IOverlayState,
{ isVisible }: {isVisible?: boolean}) { { isVisible }: { isVisible?: boolean }) {
return assign(state, { return assign(state, {
isSlowGUMOverlayVisible: isVisible isSlowGUMOverlayVisible: isVisible
}); });
@ -102,6 +102,6 @@ function _setShowLoadConfigOverlay(state: IOverlayState, show?: boolean) {
* @returns {Object} * @returns {Object}
* @private * @private
*/ */
function _setFatalError(state: IOverlayState, { fatalError }: {fatalError?: Error}) { function _setFatalError(state: IOverlayState, { fatalError }: { fatalError?: Error }) {
return set(state, 'fatalError', fatalError); return set(state, 'fatalError', fatalError);
} }

View File

@ -6,19 +6,16 @@ import { useTranslation } from 'react-i18next';
import { useSelector } from 'react-redux'; import { useSelector } from 'react-redux';
import { IState } from '../../../../../app/types'; import { IState } from '../../../../../app/types';
// @ts-ignore import ListItem from '../../../../../base/components/participants-pane-list/ListItem';
import { ListItem } from '../../../../../base/components';
import Icon from '../../../../../base/icons/components/Icon'; import Icon from '../../../../../base/icons/components/Icon';
import { IconArrowDown, IconArrowUp } from '../../../../../base/icons/svg/index'; import { IconArrowDown, IconArrowUp } from '../../../../../base/icons/svg';
import { isLocalParticipantModerator } from '../../../../../base/participants/functions'; import { isLocalParticipantModerator } from '../../../../../base/participants/functions';
// @ts-ignore // @ts-ignore
import { showOverflowDrawer } from '../../../../../toolbox/functions.web'; import { showOverflowDrawer } from '../../../../../toolbox/functions.web';
// @ts-ignore
import { ACTION_TRIGGER } from '../../../../constants'; import { ACTION_TRIGGER } from '../../../../constants';
// @ts-ignore // @ts-ignore
import { participantMatchesSearch } from '../../../../functions'; import { participantMatchesSearch } from '../../../../functions';
import ParticipantActionEllipsis from '../../../web/ParticipantActionEllipsis'; import ParticipantActionEllipsis from '../../../web/ParticipantActionEllipsis';
// @ts-ignore
import ParticipantItem from '../../../web/ParticipantItem'; import ParticipantItem from '../../../web/ParticipantItem';
type Props = { type Props = {
@ -41,7 +38,7 @@ type Props = {
/** /**
* Callback for when the mouse leaves this component. * Callback for when the mouse leaves this component.
*/ */
onLeave?: Function, onLeave?: (e?: React.MouseEvent) => void,
/** /**
* Callback to raise menu. Used to raise menu on mobile long press. * Callback to raise menu. Used to raise menu on mobile long press.
@ -135,7 +132,7 @@ export const CollapsibleRoom = ({
onRaiseMenu(target); onRaiseMenu(target);
}, [ onRaiseMenu ]); }, [ onRaiseMenu ]);
const { defaultRemoteDisplayName } = useSelector((state: IState) => state['features/base/config']); const { defaultRemoteDisplayName } = useSelector((state: IState) => state['features/base/config']);
const overflowDrawer = useSelector(showOverflowDrawer); const overflowDrawer: boolean = useSelector(showOverflowDrawer);
const moderator = useSelector(isLocalParticipantModerator); const moderator = useSelector(isLocalParticipantModerator);
const arrow = (<div className = { styles.arrowContainer }> const arrow = (<div className = { styles.arrowContainer }>

View File

@ -1,7 +1,7 @@
import React from 'react'; import React from 'react';
import { useTranslation } from 'react-i18next'; import { useTranslation } from 'react-i18next';
import { IconHorizontalPoints } from '../../../../../base/icons/svg/index'; import { IconHorizontalPoints } from '../../../../../base/icons/svg';
import Button from '../../../../../base/ui/components/web/Button'; import Button from '../../../../../base/ui/components/web/Button';
type Props = { type Props = {

View File

@ -1,4 +1,4 @@
/* eslint-disable import/order */ /* eslint-disable lines-around-comment */
import { makeStyles } from '@material-ui/core'; import { makeStyles } from '@material-ui/core';
import React, { useCallback, useMemo } from 'react'; import React, { useCallback, useMemo } from 'react';
import { useTranslation } from 'react-i18next'; import { useTranslation } from 'react-i18next';
@ -6,22 +6,16 @@ import { useSelector } from 'react-redux';
// @ts-ignore // @ts-ignore
import { Avatar } from '../../../../../base/avatar'; import { Avatar } from '../../../../../base/avatar';
// @ts-ignore // @ts-ignore
import { ContextMenu, ContextMenuItemGroup } from '../../../../../base/components'; import { ContextMenu, ContextMenuItemGroup } from '../../../../../base/components';
import { isLocalParticipantModerator } from '../../../../../base/participants/functions'; import { isLocalParticipantModerator } from '../../../../../base/participants/functions';
import { Theme } from '../../../../../base/ui/types'; import { Theme } from '../../../../../base/ui/types';
// @ts-ignore // @ts-ignore
import { getBreakoutRooms } from '../../../../../breakout-rooms/functions'; import { getBreakoutRooms } from '../../../../../breakout-rooms/functions';
// @ts-ignore // @ts-ignore
import { showOverflowDrawer } from '../../../../../toolbox/functions.web'; import { showOverflowDrawer } from '../../../../../toolbox/functions.web';
// @ts-ignore // @ts-ignore
import SendToRoomButton from '../../../../../video-menu/components/web/SendToRoomButton'; import SendToRoomButton from '../../../../../video-menu/components/web/SendToRoomButton';
// @ts-ignore
import { AVATAR_SIZE } from '../../../../constants'; import { AVATAR_SIZE } from '../../../../constants';
type Props = { type Props = {

View File

@ -5,7 +5,7 @@ import { useDispatch, useSelector } from 'react-redux';
// @ts-ignore // @ts-ignore
import { openDialog, openSheet } from '../../../base/dialog'; import { openDialog, openSheet } from '../../../base/dialog';
import { IconHorizontalPoints } from '../../../base/icons/svg/index'; import { IconHorizontalPoints } from '../../../base/icons/svg';
import IconButton from '../../../base/react/components/native/IconButton'; import IconButton from '../../../base/react/components/native/IconButton';
import Button from '../../../base/ui/components/native/Button'; import Button from '../../../base/ui/components/native/Button';
import { BUTTON_TYPES } from '../../../base/ui/constants'; import { BUTTON_TYPES } from '../../../base/ui/constants';

View File

@ -16,8 +16,8 @@ import {
isSupported as isAvModerationSupported isSupported as isAvModerationSupported
// @ts-ignore // @ts-ignore
} from '../../../av-moderation/functions'; } from '../../../av-moderation/functions';
// @ts-ignore import ContextMenu from '../../../base/components/context-menu/ContextMenu';
import { ContextMenu, ContextMenuItemGroup } from '../../../base/components'; import ContextMenuItemGroup from '../../../base/components/context-menu/ContextMenuItemGroup';
// @ts-ignore // @ts-ignore
import { openDialog } from '../../../base/dialog'; import { openDialog } from '../../../base/dialog';
import { import {
@ -80,12 +80,12 @@ type Props = {
/** /**
* Drawer close callback. * Drawer close callback.
*/ */
onDrawerClose: Function, onDrawerClose: (e?: React.MouseEvent) => void,
/** /**
* Callback for the mouse leaving this item. * Callback for the mouse leaving this item.
*/ */
onMouseLeave?: Function onMouseLeave?: (e?: React.MouseEvent) => void
}; };
export const FooterContextMenu = ({ isOpen, onDrawerClose, onMouseLeave }: Props) => { export const FooterContextMenu = ({ isOpen, onDrawerClose, onMouseLeave }: Props) => {

View File

@ -5,7 +5,7 @@ import { useDispatch } from 'react-redux';
// @ts-ignore // @ts-ignore
import { createToolbarEvent, sendAnalytics } from '../../../analytics'; import { createToolbarEvent, sendAnalytics } from '../../../analytics';
import { IconInviteMore } from '../../../base/icons/svg/index'; import { IconInviteMore } from '../../../base/icons/svg';
import Button from '../../../base/ui/components/web/Button'; import Button from '../../../base/ui/components/web/Button';
import { BUTTON_TYPES } from '../../../base/ui/constants'; import { BUTTON_TYPES } from '../../../base/ui/constants';
// @ts-ignore // @ts-ignore

View File

@ -4,21 +4,19 @@ import React, { useCallback, useState, useRef } from 'react';
import { useTranslation } from 'react-i18next'; import { useTranslation } from 'react-i18next';
import { useSelector } from 'react-redux'; import { useSelector } from 'react-redux';
// @ts-ignore import ContextMenu from '../../../base/components/context-menu/ContextMenu';
import { ContextMenu, ContextMenuItemGroup } from '../../../base/components'; import ContextMenuItemGroup from '../../../base/components/context-menu/ContextMenuItemGroup';
import { IconChat, IconCloseCircle, IconHorizontalPoints } from '../../../base/icons/svg/index'; import { IconChat, IconCloseCircle, IconHorizontalPoints } from '../../../base/icons/svg';
import { hasRaisedHand } from '../../../base/participants/functions'; import { hasRaisedHand } from '../../../base/participants/functions';
import { Participant } from '../../../base/participants/reducer'; import { Participant } from '../../../base/participants/types';
import Button from '../../../base/ui/components/web/Button'; import Button from '../../../base/ui/components/web/Button';
import { BUTTON_TYPES } from '../../../base/ui/constants'; import { BUTTON_TYPES } from '../../../base/ui/constants';
// @ts-ignore // @ts-ignore
import { showLobbyChatButton } from '../../../lobby/functions'; import { showLobbyChatButton } from '../../../lobby/functions';
// @ts-ignore
import { ACTION_TRIGGER, MEDIA_STATE } from '../../constants'; import { ACTION_TRIGGER, MEDIA_STATE } from '../../constants';
// @ts-ignore // @ts-ignore
import { useLobbyActions } from '../../hooks'; import { useLobbyActions } from '../../hooks';
// @ts-ignore
import ParticipantItem from './ParticipantItem'; import ParticipantItem from './ParticipantItem';
type Props = { type Props = {

View File

@ -7,7 +7,7 @@ import { useSelector, useDispatch } from 'react-redux';
// @ts-ignore // @ts-ignore
import { Avatar } from '../../../base/avatar'; import { Avatar } from '../../../base/avatar';
import Icon from '../../../base/icons/components/Icon'; import Icon from '../../../base/icons/components/Icon';
import { IconCheck, IconClose } from '../../../base/icons/svg/index'; import { IconCheck, IconClose } from '../../../base/icons/svg';
import { withPixelLineHeight } from '../../../base/styles/functions.web'; import { withPixelLineHeight } from '../../../base/styles/functions.web';
// @ts-ignore // @ts-ignore
import { admitMultiple } from '../../../lobby/actions.web'; import { admitMultiple } from '../../../lobby/actions.web';

View File

@ -58,7 +58,7 @@ const useStyles = makeStyles((theme: any) => {
}); });
type Props = { type Props = {
currentRoom?: {name: string}, currentRoom?: { name: string },
overflowDrawer?: boolean, overflowDrawer?: boolean,
participantsCount?: number, participantsCount?: number,
searchString: string, searchString: string,

View File

@ -1,6 +1,6 @@
import React from 'react'; import React from 'react';
import { IconHorizontalPoints } from '../../../base/icons/svg/index'; import { IconHorizontalPoints } from '../../../base/icons/svg';
import Button from '../../../base/ui/components/web/Button'; import Button from '../../../base/ui/components/web/Button';
type Props = { type Props = {

View File

@ -5,10 +5,8 @@ import { WithTranslation } from 'react-i18next';
// @ts-ignore // @ts-ignore
import { Avatar } from '../../../base/avatar'; import { Avatar } from '../../../base/avatar';
// @ts-ignore import ListItem from '../../../base/components/participants-pane-list/ListItem';
import { ListItem } from '../../../base/components'; import { translate } from '../../../base/i18n/functions';
// @ts-ignore
import { translate } from '../../../base/i18n';
import { import {
ACTION_TRIGGER, ACTION_TRIGGER,
AudioStateIcons, AudioStateIcons,
@ -16,10 +14,8 @@ import {
type ActionTrigger, type ActionTrigger,
type MediaState, type MediaState,
VideoStateIcons VideoStateIcons
// @ts-ignore
} from '../../constants'; } from '../../constants';
// @ts-ignore
import { RaisedHandIndicator } from './RaisedHandIndicator'; import { RaisedHandIndicator } from './RaisedHandIndicator';
interface Props extends WithTranslation { interface Props extends WithTranslation {
@ -37,17 +33,17 @@ interface Props extends WithTranslation {
/** /**
* React children. * React children.
*/ */
children?: ReactElement, children?: ReactElement|boolean,
/** /**
* Whether or not to disable the moderator indicator. * Whether or not to disable the moderator indicator.
*/ */
disableModeratorIndicator: boolean, disableModeratorIndicator?: boolean,
/** /**
* The name of the participant. Used for showing lobby names. * The name of the participant. Used for showing lobby names.
*/ */
displayName: string, displayName?: string,
/** /**
* Is this item highlighted/raised. * Is this item highlighted/raised.
@ -57,17 +53,17 @@ interface Props extends WithTranslation {
/** /**
* Whether or not the participant is a moderator. * Whether or not the participant is a moderator.
*/ */
isModerator: boolean, isModerator?: boolean,
/** /**
* True if the participant is local. * True if the participant is local.
*/ */
local: boolean, local?: boolean,
/** /**
* Callback for when the mouse leaves this component. * Callback for when the mouse leaves this component.
*/ */
onLeave?: Function, onLeave?: (e?: React.MouseEvent) => void,
/** /**
* Opens a drawer with participant actions. * Opens a drawer with participant actions.

View File

@ -8,7 +8,6 @@ import { useDispatch } from 'react-redux';
import { approveParticipant } from '../../../av-moderation/actions'; import { approveParticipant } from '../../../av-moderation/actions';
import Button from '../../../base/ui/components/web/Button'; import Button from '../../../base/ui/components/web/Button';
import { Theme } from '../../../base/ui/types'; import { Theme } from '../../../base/ui/types';
// @ts-ignore
import { QUICK_ACTION_BUTTON } from '../../constants'; import { QUICK_ACTION_BUTTON } from '../../constants';
type Props = { type Props = {

View File

@ -8,7 +8,7 @@ import participantsPaneTheme from '../../../base/components/themes/participantsP
// @ts-ignore // @ts-ignore
import { openDialog } from '../../../base/dialog'; import { openDialog } from '../../../base/dialog';
import { translate } from '../../../base/i18n/functions'; import { translate } from '../../../base/i18n/functions';
import { IconClose, IconHorizontalPoints } from '../../../base/icons/svg/index'; import { IconClose, IconHorizontalPoints } from '../../../base/icons/svg';
// @ts-ignore // @ts-ignore
import { isLocalParticipantModerator } from '../../../base/participants/functions'; import { isLocalParticipantModerator } from '../../../base/participants/functions';
import { connect } from '../../../base/redux/functions'; import { connect } from '../../../base/redux/functions';
@ -29,16 +29,12 @@ import {
isMuteAllVisible isMuteAllVisible
// @ts-ignore // @ts-ignore
} from '../../functions'; } from '../../functions';
// @ts-ignore
import { AddBreakoutRoomButton } from '../breakout-rooms/components/web/AddBreakoutRoomButton'; import { AddBreakoutRoomButton } from '../breakout-rooms/components/web/AddBreakoutRoomButton';
// @ts-ignore // @ts-ignore
import { RoomList } from '../breakout-rooms/components/web/RoomList'; import { RoomList } from '../breakout-rooms/components/web/RoomList';
// @ts-ignore
import { FooterContextMenu } from './FooterContextMenu'; import { FooterContextMenu } from './FooterContextMenu';
// @ts-ignore
import LobbyParticipants from './LobbyParticipants'; import LobbyParticipants from './LobbyParticipants';
// @ts-ignore
import MeetingParticipants from './MeetingParticipants'; import MeetingParticipants from './MeetingParticipants';
/** /**

View File

@ -2,7 +2,7 @@ import { makeStyles } from '@material-ui/styles';
import React from 'react'; import React from 'react';
import Icon from '../../../base/icons/components/Icon'; import Icon from '../../../base/icons/components/Icon';
import { IconRaisedHandHollow } from '../../../base/icons/svg/index'; import { IconRaisedHandHollow } from '../../../base/icons/svg';
import BaseTheme from '../../../base/ui/components/BaseTheme.web'; import BaseTheme from '../../../base/ui/components/BaseTheme.web';
const useStyles = makeStyles((theme: any) => { const useStyles = makeStyles((theme: any) => {

View File

@ -18,7 +18,7 @@ export type ActionTrigger = 'Hover' | 'Permanent'
/** /**
* Enum of possible participant action triggers. * Enum of possible participant action triggers.
*/ */
export const ACTION_TRIGGER: {HOVER: ActionTrigger, PERMANENT: ActionTrigger} = { export const ACTION_TRIGGER: { HOVER: ActionTrigger, PERMANENT: ActionTrigger } = {
HOVER: 'Hover', HOVER: 'Hover',
PERMANENT: 'Permanent' PERMANENT: 'Permanent'
}; };

View File

@ -8,10 +8,7 @@ import { BUTTON_TYPES } from '../../../base/ui/constants';
import { Theme } from '../../../base/ui/types'; import { Theme } from '../../../base/ui/types';
// @ts-ignore // @ts-ignore
import { isSubmitAnswerDisabled } from '../../functions'; import { isSubmitAnswerDisabled } from '../../functions';
// @ts-ignore import AbstractPollAnswer, { AbstractProps } from '../AbstractPollAnswer';
import AbstractPollAnswer from '../AbstractPollAnswer';
// @ts-ignore
import type { AbstractProps } from '../AbstractPollAnswer';
const useStyles = makeStyles((theme: Theme) => { const useStyles = makeStyles((theme: Theme) => {
return { return {

View File

@ -3,13 +3,12 @@ import { makeStyles } from '@material-ui/core';
import React, { useCallback, useEffect, useRef, useState } from 'react'; import React, { useCallback, useEffect, useRef, useState } from 'react';
import Icon from '../../../base/icons/components/Icon'; import Icon from '../../../base/icons/components/Icon';
import { IconMenu } from '../../../base/icons/svg/index'; import { IconMenu } from '../../../base/icons/svg';
// @ts-ignore // @ts-ignore
import { Tooltip } from '../../../base/tooltip'; import { Tooltip } from '../../../base/tooltip';
import Button from '../../../base/ui/components/web/Button'; import Button from '../../../base/ui/components/web/Button';
import { BUTTON_TYPES } from '../../../base/ui/constants'; import { BUTTON_TYPES } from '../../../base/ui/constants';
import { Theme } from '../../../base/ui/types'; import { Theme } from '../../../base/ui/types';
// @ts-ignore
import { ANSWERS_LIMIT, CHAR_LIMIT } from '../../constants'; import { ANSWERS_LIMIT, CHAR_LIMIT } from '../../constants';
// @ts-ignore // @ts-ignore
import AbstractPollCreate from '../AbstractPollCreate'; import AbstractPollCreate from '../AbstractPollCreate';

View File

@ -7,7 +7,6 @@ import AbstractPollsPane from '../AbstractPollsPane';
// @ts-ignore // @ts-ignore
import type { AbstractProps } from '../AbstractPollsPane'; import type { AbstractProps } from '../AbstractPollsPane';
// @ts-ignore
import PollCreate from './PollCreate'; import PollCreate from './PollCreate';
// @ts-ignore // @ts-ignore
import PollsList from './PollsList'; import PollsList from './PollsList';

View File

@ -23,7 +23,7 @@ import { setAudioOnly } from '../../base/audio-only/actions';
import { getConferenceName } from '../../base/conference/functions'; import { getConferenceName } from '../../base/conference/functions';
// @ts-ignore // @ts-ignore
import { connect } from '../../base/connection/actions.native'; import { connect } from '../../base/connection/actions.native';
import { IconClose } from '../../base/icons/svg/index'; import { IconClose } from '../../base/icons/svg';
// @ts-ignore // @ts-ignore
import JitsiScreen from '../../base/modal/components/JitsiScreen'; import JitsiScreen from '../../base/modal/components/JitsiScreen';
import { getLocalParticipant } from '../../base/participants/functions'; import { getLocalParticipant } from '../../base/participants/functions';

View File

@ -7,7 +7,7 @@ import { WithTranslation } from 'react-i18next';
import { Avatar } from '../../../base/avatar'; import { Avatar } from '../../../base/avatar';
import { translate } from '../../../base/i18n/functions'; import { translate } from '../../../base/i18n/functions';
import Icon from '../../../base/icons/components/Icon'; import Icon from '../../../base/icons/components/Icon';
import { IconClose } from '../../../base/icons/svg/index'; import { IconClose } from '../../../base/icons/svg';
// @ts-ignore // @ts-ignore
import Label from '../Label'; import Label from '../Label';

View File

@ -5,7 +5,7 @@ import { WithTranslation } from 'react-i18next';
import { translate } from '../../../base/i18n/functions'; import { translate } from '../../../base/i18n/functions';
import Icon from '../../../base/icons/components/Icon'; import Icon from '../../../base/icons/components/Icon';
import { IconArrowLeft } from '../../../base/icons/svg/index'; import { IconArrowLeft } from '../../../base/icons/svg';
// @ts-ignore // @ts-ignore
import { ActionButton } from '../../../base/premeeting'; import { ActionButton } from '../../../base/premeeting';
// @ts-ignore // @ts-ignore

View File

@ -5,7 +5,7 @@ import { WithTranslation } from 'react-i18next';
import { translate } from '../../../base/i18n/functions'; import { translate } from '../../../base/i18n/functions';
import Icon from '../../../base/icons/components/Icon'; import Icon from '../../../base/icons/components/Icon';
import { IconClose } from '../../../base/icons/svg/index'; import { IconClose } from '../../../base/icons/svg';
// @ts-ignore // @ts-ignore
import { ActionButton } from '../../../base/premeeting'; import { ActionButton } from '../../../base/premeeting';
// @ts-ignore // @ts-ignore

View File

@ -159,7 +159,7 @@ ReducerRegistry.register<IPrejoinState>(
* @returns {Object} * @returns {Object}
*/ */
function getStatusFromErrors(errors: { function getStatusFromErrors(errors: {
audioAndVideoError?: {message: string}, audioAndVideoError?: { message: string },
audioOnlyError?: { message: string }, audioOnlyError?: { message: string },
videoOnlyError?: Object } videoOnlyError?: Object }
) { ) {

View File

@ -1,4 +1,4 @@
/* eslint-disable import/order */ /* eslint-disable lines-around-comment */
import { withStyles } from '@material-ui/styles'; import { withStyles } from '@material-ui/styles';
import clsx from 'clsx'; import clsx from 'clsx';
import React, { Component } from 'react'; import React, { Component } from 'react';
@ -9,24 +9,20 @@ import {
createReactionMenuEvent, createReactionMenuEvent,
createToolbarEvent, createToolbarEvent,
sendAnalytics sendAnalytics
// @ts-ignore // @ts-ignore
} from '../../../analytics'; } from '../../../analytics';
import { IState, IStore } from '../../../app/types'; import { IState, IStore } from '../../../app/types';
import { isMobileBrowser } from '../../../base/environment/utils'; import { isMobileBrowser } from '../../../base/environment/utils';
import { getLocalParticipant, hasRaisedHand } from '../../../base/participants/functions';
import { raiseHand } from '../../../base/participants/actions';
import { translate } from '../../../base/i18n/functions'; import { translate } from '../../../base/i18n/functions';
import { raiseHand } from '../../../base/participants/actions';
import { getLocalParticipant, hasRaisedHand } from '../../../base/participants/functions';
import { connect } from '../../../base/redux/functions'; import { connect } from '../../../base/redux/functions';
import { Theme } from '../../../base/ui/types'; import { Theme } from '../../../base/ui/types';
import GifsMenu from '../../../gifs/components/web/GifsMenu';
// @ts-ignore // @ts-ignore
import { GifsMenu, GifsMenuButton } from '../../../gifs/components'; import GifsMenuButton from '../../../gifs/components/web/GifsMenuButton';
// @ts-ignore // @ts-ignore
import { isGifEnabled, isGifsMenuOpen } from '../../../gifs/functions'; import { isGifEnabled, isGifsMenuOpen } from '../../../gifs/functions';
// @ts-ignore // @ts-ignore
import { dockToolbox } from '../../../toolbox/actions.web'; import { dockToolbox } from '../../../toolbox/actions.web';
import { addReactionToBuffer } from '../../actions.any'; import { addReactionToBuffer } from '../../actions.any';

View File

@ -6,7 +6,7 @@ import { useSelector } from 'react-redux';
import { IState } from '../../../app/types'; import { IState } from '../../../app/types';
import { isMobileBrowser } from '../../../base/environment/utils'; import { isMobileBrowser } from '../../../base/environment/utils';
import { translate } from '../../../base/i18n/functions'; import { translate } from '../../../base/i18n/functions';
import { IconArrowUp } from '../../../base/icons/svg/index'; import { IconArrowUp } from '../../../base/icons/svg';
import { connect } from '../../../base/redux/functions'; import { connect } from '../../../base/redux/functions';
// @ts-ignore // @ts-ignore
import ToolboxButtonWithIconPopup from '../../../base/toolbox/components/web/ToolboxButtonWithIconPopup'; import ToolboxButtonWithIconPopup from '../../../base/toolbox/components/web/ToolboxButtonWithIconPopup';

View File

@ -1,4 +1,3 @@
// @ts-ignore
import { getLogger } from '../base/logging/functions'; import { getLogger } from '../base/logging/functions';
export default getLogger('features/base/reactions'); export default getLogger('features/base/reactions');

View File

@ -1,16 +1,14 @@
/* eslint-disable import/order */ /* eslint-disable lines-around-comment */
import { batch } from 'react-redux'; import { batch } from 'react-redux';
// @ts-ignore // @ts-ignore
import { createReactionSoundsDisabledEvent, sendAnalytics } from '../analytics'; import { createReactionSoundsDisabledEvent, sendAnalytics } from '../analytics';
import { IStore } from '../app/types'; import { IStore } from '../app/types';
import { APP_WILL_MOUNT, APP_WILL_UNMOUNT } from '../base/app/actionTypes'; import { APP_WILL_MOUNT, APP_WILL_UNMOUNT } from '../base/app/actionTypes';
import { import {
CONFERENCE_JOIN_IN_PROGRESS, CONFERENCE_JOIN_IN_PROGRESS,
SET_START_REACTIONS_MUTED, SET_START_REACTIONS_MUTED,
setStartReactionsMuted setStartReactionsMuted
// @ts-ignore // @ts-ignore
} from '../base/conference'; } from '../base/conference';
import { import {
@ -18,19 +16,14 @@ import {
getParticipantCount, getParticipantCount,
isLocalParticipantModerator isLocalParticipantModerator
} from '../base/participants/functions'; } from '../base/participants/functions';
import MiddlewareRegistry from '../base/redux/MiddlewareRegistry'; import MiddlewareRegistry from '../base/redux/MiddlewareRegistry';
import { SETTINGS_UPDATED } from '../base/settings/actionTypes'; import { SETTINGS_UPDATED } from '../base/settings/actionTypes';
// @ts-ignore // @ts-ignore
import { updateSettings } from '../base/settings/actions'; import { updateSettings } from '../base/settings/actions';
// @ts-ignore // @ts-ignore
import { playSound, registerSound, unregisterSound } from '../base/sounds'; import { playSound, registerSound, unregisterSound } from '../base/sounds';
// @ts-ignore // @ts-ignore
import { getDisabledSounds } from '../base/sounds/functions.any'; import { getDisabledSounds } from '../base/sounds/functions.any';
// @ts-ignore // @ts-ignore
import { NOTIFICATION_TIMEOUT_TYPE, showNotification } from '../notifications'; import { NOTIFICATION_TIMEOUT_TYPE, showNotification } from '../notifications';

View File

@ -1,20 +1,14 @@
/* eslint-disable import/order */ /* eslint-disable lines-around-comment */
import { v4 as uuidV4 } from 'uuid'; import { v4 as uuidV4 } from 'uuid';
import fixWebmDuration from 'webm-duration-fix'; import fixWebmDuration from 'webm-duration-fix';
import { IStore } from '../../../app/types'; import { IStore } from '../../../app/types';
// @ts-ignore // @ts-ignore
import { getRoomName } from '../../../base/conference'; import { getRoomName } from '../../../base/conference';
import { MEDIA_TYPE } from '../../../base/media/constants';
// @ts-ignore
import { MEDIA_TYPE } from '../../../base/media';
// @ts-ignore // @ts-ignore
import { getTrackState, getLocalTrack } from '../../../base/tracks'; import { getTrackState, getLocalTrack } from '../../../base/tracks';
import { inIframe } from '../../../base/util/iframeUtils'; import { inIframe } from '../../../base/util/iframeUtils';
// @ts-ignore // @ts-ignore
import { stopLocalVideoRecording } from '../../actions.any'; import { stopLocalVideoRecording } from '../../actions.any';

View File

@ -8,8 +8,7 @@ import { StartRecordingDialog } from '../..';
import { openDialog } from '../../../../base/dialog'; import { openDialog } from '../../../../base/dialog';
import { translate } from '../../../../base/i18n/functions'; import { translate } from '../../../../base/i18n/functions';
import { IconHighlight } from '../../../../base/icons/svg'; import { IconHighlight } from '../../../../base/icons/svg';
// @ts-ignore import Label from '../../../../base/label/components/web/Label';
import { Label } from '../../../../base/label';
import { connect } from '../../../../base/redux/functions'; import { connect } from '../../../../base/redux/functions';
// @ts-ignore // @ts-ignore
import { Tooltip } from '../../../../base/tooltip'; import { Tooltip } from '../../../../base/tooltip';
@ -154,8 +153,8 @@ export class HighlightButton extends AbstractHighlightButton<Props, State> {
* @param {Event} e - The click event. * @param {Event} e - The click event.
* @returns {void} * @returns {void}
*/ */
_onClick(e: React.MouseEvent) { _onClick(e?: React.MouseEvent) {
e.stopPropagation(); e?.stopPropagation();
// @ts-ignore // @ts-ignore
const { _disabled } = this.props; const { _disabled } = this.props;

Some files were not shown because too many files have changed in this diff Show More