@gnwebsoft/ui 2.18.10 → 2.18.12

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.
@@ -1,4 +1,4 @@
1
- import { PostModel, ApiResponse } from '../types/index.mjs';
1
+ import { PostModel, ApiResponse, ListResponse, ValidationErrors } from '../types/index.mjs';
2
2
  import { PickerValidDate } from '@mui/x-date-pickers';
3
3
  import { useLocalizationContext } from '@mui/x-date-pickers/internals';
4
4
  import { FieldValues, UseFormSetError } from 'react-hook-form';
@@ -7,7 +7,7 @@ import '@mui/x-data-grid';
7
7
  import '../OptionItem-CzX7oHfv.mjs';
8
8
 
9
9
  declare class api {
10
- static filter<T, TFilter>(url: string, postModel: PostModel<TFilter>): Promise<ApiResponse<T>>;
10
+ static filter<T, TFilter>(url: string, postModel: PostModel<TFilter>): Promise<ApiResponse<ListResponse<T>>>;
11
11
  static post<T>(url: string, body?: any): Promise<ApiResponse<T>>;
12
12
  static get<T>(url: string): Promise<ApiResponse<T>>;
13
13
  static delete<T>(url: string): Promise<ApiResponse<T>>;
@@ -24,7 +24,7 @@ declare const flattenObjectKeys: (obj: any, prefix?: string) => {
24
24
  declare function getTimezone<TDate extends PickerValidDate>(adapter: ReturnType<typeof useLocalizationContext>, value: TDate): string | null;
25
25
 
26
26
  type HandleServerErrorsType<TFieldValues extends FieldValues = FieldValues> = {
27
- errors: Record<string, string[]>;
27
+ errors?: ValidationErrors;
28
28
  setError: UseFormSetError<TFieldValues>;
29
29
  };
30
30
  declare const handleServerErrors: <TFieldValues extends FieldValues = FieldValues>(args: HandleServerErrorsType<TFieldValues>) => void;
@@ -1,4 +1,4 @@
1
- import { PostModel, ApiResponse } from '../types/index.js';
1
+ import { PostModel, ApiResponse, ListResponse, ValidationErrors } from '../types/index.js';
2
2
  import { PickerValidDate } from '@mui/x-date-pickers';
3
3
  import { useLocalizationContext } from '@mui/x-date-pickers/internals';
4
4
  import { FieldValues, UseFormSetError } from 'react-hook-form';
@@ -7,7 +7,7 @@ import '@mui/x-data-grid';
7
7
  import '../OptionItem-CzX7oHfv.js';
8
8
 
9
9
  declare class api {
10
- static filter<T, TFilter>(url: string, postModel: PostModel<TFilter>): Promise<ApiResponse<T>>;
10
+ static filter<T, TFilter>(url: string, postModel: PostModel<TFilter>): Promise<ApiResponse<ListResponse<T>>>;
11
11
  static post<T>(url: string, body?: any): Promise<ApiResponse<T>>;
12
12
  static get<T>(url: string): Promise<ApiResponse<T>>;
13
13
  static delete<T>(url: string): Promise<ApiResponse<T>>;
@@ -24,7 +24,7 @@ declare const flattenObjectKeys: (obj: any, prefix?: string) => {
24
24
  declare function getTimezone<TDate extends PickerValidDate>(adapter: ReturnType<typeof useLocalizationContext>, value: TDate): string | null;
25
25
 
26
26
  type HandleServerErrorsType<TFieldValues extends FieldValues = FieldValues> = {
27
- errors: Record<string, string[]>;
27
+ errors?: ValidationErrors;
28
28
  setError: UseFormSetError<TFieldValues>;
29
29
  };
30
30
  declare const handleServerErrors: <TFieldValues extends FieldValues = FieldValues>(args: HandleServerErrorsType<TFieldValues>) => void;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gnwebsoft/ui",
3
- "version": "2.18.10",
3
+ "version": "2.18.12",
4
4
  "description": "A set of reusable wrappers for MUI v6",
5
5
  "author": "GNWebsoft Private Limited",
6
6
  "license": "",