ref(TS ) Improve TS (#12491)

Remove global variables from files
Change type to interface
This commit is contained in:
Robert Pintilii
2022-11-03 10:35:51 +02:00
committed by GitHub
parent 36bef94c3c
commit b52b4c2a78
84 changed files with 241 additions and 296 deletions

5
globals.d.ts vendored
View File

@@ -9,6 +9,11 @@ declare global {
UI: any; UI: any;
API: any; API: any;
conference: any; conference: any;
debugLogs: any;
keyboardshortcut: {
registerShortcut: Function;
unregisterShortcut: Function;
}
}; };
const interfaceConfig: any; const interfaceConfig: any;

View File

@@ -68,7 +68,7 @@ interface IProps extends WithTranslation {
/** /**
* The type of the React {@code Component} state of {@link LoginDialog}. * The type of the React {@code Component} state of {@link LoginDialog}.
*/ */
type State = { interface IState {
/** /**
* Authentication process starts before joining the conference room. * Authentication process starts before joining the conference room.
@@ -84,14 +84,14 @@ type State = {
* 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.
* *
* @returns {React$Element<any>} * @returns {React$Element<any>}
*/ */
class LoginDialog extends Component<IProps, State> { class LoginDialog extends Component<IProps, IState> {
/** /**
* Initializes a new {@code LoginDialog} instance. * Initializes a new {@code LoginDialog} instance.
* *

View File

@@ -8,8 +8,6 @@ import { SET_AUDIO_ONLY } from './actionTypes';
import logger from './logger'; import logger from './logger';
declare let APP: any;
/** /**
* Sets the audio-only flag for the current JitsiConference. * Sets the audio-only flag for the current JitsiConference.
* *

View File

@@ -1,6 +1,6 @@
import { PureComponent } from 'react'; import { PureComponent } from 'react';
export type Props = { export interface IProps {
/** /**
* Color of the (initials based) avatar, if needed. * Color of the (initials based) avatar, if needed.
@@ -31,13 +31,13 @@ export type Props = {
* The URL of the avatar to render. * The URL of the avatar to render.
*/ */
url?: string | Function; url?: string | Function;
}; }
/** /**
* Implements an abstract stateless avatar component that renders an avatar purely from what gets passed through * Implements an abstract stateless avatar component that renders an avatar purely from what gets passed through
* props. * props.
*/ */
export default class AbstractStatelessAvatar<P extends Props> extends PureComponent<P> { export default class AbstractStatelessAvatar<P extends IProps> extends PureComponent<P> {
/** /**
* Checks if the passed prop is a loaded icon or not. * Checks if the passed prop is a loaded icon or not.
* *

View File

@@ -5,7 +5,7 @@ import { Image, Text, View } from 'react-native';
import { Icon } from '../../../icons'; import { Icon } from '../../../icons';
import { type StyleType } from '../../../styles'; import { type StyleType } from '../../../styles';
import AbstractStatelessAvatar, { type Props as AbstractProps } from '../AbstractStatelessAvatar'; import AbstractStatelessAvatar, { type IProps as AbstractProps } from '../AbstractStatelessAvatar';
import styles from './styles'; import styles from './styles';

View File

@@ -3,10 +3,10 @@ import clsx from 'clsx';
import React from 'react'; import React from 'react';
import Icon from '../../../icons/components/Icon'; import Icon from '../../../icons/components/Icon';
import AbstractStatelessAvatar, { type Props as AbstractProps } from '../AbstractStatelessAvatar'; import AbstractStatelessAvatar, { type IProps as AbstractProps } from '../AbstractStatelessAvatar';
import { PRESENCE_AVAILABLE_COLOR, PRESENCE_AWAY_COLOR, PRESENCE_BUSY_COLOR, PRESENCE_IDLE_COLOR } from '../styles'; import { PRESENCE_AVAILABLE_COLOR, PRESENCE_AWAY_COLOR, PRESENCE_BUSY_COLOR, PRESENCE_IDLE_COLOR } from '../styles';
type Props = AbstractProps & { interface IProps extends AbstractProps {
/** /**
* External class name passed through props. * External class name passed through props.
@@ -42,7 +42,7 @@ type Props = AbstractProps & {
* Indicates whether to load the avatar using CORS or not. * Indicates whether to load the avatar using CORS or not.
*/ */
useCORS?: boolean; useCORS?: boolean;
}; }
/** /**
* Creates the styles for the component. * Creates the styles for the component.
@@ -115,14 +115,14 @@ const styles = () => {
* Implements a stateless avatar component that renders an avatar purely from what gets passed through * Implements a stateless avatar component that renders an avatar purely from what gets passed through
* props. * props.
*/ */
class StatelessAvatar extends AbstractStatelessAvatar<Props> { class StatelessAvatar extends AbstractStatelessAvatar<IProps> {
/** /**
* Instantiates a new {@code Component}. * Instantiates a new {@code Component}.
* *
* @inheritdoc * @inheritdoc
*/ */
constructor(props: Props) { constructor(props: IProps) {
super(props); super(props);
this._onAvatarLoadError = this._onAvatarLoadError.bind(this); this._onAvatarLoadError = this._onAvatarLoadError.bind(this);

View File

@@ -7,7 +7,7 @@ import { isMobileBrowser } from '../../environment/utils';
import { withPixelLineHeight } from '../../styles/functions.web'; import { withPixelLineHeight } from '../../styles/functions.web';
import participantsPaneTheme from '../themes/participantsPaneTheme.json'; import participantsPaneTheme from '../themes/participantsPaneTheme.json';
type Props = { interface IProps {
/** /**
* List item actions. * List item actions.
@@ -74,7 +74,7 @@ type Props = {
*/ */
trigger: string; trigger: string;
}; }
const useStyles = makeStyles()((theme: Theme) => { const useStyles = makeStyles()((theme: Theme) => {
return { return {
@@ -188,7 +188,7 @@ const ListItem = ({
testId, testId,
textChildren, textChildren,
trigger trigger
}: Props) => { }: IProps) => {
const { classes: styles, cx } = useStyles(); const { classes: styles, cx } = useStyles();
const _isMobile = isMobileBrowser(); const _isMobile = isMobileBrowser();
let timeoutHandler: number; let timeoutHandler: number;

View File

@@ -14,8 +14,6 @@ import {
import { IConfig } from './configType'; import { IConfig } from './configType';
import { _cleanupConfig } from './functions'; import { _cleanupConfig } from './functions';
declare let interfaceConfig: any;
/** /**
* The initial state of the feature base/config when executing in a * The initial state of the feature base/config when executing in a
* non-React Native environment. The mandatory configuration to be passed to * non-React Native environment. The mandatory configuration to be passed to

View File

@@ -3,7 +3,7 @@ import { Component } from 'react';
/** /**
* The type of the React {@code Component} props of {@link AbstractDialogTab}. * The type of the React {@code Component} props of {@link AbstractDialogTab}.
*/ */
export type Props = { export interface IProps {
/** /**
* Function that closes the dialog. * Function that closes the dialog.
@@ -19,7 +19,7 @@ export type Props = {
* The id of the tab. * The id of the tab.
*/ */
tabId: number; tabId: number;
}; }
/** /**
@@ -27,7 +27,7 @@ export type Props = {
* *
* @augments Component * @augments Component
*/ */
class AbstractDialogTab<P extends Props, S> extends Component<P, S> { class AbstractDialogTab<P extends IProps, S> extends Component<P, S> {
/** /**
* Initializes a new {@code AbstractDialogTab} instance. * Initializes a new {@code AbstractDialogTab} instance.
* *

View File

@@ -25,8 +25,6 @@ const browserNameToCheck = {
safari: browser.isSafari.bind(browser) safari: browser.isSafari.bind(browser)
}; };
declare let interfaceConfig: any;
/** /**
* Returns whether or not jitsi is optimized and targeted for the provided * Returns whether or not jitsi is optimized and targeted for the provided
* browser name. * browser name.

View File

@@ -1,5 +1,3 @@
declare let APP: any;
import COUNTRIES_RESOURCES from 'i18n-iso-countries/langs/en.json'; import COUNTRIES_RESOURCES from 'i18n-iso-countries/langs/en.json';
import i18next from 'i18next'; import i18next from 'i18next';
import I18nextXHRBackend from 'i18next-xhr-backend'; import I18nextXHRBackend from 'i18next-xhr-backend';

View File

@@ -3,8 +3,6 @@ import BrowserLanguageDetector from 'i18next-browser-languagedetector';
import configLanguageDetector from './configLanguageDetector'; import configLanguageDetector from './configLanguageDetector';
import customNavigatorDetector from './customNavigatorDetector'; import customNavigatorDetector from './customNavigatorDetector';
declare let interfaceConfig: any;
/** /**
* The ordered list (by name) of language detectors to be utilized as backends * The ordered list (by name) of language detectors to be utilized as backends
* by the singleton language detector for Web. * by the singleton language detector for Web.

View File

@@ -6,7 +6,7 @@ import { Container } from '../../react/base';
// @ts-ignore // @ts-ignore
import { styleTypeToObject } from '../../styles'; import { styleTypeToObject } from '../../styles';
type Props = { interface IProps {
/** /**
* The id of the element this button icon controls. * The id of the element this button icon controls.
@@ -102,7 +102,7 @@ type Props = {
* 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;
@@ -110,10 +110,10 @@ export const DEFAULT_SIZE = navigator.product === 'ReactNative' ? 36 : 22;
/** /**
* Implements an Icon component that takes a loaded SVG file as prop and renders it as an icon. * Implements an Icon component that takes a loaded SVG file as prop and renders it as an icon.
* *
* @param {Props} props - The props of the component. * @param {IProps} props - The props of the component.
* @returns {ReactElement} * @returns {ReactElement}
*/ */
export default function Icon(props: Props) { export default function Icon(props: IProps) {
const { const {
className, className,
color, color,
@@ -135,7 +135,7 @@ export default function Icon(props: Props) {
onKeyPress, onKeyPress,
onKeyDown, onKeyDown,
...rest ...rest
}: Props = props; }: IProps = props;
const { const {
color: styleColor, color: styleColor,

View File

@@ -1,21 +0,0 @@
import { Component } from 'react';
export type Props = {
/**
* An SVG icon to be rendered as the content of the label.
*/
icon?: Function;
/**
* String or component that will be rendered as the label itself.
*/
text?: string;
};
/**
* Abstract class for the {@code Label} component.
*/
export default class Label<P extends Props, S>
extends Component<P, S> {
}

View File

@@ -1,12 +1,9 @@
// @flow // @flow
import React from 'react'; import React, { Component } from 'react';
import { Animated, Text } from 'react-native'; import { Animated, Text } from 'react-native';
import Icon from '../../../icons/components/Icon'; import Icon from '../../../icons/components/Icon';
import { type StyleType, combineStyles } from '../../../styles'; import { type StyleType, combineStyles } from '../../../styles';
import AbstractLabel, {
type Props as AbstractProps
} from '../AbstractLabel';
import styles from './styles'; import styles from './styles';
@@ -20,7 +17,12 @@ const STATUS_IN_PROGRESS = 'in_progress';
*/ */
const STATUS_OFF = 'off'; const STATUS_OFF = 'off';
type Props = AbstractProps & { type Props = {
/**
* An SVG icon to be rendered as the content of the label.
*/
icon?: Function,
/** /**
* Color for the icon. * Color for the icon.
@@ -39,10 +41,16 @@ type Props = AbstractProps & {
*/ */
style?: ?StyleType, style?: ?StyleType,
/**
* String or component that will be rendered as the label itself.
*/
text?: string,
/** /**
* Custom styles for the text. * Custom styles for the text.
*/ */
textStyle?: ?StyleType textStyle?: ?StyleType
}; };
type State = { type State = {
@@ -58,7 +66,7 @@ type State = {
* Renders a circular indicator to be used for status icons, such as recording * Renders a circular indicator to be used for status icons, such as recording
* on, audio-only conference, video quality and similar. * on, audio-only conference, video quality and similar.
*/ */
export default class Label extends AbstractLabel<Props, State> { export default class Label extends Component<Props, State> {
/** /**
* A reference to the started animation of this label. * A reference to the started animation of this label.
*/ */

View File

@@ -1,5 +1,3 @@
declare let APP: any;
/** /**
* Constructs a log transport object for use with external API. * Constructs a log transport object for use with external API.
* *

View File

@@ -19,8 +19,6 @@ import JitsiMeetLogStorage from './JitsiMeetLogStorage';
import { SET_LOGGING_CONFIG } from './actionTypes'; import { SET_LOGGING_CONFIG } from './actionTypes';
import { setLogCollector, setLoggingConfig } from './actions'; import { setLogCollector, setLoggingConfig } from './actions';
declare let APP: any;
/** /**
* The Redux middleware of the feature base/logging. * The Redux middleware of the feature base/logging.
* *

View File

@@ -1,9 +1,6 @@
import { IReduxState, IStore } from '../../app/types'; import { IReduxState, IStore } from '../../app/types';
import StateListenerRegistry from '../redux/StateListenerRegistry'; import StateListenerRegistry from '../redux/StateListenerRegistry';
declare let APP: any;
/** /**
* Notifies when the local audio mute state changes. * Notifies when the local audio mute state changes.
*/ */

View File

@@ -11,7 +11,7 @@ import { getContextMenuStyle } from '../functions.web';
/** /**
* The type of the React {@code Component} props of {@link Popover}. * The type of the React {@code Component} props of {@link Popover}.
*/ */
type Props = { interface IProps {
/** /**
* A child React Element to use as the trigger for showing the dialog. * A child React Element to use as the trigger for showing the dialog.
@@ -69,12 +69,12 @@ type Props = {
* Whether the popover is visible or not. * Whether the popover is visible or not.
*/ */
visible: boolean; visible: boolean;
}; }
/** /**
* The type of the React {@code Component} state of {@link Popover}. * The type of the React {@code Component} state of {@link Popover}.
*/ */
type State = { interface IState {
/** /**
* The style to apply to the context menu in order to position it correctly. * The style to apply to the context menu in order to position it correctly.
@@ -85,7 +85,7 @@ type State = {
position: string; position: string;
top?: string; top?: string;
} | null; } | null;
}; }
/** /**
* Implements a React {@code Component} for showing an {@code Popover} on * Implements a React {@code Component} for showing an {@code Popover} on
@@ -93,7 +93,7 @@ type State = {
* *
* @augments Component * @augments Component
*/ */
class Popover extends Component<Props, State> { class Popover extends Component<IProps, IState> {
/** /**
* Default values for {@code Popover} component's properties. * Default values for {@code Popover} component's properties.
* *
@@ -118,7 +118,7 @@ class Popover extends Component<Props, State> {
* @param {Object} props - The read-only properties with which the new * @param {Object} props - The read-only properties with which the new
* instance is to be initialized. * instance is to be initialized.
*/ */
constructor(props: Props) { constructor(props: IProps) {
super(props); super(props);
this.state = { this.state = {
@@ -409,7 +409,7 @@ class Popover extends Component<Props, State> {
* @param {Object} state - The Redux state. * @param {Object} state - The Redux state.
* @param {Object} ownProps - The own props of the component. * @param {Object} ownProps - The own props of the component.
* @private * @private
* @returns {Props} * @returns {IProps}
*/ */
function _mapStateToProps(state: IReduxState) { function _mapStateToProps(state: IReduxState) {
return { return {

View File

@@ -6,7 +6,7 @@ import Icon from '../../../icons/components/Icon';
import { IconArrowDown } from '../../../icons/svg'; import { IconArrowDown } from '../../../icons/svg';
import { withPixelLineHeight } from '../../../styles/functions.web'; import { withPixelLineHeight } from '../../../styles/functions.web';
type Props = { interface IProps {
/** /**
* Icon to display in the options section. * Icon to display in the options section.
@@ -78,7 +78,7 @@ type Props = {
* The type of th button: primary, secondary, text. * The type of th button: primary, secondary, text.
*/ */
type: string; type: string;
}; }
const useStyles = makeStyles()((theme: Theme) => { const useStyles = makeStyles()((theme: Theme) => {
return { return {
@@ -183,7 +183,7 @@ function ActionButton({
ariaPressed, ariaPressed,
ariaLabel, ariaLabel,
ariaDropDownLabel ariaDropDownLabel
}: Props) { }: IProps) {
const { classes, cx } = useStyles(); const { classes, cx } = useStyles();
const onKeyPressHandler = useCallback(e => { const onKeyPressHandler = useCallback(e => {

View File

@@ -38,8 +38,6 @@ import { IShareOptions, IToggleScreenSharingOptions } from './types';
export * from './actions.any'; export * from './actions.any';
declare const APP: any;
/** /**
* Signals that the local participant is ending screensharing or beginning the screensharing flow. * Signals that the local participant is ending screensharing or beginning the screensharing flow.
* *

View File

@@ -6,7 +6,7 @@ import { IReduxState } from '../../../app/types';
import BaseTheme from './BaseTheme.web'; import BaseTheme from './BaseTheme.web';
type Props = { interface IProps {
/** /**
* The default theme or theme set through advanced branding. * The default theme or theme set through advanced branding.
@@ -17,7 +17,7 @@ type Props = {
* 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.
@@ -25,7 +25,7 @@ type Props = {
* @param {Object} props - The props of the component. * @param {Object} props - The props of the component.
* @returns {React.ReactNode} * @returns {React.ReactNode}
*/ */
function JitsiThemeProvider(props: Props) { function JitsiThemeProvider(props: IProps) {
return ( return (
<StyledEngineProvider injectFirst = { true }> <StyledEngineProvider injectFirst = { true }>
<ThemeProvider theme = { props._theme }>{ props.children }</ThemeProvider> <ThemeProvider theme = { props._theme }>{ props.children }</ThemeProvider>
@@ -37,7 +37,7 @@ function JitsiThemeProvider(props: Props) {
* Maps part of the Redux state to the props of this component. * Maps part of the Redux state to the props of this component.
* *
* @param {Object} state - The Redux state. * @param {Object} state - The Redux state.
* @returns {Props} * @returns {IProps}
*/ */
function _mapStateToProps(state: IReduxState) { function _mapStateToProps(state: IReduxState) {
const { muiBrandedTheme } = state['features/dynamic-branding']; const { muiBrandedTheme } = state['features/dynamic-branding'];

View File

@@ -34,7 +34,7 @@ const getComputedOuterHeight = (element: HTMLElement) => {
+ getFloatStyleProperty(computedStyle, 'margin-bottom'); + getFloatStyleProperty(computedStyle, 'margin-bottom');
}; };
type Props = { interface IProps {
/** /**
* Accessibility label for menu container. * Accessibility label for menu container.
@@ -100,7 +100,7 @@ type Props = {
* 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;
@@ -156,7 +156,7 @@ const ContextMenu = ({
onDrawerClose, onDrawerClose,
onMouseEnter, onMouseEnter,
onMouseLeave onMouseLeave
}: Props) => { }: IProps) => {
const [ isHidden, setIsHidden ] = useState(true); const [ isHidden, setIsHidden ] = useState(true);
const containerRef = useRef<HTMLDivElement | null>(null); const containerRef = useRef<HTMLDivElement | null>(null);
const { classes: styles, cx } = useStyles(); const { classes: styles, cx } = useStyles();

View File

@@ -7,7 +7,7 @@ import { showOverflowDrawer } from '../../../../toolbox/functions.web';
import Icon from '../../../icons/components/Icon'; import Icon from '../../../icons/components/Icon';
import { withPixelLineHeight } from '../../../styles/functions.web'; import { withPixelLineHeight } from '../../../styles/functions.web';
export type Props = { export interface IProps {
/** /**
* Label used for accessibility. * Label used for accessibility.
@@ -69,7 +69,7 @@ export type Props = {
* Class name for the text. * Class name for the text.
*/ */
textClassName?: string; textClassName?: string;
}; }
const useStyles = makeStyles()((theme: Theme) => { const useStyles = makeStyles()((theme: Theme) => {
return { return {
@@ -131,7 +131,7 @@ const ContextMenuItem = ({
onKeyPress, onKeyPress,
testId, testId,
text, text,
textClassName }: Props) => { textClassName }: IProps) => {
const { classes: styles, cx } = useStyles(); const { classes: styles, cx } = useStyles();
const _overflowDrawer: boolean = useSelector(showOverflowDrawer); const _overflowDrawer: boolean = useSelector(showOverflowDrawer);

View File

@@ -2,10 +2,10 @@ import { Theme } from '@mui/material';
import React, { ReactNode } from 'react'; import React, { ReactNode } from 'react';
import { makeStyles } from 'tss-react/mui'; import { makeStyles } from 'tss-react/mui';
import ContextMenuItem, { Props as ItemProps } from './ContextMenuItem'; import ContextMenuItem, { IProps as ItemProps } from './ContextMenuItem';
type Props = { interface IProps {
/** /**
* List of actions in this group. * List of actions in this group.
@@ -16,7 +16,7 @@ type Props = {
* The children of the component. * The children of the component.
*/ */
children?: ReactNode; children?: ReactNode;
}; }
const useStyles = makeStyles()((theme: Theme) => { const useStyles = makeStyles()((theme: Theme) => {
return { return {
@@ -43,7 +43,7 @@ const useStyles = makeStyles()((theme: Theme) => {
const ContextMenuItemGroup = ({ const ContextMenuItemGroup = ({
actions, actions,
children children
}: Props) => { }: IProps) => {
const { classes: styles } = useStyles(); const { classes: styles } = useStyles();
return ( return (

View File

@@ -1,5 +1,3 @@
declare let JitsiMeetJS: any;
/** /**
* Loads a script from a specific URL. The script will be interpreted upon load. * Loads a script from a specific URL. The script will be interpreted upon load.
* *

View File

@@ -32,8 +32,6 @@ import {
} from './functions'; } from './functions';
import logger from './logger'; import logger from './logger';
declare let APP: any;
/** /**
* Action to create a breakout room. * Action to create a breakout room.
* *

View File

@@ -10,8 +10,6 @@ import { moveToRoom } from './actions';
import logger from './logger'; import logger from './logger';
import { IRooms } from './types'; import { IRooms } from './types';
declare const APP: any;
/** /**
* Registers a change handler for state['features/base/conference'].conference to * Registers a change handler for state['features/base/conference'].conference to
* set the event listeners needed for the breakout rooms feature to operate. * set the event listeners needed for the breakout rooms feature to operate.

View File

@@ -37,7 +37,7 @@ interface IProps extends WithTranslation {
/** /**
* The type of the React {@code Component} state of {@link ChatInput}. * The type of the React {@code Component} state of {@link ChatInput}.
*/ */
type State = { interface IState {
/** /**
* User provided nickname when the input text is provided in the view. * User provided nickname when the input text is provided in the view.
@@ -48,14 +48,14 @@ type State = {
* Whether or not the smiley selector is visible. * Whether or not the smiley selector is visible.
*/ */
showSmileysPanel: boolean; showSmileysPanel: boolean;
}; }
/** /**
* Implements a React Component for drafting and submitting a chat message. * Implements a React Component for drafting and submitting a chat message.
* *
* @augments Component * @augments Component
*/ */
class ChatInput extends Component<IProps, State> { class ChatInput extends Component<IProps, IState> {
_textArea?: RefObject<HTMLTextAreaElement>; _textArea?: RefObject<HTMLTextAreaElement>;
state = { state = {

View File

@@ -30,20 +30,20 @@ interface IProps extends WithTranslation {
/** /**
* The type of the React {@code Component} state of {@DisplayNameForm}. * The type of the React {@code Component} state of {@DisplayNameForm}.
*/ */
type State = { interface IState {
/** /**
* 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;
}; }
/** /**
* React Component for requesting the local participant to set a display name. * React Component for requesting the local participant to set a display name.
* *
* @augments Component * @augments Component
*/ */
class DisplayNameForm extends Component<IProps, State> { class DisplayNameForm extends Component<IProps, IState> {
state = { state = {
displayName: '' displayName: ''
}; };

View File

@@ -1,13 +1,13 @@
import React from 'react'; import React from 'react';
import { makeStyles } from 'tss-react/mui'; import { makeStyles } from 'tss-react/mui';
type Props = { interface IProps {
/** /**
* URL of the GIF. * URL of the GIF.
*/ */
url: string; url: string;
}; }
const useStyles = makeStyles()(() => { const useStyles = makeStyles()(() => {
return { return {
@@ -27,7 +27,7 @@ const useStyles = makeStyles()(() => {
}; };
}); });
const GifMessage = ({ url }: Props) => { const GifMessage = ({ url }: IProps) => {
const { classes: styles } = useStyles(); const { classes: styles } = useStyles();
return (<div className = { styles.container }> return (<div className = { styles.container }>

View File

@@ -3,7 +3,7 @@ import { makeStyles } from 'tss-react/mui';
import { isMobileBrowser } from '../../../base/environment/utils'; import { isMobileBrowser } from '../../../base/environment/utils';
type Props = { interface IProps {
/** /**
* The component(s) that need to be scrollable on mobile. * The component(s) that need to be scrollable on mobile.
@@ -20,7 +20,7 @@ type Props = {
*/ */
isModal: boolean; isModal: boolean;
}; }
const useStyles = makeStyles()(() => { const useStyles = makeStyles()(() => {
return { return {
@@ -40,7 +40,7 @@ const useStyles = makeStyles()(() => {
* *
* @returns {ReactElement} * @returns {ReactElement}
*/ */
function TouchmoveHack({ children, isModal, flex }: Props) { function TouchmoveHack({ children, isModal, flex }: IProps) {
if (!isModal || !isMobileBrowser()) { if (!isModal || !isMobileBrowser()) {
return children; return children;
} }

View File

@@ -21,7 +21,7 @@ import { VideoQualityLabel } from '../../../../video-quality';
import styles from './styles'; import styles from './styles';
type Props = { interface IProps {
/** /**
* Name of the meeting we're currently in. * Name of the meeting we're currently in.
@@ -33,16 +33,16 @@ type Props = {
*/ */
_meetingNameEnabled: boolean; _meetingNameEnabled: boolean;
}; }
/** /**
* Implements a navigation bar component that is rendered on top of the * Implements a navigation bar component that is rendered on top of the
* carmode screen. * carmode screen.
* *
* @param {Props} props - The React props passed to this component. * @param {IProps} props - The React props passed to this component.
* @returns {JSX.Element} * @returns {JSX.Element}
*/ */
const TitleBar = (props: Props): JSX.Element => { const TitleBar = (props: IProps): JSX.Element => {
const localParticipant = useSelector(getLocalParticipant); const localParticipant = useSelector(getLocalParticipant);
const localParticipantId = localParticipant?.id; const localParticipantId = localParticipant?.id;
@@ -83,7 +83,7 @@ const TitleBar = (props: Props): JSX.Element => {
* Maps part of the Redux store to the props of this component. * Maps part of the Redux store to the props of this component.
* *
* @param {Object} state - The Redux state. * @param {Object} state - The Redux state.
* @returns {Props} * @returns {IProps}
*/ */
function _mapStateToProps(state: IReduxState) { function _mapStateToProps(state: IReduxState) {
const { hideConferenceSubject } = state['features/base/config']; const { hideConferenceSubject } = state['features/base/config'];

View File

@@ -146,13 +146,13 @@ type Props = AbstractProps & WithTranslation & {
statsPopoverPosition: string; statsPopoverPosition: string;
}; };
type State = AbstractState & { interface IState extends AbstractState {
/** /**
* Whether popover is ivisible or not. * Whether popover is ivisible or not.
*/ */
popoverVisible: boolean; popoverVisible: boolean;
}; }
const styles = (theme: Theme) => { const styles = (theme: Theme) => {
return { return {
@@ -206,7 +206,7 @@ const styles = (theme: Theme) => {
* *
* @augments {Component} * @augments {Component}
*/ */
class ConnectionIndicator extends AbstractConnectionIndicator<Props, State> { class ConnectionIndicator extends AbstractConnectionIndicator<Props, IState> {
/** /**
* Initializes a new {@code ConnectionIndicator} instance. * Initializes a new {@code ConnectionIndicator} instance.
* *

View File

@@ -70,7 +70,7 @@ interface IProps extends WithTranslation {
/** /**
* The type of the React {@code Component} state of {@link DesktopPicker}. * The type of the React {@code Component} state of {@link DesktopPicker}.
*/ */
type State = { interface IState {
/** /**
* The state of the audio screen share checkbox. * The state of the audio screen share checkbox.
@@ -96,7 +96,7 @@ type State = {
* The desktop source types to fetch previews for. * The desktop source types to fetch previews for.
*/ */
types: Array<string>; types: Array<string>;
}; }
/** /**
@@ -104,7 +104,7 @@ type State = {
* *
* @augments Component * @augments Component
*/ */
class DesktopPicker extends PureComponent<IProps, State> { class DesktopPicker extends PureComponent<IProps, IState> {
/** /**
* Implements React's {@link Component#getDerivedStateFromProps()}. * Implements React's {@link Component#getDerivedStateFromProps()}.
* *
@@ -130,7 +130,7 @@ class DesktopPicker extends PureComponent<IProps, State> {
_poller: any = null; _poller: any = null;
state: State = { state: IState = {
screenShareAudio: false, screenShareAudio: false,
selectedSource: {}, selectedSource: {},
selectedTab: 0, selectedTab: 0,

View File

@@ -12,7 +12,7 @@ import { connect } from '../../../base/redux/functions';
// @ts-ignore // @ts-ignore
import styles from './styles'; import styles from './styles';
type Props = { interface IProps {
/** /**
* The name of the participant to render. * The name of the participant to render.
@@ -33,12 +33,12 @@ 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.
*/ */
class DisplayNameLabel extends React.Component<Props> { class DisplayNameLabel extends React.Component<IProps> {
/** /**
* Implements {@code Component#render}. * Implements {@code Component#render}.
* *
@@ -65,10 +65,10 @@ class DisplayNameLabel extends React.Component<Props> {
* Maps part of the Redux state to the props of this component. * Maps part of the Redux state to the props of this component.
* *
* @param {any} state - The Redux state. * @param {any} state - The Redux state.
* @param {Props} ownProps - The own props of the component. * @param {IProps} ownProps - The own props of the component.
* @returns {Props} * @returns {IProps}
*/ */
function _mapStateToProps(state: IReduxState, ownProps: Partial<Props>) { function _mapStateToProps(state: IReduxState, ownProps: Partial<IProps>) {
const participant = getParticipantById(state, ownProps.participantId ?? ''); const participant = getParticipantById(state, ownProps.participantId ?? '');
return { return {

View File

@@ -9,13 +9,13 @@ import AbstractDisplayNamePrompt, { IProps } from '../AbstractDisplayNamePrompt'
/** /**
* The type of the React {@code Component} props of {@link DisplayNamePrompt}. * The type of the React {@code Component} props of {@link DisplayNamePrompt}.
*/ */
type State = { interface IState {
/** /**
* The name to show in the display name text field. * The name to show in the display name text field.
*/ */
displayName: string; displayName: string;
}; }
/** /**
* Implements a React {@code Component} for displaying a dialog with an field * Implements a React {@code Component} for displaying a dialog with an field
@@ -23,7 +23,7 @@ type State = {
* *
* @augments Component * @augments Component
*/ */
class DisplayNamePrompt extends AbstractDisplayNamePrompt<State> { class DisplayNamePrompt extends AbstractDisplayNamePrompt<IState> {
/** /**
* Initializes a new {@code DisplayNamePrompt} instance. * Initializes a new {@code DisplayNamePrompt} instance.
* *

View File

@@ -44,13 +44,13 @@ interface IProps extends WithTranslation {
dispatch: IStore['dispatch']; dispatch: IStore['dispatch'];
} }
type State = { interface IState {
/** /**
* True if the switch is toggled on. * True if the switch is toggled on.
*/ */
toggled: boolean; toggled: boolean;
}; }
/** /**
* Implements a React {@code Component} for displaying a security dialog section with a field * Implements a React {@code Component} for displaying a security dialog section with a field
@@ -58,13 +58,13 @@ type State = {
* *
* @augments Component * @augments Component
*/ */
class E2EESection extends Component<IProps, State> { class E2EESection extends Component<IProps, IState> {
/** /**
* Implements React's {@link Component#getDerivedStateFromProps()}. * Implements React's {@link Component#getDerivedStateFromProps()}.
* *
* @inheritdoc * @inheritdoc
*/ */
static getDerivedStateFromProps(props: IProps, state: State) { static getDerivedStateFromProps(props: IProps, state: IState) {
if (props._toggled !== state.toggled) { if (props._toggled !== state.toggled) {
return { return {

View File

@@ -23,7 +23,6 @@ import {
sendFaceExpressionsWebhook sendFaceExpressionsWebhook
} from './functions'; } from './functions';
import logger from './logger'; import logger from './logger';
declare const APP: any;
/** /**
* Class for face language detection. * Class for face language detection.

View File

@@ -57,8 +57,6 @@ import ThumbnailWrapper from './ThumbnailWrapper';
// @ts-ignore // @ts-ignore
import { styles } from './styles'; import { styles } from './styles';
declare let APP: any;
/** /**
* The type of the React {@code Component} props of {@link Filmstrip}. * The type of the React {@code Component} props of {@link Filmstrip}.
*/ */
@@ -230,7 +228,7 @@ interface IProps extends WithTranslation {
filmstripType: string; filmstripType: string;
} }
type State = { interface IState {
/** /**
* Initial top panel height on drag handle mouse down. * Initial top panel height on drag handle mouse down.
@@ -251,7 +249,7 @@ type State = {
* 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
@@ -259,7 +257,7 @@ type State = {
* *
* @augments Component * @augments Component
*/ */
class Filmstrip extends PureComponent <IProps, State> { class Filmstrip extends PureComponent <IProps, IState> {
_throttledResize: Function; _throttledResize: Function;

View File

@@ -13,7 +13,7 @@ import { getPinnedActiveParticipants, isStageFilmstripAvailable } from '../../fu
/** /**
* The type of the React {@code Component} props of {@link PinnedIndicator}. * The type of the React {@code Component} props of {@link PinnedIndicator}.
*/ */
type Props = { interface IProps {
/** /**
* The font-size for the icon. * The font-size for the icon.
@@ -30,7 +30,7 @@ type Props = {
* 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()(() => {
return { return {
@@ -54,7 +54,7 @@ const PinnedIndicator = ({
iconSize, iconSize,
participantId, participantId,
tooltipPosition tooltipPosition
}: Props) => { }: IProps) => {
const stageFilmstrip = useSelector(isStageFilmstripAvailable); const stageFilmstrip = useSelector(isStageFilmstripAvailable);
const pinned = useSelector((state: IReduxState) => getParticipantById(state, participantId))?.pinned; const pinned = useSelector((state: IReduxState) => getParticipantById(state, participantId))?.pinned;
const activePinnedParticipants: Array<{ participantId: string; pinned: boolean; }> const activePinnedParticipants: Array<{ participantId: string; pinned: boolean; }>

View File

@@ -12,7 +12,7 @@ import BaseIndicator from '../../../base/react/components/web/BaseIndicator';
/** /**
* The type of the React {@code Component} props of {@link RaisedHandIndicator}. * The type of the React {@code Component} props of {@link RaisedHandIndicator}.
*/ */
type Props = { interface IProps {
/** /**
* The font-size for the icon. * The font-size for the icon.
@@ -29,7 +29,7 @@ type Props = {
* 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: Theme) => { const useStyles = makeStyles()((theme: Theme) => {
return { return {
@@ -53,7 +53,7 @@ const RaisedHandIndicator = ({
iconSize, iconSize,
participantId, participantId,
tooltipPosition tooltipPosition
}: Props) => { }: IProps) => {
const participant: IParticipant | undefined = useSelector((state: IReduxState) => const participant: IParticipant | undefined = useSelector((state: IReduxState) =>
getParticipantById(state, participantId)); getParticipantById(state, participantId));
const _raisedHand = hasRaisedHand(participant); const _raisedHand = hasRaisedHand(participant);

View File

@@ -75,12 +75,10 @@ import ThumbnailTopIndicators from './ThumbnailTopIndicators';
// @ts-ignore // @ts-ignore
import VirtualScreenshareParticipant from './VirtualScreenshareParticipant'; import VirtualScreenshareParticipant from './VirtualScreenshareParticipant';
declare let interfaceConfig: any;
/** /**
* The type of the React {@code Component} state of {@link Thumbnail}. * The type of the React {@code Component} state of {@link Thumbnail}.
*/ */
export type State = { export interface IState {
/** /**
* Indicates that the canplay event has been received. * Indicates that the canplay event has been received.
@@ -101,12 +99,12 @@ export type State = {
* Whether popover is visible or not. * Whether popover is visible or not.
*/ */
popoverVisible: boolean; popoverVisible: boolean;
}; }
/** /**
* The type of the React {@code Component} props of {@link Thumbnail}. * The type of the React {@code Component} props of {@link Thumbnail}.
*/ */
export type Props = { export interface IProps {
/** /**
* The audio track related to the participant. * The audio track related to the participant.
@@ -277,7 +275,7 @@ export type Props = {
* there is empty space. * there is empty space.
*/ */
width?: number; width?: number;
}; }
const defaultStyles = (theme: Theme) => { const defaultStyles = (theme: Theme) => {
return { return {
@@ -384,7 +382,7 @@ const defaultStyles = (theme: Theme) => {
* *
* @augments Component * @augments Component
*/ */
class Thumbnail extends Component<Props, State> { class Thumbnail extends Component<IProps, IState> {
/** /**
* The long touch setTimeout handler. * The long touch setTimeout handler.
*/ */
@@ -402,7 +400,7 @@ class Thumbnail extends Component<Props, State> {
* @param {Object} props - The read-only React Component props with which * @param {Object} props - The read-only React Component props with which
* the new instance is to be initialized. * the new instance is to be initialized.
*/ */
constructor(props: Props) { constructor(props: IProps) {
super(props); super(props);
const state = { const state = {
@@ -487,7 +485,7 @@ class Thumbnail extends Component<Props, State> {
* @inheritdoc * @inheritdoc
* @returns {void} * @returns {void}
*/ */
componentDidUpdate(prevProps: Props, prevState: State) { componentDidUpdate(prevProps: IProps, prevState: IState) {
if (prevState.displayMode !== this.state.displayMode) { if (prevState.displayMode !== this.state.displayMode) {
this._onDisplayModeChanged(); this._onDisplayModeChanged();
} }
@@ -567,7 +565,7 @@ class Thumbnail extends Component<Props, State> {
* *
* @inheritdoc * @inheritdoc
*/ */
static getDerivedStateFromProps(props: Props, prevState: State) { static getDerivedStateFromProps(props: IProps, prevState: IState) {
if (!props._videoTrack && prevState.canPlayEventReceived) { if (!props._videoTrack && prevState.canPlayEventReceived) {
const newState = { const newState = {
...prevState, ...prevState,
@@ -1168,7 +1166,7 @@ class Thumbnail extends Component<Props, State> {
* @param {Object} state - The Redux state. * @param {Object} state - The Redux state.
* @param {Object} ownProps - The own props of the component. * @param {Object} ownProps - The own props of the component.
* @private * @private
* @returns {Props} * @returns {IProps}
*/ */
function _mapStateToProps(state: IReduxState, ownProps: any): Object { function _mapStateToProps(state: IReduxState, ownProps: any): Object {
const { participantID, filmstripType = FILMSTRIP_TYPE.MAIN } = ownProps; const { participantID, filmstripType = FILMSTRIP_TYPE.MAIN } = ownProps;

View File

@@ -17,9 +17,7 @@ import { THUMBNAIL_TYPE } from '../../constants';
// @ts-ignore // @ts-ignore
import StatusIndicators from './StatusIndicators'; import StatusIndicators from './StatusIndicators';
declare let interfaceConfig: any; interface IProps {
type Props = {
/** /**
* Class name for indicators container. * Class name for indicators container.
@@ -45,7 +43,7 @@ type Props = {
* The type of thumbnail. * The type of thumbnail.
*/ */
thumbnailType: string; thumbnailType: string;
}; }
const useStyles = makeStyles()(() => { const useStyles = makeStyles()(() => {
return { return {
@@ -72,7 +70,7 @@ const ThumbnailBottomIndicators = ({
participantId, participantId,
showStatusIndicators = true, showStatusIndicators = true,
thumbnailType thumbnailType
}: Props) => { }: IProps) => {
const { classes: styles } = useStyles(); const { classes: styles } = useStyles();
const _allowEditing = !useSelector(isNameReadOnly); const _allowEditing = !useSelector(isNameReadOnly);
const _defaultLocalDisplayName = interfaceConfig.DEFAULT_LOCAL_DISPLAY_NAME; const _defaultLocalDisplayName = interfaceConfig.DEFAULT_LOCAL_DISPLAY_NAME;

View File

@@ -19,9 +19,7 @@ import RaisedHandIndicator from './RaisedHandIndicator';
import StatusIndicators from './StatusIndicators'; import StatusIndicators from './StatusIndicators';
import VideoMenuTriggerButton from './VideoMenuTriggerButton'; import VideoMenuTriggerButton from './VideoMenuTriggerButton';
declare let interfaceConfig: any; interface IProps {
type Props = {
/** /**
* Whether to hide the connection indicator. * Whether to hide the connection indicator.
@@ -67,7 +65,7 @@ type Props = {
* The type of thumbnail. * The type of thumbnail.
*/ */
thumbnailType: string; thumbnailType: string;
}; }
const useStyles = makeStyles()(() => { const useStyles = makeStyles()(() => {
return { return {
@@ -91,7 +89,7 @@ const ThumbnailTopIndicators = ({
popoverVisible, popoverVisible,
showPopover, showPopover,
thumbnailType thumbnailType
}: Props) => { }: IProps) => {
const { classes: styles, cx } = useStyles(); const { classes: styles, cx } = useStyles();
const _isMobile = isMobileBrowser(); const _isMobile = isMobileBrowser();

View File

@@ -3,7 +3,7 @@ import React from 'react';
import LocalVideoMenuTriggerButton from '../../../video-menu/components/web/LocalVideoMenuTriggerButton'; import LocalVideoMenuTriggerButton from '../../../video-menu/components/web/LocalVideoMenuTriggerButton';
import RemoteVideoMenuTriggerButton from '../../../video-menu/components/web/RemoteVideoMenuTriggerButton'; import RemoteVideoMenuTriggerButton from '../../../video-menu/components/web/RemoteVideoMenuTriggerButton';
type Props = { interface IProps {
/** /**
* Hide popover callback. * Hide popover callback.
@@ -39,7 +39,7 @@ type Props = {
* 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 = ({
@@ -50,7 +50,7 @@ const VideoMenuTriggerButton = ({
showPopover, showPopover,
thumbnailType, thumbnailType,
visible visible
}: Props) => local }: IProps) => local
? ( ? (
<span id = 'localvideomenu'> <span id = 'localvideomenu'>
<LocalVideoMenuTriggerButton <LocalVideoMenuTriggerButton

View File

@@ -29,18 +29,18 @@ interface IProps extends WithTranslation {
dispatch: Function; dispatch: Function;
} }
type State = { interface IState {
/** /**
* 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.
*/ */
class LobbySection extends PureComponent<IProps, State> { class LobbySection extends PureComponent<IProps, IState> {
/** /**
* Instantiates a new component. * Instantiates a new component.
* *
@@ -61,7 +61,7 @@ class LobbySection extends PureComponent<IProps, State> {
* *
* @inheritdoc * @inheritdoc
*/ */
static getDerivedStateFromProps(props: IProps, state: State) { static getDerivedStateFromProps(props: IProps, state: IState) {
if (props._lobbyEnabled !== state.lobbyEnabled) { if (props._lobbyEnabled !== state.lobbyEnabled) {
return { return {

View File

@@ -16,7 +16,7 @@ import { participantMatchesSearch } from '../../../../functions';
import ParticipantActionEllipsis from '../../../web/ParticipantActionEllipsis'; import ParticipantActionEllipsis from '../../../web/ParticipantActionEllipsis';
import ParticipantItem from '../../../web/ParticipantItem'; import ParticipantItem from '../../../web/ParticipantItem';
type Props = { interface IProps {
/** /**
* Type of trigger for the breakout room actions. * Type of trigger for the breakout room actions.
@@ -78,7 +78,7 @@ type Props = {
* Toggles the room participant context menu. * Toggles the room participant context menu.
*/ */
toggleParticipantMenu: Function; toggleParticipantMenu: Function;
}; }
const useStyles = makeStyles()((theme: Theme) => { const useStyles = makeStyles()((theme: Theme) => {
return { return {
@@ -118,7 +118,7 @@ export const CollapsibleRoom = ({
room, room,
searchString, searchString,
toggleParticipantMenu toggleParticipantMenu
}: Props) => { }: IProps) => {
const { t } = useTranslation(); const { t } = useTranslation();
const { classes: styles, cx } = useStyles(); const { classes: styles, cx } = useStyles();
const [ collapsed, setCollapsed ] = useState(false); const [ collapsed, setCollapsed ] = useState(false);

View File

@@ -9,7 +9,7 @@ import { sendAnalytics } from '../../../../../analytics/functions';
import Button from '../../../../../base/ui/components/web/Button'; import Button from '../../../../../base/ui/components/web/Button';
import { moveToRoom } from '../../../../../breakout-rooms/actions'; import { moveToRoom } from '../../../../../breakout-rooms/actions';
type Props = { interface IProps {
/** /**
* The room to join. * The room to join.
@@ -18,7 +18,7 @@ type Props = {
id: string; id: string;
jid: string; jid: string;
}; };
}; }
const useStyles = makeStyles()((theme: Theme) => { const useStyles = makeStyles()((theme: Theme) => {
return { return {
@@ -28,7 +28,7 @@ const useStyles = makeStyles()((theme: Theme) => {
}; };
}); });
const JoinActionButton = ({ room }: Props) => { const JoinActionButton = ({ room }: IProps) => {
const { classes: styles } = useStyles(); const { classes: styles } = useStyles();
const { t } = useTranslation(); const { t } = useTranslation();
const dispatch = useDispatch(); const dispatch = useDispatch();

View File

@@ -4,15 +4,15 @@ import { useTranslation } from 'react-i18next';
import { IconHorizontalPoints } from '../../../../../base/icons/svg'; import { IconHorizontalPoints } from '../../../../../base/icons/svg';
import Button from '../../../../../base/ui/components/web/Button'; import Button from '../../../../../base/ui/components/web/Button';
type Props = { interface IProps {
/** /**
* Click handler function. * Click handler function.
*/ */
onClick: () => void; onClick: () => void;
}; }
const RoomActionEllipsis = ({ onClick }: Props) => { const RoomActionEllipsis = ({ onClick }: IProps) => {
const { t } = useTranslation(); const { t } = useTranslation();
return ( return (

View File

@@ -17,7 +17,7 @@ import SendToRoomButton from '../../../../../video-menu/components/web/SendToRoo
import { AVATAR_SIZE } from '../../../../constants'; import { AVATAR_SIZE } from '../../../../constants';
type Props = { interface IProps {
/** /**
* Room and participant jid reference. * Room and participant jid reference.
@@ -47,7 +47,7 @@ type Props = {
* Callback for making a selection in the menu. * Callback for making a selection in the menu.
*/ */
onSelect: (force?: any) => void; onSelect: (force?: any) => void;
}; }
const useStyles = makeStyles()((theme: Theme) => { const useStyles = makeStyles()((theme: Theme) => {
return { return {
@@ -69,7 +69,7 @@ export const RoomParticipantContextMenu = ({
onEnter, onEnter,
onLeave, onLeave,
onSelect onSelect
}: Props) => { }: IProps) => {
const { classes: styles } = useStyles(); const { classes: styles } = useStyles();
const { t } = useTranslation(); const { t } = useTranslation();
const isLocalModerator = useSelector(isLocalParticipantModerator); const isLocalModerator = useSelector(isLocalParticipantModerator);

View File

@@ -68,7 +68,7 @@ const useStyles = makeStyles()((theme: Theme) => {
}; };
}); });
type Props = { interface IProps {
/** /**
* Whether the menu is open. * Whether the menu is open.
@@ -84,9 +84,9 @@ type Props = {
* Callback for the mouse leaving this item. * Callback for the mouse leaving this item.
*/ */
onMouseLeave?: (e?: React.MouseEvent) => void; onMouseLeave?: (e?: React.MouseEvent) => void;
}; }
export const FooterContextMenu = ({ isOpen, onDrawerClose, onMouseLeave }: Props) => { export const FooterContextMenu = ({ isOpen, onDrawerClose, onMouseLeave }: IProps) => {
const dispatch = useDispatch(); const dispatch = useDispatch();
const isModerationSupported = useSelector((state: IReduxState) => isAvModerationSupported()(state)); const isModerationSupported = useSelector((state: IReduxState) => isAvModerationSupported()(state));
const allModerators = useSelector(isEveryoneModerator); const allModerators = useSelector(isEveryoneModerator);

View File

@@ -19,7 +19,7 @@ import { useLobbyActions } from '../../hooks';
import ParticipantItem from './ParticipantItem'; import ParticipantItem from './ParticipantItem';
type Props = { interface IProps {
/** /**
* Callback used to open a drawer with admit/reject actions. * Callback used to open a drawer with admit/reject actions.
@@ -35,7 +35,7 @@ type Props = {
* Participant reference. * Participant reference.
*/ */
participant: IParticipant; participant: IParticipant;
}; }
const useStyles = makeStyles()((theme: Theme) => { const useStyles = makeStyles()((theme: Theme) => {
return { return {
@@ -59,7 +59,7 @@ export const LobbyParticipantItem = ({
overflowDrawer, overflowDrawer,
participant: p, participant: p,
openDrawerForParticipant openDrawerForParticipant
}: Props) => { }: IProps) => {
const { id } = p; const { id } = p;
const [ admit, reject, chat ] = useLobbyActions({ participantID: id }); const [ admit, reject, chat ] = useLobbyActions({ participantID: id });
const { t } = useTranslation(); const { t } = useTranslation();

View File

@@ -53,7 +53,7 @@ const useStyles = makeStyles()((theme: Theme) => {
}; };
}); });
type Props = { interface IProps {
currentRoom?: { name: string; }; currentRoom?: { name: string; };
overflowDrawer?: boolean; overflowDrawer?: boolean;
participantsCount?: number; participantsCount?: number;
@@ -61,7 +61,7 @@ type Props = {
setSearchString: (newValue: string) => void; setSearchString: (newValue: string) => void;
showInviteButton?: boolean; showInviteButton?: boolean;
sortedParticipantIds?: Array<string>; sortedParticipantIds?: Array<string>;
}; }
/** /**
* Renders the MeetingParticipantList component. * Renders the MeetingParticipantList component.
@@ -81,7 +81,7 @@ function MeetingParticipants({
setSearchString, setSearchString,
showInviteButton, showInviteButton,
sortedParticipantIds = [] sortedParticipantIds = []
}: Props) { }: IProps) {
const dispatch = useDispatch(); const dispatch = useDispatch();
const { t } = useTranslation(); const { t } = useTranslation();
@@ -158,7 +158,7 @@ function MeetingParticipants({
* @param {Object} state - The Redux state. * @param {Object} state - The Redux state.
* @param {Object} ownProps - The own props of the component. * @param {Object} ownProps - The own props of the component.
* @private * @private
* @returns {Props} * @returns {IProps}
*/ */
function _mapStateToProps(state: IReduxState): Object { function _mapStateToProps(state: IReduxState): Object {
let sortedParticipantIds: any = getSortedParticipantIds(state); let sortedParticipantIds: any = getSortedParticipantIds(state);

View File

@@ -3,7 +3,7 @@ import React from 'react';
import { IconHorizontalPoints } from '../../../base/icons/svg'; import { IconHorizontalPoints } from '../../../base/icons/svg';
import Button from '../../../base/ui/components/web/Button'; import Button from '../../../base/ui/components/web/Button';
type Props = { interface IProps {
/** /**
* Label used for accessibility. * Label used for accessibility.
@@ -14,9 +14,9 @@ type Props = {
* Click handler function. * Click handler function.
*/ */
onClick: () => void; onClick: () => void;
}; }
const ParticipantActionEllipsis = ({ accessibilityLabel, onClick }: Props) => ( const ParticipantActionEllipsis = ({ accessibilityLabel, onClick }: IProps) => (
<Button <Button
accessibilityLabel = { accessibilityLabel } accessibilityLabel = { accessibilityLabel }
icon = { IconHorizontalPoints } icon = { IconHorizontalPoints }

View File

@@ -8,7 +8,7 @@ import { approveParticipant } from '../../../av-moderation/actions';
import Button from '../../../base/ui/components/web/Button'; import Button from '../../../base/ui/components/web/Button';
import { QUICK_ACTION_BUTTON } from '../../constants'; import { QUICK_ACTION_BUTTON } from '../../constants';
type Props = { interface IProps {
/** /**
* The translated ask unmute aria label. * The translated ask unmute aria label.
@@ -44,7 +44,7 @@ type Props = {
* The name of the participant. * The name of the participant.
*/ */
participantName: string; participantName: string;
}; }
const useStyles = makeStyles()((theme: Theme) => { const useStyles = makeStyles()((theme: Theme) => {
return { return {
@@ -61,7 +61,7 @@ const ParticipantQuickAction = ({
muteParticipantButtonText, muteParticipantButtonText,
participantID, participantID,
participantName participantName
}: Props) => { }: IProps) => {
const { classes: styles } = useStyles(); const { classes: styles } = useStyles();
const dispatch = useDispatch(); const dispatch = useDispatch();
const { t } = useTranslation(); const { t } = useTranslation();

View File

@@ -2,8 +2,6 @@ import MiddlewareRegistry from '../base/redux/MiddlewareRegistry';
import { PARTICIPANTS_PANE_CLOSE, PARTICIPANTS_PANE_OPEN } from './actionTypes'; import { PARTICIPANTS_PANE_CLOSE, PARTICIPANTS_PANE_OPEN } from './actionTypes';
declare let APP: any;
/** /**
* Middleware which intercepts participants pane actions. * Middleware which intercepts participants pane actions.
* *

View File

@@ -4,7 +4,7 @@ import { makeStyles } from 'tss-react/mui';
import Icon from '../../../base/icons/components/Icon'; import Icon from '../../../base/icons/components/Icon';
type Props = { interface IProps {
/** /**
* Attribute used in automated testing. * Attribute used in automated testing.
@@ -30,7 +30,7 @@ type Props = {
* Function to be called on key pressed. * Function to be called on key pressed.
*/ */
onKeyPressed: (e?: React.KeyboardEvent) => void; onKeyPressed: (e?: React.KeyboardEvent) => void;
}; }
const useStyles = makeStyles()((theme: Theme) => { const useStyles = makeStyles()((theme: Theme) => {
@@ -72,7 +72,7 @@ const DropdownButton = ({
onButtonClick, onButtonClick,
onKeyPressed, onKeyPressed,
label label
}: Props) => { }: IProps) => {
const { classes } = useStyles(); const { classes } = useStyles();
return ( return (

View File

@@ -5,7 +5,7 @@ import { IStore } from '../../../app/types';
import { removeReaction } from '../../actions.any'; import { removeReaction } from '../../actions.any';
import { REACTIONS } from '../../constants'; import { REACTIONS } from '../../constants';
type Props = { interface IProps {
/** /**
* Index of the reaction in the queue. * Index of the reaction in the queue.
@@ -26,15 +26,15 @@ type Props = {
* Id of the reaction. * Id of the reaction.
*/ */
uid: string; uid: string;
}; }
type State = { interface IState {
/** /**
* Index of CSS animation. Number between 0-20. * Index of CSS animation. Number between 0-20.
*/ */
index: number; index: number;
}; }
/** /**
@@ -42,14 +42,14 @@ type State = {
* *
* @returns {ReactElement} * @returns {ReactElement}
*/ */
class ReactionEmoji extends Component<Props, State> { class ReactionEmoji extends Component<IProps, IState> {
/** /**
* Initializes a new {@code ReactionEmoji} instance. * Initializes a new {@code ReactionEmoji} instance.
* *
* @param {Props} props - The read-only React {@code Component} props with * @param {IProps} props - The read-only React {@code Component} props with
* which the new instance is to be initialized. * which the new instance is to be initialized.
*/ */
constructor(props: Props) { constructor(props: IProps) {
super(props); super(props);
this.state = { this.state = {

View File

@@ -39,13 +39,13 @@ type Props = AbstractProps & {
/** /**
* The type of the React {@code Component} state of {@link HighlightButton}. * The type of the React {@code Component} state of {@link HighlightButton}.
*/ */
type State = { interface IState {
/** /**
* Whether the notification which prompts for starting recording is open is not. * Whether the notification which prompts for starting recording is open is not.
*/ */
isNotificationOpen: boolean; isNotificationOpen: boolean;
}; }
/** /**
* Creates the styles for the component. * Creates the styles for the component.
@@ -94,7 +94,7 @@ const styles = (theme: Theme) => {
* React {@code Component} responsible for displaying an action that * React {@code Component} responsible for displaying an action that
* allows users to highlight a meeting moment. * allows users to highlight a meeting moment.
*/ */
export class HighlightButton extends AbstractHighlightButton<Props, State> { export class HighlightButton extends AbstractHighlightButton<Props, IState> {
/** /**
* Initializes a new HighlightButton instance. * Initializes a new HighlightButton instance.
* *

View File

@@ -8,7 +8,7 @@ import { RECORD_TYPE } from '../../constants';
/** /**
* The type of the React {@code Component} props of {@link RecordItem}. * The type of the React {@code Component} props of {@link RecordItem}.
*/ */
type Props = { interface IProps {
/** /**
* The id of the record. * The id of the record.
@@ -29,7 +29,7 @@ type Props = {
* The type of the record. * The type of the record.
*/ */
type: string; type: string;
}; }
const useStyles = makeStyles()((theme: Theme) => { const useStyles = makeStyles()((theme: Theme) => {
return { return {
@@ -70,7 +70,7 @@ const useStyles = makeStyles()((theme: Theme) => {
/** /**
* Component to render Record data. * Component to render Record data.
* *
* @param {Props} props - The props of the component. * @param {IProps} props - The props of the component.
* @returns {React$Element<any>} * @returns {React$Element<any>}
*/ */
export const RecordItem = ({ export const RecordItem = ({
@@ -79,7 +79,7 @@ export const RecordItem = ({
// eslint-disable-next-line @typescript-eslint/no-empty-function // eslint-disable-next-line @typescript-eslint/no-empty-function
onClick = () => {}, onClick = () => {},
type type
}: Props) => { }: IProps) => {
const { t } = useTranslation(); const { t } = useTranslation();
const Icon = RECORD_TYPE[type as keyof typeof RECORD_TYPE].icon; const Icon = RECORD_TYPE[type as keyof typeof RECORD_TYPE].icon;
const { classes } = useStyles(); const { classes } = useStyles();

View File

@@ -46,26 +46,26 @@ interface IProps extends WithTranslation {
/** /**
* The type of the React {@code Component} state of {@link PasswordForm}. * The type of the React {@code Component} state of {@link PasswordForm}.
*/ */
type State = { interface IState {
/** /**
* The value of the password being entered by the local participant. * The value of the password being entered by the local participant.
*/ */
enteredPassword: string; enteredPassword: string;
}; }
/** /**
* React {@code Component} for displaying and editing the conference password. * React {@code Component} for displaying and editing the conference password.
* *
* @augments Component * @augments Component
*/ */
class PasswordForm extends Component<IProps, State> { class PasswordForm extends Component<IProps, IState> {
/** /**
* Implements React's {@link Component#getDerivedStateFromProps()}. * Implements React's {@link Component#getDerivedStateFromProps()}.
* *
* @inheritdoc * @inheritdoc
*/ */
static getDerivedStateFromProps(props: IProps, state: State) { static getDerivedStateFromProps(props: IProps, state: IState) {
return { return {
enteredPassword: props.editEnabled ? state.enteredPassword : '' enteredPassword: props.editEnabled ? state.enteredPassword : ''
}; };

View File

@@ -63,8 +63,6 @@ interface IProps extends WithTranslation {
setPasswordEditEnabled: Function; setPasswordEditEnabled: Function;
} }
declare let APP: any;
/** /**
* Component that handles the password manipulation from the invite dialog. * Component that handles the password manipulation from the invite dialog.
* *

View File

@@ -18,7 +18,7 @@ export interface INotifyClick {
preventExecution: boolean; preventExecution: boolean;
} }
type Props = { interface IProps {
/** /**
* Toolbar buttons which have their click exposed through the API. * Toolbar buttons which have their click exposed through the API.
@@ -61,7 +61,7 @@ type Props = {
* Action that sets the conference password. * Action that sets the conference password.
*/ */
setPassword: Function; setPassword: Function;
}; }
/** /**
* Component that renders the security options dialog. * Component that renders the security options dialog.
@@ -77,7 +77,7 @@ function SecurityDialog({
_passwordNumberOfDigits, _passwordNumberOfDigits,
_showE2ee, _showE2ee,
setPassword setPassword
}: Props) { }: IProps) {
const [ passwordEditEnabled, setPasswordEditEnabled ] = useState(false); const [ passwordEditEnabled, setPasswordEditEnabled ] = useState(false);
useEffect(() => { useEffect(() => {
@@ -121,7 +121,7 @@ function SecurityDialog({
* *
* @param {Object} state - The Redux state. * @param {Object} state - The Redux state.
* @private * @private
* @returns {Props} * @returns {IProps}
*/ */
function mapStateToProps(state: IReduxState) { function mapStateToProps(state: IReduxState) {
const { const {

View File

@@ -19,7 +19,7 @@ import styles from './styles';
const DEFAULT_HELP_CENTRE_URL = 'https://web-cdn.jitsi.net/faq/meet-faq.html'; const DEFAULT_HELP_CENTRE_URL = 'https://web-cdn.jitsi.net/faq/meet-faq.html';
type Props = { interface IProps {
/** /**
* The URL to display in the Help Centre. * The URL to display in the Help Centre.
@@ -30,12 +30,12 @@ type Props = {
* Default prop for navigating between screen components(React Navigation). * Default prop for navigating between screen components(React Navigation).
*/ */
navigation: Object; navigation: Object;
}; }
/** /**
* Implements a page that renders the help content for the app. * Implements a page that renders the help content for the app.
*/ */
class HelpView extends PureComponent<Props> { class HelpView extends PureComponent<IProps> {
/** /**
* Implements React's {@link Component#componentDidMount()}. Invoked * Implements React's {@link Component#componentDidMount()}. Invoked
* immediately after mounting occurs. * immediately after mounting occurs.
@@ -79,7 +79,7 @@ class HelpView extends PureComponent<Props> {
* Maps part of the Redux state to the props of this component. * Maps part of the Redux state to the props of this component.
* *
* @param {Object} state - The Redux state. * @param {Object} state - The Redux state.
* @returns {Props} * @returns {IProps}
*/ */
function _mapStateToProps(state: IReduxState) { function _mapStateToProps(state: IReduxState) {
return { return {

View File

@@ -15,20 +15,20 @@ import { renderArrowBackButton }
import styles from './styles'; import styles from './styles';
type Props = { interface IProps {
/** /**
* Default prop for navigating between screen components(React Navigation). * Default prop for navigating between screen components(React Navigation).
*/ */
navigation: Object; navigation: Object;
}; }
/** /**
* The URL at which the privacy policy is available to the user. * The URL at which the privacy policy is available to the user.
*/ */
const PRIVACY_URL = 'https://jitsi.org/meet/privacy'; const PRIVACY_URL = 'https://jitsi.org/meet/privacy';
const PrivacyView = ({ navigation }: Props) => { const PrivacyView = ({ navigation }: IProps) => {
useEffect(() => { useEffect(() => {
// @ts-ignore // @ts-ignore

View File

@@ -15,20 +15,20 @@ import { renderArrowBackButton }
import styles from './styles'; import styles from './styles';
type Props = { interface IProps {
/** /**
* Default prop for navigating between screen components(React Navigation). * Default prop for navigating between screen components(React Navigation).
*/ */
navigation: Object; navigation: Object;
}; }
/** /**
* The URL at which the terms (of service/use) are available to the user. * The URL at which the terms (of service/use) are available to the user.
*/ */
const TERMS_URL = 'https://jitsi.org/meet/terms'; const TERMS_URL = 'https://jitsi.org/meet/terms';
const TermsView = ({ navigation }: Props) => { const TermsView = ({ navigation }: IProps) => {
useEffect(() => { useEffect(() => {
// @ts-ignore // @ts-ignore

View File

@@ -4,7 +4,7 @@ import { WithTranslation } from 'react-i18next';
// @ts-expect-error // @ts-expect-error
import keyboardShortcut from '../../../../../modules/keyboardshortcut/keyboardshortcut'; import keyboardShortcut from '../../../../../modules/keyboardshortcut/keyboardshortcut';
import AbstractDialogTab, { import AbstractDialogTab, {
Props as AbstractDialogTabProps IProps as AbstractDialogTabProps
} from '../../../base/dialog/components/web/AbstractDialogTab'; } from '../../../base/dialog/components/web/AbstractDialogTab';
import { translate } from '../../../base/i18n/functions'; import { translate } from '../../../base/i18n/functions';
import Checkbox from '../../../base/ui/components/web/Checkbox'; import Checkbox from '../../../base/ui/components/web/Checkbox';

View File

@@ -16,8 +16,6 @@ import Input from '../../../base/ui/components/web/Input';
// @ts-ignore // @ts-ignore
import { openLogoutDialog } from '../../actions'; import { openLogoutDialog } from '../../actions';
declare let APP: any;
/** /**
* The type of the React {@code Component} props of {@link ProfileTab}. * The type of the React {@code Component} props of {@link ProfileTab}.
*/ */

View File

@@ -41,13 +41,11 @@ import MoreTab from './MoreTab';
import ProfileTab from './ProfileTab'; import ProfileTab from './ProfileTab';
import SoundsTab from './SoundsTab'; import SoundsTab from './SoundsTab';
declare let interfaceConfig: any;
/** /**
* The type of the React {@code Component} props of * The type of the React {@code Component} props of
* {@link ConnectedSettingsDialog}. * {@link ConnectedSettingsDialog}.
*/ */
type Props = { interface IProps {
/** /**
* Information about the tabs to be rendered. * Information about the tabs to be rendered.
@@ -79,7 +77,7 @@ type Props = {
* welcome page or not. * welcome page or not.
*/ */
isDisplayedOnWelcomePage: boolean; isDisplayedOnWelcomePage: boolean;
}; }
/** /**
* Creates the styles for the component. * Creates the styles for the component.
@@ -222,14 +220,14 @@ const styles = (theme: Theme) => {
* *
* @augments Component * @augments Component
*/ */
class SettingsDialog extends Component<Props> { class SettingsDialog extends Component<IProps> {
/** /**
* Initializes a new {@code ConnectedSettingsDialog} instance. * Initializes a new {@code ConnectedSettingsDialog} instance.
* *
* @param {Props} props - The React {@code Component} props to initialize * @param {IProps} props - The React {@code Component} props to initialize
* the new {@code ConnectedSettingsDialog} instance with. * the new {@code ConnectedSettingsDialog} instance with.
*/ */
constructor(props: Props) { constructor(props: IProps) {
super(props); super(props);
// Bind event handlers so they are only bound once for every instance. // Bind event handlers so they are only bound once for every instance.

View File

@@ -23,7 +23,7 @@ const useStyles = makeStyles()((theme: Theme) => {
/** /**
* The type of the React {@code Component} props of {@link ToggleFaceExpressionsButton}. * The type of the React {@code Component} props of {@link ToggleFaceExpressionsButton}.
*/ */
type Props = { interface IProps {
/** /**
* The function to initiate the change in the speaker stats table. * The function to initiate the change in the speaker stats table.
@@ -35,14 +35,14 @@ type Props = {
*/ */
showFaceExpressions: boolean; showFaceExpressions: boolean;
}; }
/** /**
* React component for toggling face expressions grid. * React component for toggling face expressions grid.
* *
* @returns {React$Element<any>} * @returns {React$Element<any>}
*/ */
export default function FaceExpressionsSwitch({ onChange, showFaceExpressions }: Props) { export default function FaceExpressionsSwitch({ onChange, showFaceExpressions }: IProps) {
const { classes } = useStyles(); const { classes } = useStyles();
const { t } = useTranslation(); const { t } = useTranslation();

View File

@@ -25,15 +25,15 @@ const useStyles = makeStyles()((theme: Theme) => {
/** /**
* The type of the React {@code Component} props of {@link SpeakerStatsLabels}. * The type of the React {@code Component} props of {@link SpeakerStatsLabels}.
*/ */
type Props = { interface IProps {
/** /**
* True if the face expressions detection is not disabled. * True if the face expressions detection is not disabled.
*/ */
showFaceExpressions: boolean; showFaceExpressions: boolean;
}; }
const SpeakerStatsLabels = (props: Props) => { const SpeakerStatsLabels = (props: IProps) => {
const { t } = useTranslation(); const { t } = useTranslation();
const { classes } = useStyles(); const { classes } = useStyles();
const nameTimeClass = `name-time${ const nameTimeClass = `name-time${

View File

@@ -55,21 +55,21 @@ const useStyles = makeStyles()((theme: Theme) => {
/** /**
* The type of the React {@code Component} props of {@link SpeakerStatsSearch}. * The type of the React {@code Component} props of {@link SpeakerStatsSearch}.
*/ */
type Props = { interface IProps {
/** /**
* The function to initiate the change in the speaker stats table. * The function to initiate the change in the speaker stats table.
*/ */
onSearch: Function; onSearch: Function;
}; }
/** /**
* React component for display an individual user's speaker stats. * React component for display an individual user's speaker stats.
* *
* @returns {React$Element<any>} * @returns {React$Element<any>}
*/ */
function SpeakerStatsSearch({ onSearch }: Props) { function SpeakerStatsSearch({ onSearch }: IProps) {
const { classes, theme } = useStyles(); const { classes, theme } = useStyles();
const { t } = useTranslation(); const { t } = useTranslation();
const disableSpeakerStatsSearch = useSelector(isSpeakerStatsSearchDisabled); const disableSpeakerStatsSearch = useSelector(isSpeakerStatsSearchDisabled);

View File

@@ -5,7 +5,7 @@ import { makeStyles } from 'tss-react/mui';
import { DRAWER_MAX_HEIGHT } from '../../constants'; import { DRAWER_MAX_HEIGHT } from '../../constants';
type Props = { interface IProps {
/** /**
* The component(s) to be displayed within the drawer menu. * The component(s) to be displayed within the drawer menu.
@@ -26,7 +26,7 @@ type Props = {
* Function that hides the drawer. * Function that hides the drawer.
*/ */
onClose: Function; onClose: Function;
}; }
const useStyles = makeStyles()((theme: Theme) => { const useStyles = makeStyles()((theme: Theme) => {
return { return {
@@ -48,7 +48,7 @@ function Drawer({
className = '', className = '',
isOpen, isOpen,
onClose onClose
}: Props) { }: IProps) {
const { classes: styles } = useStyles(); const { classes: styles } = useStyles();
/** /**

View File

@@ -350,8 +350,6 @@ interface IProps extends WithTranslation {
toolbarButtons: Array<string>; toolbarButtons: Array<string>;
} }
declare let APP: any;
const styles = () => { const styles = () => {
return { return {
contextMenu: { contextMenu: {

View File

@@ -3,8 +3,6 @@ import StateListenerRegistry from '../base/redux/StateListenerRegistry';
import { isAudioMuteButtonDisabled } from './functions.any'; import { isAudioMuteButtonDisabled } from './functions.any';
declare let APP: any;
/** /**
* Notifies when audio availability changes. * Notifies when audio availability changes.
*/ */

View File

@@ -26,10 +26,10 @@ export type Props = AbstractProps & WithTranslation & {
title: string; title: string;
}; };
type State = { interface IState {
audioModerationEnabled: boolean; audioModerationEnabled: boolean;
content: string; content: string;
}; }
/** /**
* *
@@ -38,7 +38,8 @@ type State = {
* *
* @augments AbstractMuteRemoteParticipantDialog * @augments AbstractMuteRemoteParticipantDialog
*/ */
export default class AbstractMuteEveryoneDialog<P extends Props> extends AbstractMuteRemoteParticipantDialog<P, State> { export default class AbstractMuteEveryoneDialog<P extends Props> extends
AbstractMuteRemoteParticipantDialog<P, IState> {
static defaultProps = { static defaultProps = {
exclude: [], exclude: [],
muteLocal: false muteLocal: false

View File

@@ -26,10 +26,10 @@ export type Props = AbstractProps & WithTranslation & {
title: string; title: string;
}; };
type State = { interface IState {
content: string; content: string;
moderationEnabled: boolean; moderationEnabled: boolean;
}; }
/** /**
* *
@@ -39,7 +39,7 @@ type State = {
* @augments AbstractMuteRemoteParticipantsVideoDialog * @augments AbstractMuteRemoteParticipantsVideoDialog
*/ */
export default class AbstractMuteEveryonesVideoDialog<P extends Props> export default class AbstractMuteEveryonesVideoDialog<P extends Props>
extends AbstractMuteRemoteParticipantsVideoDialog<P, State> { extends AbstractMuteRemoteParticipantsVideoDialog<P, IState> {
static defaultProps = { static defaultProps = {
exclude: [], exclude: [],
muteLocal: false muteLocal: false

View File

@@ -19,7 +19,7 @@ import { showOverflowDrawer } from '../../../toolbox/functions.web';
import { setWhiteboardOpen } from '../../../whiteboard/actions'; import { setWhiteboardOpen } from '../../../whiteboard/actions';
import { WHITEBOARD_ID } from '../../../whiteboard/constants'; import { WHITEBOARD_ID } from '../../../whiteboard/constants';
type Props = { interface IProps {
/** /**
* Class name for the context menu. * Class name for the context menu.
@@ -74,7 +74,7 @@ type Props = {
* Whether or not the menu is displayed in the thumbnail remote video menu. * Whether or not the menu is displayed in the thumbnail remote video menu.
*/ */
thumbnailMenu?: boolean; thumbnailMenu?: boolean;
}; }
const FakeParticipantContextMenu = ({ const FakeParticipantContextMenu = ({
className, className,
@@ -87,7 +87,7 @@ const FakeParticipantContextMenu = ({
onSelect, onSelect,
participant, participant,
thumbnailMenu thumbnailMenu
}: Props) => { }: IProps) => {
const dispatch = useDispatch(); const dispatch = useDispatch();
const { t } = useTranslation(); const { t } = useTranslation();
const _overflowDrawer: boolean = useSelector(showOverflowDrawer); const _overflowDrawer: boolean = useSelector(showOverflowDrawer);

View File

@@ -49,7 +49,7 @@ import {
// @ts-ignore // @ts-ignore
} from './'; } from './';
type Props = { interface IProps {
/** /**
* Class name for the context menu. * Class name for the context menu.
@@ -104,7 +104,7 @@ type Props = {
* Whether or not the menu is displayed in the thumbnail remote video menu. * Whether or not the menu is displayed in the thumbnail remote video menu.
*/ */
thumbnailMenu?: boolean; thumbnailMenu?: boolean;
}; }
const useStyles = makeStyles()((theme: Theme) => { const useStyles = makeStyles()((theme: Theme) => {
return { return {
@@ -131,7 +131,7 @@ const ParticipantContextMenu = ({
participant, participant,
remoteControlState, remoteControlState,
thumbnailMenu thumbnailMenu
}: Props) => { }: IProps) => {
const dispatch = useDispatch(); const dispatch = useDispatch();
const { t } = useTranslation(); const { t } = useTranslation();
const { classes: styles } = useStyles(); const { classes: styles } = useStyles();

View File

@@ -35,14 +35,14 @@ interface IProps extends WithTranslation {
/** /**
* The type of the React {@code Component} state of {@link VolumeSlider}. * The type of the React {@code Component} state of {@link VolumeSlider}.
*/ */
type State = { interface IState {
/** /**
* The volume of the participant's audio element. The value will * The volume of the participant's audio element. The value will
* be represented by a slider. * be represented by a slider.
*/ */
volumeLevel: number; volumeLevel: number;
}; }
const styles = (theme: Theme) => { const styles = (theme: Theme) => {
return { return {
@@ -88,7 +88,7 @@ const styles = (theme: Theme) => {
* *
* @augments Component * @augments Component
*/ */
class VolumeSlider extends Component<IProps, State> { class VolumeSlider extends Component<IProps, IState> {
/** /**
* Initializes a new {@code VolumeSlider} instance. * Initializes a new {@code VolumeSlider} instance.
* *

View File

@@ -2,7 +2,7 @@ import { Theme } from '@mui/material';
import React from 'react'; import React from 'react';
import { makeStyles } from 'tss-react/mui'; import { makeStyles } from 'tss-react/mui';
type Props = { interface IProps {
/** /**
* The 'aria-label' text. * The 'aria-label' text.
@@ -33,7 +33,7 @@ type Props = {
* The current value where the knob is positioned. * The current value where the knob is positioned.
*/ */
value: number; value: number;
}; }
const useStyles = makeStyles()((theme: Theme) => { const useStyles = makeStyles()((theme: Theme) => {
// keep the same height for all elements: // keep the same height for all elements:
@@ -138,7 +138,7 @@ const useStyles = makeStyles()((theme: Theme) => {
* *
* @returns {ReactElement} * @returns {ReactElement}
*/ */
function Slider({ ariaLabel, max, min, onChange, step, value }: Props) { function Slider({ ariaLabel, max, min, onChange, step, value }: IProps) {
const { classes, cx } = useStyles(); const { classes, cx } = useStyles();
const knobs = [ ...Array(Math.floor((max - min) / step) + 1) ]; const knobs = [ ...Array(Math.floor((max - min) / step) + 1) ];

View File

@@ -24,7 +24,7 @@ const videoClassName = 'video-preview-video';
/** /**
* The type of the React {@code PureComponent} props of {@link VirtualBackgroundPreview}. * The type of the React {@code PureComponent} props of {@link VirtualBackgroundPreview}.
*/ */
export type Props = WithTranslation & { export interface IProps extends WithTranslation {
/** /**
* The deviceId of the camera device currently being used. * The deviceId of the camera device currently being used.
@@ -50,12 +50,12 @@ export type Props = WithTranslation & {
* Represents the virtual background set options. * Represents the virtual background set options.
*/ */
options: any; options: any;
}; }
/** /**
* The type of the React {@code Component} state of {@link VirtualBackgroundPreview}. * The type of the React {@code Component} state of {@link VirtualBackgroundPreview}.
*/ */
type State = { interface IState {
/** /**
* Activate the selected device camera only. * Activate the selected device camera only.
@@ -71,7 +71,7 @@ type State = {
* Flag that indicates if the local track was loaded. * Flag that indicates if the local track was loaded.
*/ */
localTrackLoaded: boolean; localTrackLoaded: boolean;
}; }
/** /**
* Creates the styles for the component. * Creates the styles for the component.
@@ -127,7 +127,7 @@ const styles = (theme: Theme) => {
* *
* @augments PureComponent * @augments PureComponent
*/ */
class VirtualBackgroundPreview extends PureComponent<Props, State> { class VirtualBackgroundPreview extends PureComponent<IProps, IState> {
_componentWasUnmounted: boolean; _componentWasUnmounted: boolean;
/** /**
@@ -136,7 +136,7 @@ class VirtualBackgroundPreview extends PureComponent<Props, State> {
* @param {Object} props - The read-only properties with which the new * @param {Object} props - The read-only properties with which the new
* instance is to be initialized. * instance is to be initialized.
*/ */
constructor(props: Props) { constructor(props: IProps) {
super(props); super(props);
this.state = { this.state = {
@@ -290,7 +290,7 @@ class VirtualBackgroundPreview extends PureComponent<Props, State> {
* *
* @inheritdoc * @inheritdoc
*/ */
async componentDidUpdate(prevProps: Props) { async componentDidUpdate(prevProps: IProps) {
if (!equals(this.props._currentCameraDeviceId, prevProps._currentCameraDeviceId)) { if (!equals(this.props._currentCameraDeviceId, prevProps._currentCameraDeviceId)) {
this._setTracks(); this._setTracks();
} }

View File

@@ -26,8 +26,6 @@ import {
*/ */
const HEIGHT_OFFSET = 80; const HEIGHT_OFFSET = 80;
declare const interfaceConfig: any;
interface IDimensions { interface IDimensions {
/* The height of the component. */ /* The height of the component. */