gantri-components 2.83.0-beta.3 → 2.83.0-beta.5
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/components/after-row-component/after-row-component.d.ts +3 -0
- package/dist/components/table/components/after-row-component/after-row-component.types.d.ts +11 -0
- package/dist/components/table/components/after-row-component/index.d.ts +1 -0
- package/dist/components/table/components/table-row/table-row.types.d.ts +2 -0
- package/dist/components/table/table.types.d.ts +2 -6
- package/dist/index.cjs.js +1 -1
- package/dist/index.esm.js +1 -1
- package/dist/index.umd.js +1 -1
- package/package.json +1 -1
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import { RowData } from '@tanstack/react-table';
|
|
2
|
+
import { AfterRowComponentProps } from './after-row-component.types';
|
|
3
|
+
export declare const AfterRowComponent: <TData extends RowData<import("../..").CustomTData>>(props: AfterRowComponentProps<TData>) => JSX.Element | null;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { JSXElementConstructor } from 'react';
|
|
2
|
+
import { Row, RowData } from '@tanstack/react-table';
|
|
3
|
+
export interface AfterRowComponentProps<TData extends RowData> {
|
|
4
|
+
getAfterRowComponent: GetAfterRowComponentDef<TData> | undefined;
|
|
5
|
+
row: Row<TData>;
|
|
6
|
+
}
|
|
7
|
+
export type GetAfterRowComponentDef<TData extends RowData> = (props: {
|
|
8
|
+
row: Row<TData>;
|
|
9
|
+
}) => JSXElementConstructor<{
|
|
10
|
+
row: Row<TData>;
|
|
11
|
+
}> | false | null | undefined;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './after-row-component';
|
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
import { Row, RowData } from '@tanstack/react-table';
|
|
2
2
|
import { CustomRowProps, GetCellProps, OnRowClick, RowReorderingProps } from '../../table.types';
|
|
3
|
+
import { GetAfterRowComponentDef } from '../after-row-component/after-row-component.types';
|
|
3
4
|
export interface TableRowProps<TData extends RowData> {
|
|
4
5
|
customRowProps: CustomRowProps;
|
|
6
|
+
getAfterRowComponent: GetAfterRowComponentDef<TData> | undefined;
|
|
5
7
|
getCellProps: GetCellProps<TData> | undefined;
|
|
6
8
|
index?: number;
|
|
7
9
|
onRowClick?: OnRowClick<TData>;
|
|
@@ -4,6 +4,7 @@ import { PagingProps } from './components/table-actions-wrapper/components/pagin
|
|
|
4
4
|
import { CustomActionProps, FiltersProps, SearchProps } from './components/table-actions-wrapper/table-actions-wrapper.types';
|
|
5
5
|
import { SortProps } from './components/table-actions-wrapper/components/sort/sort.types';
|
|
6
6
|
import { OverlayPosition } from '../overlay/overlay.types';
|
|
7
|
+
import { GetAfterRowComponentDef } from './components/after-row-component/after-row-component.types';
|
|
7
8
|
export interface RowReorderingProps<TData extends RowData> {
|
|
8
9
|
disabled?: boolean;
|
|
9
10
|
getDisableSortableRow?: (row: Row<TData>) => boolean;
|
|
@@ -43,6 +44,7 @@ export interface TableProps<TData extends RowData> extends Partial<TableDefaultP
|
|
|
43
44
|
/** If your data is collapsable, passing `true` here will expand all the data by default. */
|
|
44
45
|
expandAllRows?: boolean;
|
|
45
46
|
filters?: FiltersProps;
|
|
47
|
+
getAfterRowComponent?: GetAfterRowComponentDef<TData>;
|
|
46
48
|
getCellProps?: GetCellProps<TData>;
|
|
47
49
|
/**
|
|
48
50
|
* If getColumnsConfig and onColumnsConfigChange are provided,
|
|
@@ -101,12 +103,6 @@ export interface CustomTableMeta<TData extends RowData> {
|
|
|
101
103
|
onColumnsConfigChange?: (config: ColumnConfig[]) => Promise<void>;
|
|
102
104
|
}
|
|
103
105
|
export interface CustomColumnMeta<TData extends RowData, TValue> {
|
|
104
|
-
/** Can be used to map over the columns and generate download data for a CSV. */
|
|
105
|
-
download: {
|
|
106
|
-
getValue: (data: TData) => string | number;
|
|
107
|
-
header: string;
|
|
108
|
-
key: string;
|
|
109
|
-
};
|
|
110
106
|
/** If the function returns true, enables clickable td styling. */
|
|
111
107
|
getIsClickable?: (cell: Cell<TData, TValue>) => boolean;
|
|
112
108
|
/** If a function is returned, it will be passed to the td element and automatically enable clickable td styling. */
|