Add import order sorting rules
Signed-off-by: Émile Ré <emile@getprobo.com>
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
import { RouterProvider } from "react-router";
|
||||
import { Toasts } from "@probo/ui";
|
||||
import { RouterProvider } from "react-router";
|
||||
|
||||
import { router } from "./routes";
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { graphql } from "relay-runtime";
|
||||
import { useFragment, useMutation } from "react-relay";
|
||||
import { downloadFile, formatError } from "@probo/helpers";
|
||||
import { useTranslate } from "@probo/i18n";
|
||||
import {
|
||||
Breadcrumb,
|
||||
Button,
|
||||
@@ -13,17 +13,17 @@ import {
|
||||
Table,
|
||||
useToast,
|
||||
} from "@probo/ui";
|
||||
import { useTranslate } from "@probo/i18n";
|
||||
import { downloadFile, formatError } from "@probo/helpers";
|
||||
import { type PropsWithChildren, use, useState } from "react";
|
||||
import { useFragment, useMutation } from "react-relay";
|
||||
import { useLocation } from "react-router";
|
||||
import { graphql } from "relay-runtime";
|
||||
|
||||
import { useMutationWithToasts } from "/hooks/useMutationWithToast";
|
||||
import { Viewer } from "/providers/Viewer";
|
||||
|
||||
import type { AuditRow_requestAccessMutation } from "./__generated__/AuditRow_requestAccessMutation.graphql";
|
||||
import type { AuditRowDownloadMutation } from "./__generated__/AuditRowDownloadMutation.graphql";
|
||||
import type { AuditRowFragment$key } from "./__generated__/AuditRowFragment.graphql";
|
||||
import type { AuditRow_requestAccessMutation } from "./__generated__/AuditRow_requestAccessMutation.graphql";
|
||||
|
||||
const requestAccessMutation = graphql`
|
||||
mutation AuditRow_requestAccessMutation($input: RequestReportAccessInput!) {
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { graphql } from "relay-runtime";
|
||||
import { useFragment, useMutation } from "react-relay";
|
||||
import { downloadFile, formatError } from "@probo/helpers";
|
||||
import { useTranslate } from "@probo/i18n";
|
||||
import {
|
||||
Button,
|
||||
IconArrowInbox,
|
||||
@@ -8,16 +8,16 @@ import {
|
||||
Spinner,
|
||||
useToast,
|
||||
} from "@probo/ui";
|
||||
import { useTranslate } from "@probo/i18n";
|
||||
import { downloadFile, formatError } from "@probo/helpers";
|
||||
import { use, useState } from "react";
|
||||
import { useFragment, useMutation } from "react-relay";
|
||||
import { graphql } from "relay-runtime";
|
||||
|
||||
import { useMutationWithToasts } from "/hooks/useMutationWithToast";
|
||||
import { Viewer } from "/providers/Viewer";
|
||||
|
||||
import type { DocumentRow_requestAccessMutation } from "./__generated__/DocumentRow_requestAccessMutation.graphql";
|
||||
import type { DocumentRowDownloadMutation } from "./__generated__/DocumentRowDownloadMutation.graphql";
|
||||
import type { DocumentRowFragment$key } from "./__generated__/DocumentRowFragment.graphql";
|
||||
import type { DocumentRow_requestAccessMutation } from "./__generated__/DocumentRow_requestAccessMutation.graphql";
|
||||
|
||||
const requestAccessMutation = graphql`
|
||||
mutation DocumentRow_requestAccessMutation(
|
||||
|
||||
@@ -1,14 +1,14 @@
|
||||
import { Button, Card, Field, Logo, Spinner } from "@probo/ui";
|
||||
import { sprintf } from "@probo/helpers";
|
||||
import { useTranslate } from "@probo/i18n";
|
||||
import { use, useEffect } from "react";
|
||||
import { useWindowSize } from "usehooks-ts";
|
||||
import { Button, Card, Field, Logo, Spinner } from "@probo/ui";
|
||||
import { clsx } from "clsx";
|
||||
import { use, useEffect } from "react";
|
||||
import { graphql } from "relay-runtime";
|
||||
import { useWindowSize } from "usehooks-ts";
|
||||
import { z } from "zod";
|
||||
|
||||
import { useMutationWithToasts } from "/hooks/useMutationWithToast";
|
||||
import { useFormWithSchema } from "/hooks/useFormWithSchema";
|
||||
import { useMutationWithToasts } from "/hooks/useMutationWithToast";
|
||||
import { Viewer } from "/providers/Viewer";
|
||||
|
||||
import { PDFPreview } from "./PDFPreview";
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
import { domain, formatError } from "@probo/helpers";
|
||||
import { useTranslate } from "@probo/i18n";
|
||||
import {
|
||||
Button,
|
||||
@@ -7,10 +8,9 @@ import {
|
||||
IconMedal,
|
||||
useToast,
|
||||
} from "@probo/ui";
|
||||
import { use, type PropsWithChildren } from "react";
|
||||
import { domain, formatError } from "@probo/helpers";
|
||||
import { graphql } from "relay-runtime";
|
||||
import { type PropsWithChildren, use } from "react";
|
||||
import { useMutation } from "react-relay";
|
||||
import { graphql } from "relay-runtime";
|
||||
|
||||
import { Viewer } from "/providers/Viewer";
|
||||
import type { TrustGraphCurrentQuery$data } from "/queries/__generated__/TrustGraphCurrentQuery.graphql";
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import { Document, Page, pdfjs } from "react-pdf";
|
||||
import "react-pdf/dist/Page/TextLayer.css";
|
||||
import "react-pdf/dist/Page/AnnotationLayer.css";
|
||||
import { type ComponentProps, useRef, useState } from "react";
|
||||
|
||||
import { times } from "@probo/helpers";
|
||||
import {
|
||||
IconArrowInbox,
|
||||
IconChevronLeft,
|
||||
@@ -9,8 +9,9 @@ import {
|
||||
IconPlusLarge,
|
||||
Spinner,
|
||||
} from "@probo/ui";
|
||||
import { times } from "@probo/helpers";
|
||||
import { IconMinusLarge } from "@probo/ui/src/Atoms/Icons/IconMinusLarge.tsx";
|
||||
import { type ComponentProps, useRef, useState } from "react";
|
||||
import { Document, Page, pdfjs } from "react-pdf";
|
||||
|
||||
// Worker for PDF.js
|
||||
pdfjs.GlobalWorkerOptions.workerSrc = `//unpkg.com/pdfjs-dist@${pdfjs.version}/build/pdf.worker.min.mjs`;
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import { useLocation, useRouteError } from "react-router";
|
||||
import { IconPageCross } from "@probo/ui";
|
||||
import { useTranslate } from "@probo/i18n";
|
||||
import { IconPageCross } from "@probo/ui";
|
||||
import { useEffect, useRef } from "react";
|
||||
import { useLocation, useRouteError } from "react-router";
|
||||
|
||||
const classNames = {
|
||||
wrapper: "py-10 text-center space-y-2 ",
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import type { PropsWithChildren } from "react";
|
||||
import { clsx } from "clsx";
|
||||
import type { PropsWithChildren } from "react";
|
||||
|
||||
export function Rows({
|
||||
children,
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { Skeleton, TabLink, Tabs } from "@probo/ui";
|
||||
import { useTranslate } from "@probo/i18n";
|
||||
import { getTrustCenterUrl } from "@probo/helpers";
|
||||
import { useTranslate } from "@probo/i18n";
|
||||
import { Skeleton, TabLink, Tabs } from "@probo/ui";
|
||||
|
||||
import { TabSkeleton } from "./TabSkeleton";
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { graphql } from "relay-runtime";
|
||||
import { useFragment, useMutation } from "react-relay";
|
||||
import { downloadFile, formatError } from "@probo/helpers";
|
||||
import { useTranslate } from "@probo/i18n";
|
||||
import {
|
||||
Button,
|
||||
IconArrowInbox,
|
||||
@@ -8,16 +8,16 @@ import {
|
||||
Spinner,
|
||||
useToast,
|
||||
} from "@probo/ui";
|
||||
import { useTranslate } from "@probo/i18n";
|
||||
import { downloadFile, formatError } from "@probo/helpers";
|
||||
import { use, useState } from "react";
|
||||
import { useFragment, useMutation } from "react-relay";
|
||||
import { graphql } from "relay-runtime";
|
||||
|
||||
import { useMutationWithToasts } from "/hooks/useMutationWithToast";
|
||||
import { Viewer } from "/providers/Viewer";
|
||||
|
||||
import type { TrustCenterFileRow_requestAccessMutation } from "./__generated__/TrustCenterFileRow_requestAccessMutation.graphql";
|
||||
import type { TrustCenterFileRowDownloadMutation } from "./__generated__/TrustCenterFileRowDownloadMutation.graphql";
|
||||
import type { TrustCenterFileRowFragment$key } from "./__generated__/TrustCenterFileRowFragment.graphql";
|
||||
import type { TrustCenterFileRow_requestAccessMutation } from "./__generated__/TrustCenterFileRow_requestAccessMutation.graphql";
|
||||
|
||||
const requestAccessMutation = graphql`
|
||||
mutation TrustCenterFileRow_requestAccessMutation(
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
import { graphql } from "relay-runtime";
|
||||
import { useFragment } from "react-relay";
|
||||
import { IconPin, IconShield } from "@probo/ui";
|
||||
import { useTranslate } from "@probo/i18n";
|
||||
import { faviconUrl, getCountryName } from "@probo/helpers";
|
||||
import { useTranslate } from "@probo/i18n";
|
||||
import { IconPin, IconShield } from "@probo/ui";
|
||||
import { useFragment } from "react-relay";
|
||||
import { graphql } from "relay-runtime";
|
||||
|
||||
import type { VendorRowFragment$key } from "./__generated__/VendorRowFragment.graphql";
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { zodResolver } from "@hookform/resolvers/zod";
|
||||
import { useForm } from "react-hook-form";
|
||||
import type { z, ZodTypeAny } from "zod";
|
||||
import { zodResolver } from "@hookform/resolvers/zod";
|
||||
|
||||
export function useFormWithSchema<T extends ZodTypeAny>(
|
||||
schema: T,
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
import { useTranslate } from "@probo/i18n";
|
||||
import { useToast } from "@probo/ui";
|
||||
import { useCallback } from "react";
|
||||
import { useMutation, type UseMutationConfig } from "react-relay";
|
||||
import { useToast } from "@probo/ui";
|
||||
import { useTranslate } from "@probo/i18n";
|
||||
import type { MutationParameters, GraphQLTaggedNode } from "relay-runtime";
|
||||
import type { GraphQLTaggedNode, MutationParameters } from "relay-runtime";
|
||||
|
||||
/**
|
||||
* A decorated useMutation hook that emits toast notifications on success or error.
|
||||
|
||||
@@ -1,14 +1,14 @@
|
||||
import { type PreloadedQuery, usePreloadedQuery } from "react-relay";
|
||||
import { Logo, TabLink, Tabs } from "@probo/ui";
|
||||
import { useTranslate } from "@probo/i18n";
|
||||
import { Logo, TabLink, Tabs } from "@probo/ui";
|
||||
import { type PreloadedQuery, usePreloadedQuery } from "react-relay";
|
||||
import { Outlet } from "react-router";
|
||||
|
||||
import type { TrustGraphCurrentQuery } from "/queries/__generated__/TrustGraphCurrentQuery.graphql.ts";
|
||||
import { currentTrustGraphQuery } from "/queries/TrustGraph.ts";
|
||||
import { OrganizationSidebar } from "/components/OrganizationSidebar";
|
||||
import { NDADialog } from "/components/NDADialog";
|
||||
import { OrganizationSidebar } from "/components/OrganizationSidebar";
|
||||
import { TrustCenterProvider } from "/providers/TrustCenterProvider";
|
||||
import { Viewer } from "/providers/Viewer";
|
||||
import type { TrustGraphCurrentQuery } from "/queries/__generated__/TrustGraphCurrentQuery.graphql.ts";
|
||||
import { currentTrustGraphQuery } from "/queries/TrustGraph.ts";
|
||||
|
||||
type Props = {
|
||||
queryRef: PreloadedQuery<TrustGraphCurrentQuery>;
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { QueryClient, QueryClientProvider } from "@tanstack/react-query";
|
||||
import { StrictMode } from "react";
|
||||
import { createRoot } from "react-dom/client";
|
||||
import { QueryClient, QueryClientProvider } from "@tanstack/react-query";
|
||||
|
||||
import "./index.css";
|
||||
|
||||
|
||||
@@ -1,15 +1,15 @@
|
||||
import { type PreloadedQuery, usePreloadedQuery } from "react-relay";
|
||||
import { groupBy, objectEntries } from "@probo/helpers";
|
||||
import { useTranslate } from "@probo/i18n";
|
||||
import { Fragment } from "react";
|
||||
import { type PreloadedQuery, usePreloadedQuery } from "react-relay";
|
||||
|
||||
import { currentTrustDocumentsQuery } from "/queries/TrustGraph";
|
||||
import type { TrustGraphCurrentDocumentsQuery } from "/queries/__generated__/TrustGraphCurrentDocumentsQuery.graphql.ts";
|
||||
import { documentTypeLabel } from "/helpers/documents";
|
||||
import { DocumentRow } from "/components/DocumentRow";
|
||||
import { TrustCenterFileRow } from "/components/TrustCenterFileRow";
|
||||
import { Rows } from "/components/Rows.tsx";
|
||||
import { RowHeader } from "/components/RowHeader.tsx";
|
||||
import { Rows } from "/components/Rows.tsx";
|
||||
import { TrustCenterFileRow } from "/components/TrustCenterFileRow";
|
||||
import { documentTypeLabel } from "/helpers/documents";
|
||||
import type { TrustGraphCurrentDocumentsQuery } from "/queries/__generated__/TrustGraphCurrentDocumentsQuery.graphql.ts";
|
||||
import { currentTrustDocumentsQuery } from "/queries/TrustGraph";
|
||||
|
||||
type Props = {
|
||||
queryRef: PreloadedQuery<TrustGraphCurrentDocumentsQuery>;
|
||||
|
||||
@@ -1,23 +1,23 @@
|
||||
import { useFragment } from "react-relay";
|
||||
import { graphql } from "relay-runtime";
|
||||
import { Link, useOutletContext } from "react-router";
|
||||
import {
|
||||
getTrustCenterUrl,
|
||||
groupBy,
|
||||
objectEntries,
|
||||
sprintf,
|
||||
getTrustCenterUrl,
|
||||
} from "@probo/helpers";
|
||||
import { useTranslate } from "@probo/i18n";
|
||||
import { Card, IconChevronRight } from "@probo/ui";
|
||||
import { Fragment } from "react";
|
||||
import { useFragment } from "react-relay";
|
||||
import { Link, useOutletContext } from "react-router";
|
||||
import { graphql } from "relay-runtime";
|
||||
|
||||
import { AuditRow } from "/components/AuditRow";
|
||||
import { documentTypeLabel } from "/helpers/documents";
|
||||
import { DocumentRow } from "/components/DocumentRow";
|
||||
import { TrustCenterFileRow } from "/components/TrustCenterFileRow";
|
||||
import { VendorRow } from "/components/VendorRow";
|
||||
import { RowHeader } from "/components/RowHeader.tsx";
|
||||
import { Rows } from "/components/Rows.tsx";
|
||||
import { TrustCenterFileRow } from "/components/TrustCenterFileRow";
|
||||
import { VendorRow } from "/components/VendorRow";
|
||||
import { documentTypeLabel } from "/helpers/documents";
|
||||
import type { TrustGraphCurrentQuery$data } from "/queries/__generated__/TrustGraphCurrentQuery.graphql";
|
||||
|
||||
import type {
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
import { type PreloadedQuery, usePreloadedQuery } from "react-relay";
|
||||
import { sprintf } from "@probo/helpers";
|
||||
import { useTranslate } from "@probo/i18n";
|
||||
import { type PreloadedQuery, usePreloadedQuery } from "react-relay";
|
||||
|
||||
import { currentTrustVendorsQuery } from "/queries/TrustGraph";
|
||||
import type { TrustGraphCurrentVendorsQuery } from "/queries/__generated__/TrustGraphCurrentVendorsQuery.graphql";
|
||||
import { VendorRow } from "/components/VendorRow";
|
||||
import { Rows } from "/components/Rows.tsx";
|
||||
import { VendorRow } from "/components/VendorRow";
|
||||
import type { TrustGraphCurrentVendorsQuery } from "/queries/__generated__/TrustGraphCurrentVendorsQuery.graphql";
|
||||
import { currentTrustVendorsQuery } from "/queries/TrustGraph";
|
||||
|
||||
type Props = {
|
||||
queryRef: PreloadedQuery<TrustGraphCurrentVendorsQuery>;
|
||||
|
||||
@@ -1,14 +1,14 @@
|
||||
import { usePageTitle } from "@probo/hooks";
|
||||
import { useTranslate } from "@probo/i18n";
|
||||
import { Button, Field, useToast } from "@probo/ui";
|
||||
import { z } from "zod";
|
||||
import { graphql } from "relay-runtime";
|
||||
import { useEffect, useRef, useState } from "react";
|
||||
import {
|
||||
type PreloadedQuery,
|
||||
useMutation,
|
||||
usePreloadedQuery,
|
||||
type PreloadedQuery,
|
||||
} from "react-relay";
|
||||
import { useEffect, useRef, useState } from "react";
|
||||
import { graphql } from "relay-runtime";
|
||||
import { z } from "zod";
|
||||
|
||||
import { useFormWithSchema } from "/hooks/useFormWithSchema";
|
||||
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
import { useQueryLoader } from "react-relay";
|
||||
import { Suspense, useEffect } from "react";
|
||||
import { useQueryLoader } from "react-relay";
|
||||
|
||||
import { RelayProvider } from "/providers/RelayProviders";
|
||||
|
||||
import { ConnectPage, connectPageQuery } from "./ConnectPage";
|
||||
import type { ConnectPageQuery } from "./__generated__/ConnectPageQuery.graphql";
|
||||
import { ConnectPage, connectPageQuery } from "./ConnectPage";
|
||||
|
||||
function ConnectPageLoader() {
|
||||
const [queryRef, loadQuery]
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
import { formatError } from "@probo/helpers";
|
||||
import { usePageTitle } from "@probo/hooks";
|
||||
import { useTranslate } from "@probo/i18n";
|
||||
import { Button, Field, useToast } from "@probo/ui";
|
||||
import { useSearchParams } from "react-router";
|
||||
import { z } from "zod";
|
||||
import { useEffect, useRef } from "react";
|
||||
import { graphql } from "relay-runtime";
|
||||
import { useMutation } from "react-relay";
|
||||
import { formatError } from "@probo/helpers";
|
||||
import { useSearchParams } from "react-router";
|
||||
import { graphql } from "relay-runtime";
|
||||
import { z } from "zod";
|
||||
|
||||
import { useFormWithSchema } from "/hooks/useFormWithSchema";
|
||||
import { getPathPrefix } from "/utils/pathPrefix";
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
import { makeFetchQuery } from "@probo/relay";
|
||||
import type { PropsWithChildren } from "react";
|
||||
import { RelayEnvironmentProvider } from "react-relay";
|
||||
import {
|
||||
Environment,
|
||||
Network,
|
||||
RecordSource,
|
||||
Store,
|
||||
} from "relay-runtime";
|
||||
import type { PropsWithChildren } from "react";
|
||||
import { RelayEnvironmentProvider } from "react-relay";
|
||||
import { makeFetchQuery } from "@probo/relay";
|
||||
|
||||
import { getPathPrefix } from "/utils/pathPrefix";
|
||||
|
||||
|
||||
@@ -1,27 +1,27 @@
|
||||
import { createBrowserRouter, redirect, useRouteError } from "react-router";
|
||||
import { Fragment, lazy } from "react";
|
||||
import { loadQuery } from "react-relay";
|
||||
import {
|
||||
type AppRoute,
|
||||
loaderFromQueryLoader,
|
||||
routeFromAppRoute,
|
||||
withQueryRef,
|
||||
type AppRoute,
|
||||
} from "@probo/routes";
|
||||
import { Fragment, lazy } from "react";
|
||||
import { loadQuery } from "react-relay";
|
||||
import { createBrowserRouter, redirect, useRouteError } from "react-router";
|
||||
|
||||
import { MainLayout } from "/layouts/MainLayout";
|
||||
import { DocumentsPage } from "/pages/DocumentsPage";
|
||||
import { OverviewPage } from "/pages/OverviewPage";
|
||||
import { SubprocessorsPage } from "/pages/SubprocessorsPage";
|
||||
import {
|
||||
currentTrustGraphQuery,
|
||||
currentTrustDocumentsQuery,
|
||||
currentTrustGraphQuery,
|
||||
currentTrustVendorsQuery,
|
||||
} from "/queries/TrustGraph";
|
||||
import { OverviewPage } from "/pages/OverviewPage";
|
||||
import { DocumentsPage } from "/pages/DocumentsPage";
|
||||
import { SubprocessorsPage } from "/pages/SubprocessorsPage";
|
||||
|
||||
import { PageError } from "./components/PageError.tsx";
|
||||
import { consoleEnvironment } from "./providers/RelayProviders.tsx";
|
||||
import { TabSkeleton } from "./components/Skeletons/TabSkeleton.tsx";
|
||||
import { MainSkeleton } from "./components/Skeletons/MainSkeleton.tsx";
|
||||
import { TabSkeleton } from "./components/Skeletons/TabSkeleton.tsx";
|
||||
import { consoleEnvironment } from "./providers/RelayProviders.tsx";
|
||||
|
||||
/**
|
||||
* Top level error boundary
|
||||
|
||||
Reference in New Issue
Block a user