Switch to importing most things from the main matrix-js-sdk export (#11406)
* Switch to importing most things from the main matrix-js-sdk export * fix imports * Iterate * Fix tests
This commit is contained in:
parent
0842559fb2
commit
ad73b0c16e
52 changed files with 262 additions and 277 deletions
|
@ -16,9 +16,16 @@ limitations under the License.
|
|||
|
||||
import React, { useEffect, useMemo, useState } from "react";
|
||||
import classnames from "classnames";
|
||||
import { IContent, MatrixEvent, Room, RoomMember, EventType, MatrixClient } from "matrix-js-sdk/src/matrix";
|
||||
import {
|
||||
IContent,
|
||||
MatrixEvent,
|
||||
Room,
|
||||
RoomMember,
|
||||
EventType,
|
||||
MatrixClient,
|
||||
ContentHelpers,
|
||||
} from "matrix-js-sdk/src/matrix";
|
||||
import { ILocationContent, LocationAssetType, M_TIMESTAMP } from "matrix-js-sdk/src/@types/location";
|
||||
import { makeLocationContent } from "matrix-js-sdk/src/content-helpers";
|
||||
import { M_BEACON } from "matrix-js-sdk/src/@types/beacon";
|
||||
|
||||
import { _t } from "../../../languageHandler";
|
||||
|
@ -176,7 +183,7 @@ const transformEvent = (event: MatrixEvent): { type: string; content: IContent }
|
|||
type,
|
||||
content: {
|
||||
...content,
|
||||
...makeLocationContent(
|
||||
...ContentHelpers.makeLocationContent(
|
||||
undefined, // text
|
||||
geoUri,
|
||||
timestamp || Date.now(),
|
||||
|
|
|
@ -17,9 +17,8 @@ limitations under the License.
|
|||
*/
|
||||
|
||||
import React from "react";
|
||||
import { MatrixClient } from "matrix-js-sdk/src/matrix";
|
||||
import { MatrixClient, UIAResponse } from "matrix-js-sdk/src/matrix";
|
||||
import { AuthType } from "matrix-js-sdk/src/interactive-auth";
|
||||
import { UIAResponse } from "matrix-js-sdk/src/@types/uia";
|
||||
|
||||
import { _t } from "../../../languageHandler";
|
||||
import AccessibleButton from "../elements/AccessibleButton";
|
||||
|
|
|
@ -15,7 +15,7 @@ limitations under the License.
|
|||
*/
|
||||
|
||||
import React, { ChangeEvent, createRef, SyntheticEvent } from "react";
|
||||
import { AutoDiscovery } from "matrix-js-sdk/src/autodiscovery";
|
||||
import { AutoDiscovery } from "matrix-js-sdk/src/matrix";
|
||||
import { logger } from "matrix-js-sdk/src/logger";
|
||||
|
||||
import AutoDiscoveryUtils from "../../../utils/AutoDiscoveryUtils";
|
||||
|
|
|
@ -16,9 +16,8 @@ limitations under the License.
|
|||
*/
|
||||
|
||||
import React from "react";
|
||||
import { CrossSigningKeys, AuthDict, MatrixError, UIAFlow } from "matrix-js-sdk/src/matrix";
|
||||
import { CrossSigningKeys, AuthDict, MatrixError, UIAFlow, UIAResponse } from "matrix-js-sdk/src/matrix";
|
||||
import { logger } from "matrix-js-sdk/src/logger";
|
||||
import { UIAResponse } from "matrix-js-sdk/src/@types/uia";
|
||||
|
||||
import { MatrixClientPeg } from "../../../../MatrixClientPeg";
|
||||
import { _t } from "../../../../languageHandler";
|
||||
|
|
|
@ -17,8 +17,14 @@ limitations under the License.
|
|||
import { WebSearch as WebSearchEvent } from "@matrix-org/analytics-events/types/typescript/WebSearch";
|
||||
import classNames from "classnames";
|
||||
import { capitalize, sum } from "lodash";
|
||||
import { IHierarchyRoom } from "matrix-js-sdk/src/@types/spaces";
|
||||
import { IPublicRoomsChunkRoom, MatrixClient, RoomMember, RoomType, Room } from "matrix-js-sdk/src/matrix";
|
||||
import {
|
||||
IPublicRoomsChunkRoom,
|
||||
MatrixClient,
|
||||
RoomMember,
|
||||
RoomType,
|
||||
Room,
|
||||
HierarchyRoom,
|
||||
} from "matrix-js-sdk/src/matrix";
|
||||
import { normalize } from "matrix-js-sdk/src/utils";
|
||||
import React, { ChangeEvent, RefObject, useCallback, useContext, useEffect, useMemo, useRef, useState } from "react";
|
||||
import sanitizeHtml from "sanitize-html";
|
||||
|
@ -825,7 +831,7 @@ const SpotlightDialog: React.FC<IProps> = ({ initialText = "", initialFilter = n
|
|||
</h4>
|
||||
<div>
|
||||
{spaceResults.slice(0, SECTION_LIMIT).map(
|
||||
(room: IHierarchyRoom): JSX.Element => (
|
||||
(room: HierarchyRoom): JSX.Element => (
|
||||
<Option
|
||||
id={`mx_SpotlightDialog_button_result_${room.room_id}`}
|
||||
key={room.room_id}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue