Skip to content

Commit

Permalink
Reorganize components folder structure
Browse files Browse the repository at this point in the history
  • Loading branch information
Pechenux committed May 9, 2024
1 parent bb1613a commit 75e9986
Show file tree
Hide file tree
Showing 304 changed files with 326 additions and 298 deletions.
1 change: 0 additions & 1 deletion web-app/client/src/components/TabsLayout/index.tsx

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
import React, { FC } from 'react';
import Button from '@components/Button';
import ModalContainer, { ModalProps } from '@components/ModalContainer';
import { FC } from 'react';
import ModalContainer, {
ModalProps,
} from '@components/common/layout/ModalContainer';
import Button from '@components/common/uikit/Button';
import { useAuthContext } from '@hooks/useAuthContext';
import styles from './AuthSuccessModal.module.scss';

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
import { FC, useState } from 'react';
import ModalContainer, {
ModalProps,
} from '@components/common/layout/ModalContainer';
import useModal from '@hooks/useModal';
import ModalContainer, { ModalProps } from '../ModalContainer';
import Code from './steps/Code';
import Email from './steps/Email';
import LogIn from './steps/LogIn';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import { useMutation } from '@apollo/client';
import { FC } from 'react';
import { useForm } from 'react-hook-form';
import Button from '@components/Button';
import { Text } from '@components/Inputs';
import Button from '@components/common/uikit/Button';
import { Text } from '@components/common/uikit/Inputs';
import {
approveRecoveryCode,
approveRecoveryCodeVariables,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,13 @@ import { Dispatch, FC, SetStateAction, useEffect } from 'react';

import { useForm } from 'react-hook-form';
import isEmail from 'validator/lib/isEmail';
import Button from '@components/Button';
import Button from '@components/common/uikit/Button';
import { Text } from '@components/common/uikit/Inputs';
import {
issueCodeForPasswordRecovery,
issueCodeForPasswordRecoveryVariables,
} from '@graphql/operations/mutations/__generated__/issueCodeForPasswordRecovery';
import { ISSUE_CODE_FOR_PASSWORD_RECOVERY } from '@graphql/operations/mutations/issueCodeForPasswordRecovery';
import { Text } from '../../Inputs';
import styles from '../LogInModal.module.scss';

type Inputs = {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ import { useMutation } from '@apollo/client';
import { FC } from 'react';
import { useForm } from 'react-hook-form';
import isEmail from 'validator/lib/isEmail';
import Button from '@components/Button';
import { Text } from '@components/Inputs';
import Button from '@components/common/uikit/Button';
import { Text } from '@components/common/uikit/Inputs';
import {
logIn,
logInVariables,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ import { useMutation } from '@apollo/client';
import { FC } from 'react';
import { useForm } from 'react-hook-form';
import isStrongPassword from 'validator/lib/isStrongPassword';
import Button from '@components/Button';
import { Text } from '@components/Inputs';
import Button from '@components/common/uikit/Button';
import { Text } from '@components/common/uikit/Inputs';
import {
changePassword,
changePasswordVariables,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
import React, { FC, useCallback, useState } from 'react';
import ModalContainer, {
ModalProps,
} from '@components/common/layout/ModalContainer';
import { useAuthContext } from '@hooks/useAuthContext';
import useModal from '@hooks/useModal';
import ModalContainer, { ModalProps } from '../ModalContainer';
import CoreInfo from './steps/CoreInfo';
import EmailVerification from './steps/EmailVerification';

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@ import { FC } from 'react';
import { useForm } from 'react-hook-form';
import isEmail from 'validator/lib/isEmail';
import isStrongPassword from 'validator/lib/isStrongPassword';
import Button from '@components/Button';
import { Text } from '@components/Inputs';
import { ControlledSelect } from '@components/Inputs/Select';
import Button from '@components/common/uikit/Button';
import { Text } from '@components/common/uikit/Inputs';
import { ControlledSelect } from '@components/common/uikit/Inputs/Select';
import {
createUser,
createUserVariables,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import { useMutation } from '@apollo/client';
import { FC, useEffect } from 'react';
import { useForm } from 'react-hook-form';
import Button from '@components/Button';
import { Alert } from '@components/FileStats/Alert';
import { Text } from '@components/Inputs';
import Button from '@components/common/uikit/Button';
import { Alert } from '@components/common/uikit/FileStats/Alert';
import { Text } from '@components/common/uikit/Inputs';
import {
approveUserEmail,
approveUserEmailVariables,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,7 @@ import checkIcon from '@assets/icons/check.svg';
import crossIcon from '@assets/icons/cross.svg';
import dragIcon from '@assets/icons/drag.svg';
import uploadIcon from '@assets/icons/upload.svg';
import cardStyles from '@components/DatasetCard/DatasetCard.module.scss';
import ProgressBar, { Progress } from '@components/ProgressBar/ProgressBar';
import cardStyles from '@components/choose-file/DatasetCard/DatasetCard.module.scss';
import {
uploadDataset,
uploadDatasetVariables,
Expand All @@ -17,6 +16,7 @@ import { getAlgorithmsConfig } from '@graphql/operations/queries/__generated__/g
import { GET_ALGORITHMS_CONFIG } from '@graphql/operations/queries/getAlgorithmsConfig';
import useModal from '@hooks/useModal';
import { AllowedDataset } from 'types/algorithms';
import ProgressBar, { Progress } from './components/ProgressBar/ProgressBar';
import styles from './DatasetUploader.module.scss';

type Props = {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,13 +1,12 @@
import { FC } from 'react';
import {
FilePropsForm,
FilePropsList,
} from '@components/FilePropertiesModal/tabs/PropertiesTab';
import { StatsTab } from '@components/FilePropertiesModal/tabs/StatsTab';
import ModalContainer, { ModalProps } from '@components/ModalContainer';
import { Tab, TabView } from '@components/TabView/TabView';
import ModalContainer, {
ModalProps,
} from '@components/common/layout/ModalContainer';
import { AllowedDataset } from 'types/algorithms';
import { FileProps } from 'types/globalTypes';
import { Tab, TabView } from './components/TabView/TabView';
import { FilePropsForm, FilePropsList } from './tabs/PropertiesTab';
import { StatsTab } from './tabs/StatsTab';
import styles from './FilePropertiesModal.module.scss';

type Props = ModalProps &
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@ import { useQuery } from '@apollo/client';
import _ from 'lodash';
import { FC, useEffect, useMemo } from 'react';
import { SubmitHandler, useForm } from 'react-hook-form';
import Button from '@components/Button';
import { Checkbox, Text } from '@components/Inputs';
import { ControlledSelect } from '@components/Inputs/Select';
import Button from '@components/common/uikit/Button';
import { Checkbox, Text } from '@components/common/uikit/Inputs';
import { ControlledSelect } from '@components/common/uikit/Inputs/Select';
import delimiterNames from '@constants/delimiterNames';
import { getAlgorithmsConfig } from '@graphql/operations/queries/__generated__/getAlgorithmsConfig';
import { GET_ALGORITHMS_CONFIG } from '@graphql/operations/queries/getAlgorithmsConfig';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { fireEvent, render, screen, waitFor } from '@testing-library/react';
import '@testing-library/jest-dom';
import userEvent from '@testing-library/user-event';
import { useRouter } from 'next/router';
import { StatsTab } from '@components/FilePropertiesModal/tabs/StatsTab';
import { StatsTab } from '@components/choose-file/FilePropertiesModal/tabs/StatsTab';
import { startProcessingStats } from '@graphql/operations/mutations/__generated__/startProcessingStats';
import { START_PROCESSING_STATS } from '@graphql/operations/mutations/startProcessingStats';
import {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { useQuery } from '@apollo/client';
import { Dispatch, SetStateAction } from 'react';
import { StatsStage } from '@components/FilePropertiesModal/tabs/StatsTab';
import { StatsStage } from '@components/choose-file/FilePropertiesModal/tabs/StatsTab';
import {
getFileStats,
getFileStatsVariables,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { useEffect } from 'react';
import { StatsStage } from '@components/FilePropertiesModal/tabs/StatsTab';
import { StatsStage } from '@components/choose-file/FilePropertiesModal/tabs/StatsTab';

export const usePollingControl = (
stage: StatsStage | null,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { FC } from 'react';
import { Alert } from '@components/FileStats/Alert';
import { Alert } from '@components/common/uikit/FileStats/Alert';
import styles from '../StatsTab.module.scss';

type ErrorStageProps = {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { ComponentType } from 'react';
import { MenuProps } from 'react-select';
import { InputPropsBase } from '@components/Inputs';
import { InputPropsBase } from '@components/common/uikit/Inputs';
import styles from '../StatsTab.module.scss';

export const Menu: ComponentType<MenuProps & InputPropsBase> = ({
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { FC } from 'react';
import { Alert } from '@components/FileStats/Alert';
import { Alert } from '@components/common/uikit/FileStats/Alert';
import styles from '../StatsTab.module.scss';

export const NotSupportedStage: FC = () => (
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import { ComponentType } from 'react';
import { OptionProps } from 'react-select';
import { Badge } from '@components/FileStats/Badge';
import { InputPropsBase } from '@components/Inputs';
import { Option as CustomOption } from '@components/Inputs/Select/customComponents';
import { Badge } from '@components/common/uikit/FileStats/Badge';
import { InputPropsBase } from '@components/common/uikit/Inputs';
import { Option as CustomOption } from '@components/common/uikit/Inputs/Select/customComponents';
import { ColumnOption } from 'types/fileStats';
import styles from '../StatsTab.module.scss';

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { FC } from 'react';
import { Table } from '@components/FileStats/Table';
import { Table } from '@components/common/uikit/FileStats/Table';
import { getFileStats_datasetInfo } from '@graphql/operations/queries/__generated__/getFileStats';
import { getOverview } from '@utils/fileStats';

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { FC, useId } from 'react';
import Button from '@components/Button';
import { Progress } from '@components/FileStats/Progress';
import Button from '@components/common/uikit/Button';
import { Progress } from '@components/common/uikit/FileStats/Progress';
import { getFileStats_datasetInfo_statsInfo_state_TaskState as TaskState } from '@graphql/operations/queries/__generated__/getFileStats';
import styles from '../StatsTab.module.scss';
import { Stage } from './Stage';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import { useRouter } from 'next/router';
import { FC, useState } from 'react';
import Button from '@components/Button';
import { ColumnCard } from '@components/FileStats/ColumnCard';
import { Select } from '@components/Inputs';
import Button from '@components/common/uikit/Button';
import { ColumnCard } from '@components/common/uikit/FileStats/ColumnCard';
import { Select } from '@components/common/uikit/Inputs';
import { getFileStats_datasetInfo } from '@graphql/operations/queries/__generated__/getFileStats';
import { ColumnOption } from 'types/fileStats';
import styles from '../StatsTab.module.scss';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { FC, useState } from 'react';
import Button from '@components/Button';
import { Alert } from '@components/FileStats/Alert';
import NumberSlider from '@components/Inputs/NumberSlider/NumberSlider';
import Button from '@components/common/uikit/Button';
import { Alert } from '@components/common/uikit/FileStats/Alert';
import NumberSlider from '@components/common/uikit/Inputs/NumberSlider/NumberSlider';
import styles from '../StatsTab.module.scss';
import { Stage } from './Stage';

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import cn from 'classnames';
import { FC, FormEvent } from 'react';
import { Radio } from '@components/Inputs';
import PrimitiveDescription from '@components/PrimitiveDescription';
import PrimitiveDescription from '@components/choose-primitive/PrimitiveDescription';
import { Radio } from '@components/common/uikit/Inputs';
import { PrimitiveInfoType } from '@constants/primitiveInfoType';
import styles from './PrimitiveCard.module.scss';

Expand Down
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
const MobileBanner = dynamic(() => import('@components/MobileBanner'), {
const MobileBanner = dynamic(() => import('./components/MobileBanner'), {
ssr: false,
});

import { useAtom } from 'jotai';
import dynamic from 'next/dynamic';
import Head from 'next/head';
import visibleModalsAtom from '@atoms/visibleModalsAtom';
import Header from '@components/Header';
import { FCWithChildren } from 'types/react';
import Header from './components/Header';
import styles from './Layout.module.scss';

const Layout: FCWithChildren = ({ children }) => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@ import classNames from 'classnames';
import Link from 'next/link';
import { useEffect, useState } from 'react';
import ListIcon from '@assets/icons/list.svg?component';
import Button from '@components/Button';
import NavBar from '@components/NavBar';
import Button from '@components/common/uikit/Button';
import { useAuthContext } from '@hooks/useAuthContext';
import useModal from '@hooks/useModal';
import NavBar from './components/NavBar';
import styles from './Header.module.scss';

const Header = () => {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
import Button from '@components/Button';
import ModalContainer, { ModalProps } from '@components/ModalContainer';
import ModalContainer, {
ModalProps,
} from '@components/common/layout/ModalContainer';
import Button from '@components/common/uikit/Button';
import { FCWithChildren } from 'types/react';
import styles from './ListPropertiesModal.module.scss';

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import cn from 'classnames';
import { useEffect } from 'react';
import { animated, useSpring } from 'react-spring';
import CloseIcon from '@assets/icons/close.svg?component';
import OutsideClickObserver from '@components/OutsideClickObserver';
import OutsideClickObserver from '@components/common/layout/OutsideClickObserver';
import { FCWithChildren } from 'types/react';
import styles from './ModalContainer.module.scss';

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,11 @@ import Check from '@assets/icons/check.svg?component';
import Cross from '@assets/icons/cross.svg?component';

import { MFDHighlight } from '@atoms/MFDTaskAtom';

import Table, {
Row,
ScrollDirection,
TableProps,
} from '@components/ScrollableNodeTable';
} from '@components/common/layout/ScrollableNodeTable';

import styles from './MFDTable.module.scss';

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@ import { DefaultValues, FormProvider, useForm } from 'react-hook-form';
import { Subscription } from 'react-hook-form/dist/utils/createSubject';
import FilterIcon from '@assets/icons/filter.svg?component';
import OrderingIcon from '@assets/icons/ordering.svg?component';
import Button from '@components/Button';
import { Text } from '@components/Inputs';
import PaginationComponent from '@components/Pagination';
import Button from '@components/common/uikit/Button';
import { Text } from '@components/common/uikit/Inputs';
import PaginationComponent from '@components/common/uikit/Pagination';
import useFormPersist, { StorageToValues } from '@hooks/useFormPersist';
import { OrderDirection, Pagination } from 'types/globalTypes';
import styles from './TabLayout.module.scss';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { FC } from 'react';
import CollapseChartIcon from '@assets/icons/collapse-chart.svg?component';
import Button from '@components/Button';
import { Text } from '@components/Inputs';
import Button from '@components/common/uikit/Button';
import { Text } from '@components/common/uikit/Inputs';
import styles from './ChartControls.module.scss';

type Props = {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import classNames from 'classnames';
import { FC, useCallback, useEffect, useState } from 'react';
import { Doughnut } from 'react-chartjs-2';
import { animated } from 'react-spring';
import { DepAttribute } from '@components/TaskContext';
import { DepAttribute } from '@components/meta/TaskContext';
import { Column } from '@graphql/operations/fragments/__generated__/Column';
import { ChartControls } from './ChartControls';
import styles from './LayeredChart.module.scss';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@ import moment from 'moment';
import prettyBytes from 'pretty-bytes';
import { FC, useState } from 'react';
import FileIcon from '@assets/icons/file.svg?component';
import Button from '@components/Button';
import Button from '@components/common/uikit/Button';
import { getDatasetsInfo_datasets_data } from '@graphql/operations/queries/__generated__/getDatasetsInfo';
import FilePropertiesModal from './FilePropertiesModal';
import FilePropertiesModal from './components/FilePropertiesModal';
import styles from './DatasetItem.module.scss';

interface Props {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
import { FC } from 'react';
import { FilePropsList } from '@components/FilePropertiesModal/tabs/PropertiesTab';
import ModalContainer, { ModalProps } from '@components/ModalContainer';
import { FilePropsList } from '@components/choose-file/FilePropertiesModal/tabs/PropertiesTab';
import ModalContainer, {
ModalProps,
} from '@components/common/layout/ModalContainer';
import { AllowedDataset } from 'types/algorithms';
import styles from './FilePropertiesModal.module.scss';

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { ColumnCard } from '@components/FileStats/ColumnCard/ColumnCard';
import { render, screen, waitFor } from '@testing-library/react';
import userEvent from '@testing-library/user-event';
import { ColumnCard } from '@components/FileStats/ColumnCard/ColumnCard';
import { completedFileStatsMock } from '@graphql/operations/queries/__mocks__/getFileStats';

const user = userEvent.setup();
Expand Down
Loading

0 comments on commit 75e9986

Please sign in to comment.