diff --git a/globals.d.ts b/globals.d.ts index 4e10c9a14e..51f817721a 100644 --- a/globals.d.ts +++ b/globals.d.ts @@ -25,6 +25,13 @@ declare global { interfaceConfig?: any; JitsiMeetJS?: any; JitsiMeetElectron?: any; + // selenium tests handler + _sharedVideoPlayer: any; + } + + interface Document { + mozCancelFullScreen?: Function; + webkitExitFullscreen?: Function; } const config: IConfig; diff --git a/package-lock.json b/package-lock.json index fe6d299b6c..5a69c358a3 100644 --- a/package-lock.json +++ b/package-lock.json @@ -143,6 +143,7 @@ "@types/react-native": "0.68.9", "@types/react-redux": "7.1.24", "@types/react-window": "1.8.5", + "@types/resemblejs": "^4.1.0", "@types/unorm": "1.3.28", "@types/uuid": "8.3.4", "@types/zxcvbn": "4.4.1", @@ -6398,6 +6399,12 @@ "@types/react": "*" } }, + "node_modules/@types/resemblejs": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/@types/resemblejs/-/resemblejs-4.1.0.tgz", + "integrity": "sha512-+MIkKy/UngDfhTnvn2yK/KSzlbtLeB5BU73qqZrzIF24+e2r8enJ4cW3UbtkstByYSDV8pbheGAqg7zT8ZZ2pA==", + "dev": true + }, "node_modules/@types/retry": { "version": "0.12.1", "resolved": "https://registry.npmjs.org/@types/retry/-/retry-0.12.1.tgz", @@ -24951,6 +24958,12 @@ "@types/react": "*" } }, + "@types/resemblejs": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/@types/resemblejs/-/resemblejs-4.1.0.tgz", + "integrity": "sha512-+MIkKy/UngDfhTnvn2yK/KSzlbtLeB5BU73qqZrzIF24+e2r8enJ4cW3UbtkstByYSDV8pbheGAqg7zT8ZZ2pA==", + "dev": true + }, "@types/retry": { "version": "0.12.1", "resolved": "https://registry.npmjs.org/@types/retry/-/retry-0.12.1.tgz", diff --git a/package.json b/package.json index c30fba6d25..c96de8b33a 100644 --- a/package.json +++ b/package.json @@ -148,6 +148,7 @@ "@types/react-native": "0.68.9", "@types/react-redux": "7.1.24", "@types/react-window": "1.8.5", + "@types/resemblejs": "^4.1.0", "@types/unorm": "1.3.28", "@types/uuid": "8.3.4", "@types/zxcvbn": "4.4.1", diff --git a/react/features/app/actions.native.ts b/react/features/app/actions.native.ts index f4812b9dec..e85cd05f9c 100644 --- a/react/features/app/actions.native.ts +++ b/react/features/app/actions.native.ts @@ -164,10 +164,10 @@ export function appNavigate(uri?: string, options: IReloadNowOptions = {}) { * If we have a close page enabled, redirect to it without * showing any other dialog. * - * @param {Object} options - Ignored. + * @param {Object} _options - Ignored. * @returns {Function} */ -export function maybeRedirectToWelcomePage(options: any) { // eslint-disable-line @typescript-eslint/no-unused-vars +export function maybeRedirectToWelcomePage(_options?: any): any { // Dummy. } diff --git a/react/features/base/config/configType.ts b/react/features/base/config/configType.ts index a5b3298d9f..451554ed06 100644 --- a/react/features/base/config/configType.ts +++ b/react/features/base/config/configType.ts @@ -127,6 +127,7 @@ export interface INoiseSuppressionConfig { export interface IConfig { _desktopSharingSourceDevice?: string; + _screenshotHistoryRegionUrl?: string; analytics?: { amplitudeAPPKey?: string; disabled?: boolean; diff --git a/react/features/base/toolbox/components/web/ToolboxButtonWithIconPopup.js b/react/features/base/toolbox/components/web/ToolboxButtonWithIconPopup.tsx similarity index 81% rename from react/features/base/toolbox/components/web/ToolboxButtonWithIconPopup.js rename to react/features/base/toolbox/components/web/ToolboxButtonWithIconPopup.tsx index 2ccf22aef9..9f89d665da 100644 --- a/react/features/base/toolbox/components/web/ToolboxButtonWithIconPopup.js +++ b/react/features/base/toolbox/components/web/ToolboxButtonWithIconPopup.tsx @@ -1,79 +1,75 @@ -// @flow - import React from 'react'; -import { Icon } from '../../../icons'; +import Icon from '../../../icons/components/Icon'; import Popover from '../../../popover/components/Popover.web'; -type Props = { - - /** - * Whether the element popup is expanded. - */ - ariaExpanded?: boolean, +interface IProps { /** * The id of the element this button icon controls. */ - ariaControls?: string, + ariaControls?: string; + + /** + * Whether the element popup is expanded. + */ + ariaExpanded?: boolean; /** * Whether the element has a popup. */ - ariaHasPopup?: boolean, + ariaHasPopup?: boolean; /** * Aria label for the Icon. */ - ariaLabel?: string, + ariaLabel?: string; /** * The decorated component (ToolboxButton). */ - children: React$Node, + children: React.ReactNode; /** * Icon of the button. */ - icon: Function, + icon: Function; /** * Flag used for disabling the small icon. */ - iconDisabled: boolean, + iconDisabled: boolean; /** * The ID of the icon button. */ - iconId: string, + iconId: string; /** * Popover close callback. */ - onPopoverClose: Function, + onPopoverClose: Function; /** * Popover open callback. */ - onPopoverOpen: Function, + onPopoverOpen: Function; /** * The content that will be displayed inside the popover. */ - popoverContent: React$Node, + popoverContent: React.ReactNode; /** * Additional styles. */ - styles?: Object, + styles?: Object; /** * Whether or not the popover is visible. */ - visible: boolean -}; - -declare var APP: Object; + visible: boolean; +} /** * Displays the `ToolboxButtonWithIcon` component. @@ -81,7 +77,7 @@ declare var APP: Object; * @param {Object} props - Component's props. * @returns {ReactElement} */ -export default function ToolboxButtonWithIconPopup(props: Props) { +export default function ToolboxButtonWithIconPopup(props: IProps) { const { ariaControls, ariaExpanded, @@ -98,7 +94,7 @@ export default function ToolboxButtonWithIconPopup(props: Props) { visible } = props; - const iconProps = {}; + const iconProps: any = {}; if (iconDisabled) { iconProps.className @@ -116,7 +112,7 @@ export default function ToolboxButtonWithIconPopup(props: Props) { return (
sendAnalytics(
createLiveStreamingDialogEvent('start', 'confirm.button'));
- this.props._conference.startRecording({
+ this.props._conference?.startRecording({
broadcastId: selectedBroadcastID,
mode: JitsiRecordingConstants.mode.STREAM,
streamId: key
diff --git a/react/features/recording/components/LiveStream/AbstractStopLiveStreamDialog.ts b/react/features/recording/components/LiveStream/AbstractStopLiveStreamDialog.ts
index e23d6c4aff..c5fcc02380 100644
--- a/react/features/recording/components/LiveStream/AbstractStopLiveStreamDialog.ts
+++ b/react/features/recording/components/LiveStream/AbstractStopLiveStreamDialog.ts
@@ -7,6 +7,7 @@ import { IReduxState } from '../../../app/types';
import { IJitsiConference } from '../../../base/conference/reducer';
import { JitsiRecordingConstants } from '../../../base/lib-jitsi-meet';
import { getActiveSession } from '../../functions';
+import { ISessionData } from '../../reducer';
/**
* The type of the React {@code Component} props of
@@ -17,12 +18,12 @@ interface IProps extends WithTranslation {
/**
* The {@code JitsiConference} for the current conference.
*/
- _conference: IJitsiConference;
+ _conference?: IJitsiConference;
/**
* The redux representation of the live streaming to be stopped.
*/
- _session: { id: string; };
+ _session?: ISessionData;
}
/**
@@ -57,7 +58,7 @@ export default class AbstractStopLiveStreamDialog extends Component
} else {
const { _fileRecordingSession } = this.props;
- if (_fileRecordingSession) { // @ts-ignore
- this.props._conference.stopRecording(_fileRecordingSession.id);
+ if (_fileRecordingSession) {
+ this.props._conference?.stopRecording(_fileRecordingSession.id);
this._toggleScreenshotCapture();
}
}
diff --git a/react/features/recording/components/Recording/styles.web.js b/react/features/recording/components/Recording/styles.web.ts
similarity index 100%
rename from react/features/recording/components/Recording/styles.web.js
rename to react/features/recording/components/Recording/styles.web.ts
diff --git a/react/features/recording/components/Recording/web/HighlightButton.tsx b/react/features/recording/components/Recording/web/HighlightButton.tsx
index 59d3f834df..125857af45 100644
--- a/react/features/recording/components/Recording/web/HighlightButton.tsx
+++ b/react/features/recording/components/Recording/web/HighlightButton.tsx
@@ -3,8 +3,6 @@ import { withStyles } from '@mui/styles';
import React from 'react';
import { connect } from 'react-redux';
-// @ts-ignore
-import { StartRecordingDialog } from '../..';
import { openDialog } from '../../../../base/dialog/actions';
import { translate } from '../../../../base/i18n/functions';
import { IconHighlight } from '../../../../base/icons/svg';
@@ -13,12 +11,13 @@ import Label from '../../../../base/label/components/web/Label';
import Tooltip from '../../../../base/tooltip/components/Tooltip';
import BaseTheme from '../../../../base/ui/components/BaseTheme.web';
import { maybeShowPremiumFeatureDialog } from '../../../../jaas/actions';
+import StartRecordingDialog from '../../Recording/web/StartRecordingDialog';
import AbstractHighlightButton, {
IProps as AbstractProps,
_abstractMapStateToProps
} from '../AbstractHighlightButton';
-type Props = AbstractProps & {
+interface IProps extends AbstractProps {
_disabled: boolean;
/**
@@ -32,7 +31,7 @@ type Props = AbstractProps & {
_visible: boolean;
classes: any;
-};
+}
/**
* The type of the React {@code Component} state of {@link HighlightButton}.
@@ -90,17 +89,16 @@ const styles = (theme: Theme) => {
* React {@code Component} responsible for displaying an action that
* allows users to highlight a meeting moment.
*/
-export class HighlightButton extends AbstractHighlightButton