@redi.run/redi-components 0.0.51 → 0.0.52
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 +10 -10
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -16,9 +16,9 @@ import { ReactNode } from 'react';
|
|
|
16
16
|
* Optional props for Server-Side:
|
|
17
17
|
* - `onRefresh`: Callback for external refresh triggers
|
|
18
18
|
*/
|
|
19
|
-
export declare const AdvancedTable: <T
|
|
19
|
+
export declare const AdvancedTable: <T>({ data, columns, defaultSort, defaultFilters, defaultPageSize, pageSizeOptions, enableSorting, enableFiltering, enablePagination, enableExport, initialConfig, onConfigChange, className, labels, enableColumnReordering, enableColumnPinning, enableColumnResizing, enableRowSelection, stickyActionsColumn, rowKey, onRowSelectionChange, renderActions, actionsColumnLabel, loading, fetchData, onRefresh, onPaginationChange, onFiltersChange, syncFiltersWithUrl, }: AdvancedTableProps<T>) => JSX.Element;
|
|
20
20
|
|
|
21
|
-
export declare interface AdvancedTableProps<T
|
|
21
|
+
export declare interface AdvancedTableProps<T> {
|
|
22
22
|
data: T[];
|
|
23
23
|
columns: Column<T>[];
|
|
24
24
|
defaultSort?: SortConfig;
|
|
@@ -34,9 +34,9 @@ export declare interface AdvancedTableProps<T = any> {
|
|
|
34
34
|
enableRowSelection?: boolean;
|
|
35
35
|
stickyActionsColumn?: boolean;
|
|
36
36
|
enableExport?: boolean;
|
|
37
|
-
initialConfig?: Partial<TableConfig
|
|
37
|
+
initialConfig?: Partial<TableConfig<T>>;
|
|
38
38
|
onRowClick?: (row: T, index: number) => void;
|
|
39
|
-
onConfigChange?: (config: TableConfig) => void;
|
|
39
|
+
onConfigChange?: (config: TableConfig<T>) => void;
|
|
40
40
|
className?: string;
|
|
41
41
|
loading?: boolean;
|
|
42
42
|
emptyMessage?: string;
|
|
@@ -241,17 +241,17 @@ declare type ColorFamily = keyof typeof colorPalette;
|
|
|
241
241
|
*/
|
|
242
242
|
declare const colorPalette: Record<string, Record<number | string, string>>;
|
|
243
243
|
|
|
244
|
-
export declare interface Column<T
|
|
244
|
+
export declare interface Column<T> {
|
|
245
245
|
id: string;
|
|
246
246
|
label: string;
|
|
247
|
-
accessor: keyof T | ((row: T) =>
|
|
247
|
+
accessor: keyof T | ((row: T) => unknown);
|
|
248
248
|
sortable?: boolean;
|
|
249
249
|
filterable?: boolean;
|
|
250
250
|
width?: number;
|
|
251
251
|
minWidth?: number;
|
|
252
252
|
align?: 'left' | 'center' | 'right';
|
|
253
253
|
render?: ({ value, row, column, index }: {
|
|
254
|
-
value:
|
|
254
|
+
value: unknown;
|
|
255
255
|
row: T;
|
|
256
256
|
column: Column<T>;
|
|
257
257
|
index: number;
|
|
@@ -297,7 +297,7 @@ export declare interface FetchParams {
|
|
|
297
297
|
page_number: number;
|
|
298
298
|
page_size: number;
|
|
299
299
|
order_by?: string;
|
|
300
|
-
[key: string]:
|
|
300
|
+
[key: string]: string | number | boolean | Array<string | number> | undefined;
|
|
301
301
|
}
|
|
302
302
|
|
|
303
303
|
export declare interface FetchResponse<T> {
|
|
@@ -543,8 +543,8 @@ export declare interface TabItem {
|
|
|
543
543
|
content: ReactNode;
|
|
544
544
|
}
|
|
545
545
|
|
|
546
|
-
export declare interface TableConfig {
|
|
547
|
-
columns: Column[];
|
|
546
|
+
export declare interface TableConfig<T> {
|
|
547
|
+
columns: Column<T>[];
|
|
548
548
|
sort?: SortConfig;
|
|
549
549
|
filters: FilterConfig;
|
|
550
550
|
pagination: PaginationConfig;
|
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.52",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"author": {
|
|
7
7
|
"name": "Jonathan Manchego Sosa",
|