Skip to content

Commit

Permalink
wip: updating paths
Browse files Browse the repository at this point in the history
  • Loading branch information
katiestahl committed Jul 10, 2024
1 parent 27a477f commit 66732ef
Show file tree
Hide file tree
Showing 42 changed files with 185 additions and 192 deletions.
8 changes: 4 additions & 4 deletions client/src/components/Pages/Assay/Assay.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// TODO: enforce CURIE requirements in fields
import { FusionContext } from "../../../global/contexts/FusionContext";
import { useColorTheme } from "../../../global/contexts/Theme/ColorThemeContext";
import { FusionContext } from "global/contexts/FusionContext";
import { useColorTheme } from "global/contexts/Theme/ColorThemeContext";
import { FormEvent, useContext, useEffect, useState } from "react";
import {
Box,
Expand All @@ -12,9 +12,9 @@ import {
Typography,
} from "@material-ui/core";
import { makeStyles } from "@material-ui/core/styles";
import { Assay as FusionAssay } from "../../../services/ResponseModels";
import { Assay as FusionAssay } from "services/ResponseModels";
import React from "react";
import HelpTooltip from "../../main/shared/HelpTooltip/HelpTooltip";
import HelpTooltip from "components/main/shared/HelpTooltip/HelpTooltip";

interface Props {
index: number;
Expand Down
6 changes: 3 additions & 3 deletions client/src/components/Pages/CausativeEvent/CausativeEvent.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import "./CausativeEvent.scss";
import { FusionContext } from "../../../global/contexts/FusionContext";
import { FusionContext } from "global/contexts/FusionContext";
import React, { useContext, useState } from "react";
import {
Box,
Expand All @@ -11,8 +11,8 @@ import {
TextField,
Typography,
} from "@material-ui/core";
import { HelpPopover } from "../../main/shared/HelpPopover/HelpPopover";
import HelpTooltip from "../../main/shared/HelpTooltip/HelpTooltip";
import { HelpPopover } from "components/main/shared/HelpPopover/HelpPopover";
import HelpTooltip from "components/main/shared/HelpTooltip/HelpTooltip";

interface Props {
index: number;
Expand Down
10 changes: 5 additions & 5 deletions client/src/components/Pages/Domains/DomainForm/DomainForm.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,19 +8,19 @@ import {
Typography,
} from "@material-ui/core/";
import { makeStyles } from "@material-ui/core/styles";
import { FusionContext } from "../../../../global/contexts/FusionContext";
import { DomainOptionsContext } from "../../../../global/contexts/DomainOptionsContext";
import { GeneContext } from "../../../../global/contexts/GeneContext";
import { FusionContext } from "global/contexts/FusionContext";
import { DomainOptionsContext } from "global/contexts/DomainOptionsContext";
import { GeneContext } from "global/contexts/GeneContext";
import { v4 as uuid } from "uuid";
import "./DomainForm.scss";
import {
ClientFunctionalDomain,
DomainParams,
DomainStatus,
} from "../../../../services/ResponseModels";
import { getFunctionalDomain } from "../../../../services/main";
import { getFunctionalDomain } from "services/main";
import AddIcon from "@material-ui/icons/Add";
import HelpTooltip from "../../../main/shared/HelpTooltip/HelpTooltip";
import HelpTooltip from "main/shared/HelpTooltip/HelpTooltip";

const useStyles = makeStyles((theme) => ({
formControl: {
Expand Down
12 changes: 6 additions & 6 deletions client/src/components/Pages/Domains/Main/Domains.tsx
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import React, { useContext } from "react";
import { FusionContext } from "../../../../global/contexts/FusionContext";
import { useColorTheme } from "../../../../global/contexts/Theme/ColorThemeContext";
import DomainForm from "../DomainForm/DomainForm";
import { ClientFunctionalDomain } from "../../../../services/ResponseModels";
import { GeneContext } from "../../../../global/contexts/GeneContext";
import { FusionContext } from "global/contexts/FusionContext";
import { useColorTheme } from "global/contexts/Theme/ColorThemeContext";
import DomainForm from "DomainForm/DomainForm";
import { ClientFunctionalDomain } from "services/ResponseModels";
import { GeneContext } from "global/contexts/GeneContext";
import {
Avatar,
Box,
Expand All @@ -12,7 +12,7 @@ import {
makeStyles,
Typography,
} from "@material-ui/core";
import { HelpPopover } from "../../../main/shared/HelpPopover/HelpPopover";
import { HelpPopover } from "main/shared/HelpPopover/HelpPopover";

interface Props {
index: number;
Expand Down
2 changes: 1 addition & 1 deletion client/src/components/Pages/FusionType/FusionType.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ import {
RadioGroup,
} from "@material-ui/core";
import { useContext, useEffect, useState } from "react";
import { FusionContext } from "../../../global/contexts/FusionContext";
import { FusionContext } from "global/contexts/FusionContext";
import "./FusionType.scss";

interface Props {
Expand Down
4 changes: 2 additions & 2 deletions client/src/components/Pages/Gene/Main/Gene.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { GeneSearch } from "../Search/GeneSearch";
import { GeneResults } from "../Results/GeneResults";
import { GeneSearch } from "Search/GeneSearch";
import { GeneResults } from "Results/GeneResults";

import "./Gene.scss";

Expand Down
6 changes: 3 additions & 3 deletions client/src/components/Pages/Gene/Results/GeneResults.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { useContext } from "react";
import { SuggestionContext } from "../../../../global/contexts/SuggestionContext";
import { StructureDiagram } from "../StructureDiagram/StructureDiagram";
import { ColorKey } from "../ColorKey/ColorKey";
import { SuggestionContext } from "global/contexts/SuggestionContext";
import { StructureDiagram } from "StructureDiagram/StructureDiagram";
import { ColorKey } from "ColorKey/ColorKey";
import "./GeneResults.scss";

export const GeneResults: React.FC = () => {
Expand Down
2 changes: 1 addition & 1 deletion client/src/components/Pages/Gene/Search/GeneSearch.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import React, { useState, useContext, useEffect } from "react";
import { SuggestionContext } from "../../../../global/contexts/SuggestionContext";
import { SuggestionContext } from "global/contexts/SuggestionContext";

// MUI
import { makeStyles } from "@material-ui/core/styles";
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import React, { useContext, useState } from "react";
import { SuggestionContext } from "../../../../global/contexts/SuggestionContext";
import { FusionContext } from "../../../../global/contexts/FusionContext";
import { SuggestionContext } from "global/contexts/SuggestionContext";
import { FusionContext } from "global/contexts/FusionContext";
import Grid from "@material-ui/core/Grid";

import "./StructureDiagram.scss";
Expand Down
4 changes: 2 additions & 2 deletions client/src/components/Pages/ReadingFrame/ReadingFrame.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import "./ReadingFrame.scss";
import { FusionContext } from "../../../global/contexts/FusionContext";
import { FusionContext } from "global/contexts/FusionContext";
import React, { FormEvent, useContext, useEffect, useState } from "react";
import {
Box,
Expand All @@ -11,7 +11,7 @@ import {
Typography,
} from "@material-ui/core";
import { makeStyles } from "@material-ui/core/styles";
import { HelpPopover } from "../../main/shared/HelpPopover/HelpPopover";
import { HelpPopover } from "components/main/shared/HelpPopover/HelpPopover";

interface Props {
index: number;
Expand Down
23 changes: 12 additions & 11 deletions client/src/components/Pages/Structure/Builder/Builder.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,18 +8,14 @@ import {
} from "react-beautiful-dnd";
import { v4 as uuid } from "uuid";
// global fusion
import { FusionContext } from "../../../../global/contexts/FusionContext";
import { FusionContext } from "global/contexts/FusionContext";
// elements
import { ClientElementUnion, ElementType } from "../../../../services/main";
import { ClientElementUnion, ElementType } from "services/main";
import {
ClientMultiplePossibleGenesElement,
ClientUnknownGeneElement,
} from "../../../../services/ResponseModels";
import GeneElementInput from "../Input/GeneElementInput/GeneElementInput";
import LinkerElementInput from "../Input/LinkerElementInput/LinkerElementInput";
import StaticElement from "../Input/StaticElement/StaticElement";
import TemplatedSequenceElementInput from "../Input/TemplatedSequenceElementInput/TemplatedSequenceElementInput";
import TxSegmentElementInput from "../Input/TxSegmentElementInput/TxSegmentElementInput";
} from "services/ResponseModels";

// style
import "./Builder.scss";
import BlurCircularOutlinedIcon from "@mui/icons-material/BlurCircularOutlined";
Expand All @@ -29,10 +25,15 @@ import HelpIcon from "@mui/icons-material/Help";
import WorkspacesIcon from "@mui/icons-material/Workspaces";
import LinkIcon from "@mui/icons-material/Link";
import AutorenewIcon from "@mui/icons-material/Autorenew";
import RegulatoryElementInput from "../Input/RegulatoryElementInput/RegulatoryElementInput";
import { Box, Divider, Typography } from "@material-ui/core";
import { MARGIN_OFFSETS } from "../../../../global/styles/theme";
import HelpTooltip from "../../../main/shared/HelpTooltip/HelpTooltip";
import { MARGIN_OFFSETS } from "global/styles/theme";
import HelpTooltip from "components/main/shared/HelpTooltip/HelpTooltip";
import GeneElementInput from "../Input/GeneElementInput/GeneElementInput";
import LinkerElementInput from "../Input/LinkerElementInput/LinkerElementInput";
import RegulatoryElementInput from "../Input/RegulatoryElementInput/RegulatoryElementInput";
import StaticElement from "../Input/StaticElement/StaticElement";
import TemplatedSequenceElementInput from "../Input/TemplatedSequenceElementInput/TemplatedSequenceElementInput";
import TxSegmentElementInput from "../Input/TxSegmentElementInput/TxSegmentElementInput";

const EDITABLE_ELEMENT_TYPES = [
ElementType.geneElement,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,13 @@ import {
ClientGeneElement,
NomenclatureResponse,
} from "../../../../../services/ResponseModels";
import { StructuralElementInputProps } from "../StructuralElementInputProps";
import { GeneAutocomplete } from "../../../../main/shared/GeneAutocomplete/GeneAutocomplete";
import { StructuralElementInputProps } from "StructuralElementInputProps";
import { GeneAutocomplete } from "main/shared/GeneAutocomplete/GeneAutocomplete";
import {
getGeneElement,
getGeneNomenclature,
} from "../../../../../services/main";
import StructuralElementInputAccordion from "../StructuralElementInputAccordion";
import StructuralElementInputAccordion from "StructuralElementInputAccordion";

interface GeneElementInputProps extends StructuralElementInputProps {
element: ClientGeneElement;
Expand All @@ -35,7 +35,7 @@ const GeneElementInput: React.FC<GeneElementInputProps> = ({
}, [gene, geneText]);

const buildGeneElement = () => {
setPendingResponse(true)
setPendingResponse(true);
getGeneElement(gene).then((geneElementResponse) => {
if (
geneElementResponse.warnings &&
Expand All @@ -58,7 +58,7 @@ const GeneElementInput: React.FC<GeneElementInputProps> = ({
nomenclature: nomenclatureResponse.nomenclature,
};
handleSave(index, clientGeneElement);
setPendingResponse(false)
setPendingResponse(false);
}
}
);
Expand All @@ -85,7 +85,7 @@ const GeneElementInput: React.FC<GeneElementInputProps> = ({
inputElements,
validated,
icon,
pendingResponse
pendingResponse,
});
};

Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import { TextField, Typography } from "@material-ui/core";
import React, { useEffect, useState } from "react";
import { ClientLinkerElement } from "../../../../../services/ResponseModels";
import { StructuralElementInputProps } from "../StructuralElementInputProps";
import StructuralElementInputAccordion from "../StructuralElementInputAccordion";
import HelpTooltip from "../../../../main/shared/HelpTooltip/HelpTooltip";
import { ClientLinkerElement } from "services/ResponseModels";
import { StructuralElementInputProps } from "StructuralElementInputProps";
import StructuralElementInputAccordion from "StructuralElementInputAccordion";
import HelpTooltip from "main/shared/HelpTooltip/HelpTooltip";

interface LinkerElementInputProps extends StructuralElementInputProps {
element: ClientLinkerElement;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
import React, { useState, useEffect, useContext } from "react";
import { StructuralElementInputProps } from "../StructuralElementInputProps";
import { StructuralElementInputProps } from "StructuralElementInputProps";
import {
ClientRegulatoryElement,
RegulatoryClass,
} from "../../../../../services/ResponseModels";
import StructuralElementInputAccordion from "../StructuralElementInputAccordion";
import StructuralElementInputAccordion from "StructuralElementInputAccordion";
import {
getRegElementNomenclature,
getRegulatoryElement,
} from "../../../../../services/main";
import { FusionContext } from "../../../../../global/contexts/FusionContext";
import RegElementForm from "../../RegElement/RegElementForm/RegElementForm";
import { FusionContext } from "global/contexts/FusionContext";
import RegElementForm from "RegElement/RegElementForm/RegElementForm";

/**
* Lookup table used to map raw regulatory class enum values to options for the class
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { BaseStructuralElementProps } from "../StructuralElementInputProps";
import StructuralElementInputAccordion from "../StructuralElementInputAccordion";
import { BaseStructuralElementProps } from "StructuralElementInputProps";
import StructuralElementInputAccordion from "StructuralElementInputAccordion";

const StaticElement: React.FC<BaseStructuralElementProps> = ({
element,
Expand All @@ -12,7 +12,7 @@ const StaticElement: React.FC<BaseStructuralElementProps> = ({
handleDelete,
validated: true,
icon,
pendingResponse: false
pendingResponse: false,
});

export default StaticElement;
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
import { ClientElementUnion } from "../../../../services/main";
import { ClientElementUnion } from "services/main";

export interface BaseStructuralElementProps {
element: ClientElementUnion;
handleDelete?: (id?: string) => void;
icon: JSX.Element;
pendingResponse?: boolean
pendingResponse?: boolean;
}

export interface StructuralElementInputProps
Expand Down
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
import React, { useState, useEffect, KeyboardEvent } from "react";
import { TextField, Box, Typography } from "@material-ui/core";
import { StructuralElementInputProps } from "../StructuralElementInputProps";
import { StructuralElementInputProps } from "StructuralElementInputProps";
import {
getTemplatedSequenceElement,
getTemplatedSequenceNomenclature,
} from "../../../../../services/main";
import { ClientTemplatedSequenceElement } from "../../../../../services/ResponseModels";
import StructuralElementInputAccordion from "../StructuralElementInputAccordion";
import StrandSwitch from "../../../../main/shared/StrandSwitch/StrandSwitch";
import HelpTooltip from "../../../../main/shared/HelpTooltip/HelpTooltip";
import { ClientTemplatedSequenceElement } from "services/ResponseModels";
import StructuralElementInputAccordion from "StructuralElementInputAccordion";
import StrandSwitch from "main/shared/StrandSwitch/StrandSwitch";
import HelpTooltip from "main/shared/HelpTooltip/HelpTooltip";

interface TemplatedSequenceElementInputProps
extends StructuralElementInputProps {
Expand All @@ -18,7 +18,6 @@ interface TemplatedSequenceElementInputProps
const TemplatedSequenceElementInput: React.FC<
TemplatedSequenceElementInputProps
> = ({ element, index, handleSave, handleDelete, icon }) => {

const [chromosome, setChromosome] = useState<string>(
element.input_chromosome || ""
);
Expand Down Expand Up @@ -67,7 +66,7 @@ const TemplatedSequenceElementInput: React.FC<
) {
// TODO visible error handling
setInputError("element validation unsuccessful");
setPendingResponse(false)
setPendingResponse(false);
return;
} else if (templatedSequenceResponse.element) {
setInputError("");
Expand All @@ -87,7 +86,7 @@ const TemplatedSequenceElementInput: React.FC<
}
});
}
setPendingResponse(false)
setPendingResponse(false);
});
};

Expand Down Expand Up @@ -167,7 +166,7 @@ const TemplatedSequenceElementInput: React.FC<
inputElements,
validated,
icon,
pendingResponse
pendingResponse,
});
};

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,22 +9,22 @@ import {
ClientTranscriptSegmentElement,
TranscriptSegmentElement,
TxSegmentElementResponse,
} from "../../../../../services/ResponseModels";
} from "services/ResponseModels";
import React, { useEffect, useState, KeyboardEvent, useContext } from "react";
import {
getTxSegmentElementECT,
getTxSegmentElementGCG,
getTxSegmentElementGCT,
getTxSegmentNomenclature,
} from "../../../../../services/main";
import { GeneAutocomplete } from "../../../../main/shared/GeneAutocomplete/GeneAutocomplete";
import { StructuralElementInputProps } from "../StructuralElementInputProps";
} from "services/main";
import { FusionContext } from "global/contexts/FusionContext";
import ChromosomeField from "components/main/shared/ChromosomeField/ChromosomeField";
import { GeneAutocomplete } from "components/main/shared/GeneAutocomplete/GeneAutocomplete";
import HelpTooltip from "components/main/shared/HelpTooltip/HelpTooltip";
import StrandSwitch from "components/main/shared/StrandSwitch/StrandSwitch";
import TranscriptField from "components/main/shared/TranscriptField/TranscriptField";
import StructuralElementInputAccordion from "../StructuralElementInputAccordion";
import { FusionContext } from "../../../../../global/contexts/FusionContext";
import StrandSwitch from "../../../../main/shared/StrandSwitch/StrandSwitch";
import HelpTooltip from "../../../../main/shared/HelpTooltip/HelpTooltip";
import ChromosomeField from "../../../../main/shared/ChromosomeField/ChromosomeField";
import TranscriptField from "../../../../main/shared/TranscriptField/TranscriptField";
import { StructuralElementInputProps } from "../StructuralElementInputProps";

interface TxSegmentElementInputProps extends StructuralElementInputProps {
element: ClientTranscriptSegmentElement;
Expand Down Expand Up @@ -437,10 +437,7 @@ const TxSegmentCompInput: React.FC<TxSegmentElementInputProps> = ({
const genomicCoordinateInfo = (
<>
<Box className="mid-inputs">
<ChromosomeField
fieldValue={txChrom}
errorText={txChromText}
/>
<ChromosomeField fieldValue={txChrom} errorText={txChromText} />
<Box mt="18px" width="125px">
<StrandSwitch setStrand={setTxStrand} selectedStrand={txStrand} />
</Box>
Expand Down
Loading

0 comments on commit 66732ef

Please sign in to comment.