Add import order sorting rules

Signed-off-by: Émile Ré <emile@getprobo.com>
This commit is contained in:
Émile Ré
2026-01-22 20:38:37 +04:00
parent 56d17c4f3f
commit c168be6de0
352 changed files with 2119 additions and 2111 deletions

View File

@@ -1,8 +1,8 @@
import { useLocation, useRouteError } from "react-router";
import { IconPageCross } from "@probo/ui";
import { useTranslate } from "@probo/i18n";
import { useEffect, useRef } from "react";
import { AuthenticationRequiredError } from "@probo/relay";
import { IconPageCross } from "@probo/ui";
import { useEffect, useRef } from "react";
import { useLocation, useRouteError } from "react-router";
const classNames = {
wrapper: "py-10 text-center space-y-2 ",

View File

@@ -1,13 +1,13 @@
import { IconClock } from "@probo/ui";
import { useTranslate } from "@probo/i18n";
import { useLazyLoadQuery, graphql } from "react-relay";
import { useLocation } from "react-router";
import {
getSnapshotTypeUrlPath,
getSnapshotTypeLabel,
sprintf,
formatDate,
getSnapshotTypeLabel,
getSnapshotTypeUrlPath,
sprintf,
} from "@probo/helpers";
import { useTranslate } from "@probo/i18n";
import { IconClock } from "@probo/ui";
import { graphql, useLazyLoadQuery } from "react-relay";
import { useLocation } from "react-router";
import type { SnapshotBannerQuery } from "/__generated__/core/SnapshotBannerQuery.graphql";

View File

@@ -9,11 +9,11 @@ import {
} from "@probo/ui";
import { clsx } from "clsx";
import {
type ComponentProps,
createContext,
startTransition,
useContext,
useState,
type ComponentProps,
} from "react";
import type { LoadMoreFn } from "react-relay";
import type { OperationType } from "relay-runtime";

View File

@@ -17,19 +17,19 @@ import {
import { useMutation } from "react-relay";
import type { usePaginationFragmentHookType } from "react-relay/relay-hooks/usePaginationFragment";
import { Link } from "react-router";
import { z } from "zod";
import type { OperationType } from "relay-runtime";
import { z } from "zod";
import {
createAssetMutation,
deleteAssetMutation,
updateAssetMutation,
} from "/hooks/graph/AssetGraph";
import type { AssetGraphDeleteMutation } from "/__generated__/core/AssetGraphDeleteMutation.graphql";
import type {
AssetsPageFragment$data,
AssetsPageFragment$key,
} from "/__generated__/core/AssetsPageFragment.graphql";
import {
createAssetMutation,
deleteAssetMutation,
updateAssetMutation,
} from "/hooks/graph/AssetGraph";
import { useOrganizationId } from "/hooks/useOrganizationId";
import { EditableTable } from "../table/EditableTable";

View File

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

View File

@@ -1,27 +1,27 @@
import { graphql } from "relay-runtime";
import { getAuditStateVariant, sprintf } from "@probo/helpers";
import { useTranslate } from "@probo/i18n";
import {
Card,
IconPlusLarge,
Button,
Tr,
Td,
Table,
Thead,
Tbody,
Th,
IconChevronDown,
IconTrashCan,
Badge,
Button,
Card,
IconChevronDown,
IconPlusLarge,
IconTrashCan,
Table,
Tbody,
Td,
Th,
Thead,
Tr,
TrButton,
} from "@probo/ui";
import { useTranslate } from "@probo/i18n";
import { useFragment } from "react-relay";
import { useMemo, useState } from "react";
import { sprintf, getAuditStateVariant } from "@probo/helpers";
import { clsx } from "clsx";
import { useMemo, useState } from "react";
import { useFragment } from "react-relay";
import { graphql } from "relay-runtime";
import { useOrganizationId } from "/hooks/useOrganizationId";
import type { LinkedAuditsCardFragment$key } from "/__generated__/core/LinkedAuditsCardFragment.graphql";
import { useOrganizationId } from "/hooks/useOrganizationId";
import { LinkedAuditsDialog } from "./LinkedAuditsDialog";

View File

@@ -1,9 +1,11 @@
import { getAuditStateVariant } from "@probo/helpers";
import { useTranslate } from "@probo/i18n";
import {
Badge,
Button,
Dialog,
DialogContent,
DialogFooter,
Badge,
IconMagnifyingGlass,
IconPlusLarge,
IconTrashCan,
@@ -11,19 +13,17 @@ import {
Input,
Spinner,
} from "@probo/ui";
import { useTranslate } from "@probo/i18n";
import { getAuditStateVariant } from "@probo/helpers";
import { Suspense, useMemo, useState, type ReactNode } from "react";
import { graphql } from "relay-runtime";
import { type ReactNode, Suspense, useMemo, useState } from "react";
import { useLazyLoadQuery, usePaginationFragment } from "react-relay";
import { graphql } from "relay-runtime";
import type { LinkedAuditsDialogQuery } from "/__generated__/core/LinkedAuditsDialogQuery.graphql";
import { useOrganizationId } from "/hooks/useOrganizationId";
import type { NodeOf } from "/types";
import type {
LinkedAuditsDialogFragment$data,
LinkedAuditsDialogFragment$key,
} from "/__generated__/core/LinkedAuditsDialogFragment.graphql";
import type { LinkedAuditsDialogQuery } from "/__generated__/core/LinkedAuditsDialogQuery.graphql";
import { useOrganizationId } from "/hooks/useOrganizationId";
import type { NodeOf } from "/types";
const auditsQuery = graphql`
query LinkedAuditsDialogQuery($organizationId: ID!) {

View File

@@ -1,18 +1,18 @@
import { graphql } from "relay-runtime";
import { useTranslate } from "@probo/i18n";
import {
Button,
Tr,
Td,
Thead,
Tbody,
Th,
IconTrashCan,
Badge,
Button,
IconTrashCan,
Tbody,
Td,
Th,
Thead,
Tr,
TrButton,
} from "@probo/ui";
import { useTranslate } from "@probo/i18n";
import { useFragment } from "react-relay";
import type { ComponentProps } from "react";
import { useFragment } from "react-relay";
import { graphql } from "relay-runtime";
import type { LinkedControlsCardFragment$key } from "/__generated__/core/LinkedControlsCardFragment.graphql";
import { useOrganizationId } from "/hooks/useOrganizationId";

View File

@@ -1,3 +1,4 @@
import { useTranslate } from "@probo/i18n";
import {
Badge,
Button,
@@ -11,25 +12,24 @@ import {
Spinner,
} from "@probo/ui";
import {
type ReactNode,
type RefObject,
Suspense,
useEffect,
useMemo,
useRef,
useState,
type ReactNode,
type RefObject,
} from "react";
import { useTranslate } from "@probo/i18n";
import { graphql } from "relay-runtime";
import { useLazyLoadQuery, usePaginationFragment } from "react-relay";
import { graphql } from "relay-runtime";
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 { LinkedControlsDialogQuery } from "/__generated__/core/LinkedControlsDialogQuery.graphql";
import { useOrganizationId } from "/hooks/useOrganizationId";
import type { NodeOf } from "/types";
const query = graphql`

View File

@@ -1,17 +1,17 @@
import { sprintf } from "@probo/helpers";
import { useTranslate } from "@probo/i18n";
import {
Button,
Checkbox,
Dialog,
DialogContent,
DialogFooter,
Field,
useDialogRef,
Spinner,
Checkbox,
useDialogRef,
} from "@probo/ui";
import { type ReactNode, useImperativeHandle, forwardRef } from "react";
import { forwardRef, type ReactNode, useImperativeHandle } from "react";
import { z } from "zod";
import { sprintf } from "@probo/helpers";
import { useFormWithSchema } from "/hooks/useFormWithSchema";

View File

@@ -1,28 +1,28 @@
import { graphql } from "relay-runtime";
import { sprintf } from "@probo/helpers";
import { useTranslate } from "@probo/i18n";
import {
Card,
IconPlusLarge,
Button,
Tr,
Td,
Table,
Thead,
Tbody,
Th,
IconChevronDown,
IconTrashCan,
DocumentVersionBadge,
Card,
DocumentTypeBadge,
DocumentVersionBadge,
IconChevronDown,
IconPlusLarge,
IconTrashCan,
Table,
Tbody,
Td,
Th,
Thead,
Tr,
TrButton,
} from "@probo/ui";
import { useTranslate } from "@probo/i18n";
import { useFragment } from "react-relay";
import { useMemo, useState } from "react";
import { sprintf } from "@probo/helpers";
import { clsx } from "clsx";
import { useMemo, useState } from "react";
import { useFragment } from "react-relay";
import { graphql } from "relay-runtime";
import { useOrganizationId } from "/hooks/useOrganizationId";
import type { LinkedDocumentsCardFragment$key } from "/__generated__/core/LinkedDocumentsCardFragment.graphql";
import { useOrganizationId } from "/hooks/useOrganizationId";
import { LinkedDocumentDialog } from "./LinkedDocumentsDialog.tsx";

View File

@@ -1,3 +1,4 @@
import { useTranslate } from "@probo/i18n";
import {
Button,
Dialog,
@@ -11,18 +12,17 @@ import {
Input,
Spinner,
} from "@probo/ui";
import { useTranslate } from "@probo/i18n";
import { Suspense, useMemo, useState, type ReactNode } from "react";
import { graphql } from "relay-runtime";
import { type ReactNode, Suspense, useMemo, useState } from "react";
import { useLazyLoadQuery, usePaginationFragment } from "react-relay";
import { graphql } from "relay-runtime";
import type { LinkedDocumentsDialogQuery } from "/__generated__/core/LinkedDocumentsDialogQuery.graphql";
import { useOrganizationId } from "/hooks/useOrganizationId";
import type { NodeOf } from "/types";
import type {
LinkedDocumentsDialogFragment$data,
LinkedDocumentsDialogFragment$key,
} from "/__generated__/core/LinkedDocumentsDialogFragment.graphql";
import type { LinkedDocumentsDialogQuery } from "/__generated__/core/LinkedDocumentsDialogQuery.graphql";
import { useOrganizationId } from "/hooks/useOrganizationId";
import type { NodeOf } from "/types";
const documentsQuery = graphql`
query LinkedDocumentsDialogQuery($organizationId: ID!) {

View File

@@ -1,7 +1,4 @@
import { Document, Page, pdfjs } from "react-pdf";
import "react-pdf/dist/Page/TextLayer.css";
import "react-pdf/dist/Page/AnnotationLayer.css";
import { type ComponentProps, useRef, useState } from "react";
import { times } from "@probo/helpers";
import {
IconArrowInbox,
IconChevronLeft,
@@ -9,8 +6,12 @@ import {
IconPlusLarge,
Spinner,
} from "@probo/ui";
import { times } from "@probo/helpers";
import { IconMinusLarge } from "@probo/ui/src/Atoms/Icons/IconMinusLarge.tsx";
import { type ComponentProps, useRef, useState } from "react";
import { Document, Page, pdfjs } from "react-pdf";
import "react-pdf/dist/Page/TextLayer.css";
import "react-pdf/dist/Page/AnnotationLayer.css";
// Worker for PDF.js
pdfjs.GlobalWorkerOptions.workerSrc = `//unpkg.com/pdfjs-dist@${pdfjs.version}/build/pdf.worker.min.mjs`;

View File

@@ -1,15 +1,15 @@
import { useTranslate } from "@probo/i18n";
import {
Button,
Checkbox,
Dialog,
DialogContent,
DialogFooter,
Field,
useDialogRef,
Spinner,
Checkbox,
useDialogRef,
} from "@probo/ui";
import { type ReactNode, useImperativeHandle, forwardRef } from "react";
import { forwardRef, type ReactNode, useImperativeHandle } from "react";
import { z } from "zod";
import { useFormWithSchema } from "/hooks/useFormWithSchema";

View File

@@ -1,14 +1,14 @@
import { Field, Option, Select, Badge } from "@probo/ui";
import { Suspense, type ComponentProps } from "react";
import { getAuditStateLabel, getAuditStateVariant } from "@probo/helpers";
import { useTranslate } from "@probo/i18n";
import { Badge, Field, Option, Select } from "@probo/ui";
import { type ComponentProps, Suspense } from "react";
import {
type Control,
Controller,
type FieldValues,
type Path,
} from "react-hook-form";
import { useLazyLoadQuery, graphql } from "react-relay";
import { getAuditStateVariant, getAuditStateLabel } from "@probo/helpers";
import { graphql, useLazyLoadQuery } from "react-relay";
import type { AuditSelectFieldQuery } from "/__generated__/core/AuditSelectFieldQuery.graphql";

View File

@@ -1,5 +1,5 @@
import type { ComponentProps } from "react";
import { Field, Select } from "@probo/ui";
import type { ComponentProps } from "react";
import { Controller, type FieldPath, type FieldValues } from "react-hook-form";
type Props<

View File

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

View File

@@ -1,9 +1,9 @@
import { useTranslate } from "@probo/i18n";
import { Option } from "@probo/ui";
import {
documentClassifications,
getDocumentClassificationLabel,
} from "@probo/helpers";
import { useTranslate } from "@probo/i18n";
import { Option } from "@probo/ui";
export function DocumentClassificationOptions() {
const { __ } = useTranslate();

View File

@@ -1,6 +1,6 @@
import { documentTypes, getDocumentTypeLabel } from "@probo/helpers";
import { useTranslate } from "@probo/i18n";
import { Option } from "@probo/ui";
import { documentTypes, getDocumentTypeLabel } from "@probo/helpers";
export function DocumentTypeOptions() {
const { __ } = useTranslate();

View File

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

View File

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

View File

@@ -1,6 +1,6 @@
import { Avatar, Field, Option, Select, Badge, Button, IconCrossLargeX } from "@probo/ui";
import { Suspense, useState, type ComponentProps } from "react";
import { useTranslate } from "@probo/i18n";
import { Avatar, Badge, Button, Field, IconCrossLargeX, Option, Select } from "@probo/ui";
import { type ComponentProps, Suspense, useState } from "react";
import { type Control, Controller, type FieldValues, Path } from "react-hook-form";
import { usePeople } from "/hooks/graph/PeopleGraph.ts";

View File

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

View File

@@ -2,9 +2,9 @@ import { useTranslate } from "@probo/i18n";
import { Option } from "@probo/ui";
import type {
ProcessingActivitySpecialOrCriminalDatum,
ProcessingActivityLawfulBasis,
ProcessingActivityDataProtectionImpactAssessment,
ProcessingActivityLawfulBasis,
ProcessingActivitySpecialOrCriminalDatum,
ProcessingActivityTransferImpactAssessment,
} from "/__generated__/core/ProcessingActivityGraphCreateMutation.graphql";

View File

@@ -1,6 +1,6 @@
import { getSnapshotTypeLabel, snapshotTypes } from "@probo/helpers";
import { useTranslate } from "@probo/i18n";
import { Option } from "@probo/ui";
import { snapshotTypes, getSnapshotTypeLabel } from "@probo/helpers";
export function SnapshotTypeOptions() {
const { __ } = useTranslate();

View File

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

View File

@@ -1,27 +1,27 @@
import { graphql } from "relay-runtime";
import { sprintf } from "@probo/helpers";
import { useTranslate } from "@probo/i18n";
import {
Card,
IconPlusLarge,
Button,
Tr,
Td,
Table,
Thead,
Tbody,
Th,
Card,
IconChevronDown,
IconPlusLarge,
IconTrashCan,
Table,
Tbody,
Td,
Th,
Thead,
Tr,
TrButton,
} from "@probo/ui";
import { MeasureBadge } from "@probo/ui/src/Molecules/Badge/MeasureBadge";
import { useTranslate } from "@probo/i18n";
import { useFragment } from "react-relay";
import { useMemo, useState } from "react";
import { sprintf } from "@probo/helpers";
import { clsx } from "clsx";
import { useMemo, useState } from "react";
import { useFragment } from "react-relay";
import { graphql } from "relay-runtime";
import { useOrganizationId } from "/hooks/useOrganizationId";
import type { LinkedMeasuresCardFragment$key } from "/__generated__/core/LinkedMeasuresCardFragment.graphql";
import { useOrganizationId } from "/hooks/useOrganizationId";
import { LinkedMeasureDialog } from "./LinkedMeasuresDialog.tsx";

View File

@@ -1,3 +1,4 @@
import { useTranslate } from "@probo/i18n";
import {
Badge,
Button,
@@ -13,11 +14,10 @@ import {
Select,
Spinner,
} from "@probo/ui";
import { useTranslate } from "@probo/i18n";
import { Suspense, useMemo, useState, type ReactNode } from "react";
import { type ReactNode, Suspense, useMemo, useState } from "react";
import { useOrganizationId } from "/hooks/useOrganizationId";
import { usePaginatedMeasures } from "/hooks/graph/usePaginatedMeasures";
import { useOrganizationId } from "/hooks/useOrganizationId";
type Props = {
children: ReactNode;

View File

@@ -1,29 +1,29 @@
import { graphql } from "relay-runtime";
import {
Card,
IconPlusLarge,
Button,
Tr,
Td,
Table,
Thead,
Tbody,
Th,
IconChevronDown,
IconTrashCan,
TrButton,
Badge,
} from "@probo/ui";
import { useTranslate } from "@probo/i18n";
import { useFragment } from "react-relay";
import { useMemo, useState } from "react";
import {
sprintf,
getObligationStatusVariant,
getObligationStatusLabel,
getObligationStatusVariant,
sprintf,
} from "@probo/helpers";
import { useTranslate } from "@probo/i18n";
import {
Badge,
Button,
Card,
IconChevronDown,
IconPlusLarge,
IconTrashCan,
Table,
Tbody,
Td,
Th,
Thead,
Tr,
TrButton,
} from "@probo/ui";
import { clsx } from "clsx";
import { useMemo, useState } from "react";
import { useFragment } from "react-relay";
import { useParams } from "react-router";
import { graphql } from "relay-runtime";
import type { LinkedObligationsCardFragment$key } from "/__generated__/core/LinkedObligationsCardFragment.graphql";
import { useOrganizationId } from "/hooks/useOrganizationId";

View File

@@ -1,4 +1,10 @@
import {
getObligationStatusLabel,
getObligationStatusVariant,
} from "@probo/helpers";
import { useTranslate } from "@probo/i18n";
import {
Badge,
Button,
Dialog,
DialogContent,
@@ -9,24 +15,18 @@ import {
InfiniteScrollTrigger,
Input,
Spinner,
Badge,
} from "@probo/ui";
import { useTranslate } from "@probo/i18n";
import {
getObligationStatusVariant,
getObligationStatusLabel,
} from "@probo/helpers";
import { Suspense, useMemo, useState, type ReactNode } from "react";
import { graphql } from "relay-runtime";
import { type ReactNode, Suspense, useMemo, useState } from "react";
import { useLazyLoadQuery, usePaginationFragment } from "react-relay";
import { graphql } from "relay-runtime";
import type { LinkedObligationsDialogQuery } from "/__generated__/core/LinkedObligationsDialogQuery.graphql";
import { useOrganizationId } from "/hooks/useOrganizationId";
import type { NodeOf } from "/types";
import type {
LinkedObligationsDialogFragment$data,
LinkedObligationsDialogFragment$key,
} from "/__generated__/core/LinkedObligationsDialogFragment.graphql";
import type { LinkedObligationsDialogQuery } from "/__generated__/core/LinkedObligationsDialogQuery.graphql";
import { useOrganizationId } from "/hooks/useOrganizationId";
import type { NodeOf } from "/types";
const obligationsQuery = graphql`
query LinkedObligationsDialogQuery($organizationId: ID!) {

View File

@@ -1,15 +1,15 @@
import { useState } from "react";
import { sprintf } from "@probo/helpers";
import { useTranslate } from "@probo/i18n";
import {
Button,
Dialog,
DialogContent,
DialogFooter,
Button,
Field,
IconTrashCan,
useDialogRef,
} from "@probo/ui";
import { useTranslate } from "@probo/i18n";
import { sprintf } from "@probo/helpers";
import { useState } from "react";
type DeleteOrganizationDialogProps = {
children: React.ReactNode;

View File

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

View File

@@ -1,4 +1,4 @@
import { graphql } from "relay-runtime";
import { useTranslate } from "@probo/i18n";
import {
Button,
IconTrashCan,
@@ -11,8 +11,8 @@ import {
Tr,
TrButton,
} from "@probo/ui";
import { useTranslate } from "@probo/i18n";
import { useFragment } from "react-relay";
import { graphql } from "relay-runtime";
import type { LinkedRisksCardFragment$key } from "/__generated__/core/LinkedRisksCardFragment.graphql";
import { useOrganizationId } from "/hooks/useOrganizationId";

View File

@@ -1,3 +1,4 @@
import { useTranslate } from "@probo/i18n";
import {
Badge,
Button,
@@ -12,10 +13,9 @@ import {
Select,
Spinner,
} from "@probo/ui";
import { useTranslate } from "@probo/i18n";
import { Suspense, useMemo, useState, type ReactNode } from "react";
import { graphql } from "relay-runtime";
import { type ReactNode, Suspense, useMemo, useState } from "react";
import { useLazyLoadQuery } from "react-relay";
import { graphql } from "relay-runtime";
import type { LinkedRisksDialogQuery } from "/__generated__/core/LinkedRisksDialogQuery.graphql";
import { useOrganizationId } from "/hooks/useOrganizationId";

View File

@@ -1,5 +1,5 @@
import { ActionDropdown, Skeleton, Button, IconPencil } from "@probo/ui";
import { useTranslate } from "@probo/i18n";
import { ActionDropdown, Button, IconPencil, Skeleton } from "@probo/ui";
/**
* Skeleton state for the framework control panel

View File

@@ -1,5 +1,5 @@
import { Button, IconPlusLarge, PageHeader, Skeleton } from "@probo/ui";
import { useTranslate } from "@probo/i18n";
import { Button, IconPlusLarge, PageHeader, Skeleton } from "@probo/ui";
export function RisksPageSkeleton() {
const { __ } = useTranslate();

View File

@@ -1,32 +1,32 @@
import { graphql } from "relay-runtime";
import {
Card,
IconPlusLarge,
Button,
Tr,
Td,
Table,
Thead,
Tbody,
Th,
IconChevronDown,
IconTrashCan,
Badge,
TrButton,
} from "@probo/ui";
import { useTranslate } from "@probo/i18n";
import { useFragment } from "react-relay";
import { useMemo, useState } from "react";
import {
sprintf,
formatDate,
getSnapshotTypeLabel,
getSnapshotTypeUrlPath,
formatDate,
sprintf,
} from "@probo/helpers";
import { useTranslate } from "@probo/i18n";
import {
Badge,
Button,
Card,
IconChevronDown,
IconPlusLarge,
IconTrashCan,
Table,
Tbody,
Td,
Th,
Thead,
Tr,
TrButton,
} from "@probo/ui";
import { clsx } from "clsx";
import { useMemo, useState } from "react";
import { useFragment } from "react-relay";
import { graphql } from "relay-runtime";
import { useOrganizationId } from "/hooks/useOrganizationId";
import type { LinkedSnapshotsCardFragment$key } from "/__generated__/core/LinkedSnapshotsCardFragment.graphql";
import { useOrganizationId } from "/hooks/useOrganizationId";
import { LinkedSnapshotsDialog } from "./LinkedSnapshotsDialog";

View File

@@ -1,29 +1,29 @@
import { formatDate, getSnapshotTypeLabel } from "@probo/helpers";
import { useTranslate } from "@probo/i18n";
import {
Badge,
Button,
Dialog,
DialogContent,
DialogFooter,
Badge,
InfiniteScrollTrigger,
Input,
Spinner,
IconMagnifyingGlass,
IconPlusLarge,
IconTrashCan,
InfiniteScrollTrigger,
Input,
Spinner,
} from "@probo/ui";
import { useTranslate } from "@probo/i18n";
import { getSnapshotTypeLabel, formatDate } from "@probo/helpers";
import { Suspense, useMemo, useState, type ReactNode } from "react";
import { graphql } from "relay-runtime";
import { type ReactNode, Suspense, useMemo, useState } from "react";
import { useLazyLoadQuery, usePaginationFragment } from "react-relay";
import { graphql } from "relay-runtime";
import type { LinkedSnapshotsDialogQuery } from "/__generated__/core/LinkedSnapshotsDialogQuery.graphql";
import { useOrganizationId } from "/hooks/useOrganizationId";
import type { NodeOf } from "/types";
import type {
LinkedSnapshotsDialogFragment$data,
LinkedSnapshotsDialogFragment$key,
} from "/__generated__/core/LinkedSnapshotsDialogFragment.graphql";
import type { LinkedSnapshotsDialogQuery } from "/__generated__/core/LinkedSnapshotsDialogQuery.graphql";
import { useOrganizationId } from "/hooks/useOrganizationId";
import type { NodeOf } from "/types";
const snapshotsQuery = graphql`
query LinkedSnapshotsDialogQuery($organizationId: ID!) {

View File

@@ -1,27 +1,27 @@
import { graphql } from "relay-runtime";
import {
Card,
IconPlusLarge,
Button,
Tr,
Td,
Table,
Thead,
Tbody,
Th,
IconChevronDown,
IconTrashCan,
TrButton,
Badge,
} from "@probo/ui";
import { useTranslate } from "@probo/i18n";
import { useFragment } from "react-relay";
import { useMemo, useState, useEffect } from "react";
import { sprintf } from "@probo/helpers";
import { useTranslate } from "@probo/i18n";
import {
Badge,
Button,
Card,
IconChevronDown,
IconPlusLarge,
IconTrashCan,
Table,
Tbody,
Td,
Th,
Thead,
Tr,
TrButton,
} from "@probo/ui";
import { clsx } from "clsx";
import { useEffect, useMemo, useState } from "react";
import { useFragment } from "react-relay";
import { graphql } from "relay-runtime";
import { useOrganizationId } from "/hooks/useOrganizationId";
import type { LinkedStatesOfApplicabilityCardFragment$key } from "/__generated__/core/LinkedStatesOfApplicabilityCardFragment.graphql";
import { useOrganizationId } from "/hooks/useOrganizationId";
import { LinkedStatesOfApplicabilityDialog } from "./LinkedStatesOfApplicabilityDialog";

View File

@@ -1,20 +1,20 @@
import { useTranslate } from "@probo/i18n";
import {
Badge,
Button,
Checkbox,
Dialog,
DialogContent,
DialogFooter,
Button,
Checkbox,
Textarea,
Badge,
} from "@probo/ui";
import { Suspense, useState, useRef } from "react";
import type { ReactNode } from "react";
import { Suspense, useRef, useState } 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";
import { useOrganizationId } from "/hooks/useOrganizationId";
const query = graphql`
query LinkedStatesOfApplicabilityDialogQuery($organizationId: ID!) {

View File

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

View File

@@ -1,11 +1,11 @@
import { useStateWithRef } from "@probo/hooks";
import { useTranslate } from "@probo/i18n";
import { EditableCell, SelectValue, Spinner, selectCell } from "@probo/ui";
import { EditableCell, selectCell, SelectValue, Spinner } from "@probo/ui";
import { useEditableCellRef } from "@probo/ui/src/Molecules/Table/EditableCell.tsx";
import { useEditableRowContext } from "@probo/ui/src/Molecules/Table/EditableRow.tsx";
import { getKey } from "@probo/ui/src/Molecules/Table/utils.ts";
import { Command } from "cmdk";
import { Suspense, type ReactNode } from "react";
import { type ReactNode, Suspense } from "react";
import { useLazyLoadQuery } from "react-relay";
import type {
GraphQLTaggedNode,

View File

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

View File

@@ -1,9 +1,9 @@
import { Avatar, Badge, IconCrossLargeX } from "@probo/ui";
import { faviconUrl } from "@probo/helpers";
import { Avatar, Badge, IconCrossLargeX } from "@probo/ui";
import type { VendorGraphSelectQuery } from "/__generated__/core/VendorGraphSelectQuery.graphql.ts";
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;

View File

@@ -1,32 +1,32 @@
import { formatDatetime } from "@probo/helpers";
import { useTranslate } from "@probo/i18n";
import {
Button,
Dialog,
DialogContent,
DialogFooter,
type DialogRef,
DurationPicker,
Input,
Label,
PropertyRow,
Textarea,
useDialogRef,
type DialogRef,
} from "@probo/ui";
import type { ReactNode } from "react";
import { useTranslate } from "@probo/i18n";
import { Breadcrumb } from "@probo/ui";
import { graphql } from "relay-runtime";
import { useFragment, useRelayEnvironment } from "react-relay";
import { z } from "zod";
import type { ReactNode } from "react";
import { Controller } from "react-hook-form";
import { formatDatetime } from "@probo/helpers";
import { useFragment, useRelayEnvironment } from "react-relay";
import { graphql } from "relay-runtime";
import { z } from "zod";
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 { PeopleSelectField } from "/components/form/PeopleSelectField";
import { useFormWithSchema } from "/hooks/useFormWithSchema";
import { updateStoreCounter } from "/hooks/useMutationWithIncrement";
import { useMutationWithToasts } from "/hooks/useMutationWithToasts";
import { useOrganizationId } from "/hooks/useOrganizationId";
const taskFragment = graphql`
fragment TaskFormDialogFragment on Task {

View File

@@ -1,4 +1,4 @@
import { promisifyMutation, formatDate, formatDuration } from "@probo/helpers";
import { formatDate, formatDuration, promisifyMutation } from "@probo/helpers";
import { usePageTitle } from "@probo/hooks";
import { useTranslate } from "@probo/i18n";
import {
@@ -26,15 +26,15 @@ import {
} from "react-relay";
import { Link, useLocation, useParams } from "react-router";
import type { MeasureTasksTabQuery$data } from "/__generated__/core/MeasureTasksTabQuery.graphql";
import type { TaskFormDialogFragment$key } from "/__generated__/core/TaskFormDialogFragment.graphql";
import type { TasksCard_TaskRowFragment$key } from "/__generated__/core/TasksCard_TaskRowFragment.graphql";
import type { TasksPageFragment$data } from "/__generated__/core/TasksPageFragment.graphql";
import TaskFormDialog, {
taskUpdateMutation,
} from "/components/tasks/TaskFormDialog";
import { updateStoreCounter } from "/hooks/useMutationWithIncrement";
import { useOrganizationId } from "/hooks/useOrganizationId";
import type { TasksCard_TaskRowFragment$key } from "/__generated__/core/TasksCard_TaskRowFragment.graphql";
import type { TasksPageFragment$data } from "/__generated__/core/TasksPageFragment.graphql";
import type { MeasureTasksTabQuery$data } from "/__generated__/core/MeasureTasksTabQuery.graphql";
import type { TaskFormDialogFragment$key } from "/__generated__/core/TaskFormDialogFragment.graphql";
type Props = {
tasks:

View File

@@ -1,3 +1,5 @@
import { sprintf } from "@probo/helpers";
import { useTranslate } from "@probo/i18n";
import {
Button,
Dialog,
@@ -7,11 +9,9 @@ import {
Spinner,
useDialogRef,
} from "@probo/ui";
import { useTranslate } from "@probo/i18n";
import { sprintf } from "@probo/helpers";
import { useMutationWithToasts } from "/hooks/useMutationWithToasts";
import { deleteTrustCenterReferenceMutation } from "/hooks/graph/TrustCenterReferenceGraph";
import { useMutationWithToasts } from "/hooks/useMutationWithToasts";
type Props = {
children: React.ReactNode;

View File

@@ -1,30 +1,30 @@
import { graphql } from "relay-runtime";
import {
Button,
Tr,
Td,
Table,
Thead,
Tbody,
Th,
IconChevronDown,
Badge,
Field,
Option,
} from "@probo/ui";
import { useTranslate } from "@probo/i18n";
import { useFragment } from "react-relay";
import { useMemo, useState, useCallback } from "react";
import {
sprintf,
getAuditStateVariant,
getAuditStateLabel,
formatDate,
getAuditStateLabel,
getAuditStateVariant,
getTrustCenterVisibilityOptions,
sprintf,
} from "@probo/helpers";
import { useTranslate } from "@probo/i18n";
import {
Badge,
Button,
Field,
IconChevronDown,
Option,
Table,
Tbody,
Td,
Th,
Thead,
Tr,
} from "@probo/ui";
import { useCallback, useMemo, useState } from "react";
import { useFragment } from "react-relay";
import { graphql } from "relay-runtime";
import { useOrganizationId } from "/hooks/useOrganizationId";
import type { TrustCenterAuditsCardFragment$key } from "/__generated__/core/TrustCenterAuditsCardFragment.graphql";
import { useOrganizationId } from "/hooks/useOrganizationId";
const trustCenterAuditFragment = graphql`
fragment TrustCenterAuditsCardFragment on Audit {

View File

@@ -1,23 +1,23 @@
import { graphql } from "relay-runtime";
import {
Button,
Tr,
Td,
Table,
Thead,
Tbody,
Th,
IconChevronDown,
DocumentVersionBadge,
DocumentTypeBadge,
Field,
Option,
Badge,
} from "@probo/ui";
import { getTrustCenterVisibilityOptions, sprintf } from "@probo/helpers";
import { useTranslate } from "@probo/i18n";
import {
Badge,
Button,
DocumentTypeBadge,
DocumentVersionBadge,
Field,
IconChevronDown,
Option,
Table,
Tbody,
Td,
Th,
Thead,
Tr,
} from "@probo/ui";
import { useCallback, useMemo, useState } from "react";
import { useFragment } from "react-relay";
import { useMemo, useState, useCallback } from "react";
import { sprintf, getTrustCenterVisibilityOptions } from "@probo/helpers";
import { graphql } from "relay-runtime";
import type { TrustCenterDocumentsCardFragment$key } from "/__generated__/core/TrustCenterDocumentsCardFragment.graphql";
import { useOrganizationId } from "/hooks/useOrganizationId";

View File

@@ -1,28 +1,28 @@
import { graphql } from "relay-runtime";
import { formatDate, getTrustCenterVisibilityOptions, sprintf } from "@probo/helpers";
import { useTranslate } from "@probo/i18n";
import {
Button,
Tr,
Td,
Table,
Thead,
Tbody,
Th,
IconChevronDown,
Field,
Option,
Badge,
Button,
Field,
IconArrowLink,
IconChevronDown,
IconPencil,
IconTrashCan,
IconArrowLink,
Option,
Table,
Tbody,
Td,
Th,
Thead,
Tr,
} from "@probo/ui";
import { useTranslate } from "@probo/i18n";
import { useCallback, useMemo, useState } from "react";
import { useFragment } from "react-relay";
import { useMemo, useState, useCallback } from "react";
import { sprintf, getTrustCenterVisibilityOptions, formatDate } from "@probo/helpers";
import { graphql } from "relay-runtime";
import type {
TrustCenterFilesCardFragment$key,
TrustCenterFilesCardFragment$data,
TrustCenterFilesCardFragment$key,
} from "/__generated__/core/TrustCenterFilesCardFragment.graphql";
const trustCenterFileFragment = graphql`

View File

@@ -10,14 +10,14 @@ import {
Textarea,
useDialogRef,
} from "@probo/ui";
import { type ReactNode, useState, useImperativeHandle, forwardRef } from "react";
import { forwardRef, type ReactNode, useImperativeHandle, useState } from "react";
import { z } from "zod";
import { useFormWithSchema } from "/hooks/useFormWithSchema";
import {
useCreateTrustCenterReferenceMutation,
useUpdateTrustCenterReferenceMutation,
} from "/hooks/graph/TrustCenterReferenceGraph";
import { useFormWithSchema } from "/hooks/useFormWithSchema";
const referenceSchema = z.object({
name: z.string().min(1, "Name is required"),

View File

@@ -1,36 +1,36 @@
import { useTranslate } from "@probo/i18n";
import { safeOpenUrl } from "@probo/helpers";
import { useTranslate } from "@probo/i18n";
import {
Avatar,
Button,
Table,
Thead,
Tbody,
Tr,
Th,
Td,
IconArrowLink,
IconPencil,
IconPlusLarge,
IconTrashCan,
IconPencil,
IconArrowLink,
Table,
Tbody,
Td,
Th,
Thead,
Tr,
} from "@probo/ui";
import { useRef, useState } from "react";
import { useLazyLoadQuery } from "react-relay";
import type {
TrustCenterReferenceGraphQuery$data,
TrustCenterReferenceGraphQuery,
} from "/__generated__/core/TrustCenterReferenceGraphQuery.graphql";
import {
trustCenterReferencesQuery,
useUpdateTrustCenterReferenceRankMutation,
} from "/hooks/graph/TrustCenterReferenceGraph";
import type {
TrustCenterReferenceGraphQuery,
TrustCenterReferenceGraphQuery$data,
} from "/__generated__/core/TrustCenterReferenceGraphQuery.graphql";
import { DeleteTrustCenterReferenceDialog } from "./DeleteTrustCenterReferenceDialog";
import {
TrustCenterReferenceDialog,
type TrustCenterReferenceDialogRef,
} from "./TrustCenterReferenceDialog";
import { DeleteTrustCenterReferenceDialog } from "./DeleteTrustCenterReferenceDialog";
type Props = {
trustCenterId: string;

View File

@@ -1,24 +1,24 @@
import { graphql } from "relay-runtime";
import {
Button,
Tr,
Td,
Table,
Thead,
Tbody,
Th,
IconChevronDown,
IconCheckmark1,
IconCrossLargeX,
Badge,
} from "@probo/ui";
import { useTranslate } from "@probo/i18n";
import { useFragment } from "react-relay";
import { useMemo, useState } from "react";
import { sprintf } from "@probo/helpers";
import { useTranslate } from "@probo/i18n";
import {
Badge,
Button,
IconCheckmark1,
IconChevronDown,
IconCrossLargeX,
Table,
Tbody,
Td,
Th,
Thead,
Tr,
} from "@probo/ui";
import { useMemo, useState } from "react";
import { useFragment } from "react-relay";
import { graphql } from "relay-runtime";
import { useOrganizationId } from "/hooks/useOrganizationId";
import type { TrustCenterVendorsCardFragment$key } from "/__generated__/core/TrustCenterVendorsCardFragment.graphql";
import { useOrganizationId } from "/hooks/useOrganizationId";
const trustCenterVendorFragment = graphql`
fragment TrustCenterVendorsCardFragment on Vendor {