From 997d6d40bfbb8a9a4ce49c6599bffb61ca69ea1d Mon Sep 17 00:00:00 2001 From: Travis Ralston Date: Wed, 2 Mar 2022 13:42:44 -0700 Subject: [PATCH] Step 1: Remove all usage of `@replaceableComponent` --- src/components/structures/ContextMenu.tsx | 2 -- src/components/structures/FilePanel.tsx | 2 -- src/components/structures/GenericErrorPage.tsx | 3 --- src/components/structures/HostSignupAction.tsx | 2 -- src/components/structures/IndicatorScrollbar.tsx | 2 -- src/components/structures/InteractiveAuth.tsx | 2 -- src/components/structures/LeftPanel.tsx | 2 -- src/components/structures/LoggedInView.tsx | 2 -- src/components/structures/MainSplit.tsx | 2 -- src/components/structures/MatrixChat.tsx | 2 -- src/components/structures/MessagePanel.tsx | 2 -- src/components/structures/NonUrgentToastContainer.tsx | 2 -- src/components/structures/NotificationPanel.tsx | 2 -- src/components/structures/RightPanel.tsx | 2 -- src/components/structures/RoomDirectory.tsx | 2 -- src/components/structures/RoomSearch.tsx | 2 -- src/components/structures/RoomStatusBar.tsx | 2 -- src/components/structures/RoomView.tsx | 2 -- src/components/structures/ScrollPanel.tsx | 2 -- src/components/structures/SearchBox.tsx | 2 -- src/components/structures/TabbedView.tsx | 2 -- src/components/structures/ThreadView.tsx | 2 -- src/components/structures/TimelinePanel.tsx | 2 -- src/components/structures/ToastContainer.tsx | 2 -- src/components/structures/UploadBar.tsx | 2 -- src/components/structures/UserMenu.tsx | 2 -- src/components/structures/UserView.tsx | 2 -- src/components/structures/ViewSource.tsx | 2 -- src/components/structures/auth/CompleteSecurity.tsx | 2 -- src/components/structures/auth/E2eSetup.tsx | 2 -- src/components/structures/auth/ForgotPassword.tsx | 2 -- src/components/structures/auth/Login.tsx | 2 -- src/components/structures/auth/Registration.tsx | 2 -- src/components/structures/auth/SetupEncryptionBody.tsx | 2 -- src/components/structures/auth/SoftLogout.tsx | 2 -- src/components/views/audio_messages/AudioPlayer.tsx | 2 -- src/components/views/audio_messages/AudioPlayerBase.tsx | 2 -- src/components/views/audio_messages/Clock.tsx | 2 -- src/components/views/audio_messages/DurationClock.tsx | 2 -- .../views/audio_messages/LiveRecordingClock.tsx | 2 -- .../views/audio_messages/LiveRecordingWaveform.tsx | 2 -- src/components/views/audio_messages/PlayPauseButton.tsx | 2 -- src/components/views/audio_messages/PlaybackClock.tsx | 2 -- src/components/views/audio_messages/PlaybackWaveform.tsx | 2 -- src/components/views/audio_messages/RecordingPlayback.tsx | 2 -- src/components/views/audio_messages/SeekBar.tsx | 2 -- src/components/views/audio_messages/Waveform.tsx | 3 --- src/components/views/auth/AuthBody.tsx | 3 --- src/components/views/auth/AuthFooter.tsx | 2 -- src/components/views/auth/AuthHeader.tsx | 2 -- src/components/views/auth/AuthHeaderLogo.tsx | 3 --- src/components/views/auth/AuthPage.tsx | 2 -- src/components/views/auth/CaptchaForm.tsx | 2 -- src/components/views/auth/CompleteSecurityBody.tsx | 3 --- src/components/views/auth/CountryDropdown.tsx | 2 -- src/components/views/auth/EmailField.tsx | 2 -- .../views/auth/InteractiveAuthEntryComponents.tsx | 8 -------- src/components/views/auth/PassphraseConfirmField.tsx | 2 -- src/components/views/auth/PassphraseField.tsx | 2 -- src/components/views/auth/PasswordLogin.tsx | 2 -- src/components/views/auth/RegistrationForm.tsx | 2 -- src/components/views/auth/Welcome.tsx | 2 -- src/components/views/avatars/DecoratedRoomAvatar.tsx | 2 -- src/components/views/avatars/MemberAvatar.tsx | 2 -- src/components/views/avatars/RoomAvatar.tsx | 2 -- src/components/views/context_menus/CallContextMenu.tsx | 2 -- src/components/views/context_menus/DialpadContextMenu.tsx | 2 -- .../views/context_menus/GenericElementContextMenu.tsx | 3 --- .../views/context_menus/GenericTextContextMenu.tsx | 3 --- src/components/views/context_menus/MessageContextMenu.tsx | 2 -- src/components/views/dialogs/AskInviteAnywayDialog.tsx | 2 -- src/components/views/dialogs/BaseDialog.tsx | 2 -- src/components/views/dialogs/BugReportDialog.tsx | 2 -- .../views/dialogs/ConfirmAndWaitRedactDialog.tsx | 2 -- src/components/views/dialogs/ConfirmRedactDialog.tsx | 2 -- src/components/views/dialogs/ConfirmUserActionDialog.tsx | 2 -- src/components/views/dialogs/ConfirmWipeDeviceDialog.tsx | 2 -- src/components/views/dialogs/CreateRoomDialog.tsx | 2 -- src/components/views/dialogs/DeactivateAccountDialog.tsx | 2 -- src/components/views/dialogs/ErrorDialog.tsx | 2 -- src/components/views/dialogs/HostSignupDialog.tsx | 2 -- src/components/views/dialogs/IncomingSasDialog.tsx | 2 -- .../views/dialogs/IntegrationsDisabledDialog.tsx | 2 -- .../views/dialogs/IntegrationsImpossibleDialog.tsx | 2 -- src/components/views/dialogs/InteractiveAuthDialog.tsx | 2 -- src/components/views/dialogs/InviteDialog.tsx | 2 -- src/components/views/dialogs/LogoutDialog.tsx | 2 -- .../views/dialogs/ManualDeviceKeyVerificationDialog.tsx | 2 -- src/components/views/dialogs/MessageEditHistoryDialog.tsx | 2 -- src/components/views/dialogs/ModalWidgetDialog.tsx | 2 -- src/components/views/dialogs/ReportEventDialog.tsx | 2 -- src/components/views/dialogs/RoomSettingsDialog.tsx | 2 -- src/components/views/dialogs/RoomUpgradeDialog.tsx | 2 -- src/components/views/dialogs/RoomUpgradeWarningDialog.tsx | 2 -- src/components/views/dialogs/ServerOfflineDialog.tsx | 2 -- src/components/views/dialogs/ServerPickerDialog.tsx | 2 -- src/components/views/dialogs/SeshatResetDialog.tsx | 2 -- .../views/dialogs/SessionRestoreErrorDialog.tsx | 2 -- src/components/views/dialogs/SetEmailDialog.tsx | 2 -- src/components/views/dialogs/ShareDialog.tsx | 2 -- src/components/views/dialogs/StorageEvictedDialog.tsx | 2 -- .../views/dialogs/TabbedIntegrationManagerDialog.tsx | 2 -- src/components/views/dialogs/TermsDialog.tsx | 2 -- src/components/views/dialogs/TextInputDialog.tsx | 2 -- src/components/views/dialogs/UploadConfirmDialog.tsx | 2 -- src/components/views/dialogs/UploadFailureDialog.tsx | 2 -- src/components/views/dialogs/UserSettingsDialog.tsx | 2 -- .../views/dialogs/VerificationRequestDialog.tsx | 2 -- .../views/dialogs/WidgetCapabilitiesPromptDialog.tsx | 2 -- .../views/dialogs/WidgetOpenIDPermissionsDialog.tsx | 2 -- .../dialogs/security/ConfirmDestroyCrossSigningDialog.tsx | 2 -- .../views/dialogs/security/CreateCrossSigningDialog.tsx | 2 -- .../views/dialogs/security/SetupEncryptionDialog.tsx | 2 -- src/components/views/elements/AccessibleTooltipButton.tsx | 2 -- src/components/views/elements/ActionButton.tsx | 2 -- src/components/views/elements/AddressSelector.tsx | 2 -- src/components/views/elements/AddressTile.tsx | 2 -- src/components/views/elements/AppPermission.tsx | 2 -- src/components/views/elements/AppTile.tsx | 2 -- .../views/elements/DesktopCapturerSourcePicker.tsx | 2 -- src/components/views/elements/DialogButtons.tsx | 2 -- src/components/views/elements/DirectorySearchBox.tsx | 2 -- src/components/views/elements/Draggable.tsx | 3 --- src/components/views/elements/Dropdown.tsx | 2 -- src/components/views/elements/EditableItemList.tsx | 2 -- src/components/views/elements/EditableText.tsx | 2 -- src/components/views/elements/EditableTextContainer.tsx | 2 -- src/components/views/elements/ErrorBoundary.tsx | 2 -- src/components/views/elements/EventListSummary.tsx | 2 -- src/components/views/elements/EventTilePreview.tsx | 2 -- .../views/elements/IRCTimelineProfileResizer.tsx | 2 -- src/components/views/elements/ImageView.tsx | 2 -- src/components/views/elements/InfoTooltip.tsx | 2 -- src/components/views/elements/InlineSpinner.tsx | 2 -- src/components/views/elements/InviteReason.tsx | 2 -- src/components/views/elements/LabelledToggleSwitch.tsx | 2 -- src/components/views/elements/LanguageDropdown.tsx | 2 -- src/components/views/elements/LazyRenderList.tsx | 3 --- src/components/views/elements/PersistedElement.tsx | 2 -- src/components/views/elements/PersistentApp.tsx | 2 -- src/components/views/elements/Pill.js | 2 -- src/components/views/elements/PowerSelector.tsx | 2 -- src/components/views/elements/ReplyChain.tsx | 2 -- src/components/views/elements/RoomAliasField.tsx | 2 -- src/components/views/elements/SettingsFlag.tsx | 2 -- src/components/views/elements/Slider.tsx | 3 --- .../views/elements/SpellCheckLanguagesDropdown.tsx | 2 -- src/components/views/elements/Spoiler.tsx | 3 --- src/components/views/elements/StyledCheckbox.tsx | 3 --- src/components/views/elements/StyledRadioButton.tsx | 3 --- src/components/views/elements/SyntaxHighlight.tsx | 3 --- src/components/views/elements/TagComposer.tsx | 2 -- src/components/views/elements/TextWithTooltip.tsx | 2 -- src/components/views/elements/Tooltip.tsx | 2 -- src/components/views/elements/TooltipButton.tsx | 2 -- src/components/views/elements/TruncatedList.tsx | 2 -- .../views/elements/crypto/VerificationQRCode.tsx | 2 -- src/components/views/emojipicker/Category.tsx | 2 -- src/components/views/emojipicker/Emoji.tsx | 2 -- src/components/views/emojipicker/EmojiPicker.tsx | 2 -- src/components/views/emojipicker/Header.tsx | 2 -- src/components/views/emojipicker/Preview.tsx | 2 -- src/components/views/emojipicker/QuickReactions.tsx | 2 -- src/components/views/emojipicker/ReactionPicker.tsx | 2 -- src/components/views/emojipicker/Search.tsx | 2 -- src/components/views/location/LocationPicker.tsx | 2 -- src/components/views/location/LocationViewDialog.tsx | 2 -- src/components/views/messages/DateSeparator.tsx | 2 -- src/components/views/messages/DownloadActionButton.tsx | 2 -- src/components/views/messages/EditHistoryMessage.tsx | 2 -- src/components/views/messages/MAudioBody.tsx | 2 -- src/components/views/messages/MFileBody.tsx | 2 -- src/components/views/messages/MImageBody.tsx | 2 -- src/components/views/messages/MJitsiWidgetEvent.tsx | 2 -- .../views/messages/MKeyVerificationConclusion.tsx | 2 -- src/components/views/messages/MKeyVerificationRequest.tsx | 2 -- src/components/views/messages/MLocationBody.tsx | 2 -- src/components/views/messages/MPollBody.tsx | 2 -- src/components/views/messages/MStickerBody.tsx | 2 -- src/components/views/messages/MVideoBody.tsx | 2 -- src/components/views/messages/MVoiceMessageBody.tsx | 2 -- src/components/views/messages/MVoiceOrAudioBody.tsx | 2 -- src/components/views/messages/MessageActionBar.tsx | 2 -- src/components/views/messages/MessageEvent.tsx | 2 -- src/components/views/messages/MessageTimestamp.tsx | 2 -- src/components/views/messages/MjolnirBody.tsx | 2 -- src/components/views/messages/ReactionsRow.tsx | 2 -- src/components/views/messages/ReactionsRowButton.tsx | 2 -- .../views/messages/ReactionsRowButtonTooltip.tsx | 2 -- src/components/views/messages/RoomAvatarEvent.tsx | 2 -- src/components/views/messages/RoomCreate.tsx | 2 -- src/components/views/messages/SenderProfile.tsx | 2 -- src/components/views/messages/TextualBody.tsx | 2 -- src/components/views/messages/TextualEvent.tsx | 2 -- src/components/views/messages/TileErrorBoundary.tsx | 2 -- src/components/views/messages/ViewSourceEvent.tsx | 2 -- src/components/views/right_panel/HeaderButton.tsx | 2 -- src/components/views/right_panel/HeaderButtons.tsx | 2 -- src/components/views/right_panel/RoomHeaderButtons.tsx | 2 -- src/components/views/right_panel/TimelineCard.tsx | 2 -- src/components/views/right_panel/VerificationPanel.tsx | 2 -- src/components/views/room_settings/AliasSettings.tsx | 2 -- .../views/room_settings/RoomProfileSettings.tsx | 2 -- src/components/views/room_settings/RoomPublishSetting.tsx | 2 -- src/components/views/room_settings/UrlPreviewSettings.tsx | 2 -- src/components/views/rooms/AppsDrawer.tsx | 2 -- src/components/views/rooms/Autocomplete.tsx | 2 -- src/components/views/rooms/AuxPanel.tsx | 2 -- src/components/views/rooms/BasicMessageComposer.tsx | 2 -- src/components/views/rooms/EditMessageComposer.tsx | 2 -- src/components/views/rooms/EntityTile.tsx | 2 -- src/components/views/rooms/EventTile.tsx | 2 -- src/components/views/rooms/LinkPreviewWidget.tsx | 2 -- src/components/views/rooms/MemberList.tsx | 2 -- src/components/views/rooms/MemberTile.tsx | 2 -- src/components/views/rooms/MessageComposer.tsx | 2 -- src/components/views/rooms/MessageComposerFormatBar.tsx | 2 -- src/components/views/rooms/NotificationBadge.tsx | 2 -- src/components/views/rooms/PinnedEventTile.tsx | 2 -- src/components/views/rooms/PresenceLabel.tsx | 2 -- src/components/views/rooms/ReadReceiptMarker.tsx | 2 -- src/components/views/rooms/ReplyPreview.tsx | 2 -- src/components/views/rooms/ReplyTile.tsx | 2 -- src/components/views/rooms/RoomBreadcrumbs.tsx | 2 -- src/components/views/rooms/RoomDetailList.tsx | 2 -- src/components/views/rooms/RoomDetailRow.js | 2 -- src/components/views/rooms/RoomHeader.tsx | 2 -- src/components/views/rooms/RoomList.tsx | 2 -- src/components/views/rooms/RoomPreviewBar.tsx | 2 -- src/components/views/rooms/RoomSublist.tsx | 2 -- src/components/views/rooms/RoomTile.tsx | 2 -- src/components/views/rooms/RoomUpgradeWarningBar.tsx | 2 -- src/components/views/rooms/SearchBar.tsx | 2 -- src/components/views/rooms/SearchResultTile.tsx | 2 -- src/components/views/rooms/SendMessageComposer.tsx | 2 -- src/components/views/rooms/Stickerpicker.tsx | 2 -- src/components/views/rooms/ThirdPartyMemberInfo.tsx | 2 -- src/components/views/rooms/TopUnreadMessagesBar.tsx | 2 -- src/components/views/rooms/VoiceRecordComposerTile.tsx | 2 -- src/components/views/rooms/WhoIsTypingTile.tsx | 2 -- src/components/views/settings/BridgeTile.tsx | 2 -- src/components/views/settings/ChangeAvatar.tsx | 2 -- src/components/views/settings/ChangeDisplayName.tsx | 2 -- src/components/views/settings/ChangePassword.tsx | 2 -- src/components/views/settings/CrossSigningPanel.tsx | 2 -- src/components/views/settings/CryptographyPanel.tsx | 2 -- src/components/views/settings/DevicesPanel.tsx | 2 -- src/components/views/settings/DevicesPanelEntry.tsx | 2 -- src/components/views/settings/EventIndexPanel.tsx | 2 -- src/components/views/settings/FontScalingPanel.tsx | 2 -- src/components/views/settings/IntegrationManager.tsx | 2 -- src/components/views/settings/ProfileSettings.tsx | 2 -- src/components/views/settings/SecureBackupPanel.tsx | 2 -- src/components/views/settings/SetIdServer.tsx | 2 -- src/components/views/settings/SetIntegrationManager.tsx | 2 -- src/components/views/settings/SpellCheckSettings.tsx | 2 -- src/components/views/settings/ThemeChoicePanel.tsx | 2 -- src/components/views/settings/account/EmailAddresses.tsx | 2 -- src/components/views/settings/account/PhoneNumbers.tsx | 2 -- .../views/settings/discovery/EmailAddresses.tsx | 2 -- src/components/views/settings/discovery/PhoneNumbers.tsx | 2 -- .../views/settings/tabs/room/AdvancedRoomSettingsTab.tsx | 2 -- .../views/settings/tabs/room/BridgeSettingsTab.tsx | 2 -- .../views/settings/tabs/room/GeneralRoomSettingsTab.tsx | 2 -- .../views/settings/tabs/room/NotificationSettingsTab.tsx | 2 -- .../views/settings/tabs/room/RolesRoomSettingsTab.tsx | 2 -- .../views/settings/tabs/room/SecurityRoomSettingsTab.tsx | 2 -- .../settings/tabs/user/AppearanceUserSettingsTab.tsx | 2 -- .../views/settings/tabs/user/GeneralUserSettingsTab.tsx | 2 -- .../views/settings/tabs/user/HelpUserSettingsTab.tsx | 2 -- .../views/settings/tabs/user/LabsUserSettingsTab.tsx | 2 -- .../views/settings/tabs/user/MjolnirUserSettingsTab.tsx | 2 -- .../settings/tabs/user/NotificationUserSettingsTab.tsx | 2 -- .../settings/tabs/user/PreferencesUserSettingsTab.tsx | 2 -- .../views/settings/tabs/user/SecurityUserSettingsTab.tsx | 2 -- .../views/settings/tabs/user/VoiceUserSettingsTab.tsx | 2 -- src/components/views/terms/InlineTermsAgreement.tsx | 2 -- src/components/views/toasts/NonUrgentEchoFailureToast.tsx | 2 -- src/components/views/toasts/VerificationRequestToast.tsx | 2 -- .../views/verification/VerificationCancelled.tsx | 2 -- .../views/verification/VerificationComplete.tsx | 2 -- src/components/views/verification/VerificationShowSas.tsx | 2 -- src/components/views/voip/CallView.tsx | 2 -- src/components/views/voip/CallViewForRoom.tsx | 2 -- src/components/views/voip/DialPad.tsx | 2 -- src/components/views/voip/DialPadModal.tsx | 2 -- src/components/views/voip/PictureInPictureDragger.tsx | 2 -- src/components/views/voip/PipContainer.tsx | 2 -- src/components/views/voip/PipView.tsx | 2 -- src/components/views/voip/VideoFeed.tsx | 2 -- src/toasts/IncomingCallToast.tsx | 2 -- 291 files changed, 602 deletions(-) diff --git a/src/components/structures/ContextMenu.tsx b/src/components/structures/ContextMenu.tsx index 2231618994..2f233c02ed 100644 --- a/src/components/structures/ContextMenu.tsx +++ b/src/components/structures/ContextMenu.tsx @@ -22,7 +22,6 @@ import classNames from "classnames"; import FocusLock from "react-focus-lock"; import { Writeable } from "../../@types/common"; -import { replaceableComponent } from "../../utils/replaceableComponent"; import UIStore from "../../stores/UIStore"; import { checkInputableElement, RovingTabIndexProvider } from "../../accessibility/RovingTabIndex"; import { KeyBindingAction } from "../../accessibility/KeyboardShortcuts"; @@ -105,7 +104,6 @@ interface IState { // Generic ContextMenu Portal wrapper // all options inside the menu should be of role=menuitem/menuitemcheckbox/menuitemradiobutton and have tabIndex={-1} // this will allow the ContextMenu to manage its own focus using arrow keys as per the ARIA guidelines. -@replaceableComponent("structures.ContextMenu") export default class ContextMenu extends React.PureComponent { private readonly initialFocus: HTMLElement; diff --git a/src/components/structures/FilePanel.tsx b/src/components/structures/FilePanel.tsx index 8466c26bac..d248c6556f 100644 --- a/src/components/structures/FilePanel.tsx +++ b/src/components/structures/FilePanel.tsx @@ -29,7 +29,6 @@ import EventIndexPeg from "../../indexing/EventIndexPeg"; import { _t } from '../../languageHandler'; import DesktopBuildsNotice, { WarningKind } from "../views/elements/DesktopBuildsNotice"; import BaseCard from "../views/right_panel/BaseCard"; -import { replaceableComponent } from "../../utils/replaceableComponent"; import ResizeNotifier from '../../utils/ResizeNotifier'; import TimelinePanel from "./TimelinePanel"; import Spinner from "../views/elements/Spinner"; @@ -51,7 +50,6 @@ interface IState { /* * Component which shows the filtered file using a TimelinePanel */ -@replaceableComponent("structures.FilePanel") class FilePanel extends React.Component { static contextType = RoomContext; diff --git a/src/components/structures/GenericErrorPage.tsx b/src/components/structures/GenericErrorPage.tsx index 25892f46df..f9a68753a0 100644 --- a/src/components/structures/GenericErrorPage.tsx +++ b/src/components/structures/GenericErrorPage.tsx @@ -16,14 +16,11 @@ limitations under the License. import React from 'react'; -import { replaceableComponent } from "../../utils/replaceableComponent"; - interface IProps { title: React.ReactNode; message: React.ReactNode; } -@replaceableComponent("structures.GenericErrorPage") export default class GenericErrorPage extends React.PureComponent { render() { return
diff --git a/src/components/structures/HostSignupAction.tsx b/src/components/structures/HostSignupAction.tsx index 5b2bafa03c..6ba37eb9aa 100644 --- a/src/components/structures/HostSignupAction.tsx +++ b/src/components/structures/HostSignupAction.tsx @@ -23,7 +23,6 @@ import { import { _t } from "../../languageHandler"; import { HostSignupStore } from "../../stores/HostSignupStore"; import SdkConfig from "../../SdkConfig"; -import { replaceableComponent } from "../../utils/replaceableComponent"; interface IProps { onClick?(): void; @@ -31,7 +30,6 @@ interface IProps { interface IState {} -@replaceableComponent("structures.HostSignupAction") export default class HostSignupAction extends React.PureComponent { private openDialog = async () => { this.props.onClick?.(); diff --git a/src/components/structures/IndicatorScrollbar.tsx b/src/components/structures/IndicatorScrollbar.tsx index 307541cb0b..4b122345b3 100644 --- a/src/components/structures/IndicatorScrollbar.tsx +++ b/src/components/structures/IndicatorScrollbar.tsx @@ -17,7 +17,6 @@ limitations under the License. import React, { ComponentProps, createRef } from "react"; import AutoHideScrollbar from "./AutoHideScrollbar"; -import { replaceableComponent } from "../../utils/replaceableComponent"; import UIStore, { UI_EVENTS } from "../../stores/UIStore"; interface IProps extends Omit, "onWheel"> { @@ -40,7 +39,6 @@ interface IState { rightIndicatorOffset: string; } -@replaceableComponent("structures.IndicatorScrollbar") export default class IndicatorScrollbar extends React.Component { private autoHideScrollbar = createRef(); private scrollElement: HTMLDivElement; diff --git a/src/components/structures/InteractiveAuth.tsx b/src/components/structures/InteractiveAuth.tsx index 01b55c1542..94c54b32e3 100644 --- a/src/components/structures/InteractiveAuth.tsx +++ b/src/components/structures/InteractiveAuth.tsx @@ -28,7 +28,6 @@ import { logger } from "matrix-js-sdk/src/logger"; import getEntryComponentForLoginType, { IStageComponent } from '../views/auth/InteractiveAuthEntryComponents'; import Spinner from "../views/elements/Spinner"; -import { replaceableComponent } from "../../utils/replaceableComponent"; export const ERROR_USER_CANCELLED = new Error("User cancelled auth session"); @@ -89,7 +88,6 @@ interface IState { submitButtonEnabled: boolean; } -@replaceableComponent("structures.InteractiveAuthComponent") export default class InteractiveAuthComponent extends React.Component { private readonly authLogic: InteractiveAuth; private readonly intervalId: number = null; diff --git a/src/components/structures/LeftPanel.tsx b/src/components/structures/LeftPanel.tsx index 987e8c2966..771183b45b 100644 --- a/src/components/structures/LeftPanel.tsx +++ b/src/components/structures/LeftPanel.tsx @@ -27,7 +27,6 @@ import { Action } from "../../dispatcher/actions"; import RoomSearch from "./RoomSearch"; import ResizeNotifier from "../../utils/ResizeNotifier"; import AccessibleTooltipButton from "../views/elements/AccessibleTooltipButton"; -import { replaceableComponent } from "../../utils/replaceableComponent"; import SpaceStore from "../../stores/spaces/SpaceStore"; import { MetaSpace, SpaceKey, UPDATE_SELECTED_SPACE } from "../../stores/spaces"; import { getKeyBindingsManager } from "../../KeyBindingsManager"; @@ -62,7 +61,6 @@ interface IState { activeSpace: SpaceKey; } -@replaceableComponent("structures.LeftPanel") export default class LeftPanel extends React.Component { private listContainerRef = createRef(); private roomSearchRef = createRef(); diff --git a/src/components/structures/LoggedInView.tsx b/src/components/structures/LoggedInView.tsx index ff8616e29f..7de08843b5 100644 --- a/src/components/structures/LoggedInView.tsx +++ b/src/components/structures/LoggedInView.tsx @@ -52,7 +52,6 @@ import HostSignupContainer from '../views/host_signup/HostSignupContainer'; import { getKeyBindingsManager } from '../../KeyBindingsManager'; import { IOpts } from "../../createRoom"; import SpacePanel from "../views/spaces/SpacePanel"; -import { replaceableComponent } from "../../utils/replaceableComponent"; import CallHandler, { CallHandlerEvent } from '../../CallHandler'; import AudioFeedArrayForCall from '../views/voip/AudioFeedArrayForCall'; import { OwnProfileStore } from '../../stores/OwnProfileStore'; @@ -127,7 +126,6 @@ interface IState { * * Components mounted below us can access the matrix client via the react context. */ -@replaceableComponent("structures.LoggedInView") class LoggedInView extends React.Component { static displayName = 'LoggedInView'; diff --git a/src/components/structures/MainSplit.tsx b/src/components/structures/MainSplit.tsx index 7cf6964c1f..a90758b442 100644 --- a/src/components/structures/MainSplit.tsx +++ b/src/components/structures/MainSplit.tsx @@ -19,7 +19,6 @@ import React from 'react'; import { NumberSize, Resizable } from 're-resizable'; import { Direction } from "re-resizable/lib/resizer"; -import { replaceableComponent } from "../../utils/replaceableComponent"; import ResizeNotifier from "../../utils/ResizeNotifier"; interface IProps { @@ -28,7 +27,6 @@ interface IProps { panel?: JSX.Element; } -@replaceableComponent("structures.MainSplit") export default class MainSplit extends React.Component { private onResizeStart = (): void => { this.props.resizeNotifier.startResizing(); diff --git a/src/components/structures/MatrixChat.tsx b/src/components/structures/MatrixChat.tsx index 302989ed5f..9c1589d58c 100644 --- a/src/components/structures/MatrixChat.tsx +++ b/src/components/structures/MatrixChat.tsx @@ -89,7 +89,6 @@ import { UIFeature } from "../../settings/UIFeature"; import DialPadModal from "../views/voip/DialPadModal"; import { showToast as showMobileGuideToast } from '../../toasts/MobileGuideToast'; import { shouldUseLoginForWelcome } from "../../utils/pages"; -import { replaceableComponent } from "../../utils/replaceableComponent"; import RoomListStore from "../../stores/room-list/RoomListStore"; import { RoomUpdateCause } from "../../stores/room-list/models"; import SecurityCustomisations from "../../customisations/Security"; @@ -207,7 +206,6 @@ interface IState { forceTimeline?: boolean; // see props } -@replaceableComponent("structures.MatrixChat") export default class MatrixChat extends React.PureComponent { static displayName = "MatrixChat"; diff --git a/src/components/structures/MessagePanel.tsx b/src/components/structures/MessagePanel.tsx index f7e338fafa..7758375a69 100644 --- a/src/components/structures/MessagePanel.tsx +++ b/src/components/structures/MessagePanel.tsx @@ -37,7 +37,6 @@ import IRCTimelineProfileResizer from "../views/elements/IRCTimelineProfileResiz import DMRoomMap from "../../utils/DMRoomMap"; import NewRoomIntro from "../views/rooms/NewRoomIntro"; import HistoryTile from "../views/rooms/HistoryTile"; -import { replaceableComponent } from "../../utils/replaceableComponent"; import defaultDispatcher from '../../dispatcher/dispatcher'; import CallEventGrouper from "./CallEventGrouper"; import WhoIsTypingTile from '../views/rooms/WhoIsTypingTile'; @@ -199,7 +198,6 @@ interface IReadReceiptForUser { /* (almost) stateless UI component which builds the event tiles in the room timeline. */ -@replaceableComponent("structures.MessagePanel") export default class MessagePanel extends React.Component { static contextType = RoomContext; public context!: React.ContextType; diff --git a/src/components/structures/NonUrgentToastContainer.tsx b/src/components/structures/NonUrgentToastContainer.tsx index 7872c2596c..10cb1ad427 100644 --- a/src/components/structures/NonUrgentToastContainer.tsx +++ b/src/components/structures/NonUrgentToastContainer.tsx @@ -19,7 +19,6 @@ import * as React from "react"; import { ComponentClass } from "../../@types/common"; import NonUrgentToastStore from "../../stores/NonUrgentToastStore"; import { UPDATE_EVENT } from "../../stores/AsyncStore"; -import { replaceableComponent } from "../../utils/replaceableComponent"; interface IProps { } @@ -28,7 +27,6 @@ interface IState { toasts: ComponentClass[]; } -@replaceableComponent("structures.NonUrgentToastContainer") export default class NonUrgentToastContainer extends React.PureComponent { public constructor(props, context) { super(props, context); diff --git a/src/components/structures/NotificationPanel.tsx b/src/components/structures/NotificationPanel.tsx index 6af271bcc2..e5f094773b 100644 --- a/src/components/structures/NotificationPanel.tsx +++ b/src/components/structures/NotificationPanel.tsx @@ -20,7 +20,6 @@ import { logger } from "matrix-js-sdk/src/logger"; import { _t } from '../../languageHandler'; import { MatrixClientPeg } from "../../MatrixClientPeg"; import BaseCard from "../views/right_panel/BaseCard"; -import { replaceableComponent } from "../../utils/replaceableComponent"; import TimelinePanel from "./TimelinePanel"; import Spinner from "../views/elements/Spinner"; import { Layout } from "../../settings/enums/Layout"; @@ -38,7 +37,6 @@ interface IState { /* * Component which shows the global notification list using a TimelinePanel */ -@replaceableComponent("structures.NotificationPanel") export default class NotificationPanel extends React.PureComponent { static contextType = RoomContext; diff --git a/src/components/structures/RightPanel.tsx b/src/components/structures/RightPanel.tsx index 3bf0ed26b9..5b1bf3f1ed 100644 --- a/src/components/structures/RightPanel.tsx +++ b/src/components/structures/RightPanel.tsx @@ -28,7 +28,6 @@ import RightPanelStore from "../../stores/right-panel/RightPanelStore"; import MatrixClientContext from "../../contexts/MatrixClientContext"; import RoomSummaryCard from "../views/right_panel/RoomSummaryCard"; import WidgetCard from "../views/right_panel/WidgetCard"; -import { replaceableComponent } from "../../utils/replaceableComponent"; import SettingsStore from "../../settings/SettingsStore"; import MemberList from "../views/rooms/MemberList"; import UserInfo from "../views/right_panel/UserInfo"; @@ -60,7 +59,6 @@ interface IState { cardState?: IRightPanelCardState; } -@replaceableComponent("structures.RightPanel") export default class RightPanel extends React.Component { static contextType = MatrixClientContext; public context!: React.ContextType; diff --git a/src/components/structures/RoomDirectory.tsx b/src/components/structures/RoomDirectory.tsx index 5cb90f1086..2a07c3f81b 100644 --- a/src/components/structures/RoomDirectory.tsx +++ b/src/components/structures/RoomDirectory.tsx @@ -31,7 +31,6 @@ import { instanceForInstanceId, protocolNameForInstanceId } from '../../utils/Di import Analytics from '../../Analytics'; import NetworkDropdown, { ALL_ROOMS, Protocols } from "../views/directory/NetworkDropdown"; import SettingsStore from "../../settings/SettingsStore"; -import { replaceableComponent } from "../../utils/replaceableComponent"; import { mediaFromMxc } from "../../customisations/Media"; import { IDialogProps } from "../views/dialogs/IDialogProps"; import AccessibleButton, { ButtonEvent } from "../views/elements/AccessibleButton"; @@ -71,7 +70,6 @@ interface IState { filterString: string; } -@replaceableComponent("structures.RoomDirectory") export default class RoomDirectory extends React.Component { private unmounted = false; private nextBatch: string = null; diff --git a/src/components/structures/RoomSearch.tsx b/src/components/structures/RoomSearch.tsx index 5591e382ea..9421292764 100644 --- a/src/components/structures/RoomSearch.tsx +++ b/src/components/structures/RoomSearch.tsx @@ -26,7 +26,6 @@ import { Action } from "../../dispatcher/actions"; import RoomListStore from "../../stores/room-list/RoomListStore"; import { NameFilterCondition } from "../../stores/room-list/filters/NameFilterCondition"; import { getKeyBindingsManager } from "../../KeyBindingsManager"; -import { replaceableComponent } from "../../utils/replaceableComponent"; import SpaceStore from "../../stores/spaces/SpaceStore"; import { UPDATE_SELECTED_SPACE } from "../../stores/spaces"; import { isMac, Key } from "../../Keyboard"; @@ -50,7 +49,6 @@ interface IState { spotlightBetaEnabled: boolean; } -@replaceableComponent("structures.RoomSearch") export default class RoomSearch extends React.PureComponent { private readonly dispatcherRef: string; private readonly betaRef: string; diff --git a/src/components/structures/RoomStatusBar.tsx b/src/components/structures/RoomStatusBar.tsx index 514c3a507c..94b9905bec 100644 --- a/src/components/structures/RoomStatusBar.tsx +++ b/src/components/structures/RoomStatusBar.tsx @@ -24,7 +24,6 @@ import Resend from '../../Resend'; import dis from '../../dispatcher/dispatcher'; import { messageForResourceLimitError } from '../../utils/ErrorUtils'; import { Action } from "../../dispatcher/actions"; -import { replaceableComponent } from "../../utils/replaceableComponent"; import NotificationBadge from "../views/rooms/NotificationBadge"; import { StaticNotificationState } from "../../stores/notifications/StaticNotificationState"; import AccessibleButton from "../views/elements/AccessibleButton"; @@ -82,7 +81,6 @@ interface IState { isResending: boolean; } -@replaceableComponent("structures.RoomStatusBar") export default class RoomStatusBar extends React.PureComponent { private unmounted = false; public static contextType = MatrixClientContext; diff --git a/src/components/structures/RoomView.tsx b/src/components/structures/RoomView.tsx index ffd80e0222..d52786c39b 100644 --- a/src/components/structures/RoomView.tsx +++ b/src/components/structures/RoomView.tsx @@ -86,7 +86,6 @@ import { getKeyBindingsManager } from '../../KeyBindingsManager'; import { objectHasDiff } from "../../utils/objects"; import SpaceRoomView from "./SpaceRoomView"; import { IOpts } from "../../createRoom"; -import { replaceableComponent } from "../../utils/replaceableComponent"; import EditorStateTransfer from "../../utils/EditorStateTransfer"; import ErrorDialog from '../views/dialogs/ErrorDialog'; import SearchResultTile from '../views/rooms/SearchResultTile'; @@ -220,7 +219,6 @@ export interface IRoomState { narrow: boolean; } -@replaceableComponent("structures.RoomView") export class RoomView extends React.Component { private readonly dispatcherRef: string; private readonly roomStoreToken: EventSubscription; diff --git a/src/components/structures/ScrollPanel.tsx b/src/components/structures/ScrollPanel.tsx index d650cfc962..d580f02bc0 100644 --- a/src/components/structures/ScrollPanel.tsx +++ b/src/components/structures/ScrollPanel.tsx @@ -19,7 +19,6 @@ import { logger } from "matrix-js-sdk/src/logger"; import Timer from '../../utils/Timer'; import AutoHideScrollbar from "./AutoHideScrollbar"; -import { replaceableComponent } from "../../utils/replaceableComponent"; import { getKeyBindingsManager } from "../../KeyBindingsManager"; import ResizeNotifier from "../../utils/ResizeNotifier"; import { KeyBindingAction } from "../../accessibility/KeyboardShortcuts"; @@ -170,7 +169,6 @@ interface IPreventShrinkingState { offsetNode: HTMLElement; } -@replaceableComponent("structures.ScrollPanel") export default class ScrollPanel extends React.Component { static defaultProps = { stickyBottom: true, diff --git a/src/components/structures/SearchBox.tsx b/src/components/structures/SearchBox.tsx index 5789e5adf1..bcf3dcc875 100644 --- a/src/components/structures/SearchBox.tsx +++ b/src/components/structures/SearchBox.tsx @@ -20,7 +20,6 @@ import { throttle } from 'lodash'; import classNames from 'classnames'; import AccessibleButton from '../../components/views/elements/AccessibleButton'; -import { replaceableComponent } from "../../utils/replaceableComponent"; import { getKeyBindingsManager } from "../../KeyBindingsManager"; import { KeyBindingAction } from "../../accessibility/KeyboardShortcuts"; @@ -43,7 +42,6 @@ interface IState { blurred: boolean; } -@replaceableComponent("structures.SearchBox") export default class SearchBox extends React.Component { private search = createRef(); diff --git a/src/components/structures/TabbedView.tsx b/src/components/structures/TabbedView.tsx index ea116b7d8e..91e64946ad 100644 --- a/src/components/structures/TabbedView.tsx +++ b/src/components/structures/TabbedView.tsx @@ -22,7 +22,6 @@ import { logger } from "matrix-js-sdk/src/logger"; import { _t } from '../../languageHandler'; import AutoHideScrollbar from './AutoHideScrollbar'; -import { replaceableComponent } from "../../utils/replaceableComponent"; import AccessibleButton from "../views/elements/AccessibleButton"; import { PosthogScreenTracker, ScreenName } from "../../PosthogTrackers"; @@ -64,7 +63,6 @@ interface IState { activeTabIndex: number; } -@replaceableComponent("structures.TabbedView") export default class TabbedView extends React.Component { constructor(props: IProps) { super(props); diff --git a/src/components/structures/ThreadView.tsx b/src/components/structures/ThreadView.tsx index 13fdc2d31a..600426a8b8 100644 --- a/src/components/structures/ThreadView.tsx +++ b/src/components/structures/ThreadView.tsx @@ -25,7 +25,6 @@ import classNames from "classnames"; import BaseCard from "../views/right_panel/BaseCard"; import { RightPanelPhases } from "../../stores/right-panel/RightPanelStorePhases"; -import { replaceableComponent } from "../../utils/replaceableComponent"; import ResizeNotifier from '../../utils/ResizeNotifier'; import MessageComposer from '../views/rooms/MessageComposer'; import { RoomPermalinkCreator } from '../../utils/permalinks/Permalinks'; @@ -72,7 +71,6 @@ interface IState { narrow: boolean; } -@replaceableComponent("structures.ThreadView") export default class ThreadView extends React.Component { static contextType = RoomContext; public context!: React.ContextType; diff --git a/src/components/structures/TimelinePanel.tsx b/src/components/structures/TimelinePanel.tsx index 96b892245b..dd372b9381 100644 --- a/src/components/structures/TimelinePanel.tsx +++ b/src/components/structures/TimelinePanel.tsx @@ -41,7 +41,6 @@ import { Action } from '../../dispatcher/actions'; import Timer from '../../utils/Timer'; import shouldHideEvent from '../../shouldHideEvent'; import { haveTileForEvent } from "../views/rooms/EventTile"; -import { replaceableComponent } from "../../utils/replaceableComponent"; import { arrayFastClone } from "../../utils/arrays"; import MessagePanel from "./MessagePanel"; import { IScrollState } from "./ScrollPanel"; @@ -211,7 +210,6 @@ interface IEventIndexOpts { * * Also responsible for handling and sending read receipts. */ -@replaceableComponent("structures.TimelinePanel") class TimelinePanel extends React.Component { static contextType = RoomContext; diff --git a/src/components/structures/ToastContainer.tsx b/src/components/structures/ToastContainer.tsx index 0b71fa9dc9..7f2969e5af 100644 --- a/src/components/structures/ToastContainer.tsx +++ b/src/components/structures/ToastContainer.tsx @@ -18,14 +18,12 @@ import * as React from "react"; import classNames from "classnames"; import ToastStore, { IToast } from "../../stores/ToastStore"; -import { replaceableComponent } from "../../utils/replaceableComponent"; interface IState { toasts: IToast[]; countSeen: number; } -@replaceableComponent("structures.ToastContainer") export default class ToastContainer extends React.Component<{}, IState> { constructor(props, context) { super(props, context); diff --git a/src/components/structures/UploadBar.tsx b/src/components/structures/UploadBar.tsx index eb4ef51681..e3dc77a466 100644 --- a/src/components/structures/UploadBar.tsx +++ b/src/components/structures/UploadBar.tsx @@ -27,7 +27,6 @@ import { Action } from "../../dispatcher/actions"; import ProgressBar from "../views/elements/ProgressBar"; import AccessibleButton from "../views/elements/AccessibleButton"; import { IUpload } from "../../models/IUpload"; -import { replaceableComponent } from "../../utils/replaceableComponent"; import MatrixClientContext from "../../contexts/MatrixClientContext"; interface IProps { @@ -40,7 +39,6 @@ interface IState { uploadsHere: IUpload[]; } -@replaceableComponent("structures.UploadBar") export default class UploadBar extends React.Component { static contextType = MatrixClientContext; diff --git a/src/components/structures/UserMenu.tsx b/src/components/structures/UserMenu.tsx index e245a73a9f..c00bb6170e 100644 --- a/src/components/structures/UserMenu.tsx +++ b/src/components/structures/UserMenu.tsx @@ -53,7 +53,6 @@ import { UIFeature } from "../../settings/UIFeature"; import HostSignupAction from "./HostSignupAction"; import SpaceStore from "../../stores/spaces/SpaceStore"; import { UPDATE_SELECTED_SPACE } from "../../stores/spaces"; -import { replaceableComponent } from "../../utils/replaceableComponent"; import MatrixClientContext from "../../contexts/MatrixClientContext"; import { SettingUpdatedPayload } from "../../dispatcher/payloads/SettingUpdatedPayload"; import UserIdentifierCustomisations from "../../customisations/UserIdentifier"; @@ -143,7 +142,6 @@ const below = (rect: PartialDOMRect) => { }; }; -@replaceableComponent("structures.UserMenu") export default class UserMenu extends React.Component { private dispatcherRef: string; private themeWatcherRef: string; diff --git a/src/components/structures/UserView.tsx b/src/components/structures/UserView.tsx index 657b9ab6ff..9ba9d808c9 100644 --- a/src/components/structures/UserView.tsx +++ b/src/components/structures/UserView.tsx @@ -23,7 +23,6 @@ import { MatrixClientPeg } from "../../MatrixClientPeg"; import Modal from '../../Modal'; import { _t } from '../../languageHandler'; import HomePage from "./HomePage"; -import { replaceableComponent } from "../../utils/replaceableComponent"; import ErrorDialog from "../views/dialogs/ErrorDialog"; import MainSplit from "./MainSplit"; import RightPanel from "./RightPanel"; @@ -41,7 +40,6 @@ interface IState { member?: RoomMember; } -@replaceableComponent("structures.UserView") export default class UserView extends React.Component { constructor(props: IProps) { super(props); diff --git a/src/components/structures/ViewSource.tsx b/src/components/structures/ViewSource.tsx index bd2f3cdb29..477dd4ca9a 100644 --- a/src/components/structures/ViewSource.tsx +++ b/src/components/structures/ViewSource.tsx @@ -24,7 +24,6 @@ import { _t } from "../../languageHandler"; import MatrixClientContext from "../../contexts/MatrixClientContext"; import { canEditContent } from "../../utils/EventUtils"; import { MatrixClientPeg } from '../../MatrixClientPeg'; -import { replaceableComponent } from "../../utils/replaceableComponent"; import { IDialogProps } from "../views/dialogs/IDialogProps"; import BaseDialog from "../views/dialogs/BaseDialog"; import { DevtoolsContext } from "../views/dialogs/devtools/BaseTool"; @@ -39,7 +38,6 @@ interface IState { isEditing: boolean; } -@replaceableComponent("structures.ViewSource") export default class ViewSource extends React.Component { constructor(props: IProps) { super(props); diff --git a/src/components/structures/auth/CompleteSecurity.tsx b/src/components/structures/auth/CompleteSecurity.tsx index 7043878a72..c187e2d789 100644 --- a/src/components/structures/auth/CompleteSecurity.tsx +++ b/src/components/structures/auth/CompleteSecurity.tsx @@ -19,7 +19,6 @@ import React from 'react'; import { _t } from '../../../languageHandler'; import { SetupEncryptionStore, Phase } from '../../../stores/SetupEncryptionStore'; import SetupEncryptionBody from "./SetupEncryptionBody"; -import { replaceableComponent } from "../../../utils/replaceableComponent"; import AccessibleButton from '../../views/elements/AccessibleButton'; import CompleteSecurityBody from "../../views/auth/CompleteSecurityBody"; import AuthPage from "../../views/auth/AuthPage"; @@ -33,7 +32,6 @@ interface IState { lostKeys: boolean; } -@replaceableComponent("structures.auth.CompleteSecurity") export default class CompleteSecurity extends React.Component { constructor(props: IProps) { super(props); diff --git a/src/components/structures/auth/E2eSetup.tsx b/src/components/structures/auth/E2eSetup.tsx index 96d6a0dc0b..ebd88b882c 100644 --- a/src/components/structures/auth/E2eSetup.tsx +++ b/src/components/structures/auth/E2eSetup.tsx @@ -19,7 +19,6 @@ import React from 'react'; import AuthPage from '../../views/auth/AuthPage'; import CompleteSecurityBody from '../../views/auth/CompleteSecurityBody'; import CreateCrossSigningDialog from '../../views/dialogs/security/CreateCrossSigningDialog'; -import { replaceableComponent } from "../../../utils/replaceableComponent"; interface IProps { onFinished: () => void; @@ -27,7 +26,6 @@ interface IProps { tokenLogin?: boolean; } -@replaceableComponent("structures.auth.E2eSetup") export default class E2eSetup extends React.Component { render() { return ( diff --git a/src/components/structures/auth/ForgotPassword.tsx b/src/components/structures/auth/ForgotPassword.tsx index 14b201afc6..58b0073c44 100644 --- a/src/components/structures/auth/ForgotPassword.tsx +++ b/src/components/structures/auth/ForgotPassword.tsx @@ -28,7 +28,6 @@ import AuthPage from "../../views/auth/AuthPage"; import ServerPicker from "../../views/elements/ServerPicker"; import EmailField from "../../views/auth/EmailField"; import PassphraseField from '../../views/auth/PassphraseField'; -import { replaceableComponent } from "../../../utils/replaceableComponent"; import { PASSWORD_MIN_SCORE } from '../../views/auth/RegistrationForm'; import InlineSpinner from '../../views/elements/InlineSpinner'; import Spinner from "../../views/elements/Spinner"; @@ -81,7 +80,6 @@ enum ForgotPasswordField { PasswordConfirm = 'field_password_confirm', } -@replaceableComponent("structures.auth.ForgotPassword") export default class ForgotPassword extends React.Component { private reset: PasswordReset; diff --git a/src/components/structures/auth/Login.tsx b/src/components/structures/auth/Login.tsx index c5e8a05665..0b99066414 100644 --- a/src/components/structures/auth/Login.tsx +++ b/src/components/structures/auth/Login.tsx @@ -34,7 +34,6 @@ import InlineSpinner from "../../views/elements/InlineSpinner"; import Spinner from "../../views/elements/Spinner"; import SSOButtons from "../../views/elements/SSOButtons"; import ServerPicker from "../../views/elements/ServerPicker"; -import { replaceableComponent } from "../../../utils/replaceableComponent"; import AuthBody from "../../views/auth/AuthBody"; import AuthHeader from "../../views/auth/AuthHeader"; import AccessibleButton from '../../views/elements/AccessibleButton'; @@ -103,7 +102,6 @@ interface IState { /* * A wire component which glues together login UI components and Login logic */ -@replaceableComponent("structures.auth.LoginComponent") export default class LoginComponent extends React.PureComponent { private unmounted = false; private loginLogic: Login; diff --git a/src/components/structures/auth/Registration.tsx b/src/components/structures/auth/Registration.tsx index 828ca8d79d..ecb4691e1b 100644 --- a/src/components/structures/auth/Registration.tsx +++ b/src/components/structures/auth/Registration.tsx @@ -30,7 +30,6 @@ import Login, { ISSOFlow } from "../../../Login"; import dis from "../../../dispatcher/dispatcher"; import SSOButtons from "../../views/elements/SSOButtons"; import ServerPicker from '../../views/elements/ServerPicker'; -import { replaceableComponent } from "../../../utils/replaceableComponent"; import RegistrationForm from '../../views/auth/RegistrationForm'; import AccessibleButton from '../../views/elements/AccessibleButton'; import AuthBody from "../../views/auth/AuthBody"; @@ -110,7 +109,6 @@ interface IState { ssoFlow?: ISSOFlow; } -@replaceableComponent("structures.auth.Registration") export default class Registration extends React.Component { loginLogic: Login; diff --git a/src/components/structures/auth/SetupEncryptionBody.tsx b/src/components/structures/auth/SetupEncryptionBody.tsx index 8783ae3f58..2553f8fbaa 100644 --- a/src/components/structures/auth/SetupEncryptionBody.tsx +++ b/src/components/structures/auth/SetupEncryptionBody.tsx @@ -25,7 +25,6 @@ import { MatrixClientPeg } from '../../../MatrixClientPeg'; import Modal from '../../../Modal'; import VerificationRequestDialog from '../../views/dialogs/VerificationRequestDialog'; import { SetupEncryptionStore, Phase } from '../../../stores/SetupEncryptionStore'; -import { replaceableComponent } from "../../../utils/replaceableComponent"; import EncryptionPanel from "../../views/right_panel/EncryptionPanel"; import AccessibleButton from '../../views/elements/AccessibleButton'; import Spinner from '../../views/elements/Spinner'; @@ -49,7 +48,6 @@ interface IState { lostKeys: boolean; } -@replaceableComponent("structures.auth.SetupEncryptionBody") export default class SetupEncryptionBody extends React.Component { constructor(props) { super(props); diff --git a/src/components/structures/auth/SoftLogout.tsx b/src/components/structures/auth/SoftLogout.tsx index f24230806a..7a366d7122 100644 --- a/src/components/structures/auth/SoftLogout.tsx +++ b/src/components/structures/auth/SoftLogout.tsx @@ -27,7 +27,6 @@ import { ISSOFlow, LoginFlow, sendLoginRequest } from "../../../Login"; import AuthPage from "../../views/auth/AuthPage"; import { SSO_HOMESERVER_URL_KEY, SSO_ID_SERVER_URL_KEY } from "../../../BasePlatform"; import SSOButtons from "../../views/elements/SSOButtons"; -import { replaceableComponent } from "../../../utils/replaceableComponent"; import ConfirmWipeDeviceDialog from '../../views/dialogs/ConfirmWipeDeviceDialog'; import Field from '../../views/elements/Field'; import AccessibleButton from '../../views/elements/AccessibleButton'; @@ -70,7 +69,6 @@ interface IState { flows: LoginFlow[]; } -@replaceableComponent("structures.auth.SoftLogout") export default class SoftLogout extends React.Component { public constructor(props: IProps) { super(props); diff --git a/src/components/views/audio_messages/AudioPlayer.tsx b/src/components/views/audio_messages/AudioPlayer.tsx index 84b96632f1..26055d1bb8 100644 --- a/src/components/views/audio_messages/AudioPlayer.tsx +++ b/src/components/views/audio_messages/AudioPlayer.tsx @@ -17,7 +17,6 @@ limitations under the License. import React, { createRef, ReactNode, RefObject } from "react"; import PlayPauseButton from "./PlayPauseButton"; -import { replaceableComponent } from "../../../utils/replaceableComponent"; import { formatBytes } from "../../../utils/FormattingUtils"; import DurationClock from "./DurationClock"; import { _t } from "../../../languageHandler"; @@ -27,7 +26,6 @@ import AudioPlayerBase from "./AudioPlayerBase"; import { getKeyBindingsManager } from "../../../KeyBindingsManager"; import { KeyBindingAction } from "../../../accessibility/KeyboardShortcuts"; -@replaceableComponent("views.audio_messages.AudioPlayer") export default class AudioPlayer extends AudioPlayerBase { private playPauseRef: RefObject = createRef(); private seekRef: RefObject = createRef(); diff --git a/src/components/views/audio_messages/AudioPlayerBase.tsx b/src/components/views/audio_messages/AudioPlayerBase.tsx index 1ce0ed1e95..52b9a79214 100644 --- a/src/components/views/audio_messages/AudioPlayerBase.tsx +++ b/src/components/views/audio_messages/AudioPlayerBase.tsx @@ -19,7 +19,6 @@ import { logger } from "matrix-js-sdk/src/logger"; import { Playback, PlaybackState } from "../../../audio/Playback"; import { UPDATE_EVENT } from "../../../stores/AsyncStore"; -import { replaceableComponent } from "../../../utils/replaceableComponent"; import { _t } from "../../../languageHandler"; interface IProps { @@ -35,7 +34,6 @@ interface IState { error?: boolean; } -@replaceableComponent("views.audio_messages.AudioPlayerBase") export default abstract class AudioPlayerBase extends React.PureComponent { constructor(props: IProps) { super(props); diff --git a/src/components/views/audio_messages/Clock.tsx b/src/components/views/audio_messages/Clock.tsx index 13ffaa7d76..f978d8837c 100644 --- a/src/components/views/audio_messages/Clock.tsx +++ b/src/components/views/audio_messages/Clock.tsx @@ -17,7 +17,6 @@ limitations under the License. import React, { HTMLProps } from "react"; import { formatSeconds } from "../../../DateUtils"; -import { replaceableComponent } from "../../../utils/replaceableComponent"; export interface IProps extends Pick, "aria-live"> { seconds: number; @@ -27,7 +26,6 @@ export interface IProps extends Pick, "aria-live"> { * Simply converts seconds into minutes and seconds. Note that hours will not be * displayed, making it possible to see "82:29". */ -@replaceableComponent("views.audio_messages.Clock") export default class Clock extends React.Component { public constructor(props) { super(props); diff --git a/src/components/views/audio_messages/DurationClock.tsx b/src/components/views/audio_messages/DurationClock.tsx index e0c180123a..47dc8e8375 100644 --- a/src/components/views/audio_messages/DurationClock.tsx +++ b/src/components/views/audio_messages/DurationClock.tsx @@ -16,7 +16,6 @@ limitations under the License. import React from "react"; -import { replaceableComponent } from "../../../utils/replaceableComponent"; import Clock from "./Clock"; import { Playback } from "../../../audio/Playback"; @@ -31,7 +30,6 @@ interface IState { /** * A clock which shows a clip's maximum duration. */ -@replaceableComponent("views.audio_messages.DurationClock") export default class DurationClock extends React.PureComponent { public constructor(props) { super(props); diff --git a/src/components/views/audio_messages/LiveRecordingClock.tsx b/src/components/views/audio_messages/LiveRecordingClock.tsx index aa88d999be..34e4c559fe 100644 --- a/src/components/views/audio_messages/LiveRecordingClock.tsx +++ b/src/components/views/audio_messages/LiveRecordingClock.tsx @@ -17,7 +17,6 @@ limitations under the License. import React from "react"; import { IRecordingUpdate, VoiceRecording } from "../../../audio/VoiceRecording"; -import { replaceableComponent } from "../../../utils/replaceableComponent"; import Clock from "./Clock"; import { MarkedExecution } from "../../../utils/MarkedExecution"; @@ -32,7 +31,6 @@ interface IState { /** * A clock for a live recording. */ -@replaceableComponent("views.audio_messages.LiveRecordingClock") export default class LiveRecordingClock extends React.PureComponent { private seconds = 0; private scheduledUpdate = new MarkedExecution( diff --git a/src/components/views/audio_messages/LiveRecordingWaveform.tsx b/src/components/views/audio_messages/LiveRecordingWaveform.tsx index 13ba7b9f96..c9c122c98a 100644 --- a/src/components/views/audio_messages/LiveRecordingWaveform.tsx +++ b/src/components/views/audio_messages/LiveRecordingWaveform.tsx @@ -17,7 +17,6 @@ limitations under the License. import React from "react"; import { IRecordingUpdate, RECORDING_PLAYBACK_SAMPLES, VoiceRecording } from "../../../audio/VoiceRecording"; -import { replaceableComponent } from "../../../utils/replaceableComponent"; import { arrayFastResample, arraySeed } from "../../../utils/arrays"; import Waveform from "./Waveform"; import { MarkedExecution } from "../../../utils/MarkedExecution"; @@ -33,7 +32,6 @@ interface IState { /** * A waveform which shows the waveform of a live recording */ -@replaceableComponent("views.audio_messages.LiveRecordingWaveform") export default class LiveRecordingWaveform extends React.PureComponent { public static defaultProps = { progress: 1, diff --git a/src/components/views/audio_messages/PlayPauseButton.tsx b/src/components/views/audio_messages/PlayPauseButton.tsx index 5562a33ab5..1a2da04a38 100644 --- a/src/components/views/audio_messages/PlayPauseButton.tsx +++ b/src/components/views/audio_messages/PlayPauseButton.tsx @@ -17,7 +17,6 @@ limitations under the License. import React, { ReactNode } from "react"; import classNames from "classnames"; -import { replaceableComponent } from "../../../utils/replaceableComponent"; import AccessibleTooltipButton from "../elements/AccessibleTooltipButton"; import { _t } from "../../../languageHandler"; import { Playback, PlaybackState } from "../../../audio/Playback"; @@ -35,7 +34,6 @@ interface IProps extends Omit { public constructor(props) { super(props); diff --git a/src/components/views/audio_messages/PlaybackClock.tsx b/src/components/views/audio_messages/PlaybackClock.tsx index c792d1c483..3f05ad0b89 100644 --- a/src/components/views/audio_messages/PlaybackClock.tsx +++ b/src/components/views/audio_messages/PlaybackClock.tsx @@ -16,7 +16,6 @@ limitations under the License. import React from "react"; -import { replaceableComponent } from "../../../utils/replaceableComponent"; import Clock from "./Clock"; import { Playback, PlaybackState } from "../../../audio/Playback"; import { UPDATE_EVENT } from "../../../stores/AsyncStore"; @@ -39,7 +38,6 @@ interface IState { /** * A clock for a playback of a recording. */ -@replaceableComponent("views.audio_messages.PlaybackClock") export default class PlaybackClock extends React.PureComponent { public constructor(props) { super(props); diff --git a/src/components/views/audio_messages/PlaybackWaveform.tsx b/src/components/views/audio_messages/PlaybackWaveform.tsx index 70bf0ebeef..712044ca78 100644 --- a/src/components/views/audio_messages/PlaybackWaveform.tsx +++ b/src/components/views/audio_messages/PlaybackWaveform.tsx @@ -16,7 +16,6 @@ limitations under the License. import React from "react"; -import { replaceableComponent } from "../../../utils/replaceableComponent"; import { arraySeed, arrayTrimFill } from "../../../utils/arrays"; import Waveform from "./Waveform"; import { Playback, PLAYBACK_WAVEFORM_SAMPLES } from "../../../audio/Playback"; @@ -34,7 +33,6 @@ interface IState { /** * A waveform which shows the waveform of a previously recorded recording */ -@replaceableComponent("views.audio_messages.PlaybackWaveform") export default class PlaybackWaveform extends React.PureComponent { public constructor(props) { super(props); diff --git a/src/components/views/audio_messages/RecordingPlayback.tsx b/src/components/views/audio_messages/RecordingPlayback.tsx index 05fca276fe..7440a6c57e 100644 --- a/src/components/views/audio_messages/RecordingPlayback.tsx +++ b/src/components/views/audio_messages/RecordingPlayback.tsx @@ -18,12 +18,10 @@ import React, { ReactNode } from "react"; import PlayPauseButton from "./PlayPauseButton"; import PlaybackClock from "./PlaybackClock"; -import { replaceableComponent } from "../../../utils/replaceableComponent"; import PlaybackWaveform from "./PlaybackWaveform"; import AudioPlayerBase from "./AudioPlayerBase"; import RoomContext, { TimelineRenderingType } from "../../../contexts/RoomContext"; -@replaceableComponent("views.audio_messages.RecordingPlayback") export default class RecordingPlayback extends AudioPlayerBase { static contextType = RoomContext; public context!: React.ContextType; diff --git a/src/components/views/audio_messages/SeekBar.tsx b/src/components/views/audio_messages/SeekBar.tsx index 817f3e0452..d86d11c95e 100644 --- a/src/components/views/audio_messages/SeekBar.tsx +++ b/src/components/views/audio_messages/SeekBar.tsx @@ -17,7 +17,6 @@ limitations under the License. import React, { ChangeEvent, CSSProperties, ReactNode } from "react"; import { Playback, PlaybackState } from "../../../audio/Playback"; -import { replaceableComponent } from "../../../utils/replaceableComponent"; import { MarkedExecution } from "../../../utils/MarkedExecution"; import { percentageOf } from "../../../utils/numbers"; @@ -43,7 +42,6 @@ interface ISeekCSS extends CSSProperties { const ARROW_SKIP_SECONDS = 5; // arbitrary -@replaceableComponent("views.audio_messages.SeekBar") export default class SeekBar extends React.PureComponent { // We use an animation frame request to avoid overly spamming prop updates, even if we aren't // really using anything demanding on the CSS front. diff --git a/src/components/views/audio_messages/Waveform.tsx b/src/components/views/audio_messages/Waveform.tsx index dedd95c7e1..deccc23ac6 100644 --- a/src/components/views/audio_messages/Waveform.tsx +++ b/src/components/views/audio_messages/Waveform.tsx @@ -17,8 +17,6 @@ limitations under the License. import React, { CSSProperties } from "react"; import classNames from "classnames"; -import { replaceableComponent } from "../../../utils/replaceableComponent"; - interface WaveformCSSProperties extends CSSProperties { '--barHeight': number; } @@ -39,7 +37,6 @@ interface IState { * For CSS purposes, a mx_Waveform_bar_100pct class is added when the bar should be * "filled", as a demonstration of the progress property. */ -@replaceableComponent("views.audio_messages.Waveform") export default class Waveform extends React.PureComponent { public static defaultProps = { progress: 1, diff --git a/src/components/views/auth/AuthBody.tsx b/src/components/views/auth/AuthBody.tsx index 22bb919141..4532ceeaf4 100644 --- a/src/components/views/auth/AuthBody.tsx +++ b/src/components/views/auth/AuthBody.tsx @@ -16,9 +16,6 @@ limitations under the License. import React from 'react'; -import { replaceableComponent } from "../../../utils/replaceableComponent"; - -@replaceableComponent("views.auth.AuthBody") export default class AuthBody extends React.PureComponent { public render(): React.ReactNode { return
diff --git a/src/components/views/auth/AuthFooter.tsx b/src/components/views/auth/AuthFooter.tsx index d936e346e6..46e389cb46 100644 --- a/src/components/views/auth/AuthFooter.tsx +++ b/src/components/views/auth/AuthFooter.tsx @@ -19,9 +19,7 @@ limitations under the License. import React from 'react'; import { _t } from '../../../languageHandler'; -import { replaceableComponent } from "../../../utils/replaceableComponent"; -@replaceableComponent("views.auth.AuthFooter") export default class AuthFooter extends React.Component { public render(): React.ReactNode { return ( diff --git a/src/components/views/auth/AuthHeader.tsx b/src/components/views/auth/AuthHeader.tsx index 27768c9e6e..90e9e888af 100644 --- a/src/components/views/auth/AuthHeader.tsx +++ b/src/components/views/auth/AuthHeader.tsx @@ -17,7 +17,6 @@ limitations under the License. import React from 'react'; -import { replaceableComponent } from "../../../utils/replaceableComponent"; import AuthHeaderLogo from "./AuthHeaderLogo"; import LanguageSelector from "./LanguageSelector"; @@ -25,7 +24,6 @@ interface IProps { disableLanguageSelector?: boolean; } -@replaceableComponent("views.auth.AuthHeader") export default class AuthHeader extends React.Component { public render(): React.ReactNode { return ( diff --git a/src/components/views/auth/AuthHeaderLogo.tsx b/src/components/views/auth/AuthHeaderLogo.tsx index 29e5737238..72a2df7b83 100644 --- a/src/components/views/auth/AuthHeaderLogo.tsx +++ b/src/components/views/auth/AuthHeaderLogo.tsx @@ -16,9 +16,6 @@ limitations under the License. import React from 'react'; -import { replaceableComponent } from "../../../utils/replaceableComponent"; - -@replaceableComponent("views.auth.AuthHeaderLogo") export default class AuthHeaderLogo extends React.PureComponent { public render(): React.ReactNode { return
diff --git a/src/components/views/auth/AuthPage.tsx b/src/components/views/auth/AuthPage.tsx index d13c8dd6ae..344e890ebb 100644 --- a/src/components/views/auth/AuthPage.tsx +++ b/src/components/views/auth/AuthPage.tsx @@ -18,10 +18,8 @@ limitations under the License. import React from 'react'; -import { replaceableComponent } from "../../../utils/replaceableComponent"; import AuthFooter from "./AuthFooter"; -@replaceableComponent("views.auth.AuthPage") export default class AuthPage extends React.PureComponent { public render(): React.ReactNode { return ( diff --git a/src/components/views/auth/CaptchaForm.tsx b/src/components/views/auth/CaptchaForm.tsx index 887f174c00..7f718bae6d 100644 --- a/src/components/views/auth/CaptchaForm.tsx +++ b/src/components/views/auth/CaptchaForm.tsx @@ -18,7 +18,6 @@ import React, { createRef } from 'react'; import { logger } from "matrix-js-sdk/src/logger"; import { _t } from '../../../languageHandler'; -import { replaceableComponent } from "../../../utils/replaceableComponent"; const DIV_ID = 'mx_recaptcha'; @@ -35,7 +34,6 @@ interface ICaptchaFormState { /** * A pure UI component which displays a captcha form. */ -@replaceableComponent("views.auth.CaptchaForm") export default class CaptchaForm extends React.Component { static defaultProps = { onCaptchaResponse: () => {}, diff --git a/src/components/views/auth/CompleteSecurityBody.tsx b/src/components/views/auth/CompleteSecurityBody.tsx index 349016add5..ecc6eace7d 100644 --- a/src/components/views/auth/CompleteSecurityBody.tsx +++ b/src/components/views/auth/CompleteSecurityBody.tsx @@ -16,9 +16,6 @@ limitations under the License. import React from 'react'; -import { replaceableComponent } from "../../../utils/replaceableComponent"; - -@replaceableComponent("views.auth.CompleteSecurityBody") export default class CompleteSecurityBody extends React.PureComponent { public render(): React.ReactNode { return
diff --git a/src/components/views/auth/CountryDropdown.tsx b/src/components/views/auth/CountryDropdown.tsx index d4a3987ccb..0318c4b95d 100644 --- a/src/components/views/auth/CountryDropdown.tsx +++ b/src/components/views/auth/CountryDropdown.tsx @@ -19,7 +19,6 @@ import React from 'react'; import { COUNTRIES, getEmojiFlag, PhoneNumberCountryDefinition } from '../../../phonenumber'; import SdkConfig from "../../../SdkConfig"; import { _t } from "../../../languageHandler"; -import { replaceableComponent } from "../../../utils/replaceableComponent"; import Dropdown from "../elements/Dropdown"; const COUNTRIES_BY_ISO2 = {}; @@ -53,7 +52,6 @@ interface IState { defaultCountry: PhoneNumberCountryDefinition; } -@replaceableComponent("views.auth.CountryDropdown") export default class CountryDropdown extends React.Component { constructor(props: IProps) { super(props); diff --git a/src/components/views/auth/EmailField.tsx b/src/components/views/auth/EmailField.tsx index f274f1fdfa..2aa6204cfa 100644 --- a/src/components/views/auth/EmailField.tsx +++ b/src/components/views/auth/EmailField.tsx @@ -16,7 +16,6 @@ limitations under the License. import React, { PureComponent, RefCallback, RefObject } from "react"; -import { replaceableComponent } from "../../../utils/replaceableComponent"; import Field, { IInputProps } from "../elements/Field"; import { _t, _td } from "../../../languageHandler"; import withValidation, { IFieldState, IValidationResult } from "../elements/Validation"; @@ -39,7 +38,6 @@ interface IProps extends Omit { onValidate?(result: IValidationResult): void; } -@replaceableComponent("views.auth.EmailField") class EmailField extends PureComponent { static defaultProps = { label: _td("Email"), diff --git a/src/components/views/auth/InteractiveAuthEntryComponents.tsx b/src/components/views/auth/InteractiveAuthEntryComponents.tsx index e4b9a7422e..11a28d1e05 100644 --- a/src/components/views/auth/InteractiveAuthEntryComponents.tsx +++ b/src/components/views/auth/InteractiveAuthEntryComponents.tsx @@ -24,7 +24,6 @@ import { _t } from '../../../languageHandler'; import SettingsStore from "../../../settings/SettingsStore"; import AccessibleButton from "../elements/AccessibleButton"; import Spinner from "../elements/Spinner"; -import { replaceableComponent } from "../../../utils/replaceableComponent"; import { LocalisedPolicy, Policies } from '../../../Terms'; import Field from '../elements/Field'; import CaptchaForm from "./CaptchaForm"; @@ -93,7 +92,6 @@ interface IPasswordAuthEntryState { password: string; } -@replaceableComponent("views.auth.PasswordAuthEntry") export class PasswordAuthEntry extends React.Component { static LOGIN_TYPE = AuthType.Password; @@ -191,7 +189,6 @@ interface IRecaptchaAuthEntryProps extends IAuthEntryProps { } /* eslint-enable camelcase */ -@replaceableComponent("views.auth.RecaptchaAuthEntry") export class RecaptchaAuthEntry extends React.Component { static LOGIN_TYPE = AuthType.Recaptcha; @@ -262,7 +259,6 @@ interface ITermsAuthEntryState { errorText?: string; } -@replaceableComponent("views.auth.TermsAuthEntry") export class TermsAuthEntry extends React.Component { static LOGIN_TYPE = AuthType.Terms; @@ -409,7 +405,6 @@ interface IEmailIdentityAuthEntryProps extends IAuthEntryProps { }; } -@replaceableComponent("views.auth.EmailIdentityAuthEntry") export class EmailIdentityAuthEntry extends React.Component { static LOGIN_TYPE = AuthType.Email; @@ -472,7 +467,6 @@ interface IMsisdnAuthEntryState { errorText: string; } -@replaceableComponent("views.auth.MsisdnAuthEntry") export class MsisdnAuthEntry extends React.Component { static LOGIN_TYPE = AuthType.Msisdn; @@ -623,7 +617,6 @@ interface ISSOAuthEntryState { attemptFailed: boolean; } -@replaceableComponent("views.auth.SSOAuthEntry") export class SSOAuthEntry extends React.Component { static LOGIN_TYPE = AuthType.Sso; static UNSTABLE_LOGIN_TYPE = AuthType.SsoUnstable; @@ -743,7 +736,6 @@ export class SSOAuthEntry extends React.Component { private popupWindow: Window; private fallbackButton = createRef(); diff --git a/src/components/views/auth/PassphraseConfirmField.tsx b/src/components/views/auth/PassphraseConfirmField.tsx index 3a2b6f89b7..e30e25a00e 100644 --- a/src/components/views/auth/PassphraseConfirmField.tsx +++ b/src/components/views/auth/PassphraseConfirmField.tsx @@ -16,7 +16,6 @@ limitations under the License. import React, { PureComponent, RefCallback, RefObject } from "react"; -import { replaceableComponent } from "../../../utils/replaceableComponent"; import Field, { IInputProps } from "../elements/Field"; import withValidation, { IFieldState, IValidationResult } from "../elements/Validation"; import { _t, _td } from "../../../languageHandler"; @@ -35,7 +34,6 @@ interface IProps extends Omit { onValidate?(result: IValidationResult); } -@replaceableComponent("views.auth.EmailField") class PassphraseConfirmField extends PureComponent { static defaultProps = { label: _td("Confirm password"), diff --git a/src/components/views/auth/PassphraseField.tsx b/src/components/views/auth/PassphraseField.tsx index 5a9aa0b85f..94353669ff 100644 --- a/src/components/views/auth/PassphraseField.tsx +++ b/src/components/views/auth/PassphraseField.tsx @@ -22,7 +22,6 @@ import SdkConfig from "../../../SdkConfig"; import withValidation, { IFieldState, IValidationResult } from "../elements/Validation"; import { _t, _td } from "../../../languageHandler"; import Field, { IInputProps } from "../elements/Field"; -import { replaceableComponent } from "../../../utils/replaceableComponent"; interface IProps extends Omit { autoFocus?: boolean; @@ -41,7 +40,6 @@ interface IProps extends Omit { onValidate?(result: IValidationResult); } -@replaceableComponent("views.auth.PassphraseField") class PassphraseField extends PureComponent { static defaultProps = { label: _td("Password"), diff --git a/src/components/views/auth/PasswordLogin.tsx b/src/components/views/auth/PasswordLogin.tsx index 9142358674..db22393112 100644 --- a/src/components/views/auth/PasswordLogin.tsx +++ b/src/components/views/auth/PasswordLogin.tsx @@ -24,7 +24,6 @@ import AccessibleButton from "../elements/AccessibleButton"; import withValidation, { IValidationResult } from "../elements/Validation"; import Field from "../elements/Field"; import CountryDropdown from "./CountryDropdown"; -import { replaceableComponent } from "../../../utils/replaceableComponent"; import EmailField from "./EmailField"; // For validating phone numbers without country codes @@ -66,7 +65,6 @@ enum LoginField { * A pure UI component which displays a username/password form. * The email/username/phone fields are fully-controlled, the password field is not. */ -@replaceableComponent("views.auth.PasswordLogin") export default class PasswordLogin extends React.PureComponent { static defaultProps = { onUsernameChanged: function() {}, diff --git a/src/components/views/auth/RegistrationForm.tsx b/src/components/views/auth/RegistrationForm.tsx index 2665e1789f..b57ddf5009 100644 --- a/src/components/views/auth/RegistrationForm.tsx +++ b/src/components/views/auth/RegistrationForm.tsx @@ -31,7 +31,6 @@ import EmailField from "./EmailField"; import PassphraseField from "./PassphraseField"; import Field from '../elements/Field'; import RegistrationEmailPromptDialog from '../dialogs/RegistrationEmailPromptDialog'; -import { replaceableComponent } from "../../../utils/replaceableComponent"; import CountryDropdown from "./CountryDropdown"; import PassphraseConfirmField from "./PassphraseConfirmField"; @@ -92,7 +91,6 @@ interface IState { /* * A pure UI component which displays a registration form. */ -@replaceableComponent("views.auth.RegistrationForm") export default class RegistrationForm extends React.PureComponent { static defaultProps = { onValidationChange: logger.error, diff --git a/src/components/views/auth/Welcome.tsx b/src/components/views/auth/Welcome.tsx index 2ac974610b..ad35ee0186 100644 --- a/src/components/views/auth/Welcome.tsx +++ b/src/components/views/auth/Welcome.tsx @@ -23,7 +23,6 @@ import AuthPage from "./AuthPage"; import { _td } from "../../../languageHandler"; import SettingsStore from "../../../settings/SettingsStore"; import { UIFeature } from "../../../settings/UIFeature"; -import { replaceableComponent } from "../../../utils/replaceableComponent"; import LanguageSelector from "./LanguageSelector"; // translatable strings for Welcome pages @@ -33,7 +32,6 @@ interface IProps { } -@replaceableComponent("views.auth.Welcome") export default class Welcome extends React.PureComponent { public render(): React.ReactNode { // FIXME: Using an import will result in wrench-element-tests failures diff --git a/src/components/views/avatars/DecoratedRoomAvatar.tsx b/src/components/views/avatars/DecoratedRoomAvatar.tsx index dffd3cfbb4..06ee20cc08 100644 --- a/src/components/views/avatars/DecoratedRoomAvatar.tsx +++ b/src/components/views/avatars/DecoratedRoomAvatar.tsx @@ -32,7 +32,6 @@ import { MatrixClientPeg } from "../../../MatrixClientPeg"; import { _t } from "../../../languageHandler"; import TextWithTooltip from "../elements/TextWithTooltip"; import DMRoomMap from "../../../utils/DMRoomMap"; -import { replaceableComponent } from "../../../utils/replaceableComponent"; import { IOOBData } from "../../../stores/ThreepidInviteStore"; import TooltipTarget from "../elements/TooltipTarget"; @@ -78,7 +77,6 @@ function tooltipText(variant: Icon) { } } -@replaceableComponent("views.avatars.DecoratedRoomAvatar") export default class DecoratedRoomAvatar extends React.PureComponent { private _dmUser: User; private isUnmounted = false; diff --git a/src/components/views/avatars/MemberAvatar.tsx b/src/components/views/avatars/MemberAvatar.tsx index e00b9b4b85..5b25f51cd5 100644 --- a/src/components/views/avatars/MemberAvatar.tsx +++ b/src/components/views/avatars/MemberAvatar.tsx @@ -23,7 +23,6 @@ import { logger } from "matrix-js-sdk/src/logger"; import dis from "../../../dispatcher/dispatcher"; import { Action } from "../../../dispatcher/actions"; import BaseAvatar from "./BaseAvatar"; -import { replaceableComponent } from "../../../utils/replaceableComponent"; import { mediaFromMxc } from "../../../customisations/Media"; import { CardContext } from '../right_panel/BaseCard'; import UserIdentifierCustomisations from '../../../customisations/UserIdentifier'; @@ -52,7 +51,6 @@ interface IState { imageUrl?: string; } -@replaceableComponent("views.avatars.MemberAvatar") export default class MemberAvatar extends React.PureComponent { public static defaultProps = { width: 40, diff --git a/src/components/views/avatars/RoomAvatar.tsx b/src/components/views/avatars/RoomAvatar.tsx index 9625b64138..f50232fb22 100644 --- a/src/components/views/avatars/RoomAvatar.tsx +++ b/src/components/views/avatars/RoomAvatar.tsx @@ -28,7 +28,6 @@ import { MatrixClientPeg } from '../../../MatrixClientPeg'; import Modal from '../../../Modal'; import * as Avatar from '../../../Avatar'; import DMRoomMap from "../../../utils/DMRoomMap"; -import { replaceableComponent } from "../../../utils/replaceableComponent"; import { mediaFromMxc } from "../../../customisations/Media"; import { IOOBData } from '../../../stores/ThreepidInviteStore'; @@ -52,7 +51,6 @@ interface IState { urls: string[]; } -@replaceableComponent("views.avatars.RoomAvatar") export default class RoomAvatar extends React.Component { public static defaultProps = { width: 36, diff --git a/src/components/views/context_menus/CallContextMenu.tsx b/src/components/views/context_menus/CallContextMenu.tsx index ec835d1e31..8c9e07dfcc 100644 --- a/src/components/views/context_menus/CallContextMenu.tsx +++ b/src/components/views/context_menus/CallContextMenu.tsx @@ -21,13 +21,11 @@ import { MatrixCall } from 'matrix-js-sdk/src/webrtc/call'; import { _t } from '../../../languageHandler'; import ContextMenu, { IProps as IContextMenuProps, MenuItem } from '../../structures/ContextMenu'; import CallHandler from '../../../CallHandler'; -import { replaceableComponent } from "../../../utils/replaceableComponent"; interface IProps extends IContextMenuProps { call: MatrixCall; } -@replaceableComponent("views.context_menus.CallContextMenu") export default class CallContextMenu extends React.Component { static propTypes = { // js-sdk User object. Not required because it might not exist. diff --git a/src/components/views/context_menus/DialpadContextMenu.tsx b/src/components/views/context_menus/DialpadContextMenu.tsx index 70a5aae2e8..f6530452d0 100644 --- a/src/components/views/context_menus/DialpadContextMenu.tsx +++ b/src/components/views/context_menus/DialpadContextMenu.tsx @@ -22,7 +22,6 @@ import AccessibleButton, { ButtonEvent } from "../elements/AccessibleButton"; import ContextMenu, { IProps as IContextMenuProps } from '../../structures/ContextMenu'; import Field from "../elements/Field"; import DialPad from '../voip/DialPad'; -import { replaceableComponent } from "../../../utils/replaceableComponent"; interface IProps extends IContextMenuProps { call: MatrixCall; @@ -32,7 +31,6 @@ interface IState { value: string; } -@replaceableComponent("views.context_menus.DialpadContextMenu") export default class DialpadContextMenu extends React.Component { private numberEntryFieldRef: React.RefObject = createRef(); diff --git a/src/components/views/context_menus/GenericElementContextMenu.tsx b/src/components/views/context_menus/GenericElementContextMenu.tsx index d5ebfca26e..7b53dc0ed9 100644 --- a/src/components/views/context_menus/GenericElementContextMenu.tsx +++ b/src/components/views/context_menus/GenericElementContextMenu.tsx @@ -16,8 +16,6 @@ limitations under the License. import React from 'react'; -import { replaceableComponent } from "../../../utils/replaceableComponent"; - interface IProps { element: React.ReactNode; // Function to be called when the parent window is resized @@ -30,7 +28,6 @@ interface IProps { * This component can be used to display generic HTML content in a contextual * menu. */ -@replaceableComponent("views.context_menus.GenericElementContextMenu") export default class GenericElementContextMenu extends React.Component { constructor(props: IProps) { super(props); diff --git a/src/components/views/context_menus/GenericTextContextMenu.tsx b/src/components/views/context_menus/GenericTextContextMenu.tsx index d25c708622..0f6cc708a1 100644 --- a/src/components/views/context_menus/GenericTextContextMenu.tsx +++ b/src/components/views/context_menus/GenericTextContextMenu.tsx @@ -16,13 +16,10 @@ limitations under the License. import React from 'react'; -import { replaceableComponent } from "../../../utils/replaceableComponent"; - interface IProps { message: string; } -@replaceableComponent("views.context_menus.GenericTextContextMenu") export default class GenericTextContextMenu extends React.Component { public render(): JSX.Element { return
diff --git a/src/components/views/context_menus/MessageContextMenu.tsx b/src/components/views/context_menus/MessageContextMenu.tsx index 8899c13a60..5adbcb9a9d 100644 --- a/src/components/views/context_menus/MessageContextMenu.tsx +++ b/src/components/views/context_menus/MessageContextMenu.tsx @@ -32,7 +32,6 @@ import SettingsStore from '../../../settings/SettingsStore'; import { isUrlPermitted } from '../../../HtmlUtils'; import { isContentActionable } from '../../../utils/EventUtils'; import IconizedContextMenu, { IconizedContextMenuOption, IconizedContextMenuOptionList } from './IconizedContextMenu'; -import { replaceableComponent } from "../../../utils/replaceableComponent"; import { ReadPinsEventId } from "../right_panel/PinnedMessagesCard"; import ForwardDialog from "../dialogs/ForwardDialog"; import { Action } from "../../../dispatcher/actions"; @@ -88,7 +87,6 @@ interface IState { canPin: boolean; } -@replaceableComponent("views.context_menus.MessageContextMenu") export default class MessageContextMenu extends React.Component { static contextType = RoomContext; public context!: React.ContextType; diff --git a/src/components/views/dialogs/AskInviteAnywayDialog.tsx b/src/components/views/dialogs/AskInviteAnywayDialog.tsx index 1815a43d57..bd691a1ed4 100644 --- a/src/components/views/dialogs/AskInviteAnywayDialog.tsx +++ b/src/components/views/dialogs/AskInviteAnywayDialog.tsx @@ -19,7 +19,6 @@ import React from 'react'; import { _t } from '../../../languageHandler'; import SettingsStore from "../../../settings/SettingsStore"; import { SettingLevel } from "../../../settings/SettingLevel"; -import { replaceableComponent } from "../../../utils/replaceableComponent"; import BaseDialog from "./BaseDialog"; interface IProps { @@ -32,7 +31,6 @@ interface IProps { onFinished: (success: boolean) => void; } -@replaceableComponent("views.dialogs.AskInviteAnywayDialog") export default class AskInviteAnywayDialog extends React.Component { private onInviteClicked = (): void => { this.props.onInviteAnyways(); diff --git a/src/components/views/dialogs/BaseDialog.tsx b/src/components/views/dialogs/BaseDialog.tsx index 519e38601c..5eb0c6ac82 100644 --- a/src/components/views/dialogs/BaseDialog.tsx +++ b/src/components/views/dialogs/BaseDialog.tsx @@ -25,7 +25,6 @@ import AccessibleButton, { ButtonEvent } from '../elements/AccessibleButton'; import { MatrixClientPeg } from '../../../MatrixClientPeg'; import { _t } from "../../../languageHandler"; import MatrixClientContext from "../../../contexts/MatrixClientContext"; -import { replaceableComponent } from "../../../utils/replaceableComponent"; import Heading from '../typography/Heading'; import { IDialogProps } from "./IDialogProps"; import { PosthogScreenTracker, ScreenName } from "../../../PosthogTrackers"; @@ -81,7 +80,6 @@ interface IProps extends IDialogProps { * Includes a div for the title, and a keypress handler which cancels the * dialog on escape. */ -@replaceableComponent("views.dialogs.BaseDialog") export default class BaseDialog extends React.Component { private matrixClient: MatrixClient; diff --git a/src/components/views/dialogs/BugReportDialog.tsx b/src/components/views/dialogs/BugReportDialog.tsx index 2fa3f3b33f..eae2673521 100644 --- a/src/components/views/dialogs/BugReportDialog.tsx +++ b/src/components/views/dialogs/BugReportDialog.tsx @@ -24,7 +24,6 @@ import Modal from '../../../Modal'; import { _t } from '../../../languageHandler'; import sendBugReport, { downloadBugReport } from '../../../rageshake/submit-rageshake'; import AccessibleButton from "../elements/AccessibleButton"; -import { replaceableComponent } from "../../../utils/replaceableComponent"; import QuestionDialog from "./QuestionDialog"; import BaseDialog from "./BaseDialog"; import Field from '../elements/Field'; @@ -50,7 +49,6 @@ interface IState { downloadProgress: string; } -@replaceableComponent("views.dialogs.BugReportDialog") export default class BugReportDialog extends React.Component { private unmounted: boolean; diff --git a/src/components/views/dialogs/ConfirmAndWaitRedactDialog.tsx b/src/components/views/dialogs/ConfirmAndWaitRedactDialog.tsx index fbf603c44d..f56f4f6194 100644 --- a/src/components/views/dialogs/ConfirmAndWaitRedactDialog.tsx +++ b/src/components/views/dialogs/ConfirmAndWaitRedactDialog.tsx @@ -17,7 +17,6 @@ limitations under the License. import React from 'react'; import { _t } from '../../../languageHandler'; -import { replaceableComponent } from "../../../utils/replaceableComponent"; import ConfirmRedactDialog from './ConfirmRedactDialog'; import ErrorDialog from './ErrorDialog'; import BaseDialog from "./BaseDialog"; @@ -45,7 +44,6 @@ interface IState { * * To avoid this, we keep the dialog open as long as /redact is in progress. */ -@replaceableComponent("views.dialogs.ConfirmAndWaitRedactDialog") export default class ConfirmAndWaitRedactDialog extends React.PureComponent { constructor(props) { super(props); diff --git a/src/components/views/dialogs/ConfirmRedactDialog.tsx b/src/components/views/dialogs/ConfirmRedactDialog.tsx index 6839c0f7bd..9a9f3627d2 100644 --- a/src/components/views/dialogs/ConfirmRedactDialog.tsx +++ b/src/components/views/dialogs/ConfirmRedactDialog.tsx @@ -20,7 +20,6 @@ import React from 'react'; import { _t } from '../../../languageHandler'; import { MatrixClientPeg } from '../../../MatrixClientPeg'; import Modal from '../../../Modal'; -import { replaceableComponent } from "../../../utils/replaceableComponent"; import ErrorDialog from './ErrorDialog'; import TextInputDialog from "./TextInputDialog"; @@ -31,7 +30,6 @@ interface IProps { /* * A dialog for confirming a redaction. */ -@replaceableComponent("views.dialogs.ConfirmRedactDialog") export default class ConfirmRedactDialog extends React.Component { render() { return ( diff --git a/src/components/views/dialogs/ConfirmUserActionDialog.tsx b/src/components/views/dialogs/ConfirmUserActionDialog.tsx index c10ead0b72..8a41c8f2de 100644 --- a/src/components/views/dialogs/ConfirmUserActionDialog.tsx +++ b/src/components/views/dialogs/ConfirmUserActionDialog.tsx @@ -19,7 +19,6 @@ import { RoomMember } from "matrix-js-sdk/src/models/room-member"; import classNames from "classnames"; import { _t } from '../../../languageHandler'; -import { replaceableComponent } from "../../../utils/replaceableComponent"; import MemberAvatar from '../avatars/MemberAvatar'; import BaseDialog from "./BaseDialog"; import DialogButtons from "../elements/DialogButtons"; @@ -55,7 +54,6 @@ interface IState { * to make it obvious what is going to happen. * Also tweaks the style for 'dangerous' actions (albeit only with colour) */ -@replaceableComponent("views.dialogs.ConfirmUserActionDialog") export default class ConfirmUserActionDialog extends React.Component { static defaultProps = { danger: false, diff --git a/src/components/views/dialogs/ConfirmWipeDeviceDialog.tsx b/src/components/views/dialogs/ConfirmWipeDeviceDialog.tsx index 33e26ff7a7..a61b47c04f 100644 --- a/src/components/views/dialogs/ConfirmWipeDeviceDialog.tsx +++ b/src/components/views/dialogs/ConfirmWipeDeviceDialog.tsx @@ -17,7 +17,6 @@ limitations under the License. import React from 'react'; import { _t } from "../../../languageHandler"; -import { replaceableComponent } from "../../../utils/replaceableComponent"; import BaseDialog from "./BaseDialog"; import DialogButtons from "../elements/DialogButtons"; @@ -25,7 +24,6 @@ interface IProps { onFinished: (success: boolean) => void; } -@replaceableComponent("views.dialogs.ConfirmWipeDeviceDialog") export default class ConfirmWipeDeviceDialog extends React.Component { private onConfirm = (): void => { this.props.onFinished(true); diff --git a/src/components/views/dialogs/CreateRoomDialog.tsx b/src/components/views/dialogs/CreateRoomDialog.tsx index 4b7b0caa8f..da6d0212f3 100644 --- a/src/components/views/dialogs/CreateRoomDialog.tsx +++ b/src/components/views/dialogs/CreateRoomDialog.tsx @@ -26,7 +26,6 @@ import withValidation, { IFieldState } from '../elements/Validation'; import { _t } from '../../../languageHandler'; import { MatrixClientPeg } from '../../../MatrixClientPeg'; import { IOpts, privateShouldBeEncrypted } from "../../../createRoom"; -import { replaceableComponent } from "../../../utils/replaceableComponent"; import Heading from "../typography/Heading"; import Field from "../elements/Field"; import StyledRadioGroup from "../elements/StyledRadioGroup"; @@ -61,7 +60,6 @@ interface IState { canChangeEncryption: boolean; } -@replaceableComponent("views.dialogs.CreateRoomDialog") export default class CreateRoomDialog extends React.Component { private readonly supportsRestricted: boolean; private nameField = createRef(); diff --git a/src/components/views/dialogs/DeactivateAccountDialog.tsx b/src/components/views/dialogs/DeactivateAccountDialog.tsx index aece59ef84..bf2f636d5d 100644 --- a/src/components/views/dialogs/DeactivateAccountDialog.tsx +++ b/src/components/views/dialogs/DeactivateAccountDialog.tsx @@ -26,7 +26,6 @@ import { _t } from '../../../languageHandler'; import InteractiveAuth, { ERROR_USER_CANCELLED } from "../../structures/InteractiveAuth"; import { DEFAULT_PHASE, PasswordAuthEntry, SSOAuthEntry } from "../auth/InteractiveAuthEntryComponents"; import StyledCheckbox from "../elements/StyledCheckbox"; -import { replaceableComponent } from "../../../utils/replaceableComponent"; import BaseDialog from "./BaseDialog"; interface IProps { @@ -46,7 +45,6 @@ interface IState { continueKind: string; } -@replaceableComponent("views.dialogs.DeactivateAccountDialog") export default class DeactivateAccountDialog extends React.Component { constructor(props) { super(props); diff --git a/src/components/views/dialogs/ErrorDialog.tsx b/src/components/views/dialogs/ErrorDialog.tsx index e19d93f918..286124c6bf 100644 --- a/src/components/views/dialogs/ErrorDialog.tsx +++ b/src/components/views/dialogs/ErrorDialog.tsx @@ -28,7 +28,6 @@ limitations under the License. import React from 'react'; import { _t } from '../../../languageHandler'; -import { replaceableComponent } from "../../../utils/replaceableComponent"; import BaseDialog from "./BaseDialog"; interface IProps { @@ -44,7 +43,6 @@ interface IState { onFinished: (success: boolean) => void; } -@replaceableComponent("views.dialogs.ErrorDialog") export default class ErrorDialog extends React.Component { public static defaultProps = { focus: true, diff --git a/src/components/views/dialogs/HostSignupDialog.tsx b/src/components/views/dialogs/HostSignupDialog.tsx index 5f82ba8086..91c29c68d1 100644 --- a/src/components/views/dialogs/HostSignupDialog.tsx +++ b/src/components/views/dialogs/HostSignupDialog.tsx @@ -32,7 +32,6 @@ import { IPostmessageResponseData, PostmessageAction, } from "./HostSignupDialogTypes"; -import { replaceableComponent } from "../../../utils/replaceableComponent"; import { IConfigOptions } from "../../../IConfigOptions"; import { SnakedObject } from "../../../utils/SnakedObject"; @@ -46,7 +45,6 @@ interface IState { minimized: boolean; } -@replaceableComponent("views.dialogs.HostSignupDialog") export default class HostSignupDialog extends React.PureComponent { private iframeRef: React.RefObject = React.createRef(); private readonly config: SnakedObject; diff --git a/src/components/views/dialogs/IncomingSasDialog.tsx b/src/components/views/dialogs/IncomingSasDialog.tsx index d856412c67..2b15749c8d 100644 --- a/src/components/views/dialogs/IncomingSasDialog.tsx +++ b/src/components/views/dialogs/IncomingSasDialog.tsx @@ -21,7 +21,6 @@ import { logger } from "matrix-js-sdk/src/logger"; import { MatrixClientPeg } from '../../../MatrixClientPeg'; import { _t } from '../../../languageHandler'; -import { replaceableComponent } from "../../../utils/replaceableComponent"; import { mediaFromMxc } from "../../../customisations/Media"; import VerificationComplete from "../verification/VerificationComplete"; import VerificationCancelled from "../verification/VerificationCancelled"; @@ -54,7 +53,6 @@ interface IState { sas: IGeneratedSas; } -@replaceableComponent("views.dialogs.IncomingSasDialog") export default class IncomingSasDialog extends React.Component { private showSasEvent: ISasEvent; diff --git a/src/components/views/dialogs/IntegrationsDisabledDialog.tsx b/src/components/views/dialogs/IntegrationsDisabledDialog.tsx index d5c08211da..a48d808fed 100644 --- a/src/components/views/dialogs/IntegrationsDisabledDialog.tsx +++ b/src/components/views/dialogs/IntegrationsDisabledDialog.tsx @@ -19,14 +19,12 @@ import React from 'react'; import { _t } from "../../../languageHandler"; import dis from '../../../dispatcher/dispatcher'; import { Action } from "../../../dispatcher/actions"; -import { replaceableComponent } from "../../../utils/replaceableComponent"; import BaseDialog from "./BaseDialog"; import DialogButtons from "../elements/DialogButtons"; import { IDialogProps } from "./IDialogProps"; interface IProps extends IDialogProps {} -@replaceableComponent("views.dialogs.IntegrationsDisabledDialog") export default class IntegrationsDisabledDialog extends React.Component { private onAcknowledgeClick = (): void => { this.props.onFinished(); diff --git a/src/components/views/dialogs/IntegrationsImpossibleDialog.tsx b/src/components/views/dialogs/IntegrationsImpossibleDialog.tsx index 0e7db93c53..73c7fbc629 100644 --- a/src/components/views/dialogs/IntegrationsImpossibleDialog.tsx +++ b/src/components/views/dialogs/IntegrationsImpossibleDialog.tsx @@ -18,14 +18,12 @@ import React from 'react'; import { _t } from "../../../languageHandler"; import SdkConfig from "../../../SdkConfig"; -import { replaceableComponent } from "../../../utils/replaceableComponent"; import { IDialogProps } from "./IDialogProps"; import BaseDialog from "./BaseDialog"; import DialogButtons from "../elements/DialogButtons"; interface IProps extends IDialogProps {} -@replaceableComponent("views.dialogs.IntegrationsImpossibleDialog") export default class IntegrationsImpossibleDialog extends React.Component { private onAcknowledgeClick = (): void => { this.props.onFinished(); diff --git a/src/components/views/dialogs/InteractiveAuthDialog.tsx b/src/components/views/dialogs/InteractiveAuthDialog.tsx index c6a7d414bf..46bad5fd0e 100644 --- a/src/components/views/dialogs/InteractiveAuthDialog.tsx +++ b/src/components/views/dialogs/InteractiveAuthDialog.tsx @@ -24,7 +24,6 @@ import { _t } from '../../../languageHandler'; import AccessibleButton from '../elements/AccessibleButton'; import InteractiveAuth, { ERROR_USER_CANCELLED } from "../../structures/InteractiveAuth"; import { SSOAuthEntry } from "../auth/InteractiveAuthEntryComponents"; -import { replaceableComponent } from "../../../utils/replaceableComponent"; import BaseDialog from "./BaseDialog"; import { IDialogProps } from "./IDialogProps"; @@ -83,7 +82,6 @@ interface IState { uiaStagePhase: number | string; } -@replaceableComponent("views.dialogs.InteractiveAuthDialog") export default class InteractiveAuthDialog extends React.Component { constructor(props: IProps) { super(props); diff --git a/src/components/views/dialogs/InviteDialog.tsx b/src/components/views/dialogs/InviteDialog.tsx index 36b2bd54e2..cf58a372ba 100644 --- a/src/components/views/dialogs/InviteDialog.tsx +++ b/src/components/views/dialogs/InviteDialog.tsx @@ -49,7 +49,6 @@ import { DefaultTagID } from "../../../stores/room-list/models"; import RoomListStore from "../../../stores/room-list/RoomListStore"; import SettingsStore from "../../../settings/SettingsStore"; import { UIFeature } from "../../../settings/UIFeature"; -import { replaceableComponent } from "../../../utils/replaceableComponent"; import { mediaFromMxc } from "../../../customisations/Media"; import { getAddressType } from "../../../UserAddress"; import BaseAvatar from '../avatars/BaseAvatar'; @@ -387,7 +386,6 @@ interface IInviteDialogState { errorText: string; } -@replaceableComponent("views.dialogs.InviteDialog") export default class InviteDialog extends React.PureComponent { static defaultProps = { kind: KIND_DM, diff --git a/src/components/views/dialogs/LogoutDialog.tsx b/src/components/views/dialogs/LogoutDialog.tsx index cca6935258..4131d7d455 100644 --- a/src/components/views/dialogs/LogoutDialog.tsx +++ b/src/components/views/dialogs/LogoutDialog.tsx @@ -24,7 +24,6 @@ import dis from '../../../dispatcher/dispatcher'; import { _t } from '../../../languageHandler'; import { MatrixClientPeg } from '../../../MatrixClientPeg'; import RestoreKeyBackupDialog from './security/RestoreKeyBackupDialog'; -import { replaceableComponent } from "../../../utils/replaceableComponent"; import QuestionDialog from "./QuestionDialog"; import BaseDialog from "./BaseDialog"; import Spinner from "../elements/Spinner"; @@ -41,7 +40,6 @@ interface IState { error?: string; } -@replaceableComponent("views.dialogs.LogoutDialog") export default class LogoutDialog extends React.Component { static defaultProps = { onFinished: function() {}, diff --git a/src/components/views/dialogs/ManualDeviceKeyVerificationDialog.tsx b/src/components/views/dialogs/ManualDeviceKeyVerificationDialog.tsx index 6b94eb9c7a..ef5a40a8b0 100644 --- a/src/components/views/dialogs/ManualDeviceKeyVerificationDialog.tsx +++ b/src/components/views/dialogs/ManualDeviceKeyVerificationDialog.tsx @@ -24,7 +24,6 @@ import { DeviceInfo } from "matrix-js-sdk/src/crypto/deviceinfo"; import { MatrixClientPeg } from '../../../MatrixClientPeg'; import * as FormattingUtils from '../../../utils/FormattingUtils'; import { _t } from '../../../languageHandler'; -import { replaceableComponent } from "../../../utils/replaceableComponent"; import QuestionDialog from "./QuestionDialog"; import { IDialogProps } from "./IDialogProps"; @@ -33,7 +32,6 @@ interface IProps extends IDialogProps { device: DeviceInfo; } -@replaceableComponent("views.dialogs.ManualDeviceKeyVerificationDialog") export default class ManualDeviceKeyVerificationDialog extends React.Component { private onLegacyFinished = (confirm: boolean): void => { if (confirm) { diff --git a/src/components/views/dialogs/MessageEditHistoryDialog.tsx b/src/components/views/dialogs/MessageEditHistoryDialog.tsx index 2a9e02cc04..2dedfb5293 100644 --- a/src/components/views/dialogs/MessageEditHistoryDialog.tsx +++ b/src/components/views/dialogs/MessageEditHistoryDialog.tsx @@ -25,7 +25,6 @@ import { MatrixClientPeg } from "../../../MatrixClientPeg"; import { _t } from '../../../languageHandler'; import { wantsDateSeparator } from '../../../DateUtils'; import SettingsStore from '../../../settings/SettingsStore'; -import { replaceableComponent } from "../../../utils/replaceableComponent"; import BaseDialog from "./BaseDialog"; import ScrollPanel from "../../structures/ScrollPanel"; import Spinner from "../elements/Spinner"; @@ -48,7 +47,6 @@ interface IState { isTwelveHour: boolean; } -@replaceableComponent("views.dialogs.MessageEditHistoryDialog") export default class MessageEditHistoryDialog extends React.PureComponent { constructor(props: IProps) { super(props); diff --git a/src/components/views/dialogs/ModalWidgetDialog.tsx b/src/components/views/dialogs/ModalWidgetDialog.tsx index 95e873cada..84564c22cf 100644 --- a/src/components/views/dialogs/ModalWidgetDialog.tsx +++ b/src/components/views/dialogs/ModalWidgetDialog.tsx @@ -39,7 +39,6 @@ import { MatrixClientPeg } from "../../../MatrixClientPeg"; import { OwnProfileStore } from "../../../stores/OwnProfileStore"; import { arrayFastClone } from "../../../utils/arrays"; import { ElementWidget } from "../../../stores/widgets/StopGapWidget"; -import { replaceableComponent } from "../../../utils/replaceableComponent"; import { ELEMENT_CLIENT_ID } from "../../../identifiers"; import SettingsStore from "../../../settings/SettingsStore"; @@ -57,7 +56,6 @@ interface IState { const MAX_BUTTONS = 3; -@replaceableComponent("views.dialogs.ModalWidgetDialog") export default class ModalWidgetDialog extends React.PureComponent { private readonly widget: Widget; private readonly possibleButtons: ModalButtonID[]; diff --git a/src/components/views/dialogs/ReportEventDialog.tsx b/src/components/views/dialogs/ReportEventDialog.tsx index af09e55ee6..94102f7b12 100644 --- a/src/components/views/dialogs/ReportEventDialog.tsx +++ b/src/components/views/dialogs/ReportEventDialog.tsx @@ -23,7 +23,6 @@ import { IDialogProps } from "./IDialogProps"; import { MatrixClientPeg } from "../../../MatrixClientPeg"; import SdkConfig from '../../../SdkConfig'; import Markdown from '../../../Markdown'; -import { replaceableComponent } from "../../../utils/replaceableComponent"; import SettingsStore from "../../../settings/SettingsStore"; import StyledRadioButton from "../elements/StyledRadioButton"; import BaseDialog from "./BaseDialog"; @@ -89,7 +88,6 @@ type Moderation = { * a well-formed state event `m.room.moderation.moderated_by` * /`org.matrix.msc3215.room.moderation.moderated_by`? */ -@replaceableComponent("views.dialogs.ReportEventDialog") export default class ReportEventDialog extends React.Component { // If the room supports moderation, the moderation information. private moderation?: Moderation; diff --git a/src/components/views/dialogs/RoomSettingsDialog.tsx b/src/components/views/dialogs/RoomSettingsDialog.tsx index 3806e9288c..ce8d24cd3f 100644 --- a/src/components/views/dialogs/RoomSettingsDialog.tsx +++ b/src/components/views/dialogs/RoomSettingsDialog.tsx @@ -30,7 +30,6 @@ import { MatrixClientPeg } from "../../../MatrixClientPeg"; import dis from "../../../dispatcher/dispatcher"; import SettingsStore from "../../../settings/SettingsStore"; import { UIFeature } from "../../../settings/UIFeature"; -import { replaceableComponent } from "../../../utils/replaceableComponent"; import BaseDialog from "./BaseDialog"; import { Action } from '../../../dispatcher/actions'; @@ -51,7 +50,6 @@ interface IState { roomName: string; } -@replaceableComponent("views.dialogs.RoomSettingsDialog") export default class RoomSettingsDialog extends React.Component { private dispatcherRef: string; diff --git a/src/components/views/dialogs/RoomUpgradeDialog.tsx b/src/components/views/dialogs/RoomUpgradeDialog.tsx index bcca0e3829..8ff2181d75 100644 --- a/src/components/views/dialogs/RoomUpgradeDialog.tsx +++ b/src/components/views/dialogs/RoomUpgradeDialog.tsx @@ -19,7 +19,6 @@ import { Room } from "matrix-js-sdk/src/models/room"; import Modal from '../../../Modal'; import { _t } from '../../../languageHandler'; -import { replaceableComponent } from "../../../utils/replaceableComponent"; import { upgradeRoom } from "../../../utils/RoomUpgrade"; import { IDialogProps } from "./IDialogProps"; import BaseDialog from "./BaseDialog"; @@ -35,7 +34,6 @@ interface IState { busy: boolean; } -@replaceableComponent("views.dialogs.RoomUpgradeDialog") export default class RoomUpgradeDialog extends React.Component { private targetVersion: string; diff --git a/src/components/views/dialogs/RoomUpgradeWarningDialog.tsx b/src/components/views/dialogs/RoomUpgradeWarningDialog.tsx index 0da8fb97d3..a34674ff63 100644 --- a/src/components/views/dialogs/RoomUpgradeWarningDialog.tsx +++ b/src/components/views/dialogs/RoomUpgradeWarningDialog.tsx @@ -23,7 +23,6 @@ import SdkConfig from "../../../SdkConfig"; import LabelledToggleSwitch from "../elements/LabelledToggleSwitch"; import { MatrixClientPeg } from "../../../MatrixClientPeg"; import Modal from "../../../Modal"; -import { replaceableComponent } from "../../../utils/replaceableComponent"; import { IDialogProps } from "./IDialogProps"; import BugReportDialog from './BugReportDialog'; import BaseDialog from "./BaseDialog"; @@ -50,7 +49,6 @@ interface IState { total?: number; } -@replaceableComponent("views.dialogs.RoomUpgradeWarningDialog") export default class RoomUpgradeWarningDialog extends React.Component { private readonly isPrivate: boolean; private readonly currentVersion: string; diff --git a/src/components/views/dialogs/ServerOfflineDialog.tsx b/src/components/views/dialogs/ServerOfflineDialog.tsx index 6cf07f6bd6..de068d9a79 100644 --- a/src/components/views/dialogs/ServerOfflineDialog.tsx +++ b/src/components/views/dialogs/ServerOfflineDialog.tsx @@ -29,12 +29,10 @@ import AccessibleButton from "../elements/AccessibleButton"; import { UPDATE_EVENT } from "../../../stores/AsyncStore"; import { MatrixClientPeg } from "../../../MatrixClientPeg"; import { IDialogProps } from "./IDialogProps"; -import { replaceableComponent } from "../../../utils/replaceableComponent"; interface IProps extends IDialogProps { } -@replaceableComponent("views.dialogs.ServerOfflineDialog") export default class ServerOfflineDialog extends React.PureComponent { public componentDidMount() { EchoStore.instance.on(UPDATE_EVENT, this.onEchosUpdated); diff --git a/src/components/views/dialogs/ServerPickerDialog.tsx b/src/components/views/dialogs/ServerPickerDialog.tsx index b1433978dd..0761bb6b9d 100644 --- a/src/components/views/dialogs/ServerPickerDialog.tsx +++ b/src/components/views/dialogs/ServerPickerDialog.tsx @@ -27,7 +27,6 @@ import Field from "../elements/Field"; import StyledRadioButton from "../elements/StyledRadioButton"; import TextWithTooltip from "../elements/TextWithTooltip"; import withValidation, { IFieldState } from "../elements/Validation"; -import { replaceableComponent } from "../../../utils/replaceableComponent"; interface IProps { title?: string; @@ -40,7 +39,6 @@ interface IState { otherHomeserver: string; } -@replaceableComponent("views.dialogs.ServerPickerDialog") export default class ServerPickerDialog extends React.PureComponent { private readonly defaultServer: ValidatedServerConfig; private readonly fieldRef = createRef(); diff --git a/src/components/views/dialogs/SeshatResetDialog.tsx b/src/components/views/dialogs/SeshatResetDialog.tsx index 1c048dd9fa..369106188b 100644 --- a/src/components/views/dialogs/SeshatResetDialog.tsx +++ b/src/components/views/dialogs/SeshatResetDialog.tsx @@ -17,12 +17,10 @@ limitations under the License. import React from 'react'; import { _t } from "../../../languageHandler"; -import { replaceableComponent } from "../../../utils/replaceableComponent"; import BaseDialog from "./BaseDialog"; import DialogButtons from "../elements/DialogButtons"; import { IDialogProps } from "./IDialogProps"; -@replaceableComponent("views.dialogs.SeshatResetDialog") export default class SeshatResetDialog extends React.PureComponent { render() { return ( diff --git a/src/components/views/dialogs/SessionRestoreErrorDialog.tsx b/src/components/views/dialogs/SessionRestoreErrorDialog.tsx index ad0c8e939a..72b35671ba 100644 --- a/src/components/views/dialogs/SessionRestoreErrorDialog.tsx +++ b/src/components/views/dialogs/SessionRestoreErrorDialog.tsx @@ -21,7 +21,6 @@ import React from 'react'; import SdkConfig from '../../../SdkConfig'; import Modal from '../../../Modal'; import { _t } from '../../../languageHandler'; -import { replaceableComponent } from "../../../utils/replaceableComponent"; import QuestionDialog from "./QuestionDialog"; import BugReportDialog from "./BugReportDialog"; import BaseDialog from "./BaseDialog"; @@ -32,7 +31,6 @@ interface IProps extends IDialogProps { error: Error; } -@replaceableComponent("views.dialogs.SessionRestoreErrorDialog") export default class SessionRestoreErrorDialog extends React.Component { private sendBugReport = (): void => { Modal.createTrackedDialog('Session Restore Error', 'Send Bug Report Dialog', BugReportDialog, { diff --git a/src/components/views/dialogs/SetEmailDialog.tsx b/src/components/views/dialogs/SetEmailDialog.tsx index 6e5f0cf050..773f56db02 100644 --- a/src/components/views/dialogs/SetEmailDialog.tsx +++ b/src/components/views/dialogs/SetEmailDialog.tsx @@ -22,7 +22,6 @@ import * as Email from '../../../email'; import AddThreepid from '../../../AddThreepid'; import { _t } from '../../../languageHandler'; import Modal from '../../../Modal'; -import { replaceableComponent } from "../../../utils/replaceableComponent"; import Spinner from "../elements/Spinner"; import ErrorDialog from "./ErrorDialog"; import QuestionDialog from "./QuestionDialog"; @@ -44,7 +43,6 @@ interface IState { * * On success, `onFinished(true)` is called. */ -@replaceableComponent("views.dialogs.SetEmailDialog") export default class SetEmailDialog extends React.Component { private addThreepid: AddThreepid; diff --git a/src/components/views/dialogs/ShareDialog.tsx b/src/components/views/dialogs/ShareDialog.tsx index a411c18571..cb06d09d80 100644 --- a/src/components/views/dialogs/ShareDialog.tsx +++ b/src/components/views/dialogs/ShareDialog.tsx @@ -29,7 +29,6 @@ import StyledCheckbox from '../elements/StyledCheckbox'; import { IDialogProps } from "./IDialogProps"; import SettingsStore from "../../../settings/SettingsStore"; import { UIFeature } from "../../../settings/UIFeature"; -import { replaceableComponent } from "../../../utils/replaceableComponent"; import BaseDialog from "./BaseDialog"; import CopyableText from "../elements/CopyableText"; @@ -71,7 +70,6 @@ interface IState { permalinkCreator: RoomPermalinkCreator; } -@replaceableComponent("views.dialogs.ShareDialog") export default class ShareDialog extends React.PureComponent { protected closeCopiedTooltip: () => void; diff --git a/src/components/views/dialogs/StorageEvictedDialog.tsx b/src/components/views/dialogs/StorageEvictedDialog.tsx index acbb62b43d..cd01fef2b8 100644 --- a/src/components/views/dialogs/StorageEvictedDialog.tsx +++ b/src/components/views/dialogs/StorageEvictedDialog.tsx @@ -19,7 +19,6 @@ import React from 'react'; import SdkConfig from '../../../SdkConfig'; import Modal from '../../../Modal'; import { _t } from '../../../languageHandler'; -import { replaceableComponent } from "../../../utils/replaceableComponent"; import BaseDialog from "./BaseDialog"; import DialogButtons from "../elements/DialogButtons"; import BugReportDialog from "./BugReportDialog"; @@ -28,7 +27,6 @@ import AccessibleButton from '../elements/AccessibleButton'; interface IProps extends IDialogProps { } -@replaceableComponent("views.dialogs.StorageEvictedDialog") export default class StorageEvictedDialog extends React.Component { private sendBugReport = (ev: React.MouseEvent): void => { ev.preventDefault(); diff --git a/src/components/views/dialogs/TabbedIntegrationManagerDialog.tsx b/src/components/views/dialogs/TabbedIntegrationManagerDialog.tsx index 7ab425a5f6..5a5d6e3822 100644 --- a/src/components/views/dialogs/TabbedIntegrationManagerDialog.tsx +++ b/src/components/views/dialogs/TabbedIntegrationManagerDialog.tsx @@ -22,7 +22,6 @@ import { logger } from "matrix-js-sdk/src/logger"; import { IntegrationManagers } from "../../../integrations/IntegrationManagers"; import { dialogTermsInteractionCallback, TermsNotSignedError } from "../../../Terms"; import * as ScalarMessaging from "../../../ScalarMessaging"; -import { replaceableComponent } from "../../../utils/replaceableComponent"; import { IntegrationManagerInstance } from "../../../integrations/IntegrationManagerInstance"; import ScalarAuthClient from "../../../ScalarAuthClient"; import AccessibleButton from "../elements/AccessibleButton"; @@ -55,7 +54,6 @@ interface IState { currentScalarClient: ScalarAuthClient; } -@replaceableComponent("views.dialogs.TabbedIntegrationManagerDialog") export default class TabbedIntegrationManagerDialog extends React.Component { constructor(props: IProps) { super(props); diff --git a/src/components/views/dialogs/TermsDialog.tsx b/src/components/views/dialogs/TermsDialog.tsx index f2f713a75f..aa3825ab3d 100644 --- a/src/components/views/dialogs/TermsDialog.tsx +++ b/src/components/views/dialogs/TermsDialog.tsx @@ -19,7 +19,6 @@ import React from 'react'; import { SERVICE_TYPES } from "matrix-js-sdk/src/service-types"; import { _t, pickBestLanguage } from '../../../languageHandler'; -import { replaceableComponent } from "../../../utils/replaceableComponent"; import DialogButtons from "../elements/DialogButtons"; import BaseDialog from "./BaseDialog"; @@ -66,7 +65,6 @@ interface IState { agreedUrls: any; } -@replaceableComponent("views.dialogs.TermsDialog") export default class TermsDialog extends React.PureComponent { constructor(props) { super(props); diff --git a/src/components/views/dialogs/TextInputDialog.tsx b/src/components/views/dialogs/TextInputDialog.tsx index 2667c131b9..7a13fd3d45 100644 --- a/src/components/views/dialogs/TextInputDialog.tsx +++ b/src/components/views/dialogs/TextInputDialog.tsx @@ -18,7 +18,6 @@ import React, { ChangeEvent, createRef } from 'react'; import Field from "../elements/Field"; import { _t, _td } from '../../../languageHandler'; -import { replaceableComponent } from "../../../utils/replaceableComponent"; import { IFieldState, IValidationResult } from "../elements/Validation"; import BaseDialog from "./BaseDialog"; import DialogButtons from "../elements/DialogButtons"; @@ -43,7 +42,6 @@ interface IState { valid: boolean; } -@replaceableComponent("views.dialogs.TextInputDialog") export default class TextInputDialog extends React.Component { private field = createRef(); diff --git a/src/components/views/dialogs/UploadConfirmDialog.tsx b/src/components/views/dialogs/UploadConfirmDialog.tsx index 0b6c4d0add..c705da1ac3 100644 --- a/src/components/views/dialogs/UploadConfirmDialog.tsx +++ b/src/components/views/dialogs/UploadConfirmDialog.tsx @@ -19,7 +19,6 @@ import React from 'react'; import filesize from "filesize"; import { _t } from '../../../languageHandler'; -import { replaceableComponent } from "../../../utils/replaceableComponent"; import { getBlobSafeMimeType } from '../../../utils/blobs'; import BaseDialog from "./BaseDialog"; import DialogButtons from "../elements/DialogButtons"; @@ -31,7 +30,6 @@ interface IProps { onFinished: (uploadConfirmed: boolean, uploadAll?: boolean) => void; } -@replaceableComponent("views.dialogs.UploadConfirmDialog") export default class UploadConfirmDialog extends React.Component { private readonly objectUrl: string; private readonly mimeType: string; diff --git a/src/components/views/dialogs/UploadFailureDialog.tsx b/src/components/views/dialogs/UploadFailureDialog.tsx index 8226a82170..8a25671ea0 100644 --- a/src/components/views/dialogs/UploadFailureDialog.tsx +++ b/src/components/views/dialogs/UploadFailureDialog.tsx @@ -19,7 +19,6 @@ import React from 'react'; import { _t } from '../../../languageHandler'; import ContentMessages from '../../../ContentMessages'; -import { replaceableComponent } from "../../../utils/replaceableComponent"; import BaseDialog from "./BaseDialog"; import DialogButtons from "../elements/DialogButtons"; import { IDialogProps } from "./IDialogProps"; @@ -35,7 +34,6 @@ interface IProps extends IDialogProps { * them. This is named fairly generically but the only thing we check right now is * the size of the file. */ -@replaceableComponent("views.dialogs.UploadFailureDialog") export default class UploadFailureDialog extends React.Component { private onCancelClick = (): void => { this.props.onFinished(false); diff --git a/src/components/views/dialogs/UserSettingsDialog.tsx b/src/components/views/dialogs/UserSettingsDialog.tsx index ab25f689f2..a170b71929 100644 --- a/src/components/views/dialogs/UserSettingsDialog.tsx +++ b/src/components/views/dialogs/UserSettingsDialog.tsx @@ -31,7 +31,6 @@ import HelpUserSettingsTab from "../settings/tabs/user/HelpUserSettingsTab"; import SdkConfig from "../../../SdkConfig"; import MjolnirUserSettingsTab from "../settings/tabs/user/MjolnirUserSettingsTab"; import { UIFeature } from "../../../settings/UIFeature"; -import { replaceableComponent } from "../../../utils/replaceableComponent"; import BaseDialog from "./BaseDialog"; import { IDialogProps } from "./IDialogProps"; import SidebarUserSettingsTab from "../settings/tabs/user/SidebarUserSettingsTab"; @@ -59,7 +58,6 @@ interface IState { mjolnirEnabled: boolean; } -@replaceableComponent("views.dialogs.UserSettingsDialog") export default class UserSettingsDialog extends React.Component { private mjolnirWatcher: string; diff --git a/src/components/views/dialogs/VerificationRequestDialog.tsx b/src/components/views/dialogs/VerificationRequestDialog.tsx index f73cda91f4..8830ee29f7 100644 --- a/src/components/views/dialogs/VerificationRequestDialog.tsx +++ b/src/components/views/dialogs/VerificationRequestDialog.tsx @@ -20,7 +20,6 @@ import { User } from 'matrix-js-sdk/src/models/user'; import { MatrixClientPeg } from '../../../MatrixClientPeg'; import { _t } from '../../../languageHandler'; -import { replaceableComponent } from "../../../utils/replaceableComponent"; import BaseDialog from "./BaseDialog"; import EncryptionPanel from "../right_panel/EncryptionPanel"; @@ -35,7 +34,6 @@ interface IState { verificationRequest: VerificationRequest; } -@replaceableComponent("views.dialogs.VerificationRequestDialog") export default class VerificationRequestDialog extends React.Component { constructor(props) { super(props); diff --git a/src/components/views/dialogs/WidgetCapabilitiesPromptDialog.tsx b/src/components/views/dialogs/WidgetCapabilitiesPromptDialog.tsx index b794592b2f..17be7d4150 100644 --- a/src/components/views/dialogs/WidgetCapabilitiesPromptDialog.tsx +++ b/src/components/views/dialogs/WidgetCapabilitiesPromptDialog.tsx @@ -32,7 +32,6 @@ import StyledCheckbox from "../elements/StyledCheckbox"; import DialogButtons from "../elements/DialogButtons"; import LabelledToggleSwitch from "../elements/LabelledToggleSwitch"; import { CapabilityText } from "../../../widgets/CapabilityText"; -import { replaceableComponent } from "../../../utils/replaceableComponent"; interface IProps extends IDialogProps { requestedCapabilities: Set; @@ -50,7 +49,6 @@ interface IState { rememberSelection: boolean; } -@replaceableComponent("views.dialogs.WidgetCapabilitiesPromptDialog") export default class WidgetCapabilitiesPromptDialog extends React.PureComponent { private eventPermissionsMap = new Map(); diff --git a/src/components/views/dialogs/WidgetOpenIDPermissionsDialog.tsx b/src/components/views/dialogs/WidgetOpenIDPermissionsDialog.tsx index 4faf4e5237..68c2991ed8 100644 --- a/src/components/views/dialogs/WidgetOpenIDPermissionsDialog.tsx +++ b/src/components/views/dialogs/WidgetOpenIDPermissionsDialog.tsx @@ -22,7 +22,6 @@ import { logger } from "matrix-js-sdk/src/logger"; import { _t } from "../../../languageHandler"; import LabelledToggleSwitch from "../elements/LabelledToggleSwitch"; import { OIDCState, WidgetPermissionStore } from "../../../stores/widgets/WidgetPermissionStore"; -import { replaceableComponent } from "../../../utils/replaceableComponent"; import { IDialogProps } from "./IDialogProps"; import BaseDialog from "./BaseDialog"; import DialogButtons from "../elements/DialogButtons"; @@ -37,7 +36,6 @@ interface IState { rememberSelection: boolean; } -@replaceableComponent("views.dialogs.WidgetOpenIDPermissionsDialog") export default class WidgetOpenIDPermissionsDialog extends React.PureComponent { constructor(props: IProps) { super(props); diff --git a/src/components/views/dialogs/security/ConfirmDestroyCrossSigningDialog.tsx b/src/components/views/dialogs/security/ConfirmDestroyCrossSigningDialog.tsx index 3496d00fea..e5d2aee926 100644 --- a/src/components/views/dialogs/security/ConfirmDestroyCrossSigningDialog.tsx +++ b/src/components/views/dialogs/security/ConfirmDestroyCrossSigningDialog.tsx @@ -17,7 +17,6 @@ limitations under the License. import React from 'react'; import { _t } from "../../../../languageHandler"; -import { replaceableComponent } from "../../../../utils/replaceableComponent"; import BaseDialog from "../BaseDialog"; import DialogButtons from "../../elements/DialogButtons"; @@ -25,7 +24,6 @@ interface IProps { onFinished: (success: boolean) => void; } -@replaceableComponent("views.dialogs.security.ConfirmDestroyCrossSigningDialog") export default class ConfirmDestroyCrossSigningDialog extends React.Component { private onConfirm = (): void => { this.props.onFinished(true); diff --git a/src/components/views/dialogs/security/CreateCrossSigningDialog.tsx b/src/components/views/dialogs/security/CreateCrossSigningDialog.tsx index f60f8a9c19..ca5b1db9fb 100644 --- a/src/components/views/dialogs/security/CreateCrossSigningDialog.tsx +++ b/src/components/views/dialogs/security/CreateCrossSigningDialog.tsx @@ -27,7 +27,6 @@ import DialogButtons from '../../elements/DialogButtons'; import BaseDialog from '../BaseDialog'; import Spinner from '../../elements/Spinner'; import InteractiveAuthDialog from '../InteractiveAuthDialog'; -import { replaceableComponent } from "../../../../utils/replaceableComponent"; interface IProps { accountPassword?: string; @@ -46,7 +45,6 @@ interface IState { * cases, only a spinner is shown, but for more complex auth like SSO, the user * may need to complete some steps to proceed. */ -@replaceableComponent("views.dialogs.security.CreateCrossSigningDialog") export default class CreateCrossSigningDialog extends React.PureComponent { constructor(props: IProps) { super(props); diff --git a/src/components/views/dialogs/security/SetupEncryptionDialog.tsx b/src/components/views/dialogs/security/SetupEncryptionDialog.tsx index 965924bf1f..1a94540502 100644 --- a/src/components/views/dialogs/security/SetupEncryptionDialog.tsx +++ b/src/components/views/dialogs/security/SetupEncryptionDialog.tsx @@ -20,7 +20,6 @@ import SetupEncryptionBody from '../../../structures/auth/SetupEncryptionBody'; import BaseDialog from '../BaseDialog'; import { _t } from '../../../../languageHandler'; import { SetupEncryptionStore, Phase } from '../../../../stores/SetupEncryptionStore'; -import { replaceableComponent } from "../../../../utils/replaceableComponent"; import { IDialogProps } from "../IDialogProps"; function iconFromPhase(phase: Phase) { @@ -36,7 +35,6 @@ interface IState { icon: string; } -@replaceableComponent("views.dialogs.security.SetupEncryptionDialog") export default class SetupEncryptionDialog extends React.Component { private store: SetupEncryptionStore; diff --git a/src/components/views/elements/AccessibleTooltipButton.tsx b/src/components/views/elements/AccessibleTooltipButton.tsx index be3bbcfdb9..d7a001460e 100644 --- a/src/components/views/elements/AccessibleTooltipButton.tsx +++ b/src/components/views/elements/AccessibleTooltipButton.tsx @@ -19,7 +19,6 @@ import React, { SyntheticEvent } from 'react'; import AccessibleButton from "./AccessibleButton"; import Tooltip, { Alignment } from './Tooltip'; -import { replaceableComponent } from "../../../utils/replaceableComponent"; interface IProps extends React.ComponentProps { title: string; @@ -36,7 +35,6 @@ interface IState { hover: boolean; } -@replaceableComponent("views.elements.AccessibleTooltipButton") export default class AccessibleTooltipButton extends React.PureComponent { constructor(props: IProps) { super(props); diff --git a/src/components/views/elements/ActionButton.tsx b/src/components/views/elements/ActionButton.tsx index 9b1484918f..9d8038f99e 100644 --- a/src/components/views/elements/ActionButton.tsx +++ b/src/components/views/elements/ActionButton.tsx @@ -19,7 +19,6 @@ import React from 'react'; import AccessibleButton from './AccessibleButton'; import dis from '../../../dispatcher/dispatcher'; import Analytics from '../../../Analytics'; -import { replaceableComponent } from "../../../utils/replaceableComponent"; import Tooltip from './Tooltip'; interface IProps { @@ -37,7 +36,6 @@ interface IState { showTooltip: boolean; } -@replaceableComponent("views.elements.ActionButton") export default class ActionButton extends React.Component { static defaultProps: Partial = { size: "25", diff --git a/src/components/views/elements/AddressSelector.tsx b/src/components/views/elements/AddressSelector.tsx index f1203fbee5..a084e69098 100644 --- a/src/components/views/elements/AddressSelector.tsx +++ b/src/components/views/elements/AddressSelector.tsx @@ -18,7 +18,6 @@ limitations under the License. import React, { createRef } from 'react'; import classNames from 'classnames'; -import { replaceableComponent } from "../../../utils/replaceableComponent"; import { IUserAddress } from '../../../UserAddress'; import AddressTile from './AddressTile'; @@ -41,7 +40,6 @@ interface IState { hover: boolean; } -@replaceableComponent("views.elements.AddressSelector") export default class AddressSelector extends React.Component { private scrollElement = createRef(); private addressListElement = createRef(); diff --git a/src/components/views/elements/AddressTile.tsx b/src/components/views/elements/AddressTile.tsx index d8738e69f3..8aafa0381b 100644 --- a/src/components/views/elements/AddressTile.tsx +++ b/src/components/views/elements/AddressTile.tsx @@ -19,7 +19,6 @@ import React from 'react'; import classNames from 'classnames'; import { _t } from '../../../languageHandler'; -import { replaceableComponent } from "../../../utils/replaceableComponent"; import { mediaFromMxc } from "../../../customisations/Media"; import { IUserAddress } from '../../../UserAddress'; import BaseAvatar from '../avatars/BaseAvatar'; @@ -33,7 +32,6 @@ interface IProps { showAddress?: boolean; } -@replaceableComponent("views.elements.AddressTile") export default class AddressTile extends React.Component { static defaultProps: Partial = { canDismiss: false, diff --git a/src/components/views/elements/AppPermission.tsx b/src/components/views/elements/AppPermission.tsx index 11bbd6204d..fd53981bca 100644 --- a/src/components/views/elements/AppPermission.tsx +++ b/src/components/views/elements/AppPermission.tsx @@ -24,7 +24,6 @@ import { _t } from '../../../languageHandler'; import SdkConfig from '../../../SdkConfig'; import WidgetUtils from "../../../utils/WidgetUtils"; import { MatrixClientPeg } from "../../../MatrixClientPeg"; -import { replaceableComponent } from "../../../utils/replaceableComponent"; import MemberAvatar from '../avatars/MemberAvatar'; import BaseAvatar from '../avatars/BaseAvatar'; import AccessibleButton from './AccessibleButton'; @@ -44,7 +43,6 @@ interface IState { widgetDomain: string; } -@replaceableComponent("views.elements.AppPermission") export default class AppPermission extends React.Component { static defaultProps: Partial = { onPermissionGranted: () => {}, diff --git a/src/components/views/elements/AppTile.tsx b/src/components/views/elements/AppTile.tsx index 0a33b23908..4141c9394a 100644 --- a/src/components/views/elements/AppTile.tsx +++ b/src/components/views/elements/AppTile.tsx @@ -39,7 +39,6 @@ import { StopGapWidget } from "../../../stores/widgets/StopGapWidget"; import { ElementWidgetActions } from "../../../stores/widgets/ElementWidgetActions"; import WidgetContextMenu from "../context_menus/WidgetContextMenu"; import WidgetAvatar from "../avatars/WidgetAvatar"; -import { replaceableComponent } from "../../../utils/replaceableComponent"; import CallHandler from '../../../CallHandler'; import { IApp } from "../../../stores/WidgetStore"; import { Container, WidgetLayoutStore } from "../../../stores/widgets/WidgetLayoutStore"; @@ -101,7 +100,6 @@ interface IState { requiresClient: boolean; } -@replaceableComponent("views.elements.AppTile") export default class AppTile extends React.Component { public static contextType = MatrixClientContext; context: ContextType; diff --git a/src/components/views/elements/DesktopCapturerSourcePicker.tsx b/src/components/views/elements/DesktopCapturerSourcePicker.tsx index 57bf24b777..f355cc2a5e 100644 --- a/src/components/views/elements/DesktopCapturerSourcePicker.tsx +++ b/src/components/views/elements/DesktopCapturerSourcePicker.tsx @@ -21,7 +21,6 @@ import { _t } from '../../../languageHandler'; import BaseDialog from "..//dialogs/BaseDialog"; import DialogButtons from "./DialogButtons"; import AccessibleButton from './AccessibleButton'; -import { replaceableComponent } from "../../../utils/replaceableComponent"; import TabbedView, { Tab, TabLocation } from '../../structures/TabbedView'; import PlatformPeg from "../../../PlatformPeg"; @@ -90,7 +89,6 @@ export interface PickerIProps { onFinished(sourceId: string): void; } -@replaceableComponent("views.elements.DesktopCapturerSourcePicker") export default class DesktopCapturerSourcePicker extends React.Component< PickerIProps, PickerIState diff --git a/src/components/views/elements/DialogButtons.tsx b/src/components/views/elements/DialogButtons.tsx index 480e364630..ed0d6cd9e6 100644 --- a/src/components/views/elements/DialogButtons.tsx +++ b/src/components/views/elements/DialogButtons.tsx @@ -19,7 +19,6 @@ limitations under the License. import React from "react"; import { _t } from '../../../languageHandler'; -import { replaceableComponent } from "../../../utils/replaceableComponent"; interface IProps { // The primary button which is styled differently and has default focus. @@ -61,7 +60,6 @@ interface IProps { /** * Basic container for buttons in modal dialogs. */ -@replaceableComponent("views.elements.DialogButtons") export default class DialogButtons extends React.Component { public static defaultProps: Partial = { hasCancel: true, diff --git a/src/components/views/elements/DirectorySearchBox.tsx b/src/components/views/elements/DirectorySearchBox.tsx index 015065f45e..d4f20817e1 100644 --- a/src/components/views/elements/DirectorySearchBox.tsx +++ b/src/components/views/elements/DirectorySearchBox.tsx @@ -17,7 +17,6 @@ limitations under the License. import React, { ChangeEvent, createRef } from 'react'; import { _t } from '../../../languageHandler'; -import { replaceableComponent } from "../../../utils/replaceableComponent"; import AccessibleButton from "./AccessibleButton"; interface IProps { @@ -34,7 +33,6 @@ interface IState { value: string; } -@replaceableComponent("views.elements.DirectorySearchBox") export default class DirectorySearchBox extends React.Component { private input = createRef(); diff --git a/src/components/views/elements/Draggable.tsx b/src/components/views/elements/Draggable.tsx index e9e24a57e4..a6eb8323f3 100644 --- a/src/components/views/elements/Draggable.tsx +++ b/src/components/views/elements/Draggable.tsx @@ -16,8 +16,6 @@ limitations under the License. import React from 'react'; -import { replaceableComponent } from "../../../utils/replaceableComponent"; - interface IProps { className: string; dragFunc: (currentLocation: ILocationState, event: MouseEvent) => ILocationState; @@ -35,7 +33,6 @@ export interface ILocationState { currentY: number; } -@replaceableComponent("views.elements.Draggable") export default class Draggable extends React.Component { constructor(props: IProps) { super(props); diff --git a/src/components/views/elements/Dropdown.tsx b/src/components/views/elements/Dropdown.tsx index 9f071cafa9..4f572875a5 100644 --- a/src/components/views/elements/Dropdown.tsx +++ b/src/components/views/elements/Dropdown.tsx @@ -20,7 +20,6 @@ import classnames from 'classnames'; import AccessibleButton, { ButtonEvent } from './AccessibleButton'; import { _t } from '../../../languageHandler'; -import { replaceableComponent } from "../../../utils/replaceableComponent"; import { getKeyBindingsManager } from "../../../KeyBindingsManager"; import { KeyBindingAction } from "../../../accessibility/KeyboardShortcuts"; @@ -107,7 +106,6 @@ interface IState { * but somewhat simpler as react-select is 79KB of minified * javascript. */ -@replaceableComponent("views.elements.Dropdown") export default class Dropdown extends React.Component { private readonly buttonRef = createRef(); private dropdownRootElement: HTMLDivElement = null; diff --git a/src/components/views/elements/EditableItemList.tsx b/src/components/views/elements/EditableItemList.tsx index a6d1d3f06f..d33990b570 100644 --- a/src/components/views/elements/EditableItemList.tsx +++ b/src/components/views/elements/EditableItemList.tsx @@ -19,7 +19,6 @@ import React from "react"; import { _t } from '../../../languageHandler'; import Field from "./Field"; import AccessibleButton from "./AccessibleButton"; -import { replaceableComponent } from "../../../utils/replaceableComponent"; interface IItemProps { index?: number; @@ -107,7 +106,6 @@ interface IProps { onNewItemChanged?(item: string): void; } -@replaceableComponent("views.elements.EditableItemList") export default class EditableItemList

extends React.PureComponent { protected onItemAdded = (e) => { e.stopPropagation(); diff --git a/src/components/views/elements/EditableText.tsx b/src/components/views/elements/EditableText.tsx index 8a9e4ed91a..344db02c3d 100644 --- a/src/components/views/elements/EditableText.tsx +++ b/src/components/views/elements/EditableText.tsx @@ -19,7 +19,6 @@ import React, { createRef } from 'react'; import { KeyBindingAction } from "../../../accessibility/KeyboardShortcuts"; import { getKeyBindingsManager } from "../../../KeyBindingsManager"; -import { replaceableComponent } from "../../../utils/replaceableComponent"; enum Phases { Display = "display", @@ -45,7 +44,6 @@ interface IState { phase: Phases; } -@replaceableComponent("views.elements.EditableText") export default class EditableText extends React.Component { // we track value as an JS object field rather than in React state // as React doesn't play nice with contentEditable. diff --git a/src/components/views/elements/EditableTextContainer.tsx b/src/components/views/elements/EditableTextContainer.tsx index ede1e8a655..d452cf10f0 100644 --- a/src/components/views/elements/EditableTextContainer.tsx +++ b/src/components/views/elements/EditableTextContainer.tsx @@ -16,7 +16,6 @@ limitations under the License. import React from 'react'; -import { replaceableComponent } from "../../../utils/replaceableComponent"; import Spinner from "./Spinner"; import EditableText from "./EditableText"; @@ -56,7 +55,6 @@ interface IState { * similarly asynchronous way. If this is not provided, the initial value is * taken from the 'initialValue' property. */ -@replaceableComponent("views.elements.EditableTextContainer") export default class EditableTextContainer extends React.Component { private unmounted = false; public static defaultProps: Partial = { diff --git a/src/components/views/elements/ErrorBoundary.tsx b/src/components/views/elements/ErrorBoundary.tsx index 45fb9eafd4..91e56b82be 100644 --- a/src/components/views/elements/ErrorBoundary.tsx +++ b/src/components/views/elements/ErrorBoundary.tsx @@ -22,7 +22,6 @@ import { MatrixClientPeg } from '../../../MatrixClientPeg'; import PlatformPeg from '../../../PlatformPeg'; import Modal from '../../../Modal'; import SdkConfig from "../../../SdkConfig"; -import { replaceableComponent } from "../../../utils/replaceableComponent"; import BugReportDialog from '../dialogs/BugReportDialog'; import AccessibleButton from './AccessibleButton'; @@ -34,7 +33,6 @@ interface IState { * This error boundary component can be used to wrap large content areas and * catch exceptions during rendering in the component tree below them. */ -@replaceableComponent("views.elements.ErrorBoundary") export default class ErrorBoundary extends React.PureComponent<{}, IState> { constructor(props) { super(props); diff --git a/src/components/views/elements/EventListSummary.tsx b/src/components/views/elements/EventListSummary.tsx index 748c3b353b..1fc99c774a 100644 --- a/src/components/views/elements/EventListSummary.tsx +++ b/src/components/views/elements/EventListSummary.tsx @@ -25,7 +25,6 @@ import { _t } from '../../../languageHandler'; import { formatCommaSeparatedList } from '../../../utils/FormattingUtils'; import { isValid3pidInvite } from "../../../RoomInvite"; import GenericEventListSummary from "./GenericEventListSummary"; -import { replaceableComponent } from "../../../utils/replaceableComponent"; import { RightPanelPhases } from '../../../stores/right-panel/RightPanelStorePhases'; import { jsxJoin } from '../../../utils/ReactUtils'; import { Layout } from '../../../settings/enums/Layout'; @@ -79,7 +78,6 @@ enum TransitionType { const SEP = ","; -@replaceableComponent("views.elements.EventListSummary") export default class EventListSummary extends React.Component { static contextType = RoomContext; public context!: React.ContextType; diff --git a/src/components/views/elements/EventTilePreview.tsx b/src/components/views/elements/EventTilePreview.tsx index 069a743d7f..86f8eeaf20 100644 --- a/src/components/views/elements/EventTilePreview.tsx +++ b/src/components/views/elements/EventTilePreview.tsx @@ -22,7 +22,6 @@ import { RoomMember } from 'matrix-js-sdk/src/models/room-member'; import * as Avatar from '../../../Avatar'; import EventTile from '../rooms/EventTile'; import { Layout } from "../../../settings/enums/Layout"; -import { replaceableComponent } from "../../../utils/replaceableComponent"; import Spinner from './Spinner'; interface IProps { @@ -63,7 +62,6 @@ interface IState { const AVATAR_SIZE = 32; -@replaceableComponent("views.elements.EventTilePreview") export default class EventTilePreview extends React.Component { constructor(props: IProps) { super(props); diff --git a/src/components/views/elements/IRCTimelineProfileResizer.tsx b/src/components/views/elements/IRCTimelineProfileResizer.tsx index 13b0022e72..c0e37d93d7 100644 --- a/src/components/views/elements/IRCTimelineProfileResizer.tsx +++ b/src/components/views/elements/IRCTimelineProfileResizer.tsx @@ -19,7 +19,6 @@ import React from 'react'; import SettingsStore from "../../../settings/SettingsStore"; import Draggable, { ILocationState } from './Draggable'; import { SettingLevel } from "../../../settings/SettingLevel"; -import { replaceableComponent } from "../../../utils/replaceableComponent"; interface IProps { // Current room @@ -33,7 +32,6 @@ interface IState { IRCLayoutRoot: HTMLElement; } -@replaceableComponent("views.elements.IRCTimelineProfileResizer") export default class IRCTimelineProfileResizer extends React.Component { constructor(props: IProps) { super(props); diff --git a/src/components/views/elements/ImageView.tsx b/src/components/views/elements/ImageView.tsx index df9b128885..fd24bc745a 100644 --- a/src/components/views/elements/ImageView.tsx +++ b/src/components/views/elements/ImageView.tsx @@ -31,7 +31,6 @@ import SettingsStore from "../../../settings/SettingsStore"; import { formatFullDate } from "../../../DateUtils"; import dis from '../../../dispatcher/dispatcher'; import { Action } from '../../../dispatcher/actions'; -import { replaceableComponent } from "../../../utils/replaceableComponent"; import { RoomPermalinkCreator } from "../../../utils/permalinks/Permalinks"; import { normalizeWheelEvent } from "../../../utils/Mouse"; import { IDialogProps } from '../dialogs/IDialogProps'; @@ -90,7 +89,6 @@ interface IState { contextMenuDisplayed: boolean; } -@replaceableComponent("views.elements.ImageView") export default class ImageView extends React.Component { constructor(props) { super(props); diff --git a/src/components/views/elements/InfoTooltip.tsx b/src/components/views/elements/InfoTooltip.tsx index f77a07bd21..d34a6f9bb0 100644 --- a/src/components/views/elements/InfoTooltip.tsx +++ b/src/components/views/elements/InfoTooltip.tsx @@ -20,7 +20,6 @@ import classNames from 'classnames'; import { Alignment } from './Tooltip'; import { _t } from "../../../languageHandler"; -import { replaceableComponent } from "../../../utils/replaceableComponent"; import TooltipTarget from './TooltipTarget'; export enum InfoTooltipKind { @@ -35,7 +34,6 @@ interface ITooltipProps { kind?: InfoTooltipKind; } -@replaceableComponent("views.elements.InfoTooltip") export default class InfoTooltip extends React.PureComponent { constructor(props: ITooltipProps) { super(props); diff --git a/src/components/views/elements/InlineSpinner.tsx b/src/components/views/elements/InlineSpinner.tsx index 3a404430db..385e317cda 100644 --- a/src/components/views/elements/InlineSpinner.tsx +++ b/src/components/views/elements/InlineSpinner.tsx @@ -17,7 +17,6 @@ limitations under the License. import React from "react"; import { _t } from "../../../languageHandler"; -import { replaceableComponent } from "../../../utils/replaceableComponent"; interface IProps { w?: number; @@ -25,7 +24,6 @@ interface IProps { children?: React.ReactNode; } -@replaceableComponent("views.elements.InlineSpinner") export default class InlineSpinner extends React.PureComponent { static defaultProps = { w: 16, diff --git a/src/components/views/elements/InviteReason.tsx b/src/components/views/elements/InviteReason.tsx index 13a62d463c..d3f7e34031 100644 --- a/src/components/views/elements/InviteReason.tsx +++ b/src/components/views/elements/InviteReason.tsx @@ -19,7 +19,6 @@ import React from "react"; import { sanitizedHtmlNode } from "../../../HtmlUtils"; import { _t } from "../../../languageHandler"; -import { replaceableComponent } from "../../../utils/replaceableComponent"; interface IProps { reason: string; @@ -30,7 +29,6 @@ interface IState { hidden: boolean; } -@replaceableComponent("views.elements.InviteReason") export default class InviteReason extends React.PureComponent { constructor(props) { super(props); diff --git a/src/components/views/elements/LabelledToggleSwitch.tsx b/src/components/views/elements/LabelledToggleSwitch.tsx index 24647df502..952c92ac42 100644 --- a/src/components/views/elements/LabelledToggleSwitch.tsx +++ b/src/components/views/elements/LabelledToggleSwitch.tsx @@ -17,7 +17,6 @@ limitations under the License. import React from "react"; import ToggleSwitch from "./ToggleSwitch"; -import { replaceableComponent } from "../../../utils/replaceableComponent"; interface IProps { // The value for the toggle switch @@ -35,7 +34,6 @@ interface IProps { onChange(checked: boolean): void; } -@replaceableComponent("views.elements.LabelledToggleSwitch") export default class LabelledToggleSwitch extends React.PureComponent { render() { // This is a minimal version of a SettingsFlag diff --git a/src/components/views/elements/LanguageDropdown.tsx b/src/components/views/elements/LanguageDropdown.tsx index c6c52ee4e8..7d19dbfce1 100644 --- a/src/components/views/elements/LanguageDropdown.tsx +++ b/src/components/views/elements/LanguageDropdown.tsx @@ -20,7 +20,6 @@ import React from 'react'; import * as languageHandler from '../../../languageHandler'; import SettingsStore from "../../../settings/SettingsStore"; import { _t } from "../../../languageHandler"; -import { replaceableComponent } from "../../../utils/replaceableComponent"; import Spinner from "./Spinner"; import Dropdown from "./Dropdown"; @@ -42,7 +41,6 @@ interface IState { langs: string[]; } -@replaceableComponent("views.elements.LanguageDropdown") export default class LanguageDropdown extends React.Component { constructor(props: IProps) { super(props); diff --git a/src/components/views/elements/LazyRenderList.tsx b/src/components/views/elements/LazyRenderList.tsx index 6a1920bec9..d573a38104 100644 --- a/src/components/views/elements/LazyRenderList.tsx +++ b/src/components/views/elements/LazyRenderList.tsx @@ -16,8 +16,6 @@ limitations under the License. import React from "react"; -import { replaceableComponent } from "../../../utils/replaceableComponent"; - class ItemRange { constructor( public topCount: number, @@ -84,7 +82,6 @@ interface IState { renderRange: ItemRange; } -@replaceableComponent("views.elements.LazyRenderList") export default class LazyRenderList extends React.Component, IState> { public static defaultProps: Partial> = { overflowItems: 20, diff --git a/src/components/views/elements/PersistedElement.tsx b/src/components/views/elements/PersistedElement.tsx index 97a197d2bf..cd8239a1f1 100644 --- a/src/components/views/elements/PersistedElement.tsx +++ b/src/components/views/elements/PersistedElement.tsx @@ -22,7 +22,6 @@ import { isNullOrUndefined } from "matrix-js-sdk/src/utils"; import dis from '../../../dispatcher/dispatcher'; import MatrixClientContext from "../../../contexts/MatrixClientContext"; import { MatrixClientPeg } from "../../../MatrixClientPeg"; -import { replaceableComponent } from "../../../utils/replaceableComponent"; import { ActionPayload } from "../../../dispatcher/payloads"; export const getPersistKey = (appId: string) => 'widget_' + appId; @@ -70,7 +69,6 @@ interface IProps { * children are made visible and are positioned into a div that is given the same * bounding rect as the parent of PE. */ -@replaceableComponent("views.elements.PersistedElement") export default class PersistedElement extends React.Component { private resizeObserver: ResizeObserver; private dispatcherRef: string; diff --git a/src/components/views/elements/PersistentApp.tsx b/src/components/views/elements/PersistentApp.tsx index fd78237bfb..5851c1c614 100644 --- a/src/components/views/elements/PersistentApp.tsx +++ b/src/components/views/elements/PersistentApp.tsx @@ -19,7 +19,6 @@ import React, { ContextType } from 'react'; import { Room } from "matrix-js-sdk/src/models/room"; import WidgetUtils from '../../../utils/WidgetUtils'; -import { replaceableComponent } from "../../../utils/replaceableComponent"; import AppTile from "./AppTile"; import { IApp } from '../../../stores/WidgetStore'; import MatrixClientContext from "../../../contexts/MatrixClientContext"; @@ -30,7 +29,6 @@ interface IProps { pointerEvents?: string; } -@replaceableComponent("views.elements.PersistentApp") export default class PersistentApp extends React.Component { public static contextType = MatrixClientContext; context: ContextType; diff --git a/src/components/views/elements/Pill.js b/src/components/views/elements/Pill.js index 610135ef99..f4e9817f8c 100644 --- a/src/components/views/elements/Pill.js +++ b/src/components/views/elements/Pill.js @@ -27,9 +27,7 @@ import { getPrimaryPermalinkEntity, parsePermalink } from "../../../utils/permal import MatrixClientContext from "../../../contexts/MatrixClientContext"; import { Action } from "../../../dispatcher/actions"; import Tooltip from './Tooltip'; -import { replaceableComponent } from "../../../utils/replaceableComponent"; -@replaceableComponent("views.elements.Pill") class Pill extends React.Component { static roomNotifPos(text) { return text.indexOf("@room"); diff --git a/src/components/views/elements/PowerSelector.tsx b/src/components/views/elements/PowerSelector.tsx index 2cf028e225..3a9e87d158 100644 --- a/src/components/views/elements/PowerSelector.tsx +++ b/src/components/views/elements/PowerSelector.tsx @@ -19,7 +19,6 @@ import React from 'react'; import * as Roles from '../../../Roles'; import { _t } from '../../../languageHandler'; import Field from "./Field"; -import { replaceableComponent } from "../../../utils/replaceableComponent"; import { KeyBindingAction } from "../../../accessibility/KeyboardShortcuts"; import { getKeyBindingsManager } from "../../../KeyBindingsManager"; @@ -55,7 +54,6 @@ interface IState { customLevel?: number; } -@replaceableComponent("views.elements.PowerSelector") export default class PowerSelector extends React.Component { public static defaultProps: Partial = { maxValue: Infinity, diff --git a/src/components/views/elements/ReplyChain.tsx b/src/components/views/elements/ReplyChain.tsx index 6b8d7314ea..11498c5a55 100644 --- a/src/components/views/elements/ReplyChain.tsx +++ b/src/components/views/elements/ReplyChain.tsx @@ -29,7 +29,6 @@ import SettingsStore from "../../../settings/SettingsStore"; import { Layout } from "../../../settings/enums/Layout"; import { getUserNameColorClass } from "../../../utils/FormattingUtils"; import { Action } from "../../../dispatcher/actions"; -import { replaceableComponent } from "../../../utils/replaceableComponent"; import Spinner from './Spinner'; import ReplyTile from "../rooms/ReplyTile"; import Pill from './Pill'; @@ -76,7 +75,6 @@ interface IState { // This component does no cycle detection, simply because the only way to make such a cycle would be to // craft event_id's, using a homeserver that generates predictable event IDs; even then the impact would // be low as each event being loaded (after the first) is triggered by an explicit user action. -@replaceableComponent("views.elements.ReplyChain") export default class ReplyChain extends React.Component { static contextType = RoomContext; public context!: React.ContextType; diff --git a/src/components/views/elements/RoomAliasField.tsx b/src/components/views/elements/RoomAliasField.tsx index a8cf278a30..e99b3b3ea7 100644 --- a/src/components/views/elements/RoomAliasField.tsx +++ b/src/components/views/elements/RoomAliasField.tsx @@ -18,7 +18,6 @@ import React, { createRef, KeyboardEventHandler } from "react"; import { _t } from '../../../languageHandler'; import withValidation from './Validation'; -import { replaceableComponent } from "../../../utils/replaceableComponent"; import Field, { IValidateOpts } from "./Field"; import MatrixClientContext from "../../../contexts/MatrixClientContext"; @@ -39,7 +38,6 @@ interface IState { } // Controlled form component wrapping Field for inputting a room alias scoped to a given domain -@replaceableComponent("views.elements.RoomAliasField") export default class RoomAliasField extends React.PureComponent { static contextType = MatrixClientContext; public context!: React.ContextType; diff --git a/src/components/views/elements/SettingsFlag.tsx b/src/components/views/elements/SettingsFlag.tsx index a0af045c26..3437440f00 100644 --- a/src/components/views/elements/SettingsFlag.tsx +++ b/src/components/views/elements/SettingsFlag.tsx @@ -22,7 +22,6 @@ import { _t } from '../../../languageHandler'; import ToggleSwitch from "./ToggleSwitch"; import StyledCheckbox from "./StyledCheckbox"; import { SettingLevel } from "../../../settings/SettingLevel"; -import { replaceableComponent } from "../../../utils/replaceableComponent"; interface IProps { // The setting must be a boolean @@ -41,7 +40,6 @@ interface IState { value: boolean; } -@replaceableComponent("views.elements.SettingsFlag") export default class SettingsFlag extends React.Component { constructor(props: IProps) { super(props); diff --git a/src/components/views/elements/Slider.tsx b/src/components/views/elements/Slider.tsx index a4c3147a73..a5103f2bd8 100644 --- a/src/components/views/elements/Slider.tsx +++ b/src/components/views/elements/Slider.tsx @@ -16,8 +16,6 @@ limitations under the License. import * as React from 'react'; -import { replaceableComponent } from "../../../utils/replaceableComponent"; - interface IProps { // A callback for the selected value onSelectionChange: (value: number) => void; @@ -36,7 +34,6 @@ interface IProps { disabled: boolean; } -@replaceableComponent("views.elements.Slider") export default class Slider extends React.Component { // offset is a terrible inverse approximation. // if the values represents some function f(x) = y where x is the diff --git a/src/components/views/elements/SpellCheckLanguagesDropdown.tsx b/src/components/views/elements/SpellCheckLanguagesDropdown.tsx index 972dac909a..126898a4ff 100644 --- a/src/components/views/elements/SpellCheckLanguagesDropdown.tsx +++ b/src/components/views/elements/SpellCheckLanguagesDropdown.tsx @@ -20,7 +20,6 @@ import Dropdown from "../../views/elements/Dropdown"; import PlatformPeg from "../../../PlatformPeg"; import SettingsStore from "../../../settings/SettingsStore"; import { _t } from "../../../languageHandler"; -import { replaceableComponent } from "../../../utils/replaceableComponent"; import Spinner from "./Spinner"; function languageMatchesSearchQuery(query, language) { @@ -40,7 +39,6 @@ interface SpellCheckLanguagesDropdownIState { languages: any; } -@replaceableComponent("views.elements.SpellCheckLanguagesDropdown") export default class SpellCheckLanguagesDropdown extends React.Component { constructor(props) { diff --git a/src/components/views/elements/Spoiler.tsx b/src/components/views/elements/Spoiler.tsx index 4613f8914b..7d47bb030e 100644 --- a/src/components/views/elements/Spoiler.tsx +++ b/src/components/views/elements/Spoiler.tsx @@ -16,8 +16,6 @@ import React from 'react'; -import { replaceableComponent } from "../../../utils/replaceableComponent"; - interface IProps { reason?: string; contentHtml: string; @@ -27,7 +25,6 @@ interface IState { visible: boolean; } -@replaceableComponent("views.elements.Spoiler") export default class Spoiler extends React.Component { constructor(props: IProps) { super(props); diff --git a/src/components/views/elements/StyledCheckbox.tsx b/src/components/views/elements/StyledCheckbox.tsx index 6fe59562bb..333fbb8adb 100644 --- a/src/components/views/elements/StyledCheckbox.tsx +++ b/src/components/views/elements/StyledCheckbox.tsx @@ -18,8 +18,6 @@ import React from "react"; import { randomString } from "matrix-js-sdk/src/randomstring"; import classnames from 'classnames'; -import { replaceableComponent } from "../../../utils/replaceableComponent"; - export enum CheckboxStyle { Solid = "solid", Outline = "outline", @@ -34,7 +32,6 @@ interface IProps extends React.InputHTMLAttributes { interface IState { } -@replaceableComponent("views.elements.StyledCheckbox") export default class StyledCheckbox extends React.PureComponent { private id: string; diff --git a/src/components/views/elements/StyledRadioButton.tsx b/src/components/views/elements/StyledRadioButton.tsx index 25f525ebf4..14cc7d22ef 100644 --- a/src/components/views/elements/StyledRadioButton.tsx +++ b/src/components/views/elements/StyledRadioButton.tsx @@ -17,8 +17,6 @@ limitations under the License. import React from 'react'; import classnames from 'classnames'; -import { replaceableComponent } from "../../../utils/replaceableComponent"; - interface IProps extends React.InputHTMLAttributes { inputRef?: React.RefObject; outlined?: boolean; @@ -31,7 +29,6 @@ interface IProps extends React.InputHTMLAttributes { interface IState { } -@replaceableComponent("views.elements.StyledRadioButton") export default class StyledRadioButton extends React.PureComponent { public static readonly defaultProps = { className: '', diff --git a/src/components/views/elements/SyntaxHighlight.tsx b/src/components/views/elements/SyntaxHighlight.tsx index bc4b3111f3..861eb18e83 100644 --- a/src/components/views/elements/SyntaxHighlight.tsx +++ b/src/components/views/elements/SyntaxHighlight.tsx @@ -17,14 +17,11 @@ limitations under the License. import React from 'react'; import hljs from 'highlight.js'; -import { replaceableComponent } from "../../../utils/replaceableComponent"; - interface IProps { language?: string; children: string; } -@replaceableComponent("views.elements.SyntaxHighlight") export default class SyntaxHighlight extends React.PureComponent { public render(): JSX.Element { const { children: content, language } = this.props; diff --git a/src/components/views/elements/TagComposer.tsx b/src/components/views/elements/TagComposer.tsx index 9937020fff..19f3523f06 100644 --- a/src/components/views/elements/TagComposer.tsx +++ b/src/components/views/elements/TagComposer.tsx @@ -16,7 +16,6 @@ limitations under the License. import React, { ChangeEvent, FormEvent } from "react"; -import { replaceableComponent } from "../../../utils/replaceableComponent"; import Field from "./Field"; import { _t } from "../../../languageHandler"; import AccessibleButton from "./AccessibleButton"; @@ -38,7 +37,6 @@ interface IState { * A simple, controlled, composer for entering string tags. Contains a simple * input, add button, and per-tag remove button. */ -@replaceableComponent("views.elements.TagComposer") export default class TagComposer extends React.PureComponent { public constructor(props: IProps) { super(props); diff --git a/src/components/views/elements/TextWithTooltip.tsx b/src/components/views/elements/TextWithTooltip.tsx index 2b5926f3d7..c8fa5376b8 100644 --- a/src/components/views/elements/TextWithTooltip.tsx +++ b/src/components/views/elements/TextWithTooltip.tsx @@ -17,7 +17,6 @@ import React from 'react'; import classNames from 'classnames'; -import { replaceableComponent } from "../../../utils/replaceableComponent"; import TooltipTarget from './TooltipTarget'; interface IProps { @@ -28,7 +27,6 @@ interface IProps { onClick?: (ev?: React.MouseEvent) => void; } -@replaceableComponent("views.elements.TextWithTooltip") export default class TextWithTooltip extends React.Component { constructor(props: IProps) { super(props); diff --git a/src/components/views/elements/Tooltip.tsx b/src/components/views/elements/Tooltip.tsx index 47b81c7a2e..189bee393f 100644 --- a/src/components/views/elements/Tooltip.tsx +++ b/src/components/views/elements/Tooltip.tsx @@ -21,7 +21,6 @@ import React, { CSSProperties } from 'react'; import ReactDOM from 'react-dom'; import classNames from 'classnames'; -import { replaceableComponent } from "../../../utils/replaceableComponent"; import UIStore from "../../../stores/UIStore"; const MIN_TOOLTIP_HEIGHT = 25; @@ -55,7 +54,6 @@ export interface ITooltipProps { maxParentWidth?: number; } -@replaceableComponent("views.elements.Tooltip") export default class Tooltip extends React.Component { private tooltipContainer: HTMLElement; private parent: Element; diff --git a/src/components/views/elements/TooltipButton.tsx b/src/components/views/elements/TooltipButton.tsx index e6b3f6c520..c863ea31b9 100644 --- a/src/components/views/elements/TooltipButton.tsx +++ b/src/components/views/elements/TooltipButton.tsx @@ -17,14 +17,12 @@ limitations under the License. import React from 'react'; -import { replaceableComponent } from "../../../utils/replaceableComponent"; import TooltipTarget from './TooltipTarget'; interface IProps { helpText: React.ReactNode | string; } -@replaceableComponent("views.elements.TooltipButton") export default class TooltipButton extends React.Component { constructor(props) { super(props); diff --git a/src/components/views/elements/TruncatedList.tsx b/src/components/views/elements/TruncatedList.tsx index 31c5391b07..56d05515df 100644 --- a/src/components/views/elements/TruncatedList.tsx +++ b/src/components/views/elements/TruncatedList.tsx @@ -18,7 +18,6 @@ limitations under the License. import React from 'react'; import { _t } from '../../../languageHandler'; -import { replaceableComponent } from "../../../utils/replaceableComponent"; interface IProps { // The number of elements to show before truncating. If negative, no truncation is done. @@ -38,7 +37,6 @@ interface IProps { createOverflowElement?: (overflowCount: number, totalCount: number) => React.ReactNode; } -@replaceableComponent("views.elements.TruncatedList") export default class TruncatedList extends React.Component { static defaultProps ={ truncateAt: 2, diff --git a/src/components/views/elements/crypto/VerificationQRCode.tsx b/src/components/views/elements/crypto/VerificationQRCode.tsx index a5efb1b6ce..16f150af6b 100644 --- a/src/components/views/elements/crypto/VerificationQRCode.tsx +++ b/src/components/views/elements/crypto/VerificationQRCode.tsx @@ -17,14 +17,12 @@ limitations under the License. import React from "react"; import { QRCodeData } from "matrix-js-sdk/src/crypto/verification/QRCode"; -import { replaceableComponent } from "../../../../utils/replaceableComponent"; import QRCode from "../QRCode"; interface IProps { qrCodeData: QRCodeData; } -@replaceableComponent("views.elements.crypto.VerificationQRCode") export default class VerificationQRCode extends React.PureComponent { public render(): JSX.Element { return ( diff --git a/src/components/views/emojipicker/Category.tsx b/src/components/views/emojipicker/Category.tsx index 395ff1cbc8..7cd5b96bee 100644 --- a/src/components/views/emojipicker/Category.tsx +++ b/src/components/views/emojipicker/Category.tsx @@ -21,7 +21,6 @@ import { CATEGORY_HEADER_HEIGHT, EMOJI_HEIGHT, EMOJIS_PER_ROW } from "./EmojiPic import LazyRenderList from "../elements/LazyRenderList"; import { DATA_BY_CATEGORY, IEmoji } from "../../../emoji"; import Emoji from './Emoji'; -import { replaceableComponent } from "../../../utils/replaceableComponent"; const OVERFLOW_ROWS = 3; @@ -48,7 +47,6 @@ interface IProps { onMouseLeave(emoji: IEmoji): void; } -@replaceableComponent("views.emojipicker.Category") class Category extends React.PureComponent { private renderEmojiRow = (rowIndex: number) => { const { onClick, onMouseEnter, onMouseLeave, selectedEmojis, emojis } = this.props; diff --git a/src/components/views/emojipicker/Emoji.tsx b/src/components/views/emojipicker/Emoji.tsx index 48194ff7d7..91eada12b3 100644 --- a/src/components/views/emojipicker/Emoji.tsx +++ b/src/components/views/emojipicker/Emoji.tsx @@ -19,7 +19,6 @@ import React from 'react'; import { MenuItem } from "../../structures/ContextMenu"; import { IEmoji } from "../../../emoji"; -import { replaceableComponent } from "../../../utils/replaceableComponent"; interface IProps { emoji: IEmoji; @@ -29,7 +28,6 @@ interface IProps { onMouseLeave(emoji: IEmoji): void; } -@replaceableComponent("views.emojipicker.Emoji") class Emoji extends React.PureComponent { render() { const { onClick, onMouseEnter, onMouseLeave, emoji, selectedEmojis } = this.props; diff --git a/src/components/views/emojipicker/EmojiPicker.tsx b/src/components/views/emojipicker/EmojiPicker.tsx index 99f8b561ee..e064df405a 100644 --- a/src/components/views/emojipicker/EmojiPicker.tsx +++ b/src/components/views/emojipicker/EmojiPicker.tsx @@ -26,7 +26,6 @@ import Search from "./Search"; import Preview from "./Preview"; import QuickReactions from "./QuickReactions"; import Category, { ICategory, CategoryKey } from "./Category"; -import { replaceableComponent } from "../../../utils/replaceableComponent"; export const CATEGORY_HEADER_HEIGHT = 20; export const EMOJI_HEIGHT = 35; @@ -50,7 +49,6 @@ interface IState { viewportHeight: number; } -@replaceableComponent("views.emojipicker.EmojiPicker") class EmojiPicker extends React.Component { private readonly recentlyUsed: IEmoji[]; private readonly memoizedDataByCategory: Record; diff --git a/src/components/views/emojipicker/Header.tsx b/src/components/views/emojipicker/Header.tsx index e364d87eae..e430ac974b 100644 --- a/src/components/views/emojipicker/Header.tsx +++ b/src/components/views/emojipicker/Header.tsx @@ -20,7 +20,6 @@ import classNames from "classnames"; import { _t } from "../../../languageHandler"; import { CategoryKey, ICategory } from "./Category"; -import { replaceableComponent } from "../../../utils/replaceableComponent"; import { getKeyBindingsManager } from "../../../KeyBindingsManager"; import { KeyBindingAction } from "../../../accessibility/KeyboardShortcuts"; @@ -29,7 +28,6 @@ interface IProps { onAnchorClick(id: CategoryKey): void; } -@replaceableComponent("views.emojipicker.Header") class Header extends React.PureComponent { private findNearestEnabled(index: number, delta: number) { index += this.props.categories.length; diff --git a/src/components/views/emojipicker/Preview.tsx b/src/components/views/emojipicker/Preview.tsx index 710b4545df..bcbbec1feb 100644 --- a/src/components/views/emojipicker/Preview.tsx +++ b/src/components/views/emojipicker/Preview.tsx @@ -18,13 +18,11 @@ limitations under the License. import React from 'react'; import { IEmoji } from "../../../emoji"; -import { replaceableComponent } from "../../../utils/replaceableComponent"; interface IProps { emoji: IEmoji; } -@replaceableComponent("views.emojipicker.Preview") class Preview extends React.PureComponent { render() { const { unicode, label, shortcodes: [shortcode] } = this.props.emoji; diff --git a/src/components/views/emojipicker/QuickReactions.tsx b/src/components/views/emojipicker/QuickReactions.tsx index 4c654a0806..c0336a759d 100644 --- a/src/components/views/emojipicker/QuickReactions.tsx +++ b/src/components/views/emojipicker/QuickReactions.tsx @@ -20,7 +20,6 @@ import React from 'react'; import { _t } from '../../../languageHandler'; import { getEmojiFromUnicode, IEmoji } from "../../../emoji"; import Emoji from "./Emoji"; -import { replaceableComponent } from "../../../utils/replaceableComponent"; // We use the variation-selector Heart in Quick Reactions for some reason const QUICK_REACTIONS = ["👍", "👎", "😄", "🎉", "😕", "❤️", "🚀", "👀"].map(emoji => { @@ -40,7 +39,6 @@ interface IState { hover?: IEmoji; } -@replaceableComponent("views.emojipicker.QuickReactions") class QuickReactions extends React.Component { constructor(props) { super(props); diff --git a/src/components/views/emojipicker/ReactionPicker.tsx b/src/components/views/emojipicker/ReactionPicker.tsx index df18949233..c53f5a64f9 100644 --- a/src/components/views/emojipicker/ReactionPicker.tsx +++ b/src/components/views/emojipicker/ReactionPicker.tsx @@ -23,7 +23,6 @@ import { EventType, RelationType } from 'matrix-js-sdk/src/@types/event'; import EmojiPicker from "./EmojiPicker"; import { MatrixClientPeg } from "../../../MatrixClientPeg"; import dis from "../../../dispatcher/dispatcher"; -import { replaceableComponent } from "../../../utils/replaceableComponent"; import { Action } from '../../../dispatcher/actions'; import RoomContext from "../../../contexts/RoomContext"; import { FocusComposerPayload } from '../../../dispatcher/payloads/FocusComposerPayload'; @@ -38,7 +37,6 @@ interface IState { selectedEmojis: Set; } -@replaceableComponent("views.emojipicker.ReactionPicker") class ReactionPicker extends React.Component { static contextType = RoomContext; public context!: React.ContextType; diff --git a/src/components/views/emojipicker/Search.tsx b/src/components/views/emojipicker/Search.tsx index 98273e926b..de09421010 100644 --- a/src/components/views/emojipicker/Search.tsx +++ b/src/components/views/emojipicker/Search.tsx @@ -18,7 +18,6 @@ limitations under the License. import React from 'react'; import { _t } from '../../../languageHandler'; -import { replaceableComponent } from "../../../utils/replaceableComponent"; import { KeyBindingAction } from "../../../accessibility/KeyboardShortcuts"; import { getKeyBindingsManager } from "../../../KeyBindingsManager"; @@ -28,7 +27,6 @@ interface IProps { onEnter(): void; } -@replaceableComponent("views.emojipicker.Search") class Search extends React.PureComponent { private inputRef = React.createRef(); diff --git a/src/components/views/location/LocationPicker.tsx b/src/components/views/location/LocationPicker.tsx index 4eaef0365b..c7e72c1949 100644 --- a/src/components/views/location/LocationPicker.tsx +++ b/src/components/views/location/LocationPicker.tsx @@ -23,7 +23,6 @@ import classNames from 'classnames'; import { Icon as LocationIcon } from '../../../../res/img/element-icons/location.svg'; import { _t } from '../../../languageHandler'; -import { replaceableComponent } from "../../../utils/replaceableComponent"; import MatrixClientContext from '../../../contexts/MatrixClientContext'; import Modal from '../../../Modal'; import SdkConfig from '../../../SdkConfig'; @@ -54,7 +53,6 @@ interface IState { const isSharingOwnLocation = (shareType: LocationShareType): boolean => shareType === LocationShareType.Own || shareType === LocationShareType.Live; -@replaceableComponent("views.location.LocationPicker") class LocationPicker extends React.Component { public static contextType = MatrixClientContext; public context!: React.ContextType; diff --git a/src/components/views/location/LocationViewDialog.tsx b/src/components/views/location/LocationViewDialog.tsx index 2c6e154ac0..236bd754d9 100644 --- a/src/components/views/location/LocationViewDialog.tsx +++ b/src/components/views/location/LocationViewDialog.tsx @@ -18,7 +18,6 @@ import React from 'react'; import { MatrixEvent } from 'matrix-js-sdk/src/models/event'; import { ClientEvent, IClientWellKnown, MatrixClient } from 'matrix-js-sdk/src/client'; -import { replaceableComponent } from "../../../utils/replaceableComponent"; import BaseDialog from "../dialogs/BaseDialog"; import { IDialogProps } from "../dialogs/IDialogProps"; import { LocationBodyContent } from '../messages/MLocationBody'; @@ -34,7 +33,6 @@ interface IState { error: Error; } -@replaceableComponent("views.location.LocationViewDialog") export default class LocationViewDialog extends React.Component { private coords: GeolocationCoordinates; private map?: maplibregl.Map; diff --git a/src/components/views/messages/DateSeparator.tsx b/src/components/views/messages/DateSeparator.tsx index e7aeb3e155..54dde16dac 100644 --- a/src/components/views/messages/DateSeparator.tsx +++ b/src/components/views/messages/DateSeparator.tsx @@ -21,7 +21,6 @@ import { logger } from "matrix-js-sdk/src/logger"; import { _t } from '../../../languageHandler'; import { formatFullDateNoTime } from '../../../DateUtils'; -import { replaceableComponent } from "../../../utils/replaceableComponent"; import { MatrixClientPeg } from '../../../MatrixClientPeg'; import dis from '../../../dispatcher/dispatcher'; import { Action } from '../../../dispatcher/actions'; @@ -61,7 +60,6 @@ interface IState { jumpToDateEnabled: boolean; } -@replaceableComponent("views.messages.DateSeparator") export default class DateSeparator extends React.Component { private settingWatcherRef = null; diff --git a/src/components/views/messages/DownloadActionButton.tsx b/src/components/views/messages/DownloadActionButton.tsx index b4ed4af0d3..e9152579d7 100644 --- a/src/components/views/messages/DownloadActionButton.tsx +++ b/src/components/views/messages/DownloadActionButton.tsx @@ -22,7 +22,6 @@ import { MediaEventHelper } from "../../../utils/MediaEventHelper"; import { RovingAccessibleTooltipButton } from "../../../accessibility/RovingTabIndex"; import Spinner from "../elements/Spinner"; import { _t, _td } from "../../../languageHandler"; -import { replaceableComponent } from "../../../utils/replaceableComponent"; import { FileDownloader } from "../../../utils/FileDownloader"; interface IProps { @@ -40,7 +39,6 @@ interface IState { tooltip: string; } -@replaceableComponent("views.messages.DownloadActionButton") export default class DownloadActionButton extends React.PureComponent { private downloader = new FileDownloader(); diff --git a/src/components/views/messages/EditHistoryMessage.tsx b/src/components/views/messages/EditHistoryMessage.tsx index 116bfe8268..30922b62e5 100644 --- a/src/components/views/messages/EditHistoryMessage.tsx +++ b/src/components/views/messages/EditHistoryMessage.tsx @@ -26,7 +26,6 @@ import { _t } from '../../../languageHandler'; import { MatrixClientPeg } from '../../../MatrixClientPeg'; import Modal from '../../../Modal'; import RedactedBody from "./RedactedBody"; -import { replaceableComponent } from "../../../utils/replaceableComponent"; import AccessibleButton from "../elements/AccessibleButton"; import ConfirmAndWaitRedactDialog from "../dialogs/ConfirmAndWaitRedactDialog"; import ViewSource from "../../structures/ViewSource"; @@ -50,7 +49,6 @@ interface IState { sendStatus: EventStatus; } -@replaceableComponent("views.messages.EditHistoryMessage") export default class EditHistoryMessage extends React.PureComponent { private content = createRef(); private pills: Element[] = []; diff --git a/src/components/views/messages/MAudioBody.tsx b/src/components/views/messages/MAudioBody.tsx index 5af03135b5..9d20c667e8 100644 --- a/src/components/views/messages/MAudioBody.tsx +++ b/src/components/views/messages/MAudioBody.tsx @@ -17,7 +17,6 @@ limitations under the License. import React from "react"; import { logger } from "matrix-js-sdk/src/logger"; -import { replaceableComponent } from "../../../utils/replaceableComponent"; import { Playback } from "../../../audio/Playback"; import InlineSpinner from '../elements/InlineSpinner'; import { _t } from "../../../languageHandler"; @@ -35,7 +34,6 @@ interface IState { playback?: Playback; } -@replaceableComponent("views.messages.MAudioBody") export default class MAudioBody extends React.PureComponent { static contextType = RoomContext; public context!: React.ContextType; diff --git a/src/components/views/messages/MFileBody.tsx b/src/components/views/messages/MFileBody.tsx index 383a2cce2e..2556616b7a 100644 --- a/src/components/views/messages/MFileBody.tsx +++ b/src/components/views/messages/MFileBody.tsx @@ -21,7 +21,6 @@ import { logger } from "matrix-js-sdk/src/logger"; import { _t } from '../../../languageHandler'; import Modal from '../../../Modal'; import AccessibleButton from "../elements/AccessibleButton"; -import { replaceableComponent } from "../../../utils/replaceableComponent"; import { mediaFromContent } from "../../../customisations/Media"; import ErrorDialog from "../dialogs/ErrorDialog"; import { presentableTextForFile } from "../../../utils/FileUtils"; @@ -106,7 +105,6 @@ interface IState { decryptedBlob?: Blob; } -@replaceableComponent("views.messages.MFileBody") export default class MFileBody extends React.Component { static contextType = RoomContext; public context!: React.ContextType; diff --git a/src/components/views/messages/MImageBody.tsx b/src/components/views/messages/MImageBody.tsx index d5d8ebf471..0f9fe45a29 100644 --- a/src/components/views/messages/MImageBody.tsx +++ b/src/components/views/messages/MImageBody.tsx @@ -28,7 +28,6 @@ import Modal from '../../../Modal'; import { _t } from '../../../languageHandler'; import SettingsStore from "../../../settings/SettingsStore"; import Spinner from '../elements/Spinner'; -import { replaceableComponent } from "../../../utils/replaceableComponent"; import { Media, mediaFromContent } from "../../../customisations/Media"; import { BLURHASH_FIELD, createThumbnail } from "../../../ContentMessages"; import { IMediaEventContent } from '../../../customisations/models/IMediaEventContent'; @@ -60,7 +59,6 @@ interface IState { placeholder: Placeholder; } -@replaceableComponent("views.messages.MImageBody") export default class MImageBody extends React.Component { static contextType = RoomContext; public context!: React.ContextType; diff --git a/src/components/views/messages/MJitsiWidgetEvent.tsx b/src/components/views/messages/MJitsiWidgetEvent.tsx index 03448bf0d2..86796aac17 100644 --- a/src/components/views/messages/MJitsiWidgetEvent.tsx +++ b/src/components/views/messages/MJitsiWidgetEvent.tsx @@ -22,14 +22,12 @@ import WidgetStore from "../../../stores/WidgetStore"; import EventTileBubble from "./EventTileBubble"; import { MatrixClientPeg } from "../../../MatrixClientPeg"; import { Container, WidgetLayoutStore } from "../../../stores/widgets/WidgetLayoutStore"; -import { replaceableComponent } from "../../../utils/replaceableComponent"; interface IProps { mxEvent: MatrixEvent; timestamp?: JSX.Element; } -@replaceableComponent("views.messages.MJitsiWidgetEvent") export default class MJitsiWidgetEvent extends React.PureComponent { constructor(props) { super(props); diff --git a/src/components/views/messages/MKeyVerificationConclusion.tsx b/src/components/views/messages/MKeyVerificationConclusion.tsx index 1e5312c4a5..9f1be7e76e 100644 --- a/src/components/views/messages/MKeyVerificationConclusion.tsx +++ b/src/components/views/messages/MKeyVerificationConclusion.tsx @@ -28,7 +28,6 @@ import { MatrixClientPeg } from '../../../MatrixClientPeg'; import { _t } from '../../../languageHandler'; import { getNameForEventRoom, userLabelForEventRoom } from '../../../utils/KeyVerificationStateObserver'; import EventTileBubble from "./EventTileBubble"; -import { replaceableComponent } from "../../../utils/replaceableComponent"; interface IProps { /* the MatrixEvent to show */ @@ -36,7 +35,6 @@ interface IProps { timestamp?: JSX.Element; } -@replaceableComponent("views.messages.MKeyVerificationConclusion") export default class MKeyVerificationConclusion extends React.Component { constructor(props: IProps) { super(props); diff --git a/src/components/views/messages/MKeyVerificationRequest.tsx b/src/components/views/messages/MKeyVerificationRequest.tsx index 457fbfc819..fb1210b33c 100644 --- a/src/components/views/messages/MKeyVerificationRequest.tsx +++ b/src/components/views/messages/MKeyVerificationRequest.tsx @@ -24,7 +24,6 @@ import { _t } from '../../../languageHandler'; import { getNameForEventRoom, userLabelForEventRoom } from '../../../utils/KeyVerificationStateObserver'; import { RightPanelPhases } from '../../../stores/right-panel/RightPanelStorePhases'; import EventTileBubble from "./EventTileBubble"; -import { replaceableComponent } from "../../../utils/replaceableComponent"; import AccessibleButton from '../elements/AccessibleButton'; import RightPanelStore from '../../../stores/right-panel/RightPanelStore'; @@ -33,7 +32,6 @@ interface IProps { timestamp?: JSX.Element; } -@replaceableComponent("views.messages.MKeyVerificationRequest") export default class MKeyVerificationRequest extends React.Component { public componentDidMount() { const request = this.props.mxEvent.verificationRequest; diff --git a/src/components/views/messages/MLocationBody.tsx b/src/components/views/messages/MLocationBody.tsx index d824917dad..f56b1ae906 100644 --- a/src/components/views/messages/MLocationBody.tsx +++ b/src/components/views/messages/MLocationBody.tsx @@ -24,7 +24,6 @@ import { } from 'matrix-js-sdk/src/@types/location'; import { ClientEvent, IClientWellKnown } from 'matrix-js-sdk/src/client'; -import { replaceableComponent } from "../../../utils/replaceableComponent"; import { IBodyProps } from "./IBodyProps"; import { _t } from '../../../languageHandler'; import MemberAvatar from '../avatars/MemberAvatar'; @@ -47,7 +46,6 @@ interface IState { error: Error; } -@replaceableComponent("views.messages.MLocationBody") export default class MLocationBody extends React.Component { public static contextType = MatrixClientContext; public context!: React.ContextType; diff --git a/src/components/views/messages/MPollBody.tsx b/src/components/views/messages/MPollBody.tsx index 3b05c09f7a..bea4266d2e 100644 --- a/src/components/views/messages/MPollBody.tsx +++ b/src/components/views/messages/MPollBody.tsx @@ -32,7 +32,6 @@ import { import { RelatedRelations } from "matrix-js-sdk/src/models/related-relations"; import { _t } from '../../../languageHandler'; -import { replaceableComponent } from "../../../utils/replaceableComponent"; import Modal from '../../../Modal'; import { IBodyProps } from "./IBodyProps"; import { formatCommaSeparatedList } from '../../../utils/FormattingUtils'; @@ -210,7 +209,6 @@ export function launchPollEditor(mxEvent: MatrixEvent, getRelationsForEvent?: Ge } } -@replaceableComponent("views.messages.MPollBody") export default class MPollBody extends React.Component { public static contextType = MatrixClientContext; public context!: React.ContextType; diff --git a/src/components/views/messages/MStickerBody.tsx b/src/components/views/messages/MStickerBody.tsx index 192cf1dd97..c29d4c225b 100644 --- a/src/components/views/messages/MStickerBody.tsx +++ b/src/components/views/messages/MStickerBody.tsx @@ -17,11 +17,9 @@ limitations under the License. import React from 'react'; import MImageBody from './MImageBody'; -import { replaceableComponent } from "../../../utils/replaceableComponent"; import { BLURHASH_FIELD } from "../../../ContentMessages"; import Tooltip from "../elements/Tooltip"; -@replaceableComponent("views.messages.MStickerBody") export default class MStickerBody extends MImageBody { // Mostly empty to prevent default behaviour of MImageBody protected onClick = (ev: React.MouseEvent) => { diff --git a/src/components/views/messages/MVideoBody.tsx b/src/components/views/messages/MVideoBody.tsx index 631618ae01..cacd19c5a8 100644 --- a/src/components/views/messages/MVideoBody.tsx +++ b/src/components/views/messages/MVideoBody.tsx @@ -21,7 +21,6 @@ import { logger } from "matrix-js-sdk/src/logger"; import { _t } from '../../../languageHandler'; import SettingsStore from "../../../settings/SettingsStore"; import InlineSpinner from '../elements/InlineSpinner'; -import { replaceableComponent } from "../../../utils/replaceableComponent"; import { mediaFromContent } from "../../../customisations/Media"; import { BLURHASH_FIELD } from "../../../ContentMessages"; import { IMediaEventContent } from "../../../customisations/models/IMediaEventContent"; @@ -40,7 +39,6 @@ interface IState { blurhashUrl: string; } -@replaceableComponent("views.messages.MVideoBody") export default class MVideoBody extends React.PureComponent { static contextType = RoomContext; public context!: React.ContextType; diff --git a/src/components/views/messages/MVoiceMessageBody.tsx b/src/components/views/messages/MVoiceMessageBody.tsx index 847f15bc9c..65521225ba 100644 --- a/src/components/views/messages/MVoiceMessageBody.tsx +++ b/src/components/views/messages/MVoiceMessageBody.tsx @@ -16,14 +16,12 @@ limitations under the License. import React from "react"; -import { replaceableComponent } from "../../../utils/replaceableComponent"; import InlineSpinner from '../elements/InlineSpinner'; import { _t } from "../../../languageHandler"; import RecordingPlayback from "../audio_messages/RecordingPlayback"; import MAudioBody from "./MAudioBody"; import MFileBody from "./MFileBody"; -@replaceableComponent("views.messages.MVoiceMessageBody") export default class MVoiceMessageBody extends MAudioBody { // A voice message is an audio file but rendered in a special way. public render() { diff --git a/src/components/views/messages/MVoiceOrAudioBody.tsx b/src/components/views/messages/MVoiceOrAudioBody.tsx index cec042a7ff..fb6391087a 100644 --- a/src/components/views/messages/MVoiceOrAudioBody.tsx +++ b/src/components/views/messages/MVoiceOrAudioBody.tsx @@ -17,12 +17,10 @@ limitations under the License. import React from "react"; import MAudioBody from "./MAudioBody"; -import { replaceableComponent } from "../../../utils/replaceableComponent"; import MVoiceMessageBody from "./MVoiceMessageBody"; import { IBodyProps } from "./IBodyProps"; import { isVoiceMessage } from "../../../utils/EventUtils"; -@replaceableComponent("views.messages.MVoiceOrAudioBody") export default class MVoiceOrAudioBody extends React.PureComponent { public render() { if (!this.props.forExport && isVoiceMessage(this.props.mxEvent)) { diff --git a/src/components/views/messages/MessageActionBar.tsx b/src/components/views/messages/MessageActionBar.tsx index 3dabbea89f..673d664f81 100644 --- a/src/components/views/messages/MessageActionBar.tsx +++ b/src/components/views/messages/MessageActionBar.tsx @@ -29,7 +29,6 @@ import { isContentActionable, canEditContent, editEvent } from '../../../utils/E import RoomContext, { TimelineRenderingType } from "../../../contexts/RoomContext"; import Toolbar from "../../../accessibility/Toolbar"; import { RovingAccessibleTooltipButton, useRovingTabIndex } from "../../../accessibility/RovingTabIndex"; -import { replaceableComponent } from "../../../utils/replaceableComponent"; import MessageContextMenu, { canCancel } from "../context_menus/MessageContextMenu"; import Resend from "../../../Resend"; import { MatrixClientPeg } from "../../../MatrixClientPeg"; @@ -170,7 +169,6 @@ interface IMessageActionBarProps { ) => Relations; } -@replaceableComponent("views.messages.MessageActionBar") export default class MessageActionBar extends React.PureComponent { public static contextType = RoomContext; diff --git a/src/components/views/messages/MessageEvent.tsx b/src/components/views/messages/MessageEvent.tsx index 68281beaee..18c145175d 100644 --- a/src/components/views/messages/MessageEvent.tsx +++ b/src/components/views/messages/MessageEvent.tsx @@ -25,7 +25,6 @@ import SettingsStore from "../../../settings/SettingsStore"; import { Mjolnir } from "../../../mjolnir/Mjolnir"; import RedactedBody from "./RedactedBody"; import UnknownBody from "./UnknownBody"; -import { replaceableComponent } from "../../../utils/replaceableComponent"; import { IMediaBody } from "./IMediaBody"; import { IOperableEventTile } from "../context_menus/MessageContextMenu"; import { MediaEventHelper } from "../../../utils/MediaEventHelper"; @@ -45,7 +44,6 @@ interface IProps extends Omit { isSeeingThroughMessageHiddenForModeration?: boolean; } -@replaceableComponent("views.messages.MessageEvent") export default class MessageEvent extends React.Component implements IMediaBody, IOperableEventTile { private body: React.RefObject = createRef(); private mediaHelper: MediaEventHelper; diff --git a/src/components/views/messages/MessageTimestamp.tsx b/src/components/views/messages/MessageTimestamp.tsx index cbf37f47f6..9b5c280705 100644 --- a/src/components/views/messages/MessageTimestamp.tsx +++ b/src/components/views/messages/MessageTimestamp.tsx @@ -18,7 +18,6 @@ limitations under the License. import React from 'react'; import { formatFullDate, formatTime, formatFullTime, formatRelativeTime } from '../../../DateUtils'; -import { replaceableComponent } from "../../../utils/replaceableComponent"; interface IProps { ts: number; @@ -28,7 +27,6 @@ interface IProps { showRelative?: boolean; } -@replaceableComponent("views.messages.MessageTimestamp") export default class MessageTimestamp extends React.Component { public render() { const date = new Date(this.props.ts); diff --git a/src/components/views/messages/MjolnirBody.tsx b/src/components/views/messages/MjolnirBody.tsx index 14956554f1..b3ca769ba5 100644 --- a/src/components/views/messages/MjolnirBody.tsx +++ b/src/components/views/messages/MjolnirBody.tsx @@ -18,7 +18,6 @@ import React from 'react'; import { MatrixEvent } from "matrix-js-sdk/src/models/event"; import { _t } from '../../../languageHandler'; -import { replaceableComponent } from "../../../utils/replaceableComponent"; import AccessibleButton from '../elements/AccessibleButton'; interface IProps { @@ -26,7 +25,6 @@ interface IProps { onMessageAllowed: () => void; } -@replaceableComponent("views.messages.MjolnirBody") export default class MjolnirBody extends React.Component { private onAllowClick = (e: React.MouseEvent): void => { e.preventDefault(); diff --git a/src/components/views/messages/ReactionsRow.tsx b/src/components/views/messages/ReactionsRow.tsx index 7cce3238b7..0c06474635 100644 --- a/src/components/views/messages/ReactionsRow.tsx +++ b/src/components/views/messages/ReactionsRow.tsx @@ -21,7 +21,6 @@ import { Relations, RelationsEvent } from "matrix-js-sdk/src/models/relations"; import { _t } from '../../../languageHandler'; import { isContentActionable } from '../../../utils/EventUtils'; -import { replaceableComponent } from "../../../utils/replaceableComponent"; import { ContextMenuTooltipButton } from "../../../accessibility/context_menu/ContextMenuTooltipButton"; import ContextMenu, { aboveLeftOf, useContextMenu } from "../../structures/ContextMenu"; import ReactionPicker from "../emojipicker/ReactionPicker"; @@ -74,7 +73,6 @@ interface IState { showAll: boolean; } -@replaceableComponent("views.messages.ReactionsRow") export default class ReactionsRow extends React.PureComponent { static contextType = RoomContext; public context!: React.ContextType; diff --git a/src/components/views/messages/ReactionsRowButton.tsx b/src/components/views/messages/ReactionsRowButton.tsx index 242428ed36..d3fcb2faa6 100644 --- a/src/components/views/messages/ReactionsRowButton.tsx +++ b/src/components/views/messages/ReactionsRowButton.tsx @@ -21,7 +21,6 @@ import { MatrixEvent } from "matrix-js-sdk/src/models/event"; import { _t } from '../../../languageHandler'; import { formatCommaSeparatedList } from '../../../utils/FormattingUtils'; import dis from "../../../dispatcher/dispatcher"; -import { replaceableComponent } from "../../../utils/replaceableComponent"; import ReactionsRowButtonTooltip from "./ReactionsRowButtonTooltip"; import AccessibleButton from "../elements/AccessibleButton"; import MatrixClientContext from "../../../contexts/MatrixClientContext"; @@ -46,7 +45,6 @@ interface IState { tooltipVisible: boolean; } -@replaceableComponent("views.messages.ReactionsRowButton") export default class ReactionsRowButton extends React.PureComponent { static contextType = MatrixClientContext; diff --git a/src/components/views/messages/ReactionsRowButtonTooltip.tsx b/src/components/views/messages/ReactionsRowButtonTooltip.tsx index 9c43c0df77..cb714d1fba 100644 --- a/src/components/views/messages/ReactionsRowButtonTooltip.tsx +++ b/src/components/views/messages/ReactionsRowButtonTooltip.tsx @@ -20,7 +20,6 @@ import { MatrixEvent } from "matrix-js-sdk/src/models/event"; import { unicodeToShortcode } from '../../../HtmlUtils'; import { _t } from '../../../languageHandler'; import { formatCommaSeparatedList } from '../../../utils/FormattingUtils'; -import { replaceableComponent } from "../../../utils/replaceableComponent"; import Tooltip from "../elements/Tooltip"; import MatrixClientContext from "../../../contexts/MatrixClientContext"; @@ -34,7 +33,6 @@ interface IProps { visible: boolean; } -@replaceableComponent("views.messages.ReactionsRowButtonTooltip") export default class ReactionsRowButtonTooltip extends React.PureComponent { static contextType = MatrixClientContext; diff --git a/src/components/views/messages/RoomAvatarEvent.tsx b/src/components/views/messages/RoomAvatarEvent.tsx index 9cb91c7c44..3cac4d29c5 100644 --- a/src/components/views/messages/RoomAvatarEvent.tsx +++ b/src/components/views/messages/RoomAvatarEvent.tsx @@ -23,7 +23,6 @@ import { MatrixClientPeg } from '../../../MatrixClientPeg'; import { _t } from '../../../languageHandler'; import Modal from '../../../Modal'; import AccessibleButton from '../elements/AccessibleButton'; -import { replaceableComponent } from "../../../utils/replaceableComponent"; import { mediaFromMxc } from "../../../customisations/Media"; import RoomAvatar from "../avatars/RoomAvatar"; import ImageView from "../elements/ImageView"; @@ -33,7 +32,6 @@ interface IProps { mxEvent: MatrixEvent; } -@replaceableComponent("views.messages.RoomAvatarEvent") export default class RoomAvatarEvent extends React.Component { private onAvatarClick = (): void => { const cli = MatrixClientPeg.get(); diff --git a/src/components/views/messages/RoomCreate.tsx b/src/components/views/messages/RoomCreate.tsx index c2d407c8b9..bd723a5c48 100644 --- a/src/components/views/messages/RoomCreate.tsx +++ b/src/components/views/messages/RoomCreate.tsx @@ -24,7 +24,6 @@ import { RoomPermalinkCreator } from '../../../utils/permalinks/Permalinks'; import { _t } from '../../../languageHandler'; import { MatrixClientPeg } from '../../../MatrixClientPeg'; import EventTileBubble from "./EventTileBubble"; -import { replaceableComponent } from "../../../utils/replaceableComponent"; import { ViewRoomPayload } from "../../../dispatcher/payloads/ViewRoomPayload"; interface IProps { @@ -33,7 +32,6 @@ interface IProps { timestamp?: JSX.Element; } -@replaceableComponent("views.messages.RoomCreate") export default class RoomCreate extends React.Component { private onLinkClicked = (e: React.MouseEvent): void => { e.preventDefault(); diff --git a/src/components/views/messages/SenderProfile.tsx b/src/components/views/messages/SenderProfile.tsx index 694b74da66..da7d1206d1 100644 --- a/src/components/views/messages/SenderProfile.tsx +++ b/src/components/views/messages/SenderProfile.tsx @@ -19,7 +19,6 @@ import { MatrixEvent } from "matrix-js-sdk/src/models/event"; import { MsgType } from "matrix-js-sdk/src/@types/event"; import MatrixClientContext from "../../../contexts/MatrixClientContext"; -import { replaceableComponent } from "../../../utils/replaceableComponent"; import DisambiguatedProfile from "./DisambiguatedProfile"; import RoomContext, { TimelineRenderingType } from '../../../contexts/RoomContext'; import SettingsStore from "../../../settings/SettingsStore"; @@ -30,7 +29,6 @@ interface IProps { onClick?(): void; } -@replaceableComponent("views.messages.SenderProfile") export default class SenderProfile extends React.PureComponent { public static contextType = MatrixClientContext; public context!: React.ContextType; diff --git a/src/components/views/messages/TextualBody.tsx b/src/components/views/messages/TextualBody.tsx index 9ec9980fb8..3584b5130f 100644 --- a/src/components/views/messages/TextualBody.tsx +++ b/src/components/views/messages/TextualBody.tsx @@ -33,7 +33,6 @@ import { IntegrationManagers } from "../../../integrations/IntegrationManagers"; import { isPermalinkHost, tryTransformPermalinkToLocalHref } from "../../../utils/permalinks/Permalinks"; import { copyPlaintext } from "../../../utils/strings"; import AccessibleTooltipButton from "../elements/AccessibleTooltipButton"; -import { replaceableComponent } from "../../../utils/replaceableComponent"; import UIStore from "../../../stores/UIStore"; import { ComposerInsertPayload } from "../../../dispatcher/payloads/ComposerInsertPayload"; import { Action } from "../../../dispatcher/actions"; @@ -59,7 +58,6 @@ interface IState { widgetHidden: boolean; } -@replaceableComponent("views.messages.TextualBody") export default class TextualBody extends React.Component { private readonly contentRef = createRef(); diff --git a/src/components/views/messages/TextualEvent.tsx b/src/components/views/messages/TextualEvent.tsx index 8fc116b5d0..c92d7b55c7 100644 --- a/src/components/views/messages/TextualEvent.tsx +++ b/src/components/views/messages/TextualEvent.tsx @@ -19,13 +19,11 @@ import { MatrixEvent } from "matrix-js-sdk/src/models/event"; import RoomContext from "../../../contexts/RoomContext"; import * as TextForEvent from "../../../TextForEvent"; -import { replaceableComponent } from "../../../utils/replaceableComponent"; interface IProps { mxEvent: MatrixEvent; } -@replaceableComponent("views.messages.TextualEvent") export default class TextualEvent extends React.Component { static contextType = RoomContext; diff --git a/src/components/views/messages/TileErrorBoundary.tsx b/src/components/views/messages/TileErrorBoundary.tsx index 9f3b751dd3..c30a68bb96 100644 --- a/src/components/views/messages/TileErrorBoundary.tsx +++ b/src/components/views/messages/TileErrorBoundary.tsx @@ -21,7 +21,6 @@ import { MatrixEvent } from "matrix-js-sdk/src/models/event"; import { _t } from '../../../languageHandler'; import Modal from '../../../Modal'; import SdkConfig from "../../../SdkConfig"; -import { replaceableComponent } from "../../../utils/replaceableComponent"; import BugReportDialog from '../dialogs/BugReportDialog'; import AccessibleButton from '../elements/AccessibleButton'; import SettingsStore from "../../../settings/SettingsStore"; @@ -37,7 +36,6 @@ interface IState { error: Error; } -@replaceableComponent("views.messages.TileErrorBoundary") export default class TileErrorBoundary extends React.Component { constructor(props) { super(props); diff --git a/src/components/views/messages/ViewSourceEvent.tsx b/src/components/views/messages/ViewSourceEvent.tsx index ad833936e4..b4cca0b5cc 100644 --- a/src/components/views/messages/ViewSourceEvent.tsx +++ b/src/components/views/messages/ViewSourceEvent.tsx @@ -18,7 +18,6 @@ import React from 'react'; import { MatrixEvent, MatrixEventEvent } from 'matrix-js-sdk/src/matrix'; import classNames from 'classnames'; -import { replaceableComponent } from "../../../utils/replaceableComponent"; import { MatrixClientPeg } from "../../../MatrixClientPeg"; import { _t } from '../../../languageHandler'; import AccessibleButton from '../elements/AccessibleButton'; @@ -31,7 +30,6 @@ interface IState { expanded: boolean; } -@replaceableComponent("views.messages.ViewSourceEvent") export default class ViewSourceEvent extends React.PureComponent { constructor(props) { super(props); diff --git a/src/components/views/right_panel/HeaderButton.tsx b/src/components/views/right_panel/HeaderButton.tsx index 7f6c22fbd3..7b32b1993a 100644 --- a/src/components/views/right_panel/HeaderButton.tsx +++ b/src/components/views/right_panel/HeaderButton.tsx @@ -23,7 +23,6 @@ import classNames from 'classnames'; import Analytics from '../../../Analytics'; import AccessibleTooltipButton from "../elements/AccessibleTooltipButton"; -import { replaceableComponent } from "../../../utils/replaceableComponent"; import { ButtonEvent } from "../elements/AccessibleButton"; interface IProps { @@ -41,7 +40,6 @@ interface IProps { } // TODO: replace this, the composer buttons and the right panel buttons with a unified representation -@replaceableComponent("views.right_panel.HeaderButton") export default class HeaderButton extends React.Component { private onClick = (ev: ButtonEvent) => { Analytics.trackEvent(...this.props.analytics); diff --git a/src/components/views/right_panel/HeaderButtons.tsx b/src/components/views/right_panel/HeaderButtons.tsx index a3f2f6bb9f..a152a8871f 100644 --- a/src/components/views/right_panel/HeaderButtons.tsx +++ b/src/components/views/right_panel/HeaderButtons.tsx @@ -24,7 +24,6 @@ import dis from '../../../dispatcher/dispatcher'; import RightPanelStore from "../../../stores/right-panel/RightPanelStore"; import { RightPanelPhases } from '../../../stores/right-panel/RightPanelStorePhases'; import { IRightPanelCardState } from '../../../stores/right-panel/RightPanelStoreIPanelState'; -import { replaceableComponent } from "../../../utils/replaceableComponent"; import { UPDATE_EVENT } from '../../../stores/AsyncStore'; import { NotificationColor } from '../../../stores/notifications/NotificationColor'; @@ -40,7 +39,6 @@ interface IState { interface IProps {} -@replaceableComponent("views.right_panel.HeaderButtons") export default abstract class HeaderButtons

extends React.Component { private unmounted = false; private dispatcherRef: string; diff --git a/src/components/views/right_panel/RoomHeaderButtons.tsx b/src/components/views/right_panel/RoomHeaderButtons.tsx index aa2a8ffd63..f44b8a181c 100644 --- a/src/components/views/right_panel/RoomHeaderButtons.tsx +++ b/src/components/views/right_panel/RoomHeaderButtons.tsx @@ -29,7 +29,6 @@ import { RightPanelPhases } from '../../../stores/right-panel/RightPanelStorePha import { Action } from "../../../dispatcher/actions"; import { ActionPayload } from "../../../dispatcher/payloads"; import RightPanelStore from "../../../stores/right-panel/RightPanelStore"; -import { replaceableComponent } from "../../../utils/replaceableComponent"; import { useSettingValue } from "../../../hooks/useSettings"; import { useReadPinnedEvents, usePinnedEvents } from './PinnedMessagesCard'; import { showThreadPanel } from "../../../dispatcher/dispatch-actions/threads"; @@ -125,7 +124,6 @@ interface IProps { excludedRightPanelPhaseButtons?: Array; } -@replaceableComponent("views.right_panel.RoomHeaderButtons") export default class RoomHeaderButtons extends HeaderButtons { private static readonly THREAD_PHASES = [ RightPanelPhases.ThreadPanel, diff --git a/src/components/views/right_panel/TimelineCard.tsx b/src/components/views/right_panel/TimelineCard.tsx index bd7d4361cb..82f651281c 100644 --- a/src/components/views/right_panel/TimelineCard.tsx +++ b/src/components/views/right_panel/TimelineCard.tsx @@ -33,7 +33,6 @@ import EditorStateTransfer from '../../../utils/EditorStateTransfer'; import RoomContext, { TimelineRenderingType } from '../../../contexts/RoomContext'; import dis from '../../../dispatcher/dispatcher'; import { _t } from '../../../languageHandler'; -import { replaceableComponent } from '../../../utils/replaceableComponent'; import { ActionPayload } from '../../../dispatcher/payloads'; import { Action } from '../../../dispatcher/actions'; import RoomViewStore from '../../../stores/RoomViewStore'; @@ -71,7 +70,6 @@ interface IState { showReadReceipts?: boolean; } -@replaceableComponent("structures.TimelineCard") export default class TimelineCard extends React.Component { static contextType = RoomContext; diff --git a/src/components/views/right_panel/VerificationPanel.tsx b/src/components/views/right_panel/VerificationPanel.tsx index f08c197962..65a24b21ad 100644 --- a/src/components/views/right_panel/VerificationPanel.tsx +++ b/src/components/views/right_panel/VerificationPanel.tsx @@ -33,7 +33,6 @@ import { _t } from "../../../languageHandler"; import SdkConfig from "../../../SdkConfig"; import E2EIcon, { E2EState } from "../rooms/E2EIcon"; import Spinner from "../elements/Spinner"; -import { replaceableComponent } from "../../../utils/replaceableComponent"; import AccessibleButton from "../elements/AccessibleButton"; import VerificationShowSas from "../verification/VerificationShowSas"; @@ -54,7 +53,6 @@ interface IState { reciprocateQREvent?: ReciprocateQRCode["reciprocateQREvent"]; } -@replaceableComponent("views.right_panel.VerificationPanel") export default class VerificationPanel extends React.PureComponent { private hasVerifier: boolean; diff --git a/src/components/views/room_settings/AliasSettings.tsx b/src/components/views/room_settings/AliasSettings.tsx index ec84544aae..df1d57661b 100644 --- a/src/components/views/room_settings/AliasSettings.tsx +++ b/src/components/views/room_settings/AliasSettings.tsx @@ -26,7 +26,6 @@ import ErrorDialog from "../dialogs/ErrorDialog"; import AccessibleButton from "../elements/AccessibleButton"; import Modal from "../../../Modal"; import RoomPublishSetting from "./RoomPublishSetting"; -import { replaceableComponent } from "../../../utils/replaceableComponent"; import RoomAliasField from "../elements/RoomAliasField"; import MatrixClientContext from "../../../contexts/MatrixClientContext"; import SettingsFieldset from "../settings/SettingsFieldset"; @@ -95,7 +94,6 @@ interface IState { newAltAlias?: string; } -@replaceableComponent("views.room_settings.AliasSettings") export default class AliasSettings extends React.Component { public static contextType = MatrixClientContext; context: ContextType; diff --git a/src/components/views/room_settings/RoomProfileSettings.tsx b/src/components/views/room_settings/RoomProfileSettings.tsx index eb0c6ded1a..aff117681c 100644 --- a/src/components/views/room_settings/RoomProfileSettings.tsx +++ b/src/components/views/room_settings/RoomProfileSettings.tsx @@ -19,7 +19,6 @@ import React, { createRef } from 'react'; import { _t } from "../../../languageHandler"; import { MatrixClientPeg } from "../../../MatrixClientPeg"; import Field from "../elements/Field"; -import { replaceableComponent } from "../../../utils/replaceableComponent"; import { mediaFromMxc } from "../../../customisations/Media"; import AccessibleButton from "../elements/AccessibleButton"; import AvatarSetting from "../settings/AvatarSetting"; @@ -43,7 +42,6 @@ interface IState { } // TODO: Merge with ProfileSettings? -@replaceableComponent("views.room_settings.RoomProfileSettings") export default class RoomProfileSettings extends React.Component { private avatarUpload = createRef(); diff --git a/src/components/views/room_settings/RoomPublishSetting.tsx b/src/components/views/room_settings/RoomPublishSetting.tsx index 19eab62a8a..250635013d 100644 --- a/src/components/views/room_settings/RoomPublishSetting.tsx +++ b/src/components/views/room_settings/RoomPublishSetting.tsx @@ -20,7 +20,6 @@ import { Visibility } from "matrix-js-sdk/src/@types/partials"; import LabelledToggleSwitch from "../elements/LabelledToggleSwitch"; import { _t } from "../../../languageHandler"; import { MatrixClientPeg } from "../../../MatrixClientPeg"; -import { replaceableComponent } from "../../../utils/replaceableComponent"; import DirectoryCustomisations from '../../../customisations/Directory'; interface IProps { @@ -33,7 +32,6 @@ interface IState { isRoomPublished: boolean; } -@replaceableComponent("views.room_settings.RoomPublishSetting") export default class RoomPublishSetting extends React.PureComponent { constructor(props, context) { super(props, context); diff --git a/src/components/views/room_settings/UrlPreviewSettings.tsx b/src/components/views/room_settings/UrlPreviewSettings.tsx index 7c94db16c3..5810ea7ad7 100644 --- a/src/components/views/room_settings/UrlPreviewSettings.tsx +++ b/src/components/views/room_settings/UrlPreviewSettings.tsx @@ -26,7 +26,6 @@ import dis from "../../../dispatcher/dispatcher"; import { MatrixClientPeg } from "../../../MatrixClientPeg"; import { Action } from "../../../dispatcher/actions"; import { SettingLevel } from "../../../settings/SettingLevel"; -import { replaceableComponent } from "../../../utils/replaceableComponent"; import SettingsFlag from "../elements/SettingsFlag"; import SettingsFieldset from '../settings/SettingsFieldset'; import AccessibleButton from '../elements/AccessibleButton'; @@ -35,7 +34,6 @@ interface IProps { room: Room; } -@replaceableComponent("views.room_settings.UrlPreviewSettings") export default class UrlPreviewSettings extends React.Component { private onClickUserSettings = (e: React.MouseEvent): void => { e.preventDefault(); diff --git a/src/components/views/rooms/AppsDrawer.tsx b/src/components/views/rooms/AppsDrawer.tsx index eebba4f67c..22afea2490 100644 --- a/src/components/views/rooms/AppsDrawer.tsx +++ b/src/components/views/rooms/AppsDrawer.tsx @@ -32,7 +32,6 @@ import PercentageDistributor from "../../../resizer/distributors/percentage"; import { Container, WidgetLayoutStore } from "../../../stores/widgets/WidgetLayoutStore"; import { clamp, percentageOf, percentageWithin } from "../../../utils/numbers"; import { useStateCallback } from "../../../hooks/useStateCallback"; -import { replaceableComponent } from "../../../utils/replaceableComponent"; import UIStore from "../../../stores/UIStore"; import { IApp } from "../../../stores/WidgetStore"; import { ActionPayload } from "../../../dispatcher/payloads"; @@ -54,7 +53,6 @@ interface IState { resizing: boolean; } -@replaceableComponent("views.rooms.AppsDrawer") export default class AppsDrawer extends React.Component { private unmounted = false; private resizeContainer: HTMLDivElement; diff --git a/src/components/views/rooms/Autocomplete.tsx b/src/components/views/rooms/Autocomplete.tsx index d8d65ca113..58a659f537 100644 --- a/src/components/views/rooms/Autocomplete.tsx +++ b/src/components/views/rooms/Autocomplete.tsx @@ -22,7 +22,6 @@ import { Room } from 'matrix-js-sdk/src/models/room'; import Autocompleter, { ICompletion, ISelectionRange, IProviderCompletions } from '../../../autocomplete/Autocompleter'; import SettingsStore from "../../../settings/SettingsStore"; -import { replaceableComponent } from "../../../utils/replaceableComponent"; import RoomContext from '../../../contexts/RoomContext'; const MAX_PROVIDER_MATCHES = 20; @@ -50,7 +49,6 @@ interface IState { forceComplete: boolean; } -@replaceableComponent("views.rooms.Autocomplete") export default class Autocomplete extends React.PureComponent { autocompleter: Autocompleter; queryRequested: string; diff --git a/src/components/views/rooms/AuxPanel.tsx b/src/components/views/rooms/AuxPanel.tsx index 8c723429c5..a7f9a12229 100644 --- a/src/components/views/rooms/AuxPanel.tsx +++ b/src/components/views/rooms/AuxPanel.tsx @@ -29,7 +29,6 @@ import { UIFeature } from "../../../settings/UIFeature"; import ResizeNotifier from "../../../utils/ResizeNotifier"; import CallViewForRoom from '../voip/CallViewForRoom'; import { objectHasDiff } from "../../../utils/objects"; -import { replaceableComponent } from "../../../utils/replaceableComponent"; interface IProps { // js-sdk room object @@ -51,7 +50,6 @@ interface IState { counters: Counter[]; } -@replaceableComponent("views.rooms.AuxPanel") export default class AuxPanel extends React.Component { static defaultProps = { showApps: true, diff --git a/src/components/views/rooms/BasicMessageComposer.tsx b/src/components/views/rooms/BasicMessageComposer.tsx index fe5669f8c4..89981bda90 100644 --- a/src/components/views/rooms/BasicMessageComposer.tsx +++ b/src/components/views/rooms/BasicMessageComposer.tsx @@ -43,7 +43,6 @@ import AutocompleteWrapperModel from "../../../editor/autocomplete"; import DocumentPosition from '../../../editor/position'; import { ICompletion } from "../../../autocomplete/Autocompleter"; import { getKeyBindingsManager } from '../../../KeyBindingsManager'; -import { replaceableComponent } from "../../../utils/replaceableComponent"; import { ALTERNATE_KEY_NAME, KeyBindingAction } from '../../../accessibility/KeyboardShortcuts'; import { _t } from "../../../languageHandler"; @@ -112,7 +111,6 @@ interface IState { surroundWith: boolean; } -@replaceableComponent("views.rooms.BasicMessageEditor") export default class BasicMessageEditor extends React.Component { public readonly editorRef = createRef(); private autocompleteRef = createRef(); diff --git a/src/components/views/rooms/EditMessageComposer.tsx b/src/components/views/rooms/EditMessageComposer.tsx index b7564a5102..337ff7de25 100644 --- a/src/components/views/rooms/EditMessageComposer.tsx +++ b/src/components/views/rooms/EditMessageComposer.tsx @@ -35,7 +35,6 @@ import BasicMessageComposer, { REGEX_EMOTICON } from "./BasicMessageComposer"; import { CommandCategories } from '../../../SlashCommands'; import { Action } from "../../../dispatcher/actions"; import { getKeyBindingsManager } from '../../../KeyBindingsManager'; -import { replaceableComponent } from "../../../utils/replaceableComponent"; import SendHistoryManager from '../../../SendHistoryManager'; import { ActionPayload } from "../../../dispatcher/payloads"; import AccessibleButton from '../elements/AccessibleButton'; @@ -122,7 +121,6 @@ interface IState { saveDisabled: boolean; } -@replaceableComponent("views.rooms.EditMessageComposer") class EditMessageComposer extends React.Component { static contextType = RoomContext; context!: React.ContextType; diff --git a/src/components/views/rooms/EntityTile.tsx b/src/components/views/rooms/EntityTile.tsx index 1b459008de..c06d473299 100644 --- a/src/components/views/rooms/EntityTile.tsx +++ b/src/components/views/rooms/EntityTile.tsx @@ -22,7 +22,6 @@ import classNames from "classnames"; import AccessibleButton from '../elements/AccessibleButton'; import { _t, _td } from '../../../languageHandler'; import E2EIcon, { E2EState } from './E2EIcon'; -import { replaceableComponent } from "../../../utils/replaceableComponent"; import BaseAvatar from '../avatars/BaseAvatar'; import PresenceLabel from "./PresenceLabel"; @@ -85,7 +84,6 @@ interface IState { hover: boolean; } -@replaceableComponent("views.rooms.EntityTile") export default class EntityTile extends React.PureComponent { static defaultProps = { onClick: () => {}, diff --git a/src/components/views/rooms/EventTile.tsx b/src/components/views/rooms/EventTile.tsx index b73ec31e29..d830a4f5a1 100644 --- a/src/components/views/rooms/EventTile.tsx +++ b/src/components/views/rooms/EventTile.tsx @@ -45,7 +45,6 @@ import { WidgetType } from "../../../widgets/WidgetType"; import RoomAvatar from "../avatars/RoomAvatar"; import { WIDGET_LAYOUT_EVENT_TYPE } from "../../../stores/widgets/WidgetLayoutStore"; import { objectHasDiff } from "../../../utils/objects"; -import { replaceableComponent } from "../../../utils/replaceableComponent"; import Tooltip from "../elements/Tooltip"; import EditorStateTransfer from "../../../utils/EditorStateTransfer"; import { RoomPermalinkCreator } from '../../../utils/permalinks/Permalinks'; @@ -347,7 +346,6 @@ interface IState { } // MUST be rendered within a RoomContext with a set timelineRenderingType -@replaceableComponent("views.rooms.EventTile") export class UnwrappedEventTile extends React.Component { private suppressReadReceiptAnimation: boolean; private isListeningForReceipts: boolean; diff --git a/src/components/views/rooms/LinkPreviewWidget.tsx b/src/components/views/rooms/LinkPreviewWidget.tsx index 5e7154dc8a..d14c504dd8 100644 --- a/src/components/views/rooms/LinkPreviewWidget.tsx +++ b/src/components/views/rooms/LinkPreviewWidget.tsx @@ -23,7 +23,6 @@ import { linkifyElement } from '../../../HtmlUtils'; import SettingsStore from "../../../settings/SettingsStore"; import Modal from "../../../Modal"; import * as ImageUtils from "../../../ImageUtils"; -import { replaceableComponent } from "../../../utils/replaceableComponent"; import { mediaFromMxc } from "../../../customisations/Media"; import ImageView from '../elements/ImageView'; @@ -33,7 +32,6 @@ interface IProps { mxEvent: MatrixEvent; // the Event associated with the preview } -@replaceableComponent("views.rooms.LinkPreviewWidget") export default class LinkPreviewWidget extends React.Component { private readonly description = createRef(); private image = createRef(); diff --git a/src/components/views/rooms/MemberList.tsx b/src/components/views/rooms/MemberList.tsx index 8a9a728684..0500a33b92 100644 --- a/src/components/views/rooms/MemberList.tsx +++ b/src/components/views/rooms/MemberList.tsx @@ -36,7 +36,6 @@ import { MatrixClientPeg } from "../../../MatrixClientPeg"; import BaseCard from "../right_panel/BaseCard"; import RoomAvatar from "../avatars/RoomAvatar"; import RoomName from "../elements/RoomName"; -import { replaceableComponent } from "../../../utils/replaceableComponent"; import SettingsStore from "../../../settings/SettingsStore"; import TruncatedList from '../elements/TruncatedList'; import Spinner from "../elements/Spinner"; @@ -74,7 +73,6 @@ interface IState { truncateAtInvited: number; } -@replaceableComponent("views.rooms.MemberList") export default class MemberList extends React.Component { private showPresence = true; private mounted = false; diff --git a/src/components/views/rooms/MemberTile.tsx b/src/components/views/rooms/MemberTile.tsx index 24039adef2..b652771a43 100644 --- a/src/components/views/rooms/MemberTile.tsx +++ b/src/components/views/rooms/MemberTile.tsx @@ -30,7 +30,6 @@ import dis from "../../../dispatcher/dispatcher"; import { _t } from '../../../languageHandler'; import { MatrixClientPeg } from "../../../MatrixClientPeg"; import { Action } from "../../../dispatcher/actions"; -import { replaceableComponent } from "../../../utils/replaceableComponent"; import EntityTile, { PowerStatus } from "./EntityTile"; import MemberAvatar from "./../avatars/MemberAvatar"; import DisambiguatedProfile from "../messages/DisambiguatedProfile"; @@ -47,7 +46,6 @@ interface IState { e2eStatus: string; } -@replaceableComponent("views.rooms.MemberTile") export default class MemberTile extends React.Component { private userLastModifiedTime: number; private memberLastModifiedTime: number; diff --git a/src/components/views/rooms/MessageComposer.tsx b/src/components/views/rooms/MessageComposer.tsx index 6bd41fcf93..aed4536aa0 100644 --- a/src/components/views/rooms/MessageComposer.tsx +++ b/src/components/views/rooms/MessageComposer.tsx @@ -35,7 +35,6 @@ import { aboveLeftOf, AboveLeftOf } from "../../structures/ContextMenu"; import AccessibleTooltipButton from "../elements/AccessibleTooltipButton"; import ReplyPreview from "./ReplyPreview"; import { UPDATE_EVENT } from "../../../stores/AsyncStore"; -import { replaceableComponent } from "../../../utils/replaceableComponent"; import VoiceRecordComposerTile from "./VoiceRecordComposerTile"; import { VoiceRecordingStore } from "../../../stores/VoiceRecordingStore"; import { RecordingState, VoiceRecording } from "../../../audio/VoiceRecording"; @@ -91,7 +90,6 @@ interface IState { showPollsButton: boolean; } -@replaceableComponent("views.rooms.MessageComposer") export default class MessageComposer extends React.Component { private dispatcherRef: string; private messageComposerInput = createRef(); diff --git a/src/components/views/rooms/MessageComposerFormatBar.tsx b/src/components/views/rooms/MessageComposerFormatBar.tsx index b45be7b1c0..3258ce51af 100644 --- a/src/components/views/rooms/MessageComposerFormatBar.tsx +++ b/src/components/views/rooms/MessageComposerFormatBar.tsx @@ -19,7 +19,6 @@ import classNames from 'classnames'; import { _t } from '../../../languageHandler'; import AccessibleTooltipButton from "../elements/AccessibleTooltipButton"; -import { replaceableComponent } from "../../../utils/replaceableComponent"; export enum Formatting { Bold = "bold", @@ -39,7 +38,6 @@ interface IState { visible: boolean; } -@replaceableComponent("views.rooms.MessageComposerFormatBar") export default class MessageComposerFormatBar extends React.PureComponent { private readonly formatBarRef = createRef(); diff --git a/src/components/views/rooms/NotificationBadge.tsx b/src/components/views/rooms/NotificationBadge.tsx index 09a35125d2..51745209aa 100644 --- a/src/components/views/rooms/NotificationBadge.tsx +++ b/src/components/views/rooms/NotificationBadge.tsx @@ -22,7 +22,6 @@ import SettingsStore from "../../../settings/SettingsStore"; import AccessibleButton from "../elements/AccessibleButton"; import { XOR } from "../../../@types/common"; import { NotificationState, NotificationStateEvents } from "../../../stores/notifications/NotificationState"; -import { replaceableComponent } from "../../../utils/replaceableComponent"; import Tooltip from "../elements/Tooltip"; import { _t } from "../../../languageHandler"; import { NotificationColor } from "../../../stores/notifications/NotificationColor"; @@ -55,7 +54,6 @@ interface IState { showTooltip: boolean; } -@replaceableComponent("views.rooms.NotificationBadge") export default class NotificationBadge extends React.PureComponent, IState> { private countWatcherRef: string; diff --git a/src/components/views/rooms/PinnedEventTile.tsx b/src/components/views/rooms/PinnedEventTile.tsx index 3aa3677a25..8f6247b5f6 100644 --- a/src/components/views/rooms/PinnedEventTile.tsx +++ b/src/components/views/rooms/PinnedEventTile.tsx @@ -29,7 +29,6 @@ import MessageEvent from "../messages/MessageEvent"; import MemberAvatar from "../avatars/MemberAvatar"; import { _t } from '../../../languageHandler'; import { formatDate } from '../../../DateUtils'; -import { replaceableComponent } from "../../../utils/replaceableComponent"; import MatrixClientContext from "../../../contexts/MatrixClientContext"; import { getUserNameColorClass } from "../../../utils/FormattingUtils"; import AccessibleTooltipButton from "../elements/AccessibleTooltipButton"; @@ -42,7 +41,6 @@ interface IProps { const AVATAR_SIZE = 24; -@replaceableComponent("views.rooms.PinnedEventTile") export default class PinnedEventTile extends React.Component { public static contextType = MatrixClientContext; diff --git a/src/components/views/rooms/PresenceLabel.tsx b/src/components/views/rooms/PresenceLabel.tsx index 0ae3047f01..91361db770 100644 --- a/src/components/views/rooms/PresenceLabel.tsx +++ b/src/components/views/rooms/PresenceLabel.tsx @@ -18,7 +18,6 @@ import React from 'react'; import { UnstableValue } from "matrix-js-sdk/src/NamespacedValue"; import { _t } from '../../../languageHandler'; -import { replaceableComponent } from "../../../utils/replaceableComponent"; const BUSY_PRESENCE_NAME = new UnstableValue("busy", "org.matrix.msc3026.busy"); @@ -33,7 +32,6 @@ interface IProps { presenceState?: string; } -@replaceableComponent("views.rooms.PresenceLabel") export default class PresenceLabel extends React.Component { static defaultProps = { activeAgo: -1, diff --git a/src/components/views/rooms/ReadReceiptMarker.tsx b/src/components/views/rooms/ReadReceiptMarker.tsx index c83d6e1881..916d886447 100644 --- a/src/components/views/rooms/ReadReceiptMarker.tsx +++ b/src/components/views/rooms/ReadReceiptMarker.tsx @@ -23,7 +23,6 @@ import { _t } from '../../../languageHandler'; import { formatDate } from '../../../DateUtils'; import NodeAnimator from "../../../NodeAnimator"; import { toPx } from "../../../utils/units"; -import { replaceableComponent } from "../../../utils/replaceableComponent"; import MemberAvatar from '../avatars/MemberAvatar'; export interface IReadReceiptInfo { @@ -77,7 +76,6 @@ interface IReadReceiptMarkerStyle { left: number; } -@replaceableComponent("views.rooms.ReadReceiptMarker") export default class ReadReceiptMarker extends React.PureComponent { private avatar: React.RefObject = createRef(); diff --git a/src/components/views/rooms/ReplyPreview.tsx b/src/components/views/rooms/ReplyPreview.tsx index 69c0e14a45..72340e9981 100644 --- a/src/components/views/rooms/ReplyPreview.tsx +++ b/src/components/views/rooms/ReplyPreview.tsx @@ -20,7 +20,6 @@ import { MatrixEvent } from 'matrix-js-sdk/src/models/event'; import dis from '../../../dispatcher/dispatcher'; import { _t } from '../../../languageHandler'; import { RoomPermalinkCreator } from "../../../utils/permalinks/Permalinks"; -import { replaceableComponent } from "../../../utils/replaceableComponent"; import ReplyTile from './ReplyTile'; import RoomContext, { TimelineRenderingType } from '../../../contexts/RoomContext'; @@ -37,7 +36,6 @@ interface IProps { replyToEvent: MatrixEvent; } -@replaceableComponent("views.rooms.ReplyPreview") export default class ReplyPreview extends React.Component { public static contextType = RoomContext; diff --git a/src/components/views/rooms/ReplyTile.tsx b/src/components/views/rooms/ReplyTile.tsx index 3668397dc1..95d249dd16 100644 --- a/src/components/views/rooms/ReplyTile.tsx +++ b/src/components/views/rooms/ReplyTile.tsx @@ -28,7 +28,6 @@ import { RoomPermalinkCreator } from '../../../utils/permalinks/Permalinks'; import SenderProfile from "../messages/SenderProfile"; import MImageReplyBody from "../messages/MImageReplyBody"; import * as sdk from '../../../index'; -import { replaceableComponent } from '../../../utils/replaceableComponent'; import { getEventDisplayInfo, isVoiceMessage } from '../../../utils/EventUtils'; import MFileBody from "../messages/MFileBody"; import MVoiceMessageBody from "../messages/MVoiceMessageBody"; @@ -46,7 +45,6 @@ interface IProps { ); } -@replaceableComponent("views.rooms.ReplyTile") export default class ReplyTile extends React.PureComponent { private anchorElement = createRef(); diff --git a/src/components/views/rooms/RoomBreadcrumbs.tsx b/src/components/views/rooms/RoomBreadcrumbs.tsx index f4fc41c459..af06f41bf4 100644 --- a/src/components/views/rooms/RoomBreadcrumbs.tsx +++ b/src/components/views/rooms/RoomBreadcrumbs.tsx @@ -26,7 +26,6 @@ import Analytics from "../../../Analytics"; import { UPDATE_EVENT } from "../../../stores/AsyncStore"; import { useRovingTabIndex } from "../../../accessibility/RovingTabIndex"; import Toolbar from "../../../accessibility/Toolbar"; -import { replaceableComponent } from "../../../utils/replaceableComponent"; import { Action } from "../../../dispatcher/actions"; import AccessibleTooltipButton from "../elements/AccessibleTooltipButton"; import { ViewRoomPayload } from "../../../dispatcher/payloads/ViewRoomPayload"; @@ -71,7 +70,6 @@ const RoomBreadcrumbTile = ({ room, onClick }: { room: Room, onClick: (ev: Butto ); }; -@replaceableComponent("views.rooms.RoomBreadcrumbs") export default class RoomBreadcrumbs extends React.PureComponent { private isMounted = true; diff --git a/src/components/views/rooms/RoomDetailList.tsx b/src/components/views/rooms/RoomDetailList.tsx index 50a8f69d5e..eb909d1659 100644 --- a/src/components/views/rooms/RoomDetailList.tsx +++ b/src/components/views/rooms/RoomDetailList.tsx @@ -21,7 +21,6 @@ import classNames from 'classnames'; import dis from '../../../dispatcher/dispatcher'; import { Action } from '../../../dispatcher/actions'; import { _t } from '../../../languageHandler'; -import { replaceableComponent } from "../../../utils/replaceableComponent"; import RoomDetailRow from "./RoomDetailRow"; import { ViewRoomPayload } from "../../../dispatcher/payloads/ViewRoomPayload"; @@ -30,7 +29,6 @@ interface IProps { className?: string; } -@replaceableComponent("views.rooms.RoomDetailList") export default class RoomDetailList extends React.Component { private getRows(): JSX.Element[] { if (!this.props.rooms) return []; diff --git a/src/components/views/rooms/RoomDetailRow.js b/src/components/views/rooms/RoomDetailRow.js index 99ba410431..72d40cf6e0 100644 --- a/src/components/views/rooms/RoomDetailRow.js +++ b/src/components/views/rooms/RoomDetailRow.js @@ -20,7 +20,6 @@ import PropTypes from 'prop-types'; import * as sdk from '../../../index'; import { _t } from '../../../languageHandler'; import { linkifyElement } from '../../../HtmlUtils'; -import { replaceableComponent } from "../../../utils/replaceableComponent"; import { mediaFromMxc } from "../../../customisations/Media"; import { getDisplayAliasForAliasSet } from '../../../Rooms'; @@ -41,7 +40,6 @@ export const roomShape = PropTypes.shape({ guestCanJoin: PropTypes.bool, }); -@replaceableComponent("views.rooms.RoomDetailRow") export default class RoomDetailRow extends React.Component { static propTypes = { room: roomShape, diff --git a/src/components/views/rooms/RoomHeader.tsx b/src/components/views/rooms/RoomHeader.tsx index 9df1ba663c..b9d3936cb8 100644 --- a/src/components/views/rooms/RoomHeader.tsx +++ b/src/components/views/rooms/RoomHeader.tsx @@ -30,7 +30,6 @@ import DecoratedRoomAvatar from "../avatars/DecoratedRoomAvatar"; import AccessibleTooltipButton from "../elements/AccessibleTooltipButton"; import RoomTopic from "../elements/RoomTopic"; import RoomName from "../elements/RoomName"; -import { replaceableComponent } from "../../../utils/replaceableComponent"; import { E2EStatus } from '../../../utils/ShieldUtils'; import { IOOBData } from '../../../stores/ThreepidInviteStore'; import { SearchScope } from './SearchBar'; @@ -67,7 +66,6 @@ interface IState { contextMenuPosition?: DOMRect; } -@replaceableComponent("views.rooms.RoomHeader") export default class RoomHeader extends React.Component { static defaultProps = { editing: false, diff --git a/src/components/views/rooms/RoomList.tsx b/src/components/views/rooms/RoomList.tsx index d54ac55ffb..6444cbfe67 100644 --- a/src/components/views/rooms/RoomList.tsx +++ b/src/components/views/rooms/RoomList.tsx @@ -51,7 +51,6 @@ import { UPDATE_SUGGESTED_ROOMS, } from "../../../stores/spaces"; import { shouldShowSpaceInvite, showAddExistingRooms, showCreateNewRoom, showSpaceInvite } from "../../../utils/space"; -import { replaceableComponent } from "../../../utils/replaceableComponent"; import RoomAvatar from "../avatars/RoomAvatar"; import { shouldShowComponent } from "../../../customisations/helpers/UIComponents"; import { UIComponent } from "../../../settings/UIFeature"; @@ -349,7 +348,6 @@ const TAG_AESTHETICS: ITagAestheticsMap = { }, }; -@replaceableComponent("views.rooms.RoomList") export default class RoomList extends React.PureComponent { private dispatcherRef; private roomStoreToken: fbEmitter.EventSubscription; diff --git a/src/components/views/rooms/RoomPreviewBar.tsx b/src/components/views/rooms/RoomPreviewBar.tsx index 97a1f3e8e4..600c6c7cb1 100644 --- a/src/components/views/rooms/RoomPreviewBar.tsx +++ b/src/components/views/rooms/RoomPreviewBar.tsx @@ -27,7 +27,6 @@ import dis from '../../../dispatcher/dispatcher'; import { _t } from '../../../languageHandler'; import SdkConfig from "../../../SdkConfig"; import IdentityAuthClient from '../../../IdentityAuthClient'; -import { replaceableComponent } from "../../../utils/replaceableComponent"; import InviteReason from "../elements/InviteReason"; import { IOOBData } from "../../../stores/ThreepidInviteStore"; import Spinner from "../elements/Spinner"; @@ -98,7 +97,6 @@ interface IState { threePidFetchError?: MatrixError; } -@replaceableComponent("views.rooms.RoomPreviewBar") export default class RoomPreviewBar extends React.Component { static defaultProps = { onJoinClick() {}, diff --git a/src/components/views/rooms/RoomSublist.tsx b/src/components/views/rooms/RoomSublist.tsx index 3f03d11a76..f0a6616714 100644 --- a/src/components/views/rooms/RoomSublist.tsx +++ b/src/components/views/rooms/RoomSublist.tsx @@ -54,7 +54,6 @@ import { objectExcluding, objectHasDiff } from "../../../utils/objects"; import ExtraTile from "./ExtraTile"; import { ListNotificationState } from "../../../stores/notifications/ListNotificationState"; import { getKeyBindingsManager } from "../../../KeyBindingsManager"; -import { replaceableComponent } from "../../../utils/replaceableComponent"; import { KeyBindingAction } from "../../../accessibility/KeyboardShortcuts"; import { ViewRoomPayload } from "../../../dispatcher/payloads/ViewRoomPayload"; @@ -104,7 +103,6 @@ interface IState { filteredExtraTiles?: ReactComponentElement[]; } -@replaceableComponent("views.rooms.RoomSublist") export default class RoomSublist extends React.Component { private headerButton = createRef(); private sublistRef = createRef(); diff --git a/src/components/views/rooms/RoomTile.tsx b/src/components/views/rooms/RoomTile.tsx index bdea7ea9f8..6fbe956361 100644 --- a/src/components/views/rooms/RoomTile.tsx +++ b/src/components/views/rooms/RoomTile.tsx @@ -57,7 +57,6 @@ import IconizedContextMenu, { } from "../context_menus/IconizedContextMenu"; import VoiceChannelStore, { VoiceChannelEvent, IJitsiParticipant } from "../../../stores/VoiceChannelStore"; import { getConnectedMembers } from "../../../utils/VoiceChannelUtils"; -import { replaceableComponent } from "../../../utils/replaceableComponent"; import PosthogTrackers from "../../../PosthogTrackers"; import { ViewRoomPayload } from "../../../dispatcher/payloads/ViewRoomPayload"; import { KeyBindingAction } from "../../../accessibility/KeyboardShortcuts"; @@ -100,7 +99,6 @@ export const contextMenuBelow = (elementRect: PartialDOMRect) => { return { left, top, chevronFace }; }; -@replaceableComponent("views.rooms.RoomTile") export default class RoomTile extends React.PureComponent { private dispatcherRef: string; private roomTileRef = createRef(); diff --git a/src/components/views/rooms/RoomUpgradeWarningBar.tsx b/src/components/views/rooms/RoomUpgradeWarningBar.tsx index a9b121919b..47d19b8b5e 100644 --- a/src/components/views/rooms/RoomUpgradeWarningBar.tsx +++ b/src/components/views/rooms/RoomUpgradeWarningBar.tsx @@ -21,7 +21,6 @@ import { RoomStateEvent } from 'matrix-js-sdk/src/models/room-state'; import Modal from '../../../Modal'; import { _t } from '../../../languageHandler'; -import { replaceableComponent } from "../../../utils/replaceableComponent"; import RoomUpgradeDialog from '../dialogs/RoomUpgradeDialog'; import AccessibleButton from '../elements/AccessibleButton'; import MatrixClientContext from "../../../contexts/MatrixClientContext"; @@ -34,7 +33,6 @@ interface IState { upgraded?: boolean; } -@replaceableComponent("views.rooms.RoomUpgradeWarningBar") export default class RoomUpgradeWarningBar extends React.PureComponent { static contextType = MatrixClientContext; public context!: React.ContextType; diff --git a/src/components/views/rooms/SearchBar.tsx b/src/components/views/rooms/SearchBar.tsx index 7331a93e05..c42131bba0 100644 --- a/src/components/views/rooms/SearchBar.tsx +++ b/src/components/views/rooms/SearchBar.tsx @@ -21,7 +21,6 @@ import classNames from "classnames"; import AccessibleButton from "../elements/AccessibleButton"; import { _t } from '../../../languageHandler'; import DesktopBuildsNotice, { WarningKind } from "../elements/DesktopBuildsNotice"; -import { replaceableComponent } from "../../../utils/replaceableComponent"; import { PosthogScreenTracker } from '../../../PosthogTrackers'; import { getKeyBindingsManager } from "../../../KeyBindingsManager"; import { KeyBindingAction } from "../../../accessibility/KeyboardShortcuts"; @@ -42,7 +41,6 @@ export enum SearchScope { All = "All", } -@replaceableComponent("views.rooms.SearchBar") export default class SearchBar extends React.Component { private searchTerm: RefObject = createRef(); diff --git a/src/components/views/rooms/SearchResultTile.tsx b/src/components/views/rooms/SearchResultTile.tsx index 9dd673dff2..85bd5c0ed6 100644 --- a/src/components/views/rooms/SearchResultTile.tsx +++ b/src/components/views/rooms/SearchResultTile.tsx @@ -22,7 +22,6 @@ import { MatrixEvent } from "matrix-js-sdk/src/models/event"; import RoomContext, { TimelineRenderingType } from "../../../contexts/RoomContext"; import SettingsStore from "../../../settings/SettingsStore"; import { RoomPermalinkCreator } from '../../../utils/permalinks/Permalinks'; -import { replaceableComponent } from "../../../utils/replaceableComponent"; import DateSeparator from "../messages/DateSeparator"; import EventTile, { haveTileForEvent } from "./EventTile"; import { shouldFormContinuation } from "../../structures/MessagePanel"; @@ -40,7 +39,6 @@ interface IProps { permalinkCreator?: RoomPermalinkCreator; } -@replaceableComponent("views.rooms.SearchResultTile") export default class SearchResultTile extends React.Component { static contextType = RoomContext; public context!: React.ContextType; diff --git a/src/components/views/rooms/SendMessageComposer.tsx b/src/components/views/rooms/SendMessageComposer.tsx index 2bbf8294f7..713f46d435 100644 --- a/src/components/views/rooms/SendMessageComposer.tsx +++ b/src/components/views/rooms/SendMessageComposer.tsx @@ -47,7 +47,6 @@ import { containsEmoji } from "../../../effects/utils"; import { CHAT_EFFECTS } from '../../../effects'; import { MatrixClientPeg } from "../../../MatrixClientPeg"; import { getKeyBindingsManager } from '../../../KeyBindingsManager'; -import { replaceableComponent } from "../../../utils/replaceableComponent"; import SettingsStore from '../../../settings/SettingsStore'; import { RoomPermalinkCreator } from "../../../utils/permalinks/Permalinks"; import { ActionPayload } from "../../../dispatcher/payloads"; @@ -147,7 +146,6 @@ interface ISendMessageComposerProps extends MatrixClientProps { toggleStickerPickerOpen: () => void; } -@replaceableComponent("views.rooms.SendMessageComposer") export class SendMessageComposer extends React.Component { static contextType = RoomContext; public context!: React.ContextType; diff --git a/src/components/views/rooms/Stickerpicker.tsx b/src/components/views/rooms/Stickerpicker.tsx index c5de28b1d8..d6595e61fb 100644 --- a/src/components/views/rooms/Stickerpicker.tsx +++ b/src/components/views/rooms/Stickerpicker.tsx @@ -30,7 +30,6 @@ import SettingsStore from "../../../settings/SettingsStore"; import ContextMenu, { ChevronFace } from "../../structures/ContextMenu"; import { WidgetType } from "../../../widgets/WidgetType"; import { WidgetMessagingStore } from "../../../stores/widgets/WidgetMessagingStore"; -import { replaceableComponent } from "../../../utils/replaceableComponent"; import { ActionPayload } from '../../../dispatcher/payloads'; import ScalarAuthClient from '../../../ScalarAuthClient'; import GenericElementContextMenu from "../context_menus/GenericElementContextMenu"; @@ -59,7 +58,6 @@ interface IState { widgetId: string; } -@replaceableComponent("views.rooms.Stickerpicker") export default class Stickerpicker extends React.PureComponent { static defaultProps = { threadId: null, diff --git a/src/components/views/rooms/ThirdPartyMemberInfo.tsx b/src/components/views/rooms/ThirdPartyMemberInfo.tsx index b12348f842..6ff87cf52a 100644 --- a/src/components/views/rooms/ThirdPartyMemberInfo.tsx +++ b/src/components/views/rooms/ThirdPartyMemberInfo.tsx @@ -28,7 +28,6 @@ import Modal from "../../../Modal"; import { isValid3pidInvite } from "../../../RoomInvite"; import RoomAvatar from "../avatars/RoomAvatar"; import RoomName from "../elements/RoomName"; -import { replaceableComponent } from "../../../utils/replaceableComponent"; import ErrorDialog from '../dialogs/ErrorDialog'; import AccessibleButton from '../elements/AccessibleButton'; @@ -45,7 +44,6 @@ interface IState { senderName: string; } -@replaceableComponent("views.rooms.ThirdPartyMemberInfo") export default class ThirdPartyMemberInfo extends React.Component { private room: Room; diff --git a/src/components/views/rooms/TopUnreadMessagesBar.tsx b/src/components/views/rooms/TopUnreadMessagesBar.tsx index a9cb451783..f39b5ed58c 100644 --- a/src/components/views/rooms/TopUnreadMessagesBar.tsx +++ b/src/components/views/rooms/TopUnreadMessagesBar.tsx @@ -18,14 +18,12 @@ import React from 'react'; import { _t } from '../../../languageHandler'; import AccessibleButton from '../elements/AccessibleButton'; -import { replaceableComponent } from "../../../utils/replaceableComponent"; interface IProps { onScrollUpClick?: (e: React.MouseEvent) => void; onCloseClick?: (e: React.MouseEvent) => void; } -@replaceableComponent("views.rooms.TopUnreadMessagesBar") export default class TopUnreadMessagesBar extends React.PureComponent { public render(): JSX.Element { return ( diff --git a/src/components/views/rooms/VoiceRecordComposerTile.tsx b/src/components/views/rooms/VoiceRecordComposerTile.tsx index 448883645e..f31fc8f9fc 100644 --- a/src/components/views/rooms/VoiceRecordComposerTile.tsx +++ b/src/components/views/rooms/VoiceRecordComposerTile.tsx @@ -25,7 +25,6 @@ import { _t } from "../../../languageHandler"; import { IUpload, RecordingState, VoiceRecording } from "../../../audio/VoiceRecording"; import { MatrixClientPeg } from "../../../MatrixClientPeg"; import LiveRecordingWaveform from "../audio_messages/LiveRecordingWaveform"; -import { replaceableComponent } from "../../../utils/replaceableComponent"; import LiveRecordingClock from "../audio_messages/LiveRecordingClock"; import { VoiceRecordingStore } from "../../../stores/VoiceRecordingStore"; import { UPDATE_EVENT } from "../../../stores/AsyncStore"; @@ -52,7 +51,6 @@ interface IState { /** * Container tile for rendering the voice message recorder in the composer. */ -@replaceableComponent("views.rooms.VoiceRecordComposerTile") export default class VoiceRecordComposerTile extends React.PureComponent { public constructor(props) { super(props); diff --git a/src/components/views/rooms/WhoIsTypingTile.tsx b/src/components/views/rooms/WhoIsTypingTile.tsx index f0df814c87..e736a67012 100644 --- a/src/components/views/rooms/WhoIsTypingTile.tsx +++ b/src/components/views/rooms/WhoIsTypingTile.tsx @@ -24,7 +24,6 @@ import * as WhoIsTyping from '../../../WhoIsTyping'; import Timer from '../../../utils/Timer'; import { MatrixClientPeg } from '../../../MatrixClientPeg'; import MemberAvatar from '../avatars/MemberAvatar'; -import { replaceableComponent } from "../../../utils/replaceableComponent"; import { compare } from "../../../utils/strings"; interface IProps { @@ -47,7 +46,6 @@ interface IState { delayedStopTypingTimers: Record; } -@replaceableComponent("views.rooms.WhoIsTypingTile") export default class WhoIsTypingTile extends React.Component { static defaultProps = { whoIsTypingLimit: 3, diff --git a/src/components/views/settings/BridgeTile.tsx b/src/components/views/settings/BridgeTile.tsx index 5fa06e3ff3..7cc3d5e114 100644 --- a/src/components/views/settings/BridgeTile.tsx +++ b/src/components/views/settings/BridgeTile.tsx @@ -26,7 +26,6 @@ import { makeUserPermalink } from "../../../utils/permalinks/Permalinks"; import BaseAvatar from "../avatars/BaseAvatar"; import SettingsStore from "../../../settings/SettingsStore"; import { isUrlPermitted } from '../../../HtmlUtils'; -import { replaceableComponent } from "../../../utils/replaceableComponent"; import { mediaFromMxc } from "../../../customisations/Media"; interface IProps { @@ -66,7 +65,6 @@ interface IBridgeStateEvent { }; } -@replaceableComponent("views.settings.BridgeTile") export default class BridgeTile extends React.PureComponent { static propTypes = { ev: PropTypes.object.isRequired, diff --git a/src/components/views/settings/ChangeAvatar.tsx b/src/components/views/settings/ChangeAvatar.tsx index 98cc17f75d..e56de0b204 100644 --- a/src/components/views/settings/ChangeAvatar.tsx +++ b/src/components/views/settings/ChangeAvatar.tsx @@ -23,7 +23,6 @@ import { EventType } from "matrix-js-sdk/src/@types/event"; import { MatrixClientPeg } from "../../../MatrixClientPeg"; import { _t } from '../../../languageHandler'; import Spinner from '../elements/Spinner'; -import { replaceableComponent } from "../../../utils/replaceableComponent"; import { mediaFromMxc } from "../../../customisations/Media"; import RoomAvatar from '../avatars/RoomAvatar'; import BaseAvatar from '../avatars/BaseAvatar'; @@ -50,7 +49,6 @@ enum Phases { Error = "error", } -@replaceableComponent("views.settings.ChangeAvatar") export default class ChangeAvatar extends React.Component { public static defaultProps = { showUploadSection: true, diff --git a/src/components/views/settings/ChangeDisplayName.tsx b/src/components/views/settings/ChangeDisplayName.tsx index 3e1ff0cb7d..e3af9f51dd 100644 --- a/src/components/views/settings/ChangeDisplayName.tsx +++ b/src/components/views/settings/ChangeDisplayName.tsx @@ -18,10 +18,8 @@ import React from 'react'; import { MatrixClientPeg } from '../../../MatrixClientPeg'; import { _t } from '../../../languageHandler'; -import { replaceableComponent } from "../../../utils/replaceableComponent"; import EditableTextContainer from "../elements/EditableTextContainer"; -@replaceableComponent("views.settings.ChangeDisplayName") export default class ChangeDisplayName extends React.Component { private getDisplayName = async (): Promise => { const cli = MatrixClientPeg.get(); diff --git a/src/components/views/settings/ChangePassword.tsx b/src/components/views/settings/ChangePassword.tsx index 0c5520f3a3..f736e5f6f5 100644 --- a/src/components/views/settings/ChangePassword.tsx +++ b/src/components/views/settings/ChangePassword.tsx @@ -26,7 +26,6 @@ import withValidation, { IFieldState, IValidationResult } from '../elements/Vali import { _t, _td } from '../../../languageHandler'; import Modal from "../../../Modal"; import PassphraseField from "../auth/PassphraseField"; -import { replaceableComponent } from "../../../utils/replaceableComponent"; import { PASSWORD_MIN_SCORE } from '../auth/RegistrationForm'; import SetEmailDialog from "../dialogs/SetEmailDialog"; import QuestionDialog from "../dialogs/QuestionDialog"; @@ -63,7 +62,6 @@ interface IState { newPasswordConfirm: string; } -@replaceableComponent("views.settings.ChangePassword") export default class ChangePassword extends React.Component { public static defaultProps: Partial = { onFinished() {}, diff --git a/src/components/views/settings/CrossSigningPanel.tsx b/src/components/views/settings/CrossSigningPanel.tsx index e5e018be6a..5c6e650c9f 100644 --- a/src/components/views/settings/CrossSigningPanel.tsx +++ b/src/components/views/settings/CrossSigningPanel.tsx @@ -25,7 +25,6 @@ import Modal from '../../../Modal'; import Spinner from '../elements/Spinner'; import InteractiveAuthDialog from '../dialogs/InteractiveAuthDialog'; import ConfirmDestroyCrossSigningDialog from '../dialogs/security/ConfirmDestroyCrossSigningDialog'; -import { replaceableComponent } from "../../../utils/replaceableComponent"; import SetupEncryptionDialog from '../dialogs/security/SetupEncryptionDialog'; import { accessSecretStorage } from '../../../SecurityManager'; import AccessibleButton from "../elements/AccessibleButton"; @@ -41,7 +40,6 @@ interface IState { crossSigningReady?: boolean; } -@replaceableComponent("views.settings.CrossSigningPanel") export default class CrossSigningPanel extends React.PureComponent<{}, IState> { private unmounted = false; diff --git a/src/components/views/settings/CryptographyPanel.tsx b/src/components/views/settings/CryptographyPanel.tsx index 365c24ab40..dd580058af 100644 --- a/src/components/views/settings/CryptographyPanel.tsx +++ b/src/components/views/settings/CryptographyPanel.tsx @@ -19,7 +19,6 @@ import React, { ComponentType } from 'react'; import { MatrixClientPeg } from '../../../MatrixClientPeg'; import { _t } from '../../../languageHandler'; import Modal from '../../../Modal'; -import { replaceableComponent } from "../../../utils/replaceableComponent"; import AccessibleButton from "../elements/AccessibleButton"; import * as FormattingUtils from "../../../utils/FormattingUtils"; import SettingsStore from "../../../settings/SettingsStore"; @@ -32,7 +31,6 @@ interface IProps { interface IState { } -@replaceableComponent("views.settings.CryptographyPanel") export default class CryptographyPanel extends React.Component { constructor(props: IProps) { super(props); diff --git a/src/components/views/settings/DevicesPanel.tsx b/src/components/views/settings/DevicesPanel.tsx index 0b19d5605e..4779c013be 100644 --- a/src/components/views/settings/DevicesPanel.tsx +++ b/src/components/views/settings/DevicesPanel.tsx @@ -24,7 +24,6 @@ import { MatrixClientPeg } from '../../../MatrixClientPeg'; import { _t } from '../../../languageHandler'; import Modal from '../../../Modal'; import { SSOAuthEntry } from "../auth/InteractiveAuthEntryComponents"; -import { replaceableComponent } from "../../../utils/replaceableComponent"; import InteractiveAuthDialog from "../dialogs/InteractiveAuthDialog"; import DevicesPanelEntry from "./DevicesPanelEntry"; import Spinner from "../elements/Spinner"; @@ -42,7 +41,6 @@ interface IState { deleting?: boolean; } -@replaceableComponent("views.settings.DevicesPanel") export default class DevicesPanel extends React.Component { private unmounted = false; diff --git a/src/components/views/settings/DevicesPanelEntry.tsx b/src/components/views/settings/DevicesPanelEntry.tsx index dccfc70598..33a5939aa2 100644 --- a/src/components/views/settings/DevicesPanelEntry.tsx +++ b/src/components/views/settings/DevicesPanelEntry.tsx @@ -23,7 +23,6 @@ import { MatrixClientPeg } from '../../../MatrixClientPeg'; import { formatDate } from '../../../DateUtils'; import StyledCheckbox from '../elements/StyledCheckbox'; import { CheckboxStyle } from '../elements/StyledCheckbox'; -import { replaceableComponent } from "../../../utils/replaceableComponent"; import AccessibleButton from "../elements/AccessibleButton"; import Field from "../elements/Field"; import TextWithTooltip from "../elements/TextWithTooltip"; @@ -47,7 +46,6 @@ interface IState { displayName: string; } -@replaceableComponent("views.settings.DevicesPanelEntry") export default class DevicesPanelEntry extends React.Component { constructor(props: IProps) { super(props); diff --git a/src/components/views/settings/EventIndexPanel.tsx b/src/components/views/settings/EventIndexPanel.tsx index 9966e38de8..03ae821d5c 100644 --- a/src/components/views/settings/EventIndexPanel.tsx +++ b/src/components/views/settings/EventIndexPanel.tsx @@ -24,7 +24,6 @@ import AccessibleButton from "../elements/AccessibleButton"; import { formatBytes, formatCountLong } from "../../../utils/FormattingUtils"; import EventIndexPeg from "../../../indexing/EventIndexPeg"; import { SettingLevel } from "../../../settings/SettingLevel"; -import { replaceableComponent } from "../../../utils/replaceableComponent"; import SeshatResetDialog from '../dialogs/SeshatResetDialog'; import InlineSpinner from '../elements/InlineSpinner'; @@ -35,7 +34,6 @@ interface IState { eventIndexingEnabled: boolean; } -@replaceableComponent("views.settings.EventIndexPanel") export default class EventIndexPanel extends React.Component<{}, IState> { constructor(props) { super(props); diff --git a/src/components/views/settings/FontScalingPanel.tsx b/src/components/views/settings/FontScalingPanel.tsx index a9950dfcd9..55a36d256d 100644 --- a/src/components/views/settings/FontScalingPanel.tsx +++ b/src/components/views/settings/FontScalingPanel.tsx @@ -27,7 +27,6 @@ import { Layout } from "../../../settings/enums/Layout"; import { MatrixClientPeg } from '../../../MatrixClientPeg'; import { SettingLevel } from "../../../settings/SettingLevel"; import { _t } from "../../../languageHandler"; -import { replaceableComponent } from "../../../utils/replaceableComponent"; interface IProps { } @@ -45,7 +44,6 @@ interface IState { avatarUrl: string; } -@replaceableComponent("views.settings.tabs.user.FontScalingPanel") export default class FontScalingPanel extends React.Component { private readonly MESSAGE_PREVIEW_TEXT = _t("Hey you. You're the best!"); diff --git a/src/components/views/settings/IntegrationManager.tsx b/src/components/views/settings/IntegrationManager.tsx index c2faa126d2..d9a45860dc 100644 --- a/src/components/views/settings/IntegrationManager.tsx +++ b/src/components/views/settings/IntegrationManager.tsx @@ -18,7 +18,6 @@ import React from 'react'; import { _t } from '../../../languageHandler'; import dis from '../../../dispatcher/dispatcher'; -import { replaceableComponent } from "../../../utils/replaceableComponent"; import { ActionPayload } from '../../../dispatcher/payloads'; import Spinner from "../elements/Spinner"; import { getKeyBindingsManager } from "../../../KeyBindingsManager"; @@ -42,7 +41,6 @@ interface IState { errored: boolean; } -@replaceableComponent("views.settings.IntegrationManager") export default class IntegrationManager extends React.Component { private dispatcherRef: string; diff --git a/src/components/views/settings/ProfileSettings.tsx b/src/components/views/settings/ProfileSettings.tsx index 2088ec3abe..9db1d49d83 100644 --- a/src/components/views/settings/ProfileSettings.tsx +++ b/src/components/views/settings/ProfileSettings.tsx @@ -24,7 +24,6 @@ import { getHostingLink } from '../../../utils/HostingLink'; import { OwnProfileStore } from "../../../stores/OwnProfileStore"; import Modal from "../../../Modal"; import ErrorDialog from "../dialogs/ErrorDialog"; -import { replaceableComponent } from "../../../utils/replaceableComponent"; import { mediaFromMxc } from "../../../customisations/Media"; import AccessibleButton from '../elements/AccessibleButton'; import AvatarSetting from './AvatarSetting'; @@ -41,7 +40,6 @@ interface IState { enableProfileSave?: boolean; } -@replaceableComponent("views.settings.ProfileSettings") export default class ProfileSettings extends React.Component<{}, IState> { private avatarUpload: React.RefObject = createRef(); diff --git a/src/components/views/settings/SecureBackupPanel.tsx b/src/components/views/settings/SecureBackupPanel.tsx index ab489ad0ef..da5df6c7a7 100644 --- a/src/components/views/settings/SecureBackupPanel.tsx +++ b/src/components/views/settings/SecureBackupPanel.tsx @@ -30,7 +30,6 @@ import AccessibleButton from '../elements/AccessibleButton'; import QuestionDialog from '../dialogs/QuestionDialog'; import RestoreKeyBackupDialog from '../dialogs/security/RestoreKeyBackupDialog'; import { accessSecretStorage } from '../../../SecurityManager'; -import { replaceableComponent } from "../../../utils/replaceableComponent"; interface IState { loading: boolean; @@ -45,7 +44,6 @@ interface IState { sessionsRemaining: number; } -@replaceableComponent("views.settings.SecureBackupPanel") export default class SecureBackupPanel extends React.PureComponent<{}, IState> { private unmounted = false; diff --git a/src/components/views/settings/SetIdServer.tsx b/src/components/views/settings/SetIdServer.tsx index d38e908332..d50ae3d361 100644 --- a/src/components/views/settings/SetIdServer.tsx +++ b/src/components/views/settings/SetIdServer.tsx @@ -27,7 +27,6 @@ import IdentityAuthClient from "../../../IdentityAuthClient"; import { abbreviateUrl, unabbreviateUrl } from "../../../utils/UrlUtils"; import { getDefaultIdentityServerUrl, doesIdentityServerHaveTerms } from '../../../utils/IdentityServerUtils'; import { timeout } from "../../../utils/promise"; -import { replaceableComponent } from "../../../utils/replaceableComponent"; import { ActionPayload } from '../../../dispatcher/payloads'; import InlineSpinner from '../elements/InlineSpinner'; import AccessibleButton from '../elements/AccessibleButton'; @@ -80,7 +79,6 @@ interface IState { checking: boolean; } -@replaceableComponent("views.settings.SetIdServer") export default class SetIdServer extends React.Component { private dispatcherRef: string; diff --git a/src/components/views/settings/SetIntegrationManager.tsx b/src/components/views/settings/SetIntegrationManager.tsx index 100afea9a6..557cbaea61 100644 --- a/src/components/views/settings/SetIntegrationManager.tsx +++ b/src/components/views/settings/SetIntegrationManager.tsx @@ -22,7 +22,6 @@ import { IntegrationManagers } from "../../../integrations/IntegrationManagers"; import { IntegrationManagerInstance } from "../../../integrations/IntegrationManagerInstance"; import SettingsStore from "../../../settings/SettingsStore"; import { SettingLevel } from "../../../settings/SettingLevel"; -import { replaceableComponent } from "../../../utils/replaceableComponent"; import ToggleSwitch from "../elements/ToggleSwitch"; interface IProps { @@ -34,7 +33,6 @@ interface IState { provisioningEnabled: boolean; } -@replaceableComponent("views.settings.SetIntegrationManager") export default class SetIntegrationManager extends React.Component { constructor(props: IProps) { super(props); diff --git a/src/components/views/settings/SpellCheckSettings.tsx b/src/components/views/settings/SpellCheckSettings.tsx index 2864be34fc..83c3492a87 100644 --- a/src/components/views/settings/SpellCheckSettings.tsx +++ b/src/components/views/settings/SpellCheckSettings.tsx @@ -19,7 +19,6 @@ import React from 'react'; import SpellCheckLanguagesDropdown from "../../../components/views/elements/SpellCheckLanguagesDropdown"; import AccessibleButton from "../../../components/views/elements/AccessibleButton"; import { _t } from "../../../languageHandler"; -import { replaceableComponent } from "../../../utils/replaceableComponent"; interface ExistingSpellCheckLanguageIProps { language: string; @@ -55,7 +54,6 @@ export class ExistingSpellCheckLanguage extends React.Component { constructor(props) { super(props); diff --git a/src/components/views/settings/ThemeChoicePanel.tsx b/src/components/views/settings/ThemeChoicePanel.tsx index 3296acff7e..cc4545e9ea 100644 --- a/src/components/views/settings/ThemeChoicePanel.tsx +++ b/src/components/views/settings/ThemeChoicePanel.tsx @@ -29,7 +29,6 @@ import StyledCheckbox from '../elements/StyledCheckbox'; import Field from '../elements/Field'; import StyledRadioGroup from "../elements/StyledRadioGroup"; import { SettingLevel } from "../../../settings/SettingLevel"; -import { replaceableComponent } from "../../../utils/replaceableComponent"; import PosthogTrackers from "../../../PosthogTrackers"; interface IProps { @@ -50,7 +49,6 @@ interface IState extends IThemeState { customThemeMessage: CustomThemeMessage; } -@replaceableComponent("views.settings.tabs.user.ThemeChoicePanel") export default class ThemeChoicePanel extends React.Component { private themeTimer: number; diff --git a/src/components/views/settings/account/EmailAddresses.tsx b/src/components/views/settings/account/EmailAddresses.tsx index 75a72f192c..9ee1ae742b 100644 --- a/src/components/views/settings/account/EmailAddresses.tsx +++ b/src/components/views/settings/account/EmailAddresses.tsx @@ -26,7 +26,6 @@ import AccessibleButton from "../../elements/AccessibleButton"; import * as Email from "../../../../email"; import AddThreepid from "../../../../AddThreepid"; import Modal from '../../../../Modal'; -import { replaceableComponent } from "../../../../utils/replaceableComponent"; import ErrorDialog from "../../dialogs/ErrorDialog"; /* @@ -136,7 +135,6 @@ interface IState { newEmailAddress: string; } -@replaceableComponent("views.settings.account.EmailAddresses") export default class EmailAddresses extends React.Component { constructor(props: IProps) { super(props); diff --git a/src/components/views/settings/account/PhoneNumbers.tsx b/src/components/views/settings/account/PhoneNumbers.tsx index 770bdb889d..d2751fddbb 100644 --- a/src/components/views/settings/account/PhoneNumbers.tsx +++ b/src/components/views/settings/account/PhoneNumbers.tsx @@ -26,7 +26,6 @@ import AccessibleButton from "../../elements/AccessibleButton"; import AddThreepid from "../../../../AddThreepid"; import CountryDropdown from "../../auth/CountryDropdown"; import Modal from '../../../../Modal'; -import { replaceableComponent } from "../../../../utils/replaceableComponent"; import ErrorDialog from "../../dialogs/ErrorDialog"; import { PhoneNumberCountryDefinition } from "../../../../phonenumber"; @@ -136,7 +135,6 @@ interface IState { newPhoneNumberCode: string; } -@replaceableComponent("views.settings.account.PhoneNumbers") export default class PhoneNumbers extends React.Component { constructor(props: IProps) { super(props); diff --git a/src/components/views/settings/discovery/EmailAddresses.tsx b/src/components/views/settings/discovery/EmailAddresses.tsx index 316e20202e..8d94797ef0 100644 --- a/src/components/views/settings/discovery/EmailAddresses.tsx +++ b/src/components/views/settings/discovery/EmailAddresses.tsx @@ -23,7 +23,6 @@ import { _t } from "../../../../languageHandler"; import { MatrixClientPeg } from "../../../../MatrixClientPeg"; import Modal from '../../../../Modal'; import AddThreepid from '../../../../AddThreepid'; -import { replaceableComponent } from "../../../../utils/replaceableComponent"; import ErrorDialog from "../../dialogs/ErrorDialog"; import AccessibleButton from "../../elements/AccessibleButton"; @@ -244,7 +243,6 @@ interface IProps { emails: IThreepid[]; } -@replaceableComponent("views.settings.discovery.EmailAddresses") export default class EmailAddresses extends React.Component { public render(): JSX.Element { let content; diff --git a/src/components/views/settings/discovery/PhoneNumbers.tsx b/src/components/views/settings/discovery/PhoneNumbers.tsx index 13bef06e4b..add8759a85 100644 --- a/src/components/views/settings/discovery/PhoneNumbers.tsx +++ b/src/components/views/settings/discovery/PhoneNumbers.tsx @@ -23,7 +23,6 @@ import { _t } from "../../../../languageHandler"; import { MatrixClientPeg } from "../../../../MatrixClientPeg"; import Modal from '../../../../Modal'; import AddThreepid from '../../../../AddThreepid'; -import { replaceableComponent } from "../../../../utils/replaceableComponent"; import ErrorDialog from "../../dialogs/ErrorDialog"; import Field from "../../elements/Field"; import AccessibleButton from "../../elements/AccessibleButton"; @@ -260,7 +259,6 @@ interface IProps { msisdns: IThreepid[]; } -@replaceableComponent("views.settings.discovery.PhoneNumbers") export default class PhoneNumbers extends React.Component { public render(): JSX.Element { let content; diff --git a/src/components/views/settings/tabs/room/AdvancedRoomSettingsTab.tsx b/src/components/views/settings/tabs/room/AdvancedRoomSettingsTab.tsx index 97f388d893..15b87b084f 100644 --- a/src/components/views/settings/tabs/room/AdvancedRoomSettingsTab.tsx +++ b/src/components/views/settings/tabs/room/AdvancedRoomSettingsTab.tsx @@ -24,7 +24,6 @@ import RoomUpgradeDialog from "../../../dialogs/RoomUpgradeDialog"; import Modal from "../../../../../Modal"; import dis from "../../../../../dispatcher/dispatcher"; import { Action } from '../../../../../dispatcher/actions'; -import { replaceableComponent } from "../../../../../utils/replaceableComponent"; import CopyableText from "../../../elements/CopyableText"; import { ViewRoomPayload } from "../../../../../dispatcher/payloads/ViewRoomPayload"; @@ -46,7 +45,6 @@ interface IState { upgraded?: boolean; } -@replaceableComponent("views.settings.tabs.room.AdvancedRoomSettingsTab") export default class AdvancedRoomSettingsTab extends React.Component { constructor(props, context) { super(props, context); diff --git a/src/components/views/settings/tabs/room/BridgeSettingsTab.tsx b/src/components/views/settings/tabs/room/BridgeSettingsTab.tsx index 58cb7447f9..1e1b54dc93 100644 --- a/src/components/views/settings/tabs/room/BridgeSettingsTab.tsx +++ b/src/components/views/settings/tabs/room/BridgeSettingsTab.tsx @@ -21,7 +21,6 @@ import { MatrixEvent } from "matrix-js-sdk/src/models/event"; import { _t } from "../../../../../languageHandler"; import { MatrixClientPeg } from "../../../../../MatrixClientPeg"; import BridgeTile from "../../BridgeTile"; -import { replaceableComponent } from "../../../../../utils/replaceableComponent"; const BRIDGE_EVENT_TYPES = [ "uk.half-shot.bridge", @@ -34,7 +33,6 @@ interface IProps { roomId: string; } -@replaceableComponent("views.settings.tabs.room.BridgeSettingsTab") export default class BridgeSettingsTab extends React.Component { private renderBridgeCard(event: MatrixEvent, room: Room) { const content = event.getContent(); diff --git a/src/components/views/settings/tabs/room/GeneralRoomSettingsTab.tsx b/src/components/views/settings/tabs/room/GeneralRoomSettingsTab.tsx index 0e5f188d2d..e531f0c2a6 100644 --- a/src/components/views/settings/tabs/room/GeneralRoomSettingsTab.tsx +++ b/src/components/views/settings/tabs/room/GeneralRoomSettingsTab.tsx @@ -23,7 +23,6 @@ import dis from "../../../../../dispatcher/dispatcher"; import MatrixClientContext from "../../../../../contexts/MatrixClientContext"; import SettingsStore from "../../../../../settings/SettingsStore"; import { UIFeature } from "../../../../../settings/UIFeature"; -import { replaceableComponent } from "../../../../../utils/replaceableComponent"; import UrlPreviewSettings from "../../../room_settings/UrlPreviewSettings"; import AliasSettings from "../../../room_settings/AliasSettings"; import PosthogTrackers from "../../../../../PosthogTrackers"; @@ -36,7 +35,6 @@ interface IState { isRoomPublished: boolean; } -@replaceableComponent("views.settings.tabs.room.GeneralRoomSettingsTab") export default class GeneralRoomSettingsTab extends React.Component { public static contextType = MatrixClientContext; context: ContextType; diff --git a/src/components/views/settings/tabs/room/NotificationSettingsTab.tsx b/src/components/views/settings/tabs/room/NotificationSettingsTab.tsx index cf732bc052..6084d500ce 100644 --- a/src/components/views/settings/tabs/room/NotificationSettingsTab.tsx +++ b/src/components/views/settings/tabs/room/NotificationSettingsTab.tsx @@ -23,7 +23,6 @@ import AccessibleButton from "../../../elements/AccessibleButton"; import Notifier from "../../../../../Notifier"; import SettingsStore from '../../../../../settings/SettingsStore'; import { SettingLevel } from "../../../../../settings/SettingLevel"; -import { replaceableComponent } from "../../../../../utils/replaceableComponent"; import { RoomEchoChamber } from "../../../../../stores/local-echo/RoomEchoChamber"; import { EchoChamber } from '../../../../../stores/local-echo/EchoChamber'; import MatrixClientContext from "../../../../../contexts/MatrixClientContext"; @@ -43,7 +42,6 @@ interface IState { uploadedFile: File; } -@replaceableComponent("views.settings.tabs.room.NotificationsSettingsTab") export default class NotificationsSettingsTab extends React.Component { private readonly roomProps: RoomEchoChamber; private soundUpload = createRef(); diff --git a/src/components/views/settings/tabs/room/RolesRoomSettingsTab.tsx b/src/components/views/settings/tabs/room/RolesRoomSettingsTab.tsx index 27d72a46f0..e519ec0bf7 100644 --- a/src/components/views/settings/tabs/room/RolesRoomSettingsTab.tsx +++ b/src/components/views/settings/tabs/room/RolesRoomSettingsTab.tsx @@ -25,7 +25,6 @@ import { _t, _td } from "../../../../../languageHandler"; import { MatrixClientPeg } from "../../../../../MatrixClientPeg"; import AccessibleButton from "../../../elements/AccessibleButton"; import Modal from "../../../../../Modal"; -import { replaceableComponent } from "../../../../../utils/replaceableComponent"; import { compare } from "../../../../../utils/strings"; import ErrorDialog from '../../../dialogs/ErrorDialog'; import PowerSelector from "../../../elements/PowerSelector"; @@ -120,7 +119,6 @@ interface IProps { roomId: string; } -@replaceableComponent("views.settings.tabs.room.RolesRoomSettingsTab") export default class RolesRoomSettingsTab extends React.Component { componentDidMount() { MatrixClientPeg.get().on(RoomStateEvent.Update, this.onRoomStateUpdate); diff --git a/src/components/views/settings/tabs/room/SecurityRoomSettingsTab.tsx b/src/components/views/settings/tabs/room/SecurityRoomSettingsTab.tsx index eed93c31f2..b9e2d94594 100644 --- a/src/components/views/settings/tabs/room/SecurityRoomSettingsTab.tsx +++ b/src/components/views/settings/tabs/room/SecurityRoomSettingsTab.tsx @@ -30,7 +30,6 @@ import StyledRadioGroup from '../../../elements/StyledRadioGroup'; import { SettingLevel } from "../../../../../settings/SettingLevel"; import SettingsStore from "../../../../../settings/SettingsStore"; import { UIFeature } from "../../../../../settings/UIFeature"; -import { replaceableComponent } from "../../../../../utils/replaceableComponent"; import AccessibleButton from "../../../elements/AccessibleButton"; import SettingsFlag from '../../../elements/SettingsFlag'; import createRoom, { IOpts } from '../../../../../createRoom'; @@ -55,7 +54,6 @@ interface IState { showAdvancedSection: boolean; } -@replaceableComponent("views.settings.tabs.room.SecurityRoomSettingsTab") export default class SecurityRoomSettingsTab extends React.Component { constructor(props) { super(props); diff --git a/src/components/views/settings/tabs/user/AppearanceUserSettingsTab.tsx b/src/components/views/settings/tabs/user/AppearanceUserSettingsTab.tsx index 5561df050d..30e7882f10 100644 --- a/src/components/views/settings/tabs/user/AppearanceUserSettingsTab.tsx +++ b/src/components/views/settings/tabs/user/AppearanceUserSettingsTab.tsx @@ -26,7 +26,6 @@ import Field from '../../../elements/Field'; import { SettingLevel } from "../../../../../settings/SettingLevel"; import { UIFeature } from "../../../../../settings/UIFeature"; import { Layout } from "../../../../../settings/enums/Layout"; -import { replaceableComponent } from "../../../../../utils/replaceableComponent"; import LayoutSwitcher from "../../LayoutSwitcher"; import FontScalingPanel from '../../FontScalingPanel'; import ThemeChoicePanel from '../../ThemeChoicePanel'; @@ -46,7 +45,6 @@ interface IState { avatarUrl: string; } -@replaceableComponent("views.settings.tabs.user.AppearanceUserSettingsTab") export default class AppearanceUserSettingsTab extends React.Component { private readonly MESSAGE_PREVIEW_TEXT = _t("Hey you. You're the best!"); diff --git a/src/components/views/settings/tabs/user/GeneralUserSettingsTab.tsx b/src/components/views/settings/tabs/user/GeneralUserSettingsTab.tsx index 14851b5bec..7db27b009e 100644 --- a/src/components/views/settings/tabs/user/GeneralUserSettingsTab.tsx +++ b/src/components/views/settings/tabs/user/GeneralUserSettingsTab.tsx @@ -40,7 +40,6 @@ import { getThreepidsWithBindStatus } from '../../../../../boundThreepids'; import Spinner from "../../../elements/Spinner"; import { SettingLevel } from "../../../../../settings/SettingLevel"; import { UIFeature } from "../../../../../settings/UIFeature"; -import { replaceableComponent } from "../../../../../utils/replaceableComponent"; import { ActionPayload } from "../../../../../dispatcher/payloads"; import ErrorDialog from "../../../dialogs/ErrorDialog"; import AccountPhoneNumbers from "../../account/PhoneNumbers"; @@ -78,7 +77,6 @@ interface IState { idServerName: string; } -@replaceableComponent("views.settings.tabs.user.GeneralUserSettingsTab") export default class GeneralUserSettingsTab extends React.Component { private readonly dispatcherRef: string; diff --git a/src/components/views/settings/tabs/user/HelpUserSettingsTab.tsx b/src/components/views/settings/tabs/user/HelpUserSettingsTab.tsx index 119cc27d35..527dd1ae44 100644 --- a/src/components/views/settings/tabs/user/HelpUserSettingsTab.tsx +++ b/src/components/views/settings/tabs/user/HelpUserSettingsTab.tsx @@ -25,7 +25,6 @@ import createRoom from "../../../../../createRoom"; import Modal from "../../../../../Modal"; import PlatformPeg from "../../../../../PlatformPeg"; import UpdateCheckButton from "../../UpdateCheckButton"; -import { replaceableComponent } from "../../../../../utils/replaceableComponent"; import BugReportDialog from '../../../dialogs/BugReportDialog'; import { OpenToTabPayload } from "../../../../../dispatcher/payloads/OpenToTabPayload"; import { Action } from "../../../../../dispatcher/actions"; @@ -42,7 +41,6 @@ interface IState { canUpdate: boolean; } -@replaceableComponent("views.settings.tabs.user.HelpUserSettingsTab") export default class HelpUserSettingsTab extends React.Component { constructor(props) { super(props); diff --git a/src/components/views/settings/tabs/user/LabsUserSettingsTab.tsx b/src/components/views/settings/tabs/user/LabsUserSettingsTab.tsx index c632f2207d..9e0b31b2ad 100644 --- a/src/components/views/settings/tabs/user/LabsUserSettingsTab.tsx +++ b/src/components/views/settings/tabs/user/LabsUserSettingsTab.tsx @@ -21,7 +21,6 @@ import { _t } from "../../../../../languageHandler"; import SettingsStore from "../../../../../settings/SettingsStore"; import LabelledToggleSwitch from "../../../elements/LabelledToggleSwitch"; import { SettingLevel } from "../../../../../settings/SettingLevel"; -import { replaceableComponent } from "../../../../../utils/replaceableComponent"; import SdkConfig from "../../../../../SdkConfig"; import BetaCard from "../../../beta/BetaCard"; import SettingsFlag from '../../../elements/SettingsFlag'; @@ -52,7 +51,6 @@ interface IState { showJumpToDate: boolean; } -@replaceableComponent("views.settings.tabs.user.LabsUserSettingsTab") export default class LabsUserSettingsTab extends React.Component<{}, IState> { constructor(props: {}) { super(props); diff --git a/src/components/views/settings/tabs/user/MjolnirUserSettingsTab.tsx b/src/components/views/settings/tabs/user/MjolnirUserSettingsTab.tsx index 88000892e4..709b3e8c56 100644 --- a/src/components/views/settings/tabs/user/MjolnirUserSettingsTab.tsx +++ b/src/components/views/settings/tabs/user/MjolnirUserSettingsTab.tsx @@ -24,7 +24,6 @@ import { ListRule } from "../../../../../mjolnir/ListRule"; import { BanList, RULE_SERVER, RULE_USER } from "../../../../../mjolnir/BanList"; import Modal from "../../../../../Modal"; import { MatrixClientPeg } from "../../../../../MatrixClientPeg"; -import { replaceableComponent } from "../../../../../utils/replaceableComponent"; import ErrorDialog from "../../../dialogs/ErrorDialog"; import QuestionDialog from "../../../dialogs/QuestionDialog"; import AccessibleButton from "../../../elements/AccessibleButton"; @@ -36,7 +35,6 @@ interface IState { newList: string; } -@replaceableComponent("views.settings.tabs.user.MjolnirUserSettingsTab") export default class MjolnirUserSettingsTab extends React.Component<{}, IState> { constructor(props) { super(props); diff --git a/src/components/views/settings/tabs/user/NotificationUserSettingsTab.tsx b/src/components/views/settings/tabs/user/NotificationUserSettingsTab.tsx index 429472c7f5..b49cf3920e 100644 --- a/src/components/views/settings/tabs/user/NotificationUserSettingsTab.tsx +++ b/src/components/views/settings/tabs/user/NotificationUserSettingsTab.tsx @@ -17,10 +17,8 @@ limitations under the License. import React from 'react'; import { _t } from "../../../../../languageHandler"; -import { replaceableComponent } from "../../../../../utils/replaceableComponent"; import Notifications from "../../Notifications"; -@replaceableComponent("views.settings.tabs.user.NotificationUserSettingsTab") export default class NotificationUserSettingsTab extends React.Component { render() { return ( diff --git a/src/components/views/settings/tabs/user/PreferencesUserSettingsTab.tsx b/src/components/views/settings/tabs/user/PreferencesUserSettingsTab.tsx index e70bb4b5d3..e6457605cc 100644 --- a/src/components/views/settings/tabs/user/PreferencesUserSettingsTab.tsx +++ b/src/components/views/settings/tabs/user/PreferencesUserSettingsTab.tsx @@ -23,7 +23,6 @@ import SettingsStore from "../../../../../settings/SettingsStore"; import Field from "../../../elements/Field"; import PlatformPeg from "../../../../../PlatformPeg"; import { SettingLevel } from "../../../../../settings/SettingLevel"; -import { replaceableComponent } from "../../../../../utils/replaceableComponent"; import SettingsFlag from '../../../elements/SettingsFlag'; import AccessibleButton from "../../../elements/AccessibleButton"; import dis from "../../../../../dispatcher/dispatcher"; @@ -49,7 +48,6 @@ interface IState { readMarkerOutOfViewThresholdMs: string; } -@replaceableComponent("views.settings.tabs.user.PreferencesUserSettingsTab") export default class PreferencesUserSettingsTab extends React.Component { static ROOM_LIST_SETTINGS = [ 'breadcrumbs', diff --git a/src/components/views/settings/tabs/user/SecurityUserSettingsTab.tsx b/src/components/views/settings/tabs/user/SecurityUserSettingsTab.tsx index aa66d0203a..a88e244fe5 100644 --- a/src/components/views/settings/tabs/user/SecurityUserSettingsTab.tsx +++ b/src/components/views/settings/tabs/user/SecurityUserSettingsTab.tsx @@ -30,7 +30,6 @@ import SecureBackupPanel from "../../SecureBackupPanel"; import SettingsStore from "../../../../../settings/SettingsStore"; import { UIFeature } from "../../../../../settings/UIFeature"; import E2eAdvancedPanel, { isE2eAdvancedPanelPossible } from "../../E2eAdvancedPanel"; -import { replaceableComponent } from "../../../../../utils/replaceableComponent"; import { ActionPayload } from "../../../../../dispatcher/payloads"; import CryptographyPanel from "../../CryptographyPanel"; import DevicesPanel from "../../DevicesPanel"; @@ -76,7 +75,6 @@ interface IState { invitedRoomIds: Set; } -@replaceableComponent("views.settings.tabs.user.SecurityUserSettingsTab") export default class SecurityUserSettingsTab extends React.Component { private dispatcherRef: string; diff --git a/src/components/views/settings/tabs/user/VoiceUserSettingsTab.tsx b/src/components/views/settings/tabs/user/VoiceUserSettingsTab.tsx index b187e300a2..18a0b0b288 100644 --- a/src/components/views/settings/tabs/user/VoiceUserSettingsTab.tsx +++ b/src/components/views/settings/tabs/user/VoiceUserSettingsTab.tsx @@ -26,7 +26,6 @@ import AccessibleButton from "../../../elements/AccessibleButton"; import { MatrixClientPeg } from "../../../../../MatrixClientPeg"; import Modal from "../../../../../Modal"; import { SettingLevel } from "../../../../../settings/SettingLevel"; -import { replaceableComponent } from "../../../../../utils/replaceableComponent"; import SettingsFlag from '../../../elements/SettingsFlag'; import ErrorDialog from '../../../dialogs/ErrorDialog'; @@ -46,7 +45,6 @@ interface IState extends Record { mediaDevices: IMediaDevices; } -@replaceableComponent("views.settings.tabs.user.VoiceUserSettingsTab") export default class VoiceUserSettingsTab extends React.Component<{}, IState> { constructor(props: {}) { super(props); diff --git a/src/components/views/terms/InlineTermsAgreement.tsx b/src/components/views/terms/InlineTermsAgreement.tsx index a7ba47aa7c..2cca51e670 100644 --- a/src/components/views/terms/InlineTermsAgreement.tsx +++ b/src/components/views/terms/InlineTermsAgreement.tsx @@ -19,7 +19,6 @@ import React from "react"; import { _t, pickBestLanguage } from "../../../languageHandler"; import { objectClone } from "../../../utils/objects"; import StyledCheckbox from "../elements/StyledCheckbox"; -import { replaceableComponent } from "../../../utils/replaceableComponent"; import AccessibleButton from "../elements/AccessibleButton"; interface IProps { @@ -40,7 +39,6 @@ interface Policy { name: string; } -@replaceableComponent("views.terms.InlineTermsAgreement") export default class InlineTermsAgreement extends React.Component { constructor(props: IProps) { super(props); diff --git a/src/components/views/toasts/NonUrgentEchoFailureToast.tsx b/src/components/views/toasts/NonUrgentEchoFailureToast.tsx index 91407a4fa5..931cb3b3f1 100644 --- a/src/components/views/toasts/NonUrgentEchoFailureToast.tsx +++ b/src/components/views/toasts/NonUrgentEchoFailureToast.tsx @@ -20,9 +20,7 @@ import { _t } from "../../../languageHandler"; import AccessibleButton from "../elements/AccessibleButton"; import Modal from "../../../Modal"; import ServerOfflineDialog from "../dialogs/ServerOfflineDialog"; -import { replaceableComponent } from "../../../utils/replaceableComponent"; -@replaceableComponent("views.toasts.NonUrgentEchoFailureToast") export default class NonUrgentEchoFailureToast extends React.PureComponent { private openDialog = () => { Modal.createTrackedDialog('Local Echo Server Error', '', ServerOfflineDialog, {}); diff --git a/src/components/views/toasts/VerificationRequestToast.tsx b/src/components/views/toasts/VerificationRequestToast.tsx index 341be988c4..b424f43900 100644 --- a/src/components/views/toasts/VerificationRequestToast.tsx +++ b/src/components/views/toasts/VerificationRequestToast.tsx @@ -31,7 +31,6 @@ import ToastStore from "../../../stores/ToastStore"; import Modal from "../../../Modal"; import GenericToast from "./GenericToast"; import { Action } from "../../../dispatcher/actions"; -import { replaceableComponent } from "../../../utils/replaceableComponent"; import VerificationRequestDialog from "../dialogs/VerificationRequestDialog"; import RightPanelStore from "../../../stores/right-panel/RightPanelStore"; import { ViewRoomPayload } from "../../../dispatcher/payloads/ViewRoomPayload"; @@ -47,7 +46,6 @@ interface IState { ip?: string; } -@replaceableComponent("views.toasts.VerificationRequestToast") export default class VerificationRequestToast extends React.PureComponent { private intervalHandle: number; diff --git a/src/components/views/verification/VerificationCancelled.tsx b/src/components/views/verification/VerificationCancelled.tsx index 2a08dfaa68..3cc7b9b620 100644 --- a/src/components/views/verification/VerificationCancelled.tsx +++ b/src/components/views/verification/VerificationCancelled.tsx @@ -17,14 +17,12 @@ limitations under the License. import React from 'react'; import { _t } from '../../../languageHandler'; -import { replaceableComponent } from "../../../utils/replaceableComponent"; import DialogButtons from "../elements/DialogButtons"; interface IProps { onDone: () => void; } -@replaceableComponent("views.verification.VerificationCancelled") export default class VerificationCancelled extends React.Component { public render(): React.ReactNode { return

diff --git a/src/components/views/verification/VerificationComplete.tsx b/src/components/views/verification/VerificationComplete.tsx index 88bdd70d22..48419d5ea0 100644 --- a/src/components/views/verification/VerificationComplete.tsx +++ b/src/components/views/verification/VerificationComplete.tsx @@ -17,14 +17,12 @@ limitations under the License. import React from 'react'; import { _t } from '../../../languageHandler'; -import { replaceableComponent } from "../../../utils/replaceableComponent"; import DialogButtons from "../elements/DialogButtons"; interface IProps { onDone: () => void; } -@replaceableComponent("views.verification.VerificationComplete") export default class VerificationComplete extends React.Component { public render(): React.ReactNode { return
diff --git a/src/components/views/verification/VerificationShowSas.tsx b/src/components/views/verification/VerificationShowSas.tsx index 2615a57b4b..e9c5fcf441 100644 --- a/src/components/views/verification/VerificationShowSas.tsx +++ b/src/components/views/verification/VerificationShowSas.tsx @@ -22,7 +22,6 @@ import { _t, _td } from '../../../languageHandler'; import { PendingActionSpinner } from "../right_panel/EncryptionInfo"; import AccessibleButton from "../elements/AccessibleButton"; import { fixupColorFonts } from '../../../utils/FontManager'; -import { replaceableComponent } from "../../../utils/replaceableComponent"; interface IProps { pending?: boolean; @@ -44,7 +43,6 @@ function capFirst(s) { return s.charAt(0).toUpperCase() + s.slice(1); } -@replaceableComponent("views.verification.VerificationShowSas") export default class VerificationShowSas extends React.Component { constructor(props: IProps) { super(props); diff --git a/src/components/views/voip/CallView.tsx b/src/components/views/voip/CallView.tsx index a809adcf41..af7180c5a2 100644 --- a/src/components/views/voip/CallView.tsx +++ b/src/components/views/voip/CallView.tsx @@ -30,7 +30,6 @@ import VideoFeed from './VideoFeed'; import RoomAvatar from "../avatars/RoomAvatar"; import AccessibleButton from '../elements/AccessibleButton'; import { avatarUrlForMember } from '../../../Avatar'; -import { replaceableComponent } from "../../../utils/replaceableComponent"; import DesktopCapturerSourcePicker from "../elements/DesktopCapturerSourcePicker"; import Modal from '../../../Modal'; import CallViewSidebar from './CallViewSidebar'; @@ -103,7 +102,6 @@ function exitFullscreen() { if (exitMethod) exitMethod.call(document); } -@replaceableComponent("views.voip.CallView") export default class CallView extends React.Component { private dispatcherRef: string; private contentRef = createRef(); diff --git a/src/components/views/voip/CallViewForRoom.tsx b/src/components/views/voip/CallViewForRoom.tsx index 25fbf4a501..1a44387654 100644 --- a/src/components/views/voip/CallViewForRoom.tsx +++ b/src/components/views/voip/CallViewForRoom.tsx @@ -21,7 +21,6 @@ import { Resizable } from "re-resizable"; import CallHandler, { CallHandlerEvent } from '../../../CallHandler'; import CallView from './CallView'; import ResizeNotifier from "../../../utils/ResizeNotifier"; -import { replaceableComponent } from "../../../utils/replaceableComponent"; interface IProps { // What room we should display the call for @@ -40,7 +39,6 @@ interface IState { * Wrapper for CallView that always display the call in a given room, * or nothing if there is no call in that room. */ -@replaceableComponent("views.voip.CallViewForRoom") export default class CallViewForRoom extends React.Component { constructor(props: IProps) { super(props); diff --git a/src/components/views/voip/DialPad.tsx b/src/components/views/voip/DialPad.tsx index 4af98a4a35..5e584f6b70 100644 --- a/src/components/views/voip/DialPad.tsx +++ b/src/components/views/voip/DialPad.tsx @@ -17,7 +17,6 @@ limitations under the License. import * as React from "react"; import AccessibleButton, { ButtonEvent } from "../elements/AccessibleButton"; -import { replaceableComponent } from "../../../utils/replaceableComponent"; import { _t } from "../../../languageHandler"; const BUTTONS = ['1', '2', '3', '4', '5', '6', '7', '8', '9', '*', '0', '#']; @@ -66,7 +65,6 @@ interface IProps { onDialPress?: () => void; } -@replaceableComponent("views.voip.DialPad") export default class Dialpad extends React.PureComponent { render() { const buttonNodes = []; diff --git a/src/components/views/voip/DialPadModal.tsx b/src/components/views/voip/DialPadModal.tsx index 6432ccf5e1..321cd4b070 100644 --- a/src/components/views/voip/DialPadModal.tsx +++ b/src/components/views/voip/DialPadModal.tsx @@ -20,7 +20,6 @@ import { createRef } from "react"; import AccessibleButton, { ButtonEvent } from "../elements/AccessibleButton"; import Field from "../elements/Field"; import DialPad from './DialPad'; -import { replaceableComponent } from "../../../utils/replaceableComponent"; import DialPadBackspaceButton from "../elements/DialPadBackspaceButton"; import CallHandler from "../../../CallHandler"; @@ -32,7 +31,6 @@ interface IState { value: string; } -@replaceableComponent("views.voip.DialPadModal") export default class DialpadModal extends React.PureComponent { private numberEntryFieldRef: React.RefObject = createRef(); diff --git a/src/components/views/voip/PictureInPictureDragger.tsx b/src/components/views/voip/PictureInPictureDragger.tsx index 126f60fdc0..be32ab2cd9 100644 --- a/src/components/views/voip/PictureInPictureDragger.tsx +++ b/src/components/views/voip/PictureInPictureDragger.tsx @@ -19,7 +19,6 @@ import React, { createRef } from 'react'; import UIStore from '../../../stores/UIStore'; import { lerp } from '../../../utils/AnimationUtils'; import { MarkedExecution } from '../../../utils/MarkedExecution'; -import { replaceableComponent } from '../../../utils/replaceableComponent'; const PIP_VIEW_WIDTH = 336; const PIP_VIEW_HEIGHT = 232; @@ -56,7 +55,6 @@ interface IState { * PictureInPictureDragger shows a small version of CallView hovering over the UI in 'picture-in-picture' * (PiP mode). It displays the call(s) which is *not* in the room the user is currently viewing. */ -@replaceableComponent("views.voip.PictureInPictureDragger") export default class PictureInPictureDragger extends React.Component { private callViewWrapper = createRef(); private initX = 0; diff --git a/src/components/views/voip/PipContainer.tsx b/src/components/views/voip/PipContainer.tsx index 1d3438aec6..2d74b5d131 100644 --- a/src/components/views/voip/PipContainer.tsx +++ b/src/components/views/voip/PipContainer.tsx @@ -18,7 +18,6 @@ limitations under the License. import React from 'react'; import PipView from './PipView'; -import { replaceableComponent } from "../../../utils/replaceableComponent"; interface IProps { @@ -28,7 +27,6 @@ interface IState { } -@replaceableComponent("views.voip.PiPContainer") export default class PiPContainer extends React.PureComponent { public render() { return
diff --git a/src/components/views/voip/PipView.tsx b/src/components/views/voip/PipView.tsx index b3f3b0695d..3bd26c2043 100644 --- a/src/components/views/voip/PipView.tsx +++ b/src/components/views/voip/PipView.tsx @@ -26,7 +26,6 @@ import CallHandler, { CallHandlerEvent } from '../../../CallHandler'; import PersistentApp from "../elements/PersistentApp"; import SettingsStore from "../../../settings/SettingsStore"; import { MatrixClientPeg } from '../../../MatrixClientPeg'; -import { replaceableComponent } from "../../../utils/replaceableComponent"; import PictureInPictureDragger from './PictureInPictureDragger'; import dis from '../../../dispatcher/dispatcher'; import { Action } from "../../../dispatcher/actions"; @@ -105,7 +104,6 @@ function getPrimarySecondaryCallsForPip(roomId: string): [MatrixCall, MatrixCall * and all widgets that are active but not shown in any other possible container. */ -@replaceableComponent("views.voip.PipView") export default class PipView extends React.Component { private roomStoreToken: EventSubscription; private settingsWatcherRef: string; diff --git a/src/components/views/voip/VideoFeed.tsx b/src/components/views/voip/VideoFeed.tsx index 81c00959c1..a9f83e9bc2 100644 --- a/src/components/views/voip/VideoFeed.tsx +++ b/src/components/views/voip/VideoFeed.tsx @@ -23,7 +23,6 @@ import { SDPStreamMetadataPurpose } from 'matrix-js-sdk/src/webrtc/callEventType import SettingsStore from "../../../settings/SettingsStore"; import MemberAvatar from "../avatars/MemberAvatar"; -import { replaceableComponent } from "../../../utils/replaceableComponent"; interface IProps { call: MatrixCall; @@ -48,7 +47,6 @@ interface IState { videoMuted: boolean; } -@replaceableComponent("views.voip.VideoFeed") export default class VideoFeed extends React.PureComponent { private element: HTMLVideoElement; diff --git a/src/toasts/IncomingCallToast.tsx b/src/toasts/IncomingCallToast.tsx index 555a14653e..7b27744c95 100644 --- a/src/toasts/IncomingCallToast.tsx +++ b/src/toasts/IncomingCallToast.tsx @@ -21,7 +21,6 @@ import React from 'react'; import { CallType, MatrixCall } from 'matrix-js-sdk/src/webrtc/call'; import classNames from 'classnames'; -import { replaceableComponent } from '../utils/replaceableComponent'; import CallHandler, { CallHandlerEvent } from '../CallHandler'; import { MatrixClientPeg } from '../MatrixClientPeg'; import { _t } from '../languageHandler'; @@ -39,7 +38,6 @@ interface IState { silenced: boolean; } -@replaceableComponent("views.voip.IncomingCallToast") export default class IncomingCallToast extends React.Component { constructor(props: IProps) { super(props);