Add eslint-plugin-import

Signed-off-by: Émile Ré <emile@getprobo.com>
This commit is contained in:
Émile Ré
2026-01-22 19:57:10 +04:00
parent 0e4ac296cb
commit aa5696b5d3
400 changed files with 1414 additions and 892 deletions

View File

@@ -4,6 +4,7 @@ import { configs } from "@probo/eslint-config";
export default defineConfig([ export default defineConfig([
...configs.base, ...configs.base,
...configs.ts, ...configs.ts,
...configs.imports,
...configs.react, ...configs.react,
configs.languageOptions.browser, configs.languageOptions.browser,
...configs.stylistic, ...configs.stylistic,

View File

@@ -1,7 +1,8 @@
import { RouterProvider } from "react-router"; import { RouterProvider } from "react-router";
import { router } from "./routes";
import { Toasts, ConfirmDialog } from "@probo/ui"; import { Toasts, ConfirmDialog } from "@probo/ui";
import { router } from "./routes";
export function App() { export function App() {
return ( return (
<> <>

View File

@@ -2,7 +2,6 @@ import { IconClock } from "@probo/ui";
import { useTranslate } from "@probo/i18n"; import { useTranslate } from "@probo/i18n";
import { useLazyLoadQuery, graphql } from "react-relay"; import { useLazyLoadQuery, graphql } from "react-relay";
import { useLocation } from "react-router"; import { useLocation } from "react-router";
import type { SnapshotBannerQuery } from "/__generated__/core/SnapshotBannerQuery.graphql";
import { import {
getSnapshotTypeUrlPath, getSnapshotTypeUrlPath,
getSnapshotTypeLabel, getSnapshotTypeLabel,
@@ -10,6 +9,8 @@ import {
formatDate, formatDate,
} from "@probo/helpers"; } from "@probo/helpers";
import type { SnapshotBannerQuery } from "/__generated__/core/SnapshotBannerQuery.graphql";
const snapshotQuery = graphql` const snapshotQuery = graphql`
query SnapshotBannerQuery($snapshotId: ID!) { query SnapshotBannerQuery($snapshotId: ID!) {
node(id: $snapshotId) { node(id: $snapshotId) {

View File

@@ -7,7 +7,7 @@ import {
Table, Table,
Th, Th,
} from "@probo/ui"; } from "@probo/ui";
import clsx from "clsx"; import { clsx } from "clsx";
import { import {
createContext, createContext,
startTransition, startTransition,

View File

@@ -18,9 +18,8 @@ import { useMutation } from "react-relay";
import type { usePaginationFragmentHookType } from "react-relay/relay-hooks/usePaginationFragment"; import type { usePaginationFragmentHookType } from "react-relay/relay-hooks/usePaginationFragment";
import { Link } from "react-router"; import { Link } from "react-router";
import { z } from "zod"; import { z } from "zod";
import { EditableTable } from "../table/EditableTable"; import type { OperationType } from "relay-runtime";
import { PeopleCell } from "../table/PeopleCell";
import { VendorsCell } from "../table/VendorsCell";
import { import {
createAssetMutation, createAssetMutation,
deleteAssetMutation, deleteAssetMutation,
@@ -31,9 +30,12 @@ import type {
AssetsPageFragment$data, AssetsPageFragment$data,
AssetsPageFragment$key, AssetsPageFragment$key,
} from "/__generated__/core/AssetsPageFragment.graphql"; } from "/__generated__/core/AssetsPageFragment.graphql";
import type { OperationType } from "relay-runtime";
import { useOrganizationId } from "/hooks/useOrganizationId"; import { useOrganizationId } from "/hooks/useOrganizationId";
import { EditableTable } from "../table/EditableTable";
import { PeopleCell } from "../table/PeopleCell";
import { VendorsCell } from "../table/VendorsCell";
type Props = { type Props = {
connectionId: string; connectionId: string;
pagination: usePaginationFragmentHookType< pagination: usePaginationFragmentHookType<

View File

@@ -1,16 +1,18 @@
import { Avatar, Badge, Tbody, Td, Th, Thead, Tr } from "@probo/ui"; import { Avatar, Badge, Tbody, Td, Th, Thead, Tr } from "@probo/ui";
import { SortableTable } from "../SortableTable";
import { useTranslate } from "@probo/i18n"; import { useTranslate } from "@probo/i18n";
import type { usePaginationFragmentHookType } from "react-relay/relay-hooks/usePaginationFragment"; 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 { import type {
AssetsPageFragment$data, AssetsPageFragment$data,
AssetsPageFragment$key, AssetsPageFragment$key,
} from "/__generated__/core/AssetsPageFragment.graphql"; } from "/__generated__/core/AssetsPageFragment.graphql";
import type { OperationType } from "relay-runtime";
import type { NodeOf } from "/types"; import type { NodeOf } from "/types";
import { useOrganizationId } from "/hooks/useOrganizationId"; 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"]>; type AssetEntry = NodeOf<AssetsPageFragment$data["assets"]>;

View File

@@ -15,13 +15,15 @@ import {
TrButton, TrButton,
} from "@probo/ui"; } from "@probo/ui";
import { useTranslate } from "@probo/i18n"; import { useTranslate } from "@probo/i18n";
import type { LinkedAuditsCardFragment$key } from "/__generated__/core/LinkedAuditsCardFragment.graphql";
import { useFragment } from "react-relay"; import { useFragment } from "react-relay";
import { useMemo, useState } from "react"; import { useMemo, useState } from "react";
import { sprintf, getAuditStateVariant } from "@probo/helpers"; import { sprintf, getAuditStateVariant } from "@probo/helpers";
import { clsx } from "clsx";
import { useOrganizationId } from "/hooks/useOrganizationId"; import { useOrganizationId } from "/hooks/useOrganizationId";
import type { LinkedAuditsCardFragment$key } from "/__generated__/core/LinkedAuditsCardFragment.graphql";
import { LinkedAuditsDialog } from "./LinkedAuditsDialog"; import { LinkedAuditsDialog } from "./LinkedAuditsDialog";
import clsx from "clsx";
const linkedAuditFragment = graphql` const linkedAuditFragment = graphql`
fragment LinkedAuditsCardFragment on Audit { fragment LinkedAuditsCardFragment on Audit {

View File

@@ -16,6 +16,7 @@ import { getAuditStateVariant } from "@probo/helpers";
import { Suspense, useMemo, useState, type ReactNode } from "react"; import { Suspense, useMemo, useState, type ReactNode } from "react";
import { graphql } from "relay-runtime"; import { graphql } from "relay-runtime";
import { useLazyLoadQuery, usePaginationFragment } from "react-relay"; import { useLazyLoadQuery, usePaginationFragment } from "react-relay";
import type { LinkedAuditsDialogQuery } from "/__generated__/core/LinkedAuditsDialogQuery.graphql"; import type { LinkedAuditsDialogQuery } from "/__generated__/core/LinkedAuditsDialogQuery.graphql";
import { useOrganizationId } from "/hooks/useOrganizationId"; import { useOrganizationId } from "/hooks/useOrganizationId";
import type { NodeOf } from "/types"; import type { NodeOf } from "/types";

View File

@@ -11,13 +11,16 @@ import {
TrButton, TrButton,
} from "@probo/ui"; } from "@probo/ui";
import { useTranslate } from "@probo/i18n"; import { useTranslate } from "@probo/i18n";
import type { LinkedControlsCardFragment$key } from "/__generated__/core/LinkedControlsCardFragment.graphql";
import { useFragment } from "react-relay"; 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 { 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` const linkedControlFragment = graphql`
fragment LinkedControlsCardFragment on Control { fragment LinkedControlsCardFragment on Control {
id id

View File

@@ -21,15 +21,16 @@ import {
} from "react"; } from "react";
import { useTranslate } from "@probo/i18n"; import { useTranslate } from "@probo/i18n";
import { graphql } from "relay-runtime"; import { graphql } from "relay-runtime";
import { useOrganizationId } from "/hooks/useOrganizationId";
import { useLazyLoadQuery, usePaginationFragment } from "react-relay"; 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 { LinkedControlsDialogQuery } from "/__generated__/core/LinkedControlsDialogQuery.graphql";
import type { import type {
LinkedControlsDialogFragment$data, LinkedControlsDialogFragment$data,
LinkedControlsDialogFragment$key, LinkedControlsDialogFragment$key,
} from "/__generated__/core/LinkedControlsDialogFragment.graphql"; } from "/__generated__/core/LinkedControlsDialogFragment.graphql";
import type { NodeOf } from "/types"; import type { NodeOf } from "/types";
import { useDebounceCallback } from "usehooks-ts";
const query = graphql` const query = graphql`
query LinkedControlsDialogQuery($organizationId: ID!) { query LinkedControlsDialogQuery($organizationId: ID!) {

View File

@@ -11,9 +11,10 @@ import {
} from "@probo/ui"; } from "@probo/ui";
import { type ReactNode, useImperativeHandle, forwardRef } from "react"; import { type ReactNode, useImperativeHandle, forwardRef } from "react";
import { z } from "zod"; import { z } from "zod";
import { useFormWithSchema } from "/hooks/useFormWithSchema";
import { sprintf } from "@probo/helpers"; import { sprintf } from "@probo/helpers";
import { useFormWithSchema } from "/hooks/useFormWithSchema";
const bulkExportSchema = z.object({ const bulkExportSchema = z.object({
withWatermark: z.boolean(), withWatermark: z.boolean(),
watermarkEmail: z.string().optional().or(z.literal("")), watermarkEmail: z.string().optional().or(z.literal("")),

View File

@@ -16,13 +16,15 @@ import {
TrButton, TrButton,
} from "@probo/ui"; } from "@probo/ui";
import { useTranslate } from "@probo/i18n"; import { useTranslate } from "@probo/i18n";
import type { LinkedDocumentsCardFragment$key } from "/__generated__/core/LinkedDocumentsCardFragment.graphql";
import { useFragment } from "react-relay"; import { useFragment } from "react-relay";
import { useMemo, useState } from "react"; import { useMemo, useState } from "react";
import { sprintf } from "@probo/helpers"; import { sprintf } from "@probo/helpers";
import { clsx } from "clsx";
import { useOrganizationId } from "/hooks/useOrganizationId"; import { useOrganizationId } from "/hooks/useOrganizationId";
import type { LinkedDocumentsCardFragment$key } from "/__generated__/core/LinkedDocumentsCardFragment.graphql";
import { LinkedDocumentDialog } from "./LinkedDocumentsDialog.tsx"; import { LinkedDocumentDialog } from "./LinkedDocumentsDialog.tsx";
import clsx from "clsx";
const linkedDocumentFragment = graphql` const linkedDocumentFragment = graphql`
fragment LinkedDocumentsCardFragment on Document { fragment LinkedDocumentsCardFragment on Document {

View File

@@ -15,6 +15,7 @@ import { useTranslate } from "@probo/i18n";
import { Suspense, useMemo, useState, type ReactNode } from "react"; import { Suspense, useMemo, useState, type ReactNode } from "react";
import { graphql } from "relay-runtime"; import { graphql } from "relay-runtime";
import { useLazyLoadQuery, usePaginationFragment } from "react-relay"; import { useLazyLoadQuery, usePaginationFragment } from "react-relay";
import type { LinkedDocumentsDialogQuery } from "/__generated__/core/LinkedDocumentsDialogQuery.graphql"; import type { LinkedDocumentsDialogQuery } from "/__generated__/core/LinkedDocumentsDialogQuery.graphql";
import { useOrganizationId } from "/hooks/useOrganizationId"; import { useOrganizationId } from "/hooks/useOrganizationId";
import type { NodeOf } from "/types"; import type { NodeOf } from "/types";

View File

@@ -11,6 +11,7 @@ import {
} from "@probo/ui"; } from "@probo/ui";
import { type ReactNode, useImperativeHandle, forwardRef } from "react"; import { type ReactNode, useImperativeHandle, forwardRef } from "react";
import { z } from "zod"; import { z } from "zod";
import { useFormWithSchema } from "/hooks/useFormWithSchema"; import { useFormWithSchema } from "/hooks/useFormWithSchema";
const pdfDownloadSchema = z.object({ const pdfDownloadSchema = z.object({

View File

@@ -9,6 +9,7 @@ import {
} from "react-hook-form"; } from "react-hook-form";
import { useLazyLoadQuery, graphql } from "react-relay"; import { useLazyLoadQuery, graphql } from "react-relay";
import { getAuditStateVariant, getAuditStateLabel } from "@probo/helpers"; import { getAuditStateVariant, getAuditStateLabel } from "@probo/helpers";
import type { AuditSelectFieldQuery } from "/__generated__/core/AuditSelectFieldQuery.graphql"; import type { AuditSelectFieldQuery } from "/__generated__/core/AuditSelectFieldQuery.graphql";
const auditsQuery = graphql` const auditsQuery = graphql`

View File

@@ -1,7 +1,6 @@
import type { ComponentProps } from "react"; 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 { Controller, type FieldPath, type FieldValues } from "react-hook-form";
import { Select } from "@probo/ui";
type Props< type Props<
T extends typeof Field | typeof Select, T extends typeof Field | typeof Select,

View File

@@ -3,7 +3,7 @@ import { useEffect, useState } from "react";
import { Badge, Input, IconCrossLargeX } from "@probo/ui"; import { Badge, Input, IconCrossLargeX } from "@probo/ui";
import { type Control, Controller, type FieldPath, type FieldValues } from "react-hook-form"; import { type Control, Controller, type FieldPath, type FieldValues } from "react-hook-form";
import { getCountryName, getCountryOptions, countries, type CountryCode } from "@probo/helpers"; import { getCountryName, getCountryOptions, countries, type CountryCode } from "@probo/helpers";
import clsx from "clsx"; import { clsx } from "clsx";
type Props<T extends FieldValues = FieldValues> = { type Props<T extends FieldValues = FieldValues> = {
control: Control<T>; control: Control<T>;

View File

@@ -1,8 +1,7 @@
import { Button, IconPlusLarge, IconTrashCan, Input, Label } from "@probo/ui"; import { Button, IconPlusLarge, IconTrashCan, Input, Label } from "@probo/ui";
import { useTranslate } from "@probo/i18n"; import { useTranslate } from "@probo/i18n";
import { useFieldArray } from "react-hook-form"; import { useFieldArray } from "react-hook-form";
import type { ArrayPath, Control, FieldValue, FieldValues, Path } from "react-hook-form"; import type { ArrayPath, Control, FieldValue, FieldValues, Path, UseFormRegister } from "react-hook-form";
import type { UseFormRegister } from "react-hook-form";
type Props<TFieldValues extends FieldValues = FieldValues> = { type Props<TFieldValues extends FieldValues = FieldValues> = {
control: Control<TFieldValues>; control: Control<TFieldValues>;

View File

@@ -2,6 +2,7 @@ import { Field, Combobox, ComboboxItem } from "@probo/ui";
import { Suspense, useMemo, useState, type ComponentProps } from "react"; import { Suspense, useMemo, useState, type ComponentProps } from "react";
import { useTranslate } from "@probo/i18n"; import { useTranslate } from "@probo/i18n";
import { type Control, Controller, type FieldPath, type FieldValues } from "react-hook-form"; import { type Control, Controller, type FieldPath, type FieldValues } from "react-hook-form";
import { usePaginatedMeasures } from "/hooks/graph/usePaginatedMeasures"; import { usePaginatedMeasures } from "/hooks/graph/usePaginatedMeasures";
type Props< type Props<

View File

@@ -1,9 +1,9 @@
import { Avatar, Field, Option, Select, Badge, Button, IconCrossLargeX } from "@probo/ui"; import { Avatar, Field, Option, Select, Badge, Button, IconCrossLargeX } from "@probo/ui";
import { Suspense, useState, type ComponentProps } from "react"; import { Suspense, useState, type ComponentProps } from "react";
import { useTranslate } from "@probo/i18n"; 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 { usePeople } from "/hooks/graph/PeopleGraph.ts";
import type { Path } from "react-hook-form";
type Person = { type Person = {
id: string; id: string;

View File

@@ -2,6 +2,7 @@ import { Avatar, Field, Option, Select } from "@probo/ui";
import { Suspense, type ComponentProps } from "react"; import { Suspense, type ComponentProps } from "react";
import { useTranslate } from "@probo/i18n"; import { useTranslate } from "@probo/i18n";
import { type Control, Controller, type FieldPath, type FieldValues } from "react-hook-form"; import { type Control, Controller, type FieldPath, type FieldValues } from "react-hook-form";
import { usePeople } from "/hooks/graph/PeopleGraph.ts"; import { usePeople } from "/hooks/graph/PeopleGraph.ts";
type Props< type Props<

View File

@@ -1,5 +1,6 @@
import { useTranslate } from "@probo/i18n"; import { useTranslate } from "@probo/i18n";
import { Option } from "@probo/ui"; import { Option } from "@probo/ui";
import type { import type {
ProcessingActivitySpecialOrCriminalDatum, ProcessingActivitySpecialOrCriminalDatum,
ProcessingActivityLawfulBasis, ProcessingActivityLawfulBasis,

View File

@@ -1,10 +1,10 @@
import { Avatar, Field, Option, Select, Badge, Button, IconCrossLargeX } from "@probo/ui"; import { Avatar, Field, Option, Select, Badge, Button, IconCrossLargeX } from "@probo/ui";
import { Suspense, useState, type ComponentProps } from "react"; import { Suspense, useState, type ComponentProps } from "react";
import { useTranslate } from "@probo/i18n"; 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 { useVendors } from "/hooks/graph/VendorGraph.ts";
import { faviconUrl } from "@probo/helpers"; import { faviconUrl } from "@probo/helpers";
import type { Path } from "react-hook-form";
import { useVendors } from "/hooks/graph/VendorGraph.ts";
type Vendor = { type Vendor = {
id: string; id: string;

View File

@@ -15,13 +15,15 @@ import {
} from "@probo/ui"; } from "@probo/ui";
import { MeasureBadge } from "@probo/ui/src/Molecules/Badge/MeasureBadge"; import { MeasureBadge } from "@probo/ui/src/Molecules/Badge/MeasureBadge";
import { useTranslate } from "@probo/i18n"; import { useTranslate } from "@probo/i18n";
import type { LinkedMeasuresCardFragment$key } from "/__generated__/core/LinkedMeasuresCardFragment.graphql";
import { useFragment } from "react-relay"; import { useFragment } from "react-relay";
import { useMemo, useState } from "react"; import { useMemo, useState } from "react";
import { sprintf } from "@probo/helpers"; import { sprintf } from "@probo/helpers";
import { clsx } from "clsx";
import { useOrganizationId } from "/hooks/useOrganizationId"; import { useOrganizationId } from "/hooks/useOrganizationId";
import type { LinkedMeasuresCardFragment$key } from "/__generated__/core/LinkedMeasuresCardFragment.graphql";
import { LinkedMeasureDialog } from "./LinkedMeasuresDialog.tsx"; import { LinkedMeasureDialog } from "./LinkedMeasuresDialog.tsx";
import clsx from "clsx";
const linkedMeasureFragment = graphql` const linkedMeasureFragment = graphql`
fragment LinkedMeasuresCardFragment on Measure { fragment LinkedMeasuresCardFragment on Measure {

View File

@@ -15,6 +15,7 @@ import {
} from "@probo/ui"; } from "@probo/ui";
import { useTranslate } from "@probo/i18n"; import { useTranslate } from "@probo/i18n";
import { Suspense, useMemo, useState, type ReactNode } from "react"; import { Suspense, useMemo, useState, type ReactNode } from "react";
import { useOrganizationId } from "/hooks/useOrganizationId"; import { useOrganizationId } from "/hooks/useOrganizationId";
import { usePaginatedMeasures } from "/hooks/graph/usePaginatedMeasures"; import { usePaginatedMeasures } from "/hooks/graph/usePaginatedMeasures";

View File

@@ -15,7 +15,6 @@ import {
Badge, Badge,
} from "@probo/ui"; } from "@probo/ui";
import { useTranslate } from "@probo/i18n"; import { useTranslate } from "@probo/i18n";
import type { LinkedObligationsCardFragment$key } from "/__generated__/core/LinkedObligationsCardFragment.graphql";
import { useFragment } from "react-relay"; import { useFragment } from "react-relay";
import { useMemo, useState } from "react"; import { useMemo, useState } from "react";
import { import {
@@ -23,11 +22,14 @@ import {
getObligationStatusVariant, getObligationStatusVariant,
getObligationStatusLabel, getObligationStatusLabel,
} from "@probo/helpers"; } from "@probo/helpers";
import { LinkedObligationDialog } from "./LinkedObligationsDialog"; import { clsx } from "clsx";
import clsx from "clsx";
import { useParams } from "react-router"; import { useParams } from "react-router";
import type { LinkedObligationsCardFragment$key } from "/__generated__/core/LinkedObligationsCardFragment.graphql";
import { useOrganizationId } from "/hooks/useOrganizationId"; import { useOrganizationId } from "/hooks/useOrganizationId";
import { LinkedObligationDialog } from "./LinkedObligationsDialog";
const linkedObligationFragment = graphql` const linkedObligationFragment = graphql`
fragment LinkedObligationsCardFragment on Obligation { fragment LinkedObligationsCardFragment on Obligation {
id id

View File

@@ -19,6 +19,7 @@ import {
import { Suspense, useMemo, useState, type ReactNode } from "react"; import { Suspense, useMemo, useState, type ReactNode } from "react";
import { graphql } from "relay-runtime"; import { graphql } from "relay-runtime";
import { useLazyLoadQuery, usePaginationFragment } from "react-relay"; import { useLazyLoadQuery, usePaginationFragment } from "react-relay";
import type { LinkedObligationsDialogQuery } from "/__generated__/core/LinkedObligationsDialogQuery.graphql"; import type { LinkedObligationsDialogQuery } from "/__generated__/core/LinkedObligationsDialogQuery.graphql";
import { useOrganizationId } from "/hooks/useOrganizationId"; import { useOrganizationId } from "/hooks/useOrganizationId";
import type { NodeOf } from "/types"; import type { NodeOf } from "/types";

View File

@@ -1,6 +1,7 @@
import { Badge, Button, Card } from "@probo/ui"; import { Badge, Button, Card } from "@probo/ui";
import { useTranslate } from "@probo/i18n"; import { useTranslate } from "@probo/i18n";
import { sprintf } from "@probo/helpers"; import { sprintf } from "@probo/helpers";
import type { TrustCenterGraphQuery$data } from "/__generated__/core/TrustCenterGraphQuery.graphql"; import type { TrustCenterGraphQuery$data } from "/__generated__/core/TrustCenterGraphQuery.graphql";
type Props = { type Props = {

View File

@@ -12,9 +12,11 @@ import {
TrButton, TrButton,
} from "@probo/ui"; } from "@probo/ui";
import { useTranslate } from "@probo/i18n"; import { useTranslate } from "@probo/i18n";
import type { LinkedRisksCardFragment$key } from "/__generated__/core/LinkedRisksCardFragment.graphql";
import { useFragment } from "react-relay"; import { useFragment } from "react-relay";
import type { LinkedRisksCardFragment$key } from "/__generated__/core/LinkedRisksCardFragment.graphql";
import { useOrganizationId } from "/hooks/useOrganizationId"; import { useOrganizationId } from "/hooks/useOrganizationId";
import { LinkedRisksDialog } from "./LinkedRisksDialog.tsx"; import { LinkedRisksDialog } from "./LinkedRisksDialog.tsx";
const linkedRiskFragment = graphql` const linkedRiskFragment = graphql`

View File

@@ -16,6 +16,7 @@ import { useTranslate } from "@probo/i18n";
import { Suspense, useMemo, useState, type ReactNode } from "react"; import { Suspense, useMemo, useState, type ReactNode } from "react";
import { graphql } from "relay-runtime"; import { graphql } from "relay-runtime";
import { useLazyLoadQuery } from "react-relay"; import { useLazyLoadQuery } from "react-relay";
import type { LinkedRisksDialogQuery } from "/__generated__/core/LinkedRisksDialogQuery.graphql"; import type { LinkedRisksDialogQuery } from "/__generated__/core/LinkedRisksDialogQuery.graphql";
import { useOrganizationId } from "/hooks/useOrganizationId"; import { useOrganizationId } from "/hooks/useOrganizationId";

View File

@@ -1,5 +1,4 @@
import { ActionDropdown, Skeleton } from "@probo/ui"; import { ActionDropdown, Skeleton, Button, IconPencil } from "@probo/ui";
import { Button, IconPencil } from "@probo/ui";
import { useTranslate } from "@probo/i18n"; import { useTranslate } from "@probo/i18n";
/** /**

View File

@@ -15,7 +15,6 @@ import {
TrButton, TrButton,
} from "@probo/ui"; } from "@probo/ui";
import { useTranslate } from "@probo/i18n"; import { useTranslate } from "@probo/i18n";
import type { LinkedSnapshotsCardFragment$key } from "/__generated__/core/LinkedSnapshotsCardFragment.graphql";
import { useFragment } from "react-relay"; import { useFragment } from "react-relay";
import { useMemo, useState } from "react"; import { useMemo, useState } from "react";
import { import {
@@ -24,9 +23,12 @@ import {
getSnapshotTypeUrlPath, getSnapshotTypeUrlPath,
formatDate, formatDate,
} from "@probo/helpers"; } from "@probo/helpers";
import { clsx } from "clsx";
import { useOrganizationId } from "/hooks/useOrganizationId"; import { useOrganizationId } from "/hooks/useOrganizationId";
import type { LinkedSnapshotsCardFragment$key } from "/__generated__/core/LinkedSnapshotsCardFragment.graphql";
import { LinkedSnapshotsDialog } from "./LinkedSnapshotsDialog"; import { LinkedSnapshotsDialog } from "./LinkedSnapshotsDialog";
import clsx from "clsx";
const linkedSnapshotFragment = graphql` const linkedSnapshotFragment = graphql`
fragment LinkedSnapshotsCardFragment on Snapshot { fragment LinkedSnapshotsCardFragment on Snapshot {

View File

@@ -16,6 +16,7 @@ import { getSnapshotTypeLabel, formatDate } from "@probo/helpers";
import { Suspense, useMemo, useState, type ReactNode } from "react"; import { Suspense, useMemo, useState, type ReactNode } from "react";
import { graphql } from "relay-runtime"; import { graphql } from "relay-runtime";
import { useLazyLoadQuery, usePaginationFragment } from "react-relay"; import { useLazyLoadQuery, usePaginationFragment } from "react-relay";
import type { LinkedSnapshotsDialogQuery } from "/__generated__/core/LinkedSnapshotsDialogQuery.graphql"; import type { LinkedSnapshotsDialogQuery } from "/__generated__/core/LinkedSnapshotsDialogQuery.graphql";
import { useOrganizationId } from "/hooks/useOrganizationId"; import { useOrganizationId } from "/hooks/useOrganizationId";
import type { NodeOf } from "/types"; import type { NodeOf } from "/types";

View File

@@ -15,13 +15,15 @@ import {
Badge, Badge,
} from "@probo/ui"; } from "@probo/ui";
import { useTranslate } from "@probo/i18n"; import { useTranslate } from "@probo/i18n";
import type { LinkedStatesOfApplicabilityCardFragment$key } from "/__generated__/core/LinkedStatesOfApplicabilityCardFragment.graphql";
import { useFragment } from "react-relay"; import { useFragment } from "react-relay";
import { useMemo, useState, useEffect } from "react"; import { useMemo, useState, useEffect } from "react";
import { sprintf } from "@probo/helpers"; import { sprintf } from "@probo/helpers";
import { clsx } from "clsx";
import { useOrganizationId } from "/hooks/useOrganizationId"; import { useOrganizationId } from "/hooks/useOrganizationId";
import type { LinkedStatesOfApplicabilityCardFragment$key } from "/__generated__/core/LinkedStatesOfApplicabilityCardFragment.graphql";
import { LinkedStatesOfApplicabilityDialog } from "./LinkedStatesOfApplicabilityDialog"; import { LinkedStatesOfApplicabilityDialog } from "./LinkedStatesOfApplicabilityDialog";
import clsx from "clsx";
const linkedStateOfApplicabilityFragment = graphql` const linkedStateOfApplicabilityFragment = graphql`
fragment LinkedStatesOfApplicabilityCardFragment on StateOfApplicabilityControl { fragment LinkedStatesOfApplicabilityCardFragment on StateOfApplicabilityControl {

View File

@@ -12,6 +12,7 @@ import { Suspense, useState, useRef } from "react";
import type { ReactNode } from "react"; import type { ReactNode } from "react";
import { useLazyLoadQuery } from "react-relay"; import { useLazyLoadQuery } from "react-relay";
import { graphql } from "relay-runtime"; import { graphql } from "relay-runtime";
import { useOrganizationId } from "/hooks/useOrganizationId"; import { useOrganizationId } from "/hooks/useOrganizationId";
import type { LinkedStatesOfApplicabilityDialogQuery } from "/__generated__/core/LinkedStatesOfApplicabilityDialogQuery.graphql"; import type { LinkedStatesOfApplicabilityDialogQuery } from "/__generated__/core/LinkedStatesOfApplicabilityDialogQuery.graphql";

View File

@@ -1,7 +1,3 @@
import {
SortableCellHead,
SortableDataTable,
} from "/components/table/SortableDataTable.tsx";
import type { GraphQLTaggedNode, OperationType } from "relay-runtime"; import type { GraphQLTaggedNode, OperationType } from "relay-runtime";
import type { KeyType, KeyTypeData } from "react-relay/relay-hooks/helpers"; import type { KeyType, KeyTypeData } from "react-relay/relay-hooks/helpers";
import type { usePaginationFragmentHookType } from "react-relay/relay-hooks/usePaginationFragment"; import type { usePaginationFragmentHookType } from "react-relay/relay-hooks/usePaginationFragment";
@@ -16,13 +12,17 @@ import {
Spinner, Spinner,
} from "@probo/ui"; } from "@probo/ui";
import { z } from "zod"; import { z } from "zod";
import { useMutateField } from "/hooks/useMutateField.tsx";
import { type ReactNode } from "react"; import { type ReactNode } from "react";
import { useToggle } from "@probo/hooks"; import { useToggle } from "@probo/hooks";
import { clsx } from "clsx";
import { useStateWithSchema } from "/hooks/useStateWithSchema.ts"; 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 { useMutationWithToasts } from "/hooks/useMutationWithToasts.ts";
import { defaultPageSize } from "/components/table/SortableDataTable.tsx";
type ColumnDefinition = { label: string; field: string } | string; type ColumnDefinition = { label: string; field: string } | string;

View File

@@ -1,7 +1,8 @@
import { Avatar } from "@probo/ui";
import { GraphQLCell } from "/components/table/GraphQLCell.tsx"; import { GraphQLCell } from "/components/table/GraphQLCell.tsx";
import type { PeopleGraphQuery } from "/__generated__/core/PeopleGraphQuery.graphql.ts"; import type { PeopleGraphQuery } from "/__generated__/core/PeopleGraphQuery.graphql.ts";
import { peopleQuery } from "/hooks/graph/PeopleGraph.ts"; import { peopleQuery } from "/hooks/graph/PeopleGraph.ts";
import { Avatar } from "@probo/ui";
type Props = { type Props = {
name: string; name: string;

View File

@@ -7,7 +7,7 @@ import {
IconChevronTriangleDownSmall, IconChevronTriangleDownSmall,
Spinner, Spinner,
} from "@probo/ui"; } from "@probo/ui";
import clsx from "clsx"; import { clsx } from "clsx";
import { import {
type ComponentProps, type ComponentProps,
createContext, createContext,

View File

@@ -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 { Avatar, Badge, IconCrossLargeX } from "@probo/ui";
import { faviconUrl } from "@probo/helpers"; 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 = { type Vendor = {
id: string; id: string;
name: string; name: string;
websiteUrl: string | null | undefined; websiteUrl: string | null | undefined;
}; };
import type { VendorGraphSelectQuery } from "/__generated__/core/VendorGraphSelectQuery.graphql.ts";
type Props = { type Props = {
name: string; name: string;

View File

@@ -17,15 +17,16 @@ import { Breadcrumb } from "@probo/ui";
import { graphql } from "relay-runtime"; import { graphql } from "relay-runtime";
import { useFragment, useRelayEnvironment } from "react-relay"; import { useFragment, useRelayEnvironment } from "react-relay";
import { z } from "zod"; import { z } from "zod";
import { Controller } from "react-hook-form";
import { formatDatetime } from "@probo/helpers";
import { useFormWithSchema } from "/hooks/useFormWithSchema"; import { useFormWithSchema } from "/hooks/useFormWithSchema";
import { useMutationWithToasts } from "/hooks/useMutationWithToasts"; import { useMutationWithToasts } from "/hooks/useMutationWithToasts";
import { useOrganizationId } from "/hooks/useOrganizationId"; import { useOrganizationId } from "/hooks/useOrganizationId";
import { PeopleSelectField } from "/components/form/PeopleSelectField"; import { PeopleSelectField } from "/components/form/PeopleSelectField";
import type { TaskFormDialogFragment$key } from "/__generated__/core/TaskFormDialogFragment.graphql"; import type { TaskFormDialogFragment$key } from "/__generated__/core/TaskFormDialogFragment.graphql";
import { MeasureSelectField } from "/components/form/MeasureSelectField"; import { MeasureSelectField } from "/components/form/MeasureSelectField";
import { Controller } from "react-hook-form";
import { updateStoreCounter } from "/hooks/useMutationWithIncrement"; import { updateStoreCounter } from "/hooks/useMutationWithIncrement";
import { formatDatetime } from "@probo/helpers";
const taskFragment = graphql` const taskFragment = graphql`
fragment TaskFormDialogFragment on Task { fragment TaskFormDialogFragment on Task {

View File

@@ -25,6 +25,7 @@ import {
useRelayEnvironment, useRelayEnvironment,
} from "react-relay"; } from "react-relay";
import { Link, useLocation, useParams } from "react-router"; import { Link, useLocation, useParams } from "react-router";
import TaskFormDialog, { import TaskFormDialog, {
taskUpdateMutation, taskUpdateMutation,
} from "/components/tasks/TaskFormDialog"; } from "/components/tasks/TaskFormDialog";

View File

@@ -9,6 +9,7 @@ import {
} from "@probo/ui"; } from "@probo/ui";
import { useTranslate } from "@probo/i18n"; import { useTranslate } from "@probo/i18n";
import { sprintf } from "@probo/helpers"; import { sprintf } from "@probo/helpers";
import { useMutationWithToasts } from "/hooks/useMutationWithToasts"; import { useMutationWithToasts } from "/hooks/useMutationWithToasts";
import { deleteTrustCenterReferenceMutation } from "/hooks/graph/TrustCenterReferenceGraph"; import { deleteTrustCenterReferenceMutation } from "/hooks/graph/TrustCenterReferenceGraph";

View File

@@ -22,6 +22,7 @@ import {
formatDate, formatDate,
getTrustCenterVisibilityOptions, getTrustCenterVisibilityOptions,
} from "@probo/helpers"; } from "@probo/helpers";
import { useOrganizationId } from "/hooks/useOrganizationId"; import { useOrganizationId } from "/hooks/useOrganizationId";
import type { TrustCenterAuditsCardFragment$key } from "/__generated__/core/TrustCenterAuditsCardFragment.graphql"; import type { TrustCenterAuditsCardFragment$key } from "/__generated__/core/TrustCenterAuditsCardFragment.graphql";

View File

@@ -15,10 +15,11 @@ import {
Badge, Badge,
} from "@probo/ui"; } from "@probo/ui";
import { useTranslate } from "@probo/i18n"; import { useTranslate } from "@probo/i18n";
import type { TrustCenterDocumentsCardFragment$key } from "/__generated__/core/TrustCenterDocumentsCardFragment.graphql";
import { useFragment } from "react-relay"; import { useFragment } from "react-relay";
import { useMemo, useState, useCallback } from "react"; import { useMemo, useState, useCallback } from "react";
import { sprintf, getTrustCenterVisibilityOptions } from "@probo/helpers"; import { sprintf, getTrustCenterVisibilityOptions } from "@probo/helpers";
import type { TrustCenterDocumentsCardFragment$key } from "/__generated__/core/TrustCenterDocumentsCardFragment.graphql";
import { useOrganizationId } from "/hooks/useOrganizationId"; import { useOrganizationId } from "/hooks/useOrganizationId";
const trustCenterDocumentFragment = graphql` const trustCenterDocumentFragment = graphql`

View File

@@ -16,14 +16,14 @@ import {
IconArrowLink, IconArrowLink,
} from "@probo/ui"; } from "@probo/ui";
import { useTranslate } from "@probo/i18n"; 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 { import type {
TrustCenterFilesCardFragment$key, TrustCenterFilesCardFragment$key,
TrustCenterFilesCardFragment$data, TrustCenterFilesCardFragment$data,
} from "/__generated__/core/TrustCenterFilesCardFragment.graphql"; } 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` const trustCenterFileFragment = graphql`
fragment TrustCenterFilesCardFragment on TrustCenterFile { fragment TrustCenterFilesCardFragment on TrustCenterFile {

View File

@@ -12,6 +12,7 @@ import {
} from "@probo/ui"; } from "@probo/ui";
import { type ReactNode, useState, useImperativeHandle, forwardRef } from "react"; import { type ReactNode, useState, useImperativeHandle, forwardRef } from "react";
import { z } from "zod"; import { z } from "zod";
import { useFormWithSchema } from "/hooks/useFormWithSchema"; import { useFormWithSchema } from "/hooks/useFormWithSchema";
import { import {
useCreateTrustCenterReferenceMutation, useCreateTrustCenterReferenceMutation,

View File

@@ -15,20 +15,22 @@ import {
IconArrowLink, IconArrowLink,
} from "@probo/ui"; } from "@probo/ui";
import { useRef, useState } from "react"; import { useRef, useState } from "react";
import { useLazyLoadQuery } from "react-relay";
import { import {
trustCenterReferencesQuery, trustCenterReferencesQuery,
useUpdateTrustCenterReferenceRankMutation, useUpdateTrustCenterReferenceRankMutation,
} from "/hooks/graph/TrustCenterReferenceGraph"; } from "/hooks/graph/TrustCenterReferenceGraph";
import type {
TrustCenterReferenceGraphQuery,
TrustCenterReferenceGraphQuery$data,
} from "/__generated__/core/TrustCenterReferenceGraphQuery.graphql";
import { import {
TrustCenterReferenceDialog, TrustCenterReferenceDialog,
type TrustCenterReferenceDialogRef, type TrustCenterReferenceDialogRef,
} from "./TrustCenterReferenceDialog"; } from "./TrustCenterReferenceDialog";
import { DeleteTrustCenterReferenceDialog } from "./DeleteTrustCenterReferenceDialog"; import { DeleteTrustCenterReferenceDialog } from "./DeleteTrustCenterReferenceDialog";
import type {
TrustCenterReferenceGraphQuery,
TrustCenterReferenceGraphQuery$data,
} from "/__generated__/core/TrustCenterReferenceGraphQuery.graphql";
import { useLazyLoadQuery } from "react-relay";
type Props = { type Props = {
trustCenterId: string; trustCenterId: string;

View File

@@ -16,6 +16,7 @@ import { useTranslate } from "@probo/i18n";
import { useFragment } from "react-relay"; import { useFragment } from "react-relay";
import { useMemo, useState } from "react"; import { useMemo, useState } from "react";
import { sprintf } from "@probo/helpers"; import { sprintf } from "@probo/helpers";
import { useOrganizationId } from "/hooks/useOrganizationId"; import { useOrganizationId } from "/hooks/useOrganizationId";
import type { TrustCenterVendorsCardFragment$key } from "/__generated__/core/TrustCenterVendorsCardFragment.graphql"; import type { TrustCenterVendorsCardFragment$key } from "/__generated__/core/TrustCenterVendorsCardFragment.graphql";

View File

@@ -1,4 +1,5 @@
import { z } from "zod"; import { z } from "zod";
import { useFormWithSchema } from "../useFormWithSchema"; import { useFormWithSchema } from "../useFormWithSchema";
export const documentSchema = z.object({ export const documentSchema = z.object({

View File

@@ -1,11 +1,13 @@
import { z } from "zod"; import { z } from "zod";
import { useFormWithSchema } from "../useFormWithSchema";
import { graphql } from "relay-runtime"; import { graphql } from "relay-runtime";
import { useFragment } from "react-relay";
import type { import type {
useRiskFormFragment$data, useRiskFormFragment$data,
useRiskFormFragment$key, useRiskFormFragment$key,
} from "/__generated__/core/useRiskFormFragment.graphql"; } from "/__generated__/core/useRiskFormFragment.graphql";
import { useFragment } from "react-relay";
import { useFormWithSchema } from "../useFormWithSchema";
const RiskFragment = graphql` const RiskFragment = graphql`
fragment useRiskFormFragment on Risk { fragment useRiskFormFragment on Risk {

View File

@@ -1,12 +1,14 @@
import { z } from "zod"; import { z } from "zod";
import { useFormWithSchema } from "../useFormWithSchema";
import { graphql } from "relay-runtime"; import { graphql } from "relay-runtime";
import { useFragment } from "react-relay"; import { useFragment } from "react-relay";
import type { useVendorFormFragment$key } from "/__generated__/core/useVendorFormFragment.graphql";
import { useMutationWithToasts } from "../useMutationWithToasts";
import { useTranslate } from "@probo/i18n"; import { useTranslate } from "@probo/i18n";
import { useEffect, useMemo } from "react"; 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({ const schema = z.object({
name: z.string().min(1, "Name is required"), name: z.string().min(1, "Name is required"),
description: z.string().optional().nullable(), description: z.string().optional().nullable(),

View File

@@ -3,6 +3,7 @@ import { useMutation } from "react-relay";
import { useConfirm } from "@probo/ui"; import { useConfirm } from "@probo/ui";
import { useTranslate } from "@probo/i18n"; import { useTranslate } from "@probo/i18n";
import { promisifyMutation, sprintf } from "@probo/helpers"; import { promisifyMutation, sprintf } from "@probo/helpers";
import { useMutationWithToasts } from "../useMutationWithToasts"; import { useMutationWithToasts } from "../useMutationWithToasts";
export const assetsQuery = graphql` export const assetsQuery = graphql`

View File

@@ -3,6 +3,7 @@ import { useMutation } from "react-relay";
import { useConfirm } from "@probo/ui"; import { useConfirm } from "@probo/ui";
import { useTranslate } from "@probo/i18n"; import { useTranslate } from "@probo/i18n";
import { promisifyMutation, sprintf } from "@probo/helpers"; import { promisifyMutation, sprintf } from "@probo/helpers";
import { useMutationWithToasts } from "../useMutationWithToasts"; import { useMutationWithToasts } from "../useMutationWithToasts";
export const auditsQuery = graphql` export const auditsQuery = graphql`

View File

@@ -3,6 +3,7 @@ import { useMutation } from "react-relay";
import { useConfirm } from "@probo/ui"; import { useConfirm } from "@probo/ui";
import { useTranslate } from "@probo/i18n"; import { useTranslate } from "@probo/i18n";
import { promisifyMutation, sprintf } from "@probo/helpers"; import { promisifyMutation, sprintf } from "@probo/helpers";
import { useMutationWithToasts } from "../useMutationWithToasts"; import { useMutationWithToasts } from "../useMutationWithToasts";
export const ContinualImprovementsConnectionKey export const ContinualImprovementsConnectionKey

View File

@@ -1,11 +1,13 @@
import { useTranslate } from "@probo/i18n"; import { useTranslate } from "@probo/i18n";
import { graphql } from "relay-runtime"; import { graphql } from "relay-runtime";
import { useMutationWithToasts } from "../useMutationWithToasts";
import type { DocumentGraphDeleteMutation } from "/__generated__/core/DocumentGraphDeleteMutation.graphql"; import type { DocumentGraphDeleteMutation } from "/__generated__/core/DocumentGraphDeleteMutation.graphql";
import type { DocumentGraphSendSigningNotificationsMutation } from "/__generated__/core/DocumentGraphSendSigningNotificationsMutation.graphql"; import type { DocumentGraphSendSigningNotificationsMutation } from "/__generated__/core/DocumentGraphSendSigningNotificationsMutation.graphql";
import type { DocumentGraphDeleteDraftMutation } from "/__generated__/core/DocumentGraphDeleteDraftMutation.graphql"; import type { DocumentGraphDeleteDraftMutation } from "/__generated__/core/DocumentGraphDeleteDraftMutation.graphql";
import type { DocumentGraphBulkExportDocumentsMutation } from "/__generated__/core/DocumentGraphBulkExportDocumentsMutation.graphql"; import type { DocumentGraphBulkExportDocumentsMutation } from "/__generated__/core/DocumentGraphBulkExportDocumentsMutation.graphql";
import { useMutationWithToasts } from "../useMutationWithToasts";
export const documentsQuery = graphql` export const documentsQuery = graphql`
query DocumentGraphListQuery($organizationId: ID!) { query DocumentGraphListQuery($organizationId: ID!) {
organization: node(id: $organizationId) { organization: node(id: $organizationId) {

View File

@@ -1,10 +1,11 @@
import { graphql } from "relay-runtime"; import { graphql } from "relay-runtime";
import { useMutationWithToasts } from "../useMutationWithToasts";
import { useCallback } from "react"; import { useCallback } from "react";
import { sprintf } from "@probo/helpers"; import { sprintf } from "@probo/helpers";
import { useTranslate } from "@probo/i18n"; import { useTranslate } from "@probo/i18n";
import { useConfirm } from "@probo/ui"; import { useConfirm } from "@probo/ui";
import { useMutationWithToasts } from "../useMutationWithToasts";
export const connectionListKey = "FrameworksListQuery_frameworks"; export const connectionListKey = "FrameworksListQuery_frameworks";
export const frameworksQuery = graphql` export const frameworksQuery = graphql`

View File

@@ -1,8 +1,10 @@
import { useTranslate } from "@probo/i18n"; import { useTranslate } from "@probo/i18n";
import { graphql } from "relay-runtime"; import { graphql } from "relay-runtime";
import { useMutationWithToasts } from "../useMutationWithToasts";
import type { MeasureGraphDeleteMutation } from "/__generated__/core/MeasureGraphDeleteMutation.graphql"; import type { MeasureGraphDeleteMutation } from "/__generated__/core/MeasureGraphDeleteMutation.graphql";
import { useMutationWithToasts } from "../useMutationWithToasts";
export const measuresQuery = graphql` export const measuresQuery = graphql`
query MeasureGraphListQuery($organizationId: ID!) { query MeasureGraphListQuery($organizationId: ID!) {
organization: node(id: $organizationId) @required(action: THROW) { organization: node(id: $organizationId) @required(action: THROW) {

View File

@@ -1,9 +1,11 @@
import { useTranslate } from "@probo/i18n"; import { useTranslate } from "@probo/i18n";
import { graphql } from "relay-runtime"; import { graphql } from "relay-runtime";
import { useMutationWithToasts } from "../useMutationWithToasts";
import type { MeetingGraphDeleteMutation } from "/__generated__/core/MeetingGraphDeleteMutation.graphql"; import type { MeetingGraphDeleteMutation } from "/__generated__/core/MeetingGraphDeleteMutation.graphql";
import type { MeetingGraphUpdateMutation } from "/__generated__/core/MeetingGraphUpdateMutation.graphql"; import type { MeetingGraphUpdateMutation } from "/__generated__/core/MeetingGraphUpdateMutation.graphql";
import { useMutationWithToasts } from "../useMutationWithToasts";
export const meetingsQuery = graphql` export const meetingsQuery = graphql`
query MeetingGraphListQuery($organizationId: ID!) { query MeetingGraphListQuery($organizationId: ID!) {
organization: node(id: $organizationId) { organization: node(id: $organizationId) {

View File

@@ -3,6 +3,7 @@ import { useMutation } from "react-relay";
import { useConfirm } from "@probo/ui"; import { useConfirm } from "@probo/ui";
import { useTranslate } from "@probo/i18n"; import { useTranslate } from "@probo/i18n";
import { promisifyMutation, sprintf } from "@probo/helpers"; import { promisifyMutation, sprintf } from "@probo/helpers";
import { useMutationWithToasts } from "../useMutationWithToasts"; import { useMutationWithToasts } from "../useMutationWithToasts";
export const NonconformitiesConnectionKey export const NonconformitiesConnectionKey

View File

@@ -3,6 +3,7 @@ import { useMutation } from "react-relay";
import { useConfirm } from "@probo/ui"; import { useConfirm } from "@probo/ui";
import { useTranslate } from "@probo/i18n"; import { useTranslate } from "@probo/i18n";
import { promisifyMutation } from "@probo/helpers"; import { promisifyMutation } from "@probo/helpers";
import { useMutationWithToasts } from "../useMutationWithToasts"; import { useMutationWithToasts } from "../useMutationWithToasts";
export const ObligationsConnectionKey = "ObligationsPage_obligations"; export const ObligationsConnectionKey = "ObligationsPage_obligations";

View File

@@ -1,5 +1,4 @@
import { graphql } from "relay-runtime"; import { graphql } from "relay-runtime";
import type { PeopleGraphQuery } from "/__generated__/core/PeopleGraphQuery.graphql";
import { import {
useLazyLoadQuery, useLazyLoadQuery,
useMutation, useMutation,
@@ -8,10 +7,7 @@ import {
type PreloadedQuery, type PreloadedQuery,
} from "react-relay"; } from "react-relay";
import { useMemo } from "react"; 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 { useConfirm, useToast } from "@probo/ui";
import type { PeopleGraphDeleteMutation } from "/__generated__/core/PeopleGraphDeleteMutation.graphql";
import { import {
promisifyMutation, promisifyMutation,
sprintf, sprintf,
@@ -20,6 +16,11 @@ import {
} from "@probo/helpers"; } from "@probo/helpers";
import { useTranslate } from "@probo/i18n"; 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` export const peopleQuery = graphql`
query PeopleGraphQuery($organizationId: ID!, $filter: PeopleFilter) { query PeopleGraphQuery($organizationId: ID!, $filter: PeopleFilter) {
organization: node(id: $organizationId) { organization: node(id: $organizationId) {

View File

@@ -3,6 +3,7 @@ import { useMutation } from "react-relay";
import { useConfirm } from "@probo/ui"; import { useConfirm } from "@probo/ui";
import { useTranslate } from "@probo/i18n"; import { useTranslate } from "@probo/i18n";
import { promisifyMutation, sprintf } from "@probo/helpers"; import { promisifyMutation, sprintf } from "@probo/helpers";
import { useMutationWithToasts } from "../useMutationWithToasts"; import { useMutationWithToasts } from "../useMutationWithToasts";
export const ProcessingActivitiesConnectionKey export const ProcessingActivitiesConnectionKey

View File

@@ -3,6 +3,7 @@ import { useMutation } from "react-relay";
import { useConfirm } from "@probo/ui"; import { useConfirm } from "@probo/ui";
import { useTranslate } from "@probo/i18n"; import { useTranslate } from "@probo/i18n";
import { promisifyMutation, sprintf } from "@probo/helpers"; import { promisifyMutation, sprintf } from "@probo/helpers";
import { useMutationWithToasts } from "../useMutationWithToasts"; import { useMutationWithToasts } from "../useMutationWithToasts";
export const RightsRequestsConnectionKey = "RightsRequestsPage_rightsRequests"; export const RightsRequestsConnectionKey = "RightsRequestsPage_rightsRequests";

View File

@@ -1,15 +1,17 @@
import { graphql } from "relay-runtime"; import { graphql } from "relay-runtime";
import { useTranslate } from "@probo/i18n"; import { useTranslate } from "@probo/i18n";
import { useMutationWithToasts } from "../useMutationWithToasts.ts";
import type { RiskGraphDeleteMutation } from "/__generated__/core/RiskGraphDeleteMutation.graphql.ts";
import { import {
usePreloadedQuery, usePreloadedQuery,
usePaginationFragment, usePaginationFragment,
type PreloadedQuery, type PreloadedQuery,
} from "react-relay"; } from "react-relay";
import type { RiskGraphDeleteMutation } from "/__generated__/core/RiskGraphDeleteMutation.graphql.ts";
import type { RiskGraphListQuery } from "/__generated__/core/RiskGraphListQuery.graphql.ts"; import type { RiskGraphListQuery } from "/__generated__/core/RiskGraphListQuery.graphql.ts";
import type { RiskGraphFragment$key } from "/__generated__/core/RiskGraphFragment.graphql.ts"; import type { RiskGraphFragment$key } from "/__generated__/core/RiskGraphFragment.graphql.ts";
import { useMutationWithToasts } from "../useMutationWithToasts.ts";
const deleteRiskMutation = graphql` const deleteRiskMutation = graphql`
mutation RiskGraphDeleteMutation( mutation RiskGraphDeleteMutation(
$input: DeleteRiskInput! $input: DeleteRiskInput!

View File

@@ -3,6 +3,7 @@ import { useMutation } from "react-relay";
import { useConfirm } from "@probo/ui"; import { useConfirm } from "@probo/ui";
import { useTranslate } from "@probo/i18n"; import { useTranslate } from "@probo/i18n";
import { promisifyMutation, sprintf } from "@probo/helpers"; import { promisifyMutation, sprintf } from "@probo/helpers";
import { useMutationWithToasts } from "../useMutationWithToasts"; import { useMutationWithToasts } from "../useMutationWithToasts";
export const SnapshotsConnectionKey = "SnapshotsPage_snapshots"; export const SnapshotsConnectionKey = "SnapshotsPage_snapshots";

View File

@@ -1,6 +1,4 @@
import { graphql } from "relay-runtime"; import { graphql } from "relay-runtime";
import type { StateOfApplicabilityGraphPaginatedQuery } from "/__generated__/core/StateOfApplicabilityGraphPaginatedQuery.graphql";
import type { StateOfApplicabilityGraphPaginatedFragment$key } from "/__generated__/core/StateOfApplicabilityGraphPaginatedFragment.graphql";
import { import {
useMutation, useMutation,
usePaginationFragment, usePaginationFragment,
@@ -8,7 +6,6 @@ import {
type PreloadedQuery, type PreloadedQuery,
} from "react-relay"; } from "react-relay";
import { useConfirm, useToast } from "@probo/ui"; import { useConfirm, useToast } from "@probo/ui";
import type { StateOfApplicabilityGraphDeleteMutation } from "/__generated__/core/StateOfApplicabilityGraphDeleteMutation.graphql";
import { import {
promisifyMutation, promisifyMutation,
sprintf, sprintf,
@@ -17,6 +14,10 @@ import {
} from "@probo/helpers"; } from "@probo/helpers";
import { useTranslate } from "@probo/i18n"; 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` export const paginatedStateOfApplicabilityQuery = graphql`
query StateOfApplicabilityGraphPaginatedQuery($organizationId: ID!) { query StateOfApplicabilityGraphPaginatedQuery($organizationId: ID!) {
organization: node(id: $organizationId) { organization: node(id: $organizationId) {

View File

@@ -1,5 +1,5 @@
import { graphql } from "react-relay"; import { graphql, useLazyLoadQuery, usePaginationFragment } from "react-relay";
import { useLazyLoadQuery, usePaginationFragment } from "react-relay";
import type { TrustCenterAccessGraphQuery } from "/__generated__/core/TrustCenterAccessGraphQuery.graphql"; import type { TrustCenterAccessGraphQuery } from "/__generated__/core/TrustCenterAccessGraphQuery.graphql";
import type { import type {
TrustCenterAccessGraph_accesses$data, TrustCenterAccessGraph_accesses$data,

View File

@@ -1,6 +1,7 @@
import { graphql } from "relay-runtime"; import { graphql } from "relay-runtime";
import { useMutationWithToasts } from "/hooks/useMutationWithToasts";
import { useTranslate } from "@probo/i18n"; import { useTranslate } from "@probo/i18n";
import { useMutationWithToasts } from "/hooks/useMutationWithToasts";
import type { TrustCenterAuditGraphUpdateMutation } from "/__generated__/core/TrustCenterAuditGraphUpdateMutation.graphql"; import type { TrustCenterAuditGraphUpdateMutation } from "/__generated__/core/TrustCenterAuditGraphUpdateMutation.graphql";
export const trustCenterAuditUpdateMutation = graphql` export const trustCenterAuditUpdateMutation = graphql`

View File

@@ -1,6 +1,7 @@
import { graphql } from "relay-runtime"; import { graphql } from "relay-runtime";
import { useMutationWithToasts } from "/hooks/useMutationWithToasts";
import { useTranslate } from "@probo/i18n"; import { useTranslate } from "@probo/i18n";
import { useMutationWithToasts } from "/hooks/useMutationWithToasts";
import type { TrustCenterDocumentGraphUpdateMutation } from "/__generated__/core/TrustCenterDocumentGraphUpdateMutation.graphql"; import type { TrustCenterDocumentGraphUpdateMutation } from "/__generated__/core/TrustCenterDocumentGraphUpdateMutation.graphql";
export const trustCenterDocumentsQuery = graphql` export const trustCenterDocumentsQuery = graphql`

View File

@@ -1,4 +1,5 @@
import { graphql } from "relay-runtime"; import { graphql } from "relay-runtime";
import { useMutationWithToasts } from "/hooks/useMutationWithToasts"; import { useMutationWithToasts } from "/hooks/useMutationWithToasts";
export const createTrustCenterFileMutation = graphql` export const createTrustCenterFileMutation = graphql`

View File

@@ -1,4 +1,5 @@
import { graphql } from "relay-runtime"; import { graphql } from "relay-runtime";
import { useMutationWithToasts } from "/hooks/useMutationWithToasts"; import { useMutationWithToasts } from "/hooks/useMutationWithToasts";
import type { TrustCenterGraphUpdateMutation } from "/__generated__/core/TrustCenterGraphUpdateMutation.graphql"; import type { TrustCenterGraphUpdateMutation } from "/__generated__/core/TrustCenterGraphUpdateMutation.graphql";

View File

@@ -1,4 +1,5 @@
import { graphql } from "react-relay"; import { graphql } from "react-relay";
import { useMutationWithToasts } from "/hooks/useMutationWithToasts"; import { useMutationWithToasts } from "/hooks/useMutationWithToasts";
import type { TrustCenterReferenceGraphCreateMutation } from "/__generated__/core/TrustCenterReferenceGraphCreateMutation.graphql"; import type { TrustCenterReferenceGraphCreateMutation } from "/__generated__/core/TrustCenterReferenceGraphCreateMutation.graphql";
import type { TrustCenterReferenceGraphUpdateMutation } from "/__generated__/core/TrustCenterReferenceGraphUpdateMutation.graphql"; import type { TrustCenterReferenceGraphUpdateMutation } from "/__generated__/core/TrustCenterReferenceGraphUpdateMutation.graphql";

View File

@@ -1,6 +1,7 @@
import { graphql } from "relay-runtime"; import { graphql } from "relay-runtime";
import { useMutationWithToasts } from "/hooks/useMutationWithToasts";
import { useTranslate } from "@probo/i18n"; import { useTranslate } from "@probo/i18n";
import { useMutationWithToasts } from "/hooks/useMutationWithToasts";
import type { TrustCenterVendorGraphUpdateMutation } from "/__generated__/core/TrustCenterVendorGraphUpdateMutation.graphql"; import type { TrustCenterVendorGraphUpdateMutation } from "/__generated__/core/TrustCenterVendorGraphUpdateMutation.graphql";
export const trustCenterVendorUpdateMutation = graphql` export const trustCenterVendorUpdateMutation = graphql`

View File

@@ -1,14 +1,16 @@
import { useTranslate } from "@probo/i18n"; import { useTranslate } from "@probo/i18n";
import { graphql } from "relay-runtime"; 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 { useMutation, useLazyLoadQuery } from "react-relay";
import { useConfirm } from "@probo/ui"; import { useConfirm } from "@probo/ui";
import { promisifyMutation, sprintf } from "@probo/helpers"; import { promisifyMutation, sprintf } from "@probo/helpers";
import { useMemo } from "react"; 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` const createVendorMutation = graphql`
mutation VendorGraphCreateMutation( mutation VendorGraphCreateMutation(
$input: CreateVendorInput! $input: CreateVendorInput!

View File

@@ -1,4 +1,5 @@
import { graphql, useLazyLoadQuery, usePaginationFragment } from "react-relay"; import { graphql, useLazyLoadQuery, usePaginationFragment } from "react-relay";
import type { usePaginatedMeasuresQuery } from "/__generated__/core/usePaginatedMeasuresQuery.graphql"; import type { usePaginatedMeasuresQuery } from "/__generated__/core/usePaginatedMeasuresQuery.graphql";
import type { usePaginatedMeasuresFragment$key } from "/__generated__/core/usePaginatedMeasuresFragment.graphql"; import type { usePaginatedMeasuresFragment$key } from "/__generated__/core/usePaginatedMeasuresFragment.graphql";

View File

@@ -1,8 +1,10 @@
import { QueryClient, QueryClientProvider } from "@tanstack/react-query";
import { createRoot } from "react-dom/client"; import { createRoot } from "react-dom/client";
import "./index.css"; import "./index.css";
import { App } from "./App"; import { App } from "./App";
import { TranslatorProvider } from "./providers/TranslatorProvider"; import { TranslatorProvider } from "./providers/TranslatorProvider";
import { QueryClient, QueryClientProvider } from "@tanstack/react-query";
const queryClient = new QueryClient({ const queryClient = new QueryClient({
defaultOptions: { defaultOptions: {

View File

@@ -9,11 +9,12 @@ import {
IconCircleProgress, IconCircleProgress,
IconCircleCheck, IconCircleCheck,
} from "@probo/ui"; } from "@probo/ui";
import { PDFPreview } from "../components/documents/PDFPreview";
import { useWindowSize } from "usehooks-ts"; import { useWindowSize } from "usehooks-ts";
import clsx from "clsx"; import { clsx } from "clsx";
import { sprintf } from "@probo/helpers"; import { sprintf } from "@probo/helpers";
import { PDFPreview } from "../components/documents/PDFPreview";
type Document = { type Document = {
document_version_id: string; document_version_id: string;
title: string; title: string;

View File

@@ -1,6 +1,8 @@
import { graphql, usePreloadedQuery, type PreloadedQuery } from "react-relay"; import { graphql, usePreloadedQuery, type PreloadedQuery } from "react-relay";
import { useTranslate } from "@probo/i18n"; import { useTranslate } from "@probo/i18n";
import type { APIKeysPageQuery } from "/__generated__/iam/APIKeysPageQuery.graphql"; import type { APIKeysPageQuery } from "/__generated__/iam/APIKeysPageQuery.graphql";
import { PersonalAPIKeyList } from "./_components/PersonalAPIKeyList"; import { PersonalAPIKeyList } from "./_components/PersonalAPIKeyList";
export const apiKeysPageQuery = graphql` export const apiKeysPageQuery = graphql`

View File

@@ -1,10 +1,12 @@
import { Suspense, useEffect } from "react"; import { Suspense, useEffect } from "react";
import { useQueryLoader } from "react-relay"; import { useQueryLoader } from "react-relay";
import { CenteredLayoutSkeleton } from "@probo/ui"; import { CenteredLayoutSkeleton } from "@probo/ui";
import { APIKeysPage, apiKeysPageQuery } from "./APIKeysPage";
import type { APIKeysPageQuery } from "/__generated__/iam/APIKeysPageQuery.graphql"; import type { APIKeysPageQuery } from "/__generated__/iam/APIKeysPageQuery.graphql";
import { IAMRelayProvider } from "/providers/IAMRelayProvider"; import { IAMRelayProvider } from "/providers/IAMRelayProvider";
import { APIKeysPage, apiKeysPageQuery } from "./APIKeysPage";
function APIKeysPageLoaderInner() { function APIKeysPageLoaderInner() {
const [queryRef, loadQuery] const [queryRef, loadQuery]
= useQueryLoader<APIKeysPageQuery>(apiKeysPageQuery); = useQueryLoader<APIKeysPageQuery>(apiKeysPageQuery);

View File

@@ -24,9 +24,11 @@ import {
useDialogRef, useDialogRef,
useToast, useToast,
} from "@probo/ui"; } from "@probo/ui";
import { useFormWithSchema } from "/hooks/useFormWithSchema"; import { useFormWithSchema } from "/hooks/useFormWithSchema";
import type { PersonalAPIKeyListFragment$key } from "/__generated__/iam/PersonalAPIKeyListFragment.graphql"; import type { PersonalAPIKeyListFragment$key } from "/__generated__/iam/PersonalAPIKeyListFragment.graphql";
import type { PersonalAPIKeyListCreateMutation } from "/__generated__/iam/PersonalAPIKeyListCreateMutation.graphql"; import type { PersonalAPIKeyListCreateMutation } from "/__generated__/iam/PersonalAPIKeyListCreateMutation.graphql";
import { PersonalAPIKeysTable } from "./PersonalAPIKeysTable"; import { PersonalAPIKeysTable } from "./PersonalAPIKeysTable";
import { PersonalAPIKeyTokenDialog } from "./PersonalAPIKeyTokenDialog"; import { PersonalAPIKeyTokenDialog } from "./PersonalAPIKeyTokenDialog";

View File

@@ -3,11 +3,13 @@ import { formatDate, formatError, type GraphQLError } from "@probo/helpers";
import { Button, Spinner, Td, Tr, useConfirm, useToast } from "@probo/ui"; import { Button, Spinner, Td, Tr, useConfirm, useToast } from "@probo/ui";
import { graphql } from "relay-runtime"; import { graphql } from "relay-runtime";
import { useMutation, useFragment } from "react-relay"; 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 { PersonalAPIKeyRowFragment$key } from "/__generated__/iam/PersonalAPIKeyRowFragment.graphql";
import type { PersonalAPIKeyRow_revokeMutation } from "/__generated__/iam/PersonalAPIKeyRow_revokeMutation.graphql"; import type { PersonalAPIKeyRow_revokeMutation } from "/__generated__/iam/PersonalAPIKeyRow_revokeMutation.graphql";
import clsx from "clsx";
import { PersonalAPIKeyTokenAction } from "./PersonalAPIKeyTokenAction"; import { PersonalAPIKeyTokenAction } from "./PersonalAPIKeyTokenAction";
import { Suspense } from "react";
const revokeMutation = graphql` const revokeMutation = graphql`
mutation PersonalAPIKeyRow_revokeMutation( mutation PersonalAPIKeyRow_revokeMutation(

View File

@@ -2,11 +2,13 @@ import { useTranslate } from "@probo/i18n";
import { Button, useDialogRef, useToast } from "@probo/ui"; import { Button, useDialogRef, useToast } from "@probo/ui";
import { formatError } from "@probo/helpers"; import { formatError } from "@probo/helpers";
import { useRefetchableFragment } from "react-relay"; import { useRefetchableFragment } from "react-relay";
import { PersonalAPIKeyTokenDialog } from "./PersonalAPIKeyTokenDialog";
import { personalAPIKeyRowFragment } from "./PersonalAPIKeyRow";
import type { PersonalAPIKeyRowFragment$key } from "/__generated__/iam/PersonalAPIKeyRowFragment.graphql"; import type { PersonalAPIKeyRowFragment$key } from "/__generated__/iam/PersonalAPIKeyRowFragment.graphql";
import type { PersonalAPIKeyRowRefetchQuery } from "/__generated__/iam/PersonalAPIKeyRowRefetchQuery.graphql"; import type { PersonalAPIKeyRowRefetchQuery } from "/__generated__/iam/PersonalAPIKeyRowRefetchQuery.graphql";
import { PersonalAPIKeyTokenDialog } from "./PersonalAPIKeyTokenDialog";
import { personalAPIKeyRowFragment } from "./PersonalAPIKeyRow";
export function PersonalAPIKeyTokenAction(props: { export function PersonalAPIKeyTokenAction(props: {
fKey: PersonalAPIKeyRowFragment$key; fKey: PersonalAPIKeyRowFragment$key;
disabled?: boolean; disabled?: boolean;

View File

@@ -1,8 +1,10 @@
import { useTranslate } from "@probo/i18n"; import { useTranslate } from "@probo/i18n";
import { Table, Tbody, Th, Thead, Tr } from "@probo/ui"; import { Table, Tbody, Th, Thead, Tr } from "@probo/ui";
import { PersonalAPIKeyRow } from "./PersonalAPIKeyRow";
import type { PersonalAPIKeyListFragment$data } from "/__generated__/iam/PersonalAPIKeyListFragment.graphql"; import type { PersonalAPIKeyListFragment$data } from "/__generated__/iam/PersonalAPIKeyListFragment.graphql";
import { PersonalAPIKeyRow } from "./PersonalAPIKeyRow";
export function PersonalAPIKeysTable(props: { export function PersonalAPIKeysTable(props: {
edges: PersonalAPIKeyListFragment$data["personalAPIKeys"]["edges"]; edges: PersonalAPIKeyListFragment$data["personalAPIKeys"]["edges"];
connectionId: string; connectionId: string;

View File

@@ -1,5 +1,6 @@
import { Logo } from "@probo/ui"; import { Logo } from "@probo/ui";
import { Outlet } from "react-router"; import { Outlet } from "react-router";
import { IAMRelayProvider } from "/providers/IAMRelayProvider"; import { IAMRelayProvider } from "/providers/IAMRelayProvider";
export default function () { export default function () {

View File

@@ -3,13 +3,14 @@ import { useTranslate } from "@probo/i18n";
import { Button, Field, useToast } from "@probo/ui"; import { Button, Field, useToast } from "@probo/ui";
import { useState } from "react"; import { useState } from "react";
import { Link } from "react-router"; import { Link } from "react-router";
import { useFormWithSchema } from "/hooks/useFormWithSchema"; import { z } from "zod";
import z from "zod";
import { graphql } from "relay-runtime"; import { graphql } from "relay-runtime";
import { useMutation } from "react-relay"; import { useMutation } from "react-relay";
import type { ForgotPasswordPageMutation } from "/__generated__/iam/ForgotPasswordPageMutation.graphql";
import { formatError } from "@probo/helpers"; import { formatError } from "@probo/helpers";
import type { ForgotPasswordPageMutation } from "/__generated__/iam/ForgotPasswordPageMutation.graphql";
import { useFormWithSchema } from "/hooks/useFormWithSchema";
const sendInstructionsMutation = graphql` const sendInstructionsMutation = graphql`
mutation ForgotPasswordPageMutation($input: ForgotPasswordInput!) { mutation ForgotPasswordPageMutation($input: ForgotPasswordInput!) {
forgotPassword(input: $input) { forgotPassword(input: $input) {

View File

@@ -2,13 +2,14 @@ import { usePageTitle } from "@probo/hooks";
import { useTranslate } from "@probo/i18n"; import { useTranslate } from "@probo/i18n";
import { Button, Field, useToast } from "@probo/ui"; import { Button, Field, useToast } from "@probo/ui";
import { Link, useNavigate, useSearchParams } from "react-router"; import { Link, useNavigate, useSearchParams } from "react-router";
import z from "zod"; import { z } from "zod";
import { useFormWithSchema } from "/hooks/useFormWithSchema";
import { graphql } from "relay-runtime"; import { graphql } from "relay-runtime";
import { useMutation } from "react-relay"; import { useMutation } from "react-relay";
import type { ResetPasswordPageMutation } from "/__generated__/iam/ResetPasswordPageMutation.graphql";
import { formatError, type GraphQLError } from "@probo/helpers"; import { formatError, type GraphQLError } from "@probo/helpers";
import type { ResetPasswordPageMutation } from "/__generated__/iam/ResetPasswordPageMutation.graphql";
import { useFormWithSchema } from "/hooks/useFormWithSchema";
const resetPasswordMutation = graphql` const resetPasswordMutation = graphql`
mutation ResetPasswordPageMutation($input: ResetPasswordInput!) { mutation ResetPasswordPageMutation($input: ResetPasswordInput!) {
resetPassword(input: $input) { resetPassword(input: $input) {

View File

@@ -2,12 +2,13 @@ import { usePageTitle } from "@probo/hooks";
import { useTranslate } from "@probo/i18n"; import { useTranslate } from "@probo/i18n";
import { Button, Field, useToast } from "@probo/ui"; import { Button, Field, useToast } from "@probo/ui";
import { Link, useSearchParams } from "react-router"; import { Link, useSearchParams } from "react-router";
import { useFormWithSchema } from "/hooks/useFormWithSchema"; import { z } from "zod";
import z from "zod";
import { useState } from "react"; import { useState } from "react";
import { graphql } from "relay-runtime"; import { graphql } from "relay-runtime";
import { useMutation } from "react-relay"; import { useMutation } from "react-relay";
import { formatError } from "@probo/helpers"; import { formatError } from "@probo/helpers";
import { useFormWithSchema } from "/hooks/useFormWithSchema";
import type { VerifyEmailPageMutation } from "/__generated__/iam/VerifyEmailPageMutation.graphql"; import type { VerifyEmailPageMutation } from "/__generated__/iam/VerifyEmailPageMutation.graphql";
const verifyEmailMutation = graphql` const verifyEmailMutation = graphql`

View File

@@ -4,9 +4,10 @@ import type { FormEventHandler } from "react";
import { useMutation } from "react-relay"; import { useMutation } from "react-relay";
import { Link } from "react-router"; import { Link } from "react-router";
import { graphql } from "relay-runtime"; import { graphql } from "relay-runtime";
import type { PasswordSignInPageMutation } from "/__generated__/iam/PasswordSignInPageMutation.graphql";
import { formatError, type GraphQLError } from "@probo/helpers"; import { formatError, type GraphQLError } from "@probo/helpers";
import type { PasswordSignInPageMutation } from "/__generated__/iam/PasswordSignInPageMutation.graphql";
const signInMutation = graphql` const signInMutation = graphql`
mutation PasswordSignInPageMutation($input: SignInInput!) { mutation PasswordSignInPageMutation($input: SignInInput!) {
signIn(input: $input) { signIn(input: $input) {

View File

@@ -8,6 +8,7 @@ import {
} from "react-relay"; } from "react-relay";
import { Link, useNavigate } from "react-router"; import { Link, useNavigate } from "react-router";
import { graphql } from "relay-runtime"; import { graphql } from "relay-runtime";
import type { SSOSignInPageQuery } from "/__generated__/iam/SSOSignInPageQuery.graphql"; import type { SSOSignInPageQuery } from "/__generated__/iam/SSOSignInPageQuery.graphql";
const ssoAvailabilityQuery = graphql` const ssoAvailabilityQuery = graphql`

View File

@@ -2,12 +2,13 @@ import { usePageTitle } from "@probo/hooks";
import { useTranslate } from "@probo/i18n"; import { useTranslate } from "@probo/i18n";
import { Button, Field, useToast } from "@probo/ui"; import { Button, Field, useToast } from "@probo/ui";
import { Link, useNavigate, useSearchParams } from "react-router"; import { Link, useNavigate, useSearchParams } from "react-router";
import z from "zod"; import { z } from "zod";
import { useFormWithSchema } from "/hooks/useFormWithSchema";
import { graphql } from "relay-runtime"; import { graphql } from "relay-runtime";
import { useMutation } from "react-relay"; import { useMutation } from "react-relay";
import { formatError } from "@probo/helpers"; import { formatError } from "@probo/helpers";
import { useFormWithSchema } from "/hooks/useFormWithSchema";
const signUpFromIvitationMutation = graphql` const signUpFromIvitationMutation = graphql`
mutation SignUpFromInvitationPageMutation( mutation SignUpFromInvitationPageMutation(
$input: SignUpFromInvitationInput! $input: SignUpFromInvitationInput!

View File

@@ -2,12 +2,13 @@ import { usePageTitle } from "@probo/hooks";
import { useTranslate } from "@probo/i18n"; import { useTranslate } from "@probo/i18n";
import { Button, Field, useToast } from "@probo/ui"; import { Button, Field, useToast } from "@probo/ui";
import { Link, useNavigate } from "react-router"; import { Link, useNavigate } from "react-router";
import z from "zod"; import { z } from "zod";
import { useFormWithSchema } from "/hooks/useFormWithSchema";
import { graphql } from "relay-runtime"; import { graphql } from "relay-runtime";
import { useMutation } from "react-relay"; import { useMutation } from "react-relay";
import { formatError } from "@probo/helpers"; import { formatError } from "@probo/helpers";
import { useFormWithSchema } from "/hooks/useFormWithSchema";
const signUpMutation = graphql` const signUpMutation = graphql`
mutation SignUpPageMutation($input: SignUpInput!) { mutation SignUpPageMutation($input: SignUpInput!) {
signUp(input: $input) { signUp(input: $input) {

View File

@@ -8,10 +8,12 @@ import {
Input, Input,
} from "@probo/ui"; } from "@probo/ui";
import { useMemo, useState } from "react"; import { useMemo, useState } from "react";
import { usePageTitle } from "@probo/hooks";
import type { MembershipsPageQuery } from "/__generated__/iam/MembershipsPageQuery.graphql";
import { InvitationCard } from "./_components/InvitationCard"; import { InvitationCard } from "./_components/InvitationCard";
import { MembershipCard } from "./_components/MembershipCard"; import { MembershipCard } from "./_components/MembershipCard";
import type { MembershipsPageQuery } from "/__generated__/iam/MembershipsPageQuery.graphql";
import { usePageTitle } from "@probo/hooks";
export const membershipsPageQuery = graphql` export const membershipsPageQuery = graphql`
query MembershipsPageQuery { query MembershipsPageQuery {

View File

@@ -1,10 +1,12 @@
import { useQueryLoader } from "react-relay"; import { useQueryLoader } from "react-relay";
import { Suspense, useEffect } from "react"; import { Suspense, useEffect } from "react";
import { CenteredLayoutSkeleton } from "@probo/ui"; import { CenteredLayoutSkeleton } from "@probo/ui";
import type { MembershipsPageQuery } from "/__generated__/iam/MembershipsPageQuery.graphql"; import type { MembershipsPageQuery } from "/__generated__/iam/MembershipsPageQuery.graphql";
import { MembershipsPage, membershipsPageQuery } from "./MembershipsPage";
import { IAMRelayProvider } from "/providers/IAMRelayProvider"; import { IAMRelayProvider } from "/providers/IAMRelayProvider";
import { MembershipsPage, membershipsPageQuery } from "./MembershipsPage";
function MembershipsPageLoader() { function MembershipsPageLoader() {
const [queryRef, loadQuery] const [queryRef, loadQuery]
= useQueryLoader<MembershipsPageQuery>(membershipsPageQuery); = useQueryLoader<MembershipsPageQuery>(membershipsPageQuery);

View File

@@ -1,8 +1,10 @@
import { graphql, usePreloadedQuery, type PreloadedQuery } from "react-relay"; import { graphql, usePreloadedQuery, type PreloadedQuery } from "react-relay";
import { Outlet } from "react-router"; import { Outlet } from "react-router";
import { Layout, Skeleton } from "@probo/ui"; import { Layout, Skeleton } from "@probo/ui";
import type { ViewerLayoutQuery } from "/__generated__/iam/ViewerLayoutQuery.graphql";
import { Suspense } from "react"; import { Suspense } from "react";
import type { ViewerLayoutQuery } from "/__generated__/iam/ViewerLayoutQuery.graphql";
import { ViewerDropdown } from "./_components/ViewerDropdown"; import { ViewerDropdown } from "./_components/ViewerDropdown";
export const viewerLayoutQuery = graphql` export const viewerLayoutQuery = graphql`

View File

@@ -1,8 +1,10 @@
import { useQueryLoader } from "react-relay"; import { useQueryLoader } from "react-relay";
import { Suspense, useEffect } from "react"; import { Suspense, useEffect } from "react";
import type { ViewerLayoutQuery } from "/__generated__/iam/ViewerLayoutQuery.graphql"; import type { ViewerLayoutQuery } from "/__generated__/iam/ViewerLayoutQuery.graphql";
import { ViewerLayout, viewerLayoutQuery } from "./ViewerLayout";
import { IAMRelayProvider } from "/providers/IAMRelayProvider"; import { IAMRelayProvider } from "/providers/IAMRelayProvider";
import { ViewerLayout, viewerLayoutQuery } from "./ViewerLayout";
import { ViewerLayoutLoading } from "./ViewerLayoutLoading"; import { ViewerLayoutLoading } from "./ViewerLayoutLoading";
function ViewerLayoutLoader() { function ViewerLayoutLoader() {

View File

@@ -3,6 +3,7 @@ import { useTranslate } from "@probo/i18n";
import { Button, Card, useToast } from "@probo/ui"; import { Button, Card, useToast } from "@probo/ui";
import { graphql, type DataID } from "relay-runtime"; import { graphql, type DataID } from "relay-runtime";
import { useFragment, useMutation } from "react-relay"; import { useFragment, useMutation } from "react-relay";
import type { InvitationCardFragment$key } from "/__generated__/iam/InvitationCardFragment.graphql"; import type { InvitationCardFragment$key } from "/__generated__/iam/InvitationCardFragment.graphql";
import type { InvitationCardMutation } from "/__generated__/iam/InvitationCardMutation.graphql"; import type { InvitationCardMutation } from "/__generated__/iam/InvitationCardMutation.graphql";

View File

@@ -11,9 +11,10 @@ import {
import { Link, useNavigate } from "react-router"; import { Link, useNavigate } from "react-router";
import { graphql } from "relay-runtime"; import { graphql } from "relay-runtime";
import { useFragment, useMutation } from "react-relay"; import { useFragment, useMutation } from "react-relay";
import type { MembershipCardFragment$key } from "/__generated__/iam/MembershipCardFragment.graphql";
import { parseDate } from "@probo/helpers"; import { parseDate } from "@probo/helpers";
import { useCallback } from "react"; import { useCallback } from "react";
import type { MembershipCardFragment$key } from "/__generated__/iam/MembershipCardFragment.graphql";
import type { MembershipCard_assumeMutation } from "/__generated__/iam/MembershipCard_assumeMutation.graphql"; import type { MembershipCard_assumeMutation } from "/__generated__/iam/MembershipCard_assumeMutation.graphql";
const fragment = graphql` const fragment = graphql`

View File

@@ -10,9 +10,10 @@ import {
import { graphql } from "relay-runtime"; import { graphql } from "relay-runtime";
import { useFragment, useMutation } from "react-relay"; import { useFragment, useMutation } from "react-relay";
import { useTranslate } from "@probo/i18n"; import { useTranslate } from "@probo/i18n";
import type { ViewerDropdownFragment$key } from "/__generated__/iam/ViewerDropdownFragment.graphql";
import { formatError } from "@probo/helpers"; import { formatError } from "@probo/helpers";
import type { ViewerDropdownFragment$key } from "/__generated__/iam/ViewerDropdownFragment.graphql";
export const fragment = graphql` export const fragment = graphql`
fragment ViewerDropdownFragment on Identity { fragment ViewerDropdownFragment on Identity {
canListAPIKeys: permission(action: "iam:personal-api-key:list") canListAPIKeys: permission(action: "iam:personal-api-key:list")

View File

@@ -11,6 +11,7 @@ import { graphql, useMutation } from "react-relay";
import type { FormEventHandler } from "react"; import type { FormEventHandler } from "react";
import { Link, useLocation, useNavigate } from "react-router"; import { Link, useLocation, useNavigate } from "react-router";
import { formatError } from "@probo/helpers"; import { formatError } from "@probo/helpers";
import type { NewOrganizationPageMutation } from "/__generated__/iam/NewOrganizationPageMutation.graphql"; import type { NewOrganizationPageMutation } from "/__generated__/iam/NewOrganizationPageMutation.graphql";
import { IAMRelayProvider } from "/providers/IAMRelayProvider"; import { IAMRelayProvider } from "/providers/IAMRelayProvider";

View File

@@ -1,15 +1,17 @@
import { graphql, usePreloadedQuery, type PreloadedQuery } from "react-relay"; import { graphql, usePreloadedQuery, type PreloadedQuery } from "react-relay";
import { Link, Outlet } from "react-router"; import { Link, Outlet } from "react-router";
import { Badge, Button, IconPeopleAdd, Layout, Skeleton } from "@probo/ui"; 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 { Suspense } from "react";
import { useTranslate } from "@probo/i18n"; import { useTranslate } from "@probo/i18n";
import type { ViewerMembershipLayoutQuery } from "/__generated__/iam/ViewerMembershipLayoutQuery.graphql";
import { CoreRelayProvider } from "/providers/CoreRelayProvider"; import { CoreRelayProvider } from "/providers/CoreRelayProvider";
import { CurrentUser } from "/providers/CurrentUser"; import { CurrentUser } from "/providers/CurrentUser";
import { ViewerMembershipDropdown } from "./_components/ViewerMembershipDropdown";
import { MembershipsDropdown } from "./_components/MembershipsDropdown";
import { Sidebar } from "./_components/Sidebar";
export const viewerMembershipLayoutQuery = graphql` export const viewerMembershipLayoutQuery = graphql`
query ViewerMembershipLayoutQuery( query ViewerMembershipLayoutQuery(
$organizationId: ID! $organizationId: ID!

Some files were not shown because too many files have changed in this diff Show More