ref(eslint) Use new TypeScript ESlint config (#12143)

Use new TS config from @jitsi/eslint
Fix all lint errors
This commit is contained in:
Robert Pintilii 2022-09-08 12:52:36 +03:00 committed by GitHub
parent e296008d95
commit 10bb186c13
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
198 changed files with 1199 additions and 1215 deletions

14
package-lock.json generated
View File

@ -137,7 +137,7 @@
"@babel/preset-flow": "7.16.0", "@babel/preset-flow": "7.16.0",
"@babel/preset-react": "7.16.0", "@babel/preset-react": "7.16.0",
"@babel/runtime": "7.16.0", "@babel/runtime": "7.16.0",
"@jitsi/eslint-config": "4.0.0", "@jitsi/eslint-config": "4.1.2",
"@types/js-md5": "0.4.3", "@types/js-md5": "0.4.3",
"@types/lodash": "4.14.182", "@types/lodash": "4.14.182",
"@types/react": "17.0.14", "@types/react": "17.0.14",
@ -3447,9 +3447,9 @@
} }
}, },
"node_modules/@jitsi/eslint-config": { "node_modules/@jitsi/eslint-config": {
"version": "4.0.0", "version": "4.1.2",
"resolved": "https://registry.npmjs.org/@jitsi/eslint-config/-/eslint-config-4.0.0.tgz", "resolved": "https://registry.npmjs.org/@jitsi/eslint-config/-/eslint-config-4.1.2.tgz",
"integrity": "sha512-DGk6HiaYUDWM5YNLuzPZ0oxFzI1BvgbS7ogi1KR6nUB1pdoQY2dFL73J3hm7QgNZbc7+x/xhXwnNk9f2aAaVTQ==", "integrity": "sha512-kAkCLEKSWdwqj8L026T/5+FttvPLmNkPPETfgzG4SxWdkIVsW8wqFN/RypUZp2H7NmL5AgVL+QkXQXoEoQgW8A==",
"dev": true, "dev": true,
"peerDependencies": { "peerDependencies": {
"@babel/eslint-parser": ">= 7", "@babel/eslint-parser": ">= 7",
@ -22389,9 +22389,9 @@
} }
}, },
"@jitsi/eslint-config": { "@jitsi/eslint-config": {
"version": "4.0.0", "version": "4.1.2",
"resolved": "https://registry.npmjs.org/@jitsi/eslint-config/-/eslint-config-4.0.0.tgz", "resolved": "https://registry.npmjs.org/@jitsi/eslint-config/-/eslint-config-4.1.2.tgz",
"integrity": "sha512-DGk6HiaYUDWM5YNLuzPZ0oxFzI1BvgbS7ogi1KR6nUB1pdoQY2dFL73J3hm7QgNZbc7+x/xhXwnNk9f2aAaVTQ==", "integrity": "sha512-kAkCLEKSWdwqj8L026T/5+FttvPLmNkPPETfgzG4SxWdkIVsW8wqFN/RypUZp2H7NmL5AgVL+QkXQXoEoQgW8A==",
"dev": true "dev": true
}, },
"@jitsi/js-utils": { "@jitsi/js-utils": {

View File

@ -142,7 +142,7 @@
"@babel/preset-flow": "7.16.0", "@babel/preset-flow": "7.16.0",
"@babel/preset-react": "7.16.0", "@babel/preset-react": "7.16.0",
"@babel/runtime": "7.16.0", "@babel/runtime": "7.16.0",
"@jitsi/eslint-config": "4.0.0", "@jitsi/eslint-config": "4.1.2",
"@types/js-md5": "0.4.3", "@types/js-md5": "0.4.3",
"@types/lodash": "4.14.182", "@types/lodash": "4.14.182",
"@types/react": "17.0.14", "@types/react": "17.0.14",

View File

@ -9,27 +9,7 @@ module.exports = {
'overrides': [ 'overrides': [
{ {
'files': [ '*.ts', '*.tsx' ], 'files': [ '*.ts', '*.tsx' ],
parser: '@typescript-eslint/parser', extends: [ '@jitsi/eslint-config/typescript' ]
rules: {
'no-undef': 'off',
'no-use-before-define': 'off',
'@typescript-eslint/ban-ts-comment': 'off',
'@typescript-eslint/no-empty-function': 'off',
'@typescript-eslint/ban-types': 'off',
'@typescript-eslint/no-explicit-any': 'off',
'no-prototype-builtins': 'off',
'no-shadow': 'off',
'@typescript-eslint/no-shadow': [ 'error' ],
'typescript-sort-keys/interface': 'error',
'typescript-sort-keys/string-enum': 'error',
'object-curly-spacing': 'off',
'@typescript-eslint/object-curly-spacing': [ 'error', 'always' ]
},
'plugins': [ '@typescript-eslint', 'typescript-sort-keys' ],
'extends': [
'plugin:@typescript-eslint/eslint-recommended',
'plugin:@typescript-eslint/recommended'
]
} }
], ],
'rules': { 'rules': {

View File

@ -311,7 +311,7 @@ export function createInviteDialogEvent(
* @returns {Object} * @returns {Object}
*/ */
export function createNetworkInfoEvent({ isOnline, networkType, details }: export function createNetworkInfoEvent({ isOnline, networkType, details }:
{ details?: Object, isOnline: boolean, networkType?: string }) { { details?: Object; isOnline: boolean; networkType?: string; }) {
const attributes: { const attributes: {
details?: Object; details?: Object;
isOnline: boolean; isOnline: boolean;
@ -471,11 +471,11 @@ export function createLiveStreamingDialogEvent(dialogName: string, buttonName: s
* sendAnalytics. * sendAnalytics.
*/ */
export function createLocalTracksDurationEvent(duration: { export function createLocalTracksDurationEvent(duration: {
audio: { value: number }; audio: { value: number; };
conference: { value: number }; conference: { value: number; };
video: { video: {
camera: { value: number }; camera: { value: number; };
desktop: { value: number }; desktop: { value: number; };
}; };
}) { }) {
const { audio, video, conference } = duration; const { audio, video, conference } = duration;

View File

@ -67,7 +67,7 @@ export function resetAnalytics() {
* @param {Store} store - The redux store in which the specified {@code action} is being dispatched. * @param {Store} store - The redux store in which the specified {@code action} is being dispatched.
* @returns {Promise} Resolves with the handlers that have been successfully loaded. * @returns {Promise} Resolves with the handlers that have been successfully loaded.
*/ */
export async function createHandlers({ getState }: { getState: Function }) { export async function createHandlers({ getState }: { getState: Function; }) {
getJitsiMeetGlobalNS().analyticsHandlers = []; getJitsiMeetGlobalNS().analyticsHandlers = [];
if (!isAnalyticsEnabled(getState)) { if (!isAnalyticsEnabled(getState)) {
@ -98,15 +98,15 @@ export async function createHandlers({ getState }: { getState: Function }) {
const handlerConstructorOptions = { const handlerConstructorOptions = {
amplitudeAPPKey, amplitudeAPPKey,
blackListedEvents, blackListedEvents,
envType: (deploymentInfo && deploymentInfo.envType) || 'dev', envType: deploymentInfo?.envType || 'dev',
googleAnalyticsTrackingId, googleAnalyticsTrackingId,
matomoEndpoint, matomoEndpoint,
matomoSiteID, matomoSiteID,
group, group,
host, host,
product: deploymentInfo && deploymentInfo.product, product: deploymentInfo?.product,
subproduct: deploymentInfo && deploymentInfo.environment, subproduct: deploymentInfo?.environment,
user: user && user.id, user: user?.id,
version: JitsiMeetJS.version, version: JitsiMeetJS.version,
whiteListedEvents whiteListedEvents
}; };

View File

@ -3,7 +3,7 @@ export interface IEvent {
actionSubject?: string; actionSubject?: string;
attributes?: { attributes?: {
[key: string]: string | undefined; [key: string]: string | undefined;
}, };
name?: string; name?: string;
source?: string; source?: string;
type?: string; type?: string;

View File

@ -67,7 +67,7 @@ class GoogleAnalyticsHandler extends AbstractHandler {
* @private * @private
*/ */
_extractValue(event: IEvent) { _extractValue(event: IEvent) {
let value: string|number|undefined = event && event.attributes && event.attributes.value; let value: string | number | undefined = event?.attributes?.value;
// Try to extract an integer from the "value" attribute. // Try to extract an integer from the "value" attribute.
value = Math.round(parseFloat(value ?? '')); value = Math.round(parseFloat(value ?? ''));

View File

@ -88,7 +88,7 @@ export default class MatomoHandler extends AbstractHandler {
* @private * @private
*/ */
_extractValue(event: IEvent) { _extractValue(event: IEvent) {
const value = event && event.attributes && event.attributes.value; const value = event?.attributes?.value;
// Try to extract an integer from the 'value' attribute. // Try to extract an integer from the 'value' attribute.
return Math.round(parseFloat(value ?? '')); return Math.round(parseFloat(value ?? ''));
@ -152,7 +152,8 @@ export default class MatomoHandler extends AbstractHandler {
} }
const value = this._extractValue(event); const value = this._extractValue(event);
const matomoEvent: Array<string|number|undefined> = [ 'trackEvent', 'jitsi-meet', this._extractName(event) ]; const matomoEvent: Array<string | number | undefined> = [
'trackEvent', 'jitsi-meet', this._extractName(event) ];
if (!isNaN(value)) { if (!isNaN(value)) {
matomoEvent.push(value); matomoEvent.push(value);

View File

@ -29,19 +29,19 @@ const DEFAULT_STATE = {
}; };
interface Value { interface Value {
startedTime: number, startedTime: number;
value: number value: number;
} }
export interface IAnalyticsState { export interface IAnalyticsState {
localTracksDuration: { localTracksDuration: {
audio: Value, audio: Value;
conference: Value, conference: Value;
video: { video: {
camera: Value, camera: Value;
desktop: Value desktop: Value;
} };
} };
} }
/** /**

View File

@ -73,86 +73,86 @@ import { IVideoSipGW } from '../videosipgw/reducer';
import { IVirtualBackground } from '../virtual-background/reducer'; import { IVirtualBackground } from '../virtual-background/reducer';
export interface IStore { export interface IStore {
dispatch: Function, dispatch: Function;
getState: () => IState; getState: () => IState;
} }
export interface IState { export interface IState {
'features/analytics': IAnalyticsState, 'features/analytics': IAnalyticsState;
'features/authentication': IAuthenticationState, 'features/authentication': IAuthenticationState;
'features/av-moderation': IAVModerationState, 'features/av-moderation': IAVModerationState;
'features/background': IBackgroundState, 'features/background': IBackgroundState;
'features/base/app': IAppState, 'features/base/app': IAppState;
'features/base/audio-only': IAudioOnlyState, 'features/base/audio-only': IAudioOnlyState;
'features/base/conference': IConferenceState, 'features/base/conference': IConferenceState;
'features/base/config': IConfigState, 'features/base/config': IConfigState;
'features/base/connection': IConnectionState, 'features/base/connection': IConnectionState;
'features/base/devices': IDevicesState, 'features/base/devices': IDevicesState;
'features/base/dialog': IDialogState, 'features/base/dialog': IDialogState;
'features/base/flags': IFlagsState, 'features/base/flags': IFlagsState;
'features/base/jwt': IJwtState, 'features/base/jwt': IJwtState;
'features/base/known-domains': IKnownDomainsState, 'features/base/known-domains': IKnownDomainsState;
'features/base/lastn': ILastNState, 'features/base/lastn': ILastNState;
'features/base/lib-jitsi-meet': ILibJitsiMeetState, 'features/base/lib-jitsi-meet': ILibJitsiMeetState;
'features/base/logging': ILoggingState, 'features/base/logging': ILoggingState;
'features/base/media': IMediaState, 'features/base/media': IMediaState;
'features/base/net-info': INetInfoState, 'features/base/net-info': INetInfoState;
'features/base/no-src-data': INoSrcDataState, 'features/base/no-src-data': INoSrcDataState;
'features/base/participants': IParticipantsState, 'features/base/participants': IParticipantsState;
'features/base/responsive-ui': IResponsiveUIState, 'features/base/responsive-ui': IResponsiveUIState;
'features/base/settings': ISettingsState, 'features/base/settings': ISettingsState;
'features/base/sounds': ISoundsState, 'features/base/sounds': ISoundsState;
'features/base/tracks': ITracksState, 'features/base/tracks': ITracksState;
'features/base/user-interaction': IUserInteractionState, 'features/base/user-interaction': IUserInteractionState;
'features/breakout-rooms': IBreakoutRoomsState, 'features/breakout-rooms': IBreakoutRoomsState;
'features/calendar-sync': ICalendarSyncState, 'features/calendar-sync': ICalendarSyncState;
'features/call-integration': ICallIntegrationState, 'features/call-integration': ICallIntegrationState;
'features/chat': IChatState, 'features/chat': IChatState;
'features/deep-linking': IDeepLinkingState, 'features/deep-linking': IDeepLinkingState;
'features/dropbox': IDropboxState, 'features/dropbox': IDropboxState;
'features/dynamic-branding': IDynamicBrandingState, 'features/dynamic-branding': IDynamicBrandingState;
'features/e2ee': IE2EEState, 'features/e2ee': IE2EEState;
'features/etherpad': IEtherpadState, 'features/etherpad': IEtherpadState;
'features/face-landmarks': IFaceLandmarksState, 'features/face-landmarks': IFaceLandmarksState;
'features/feedback': IFeedbackState, 'features/feedback': IFeedbackState;
'features/filmstrip': IFilmstripState, 'features/filmstrip': IFilmstripState;
'features/follow-me': IFollowMeState, 'features/follow-me': IFollowMeState;
'features/full-screen': IFullScreenState, 'features/full-screen': IFullScreenState;
'features/gifs': IGifsState, 'features/gifs': IGifsState;
'features/google-api': IGoogleApiState, 'features/google-api': IGoogleApiState;
'features/invite': IInviteState, 'features/invite': IInviteState;
'features/jaas': IJaaSState, 'features/jaas': IJaaSState;
'features/large-video': ILargeVideoState, 'features/large-video': ILargeVideoState;
'features/lobby': ILobbyState, 'features/lobby': ILobbyState;
'features/mobile/audio-mode': IMobileAudioModeState, 'features/mobile/audio-mode': IMobileAudioModeState;
'features/mobile/external-api': IMobileExternalApiState, 'features/mobile/external-api': IMobileExternalApiState;
'features/mobile/watchos': IMobileWatchOSState, 'features/mobile/watchos': IMobileWatchOSState;
'features/no-audio-signal': INoAudioSignalState, 'features/no-audio-signal': INoAudioSignalState;
'features/noise-detection': INoiseDetectionState, 'features/noise-detection': INoiseDetectionState;
'features/noise-suppression': INoiseSuppressionState, 'features/noise-suppression': INoiseSuppressionState;
'features/notifications': INotificationsState, 'features/notifications': INotificationsState;
'features/overlay': IOverlayState, 'features/overlay': IOverlayState;
'features/participants-pane': IParticipantsState, 'features/participants-pane': IParticipantsState;
'features/polls': IPollsState, 'features/polls': IPollsState;
'features/power-monitor': IPowerMonitorState, 'features/power-monitor': IPowerMonitorState;
'features/prejoin': IPrejoinState, 'features/prejoin': IPrejoinState;
'features/reactions': IReactionsState, 'features/reactions': IReactionsState;
'features/recent-list': IRecentListState, 'features/recent-list': IRecentListState;
'features/recording': IRecordingState, 'features/recording': IRecordingState;
'features/remote-control': IRemoteControlState, 'features/remote-control': IRemoteControlState;
'features/screen-share': IScreenShareState, 'features/screen-share': IScreenShareState;
'features/screenshot-capture': IScreenshotCaptureState, 'features/screenshot-capture': IScreenshotCaptureState;
'features/settings': ISettingsState, 'features/settings': ISettingsState;
'features/shared-video': ISharedVideoState, 'features/shared-video': ISharedVideoState;
'features/speaker-stats': ISpeakerStatsState, 'features/speaker-stats': ISpeakerStatsState;
'features/subtitles': ISubtitlesState, 'features/subtitles': ISubtitlesState;
'features/talk-while-muted': ITalkWhileMutedState, 'features/talk-while-muted': ITalkWhileMutedState;
'features/testing': ITestingState, 'features/testing': ITestingState;
'features/toolbox': IToolboxState, 'features/toolbox': IToolboxState;
'features/transcribing': ITranscribingState, 'features/transcribing': ITranscribingState;
'features/video-layout': IVideoLayoutState, 'features/video-layout': IVideoLayoutState;
'features/video-quality': IVideoQualityState, 'features/video-quality': IVideoQualityState;
'features/video-quality-persistent-storage': IVideoQualityPersistedState, 'features/video-quality-persistent-storage': IVideoQualityPersistedState;
'features/videosipgw': IVideoSipGW, 'features/videosipgw': IVideoSipGW;
'features/virtual-background': IVirtualBackground 'features/virtual-background': IVirtualBackground;
} }

View File

@ -31,43 +31,43 @@ interface Props extends WithTranslation {
* {@link JitsiConference} That needs authentication - will hold a valid * {@link JitsiConference} That needs authentication - will hold a valid
* value in XMPP login + guest access mode. * value in XMPP login + guest access mode.
*/ */
_conference: Object, _conference: Object;
/** /**
* The server hosts specified in the global config. * The server hosts specified in the global config.
*/ */
_configHosts: IConfig['hosts'], _configHosts: IConfig['hosts'];
/** /**
* Indicates if the dialog should display "connecting" status message. * Indicates if the dialog should display "connecting" status message.
*/ */
_connecting: boolean, _connecting: boolean;
/** /**
* The error which occurred during login/authentication. * The error which occurred during login/authentication.
*/ */
_error: any, _error: any;
/** /**
* The progress in the floating range between 0 and 1 of the authenticating * The progress in the floating range between 0 and 1 of the authenticating
* and upgrading the role of the local participant/user. * and upgrading the role of the local participant/user.
*/ */
_progress: number, _progress: number;
/** /**
* Redux store dispatch method. * Redux store dispatch method.
*/ */
dispatch: Dispatch<any>, dispatch: Dispatch<any>;
/** /**
* Invoked when username and password are submitted. * Invoked when username and password are submitted.
*/ */
onSuccess: Function, onSuccess: Function;
/** /**
* Conference room name. * Conference room name.
*/ */
roomName: string roomName: string;
} }
/** /**
@ -78,18 +78,18 @@ type State = {
/** /**
* Authentication process starts before joining the conference room. * Authentication process starts before joining the conference room.
*/ */
loginStarted: boolean, loginStarted: boolean;
/** /**
* The user entered password for the conference. * The user entered password for the conference.
*/ */
password: string, password: string;
/** /**
* The user entered local participant name. * The user entered local participant name.
*/ */
username: string username: string;
} };
/** /**
* Component that renders the login in conference dialog. * Component that renders the login in conference dialog.
@ -156,7 +156,7 @@ class LoginDialog extends Component<Props, State> {
connect(jid, password, roomName) connect(jid, password, roomName)
.then((connection: any) => { .then((connection: any) => {
onSuccess && onSuccess(connection); onSuccess?.(connection);
}) })
.catch(() => { .catch(() => {
this.setState({ this.setState({

View File

@ -3,7 +3,7 @@ import { MEDIA_TYPE } from '../base/media/constants';
/** /**
* Mapping between a media type and the witelist reducer key. * Mapping between a media type and the witelist reducer key.
*/ */
export const MEDIA_TYPE_TO_WHITELIST_STORE_KEY: { [key: string]: string } = { export const MEDIA_TYPE_TO_WHITELIST_STORE_KEY: { [key: string]: string; } = {
[MEDIA_TYPE.AUDIO]: 'audioWhitelist', [MEDIA_TYPE.AUDIO]: 'audioWhitelist',
[MEDIA_TYPE.VIDEO]: 'videoWhitelist' [MEDIA_TYPE.VIDEO]: 'videoWhitelist'
}; };
@ -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]: 'pendingAudio' | 'pendingVideo' } = { 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

@ -31,12 +31,12 @@ const initialState = {
export interface IAVModerationState { export interface IAVModerationState {
audioModerationEnabled: boolean; audioModerationEnabled: boolean;
audioUnmuteApproved?: boolean | undefined; audioUnmuteApproved?: boolean | undefined;
audioWhitelist: { [id: string]: boolean }; audioWhitelist: { [id: string]: boolean; };
pendingAudio: Array<{ id: string }>; pendingAudio: Array<{ id: string; }>;
pendingVideo: Array<{ id: string }>; pendingVideo: Array<{ id: string; }>;
videoModerationEnabled: boolean; videoModerationEnabled: boolean;
videoUnmuteApproved?: boolean | undefined; videoUnmuteApproved?: boolean | undefined;
videoWhitelist: { [id: string]: boolean }; videoWhitelist: { [id: string]: boolean; };
} }
/** /**
@ -52,7 +52,7 @@ function _updatePendingParticipant(mediaType: MediaType, participant: Participan
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

@ -3,7 +3,7 @@ import ReducerRegistry from '../redux/ReducerRegistry';
import { SET_AUDIO_ONLY } from './actionTypes'; import { SET_AUDIO_ONLY } from './actionTypes';
export interface IAudioOnlyState { export interface IAudioOnlyState {
enabled: boolean enabled: boolean;
} }
const DEFAULT_STATE = { const DEFAULT_STATE = {

View File

@ -5,22 +5,22 @@ export type Props = {
/** /**
* Color of the (initials based) avatar, if needed. * Color of the (initials based) avatar, if needed.
*/ */
color?: string, color?: string;
/** /**
* Initials to be used to render the initials based avatars. * Initials to be used to render the initials based avatars.
*/ */
initials?: string, initials?: string;
/** /**
* Callback to signal the failure of the loading of the URL. * Callback to signal the failure of the loading of the URL.
*/ */
onAvatarLoadError?: Function, onAvatarLoadError?: Function;
/** /**
* Additional parameters to be passed to onAvatarLoadError function. * Additional parameters to be passed to onAvatarLoadError function.
*/ */
onAvatarLoadErrorParams?: Object, onAvatarLoadErrorParams?: Object;
/** /**
* Expected size of the avatar. * Expected size of the avatar.
@ -30,7 +30,7 @@ export type Props = {
/** /**
* The URL of the avatar to render. * The URL of the avatar to render.
*/ */
url?: string|Function url?: string | Function;
}; };
/** /**

View File

@ -11,37 +11,37 @@ type Props = AbstractProps & {
/** /**
* External class name passed through props. * External class name passed through props.
*/ */
className?: string, className?: string;
/** /**
* An object containing the CSS classes. * An object containing the CSS classes.
*/ */
classes: any, classes: any;
/** /**
* The default avatar URL if we want to override the app bundled one (e.g. AlwaysOnTop). * The default avatar URL if we want to override the app bundled one (e.g. AlwaysOnTop).
*/ */
defaultAvatar?: string, defaultAvatar?: string;
/** /**
* ID of the component to be rendered. * ID of the component to be rendered.
*/ */
id?: string, id?: string;
/** /**
* One of the expected status strings (e.g. 'available') to render a badge on the avatar, if necessary. * One of the expected status strings (e.g. 'available') to render a badge on the avatar, if necessary.
*/ */
status?: string, status?: string;
/** /**
* TestId of the element, if any. * TestId of the element, if any.
*/ */
testId?: string, testId?: string;
/** /**
* Indicates whether to load the avatar using CORS or not. * Indicates whether to load the avatar using CORS or not.
*/ */
useCORS?: boolean useCORS?: boolean;
}; };
/** /**

View File

@ -23,7 +23,7 @@ const splitter = new GraphemeSplitter();
* @returns {string} * @returns {string}
*/ */
export function getAvatarColor(initials: string | undefined, customAvatarBackgrounds: Array<string>) { export function getAvatarColor(initials: string | undefined, customAvatarBackgrounds: Array<string>) {
const hasCustomAvatarBackgronds = customAvatarBackgrounds && customAvatarBackgrounds.length; const hasCustomAvatarBackgronds = customAvatarBackgrounds?.length;
const colorsBase = hasCustomAvatarBackgronds ? customAvatarBackgrounds : AVATAR_COLORS; const colorsBase = hasCustomAvatarBackgronds ? customAvatarBackgrounds : AVATAR_COLORS;
let colorIndex = 0; let colorIndex = 0;

View File

@ -59,37 +59,37 @@ type Props = {
/** /**
* Css class to apply on container. * Css class to apply on container.
*/ */
className: string, className: string;
/** /**
* An object containing the CSS classes. * An object containing the CSS classes.
*/ */
classes: any, classes: any;
/** /**
* The displayed text. * The displayed text.
*/ */
displayedText: string, displayedText: string;
/** /**
* The id of the button. * The id of the button.
*/ */
id?: string, id?: string;
/** /**
* The text displayed on copy success. * The text displayed on copy success.
*/ */
textOnCopySuccess: string, textOnCopySuccess: string;
/** /**
* The text displayed on mouse hover. * The text displayed on mouse hover.
*/ */
textOnHover: string, textOnHover: string;
/** /**
* The text that needs to be copied (might differ from the displayedText). * The text that needs to be copied (might differ from the displayedText).
*/ */
textToCopy: string textToCopy: string;
}; };
/** /**

View File

@ -17,67 +17,67 @@ type Props = {
/** /**
* Accessibility label for menu container. * Accessibility label for menu container.
*/ */
accessibilityLabel?: string, accessibilityLabel?: string;
/** /**
* Children of the context menu. * Children of the context menu.
*/ */
children: ReactNode, children: ReactNode;
/** /**
* Class name for context menu. Used to overwrite default styles. * Class name for context menu. Used to overwrite default styles.
*/ */
className?: string, className?: string;
/** /**
* The entity for which the context menu is displayed. * The entity for which the context menu is displayed.
*/ */
entity?: Object, entity?: Object;
/** /**
* Whether or not the menu is hidden. Used to overwrite the internal isHidden. * Whether or not the menu is hidden. Used to overwrite the internal isHidden.
*/ */
hidden?: boolean, hidden?: boolean;
/** /**
* Whether or not the menu is already in a drawer. * Whether or not the menu is already in a drawer.
*/ */
inDrawer?: boolean, inDrawer?: boolean;
/** /**
* Whether or not drawer should be open. * Whether or not drawer should be open.
*/ */
isDrawerOpen?: boolean, isDrawerOpen?: boolean;
/** /**
* Target elements against which positioning calculations are made. * Target elements against which positioning calculations are made.
*/ */
offsetTarget?: HTMLElement, offsetTarget?: HTMLElement;
/** /**
* Callback for click on an item in the menu. * Callback for click on an item in the menu.
*/ */
onClick?: (e?: React.MouseEvent) => void, onClick?: (e?: React.MouseEvent) => void;
/** /**
* Callback for drawer close. * Callback for drawer close.
*/ */
onDrawerClose?: (e?: React.MouseEvent) => void, onDrawerClose?: (e?: React.MouseEvent) => void;
/** /**
* Keydown handler. * Keydown handler.
*/ */
onKeyDown?: (e?: React.KeyboardEvent) => void, onKeyDown?: (e?: React.KeyboardEvent) => void;
/** /**
* Callback for the mouse entering the component. * Callback for the mouse entering the component.
*/ */
onMouseEnter?: (e?: React.MouseEvent) => void, onMouseEnter?: (e?: React.MouseEvent) => void;
/** /**
* Callback for the mouse leaving the component. * Callback for the mouse leaving the component.
*/ */
onMouseLeave?: (e?: React.MouseEvent) => void onMouseLeave?: (e?: React.MouseEvent) => void;
}; };
const MAX_HEIGHT = 400; const MAX_HEIGHT = 400;

View File

@ -12,64 +12,64 @@ export type Props = {
/** /**
* Label used for accessibility. * Label used for accessibility.
*/ */
accessibilityLabel: string, accessibilityLabel: string;
/** /**
* CSS class name used for custom styles. * CSS class name used for custom styles.
*/ */
className?: string, className?: string;
/** /**
* Custom icon. If used, the icon prop is ignored. * Custom icon. If used, the icon prop is ignored.
* Used to allow custom children instead of just the default icons. * Used to allow custom children instead of just the default icons.
*/ */
customIcon?: ReactNode, customIcon?: ReactNode;
/** /**
* Whether or not the action is disabled. * Whether or not the action is disabled.
*/ */
disabled?: boolean, disabled?: boolean;
/** /**
* Default icon for action. * Default icon for action.
*/ */
icon?: Function, icon?: Function;
/** /**
* Id of the action container. * Id of the action container.
*/ */
id?: string, id?: string;
/** /**
* Click handler. * Click handler.
*/ */
onClick?: (e?: React.MouseEvent) => void, onClick?: (e?: React.MouseEvent) => void;
/** /**
* Keydown handler. * Keydown handler.
*/ */
onKeyDown?: (e?: React.KeyboardEvent) => void, onKeyDown?: (e?: React.KeyboardEvent) => void;
/** /**
* Keypress handler. * Keypress handler.
*/ */
onKeyPress?: (e?: React.KeyboardEvent) => void, onKeyPress?: (e?: React.KeyboardEvent) => void;
/** /**
* TestId of the element, if any. * TestId of the element, if any.
*/ */
testId?: string, testId?: string;
/** /**
* Action text. * Action text.
*/ */
text: string, text: string;
/** /**
* Class name for the text. * Class name for the text.
*/ */
textClassName?: string textClassName?: string;
} };
const useStyles = makeStyles((theme: any) => { const useStyles = makeStyles((theme: any) => {
return { return {

View File

@ -9,12 +9,12 @@ type Props = {
/** /**
* List of actions in this group. * List of actions in this group.
*/ */
actions?: Array<ItemProps>, actions?: Array<ItemProps>;
/** /**
* The children of the component. * The children of the component.
*/ */
children?: ReactNode, children?: ReactNode;
}; };
const useStyles = makeStyles((theme: any) => { const useStyles = makeStyles((theme: any) => {
@ -40,7 +40,7 @@ const ContextMenuItemGroup = ({
return ( return (
<div className = { styles.contextMenuItemGroup }> <div className = { styles.contextMenuItemGroup }>
{children} {children}
{actions && actions.map(actionProps => ( {actions?.map(actionProps => (
<ContextMenuItem <ContextMenuItem
key = { actionProps.text } key = { actionProps.text }
{ ...actionProps } /> { ...actionProps } />

View File

@ -11,69 +11,69 @@ type Props = {
/** /**
* List item actions. * List item actions.
*/ */
actions: ReactNode, actions: ReactNode;
/** /**
* 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.
*/ */
hideActions?: boolean, hideActions?: boolean;
/** /**
* Icon to be displayed on the list item. (Avatar for participants). * Icon to be displayed on the list item. (Avatar for participants).
*/ */
icon: ReactNode, icon: ReactNode;
/** /**
* 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.
*/ */
indicators?: ReactNode, indicators?: ReactNode;
/** /**
* Whether or not the item is highlighted. * Whether or not the item is highlighted.
*/ */
isHighlighted?: boolean, isHighlighted?: boolean;
/** /**
* 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.
*/ */
testId?: string, testId?: string;
/** /**
* Text children to be displayed on the list item. * Text children to be displayed on the list item.
*/ */
textChildren: ReactNode | string, textChildren: ReactNode | string;
/** /**
* The actions trigger. Can be Hover or Permanent. * The actions trigger. Can be Hover or Permanent.
*/ */
trigger: string trigger: string;
} };
const useStyles = makeStyles((theme: any) => { const useStyles = makeStyles((theme: any) => {
return { return {

View File

@ -154,7 +154,7 @@ ReducerRegistry.register<IConferenceState>('features/base/conference',
* reduction of the specified action. * reduction of the specified action.
*/ */
function _authStatusChanged(state: IConferenceState, function _authStatusChanged(state: IConferenceState,
{ authEnabled, authLogin }: { authEnabled: boolean, authLogin: string }) { { authEnabled, authLogin }: { authEnabled: boolean; authLogin: string; }) {
return assign(state, { return assign(state, {
authEnabled, authEnabled,
authLogin authLogin
@ -171,7 +171,7 @@ function _authStatusChanged(state: IConferenceState,
* @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: IConferenceState, { conference, error }: { conference: Object, error: Error }) { 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;
@ -237,13 +237,13 @@ function _conferenceFailed(state: IConferenceState, { conference, error }: { con
* @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: IConferenceState, { 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
// with a password. // with a password.
// FIXME Technically JitsiConference.room is a private field. // FIXME Technically JitsiConference.room is a private field.
const locked = conference.room && conference.room.locked ? LOCKED_REMOTELY : undefined; const locked = conference.room?.locked ? LOCKED_REMOTELY : undefined;
return assign(state, { return assign(state, {
authRequired: undefined, authRequired: undefined,
@ -284,7 +284,7 @@ function _conferenceJoined(state: IConferenceState, { conference }: { conference
* reduction of the specified action. * reduction of the specified action.
*/ */
function _conferenceLeftOrWillLeave(state: IConferenceState, { conference, type }: function _conferenceLeftOrWillLeave(state: IConferenceState, { conference, type }:
{ conference: Object, type: string }) { { 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
@ -338,7 +338,7 @@ function _conferenceLeftOrWillLeave(state: IConferenceState, { conference, type
* @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: IConferenceState, { conference }: { conference: Object }) { function _conferenceWillJoin(state: IConferenceState, { conference }: { conference: Object; }) {
return assign(state, { return assign(state, {
error: undefined, error: undefined,
joining: conference joining: conference
@ -355,7 +355,7 @@ function _conferenceWillJoin(state: IConferenceState, { conference }: { conferen
* @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: IConferenceState, { 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;
} }
@ -389,8 +389,8 @@ function _p2pStatusChanged(state: IConferenceState, 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: IConferenceState, { 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, {

View File

@ -120,7 +120,10 @@ export interface IConfig {
hideAutoAssignButton?: boolean; hideAutoAssignButton?: boolean;
hideJoinRoomButton?: boolean; hideJoinRoomButton?: boolean;
}; };
buttonsWithNotifyClick?: Array<ButtonsWithNotifyClick | { key: ButtonsWithNotifyClick; preventExecution: boolean }>; buttonsWithNotifyClick?: Array<ButtonsWithNotifyClick | {
key: ButtonsWithNotifyClick;
preventExecution: boolean;
}>;
callStatsConfigParams?: { callStatsConfigParams?: {
additionalIDs?: { additionalIDs?: {
customerID?: string; customerID?: string;
@ -144,7 +147,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;
}; };
@ -165,8 +168,8 @@ export interface IConfig {
ideal?: number; ideal?: number;
max?: number; max?: number;
min?: number; min?: number;
} };
} };
}; };
corsAvatarURLs?: Array<string>; corsAvatarURLs?: Array<string>;
defaultLanguage?: string; defaultLanguage?: string;
@ -373,7 +376,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;
@ -466,7 +469,7 @@ export interface IConfig {
high?: number; high?: number;
low?: number; low?: number;
standard?: number; standard?: number;
} };
}; };
minHeightForQualityLvl: { minHeightForQualityLvl: {
[key: number]: string; [key: number]: string;

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

@ -72,7 +72,7 @@ ReducerRegistry.register<IConnectionState>(
*/ */
function _connectionDisconnected( function _connectionDisconnected(
state: IConnectionState, state: IConnectionState,
{ connection }: { connection: Object }) { { connection }: { connection: Object; }) {
const connection_ = _getCurrentConnection(state); const connection_ = _getCurrentConnection(state);
if (connection_ !== connection) { if (connection_ !== connection) {
@ -99,8 +99,8 @@ function _connectionDisconnected(
function _connectionEstablished( function _connectionEstablished(
state: IConnectionState, state: IConnectionState,
{ connection, timeEstablished }: { { connection, timeEstablished }: {
connection: any, connection: any;
timeEstablished: number timeEstablished: number;
}) { }) {
return assign(state, { return assign(state, {
connecting: undefined, connecting: undefined,
@ -124,8 +124,8 @@ function _connectionEstablished(
function _connectionFailed( function _connectionFailed(
state: IConnectionState, state: IConnectionState,
{ connection, error }: { { connection, error }: {
connection: Object, connection: Object;
error: ConnectionFailedError error: ConnectionFailedError;
}) { }) {
const connection_ = _getCurrentConnection(state); const connection_ = _getCurrentConnection(state);
@ -155,7 +155,7 @@ function _connectionFailed(
*/ */
function _connectionWillConnect( function _connectionWillConnect(
state: IConnectionState, state: IConnectionState,
{ connection }: { connection: Object }) { { connection }: { connection: Object; }) {
return assign(state, { return assign(state, {
connecting: connection, connecting: connection,
@ -194,7 +194,7 @@ function _getCurrentConnection(baseConnectionState: IConnectionState): IConnecti
*/ */
function _setLocationURL( function _setLocationURL(
state: IConnectionState, state: IConnectionState,
{ locationURL }: { locationURL?: URL }) { { locationURL }: { locationURL?: URL; }) {
return set(state, 'locationURL', locationURL); return set(state, 'locationURL', locationURL);
} }
@ -226,6 +226,6 @@ function _setRoom(state: IConnectionState) {
*/ */
function _setShowConnectionInfo( function _setShowConnectionInfo(
state: IConnectionState, state: IConnectionState,
{ showConnectionInfo }: { showConnectionInfo: boolean }) { { showConnectionInfo }: { showConnectionInfo: boolean; }) {
return set(state, 'showConnectionInfo', showConnectionInfo); return set(state, 'showConnectionInfo', showConnectionInfo);
} }

View File

@ -37,7 +37,7 @@ export interface IDevicesState {
permissions: { permissions: {
audio: boolean; audio: boolean;
video: boolean; video: boolean;
} };
} }
/** /**

View File

@ -19,7 +19,7 @@ import { withPixelLineHeight } from '../../../styles/functions.web';
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';
const TitleIcon = ({ appearance }: { appearance?: 'danger' | 'warning' }) => { const TitleIcon = ({ appearance }: { appearance?: 'danger' | 'warning'; }) => {
if (!appearance) { if (!appearance) {
return null; return null;
} }
@ -34,15 +34,15 @@ const TitleIcon = ({ appearance }: { appearance?: 'danger' | 'warning' }) => {
}; };
interface Props extends WithTranslation { interface Props extends WithTranslation {
appearance?: 'danger' | 'warning', appearance?: 'danger' | 'warning';
classes: any, classes: any;
heading: string, heading: string;
hideCloseIconButton: boolean, hideCloseIconButton: boolean;
id?: string, id?: string;
isHeadingMultiline: boolean, isHeadingMultiline: boolean;
onClose: (e?: any) => void, onClose: (e?: any) => void;
showKeyline: boolean, showKeyline: boolean;
testId?: string testId?: string;
} }
/** /**

View File

@ -35,61 +35,61 @@ interface Props extends DialogProps, WithTranslation {
/** /**
* An object containing the CSS classes. * An object containing the CSS classes.
*/ */
classes: any, classes: any;
/** /**
* Custom dialog header that replaces the standard heading. * Custom dialog header that replaces the standard heading.
*/ */
customHeader?: ReactElement<any> | Function, customHeader?: ReactElement<any> | Function;
/** /**
* Disables dismissing the dialog when the blanket is clicked. Enabled * Disables dismissing the dialog when the blanket is clicked. Enabled
* by default. * by default.
*/ */
disableBlanketClickDismiss: boolean, disableBlanketClickDismiss: boolean;
/* /*
* True if listening for the Enter key should be disabled. * True if listening for the Enter key should be disabled.
*/ */
disableEnter: boolean, disableEnter: boolean;
/** /**
* If true, no footer will be displayed. * If true, no footer will be displayed.
*/ */
disableFooter?: boolean, disableFooter?: boolean;
/** /**
* If true, the cancel button will not display but cancel actions, like * If true, the cancel button will not display but cancel actions, like
* clicking the blanket, will cancel. * clicking the blanket, will cancel.
*/ */
hideCancelButton: boolean, hideCancelButton: boolean;
/** /**
* If true, the close icon button will not be displayed. * If true, the close icon button will not be displayed.
*/ */
hideCloseIconButton: boolean, hideCloseIconButton: boolean;
/** /**
* Whether the dialog is modal. This means clicking on the blanket will * Whether the dialog is modal. This means clicking on the blanket will
* leave the dialog open. No cancel button. * leave the dialog open. No cancel button.
*/ */
isModal: boolean, isModal: boolean;
/** /**
* The handler for the event when clicking the 'confirmNo' button. * The handler for the event when clicking the 'confirmNo' button.
* Defaults to onCancel if absent. * Defaults to onCancel if absent.
*/ */
onDecline?: () => void, onDecline?: () => void;
/** /**
* Callback invoked when setting the ref of the Dialog. * Callback invoked when setting the ref of the Dialog.
*/ */
onDialogRef?: Function, onDialogRef?: Function;
/** /**
* Disables rendering of the submit button. * Disables rendering of the submit button.
*/ */
submitDisabled: boolean, submitDisabled: boolean;
/** /**
* Width of the dialog, can be: * Width of the dialog, can be:
@ -98,7 +98,7 @@ interface Props extends DialogProps, WithTranslation {
* - integer value for pixel width * - integer value for pixel width
* - string value for percentage. * - string value for percentage.
*/ */
width: string width: string;
} }
/** /**
@ -246,7 +246,7 @@ class StatelessDialog extends Component<Props> {
if (!this.props.isModal) { if (!this.props.isModal) {
const { onCancel } = this.props; const { onCancel } = this.props;
onCancel && onCancel(); onCancel?.();
} }
} }
@ -271,7 +271,7 @@ class StatelessDialog extends Component<Props> {
_onSubmit(value?: any) { _onSubmit(value?: any) {
const { onSubmit } = this.props; const { onSubmit } = this.props;
onSubmit && onSubmit(value); onSubmit?.(value);
} }
/** /**
@ -342,7 +342,7 @@ class StatelessDialog extends Component<Props> {
* @returns {void} * @returns {void}
*/ */
_onDialogRef(element?: any) { _onDialogRef(element?: any) {
this.props.onDialogRef && this.props.onDialogRef(element && element.parentNode); this.props.onDialogRef?.(element?.parentNode);
} }
/** /**

View File

@ -5,56 +5,56 @@ export type DialogProps = {
/** /**
* Whether cancel button is disabled. Enabled by default. * Whether cancel button is disabled. Enabled by default.
*/ */
cancelDisabled?: boolean, cancelDisabled?: boolean;
/** /**
* Optional i18n key to change the cancel button title. * Optional i18n key to change the cancel button title.
*/ */
cancelKey?: string, cancelKey?: string;
/** /**
* The React {@code Component} children which represents the dialog's body. * The React {@code Component} children which represents the dialog's body.
*/ */
children?: ReactNode, children?: ReactNode;
/** /**
* Is ok button enabled/disabled. Enabled by default. * Is ok button enabled/disabled. Enabled by default.
*/ */
okDisabled?: boolean, okDisabled?: boolean;
/** /**
* Optional i18n key to change the ok button title. * Optional i18n key to change the ok button title.
*/ */
okKey?: string, okKey?: string;
/** /**
* The handler for onCancel event. * The handler for onCancel event.
*/ */
onCancel: Function, onCancel: Function;
/** /**
* The handler for the event when submitting the dialog. * The handler for the event when submitting the dialog.
*/ */
onSubmit: Function, onSubmit: Function;
/** /**
* Additional style to be applied on the dialog. * Additional style to be applied on the dialog.
* *
* NOTE: Not all dialog types support this! * NOTE: Not all dialog types support this!
*/ */
style?: Object, style?: Object;
/** /**
* Key to use for showing a title. * Key to use for showing a title.
*/ */
titleKey?: string, titleKey?: string;
/** /**
* The string to use as a title instead of {@code titleKey}. If a truthy * The string to use as a title instead of {@code titleKey}. If a truthy
* value is specified, it takes precedence over {@code titleKey} i.e. * value is specified, it takes precedence over {@code titleKey} i.e.
* The latter is unused. * The latter is unused.
*/ */
titleString?: string titleString?: string;
}; };
/** /**

View File

@ -11,98 +11,98 @@ type Props = {
/** /**
* The id of the element this button icon controls. * The id of the element this button icon controls.
*/ */
ariaControls?: string, ariaControls?: string;
/** /**
* Id of description label. * Id of description label.
*/ */
ariaDescribedBy?: string, ariaDescribedBy?: string;
/** /**
* Aria disabled flag for the Icon. * Aria disabled flag for the Icon.
*/ */
ariaDisabled?: boolean, ariaDisabled?: boolean;
/** /**
* Whether the element popup is expanded. * Whether the element popup is expanded.
*/ */
ariaExpanded?: boolean, ariaExpanded?: boolean;
/** /**
* Whether the element has a popup. * Whether the element has a popup.
*/ */
ariaHasPopup?: boolean, ariaHasPopup?: boolean;
/** /**
* Aria label for the Icon. * Aria label for the Icon.
*/ */
ariaLabel?: string, ariaLabel?: string;
/** /**
* Whether the element has a pressed. * Whether the element has a pressed.
*/ */
ariaPressed?: boolean, ariaPressed?: boolean;
/** /**
* Class name for the web platform, if any. * Class name for the web platform, if any.
*/ */
className?: string, className?: string;
/** /**
* Color of the icon (if not provided by the style object). * Color of the icon (if not provided by the style object).
*/ */
color?: string, color?: string;
/** /**
* Id of the icon container. * Id of the icon container.
*/ */
containerId?: string, containerId?: string;
/** /**
* Id prop (mainly for autotests). * Id prop (mainly for autotests).
*/ */
id?: string, id?: string;
/** /**
* Function to invoke on click. * Function to invoke on click.
*/ */
onClick?: Function, onClick?: Function;
/** /**
* Keydown handler. * Keydown handler.
*/ */
onKeyDown?: Function, onKeyDown?: Function;
/** /**
* Keypress handler. * Keypress handler.
*/ */
onKeyPress?: Function, onKeyPress?: Function;
/** /**
* Role for the Icon. * Role for the Icon.
*/ */
role?: string, role?: string;
/** /**
* The size of the icon (if not provided by the style object). * The size of the icon (if not provided by the style object).
*/ */
size?: number | string, size?: number | string;
/** /**
* The preloaded icon component to render. * The preloaded icon component to render.
*/ */
src: Function, src: Function;
/** /**
* Style object to be applied. * Style object to be applied.
*/ */
style?: Object, style?: Object;
/** /**
* TabIndex for the Icon. * TabIndex for the Icon.
*/ */
tabIndex?: number tabIndex?: number;
} };
export const DEFAULT_COLOR = navigator.product === 'ReactNative' ? 'white' : undefined; export const DEFAULT_COLOR = navigator.product === 'ReactNative' ? 'white' : undefined;
export const DEFAULT_SIZE = navigator.product === 'ReactNative' ? 36 : 22; export const DEFAULT_SIZE = navigator.product === 'ReactNative' ? 36 : 22;

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,33 +14,33 @@ 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.
*/ */
classes: any, classes: any;
/** /**
* The color of the label. * The color of the label.
*/ */
color?: string, color?: string;
/** /**
* Color for the icon. * Color for the icon.
*/ */
iconColor?: string, iconColor?: string;
/** /**
* 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.
*/ */
onClick?: (e?: React.MouseEvent) => void, onClick?: (e?: React.MouseEvent) => void;
}; };

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

@ -60,7 +60,7 @@ export interface ILoggingState {
disableLogCollector?: boolean; disableLogCollector?: boolean;
loggers: { loggers: {
[key: string]: LogLevel; [key: string]: LogLevel;
} };
}; };
logCollector?: { logCollector?: {
flush: () => void; flush: () => void;

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

@ -280,7 +280,7 @@ function _clearAllVideoTransforms(state: IVideoState) {
* @private * @private
* @returns {Object} * @returns {Object}
*/ */
function _storeVideoTransform(state: IVideoState, { streamId, transform }: { streamId: string, transform: string }) { function _storeVideoTransform(state: IVideoState, { streamId, transform }: { streamId: string; transform: string; }) {
return { return {
...state, ...state,
transforms: { transforms: {
@ -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

@ -559,7 +559,7 @@ export function participantKicked(kicker: any, kicked: any) {
kicker: kicker?.getId() kicker: kicker?.getId()
}); });
if (kicked.isReplaced && kicked.isReplaced()) { if (kicked.isReplaced?.()) {
return; return;
} }

View File

@ -32,16 +32,16 @@ const AVATAR_CHECKED_URLS = new Map();
/* eslint-disable arrow-body-style, no-unused-vars */ /* eslint-disable arrow-body-style, no-unused-vars */
const AVATAR_CHECKER_FUNCTIONS = [ const AVATAR_CHECKER_FUNCTIONS = [
(participant: Participant) => { (participant: Participant) => {
return participant && participant.isJigasi ? JIGASI_PARTICIPANT_ICON : null; return participant?.isJigasi ? JIGASI_PARTICIPANT_ICON : null;
}, },
(participant: Participant) => { (participant: Participant) => {
return participant && participant.avatarURL ? participant.avatarURL : null; return participant?.avatarURL ? participant.avatarURL : null;
}, },
(participant: Participant, store: IStore) => { (participant: Participant, store: IStore) => {
const config = store.getState()['features/base/config']; const config = store.getState()['features/base/config'];
const isGravatarDisabled = config.gravatar?.disabled; const isGravatarDisabled = config.gravatar?.disabled;
if (participant && participant.email && !isGravatarDisabled) { if (participant?.email && !isGravatarDisabled) {
const gravatarBaseURL = config.gravatar?.baseUrl const gravatarBaseURL = config.gravatar?.baseUrl
|| config.gravatarBaseURL || config.gravatarBaseURL
|| GRAVATAR_BASE_URL; || GRAVATAR_BASE_URL;

View File

@ -502,7 +502,7 @@ function _participant(state: Participant|LocalParticipant = { id: '' }, action:
* 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

@ -11,78 +11,78 @@ type Props = {
/** /**
* Icon to display in the options section. * Icon to display in the options section.
*/ */
OptionsIcon?: Function, OptionsIcon?: Function;
/** /**
* The Label of the child element. * The Label of the child element.
*/ */
ariaDropDownLabel?: string, ariaDropDownLabel?: string;
/** /**
* The Label of the current element. * The Label of the current element.
*/ */
ariaLabel?: string, ariaLabel?: string;
/** /**
* To give a aria-pressed to the icon. * To give a aria-pressed to the icon.
*/ */
ariaPressed?: boolean, ariaPressed?: boolean;
/** /**
* Text of the button. * Text of the button.
*/ */
children: ReactNode, children: ReactNode;
/** /**
* Text css class of the button. * Text css class of the button.
*/ */
className?: string, className?: string;
/** /**
* An object containing the CSS classes. * An object containing the CSS classes.
*/ */
classes: any, classes: any;
/** /**
* If the button is disabled or not. * If the button is disabled or not.
*/ */
disabled?: boolean, disabled?: boolean;
/** /**
* If the button has options. * If the button has options.
*/ */
hasOptions?: boolean, hasOptions?: boolean;
/** /**
* OnClick button handler. * OnClick button handler.
*/ */
onClick?: (e?: React.MouseEvent) => void, onClick?: (e?: React.MouseEvent) => void;
/** /**
* Click handler for options. * Click handler for options.
*/ */
onOptionsClick?: (e?: React.KeyboardEvent | React.MouseEvent) => void, onOptionsClick?: (e?: React.KeyboardEvent | React.MouseEvent) => void;
/** /**
* To give a role to the icon. * To give a role to the icon.
*/ */
role?: string, role?: string;
/** /**
* To navigate with the keyboard. * To navigate with the keyboard.
*/ */
tabIndex?: number, tabIndex?: number;
/** /**
* TestId of the button. Can be used to locate element when testing UI. * TestId of the button. Can be used to locate element when testing UI.
*/ */
testId?: string, testId?: string;
/** /**
* The type of th button: primary, secondary, text. * The type of th button: primary, secondary, text.
*/ */
type: string type: string;
}; };
/** /**

View File

@ -18,12 +18,12 @@ interface Props extends WithTranslation {
/** /**
* List of strings with details about the connection. * List of strings with details about the connection.
*/ */
connectionDetails: string[], connectionDetails: string[];
/** /**
* The type of the connection. Can be: 'none', 'poor', 'nonOptimal' or 'good'. * The type of the connection. Can be: 'none', 'poor', 'nonOptimal' or 'good'.
*/ */
connectionType: string connectionType: string;
} }
const useStyles = makeStyles((theme: any) => { const useStyles = makeStyles((theme: any) => {
@ -124,7 +124,7 @@ const CONNECTION_TYPE_MAP: {
connectionClass: string; connectionClass: string;
connectionText: string; connectionText: string;
icon: Function; icon: Function;
} };
} = { } = {
[CONNECTION_TYPE.POOR]: { [CONNECTION_TYPE.POOR]: {
connectionClass: 'con-status--poor', connectionClass: 'con-status--poor',

View File

@ -16,49 +16,49 @@ interface Props extends WithTranslation {
/** /**
* Additional CSS class name. * Additional CSS class name.
*/ */
className?: string, className?: string;
/** /**
* The icon component to use. * The icon component to use.
*/ */
icon: Function, icon: Function;
/** /**
* The CSS classnames to set on the icon element of the component. * The CSS classnames to set on the icon element of the component.
*/ */
iconClassName?: string, iconClassName?: string;
/** /**
* The color of the icon. * The color of the icon.
*/ */
iconColor?: string, iconColor?: string;
/** /**
* Id of the icon to be rendered. * Id of the icon to be rendered.
*/ */
iconId?: string, iconId?: string;
/** /**
* The font size for the icon. * The font size for the icon.
*/ */
iconSize: string, iconSize: string;
/** /**
* The ID attribute to set on the root element of the component. * The ID attribute to set on the root element of the component.
*/ */
id?: string, id?: string;
/** /**
* The translation key to use for displaying a tooltip when hovering over * The translation key to use for displaying a tooltip when hovering over
* the component. * the component.
*/ */
tooltipKey: string, tooltipKey: string;
/** /**
* From which side of the indicator the tooltip should appear from, * From which side of the indicator the tooltip should appear from,
* defaulting to "top". * defaulting to "top".
*/ */
tooltipPosition: string tooltipPosition: string;
} }
const useStyles = makeStyles(() => { const useStyles = makeStyles(() => {

View File

@ -7,27 +7,27 @@ type Props = {
/** /**
* CSS class name. * CSS class name.
*/ */
className: string, className: string;
/** /**
* Indicates whether the switch is disabled or not. * Indicates whether the switch is disabled or not.
*/ */
disabled: boolean, disabled: boolean;
/** /**
* ID of the toggle. * ID of the toggle.
*/ */
id: string, id: string;
/** /**
* Handler called when the user presses the switch. * Handler called when the user presses the switch.
*/ */
onValueChange: (checked?: boolean) => void, onValueChange: (checked?: boolean) => void;
/** /**
* The current value. * The current value.
*/ */
value: boolean value: boolean;
}; };
/** /**

View File

@ -19,7 +19,7 @@ declare type ElementConfig = boolean | Object;
/** /**
* The type of the name-config pairs stored in {@code PersistenceRegistry}. * The type of the name-config pairs stored in {@code PersistenceRegistry}.
*/ */
declare type PersistencyConfigMap = { [name: string]: ElementConfig }; declare type PersistencyConfigMap = { [name: string]: ElementConfig; };
/** /**
* A registry to allow features to register their redux store subtree to be * A registry to allow features to register their redux store subtree to be
@ -27,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

@ -5,7 +5,7 @@ import type { Reducer } from 'redux';
* The type of the dictionary/map which associates a reducer (function) with the * The type of the dictionary/map which associates a reducer (function) with the
* name of he Redux state property managed by the reducer. * name of he Redux state property managed by the reducer.
*/ */
type NameReducerMap<S> = { [name: string]: Reducer<S, Action<any>> }; type NameReducerMap<S> = { [name: string]: Reducer<S, Action<any>>; };
/** /**
* A registry for Redux reducers, allowing features to register themselves * A registry for Redux reducers, allowing features to register themselves

View File

@ -45,8 +45,8 @@ type RegistrationOptions = {
* @property {boolean} [deepEquals=false] - Whether or not a deep equals check should be performed on the selection * @property {boolean} [deepEquals=false] - Whether or not a deep equals check should be performed on the selection
* returned by {@link Selector}. * returned by {@link Selector}.
*/ */
deepEquals?: boolean deepEquals?: boolean;
} };
/** /**
* A type of a {@link Selector}-{@link Listener} association in which the * A type of a {@link Selector}-{@link Listener} association in which the
@ -59,18 +59,18 @@ type SelectorListener = {
* The {@code Listener} which listens to changes in the values selected by * The {@code Listener} which listens to changes in the values selected by
* {@link selector}. * {@link selector}.
*/ */
listener: Listener, listener: Listener;
/** /**
* The {@link RegistrationOptions} passed during the registration to be applied on the listener. * The {@link RegistrationOptions} passed during the registration to be applied on the listener.
*/ */
options?: RegistrationOptions, options?: RegistrationOptions;
/** /**
* The {@code Selector} which selects values whose changes are listened to * The {@code Selector} which selects values whose changes are listened to
* by {@link listener}. * by {@link listener}.
*/ */
selector: Selector selector: Selector;
}; };
/** /**
@ -94,8 +94,8 @@ class StateListenerRegistry {
* @returns {void} * @returns {void}
*/ */
_listener({ prevSelections, store }: { _listener({ prevSelections, store }: {
prevSelections: Map<SelectorListener, any>, prevSelections: Map<SelectorListener, any>;
store: Store<any, any> store: Store<any, any>;
}) { }) {
for (const selectorListener of this._selectorListeners) { for (const selectorListener of this._selectorListeners) {
const prevSelection = prevSelections.get(selectorListener); const prevSelection = prevSelections.get(selectorListener);

View File

@ -37,7 +37,7 @@ export interface IResponsiveUIState {
left: number; left: number;
right: number; right: number;
top: number; top: number;
} };
} }
ReducerRegistry.register<IResponsiveUIState>('features/base/responsive-ui', ReducerRegistry.register<IResponsiveUIState>('features/base/responsive-ui',

View File

@ -81,7 +81,7 @@ export interface ISettingsState {
userSelectedMicDeviceLabel?: string | boolean; userSelectedMicDeviceLabel?: string | boolean;
userSelectedNotifications?: { userSelectedNotifications?: {
[key: string]: boolean; [key: string]: boolean;
}|boolean, } | boolean;
userSelectedSkipPrejoin?: boolean; userSelectedSkipPrejoin?: boolean;
visible?: boolean; visible?: boolean;
} }

View File

@ -23,20 +23,20 @@ export type Sound = {
* Becomes available once the sound resource gets loaded and the sound can * Becomes available once the sound resource gets loaded and the sound can
* not be played until that happens. * not be played until that happens.
*/ */
audioElement?: AudioElement, audioElement?: AudioElement;
/** /**
* This field is container for all optional parameters related to the sound. * This field is container for all optional parameters related to the sound.
*/ */
options?: Object, options?: Object;
/** /**
* This field describes the source of the audio resource to be played. It * This field describes the source of the audio resource to be played. It
* can be either a path to the file or an object depending on the platform * can be either a path to the file or an object depending on the platform
* (native vs web). * (native vs web).
*/ */
src?: Object | string src?: Object | string;
} };
/** /**
* Initial/default state of the feature {@code base/sounds}. It is a {@code Map} * Initial/default state of the feature {@code base/sounds}. It is a {@code Map}

View File

@ -11,13 +11,13 @@ type Props = {
/** /**
* The default theme or theme set through advanced branding. * The default theme or theme set through advanced branding.
*/ */
_theme: Object, _theme: Object;
/** /**
* The children of the component. * The children of the component.
*/ */
children: React.ReactNode children: React.ReactNode;
} };
/** /**
* The theme provider for the web app. * The theme provider for the web app.

View File

@ -14,12 +14,12 @@ interface IButtonProps extends ButtonProps {
/** /**
* Class name used for additional styles. * Class name used for additional styles.
*/ */
className?: string, className?: string;
/** /**
* Whether or not the button should be full width. * Whether or not the button should be full width.
*/ */
fullWidth?: boolean, fullWidth?: boolean;
/** /**
* The id of the button. * The id of the button.

View File

@ -14,7 +14,7 @@ export enum BUTTON_TYPES {
* The modes of the buttons. * The modes of the buttons.
*/ */
export const BUTTON_MODES: { export const BUTTON_MODES: {
CONTAINED: 'contained' CONTAINED: 'contained';
} = { } = {
CONTAINED: 'contained' CONTAINED: 'contained'
}; };

View File

@ -9,7 +9,7 @@ export interface Theme {
breakpoints: { breakpoints: {
down: (value: number | string) => string; down: (value: number | string) => string;
up: (value: number | string) => string; up: (value: number | string) => string;
}, };
palette: { palette: {
action01: string; action01: string;
action01Active: string; action01Active: string;

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

@ -85,7 +85,7 @@ export function getBaseUrl(w: Window = window) {
const doc = w.document; const doc = w.document;
const base = doc.querySelector('base'); const base = doc.querySelector('base');
if (base && base.href) { if (base?.href) {
return base.href; return base.href;
} }
@ -127,7 +127,7 @@ export function getJitsiMeetGlobalNS() {
*/ */
export function reportError(e: Error, msg = '') { export function reportError(e: Error, msg = '') {
console.error(msg, e); console.error(msg, e);
window.onerror && window.onerror(msg, undefined, undefined, undefined, e); window.onerror?.(msg, undefined, undefined, undefined, e);
} }
/** /**

View File

@ -31,7 +31,7 @@ export function parseURLParams(
} }
const paramStr = source === 'search' ? url.search : url.hash; const paramStr = source === 'search' ? url.search : url.hash;
const params: any = {}; const params: any = {};
const paramParts = (paramStr && paramStr.substr(1).split('&')) || []; const paramParts = paramStr?.substr(1).split('&') || [];
// Detect and ignore hash params for hash routers. // Detect and ignore hash params for hash routers.
if (source === 'hash' && paramParts.length === 1) { if (source === 'hash' && paramParts.length === 1) {

View File

@ -168,7 +168,7 @@ export function getBackendSafeRoomName(room?: string): string|undefined {
* @returns {string} - The (Web application) context root defined by the * @returns {string} - The (Web application) context root defined by the
* specified {@code location} (URI). * specified {@code location} (URI).
*/ */
export function getLocationContextRoot({ pathname }: { pathname: string }) { export function getLocationContextRoot({ pathname }: { pathname: string; }) {
const contextRootEndIndex = pathname.lastIndexOf('/'); const contextRootEndIndex = pathname.lastIndexOf('/');
return ( return (
@ -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
}; };
@ -375,7 +375,7 @@ export function parseURIString(uri?: string) {
*/ */
function _standardURIToString(thiz?: Object) { function _standardURIToString(thiz?: Object) {
// @ts-ignore // @ts-ignore
// eslint-disable-next-line no-invalid-this // eslint-disable-next-line @typescript-eslint/no-invalid-this
const { hash, host, pathname, protocol, search } = thiz || this; const { hash, host, pathname, protocol, search } = thiz || this;
let str = ''; let str = '';
@ -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

@ -25,9 +25,9 @@ export interface IBreakoutRoomsState {
displayName: string; displayName: string;
jid: string; jid: string;
role: string; role: string;
} };
} };
} };
}; };
} }

View File

@ -7,7 +7,7 @@ export interface Props {
/** /**
* The messages array to render. * The messages array to render.
*/ */
messages: IMessage[] messages: IMessage[];
} }
/** /**

View File

@ -24,17 +24,17 @@ interface Props extends WithTranslation {
/** /**
* Whether chat emoticons are disabled. * Whether chat emoticons are disabled.
*/ */
_areSmileysDisabled: boolean, _areSmileysDisabled: boolean;
/** /**
* Invoked to send chat messages. * Invoked to send chat messages.
*/ */
dispatch: Dispatch<any>, dispatch: Dispatch<any>;
/** /**
* Callback to invoke on message send. * Callback to invoke on message send.
*/ */
onSend: Function onSend: Function;
} }
/** /**
@ -45,12 +45,12 @@ type State = {
/** /**
* User provided nickname when the input text is provided in the view. * User provided nickname when the input text is provided in the view.
*/ */
message: string, message: string;
/** /**
* Whether or not the smiley selector is visible. * Whether or not the smiley selector is visible.
*/ */
showSmileysPanel: boolean showSmileysPanel: boolean;
}; };
/** /**

View File

@ -21,12 +21,12 @@ interface Props extends WithTranslation {
/** /**
* Invoked to set the local participant display name. * Invoked to set the local participant display name.
*/ */
dispatch: Dispatch<any>, dispatch: Dispatch<any>;
/** /**
* Whether the polls feature is enabled or not. * Whether the polls feature is enabled or not.
*/ */
isPollsEnabled: boolean isPollsEnabled: boolean;
} }
/** /**
@ -37,7 +37,7 @@ type State = {
/** /**
* User provided display name when the input text is provided in the view. * User provided display name when the input text is provided in the view.
*/ */
displayName: string displayName: string;
}; };
/** /**

View File

@ -6,8 +6,8 @@ type Props = {
/** /**
* URL of the GIF. * URL of the GIF.
*/ */
url: string url: string;
} };
const useStyles = makeStyles(() => { const useStyles = makeStyles(() => {
return { return {

View File

@ -86,7 +86,7 @@ export default class MessageContainer extends AbstractMessageContainer<Props, St
render() { render() {
const groupedMessages = this._getMessagesGroupedBySender(); const groupedMessages = this._getMessagesGroupedBySender();
const messages = groupedMessages.map((group, index) => { const messages = groupedMessages.map((group, index) => {
const messageType = group[0] && group[0].messageType; const messageType = group[0]?.messageType;
return ( return (
<ChatMessageGroup <ChatMessageGroup

View File

@ -9,17 +9,17 @@ type Props = {
/** /**
* The component(s) that need to be scrollable on mobile. * The component(s) that need to be scrollable on mobile.
*/ */
children: ReactElement, children: ReactElement;
/** /**
* Whether the component should be flex container or not. * Whether the component should be flex container or not.
*/ */
flex?: boolean, flex?: boolean;
/** /**
* Whether the component is rendered within a modal. * Whether the component is rendered within a modal.
*/ */
isModal: boolean, isModal: boolean;
}; };
@ -62,12 +62,12 @@ function TouchmoveHack({ children, isModal, flex }: Props) {
} }
useEffect(() => { useEffect(() => {
if (touchMoveElementRef && touchMoveElementRef.current) { if (touchMoveElementRef?.current) {
touchMoveElementRef.current.addEventListener('touchmove', handleTouchMove, true); touchMoveElementRef.current.addEventListener('touchmove', handleTouchMove, true);
} }
return () => { return () => {
if (touchMoveElementRef && touchMoveElementRef.current) { if (touchMoveElementRef?.current) {
touchMoveElementRef.current.removeEventListener('touchmove', handleTouchMove, true); touchMoveElementRef.current.removeEventListener('touchmove', handleTouchMove, true);
} }
}; };

View File

@ -49,7 +49,7 @@ export interface IChatState {
lobbyMessageRecipient?: { lobbyMessageRecipient?: {
id: string; id: string;
name: string; name: string;
} | LocalParticipant, } | LocalParticipant;
messages: IMessage[]; messages: IMessage[];
nbUnreadMessages: number; nbUnreadMessages: number;
privateMessageRecipient?: Participant; privateMessageRecipient?: Participant;

View File

@ -28,12 +28,12 @@ type Props = {
/** /**
* Name of the meeting we're currently in. * Name of the meeting we're currently in.
*/ */
_meetingName: string, _meetingName: string;
/** /**
* Whether displaying the current meeting name is enabled or not. * Whether displaying the current meeting name is enabled or not.
*/ */
_meetingNameEnabled: boolean, _meetingNameEnabled: boolean;
}; };

View File

@ -82,67 +82,67 @@ type Props = AbstractProps & WithTranslation & {
/** /**
* Disable/enable inactive indicator. * Disable/enable inactive indicator.
*/ */
_connectionIndicatorInactiveDisabled: boolean, _connectionIndicatorInactiveDisabled: boolean;
/** /**
* The current condition of the user's connection, matching one of the * The current condition of the user's connection, matching one of the
* enumerated values in the library. * enumerated values in the library.
*/ */
_connectionStatus: string, _connectionStatus: string;
/** /**
* Whether the indicator popover is disabled. * Whether the indicator popover is disabled.
*/ */
_popoverDisabled: boolean, _popoverDisabled: boolean;
/** /**
* The source name of the track. * The source name of the track.
*/ */
_sourceName: string, _sourceName: string;
/** /**
* Whether source name signaling is enabled. * Whether source name signaling is enabled.
*/ */
_sourceNameSignalingEnabled: boolean, _sourceNameSignalingEnabled: boolean;
/** /**
* Whether or not the component should ignore setting a visibility class for * Whether or not the component should ignore setting a visibility class for
* hiding the component when the connection quality is not strong. * hiding the component when the connection quality is not strong.
*/ */
alwaysVisible: boolean, alwaysVisible: boolean;
/** /**
* The audio SSRC of this client. * The audio SSRC of this client.
*/ */
audioSsrc: number, audioSsrc: number;
/** /**
* An object containing the CSS classes. * An object containing the CSS classes.
*/ */
classes: Object, classes: Object;
/** /**
* The Redux dispatch function. * The Redux dispatch function.
*/ */
dispatch: Dispatch<any>, dispatch: Dispatch<any>;
/** /**
* Whether or not clicking the indicator should display a popover for more * Whether or not clicking the indicator should display a popover for more
* details. * details.
*/ */
enableStatsDisplay: boolean, enableStatsDisplay: boolean;
/** /**
* The font-size for the icon. * The font-size for the icon.
*/ */
iconSize: number, iconSize: number;
/** /**
* Relative to the icon from where the popover for more connection details * Relative to the icon from where the popover for more connection details
* should display. * should display.
*/ */
statsPopoverPosition: string statsPopoverPosition: string;
}; };
type State = AbstractState & { type State = AbstractState & {
@ -150,8 +150,8 @@ type State = AbstractState & {
/** /**
* Whether popover is ivisible or not. * Whether popover is ivisible or not.
*/ */
popoverVisible: boolean popoverVisible: boolean;
} };
const styles = (theme: any) => { const styles = (theme: any) => {
return { return {

View File

@ -10,7 +10,7 @@ import { translate } from '../../base/i18n/functions';
type DownloadUpload = { type DownloadUpload = {
download: number; download: number;
upload: number; upload: number;
} };
/** /**
* The type of the React {@code Component} props of * The type of the React {@code Component} props of
@ -21,7 +21,7 @@ interface Props extends WithTranslation {
/** /**
* The audio SSRC of this client. * The audio SSRC of this client.
*/ */
audioSsrc: number, audioSsrc: number;
/** /**
* Statistics related to bandwidth. * Statistics related to bandwidth.
@ -30,7 +30,7 @@ interface Props extends WithTranslation {
* upload: Number * upload: Number
* }}. * }}.
*/ */
bandwidth: DownloadUpload, bandwidth: DownloadUpload;
/** /**
* Statistics related to bitrate. * Statistics related to bitrate.
@ -39,18 +39,18 @@ interface Props extends WithTranslation {
* upload: Number * upload: Number
* }}. * }}.
*/ */
bitrate: DownloadUpload, bitrate: DownloadUpload;
/** /**
* The number of bridges (aka media servers) currently used in the * The number of bridges (aka media servers) currently used in the
* conference. * conference.
*/ */
bridgeCount: number, bridgeCount: number;
/** /**
* An object containing the CSS classes. * An object containing the CSS classes.
*/ */
classes: any, classes: any;
/** /**
* Audio/video codecs in use for the connection. * Audio/video codecs in use for the connection.
@ -59,28 +59,28 @@ interface Props extends WithTranslation {
[key: string]: { [key: string]: {
audio: string; audio: string;
video: string; video: string;
} };
}, };
/** /**
* A message describing the connection quality. * A message describing the connection quality.
*/ */
connectionSummary: string, connectionSummary: string;
/** /**
* Whether or not should display the "Show More" link. * Whether or not should display the "Show More" link.
*/ */
disableShowMoreStats: boolean, disableShowMoreStats: boolean;
/** /**
* The end-to-end round-trip-time. * The end-to-end round-trip-time.
*/ */
e2eRtt: number, e2eRtt: number;
/** /**
* Whether or not should display the "Save Logs" link. * Whether or not should display the "Save Logs" link.
*/ */
enableSaveLogs: boolean, enableSaveLogs: boolean;
/** /**
* Statistics related to frame rates for each ssrc. * Statistics related to frame rates for each ssrc.
@ -88,33 +88,33 @@ interface Props extends WithTranslation {
* [ ssrc ]: Number * [ ssrc ]: Number
* }}. * }}.
*/ */
framerate: Object, framerate: Object;
/** /**
* Whether or not the statistics are for local video. * Whether or not the statistics are for local video.
*/ */
isLocalVideo: boolean, isLocalVideo: boolean;
/** /**
* Whether or not the statistics are for screen share. * Whether or not the statistics are for screen share.
*/ */
isVirtualScreenshareParticipant: boolean, isVirtualScreenshareParticipant: boolean;
/** /**
* The send-side max enabled resolution (aka the highest layer that is not * The send-side max enabled resolution (aka the highest layer that is not
* suspended on the send-side). * suspended on the send-side).
*/ */
maxEnabledResolution: number, maxEnabledResolution: number;
/** /**
* Callback to invoke when the user clicks on the download logs link. * Callback to invoke when the user clicks on the download logs link.
*/ */
onSaveLogs: () => void, onSaveLogs: () => void;
/** /**
* Callback to invoke when the show additional stats link is clicked. * Callback to invoke when the show additional stats link is clicked.
*/ */
onShowMore: (e?: React.MouseEvent) => void, onShowMore: (e?: React.MouseEvent) => void;
/** /**
* Statistics related to packet loss. * Statistics related to packet loss.
@ -123,17 +123,17 @@ interface Props extends WithTranslation {
* upload: Number * upload: Number
* }}. * }}.
*/ */
packetLoss: DownloadUpload, packetLoss: DownloadUpload;
/** /**
* The endpoint id of this client. * The endpoint id of this client.
*/ */
participantId: string, participantId: string;
/** /**
* The region that we think the client is in. * The region that we think the client is in.
*/ */
region: string, region: string;
/** /**
* Statistics related to display resolutions for each ssrc. * Statistics related to display resolutions for each ssrc.
@ -148,24 +148,24 @@ interface Props extends WithTranslation {
[ssrc: string]: { [ssrc: string]: {
height: number; height: number;
width: number; width: number;
} };
}, };
/** /**
* The region of the media server that we are connected to. * The region of the media server that we are connected to.
*/ */
serverRegion: string, serverRegion: string;
/** /**
* Whether or not additional stats about bandwidth and transport should be * Whether or not additional stats about bandwidth and transport should be
* displayed. Will not display even if true for remote participants. * displayed. Will not display even if true for remote participants.
*/ */
shouldShowMore: boolean, shouldShowMore: boolean;
/** /**
* Whether source name signaling is enabled. * Whether source name signaling is enabled.
*/ */
sourceNameSignalingEnabled: boolean, sourceNameSignalingEnabled: boolean;
/** /**
* Statistics related to transports. * Statistics related to transports.
@ -178,12 +178,12 @@ interface Props extends WithTranslation {
remoteCandidateType: string; remoteCandidateType: string;
transportType: string; transportType: string;
type: string; type: string;
}>, }>;
/** /**
* The video SSRC of this client. * The video SSRC of this client.
*/ */
videoSsrc: number videoSsrc: number;
} }
/** /**
@ -809,11 +809,11 @@ class ConnectionStatsTable extends Component<Props> {
} }
const data: { const data: {
localIP: string[], localIP: string[];
localPort: string[], localPort: string[];
remoteIP: string[], remoteIP: string[];
remotePort: string[], remotePort: string[];
transportType: string[] transportType: string[];
} = { } = {
localIP: [], localIP: [],
localPort: [], localPort: [],

View File

@ -14,12 +14,12 @@ export interface Props extends WithTranslation {
/** /**
* Invoked to update the local participant's display name. * Invoked to update the local participant's display name.
*/ */
dispatch: Dispatch<any>, dispatch: Dispatch<any>;
/** /**
* Function to be invoked after a successful display name change. * Function to be invoked after a successful display name change.
*/ */
onPostSubmit?: Function onPostSubmit?: Function;
} }
/** /**
@ -61,7 +61,7 @@ export default class AbstractDisplayNamePrompt<S>
displayName displayName
})); }));
onPostSubmit && onPostSubmit(); onPostSubmit?.();
return true; return true;
} }

View File

@ -32,7 +32,7 @@ type Props = {
* The ID of the participant to render the label for. * The ID of the participant to render the label for.
*/ */
participantId: string; participantId: string;
} };
/** /**
* Renders a label with the display name of the on-stage participant. * Renders a label with the display name of the on-stage participant.

View File

@ -28,48 +28,48 @@ interface Props extends WithTranslation {
* The participant's current display name which should be shown when in * The participant's current display name which should be shown when in
* edit mode. Can be different from what is shown when not editing. * edit mode. Can be different from what is shown when not editing.
*/ */
_configuredDisplayName: string, _configuredDisplayName: string;
/** /**
* The participant's current display name which should be shown. * The participant's current display name which should be shown.
*/ */
_nameToDisplay: string, _nameToDisplay: string;
/** /**
* Whether or not the display name should be editable on click. * Whether or not the display name should be editable on click.
*/ */
allowEditing: boolean, allowEditing: boolean;
/** /**
* An object containing the CSS classes. * An object containing the CSS classes.
*/ */
classes: any, classes: any;
/** /**
* Invoked to update the participant's display name. * Invoked to update the participant's display name.
*/ */
dispatch: Dispatch<any>, dispatch: Dispatch<any>;
/** /**
* A string to append to the displayName, if provided. * A string to append to the displayName, if provided.
*/ */
displayNameSuffix: string, displayNameSuffix: string;
/** /**
* The ID attribute to add to the component. Useful for global querying for * The ID attribute to add to the component. Useful for global querying for
* the component by legacy components and torture tests. * the component by legacy components and torture tests.
*/ */
elementID: string, elementID: string;
/** /**
* The ID of the participant whose name is being displayed. * The ID of the participant whose name is being displayed.
*/ */
participantID: string, participantID: string;
/** /**
* The type of thumbnail. * The type of thumbnail.
*/ */
thumbnailType: string thumbnailType: string;
} }
/** /**
@ -80,12 +80,12 @@ type State = {
/** /**
* The current value of the display name in the edit field. * The current value of the display name in the edit field.
*/ */
editDisplayNameValue: string, editDisplayNameValue: string;
/** /**
* Whether or not the component should be displaying an editable input. * Whether or not the component should be displaying an editable input.
*/ */
isEditing: boolean isEditing: boolean;
}; };
const styles = (theme: any) => { const styles = (theme: any) => {
@ -333,7 +333,7 @@ function _mapStateToProps(state: IState, ownProps: Partial<Props>) {
const participant = getParticipantById(state, participantID ?? ''); const participant = getParticipantById(state, participantID ?? '');
return { return {
_configuredDisplayName: participant && participant.name, _configuredDisplayName: participant?.name,
_nameToDisplay: getParticipantDisplayName(state, participantID ?? '') _nameToDisplay: getParticipantDisplayName(state, participantID ?? '')
}; };
} }

View File

@ -26,7 +26,7 @@ const useStyles = makeStyles((theme: Theme) => {
* @param {Props} props - The props of the component. * @param {Props} props - The props of the component.
* @returns {ReactElement} * @returns {ReactElement}
*/ */
const DisplayNameBadge: React.FC<{ name: string }> = ({ name }) => { const DisplayNameBadge: React.FC<{ name: string; }> = ({ name }) => {
const classes = useStyles(); const classes = useStyles();
return ( return (

View File

@ -15,7 +15,7 @@ type State = {
/** /**
* The name to show in the display name text field. * The name to show in the display name text field.
*/ */
displayName: string displayName: string;
}; };
/** /**

View File

@ -47,7 +47,7 @@ export function createMuiBrandingTheme(customTheme: any) {
let newSpacing = [ ...spacing ]; let newSpacing = [ ...spacing ];
if (customSpacing && customSpacing.length) { if (customSpacing?.length) {
newSpacing = customSpacing; newSpacing = customSpacing;
} }

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

@ -20,32 +20,32 @@ interface Props extends WithTranslation {
/** /**
* The resource for the description, computed based on the maxMode and whether the switch is toggled or not. * The resource for the description, computed based on the maxMode and whether the switch is toggled or not.
*/ */
_descriptionResource: string, _descriptionResource: string;
/** /**
* Custom e2ee labels. * Custom e2ee labels.
*/ */
_e2eeLabels: any, _e2eeLabels: any;
/** /**
* Whether the switch is currently enabled or not. * Whether the switch is currently enabled or not.
*/ */
_enabled: boolean, _enabled: boolean;
/** /**
* Indicates whether all participants in the conference currently support E2EE. * Indicates whether all participants in the conference currently support E2EE.
*/ */
_everyoneSupportE2EE: boolean, _everyoneSupportE2EE: boolean;
/** /**
* Whether E2EE is currently enabled or not. * Whether E2EE is currently enabled or not.
*/ */
_toggled: boolean, _toggled: boolean;
/** /**
* The redux {@code dispatch} function. * The redux {@code dispatch} function.
*/ */
dispatch: Dispatch<any> dispatch: Dispatch<any>;
} }
type State = { type State = {
@ -53,7 +53,7 @@ type State = {
/** /**
* True if the switch is toggled on. * True if the switch is toggled on.
*/ */
toggled: boolean toggled: boolean;
}; };
/** /**

View File

@ -4,35 +4,35 @@ import { Human, Config, FaceResult } from '@vladmandic/human';
import { DETECTION_TYPES, FACE_DETECTION_SCORE_THRESHOLD, FACE_EXPRESSIONS_NAMING_MAPPING } from './constants'; import { DETECTION_TYPES, FACE_DETECTION_SCORE_THRESHOLD, FACE_EXPRESSIONS_NAMING_MAPPING } from './constants';
type DetectInput = { type DetectInput = {
image: ImageBitmap | ImageData, image: ImageBitmap | ImageData;
threshold: number threshold: number;
}; };
type FaceBox = { type FaceBox = {
left: number, left: number;
right: number, right: number;
width?: number width?: number;
}; };
type InitInput = { type InitInput = {
baseUrl: string, baseUrl: string;
detectionTypes: string[] detectionTypes: string[];
} };
type DetectOutput = { type DetectOutput = {
faceBox?: FaceBox, faceBox?: FaceBox;
faceCount: number, faceCount: number;
faceExpression?: string faceExpression?: string;
}; };
export interface FaceLandmarksHelper { export interface FaceLandmarksHelper {
detect({ image, threshold } : DetectInput): Promise<DetectOutput>; detect: ({ image, threshold }: DetectInput) => Promise<DetectOutput>;
getDetectionInProgress(): boolean; getDetectionInProgress: () => boolean;
getDetections(image: ImageBitmap | ImageData): Promise<Array<FaceResult>>; getDetections: (image: ImageBitmap | ImageData) => Promise<Array<FaceResult>>;
getFaceBox(detections: Array<FaceResult>, threshold: number): FaceBox | undefined; getFaceBox: (detections: Array<FaceResult>, threshold: number) => FaceBox | undefined;
getFaceCount(detections : Array<FaceResult>): number; getFaceCount: (detections: Array<FaceResult>) => number;
getFaceExpression(detections: Array<FaceResult>): string | undefined; getFaceExpression: (detections: Array<FaceResult>) => string | undefined;
init(): Promise<void>; init: () => Promise<void>;
} }
/** /**

View File

@ -71,172 +71,172 @@ interface Props extends WithTranslation {
/** /**
* Additional CSS class names top add to the root. * Additional CSS class names top add to the root.
*/ */
_className: string, _className: string;
/** /**
* The number of columns in tile view. * The number of columns in tile view.
*/ */
_columns: number, _columns: number;
/** /**
* The current layout of the filmstrip. * The current layout of the filmstrip.
*/ */
_currentLayout: string, _currentLayout: string;
/** /**
* Whether or not to hide the self view. * Whether or not to hide the self view.
*/ */
_disableSelfView: boolean, _disableSelfView: boolean;
/** /**
* The height of the filmstrip. * The height of the filmstrip.
*/ */
_filmstripHeight: number, _filmstripHeight: number;
/** /**
* The width of the filmstrip. * The width of the filmstrip.
*/ */
_filmstripWidth: number, _filmstripWidth: number;
/** /**
* Whether or not we have scroll on the filmstrip. * Whether or not we have scroll on the filmstrip.
*/ */
_hasScroll: boolean, _hasScroll: boolean;
/** /**
* Whether this is a recorder or not. * Whether this is a recorder or not.
*/ */
_iAmRecorder: boolean, _iAmRecorder: boolean;
/** /**
* Whether the filmstrip button is enabled. * Whether the filmstrip button is enabled.
*/ */
_isFilmstripButtonEnabled: boolean, _isFilmstripButtonEnabled: boolean;
/** /**
* Whether or not the toolbox is displayed. * Whether or not the toolbox is displayed.
*/ */
_isToolboxVisible: Boolean, _isToolboxVisible: Boolean;
/** /**
* Whether or not the current layout is vertical filmstrip. * Whether or not the current layout is vertical filmstrip.
*/ */
_isVerticalFilmstrip: boolean, _isVerticalFilmstrip: boolean;
/** /**
* The local screen share participant. This prop is behind the sourceNameSignaling feature flag. * The local screen share participant. This prop is behind the sourceNameSignaling feature flag.
*/ */
_localScreenShare: Participant, _localScreenShare: Participant;
/** /**
* Whether or not the filmstrip videos should currently be displayed. * Whether or not the filmstrip videos should currently be displayed.
*/ */
_mainFilmstripVisible: boolean, _mainFilmstripVisible: boolean;
/** /**
* The maximum width of the vertical filmstrip. * The maximum width of the vertical filmstrip.
*/ */
_maxFilmstripWidth: number, _maxFilmstripWidth: number;
/** /**
* The maximum height of the top panel. * The maximum height of the top panel.
*/ */
_maxTopPanelHeight: number, _maxTopPanelHeight: number;
/** /**
* The participants in the call. * The participants in the call.
*/ */
_remoteParticipants: Array<Object>, _remoteParticipants: Array<Object>;
/** /**
* The length of the remote participants array. * The length of the remote participants array.
*/ */
_remoteParticipantsLength: number, _remoteParticipantsLength: number;
/** /**
* Whether or not the filmstrip should be user-resizable. * Whether or not the filmstrip should be user-resizable.
*/ */
_resizableFilmstrip: boolean, _resizableFilmstrip: boolean;
/** /**
* The number of rows in tile view. * The number of rows in tile view.
*/ */
_rows: number, _rows: number;
/** /**
* The height of the thumbnail. * The height of the thumbnail.
*/ */
_thumbnailHeight: number, _thumbnailHeight: number;
/** /**
* The width of the thumbnail. * The width of the thumbnail.
*/ */
_thumbnailWidth: number, _thumbnailWidth: number;
/** /**
* Flag that indicates whether the thumbnails will be reordered. * Flag that indicates whether the thumbnails will be reordered.
*/ */
_thumbnailsReordered: Boolean, _thumbnailsReordered: Boolean;
/** /**
* Whether or not the filmstrip is top panel. * Whether or not the filmstrip is top panel.
*/ */
_topPanelFilmstrip: boolean, _topPanelFilmstrip: boolean;
/** /**
* The height of the top panel (user resized). * The height of the top panel (user resized).
*/ */
_topPanelHeight?: number, _topPanelHeight?: number;
/** /**
* The max height of the top panel. * The max height of the top panel.
*/ */
_topPanelMaxHeight: number, _topPanelMaxHeight: number;
/** /**
* Whether or not the top panel is visible. * Whether or not the top panel is visible.
*/ */
_topPanelVisible: boolean, _topPanelVisible: boolean;
/** /**
* The width of the vertical filmstrip (user resized). * The width of the vertical filmstrip (user resized).
*/ */
_verticalFilmstripWidth?: number, _verticalFilmstripWidth?: number;
/** /**
* Whether or not the vertical filmstrip should have a background color. * Whether or not the vertical filmstrip should have a background color.
*/ */
_verticalViewBackground: boolean, _verticalViewBackground: boolean;
/** /**
* Whether or not the vertical filmstrip should be displayed as grid. * Whether or not the vertical filmstrip should be displayed as grid.
*/ */
_verticalViewGrid: boolean, _verticalViewGrid: boolean;
/** /**
* The max width of the vertical filmstrip. * The max width of the vertical filmstrip.
*/ */
_verticalViewMaxWidth: number, _verticalViewMaxWidth: number;
/** /**
* Additional CSS class names to add to the container of all the thumbnails. * Additional CSS class names to add to the container of all the thumbnails.
*/ */
_videosClassName: string, _videosClassName: string;
/** /**
* An object containing the CSS classes. * An object containing the CSS classes.
*/ */
classes: any, classes: any;
/** /**
* The redux {@code dispatch} function. * The redux {@code dispatch} function.
*/ */
dispatch: Dispatch<any>, dispatch: Dispatch<any>;
/** /**
* The type of filmstrip to be displayed. * The type of filmstrip to be displayed.
*/ */
filmstripType: string filmstripType: string;
} }
type State = { type State = {
@ -244,23 +244,23 @@ type State = {
/** /**
* Initial top panel height on drag handle mouse down. * Initial top panel height on drag handle mouse down.
*/ */
dragFilmstripHeight?: number, dragFilmstripHeight?: number;
/** /**
* Initial filmstrip width on drag handle mouse down. * Initial filmstrip width on drag handle mouse down.
*/ */
dragFilmstripWidth?: number|null, dragFilmstripWidth?: number | null;
/** /**
* Whether or not the mouse is pressed. * Whether or not the mouse is pressed.
*/ */
isMouseDown: boolean, isMouseDown: boolean;
/** /**
* Initial mouse position on drag handle mouse down. * Initial mouse position on drag handle mouse down.
*/ */
mousePosition?: number|null mousePosition?: number | null;
} };
/** /**
* Implements a React {@link Component} which represents the filmstrip on * Implements a React {@link Component} which represents the filmstrip on
@ -607,7 +607,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,
@ -639,8 +639,8 @@ class Filmstrip extends PureComponent <Props, State> {
* @param {Object} data - Information about the rendered items. * @param {Object} data - Information about the rendered items.
* @returns {void} * @returns {void}
*/ */
_onListItemsRendered({ visibleStartIndex, visibleStopIndex } _onListItemsRendered({ visibleStartIndex, visibleStopIndex }: {
: { visibleStartIndex: number, visibleStopIndex: number }) { visibleStartIndex: number; visibleStopIndex: number; }) {
const { dispatch } = this.props; const { dispatch } = this.props;
const { startIndex, stopIndex } = this._calculateIndices(visibleStartIndex, visibleStopIndex); const { startIndex, stopIndex } = this._calculateIndices(visibleStartIndex, visibleStopIndex);
@ -659,10 +659,10 @@ class Filmstrip extends PureComponent <Props, State> {
visibleRowStartIndex, visibleRowStartIndex,
visibleRowStopIndex visibleRowStopIndex
}: { }: {
visibleColumnStartIndex: number, visibleColumnStartIndex: number;
visibleColumnStopIndex: number, visibleColumnStopIndex: number;
visibleRowStartIndex: number, visibleRowStartIndex: number;
visibleRowStopIndex: number visibleRowStopIndex: number;
}) { }) {
const { _columns, dispatch } = this.props; const { _columns, dispatch } = this.props;
const start = (visibleRowStartIndex * _columns) + visibleColumnStartIndex; const start = (visibleRowStartIndex * _columns) + visibleColumnStartIndex;

View File

@ -18,18 +18,18 @@ type Props = {
/** /**
* The font-size for the icon. * The font-size for the icon.
*/ */
iconSize: number, iconSize: number;
/** /**
* The participant id who we want to render the raised hand indicator * The participant id who we want to render the raised hand indicator
* for. * for.
*/ */
participantId: string, participantId: string;
/** /**
* From which side of the indicator the tooltip should appear from. * From which side of the indicator the tooltip should appear from.
*/ */
tooltipPosition: string tooltipPosition: string;
}; };
const useStyles = makeStyles(() => { const useStyles = makeStyles(() => {
@ -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

@ -17,18 +17,18 @@ type Props = {
/** /**
* The font-size for the icon. * The font-size for the icon.
*/ */
iconSize: number, iconSize: number;
/** /**
* The participant id who we want to render the raised hand indicator * The participant id who we want to render the raised hand indicator
* for. * for.
*/ */
participantId: string, participantId: string;
/** /**
* From which side of the indicator the tooltip should appear from. * From which side of the indicator the tooltip should appear from.
*/ */
tooltipPosition: string tooltipPosition: string;
}; };
const useStyles = makeStyles((theme: any) => { const useStyles = makeStyles((theme: any) => {

View File

@ -84,22 +84,22 @@ export type State = {
/** /**
* Indicates that the canplay event has been received. * Indicates that the canplay event has been received.
*/ */
canPlayEventReceived: boolean, canPlayEventReceived: boolean;
/** /**
* The current display mode of the thumbnail. * The current display mode of the thumbnail.
*/ */
displayMode: number, displayMode: number;
/** /**
* Indicates whether the thumbnail is hovered or not. * Indicates whether the thumbnail is hovered or not.
*/ */
isHovered: boolean, isHovered: boolean;
/** /**
* Whether popover is visible or not. * Whether popover is visible or not.
*/ */
popoverVisible: boolean popoverVisible: boolean;
}; };
/** /**
@ -110,172 +110,172 @@ export type Props = {
/** /**
* The audio track related to the participant. * The audio track related to the participant.
*/ */
_audioTrack?: Object, _audioTrack?: Object;
/** /**
* Indicates whether the local video flip feature is disabled or not. * Indicates whether the local video flip feature is disabled or not.
*/ */
_disableLocalVideoFlip: boolean, _disableLocalVideoFlip: boolean;
/** /**
* Indicates whether enlargement of tiles to fill the available space is disabled. * Indicates whether enlargement of tiles to fill the available space is disabled.
*/ */
_disableTileEnlargement: boolean, _disableTileEnlargement: boolean;
/** /**
* URL of GIF sent by this participant, null if there's none. * URL of GIF sent by this participant, null if there's none.
*/ */
_gifSrc?: string, _gifSrc?: string;
/** /**
* The height of the Thumbnail. * The height of the Thumbnail.
*/ */
_height: number, _height: number;
/** /**
* Whether or not the participant is displayed on the stage filmstrip. * Whether or not the participant is displayed on the stage filmstrip.
* Used to hide the video from the vertical filmstrip. * Used to hide the video from the vertical filmstrip.
*/ */
_isActiveParticipant: boolean, _isActiveParticipant: boolean;
/** /**
* Indicates whether audio only mode is enabled. * Indicates whether audio only mode is enabled.
*/ */
_isAudioOnly: boolean, _isAudioOnly: boolean;
/** /**
* Indicates whether the participant associated with the thumbnail is displayed on the large video. * Indicates whether the participant associated with the thumbnail is displayed on the large video.
*/ */
_isCurrentlyOnLargeVideo: boolean, _isCurrentlyOnLargeVideo: boolean;
/** /**
* Disable/enable the dominant speaker indicator. * Disable/enable the dominant speaker indicator.
*/ */
_isDominantSpeakerDisabled: boolean, _isDominantSpeakerDisabled: boolean;
/** /**
* Indicates whether the thumbnail should be hidden or not. * Indicates whether the thumbnail should be hidden or not.
*/ */
_isHidden: boolean, _isHidden: boolean;
/** /**
* Whether we are currently running in a mobile browser. * Whether we are currently running in a mobile browser.
*/ */
_isMobile: boolean, _isMobile: boolean;
/** /**
* Whether we are currently running in a mobile browser in portrait orientation. * Whether we are currently running in a mobile browser in portrait orientation.
*/ */
_isMobilePortrait: boolean, _isMobilePortrait: boolean;
/** /**
* Indicates whether the participant is screen sharing. * Indicates whether the participant is screen sharing.
*/ */
_isScreenSharing: boolean, _isScreenSharing: boolean;
/** /**
* Indicates whether testing mode is enabled. * Indicates whether testing mode is enabled.
*/ */
_isTestModeEnabled: boolean, _isTestModeEnabled: boolean;
/** /**
* Indicates whether the video associated with the thumbnail is playable. * Indicates whether the video associated with the thumbnail is playable.
*/ */
_isVideoPlayable: boolean, _isVideoPlayable: boolean;
/** /**
* Indicates whether the participant is a virtual screen share participant. This prop is behind the * Indicates whether the participant is a virtual screen share participant. This prop is behind the
* sourceNameSignaling feature flag. * sourceNameSignaling feature flag.
*/ */
_isVirtualScreenshareParticipant: boolean, _isVirtualScreenshareParticipant: boolean;
/** /**
* The current local video flip setting. * The current local video flip setting.
*/ */
_localFlipX: boolean, _localFlipX: boolean;
/** /**
* An object with information about the participant related to the thumbnail. * An object with information about the participant related to the thumbnail.
*/ */
_participant: Participant, _participant: Participant;
/** /**
* Whether or not the participant has the hand raised. * Whether or not the participant has the hand raised.
*/ */
_raisedHand: boolean, _raisedHand: boolean;
/** /**
* Whether source name signaling is enabled. * Whether source name signaling is enabled.
*/ */
_sourceNameSignalingEnabled: boolean, _sourceNameSignalingEnabled: boolean;
/** /**
* Whether or not the current layout is stage filmstrip layout. * Whether or not the current layout is stage filmstrip layout.
*/ */
_stageFilmstripLayout: boolean, _stageFilmstripLayout: boolean;
/** /**
* Whether or not the participants are displayed on stage. * Whether or not the participants are displayed on stage.
* (and not screensharing or shared video; used to determine * (and not screensharing or shared video; used to determine
* whether or not the display the participant video in the vertical filmstrip). * whether or not the display the participant video in the vertical filmstrip).
*/ */
_stageParticipantsVisible: boolean, _stageParticipantsVisible: boolean;
/** /**
* The type of thumbnail to display. * The type of thumbnail to display.
*/ */
_thumbnailType: string, _thumbnailType: string;
/** /**
* The video object position for the participant. * The video object position for the participant.
*/ */
_videoObjectPosition: string, _videoObjectPosition: string;
/** /**
* The video track that will be displayed in the thumbnail. * The video track that will be displayed in the thumbnail.
*/ */
_videoTrack?: any, _videoTrack?: any;
/** /**
* The width of the thumbnail. * The width of the thumbnail.
*/ */
_width: number, _width: number;
/** /**
* An object containing CSS classes. * An object containing CSS classes.
*/ */
classes: any, classes: any;
/** /**
* The redux dispatch function. * The redux dispatch function.
*/ */
dispatch: Function, dispatch: Function;
/** /**
* The type of filmstrip the tile is displayed in. * The type of filmstrip the tile is displayed in.
*/ */
filmstripType: string, filmstripType: string;
/** /**
* The horizontal offset in px for the thumbnail. Used to center the thumbnails from the last row in tile view. * The horizontal offset in px for the thumbnail. Used to center the thumbnails from the last row in tile view.
*/ */
horizontalOffset: number, horizontalOffset: number;
/** /**
* The ID of the participant related to the thumbnail. * The ID of the participant related to the thumbnail.
*/ */
participantID?: string, participantID?: string;
/** /**
* Styles that will be set to the Thumbnail's main span element. * Styles that will be set to the Thumbnail's main span element.
*/ */
style?: any, style?: any;
/** /**
* The width of the thumbnail. Used for expanding the width of the thumbnails on last row in case * The width of the thumbnail. Used for expanding the width of the thumbnails on last row in case
* there is empty space. * there is empty space.
*/ */
width?: number width?: number;
}; };
const defaultStyles = (theme: any) => { const defaultStyles = (theme: any) => {
@ -658,12 +658,12 @@ class Thumbnail extends Component<Props, State> {
const isTileType = _thumbnailType === THUMBNAIL_TYPE.TILE; const isTileType = _thumbnailType === THUMBNAIL_TYPE.TILE;
const jitsiVideoTrack = _videoTrack?.jitsiTrack; const jitsiVideoTrack = _videoTrack?.jitsiTrack;
const track = jitsiVideoTrack?.track; const track = jitsiVideoTrack?.track;
const isPortraitVideo = ((track && track.getSettings()?.aspectRatio) || 1) < 1; const isPortraitVideo = (track?.getSettings()?.aspectRatio || 1) < 1;
let styles: { let styles: {
avatar: Object, avatar: Object;
thumbnail: any, thumbnail: any;
video: Object video: Object;
} = { } = {
thumbnail: {}, thumbnail: {},
avatar: {}, avatar: {},
@ -993,7 +993,7 @@ class Thumbnail extends Component<Props, State> {
const videoTrackClassName const videoTrackClassName
= !_disableLocalVideoFlip && _videoTrack && !_isScreenSharing && _localFlipX ? 'flipVideoX' : ''; = !_disableLocalVideoFlip && _videoTrack && !_isScreenSharing && _localFlipX ? 'flipVideoX' : '';
const jitsiVideoTrack = _videoTrack?.jitsiTrack; const jitsiVideoTrack = _videoTrack?.jitsiTrack;
const videoTrackId = jitsiVideoTrack && jitsiVideoTrack.getId(); const videoTrackId = jitsiVideoTrack?.getId();
const videoEventListeners: any = {}; const videoEventListeners: any = {};
if (local) { if (local) {

View File

@ -23,33 +23,33 @@ type Props = {
/** /**
* Class name for indicators container. * Class name for indicators container.
*/ */
className: string, className: string;
/** /**
* Whether it is a virtual screenshare participant thumbnail. * Whether it is a virtual screenshare participant thumbnail.
*/ */
isVirtualScreenshareParticipant: boolean, isVirtualScreenshareParticipant: boolean;
/** /**
* Whether or not the indicators are for the local participant. * Whether or not the indicators are for the local participant.
*/ */
local: boolean, local: boolean;
/** /**
* Id of the participant for which the component is displayed. * Id of the participant for which the component is displayed.
*/ */
participantId: string, participantId: string;
/** /**
* Whether or not to show the status indicators. * Whether or not to show the status indicators.
*/ */
showStatusIndicators?: boolean, showStatusIndicators?: boolean;
/** /**
* The type of thumbnail. * The type of thumbnail.
*/ */
thumbnailType: string thumbnailType: string;
} };
const useStyles = makeStyles(() => { const useStyles = makeStyles(() => {
return { return {

View File

@ -29,48 +29,48 @@ type Props = {
/** /**
* Hide popover callback. * Hide popover callback.
*/ */
hidePopover: Function, hidePopover: Function;
/** /**
* Class name for the status indicators container. * Class name for the status indicators container.
*/ */
indicatorsClassName: string, indicatorsClassName: string;
/** /**
* Whether or not the thumbnail is hovered. * Whether or not the thumbnail is hovered.
*/ */
isHovered: boolean, isHovered: boolean;
/** /**
* Whether or not the thumbnail is a virtual screen share participant. * Whether or not the thumbnail is a virtual screen share participant.
*/ */
isVirtualScreenshareParticipant?: boolean, isVirtualScreenshareParticipant?: boolean;
/** /**
* Whether or not the indicators are for the local participant. * Whether or not the indicators are for the local participant.
*/ */
local: boolean, local: boolean;
/** /**
* Id of the participant for which the component is displayed. * Id of the participant for which the component is displayed.
*/ */
participantId: string, participantId: string;
/** /**
* Whether popover is visible or not. * Whether popover is visible or not.
*/ */
popoverVisible: boolean, popoverVisible: boolean;
/** /**
* Show popover callback. * Show popover callback.
*/ */
showPopover: Function, showPopover: Function;
/** /**
* The type of thumbnail. * The type of thumbnail.
*/ */
thumbnailType: string thumbnailType: string;
} };
const useStyles = makeStyles(() => { const useStyles = makeStyles(() => {
return { return {

View File

@ -8,38 +8,38 @@ type Props = {
/** /**
* Hide popover callback. * Hide popover callback.
*/ */
hidePopover: Function, hidePopover: Function;
/** /**
* Whether or not the button is for the local participant. * Whether or not the button is for the local participant.
*/ */
local: boolean, local: boolean;
/** /**
* The id of the participant for which the button is. * The id of the participant for which the button is.
*/ */
participantId?: string, participantId?: string;
/** /**
* Whether popover is visible or not. * Whether popover is visible or not.
*/ */
popoverVisible: boolean, popoverVisible: boolean;
/** /**
* Show popover callback. * Show popover callback.
*/ */
showPopover: Function, showPopover: Function;
/** /**
* The type of thumbnail. * The type of thumbnail.
*/ */
thumbnailType: string, thumbnailType: string;
/** /**
* Whether or not the component is visible. * Whether or not the component is visible.
*/ */
visible: boolean visible: boolean;
} };
// eslint-disable-next-line no-confusing-arrow // eslint-disable-next-line no-confusing-arrow
const VideoMenuTriggerButton = ({ const VideoMenuTriggerButton = ({

View File

@ -198,7 +198,7 @@ interface FilmstripDimensions {
gridDimensions?: { gridDimensions?: {
columns: number; columns: number;
rows: number; rows: number;
} };
hasScroll?: boolean; hasScroll?: boolean;
thumbnailSize?: Dimensions; thumbnailSize?: Dimensions;
} }
@ -206,7 +206,7 @@ interface FilmstripDimensions {
export interface IFilmstripState { export interface IFilmstripState {
activeParticipants: Array<{ activeParticipants: Array<{
participantId: string; participantId: string;
pinned?: boolean pinned?: boolean;
}>; }>;
enabled: boolean; enabled: boolean;
horizontalViewDimensions: { horizontalViewDimensions: {
@ -255,7 +255,7 @@ export interface IFilmstripState {
width: { width: {
current: number | null; current: number | null;
userSet: number | null; userSet: number | null;
} };
} }
ReducerRegistry.register<IFilmstripState>( ReducerRegistry.register<IFilmstripState>(

View File

@ -10,7 +10,7 @@ export interface IFollowMeState {
moderator?: string; moderator?: string;
state?: { state?: {
[key: string]: string; [key: string]: string;
} };
} }
/** /**

View File

@ -11,7 +11,7 @@ const DEFAULT_STATE = {
}; };
export interface IJaaSState { export interface IJaaSState {
[key: string]: any [key: string]: any;
} }
/** /**

View File

@ -16,12 +16,12 @@ interface Props extends WithTranslation {
/** /**
* An object containing the CSS classes. * An object containing the CSS classes.
*/ */
classes: any, classes: any;
/** /**
* A Map with keyboard keys as keys and translation keys as values. * A Map with keyboard keys as keys and translation keys as values.
*/ */
shortcutDescriptions: Map<string, string> shortcutDescriptions: Map<string, string>;
} }
/** /**

View File

@ -17,17 +17,17 @@ interface Props extends WithTranslation {
/** /**
* True if lobby is currently enabled in the conference. * True if lobby is currently enabled in the conference.
*/ */
_lobbyEnabled: boolean, _lobbyEnabled: boolean;
/** /**
* True if the section should be visible. * True if the section should be visible.
*/ */
_visible: boolean, _visible: boolean;
/** /**
* The Redux Dispatch function. * The Redux Dispatch function.
*/ */
dispatch: Function dispatch: Function;
} }
type State = { type State = {
@ -35,8 +35,8 @@ type State = {
/** /**
* True if the lobby switch is toggled on. * True if the lobby switch is toggled on.
*/ */
lobbyEnabled: boolean lobbyEnabled: boolean;
} };
/** /**
* Implements a security feature section to control lobby mode. * Implements a security feature section to control lobby mode.

View File

@ -23,7 +23,7 @@ type Props = AbstractButtonProps & {
*/ */
dispatch: Function; dispatch: Function;
} };
/** /**
* Component that renders a toolbar button for toggling noise suppression. * Component that renders a toolbar button for toggling noise suppression.

View File

@ -5,7 +5,7 @@ import {
} from './actionTypes'; } from './actionTypes';
export interface INoiseSuppressionState { export interface INoiseSuppressionState {
enabled: boolean enabled: boolean;
} }
const DEFAULT_STATE = { const DEFAULT_STATE = {

View File

@ -23,12 +23,12 @@ interface Props extends WithTranslation {
/** /**
* Whether we are a SIP gateway or not. * Whether we are a SIP gateway or not.
*/ */
_iAmSipGateway: boolean, _iAmSipGateway: boolean;
/** /**
* Whether or not the chat is open. * Whether or not the chat is open.
*/ */
_isChatOpen: boolean, _isChatOpen: boolean;
/** /**
* The notifications to be displayed, with the first index being the * The notifications to be displayed, with the first index being the
@ -37,22 +37,22 @@ interface Props extends WithTranslation {
_notifications: Array<{ _notifications: Array<{
props: Object; props: Object;
uid: number; uid: number;
}>, }>;
/** /**
* JSS classes object. * JSS classes object.
*/ */
classes: any, classes: any;
/** /**
* Invoked to update the redux store in order to remove notifications. * Invoked to update the redux store in order to remove notifications.
*/ */
dispatch: Function, dispatch: Function;
/** /**
* Whether or not the notifications are displayed in a portal. * Whether or not the notifications are displayed in a portal.
*/ */
portal?: boolean portal?: boolean;
} }
const useStyles = (theme: any) => { const useStyles = (theme: any) => {

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

@ -23,39 +23,39 @@ type Props = {
/** /**
* Type of trigger for the breakout room actions. * Type of trigger for the breakout room actions.
*/ */
actionsTrigger?: string, actionsTrigger?: string;
/** /**
* React children. * React children.
*/ */
children: ReactElement, children: ReactElement;
/** /**
* Is this item highlighted/raised. * Is this item highlighted/raised.
*/ */
isHighlighted?: boolean, isHighlighted?: boolean;
/** /**
* Callback for when the mouse leaves this component. * Callback for when the mouse leaves this component.
*/ */
onLeave?: (e?: React.MouseEvent) => void, 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.
*/ */
onRaiseMenu: Function, onRaiseMenu: Function;
/** /**
* The raise context for the participant menu. * The raise context for the participant menu.
*/ */
participantContextEntity?: { participantContextEntity?: {
jid: string jid: string;
}, };
/** /**
* Callback to raise participant context menu. * Callback to raise participant context menu.
*/ */
raiseParticipantContextMenu: Function, raiseParticipantContextMenu: Function;
/** /**
* Room reference. * Room reference.
@ -67,20 +67,20 @@ type Props = {
[jid: string]: { [jid: string]: {
displayName: string; displayName: string;
jid: string; jid: string;
}
}; };
}, };
};
/** /**
* Participants search string. * Participants search string.
*/ */
searchString: string, searchString: string;
/** /**
* Toggles the room participant context menu. * Toggles the room participant context menu.
*/ */
toggleParticipantMenu: Function toggleParticipantMenu: Function;
} };
const useStyles = makeStyles((theme: any) => { const useStyles = makeStyles((theme: any) => {
return { return {

View File

@ -19,8 +19,8 @@ type Props = {
room: { room: {
id: string; id: string;
jid: string; jid: string;
} };
} };
const useStyles = makeStyles((theme: Theme) => { const useStyles = makeStyles((theme: Theme) => {
return { return {

View File

@ -10,7 +10,7 @@ type Props = {
* Click handler function. * Click handler function.
*/ */
onClick: () => void; onClick: () => void;
} };
const RoomActionEllipsis = ({ onClick }: Props) => { const RoomActionEllipsis = ({ onClick }: Props) => {
const { t } = useTranslation(); const { t } = useTranslation();

View File

@ -24,30 +24,30 @@ type Props = {
* Room and participant jid reference. * Room and participant jid reference.
*/ */
entity: { entity: {
jid: string, jid: string;
participantName: string, participantName: string;
room: any room: any;
}, };
/** /**
* Target elements against which positioning calculations are made. * Target elements against which positioning calculations are made.
*/ */
offsetTarget: HTMLElement|undefined, offsetTarget: HTMLElement | undefined;
/** /**
* Callback for the mouse entering the component. * Callback for the mouse entering the component.
*/ */
onEnter: Function, onEnter: Function;
/** /**
* Callback for the mouse leaving the component. * Callback for the mouse leaving the component.
*/ */
onLeave: Function, onLeave: Function;
/** /**
* Callback for making a selection in the menu. * Callback for making a selection in the menu.
*/ */
onSelect: Function onSelect: Function;
}; };
const useStyles = makeStyles((theme: Theme) => { const useStyles = makeStyles((theme: Theme) => {

View File

@ -29,27 +29,27 @@ interface Props extends WithTranslation {
/** /**
* The list of all breakout rooms. * The list of all breakout rooms.
*/ */
_rooms: Array<any>, _rooms: Array<any>;
/** /**
* The Redux dispatch function. * The Redux dispatch function.
*/ */
dispatch: Function, dispatch: Function;
/** /**
* The jid of the selected participant. * The jid of the selected participant.
*/ */
participantJid: string, participantJid: string;
/** /**
* The display name of the selected participant. * The display name of the selected participant.
*/ */
participantName: string, participantName: string;
/** /**
* The room the participant is in. * The room the participant is in.
*/ */
room: any room: any;
} }
/** /**

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