@@ -1,7 +1,8 @@
|
||||
import { RouterProvider } from "react-router";
|
||||
import { router } from "./routes";
|
||||
import { Toasts } from "@probo/ui";
|
||||
|
||||
import { router } from "./routes";
|
||||
|
||||
export function App() {
|
||||
return (
|
||||
<>
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
import { graphql } from "relay-runtime";
|
||||
import type { AuditRowFragment$key } from "./__generated__/AuditRowFragment.graphql";
|
||||
import { useFragment, useMutation } from "react-relay";
|
||||
import {
|
||||
Breadcrumb,
|
||||
@@ -15,12 +14,15 @@ import {
|
||||
useToast,
|
||||
} from "@probo/ui";
|
||||
import { useTranslate } from "@probo/i18n";
|
||||
import type { AuditRowDownloadMutation } from "./__generated__/AuditRowDownloadMutation.graphql";
|
||||
import { useMutationWithToasts } from "/hooks/useMutationWithToast";
|
||||
import { downloadFile, formatError } from "@probo/helpers";
|
||||
import { type PropsWithChildren, use, useState } from "react";
|
||||
import { useLocation } from "react-router";
|
||||
|
||||
import { useMutationWithToasts } from "/hooks/useMutationWithToast";
|
||||
import { Viewer } from "/providers/Viewer";
|
||||
|
||||
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`
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
import { graphql } from "relay-runtime";
|
||||
import type { DocumentRowFragment$key } from "./__generated__/DocumentRowFragment.graphql";
|
||||
import { useFragment, useMutation } from "react-relay";
|
||||
import {
|
||||
Button,
|
||||
@@ -10,11 +9,14 @@ import {
|
||||
useToast,
|
||||
} from "@probo/ui";
|
||||
import { useTranslate } from "@probo/i18n";
|
||||
import type { DocumentRowDownloadMutation } from "./__generated__/DocumentRowDownloadMutation.graphql";
|
||||
import { useMutationWithToasts } from "/hooks/useMutationWithToast";
|
||||
import { downloadFile, formatError } from "@probo/helpers";
|
||||
import { use, useState } from "react";
|
||||
|
||||
import { useMutationWithToasts } from "/hooks/useMutationWithToast";
|
||||
import { Viewer } from "/providers/Viewer";
|
||||
|
||||
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`
|
||||
|
||||
@@ -2,15 +2,17 @@ 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 { PDFPreview } from "./PDFPreview";
|
||||
import { useWindowSize } from "usehooks-ts";
|
||||
import clsx from "clsx";
|
||||
import { clsx } from "clsx";
|
||||
import { graphql } from "relay-runtime";
|
||||
import { z } from "zod";
|
||||
|
||||
import { useMutationWithToasts } from "/hooks/useMutationWithToast";
|
||||
import z from "zod";
|
||||
import { useFormWithSchema } from "/hooks/useFormWithSchema";
|
||||
import { Viewer } from "/providers/Viewer";
|
||||
|
||||
import { PDFPreview } from "./PDFPreview";
|
||||
|
||||
const signMutation = graphql`
|
||||
mutation NDADialogSignMutation($input: AcceptNonDisclosureAgreementInput!) {
|
||||
acceptNonDisclosureAgreement(input: $input) {
|
||||
|
||||
@@ -9,13 +9,15 @@ import {
|
||||
} from "@probo/ui";
|
||||
import { use, type PropsWithChildren } from "react";
|
||||
import { domain, formatError } from "@probo/helpers";
|
||||
import { AuditRowAvatar } from "./AuditRow";
|
||||
import { Viewer } from "/providers/Viewer";
|
||||
import { graphql } from "relay-runtime";
|
||||
import { useMutation } from "react-relay";
|
||||
import type { OrganizationSidebar_requestAllAccessesMutation } from "./__generated__/OrganizationSidebar_requestAllAccessesMutation.graphql";
|
||||
|
||||
import { Viewer } from "/providers/Viewer";
|
||||
import type { TrustGraphCurrentQuery$data } from "/queries/__generated__/TrustGraphCurrentQuery.graphql";
|
||||
|
||||
import type { OrganizationSidebar_requestAllAccessesMutation } from "./__generated__/OrganizationSidebar_requestAllAccessesMutation.graphql";
|
||||
import { AuditRowAvatar } from "./AuditRow";
|
||||
|
||||
const requestAllAccessesMutation = graphql`
|
||||
mutation OrganizationSidebar_requestAllAccessesMutation {
|
||||
requestAllAccesses {
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import type { PropsWithChildren } from "react";
|
||||
import clsx from "clsx";
|
||||
import { clsx } from "clsx";
|
||||
|
||||
export function Rows({
|
||||
children,
|
||||
|
||||
@@ -1,8 +1,9 @@
|
||||
import { Skeleton, TabLink, Tabs } from "@probo/ui";
|
||||
import { TabSkeleton } from "./TabSkeleton";
|
||||
import { useTranslate } from "@probo/i18n";
|
||||
import { getTrustCenterUrl } from "@probo/helpers";
|
||||
|
||||
import { TabSkeleton } from "./TabSkeleton";
|
||||
|
||||
export function MainSkeleton() {
|
||||
const { __ } = useTranslate();
|
||||
return (
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
import { graphql } from "relay-runtime";
|
||||
import type { TrustCenterFileRowFragment$key } from "./__generated__/TrustCenterFileRowFragment.graphql";
|
||||
import { useFragment, useMutation } from "react-relay";
|
||||
import {
|
||||
Button,
|
||||
@@ -10,11 +9,14 @@ import {
|
||||
useToast,
|
||||
} from "@probo/ui";
|
||||
import { useTranslate } from "@probo/i18n";
|
||||
import type { TrustCenterFileRowDownloadMutation } from "./__generated__/TrustCenterFileRowDownloadMutation.graphql";
|
||||
import { useMutationWithToasts } from "/hooks/useMutationWithToast";
|
||||
import { downloadFile, formatError } from "@probo/helpers";
|
||||
import { use, useState } from "react";
|
||||
|
||||
import { useMutationWithToasts } from "/hooks/useMutationWithToast";
|
||||
import { Viewer } from "/providers/Viewer";
|
||||
|
||||
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`
|
||||
|
||||
@@ -1,10 +1,11 @@
|
||||
import { graphql } from "relay-runtime";
|
||||
import type { VendorRowFragment$key } from "./__generated__/VendorRowFragment.graphql";
|
||||
import { useFragment } from "react-relay";
|
||||
import { IconPin, IconShield } from "@probo/ui";
|
||||
import { useTranslate } from "@probo/i18n";
|
||||
import { faviconUrl, getCountryName } from "@probo/helpers";
|
||||
|
||||
import type { VendorRowFragment$key } from "./__generated__/VendorRowFragment.graphql";
|
||||
|
||||
const vendorRowFragment = graphql`
|
||||
fragment VendorRowFragment on Vendor {
|
||||
id
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
import { TrustCenterContext } from "/providers/TrustCenterProvider";
|
||||
import { useContext } from "react";
|
||||
|
||||
import { TrustCenterContext } from "/providers/TrustCenterProvider";
|
||||
|
||||
export function useTrustCenter(): {
|
||||
id: string;
|
||||
organization: { name: string };
|
||||
|
||||
@@ -1,10 +1,11 @@
|
||||
import { type PreloadedQuery, usePreloadedQuery } from "react-relay";
|
||||
import type { TrustGraphCurrentQuery } from "/queries/__generated__/TrustGraphCurrentQuery.graphql.ts";
|
||||
import { currentTrustGraphQuery } from "/queries/TrustGraph.ts";
|
||||
import { Logo, TabLink, Tabs } from "@probo/ui";
|
||||
import { useTranslate } from "@probo/i18n";
|
||||
import { OrganizationSidebar } from "/components/OrganizationSidebar";
|
||||
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 { TrustCenterProvider } from "/providers/TrustCenterProvider";
|
||||
import { Viewer } from "/providers/Viewer";
|
||||
|
||||
@@ -1,10 +1,12 @@
|
||||
import { StrictMode } from "react";
|
||||
import { createRoot } from "react-dom/client";
|
||||
import { QueryClient, QueryClientProvider } from "@tanstack/react-query";
|
||||
|
||||
import "./index.css";
|
||||
|
||||
import { App } from "./App";
|
||||
import { RelayProvider } from "./providers/RelayProviders";
|
||||
import { TranslatorProvider } from "./providers/TranslatorProvider";
|
||||
import { QueryClient, QueryClientProvider } from "@tanstack/react-query";
|
||||
|
||||
const queryClient = new QueryClient({
|
||||
defaultOptions: {
|
||||
|
||||
@@ -1,10 +1,11 @@
|
||||
import { type PreloadedQuery, usePreloadedQuery } from "react-relay";
|
||||
import { currentTrustDocumentsQuery } from "/queries/TrustGraph";
|
||||
import type { TrustGraphCurrentDocumentsQuery } from "/queries/__generated__/TrustGraphCurrentDocumentsQuery.graphql.ts";
|
||||
import { groupBy, objectEntries } from "@probo/helpers";
|
||||
import { documentTypeLabel } from "/helpers/documents";
|
||||
import { useTranslate } from "@probo/i18n";
|
||||
import { Fragment } from "react";
|
||||
|
||||
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";
|
||||
|
||||
@@ -1,9 +1,5 @@
|
||||
import { useFragment } from "react-relay";
|
||||
import { graphql } from "relay-runtime";
|
||||
import type {
|
||||
OverviewPageFragment$data,
|
||||
OverviewPageFragment$key,
|
||||
} from "./__generated__/OverviewPageFragment.graphql";
|
||||
import { Link, useOutletContext } from "react-router";
|
||||
import {
|
||||
groupBy,
|
||||
@@ -13,9 +9,10 @@ import {
|
||||
} from "@probo/helpers";
|
||||
import { useTranslate } from "@probo/i18n";
|
||||
import { Card, IconChevronRight } from "@probo/ui";
|
||||
import { Fragment } from "react";
|
||||
|
||||
import { AuditRow } from "/components/AuditRow";
|
||||
import { documentTypeLabel } from "/helpers/documents";
|
||||
import { Fragment } from "react";
|
||||
import { DocumentRow } from "/components/DocumentRow";
|
||||
import { TrustCenterFileRow } from "/components/TrustCenterFileRow";
|
||||
import { VendorRow } from "/components/VendorRow";
|
||||
@@ -23,6 +20,11 @@ import { RowHeader } from "/components/RowHeader.tsx";
|
||||
import { Rows } from "/components/Rows.tsx";
|
||||
import type { TrustGraphCurrentQuery$data } from "/queries/__generated__/TrustGraphCurrentQuery.graphql";
|
||||
|
||||
import type {
|
||||
OverviewPageFragment$data,
|
||||
OverviewPageFragment$key,
|
||||
} from "./__generated__/OverviewPageFragment.graphql";
|
||||
|
||||
const overviewFragment = graphql`
|
||||
fragment OverviewPageFragment on TrustCenter {
|
||||
references(first: 14) {
|
||||
|
||||
@@ -1,7 +1,8 @@
|
||||
import { type PreloadedQuery, usePreloadedQuery } from "react-relay";
|
||||
import { currentTrustVendorsQuery } from "/queries/TrustGraph";
|
||||
import { sprintf } from "@probo/helpers";
|
||||
import { useTranslate } from "@probo/i18n";
|
||||
|
||||
import { currentTrustVendorsQuery } from "/queries/TrustGraph";
|
||||
import type { TrustGraphCurrentVendorsQuery } from "/queries/__generated__/TrustGraphCurrentVendorsQuery.graphql";
|
||||
import { VendorRow } from "/components/VendorRow";
|
||||
import { Rows } from "/components/Rows.tsx";
|
||||
|
||||
@@ -1,18 +1,20 @@
|
||||
import { usePageTitle } from "@probo/hooks";
|
||||
import { useTranslate } from "@probo/i18n";
|
||||
import { Button, Field, useToast } from "@probo/ui";
|
||||
import { useFormWithSchema } from "/hooks/useFormWithSchema";
|
||||
import z from "zod";
|
||||
import { z } from "zod";
|
||||
import { graphql } from "relay-runtime";
|
||||
import {
|
||||
useMutation,
|
||||
usePreloadedQuery,
|
||||
type PreloadedQuery,
|
||||
} from "react-relay";
|
||||
import { AuthLayout } from "./AuthLayout";
|
||||
import type { ConnectPageMutation } from "./__generated__/ConnectPageMutation.graphql";
|
||||
import { useEffect, useRef, useState } from "react";
|
||||
|
||||
import { useFormWithSchema } from "/hooks/useFormWithSchema";
|
||||
|
||||
import type { ConnectPageMutation } from "./__generated__/ConnectPageMutation.graphql";
|
||||
import type { ConnectPageQuery } from "./__generated__/ConnectPageQuery.graphql";
|
||||
import { AuthLayout } from "./AuthLayout";
|
||||
|
||||
export const connectPageQuery = graphql`
|
||||
query ConnectPageQuery {
|
||||
|
||||
@@ -1,7 +1,9 @@
|
||||
import { useQueryLoader } from "react-relay";
|
||||
import { ConnectPage, connectPageQuery } from "./ConnectPage";
|
||||
import { Suspense, useEffect } from "react";
|
||||
|
||||
import { RelayProvider } from "/providers/RelayProviders";
|
||||
|
||||
import { ConnectPage, connectPageQuery } from "./ConnectPage";
|
||||
import type { ConnectPageQuery } from "./__generated__/ConnectPageQuery.graphql";
|
||||
|
||||
function ConnectPageLoader() {
|
||||
|
||||
@@ -2,14 +2,16 @@ import { usePageTitle } from "@probo/hooks";
|
||||
import { useTranslate } from "@probo/i18n";
|
||||
import { Button, Field, useToast } from "@probo/ui";
|
||||
import { useSearchParams } from "react-router";
|
||||
import { useFormWithSchema } from "/hooks/useFormWithSchema";
|
||||
import z from "zod";
|
||||
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 type { VerifyMagicLinkPageMutation } from "./__generated__/VerifyMagicLinkPageMutation.graphql";
|
||||
|
||||
import { useFormWithSchema } from "/hooks/useFormWithSchema";
|
||||
import { getPathPrefix } from "/utils/pathPrefix";
|
||||
|
||||
import type { VerifyMagicLinkPageMutation } from "./__generated__/VerifyMagicLinkPageMutation.graphql";
|
||||
import { AuthLayout } from "./AuthLayout";
|
||||
|
||||
const verifyMagicLinkMutation = graphql`
|
||||
|
||||
@@ -6,9 +6,10 @@ import {
|
||||
} from "relay-runtime";
|
||||
import type { PropsWithChildren } from "react";
|
||||
import { RelayEnvironmentProvider } from "react-relay";
|
||||
import { getPathPrefix } from "/utils/pathPrefix";
|
||||
import { makeFetchQuery } from "@probo/relay";
|
||||
|
||||
import { getPathPrefix } from "/utils/pathPrefix";
|
||||
|
||||
export class UnAuthenticatedError extends Error {
|
||||
constructor() {
|
||||
super("UNAUTHENTICATED");
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
import type { PropsWithChildren } from "react";
|
||||
|
||||
import { TranslatorProvider as ProboTranslatorProvider } from "../../../../packages/i18n/TranslatorProvider";
|
||||
|
||||
// TODO : implement a way to retrieve translations strings
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
import { createContext, type ReactNode } from "react";
|
||||
|
||||
import type { TrustGraphCurrentQuery$data } from "/queries/__generated__/TrustGraphCurrentQuery.graphql";
|
||||
|
||||
export const TrustCenterContext = createContext<
|
||||
|
||||
@@ -1,8 +1,13 @@
|
||||
import { createBrowserRouter, redirect, useRouteError } from "react-router";
|
||||
import { Fragment, lazy } from "react";
|
||||
import { consoleEnvironment } from "./providers/RelayProviders.tsx";
|
||||
import { loadQuery } from "react-relay";
|
||||
import { PageError } from "./components/PageError.tsx";
|
||||
import {
|
||||
loaderFromQueryLoader,
|
||||
routeFromAppRoute,
|
||||
withQueryRef,
|
||||
type AppRoute,
|
||||
} from "@probo/routes";
|
||||
|
||||
import { MainLayout } from "/layouts/MainLayout";
|
||||
import {
|
||||
currentTrustGraphQuery,
|
||||
@@ -12,14 +17,11 @@ import {
|
||||
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 {
|
||||
loaderFromQueryLoader,
|
||||
routeFromAppRoute,
|
||||
withQueryRef,
|
||||
type AppRoute,
|
||||
} from "@probo/routes";
|
||||
|
||||
/**
|
||||
* Top level error boundary
|
||||
|
||||
Reference in New Issue
Block a user