@redi.run/redi-components 0.0.21 → 0.0.22
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.ts +28 -9
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -2,7 +2,7 @@ import { JSX } from 'react/jsx-runtime';
|
|
|
2
2
|
|
|
3
3
|
export declare const AdvancedTable: <T extends Record<string, unknown>>({ data, columns, defaultSort, defaultFilters, defaultPageSize, pageSizeOptions, enableSorting, enableFiltering, enablePagination, enableExport, persistConfig, configKey, className, labels, }: AdvancedTableProps<T>) => JSX.Element;
|
|
4
4
|
|
|
5
|
-
declare interface AdvancedTableProps<T = any> {
|
|
5
|
+
export declare interface AdvancedTableProps<T = any> {
|
|
6
6
|
data: T[];
|
|
7
7
|
columns: Column<T>[];
|
|
8
8
|
defaultSort?: SortConfig;
|
|
@@ -28,9 +28,9 @@ declare interface AdvancedTableProps<T = any> {
|
|
|
28
28
|
/** Primary UI component for user interaction */
|
|
29
29
|
export declare const Button: ({ level, size, type, posIcon, disabled, label, icon, children, ...props }: ButtonProps) => JSX.Element;
|
|
30
30
|
|
|
31
|
-
declare type ButtonLevel = 'primary' | 'secondary' | 'tertiary' | 'link' | 'icon';
|
|
31
|
+
export declare type ButtonLevel = 'primary' | 'secondary' | 'tertiary' | 'link' | 'icon';
|
|
32
32
|
|
|
33
|
-
declare interface ButtonProps {
|
|
33
|
+
export declare interface ButtonProps {
|
|
34
34
|
level?: ButtonLevel;
|
|
35
35
|
color?: string;
|
|
36
36
|
backgroundColor?: string;
|
|
@@ -44,7 +44,7 @@ declare interface ButtonProps {
|
|
|
44
44
|
children?: React.ReactNode;
|
|
45
45
|
}
|
|
46
46
|
|
|
47
|
-
declare interface Column<T = any> {
|
|
47
|
+
export declare interface Column<T = any> {
|
|
48
48
|
id: string;
|
|
49
49
|
label: string;
|
|
50
50
|
accessor: keyof T | ((row: T) => any);
|
|
@@ -57,7 +57,7 @@ declare interface Column<T = any> {
|
|
|
57
57
|
hidden?: boolean;
|
|
58
58
|
}
|
|
59
59
|
|
|
60
|
-
declare interface FilterConfig {
|
|
60
|
+
export declare interface FilterConfig {
|
|
61
61
|
[columnId: string]: {
|
|
62
62
|
type: 'text' | 'select' | 'multiselect';
|
|
63
63
|
value: string | string[];
|
|
@@ -66,7 +66,14 @@ declare interface FilterConfig {
|
|
|
66
66
|
};
|
|
67
67
|
}
|
|
68
68
|
|
|
69
|
-
declare interface
|
|
69
|
+
export declare interface IconsProps {
|
|
70
|
+
color?: string;
|
|
71
|
+
size?: number;
|
|
72
|
+
width?: number;
|
|
73
|
+
height?: number;
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
export declare interface LabelsProps {
|
|
70
77
|
configuration?: string;
|
|
71
78
|
columnVisibility?: string;
|
|
72
79
|
clearAllFilters?: string;
|
|
@@ -80,18 +87,18 @@ declare interface LabelsProps {
|
|
|
80
87
|
};
|
|
81
88
|
}
|
|
82
89
|
|
|
83
|
-
declare interface PaginationConfig {
|
|
90
|
+
export declare interface PaginationConfig {
|
|
84
91
|
page: number;
|
|
85
92
|
pageSize: number;
|
|
86
93
|
total: number;
|
|
87
94
|
}
|
|
88
95
|
|
|
89
|
-
declare interface SortConfig {
|
|
96
|
+
export declare interface SortConfig {
|
|
90
97
|
column: string;
|
|
91
98
|
direction: 'asc' | 'desc';
|
|
92
99
|
}
|
|
93
100
|
|
|
94
|
-
declare interface TableConfig {
|
|
101
|
+
export declare interface TableConfig {
|
|
95
102
|
columns: Column[];
|
|
96
103
|
sort?: SortConfig;
|
|
97
104
|
filters: FilterConfig;
|
|
@@ -100,4 +107,16 @@ declare interface TableConfig {
|
|
|
100
107
|
hiddenColumns: string[];
|
|
101
108
|
}
|
|
102
109
|
|
|
110
|
+
export declare interface TableState<T = any> {
|
|
111
|
+
data: T[];
|
|
112
|
+
filteredData: T[];
|
|
113
|
+
paginatedData: T[];
|
|
114
|
+
sortConfig: SortConfig | undefined;
|
|
115
|
+
filters: FilterConfig;
|
|
116
|
+
pagination: PaginationConfig;
|
|
117
|
+
columnOrder: string[];
|
|
118
|
+
hiddenColumns: string[];
|
|
119
|
+
loading: boolean;
|
|
120
|
+
}
|
|
121
|
+
|
|
103
122
|
export { }
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@redi.run/redi-components",
|
|
3
3
|
"description": "This project was created to define the style of the UI and improve the UX in all projects from REDI",
|
|
4
|
-
"version": "0.0.
|
|
4
|
+
"version": "0.0.22",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"author": {
|
|
7
7
|
"name": "Jonathan Manchego Sosa",
|