Switch to importing more things from the main js-sdk export (#11394)
This commit is contained in:
parent
aa6f27dde2
commit
d2c6577024
37 changed files with 120 additions and 63 deletions
20
.eslintrc.js
20
.eslintrc.js
|
@ -154,6 +154,26 @@ module.exports = {
|
||||||
name: "matrix-js-sdk/src/sync",
|
name: "matrix-js-sdk/src/sync",
|
||||||
message: "Please use matrix-js-sdk/src/matrix instead",
|
message: "Please use matrix-js-sdk/src/matrix instead",
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
name: "matrix-js-sdk/src/timeline-window",
|
||||||
|
message: "Please use matrix-js-sdk/src/matrix instead",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: "matrix-js-sdk/src/store/indexeddb",
|
||||||
|
message: "Please use matrix-js-sdk/src/matrix instead",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: "matrix-js-sdk/src/crypto/store/indexeddb-crypto-store",
|
||||||
|
message: "Please use matrix-js-sdk/src/matrix instead",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: "matrix-js-sdk/src/crypto/store/localStorage-crypto-store",
|
||||||
|
message: "Please use matrix-js-sdk/src/matrix instead",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: "matrix-js-sdk/src/models/thread",
|
||||||
|
message: "Please use matrix-js-sdk/src/matrix instead",
|
||||||
|
},
|
||||||
{
|
{
|
||||||
name: "matrix-react-sdk",
|
name: "matrix-react-sdk",
|
||||||
message: "Please use matrix-react-sdk/src/index instead",
|
message: "Please use matrix-react-sdk/src/index instead",
|
||||||
|
|
|
@ -26,11 +26,11 @@ import {
|
||||||
MatrixEvent,
|
MatrixEvent,
|
||||||
UploadOpts,
|
UploadOpts,
|
||||||
UploadProgress,
|
UploadProgress,
|
||||||
|
THREAD_RELATION_TYPE,
|
||||||
} from "matrix-js-sdk/src/matrix";
|
} from "matrix-js-sdk/src/matrix";
|
||||||
import encrypt from "matrix-encrypt-attachment";
|
import encrypt from "matrix-encrypt-attachment";
|
||||||
import extractPngChunks from "png-chunks-extract";
|
import extractPngChunks from "png-chunks-extract";
|
||||||
import { logger } from "matrix-js-sdk/src/logger";
|
import { logger } from "matrix-js-sdk/src/logger";
|
||||||
import { THREAD_RELATION_TYPE } from "matrix-js-sdk/src/models/thread";
|
|
||||||
import { removeElement } from "matrix-js-sdk/src/utils";
|
import { removeElement } from "matrix-js-sdk/src/utils";
|
||||||
|
|
||||||
import {
|
import {
|
||||||
|
|
|
@ -25,8 +25,8 @@ import {
|
||||||
MatrixEventEvent,
|
MatrixEventEvent,
|
||||||
Room,
|
Room,
|
||||||
RoomEvent,
|
RoomEvent,
|
||||||
|
TimelineWindow,
|
||||||
} from "matrix-js-sdk/src/matrix";
|
} from "matrix-js-sdk/src/matrix";
|
||||||
import { TimelineWindow } from "matrix-js-sdk/src/timeline-window";
|
|
||||||
import { logger } from "matrix-js-sdk/src/logger";
|
import { logger } from "matrix-js-sdk/src/logger";
|
||||||
|
|
||||||
import { MatrixClientPeg } from "../../MatrixClientPeg";
|
import { MatrixClientPeg } from "../../MatrixClientPeg";
|
||||||
|
|
|
@ -15,8 +15,12 @@ limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import React, { forwardRef, useCallback, useContext, useEffect, useRef, useState } from "react";
|
import React, { forwardRef, useCallback, useContext, useEffect, useRef, useState } from "react";
|
||||||
import { ISearchResults, IThreadBundledRelationship, MatrixEvent } from "matrix-js-sdk/src/matrix";
|
import {
|
||||||
import { THREAD_RELATION_TYPE } from "matrix-js-sdk/src/models/thread";
|
ISearchResults,
|
||||||
|
IThreadBundledRelationship,
|
||||||
|
MatrixEvent,
|
||||||
|
THREAD_RELATION_TYPE,
|
||||||
|
} from "matrix-js-sdk/src/matrix";
|
||||||
import { logger } from "matrix-js-sdk/src/logger";
|
import { logger } from "matrix-js-sdk/src/logger";
|
||||||
|
|
||||||
import ScrollPanel from "./ScrollPanel";
|
import ScrollPanel from "./ScrollPanel";
|
||||||
|
|
|
@ -36,12 +36,12 @@ import {
|
||||||
ClientEvent,
|
ClientEvent,
|
||||||
MatrixError,
|
MatrixError,
|
||||||
ISearchResults,
|
ISearchResults,
|
||||||
|
THREAD_RELATION_TYPE,
|
||||||
} from "matrix-js-sdk/src/matrix";
|
} from "matrix-js-sdk/src/matrix";
|
||||||
import { logger } from "matrix-js-sdk/src/logger";
|
import { logger } from "matrix-js-sdk/src/logger";
|
||||||
import { CallState, MatrixCall } from "matrix-js-sdk/src/webrtc/call";
|
import { CallState, MatrixCall } from "matrix-js-sdk/src/webrtc/call";
|
||||||
import { throttle } from "lodash";
|
import { throttle } from "lodash";
|
||||||
import { CryptoEvent } from "matrix-js-sdk/src/crypto";
|
import { CryptoEvent } from "matrix-js-sdk/src/crypto";
|
||||||
import { THREAD_RELATION_TYPE } from "matrix-js-sdk/src/models/thread";
|
|
||||||
|
|
||||||
import shouldHideEvent from "../../shouldHideEvent";
|
import shouldHideEvent from "../../shouldHideEvent";
|
||||||
import { _t } from "../../languageHandler";
|
import { _t } from "../../languageHandler";
|
||||||
|
|
|
@ -16,8 +16,7 @@ limitations under the License.
|
||||||
|
|
||||||
import { Optional } from "matrix-events-sdk";
|
import { Optional } from "matrix-events-sdk";
|
||||||
import React, { useContext, useEffect, useRef, useState } from "react";
|
import React, { useContext, useEffect, useRef, useState } from "react";
|
||||||
import { EventTimelineSet, Room } from "matrix-js-sdk/src/matrix";
|
import { EventTimelineSet, Room, Thread } from "matrix-js-sdk/src/matrix";
|
||||||
import { Thread } from "matrix-js-sdk/src/models/thread";
|
|
||||||
|
|
||||||
import BaseCard from "../views/right_panel/BaseCard";
|
import BaseCard from "../views/right_panel/BaseCard";
|
||||||
import ResizeNotifier from "../../utils/ResizeNotifier";
|
import ResizeNotifier from "../../utils/ResizeNotifier";
|
||||||
|
|
|
@ -15,8 +15,15 @@ limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import React, { createRef, KeyboardEvent } from "react";
|
import React, { createRef, KeyboardEvent } from "react";
|
||||||
import { Thread, THREAD_RELATION_TYPE, ThreadEvent } from "matrix-js-sdk/src/models/thread";
|
import {
|
||||||
import { Room, RoomEvent, IEventRelation, MatrixEvent } from "matrix-js-sdk/src/matrix";
|
Thread,
|
||||||
|
THREAD_RELATION_TYPE,
|
||||||
|
ThreadEvent,
|
||||||
|
Room,
|
||||||
|
RoomEvent,
|
||||||
|
IEventRelation,
|
||||||
|
MatrixEvent,
|
||||||
|
} from "matrix-js-sdk/src/matrix";
|
||||||
import { logger } from "matrix-js-sdk/src/logger";
|
import { logger } from "matrix-js-sdk/src/logger";
|
||||||
import classNames from "classnames";
|
import classNames from "classnames";
|
||||||
|
|
||||||
|
|
|
@ -34,11 +34,12 @@ import {
|
||||||
Relations,
|
Relations,
|
||||||
MatrixError,
|
MatrixError,
|
||||||
SyncState,
|
SyncState,
|
||||||
|
TimelineWindow,
|
||||||
|
Thread,
|
||||||
|
ThreadEvent,
|
||||||
} from "matrix-js-sdk/src/matrix";
|
} from "matrix-js-sdk/src/matrix";
|
||||||
import { TimelineWindow } from "matrix-js-sdk/src/timeline-window";
|
|
||||||
import { debounce, findLastIndex, throttle } from "lodash";
|
import { debounce, findLastIndex, throttle } from "lodash";
|
||||||
import { logger } from "matrix-js-sdk/src/logger";
|
import { logger } from "matrix-js-sdk/src/logger";
|
||||||
import { Thread, ThreadEvent } from "matrix-js-sdk/src/models/thread";
|
|
||||||
import { ReceiptType } from "matrix-js-sdk/src/@types/read_receipts";
|
import { ReceiptType } from "matrix-js-sdk/src/@types/read_receipts";
|
||||||
|
|
||||||
import SettingsStore from "../../settings/SettingsStore";
|
import SettingsStore from "../../settings/SettingsStore";
|
||||||
|
|
|
@ -25,9 +25,9 @@ import {
|
||||||
EventType,
|
EventType,
|
||||||
RelationType,
|
RelationType,
|
||||||
Relations,
|
Relations,
|
||||||
|
Thread,
|
||||||
} from "matrix-js-sdk/src/matrix";
|
} from "matrix-js-sdk/src/matrix";
|
||||||
import { M_POLL_START } from "matrix-js-sdk/src/@types/polls";
|
import { M_POLL_START } from "matrix-js-sdk/src/@types/polls";
|
||||||
import { Thread } from "matrix-js-sdk/src/models/thread";
|
|
||||||
|
|
||||||
import { MatrixClientPeg } from "../../../MatrixClientPeg";
|
import { MatrixClientPeg } from "../../../MatrixClientPeg";
|
||||||
import dis from "../../../dispatcher/dispatcher";
|
import dis from "../../../dispatcher/dispatcher";
|
||||||
|
|
|
@ -14,8 +14,7 @@ See the License for the specific language governing permissions and
|
||||||
limitations under the License.
|
limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import { NotificationCountType, Room } from "matrix-js-sdk/src/matrix";
|
import { NotificationCountType, Room, Thread } from "matrix-js-sdk/src/matrix";
|
||||||
import { Thread } from "matrix-js-sdk/src/models/thread";
|
|
||||||
import React, { useContext } from "react";
|
import React, { useContext } from "react";
|
||||||
import { ReceiptType } from "matrix-js-sdk/src/@types/read_receipts";
|
import { ReceiptType } from "matrix-js-sdk/src/@types/read_receipts";
|
||||||
import { ReadReceipt } from "matrix-js-sdk/src/models/read-receipt";
|
import { ReadReceipt } from "matrix-js-sdk/src/models/read-receipt";
|
||||||
|
|
|
@ -14,11 +14,10 @@ See the License for the specific language governing permissions and
|
||||||
limitations under the License.
|
limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import { MatrixClient, IContent, IEventRelation, MatrixError } from "matrix-js-sdk/src/matrix";
|
import { MatrixClient, IContent, IEventRelation, MatrixError, THREAD_RELATION_TYPE } from "matrix-js-sdk/src/matrix";
|
||||||
import { makeLocationContent, makeBeaconInfoContent } from "matrix-js-sdk/src/content-helpers";
|
import { makeLocationContent, makeBeaconInfoContent } from "matrix-js-sdk/src/content-helpers";
|
||||||
import { logger } from "matrix-js-sdk/src/logger";
|
import { logger } from "matrix-js-sdk/src/logger";
|
||||||
import { LocationAssetType } from "matrix-js-sdk/src/@types/location";
|
import { LocationAssetType } from "matrix-js-sdk/src/@types/location";
|
||||||
import { THREAD_RELATION_TYPE } from "matrix-js-sdk/src/models/thread";
|
|
||||||
|
|
||||||
import { _t } from "../../../languageHandler";
|
import { _t } from "../../../languageHandler";
|
||||||
import Modal from "../../../Modal";
|
import Modal from "../../../Modal";
|
||||||
|
|
|
@ -20,8 +20,7 @@ limitations under the License.
|
||||||
|
|
||||||
import React from "react";
|
import React from "react";
|
||||||
import classNames from "classnames";
|
import classNames from "classnames";
|
||||||
import { NotificationCountType, Room, RoomEvent } from "matrix-js-sdk/src/matrix";
|
import { NotificationCountType, Room, RoomEvent, ThreadEvent } from "matrix-js-sdk/src/matrix";
|
||||||
import { ThreadEvent } from "matrix-js-sdk/src/models/thread";
|
|
||||||
|
|
||||||
import { _t } from "../../../languageHandler";
|
import { _t } from "../../../languageHandler";
|
||||||
import HeaderButton from "./HeaderButton";
|
import HeaderButton from "./HeaderButton";
|
||||||
|
|
|
@ -15,8 +15,14 @@ limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import React from "react";
|
import React from "react";
|
||||||
import { IEventRelation, MatrixEvent, NotificationCountType, Room, EventTimelineSet } from "matrix-js-sdk/src/matrix";
|
import {
|
||||||
import { Thread } from "matrix-js-sdk/src/models/thread";
|
IEventRelation,
|
||||||
|
MatrixEvent,
|
||||||
|
NotificationCountType,
|
||||||
|
Room,
|
||||||
|
EventTimelineSet,
|
||||||
|
Thread,
|
||||||
|
} from "matrix-js-sdk/src/matrix";
|
||||||
|
|
||||||
import BaseCard from "./BaseCard";
|
import BaseCard from "./BaseCard";
|
||||||
import ResizeNotifier from "../../../utils/ResizeNotifier";
|
import ResizeNotifier from "../../../utils/ResizeNotifier";
|
||||||
|
|
|
@ -29,8 +29,9 @@ import {
|
||||||
Room,
|
Room,
|
||||||
RoomEvent,
|
RoomEvent,
|
||||||
Relations,
|
Relations,
|
||||||
|
Thread,
|
||||||
|
ThreadEvent,
|
||||||
} from "matrix-js-sdk/src/matrix";
|
} from "matrix-js-sdk/src/matrix";
|
||||||
import { Thread, ThreadEvent } from "matrix-js-sdk/src/models/thread";
|
|
||||||
import { logger } from "matrix-js-sdk/src/logger";
|
import { logger } from "matrix-js-sdk/src/logger";
|
||||||
import { CallErrorCode } from "matrix-js-sdk/src/webrtc/call";
|
import { CallErrorCode } from "matrix-js-sdk/src/webrtc/call";
|
||||||
import { CryptoEvent } from "matrix-js-sdk/src/crypto";
|
import { CryptoEvent } from "matrix-js-sdk/src/crypto";
|
||||||
|
|
|
@ -16,9 +16,15 @@ limitations under the License.
|
||||||
|
|
||||||
import React, { createRef, ReactNode } from "react";
|
import React, { createRef, ReactNode } from "react";
|
||||||
import classNames from "classnames";
|
import classNames from "classnames";
|
||||||
import { IEventRelation, MatrixEvent, Room, RoomMember, EventType } from "matrix-js-sdk/src/matrix";
|
import {
|
||||||
|
IEventRelation,
|
||||||
|
MatrixEvent,
|
||||||
|
Room,
|
||||||
|
RoomMember,
|
||||||
|
EventType,
|
||||||
|
THREAD_RELATION_TYPE,
|
||||||
|
} from "matrix-js-sdk/src/matrix";
|
||||||
import { Optional } from "matrix-events-sdk";
|
import { Optional } from "matrix-events-sdk";
|
||||||
import { THREAD_RELATION_TYPE } from "matrix-js-sdk/src/models/thread";
|
|
||||||
|
|
||||||
import { _t } from "../../../languageHandler";
|
import { _t } from "../../../languageHandler";
|
||||||
import { MatrixClientPeg } from "../../../MatrixClientPeg";
|
import { MatrixClientPeg } from "../../../MatrixClientPeg";
|
||||||
|
|
|
@ -15,10 +15,9 @@ limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import classNames from "classnames";
|
import classNames from "classnames";
|
||||||
import { IEventRelation, Room, MatrixClient } from "matrix-js-sdk/src/matrix";
|
import { IEventRelation, Room, MatrixClient, THREAD_RELATION_TYPE } from "matrix-js-sdk/src/matrix";
|
||||||
import { M_POLL_START } from "matrix-js-sdk/src/@types/polls";
|
import { M_POLL_START } from "matrix-js-sdk/src/@types/polls";
|
||||||
import React, { createContext, ReactElement, ReactNode, useContext, useRef } from "react";
|
import React, { createContext, ReactElement, ReactNode, useContext, useRef } from "react";
|
||||||
import { THREAD_RELATION_TYPE } from "matrix-js-sdk/src/models/thread";
|
|
||||||
|
|
||||||
import { _t } from "../../../languageHandler";
|
import { _t } from "../../../languageHandler";
|
||||||
import AccessibleTooltipButton from "../elements/AccessibleTooltipButton";
|
import AccessibleTooltipButton from "../elements/AccessibleTooltipButton";
|
||||||
|
|
|
@ -25,11 +25,11 @@ import {
|
||||||
EventType,
|
EventType,
|
||||||
MsgType,
|
MsgType,
|
||||||
RelationType,
|
RelationType,
|
||||||
|
THREAD_RELATION_TYPE,
|
||||||
} from "matrix-js-sdk/src/matrix";
|
} from "matrix-js-sdk/src/matrix";
|
||||||
import { DebouncedFunc, throttle } from "lodash";
|
import { DebouncedFunc, throttle } from "lodash";
|
||||||
import { logger } from "matrix-js-sdk/src/logger";
|
import { logger } from "matrix-js-sdk/src/logger";
|
||||||
import { Composer as ComposerEvent } from "@matrix-org/analytics-events/types/typescript/Composer";
|
import { Composer as ComposerEvent } from "@matrix-org/analytics-events/types/typescript/Composer";
|
||||||
import { THREAD_RELATION_TYPE } from "matrix-js-sdk/src/models/thread";
|
|
||||||
|
|
||||||
import dis from "../../../dispatcher/dispatcher";
|
import dis from "../../../dispatcher/dispatcher";
|
||||||
import EditorModel from "../../../editor/model";
|
import EditorModel from "../../../editor/model";
|
||||||
|
|
|
@ -15,8 +15,7 @@ limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import React, { useContext, useState } from "react";
|
import React, { useContext, useState } from "react";
|
||||||
import { Thread, ThreadEvent } from "matrix-js-sdk/src/models/thread";
|
import { Thread, ThreadEvent, IContent, MatrixEvent, MatrixEventEvent } from "matrix-js-sdk/src/matrix";
|
||||||
import { IContent, MatrixEvent, MatrixEventEvent } from "matrix-js-sdk/src/matrix";
|
|
||||||
|
|
||||||
import { _t } from "../../../languageHandler";
|
import { _t } from "../../../languageHandler";
|
||||||
import { CardContext } from "../right_panel/context";
|
import { CardContext } from "../right_panel/context";
|
||||||
|
|
|
@ -14,8 +14,7 @@ See the License for the specific language governing permissions and
|
||||||
limitations under the License.
|
limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import { MatrixClient, MatrixEvent } from "matrix-js-sdk/src/matrix";
|
import { MatrixClient, MatrixEvent, THREAD_RELATION_TYPE } from "matrix-js-sdk/src/matrix";
|
||||||
import { THREAD_RELATION_TYPE } from "matrix-js-sdk/src/models/thread";
|
|
||||||
|
|
||||||
import EditorStateTransfer from "../../../../../utils/EditorStateTransfer";
|
import EditorStateTransfer from "../../../../../utils/EditorStateTransfer";
|
||||||
import { IRoomState } from "../../../../structures/RoomView";
|
import { IRoomState } from "../../../../structures/RoomView";
|
||||||
|
|
|
@ -15,8 +15,14 @@ limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import { Composer as ComposerEvent } from "@matrix-org/analytics-events/types/typescript/Composer";
|
import { Composer as ComposerEvent } from "@matrix-org/analytics-events/types/typescript/Composer";
|
||||||
import { IContent, IEventRelation, MatrixEvent, ISendEventResponse, MatrixClient } from "matrix-js-sdk/src/matrix";
|
import {
|
||||||
import { THREAD_RELATION_TYPE } from "matrix-js-sdk/src/models/thread";
|
IContent,
|
||||||
|
IEventRelation,
|
||||||
|
MatrixEvent,
|
||||||
|
ISendEventResponse,
|
||||||
|
MatrixClient,
|
||||||
|
THREAD_RELATION_TYPE,
|
||||||
|
} from "matrix-js-sdk/src/matrix";
|
||||||
|
|
||||||
import { PosthogAnalytics } from "../../../../../PosthogAnalytics";
|
import { PosthogAnalytics } from "../../../../../PosthogAnalytics";
|
||||||
import SettingsStore from "../../../../../settings/SettingsStore";
|
import SettingsStore from "../../../../../settings/SettingsStore";
|
||||||
|
|
|
@ -35,8 +35,9 @@ import {
|
||||||
IResultRoomEvents,
|
IResultRoomEvents,
|
||||||
SyncStateData,
|
SyncStateData,
|
||||||
SyncState,
|
SyncState,
|
||||||
|
TimelineIndex,
|
||||||
|
TimelineWindow,
|
||||||
} from "matrix-js-sdk/src/matrix";
|
} 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 { sleep } from "matrix-js-sdk/src/utils";
|
||||||
import { logger } from "matrix-js-sdk/src/logger";
|
import { logger } from "matrix-js-sdk/src/logger";
|
||||||
|
|
||||||
|
|
|
@ -14,10 +14,9 @@ See the License for the specific language governing permissions and
|
||||||
limitations under the License.
|
limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import { Room, RelationType, MatrixEvent } from "matrix-js-sdk/src/matrix";
|
import { Room, RelationType, MatrixEvent, Thread } from "matrix-js-sdk/src/matrix";
|
||||||
import { isNullOrUndefined } from "matrix-js-sdk/src/utils";
|
import { isNullOrUndefined } from "matrix-js-sdk/src/utils";
|
||||||
import { M_POLL_START } from "matrix-js-sdk/src/@types/polls";
|
import { M_POLL_START } from "matrix-js-sdk/src/@types/polls";
|
||||||
import { Thread } from "matrix-js-sdk/src/models/thread";
|
|
||||||
|
|
||||||
import { ActionPayload } from "../../dispatcher/payloads";
|
import { ActionPayload } from "../../dispatcher/payloads";
|
||||||
import { AsyncStoreWithClient } from "../AsyncStoreWithClient";
|
import { AsyncStoreWithClient } from "../AsyncStoreWithClient";
|
||||||
|
|
|
@ -41,9 +41,9 @@ import {
|
||||||
MatrixEvent,
|
MatrixEvent,
|
||||||
Room,
|
Room,
|
||||||
Direction,
|
Direction,
|
||||||
|
THREAD_RELATION_TYPE,
|
||||||
} from "matrix-js-sdk/src/matrix";
|
} from "matrix-js-sdk/src/matrix";
|
||||||
import { logger } from "matrix-js-sdk/src/logger";
|
import { logger } from "matrix-js-sdk/src/logger";
|
||||||
import { THREAD_RELATION_TYPE } from "matrix-js-sdk/src/models/thread";
|
|
||||||
import {
|
import {
|
||||||
ApprovalOpts,
|
ApprovalOpts,
|
||||||
CapabilitiesOpts,
|
CapabilitiesOpts,
|
||||||
|
|
|
@ -22,12 +22,12 @@ import {
|
||||||
MsgType,
|
MsgType,
|
||||||
RelationType,
|
RelationType,
|
||||||
MatrixClient,
|
MatrixClient,
|
||||||
|
THREAD_RELATION_TYPE,
|
||||||
} from "matrix-js-sdk/src/matrix";
|
} from "matrix-js-sdk/src/matrix";
|
||||||
import { logger } from "matrix-js-sdk/src/logger";
|
import { logger } from "matrix-js-sdk/src/logger";
|
||||||
import { M_POLL_END, M_POLL_START } from "matrix-js-sdk/src/@types/polls";
|
import { M_POLL_END, M_POLL_START } from "matrix-js-sdk/src/@types/polls";
|
||||||
import { M_LOCATION } from "matrix-js-sdk/src/@types/location";
|
import { M_LOCATION } from "matrix-js-sdk/src/@types/location";
|
||||||
import { M_BEACON_INFO } from "matrix-js-sdk/src/@types/beacon";
|
import { M_BEACON_INFO } from "matrix-js-sdk/src/@types/beacon";
|
||||||
import { THREAD_RELATION_TYPE } from "matrix-js-sdk/src/models/thread";
|
|
||||||
|
|
||||||
import shouldHideEvent from "../shouldHideEvent";
|
import shouldHideEvent from "../shouldHideEvent";
|
||||||
import { GetRelationsForEvent } from "../components/views/rooms/EventTile";
|
import { GetRelationsForEvent } from "../components/views/rooms/EventTile";
|
||||||
|
|
|
@ -15,10 +15,9 @@
|
||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import { IContent, IEventRelation, MatrixEvent, MsgType } from "matrix-js-sdk/src/matrix";
|
import { IContent, IEventRelation, MatrixEvent, MsgType, THREAD_RELATION_TYPE } from "matrix-js-sdk/src/matrix";
|
||||||
import sanitizeHtml from "sanitize-html";
|
import sanitizeHtml from "sanitize-html";
|
||||||
import escapeHtml from "escape-html";
|
import escapeHtml from "escape-html";
|
||||||
import { THREAD_RELATION_TYPE } from "matrix-js-sdk/src/models/thread";
|
|
||||||
import { M_BEACON_INFO } from "matrix-js-sdk/src/@types/beacon";
|
import { M_BEACON_INFO } from "matrix-js-sdk/src/@types/beacon";
|
||||||
import { M_POLL_END, M_POLL_START } from "matrix-js-sdk/src/@types/polls";
|
import { M_POLL_END, M_POLL_START } from "matrix-js-sdk/src/@types/polls";
|
||||||
import { PollStartEvent } from "matrix-js-sdk/src/extensible_events_v1/PollStartEvent";
|
import { PollStartEvent } from "matrix-js-sdk/src/extensible_events_v1/PollStartEvent";
|
||||||
|
|
|
@ -14,9 +14,7 @@ See the License for the specific language governing permissions and
|
||||||
limitations under the License.
|
limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import { LocalStorageCryptoStore } from "matrix-js-sdk/src/crypto/store/localStorage-crypto-store";
|
import { LocalStorageCryptoStore, IndexedDBStore, IndexedDBCryptoStore } from "matrix-js-sdk/src/matrix";
|
||||||
import { IndexedDBStore } from "matrix-js-sdk/src/store/indexeddb";
|
|
||||||
import { IndexedDBCryptoStore } from "matrix-js-sdk/src/crypto/store/indexeddb-crypto-store";
|
|
||||||
import { logger } from "matrix-js-sdk/src/logger";
|
import { logger } from "matrix-js-sdk/src/logger";
|
||||||
|
|
||||||
const localStorage = window.localStorage;
|
const localStorage = window.localStorage;
|
||||||
|
|
|
@ -19,10 +19,10 @@ import {
|
||||||
ICreateClientOpts,
|
ICreateClientOpts,
|
||||||
MemoryCryptoStore,
|
MemoryCryptoStore,
|
||||||
MemoryStore,
|
MemoryStore,
|
||||||
|
IndexedDBCryptoStore,
|
||||||
|
IndexedDBStore,
|
||||||
|
LocalStorageCryptoStore,
|
||||||
} from "matrix-js-sdk/src/matrix";
|
} from "matrix-js-sdk/src/matrix";
|
||||||
import { IndexedDBCryptoStore } from "matrix-js-sdk/src/crypto/store/indexeddb-crypto-store";
|
|
||||||
import { IndexedDBStore } from "matrix-js-sdk/src/store/indexeddb";
|
|
||||||
import { LocalStorageCryptoStore } from "matrix-js-sdk/src/crypto/store/localStorage-crypto-store";
|
|
||||||
|
|
||||||
// @ts-ignore - `.ts` is needed here to make TS happy
|
// @ts-ignore - `.ts` is needed here to make TS happy
|
||||||
import IndexedDBWorker from "../workers/indexeddb.worker.ts";
|
import IndexedDBWorker from "../workers/indexeddb.worker.ts";
|
||||||
|
|
|
@ -17,9 +17,8 @@ limitations under the License.
|
||||||
|
|
||||||
import React from "react";
|
import React from "react";
|
||||||
import { EventEmitter } from "events";
|
import { EventEmitter } from "events";
|
||||||
import { MatrixEvent, Room, RoomMember } from "matrix-js-sdk/src/matrix";
|
import { MatrixEvent, Room, RoomMember, Thread } from "matrix-js-sdk/src/matrix";
|
||||||
import { render } from "@testing-library/react";
|
import { render } from "@testing-library/react";
|
||||||
import { Thread } from "matrix-js-sdk/src/models/thread";
|
|
||||||
import { ReceiptType } from "matrix-js-sdk/src/@types/read_receipts";
|
import { ReceiptType } from "matrix-js-sdk/src/@types/read_receipts";
|
||||||
|
|
||||||
import MessagePanel, { shouldFormContinuation } from "../../../src/components/structures/MessagePanel";
|
import MessagePanel, { shouldFormContinuation } from "../../../src/components/structures/MessagePanel";
|
||||||
|
|
|
@ -18,8 +18,14 @@ import React from "react";
|
||||||
import { render, screen, fireEvent, waitFor } from "@testing-library/react";
|
import { render, screen, fireEvent, waitFor } from "@testing-library/react";
|
||||||
import "focus-visible"; // to fix context menus
|
import "focus-visible"; // to fix context menus
|
||||||
import { mocked } from "jest-mock";
|
import { mocked } from "jest-mock";
|
||||||
import { MatrixClient, MatrixEvent, PendingEventOrdering, Room } from "matrix-js-sdk/src/matrix";
|
import {
|
||||||
import { FeatureSupport, Thread } from "matrix-js-sdk/src/models/thread";
|
MatrixClient,
|
||||||
|
MatrixEvent,
|
||||||
|
PendingEventOrdering,
|
||||||
|
Room,
|
||||||
|
FeatureSupport,
|
||||||
|
Thread,
|
||||||
|
} from "matrix-js-sdk/src/matrix";
|
||||||
|
|
||||||
import ThreadPanel, { ThreadFilterType, ThreadPanelHeader } from "../../../src/components/structures/ThreadPanel";
|
import ThreadPanel, { ThreadFilterType, ThreadPanelHeader } from "../../../src/components/structures/ThreadPanel";
|
||||||
import MatrixClientContext from "../../../src/contexts/MatrixClientContext";
|
import MatrixClientContext from "../../../src/contexts/MatrixClientContext";
|
||||||
|
|
|
@ -25,8 +25,8 @@ import {
|
||||||
Room,
|
Room,
|
||||||
MatrixClient,
|
MatrixClient,
|
||||||
PendingEventOrdering,
|
PendingEventOrdering,
|
||||||
|
THREAD_RELATION_TYPE,
|
||||||
} from "matrix-js-sdk/src/matrix";
|
} from "matrix-js-sdk/src/matrix";
|
||||||
import { THREAD_RELATION_TYPE } from "matrix-js-sdk/src/models/thread";
|
|
||||||
import React, { useState } from "react";
|
import React, { useState } from "react";
|
||||||
|
|
||||||
import ThreadView from "../../../src/components/structures/ThreadView";
|
import ThreadView from "../../../src/components/structures/ThreadView";
|
||||||
|
|
|
@ -29,14 +29,12 @@ import {
|
||||||
RoomState,
|
RoomState,
|
||||||
TimelineWindow,
|
TimelineWindow,
|
||||||
EventTimeline,
|
EventTimeline,
|
||||||
} from "matrix-js-sdk/src/matrix";
|
|
||||||
import {
|
|
||||||
FeatureSupport,
|
FeatureSupport,
|
||||||
Thread,
|
Thread,
|
||||||
THREAD_RELATION_TYPE,
|
THREAD_RELATION_TYPE,
|
||||||
ThreadEvent,
|
ThreadEvent,
|
||||||
ThreadFilterType,
|
ThreadFilterType,
|
||||||
} from "matrix-js-sdk/src/models/thread";
|
} from "matrix-js-sdk/src/matrix";
|
||||||
import React, { createRef } from "react";
|
import React, { createRef } from "react";
|
||||||
import { Mocked, mocked } from "jest-mock";
|
import { Mocked, mocked } from "jest-mock";
|
||||||
import { forEachRight } from "lodash";
|
import { forEachRight } from "lodash";
|
||||||
|
|
|
@ -25,10 +25,11 @@ import {
|
||||||
Beacon,
|
Beacon,
|
||||||
getBeaconInfoIdentifier,
|
getBeaconInfoIdentifier,
|
||||||
EventType,
|
EventType,
|
||||||
|
FeatureSupport,
|
||||||
|
Thread,
|
||||||
} from "matrix-js-sdk/src/matrix";
|
} from "matrix-js-sdk/src/matrix";
|
||||||
import { M_POLL_KIND_DISCLOSED } from "matrix-js-sdk/src/@types/polls";
|
import { M_POLL_KIND_DISCLOSED } from "matrix-js-sdk/src/@types/polls";
|
||||||
import { PollStartEvent } from "matrix-js-sdk/src/extensible_events_v1/PollStartEvent";
|
import { PollStartEvent } from "matrix-js-sdk/src/extensible_events_v1/PollStartEvent";
|
||||||
import { FeatureSupport, Thread } from "matrix-js-sdk/src/models/thread";
|
|
||||||
import { mocked } from "jest-mock";
|
import { mocked } from "jest-mock";
|
||||||
|
|
||||||
import { MatrixClientPeg } from "../../../../src/MatrixClientPeg";
|
import { MatrixClientPeg } from "../../../../src/MatrixClientPeg";
|
||||||
|
|
|
@ -16,8 +16,16 @@ limitations under the License.
|
||||||
|
|
||||||
import React from "react";
|
import React from "react";
|
||||||
import { act, render, fireEvent } from "@testing-library/react";
|
import { act, render, fireEvent } from "@testing-library/react";
|
||||||
import { EventType, EventStatus, MatrixEvent, MatrixEventEvent, MsgType, Room } from "matrix-js-sdk/src/matrix";
|
import {
|
||||||
import { FeatureSupport, Thread } from "matrix-js-sdk/src/models/thread";
|
EventType,
|
||||||
|
EventStatus,
|
||||||
|
MatrixEvent,
|
||||||
|
MatrixEventEvent,
|
||||||
|
MsgType,
|
||||||
|
Room,
|
||||||
|
FeatureSupport,
|
||||||
|
Thread,
|
||||||
|
} from "matrix-js-sdk/src/matrix";
|
||||||
|
|
||||||
import MessageActionBar from "../../../../src/components/views/messages/MessageActionBar";
|
import MessageActionBar from "../../../../src/components/views/messages/MessageActionBar";
|
||||||
import {
|
import {
|
||||||
|
|
|
@ -15,8 +15,7 @@ limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import * as React from "react";
|
import * as React from "react";
|
||||||
import { EventType, MatrixEvent, Room, RoomMember } from "matrix-js-sdk/src/matrix";
|
import { EventType, MatrixEvent, Room, RoomMember, THREAD_RELATION_TYPE } from "matrix-js-sdk/src/matrix";
|
||||||
import { THREAD_RELATION_TYPE } from "matrix-js-sdk/src/models/thread";
|
|
||||||
import { act, render, screen } from "@testing-library/react";
|
import { act, render, screen } from "@testing-library/react";
|
||||||
import userEvent from "@testing-library/user-event";
|
import userEvent from "@testing-library/user-event";
|
||||||
|
|
||||||
|
|
|
@ -17,9 +17,15 @@ limitations under the License.
|
||||||
import React from "react";
|
import React from "react";
|
||||||
import { render, screen, act, RenderResult } from "@testing-library/react";
|
import { render, screen, act, RenderResult } from "@testing-library/react";
|
||||||
import { mocked, Mocked } from "jest-mock";
|
import { mocked, Mocked } from "jest-mock";
|
||||||
import { MatrixClient, PendingEventOrdering, Room, MatrixEvent, RoomStateEvent } from "matrix-js-sdk/src/matrix";
|
import {
|
||||||
|
MatrixClient,
|
||||||
|
PendingEventOrdering,
|
||||||
|
Room,
|
||||||
|
MatrixEvent,
|
||||||
|
RoomStateEvent,
|
||||||
|
Thread,
|
||||||
|
} from "matrix-js-sdk/src/matrix";
|
||||||
import { Widget } from "matrix-widget-api";
|
import { Widget } from "matrix-widget-api";
|
||||||
import { Thread } from "matrix-js-sdk/src/models/thread";
|
|
||||||
|
|
||||||
import type { RoomMember } from "matrix-js-sdk/src/matrix";
|
import type { RoomMember } from "matrix-js-sdk/src/matrix";
|
||||||
import type { ClientWidgetApi } from "matrix-widget-api";
|
import type { ClientWidgetApi } from "matrix-widget-api";
|
||||||
|
|
|
@ -14,8 +14,7 @@ See the License for the specific language governing permissions and
|
||||||
limitations under the License.
|
limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import { MatrixClient, MatrixEvent, MatrixEventEvent, RelationType, Room } from "matrix-js-sdk/src/matrix";
|
import { MatrixClient, MatrixEvent, MatrixEventEvent, RelationType, Room, Thread } from "matrix-js-sdk/src/matrix";
|
||||||
import { Thread } from "matrix-js-sdk/src/models/thread";
|
|
||||||
|
|
||||||
import { mkMessage, MessageEventProps } from "./test-utils";
|
import { mkMessage, MessageEventProps } from "./test-utils";
|
||||||
|
|
||||||
|
|
|
@ -25,8 +25,8 @@ import {
|
||||||
PendingEventOrdering,
|
PendingEventOrdering,
|
||||||
RelationType,
|
RelationType,
|
||||||
Room,
|
Room,
|
||||||
|
Thread,
|
||||||
} from "matrix-js-sdk/src/matrix";
|
} from "matrix-js-sdk/src/matrix";
|
||||||
import { Thread } from "matrix-js-sdk/src/models/thread";
|
|
||||||
|
|
||||||
import { MatrixClientPeg } from "../../src/MatrixClientPeg";
|
import { MatrixClientPeg } from "../../src/MatrixClientPeg";
|
||||||
import {
|
import {
|
||||||
|
|
Loading…
Reference in a new issue