next-recomponents 1.7.63 → 1.8.2
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 +30 -37
- package/dist/index.d.ts +30 -37
- package/dist/index.js +671 -742
- package/dist/index.mjs +677 -748
- package/package.json +1 -1
- package/src/container/index.tsx +3 -6
- package/src/index.tsx +1 -2
- package/src/table/filters.tsx +16 -15
- package/src/table/h.tsx +49 -63
- package/src/table/td.tsx +5 -24
- package/src/table/vtd.tsx +1 -0
- package/src/table3/body.tsx +75 -0
- package/src/table3/dialog.tsx +49 -0
- package/src/table3/filter.tsx +213 -0
- package/src/table3/footer.tsx +56 -0
- package/src/table3/head.tsx +72 -0
- package/src/table3/index.tsx +190 -0
- package/src/table3/panel.tsx +85 -0
- package/src/table3/tr.tsx +148 -0
- package/tsconfig.json +2 -2
- package/src/table2/context.tsx +0 -141
- package/src/table2/h.table.tsx +0 -5
- package/src/table2/icons.tsx +0 -116
- package/src/table2/index.tsx +0 -70
- package/src/table2/v.table.body.tsx +0 -155
- package/src/table2/v.table.head.filter.tsx +0 -196
- package/src/table2/v.table.head.tsx +0 -43
- package/src/table2/v.table.pagination.tsx +0 -73
- package/src/table2/v.table.tsx +0 -58
- package/src/use-modal/index.tsx +0 -79
package/dist/index.d.mts
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
-
import
|
|
3
|
-
import React__default, { DetailedHTMLProps, ButtonHTMLAttributes, Dispatch, SetStateAction, InputHTMLAttributes, ReactNode, TextareaHTMLAttributes, TableHTMLAttributes, DialogHTMLAttributes } from 'react';
|
|
2
|
+
import React$1, { DetailedHTMLProps, ButtonHTMLAttributes, Dispatch, SetStateAction, InputHTMLAttributes, ReactNode, TextareaHTMLAttributes, TableHTMLAttributes } from 'react';
|
|
4
3
|
|
|
5
4
|
interface Props$6 {
|
|
6
5
|
color?: "white" | "primary" | "secondary" | "info" | "danger" | "warning" | "success";
|
|
@@ -17,31 +16,31 @@ declare function Button({ className, size, color, children, icon, disabled, ...p
|
|
|
17
16
|
|
|
18
17
|
type LocationItem = {
|
|
19
18
|
location: string;
|
|
20
|
-
name:
|
|
21
|
-
icon?:
|
|
19
|
+
name: React$1.ReactNode;
|
|
20
|
+
icon?: React$1.ReactNode;
|
|
22
21
|
};
|
|
23
22
|
declare function Container({ children, appName, menuList, navItems, leftPanel, footPanel, expandedFooter, expandedMenu, }: {
|
|
24
|
-
appName?:
|
|
25
|
-
children:
|
|
23
|
+
appName?: React$1.ReactNode;
|
|
24
|
+
children: React$1.ReactNode;
|
|
26
25
|
menuList?: Array<LocationItem>;
|
|
27
26
|
navItems?: Array<LocationItem>;
|
|
28
|
-
leftPanel?:
|
|
29
|
-
footPanel?:
|
|
27
|
+
leftPanel?: React$1.ReactNode;
|
|
28
|
+
footPanel?: React$1.ReactNode;
|
|
30
29
|
expandedMenu?: boolean;
|
|
31
30
|
expandedFooter?: boolean;
|
|
32
31
|
}): react_jsx_runtime.JSX.Element;
|
|
33
32
|
|
|
34
|
-
interface OnSubmitProps extends
|
|
33
|
+
interface OnSubmitProps extends React$1.FormEvent<HTMLFormElement> {
|
|
35
34
|
values: Record<string, any>;
|
|
36
35
|
}
|
|
37
|
-
interface Props$4 extends
|
|
36
|
+
interface Props$4 extends React$1.DetailedHTMLProps<React$1.FormHTMLAttributes<HTMLFormElement>, HTMLFormElement> {
|
|
38
37
|
onSubmit: (e: OnSubmitProps) => void | Promise<void>;
|
|
39
|
-
children:
|
|
38
|
+
children: React$1.ReactNode;
|
|
40
39
|
state?: [any, Dispatch<SetStateAction<any>>];
|
|
41
40
|
invalidMessage?: string;
|
|
42
|
-
loader?:
|
|
41
|
+
loader?: React$1.ReactNode;
|
|
43
42
|
}
|
|
44
|
-
declare function useFormValues<T>(initial: Partial<T>): [Partial<T>,
|
|
43
|
+
declare function useFormValues<T>(initial: Partial<T>): [Partial<T>, React$1.Dispatch<Partial<T>>];
|
|
45
44
|
declare function Form({ onSubmit, state, invalidMessage, children, loader, ...otherProps }: Props$4): react_jsx_runtime.JSX.Element;
|
|
46
45
|
|
|
47
46
|
interface InputProps extends DetailedHTMLProps<InputHTMLAttributes<HTMLInputElement>, HTMLInputElement> {
|
|
@@ -78,7 +77,7 @@ type TableEventProps = {
|
|
|
78
77
|
row: Record<string, any>;
|
|
79
78
|
updateRow: (data: Record<string, any>) => void;
|
|
80
79
|
};
|
|
81
|
-
interface TableProps
|
|
80
|
+
interface TableProps extends React.DetailedHTMLProps<React.TableHTMLAttributes<HTMLTableElement>, HTMLTableElement> {
|
|
82
81
|
data: Record<string, DataTypeOrItem> | Array<Record<string, DataTypeOrItem>>;
|
|
83
82
|
dataTypes?: Record<string, any>;
|
|
84
83
|
totals?: Array<string>;
|
|
@@ -90,10 +89,10 @@ interface TableProps$1 extends React.DetailedHTMLProps<React.TableHTMLAttributes
|
|
|
90
89
|
loader?: React.ReactNode;
|
|
91
90
|
maxItems?: number;
|
|
92
91
|
}
|
|
93
|
-
declare function Table({ ...props }: TableProps
|
|
92
|
+
declare function Table({ ...props }: TableProps): react_jsx_runtime.JSX.Element;
|
|
94
93
|
|
|
95
94
|
interface Props$3 extends DetailedHTMLProps<TextareaHTMLAttributes<HTMLTextAreaElement>, HTMLTextAreaElement> {
|
|
96
|
-
label?:
|
|
95
|
+
label?: React$1.ReactNode;
|
|
97
96
|
maxLength?: number;
|
|
98
97
|
}
|
|
99
98
|
declare function TextArea({ label, className, maxLength, onChange, children, ...props }: Props$3): react_jsx_runtime.JSX.Element;
|
|
@@ -141,7 +140,7 @@ type EnhancedEndpoints<T extends Record<string, ItemsRecord>> = {
|
|
|
141
140
|
|
|
142
141
|
declare function useResources<T extends Record<string, ItemsRecord>>({ baseURI, endpoints, onError, }: Props$2<T>): EnhancedEndpoints<T>;
|
|
143
142
|
|
|
144
|
-
interface CustomSelectProps extends
|
|
143
|
+
interface CustomSelectProps extends React$1.DetailedHTMLProps<React$1.InputHTMLAttributes<HTMLInputElement>, HTMLInputElement> {
|
|
145
144
|
label?: string;
|
|
146
145
|
placeholder?: string;
|
|
147
146
|
children: ReactNode;
|
|
@@ -152,11 +151,11 @@ interface CustomSelectProps extends React__default.DetailedHTMLProps<React__defa
|
|
|
152
151
|
}
|
|
153
152
|
declare function Select({ label, placeholder, children, strictMode, ...props }: CustomSelectProps): react_jsx_runtime.JSX.Element;
|
|
154
153
|
|
|
155
|
-
interface Props$1 extends
|
|
156
|
-
button:
|
|
157
|
-
onClick: (e:
|
|
154
|
+
interface Props$1 extends React$1.DetailedHTMLProps<React$1.DialogHTMLAttributes<HTMLDialogElement>, HTMLDialogElement> {
|
|
155
|
+
button: React$1.ReactElement<{
|
|
156
|
+
onClick: (e: React$1.MouseEvent) => void;
|
|
158
157
|
}>;
|
|
159
|
-
children:
|
|
158
|
+
children: React$1.ReactElement<{
|
|
160
159
|
hide: () => void;
|
|
161
160
|
}>;
|
|
162
161
|
}
|
|
@@ -165,7 +164,7 @@ declare function Modal({ button, children, ref, title }: Props$1): react_jsx_run
|
|
|
165
164
|
type PreProps = {
|
|
166
165
|
data: any;
|
|
167
166
|
};
|
|
168
|
-
declare const Pre:
|
|
167
|
+
declare const Pre: React$1.FC<PreProps>;
|
|
169
168
|
|
|
170
169
|
declare function useDates(): {
|
|
171
170
|
isValid: (date: string, date2?: any) => boolean;
|
|
@@ -202,24 +201,18 @@ type Props = {
|
|
|
202
201
|
};
|
|
203
202
|
declare function DocumentViewer({ item }: Props): react_jsx_runtime.JSX.Element;
|
|
204
203
|
|
|
205
|
-
interface
|
|
204
|
+
interface Table3Props extends DetailedHTMLProps<TableHTMLAttributes<HTMLTableElement>, HTMLTableElement> {
|
|
206
205
|
data: Record<string, any>[];
|
|
206
|
+
selectItems?: boolean;
|
|
207
207
|
maxItems?: number;
|
|
208
|
-
|
|
209
|
-
handlers?: Record<string, React__default.ReactNode>;
|
|
210
|
-
onSave?: (data: Record<string, any>[]) => void;
|
|
208
|
+
onSave?: (e: any) => void;
|
|
211
209
|
exportName?: string;
|
|
212
|
-
selectItems?: boolean;
|
|
213
210
|
colSizes?: Record<string, number>;
|
|
211
|
+
modal?: React$1.ReactNode;
|
|
212
|
+
footer?: Record<string, "sum" | "count" | "avg">;
|
|
213
|
+
header?: React$1.ReactNode;
|
|
214
|
+
onChange?: (e: any) => any;
|
|
214
215
|
}
|
|
215
|
-
declare function
|
|
216
|
-
|
|
217
|
-
declare function useModal(): {
|
|
218
|
-
show: () => void;
|
|
219
|
-
hide: () => void;
|
|
220
|
-
Modal: ({ className, children, title, ...props }: DetailedHTMLProps<DialogHTMLAttributes<HTMLDialogElement>, HTMLDialogElement> & {
|
|
221
|
-
title?: React.ReactNode;
|
|
222
|
-
}) => React$1.ReactPortal | null;
|
|
223
|
-
};
|
|
216
|
+
declare function Table3({ data, selectItems, maxItems, onSave, exportName, colSizes, modal, header, footer, onChange, ...props }: Table3Props): react_jsx_runtime.JSX.Element | null;
|
|
224
217
|
|
|
225
|
-
export { Alert, Button, Container, DocumentViewer, Form, Input, Modal, MyCalendar, Pre, Select, Table,
|
|
218
|
+
export { Alert, Button, Container, DocumentViewer, Form, Input, Modal, MyCalendar, Pre, Select, Table, Table3, type TableEventProps, TextArea, regularExpresions, useDates, useExcel, useFormValues, useResources };
|
package/dist/index.d.ts
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
-
import
|
|
3
|
-
import React__default, { DetailedHTMLProps, ButtonHTMLAttributes, Dispatch, SetStateAction, InputHTMLAttributes, ReactNode, TextareaHTMLAttributes, TableHTMLAttributes, DialogHTMLAttributes } from 'react';
|
|
2
|
+
import React$1, { DetailedHTMLProps, ButtonHTMLAttributes, Dispatch, SetStateAction, InputHTMLAttributes, ReactNode, TextareaHTMLAttributes, TableHTMLAttributes } from 'react';
|
|
4
3
|
|
|
5
4
|
interface Props$6 {
|
|
6
5
|
color?: "white" | "primary" | "secondary" | "info" | "danger" | "warning" | "success";
|
|
@@ -17,31 +16,31 @@ declare function Button({ className, size, color, children, icon, disabled, ...p
|
|
|
17
16
|
|
|
18
17
|
type LocationItem = {
|
|
19
18
|
location: string;
|
|
20
|
-
name:
|
|
21
|
-
icon?:
|
|
19
|
+
name: React$1.ReactNode;
|
|
20
|
+
icon?: React$1.ReactNode;
|
|
22
21
|
};
|
|
23
22
|
declare function Container({ children, appName, menuList, navItems, leftPanel, footPanel, expandedFooter, expandedMenu, }: {
|
|
24
|
-
appName?:
|
|
25
|
-
children:
|
|
23
|
+
appName?: React$1.ReactNode;
|
|
24
|
+
children: React$1.ReactNode;
|
|
26
25
|
menuList?: Array<LocationItem>;
|
|
27
26
|
navItems?: Array<LocationItem>;
|
|
28
|
-
leftPanel?:
|
|
29
|
-
footPanel?:
|
|
27
|
+
leftPanel?: React$1.ReactNode;
|
|
28
|
+
footPanel?: React$1.ReactNode;
|
|
30
29
|
expandedMenu?: boolean;
|
|
31
30
|
expandedFooter?: boolean;
|
|
32
31
|
}): react_jsx_runtime.JSX.Element;
|
|
33
32
|
|
|
34
|
-
interface OnSubmitProps extends
|
|
33
|
+
interface OnSubmitProps extends React$1.FormEvent<HTMLFormElement> {
|
|
35
34
|
values: Record<string, any>;
|
|
36
35
|
}
|
|
37
|
-
interface Props$4 extends
|
|
36
|
+
interface Props$4 extends React$1.DetailedHTMLProps<React$1.FormHTMLAttributes<HTMLFormElement>, HTMLFormElement> {
|
|
38
37
|
onSubmit: (e: OnSubmitProps) => void | Promise<void>;
|
|
39
|
-
children:
|
|
38
|
+
children: React$1.ReactNode;
|
|
40
39
|
state?: [any, Dispatch<SetStateAction<any>>];
|
|
41
40
|
invalidMessage?: string;
|
|
42
|
-
loader?:
|
|
41
|
+
loader?: React$1.ReactNode;
|
|
43
42
|
}
|
|
44
|
-
declare function useFormValues<T>(initial: Partial<T>): [Partial<T>,
|
|
43
|
+
declare function useFormValues<T>(initial: Partial<T>): [Partial<T>, React$1.Dispatch<Partial<T>>];
|
|
45
44
|
declare function Form({ onSubmit, state, invalidMessage, children, loader, ...otherProps }: Props$4): react_jsx_runtime.JSX.Element;
|
|
46
45
|
|
|
47
46
|
interface InputProps extends DetailedHTMLProps<InputHTMLAttributes<HTMLInputElement>, HTMLInputElement> {
|
|
@@ -78,7 +77,7 @@ type TableEventProps = {
|
|
|
78
77
|
row: Record<string, any>;
|
|
79
78
|
updateRow: (data: Record<string, any>) => void;
|
|
80
79
|
};
|
|
81
|
-
interface TableProps
|
|
80
|
+
interface TableProps extends React.DetailedHTMLProps<React.TableHTMLAttributes<HTMLTableElement>, HTMLTableElement> {
|
|
82
81
|
data: Record<string, DataTypeOrItem> | Array<Record<string, DataTypeOrItem>>;
|
|
83
82
|
dataTypes?: Record<string, any>;
|
|
84
83
|
totals?: Array<string>;
|
|
@@ -90,10 +89,10 @@ interface TableProps$1 extends React.DetailedHTMLProps<React.TableHTMLAttributes
|
|
|
90
89
|
loader?: React.ReactNode;
|
|
91
90
|
maxItems?: number;
|
|
92
91
|
}
|
|
93
|
-
declare function Table({ ...props }: TableProps
|
|
92
|
+
declare function Table({ ...props }: TableProps): react_jsx_runtime.JSX.Element;
|
|
94
93
|
|
|
95
94
|
interface Props$3 extends DetailedHTMLProps<TextareaHTMLAttributes<HTMLTextAreaElement>, HTMLTextAreaElement> {
|
|
96
|
-
label?:
|
|
95
|
+
label?: React$1.ReactNode;
|
|
97
96
|
maxLength?: number;
|
|
98
97
|
}
|
|
99
98
|
declare function TextArea({ label, className, maxLength, onChange, children, ...props }: Props$3): react_jsx_runtime.JSX.Element;
|
|
@@ -141,7 +140,7 @@ type EnhancedEndpoints<T extends Record<string, ItemsRecord>> = {
|
|
|
141
140
|
|
|
142
141
|
declare function useResources<T extends Record<string, ItemsRecord>>({ baseURI, endpoints, onError, }: Props$2<T>): EnhancedEndpoints<T>;
|
|
143
142
|
|
|
144
|
-
interface CustomSelectProps extends
|
|
143
|
+
interface CustomSelectProps extends React$1.DetailedHTMLProps<React$1.InputHTMLAttributes<HTMLInputElement>, HTMLInputElement> {
|
|
145
144
|
label?: string;
|
|
146
145
|
placeholder?: string;
|
|
147
146
|
children: ReactNode;
|
|
@@ -152,11 +151,11 @@ interface CustomSelectProps extends React__default.DetailedHTMLProps<React__defa
|
|
|
152
151
|
}
|
|
153
152
|
declare function Select({ label, placeholder, children, strictMode, ...props }: CustomSelectProps): react_jsx_runtime.JSX.Element;
|
|
154
153
|
|
|
155
|
-
interface Props$1 extends
|
|
156
|
-
button:
|
|
157
|
-
onClick: (e:
|
|
154
|
+
interface Props$1 extends React$1.DetailedHTMLProps<React$1.DialogHTMLAttributes<HTMLDialogElement>, HTMLDialogElement> {
|
|
155
|
+
button: React$1.ReactElement<{
|
|
156
|
+
onClick: (e: React$1.MouseEvent) => void;
|
|
158
157
|
}>;
|
|
159
|
-
children:
|
|
158
|
+
children: React$1.ReactElement<{
|
|
160
159
|
hide: () => void;
|
|
161
160
|
}>;
|
|
162
161
|
}
|
|
@@ -165,7 +164,7 @@ declare function Modal({ button, children, ref, title }: Props$1): react_jsx_run
|
|
|
165
164
|
type PreProps = {
|
|
166
165
|
data: any;
|
|
167
166
|
};
|
|
168
|
-
declare const Pre:
|
|
167
|
+
declare const Pre: React$1.FC<PreProps>;
|
|
169
168
|
|
|
170
169
|
declare function useDates(): {
|
|
171
170
|
isValid: (date: string, date2?: any) => boolean;
|
|
@@ -202,24 +201,18 @@ type Props = {
|
|
|
202
201
|
};
|
|
203
202
|
declare function DocumentViewer({ item }: Props): react_jsx_runtime.JSX.Element;
|
|
204
203
|
|
|
205
|
-
interface
|
|
204
|
+
interface Table3Props extends DetailedHTMLProps<TableHTMLAttributes<HTMLTableElement>, HTMLTableElement> {
|
|
206
205
|
data: Record<string, any>[];
|
|
206
|
+
selectItems?: boolean;
|
|
207
207
|
maxItems?: number;
|
|
208
|
-
|
|
209
|
-
handlers?: Record<string, React__default.ReactNode>;
|
|
210
|
-
onSave?: (data: Record<string, any>[]) => void;
|
|
208
|
+
onSave?: (e: any) => void;
|
|
211
209
|
exportName?: string;
|
|
212
|
-
selectItems?: boolean;
|
|
213
210
|
colSizes?: Record<string, number>;
|
|
211
|
+
modal?: React$1.ReactNode;
|
|
212
|
+
footer?: Record<string, "sum" | "count" | "avg">;
|
|
213
|
+
header?: React$1.ReactNode;
|
|
214
|
+
onChange?: (e: any) => any;
|
|
214
215
|
}
|
|
215
|
-
declare function
|
|
216
|
-
|
|
217
|
-
declare function useModal(): {
|
|
218
|
-
show: () => void;
|
|
219
|
-
hide: () => void;
|
|
220
|
-
Modal: ({ className, children, title, ...props }: DetailedHTMLProps<DialogHTMLAttributes<HTMLDialogElement>, HTMLDialogElement> & {
|
|
221
|
-
title?: React.ReactNode;
|
|
222
|
-
}) => React$1.ReactPortal | null;
|
|
223
|
-
};
|
|
216
|
+
declare function Table3({ data, selectItems, maxItems, onSave, exportName, colSizes, modal, header, footer, onChange, ...props }: Table3Props): react_jsx_runtime.JSX.Element | null;
|
|
224
217
|
|
|
225
|
-
export { Alert, Button, Container, DocumentViewer, Form, Input, Modal, MyCalendar, Pre, Select, Table,
|
|
218
|
+
export { Alert, Button, Container, DocumentViewer, Form, Input, Modal, MyCalendar, Pre, Select, Table, Table3, type TableEventProps, TextArea, regularExpresions, useDates, useExcel, useFormValues, useResources };
|