next-recomponents 2.0.40 → 2.0.42
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 +53 -13
- package/dist/index.d.ts +53 -13
- package/dist/index.js +1157 -26
- package/dist/index.mjs +1162 -27
- package/package.json +1 -1
- package/src/index.tsx +1 -0
- package/src/input/index.tsx +4 -4
- package/src/modal/index.tsx +8 -4
- package/src/pop/color.tsx +1 -1
- package/src/pop/index.tsx +22 -9
- package/src/pop/overlay.tsx +5 -3
- package/src/pop/types.ts +1 -1
- package/src/select/index.tsx +2 -2
- package/src/table/index.tsx +6 -8
- package/src/table-advanced/context.ts +88 -0
- package/src/table-advanced/filter.reducer.ts +19 -0
- package/src/table-advanced/h.table.tsx +579 -0
- package/src/table-advanced/header.tsx +335 -0
- package/src/table-advanced/icons.tsx +167 -0
- package/src/table-advanced/index.tsx +43 -0
- package/src/table-advanced/menu.item.tsx +21 -0
- package/src/table-advanced/searchable.tsx +24 -0
- package/src/table-advanced/sort.reducer.ts +29 -0
- package/src/table-advanced/types.ts +82 -0
- package/src/text-area/index.tsx +2 -2
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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 };
|