@bluemarble/bm-components 0.2.0 → 0.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.
package/dist/index.d.mts CHANGED
@@ -17,7 +17,7 @@ interface FilterProps$1 {
17
17
  value: string;
18
18
  transformer?: (value: string | number | Date) => string;
19
19
  }
20
- declare type IFilter = FilterProps$1;
20
+ type IFilter = FilterProps$1;
21
21
  interface GridProps$1<T> {
22
22
  columnTitles: ColumnTitleProps[];
23
23
  defaultData: T[];
@@ -35,7 +35,7 @@ interface GridProps$1<T> {
35
35
  noFilters?: boolean;
36
36
  primaryKey?: string;
37
37
  }
38
- declare const Grid: <ObjectType>(props: React.PropsWithChildren<GridProps$1<ObjectType>>) => JSX.Element;
38
+ declare const Grid: <ObjectType>(props: React.PropsWithChildren<GridProps$1<ObjectType>>) => React.JSX.Element;
39
39
 
40
40
  declare function filterData<T>(filters: FilterProps$1[], defaultData: {
41
41
  current: T[];
@@ -61,7 +61,7 @@ interface OnSaveProps {
61
61
  value: string;
62
62
  data: Record<string, any>;
63
63
  }
64
- declare const EditableTableCell: (allProps: EditableTableCellProps) => JSX.Element;
64
+ declare const EditableTableCell: (allProps: EditableTableCellProps) => React.JSX.Element;
65
65
 
66
66
  interface CustomTableRowProps extends TableRowProps {
67
67
  striped?: boolean;
@@ -71,9 +71,9 @@ interface CustomTableRowProps extends TableRowProps {
71
71
  onSave?: (props: OnSaveProps) => void;
72
72
  children: React.ReactNode;
73
73
  }
74
- declare const Tr: React.MemoExoticComponent<(props: CustomTableRowProps) => JSX.Element>;
74
+ declare const Tr: React.MemoExoticComponent<(props: CustomTableRowProps) => React.JSX.Element>;
75
75
 
76
- declare const Td: React.MemoExoticComponent<({ children, ...props }: TableCellProps) => JSX.Element>;
76
+ declare const Td: React.MemoExoticComponent<({ children, ...props }: TableCellProps) => React.JSX.Element>;
77
77
 
78
78
  interface InputProps extends StandardTextFieldProps {
79
79
  name: string;
@@ -91,15 +91,14 @@ interface InputMaskProps extends Partial<StandardTextFieldProps> {
91
91
  mask: IMask$1.AnyMaskedOptions;
92
92
  onChangeValue?: (value: string, unmaskedValue: string) => void;
93
93
  }
94
- declare function InputMask({ withFormik, ...rest }: InputMaskProps): JSX.Element;
94
+ declare function InputMask({ withFormik, ...rest }: InputMaskProps): React.JSX.Element;
95
95
 
96
96
  interface CustomInputLabelProps extends InputLabelProps {
97
97
  size?: 'small';
98
98
  }
99
- interface SelectProps extends SelectProps$1 {
99
+ interface SelectProps<T = unknown> extends SelectProps$1<T, 'outlined'> {
100
100
  name: string;
101
101
  label: string;
102
- defaultValue?: string;
103
102
  withFormik?: boolean;
104
103
  FormControlProps?: Partial<FormControlProps>;
105
104
  InputLabelProps?: Partial<CustomInputLabelProps>;
@@ -107,7 +106,7 @@ interface SelectProps extends SelectProps$1 {
107
106
  }
108
107
  declare const Select: FC<SelectProps>;
109
108
 
110
- declare type MuiAutocompleteBaseProps<T> = Omit<AutocompleteProps$1<T, boolean, undefined, boolean>, 'renderInput' | 'getOptionLabel'>;
109
+ type MuiAutocompleteBaseProps<T> = Omit<AutocompleteProps$1<T, boolean, undefined, boolean>, 'renderInput' | 'getOptionLabel'>;
111
110
  interface AutocompleteWithoutProps<T> extends MuiAutocompleteBaseProps<T> {
112
111
  name?: never;
113
112
  withFormik: false;
@@ -129,10 +128,10 @@ interface AutocompleteWithFormikProps<T> extends MuiAutocompleteBaseProps<T> {
129
128
  getOptionLabel?: (option: T) => string;
130
129
  getOptionValue?: (option: T) => string | number;
131
130
  }
132
- declare type AutocompleteProps<T> = AutocompleteWithoutProps<T> | AutocompleteWithFormikProps<T>;
133
- declare function Autocomplete<T>({ withFormik, name, getOptionValue, ...rest }: AutocompleteProps<T>): JSX.Element;
131
+ type AutocompleteProps<T> = AutocompleteWithoutProps<T> | AutocompleteWithFormikProps<T>;
132
+ declare function Autocomplete<T>({ withFormik, name, getOptionValue, ...rest }: AutocompleteProps<T>): React.JSX.Element;
134
133
 
135
- declare type CheckboxProps = CheckboxWithFormik | CheckboxWithoutFormik;
134
+ type CheckboxProps = CheckboxWithFormik | CheckboxWithoutFormik;
136
135
  interface CheckboxWithFormik extends CheckboxProps$1 {
137
136
  name: string;
138
137
  label?: string;
@@ -145,9 +144,9 @@ interface CheckboxWithoutFormik extends CheckboxProps$1 {
145
144
  withFormik: false;
146
145
  FormControlLabelProps?: Partial<FormControlLabelProps>;
147
146
  }
148
- declare const Checkbox: ({ withFormik, name, ...props }: CheckboxProps) => JSX.Element;
147
+ declare const Checkbox: ({ withFormik, name, ...props }: CheckboxProps) => React.JSX.Element;
149
148
 
150
- declare type SwitchProps = SwitchWithFormik | SwitchWithoutFormik;
149
+ type SwitchProps = SwitchWithFormik | SwitchWithoutFormik;
151
150
  interface SwitchWithFormik extends SwitchProps$1 {
152
151
  name: string;
153
152
  label?: string;
@@ -160,13 +159,13 @@ interface SwitchWithoutFormik extends SwitchProps$1 {
160
159
  withFormik: false;
161
160
  FormControlLabelProps?: Partial<FormControlLabelProps>;
162
161
  }
163
- declare const Switch: ({ withFormik, name, ...props }: SwitchProps) => JSX.Element;
162
+ declare const Switch: ({ withFormik, name, ...props }: SwitchProps) => React.JSX.Element;
164
163
 
165
- declare type RadioOptionProps = {
164
+ type RadioOptionProps = {
166
165
  value: string | number | boolean;
167
166
  label: string;
168
167
  };
169
- declare type RadioOptionsProps = RadioWithFormik | RadioWithoutFormik;
168
+ type RadioOptionsProps = RadioWithFormik | RadioWithoutFormik;
170
169
  interface RadioWithFormik extends RadioGroupProps {
171
170
  name: string;
172
171
  label?: string;
@@ -179,14 +178,14 @@ interface RadioWithoutFormik extends RadioGroupProps {
179
178
  options: RadioOptionProps[];
180
179
  withFormik: false;
181
180
  }
182
- declare const Radio: ({ name, withFormik, ...rest }: RadioOptionsProps) => JSX.Element;
181
+ declare const Radio: ({ name, withFormik, ...rest }: RadioOptionsProps) => React.JSX.Element;
183
182
 
184
183
  interface LargeButtonProps extends ButtonProps {
185
184
  loading?: boolean;
186
185
  children: ReactNode;
187
186
  CircularProgressProps?: CircularProgressProps;
188
187
  }
189
- declare const LargeButton: ({ loading, children, CircularProgressProps, sx, ...rest }: LargeButtonProps) => JSX.Element;
188
+ declare const LargeButton: ({ loading, children, CircularProgressProps, sx, ...rest }: LargeButtonProps) => React.JSX.Element;
190
189
 
191
190
  declare function getTabProps(index: string): {
192
191
  id: string;
@@ -197,7 +196,7 @@ interface TabPanelProps {
197
196
  value: number;
198
197
  index: number;
199
198
  }
200
- declare const TabPanel: (props: TabPanelProps) => JSX.Element;
199
+ declare const TabPanel: (props: TabPanelProps) => React.JSX.Element;
201
200
 
202
201
  interface ColumnsProps {
203
202
  label: string;
@@ -232,13 +231,13 @@ interface GridProps {
232
231
  isLoading?: boolean;
233
232
  hideFooter?: boolean;
234
233
  }
235
- declare function BaseGrid({ columns, children, paperProps, tableBodyProps, tableHeadProps, tableProps, sortedDirection, sortedBy, onSortBy, dense, striped, bordered, currentPage, totalNumberOfPages, onPageChange, rowsPerPage, setRowsPerPage, rowsPerPageOptions, hideFooter, prependColumn, appendColumn, isLoading }: GridProps): JSX.Element;
234
+ declare function BaseGrid({ columns, children, paperProps, tableBodyProps, tableHeadProps, tableProps, sortedDirection, sortedBy, onSortBy, dense, striped, bordered, currentPage, totalNumberOfPages, onPageChange, rowsPerPage, setRowsPerPage, rowsPerPageOptions, hideFooter, prependColumn, appendColumn, isLoading }: GridProps): React.JSX.Element;
236
235
 
237
- declare type ModalProps = {
236
+ type ModalProps = {
238
237
  open: boolean;
239
238
  onClose: () => void;
240
239
  } & ModalProps$1;
241
- declare const Modal: ({ open, onClose, ...rest }: ModalProps) => JSX.Element;
240
+ declare const Modal: ({ open, onClose, ...rest }: ModalProps) => React.JSX.Element;
242
241
 
243
242
  declare function GetInputLabel<T extends Array<Record<string, any>>, K extends T[number]['name']>(columns: T): (columnName: K) => {
244
243
  label: any;
@@ -257,20 +256,20 @@ interface DialogCustomProps extends DialogProps {
257
256
  options: DialogOptionsProps[];
258
257
  loading: boolean;
259
258
  }
260
- declare const Dialog: ({ open, title, loading, body, options, ...rest }: DialogCustomProps) => JSX.Element;
259
+ declare const Dialog: ({ open, title, loading, body, options, ...rest }: DialogCustomProps) => React.JSX.Element;
261
260
 
262
261
  declare class HttpError extends Error {
263
262
  status: number;
264
263
  constructor(status: number, message: any);
265
264
  }
266
265
 
267
- declare type PossibleMethods = "GET" | "POST" | "PUT" | "PATCH" | "DELETE";
268
- declare type HandlerProps = (req: NextApiRequest & {
266
+ type PossibleMethods = "GET" | "POST" | "PUT" | "PATCH" | "DELETE";
267
+ type HandlerProps = (req: NextApiRequest & {
269
268
  user?: number;
270
269
  }, res: NextApiResponse) => Promise<any>;
271
- declare type MethodProps = Partial<Record<PossibleMethods, HandlerProps>>;
272
- declare type MiddlewaresProps = ((handler: HandlerProps) => HandlerProps)[];
273
- declare type ConstructorProps = {
270
+ type MethodProps = Partial<Record<PossibleMethods, HandlerProps>>;
271
+ type MiddlewaresProps = ((handler: HandlerProps) => HandlerProps)[];
272
+ type ConstructorProps = {
274
273
  middlewares?: MiddlewaresProps;
275
274
  onFinally: (req: NextApiRequest) => Promise<void>;
276
275
  };
@@ -287,8 +286,8 @@ declare class ApiHelper {
287
286
  }): ApiHelper;
288
287
  }
289
288
 
290
- declare type Methods = 'get' | 'post' | 'put' | 'delete' | 'patch' | 'options';
291
- declare type HandleProps = {
289
+ type Methods = 'get' | 'post' | 'put' | 'delete' | 'patch' | 'options';
290
+ type HandleProps = {
292
291
  name: `${Methods}:${string}`;
293
292
  };
294
293
  declare function useFormHelper(): {
@@ -299,8 +298,8 @@ declare function useFormHelper(): {
299
298
  createAlert(message: string, type: _mui_material.AlertColor): void;
300
299
  };
301
300
 
302
- declare type FilterCompareType = 'gte' | 'lte' | 'lt' | 'gt' | 'equal' | 'in' | 'notEqual' | 'notIn';
303
- declare type FilterProps = {
301
+ type FilterCompareType = 'gte' | 'lte' | 'lt' | 'gt' | 'equal' | 'in' | 'notEqual' | 'notIn';
302
+ type FilterProps = {
304
303
  id?: string;
305
304
  prop: string;
306
305
  value: unknown;
@@ -356,25 +355,25 @@ declare const useAlert: () => {
356
355
  createAlert(message: string, type: _mui_material.AlertColor): void;
357
356
  };
358
357
 
359
- declare type FormHelperContextProps = {
358
+ type FormHelperContextProps = {
360
359
  formatErrorMessage: (message: any) => string;
361
360
  api: AxiosInstance;
362
361
  };
363
362
  declare const FormHelperContext: React.Context<FormHelperContextProps>;
364
- declare type FormHelperProviderProps = {
363
+ type FormHelperProviderProps = {
365
364
  formatErrorMessage: (message: any) => string;
366
365
  children: ReactNode;
367
366
  api: AxiosInstance;
368
367
  };
369
- declare const FormHelperProvider: ({ formatErrorMessage, api, children }: FormHelperProviderProps) => JSX.Element;
368
+ declare const FormHelperProvider: ({ formatErrorMessage, api, children }: FormHelperProviderProps) => React.JSX.Element;
370
369
 
371
- declare type AlertContextProps = {
370
+ type AlertContextProps = {
372
371
  createAlert(message: string, type: AlertColor): void;
373
372
  };
374
373
  declare const AlertContext: React.Context<AlertContextProps>;
375
- declare type AlertProviderProps = {
374
+ type AlertProviderProps = {
376
375
  children: ReactNode;
377
376
  };
378
- declare const AlertProvider: ({ children }: AlertProviderProps) => JSX.Element;
377
+ declare const AlertProvider: ({ children }: AlertProviderProps) => React.JSX.Element;
379
378
 
380
379
  export { AlertContext, AlertProvider, ApiHelper, Autocomplete, BaseGrid, Checkbox, type ColumnTitleProps, type ColumnsProps, Dialog, EditableTableCell, type FilterCompareType, type FilterProps, FormHelperContext, FormHelperProvider, GetInputLabel, Grid, HttpError, type IFilter, Input, InputMask, LargeButton, Modal, Radio, Select, Switch, TabPanel, type TabPanelProps, Td, Tr, createFilter, filterData, getTabProps, useAlert, useEvent, useFilter, useFormHelper, useGrid, useLoading };
package/dist/index.d.ts CHANGED
@@ -17,7 +17,7 @@ interface FilterProps$1 {
17
17
  value: string;
18
18
  transformer?: (value: string | number | Date) => string;
19
19
  }
20
- declare type IFilter = FilterProps$1;
20
+ type IFilter = FilterProps$1;
21
21
  interface GridProps$1<T> {
22
22
  columnTitles: ColumnTitleProps[];
23
23
  defaultData: T[];
@@ -35,7 +35,7 @@ interface GridProps$1<T> {
35
35
  noFilters?: boolean;
36
36
  primaryKey?: string;
37
37
  }
38
- declare const Grid: <ObjectType>(props: React.PropsWithChildren<GridProps$1<ObjectType>>) => JSX.Element;
38
+ declare const Grid: <ObjectType>(props: React.PropsWithChildren<GridProps$1<ObjectType>>) => React.JSX.Element;
39
39
 
40
40
  declare function filterData<T>(filters: FilterProps$1[], defaultData: {
41
41
  current: T[];
@@ -61,7 +61,7 @@ interface OnSaveProps {
61
61
  value: string;
62
62
  data: Record<string, any>;
63
63
  }
64
- declare const EditableTableCell: (allProps: EditableTableCellProps) => JSX.Element;
64
+ declare const EditableTableCell: (allProps: EditableTableCellProps) => React.JSX.Element;
65
65
 
66
66
  interface CustomTableRowProps extends TableRowProps {
67
67
  striped?: boolean;
@@ -71,9 +71,9 @@ interface CustomTableRowProps extends TableRowProps {
71
71
  onSave?: (props: OnSaveProps) => void;
72
72
  children: React.ReactNode;
73
73
  }
74
- declare const Tr: React.MemoExoticComponent<(props: CustomTableRowProps) => JSX.Element>;
74
+ declare const Tr: React.MemoExoticComponent<(props: CustomTableRowProps) => React.JSX.Element>;
75
75
 
76
- declare const Td: React.MemoExoticComponent<({ children, ...props }: TableCellProps) => JSX.Element>;
76
+ declare const Td: React.MemoExoticComponent<({ children, ...props }: TableCellProps) => React.JSX.Element>;
77
77
 
78
78
  interface InputProps extends StandardTextFieldProps {
79
79
  name: string;
@@ -91,15 +91,14 @@ interface InputMaskProps extends Partial<StandardTextFieldProps> {
91
91
  mask: IMask$1.AnyMaskedOptions;
92
92
  onChangeValue?: (value: string, unmaskedValue: string) => void;
93
93
  }
94
- declare function InputMask({ withFormik, ...rest }: InputMaskProps): JSX.Element;
94
+ declare function InputMask({ withFormik, ...rest }: InputMaskProps): React.JSX.Element;
95
95
 
96
96
  interface CustomInputLabelProps extends InputLabelProps {
97
97
  size?: 'small';
98
98
  }
99
- interface SelectProps extends SelectProps$1 {
99
+ interface SelectProps<T = unknown> extends SelectProps$1<T, 'outlined'> {
100
100
  name: string;
101
101
  label: string;
102
- defaultValue?: string;
103
102
  withFormik?: boolean;
104
103
  FormControlProps?: Partial<FormControlProps>;
105
104
  InputLabelProps?: Partial<CustomInputLabelProps>;
@@ -107,7 +106,7 @@ interface SelectProps extends SelectProps$1 {
107
106
  }
108
107
  declare const Select: FC<SelectProps>;
109
108
 
110
- declare type MuiAutocompleteBaseProps<T> = Omit<AutocompleteProps$1<T, boolean, undefined, boolean>, 'renderInput' | 'getOptionLabel'>;
109
+ type MuiAutocompleteBaseProps<T> = Omit<AutocompleteProps$1<T, boolean, undefined, boolean>, 'renderInput' | 'getOptionLabel'>;
111
110
  interface AutocompleteWithoutProps<T> extends MuiAutocompleteBaseProps<T> {
112
111
  name?: never;
113
112
  withFormik: false;
@@ -129,10 +128,10 @@ interface AutocompleteWithFormikProps<T> extends MuiAutocompleteBaseProps<T> {
129
128
  getOptionLabel?: (option: T) => string;
130
129
  getOptionValue?: (option: T) => string | number;
131
130
  }
132
- declare type AutocompleteProps<T> = AutocompleteWithoutProps<T> | AutocompleteWithFormikProps<T>;
133
- declare function Autocomplete<T>({ withFormik, name, getOptionValue, ...rest }: AutocompleteProps<T>): JSX.Element;
131
+ type AutocompleteProps<T> = AutocompleteWithoutProps<T> | AutocompleteWithFormikProps<T>;
132
+ declare function Autocomplete<T>({ withFormik, name, getOptionValue, ...rest }: AutocompleteProps<T>): React.JSX.Element;
134
133
 
135
- declare type CheckboxProps = CheckboxWithFormik | CheckboxWithoutFormik;
134
+ type CheckboxProps = CheckboxWithFormik | CheckboxWithoutFormik;
136
135
  interface CheckboxWithFormik extends CheckboxProps$1 {
137
136
  name: string;
138
137
  label?: string;
@@ -145,9 +144,9 @@ interface CheckboxWithoutFormik extends CheckboxProps$1 {
145
144
  withFormik: false;
146
145
  FormControlLabelProps?: Partial<FormControlLabelProps>;
147
146
  }
148
- declare const Checkbox: ({ withFormik, name, ...props }: CheckboxProps) => JSX.Element;
147
+ declare const Checkbox: ({ withFormik, name, ...props }: CheckboxProps) => React.JSX.Element;
149
148
 
150
- declare type SwitchProps = SwitchWithFormik | SwitchWithoutFormik;
149
+ type SwitchProps = SwitchWithFormik | SwitchWithoutFormik;
151
150
  interface SwitchWithFormik extends SwitchProps$1 {
152
151
  name: string;
153
152
  label?: string;
@@ -160,13 +159,13 @@ interface SwitchWithoutFormik extends SwitchProps$1 {
160
159
  withFormik: false;
161
160
  FormControlLabelProps?: Partial<FormControlLabelProps>;
162
161
  }
163
- declare const Switch: ({ withFormik, name, ...props }: SwitchProps) => JSX.Element;
162
+ declare const Switch: ({ withFormik, name, ...props }: SwitchProps) => React.JSX.Element;
164
163
 
165
- declare type RadioOptionProps = {
164
+ type RadioOptionProps = {
166
165
  value: string | number | boolean;
167
166
  label: string;
168
167
  };
169
- declare type RadioOptionsProps = RadioWithFormik | RadioWithoutFormik;
168
+ type RadioOptionsProps = RadioWithFormik | RadioWithoutFormik;
170
169
  interface RadioWithFormik extends RadioGroupProps {
171
170
  name: string;
172
171
  label?: string;
@@ -179,14 +178,14 @@ interface RadioWithoutFormik extends RadioGroupProps {
179
178
  options: RadioOptionProps[];
180
179
  withFormik: false;
181
180
  }
182
- declare const Radio: ({ name, withFormik, ...rest }: RadioOptionsProps) => JSX.Element;
181
+ declare const Radio: ({ name, withFormik, ...rest }: RadioOptionsProps) => React.JSX.Element;
183
182
 
184
183
  interface LargeButtonProps extends ButtonProps {
185
184
  loading?: boolean;
186
185
  children: ReactNode;
187
186
  CircularProgressProps?: CircularProgressProps;
188
187
  }
189
- declare const LargeButton: ({ loading, children, CircularProgressProps, sx, ...rest }: LargeButtonProps) => JSX.Element;
188
+ declare const LargeButton: ({ loading, children, CircularProgressProps, sx, ...rest }: LargeButtonProps) => React.JSX.Element;
190
189
 
191
190
  declare function getTabProps(index: string): {
192
191
  id: string;
@@ -197,7 +196,7 @@ interface TabPanelProps {
197
196
  value: number;
198
197
  index: number;
199
198
  }
200
- declare const TabPanel: (props: TabPanelProps) => JSX.Element;
199
+ declare const TabPanel: (props: TabPanelProps) => React.JSX.Element;
201
200
 
202
201
  interface ColumnsProps {
203
202
  label: string;
@@ -232,13 +231,13 @@ interface GridProps {
232
231
  isLoading?: boolean;
233
232
  hideFooter?: boolean;
234
233
  }
235
- declare function BaseGrid({ columns, children, paperProps, tableBodyProps, tableHeadProps, tableProps, sortedDirection, sortedBy, onSortBy, dense, striped, bordered, currentPage, totalNumberOfPages, onPageChange, rowsPerPage, setRowsPerPage, rowsPerPageOptions, hideFooter, prependColumn, appendColumn, isLoading }: GridProps): JSX.Element;
234
+ declare function BaseGrid({ columns, children, paperProps, tableBodyProps, tableHeadProps, tableProps, sortedDirection, sortedBy, onSortBy, dense, striped, bordered, currentPage, totalNumberOfPages, onPageChange, rowsPerPage, setRowsPerPage, rowsPerPageOptions, hideFooter, prependColumn, appendColumn, isLoading }: GridProps): React.JSX.Element;
236
235
 
237
- declare type ModalProps = {
236
+ type ModalProps = {
238
237
  open: boolean;
239
238
  onClose: () => void;
240
239
  } & ModalProps$1;
241
- declare const Modal: ({ open, onClose, ...rest }: ModalProps) => JSX.Element;
240
+ declare const Modal: ({ open, onClose, ...rest }: ModalProps) => React.JSX.Element;
242
241
 
243
242
  declare function GetInputLabel<T extends Array<Record<string, any>>, K extends T[number]['name']>(columns: T): (columnName: K) => {
244
243
  label: any;
@@ -257,20 +256,20 @@ interface DialogCustomProps extends DialogProps {
257
256
  options: DialogOptionsProps[];
258
257
  loading: boolean;
259
258
  }
260
- declare const Dialog: ({ open, title, loading, body, options, ...rest }: DialogCustomProps) => JSX.Element;
259
+ declare const Dialog: ({ open, title, loading, body, options, ...rest }: DialogCustomProps) => React.JSX.Element;
261
260
 
262
261
  declare class HttpError extends Error {
263
262
  status: number;
264
263
  constructor(status: number, message: any);
265
264
  }
266
265
 
267
- declare type PossibleMethods = "GET" | "POST" | "PUT" | "PATCH" | "DELETE";
268
- declare type HandlerProps = (req: NextApiRequest & {
266
+ type PossibleMethods = "GET" | "POST" | "PUT" | "PATCH" | "DELETE";
267
+ type HandlerProps = (req: NextApiRequest & {
269
268
  user?: number;
270
269
  }, res: NextApiResponse) => Promise<any>;
271
- declare type MethodProps = Partial<Record<PossibleMethods, HandlerProps>>;
272
- declare type MiddlewaresProps = ((handler: HandlerProps) => HandlerProps)[];
273
- declare type ConstructorProps = {
270
+ type MethodProps = Partial<Record<PossibleMethods, HandlerProps>>;
271
+ type MiddlewaresProps = ((handler: HandlerProps) => HandlerProps)[];
272
+ type ConstructorProps = {
274
273
  middlewares?: MiddlewaresProps;
275
274
  onFinally: (req: NextApiRequest) => Promise<void>;
276
275
  };
@@ -287,8 +286,8 @@ declare class ApiHelper {
287
286
  }): ApiHelper;
288
287
  }
289
288
 
290
- declare type Methods = 'get' | 'post' | 'put' | 'delete' | 'patch' | 'options';
291
- declare type HandleProps = {
289
+ type Methods = 'get' | 'post' | 'put' | 'delete' | 'patch' | 'options';
290
+ type HandleProps = {
292
291
  name: `${Methods}:${string}`;
293
292
  };
294
293
  declare function useFormHelper(): {
@@ -299,8 +298,8 @@ declare function useFormHelper(): {
299
298
  createAlert(message: string, type: _mui_material.AlertColor): void;
300
299
  };
301
300
 
302
- declare type FilterCompareType = 'gte' | 'lte' | 'lt' | 'gt' | 'equal' | 'in' | 'notEqual' | 'notIn';
303
- declare type FilterProps = {
301
+ type FilterCompareType = 'gte' | 'lte' | 'lt' | 'gt' | 'equal' | 'in' | 'notEqual' | 'notIn';
302
+ type FilterProps = {
304
303
  id?: string;
305
304
  prop: string;
306
305
  value: unknown;
@@ -356,25 +355,25 @@ declare const useAlert: () => {
356
355
  createAlert(message: string, type: _mui_material.AlertColor): void;
357
356
  };
358
357
 
359
- declare type FormHelperContextProps = {
358
+ type FormHelperContextProps = {
360
359
  formatErrorMessage: (message: any) => string;
361
360
  api: AxiosInstance;
362
361
  };
363
362
  declare const FormHelperContext: React.Context<FormHelperContextProps>;
364
- declare type FormHelperProviderProps = {
363
+ type FormHelperProviderProps = {
365
364
  formatErrorMessage: (message: any) => string;
366
365
  children: ReactNode;
367
366
  api: AxiosInstance;
368
367
  };
369
- declare const FormHelperProvider: ({ formatErrorMessage, api, children }: FormHelperProviderProps) => JSX.Element;
368
+ declare const FormHelperProvider: ({ formatErrorMessage, api, children }: FormHelperProviderProps) => React.JSX.Element;
370
369
 
371
- declare type AlertContextProps = {
370
+ type AlertContextProps = {
372
371
  createAlert(message: string, type: AlertColor): void;
373
372
  };
374
373
  declare const AlertContext: React.Context<AlertContextProps>;
375
- declare type AlertProviderProps = {
374
+ type AlertProviderProps = {
376
375
  children: ReactNode;
377
376
  };
378
- declare const AlertProvider: ({ children }: AlertProviderProps) => JSX.Element;
377
+ declare const AlertProvider: ({ children }: AlertProviderProps) => React.JSX.Element;
379
378
 
380
379
  export { AlertContext, AlertProvider, ApiHelper, Autocomplete, BaseGrid, Checkbox, type ColumnTitleProps, type ColumnsProps, Dialog, EditableTableCell, type FilterCompareType, type FilterProps, FormHelperContext, FormHelperProvider, GetInputLabel, Grid, HttpError, type IFilter, Input, InputMask, LargeButton, Modal, Radio, Select, Switch, TabPanel, type TabPanelProps, Td, Tr, createFilter, filterData, getTabProps, useAlert, useEvent, useFilter, useFormHelper, useGrid, useLoading };