Skip to content

A full-featured CRM built with React, shadcn/ui, and Supabase.

fix imports

erwanMarmelab67a15df07bce
diff --git a/src/components/admin/badge-field.tsx b/src/components/admin/badge-field.tsx
index 98e6dfee..39aaab30 100644
--- a/src/components/admin/badge-field.tsx
+++ b/src/components/admin/badge-field.tsx
@@ -2,7 +2,7 @@ import * as React from "react";
import type { RaRecord } from "ra-core";
import { useFieldValue, useTranslate } from "ra-core";
import { Badge } from "@/components/ui/badge";
-import type { FieldProps } from "@/lib/field.type.ts";
+import type { FieldProps } from "@/lib/field.type";
type BadgeProps = React.ComponentProps<typeof Badge>;
@@ -59,6 +59,7 @@ export const BadgeField = <RecordType extends RaRecord = RaRecord>({
};
export interface BadgeFieldProps<RecordType extends RaRecord = RaRecord>
- extends FieldProps<RecordType>, BadgeProps {
+ extends FieldProps<RecordType>,
+ BadgeProps {
variant?: "default" | "outline" | "secondary" | "destructive";
}
diff --git a/src/components/admin/boolean-field.tsx b/src/components/admin/boolean-field.tsx
index 60c7819c..2b070ea5 100644
--- a/src/components/admin/boolean-field.tsx
+++ b/src/components/admin/boolean-field.tsx
@@ -3,7 +3,7 @@ import { Check, X } from "lucide-react";
import type { RaRecord } from "ra-core";
import { useFieldValue, useTranslate } from "ra-core";
-import type { FieldProps } from "@/lib/field.type.ts";
+import type { FieldProps } from "@/lib/field.type";
import { cn } from "@/lib/utils";
import {
Tooltip,
diff --git a/src/components/admin/date-field.tsx b/src/components/admin/date-field.tsx
index bbfa139c..5af7e0a9 100644
--- a/src/components/admin/date-field.tsx
+++ b/src/components/admin/date-field.tsx
@@ -1,7 +1,7 @@
import type { HTMLAttributes } from "react";
import { genericMemo, useFieldValue, useTranslate } from "ra-core";
-import type { FieldProps } from "@/lib/field.type.ts";
+import type { FieldProps } from "@/lib/field.type";
const DateFieldImpl = <
// eslint-disable-next-line @typescript-eslint/no-explicit-any
@@ -108,8 +108,8 @@ export const DateField = genericMemo(DateFieldImpl);
export interface DateFieldProps<
// eslint-disable-next-line @typescript-eslint/no-explicit-any
RecordType extends Record<string, any> = Record<string, any>,
->
- extends FieldProps<RecordType>, HTMLAttributes<HTMLSpanElement> {
+> extends FieldProps<RecordType>,
+ HTMLAttributes<HTMLSpanElement> {
locales?: Intl.LocalesArgument;
options?: Intl.DateTimeFormatOptions;
showTime?: boolean;
diff --git a/src/components/admin/email-field.tsx b/src/components/admin/email-field.tsx
index 2753a1fd..3ce0231f 100644
--- a/src/components/admin/email-field.tsx
+++ b/src/components/admin/email-field.tsx
@@ -3,7 +3,7 @@ import type { AnchorHTMLAttributes } from "react";
import React from "react";
import { cn } from "@/lib/utils";
-import type { FieldProps } from "@/lib/field.type.ts";
+import type { FieldProps } from "@/lib/field.type";
const EmailFieldImpl = <
// eslint-disable-next-line @typescript-eslint/no-explicit-any
@@ -65,8 +65,8 @@ export const EmailField = genericMemo(EmailFieldImpl);
export interface EmailFieldProps<
// eslint-disable-next-line @typescript-eslint/no-explicit-any
RecordType extends Record<string, any> = Record<string, any>,
->
- extends FieldProps<RecordType>, AnchorHTMLAttributes<HTMLAnchorElement> {}
+> extends FieldProps<RecordType>,
+ AnchorHTMLAttributes<HTMLAnchorElement> {}
// useful to prevent click bubbling in a DataTable with rowClick
const stopPropagation = (e: React.MouseEvent<HTMLAnchorElement>) =>
diff --git a/src/components/admin/file-field.tsx b/src/components/admin/file-field.tsx
index f28a7fce..51a0c2a2 100644
--- a/src/components/admin/file-field.tsx
+++ b/src/components/admin/file-field.tsx
@@ -3,7 +3,7 @@ import get from "lodash/get";
import type { ExtractRecordPaths, HintedString } from "ra-core";
import { useFieldValue, useTranslate } from "ra-core";
import { cn } from "@/lib/utils";
-import type { FieldProps } from "@/lib/field.type.ts";
+import type { FieldProps } from "@/lib/field.type";
/**
* Displays a downloadable file link with customizable title and target.
@@ -111,8 +111,8 @@ export const FileField = <
export interface FileFieldProps<
// eslint-disable-next-line @typescript-eslint/no-explicit-any
RecordType extends Record<string, any> = Record<string, any>,
->
- extends FieldProps<RecordType>, HTMLAttributes<HTMLElement> {
+> extends FieldProps<RecordType>,
+ HTMLAttributes<HTMLElement> {
/**
* The source of the link to the file, for an array of files.
*/
diff --git a/src/components/admin/file-input.tsx b/src/components/admin/file-input.tsx
index eb8c7a3e..e6fb312b 100644
--- a/src/components/admin/file-input.tsx
+++ b/src/components/admin/file-input.tsx
@@ -26,7 +26,7 @@ import { XCircle } from "lucide-react";
import { cn } from "@/lib/utils";
import { FormError, FormField, FormLabel } from "@/components/admin/form";
import { InputHelperText } from "@/components/admin/input-helper-text";
-import { Button } from "@/components/ui/button.tsx";
+import { Button } from "@/components/ui/button";
/**
* File upload input with drag-and-drop support and preview capabilities.
diff --git a/src/components/admin/form.tsx b/src/components/admin/form.tsx
index 87323df5..d1e8f6b9 100644
--- a/src/components/admin/form.tsx
+++ b/src/components/admin/form.tsx
@@ -19,7 +19,7 @@ import { FormProvider, useFormContext, useFormState } from "react-hook-form";
import type { UseMutationOptions } from "@tanstack/react-query";
import { cn } from "@/lib/utils";
import { Label } from "@/components/ui/label";
-import { Button } from "@/components/ui/button.tsx";
+import { Button } from "@/components/ui/button";
const Form = FormProvider;
@@ -283,7 +283,12 @@ interface Props<
>;
transform?: TransformData;
variant?:
- "default" | "destructive" | "outline" | "secondary" | "ghost" | "link";
+ | "default"
+ | "destructive"
+ | "outline"
+ | "secondary"
+ | "ghost"
+ | "link";
}
export type SaveButtonProps<RecordType extends RaRecord = RaRecord> =
diff --git a/src/components/admin/image-field.tsx b/src/components/admin/image-field.tsx
index 38afc23f..87483e72 100644
--- a/src/components/admin/image-field.tsx
+++ b/src/components/admin/image-field.tsx
@@ -5,7 +5,7 @@ import type { ExtractRecordPaths, HintedString } from "ra-core";
import { useFieldValue, useTranslate } from "ra-core";
import { cn } from "@/lib/utils";
-import type { FieldProps } from "@/lib/field.type.ts";
+import type { FieldProps } from "@/lib/field.type";
/**
* Displays an image or a list of images from a record field inside an img element or a ul of img elements.
@@ -89,8 +89,8 @@ ImageField.displayName = "ImageField";
export interface ImageFieldProps<
RecordType extends Record<string, any> = Record<string, any>,
->
- extends FieldProps<RecordType>, HTMLAttributes<HTMLSpanElement> {
+> extends FieldProps<RecordType>,
+ HTMLAttributes<HTMLSpanElement> {
defaultValue?: any;
src?: string;
title?: HintedString<ExtractRecordPaths<RecordType>>;
diff --git a/src/components/admin/number-field.tsx b/src/components/admin/number-field.tsx
index 9d095263..b65c9fa0 100644
--- a/src/components/admin/number-field.tsx
+++ b/src/components/admin/number-field.tsx
@@ -1,7 +1,7 @@
/* eslint-disable @typescript-eslint/no-explicit-any */
import type { HTMLAttributes } from "react";
import { useFieldValue, useTranslate } from "ra-core";
-import type { FieldProps } from "@/lib/field.type.ts";
+import type { FieldProps } from "@/lib/field.type";
/**
* Displays a numeric value with locale-specific formatting.
@@ -68,8 +68,8 @@ export const NumberField = <
export interface NumberFieldProps<
RecordType extends Record<string, any> = Record<string, any>,
->
- extends FieldProps<RecordType>, HTMLAttributes<HTMLSpanElement> {
+> extends FieldProps<RecordType>,
+ HTMLAttributes<HTMLSpanElement> {
locales?: string | string[];
options?: object;
transform?: (value: any) => number;
diff --git a/src/components/admin/select-field.tsx b/src/components/admin/select-field.tsx
index 7248318e..3763c5ad 100644
--- a/src/components/admin/select-field.tsx
+++ b/src/components/admin/select-field.tsx
@@ -2,7 +2,7 @@ import type { HTMLAttributes } from "react";
import type { ChoicesProps } from "ra-core";
import { genericMemo, useChoices, useFieldValue, useTranslate } from "ra-core";
-import type { FieldProps } from "@/lib/field.type.ts";
+import type { FieldProps } from "@/lib/field.type";
/**
* Displays a value from an enumeration by mapping it to a human-readable label.
@@ -102,8 +102,9 @@ export const SelectField = genericMemo(SelectFieldImpl);
export interface SelectFieldProps<
// eslint-disable-next-line @typescript-eslint/no-explicit-any
RecordType extends Record<string, any> = Record<string, any>,
->
- extends
- Omit<ChoicesProps, "disableValue" | "createValue" | "createHintValue">,
+> extends Omit<
+ ChoicesProps,
+ "disableValue" | "createValue" | "createHintValue"
+ >,
FieldProps<RecordType>,
HTMLAttributes<HTMLSpanElement> {}
diff --git a/src/components/admin/text-field.tsx b/src/components/admin/text-field.tsx
index 3d1dd33f..d0a8cb0f 100644
--- a/src/components/admin/text-field.tsx
+++ b/src/components/admin/text-field.tsx
@@ -1,7 +1,7 @@
/* eslint-disable @typescript-eslint/no-explicit-any */
import type { HTMLAttributes } from "react";
import { useFieldValue, useTranslate } from "ra-core";
-import type { FieldProps } from "@/lib/field.type.ts";
+import type { FieldProps } from "@/lib/field.type";
/**
* Displays a text value from a record field inside a span element.
@@ -57,5 +57,5 @@ export const TextField = <
export interface TextFieldProps<
RecordType extends Record<string, any> = Record<string, any>,
->
- extends FieldProps<RecordType>, HTMLAttributes<HTMLSpanElement> {}
+> extends FieldProps<RecordType>,
+ HTMLAttributes<HTMLSpanElement> {}
diff --git a/src/components/admin/url-field.tsx b/src/components/admin/url-field.tsx
index 9dc6b835..5d5e82f6 100644
--- a/src/components/admin/url-field.tsx
+++ b/src/components/admin/url-field.tsx
@@ -3,7 +3,7 @@ import type { AnchorHTMLAttributes } from "react";
import * as React from "react";
import { cn } from "@/lib/utils";
-import type { FieldProps } from "@/lib/field.type.ts";
+import type { FieldProps } from "@/lib/field.type";
/**
* Displays a URL as a clickable hyperlink.
@@ -74,8 +74,8 @@ export const UrlField = genericMemo(UrlFieldImpl);
export interface UrlFieldProps<
//eslint-disable-next-line @typescript-eslint/no-explicit-any
RecordType extends Record<string, any> = Record<string, any>,
->
- extends FieldProps<RecordType>, AnchorHTMLAttributes<HTMLAnchorElement> {}
+> extends FieldProps<RecordType>,
+ AnchorHTMLAttributes<HTMLAnchorElement> {}
// useful to prevent click bubbling in a DataTable with rowClick
const stopPropagation = (e: React.MouseEvent<HTMLAnchorElement>) =>