Remove import cycle for results view

This commit is contained in:
Koen Vlaswinkel 2024-01-08 13:44:50 +01:00
Родитель 0648ce8ae6
Коммит 397693a2cb
4 изменённых файлов: 10 добавлений и 9 удалений

Просмотреть файл

@ -6,7 +6,7 @@ import type {
} from "./result-keys";
import { getPath, getPathNode, getResult, keyToString } from "./result-keys";
import { className, jumpToLocation } from "./result-table-utils";
import { onNavigation } from "./ResultsApp";
import { onNavigation } from "./navigation";
import type { NavigateMsg } from "../../common/interface-types";
import { NavigationDirection } from "../../common/interface-types";
import { isNoLocation, parseSarifLocation } from "../../common/sarif-utils";

Просмотреть файл

@ -10,7 +10,7 @@ import {
} from "../../common/interface-types";
import RawTableHeader from "./RawTableHeader";
import RawTableRow from "./RawTableRow";
import { onNavigation } from "./ResultsApp";
import { onNavigation } from "./navigation";
import { sendTelemetry } from "../common/telemetry";
import { assertNever } from "../../common/helpers-pure";
import { EmptyQueryResultsMessage } from "./EmptyQueryResultsMessage";

Просмотреть файл

@ -8,15 +8,14 @@ import type {
QueryMetadata,
ResultsPaths,
ParsedResultSets,
NavigateMsg,
ResultSet,
} from "../../common/interface-types";
import {
ALERTS_TABLE_NAME,
GRAPH_TABLE_NAME,
} from "../../common/interface-types";
import { EventHandlers as EventHandlerList } from "./event-handler-list";
import { ResultTables } from "./ResultTables";
import { onNavigation } from "./navigation";
import "./resultsView.css";
import { useCallback, useEffect, useState } from "react";
@ -64,11 +63,6 @@ interface ResultsViewState {
isExpectingResultsUpdate: boolean;
}
/**
* Event handlers to be notified of navigation events coming from outside the webview.
*/
export const onNavigation = new EventHandlerList<NavigateMsg>();
/**
* A minimal state container for displaying results.
*/

Просмотреть файл

@ -0,0 +1,7 @@
import type { NavigateMsg } from "../../common/interface-types";
import { EventHandlers as EventHandlerList } from "./event-handler-list";
/**
* Event handlers to be notified of navigation events coming from outside the webview.
*/
export const onNavigation = new EventHandlerList<NavigateMsg>();