@@ -4,6 +4,7 @@ import { configs } from "@probo/eslint-config";
|
||||
export default defineConfig([
|
||||
...configs.base,
|
||||
...configs.ts,
|
||||
...configs.imports,
|
||||
...configs.react,
|
||||
configs.languageOptions.browser,
|
||||
...configs.stylistic,
|
||||
|
||||
@@ -1,7 +1,8 @@
|
||||
import { RouterProvider } from "react-router";
|
||||
import { router } from "./routes";
|
||||
import { Toasts, ConfirmDialog } from "@probo/ui";
|
||||
|
||||
import { router } from "./routes";
|
||||
|
||||
export function App() {
|
||||
return (
|
||||
<>
|
||||
|
||||
@@ -2,7 +2,6 @@ import { IconClock } from "@probo/ui";
|
||||
import { useTranslate } from "@probo/i18n";
|
||||
import { useLazyLoadQuery, graphql } from "react-relay";
|
||||
import { useLocation } from "react-router";
|
||||
import type { SnapshotBannerQuery } from "/__generated__/core/SnapshotBannerQuery.graphql";
|
||||
import {
|
||||
getSnapshotTypeUrlPath,
|
||||
getSnapshotTypeLabel,
|
||||
@@ -10,6 +9,8 @@ import {
|
||||
formatDate,
|
||||
} from "@probo/helpers";
|
||||
|
||||
import type { SnapshotBannerQuery } from "/__generated__/core/SnapshotBannerQuery.graphql";
|
||||
|
||||
const snapshotQuery = graphql`
|
||||
query SnapshotBannerQuery($snapshotId: ID!) {
|
||||
node(id: $snapshotId) {
|
||||
|
||||
@@ -7,7 +7,7 @@ import {
|
||||
Table,
|
||||
Th,
|
||||
} from "@probo/ui";
|
||||
import clsx from "clsx";
|
||||
import { clsx } from "clsx";
|
||||
import {
|
||||
createContext,
|
||||
startTransition,
|
||||
|
||||
@@ -18,9 +18,8 @@ import { useMutation } from "react-relay";
|
||||
import type { usePaginationFragmentHookType } from "react-relay/relay-hooks/usePaginationFragment";
|
||||
import { Link } from "react-router";
|
||||
import { z } from "zod";
|
||||
import { EditableTable } from "../table/EditableTable";
|
||||
import { PeopleCell } from "../table/PeopleCell";
|
||||
import { VendorsCell } from "../table/VendorsCell";
|
||||
import type { OperationType } from "relay-runtime";
|
||||
|
||||
import {
|
||||
createAssetMutation,
|
||||
deleteAssetMutation,
|
||||
@@ -31,9 +30,12 @@ import type {
|
||||
AssetsPageFragment$data,
|
||||
AssetsPageFragment$key,
|
||||
} from "/__generated__/core/AssetsPageFragment.graphql";
|
||||
import type { OperationType } from "relay-runtime";
|
||||
import { useOrganizationId } from "/hooks/useOrganizationId";
|
||||
|
||||
import { EditableTable } from "../table/EditableTable";
|
||||
import { PeopleCell } from "../table/PeopleCell";
|
||||
import { VendorsCell } from "../table/VendorsCell";
|
||||
|
||||
type Props = {
|
||||
connectionId: string;
|
||||
pagination: usePaginationFragmentHookType<
|
||||
|
||||
@@ -1,16 +1,18 @@
|
||||
import { Avatar, Badge, Tbody, Td, Th, Thead, Tr } from "@probo/ui";
|
||||
import { SortableTable } from "../SortableTable";
|
||||
import { useTranslate } from "@probo/i18n";
|
||||
import type { usePaginationFragmentHookType } from "react-relay/relay-hooks/usePaginationFragment";
|
||||
import type { OperationType } from "relay-runtime";
|
||||
import { useParams } from "react-router";
|
||||
import { faviconUrl, getAssetTypeVariant } from "@probo/helpers";
|
||||
|
||||
import type {
|
||||
AssetsPageFragment$data,
|
||||
AssetsPageFragment$key,
|
||||
} from "/__generated__/core/AssetsPageFragment.graphql";
|
||||
import type { OperationType } from "relay-runtime";
|
||||
import type { NodeOf } from "/types";
|
||||
import { useOrganizationId } from "/hooks/useOrganizationId";
|
||||
import { useParams } from "react-router";
|
||||
import { faviconUrl, getAssetTypeVariant } from "@probo/helpers";
|
||||
|
||||
import { SortableTable } from "../SortableTable";
|
||||
|
||||
type AssetEntry = NodeOf<AssetsPageFragment$data["assets"]>;
|
||||
|
||||
|
||||
@@ -15,13 +15,15 @@ import {
|
||||
TrButton,
|
||||
} from "@probo/ui";
|
||||
import { useTranslate } from "@probo/i18n";
|
||||
import type { LinkedAuditsCardFragment$key } from "/__generated__/core/LinkedAuditsCardFragment.graphql";
|
||||
import { useFragment } from "react-relay";
|
||||
import { useMemo, useState } from "react";
|
||||
import { sprintf, getAuditStateVariant } from "@probo/helpers";
|
||||
import { clsx } from "clsx";
|
||||
|
||||
import { useOrganizationId } from "/hooks/useOrganizationId";
|
||||
import type { LinkedAuditsCardFragment$key } from "/__generated__/core/LinkedAuditsCardFragment.graphql";
|
||||
|
||||
import { LinkedAuditsDialog } from "./LinkedAuditsDialog";
|
||||
import clsx from "clsx";
|
||||
|
||||
const linkedAuditFragment = graphql`
|
||||
fragment LinkedAuditsCardFragment on Audit {
|
||||
|
||||
@@ -16,6 +16,7 @@ import { getAuditStateVariant } from "@probo/helpers";
|
||||
import { Suspense, useMemo, useState, type ReactNode } from "react";
|
||||
import { graphql } from "relay-runtime";
|
||||
import { useLazyLoadQuery, usePaginationFragment } from "react-relay";
|
||||
|
||||
import type { LinkedAuditsDialogQuery } from "/__generated__/core/LinkedAuditsDialogQuery.graphql";
|
||||
import { useOrganizationId } from "/hooks/useOrganizationId";
|
||||
import type { NodeOf } from "/types";
|
||||
|
||||
@@ -11,13 +11,16 @@ import {
|
||||
TrButton,
|
||||
} from "@probo/ui";
|
||||
import { useTranslate } from "@probo/i18n";
|
||||
import type { LinkedControlsCardFragment$key } from "/__generated__/core/LinkedControlsCardFragment.graphql";
|
||||
import { useFragment } from "react-relay";
|
||||
import { useOrganizationId } from "/hooks/useOrganizationId";
|
||||
import { LinkedControlsDialog } from "./LinkedControlsDialog";
|
||||
import { SortableTable, SortableTh } from "../SortableTable";
|
||||
import type { ComponentProps } from "react";
|
||||
|
||||
import type { LinkedControlsCardFragment$key } from "/__generated__/core/LinkedControlsCardFragment.graphql";
|
||||
import { useOrganizationId } from "/hooks/useOrganizationId";
|
||||
|
||||
import { SortableTable, SortableTh } from "../SortableTable";
|
||||
|
||||
import { LinkedControlsDialog } from "./LinkedControlsDialog";
|
||||
|
||||
const linkedControlFragment = graphql`
|
||||
fragment LinkedControlsCardFragment on Control {
|
||||
id
|
||||
|
||||
@@ -21,15 +21,16 @@ import {
|
||||
} from "react";
|
||||
import { useTranslate } from "@probo/i18n";
|
||||
import { graphql } from "relay-runtime";
|
||||
import { useOrganizationId } from "/hooks/useOrganizationId";
|
||||
import { useLazyLoadQuery, usePaginationFragment } from "react-relay";
|
||||
import { useDebounceCallback } from "usehooks-ts";
|
||||
|
||||
import { useOrganizationId } from "/hooks/useOrganizationId";
|
||||
import type { LinkedControlsDialogQuery } from "/__generated__/core/LinkedControlsDialogQuery.graphql";
|
||||
import type {
|
||||
LinkedControlsDialogFragment$data,
|
||||
LinkedControlsDialogFragment$key,
|
||||
} from "/__generated__/core/LinkedControlsDialogFragment.graphql";
|
||||
import type { NodeOf } from "/types";
|
||||
import { useDebounceCallback } from "usehooks-ts";
|
||||
|
||||
const query = graphql`
|
||||
query LinkedControlsDialogQuery($organizationId: ID!) {
|
||||
|
||||
@@ -11,9 +11,10 @@ import {
|
||||
} from "@probo/ui";
|
||||
import { type ReactNode, useImperativeHandle, forwardRef } from "react";
|
||||
import { z } from "zod";
|
||||
import { useFormWithSchema } from "/hooks/useFormWithSchema";
|
||||
import { sprintf } from "@probo/helpers";
|
||||
|
||||
import { useFormWithSchema } from "/hooks/useFormWithSchema";
|
||||
|
||||
const bulkExportSchema = z.object({
|
||||
withWatermark: z.boolean(),
|
||||
watermarkEmail: z.string().optional().or(z.literal("")),
|
||||
|
||||
@@ -16,13 +16,15 @@ import {
|
||||
TrButton,
|
||||
} from "@probo/ui";
|
||||
import { useTranslate } from "@probo/i18n";
|
||||
import type { LinkedDocumentsCardFragment$key } from "/__generated__/core/LinkedDocumentsCardFragment.graphql";
|
||||
import { useFragment } from "react-relay";
|
||||
import { useMemo, useState } from "react";
|
||||
import { sprintf } from "@probo/helpers";
|
||||
import { clsx } from "clsx";
|
||||
|
||||
import { useOrganizationId } from "/hooks/useOrganizationId";
|
||||
import type { LinkedDocumentsCardFragment$key } from "/__generated__/core/LinkedDocumentsCardFragment.graphql";
|
||||
|
||||
import { LinkedDocumentDialog } from "./LinkedDocumentsDialog.tsx";
|
||||
import clsx from "clsx";
|
||||
|
||||
const linkedDocumentFragment = graphql`
|
||||
fragment LinkedDocumentsCardFragment on Document {
|
||||
|
||||
@@ -15,6 +15,7 @@ import { useTranslate } from "@probo/i18n";
|
||||
import { Suspense, useMemo, useState, type ReactNode } from "react";
|
||||
import { graphql } from "relay-runtime";
|
||||
import { useLazyLoadQuery, usePaginationFragment } from "react-relay";
|
||||
|
||||
import type { LinkedDocumentsDialogQuery } from "/__generated__/core/LinkedDocumentsDialogQuery.graphql";
|
||||
import { useOrganizationId } from "/hooks/useOrganizationId";
|
||||
import type { NodeOf } from "/types";
|
||||
|
||||
@@ -11,6 +11,7 @@ import {
|
||||
} from "@probo/ui";
|
||||
import { type ReactNode, useImperativeHandle, forwardRef } from "react";
|
||||
import { z } from "zod";
|
||||
|
||||
import { useFormWithSchema } from "/hooks/useFormWithSchema";
|
||||
|
||||
const pdfDownloadSchema = z.object({
|
||||
|
||||
@@ -9,6 +9,7 @@ import {
|
||||
} from "react-hook-form";
|
||||
import { useLazyLoadQuery, graphql } from "react-relay";
|
||||
import { getAuditStateVariant, getAuditStateLabel } from "@probo/helpers";
|
||||
|
||||
import type { AuditSelectFieldQuery } from "/__generated__/core/AuditSelectFieldQuery.graphql";
|
||||
|
||||
const auditsQuery = graphql`
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
import type { ComponentProps } from "react";
|
||||
import { Field } from "@probo/ui";
|
||||
import { Field, Select } from "@probo/ui";
|
||||
import { Controller, type FieldPath, type FieldValues } from "react-hook-form";
|
||||
import { Select } from "@probo/ui";
|
||||
|
||||
type Props<
|
||||
T extends typeof Field | typeof Select,
|
||||
|
||||
@@ -3,7 +3,7 @@ import { useEffect, useState } from "react";
|
||||
import { Badge, Input, IconCrossLargeX } from "@probo/ui";
|
||||
import { type Control, Controller, type FieldPath, type FieldValues } from "react-hook-form";
|
||||
import { getCountryName, getCountryOptions, countries, type CountryCode } from "@probo/helpers";
|
||||
import clsx from "clsx";
|
||||
import { clsx } from "clsx";
|
||||
|
||||
type Props<T extends FieldValues = FieldValues> = {
|
||||
control: Control<T>;
|
||||
|
||||
@@ -1,8 +1,7 @@
|
||||
import { Button, IconPlusLarge, IconTrashCan, Input, Label } from "@probo/ui";
|
||||
import { useTranslate } from "@probo/i18n";
|
||||
import { useFieldArray } from "react-hook-form";
|
||||
import type { ArrayPath, Control, FieldValue, FieldValues, Path } from "react-hook-form";
|
||||
import type { UseFormRegister } from "react-hook-form";
|
||||
import type { ArrayPath, Control, FieldValue, FieldValues, Path, UseFormRegister } from "react-hook-form";
|
||||
|
||||
type Props<TFieldValues extends FieldValues = FieldValues> = {
|
||||
control: Control<TFieldValues>;
|
||||
|
||||
@@ -2,6 +2,7 @@ import { Field, Combobox, ComboboxItem } from "@probo/ui";
|
||||
import { Suspense, useMemo, useState, type ComponentProps } from "react";
|
||||
import { useTranslate } from "@probo/i18n";
|
||||
import { type Control, Controller, type FieldPath, type FieldValues } from "react-hook-form";
|
||||
|
||||
import { usePaginatedMeasures } from "/hooks/graph/usePaginatedMeasures";
|
||||
|
||||
type Props<
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
import { Avatar, Field, Option, Select, Badge, Button, IconCrossLargeX } from "@probo/ui";
|
||||
import { Suspense, useState, type ComponentProps } from "react";
|
||||
import { useTranslate } from "@probo/i18n";
|
||||
import { type Control, Controller, type FieldValues } from "react-hook-form";
|
||||
import { type Control, Controller, type FieldValues, Path } from "react-hook-form";
|
||||
|
||||
import { usePeople } from "/hooks/graph/PeopleGraph.ts";
|
||||
import type { Path } from "react-hook-form";
|
||||
|
||||
type Person = {
|
||||
id: string;
|
||||
|
||||
@@ -2,6 +2,7 @@ import { Avatar, Field, Option, Select } from "@probo/ui";
|
||||
import { Suspense, type ComponentProps } from "react";
|
||||
import { useTranslate } from "@probo/i18n";
|
||||
import { type Control, Controller, type FieldPath, type FieldValues } from "react-hook-form";
|
||||
|
||||
import { usePeople } from "/hooks/graph/PeopleGraph.ts";
|
||||
|
||||
type Props<
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
import { useTranslate } from "@probo/i18n";
|
||||
import { Option } from "@probo/ui";
|
||||
|
||||
import type {
|
||||
ProcessingActivitySpecialOrCriminalDatum,
|
||||
ProcessingActivityLawfulBasis,
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
import { Avatar, Field, Option, Select, Badge, Button, IconCrossLargeX } from "@probo/ui";
|
||||
import { Suspense, useState, type ComponentProps } from "react";
|
||||
import { useTranslate } from "@probo/i18n";
|
||||
import { type Control, Controller, type FieldValues } from "react-hook-form";
|
||||
import { useVendors } from "/hooks/graph/VendorGraph.ts";
|
||||
import { type Control, Controller, type FieldValues, Path } from "react-hook-form";
|
||||
import { faviconUrl } from "@probo/helpers";
|
||||
import type { Path } from "react-hook-form";
|
||||
|
||||
import { useVendors } from "/hooks/graph/VendorGraph.ts";
|
||||
|
||||
type Vendor = {
|
||||
id: string;
|
||||
|
||||
@@ -15,13 +15,15 @@ import {
|
||||
} from "@probo/ui";
|
||||
import { MeasureBadge } from "@probo/ui/src/Molecules/Badge/MeasureBadge";
|
||||
import { useTranslate } from "@probo/i18n";
|
||||
import type { LinkedMeasuresCardFragment$key } from "/__generated__/core/LinkedMeasuresCardFragment.graphql";
|
||||
import { useFragment } from "react-relay";
|
||||
import { useMemo, useState } from "react";
|
||||
import { sprintf } from "@probo/helpers";
|
||||
import { clsx } from "clsx";
|
||||
|
||||
import { useOrganizationId } from "/hooks/useOrganizationId";
|
||||
import type { LinkedMeasuresCardFragment$key } from "/__generated__/core/LinkedMeasuresCardFragment.graphql";
|
||||
|
||||
import { LinkedMeasureDialog } from "./LinkedMeasuresDialog.tsx";
|
||||
import clsx from "clsx";
|
||||
|
||||
const linkedMeasureFragment = graphql`
|
||||
fragment LinkedMeasuresCardFragment on Measure {
|
||||
|
||||
@@ -15,6 +15,7 @@ import {
|
||||
} from "@probo/ui";
|
||||
import { useTranslate } from "@probo/i18n";
|
||||
import { Suspense, useMemo, useState, type ReactNode } from "react";
|
||||
|
||||
import { useOrganizationId } from "/hooks/useOrganizationId";
|
||||
import { usePaginatedMeasures } from "/hooks/graph/usePaginatedMeasures";
|
||||
|
||||
|
||||
@@ -15,7 +15,6 @@ import {
|
||||
Badge,
|
||||
} from "@probo/ui";
|
||||
import { useTranslate } from "@probo/i18n";
|
||||
import type { LinkedObligationsCardFragment$key } from "/__generated__/core/LinkedObligationsCardFragment.graphql";
|
||||
import { useFragment } from "react-relay";
|
||||
import { useMemo, useState } from "react";
|
||||
import {
|
||||
@@ -23,11 +22,14 @@ import {
|
||||
getObligationStatusVariant,
|
||||
getObligationStatusLabel,
|
||||
} from "@probo/helpers";
|
||||
import { LinkedObligationDialog } from "./LinkedObligationsDialog";
|
||||
import clsx from "clsx";
|
||||
import { clsx } from "clsx";
|
||||
import { useParams } from "react-router";
|
||||
|
||||
import type { LinkedObligationsCardFragment$key } from "/__generated__/core/LinkedObligationsCardFragment.graphql";
|
||||
import { useOrganizationId } from "/hooks/useOrganizationId";
|
||||
|
||||
import { LinkedObligationDialog } from "./LinkedObligationsDialog";
|
||||
|
||||
const linkedObligationFragment = graphql`
|
||||
fragment LinkedObligationsCardFragment on Obligation {
|
||||
id
|
||||
|
||||
@@ -19,6 +19,7 @@ import {
|
||||
import { Suspense, useMemo, useState, type ReactNode } from "react";
|
||||
import { graphql } from "relay-runtime";
|
||||
import { useLazyLoadQuery, usePaginationFragment } from "react-relay";
|
||||
|
||||
import type { LinkedObligationsDialogQuery } from "/__generated__/core/LinkedObligationsDialogQuery.graphql";
|
||||
import { useOrganizationId } from "/hooks/useOrganizationId";
|
||||
import type { NodeOf } from "/types";
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
import { Badge, Button, Card } from "@probo/ui";
|
||||
import { useTranslate } from "@probo/i18n";
|
||||
import { sprintf } from "@probo/helpers";
|
||||
|
||||
import type { TrustCenterGraphQuery$data } from "/__generated__/core/TrustCenterGraphQuery.graphql";
|
||||
|
||||
type Props = {
|
||||
|
||||
@@ -12,9 +12,11 @@ import {
|
||||
TrButton,
|
||||
} from "@probo/ui";
|
||||
import { useTranslate } from "@probo/i18n";
|
||||
import type { LinkedRisksCardFragment$key } from "/__generated__/core/LinkedRisksCardFragment.graphql";
|
||||
import { useFragment } from "react-relay";
|
||||
|
||||
import type { LinkedRisksCardFragment$key } from "/__generated__/core/LinkedRisksCardFragment.graphql";
|
||||
import { useOrganizationId } from "/hooks/useOrganizationId";
|
||||
|
||||
import { LinkedRisksDialog } from "./LinkedRisksDialog.tsx";
|
||||
|
||||
const linkedRiskFragment = graphql`
|
||||
|
||||
@@ -16,6 +16,7 @@ import { useTranslate } from "@probo/i18n";
|
||||
import { Suspense, useMemo, useState, type ReactNode } from "react";
|
||||
import { graphql } from "relay-runtime";
|
||||
import { useLazyLoadQuery } from "react-relay";
|
||||
|
||||
import type { LinkedRisksDialogQuery } from "/__generated__/core/LinkedRisksDialogQuery.graphql";
|
||||
import { useOrganizationId } from "/hooks/useOrganizationId";
|
||||
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
import { ActionDropdown, Skeleton } from "@probo/ui";
|
||||
import { Button, IconPencil } from "@probo/ui";
|
||||
import { ActionDropdown, Skeleton, Button, IconPencil } from "@probo/ui";
|
||||
import { useTranslate } from "@probo/i18n";
|
||||
|
||||
/**
|
||||
|
||||
@@ -15,7 +15,6 @@ import {
|
||||
TrButton,
|
||||
} from "@probo/ui";
|
||||
import { useTranslate } from "@probo/i18n";
|
||||
import type { LinkedSnapshotsCardFragment$key } from "/__generated__/core/LinkedSnapshotsCardFragment.graphql";
|
||||
import { useFragment } from "react-relay";
|
||||
import { useMemo, useState } from "react";
|
||||
import {
|
||||
@@ -24,9 +23,12 @@ import {
|
||||
getSnapshotTypeUrlPath,
|
||||
formatDate,
|
||||
} from "@probo/helpers";
|
||||
import { clsx } from "clsx";
|
||||
|
||||
import { useOrganizationId } from "/hooks/useOrganizationId";
|
||||
import type { LinkedSnapshotsCardFragment$key } from "/__generated__/core/LinkedSnapshotsCardFragment.graphql";
|
||||
|
||||
import { LinkedSnapshotsDialog } from "./LinkedSnapshotsDialog";
|
||||
import clsx from "clsx";
|
||||
|
||||
const linkedSnapshotFragment = graphql`
|
||||
fragment LinkedSnapshotsCardFragment on Snapshot {
|
||||
|
||||
@@ -16,6 +16,7 @@ import { getSnapshotTypeLabel, formatDate } from "@probo/helpers";
|
||||
import { Suspense, useMemo, useState, type ReactNode } from "react";
|
||||
import { graphql } from "relay-runtime";
|
||||
import { useLazyLoadQuery, usePaginationFragment } from "react-relay";
|
||||
|
||||
import type { LinkedSnapshotsDialogQuery } from "/__generated__/core/LinkedSnapshotsDialogQuery.graphql";
|
||||
import { useOrganizationId } from "/hooks/useOrganizationId";
|
||||
import type { NodeOf } from "/types";
|
||||
|
||||
@@ -15,13 +15,15 @@ import {
|
||||
Badge,
|
||||
} from "@probo/ui";
|
||||
import { useTranslate } from "@probo/i18n";
|
||||
import type { LinkedStatesOfApplicabilityCardFragment$key } from "/__generated__/core/LinkedStatesOfApplicabilityCardFragment.graphql";
|
||||
import { useFragment } from "react-relay";
|
||||
import { useMemo, useState, useEffect } from "react";
|
||||
import { sprintf } from "@probo/helpers";
|
||||
import { clsx } from "clsx";
|
||||
|
||||
import { useOrganizationId } from "/hooks/useOrganizationId";
|
||||
import type { LinkedStatesOfApplicabilityCardFragment$key } from "/__generated__/core/LinkedStatesOfApplicabilityCardFragment.graphql";
|
||||
|
||||
import { LinkedStatesOfApplicabilityDialog } from "./LinkedStatesOfApplicabilityDialog";
|
||||
import clsx from "clsx";
|
||||
|
||||
const linkedStateOfApplicabilityFragment = graphql`
|
||||
fragment LinkedStatesOfApplicabilityCardFragment on StateOfApplicabilityControl {
|
||||
|
||||
@@ -12,6 +12,7 @@ import { Suspense, useState, useRef } from "react";
|
||||
import type { ReactNode } from "react";
|
||||
import { useLazyLoadQuery } from "react-relay";
|
||||
import { graphql } from "relay-runtime";
|
||||
|
||||
import { useOrganizationId } from "/hooks/useOrganizationId";
|
||||
import type { LinkedStatesOfApplicabilityDialogQuery } from "/__generated__/core/LinkedStatesOfApplicabilityDialogQuery.graphql";
|
||||
|
||||
|
||||
@@ -1,7 +1,3 @@
|
||||
import {
|
||||
SortableCellHead,
|
||||
SortableDataTable,
|
||||
} from "/components/table/SortableDataTable.tsx";
|
||||
import type { GraphQLTaggedNode, OperationType } from "relay-runtime";
|
||||
import type { KeyType, KeyTypeData } from "react-relay/relay-hooks/helpers";
|
||||
import type { usePaginationFragmentHookType } from "react-relay/relay-hooks/usePaginationFragment";
|
||||
@@ -16,13 +12,17 @@ import {
|
||||
Spinner,
|
||||
} from "@probo/ui";
|
||||
import { z } from "zod";
|
||||
import { useMutateField } from "/hooks/useMutateField.tsx";
|
||||
import { type ReactNode } from "react";
|
||||
import { useToggle } from "@probo/hooks";
|
||||
import { clsx } from "clsx";
|
||||
|
||||
import { useStateWithSchema } from "/hooks/useStateWithSchema.ts";
|
||||
import clsx from "clsx";
|
||||
import { useMutateField } from "/hooks/useMutateField.tsx";
|
||||
import {
|
||||
SortableCellHead,
|
||||
SortableDataTable, defaultPageSize,
|
||||
} from "/components/table/SortableDataTable.tsx";
|
||||
import { useMutationWithToasts } from "/hooks/useMutationWithToasts.ts";
|
||||
import { defaultPageSize } from "/components/table/SortableDataTable.tsx";
|
||||
|
||||
type ColumnDefinition = { label: string; field: string } | string;
|
||||
|
||||
|
||||
@@ -1,7 +1,8 @@
|
||||
import { Avatar } from "@probo/ui";
|
||||
|
||||
import { GraphQLCell } from "/components/table/GraphQLCell.tsx";
|
||||
import type { PeopleGraphQuery } from "/__generated__/core/PeopleGraphQuery.graphql.ts";
|
||||
import { peopleQuery } from "/hooks/graph/PeopleGraph.ts";
|
||||
import { Avatar } from "@probo/ui";
|
||||
|
||||
type Props = {
|
||||
name: string;
|
||||
|
||||
@@ -7,7 +7,7 @@ import {
|
||||
IconChevronTriangleDownSmall,
|
||||
Spinner,
|
||||
} from "@probo/ui";
|
||||
import clsx from "clsx";
|
||||
import { clsx } from "clsx";
|
||||
import {
|
||||
type ComponentProps,
|
||||
createContext,
|
||||
|
||||
@@ -1,13 +1,15 @@
|
||||
import { GraphQLCell } from "/components/table/GraphQLCell.tsx";
|
||||
import { vendorsSelectQuery } from "/hooks/graph/VendorGraph";
|
||||
import { Avatar, Badge, IconCrossLargeX } from "@probo/ui";
|
||||
import { faviconUrl } from "@probo/helpers";
|
||||
|
||||
import { GraphQLCell } from "/components/table/GraphQLCell";
|
||||
import { vendorsSelectQuery } from "/hooks/graph/VendorGraph";
|
||||
import type { VendorGraphSelectQuery } from "/__generated__/core/VendorGraphSelectQuery.graphql.ts";
|
||||
|
||||
type Vendor = {
|
||||
id: string;
|
||||
name: string;
|
||||
websiteUrl: string | null | undefined;
|
||||
};
|
||||
import type { VendorGraphSelectQuery } from "/__generated__/core/VendorGraphSelectQuery.graphql.ts";
|
||||
|
||||
type Props = {
|
||||
name: string;
|
||||
|
||||
@@ -17,15 +17,16 @@ import { Breadcrumb } from "@probo/ui";
|
||||
import { graphql } from "relay-runtime";
|
||||
import { useFragment, useRelayEnvironment } from "react-relay";
|
||||
import { z } from "zod";
|
||||
import { Controller } from "react-hook-form";
|
||||
import { formatDatetime } from "@probo/helpers";
|
||||
|
||||
import { useFormWithSchema } from "/hooks/useFormWithSchema";
|
||||
import { useMutationWithToasts } from "/hooks/useMutationWithToasts";
|
||||
import { useOrganizationId } from "/hooks/useOrganizationId";
|
||||
import { PeopleSelectField } from "/components/form/PeopleSelectField";
|
||||
import type { TaskFormDialogFragment$key } from "/__generated__/core/TaskFormDialogFragment.graphql";
|
||||
import { MeasureSelectField } from "/components/form/MeasureSelectField";
|
||||
import { Controller } from "react-hook-form";
|
||||
import { updateStoreCounter } from "/hooks/useMutationWithIncrement";
|
||||
import { formatDatetime } from "@probo/helpers";
|
||||
|
||||
const taskFragment = graphql`
|
||||
fragment TaskFormDialogFragment on Task {
|
||||
|
||||
@@ -25,6 +25,7 @@ import {
|
||||
useRelayEnvironment,
|
||||
} from "react-relay";
|
||||
import { Link, useLocation, useParams } from "react-router";
|
||||
|
||||
import TaskFormDialog, {
|
||||
taskUpdateMutation,
|
||||
} from "/components/tasks/TaskFormDialog";
|
||||
|
||||
@@ -9,6 +9,7 @@ import {
|
||||
} from "@probo/ui";
|
||||
import { useTranslate } from "@probo/i18n";
|
||||
import { sprintf } from "@probo/helpers";
|
||||
|
||||
import { useMutationWithToasts } from "/hooks/useMutationWithToasts";
|
||||
import { deleteTrustCenterReferenceMutation } from "/hooks/graph/TrustCenterReferenceGraph";
|
||||
|
||||
|
||||
@@ -22,6 +22,7 @@ import {
|
||||
formatDate,
|
||||
getTrustCenterVisibilityOptions,
|
||||
} from "@probo/helpers";
|
||||
|
||||
import { useOrganizationId } from "/hooks/useOrganizationId";
|
||||
import type { TrustCenterAuditsCardFragment$key } from "/__generated__/core/TrustCenterAuditsCardFragment.graphql";
|
||||
|
||||
|
||||
@@ -15,10 +15,11 @@ import {
|
||||
Badge,
|
||||
} from "@probo/ui";
|
||||
import { useTranslate } from "@probo/i18n";
|
||||
import type { TrustCenterDocumentsCardFragment$key } from "/__generated__/core/TrustCenterDocumentsCardFragment.graphql";
|
||||
import { useFragment } from "react-relay";
|
||||
import { useMemo, useState, useCallback } from "react";
|
||||
import { sprintf, getTrustCenterVisibilityOptions } from "@probo/helpers";
|
||||
|
||||
import type { TrustCenterDocumentsCardFragment$key } from "/__generated__/core/TrustCenterDocumentsCardFragment.graphql";
|
||||
import { useOrganizationId } from "/hooks/useOrganizationId";
|
||||
|
||||
const trustCenterDocumentFragment = graphql`
|
||||
|
||||
@@ -16,14 +16,14 @@ import {
|
||||
IconArrowLink,
|
||||
} from "@probo/ui";
|
||||
import { useTranslate } from "@probo/i18n";
|
||||
import { useFragment } from "react-relay";
|
||||
import { useMemo, useState, useCallback } from "react";
|
||||
import { sprintf, getTrustCenterVisibilityOptions, formatDate } from "@probo/helpers";
|
||||
|
||||
import type {
|
||||
TrustCenterFilesCardFragment$key,
|
||||
TrustCenterFilesCardFragment$data,
|
||||
} from "/__generated__/core/TrustCenterFilesCardFragment.graphql";
|
||||
import { useFragment } from "react-relay";
|
||||
import { useMemo, useState, useCallback } from "react";
|
||||
import { sprintf, getTrustCenterVisibilityOptions } from "@probo/helpers";
|
||||
import { formatDate } from "@probo/helpers";
|
||||
|
||||
const trustCenterFileFragment = graphql`
|
||||
fragment TrustCenterFilesCardFragment on TrustCenterFile {
|
||||
|
||||
@@ -12,6 +12,7 @@ import {
|
||||
} from "@probo/ui";
|
||||
import { type ReactNode, useState, useImperativeHandle, forwardRef } from "react";
|
||||
import { z } from "zod";
|
||||
|
||||
import { useFormWithSchema } from "/hooks/useFormWithSchema";
|
||||
import {
|
||||
useCreateTrustCenterReferenceMutation,
|
||||
|
||||
@@ -15,20 +15,22 @@ import {
|
||||
IconArrowLink,
|
||||
} from "@probo/ui";
|
||||
import { useRef, useState } from "react";
|
||||
import { useLazyLoadQuery } from "react-relay";
|
||||
|
||||
import {
|
||||
trustCenterReferencesQuery,
|
||||
useUpdateTrustCenterReferenceRankMutation,
|
||||
} from "/hooks/graph/TrustCenterReferenceGraph";
|
||||
import type {
|
||||
TrustCenterReferenceGraphQuery,
|
||||
TrustCenterReferenceGraphQuery$data,
|
||||
} from "/__generated__/core/TrustCenterReferenceGraphQuery.graphql";
|
||||
|
||||
import {
|
||||
TrustCenterReferenceDialog,
|
||||
type TrustCenterReferenceDialogRef,
|
||||
} from "./TrustCenterReferenceDialog";
|
||||
import { DeleteTrustCenterReferenceDialog } from "./DeleteTrustCenterReferenceDialog";
|
||||
import type {
|
||||
TrustCenterReferenceGraphQuery,
|
||||
TrustCenterReferenceGraphQuery$data,
|
||||
} from "/__generated__/core/TrustCenterReferenceGraphQuery.graphql";
|
||||
import { useLazyLoadQuery } from "react-relay";
|
||||
|
||||
type Props = {
|
||||
trustCenterId: string;
|
||||
|
||||
@@ -16,6 +16,7 @@ import { useTranslate } from "@probo/i18n";
|
||||
import { useFragment } from "react-relay";
|
||||
import { useMemo, useState } from "react";
|
||||
import { sprintf } from "@probo/helpers";
|
||||
|
||||
import { useOrganizationId } from "/hooks/useOrganizationId";
|
||||
import type { TrustCenterVendorsCardFragment$key } from "/__generated__/core/TrustCenterVendorsCardFragment.graphql";
|
||||
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
import { z } from "zod";
|
||||
|
||||
import { useFormWithSchema } from "../useFormWithSchema";
|
||||
|
||||
export const documentSchema = z.object({
|
||||
|
||||
@@ -1,11 +1,13 @@
|
||||
import { z } from "zod";
|
||||
import { useFormWithSchema } from "../useFormWithSchema";
|
||||
import { graphql } from "relay-runtime";
|
||||
import { useFragment } from "react-relay";
|
||||
|
||||
import type {
|
||||
useRiskFormFragment$data,
|
||||
useRiskFormFragment$key,
|
||||
} from "/__generated__/core/useRiskFormFragment.graphql";
|
||||
import { useFragment } from "react-relay";
|
||||
|
||||
import { useFormWithSchema } from "../useFormWithSchema";
|
||||
|
||||
const RiskFragment = graphql`
|
||||
fragment useRiskFormFragment on Risk {
|
||||
|
||||
@@ -1,12 +1,14 @@
|
||||
import { z } from "zod";
|
||||
import { useFormWithSchema } from "../useFormWithSchema";
|
||||
import { graphql } from "relay-runtime";
|
||||
import { useFragment } from "react-relay";
|
||||
import type { useVendorFormFragment$key } from "/__generated__/core/useVendorFormFragment.graphql";
|
||||
import { useMutationWithToasts } from "../useMutationWithToasts";
|
||||
import { useTranslate } from "@probo/i18n";
|
||||
import { useEffect, useMemo } from "react";
|
||||
|
||||
import type { useVendorFormFragment$key } from "/__generated__/core/useVendorFormFragment.graphql";
|
||||
|
||||
import { useMutationWithToasts } from "../useMutationWithToasts";
|
||||
import { useFormWithSchema } from "../useFormWithSchema";
|
||||
|
||||
const schema = z.object({
|
||||
name: z.string().min(1, "Name is required"),
|
||||
description: z.string().optional().nullable(),
|
||||
|
||||
@@ -3,6 +3,7 @@ import { useMutation } from "react-relay";
|
||||
import { useConfirm } from "@probo/ui";
|
||||
import { useTranslate } from "@probo/i18n";
|
||||
import { promisifyMutation, sprintf } from "@probo/helpers";
|
||||
|
||||
import { useMutationWithToasts } from "../useMutationWithToasts";
|
||||
|
||||
export const assetsQuery = graphql`
|
||||
|
||||
@@ -3,6 +3,7 @@ import { useMutation } from "react-relay";
|
||||
import { useConfirm } from "@probo/ui";
|
||||
import { useTranslate } from "@probo/i18n";
|
||||
import { promisifyMutation, sprintf } from "@probo/helpers";
|
||||
|
||||
import { useMutationWithToasts } from "../useMutationWithToasts";
|
||||
|
||||
export const auditsQuery = graphql`
|
||||
|
||||
@@ -3,6 +3,7 @@ import { useMutation } from "react-relay";
|
||||
import { useConfirm } from "@probo/ui";
|
||||
import { useTranslate } from "@probo/i18n";
|
||||
import { promisifyMutation, sprintf } from "@probo/helpers";
|
||||
|
||||
import { useMutationWithToasts } from "../useMutationWithToasts";
|
||||
|
||||
export const ContinualImprovementsConnectionKey
|
||||
|
||||
@@ -1,11 +1,13 @@
|
||||
import { useTranslate } from "@probo/i18n";
|
||||
import { graphql } from "relay-runtime";
|
||||
import { useMutationWithToasts } from "../useMutationWithToasts";
|
||||
|
||||
import type { DocumentGraphDeleteMutation } from "/__generated__/core/DocumentGraphDeleteMutation.graphql";
|
||||
import type { DocumentGraphSendSigningNotificationsMutation } from "/__generated__/core/DocumentGraphSendSigningNotificationsMutation.graphql";
|
||||
import type { DocumentGraphDeleteDraftMutation } from "/__generated__/core/DocumentGraphDeleteDraftMutation.graphql";
|
||||
import type { DocumentGraphBulkExportDocumentsMutation } from "/__generated__/core/DocumentGraphBulkExportDocumentsMutation.graphql";
|
||||
|
||||
import { useMutationWithToasts } from "../useMutationWithToasts";
|
||||
|
||||
export const documentsQuery = graphql`
|
||||
query DocumentGraphListQuery($organizationId: ID!) {
|
||||
organization: node(id: $organizationId) {
|
||||
|
||||
@@ -1,10 +1,11 @@
|
||||
import { graphql } from "relay-runtime";
|
||||
import { useMutationWithToasts } from "../useMutationWithToasts";
|
||||
import { useCallback } from "react";
|
||||
import { sprintf } from "@probo/helpers";
|
||||
import { useTranslate } from "@probo/i18n";
|
||||
import { useConfirm } from "@probo/ui";
|
||||
|
||||
import { useMutationWithToasts } from "../useMutationWithToasts";
|
||||
|
||||
export const connectionListKey = "FrameworksListQuery_frameworks";
|
||||
|
||||
export const frameworksQuery = graphql`
|
||||
|
||||
@@ -1,8 +1,10 @@
|
||||
import { useTranslate } from "@probo/i18n";
|
||||
import { graphql } from "relay-runtime";
|
||||
import { useMutationWithToasts } from "../useMutationWithToasts";
|
||||
|
||||
import type { MeasureGraphDeleteMutation } from "/__generated__/core/MeasureGraphDeleteMutation.graphql";
|
||||
|
||||
import { useMutationWithToasts } from "../useMutationWithToasts";
|
||||
|
||||
export const measuresQuery = graphql`
|
||||
query MeasureGraphListQuery($organizationId: ID!) {
|
||||
organization: node(id: $organizationId) @required(action: THROW) {
|
||||
|
||||
@@ -1,9 +1,11 @@
|
||||
import { useTranslate } from "@probo/i18n";
|
||||
import { graphql } from "relay-runtime";
|
||||
import { useMutationWithToasts } from "../useMutationWithToasts";
|
||||
|
||||
import type { MeetingGraphDeleteMutation } from "/__generated__/core/MeetingGraphDeleteMutation.graphql";
|
||||
import type { MeetingGraphUpdateMutation } from "/__generated__/core/MeetingGraphUpdateMutation.graphql";
|
||||
|
||||
import { useMutationWithToasts } from "../useMutationWithToasts";
|
||||
|
||||
export const meetingsQuery = graphql`
|
||||
query MeetingGraphListQuery($organizationId: ID!) {
|
||||
organization: node(id: $organizationId) {
|
||||
|
||||
@@ -3,6 +3,7 @@ import { useMutation } from "react-relay";
|
||||
import { useConfirm } from "@probo/ui";
|
||||
import { useTranslate } from "@probo/i18n";
|
||||
import { promisifyMutation, sprintf } from "@probo/helpers";
|
||||
|
||||
import { useMutationWithToasts } from "../useMutationWithToasts";
|
||||
|
||||
export const NonconformitiesConnectionKey
|
||||
|
||||
@@ -3,6 +3,7 @@ import { useMutation } from "react-relay";
|
||||
import { useConfirm } from "@probo/ui";
|
||||
import { useTranslate } from "@probo/i18n";
|
||||
import { promisifyMutation } from "@probo/helpers";
|
||||
|
||||
import { useMutationWithToasts } from "../useMutationWithToasts";
|
||||
|
||||
export const ObligationsConnectionKey = "ObligationsPage_obligations";
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
import { graphql } from "relay-runtime";
|
||||
import type { PeopleGraphQuery } from "/__generated__/core/PeopleGraphQuery.graphql";
|
||||
import {
|
||||
useLazyLoadQuery,
|
||||
useMutation,
|
||||
@@ -8,10 +7,7 @@ import {
|
||||
type PreloadedQuery,
|
||||
} from "react-relay";
|
||||
import { useMemo } from "react";
|
||||
import type { PeopleGraphPaginatedQuery } from "/__generated__/core/PeopleGraphPaginatedQuery.graphql";
|
||||
import type { PeopleGraphPaginatedFragment$key } from "/__generated__/core/PeopleGraphPaginatedFragment.graphql";
|
||||
import { useConfirm, useToast } from "@probo/ui";
|
||||
import type { PeopleGraphDeleteMutation } from "/__generated__/core/PeopleGraphDeleteMutation.graphql";
|
||||
import {
|
||||
promisifyMutation,
|
||||
sprintf,
|
||||
@@ -20,6 +16,11 @@ import {
|
||||
} from "@probo/helpers";
|
||||
import { useTranslate } from "@probo/i18n";
|
||||
|
||||
import type { PeopleGraphPaginatedQuery } from "/__generated__/core/PeopleGraphPaginatedQuery.graphql";
|
||||
import type { PeopleGraphPaginatedFragment$key } from "/__generated__/core/PeopleGraphPaginatedFragment.graphql";
|
||||
import type { PeopleGraphDeleteMutation } from "/__generated__/core/PeopleGraphDeleteMutation.graphql";
|
||||
import type { PeopleGraphQuery } from "/__generated__/core/PeopleGraphQuery.graphql";
|
||||
|
||||
export const peopleQuery = graphql`
|
||||
query PeopleGraphQuery($organizationId: ID!, $filter: PeopleFilter) {
|
||||
organization: node(id: $organizationId) {
|
||||
|
||||
@@ -3,6 +3,7 @@ import { useMutation } from "react-relay";
|
||||
import { useConfirm } from "@probo/ui";
|
||||
import { useTranslate } from "@probo/i18n";
|
||||
import { promisifyMutation, sprintf } from "@probo/helpers";
|
||||
|
||||
import { useMutationWithToasts } from "../useMutationWithToasts";
|
||||
|
||||
export const ProcessingActivitiesConnectionKey
|
||||
|
||||
@@ -3,6 +3,7 @@ import { useMutation } from "react-relay";
|
||||
import { useConfirm } from "@probo/ui";
|
||||
import { useTranslate } from "@probo/i18n";
|
||||
import { promisifyMutation, sprintf } from "@probo/helpers";
|
||||
|
||||
import { useMutationWithToasts } from "../useMutationWithToasts";
|
||||
|
||||
export const RightsRequestsConnectionKey = "RightsRequestsPage_rightsRequests";
|
||||
|
||||
@@ -1,15 +1,17 @@
|
||||
import { graphql } from "relay-runtime";
|
||||
import { useTranslate } from "@probo/i18n";
|
||||
import { useMutationWithToasts } from "../useMutationWithToasts.ts";
|
||||
import type { RiskGraphDeleteMutation } from "/__generated__/core/RiskGraphDeleteMutation.graphql.ts";
|
||||
import {
|
||||
usePreloadedQuery,
|
||||
usePaginationFragment,
|
||||
type PreloadedQuery,
|
||||
} from "react-relay";
|
||||
|
||||
import type { RiskGraphDeleteMutation } from "/__generated__/core/RiskGraphDeleteMutation.graphql.ts";
|
||||
import type { RiskGraphListQuery } from "/__generated__/core/RiskGraphListQuery.graphql.ts";
|
||||
import type { RiskGraphFragment$key } from "/__generated__/core/RiskGraphFragment.graphql.ts";
|
||||
|
||||
import { useMutationWithToasts } from "../useMutationWithToasts.ts";
|
||||
|
||||
const deleteRiskMutation = graphql`
|
||||
mutation RiskGraphDeleteMutation(
|
||||
$input: DeleteRiskInput!
|
||||
|
||||
@@ -3,6 +3,7 @@ import { useMutation } from "react-relay";
|
||||
import { useConfirm } from "@probo/ui";
|
||||
import { useTranslate } from "@probo/i18n";
|
||||
import { promisifyMutation, sprintf } from "@probo/helpers";
|
||||
|
||||
import { useMutationWithToasts } from "../useMutationWithToasts";
|
||||
|
||||
export const SnapshotsConnectionKey = "SnapshotsPage_snapshots";
|
||||
|
||||
@@ -1,6 +1,4 @@
|
||||
import { graphql } from "relay-runtime";
|
||||
import type { StateOfApplicabilityGraphPaginatedQuery } from "/__generated__/core/StateOfApplicabilityGraphPaginatedQuery.graphql";
|
||||
import type { StateOfApplicabilityGraphPaginatedFragment$key } from "/__generated__/core/StateOfApplicabilityGraphPaginatedFragment.graphql";
|
||||
import {
|
||||
useMutation,
|
||||
usePaginationFragment,
|
||||
@@ -8,7 +6,6 @@ import {
|
||||
type PreloadedQuery,
|
||||
} from "react-relay";
|
||||
import { useConfirm, useToast } from "@probo/ui";
|
||||
import type { StateOfApplicabilityGraphDeleteMutation } from "/__generated__/core/StateOfApplicabilityGraphDeleteMutation.graphql";
|
||||
import {
|
||||
promisifyMutation,
|
||||
sprintf,
|
||||
@@ -17,6 +14,10 @@ import {
|
||||
} from "@probo/helpers";
|
||||
import { useTranslate } from "@probo/i18n";
|
||||
|
||||
import type { StateOfApplicabilityGraphDeleteMutation } from "/__generated__/core/StateOfApplicabilityGraphDeleteMutation.graphql";
|
||||
import type { StateOfApplicabilityGraphPaginatedFragment$key } from "/__generated__/core/StateOfApplicabilityGraphPaginatedFragment.graphql";
|
||||
import type { StateOfApplicabilityGraphPaginatedQuery } from "/__generated__/core/StateOfApplicabilityGraphPaginatedQuery.graphql";
|
||||
|
||||
export const paginatedStateOfApplicabilityQuery = graphql`
|
||||
query StateOfApplicabilityGraphPaginatedQuery($organizationId: ID!) {
|
||||
organization: node(id: $organizationId) {
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { graphql } from "react-relay";
|
||||
import { useLazyLoadQuery, usePaginationFragment } from "react-relay";
|
||||
import { graphql, useLazyLoadQuery, usePaginationFragment } from "react-relay";
|
||||
|
||||
import type { TrustCenterAccessGraphQuery } from "/__generated__/core/TrustCenterAccessGraphQuery.graphql";
|
||||
import type {
|
||||
TrustCenterAccessGraph_accesses$data,
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
import { graphql } from "relay-runtime";
|
||||
import { useMutationWithToasts } from "/hooks/useMutationWithToasts";
|
||||
import { useTranslate } from "@probo/i18n";
|
||||
|
||||
import { useMutationWithToasts } from "/hooks/useMutationWithToasts";
|
||||
import type { TrustCenterAuditGraphUpdateMutation } from "/__generated__/core/TrustCenterAuditGraphUpdateMutation.graphql";
|
||||
|
||||
export const trustCenterAuditUpdateMutation = graphql`
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
import { graphql } from "relay-runtime";
|
||||
import { useMutationWithToasts } from "/hooks/useMutationWithToasts";
|
||||
import { useTranslate } from "@probo/i18n";
|
||||
|
||||
import { useMutationWithToasts } from "/hooks/useMutationWithToasts";
|
||||
import type { TrustCenterDocumentGraphUpdateMutation } from "/__generated__/core/TrustCenterDocumentGraphUpdateMutation.graphql";
|
||||
|
||||
export const trustCenterDocumentsQuery = graphql`
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
import { graphql } from "relay-runtime";
|
||||
|
||||
import { useMutationWithToasts } from "/hooks/useMutationWithToasts";
|
||||
|
||||
export const createTrustCenterFileMutation = graphql`
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
import { graphql } from "relay-runtime";
|
||||
|
||||
import { useMutationWithToasts } from "/hooks/useMutationWithToasts";
|
||||
import type { TrustCenterGraphUpdateMutation } from "/__generated__/core/TrustCenterGraphUpdateMutation.graphql";
|
||||
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
import { graphql } from "react-relay";
|
||||
|
||||
import { useMutationWithToasts } from "/hooks/useMutationWithToasts";
|
||||
import type { TrustCenterReferenceGraphCreateMutation } from "/__generated__/core/TrustCenterReferenceGraphCreateMutation.graphql";
|
||||
import type { TrustCenterReferenceGraphUpdateMutation } from "/__generated__/core/TrustCenterReferenceGraphUpdateMutation.graphql";
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
import { graphql } from "relay-runtime";
|
||||
import { useMutationWithToasts } from "/hooks/useMutationWithToasts";
|
||||
import { useTranslate } from "@probo/i18n";
|
||||
|
||||
import { useMutationWithToasts } from "/hooks/useMutationWithToasts";
|
||||
import type { TrustCenterVendorGraphUpdateMutation } from "/__generated__/core/TrustCenterVendorGraphUpdateMutation.graphql";
|
||||
|
||||
export const trustCenterVendorUpdateMutation = graphql`
|
||||
|
||||
@@ -1,14 +1,16 @@
|
||||
import { useTranslate } from "@probo/i18n";
|
||||
import { graphql } from "relay-runtime";
|
||||
import { useMutationWithToasts } from "../useMutationWithToasts.ts";
|
||||
import type { VendorGraphCreateMutation } from "/__generated__/core/VendorGraphCreateMutation.graphql.ts";
|
||||
import type { VendorGraphDeleteMutation } from "/__generated__/core/VendorGraphDeleteMutation.graphql.ts";
|
||||
import type { VendorGraphSelectQuery } from "/__generated__/core/VendorGraphSelectQuery.graphql.ts";
|
||||
import { useMutation, useLazyLoadQuery } from "react-relay";
|
||||
import { useConfirm } from "@probo/ui";
|
||||
import { promisifyMutation, sprintf } from "@probo/helpers";
|
||||
import { useMemo } from "react";
|
||||
|
||||
import type { VendorGraphSelectQuery } from "/__generated__/core/VendorGraphSelectQuery.graphql.ts";
|
||||
import type { VendorGraphDeleteMutation } from "/__generated__/core/VendorGraphDeleteMutation.graphql.ts";
|
||||
import type { VendorGraphCreateMutation } from "/__generated__/core/VendorGraphCreateMutation.graphql.ts";
|
||||
|
||||
import { useMutationWithToasts } from "../useMutationWithToasts.ts";
|
||||
|
||||
const createVendorMutation = graphql`
|
||||
mutation VendorGraphCreateMutation(
|
||||
$input: CreateVendorInput!
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
import { graphql, useLazyLoadQuery, usePaginationFragment } from "react-relay";
|
||||
|
||||
import type { usePaginatedMeasuresQuery } from "/__generated__/core/usePaginatedMeasuresQuery.graphql";
|
||||
import type { usePaginatedMeasuresFragment$key } from "/__generated__/core/usePaginatedMeasuresFragment.graphql";
|
||||
|
||||
|
||||
@@ -1,8 +1,10 @@
|
||||
import { QueryClient, QueryClientProvider } from "@tanstack/react-query";
|
||||
import { createRoot } from "react-dom/client";
|
||||
|
||||
import "./index.css";
|
||||
|
||||
import { App } from "./App";
|
||||
import { TranslatorProvider } from "./providers/TranslatorProvider";
|
||||
import { QueryClient, QueryClientProvider } from "@tanstack/react-query";
|
||||
|
||||
const queryClient = new QueryClient({
|
||||
defaultOptions: {
|
||||
|
||||
@@ -9,11 +9,12 @@ import {
|
||||
IconCircleProgress,
|
||||
IconCircleCheck,
|
||||
} from "@probo/ui";
|
||||
import { PDFPreview } from "../components/documents/PDFPreview";
|
||||
import { useWindowSize } from "usehooks-ts";
|
||||
import clsx from "clsx";
|
||||
import { clsx } from "clsx";
|
||||
import { sprintf } from "@probo/helpers";
|
||||
|
||||
import { PDFPreview } from "../components/documents/PDFPreview";
|
||||
|
||||
type Document = {
|
||||
document_version_id: string;
|
||||
title: string;
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
import { graphql, usePreloadedQuery, type PreloadedQuery } from "react-relay";
|
||||
import { useTranslate } from "@probo/i18n";
|
||||
|
||||
import type { APIKeysPageQuery } from "/__generated__/iam/APIKeysPageQuery.graphql";
|
||||
|
||||
import { PersonalAPIKeyList } from "./_components/PersonalAPIKeyList";
|
||||
|
||||
export const apiKeysPageQuery = graphql`
|
||||
|
||||
@@ -1,10 +1,12 @@
|
||||
import { Suspense, useEffect } from "react";
|
||||
import { useQueryLoader } from "react-relay";
|
||||
import { CenteredLayoutSkeleton } from "@probo/ui";
|
||||
import { APIKeysPage, apiKeysPageQuery } from "./APIKeysPage";
|
||||
|
||||
import type { APIKeysPageQuery } from "/__generated__/iam/APIKeysPageQuery.graphql";
|
||||
import { IAMRelayProvider } from "/providers/IAMRelayProvider";
|
||||
|
||||
import { APIKeysPage, apiKeysPageQuery } from "./APIKeysPage";
|
||||
|
||||
function APIKeysPageLoaderInner() {
|
||||
const [queryRef, loadQuery]
|
||||
= useQueryLoader<APIKeysPageQuery>(apiKeysPageQuery);
|
||||
|
||||
@@ -24,9 +24,11 @@ import {
|
||||
useDialogRef,
|
||||
useToast,
|
||||
} from "@probo/ui";
|
||||
|
||||
import { useFormWithSchema } from "/hooks/useFormWithSchema";
|
||||
import type { PersonalAPIKeyListFragment$key } from "/__generated__/iam/PersonalAPIKeyListFragment.graphql";
|
||||
import type { PersonalAPIKeyListCreateMutation } from "/__generated__/iam/PersonalAPIKeyListCreateMutation.graphql";
|
||||
|
||||
import { PersonalAPIKeysTable } from "./PersonalAPIKeysTable";
|
||||
import { PersonalAPIKeyTokenDialog } from "./PersonalAPIKeyTokenDialog";
|
||||
|
||||
|
||||
@@ -3,11 +3,13 @@ import { formatDate, formatError, type GraphQLError } from "@probo/helpers";
|
||||
import { Button, Spinner, Td, Tr, useConfirm, useToast } from "@probo/ui";
|
||||
import { graphql } from "relay-runtime";
|
||||
import { useMutation, useFragment } from "react-relay";
|
||||
import { clsx } from "clsx";
|
||||
import { Suspense } from "react";
|
||||
|
||||
import type { PersonalAPIKeyRowFragment$key } from "/__generated__/iam/PersonalAPIKeyRowFragment.graphql";
|
||||
import type { PersonalAPIKeyRow_revokeMutation } from "/__generated__/iam/PersonalAPIKeyRow_revokeMutation.graphql";
|
||||
import clsx from "clsx";
|
||||
|
||||
import { PersonalAPIKeyTokenAction } from "./PersonalAPIKeyTokenAction";
|
||||
import { Suspense } from "react";
|
||||
|
||||
const revokeMutation = graphql`
|
||||
mutation PersonalAPIKeyRow_revokeMutation(
|
||||
|
||||
@@ -2,11 +2,13 @@ import { useTranslate } from "@probo/i18n";
|
||||
import { Button, useDialogRef, useToast } from "@probo/ui";
|
||||
import { formatError } from "@probo/helpers";
|
||||
import { useRefetchableFragment } from "react-relay";
|
||||
import { PersonalAPIKeyTokenDialog } from "./PersonalAPIKeyTokenDialog";
|
||||
import { personalAPIKeyRowFragment } from "./PersonalAPIKeyRow";
|
||||
|
||||
import type { PersonalAPIKeyRowFragment$key } from "/__generated__/iam/PersonalAPIKeyRowFragment.graphql";
|
||||
import type { PersonalAPIKeyRowRefetchQuery } from "/__generated__/iam/PersonalAPIKeyRowRefetchQuery.graphql";
|
||||
|
||||
import { PersonalAPIKeyTokenDialog } from "./PersonalAPIKeyTokenDialog";
|
||||
import { personalAPIKeyRowFragment } from "./PersonalAPIKeyRow";
|
||||
|
||||
export function PersonalAPIKeyTokenAction(props: {
|
||||
fKey: PersonalAPIKeyRowFragment$key;
|
||||
disabled?: boolean;
|
||||
|
||||
@@ -1,8 +1,10 @@
|
||||
import { useTranslate } from "@probo/i18n";
|
||||
import { Table, Tbody, Th, Thead, Tr } from "@probo/ui";
|
||||
import { PersonalAPIKeyRow } from "./PersonalAPIKeyRow";
|
||||
|
||||
import type { PersonalAPIKeyListFragment$data } from "/__generated__/iam/PersonalAPIKeyListFragment.graphql";
|
||||
|
||||
import { PersonalAPIKeyRow } from "./PersonalAPIKeyRow";
|
||||
|
||||
export function PersonalAPIKeysTable(props: {
|
||||
edges: PersonalAPIKeyListFragment$data["personalAPIKeys"]["edges"];
|
||||
connectionId: string;
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
import { Logo } from "@probo/ui";
|
||||
import { Outlet } from "react-router";
|
||||
|
||||
import { IAMRelayProvider } from "/providers/IAMRelayProvider";
|
||||
|
||||
export default function () {
|
||||
|
||||
@@ -3,13 +3,14 @@ import { useTranslate } from "@probo/i18n";
|
||||
import { Button, Field, useToast } from "@probo/ui";
|
||||
import { useState } from "react";
|
||||
import { Link } from "react-router";
|
||||
import { useFormWithSchema } from "/hooks/useFormWithSchema";
|
||||
import z from "zod";
|
||||
import { z } from "zod";
|
||||
import { graphql } from "relay-runtime";
|
||||
import { useMutation } from "react-relay";
|
||||
import type { ForgotPasswordPageMutation } from "/__generated__/iam/ForgotPasswordPageMutation.graphql";
|
||||
import { formatError } from "@probo/helpers";
|
||||
|
||||
import type { ForgotPasswordPageMutation } from "/__generated__/iam/ForgotPasswordPageMutation.graphql";
|
||||
import { useFormWithSchema } from "/hooks/useFormWithSchema";
|
||||
|
||||
const sendInstructionsMutation = graphql`
|
||||
mutation ForgotPasswordPageMutation($input: ForgotPasswordInput!) {
|
||||
forgotPassword(input: $input) {
|
||||
|
||||
@@ -2,13 +2,14 @@ import { usePageTitle } from "@probo/hooks";
|
||||
import { useTranslate } from "@probo/i18n";
|
||||
import { Button, Field, useToast } from "@probo/ui";
|
||||
import { Link, useNavigate, useSearchParams } from "react-router";
|
||||
import z from "zod";
|
||||
import { useFormWithSchema } from "/hooks/useFormWithSchema";
|
||||
import { z } from "zod";
|
||||
import { graphql } from "relay-runtime";
|
||||
import { useMutation } from "react-relay";
|
||||
import type { ResetPasswordPageMutation } from "/__generated__/iam/ResetPasswordPageMutation.graphql";
|
||||
import { formatError, type GraphQLError } from "@probo/helpers";
|
||||
|
||||
import type { ResetPasswordPageMutation } from "/__generated__/iam/ResetPasswordPageMutation.graphql";
|
||||
import { useFormWithSchema } from "/hooks/useFormWithSchema";
|
||||
|
||||
const resetPasswordMutation = graphql`
|
||||
mutation ResetPasswordPageMutation($input: ResetPasswordInput!) {
|
||||
resetPassword(input: $input) {
|
||||
|
||||
@@ -2,12 +2,13 @@ import { usePageTitle } from "@probo/hooks";
|
||||
import { useTranslate } from "@probo/i18n";
|
||||
import { Button, Field, useToast } from "@probo/ui";
|
||||
import { Link, useSearchParams } from "react-router";
|
||||
import { useFormWithSchema } from "/hooks/useFormWithSchema";
|
||||
import z from "zod";
|
||||
import { z } from "zod";
|
||||
import { useState } from "react";
|
||||
import { graphql } from "relay-runtime";
|
||||
import { useMutation } from "react-relay";
|
||||
import { formatError } from "@probo/helpers";
|
||||
|
||||
import { useFormWithSchema } from "/hooks/useFormWithSchema";
|
||||
import type { VerifyEmailPageMutation } from "/__generated__/iam/VerifyEmailPageMutation.graphql";
|
||||
|
||||
const verifyEmailMutation = graphql`
|
||||
|
||||
@@ -4,9 +4,10 @@ import type { FormEventHandler } from "react";
|
||||
import { useMutation } from "react-relay";
|
||||
import { Link } from "react-router";
|
||||
import { graphql } from "relay-runtime";
|
||||
import type { PasswordSignInPageMutation } from "/__generated__/iam/PasswordSignInPageMutation.graphql";
|
||||
import { formatError, type GraphQLError } from "@probo/helpers";
|
||||
|
||||
import type { PasswordSignInPageMutation } from "/__generated__/iam/PasswordSignInPageMutation.graphql";
|
||||
|
||||
const signInMutation = graphql`
|
||||
mutation PasswordSignInPageMutation($input: SignInInput!) {
|
||||
signIn(input: $input) {
|
||||
|
||||
@@ -8,6 +8,7 @@ import {
|
||||
} from "react-relay";
|
||||
import { Link, useNavigate } from "react-router";
|
||||
import { graphql } from "relay-runtime";
|
||||
|
||||
import type { SSOSignInPageQuery } from "/__generated__/iam/SSOSignInPageQuery.graphql";
|
||||
|
||||
const ssoAvailabilityQuery = graphql`
|
||||
|
||||
@@ -2,12 +2,13 @@ import { usePageTitle } from "@probo/hooks";
|
||||
import { useTranslate } from "@probo/i18n";
|
||||
import { Button, Field, useToast } from "@probo/ui";
|
||||
import { Link, useNavigate, useSearchParams } from "react-router";
|
||||
import z from "zod";
|
||||
import { useFormWithSchema } from "/hooks/useFormWithSchema";
|
||||
import { z } from "zod";
|
||||
import { graphql } from "relay-runtime";
|
||||
import { useMutation } from "react-relay";
|
||||
import { formatError } from "@probo/helpers";
|
||||
|
||||
import { useFormWithSchema } from "/hooks/useFormWithSchema";
|
||||
|
||||
const signUpFromIvitationMutation = graphql`
|
||||
mutation SignUpFromInvitationPageMutation(
|
||||
$input: SignUpFromInvitationInput!
|
||||
|
||||
@@ -2,12 +2,13 @@ import { usePageTitle } from "@probo/hooks";
|
||||
import { useTranslate } from "@probo/i18n";
|
||||
import { Button, Field, useToast } from "@probo/ui";
|
||||
import { Link, useNavigate } from "react-router";
|
||||
import z from "zod";
|
||||
import { useFormWithSchema } from "/hooks/useFormWithSchema";
|
||||
import { z } from "zod";
|
||||
import { graphql } from "relay-runtime";
|
||||
import { useMutation } from "react-relay";
|
||||
import { formatError } from "@probo/helpers";
|
||||
|
||||
import { useFormWithSchema } from "/hooks/useFormWithSchema";
|
||||
|
||||
const signUpMutation = graphql`
|
||||
mutation SignUpPageMutation($input: SignUpInput!) {
|
||||
signUp(input: $input) {
|
||||
|
||||
@@ -8,10 +8,12 @@ import {
|
||||
Input,
|
||||
} from "@probo/ui";
|
||||
import { useMemo, useState } from "react";
|
||||
import { usePageTitle } from "@probo/hooks";
|
||||
|
||||
import type { MembershipsPageQuery } from "/__generated__/iam/MembershipsPageQuery.graphql";
|
||||
|
||||
import { InvitationCard } from "./_components/InvitationCard";
|
||||
import { MembershipCard } from "./_components/MembershipCard";
|
||||
import type { MembershipsPageQuery } from "/__generated__/iam/MembershipsPageQuery.graphql";
|
||||
import { usePageTitle } from "@probo/hooks";
|
||||
|
||||
export const membershipsPageQuery = graphql`
|
||||
query MembershipsPageQuery {
|
||||
|
||||
@@ -1,10 +1,12 @@
|
||||
import { useQueryLoader } from "react-relay";
|
||||
import { Suspense, useEffect } from "react";
|
||||
import { CenteredLayoutSkeleton } from "@probo/ui";
|
||||
|
||||
import type { MembershipsPageQuery } from "/__generated__/iam/MembershipsPageQuery.graphql";
|
||||
import { MembershipsPage, membershipsPageQuery } from "./MembershipsPage";
|
||||
import { IAMRelayProvider } from "/providers/IAMRelayProvider";
|
||||
|
||||
import { MembershipsPage, membershipsPageQuery } from "./MembershipsPage";
|
||||
|
||||
function MembershipsPageLoader() {
|
||||
const [queryRef, loadQuery]
|
||||
= useQueryLoader<MembershipsPageQuery>(membershipsPageQuery);
|
||||
|
||||
@@ -1,8 +1,10 @@
|
||||
import { graphql, usePreloadedQuery, type PreloadedQuery } from "react-relay";
|
||||
import { Outlet } from "react-router";
|
||||
import { Layout, Skeleton } from "@probo/ui";
|
||||
import type { ViewerLayoutQuery } from "/__generated__/iam/ViewerLayoutQuery.graphql";
|
||||
import { Suspense } from "react";
|
||||
|
||||
import type { ViewerLayoutQuery } from "/__generated__/iam/ViewerLayoutQuery.graphql";
|
||||
|
||||
import { ViewerDropdown } from "./_components/ViewerDropdown";
|
||||
|
||||
export const viewerLayoutQuery = graphql`
|
||||
|
||||
@@ -1,8 +1,10 @@
|
||||
import { useQueryLoader } from "react-relay";
|
||||
import { Suspense, useEffect } from "react";
|
||||
|
||||
import type { ViewerLayoutQuery } from "/__generated__/iam/ViewerLayoutQuery.graphql";
|
||||
import { ViewerLayout, viewerLayoutQuery } from "./ViewerLayout";
|
||||
import { IAMRelayProvider } from "/providers/IAMRelayProvider";
|
||||
|
||||
import { ViewerLayout, viewerLayoutQuery } from "./ViewerLayout";
|
||||
import { ViewerLayoutLoading } from "./ViewerLayoutLoading";
|
||||
|
||||
function ViewerLayoutLoader() {
|
||||
|
||||
@@ -3,6 +3,7 @@ import { useTranslate } from "@probo/i18n";
|
||||
import { Button, Card, useToast } from "@probo/ui";
|
||||
import { graphql, type DataID } from "relay-runtime";
|
||||
import { useFragment, useMutation } from "react-relay";
|
||||
|
||||
import type { InvitationCardFragment$key } from "/__generated__/iam/InvitationCardFragment.graphql";
|
||||
import type { InvitationCardMutation } from "/__generated__/iam/InvitationCardMutation.graphql";
|
||||
|
||||
|
||||
@@ -11,9 +11,10 @@ import {
|
||||
import { Link, useNavigate } from "react-router";
|
||||
import { graphql } from "relay-runtime";
|
||||
import { useFragment, useMutation } from "react-relay";
|
||||
import type { MembershipCardFragment$key } from "/__generated__/iam/MembershipCardFragment.graphql";
|
||||
import { parseDate } from "@probo/helpers";
|
||||
import { useCallback } from "react";
|
||||
|
||||
import type { MembershipCardFragment$key } from "/__generated__/iam/MembershipCardFragment.graphql";
|
||||
import type { MembershipCard_assumeMutation } from "/__generated__/iam/MembershipCard_assumeMutation.graphql";
|
||||
|
||||
const fragment = graphql`
|
||||
|
||||
@@ -10,9 +10,10 @@ import {
|
||||
import { graphql } from "relay-runtime";
|
||||
import { useFragment, useMutation } from "react-relay";
|
||||
import { useTranslate } from "@probo/i18n";
|
||||
import type { ViewerDropdownFragment$key } from "/__generated__/iam/ViewerDropdownFragment.graphql";
|
||||
import { formatError } from "@probo/helpers";
|
||||
|
||||
import type { ViewerDropdownFragment$key } from "/__generated__/iam/ViewerDropdownFragment.graphql";
|
||||
|
||||
export const fragment = graphql`
|
||||
fragment ViewerDropdownFragment on Identity {
|
||||
canListAPIKeys: permission(action: "iam:personal-api-key:list")
|
||||
|
||||
@@ -11,6 +11,7 @@ import { graphql, useMutation } from "react-relay";
|
||||
import type { FormEventHandler } from "react";
|
||||
import { Link, useLocation, useNavigate } from "react-router";
|
||||
import { formatError } from "@probo/helpers";
|
||||
|
||||
import type { NewOrganizationPageMutation } from "/__generated__/iam/NewOrganizationPageMutation.graphql";
|
||||
import { IAMRelayProvider } from "/providers/IAMRelayProvider";
|
||||
|
||||
|
||||
@@ -1,15 +1,17 @@
|
||||
import { graphql, usePreloadedQuery, type PreloadedQuery } from "react-relay";
|
||||
import { Link, Outlet } from "react-router";
|
||||
import { Badge, Button, IconPeopleAdd, Layout, Skeleton } from "@probo/ui";
|
||||
import { Sidebar } from "./_components/Sidebar";
|
||||
import { MembershipsDropdown } from "./_components/MembershipsDropdown";
|
||||
import type { ViewerMembershipLayoutQuery } from "/__generated__/iam/ViewerMembershipLayoutQuery.graphql";
|
||||
import { ViewerMembershipDropdown } from "./_components/ViewerMembershipDropdown";
|
||||
import { Suspense } from "react";
|
||||
import { useTranslate } from "@probo/i18n";
|
||||
|
||||
import type { ViewerMembershipLayoutQuery } from "/__generated__/iam/ViewerMembershipLayoutQuery.graphql";
|
||||
import { CoreRelayProvider } from "/providers/CoreRelayProvider";
|
||||
import { CurrentUser } from "/providers/CurrentUser";
|
||||
|
||||
import { ViewerMembershipDropdown } from "./_components/ViewerMembershipDropdown";
|
||||
import { MembershipsDropdown } from "./_components/MembershipsDropdown";
|
||||
import { Sidebar } from "./_components/Sidebar";
|
||||
|
||||
export const viewerMembershipLayoutQuery = graphql`
|
||||
query ViewerMembershipLayoutQuery(
|
||||
$organizationId: ID!
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user