next-recomponents 2.0.41 → 2.0.43

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
@@ -60,15 +60,15 @@ declare const regularExpresions: {
60
60
  number: RegExp;
61
61
  };
62
62
 
63
+ type FooterAggregation$1 = "sum" | "avg" | "count";
64
+ interface FooterType$1 {
65
+ [key: string]: FooterAggregation$1;
66
+ }
67
+ type GridDensity$1 = "compact" | "standard" | "comfortable";
63
68
  interface TableButtonProps extends React$1.MouseEvent<HTMLButtonElement, MouseEvent> {
64
69
  row: Record<string, any>;
65
70
  }
66
- type FooterAggregation = "sum" | "avg" | "count";
67
- interface FooterType {
68
- [key: string]: FooterAggregation;
69
- }
70
- type GridDensity = "compact" | "standard" | "comfortable";
71
- interface TableProps {
71
+ interface TableProps$1 {
72
72
  data: any;
73
73
  searchable?: boolean;
74
74
  flex?: number;
@@ -83,7 +83,7 @@ interface TableProps {
83
83
  width?: number | string;
84
84
  header?: React$1.ReactNode;
85
85
  hideColumns?: string[];
86
- footer?: FooterType;
86
+ footer?: FooterType$1;
87
87
  symbols?: any;
88
88
  currentCoin?: string;
89
89
  className?: string;
@@ -91,11 +91,11 @@ interface TableProps {
91
91
  colSize?: Record<string, number>;
92
92
  rowHeight?: number;
93
93
  wrapText?: boolean;
94
- density?: GridDensity;
94
+ density?: GridDensity$1;
95
95
  autoHeight?: boolean;
96
96
  [key: string]: any;
97
97
  }
98
- declare function Table(props: TableProps): react_jsx_runtime.JSX.Element;
98
+ declare function Table(props: TableProps$1): react_jsx_runtime.JSX.Element;
99
99
 
100
100
  interface Props$2 extends DetailedHTMLProps<TextareaHTMLAttributes<HTMLTextAreaElement>, HTMLTextAreaElement> {
101
101
  label?: React$1.ReactNode;
@@ -163,13 +163,14 @@ interface CustomSelectProps extends React$1.DetailedHTMLProps<React$1.InputHTMLA
163
163
  declare function Select({ label, placeholder, children, strictMode, ...props }: CustomSelectProps): react_jsx_runtime.JSX.Element;
164
164
 
165
165
  type PopupColor$1 = "white" | "primary" | "secondary" | "info" | "danger" | "warning" | "success";
166
- declare function Modal({ button, children, color, title, }: {
166
+ declare function Modal({ button, children, color, title, onClose, }: {
167
167
  button: ReactElement<React$1.ComponentPropsWithRef<"button">>;
168
168
  children: ReactElement<React$1.ComponentPropsWithRef<"div"> & {
169
169
  hide: () => void;
170
170
  }>;
171
171
  color?: PopupColor$1;
172
172
  title?: string;
173
+ onClose?: () => Promise<boolean>;
173
174
  }): react_jsx_runtime.JSX.Element;
174
175
 
175
176
  type PreProps = {
@@ -234,10 +235,49 @@ declare function usePopup(): {
234
235
  alert: (message: string, color?: PopupColor) => Promise<void>;
235
236
  confirm: (message: string, color?: PopupColor) => Promise<boolean>;
236
237
  prompt: (message: string, color?: PopupColor) => Promise<string | null>;
237
- modal: (message: ReactNode, color?: PopupColor, icons?: boolean, full?: boolean) => Promise<void>;
238
+ modal: (message: ReactNode, color?: PopupColor, icons?: boolean, full?: boolean, onClose?: () => Promise<boolean>) => Promise<void>;
238
239
  PopupComponent: react_jsx_runtime.JSX.Element | null;
239
- close: (confirmed: boolean, value?: string) => void;
240
+ close: (confirmed: boolean, value?: string) => Promise<void>;
240
241
  updateMessage: (message: ReactNode) => void;
241
242
  };
242
243
 
243
- export { Alert, Button, Container, DocumentViewer, Form, Input, Modal, MyCalendar, Pre, Select, Table, Table3, type TableButtonProps, type TableButtonProps as TableEventProps, TextArea, regularExpresions, useDates, useExcel, useFormValues, usePopup, useResources };
244
+ type FooterAggregation = "sum" | "avg" | "count";
245
+ interface FooterType {
246
+ [key: string]: FooterAggregation;
247
+ }
248
+ type GridDensity = "compact" | "standard" | "comfortable";
249
+ interface TableProps {
250
+ data: any;
251
+ searchable?: boolean;
252
+ editableFields?: string[];
253
+ onSelect?: (data: GridValidRowModel[]) => void;
254
+ onSelectLabel?: string;
255
+ onSave?: (data: GridValidRowModel[]) => void;
256
+ onSaveLabel?: string;
257
+ buttons?: Record<string, any>;
258
+ exportName?: string;
259
+ modal?: React.ReactNode;
260
+ modalButton?: React.ReactNode;
261
+ height?: number;
262
+ width?: number | string;
263
+ header?: React.ReactNode;
264
+ hideColumns?: string[];
265
+ footer?: FooterType;
266
+ symbols?: any;
267
+ currentCoin?: string;
268
+ className?: string;
269
+ fontSize?: string;
270
+ colSize?: Record<string, number>;
271
+ rowHeight?: number;
272
+ wrapText?: boolean;
273
+ density?: GridDensity;
274
+ autoHeight?: boolean;
275
+ flex?: number;
276
+ sortBy?: Record<string, "DESC" | "ASC">;
277
+ onCloseModal?: (data: GridValidRowModel) => Promise<boolean>;
278
+ [key: string]: any;
279
+ }
280
+
281
+ declare function TableAdvanced(tableProps: TableProps): react_jsx_runtime.JSX.Element | null;
282
+
283
+ export { Alert, Button, Container, DocumentViewer, Form, Input, Modal, MyCalendar, Pre, Select, Table, Table3, TableAdvanced, type TableButtonProps, type TableButtonProps as TableEventProps, TextArea, regularExpresions, useDates, useExcel, useFormValues, usePopup, useResources };
package/dist/index.d.ts CHANGED
@@ -60,15 +60,15 @@ declare const regularExpresions: {
60
60
  number: RegExp;
61
61
  };
62
62
 
63
+ type FooterAggregation$1 = "sum" | "avg" | "count";
64
+ interface FooterType$1 {
65
+ [key: string]: FooterAggregation$1;
66
+ }
67
+ type GridDensity$1 = "compact" | "standard" | "comfortable";
63
68
  interface TableButtonProps extends React$1.MouseEvent<HTMLButtonElement, MouseEvent> {
64
69
  row: Record<string, any>;
65
70
  }
66
- type FooterAggregation = "sum" | "avg" | "count";
67
- interface FooterType {
68
- [key: string]: FooterAggregation;
69
- }
70
- type GridDensity = "compact" | "standard" | "comfortable";
71
- interface TableProps {
71
+ interface TableProps$1 {
72
72
  data: any;
73
73
  searchable?: boolean;
74
74
  flex?: number;
@@ -83,7 +83,7 @@ interface TableProps {
83
83
  width?: number | string;
84
84
  header?: React$1.ReactNode;
85
85
  hideColumns?: string[];
86
- footer?: FooterType;
86
+ footer?: FooterType$1;
87
87
  symbols?: any;
88
88
  currentCoin?: string;
89
89
  className?: string;
@@ -91,11 +91,11 @@ interface TableProps {
91
91
  colSize?: Record<string, number>;
92
92
  rowHeight?: number;
93
93
  wrapText?: boolean;
94
- density?: GridDensity;
94
+ density?: GridDensity$1;
95
95
  autoHeight?: boolean;
96
96
  [key: string]: any;
97
97
  }
98
- declare function Table(props: TableProps): react_jsx_runtime.JSX.Element;
98
+ declare function Table(props: TableProps$1): react_jsx_runtime.JSX.Element;
99
99
 
100
100
  interface Props$2 extends DetailedHTMLProps<TextareaHTMLAttributes<HTMLTextAreaElement>, HTMLTextAreaElement> {
101
101
  label?: React$1.ReactNode;
@@ -163,13 +163,14 @@ interface CustomSelectProps extends React$1.DetailedHTMLProps<React$1.InputHTMLA
163
163
  declare function Select({ label, placeholder, children, strictMode, ...props }: CustomSelectProps): react_jsx_runtime.JSX.Element;
164
164
 
165
165
  type PopupColor$1 = "white" | "primary" | "secondary" | "info" | "danger" | "warning" | "success";
166
- declare function Modal({ button, children, color, title, }: {
166
+ declare function Modal({ button, children, color, title, onClose, }: {
167
167
  button: ReactElement<React$1.ComponentPropsWithRef<"button">>;
168
168
  children: ReactElement<React$1.ComponentPropsWithRef<"div"> & {
169
169
  hide: () => void;
170
170
  }>;
171
171
  color?: PopupColor$1;
172
172
  title?: string;
173
+ onClose?: () => Promise<boolean>;
173
174
  }): react_jsx_runtime.JSX.Element;
174
175
 
175
176
  type PreProps = {
@@ -234,10 +235,49 @@ declare function usePopup(): {
234
235
  alert: (message: string, color?: PopupColor) => Promise<void>;
235
236
  confirm: (message: string, color?: PopupColor) => Promise<boolean>;
236
237
  prompt: (message: string, color?: PopupColor) => Promise<string | null>;
237
- modal: (message: ReactNode, color?: PopupColor, icons?: boolean, full?: boolean) => Promise<void>;
238
+ modal: (message: ReactNode, color?: PopupColor, icons?: boolean, full?: boolean, onClose?: () => Promise<boolean>) => Promise<void>;
238
239
  PopupComponent: react_jsx_runtime.JSX.Element | null;
239
- close: (confirmed: boolean, value?: string) => void;
240
+ close: (confirmed: boolean, value?: string) => Promise<void>;
240
241
  updateMessage: (message: ReactNode) => void;
241
242
  };
242
243
 
243
- export { Alert, Button, Container, DocumentViewer, Form, Input, Modal, MyCalendar, Pre, Select, Table, Table3, type TableButtonProps, type TableButtonProps as TableEventProps, TextArea, regularExpresions, useDates, useExcel, useFormValues, usePopup, useResources };
244
+ type FooterAggregation = "sum" | "avg" | "count";
245
+ interface FooterType {
246
+ [key: string]: FooterAggregation;
247
+ }
248
+ type GridDensity = "compact" | "standard" | "comfortable";
249
+ interface TableProps {
250
+ data: any;
251
+ searchable?: boolean;
252
+ editableFields?: string[];
253
+ onSelect?: (data: GridValidRowModel[]) => void;
254
+ onSelectLabel?: string;
255
+ onSave?: (data: GridValidRowModel[]) => void;
256
+ onSaveLabel?: string;
257
+ buttons?: Record<string, any>;
258
+ exportName?: string;
259
+ modal?: React.ReactNode;
260
+ modalButton?: React.ReactNode;
261
+ height?: number;
262
+ width?: number | string;
263
+ header?: React.ReactNode;
264
+ hideColumns?: string[];
265
+ footer?: FooterType;
266
+ symbols?: any;
267
+ currentCoin?: string;
268
+ className?: string;
269
+ fontSize?: string;
270
+ colSize?: Record<string, number>;
271
+ rowHeight?: number;
272
+ wrapText?: boolean;
273
+ density?: GridDensity;
274
+ autoHeight?: boolean;
275
+ flex?: number;
276
+ sortBy?: Record<string, "DESC" | "ASC">;
277
+ onCloseModal?: (data: GridValidRowModel) => Promise<boolean>;
278
+ [key: string]: any;
279
+ }
280
+
281
+ declare function TableAdvanced(tableProps: TableProps): react_jsx_runtime.JSX.Element | null;
282
+
283
+ export { Alert, Button, Container, DocumentViewer, Form, Input, Modal, MyCalendar, Pre, Select, Table, Table3, TableAdvanced, type TableButtonProps, type TableButtonProps as TableEventProps, TextArea, regularExpresions, useDates, useExcel, useFormValues, usePopup, useResources };