@espresso-lab/mantine-data-table 2.2.0 → 2.2.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -7,7 +7,7 @@ export interface EntityFormProps<T extends BaseEntity> {
7
7
  recordId?: string | number;
8
8
  submitting: boolean;
9
9
  error?: Error | null;
10
- onPersist: (values: T) => Promise<boolean>;
10
+ onPersist: (values: T) => Promise<void>;
11
11
  onClose: () => void;
12
12
  }
13
13
  export declare function EntityForm<T extends BaseEntity>({ fields, steps, record, recordId, submitting, error, onPersist, onClose, }: EntityFormProps<T>): import("react/jsx-runtime").JSX.Element;
@@ -1,4 +1,14 @@
1
1
  import { GetHeaders } from '../Context/DataTableContext.tsx';
2
+ export interface FieldViolation {
3
+ field: string;
4
+ message: string;
5
+ }
6
+ export declare class ApiError extends Error {
7
+ readonly status: number;
8
+ readonly violations?: FieldViolation[];
9
+ constructor(message: string, status: number, violations?: FieldViolation[]);
10
+ }
11
+ export declare function getFieldViolations(error: unknown): FieldViolation[] | undefined;
2
12
  export declare function parseApiError(error: unknown): {
3
13
  message: string;
4
14
  code?: string;