Switch to importing more things from the main js-sdk export (#11377)
This commit is contained in:
parent
a1328d8ef7
commit
ef385e6028
47 changed files with 136 additions and 95 deletions
20
.eslintrc.js
20
.eslintrc.js
|
@ -134,6 +134,26 @@ module.exports = {
|
|||
name: "matrix-js-sdk/src/@types/PushRules",
|
||||
message: "Please use matrix-js-sdk/src/matrix instead",
|
||||
},
|
||||
{
|
||||
name: "matrix-js-sdk/src/@types/search",
|
||||
message: "Please use matrix-js-sdk/src/matrix instead",
|
||||
},
|
||||
{
|
||||
name: "matrix-js-sdk/src/filter",
|
||||
message: "Please use matrix-js-sdk/src/matrix instead",
|
||||
},
|
||||
{
|
||||
name: "matrix-js-sdk/src/webrtc/groupCall",
|
||||
message: "Please use matrix-js-sdk/src/matrix instead",
|
||||
},
|
||||
{
|
||||
name: "matrix-js-sdk/src/service-types",
|
||||
message: "Please use matrix-js-sdk/src/matrix instead",
|
||||
},
|
||||
{
|
||||
name: "matrix-js-sdk/src/sync",
|
||||
message: "Please use matrix-js-sdk/src/matrix instead",
|
||||
},
|
||||
{
|
||||
name: "matrix-react-sdk",
|
||||
message: "Please use matrix-react-sdk/src/index instead",
|
||||
|
|
|
@ -14,10 +14,9 @@ See the License for the specific language governing permissions and
|
|||
limitations under the License.
|
||||
*/
|
||||
|
||||
import { MatrixEvent, ClientEvent, EventType, MatrixClient, RoomStateEvent } from "matrix-js-sdk/src/matrix";
|
||||
import { MatrixEvent, ClientEvent, EventType, MatrixClient, RoomStateEvent, SyncState } from "matrix-js-sdk/src/matrix";
|
||||
import { logger } from "matrix-js-sdk/src/logger";
|
||||
import { CryptoEvent } from "matrix-js-sdk/src/crypto";
|
||||
import { SyncState } from "matrix-js-sdk/src/sync";
|
||||
import { IKeyBackupInfo } from "matrix-js-sdk/src/crypto/keybackup";
|
||||
|
||||
import dis from "./dispatcher/dispatcher";
|
||||
|
|
|
@ -15,8 +15,7 @@ limitations under the License.
|
|||
*/
|
||||
|
||||
import React from "react";
|
||||
import { SERVICE_TYPES } from "matrix-js-sdk/src/service-types";
|
||||
import { createClient, MatrixClient, MatrixError } from "matrix-js-sdk/src/matrix";
|
||||
import { SERVICE_TYPES, createClient, MatrixClient, MatrixError } from "matrix-js-sdk/src/matrix";
|
||||
import { logger } from "matrix-js-sdk/src/logger";
|
||||
|
||||
import { MatrixClientPeg } from "./MatrixClientPeg";
|
||||
|
|
|
@ -18,7 +18,7 @@ limitations under the License.
|
|||
*/
|
||||
|
||||
import React from "react";
|
||||
import { MatrixError, RuleId, TweakName } from "matrix-js-sdk/src/matrix";
|
||||
import { MatrixError, RuleId, TweakName, SyncState } from "matrix-js-sdk/src/matrix";
|
||||
import {
|
||||
CallError,
|
||||
CallErrorCode,
|
||||
|
@ -32,7 +32,6 @@ import {
|
|||
import { logger } from "matrix-js-sdk/src/logger";
|
||||
import EventEmitter from "events";
|
||||
import { PushProcessor } from "matrix-js-sdk/src/pushprocessor";
|
||||
import { SyncState } from "matrix-js-sdk/src/sync";
|
||||
import { CallEventHandlerEvent } from "matrix-js-sdk/src/webrtc/callEventHandler";
|
||||
|
||||
import { MatrixClientPeg } from "./MatrixClientPeg";
|
||||
|
|
|
@ -21,9 +21,11 @@ import {
|
|||
ISearchResult,
|
||||
ISearchResults,
|
||||
SearchOrderBy,
|
||||
} from "matrix-js-sdk/src/@types/search";
|
||||
import { IRoomEventFilter } from "matrix-js-sdk/src/filter";
|
||||
import { EventType, MatrixClient, SearchResult } from "matrix-js-sdk/src/matrix";
|
||||
IRoomEventFilter,
|
||||
EventType,
|
||||
MatrixClient,
|
||||
SearchResult,
|
||||
} from "matrix-js-sdk/src/matrix";
|
||||
|
||||
import { ISearchArgs } from "./indexing/BaseEventIndexManager";
|
||||
import EventIndexPeg from "./indexing/EventIndexPeg";
|
||||
|
|
|
@ -15,9 +15,8 @@ limitations under the License.
|
|||
*/
|
||||
|
||||
import classNames from "classnames";
|
||||
import { SERVICE_TYPES } from "matrix-js-sdk/src/service-types";
|
||||
import { SERVICE_TYPES, MatrixClient } from "matrix-js-sdk/src/matrix";
|
||||
import { logger } from "matrix-js-sdk/src/logger";
|
||||
import { MatrixClient } from "matrix-js-sdk/src/matrix";
|
||||
|
||||
import Modal from "./Modal";
|
||||
import TermsDialog from "./components/views/dialogs/TermsDialog";
|
||||
|
|
|
@ -16,8 +16,8 @@ limitations under the License.
|
|||
*/
|
||||
|
||||
import React, { createRef } from "react";
|
||||
import { Filter } from "matrix-js-sdk/src/filter";
|
||||
import {
|
||||
Filter,
|
||||
EventTimelineSet,
|
||||
IRoomTimelineData,
|
||||
Direction,
|
||||
|
|
|
@ -22,10 +22,11 @@ import {
|
|||
RoomStateEvent,
|
||||
MatrixError,
|
||||
IUsageLimit,
|
||||
SyncStateData,
|
||||
SyncState,
|
||||
} from "matrix-js-sdk/src/matrix";
|
||||
import { MatrixCall } from "matrix-js-sdk/src/webrtc/call";
|
||||
import classNames from "classnames";
|
||||
import { ISyncStateData, SyncState } from "matrix-js-sdk/src/sync";
|
||||
|
||||
import { isOnlyCtrlOrCmdKeyEvent, Key } from "../../Keyboard";
|
||||
import PageTypes from "../../PageTypes";
|
||||
|
@ -109,7 +110,7 @@ interface IProps {
|
|||
}
|
||||
|
||||
interface IState {
|
||||
syncErrorData?: ISyncStateData;
|
||||
syncErrorData?: SyncStateData;
|
||||
usageLimitDismissed: boolean;
|
||||
usageLimitEventContent?: IUsageLimit;
|
||||
usageLimitEventTs?: number;
|
||||
|
@ -294,7 +295,7 @@ class LoggedInView extends React.Component<IProps, IState> {
|
|||
});
|
||||
};
|
||||
|
||||
private onSync = (syncState: SyncState | null, oldSyncState: SyncState | null, data?: ISyncStateData): void => {
|
||||
private onSync = (syncState: SyncState | null, oldSyncState: SyncState | null, data?: SyncStateData): void => {
|
||||
const oldErrCode = (this.state.syncErrorData?.error as MatrixError)?.errcode;
|
||||
const newErrCode = (data?.error as MatrixError)?.errcode;
|
||||
if (syncState === oldSyncState && oldErrCode === newErrCode) return;
|
||||
|
|
|
@ -24,8 +24,9 @@ import {
|
|||
MatrixEventEvent,
|
||||
MatrixEvent,
|
||||
RoomType,
|
||||
SyncStateData,
|
||||
SyncState,
|
||||
} from "matrix-js-sdk/src/matrix";
|
||||
import { ISyncStateData, SyncState } from "matrix-js-sdk/src/sync";
|
||||
import { InvalidStoreError } from "matrix-js-sdk/src/errors";
|
||||
import { defer, IDeferred, QueryDict } from "matrix-js-sdk/src/utils";
|
||||
import { logger } from "matrix-js-sdk/src/logger";
|
||||
|
@ -1502,7 +1503,7 @@ export default class MatrixChat extends React.PureComponent<IProps, IState> {
|
|||
return this.loggedInView.current.canResetTimelineInRoom(roomId);
|
||||
});
|
||||
|
||||
cli.on(ClientEvent.Sync, (state: SyncState, prevState: SyncState | null, data?: ISyncStateData) => {
|
||||
cli.on(ClientEvent.Sync, (state: SyncState, prevState: SyncState | null, data?: SyncStateData) => {
|
||||
if (state === SyncState.Error || state === SyncState.Reconnecting) {
|
||||
if (data?.error instanceof InvalidStoreError) {
|
||||
Lifecycle.handleInvalidStoreError(data.error);
|
||||
|
|
|
@ -15,8 +15,7 @@ limitations under the License.
|
|||
*/
|
||||
|
||||
import React, { forwardRef, useCallback, useContext, useEffect, useRef, useState } from "react";
|
||||
import { ISearchResults } from "matrix-js-sdk/src/@types/search";
|
||||
import { IThreadBundledRelationship, MatrixEvent } from "matrix-js-sdk/src/matrix";
|
||||
import { ISearchResults, IThreadBundledRelationship, MatrixEvent } from "matrix-js-sdk/src/matrix";
|
||||
import { THREAD_RELATION_TYPE } from "matrix-js-sdk/src/models/thread";
|
||||
import { logger } from "matrix-js-sdk/src/logger";
|
||||
|
||||
|
|
|
@ -15,8 +15,7 @@ limitations under the License.
|
|||
*/
|
||||
|
||||
import React, { ReactNode } from "react";
|
||||
import { EventStatus, MatrixEvent, Room, MatrixError } from "matrix-js-sdk/src/matrix";
|
||||
import { SyncState, ISyncStateData } from "matrix-js-sdk/src/sync";
|
||||
import { EventStatus, MatrixEvent, Room, MatrixError, SyncState, SyncStateData } from "matrix-js-sdk/src/matrix";
|
||||
|
||||
import { Icon as WarningIcon } from "../../../res/img/feather-customised/warning-triangle.svg";
|
||||
import { _t, _td } from "../../languageHandler";
|
||||
|
@ -81,7 +80,7 @@ interface IProps {
|
|||
|
||||
interface IState {
|
||||
syncState: SyncState;
|
||||
syncStateData: ISyncStateData;
|
||||
syncStateData: SyncStateData;
|
||||
unsentMessages: MatrixEvent[];
|
||||
isResending: boolean;
|
||||
}
|
||||
|
@ -123,7 +122,7 @@ export default class RoomStatusBar extends React.PureComponent<IProps, IState> {
|
|||
}
|
||||
}
|
||||
|
||||
private onSyncStateChange = (state: SyncState, prevState: SyncState, data: ISyncStateData): void => {
|
||||
private onSyncStateChange = (state: SyncState, prevState: SyncState, data: SyncStateData): void => {
|
||||
if (state === "SYNCING" && prevState === "SYNCING") {
|
||||
return;
|
||||
}
|
||||
|
|
|
@ -35,13 +35,13 @@ import {
|
|||
JoinRule,
|
||||
ClientEvent,
|
||||
MatrixError,
|
||||
ISearchResults,
|
||||
} from "matrix-js-sdk/src/matrix";
|
||||
import { logger } from "matrix-js-sdk/src/logger";
|
||||
import { CallState, MatrixCall } from "matrix-js-sdk/src/webrtc/call";
|
||||
import { throttle } from "lodash";
|
||||
import { CryptoEvent } from "matrix-js-sdk/src/crypto";
|
||||
import { THREAD_RELATION_TYPE } from "matrix-js-sdk/src/models/thread";
|
||||
import { ISearchResults } from "matrix-js-sdk/src/@types/search";
|
||||
|
||||
import shouldHideEvent from "../../shouldHideEvent";
|
||||
import { _t } from "../../languageHandler";
|
||||
|
|
|
@ -33,9 +33,9 @@ import {
|
|||
MatrixClient,
|
||||
Relations,
|
||||
MatrixError,
|
||||
SyncState,
|
||||
} from "matrix-js-sdk/src/matrix";
|
||||
import { TimelineWindow } from "matrix-js-sdk/src/timeline-window";
|
||||
import { SyncState } from "matrix-js-sdk/src/sync";
|
||||
import { debounce, findLastIndex, throttle } from "lodash";
|
||||
import { logger } from "matrix-js-sdk/src/logger";
|
||||
import { Thread, ThreadEvent } from "matrix-js-sdk/src/models/thread";
|
||||
|
|
|
@ -15,7 +15,7 @@ limitations under the License.
|
|||
*/
|
||||
|
||||
import React from "react";
|
||||
import { SERVICE_TYPES } from "matrix-js-sdk/src/service-types";
|
||||
import { SERVICE_TYPES } from "matrix-js-sdk/src/matrix";
|
||||
|
||||
import { _t, pickBestLanguage } from "../../../languageHandler";
|
||||
import DialogButtons from "../elements/DialogButtons";
|
||||
|
|
|
@ -16,8 +16,15 @@ limitations under the License.
|
|||
|
||||
import { useCallback, useEffect, useState } from "react";
|
||||
import { M_POLL_START } from "matrix-js-sdk/src/@types/polls";
|
||||
import { MatrixClient, Direction, EventTimeline, EventTimelineSet, Room } from "matrix-js-sdk/src/matrix";
|
||||
import { Filter, IFilterDefinition } from "matrix-js-sdk/src/filter";
|
||||
import {
|
||||
MatrixClient,
|
||||
Direction,
|
||||
EventTimeline,
|
||||
EventTimelineSet,
|
||||
Room,
|
||||
Filter,
|
||||
IFilterDefinition,
|
||||
} from "matrix-js-sdk/src/matrix";
|
||||
import { logger } from "matrix-js-sdk/src/logger";
|
||||
|
||||
const getOldestEventTimestamp = (timelineSet?: EventTimelineSet): number | undefined => {
|
||||
|
|
|
@ -18,9 +18,8 @@ limitations under the License.
|
|||
import React, { FC, useState, useMemo, useCallback } from "react";
|
||||
import classNames from "classnames";
|
||||
import { throttle } from "lodash";
|
||||
import { RoomStateEvent } from "matrix-js-sdk/src/matrix";
|
||||
import { RoomStateEvent, ISearchResults } from "matrix-js-sdk/src/matrix";
|
||||
import { CallType } from "matrix-js-sdk/src/webrtc/call";
|
||||
import { ISearchResults } from "matrix-js-sdk/src/@types/search";
|
||||
|
||||
import type { MatrixEvent, Room } from "matrix-js-sdk/src/matrix";
|
||||
import { _t } from "../../../languageHandler";
|
||||
|
|
|
@ -17,10 +17,9 @@ limitations under the License.
|
|||
*/
|
||||
|
||||
import React, { ReactNode } from "react";
|
||||
import { SERVICE_TYPES } from "matrix-js-sdk/src/service-types";
|
||||
import { SERVICE_TYPES, IDelegatedAuthConfig, M_AUTHENTICATION, HTTPError } from "matrix-js-sdk/src/matrix";
|
||||
import { IThreepid, ThreepidMedium } from "matrix-js-sdk/src/@types/threepids";
|
||||
import { logger } from "matrix-js-sdk/src/logger";
|
||||
import { IDelegatedAuthConfig, M_AUTHENTICATION, HTTPError } from "matrix-js-sdk/src/matrix";
|
||||
|
||||
import { Icon as WarningIcon } from "../../../../../../res/img/feather-customised/warning-triangle.svg";
|
||||
import { UserFriendlyError, _t } from "../../../../../languageHandler";
|
||||
|
|
|
@ -15,7 +15,7 @@ limitations under the License.
|
|||
*/
|
||||
|
||||
import React, { FC, useState, useEffect, memo } from "react";
|
||||
import { GroupCall } from "matrix-js-sdk/src/webrtc/groupCall";
|
||||
import { GroupCall } from "matrix-js-sdk/src/matrix";
|
||||
|
||||
import { formatPreciseDuration } from "../../../DateUtils";
|
||||
|
||||
|
|
|
@ -15,10 +15,9 @@ limitations under the License.
|
|||
*/
|
||||
|
||||
import React from "react";
|
||||
import { MatrixEvent, EventType, MsgType, RelationType, MatrixClient } from "matrix-js-sdk/src/matrix";
|
||||
import { MatrixEvent, EventType, MsgType, RelationType, MatrixClient, GroupCallIntent } from "matrix-js-sdk/src/matrix";
|
||||
import { Optional } from "matrix-events-sdk";
|
||||
import { M_POLL_END, M_POLL_START } from "matrix-js-sdk/src/@types/polls";
|
||||
import { GroupCallIntent } from "matrix-js-sdk/src/webrtc/groupCall";
|
||||
|
||||
import SettingsStore from "../settings/SettingsStore";
|
||||
import LegacyCallEventGrouper from "../components/structures/LegacyCallEventGrouper";
|
||||
|
|
|
@ -14,8 +14,12 @@ See the License for the specific language governing permissions and
|
|||
limitations under the License.
|
||||
*/
|
||||
|
||||
import { IMatrixProfile, IEventWithRoomId as IMatrixEvent, IResultRoomEvents } from "matrix-js-sdk/src/@types/search";
|
||||
import { Direction } from "matrix-js-sdk/src/matrix";
|
||||
import {
|
||||
IMatrixProfile,
|
||||
IEventWithRoomId as IMatrixEvent,
|
||||
IResultRoomEvents,
|
||||
Direction,
|
||||
} from "matrix-js-sdk/src/matrix";
|
||||
|
||||
// The following interfaces take their names and member names from seshat and the spec
|
||||
/* eslint-disable camelcase */
|
||||
|
|
|
@ -30,12 +30,15 @@ import {
|
|||
ClientEvent,
|
||||
MatrixClient,
|
||||
HTTPError,
|
||||
IEventWithRoomId,
|
||||
IMatrixProfile,
|
||||
IResultRoomEvents,
|
||||
SyncStateData,
|
||||
SyncState,
|
||||
} from "matrix-js-sdk/src/matrix";
|
||||
import { TimelineIndex, TimelineWindow } from "matrix-js-sdk/src/timeline-window";
|
||||
import { sleep } from "matrix-js-sdk/src/utils";
|
||||
import { IEventWithRoomId, IMatrixProfile, IResultRoomEvents } from "matrix-js-sdk/src/@types/search";
|
||||
import { logger } from "matrix-js-sdk/src/logger";
|
||||
import { ISyncStateData, SyncState } from "matrix-js-sdk/src/sync";
|
||||
|
||||
import PlatformPeg from "../PlatformPeg";
|
||||
import { MatrixClientPeg } from "../MatrixClientPeg";
|
||||
|
@ -168,7 +171,7 @@ export default class EventIndex extends EventEmitter {
|
|||
* - Every other sync, tell the event index to commit all the queued up
|
||||
* live events
|
||||
*/
|
||||
private onSync = async (state: SyncState, prevState: SyncState | null, data?: ISyncStateData): Promise<void> => {
|
||||
private onSync = async (state: SyncState, prevState: SyncState | null, data?: SyncStateData): Promise<void> => {
|
||||
const indexManager = PlatformPeg.get()?.getEventIndexingManager();
|
||||
if (!indexManager) return;
|
||||
|
||||
|
|
|
@ -14,19 +14,23 @@ See the License for the specific language governing permissions and
|
|||
limitations under the License.
|
||||
*/
|
||||
|
||||
import { TypedEventEmitter, RoomEvent, RoomStateEvent, EventType, MatrixClient } from "matrix-js-sdk/src/matrix";
|
||||
import { logger } from "matrix-js-sdk/src/logger";
|
||||
import { randomString } from "matrix-js-sdk/src/randomstring";
|
||||
import { CallType } from "matrix-js-sdk/src/webrtc/call";
|
||||
import { NamespacedValue } from "matrix-js-sdk/src/NamespacedValue";
|
||||
import { IWidgetApiRequest, MatrixWidgetType } from "matrix-widget-api";
|
||||
import {
|
||||
TypedEventEmitter,
|
||||
RoomEvent,
|
||||
RoomStateEvent,
|
||||
EventType,
|
||||
MatrixClient,
|
||||
GroupCall,
|
||||
GroupCallEvent,
|
||||
GroupCallIntent,
|
||||
GroupCallState,
|
||||
GroupCallType,
|
||||
} from "matrix-js-sdk/src/webrtc/groupCall";
|
||||
} from "matrix-js-sdk/src/matrix";
|
||||
import { logger } from "matrix-js-sdk/src/logger";
|
||||
import { randomString } from "matrix-js-sdk/src/randomstring";
|
||||
import { CallType } from "matrix-js-sdk/src/webrtc/call";
|
||||
import { NamespacedValue } from "matrix-js-sdk/src/NamespacedValue";
|
||||
import { IWidgetApiRequest, MatrixWidgetType } from "matrix-widget-api";
|
||||
|
||||
import type EventEmitter from "events";
|
||||
import type { IMyDevice, Room, RoomMember } from "matrix-js-sdk/src/matrix";
|
||||
|
|
|
@ -14,9 +14,8 @@ See the License for the specific language governing permissions and
|
|||
limitations under the License.
|
||||
*/
|
||||
|
||||
import { ClientEvent, MatrixEvent, MatrixEventEvent } from "matrix-js-sdk/src/matrix";
|
||||
import { ClientEvent, MatrixEvent, MatrixEventEvent, SyncStateData, SyncState } from "matrix-js-sdk/src/matrix";
|
||||
import { sleep } from "matrix-js-sdk/src/utils";
|
||||
import { ISyncStateData, SyncState } from "matrix-js-sdk/src/sync";
|
||||
|
||||
import SdkConfig from "../SdkConfig";
|
||||
import sendBugReport from "../rageshake/submit-rageshake";
|
||||
|
@ -145,7 +144,7 @@ export default class AutoRageshakeStore extends AsyncStoreWithClient<IState> {
|
|||
private async onSyncStateChange(
|
||||
_state: SyncState,
|
||||
_prevState: SyncState | null,
|
||||
data?: ISyncStateData,
|
||||
data?: SyncStateData,
|
||||
): Promise<void> {
|
||||
if (!this.state.initialSyncCompleted) {
|
||||
await this.updateState({ initialSyncCompleted: !!data?.nextSyncToken });
|
||||
|
|
|
@ -17,8 +17,7 @@ limitations under the License.
|
|||
import { logger } from "matrix-js-sdk/src/logger";
|
||||
import { GroupCallEventHandlerEvent } from "matrix-js-sdk/src/webrtc/groupCallEventHandler";
|
||||
|
||||
import type { GroupCall } from "matrix-js-sdk/src/webrtc/groupCall";
|
||||
import type { Room } from "matrix-js-sdk/src/matrix";
|
||||
import type { GroupCall, Room } from "matrix-js-sdk/src/matrix";
|
||||
import defaultDispatcher from "../dispatcher/dispatcher";
|
||||
import { UPDATE_EVENT } from "./AsyncStore";
|
||||
import { AsyncStoreWithClient } from "./AsyncStoreWithClient";
|
||||
|
|
|
@ -14,8 +14,7 @@
|
|||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import { MatrixClient } from "matrix-js-sdk/src/matrix";
|
||||
import { SyncState } from "matrix-js-sdk/src/sync";
|
||||
import { MatrixClient, SyncState } from "matrix-js-sdk/src/matrix";
|
||||
import { EventEmitter } from "events";
|
||||
|
||||
import { MatrixClientPeg } from "../MatrixClientPeg";
|
||||
|
|
|
@ -14,8 +14,7 @@ See the License for the specific language governing permissions and
|
|||
limitations under the License.
|
||||
*/
|
||||
|
||||
import { Room, ClientEvent } from "matrix-js-sdk/src/matrix";
|
||||
import { SyncState } from "matrix-js-sdk/src/sync";
|
||||
import { Room, ClientEvent, SyncState } from "matrix-js-sdk/src/matrix";
|
||||
|
||||
import { ActionPayload } from "../../dispatcher/payloads";
|
||||
import { AsyncStoreWithClient } from "../AsyncStoreWithClient";
|
||||
|
|
|
@ -14,9 +14,8 @@ See the License for the specific language governing permissions and
|
|||
limitations under the License.
|
||||
*/
|
||||
|
||||
import { SERVICE_TYPES } from "matrix-js-sdk/src/service-types";
|
||||
import { SERVICE_TYPES, HTTPError, MatrixClient } from "matrix-js-sdk/src/matrix";
|
||||
import { logger } from "matrix-js-sdk/src/logger";
|
||||
import { HTTPError, MatrixClient } from "matrix-js-sdk/src/matrix";
|
||||
|
||||
import SdkConfig from "../SdkConfig";
|
||||
import { Policies } from "../Terms";
|
||||
|
|
|
@ -14,8 +14,7 @@ See the License for the specific language governing permissions and
|
|||
limitations under the License.
|
||||
*/
|
||||
|
||||
import { ClientEvent, ClientEventHandlerMap } from "matrix-js-sdk/src/matrix";
|
||||
import { SyncState } from "matrix-js-sdk/src/sync";
|
||||
import { ClientEvent, ClientEventHandlerMap, SyncState } from "matrix-js-sdk/src/matrix";
|
||||
|
||||
/**
|
||||
* Creates a MatrixClient event listener function that can be used to get notified about reconnects.
|
||||
|
|
|
@ -14,8 +14,7 @@ See the License for the specific language governing permissions and
|
|||
limitations under the License.
|
||||
*/
|
||||
|
||||
import { ClientEvent, MatrixClient, MatrixEvent, RelationType, Room } from "matrix-js-sdk/src/matrix";
|
||||
import { SyncState } from "matrix-js-sdk/src/sync";
|
||||
import { ClientEvent, MatrixClient, MatrixEvent, RelationType, Room, SyncState } from "matrix-js-sdk/src/matrix";
|
||||
|
||||
import { VoiceBroadcastInfoEventContent, VoiceBroadcastInfoEventType, VoiceBroadcastInfoState } from "..";
|
||||
import { IDestroyable } from "../../utils/IDestroyable";
|
||||
|
|
|
@ -15,8 +15,7 @@ limitations under the License.
|
|||
*/
|
||||
|
||||
import React from "react";
|
||||
import { MatrixClient, Room } from "matrix-js-sdk/src/matrix";
|
||||
import { SyncState } from "matrix-js-sdk/src/sync";
|
||||
import { MatrixClient, Room, SyncState } from "matrix-js-sdk/src/matrix";
|
||||
|
||||
import { hasRoomLiveVoiceBroadcast, VoiceBroadcastInfoEventType, VoiceBroadcastRecordingsStore } from "..";
|
||||
import InfoDialog from "../../components/views/dialogs/InfoDialog";
|
||||
|
|
|
@ -24,8 +24,8 @@ import {
|
|||
MsgType,
|
||||
IContent,
|
||||
MatrixEvent,
|
||||
SyncState,
|
||||
} from "matrix-js-sdk/src/matrix";
|
||||
import { SyncState } from "matrix-js-sdk/src/sync";
|
||||
import { waitFor } from "@testing-library/react";
|
||||
|
||||
import BasePlatform from "../src/BasePlatform";
|
||||
|
|
|
@ -18,8 +18,7 @@ import React, { ComponentProps } from "react";
|
|||
import { fireEvent, render, RenderResult, screen, within } from "@testing-library/react";
|
||||
import fetchMock from "fetch-mock-jest";
|
||||
import { mocked } from "jest-mock";
|
||||
import { ClientEvent, MatrixClient, MatrixEvent, Room } from "matrix-js-sdk/src/matrix";
|
||||
import { SyncState } from "matrix-js-sdk/src/sync";
|
||||
import { ClientEvent, MatrixClient, MatrixEvent, Room, SyncState } from "matrix-js-sdk/src/matrix";
|
||||
import { MediaHandler } from "matrix-js-sdk/src/webrtc/mediaHandler";
|
||||
import * as MatrixJs from "matrix-js-sdk/src/matrix";
|
||||
import { completeAuthorizationCodeGrant } from "matrix-js-sdk/src/oidc/authorize";
|
||||
|
|
|
@ -17,8 +17,15 @@ limitations under the License.
|
|||
import React from "react";
|
||||
import { mocked } from "jest-mock";
|
||||
import { render, screen } from "@testing-library/react";
|
||||
import { Room, MatrixClient, IEvent, MatrixEvent, EventType, SearchResult } from "matrix-js-sdk/src/matrix";
|
||||
import { ISearchResults } from "matrix-js-sdk/src/@types/search";
|
||||
import {
|
||||
Room,
|
||||
MatrixClient,
|
||||
IEvent,
|
||||
MatrixEvent,
|
||||
EventType,
|
||||
SearchResult,
|
||||
ISearchResults,
|
||||
} from "matrix-js-sdk/src/matrix";
|
||||
import { defer } from "matrix-js-sdk/src/utils";
|
||||
|
||||
import { RoomSearchView } from "../../../src/components/structures/RoomSearchView";
|
||||
|
|
|
@ -17,10 +17,9 @@ limitations under the License.
|
|||
import React, { ComponentProps } from "react";
|
||||
import { fireEvent, render } from "@testing-library/react";
|
||||
import { LocationAssetType } from "matrix-js-sdk/src/@types/location";
|
||||
import { ClientEvent, RoomMember } from "matrix-js-sdk/src/matrix";
|
||||
import { ClientEvent, RoomMember, SyncState } from "matrix-js-sdk/src/matrix";
|
||||
import * as maplibregl from "maplibre-gl";
|
||||
import { logger } from "matrix-js-sdk/src/logger";
|
||||
import { SyncState } from "matrix-js-sdk/src/sync";
|
||||
|
||||
import MLocationBody from "../../../../src/components/views/messages/MLocationBody";
|
||||
import MatrixClientContext from "../../../../src/contexts/MatrixClientContext";
|
||||
|
|
|
@ -16,8 +16,7 @@ limitations under the License.
|
|||
|
||||
import React from "react";
|
||||
import { fireEvent, render } from "@testing-library/react";
|
||||
import { Filter } from "matrix-js-sdk/src/filter";
|
||||
import { EventTimeline, Room } from "matrix-js-sdk/src/matrix";
|
||||
import { Filter, EventTimeline, Room } from "matrix-js-sdk/src/matrix";
|
||||
import { M_POLL_START } from "matrix-js-sdk/src/@types/polls";
|
||||
|
||||
import { PollHistory } from "../../../../../src/components/views/polls/pollHistory/PollHistory";
|
||||
|
|
|
@ -17,11 +17,17 @@ limitations under the License.
|
|||
import React from "react";
|
||||
import { render, screen, act, fireEvent, waitFor, getByRole, RenderResult } from "@testing-library/react";
|
||||
import { mocked, Mocked } from "jest-mock";
|
||||
import { EventType, RoomType, Room, RoomStateEvent, PendingEventOrdering } from "matrix-js-sdk/src/matrix";
|
||||
import {
|
||||
EventType,
|
||||
RoomType,
|
||||
Room,
|
||||
RoomStateEvent,
|
||||
PendingEventOrdering,
|
||||
ISearchResults,
|
||||
} from "matrix-js-sdk/src/matrix";
|
||||
import { CallType } from "matrix-js-sdk/src/webrtc/call";
|
||||
import { ClientWidgetApi, Widget } from "matrix-widget-api";
|
||||
import EventEmitter from "events";
|
||||
import { ISearchResults } from "matrix-js-sdk/src/@types/search";
|
||||
|
||||
import type { MatrixClient, MatrixEvent, RoomMember } from "matrix-js-sdk/src/matrix";
|
||||
import type { MatrixCall } from "matrix-js-sdk/src/webrtc/call";
|
||||
|
|
|
@ -17,9 +17,16 @@ limitations under the License.
|
|||
import EventEmitter from "events";
|
||||
import { mocked } from "jest-mock";
|
||||
import { waitFor } from "@testing-library/react";
|
||||
import { RoomType, Room, RoomEvent, MatrixEvent, RoomStateEvent, PendingEventOrdering } from "matrix-js-sdk/src/matrix";
|
||||
import {
|
||||
RoomType,
|
||||
Room,
|
||||
RoomEvent,
|
||||
MatrixEvent,
|
||||
RoomStateEvent,
|
||||
PendingEventOrdering,
|
||||
GroupCallIntent,
|
||||
} from "matrix-js-sdk/src/matrix";
|
||||
import { Widget } from "matrix-widget-api";
|
||||
import { GroupCallIntent } from "matrix-js-sdk/src/webrtc/groupCall";
|
||||
|
||||
import type { Mocked } from "jest-mock";
|
||||
import type { MatrixClient, IMyDevice, RoomMember } from "matrix-js-sdk/src/matrix";
|
||||
|
|
|
@ -15,8 +15,14 @@ limitations under the License.
|
|||
*/
|
||||
|
||||
import { mocked } from "jest-mock";
|
||||
import { ClientEvent, EventType, MatrixClient, MatrixEvent, MatrixEventEvent } from "matrix-js-sdk/src/matrix";
|
||||
import { SyncState } from "matrix-js-sdk/src/sync";
|
||||
import {
|
||||
ClientEvent,
|
||||
EventType,
|
||||
MatrixClient,
|
||||
MatrixEvent,
|
||||
MatrixEventEvent,
|
||||
SyncState,
|
||||
} from "matrix-js-sdk/src/matrix";
|
||||
|
||||
import SettingsStore from "../../src/settings/SettingsStore";
|
||||
import AutoRageshakeStore from "../../src/stores/AutoRageshakeStore";
|
||||
|
|
|
@ -15,8 +15,7 @@ limitations under the License.
|
|||
*/
|
||||
|
||||
import { mocked } from "jest-mock";
|
||||
import { ClientEvent, MatrixClient, Room } from "matrix-js-sdk/src/matrix";
|
||||
import { SyncState } from "matrix-js-sdk/src/sync";
|
||||
import { ClientEvent, MatrixClient, Room, SyncState } from "matrix-js-sdk/src/matrix";
|
||||
|
||||
import { createTestClient, setupAsyncStoreWithClient } from "../test-utils";
|
||||
import {
|
||||
|
|
|
@ -16,8 +16,7 @@ limitations under the License.
|
|||
|
||||
import { MatrixWidgetType } from "matrix-widget-api";
|
||||
|
||||
import type { GroupCall } from "matrix-js-sdk/src/webrtc/groupCall";
|
||||
import type { Room, RoomMember, MatrixEvent } from "matrix-js-sdk/src/matrix";
|
||||
import type { GroupCall, Room, RoomMember, MatrixEvent } from "matrix-js-sdk/src/matrix";
|
||||
import { mkEvent } from "./test-utils";
|
||||
import { Call, ConnectionState, ElementCall, JitsiCall } from "../../src/models/Call";
|
||||
import { CallStore } from "../../src/stores/CallStore";
|
||||
|
|
|
@ -45,7 +45,7 @@ import { CryptoBackend } from "matrix-js-sdk/src/common-crypto/CryptoBackend";
|
|||
import { IEventDecryptionResult } from "matrix-js-sdk/src/@types/crypto";
|
||||
import { MapperOpts } from "matrix-js-sdk/src/event-mapper";
|
||||
|
||||
import type { GroupCall } from "matrix-js-sdk/src/webrtc/groupCall";
|
||||
import type { GroupCall } from "matrix-js-sdk/src/matrix";
|
||||
import { MatrixClientPeg as peg } from "../../src/MatrixClientPeg";
|
||||
import { ValidatedDelegatedAuthConfig, ValidatedServerConfig } from "../../src/utils/ValidatedServerConfig";
|
||||
import { EnhancedMap } from "../../src/utils/maps";
|
||||
|
|
|
@ -14,8 +14,7 @@ See the License for the specific language governing permissions and
|
|||
limitations under the License.
|
||||
*/
|
||||
|
||||
import { ClientEvent, ClientEventHandlerMap } from "matrix-js-sdk/src/matrix";
|
||||
import { SyncState } from "matrix-js-sdk/src/sync";
|
||||
import { ClientEvent, ClientEventHandlerMap, SyncState } from "matrix-js-sdk/src/matrix";
|
||||
|
||||
import { createReconnectedListener } from "../../src/utils/connection";
|
||||
|
||||
|
|
|
@ -18,10 +18,9 @@ limitations under the License.
|
|||
import React from "react";
|
||||
import { act, render, RenderResult, screen } from "@testing-library/react";
|
||||
import userEvent from "@testing-library/user-event";
|
||||
import { ClientEvent, MatrixClient, MatrixEvent } from "matrix-js-sdk/src/matrix";
|
||||
import { ClientEvent, MatrixClient, MatrixEvent, SyncState } from "matrix-js-sdk/src/matrix";
|
||||
import { sleep } from "matrix-js-sdk/src/utils";
|
||||
import { mocked } from "jest-mock";
|
||||
import { SyncState } from "matrix-js-sdk/src/sync";
|
||||
|
||||
import {
|
||||
VoiceBroadcastInfoState,
|
||||
|
|
|
@ -27,8 +27,8 @@ import {
|
|||
RelationType,
|
||||
Room,
|
||||
Relations,
|
||||
SyncState,
|
||||
} from "matrix-js-sdk/src/matrix";
|
||||
import { SyncState } from "matrix-js-sdk/src/sync";
|
||||
|
||||
import { uploadFile } from "../../../src/ContentMessages";
|
||||
import { EncryptedFile } from "../../../src/customisations/models/IMediaEventContent";
|
||||
|
|
|
@ -15,8 +15,7 @@ limitations under the License.
|
|||
*/
|
||||
|
||||
import { mocked } from "jest-mock";
|
||||
import { ClientEvent, MatrixClient, MatrixEvent, RelationType, Room } from "matrix-js-sdk/src/matrix";
|
||||
import { SyncState } from "matrix-js-sdk/src/sync";
|
||||
import { ClientEvent, MatrixClient, MatrixEvent, RelationType, Room, SyncState } from "matrix-js-sdk/src/matrix";
|
||||
|
||||
import {
|
||||
VoiceBroadcastInfoEventContent,
|
||||
|
|
|
@ -15,8 +15,7 @@ limitations under the License.
|
|||
*/
|
||||
|
||||
import { mocked } from "jest-mock";
|
||||
import { MatrixClient, MatrixEvent, Room } from "matrix-js-sdk/src/matrix";
|
||||
import { SyncState } from "matrix-js-sdk/src/sync";
|
||||
import { MatrixClient, MatrixEvent, Room, SyncState } from "matrix-js-sdk/src/matrix";
|
||||
|
||||
import Modal from "../../../src/Modal";
|
||||
import {
|
||||
|
|
|
@ -15,8 +15,7 @@ limitations under the License.
|
|||
*/
|
||||
|
||||
import { mocked } from "jest-mock";
|
||||
import { EventType, ISendEventResponse, MatrixClient, MatrixEvent, Room } from "matrix-js-sdk/src/matrix";
|
||||
import { SyncState } from "matrix-js-sdk/src/sync";
|
||||
import { EventType, ISendEventResponse, MatrixClient, MatrixEvent, Room, SyncState } from "matrix-js-sdk/src/matrix";
|
||||
|
||||
import Modal from "../../../src/Modal";
|
||||
import {
|
||||
|
|
Loading…
Reference in a new issue