@procore/data-table 14.4.2 → 14.4.3-next.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/CHANGELOG.md +7 -0
- package/dist/Analytics/Analytics.d.ts +18 -0
- package/dist/Analytics/Client.d.ts +10 -0
- package/dist/Analytics/index.d.ts +2 -0
- package/dist/Analytics/types.d.ts +21 -0
- package/dist/BulkActions/BulkActions.d.ts +10 -0
- package/dist/BulkActions/BulkEditActionButton.d.ts +6 -0
- package/dist/CellRenderers/AutoGroupCell.d.ts +15 -0
- package/dist/CellRenderers/BooleanCell.d.ts +18 -0
- package/dist/CellRenderers/ButtonsCell.d.ts +8 -0
- package/dist/CellRenderers/Cells.d.ts +19 -0
- package/dist/CellRenderers/CompanyCell.d.ts +15 -0
- package/dist/CellRenderers/CurrencyCell.d.ts +23 -0
- package/dist/CellRenderers/DataTableCell.d.ts +67 -0
- package/dist/CellRenderers/DateCell.d.ts +23 -0
- package/dist/CellRenderers/DateTimeCell.d.ts +21 -0
- package/dist/CellRenderers/FullWidthCell.d.ts +5 -0
- package/dist/CellRenderers/GrandTotalsLabel.d.ts +5 -0
- package/dist/CellRenderers/GroupCell.d.ts +34 -0
- package/dist/CellRenderers/InlineEditWrapper.d.ts +35 -0
- package/dist/CellRenderers/InlineError.d.ts +10 -0
- package/dist/CellRenderers/LinkCell.d.ts +13 -0
- package/dist/CellRenderers/MultiSelectCell.d.ts +20 -0
- package/dist/CellRenderers/NumberCell.d.ts +21 -0
- package/dist/CellRenderers/PeopleCell.d.ts +18 -0
- package/dist/CellRenderers/PercentCell.d.ts +23 -0
- package/dist/CellRenderers/PersonCell.d.ts +17 -0
- package/dist/CellRenderers/PillCell.d.ts +22 -0
- package/dist/CellRenderers/RowActionsCell.d.ts +16 -0
- package/dist/CellRenderers/RowCheckbox.d.ts +9 -0
- package/dist/CellRenderers/SelectCell.d.ts +27 -0
- package/dist/CellRenderers/TextAreaCell.d.ts +18 -0
- package/dist/CellRenderers/TextCell.d.ts +18 -0
- package/dist/CellRenderers/index.d.ts +16 -0
- package/dist/ClientSideDataTable.d.ts +25 -0
- package/dist/DataTable.d.ts +36 -0
- package/dist/EmptyState.d.ts +12 -0
- package/dist/FilterRenderers/ClientSideFilter.d.ts +11 -0
- package/dist/FilterRenderers/DateFilterRenderer.d.ts +47 -0
- package/dist/FilterRenderers/LocationFilterRenderer.d.ts +9 -0
- package/dist/FilterRenderers/MultiSelectFilterRenderer.d.ts +7 -0
- package/dist/FilterRenderers/NumberFilterRenderer.d.ts +23 -0
- package/dist/FilterRenderers/ServerSideFilter.d.ts +3 -0
- package/dist/FilterRenderers/index.d.ts +114 -0
- package/dist/FilterRenderers/useServerSideFilter.d.ts +16 -0
- package/dist/FilterRenderers/useServerSideFilterStorage.d.ts +3 -0
- package/dist/FilterRenderers/utils.d.ts +7 -0
- package/dist/GenericHeader/GenericColumnGroupHeader.d.ts +15 -0
- package/dist/GenericHeader/GenericHeader.d.ts +27 -0
- package/dist/Panels/BulkEdit.d.ts +65 -0
- package/dist/Panels/Configuration.d.ts +8 -0
- package/dist/Panels/Filters.d.ts +10 -0
- package/dist/Panels/StyledPanelSection.d.ts +4 -0
- package/dist/Panels/helpers.d.ts +12 -0
- package/dist/Panels/useContextPanel.d.ts +2 -0
- package/dist/QuickControls/ConfigPanelButton.d.ts +2 -0
- package/dist/QuickControls/EmptyResultsControlTooltip.d.ts +6 -0
- package/dist/QuickControls/FiltersPanelToggleButton.d.ts +9 -0
- package/dist/QuickControls/QuickControls.d.ts +8 -0
- package/dist/QuickControls/QuickFilters.d.ts +12 -0
- package/dist/QuickControls/RowGroupSelector.d.ts +5 -0
- package/dist/QuickControls/Search.d.ts +9 -0
- package/dist/QuickControls/ServerSideSearch.d.ts +13 -0
- package/dist/QuickFilterRenderers/DateQuickFilterRenderer.d.ts +30 -0
- package/dist/QuickFilterRenderers/LocationQuickFilterRenderer.d.ts +4 -0
- package/dist/QuickFilterRenderers/MultiSelectQuickFilterRenderer.d.ts +7 -0
- package/dist/QuickFilterRenderers/QuickFilterLabel.d.ts +13 -0
- package/dist/QuickFilterRenderers/SingleSelectQuickFilterRenderer.d.ts +19 -0
- package/dist/QuickFilterRenderers/SuperSelectFilterPreset.d.ts +8 -0
- package/dist/QuickFilterRenderers/index.d.ts +4 -0
- package/dist/QuickFilterRenderers/types.d.ts +16 -0
- package/dist/QuickFilterRenderers/utils.d.ts +6 -0
- package/dist/ServerSideDataTable.d.ts +25 -0
- package/dist/constants.d.ts +21 -0
- package/dist/icons.d.ts +1 -0
- package/dist/index.d.ts +24 -0
- package/dist/index.js +220 -0
- package/dist/index.js.LICENSE.txt +60 -0
- package/dist/state/useFilterState.d.ts +36 -0
- package/dist/state/useRowSelectionState.d.ts +8 -0
- package/dist/types.d.ts +684 -0
- package/dist/utils/ContactItem.d.ts +12 -0
- package/dist/utils/RadioList.d.ts +12 -0
- package/dist/utils/addSubcomponents.d.ts +3 -0
- package/dist/utils/adjustRowDragIcon.d.ts +2 -0
- package/dist/utils/aggData.d.ts +3 -0
- package/dist/utils/aggregationFunctions.d.ts +2 -0
- package/dist/utils/buildDetailRows.d.ts +14 -0
- package/dist/utils/cellHelpers.d.ts +25 -0
- package/dist/utils/columnDefHelpers.d.ts +10 -0
- package/dist/utils/columnMenuHelpers.d.ts +11 -0
- package/dist/utils/companyOptionRenderer.d.ts +3 -0
- package/dist/utils/findNode.d.ts +6 -0
- package/dist/utils/generateHTMLString.d.ts +23 -0
- package/dist/utils/genericAnalyticsClient.d.ts +19 -0
- package/dist/utils/getCellValueTypographyProps.d.ts +5 -0
- package/dist/utils/getRootRowNode.d.ts +2 -0
- package/dist/utils/helpers.d.ts +14 -0
- package/dist/utils/internalTableContext.d.ts +45 -0
- package/dist/utils/isEmptyValue.d.ts +1 -0
- package/dist/utils/logger.d.ts +5 -0
- package/dist/utils/pagination.d.ts +5 -0
- package/dist/utils/personOptionRenderer.d.ts +3 -0
- package/dist/utils/rowSelectionHelpers.d.ts +54 -0
- package/dist/utils/serverSideSharedTestHelpers.d.ts +237 -0
- package/dist/utils/setSiblingGroupsRowSelection.d.ts +2 -0
- package/dist/utils/sort.d.ts +7 -0
- package/dist/utils/sortFilters.d.ts +2 -0
- package/dist/utils/test/i18n.d.ts +4 -0
- package/dist/utils/transformers.d.ts +25 -0
- package/dist/utils/translations.d.ts +1990 -0
- package/dist/utils/useTableApi.d.ts +14 -0
- package/dist/utils/waitForAsyncCondition.d.ts +1 -0
- package/package.json +9 -9
- package/dist/legacy/index.d.mts +0 -1399
- package/dist/legacy/index.d.ts +0 -1399
- package/dist/legacy/index.js +0 -88330
- package/dist/legacy/index.mjs +0 -88271
- package/dist/modern/index.d.mts +0 -1399
- package/dist/modern/index.d.ts +0 -1399
- package/dist/modern/index.js +0 -88100
- package/dist/modern/index.mjs +0 -88041
package/dist/types.d.ts
ADDED
|
@@ -0,0 +1,684 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { CheckboxSelectionCallbackParams, ColDef, Column, ColumnApi, ColumnEverythingChangedEvent, ColumnPinnedType, ExcelDataType, GetRowIdParams, GridApi, ICellEditor, ICellEditorParams, ICellRendererParams, IRowNode, Module, RefreshCellsParams, RowDataTransaction, RowGroupOpenedEvent, RowHeightParams, RowNode as AGRowNode, RowNodeTransaction, RowSelectedEvent, SelectionEventSourceType, ServerSideTransaction } from '@ag-grid-community/core';
|
|
3
|
+
import { AgGridReactProps, AgReactUiProps } from '@ag-grid-community/react';
|
|
4
|
+
import type { ComponentWithFieldProp, FormFieldValueComponentProps } from '@procore/core-react';
|
|
5
|
+
import { AnalyticsConfig } from './Analytics/types';
|
|
6
|
+
import { GrandTotalsLabelRendererProps } from './CellRenderers/GrandTotalsLabel';
|
|
7
|
+
import { ColumnSort, PinColumnSide, RowSize } from './constants';
|
|
8
|
+
import { FilterComponentProps, IDateFilterProps, IFilterProps, ILocationFilterProps, INumberFilterProps, IServerFilter } from './FilterRenderers';
|
|
9
|
+
import { NumberFilterModel, NumberFilterValue } from './FilterRenderers/NumberFilterRenderer';
|
|
10
|
+
import { MenuDropdownOption } from './GenericHeader/GenericHeader';
|
|
11
|
+
import { BulkEditResult } from './Panels/BulkEdit';
|
|
12
|
+
import { ClientSideFilterProps, ServerSideFilterProps } from './QuickFilterRenderers/types';
|
|
13
|
+
import { ListFilter } from './state/useFilterState';
|
|
14
|
+
import { ExportPageFormat } from './utils/generateHTMLString';
|
|
15
|
+
import { AffectedRows } from './utils/rowSelectionHelpers';
|
|
16
|
+
export type GranularRequired<T, K extends keyof T> = Omit<T, K> & Required<Pick<T, K>>;
|
|
17
|
+
export type GranularPartial<T, K extends keyof T> = Omit<T, K> & Partial<Pick<T, K>>;
|
|
18
|
+
/** Column Definitions */
|
|
19
|
+
export interface ColumnDefinition<TValue = any, TRenderer = React.FC<ICellRendererParams<any, TValue>>, TRendererParams = any, TEditor = React.ForwardRefExoticComponent<ICellEditorParams<any, TValue>>, TEditorParams = any, TFilterOption = TValue, TFilterValue = number | string | LocationFilterOpt | {
|
|
20
|
+
date: Date;
|
|
21
|
+
} | NumberFilterValue, TBulkEditor = string, TBulkEditorParams = any> {
|
|
22
|
+
aggFunc?: string | AggregationFunction<TValue>;
|
|
23
|
+
bulkEditable?: ((params: IsEditableParams) => boolean) | boolean;
|
|
24
|
+
bulkEditEditor?: TBulkEditor;
|
|
25
|
+
bulkEditEditorParams?: TBulkEditorParams;
|
|
26
|
+
children?: ColumnDefinition[] | ExtendedColDef[];
|
|
27
|
+
groupId?: string;
|
|
28
|
+
cellEditor?: TEditor;
|
|
29
|
+
cellEditorParams?: TEditorParams;
|
|
30
|
+
cellCSVFormatter?: (value: TValue) => string;
|
|
31
|
+
cellExcelFormatter?: (value: TValue) => string;
|
|
32
|
+
cellExcelDataType?: string;
|
|
33
|
+
cellRenderer?: TRenderer;
|
|
34
|
+
cellRendererParams?: TRendererParams;
|
|
35
|
+
cellRendererSelector?: (params?: ICellRendererParams) => {
|
|
36
|
+
component: TRenderer;
|
|
37
|
+
params: TRendererParams;
|
|
38
|
+
};
|
|
39
|
+
columnGroupName?: string;
|
|
40
|
+
comparator?: (a: any, b: any) => number;
|
|
41
|
+
editable?: ((params: IsEditableParams) => boolean) | boolean;
|
|
42
|
+
enableRowGroup?: boolean;
|
|
43
|
+
field: string;
|
|
44
|
+
filterRenderer?: React.FunctionComponent<FilterComponentProps>;
|
|
45
|
+
filterProps?: Omit<IFilterProps<TFilterOption, TFilterValue> | IDateFilterProps<TFilterOption, TFilterValue> | ILocationFilterProps<TFilterOption, TFilterValue> | INumberFilterProps<{
|
|
46
|
+
id: NumberFilterModel['type'];
|
|
47
|
+
label: string;
|
|
48
|
+
}, TFilterValue>, 'columnDefinition'>;
|
|
49
|
+
quickFilterRenderer?: React.FunctionComponent<ClientSideFilterProps | ServerSideFilterProps>;
|
|
50
|
+
flex?: number;
|
|
51
|
+
getStringFormattedValue?: (value: TValue) => string;
|
|
52
|
+
getFilterKeyCreator?: ColDef['keyCreator'];
|
|
53
|
+
headerName?: string;
|
|
54
|
+
columnHeaderParams?: {
|
|
55
|
+
menuOptions?: MenuDropdownOption[];
|
|
56
|
+
headerNode?: (props: {
|
|
57
|
+
columnDefinition: ColumnDefinition;
|
|
58
|
+
}) => React.ReactNode;
|
|
59
|
+
};
|
|
60
|
+
hidden?: boolean;
|
|
61
|
+
/** @deprecated please use pinned instead */
|
|
62
|
+
initialIsPinned?: PinColumnSide;
|
|
63
|
+
initialSort?: ColumnSort;
|
|
64
|
+
lockPinned?: boolean;
|
|
65
|
+
lockVisible?: boolean;
|
|
66
|
+
marryChildren?: boolean;
|
|
67
|
+
maxWidth?: number;
|
|
68
|
+
minWidth?: number;
|
|
69
|
+
onCellValueChanged?: (params: CellValueChangeParams<TValue>) => void;
|
|
70
|
+
pinned?: PinColumnSide;
|
|
71
|
+
resizable?: boolean;
|
|
72
|
+
rightAlign?: boolean;
|
|
73
|
+
rowGroup?: boolean;
|
|
74
|
+
sortable?: boolean;
|
|
75
|
+
suppressMenu?: boolean;
|
|
76
|
+
suppressMovable?: boolean;
|
|
77
|
+
suppressSizeToFit?: boolean;
|
|
78
|
+
valueGetter?: (params: ValueGetterParams) => TValue;
|
|
79
|
+
valueParser?: (params: ValueParserParams) => TValue;
|
|
80
|
+
valueSetter?: (params: ValueSetterParams) => boolean;
|
|
81
|
+
valueValidator?: ValueValidator<TValue>;
|
|
82
|
+
width?: number;
|
|
83
|
+
autoHeight?: boolean;
|
|
84
|
+
wrapText?: boolean;
|
|
85
|
+
lockPosition?: ColDef['lockPosition'];
|
|
86
|
+
}
|
|
87
|
+
export interface ExtendedColDef extends ColDef {
|
|
88
|
+
bulkEditable?: ((params: IsEditableParams) => boolean) | boolean;
|
|
89
|
+
valueValidator?: ValueValidator;
|
|
90
|
+
bulkEditEditor?: 'number' | 'text';
|
|
91
|
+
cellCSVFormatter?: (v: any) => any;
|
|
92
|
+
cellExcelFormatter?: (v: any) => any;
|
|
93
|
+
colGroupName?: string;
|
|
94
|
+
children?: ExtendedColDef[];
|
|
95
|
+
groupId?: string;
|
|
96
|
+
}
|
|
97
|
+
export interface NestedColumnDefinition {
|
|
98
|
+
children: ColumnDefinition[];
|
|
99
|
+
groupId: string;
|
|
100
|
+
headerName: string;
|
|
101
|
+
columnGroupShow?: 'open' | 'closed';
|
|
102
|
+
marryChildren?: boolean;
|
|
103
|
+
}
|
|
104
|
+
/** Controls the type of filtering: single, range,
|
|
105
|
+
* or up to user choice (either) */
|
|
106
|
+
export type DateFilterSelectionType = 'single' | 'range' | 'either';
|
|
107
|
+
export interface DateTimeCellColumnDefinition<TValue = any, TRenderer = string, TRendererParams = any, TEditor = string, TEditorParams = any> extends ColumnDefinition<TValue, TRenderer, TRendererParams, TEditor, TEditorParams, {
|
|
108
|
+
date: Date;
|
|
109
|
+
}, string> {
|
|
110
|
+
filterProps?: Omit<IDateFilterProps<{
|
|
111
|
+
date: Date;
|
|
112
|
+
}, string>, 'columnDefinition'>;
|
|
113
|
+
/** See this this list of timezones: https://github.com/eggert/tz/blob/main/zone1970.tab */
|
|
114
|
+
timeZone?: string;
|
|
115
|
+
}
|
|
116
|
+
export interface LocationFilterOpt {
|
|
117
|
+
id: number | string;
|
|
118
|
+
label: string;
|
|
119
|
+
}
|
|
120
|
+
export interface LocationColumnDefinition extends Omit<ColumnDefinition, 'filterProps'> {
|
|
121
|
+
filterProps?: ILocationFilterProps<LocationFilterOpt, string>;
|
|
122
|
+
}
|
|
123
|
+
export * from './Analytics/types';
|
|
124
|
+
export type { BooleanCellColumnDefinition, BooleanCellEditorProps, BooleanCellRendererProps, } from './CellRenderers/BooleanCell';
|
|
125
|
+
export type { ButtonsCellColumnDefinition } from './CellRenderers/ButtonsCell';
|
|
126
|
+
export type { CompanyCellColumnDefinition, CompanyCellRendererProps, } from './CellRenderers/CompanyCell';
|
|
127
|
+
export type { CurrencyCellColumnDefinition, CurrencyCellEditorProps, CurrencyCellRendererProps, } from './CellRenderers/CurrencyCell';
|
|
128
|
+
export type { DataTableCellEditorProps, DataTableCellRendererProps, } from './CellRenderers/DataTableCell';
|
|
129
|
+
export type { DateCellColumnDefinition, DateCellEditorProps, DateCellRendererProps, } from './CellRenderers/DateCell';
|
|
130
|
+
export type { GroupCellColumnDefinition } from './CellRenderers/GroupCell';
|
|
131
|
+
export type { LinkCellColumnDefinition, LinkCellRendererProps, } from './CellRenderers/LinkCell';
|
|
132
|
+
export type { MultiSelectCellColumnDefinition, MultiSelectCellRendererProps, } from './CellRenderers/MultiSelectCell';
|
|
133
|
+
export type { NumberCellColumnDefinition, NumberCellEditorProps, NumberCellRendererProps, } from './CellRenderers/NumberCell';
|
|
134
|
+
export type { PeopleCellColumnDefinition, PeopleCellRendererProps, } from './CellRenderers/PeopleCell';
|
|
135
|
+
export type { PercentCellColumnDefinition, PercentCellEditorProps, PercentCellRendererProps, } from './CellRenderers/PercentCell';
|
|
136
|
+
export type { PillCellColumnDefinition, PillCellRendererProps, PillSelectCellEditorProps, } from './CellRenderers/PillCell';
|
|
137
|
+
export type { SelectCellColumnDefinition, SelectCellEditorProps, SelectCellRendererProps, } from './CellRenderers/SelectCell';
|
|
138
|
+
export type { TextAreaCellColumnDefinition, TextAreaCellEditorProps, TextAreaCellRendererProps, } from './CellRenderers/TextAreaCell';
|
|
139
|
+
export type { TextCellColumnDefinition, TextCellEditorProps, TextCellRendererProps, } from './CellRenderers/TextCell';
|
|
140
|
+
/** End Column Definitions */
|
|
141
|
+
export interface TableApi {
|
|
142
|
+
applyListFilter: (field: string, values: any[]) => Promise<void>;
|
|
143
|
+
applyNumberFilter: (field: string, values: Omit<NumberFilterModel, 'filterType'>) => Promise<void>;
|
|
144
|
+
applyTransaction: (rowDataTransaction: RowDataTransaction) => RowNodeTransaction | null | undefined;
|
|
145
|
+
applyServerSideTransaction: (transaction: ServerSideTransaction) => ReturnType<GridApi['applyServerSideTransaction']>;
|
|
146
|
+
collapseAll: () => void;
|
|
147
|
+
exportToCSV: (config: CSVExportConfig) => void;
|
|
148
|
+
expandAll: () => void;
|
|
149
|
+
exportToExcel: (config: ExcelExportConfig) => void;
|
|
150
|
+
exportToHTMLString: (config?: HTMLStringExportConfig) => Promise<string>;
|
|
151
|
+
/**
|
|
152
|
+
* Returns an array of column definitions (of type ColumnDefinition from DataTable) transformed
|
|
153
|
+
* from ag-grid's current array of col defs (of type ColDef from ag-grid)
|
|
154
|
+
*/
|
|
155
|
+
getColumnDefinitions: () => ColumnDefinition[];
|
|
156
|
+
getDetailGridTableApi: (rowId: string) => PartialTableApi | undefined;
|
|
157
|
+
getRootAggregateData: () => any;
|
|
158
|
+
/**
|
|
159
|
+
* For now, used for testing to detect open editors. If programmatic editing
|
|
160
|
+
* is something we want to enable, we can consider making this public
|
|
161
|
+
* @private
|
|
162
|
+
*/
|
|
163
|
+
getCellEditorInstances: () => ICellEditor[];
|
|
164
|
+
/**
|
|
165
|
+
* Get the sorted leaf and group nodes remaining after filtering. Note: This only works for tables using the client side row model.
|
|
166
|
+
*/
|
|
167
|
+
getFilteredAndSortedRowNodes: () => RowNode[];
|
|
168
|
+
getListFilter: (field: string) => Promise<any | undefined>;
|
|
169
|
+
getListFilters: (fields?: string[]) => Promise<ListFilter[]>;
|
|
170
|
+
getTableConfiguration: () => DataTableConfig;
|
|
171
|
+
getBulkEditColumns: () => ColumnDefinition[];
|
|
172
|
+
hideContextPanel: ContextPanelApi['hide'];
|
|
173
|
+
isAnyFilterPresent: () => boolean;
|
|
174
|
+
isSearchPresent: () => boolean;
|
|
175
|
+
refreshCells: (params?: RefreshCellsParams) => void;
|
|
176
|
+
refreshServerSide: (params: RefreshServerSideDataParams) => void;
|
|
177
|
+
removeAllFilters: () => void;
|
|
178
|
+
removeFilter: (field: string) => Promise<void>;
|
|
179
|
+
setColumnsVisibility: (field: string[], visibility: boolean) => void;
|
|
180
|
+
setColumnVisibility: (field: string, visibility: boolean) => void;
|
|
181
|
+
setLoading: (loading: boolean, message?: string) => void;
|
|
182
|
+
setPinnedBottomRowData: (rows: any[]) => void;
|
|
183
|
+
setRowNodeExpanded: (rowNode: AGRowNode, expanded: boolean) => void;
|
|
184
|
+
setRowGrouping: (group: string[]) => void;
|
|
185
|
+
setRowHeight: (size: RowSize) => void;
|
|
186
|
+
setSearchValue: (value: string) => void;
|
|
187
|
+
setTableConfiguration: (config: DataTableConfig) => void;
|
|
188
|
+
showContextPanel: ContextPanelApi['show'];
|
|
189
|
+
sizeColumnsToFit: (tableWidth?: number) => void;
|
|
190
|
+
/**
|
|
191
|
+
* Get row data for all leaf row nodes. Note: This only works for tables using the client side row model.
|
|
192
|
+
*/
|
|
193
|
+
getRowData: () => any[];
|
|
194
|
+
setRowData: (items: any[]) => void;
|
|
195
|
+
getSelectedRows: () => any[];
|
|
196
|
+
/**
|
|
197
|
+
* Select all rows, regardless of filtering and rows that are not visible due to grouping being enabled and their groups not expanded.
|
|
198
|
+
* Note: This currently doesn't work for SSRM tables.
|
|
199
|
+
*/
|
|
200
|
+
selectAll: () => void;
|
|
201
|
+
/** Clear all row selections, regardless of filtering. */
|
|
202
|
+
deselectAll: () => void;
|
|
203
|
+
/** Auto-sizes a column based on its contents. */
|
|
204
|
+
autoSizeColumn?: (key: string | Column, skipHeader?: boolean) => void;
|
|
205
|
+
/** Same as `autoSizeColumn`, but provide a list of column keys. */
|
|
206
|
+
autoSizeColumns?: (keys: (string | Column)[], skipHeader?: boolean) => void;
|
|
207
|
+
/** Calls `autoSizeColumns` on all displayed columns. */
|
|
208
|
+
autoSizeAllColumns?: (skipHeader?: boolean) => void;
|
|
209
|
+
/**
|
|
210
|
+
* Scroll a row into view and optionally focus on one of its cells. If no argument is passed to `focusField` it will default to not applying focus.
|
|
211
|
+
* Once in view the row will be positioned at the top, middle or bottom of the visible table rows depending on the optional `position` parameter.
|
|
212
|
+
* If no argument is passsed to `position` it will default to doing the minimum amount of scrolling required to show the row.
|
|
213
|
+
* */
|
|
214
|
+
scrollToRow(rowIndex: number, focusField?: string, position?: 'top' | 'bottom' | 'middle'): void;
|
|
215
|
+
/**
|
|
216
|
+
* Selects row nodes by their respective row node IDs.
|
|
217
|
+
* The row node ID is the one you provide from the callback `getRowId(data)`,
|
|
218
|
+
* otherwise the ID is a number auto-generated by the grid when the row data is set.
|
|
219
|
+
*/
|
|
220
|
+
selectRows: (rowIds: (string | number)[], source?: SelectionEventSourceType) => void;
|
|
221
|
+
/**
|
|
222
|
+
* Deselects row nodes by their respective row node IDs.
|
|
223
|
+
* The row node ID is the one you provide from the callback `getRowId(data)`,
|
|
224
|
+
* otherwise the ID is a number auto-generated by the grid when the row data is set.
|
|
225
|
+
*/
|
|
226
|
+
deselectRows: (rowIds: (string | number)[], source?: SelectionEventSourceType) => void;
|
|
227
|
+
/**
|
|
228
|
+
* Set a function determining if selection is enabled for each row as it's loaded into the table.
|
|
229
|
+
* Note: Changing this will not affect existing rows that have already been loaded. Additionally,
|
|
230
|
+
* selected rows which are later disabled remain selected.
|
|
231
|
+
*/
|
|
232
|
+
setIsRowSelectable?(isRowSelectableFunc: IsRowSelectable): void;
|
|
233
|
+
}
|
|
234
|
+
export type PartialTableApi = Pick<TableApi, 'applyTransaction' | 'applyServerSideTransaction' | 'collapseAll' | 'deselectAll' | 'expandAll' | 'getColumnDefinitions' | 'getDetailGridTableApi' | 'getFilteredAndSortedRowNodes' | 'getRootAggregateData' | 'getRowData' | 'getSelectedRows' | 'getTableConfiguration' | 'refreshCells' | 'scrollToRow' | 'selectAll' | 'setPinnedBottomRowData' | 'setRowData' | 'setRowNodeExpanded' | 'sizeColumnsToFit'>;
|
|
235
|
+
export type AgDomLayout = 'normal' | 'autoHeight' | 'print' | undefined;
|
|
236
|
+
export interface IsRowSelectable {
|
|
237
|
+
(node: RowNode): boolean;
|
|
238
|
+
}
|
|
239
|
+
export interface RowSelectionRef {
|
|
240
|
+
affectedRows: AffectedRows;
|
|
241
|
+
enabled?: boolean | ((params: RowSelectablePredicateParams<any>) => boolean);
|
|
242
|
+
getRowId: DataTableProps['getRowId'];
|
|
243
|
+
siblingGroupsRowDisabled?: boolean;
|
|
244
|
+
}
|
|
245
|
+
export interface CellValueChangeParams<TValue> {
|
|
246
|
+
field: string;
|
|
247
|
+
rowData: Record<string, any>;
|
|
248
|
+
newValue: TValue;
|
|
249
|
+
oldValue: TValue;
|
|
250
|
+
rowIndex?: number | null;
|
|
251
|
+
}
|
|
252
|
+
interface FirstDataRenderedEvent<TData = any, TContext = any> {
|
|
253
|
+
firstRow: number;
|
|
254
|
+
lastRow: number;
|
|
255
|
+
api: GridApi<TData>;
|
|
256
|
+
columnApi: ColumnApi;
|
|
257
|
+
context: TContext;
|
|
258
|
+
type: string;
|
|
259
|
+
}
|
|
260
|
+
export type AgSort = 'asc' | 'desc' | null | undefined;
|
|
261
|
+
export interface ColumnConfig {
|
|
262
|
+
field: string;
|
|
263
|
+
flex?: number | null | undefined;
|
|
264
|
+
hidden: boolean | null | undefined;
|
|
265
|
+
pinned: ColumnPinnedType;
|
|
266
|
+
rowGroup: boolean | null | undefined;
|
|
267
|
+
rowGroupIndex: number | null | undefined;
|
|
268
|
+
sort: AgSort;
|
|
269
|
+
sortIndex: number | null | undefined;
|
|
270
|
+
width: number | undefined;
|
|
271
|
+
}
|
|
272
|
+
export type ColumnGroupStateConfig = {
|
|
273
|
+
groupId: string;
|
|
274
|
+
open: boolean;
|
|
275
|
+
};
|
|
276
|
+
export type ContextPanelContent = 'configuration' | 'custom' | 'filters' | 'bulkEdit';
|
|
277
|
+
export interface ContextPanelApi {
|
|
278
|
+
content?: ContextPanelContent;
|
|
279
|
+
hide: () => void;
|
|
280
|
+
isVisible: boolean;
|
|
281
|
+
show: (content: ContextPanelContent) => void;
|
|
282
|
+
}
|
|
283
|
+
export interface CustomFooterConfig {
|
|
284
|
+
height?: RowSize;
|
|
285
|
+
id: string;
|
|
286
|
+
}
|
|
287
|
+
export interface AgGetDetailRowDataParams<TRow = any> {
|
|
288
|
+
/** Row node for the details request */
|
|
289
|
+
node: RowNode;
|
|
290
|
+
/** Data for the current row */
|
|
291
|
+
data: TRow;
|
|
292
|
+
/** Callback to pass the rows back for the grid request */
|
|
293
|
+
successCallback(rowData: any[]): void;
|
|
294
|
+
}
|
|
295
|
+
export interface AvatarStackItemFilter {
|
|
296
|
+
avatarStackItemFilter?: (x: any) => boolean;
|
|
297
|
+
}
|
|
298
|
+
export interface GetDetailRowDataParams<TRow = any> extends Omit<AgGetDetailRowDataParams<TRow>, 'node'> {
|
|
299
|
+
}
|
|
300
|
+
export type GetRowHeightWithFooters = (customFooters: CustomFooterConfig[] | undefined) => (params: Partial<RowHeightParams>) => number;
|
|
301
|
+
export interface DetailRowConfig<TRow = any> {
|
|
302
|
+
autoGroupColumnDefinition?: ColumnDefinition;
|
|
303
|
+
columnDefinitions: ColumnDefinition[];
|
|
304
|
+
getDetailRowData: (params: GetDetailRowDataParams<TRow>) => void;
|
|
305
|
+
height?: 'auto' | number;
|
|
306
|
+
isExpandable?: (rowData: TRow) => boolean;
|
|
307
|
+
customFooters?: CustomFooterConfig[];
|
|
308
|
+
/** See ag-grid docs for more info: https://www.ag-grid.com/javascript-data-grid/master-detail-refresh/ */
|
|
309
|
+
refreshStrategy?: 'everything' | 'rows' | 'nothing';
|
|
310
|
+
rowSelectionEnabled?: boolean | ((params: CheckboxSelectionCallbackParams<TRow>) => boolean);
|
|
311
|
+
rowSelection?: 'multiple' | 'single';
|
|
312
|
+
rowMultiSelectWithClick?: boolean;
|
|
313
|
+
suppressRowClickSelection?: boolean;
|
|
314
|
+
}
|
|
315
|
+
export type CustomRendererCell = {
|
|
316
|
+
component: React.ComponentType<any>;
|
|
317
|
+
editorType?: 'input' | 'select';
|
|
318
|
+
name: string;
|
|
319
|
+
type: 'renderer';
|
|
320
|
+
};
|
|
321
|
+
export type CustomEditorCell = {
|
|
322
|
+
component: React.ForwardRefExoticComponent<any>;
|
|
323
|
+
editorType: 'input' | 'select';
|
|
324
|
+
name: string;
|
|
325
|
+
type: 'editor';
|
|
326
|
+
};
|
|
327
|
+
export type CustomFilter = {
|
|
328
|
+
component: React.FunctionComponent<any>;
|
|
329
|
+
name: string;
|
|
330
|
+
};
|
|
331
|
+
export type CustomBulkEditorFields = {
|
|
332
|
+
[key: string]: {
|
|
333
|
+
component: ComponentWithFieldProp<any, FormFieldValueComponentProps<any>>;
|
|
334
|
+
isEmpty: (value: any, defaultIsEmpty: (value: any) => boolean) => boolean;
|
|
335
|
+
};
|
|
336
|
+
};
|
|
337
|
+
export interface CSVExportConfig {
|
|
338
|
+
fileName: string;
|
|
339
|
+
columnKeys?: string[];
|
|
340
|
+
skipFooters?: boolean;
|
|
341
|
+
skipGroups?: boolean;
|
|
342
|
+
skipPinnedBottom?: boolean;
|
|
343
|
+
skipPinnedTop?: boolean;
|
|
344
|
+
}
|
|
345
|
+
export interface ExcelExportConfig {
|
|
346
|
+
fileName: string;
|
|
347
|
+
columnKeys?: string[];
|
|
348
|
+
sheetName?: string;
|
|
349
|
+
}
|
|
350
|
+
export interface DataTableConfig {
|
|
351
|
+
columnState: ColumnConfig[];
|
|
352
|
+
columnGroupState?: ColumnGroupStateConfig[];
|
|
353
|
+
filters?: {
|
|
354
|
+
[key: string]: any;
|
|
355
|
+
} | undefined;
|
|
356
|
+
rowHeight?: RowSize;
|
|
357
|
+
serverFilters?: IServerFilter[];
|
|
358
|
+
}
|
|
359
|
+
export interface HTMLStringExportConfig {
|
|
360
|
+
header?: React.FunctionComponent;
|
|
361
|
+
preserveColumnWidths?: boolean;
|
|
362
|
+
pageFormat?: ExportPageFormat;
|
|
363
|
+
showTableHeaderOnEveryPage?: boolean;
|
|
364
|
+
totalRowCount?: number;
|
|
365
|
+
}
|
|
366
|
+
export interface IsEditableParams {
|
|
367
|
+
columnDefinition: ColumnDefinition;
|
|
368
|
+
data: Record<string, any>;
|
|
369
|
+
node: RowNode;
|
|
370
|
+
}
|
|
371
|
+
export interface SortModel {
|
|
372
|
+
/** The column that is being sorted */
|
|
373
|
+
field: string;
|
|
374
|
+
/** The sort direction, ascending or descending */
|
|
375
|
+
sort: 'asc' | 'desc';
|
|
376
|
+
}
|
|
377
|
+
export interface ServerSideGetRowsRequest {
|
|
378
|
+
/** The row index of the last row of request data
|
|
379
|
+
* or undefined from all rows */
|
|
380
|
+
endRow: number | undefined;
|
|
381
|
+
/** Array of fields of grouped columns that are currently expanded */
|
|
382
|
+
groupKeys: string[];
|
|
383
|
+
/** Array of fields of all columns that are grouped */
|
|
384
|
+
rowGroupCols: ColumnDefinition[];
|
|
385
|
+
/** The value entered in the search */
|
|
386
|
+
searchValue: string;
|
|
387
|
+
/** Contains the selected filters; the filter type,
|
|
388
|
+
* and the value being filtered on */
|
|
389
|
+
serverFilters: IServerFilter[];
|
|
390
|
+
/** Array of objects consisting of the field of the column being sorted,
|
|
391
|
+
* along with the sort direction ('asc' or 'desc')
|
|
392
|
+
*/
|
|
393
|
+
sortModel: SortModel[];
|
|
394
|
+
/** The row index of the first row of requested data
|
|
395
|
+
* or undefined from all rows */
|
|
396
|
+
startRow: number | undefined;
|
|
397
|
+
/** The list of columns which are being aggregated */
|
|
398
|
+
valueCols: ColumnDefinition[];
|
|
399
|
+
}
|
|
400
|
+
export type SuccessParams = {
|
|
401
|
+
/** The collection of data for a given request */
|
|
402
|
+
rowData: any[];
|
|
403
|
+
/** The total amount of rows */
|
|
404
|
+
rowCount?: number;
|
|
405
|
+
/** @private */
|
|
406
|
+
storeInfo?: any;
|
|
407
|
+
};
|
|
408
|
+
export type UpdateServerSideDataSourceParams = {
|
|
409
|
+
search?: ISearchState;
|
|
410
|
+
filter?: {
|
|
411
|
+
field: string;
|
|
412
|
+
value: any;
|
|
413
|
+
};
|
|
414
|
+
};
|
|
415
|
+
export type ServerSideParamsOptions = {
|
|
416
|
+
/**
|
|
417
|
+
* Enable pagination
|
|
418
|
+
* @default true
|
|
419
|
+
*/
|
|
420
|
+
pagination?: boolean;
|
|
421
|
+
/**
|
|
422
|
+
* Enable sorting
|
|
423
|
+
* @default true
|
|
424
|
+
*/
|
|
425
|
+
sort?: boolean;
|
|
426
|
+
/**
|
|
427
|
+
* Enable filtering
|
|
428
|
+
* @default true
|
|
429
|
+
*/
|
|
430
|
+
filters?: boolean;
|
|
431
|
+
/**
|
|
432
|
+
* Enable searching
|
|
433
|
+
* @default true
|
|
434
|
+
*/
|
|
435
|
+
search?: boolean;
|
|
436
|
+
/**
|
|
437
|
+
* Enable grouping
|
|
438
|
+
* @default true
|
|
439
|
+
*/
|
|
440
|
+
group?: boolean;
|
|
441
|
+
/**
|
|
442
|
+
* Custom search param key
|
|
443
|
+
* @default filters[search]
|
|
444
|
+
*/
|
|
445
|
+
searchKey?: string;
|
|
446
|
+
};
|
|
447
|
+
export interface RowActionsConfig extends Omit<ColDef, 'field' | 'pinned' | 'lockPinned' | 'lockVisible'> {
|
|
448
|
+
}
|
|
449
|
+
export type ServerSideGetRowsParams = {
|
|
450
|
+
/** Callback function to indicate that data fetching failed */
|
|
451
|
+
onError(): void;
|
|
452
|
+
/** Callback function to load row data into DataTable */
|
|
453
|
+
onSuccess(params: SuccessParams): void;
|
|
454
|
+
/** The data request object */
|
|
455
|
+
request: ServerSideGetRowsRequest;
|
|
456
|
+
/** Function that returns URL params from current request */
|
|
457
|
+
getParams(options?: ServerSideParamsOptions): URLSearchParams;
|
|
458
|
+
};
|
|
459
|
+
export type RefreshServerSideDataParams = {
|
|
460
|
+
route?: string[];
|
|
461
|
+
purge?: boolean;
|
|
462
|
+
};
|
|
463
|
+
export type RowActivePredicateParams<TRow = any> = {
|
|
464
|
+
data: TRow;
|
|
465
|
+
node: RowNode;
|
|
466
|
+
rowIndex: number;
|
|
467
|
+
};
|
|
468
|
+
export type RowSelectablePredicateParams<TRow = any> = {
|
|
469
|
+
data: TRow;
|
|
470
|
+
node: RowNode;
|
|
471
|
+
rowIndex: number | null;
|
|
472
|
+
};
|
|
473
|
+
export interface DTExcelFormats {
|
|
474
|
+
id: string;
|
|
475
|
+
numberFormat?: {
|
|
476
|
+
format: string;
|
|
477
|
+
};
|
|
478
|
+
dataType?: ExcelDataType;
|
|
479
|
+
}
|
|
480
|
+
export type ISearchState = string;
|
|
481
|
+
export declare enum SelectAllState {
|
|
482
|
+
All = "all",
|
|
483
|
+
None = "none",
|
|
484
|
+
Partial = "partial"
|
|
485
|
+
}
|
|
486
|
+
export type RowGroupToggledEvent<TRow> = Pick<RowGroupOpenedEvent<TRow>, 'expanded' | 'rowIndex'> & {
|
|
487
|
+
node: RowNode;
|
|
488
|
+
};
|
|
489
|
+
export interface TableProps<TRow = any, TBottomRow = any> {
|
|
490
|
+
alwaysShowPseudoEditors?: boolean;
|
|
491
|
+
autoGroupColumnDefinition?: ColumnDefinition;
|
|
492
|
+
rowActionsConfig?: RowActionsConfig;
|
|
493
|
+
/**
|
|
494
|
+
* Overrides internal props for AgGridReact. This is not guaranteed under DataTable SemVer
|
|
495
|
+
* and can break during any upgrade of the ag-grid-react package
|
|
496
|
+
*
|
|
497
|
+
* For documentation see: {@link https://www.ag-grid.com/react-data-grid/grid-options/}
|
|
498
|
+
* The ag-grid changelog can be found here: {@link https://www.ag-grid.com/changelog/}
|
|
499
|
+
*
|
|
500
|
+
* Warning: This can break normal Data Table functionality.
|
|
501
|
+
*/
|
|
502
|
+
UNSAFE_internalAGGridOverrides?: AgGridReactProps | AgReactUiProps;
|
|
503
|
+
customFooters?: CustomFooterConfig[];
|
|
504
|
+
columnHeaderMenuOptions?: MenuDropdownOption[];
|
|
505
|
+
/**
|
|
506
|
+
* @deprecated Please use `detailRowConfig` instead
|
|
507
|
+
* @deprecatedSince 11.13.0
|
|
508
|
+
*/
|
|
509
|
+
detailRowConfigs?: DetailRowConfig<TRow>[];
|
|
510
|
+
detailRowConfig?: DetailRowConfig<TRow>;
|
|
511
|
+
/**
|
|
512
|
+
* @deprecated Please use `detailRowConfig.rowSelectionEnabled` instead
|
|
513
|
+
* @deprecatedSince 11.13.0
|
|
514
|
+
*/
|
|
515
|
+
detailRowSelectionEnabled?: boolean;
|
|
516
|
+
siblingGroupsRowSelectionDisabled?: boolean;
|
|
517
|
+
emptyStateRenderer?: React.FunctionComponent;
|
|
518
|
+
excelDataTypeFormats?: DTExcelFormats[];
|
|
519
|
+
fullWidthCellRenderer?: React.FunctionComponent<ICellRendererParams>;
|
|
520
|
+
getGroupRowAgg?: (nodes: RowNode[], currentGroupsValues: string[]) => TRow;
|
|
521
|
+
getRowNodeId?: (data: TRow) => any;
|
|
522
|
+
getSubtotalLabel?: (columnDefinition: ColumnDefinition, rowData: TRow, value: string | number) => string;
|
|
523
|
+
groupDefaultExpanded?: number;
|
|
524
|
+
groupIncludeFooter?: boolean;
|
|
525
|
+
headerHeight?: number;
|
|
526
|
+
hideActionsOnGroupedRow?: boolean;
|
|
527
|
+
initialGroupOrderComparator?: (nodeA: RowNode, nodeB: RowNode) => number;
|
|
528
|
+
isFullWidth?: (data: TRow) => boolean;
|
|
529
|
+
isRowActive?: (params: RowActivePredicateParams<TRow>) => boolean;
|
|
530
|
+
isRowOverdue?: (params: RowActivePredicateParams<TRow>) => boolean;
|
|
531
|
+
loading?: boolean;
|
|
532
|
+
maxHeight?: number;
|
|
533
|
+
maintainColumnOrder?: boolean;
|
|
534
|
+
modules: Module[];
|
|
535
|
+
onCellValueChanged?: (params: CellValueChangeParams<any>) => void;
|
|
536
|
+
onRowDragEnd?: (row: TRow, endIndex: number, node: Pick<RowNode, 'childIndex' | 'group'>, overNode?: Pick<RowNode, 'childIndex' | 'group' | 'data'>) => void;
|
|
537
|
+
onRowGroupOpened?: (event: RowGroupToggledEvent<TRow>) => void;
|
|
538
|
+
onRowSelected?: (event: RowSelectedEvent) => void;
|
|
539
|
+
onSelectAll?: (param: SelectAllState.All | SelectAllState.None) => void;
|
|
540
|
+
onTableReady?: (tableApi: TableApi, tableApiRef: React.RefObject<TableApi>) => void;
|
|
541
|
+
onColumnEverythingChanged?: (changeEvent: ColumnEverythingChangedEvent) => void;
|
|
542
|
+
onFirstDataRendered?: (event: FirstDataRenderedEvent) => void;
|
|
543
|
+
pagination?: boolean;
|
|
544
|
+
paginationPageSize?: number;
|
|
545
|
+
pinnedBottomRowData?: TBottomRow[];
|
|
546
|
+
popupParent?: HTMLElement;
|
|
547
|
+
rowActions?: React.FunctionComponent<any>[];
|
|
548
|
+
/**
|
|
549
|
+
* @private
|
|
550
|
+
* Unsafe to use.
|
|
551
|
+
*
|
|
552
|
+
* Sets row virtualization buffer
|
|
553
|
+
*/
|
|
554
|
+
rowBuffer?: number;
|
|
555
|
+
/**
|
|
556
|
+
* Row data for the table. Only necessary when using client side data
|
|
557
|
+
* model.
|
|
558
|
+
* @see onServerSideDataRequest if using server side data model
|
|
559
|
+
*/
|
|
560
|
+
rows?: TRow[];
|
|
561
|
+
rowDragManaged?: boolean;
|
|
562
|
+
rowSelectionEnabled?: boolean | ((params: RowSelectablePredicateParams<TRow>) => boolean);
|
|
563
|
+
selectionSSREnabled?: boolean;
|
|
564
|
+
showExpandableMenuOptions?: boolean;
|
|
565
|
+
showGroupChildCount?: boolean;
|
|
566
|
+
/**
|
|
567
|
+
* Removes border right from column group's last column
|
|
568
|
+
*/
|
|
569
|
+
suppressColumnGroupBorders?: boolean;
|
|
570
|
+
suppressColumnVirtualisation?: boolean;
|
|
571
|
+
suppressExpandGroupsButton?: boolean;
|
|
572
|
+
suppressFieldDotNotation?: boolean;
|
|
573
|
+
suppressResetColumnsOption?: boolean;
|
|
574
|
+
suppressRowClickSelection?: boolean;
|
|
575
|
+
stickyExpandedGroupRows?: boolean;
|
|
576
|
+
}
|
|
577
|
+
export type AggregationFunction<TValue> = (params: {
|
|
578
|
+
columnDefinition: ColumnDefinition;
|
|
579
|
+
values: TValue[];
|
|
580
|
+
rowNode: {
|
|
581
|
+
allLeafChildren: {
|
|
582
|
+
data: TValue;
|
|
583
|
+
}[];
|
|
584
|
+
};
|
|
585
|
+
/**
|
|
586
|
+
* If rendering in a nested table, this is the id of the parent row
|
|
587
|
+
*/
|
|
588
|
+
parentId: string | undefined;
|
|
589
|
+
/**
|
|
590
|
+
* If rendering in a nested table, this is the data for the parent row
|
|
591
|
+
*/
|
|
592
|
+
parentData: any | undefined;
|
|
593
|
+
}) => number;
|
|
594
|
+
export type RowNode = {
|
|
595
|
+
aggData: any;
|
|
596
|
+
childIndex: number;
|
|
597
|
+
childrenAfterFilter: IRowNode[];
|
|
598
|
+
data: any;
|
|
599
|
+
expanded: boolean;
|
|
600
|
+
field: string | null;
|
|
601
|
+
footer?: boolean;
|
|
602
|
+
group?: boolean;
|
|
603
|
+
id: string | undefined;
|
|
604
|
+
key: string | null;
|
|
605
|
+
parent: RowNode | null;
|
|
606
|
+
rowGroupIndex: number | null;
|
|
607
|
+
rowIndex: number | null;
|
|
608
|
+
rowPinned: ColumnPinnedType | 'top' | 'bottom';
|
|
609
|
+
};
|
|
610
|
+
export interface ValueGetterParams {
|
|
611
|
+
columnDefinition: ColumnDefinition;
|
|
612
|
+
data: Record<string, any>;
|
|
613
|
+
node?: RowNode;
|
|
614
|
+
}
|
|
615
|
+
export interface ValueParserParams {
|
|
616
|
+
columnDefinition: ColumnDefinition;
|
|
617
|
+
newValue: any;
|
|
618
|
+
oldValue: any;
|
|
619
|
+
}
|
|
620
|
+
export interface ValueSetterParams {
|
|
621
|
+
columnDefinition: ColumnDefinition;
|
|
622
|
+
data: Record<string, any>;
|
|
623
|
+
node?: RowNode;
|
|
624
|
+
newValue: any;
|
|
625
|
+
oldValue: any;
|
|
626
|
+
}
|
|
627
|
+
export interface ValueValidator<TValue extends any = any> {
|
|
628
|
+
(params: ValueValidatorParams<TValue>): {
|
|
629
|
+
isValid: boolean;
|
|
630
|
+
errorMessage?: string | string[];
|
|
631
|
+
isRequired?: boolean;
|
|
632
|
+
};
|
|
633
|
+
}
|
|
634
|
+
export interface ValueValidatorParams<TValue = any> {
|
|
635
|
+
columnDefinition: ColumnDefinition;
|
|
636
|
+
data: Record<string, any>;
|
|
637
|
+
node?: RowNode;
|
|
638
|
+
value: TValue;
|
|
639
|
+
}
|
|
640
|
+
export interface FrameworkComponents {
|
|
641
|
+
[key: string]: React.ComponentType<any>;
|
|
642
|
+
}
|
|
643
|
+
export interface PinnedBottomRow extends Record<string, any> {
|
|
644
|
+
footerId: 'grandTotal' | string;
|
|
645
|
+
isAggData?: boolean;
|
|
646
|
+
}
|
|
647
|
+
export interface TablePanelProps extends React.HtmlHTMLAttributes<HTMLDivElement> {
|
|
648
|
+
children?: React.ReactNode;
|
|
649
|
+
className?: string;
|
|
650
|
+
style?: React.CSSProperties;
|
|
651
|
+
}
|
|
652
|
+
export interface DataTableTranslations {
|
|
653
|
+
loadingLabel?: string;
|
|
654
|
+
searchEmptyStateTitle?: string;
|
|
655
|
+
tableName?: string;
|
|
656
|
+
}
|
|
657
|
+
export interface DataTableProps {
|
|
658
|
+
analytics?: AnalyticsConfig;
|
|
659
|
+
columnDefinitions: (ColumnDefinition | NestedColumnDefinition)[];
|
|
660
|
+
enableGroupEditAndValidation?: boolean;
|
|
661
|
+
enableDynamicRowHeight?: boolean;
|
|
662
|
+
filterGroups?: FilterGroup[];
|
|
663
|
+
getRowId?: (params: GetRowIdParams) => string;
|
|
664
|
+
initialTableConfig?: DataTableConfig;
|
|
665
|
+
onTableConfigChange?: (config: DataTableConfig) => void;
|
|
666
|
+
onServerSideDataRequest?: (params: ServerSideGetRowsParams) => Promise<SuccessParams | void> | void;
|
|
667
|
+
grandTotalsLabelRenderer?: React.FunctionComponent<GrandTotalsLabelRendererProps>;
|
|
668
|
+
/**
|
|
669
|
+
* Callback after bulk edit action is performed.
|
|
670
|
+
* Each object in the array represents a selected row with
|
|
671
|
+
* the updated values
|
|
672
|
+
*/
|
|
673
|
+
onBulkEditUpdate?: (rows: BulkEditResult[]) => Promise<void>;
|
|
674
|
+
translations?: DataTableTranslations;
|
|
675
|
+
customBulkEditorFields?: CustomBulkEditorFields;
|
|
676
|
+
enableCellTextSelection?: boolean;
|
|
677
|
+
}
|
|
678
|
+
export interface ClientSideDataTableProps extends Omit<DataTableProps, 'onServerSideDataRequest'> {
|
|
679
|
+
}
|
|
680
|
+
export interface FilterGroup {
|
|
681
|
+
name: string;
|
|
682
|
+
displayedName: string;
|
|
683
|
+
scrollHeight?: number;
|
|
684
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { RowSize } from '../constants';
|
|
3
|
+
interface ContactItemProps {
|
|
4
|
+
description?: string;
|
|
5
|
+
icon?: React.ReactNode;
|
|
6
|
+
imageUrl?: string;
|
|
7
|
+
initials?: string;
|
|
8
|
+
title: string;
|
|
9
|
+
rowHeight: RowSize;
|
|
10
|
+
}
|
|
11
|
+
export declare function ContactItem({ description, icon, imageUrl, initials, title, rowHeight, }: ContactItemProps): React.JSX.Element;
|
|
12
|
+
export {};
|