2022-10-07 09:16:41 +00:00
|
|
|
/* eslint-disable lines-around-comment */
|
2022-10-17 11:27:48 +00:00
|
|
|
import LoginDialog from '../../authentication/components/web/LoginDialog';
|
|
|
|
import WaitForOwnerDialog from '../../authentication/components/web/WaitForOwnerDialog';
|
2022-10-04 09:44:48 +00:00
|
|
|
import ChatPrivacyDialog from '../../chat/components/web/ChatPrivacyDialog';
|
2022-10-17 11:27:48 +00:00
|
|
|
import DesktopPicker from '../../desktop-picker/components/DesktopPicker';
|
2022-10-04 09:44:48 +00:00
|
|
|
import DisplayNamePrompt from '../../display-name/components/web/DisplayNamePrompt';
|
2022-12-06 17:29:33 +00:00
|
|
|
import ParticipantVerificationDialog from '../../e2ee/components/ParticipantVerificationDialog';
|
2022-10-04 09:44:48 +00:00
|
|
|
import EmbedMeetingDialog from '../../embed-meeting/components/EmbedMeetingDialog';
|
2022-10-07 09:16:41 +00:00
|
|
|
// @ts-ignore
|
|
|
|
import FeedbackDialog from '../../feedback/components/FeedbackDialog.web';
|
|
|
|
import AddPeopleDialog from '../../invite/components/add-people-dialog/web/AddPeopleDialog';
|
|
|
|
import PremiumFeatureDialog from '../../jaas/components/web/PremiumFeatureDialog';
|
2022-10-04 09:44:48 +00:00
|
|
|
import KeyboardShortcutsDialog from '../../keyboard-shortcuts/components/web/KeyboardShortcutsDialog';
|
2022-10-07 09:16:41 +00:00
|
|
|
// @ts-ignore
|
|
|
|
import StartLiveStreamDialog from '../../recording/components/LiveStream/web/StartLiveStreamDialog';
|
|
|
|
// @ts-ignore
|
|
|
|
import StopLiveStreamDialog from '../../recording/components/LiveStream/web/StopLiveStreamDialog';
|
|
|
|
// @ts-ignore
|
|
|
|
import StartRecordingDialog from '../../recording/components/Recording/web/StartRecordingDialog';
|
|
|
|
// @ts-ignore
|
|
|
|
import StopRecordingDialog from '../../recording/components/Recording/web/StopRecordingDialog';
|
2022-10-17 11:27:48 +00:00
|
|
|
// @ts-ignore
|
|
|
|
import RemoteControlAuthorizationDialog from '../../remote-control/components/RemoteControlAuthorizationDialog';
|
2023-02-13 13:47:42 +00:00
|
|
|
import PasswordRequiredPrompt from '../../room-lock/components/PasswordRequiredPrompt.web';
|
2022-10-18 10:56:08 +00:00
|
|
|
import SalesforceLinkDialog from '../../salesforce/components/web/SalesforceLinkDialog';
|
2022-10-28 10:07:58 +00:00
|
|
|
import ShareAudioDialog from '../../screen-share/components/web/ShareAudioDialog';
|
|
|
|
import ShareScreenWarningDialog from '../../screen-share/components/web/ShareScreenWarningDialog';
|
2022-10-10 09:12:02 +00:00
|
|
|
import SecurityDialog from '../../security/components/security-dialog/web/SecurityDialog';
|
2022-10-17 11:27:48 +00:00
|
|
|
import LogoutDialog from '../../settings/components/web/LogoutDialog';
|
2022-10-10 09:12:02 +00:00
|
|
|
import SharedVideoDialog from '../../shared-video/components/web/SharedVideoDialog';
|
|
|
|
import SpeakerStats from '../../speaker-stats/components/web/SpeakerStats';
|
|
|
|
import LanguageSelectorDialog from '../../subtitles/components/LanguageSelectorDialog.web';
|
2022-10-11 08:24:11 +00:00
|
|
|
import GrantModeratorDialog from '../../video-menu/components/web/GrantModeratorDialog';
|
|
|
|
import KickRemoteParticipantDialog from '../../video-menu/components/web/KickRemoteParticipantDialog';
|
2022-10-10 09:12:02 +00:00
|
|
|
import MuteEveryoneDialog from '../../video-menu/components/web/MuteEveryoneDialog';
|
|
|
|
import MuteEveryonesVideoDialog from '../../video-menu/components/web/MuteEveryonesVideoDialog';
|
2022-10-11 08:24:11 +00:00
|
|
|
import MuteRemoteParticipantsVideoDialog from '../../video-menu/components/web/MuteRemoteParticipantsVideoDialog';
|
|
|
|
// @ts-ignore
|
|
|
|
import VideoQualityDialog from '../../video-quality/components/VideoQualityDialog.web';
|
|
|
|
import VirtualBackgroundDialog from '../../virtual-background/components/VirtualBackgroundDialog';
|
2022-10-04 09:44:48 +00:00
|
|
|
import MiddlewareRegistry from '../redux/MiddlewareRegistry';
|
|
|
|
|
|
|
|
import { OPEN_DIALOG } from './actionTypes';
|
|
|
|
|
|
|
|
// ! IMPORTANT - This whole middleware is only needed for the transition from from @atlaskit dialog to our component.
|
|
|
|
// ! It should be removed when the transition is over.
|
|
|
|
|
2022-10-07 09:16:41 +00:00
|
|
|
const NEW_DIALOG_LIST = [ KeyboardShortcutsDialog, ChatPrivacyDialog, DisplayNamePrompt, EmbedMeetingDialog,
|
|
|
|
FeedbackDialog, AddPeopleDialog, PremiumFeatureDialog, StartLiveStreamDialog, StopLiveStreamDialog,
|
2022-10-10 09:12:02 +00:00
|
|
|
StartRecordingDialog, StopRecordingDialog, ShareAudioDialog, ShareScreenWarningDialog, SecurityDialog,
|
2022-10-11 08:24:11 +00:00
|
|
|
SharedVideoDialog, SpeakerStats, LanguageSelectorDialog, MuteEveryoneDialog, MuteEveryonesVideoDialog,
|
|
|
|
GrantModeratorDialog, KickRemoteParticipantDialog, MuteRemoteParticipantsVideoDialog, VideoQualityDialog,
|
2022-10-17 11:27:48 +00:00
|
|
|
VirtualBackgroundDialog, LoginDialog, WaitForOwnerDialog, DesktopPicker, RemoteControlAuthorizationDialog,
|
2023-02-13 13:47:42 +00:00
|
|
|
LogoutDialog, SalesforceLinkDialog, ParticipantVerificationDialog, PasswordRequiredPrompt ];
|
2022-10-04 09:44:48 +00:00
|
|
|
|
|
|
|
// This function is necessary while the transition from @atlaskit dialog to our component is ongoing.
|
|
|
|
const isNewDialog = (component: any) => NEW_DIALOG_LIST.some(comp => comp === component);
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Implements the entry point of the middleware of the feature base/media.
|
|
|
|
*
|
|
|
|
* @param {IStore} store - The redux store.
|
|
|
|
* @returns {Function}
|
|
|
|
*/
|
|
|
|
MiddlewareRegistry.register(() => (next: Function) => (action: any) => {
|
|
|
|
switch (action.type) {
|
|
|
|
case OPEN_DIALOG: {
|
|
|
|
action.isNewDialog = isNewDialog(action.component);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
return next(action);
|
|
|
|
});
|