@gobolt/genesis 0.4.13 → 0.4.14
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/components/Table/__mocks__/TableWithControlsData.d.ts +3 -0
- package/dist/components/Table/useTable.d.ts +8 -2
- package/dist/components/TableWithControls/TableWithControls.d.ts +8 -1
- package/dist/components/TableWithControls/useTableWithControls.d.ts +4 -1
- package/dist/index.cjs +901 -526
- package/dist/index.js +901 -526
- package/package.json +1 -1
|
@@ -7,7 +7,10 @@ export type UseTableConfig = {
|
|
|
7
7
|
fetchOptions?: RequestInit;
|
|
8
8
|
selectionType?: SelectionType;
|
|
9
9
|
simulateDelay?: number;
|
|
10
|
-
disableRowSelection?: (record: any) =>
|
|
10
|
+
disableRowSelection?: (record: any) => {
|
|
11
|
+
disabled?: boolean;
|
|
12
|
+
name?: string;
|
|
13
|
+
};
|
|
11
14
|
hasSettings?: boolean;
|
|
12
15
|
hasFilter?: boolean;
|
|
13
16
|
disableAutoFetch?: boolean;
|
|
@@ -20,7 +23,10 @@ export declare const useTable: <T extends Record<string, any>>(useTableConfig: a
|
|
|
20
23
|
type: SelectionType;
|
|
21
24
|
selectedRowKeys: import('react').Key[];
|
|
22
25
|
onChange: (newSelectedRowKeys: React.Key[], newSelectedRows: T[]) => void;
|
|
23
|
-
getCheckboxProps: (record: any) =>
|
|
26
|
+
getCheckboxProps: (record: any) => {
|
|
27
|
+
disabled?: boolean;
|
|
28
|
+
name?: string;
|
|
29
|
+
};
|
|
24
30
|
};
|
|
25
31
|
selectedRows: T[];
|
|
26
32
|
selectedRowKeys: import('react').Key[];
|
|
@@ -2,11 +2,18 @@ import { default as React } from 'react';
|
|
|
2
2
|
import { TableProps } from '../Table';
|
|
3
3
|
import { TableControlsData } from '../Table/TableControls/TableControls';
|
|
4
4
|
import { ActionEvent, TableEventPayload } from '../../types/events';
|
|
5
|
+
import { InfiniteScrollConfig } from '../Table/Table';
|
|
6
|
+
import { PaginationStyle } from '../Table/TableControls/CustomPagination';
|
|
7
|
+
export type TableType = "table" | "pagination" | "infiniteScroll";
|
|
5
8
|
export interface TableWithControlsProps {
|
|
6
9
|
tableControlsData: TableControlsData;
|
|
7
10
|
tableData: TableProps<Record<string, any>>;
|
|
8
11
|
onChange: (event: ActionEvent<TableEventPayload>) => void;
|
|
12
|
+
tableType?: TableType;
|
|
13
|
+
isInfiniteScroll?: boolean;
|
|
14
|
+
infiniteScrollConfig?: InfiniteScrollConfig<Record<string, any>>;
|
|
15
|
+
paginationStyle?: PaginationStyle;
|
|
9
16
|
onRowClick?: (record: Record<string, any>, index: number, event: React.MouseEvent) => void;
|
|
10
17
|
}
|
|
11
|
-
declare const TableWithControls: ({ tableData, tableControlsData, onChange, onRowClick, }: TableWithControlsProps) => import("react/jsx-runtime").JSX.Element;
|
|
18
|
+
declare const TableWithControls: ({ tableData, tableControlsData, onChange, onRowClick, tableType, isInfiniteScroll, infiniteScrollConfig, paginationStyle, }: TableWithControlsProps) => import("react/jsx-runtime").JSX.Element;
|
|
12
19
|
export default TableWithControls;
|
|
@@ -26,7 +26,10 @@ export declare const useTableWithControls: (tableConfig: UseTableConfig) => {
|
|
|
26
26
|
type: import('../Table/Table').SelectionType;
|
|
27
27
|
selectedRowKeys: import('react').Key[];
|
|
28
28
|
onChange: (newSelectedRowKeys: React.Key[], newSelectedRows: Record<string, any>[]) => void;
|
|
29
|
-
getCheckboxProps: (record: any) =>
|
|
29
|
+
getCheckboxProps: (record: any) => {
|
|
30
|
+
disabled?: boolean;
|
|
31
|
+
name?: string;
|
|
32
|
+
};
|
|
30
33
|
};
|
|
31
34
|
selectedRows: Record<string, any>[];
|
|
32
35
|
selectedRowKeys: import('react').Key[];
|