gantri-components 2.154.1 → 2.155.0
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/table-actions-wrapper/components/search/search.types.d.ts +2 -0
- package/dist/components/table/components/table-actions-wrapper/table-actions-wrapper.types.d.ts +3 -2
- package/dist/components/table/table.types.d.ts +5 -0
- 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
package/dist/components/table/components/table-actions-wrapper/components/search/search.types.d.ts
CHANGED
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
import { Property } from 'csstype';
|
|
2
|
+
import { ColumnDef } from '@tanstack/react-table';
|
|
2
3
|
import { TextFieldProps } from '../../../../../text-field';
|
|
3
4
|
import { OnConfirmInteraction } from '../../hooks';
|
|
4
5
|
export interface SearchProps extends Partial<SearchDefaultProps> {
|
|
6
|
+
columns: ColumnDef<any, any>[];
|
|
5
7
|
onSearch: TextFieldProps['onTextChange'];
|
|
6
8
|
value: SearchDefaultProps['value'];
|
|
7
9
|
}
|
package/dist/components/table/components/table-actions-wrapper/table-actions-wrapper.types.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { JSXElementConstructor } from 'react';
|
|
2
|
-
import { RowData, Table } from '@tanstack/react-table';
|
|
2
|
+
import { ColumnDef, RowData, Table } from '@tanstack/react-table';
|
|
3
3
|
import { PagingProps } from './components/paging/paging.types';
|
|
4
4
|
import { SortProps } from './components/sort/sort.types';
|
|
5
5
|
import { SearchProps } from './components/search/search.types';
|
|
@@ -19,10 +19,11 @@ export interface CustomActionComponentProps<TData extends RowData> {
|
|
|
19
19
|
}
|
|
20
20
|
export interface CustomActionProps<TData extends RowData> {
|
|
21
21
|
Component: JSXElementConstructor<CustomActionComponentProps<TData>>;
|
|
22
|
-
position: typeof customActionPositions[keyof typeof customActionPositions];
|
|
22
|
+
position: (typeof customActionPositions)[keyof typeof customActionPositions];
|
|
23
23
|
}
|
|
24
24
|
export interface TableActionsWrapperProps<TData extends RowData> {
|
|
25
25
|
className: string | undefined;
|
|
26
|
+
columns: ColumnDef<any, any>[];
|
|
26
27
|
customAction: CustomActionProps<TData> | undefined;
|
|
27
28
|
filters: FiltersProps | undefined;
|
|
28
29
|
paging: PagingProps | undefined;
|
|
@@ -7,6 +7,7 @@ import { SortProps } from './components/table-actions-wrapper/components/sort/so
|
|
|
7
7
|
import { OverlayPosition } from '../overlay/overlay.types';
|
|
8
8
|
import { GetAfterRowComponentDef } from './components/after-row-component/after-row-component.types';
|
|
9
9
|
import { RowSelection } from './hooks/use-row-selection/use-row-selection.types';
|
|
10
|
+
import { ResolutionAwareProp } from '../../types';
|
|
10
11
|
export interface RowReorderingProps<TData extends RowData> {
|
|
11
12
|
disabled?: boolean;
|
|
12
13
|
getDisableSortableRow?: (row: Row<TData>) => boolean;
|
|
@@ -112,6 +113,8 @@ export interface CustomColumnMeta<TData extends RowData, TValue> {
|
|
|
112
113
|
getIsClickable?: (cell: Cell<TData, TValue>) => boolean;
|
|
113
114
|
/** If a function is returned, it will be passed to the td element and automatically enable clickable td styling. */
|
|
114
115
|
getOnClick?: (cell: Cell<TData, TValue>) => MouseEventHandler<HTMLTableCellElement>;
|
|
116
|
+
/** Use to override the default header justify content. */
|
|
117
|
+
headerJustifyContent?: ResolutionAwareProp<Property.JustifyContent>;
|
|
115
118
|
/**
|
|
116
119
|
* If true, the column is initially hidden in the table.
|
|
117
120
|
*
|
|
@@ -124,6 +127,8 @@ export interface CustomColumnMeta<TData extends RowData, TValue> {
|
|
|
124
127
|
* If false, the column cannot be hidden by the user.
|
|
125
128
|
*/
|
|
126
129
|
hideable?: boolean;
|
|
130
|
+
/** If `true`, lists the header's value if a string. Otherwise, the meta.label property. */
|
|
131
|
+
isSearchable?: boolean;
|
|
127
132
|
/**
|
|
128
133
|
* The label to display for this column in the table header.
|
|
129
134
|
*
|