Jitsi Meet - Secure, Simple and Scalable Video Conferences that you use as a standalone app or embed in your web application.
TypeScript debiandeep-videojitsijitsi-meetscalable-video-conferencessfuvideovideo-communicationvideo-conferencingwebrtc
ref(TS) Convert constants tiles to TS (#12148)
Robert Pintilii247c54b6c636
diff --git a/react/features/calendar-sync/constants.js b/react/features/calendar-sync/constants.tssimilarity index 98%rename from react/features/calendar-sync/constants.jsrename to react/features/calendar-sync/constants.tsindex fc4da87d0f..ebb2201c24 100644--- a/react/features/calendar-sync/constants.js+++ b/react/features/calendar-sync/constants.ts@@ -1,5 +1,3 @@-// @flow-/*** An enumeration of support calendar integration types.*diff --git a/react/features/deep-linking/constants.js b/react/features/deep-linking/constants.tssimilarity index 100%rename from react/features/deep-linking/constants.jsrename to react/features/deep-linking/constants.tsdiff --git a/react/features/filmstrip/components/web/Filmstrip.tsx b/react/features/filmstrip/components/web/Filmstrip.tsxindex b784f8c7e5..971f71e2fa 100644--- a/react/features/filmstrip/components/web/Filmstrip.tsx+++ b/react/features/filmstrip/components/web/Filmstrip.tsx@@ -25,7 +25,8 @@ import { showToolbox } from '../../../toolbox/actions.web';// @ts-ignoreimport { isButtonEnabled, isToolboxVisible } from '../../../toolbox/functions.web';// @ts-ignore-import { getCurrentLayout, LAYOUTS } from '../../../video-layout';+import { getCurrentLayout } from '../../../video-layout';+import { LAYOUTS } from '../../../video-layout/constants';import {setFilmstripVisible,setUserFilmstripHeight,diff --git a/react/features/filmstrip/components/web/Thumbnail.tsx b/react/features/filmstrip/components/web/Thumbnail.tsxindex a00b495dfd..caa590bafc 100644--- a/react/features/filmstrip/components/web/Thumbnail.tsx+++ b/react/features/filmstrip/components/web/Thumbnail.tsx@@ -45,7 +45,8 @@ import { getGifDisplayMode, getGifForParticipant } from '../../../gifs/functions// @ts-ignoreimport { PresenceLabel } from '../../../presence-status';// @ts-ignore-import { getCurrentLayout, LAYOUTS } from '../../../video-layout';+import { getCurrentLayout } from '../../../video-layout';+import { LAYOUTS } from '../../../video-layout/constants';// @ts-ignoreimport { togglePinStageParticipant } from '../../actions';import {diff --git a/react/features/follow-me/constants.js b/react/features/follow-me/constants.tssimilarity index 100%rename from react/features/follow-me/constants.jsrename to react/features/follow-me/constants.tsdiff --git a/react/features/gifs/constants.js b/react/features/gifs/constants.tssimilarity index 100%rename from react/features/gifs/constants.jsrename to react/features/gifs/constants.tsdiff --git a/react/features/invite/constants.js b/react/features/invite/constants.tssimilarity index 99%rename from react/features/invite/constants.jsrename to react/features/invite/constants.tsindex bad6c222af..aad026c1a7 100644--- a/react/features/invite/constants.js+++ b/react/features/invite/constants.ts@@ -1,5 +1,3 @@-// @flow-/*** The pathName for the dialInInfo page.*diff --git a/react/features/lobby/constants.js b/react/features/lobby/constants.tssimilarity index 100%rename from react/features/lobby/constants.jsrename to react/features/lobby/constants.tsdiff --git a/react/features/mobile/watchos/constants.js b/react/features/mobile/watchos/constants.tssimilarity index 96%rename from react/features/mobile/watchos/constants.jsrename to react/features/mobile/watchos/constants.tsindex 6b1f9f29d7..8de47de786 100644--- a/react/features/mobile/watchos/constants.js+++ b/react/features/mobile/watchos/constants.ts@@ -1,5 +1,3 @@-// @flow-// NOTE When changing any of the commands make sure to update JitsiMeetCommands enum in the WatchKit extension code.export const CMD_HANG_UP = 'hangup';diff --git a/react/features/no-audio-signal/constants.js b/react/features/no-audio-signal/constants.tssimilarity index 100%rename from react/features/no-audio-signal/constants.jsrename to react/features/no-audio-signal/constants.tsdiff --git a/react/features/noise-detection/constants.js b/react/features/noise-detection/constants.tssimilarity index 100%rename from react/features/noise-detection/constants.jsrename to react/features/noise-detection/constants.tsdiff --git a/react/features/participants-pane/components/web/FooterContextMenu.tsx b/react/features/participants-pane/components/web/FooterContextMenu.tsxindex 51c5b317a3..f5683cae05 100644--- a/react/features/participants-pane/components/web/FooterContextMenu.tsx+++ b/react/features/participants-pane/components/web/FooterContextMenu.tsx@@ -33,11 +33,11 @@ import {// @ts-ignoreimport { isInBreakoutRoom } from '../../../breakout-rooms/functions';import {- SETTINGS_TABS,openSettingsDialog,shouldShowModeratorSettings// @ts-ignore} from '../../../settings';+import { SETTINGS_TABS } from '../../../settings/constants';// @ts-ignoreimport { MuteEveryonesVideoDialog } from '../../../video-menu/components';diff --git a/react/features/presence-status/constants.js b/react/features/presence-status/constants.tssimilarity index 100%rename from react/features/presence-status/constants.jsrename to react/features/presence-status/constants.tsdiff --git a/react/features/recording/components/Recording/AbstractStartRecordingDialogContent.tsx b/react/features/recording/components/Recording/AbstractStartRecordingDialogContent.tsxindex 84205e27c6..db804db7d1 100644--- a/react/features/recording/components/Recording/AbstractStartRecordingDialogContent.tsx+++ b/react/features/recording/components/Recording/AbstractStartRecordingDialogContent.tsx@@ -18,7 +18,6 @@ import { StyleType } from '../../../base/styles';import { authorizeDropbox, updateDropboxToken } from '../../../dropbox';// @ts-ignoreimport { isVpaasMeeting } from '../../../jaas/functions';-// @ts-ignoreimport { RECORDING_TYPES } from '../../constants';// @ts-ignoreimport { supportsLocalRecording } from '../../functions';diff --git a/react/features/recording/components/Recording/native/StartRecordingDialogContent.tsx b/react/features/recording/components/Recording/native/StartRecordingDialogContent.tsxindex c0ae291fee..32f78dbbff 100644--- a/react/features/recording/components/Recording/native/StartRecordingDialogContent.tsx+++ b/react/features/recording/components/Recording/native/StartRecordingDialogContent.tsx@@ -10,7 +10,6 @@ import { connect } from '../../../../base/redux/functions';import Button from '../../../../base/ui/components/native/Button';import Switch from '../../../../base/ui/components/native/Switch';import { BUTTON_TYPES } from '../../../../base/ui/constants';-// @ts-ignoreimport { RECORDING_TYPES } from '../../../constants';// @ts-ignoreimport { getRecordingDurationEstimation } from '../../../functions';diff --git a/react/features/recording/components/Recording/web/StartRecordingDialogContent.tsx b/react/features/recording/components/Recording/web/StartRecordingDialogContent.tsxindex bd4930573a..acfd691b48 100644--- a/react/features/recording/components/Recording/web/StartRecordingDialogContent.tsx+++ b/react/features/recording/components/Recording/web/StartRecordingDialogContent.tsx@@ -13,7 +13,6 @@ import {import { connect } from '../../../../base/redux/functions';import Button from '../../../../base/ui/components/web/Button';import { BUTTON_TYPES } from '../../../../base/ui/constants';-// @ts-ignoreimport { RECORDING_TYPES } from '../../../constants';// @ts-ignoreimport { getRecordingDurationEstimation } from '../../../functions';diff --git a/react/features/recording/constants.js b/react/features/recording/constants.tssimilarity index 99%rename from react/features/recording/constants.jsrename to react/features/recording/constants.tsindex 163d7eb91f..f041996d7d 100644--- a/react/features/recording/constants.js+++ b/react/features/recording/constants.ts@@ -1,5 +1,3 @@-// @flow-import { JitsiRecordingConstants } from '../base/lib-jitsi-meet';diff --git a/react/features/remote-control/constants.js b/react/features/remote-control/constants.tssimilarity index 100%rename from react/features/remote-control/constants.jsrename to react/features/remote-control/constants.tsdiff --git a/react/features/salesforce/components/web/RecordItem.tsx b/react/features/salesforce/components/web/RecordItem.tsxindex a8c72ef93b..13348dd93d 100644--- a/react/features/salesforce/components/web/RecordItem.tsx+++ b/react/features/salesforce/components/web/RecordItem.tsx@@ -2,7 +2,6 @@ import { makeStyles } from '@material-ui/core';import React from 'react';import { useTranslation } from 'react-i18next';-// @ts-ignoreimport { RECORD_TYPE } from '../../constants';/**@@ -82,7 +81,7 @@ export const RecordItem = ({}: Props) => {const { t } = useTranslation();const classes = useStyles();- const Icon = RECORD_TYPE[type].icon;+ const Icon = RECORD_TYPE[type as keyof typeof RECORD_TYPE].icon;return (<lidiff --git a/react/features/salesforce/components/web/SalesforceLinkDialog.tsx b/react/features/salesforce/components/web/SalesforceLinkDialog.tsxindex 543859ce8f..81ecdddb8e 100644--- a/react/features/salesforce/components/web/SalesforceLinkDialog.tsx+++ b/react/features/salesforce/components/web/SalesforceLinkDialog.tsx@@ -12,7 +12,6 @@ import { IconSearch } from '../../../base/icons/svg';// @ts-ignoreimport { getFieldValue } from '../../../base/react';import BaseTheme from '../../../base/ui/components/BaseTheme.web';-// @ts-ignoreimport { NOTES_MAX_LENGTH } from '../../constants';// @ts-ignoreimport { useSalesforceLinkDialog } from '../../useSalesforceLinkDialog';diff --git a/react/features/salesforce/constants.js b/react/features/salesforce/constants.tssimilarity index 83%rename from react/features/salesforce/constants.jsrename to react/features/salesforce/constants.tsindex 22bc1271c5..ac8dd357a9 100644--- a/react/features/salesforce/constants.js+++ b/react/features/salesforce/constants.ts@@ -3,7 +3,7 @@ import {IconRecordContact,IconRecordLead,IconRecordOpportunity-} from '../base/icons';+} from '../base/icons/svg';export const NOTES_MAX_LENGTH = 255;@@ -13,7 +13,12 @@ export const CONTENT_HEIGHT_OFFSET = 200;export const LIST_HEIGHT_OFFSET = 250;-export const RECORD_TYPE = {+export const RECORD_TYPE: {+ [key: string]: {+ icon?: Function;+ label: string;+ };+} = {ACCOUNT: {label: 'record.type.account',icon: IconRecordAccountdiff --git a/react/features/screenshot-capture/constants.js b/react/features/screenshot-capture/constants.tssimilarity index 98%rename from react/features/screenshot-capture/constants.jsrename to react/features/screenshot-capture/constants.tsindex e26cdd202e..d087e94de3 100644--- a/react/features/screenshot-capture/constants.js+++ b/react/features/screenshot-capture/constants.ts@@ -1,5 +1,3 @@-// @flow-/*** Percent of pixels that signal if two images should be considered different.*/diff --git a/react/features/settings/components/web/SettingsDialog.tsx b/react/features/settings/components/web/SettingsDialog.tsxindex c621ea5c65..cc069e054f 100644--- a/react/features/settings/components/web/SettingsDialog.tsx+++ b/react/features/settings/components/web/SettingsDialog.tsx@@ -23,7 +23,6 @@ import {submitSoundsTab// @ts-ignore} from '../../actions';-// @ts-ignoreimport { SETTINGS_TABS } from '../../constants';import {getModeratorTabProps,diff --git a/react/features/settings/constants.js b/react/features/settings/constants.tssimilarity index 100%rename from react/features/settings/constants.jsrename to react/features/settings/constants.tsdiff --git a/react/features/shared-video/constants.js b/react/features/shared-video/constants.tssimilarity index 98%rename from react/features/shared-video/constants.jsrename to react/features/shared-video/constants.tsindex f3d15410d9..5250a917d7 100644--- a/react/features/shared-video/constants.js+++ b/react/features/shared-video/constants.ts@@ -1,5 +1,3 @@-// @flow-/*** Fixed name of the video player fake participant.*diff --git a/react/features/speaker-stats/components/web/SpeakerStats.tsx b/react/features/speaker-stats/components/web/SpeakerStats.tsxindex dc7d5341e2..c2ca60f071 100644--- a/react/features/speaker-stats/components/web/SpeakerStats.tsx+++ b/react/features/speaker-stats/components/web/SpeakerStats.tsx@@ -13,7 +13,6 @@ import {DISPLAY_SWITCH_BREAKPOINT,MOBILE_BREAKPOINT,RESIZE_SEARCH_SWITCH_CONTAINER_BREAKPOINT- // @ts-ignore} from '../../constants';import FaceExpressionsSwitch from './FaceExpressionsSwitch';diff --git a/react/features/speaker-stats/components/web/SpeakerStatsList.tsx b/react/features/speaker-stats/components/web/SpeakerStatsList.tsxindex 968a1ef18c..abb9ceb057 100644--- a/react/features/speaker-stats/components/web/SpeakerStatsList.tsx+++ b/react/features/speaker-stats/components/web/SpeakerStatsList.tsx@@ -2,7 +2,6 @@import { makeStyles } from '@material-ui/core/styles';import React from 'react';-// @ts-ignoreimport { MOBILE_BREAKPOINT } from '../../constants';// @ts-ignoreimport abstractSpeakerStatsList from '../AbstractSpeakerStatsList';diff --git a/react/features/speaker-stats/components/web/SpeakerStatsSearch.tsx b/react/features/speaker-stats/components/web/SpeakerStatsSearch.tsxindex 76784e6459..b769298d16 100644--- a/react/features/speaker-stats/components/web/SpeakerStatsSearch.tsx+++ b/react/features/speaker-stats/components/web/SpeakerStatsSearch.tsx@@ -9,7 +9,6 @@ import { IconSearch } from '../../../base/icons/svg';// @ts-ignoreimport { getFieldValue } from '../../../base/react';import BaseTheme from '../../../base/ui/components/BaseTheme.web';-// @ts-ignoreimport { MOBILE_BREAKPOINT } from '../../constants';// @ts-ignoreimport { isSpeakerStatsSearchDisabled } from '../../functions';diff --git a/react/features/speaker-stats/constants.js b/react/features/speaker-stats/constants.tssimilarity index 100%rename from react/features/speaker-stats/constants.jsrename to react/features/speaker-stats/constants.tsdiff --git a/react/features/talk-while-muted/constants.js b/react/features/talk-while-muted/constants.tssimilarity index 100%rename from react/features/talk-while-muted/constants.jsrename to react/features/talk-while-muted/constants.tsdiff --git a/react/features/video-layout/constants.js b/react/features/video-layout/constants.tssimilarity index 100%rename from react/features/video-layout/constants.jsrename to react/features/video-layout/constants.tsdiff --git a/react/features/video-menu/components/web/VolumeSlider.tsx b/react/features/video-menu/components/web/VolumeSlider.tsxindex b79eb01e73..11d6e69386 100644--- a/react/features/video-menu/components/web/VolumeSlider.tsx+++ b/react/features/video-menu/components/web/VolumeSlider.tsx@@ -7,7 +7,6 @@ import { WithTranslation } from 'react-i18next';import { translate } from '../../../base/i18n/functions';import Icon from '../../../base/icons/components/Icon';import { IconVolume } from '../../../base/icons/svg';-// @ts-ignoreimport { VOLUME_SLIDER_SCALE } from '../../constants';/**diff --git a/react/features/video-menu/constants.js b/react/features/video-menu/constants.tssimilarity index 95%rename from react/features/video-menu/constants.jsrename to react/features/video-menu/constants.tsindex 25f6de2c06..523a47bfd2 100644--- a/react/features/video-menu/constants.js+++ b/react/features/video-menu/constants.ts@@ -1,5 +1,3 @@-// @flow-/*** Used to modify initialValue, which is expected to be a decimal value between* 0 and 1, and converts it to a number representable by an input slider, whichdiff --git a/react/features/welcome/constants.js b/react/features/welcome/constants.tsxsimilarity index 78%rename from react/features/welcome/constants.jsrename to react/features/welcome/constants.tsxindex f2fcb9dae9..e74287ef40 100644--- a/react/features/welcome/constants.js+++ b/react/features/welcome/constants.tsx@@ -1,10 +1,11 @@-// @flow-+/* eslint-disable lines-around-comment */import React from 'react';-import { IconEventNote, IconRestore, IconSettings } from '../base/icons';+import { IconEventNote, IconRestore, IconSettings } from '../base/icons/svg';+// @ts-ignoreimport BaseTheme from '../base/ui/components/BaseTheme';+// @ts-ignoreimport TabIcon from './components/TabIcon';export const INACTIVE_TAB_COLOR = BaseTheme.palette.tab01Disabled;@@ -21,7 +22,7 @@ export const tabBarOptions = {};export const recentListTabBarOptions = {- tabBarIcon: ({ focused }) => (+ tabBarIcon: ({ focused }: { focused: boolean; }) => (<TabIconfocused = { focused }src = { IconRestore } />@@ -29,7 +30,7 @@ export const recentListTabBarOptions = {};export const calendarListTabBarOptions = {- tabBarIcon: ({ focused }) => (+ tabBarIcon: ({ focused }: { focused: boolean; }) => (<TabIconfocused = { focused }src = { IconEventNote } />@@ -37,7 +38,7 @@ export const calendarListTabBarOptions = {};export const settingsTabBarOptions = {- tabBarIcon: ({ focused }) => (+ tabBarIcon: ({ focused }: { focused: boolean; }) => (<TabIconfocused = { focused }src = { IconSettings } />