@procore/data-table 14.23.0 → 15.0.0-alpha.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/legacy/index.cjs +68873 -64555
- package/dist/legacy/index.d.cts +109 -111
- package/dist/legacy/index.d.ts +109 -111
- package/dist/legacy/index.js +69042 -64724
- package/dist/modern/index.cjs +67891 -64134
- package/dist/modern/index.d.cts +109 -111
- package/dist/modern/index.d.ts +109 -111
- package/dist/modern/index.js +67877 -64120
- package/package.json +18 -18
package/dist/legacy/index.d.cts
CHANGED
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
import * as _ag_grid_community_core from '@ag-grid-community/core';
|
|
2
|
-
import { ICellRendererParams, NumberFilterModel as NumberFilterModel$1, ColDef, IRowNode,
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
import { AgGridReactProps, AgReactUiProps } from '@ag-grid-community/react';
|
|
2
|
+
import { ICellRendererParams, NumberFilterModel as NumberFilterModel$1, ColDef, IRowNode, RowDataTransaction, RowNodeTransaction, ServerSideTransaction, GridApi, ICellEditor, RefreshCellsParams, RowNode as RowNode$1, Column, SelectionEventSourceType, ColumnPinnedType, RowHeightParams, CheckboxSelectionCallbackParams, ExcelDataType, RowGroupOpenedEvent, Module, RowSelectedEvent, GridReadyEvent, ColumnEverythingChangedEvent, CellFocusedEvent, TabToNextCellParams, CellPosition, GetRowIdParams, HeaderCheckboxSelectionCallback, IFilter, IScalarFilterParams, ISimpleFilterParams } from '@ag-grid-community/core';
|
|
3
|
+
import React$1 from 'react';
|
|
4
|
+
import * as _ag_grid_community_react from '@ag-grid-community/react';
|
|
5
|
+
import { CustomCellEditorProps, AgGridReactProps, AgReactUiProps } from '@ag-grid-community/react';
|
|
6
6
|
import { DropdownFlyoutOption, FormSelectProps, FormMultiSelectProps, FormCurrencyProps, TypographyProps, InputProps, DateTimeFormatTypes, PillColor, TextAreaProps, ComponentWithFieldProp, FormFieldValueComponentProps } from '@procore/core-react';
|
|
7
7
|
import { FormatConfig } from '@procore/labs-financials-utils/dist/configs';
|
|
8
|
+
import * as _procore_labs_group_by_select from '@procore/labs-group-by-select';
|
|
8
9
|
|
|
9
10
|
interface RequestInfo extends RequestInit {
|
|
10
11
|
headers: Record<string, any>;
|
|
@@ -48,7 +49,7 @@ interface AnalyticsBulkConfig extends AnalyticsConfig$1 {
|
|
|
48
49
|
|
|
49
50
|
interface GrandTotalsLabelRendererProps extends ICellRendererParams {
|
|
50
51
|
}
|
|
51
|
-
declare const GrandTotalsLabelRenderer:
|
|
52
|
+
declare const GrandTotalsLabelRenderer: React$1.FunctionComponent<GrandTotalsLabelRendererProps>;
|
|
52
53
|
|
|
53
54
|
declare const columnSort: {
|
|
54
55
|
readonly asc: "asc";
|
|
@@ -77,7 +78,7 @@ type NumberFilterValue = {
|
|
|
77
78
|
filterTo?: number;
|
|
78
79
|
} | undefined;
|
|
79
80
|
type NumberFilterProps = FilterComponentProps<unknown, NumberFilterValue>;
|
|
80
|
-
declare const NumberFilterRenderer:
|
|
81
|
+
declare const NumberFilterRenderer: React$1.NamedExoticComponent<NumberFilterProps>;
|
|
81
82
|
|
|
82
83
|
interface MenuDropdownOption extends Omit<DropdownFlyoutOption, 'children'> {
|
|
83
84
|
action?: (params: ColDef | null) => void;
|
|
@@ -196,7 +197,7 @@ interface DataTableCellRendererProps<TValue = any, TColumnDefinition extends Col
|
|
|
196
197
|
}
|
|
197
198
|
interface DataTableCellEditorProps<TValue = any, TColumnDefinition extends ColumnDefinition = ColumnDefinition<TValue>> extends DataTableCellRendererProps<TValue, TColumnDefinition> {
|
|
198
199
|
eventKey: string | null;
|
|
199
|
-
ref?: ((instance: HTMLElement | null) => void) |
|
|
200
|
+
ref?: ((instance: HTMLElement | null) => void) | React$1.MutableRefObject<HTMLElement | null> | null;
|
|
200
201
|
setDataValue: (field: string, newValue: TValue) => void;
|
|
201
202
|
stopEditing: (relatedTarget?: HTMLElement | null) => void;
|
|
202
203
|
}
|
|
@@ -207,16 +208,16 @@ interface BooleanCellRendererParams {
|
|
|
207
208
|
type BooleanCellColumnDefinition<TValue = boolean> = ColumnDefinition<TValue, typeof BooleanCellRenderer, BooleanCellRendererParams>;
|
|
208
209
|
interface BooleanCellRendererProps<TValue = boolean> extends DataTableCellRendererProps<TValue, BooleanCellColumnDefinition<TValue>> {
|
|
209
210
|
}
|
|
210
|
-
declare const BooleanCellRenderer:
|
|
211
|
+
declare const BooleanCellRenderer: React$1.FC<_ag_grid_community_core.ICellRendererParams<any, any, any>>;
|
|
211
212
|
interface BooleanCellEditorProps<TValue = boolean> extends DataTableCellEditorProps<TValue, BooleanCellColumnDefinition<TValue>> {
|
|
212
213
|
}
|
|
213
|
-
declare const BooleanCellEditor:
|
|
214
|
+
declare const BooleanCellEditor: React$1.ForwardRefExoticComponent<_ag_grid_community_react.CustomCellEditorProps<any, any, any>>;
|
|
214
215
|
|
|
215
216
|
interface ButtonsCellRendererParams {
|
|
216
|
-
buttons:
|
|
217
|
+
buttons: React$1.FunctionComponent<DataTableCellRendererProps>[];
|
|
217
218
|
}
|
|
218
219
|
type ButtonsCellColumnDefinition<TValue = undefined> = GranularRequired<ColumnDefinition<TValue, typeof ButtonsCellRenderer, ButtonsCellRendererParams>, 'cellRendererParams'>;
|
|
219
|
-
declare const ButtonsCellRenderer:
|
|
220
|
+
declare const ButtonsCellRenderer: React$1.FC<_ag_grid_community_core.ICellRendererParams<any, any, any>>;
|
|
220
221
|
|
|
221
222
|
interface CompanyCellRendererParams<TValue> {
|
|
222
223
|
typographyProps?: TypographyProps;
|
|
@@ -228,7 +229,7 @@ never, // editor does not exist
|
|
|
228
229
|
TFilterOption, TFilterValue>;
|
|
229
230
|
interface CompanyCellRendererProps<TValue = any> extends DataTableCellRendererProps<TValue, CompanyCellColumnDefinition> {
|
|
230
231
|
}
|
|
231
|
-
declare const CompanyCellRenderer:
|
|
232
|
+
declare const CompanyCellRenderer: React$1.FC<_ag_grid_community_core.ICellRendererParams<any, any, any>>;
|
|
232
233
|
|
|
233
234
|
interface CurrencyCellRendererParams {
|
|
234
235
|
typographyProps?: TypographyProps;
|
|
@@ -239,14 +240,14 @@ type CurrencyCellColumnDefinition<TValue = any> = ColumnDefinition<TValue, typeo
|
|
|
239
240
|
};
|
|
240
241
|
interface CurrencyCellRendererProps<TValue = string> extends DataTableCellRendererProps<TValue, CurrencyCellColumnDefinition<TValue>> {
|
|
241
242
|
}
|
|
242
|
-
declare const CurrencyCellRenderer:
|
|
243
|
+
declare const CurrencyCellRenderer: React$1.FC<_ag_grid_community_core.ICellRendererParams<any, any, any>>;
|
|
243
244
|
interface CurrencyCellEditorParams {
|
|
244
245
|
inputProps?: InputProps;
|
|
245
246
|
formatConfig?: Partial<FormatConfig>;
|
|
246
247
|
}
|
|
247
248
|
interface CurrencyCellEditorProps<TValue = string> extends DataTableCellEditorProps<TValue, CurrencyCellColumnDefinition<TValue>> {
|
|
248
249
|
}
|
|
249
|
-
declare const CurrencyCellEditor:
|
|
250
|
+
declare const CurrencyCellEditor: React$1.ForwardRefExoticComponent<_ag_grid_community_react.CustomCellEditorProps<any, any, any>>;
|
|
250
251
|
|
|
251
252
|
type PickedDateTimeFormatTypes = Extract<DateTimeFormatTypes, 'abbr-weekday-abbr-date' | 'date' | 'numeric-date' | 'weekday-date'>;
|
|
252
253
|
interface DateCellRendererParams {
|
|
@@ -258,14 +259,14 @@ interface DateCellColumnDefinition<TValue = string | Date | undefined> extends D
|
|
|
258
259
|
}
|
|
259
260
|
interface DateCellRendererProps<TValue = string | Date | undefined> extends DataTableCellRendererProps<TValue, DateCellColumnDefinition<TValue>> {
|
|
260
261
|
}
|
|
261
|
-
declare const DateCellRenderer:
|
|
262
|
+
declare const DateCellRenderer: React$1.FC<_ag_grid_community_core.ICellRendererParams<any, any, any>>;
|
|
262
263
|
interface DateCellEditorParams {
|
|
263
264
|
disabledDate?: ((date: Date, today: Date) => boolean) | undefined;
|
|
264
265
|
timeZone?: string;
|
|
265
266
|
}
|
|
266
267
|
interface DateCellEditorProps<TValue = string | Date | undefined> extends DataTableCellEditorProps<TValue, DateCellColumnDefinition<TValue>> {
|
|
267
268
|
}
|
|
268
|
-
declare const DateCellEditor:
|
|
269
|
+
declare const DateCellEditor: React$1.ForwardRefExoticComponent<_ag_grid_community_react.CustomCellEditorProps<any, any, any>>;
|
|
269
270
|
|
|
270
271
|
type GroupCellRendererParams<TInnerRendererParams> = {
|
|
271
272
|
/**
|
|
@@ -298,7 +299,7 @@ type GroupCellRendererParams<TInnerRendererParams> = {
|
|
|
298
299
|
footerValueGetter?: string | ((value: any) => string);
|
|
299
300
|
} & TInnerRendererParams;
|
|
300
301
|
type GroupCellColumnDefinition<TValue = any, TInnerRendererParams = object> = ColumnDefinition<TValue, typeof GroupCellRenderer, GroupCellRendererParams<TInnerRendererParams>>;
|
|
301
|
-
declare const GroupCellRenderer: React
|
|
302
|
+
declare const GroupCellRenderer: React.FC<GroupCellRendererParams<any>>;
|
|
302
303
|
|
|
303
304
|
interface LinkCellRendererParams<TValue> {
|
|
304
305
|
typographyProps?: TypographyProps;
|
|
@@ -308,7 +309,7 @@ interface LinkCellRendererParams<TValue> {
|
|
|
308
309
|
type LinkCellColumnDefinition<TValue = any> = GranularRequired<ColumnDefinition<TValue, typeof LinkCellRenderer, LinkCellRendererParams<TValue>>, 'cellRendererParams'>;
|
|
309
310
|
interface LinkCellRendererProps<TValue = any> extends DataTableCellRendererProps<TValue, LinkCellColumnDefinition> {
|
|
310
311
|
}
|
|
311
|
-
declare const LinkCellRenderer:
|
|
312
|
+
declare const LinkCellRenderer: React$1.FC<_ag_grid_community_core.ICellRendererParams<any, any, any>>;
|
|
312
313
|
|
|
313
314
|
interface MultiSelectCellRendererParams<TValue, OptionValue> {
|
|
314
315
|
getId?: (cellValue: OptionValue) => string | number;
|
|
@@ -318,7 +319,7 @@ interface MultiSelectCellRendererParams<TValue, OptionValue> {
|
|
|
318
319
|
}
|
|
319
320
|
type OnSearchParams$1 = {
|
|
320
321
|
data: MultiSelectCellEditorProps['data'];
|
|
321
|
-
event:
|
|
322
|
+
event: React$1.ChangeEvent<HTMLInputElement>;
|
|
322
323
|
};
|
|
323
324
|
interface MultiSelectCellEditorParams<TValue> {
|
|
324
325
|
getId?: (cellValue: TValue) => number | string;
|
|
@@ -332,8 +333,8 @@ interface MultiSelectCellEditorProps<TValue = any> extends DataTableCellEditorPr
|
|
|
332
333
|
type MultiSelectCellColumnDefinition<TValue = any[], OptionValue = any, TFilterOption = any, TFilterValue = number | string> = ColumnDefinition<TValue, typeof MultiSelectCellRenderer, MultiSelectCellRendererParams<TValue, OptionValue>, typeof MultiSelectCellEditor, MultiSelectCellEditorParams<TValue>, TFilterOption, TFilterValue, 'multiSelect', MultiSelectBulkEditorParams>;
|
|
333
334
|
interface MultiSelectCellRendererProps<TValue = any[], OptionValue = any> extends DataTableCellRendererProps<TValue, MultiSelectCellColumnDefinition<TValue, OptionValue>> {
|
|
334
335
|
}
|
|
335
|
-
declare const MultiSelectCellRenderer:
|
|
336
|
-
declare const MultiSelectCellEditor:
|
|
336
|
+
declare const MultiSelectCellRenderer: React$1.FC<_ag_grid_community_core.ICellRendererParams<any, any, any>>;
|
|
337
|
+
declare const MultiSelectCellEditor: React$1.ForwardRefExoticComponent<_ag_grid_community_react.CustomCellEditorProps<any, any, any>>;
|
|
337
338
|
|
|
338
339
|
interface NumberCellRendererParams {
|
|
339
340
|
typographyProps?: TypographyProps;
|
|
@@ -342,13 +343,13 @@ interface NumberCellRendererParams {
|
|
|
342
343
|
type NumberCellColumnDefinition<TValue = number> = ColumnDefinition<TValue, typeof NumberCellRenderer, NumberCellRendererParams, typeof NumberCellEditor, NumberCellEditorParams>;
|
|
343
344
|
interface NumberCellRendererProps<TValue = number | string> extends DataTableCellRendererProps<TValue, NumberCellColumnDefinition<TValue>> {
|
|
344
345
|
}
|
|
345
|
-
declare const NumberCellRenderer:
|
|
346
|
+
declare const NumberCellRenderer: React$1.FC<_ag_grid_community_core.ICellRendererParams<any, any, any>>;
|
|
346
347
|
interface NumberCellEditorParams {
|
|
347
348
|
inputProps?: InputProps;
|
|
348
349
|
}
|
|
349
350
|
interface NumberCellEditorProps<TValue = number> extends DataTableCellEditorProps<TValue, NumberCellColumnDefinition<TValue>> {
|
|
350
351
|
}
|
|
351
|
-
declare const NumberCellEditor:
|
|
352
|
+
declare const NumberCellEditor: React$1.ForwardRefExoticComponent<_ag_grid_community_react.CustomCellEditorProps<any, any, any>>;
|
|
352
353
|
|
|
353
354
|
interface PeopleCellRendererParams<TValue, PersonValue> extends AvatarStackItemFilter {
|
|
354
355
|
getCompanyName?: (person: PersonValue) => string;
|
|
@@ -363,7 +364,7 @@ never, // editor does not exist
|
|
|
363
364
|
TFilterOption, TFilterValue>;
|
|
364
365
|
interface PeopleCellRendererProps<TValue = any[], PersonValue = any> extends DataTableCellRendererProps<TValue, PeopleCellColumnDefinition<TValue, PersonValue>> {
|
|
365
366
|
}
|
|
366
|
-
declare const PeopleCellRenderer:
|
|
367
|
+
declare const PeopleCellRenderer: React$1.FC<_ag_grid_community_core.ICellRendererParams<any, any, any>>;
|
|
367
368
|
|
|
368
369
|
interface PercentCellRendererParams {
|
|
369
370
|
typographyProps?: TypographyProps;
|
|
@@ -378,10 +379,10 @@ type PercentCellColumnDefinition<TValue = any> = ColumnDefinition<TValue, typeof
|
|
|
378
379
|
};
|
|
379
380
|
interface PercentCellRendererProps<TValue = string> extends DataTableCellRendererProps<TValue, PercentCellColumnDefinition<TValue>> {
|
|
380
381
|
}
|
|
381
|
-
declare const PercentCellRenderer:
|
|
382
|
+
declare const PercentCellRenderer: React$1.FC<_ag_grid_community_core.ICellRendererParams<any, any, any>>;
|
|
382
383
|
interface PercentCellEditorProps<TValue = string> extends DataTableCellEditorProps<TValue, PercentCellColumnDefinition<TValue>> {
|
|
383
384
|
}
|
|
384
|
-
declare const PercentCellEditor:
|
|
385
|
+
declare const PercentCellEditor: React$1.ForwardRefExoticComponent<_ag_grid_community_react.CustomCellEditorProps<any, any, any>>;
|
|
385
386
|
|
|
386
387
|
interface PillCellRendererParams<TValue> {
|
|
387
388
|
getColor: (item: TValue) => PillColor;
|
|
@@ -391,7 +392,7 @@ interface PillCellRendererParams<TValue> {
|
|
|
391
392
|
type PillCellColumnDefinition<TValue = any, TFilterOption = any, TFilterValue = number | string> = GranularRequired<ColumnDefinition<TValue, typeof PillCellRenderer, PillCellRendererParams<TValue>, typeof PillSelectCellEditor, PillCellEditorParams<TValue>, TFilterOption, TFilterValue>, 'cellRendererParams'>;
|
|
392
393
|
interface PillCellRendererProps<TValue = any> extends DataTableCellRendererProps<TValue, PillCellColumnDefinition<TValue>> {
|
|
393
394
|
}
|
|
394
|
-
declare const PillCellRenderer:
|
|
395
|
+
declare const PillCellRenderer: React$1.FC<_ag_grid_community_core.ICellRendererParams<any, any, any>>;
|
|
395
396
|
interface PillCellEditorParams<TValue> {
|
|
396
397
|
clearable?: boolean;
|
|
397
398
|
getId?: (item: TValue) => number | string;
|
|
@@ -401,7 +402,7 @@ interface PillCellEditorParams<TValue> {
|
|
|
401
402
|
}
|
|
402
403
|
interface PillSelectCellEditorProps<TValue = any> extends DataTableCellEditorProps<TValue, PillCellColumnDefinition<TValue>> {
|
|
403
404
|
}
|
|
404
|
-
declare const PillSelectCellEditor:
|
|
405
|
+
declare const PillSelectCellEditor: React$1.ForwardRefExoticComponent<_ag_grid_community_react.CustomCellEditorProps<any, any, any>>;
|
|
405
406
|
|
|
406
407
|
type SelectCellColumnDefinition<TValue = any, TFilterOption = any, TFilterValue = number | string> = GranularRequired<ColumnDefinition<TValue, typeof SelectCellRenderer, {
|
|
407
408
|
typographyProps?: TypographyProps;
|
|
@@ -409,10 +410,10 @@ type SelectCellColumnDefinition<TValue = any, TFilterOption = any, TFilterValue
|
|
|
409
410
|
}, typeof SelectCellEditor, SelectCellEditorParams<TValue>, TFilterOption, TFilterValue, 'select', SelectBulkEditorParams>, 'cellEditor' | 'cellEditorParams'>;
|
|
410
411
|
interface SelectCellRendererProps<TValue = any> extends DataTableCellRendererProps<TValue, SelectCellColumnDefinition<TValue>> {
|
|
411
412
|
}
|
|
412
|
-
declare const SelectCellRenderer:
|
|
413
|
+
declare const SelectCellRenderer: React$1.FC<_ag_grid_community_core.ICellRendererParams<any, any, any>>;
|
|
413
414
|
type OnSearchParams = {
|
|
414
415
|
data: SelectCellEditorProps['data'];
|
|
415
|
-
event:
|
|
416
|
+
event: React$1.ChangeEvent<HTMLInputElement>;
|
|
416
417
|
};
|
|
417
418
|
interface SelectCellEditorParams<TValue> {
|
|
418
419
|
clearable?: boolean;
|
|
@@ -424,7 +425,7 @@ interface SelectCellEditorParams<TValue> {
|
|
|
424
425
|
}
|
|
425
426
|
interface SelectCellEditorProps<TValue = unknown> extends DataTableCellEditorProps<TValue, SelectCellColumnDefinition<TValue>> {
|
|
426
427
|
}
|
|
427
|
-
declare const SelectCellEditor:
|
|
428
|
+
declare const SelectCellEditor: React$1.ForwardRefExoticComponent<_ag_grid_community_react.CustomCellEditorProps<any, any, any>>;
|
|
428
429
|
|
|
429
430
|
interface TextAreaCellRendererParams {
|
|
430
431
|
typographyProps?: TypographyProps;
|
|
@@ -438,8 +439,8 @@ interface TextAreaCellRendererProps<TValue = string> extends DataTableCellRender
|
|
|
438
439
|
}
|
|
439
440
|
interface TextAreaCellEditorProps<TValue = string> extends DataTableCellEditorProps<TValue, TextAreaCellColumnDefinition<TValue>> {
|
|
440
441
|
}
|
|
441
|
-
declare const TextAreaCellEditor:
|
|
442
|
-
declare const TextAreaCellRenderer:
|
|
442
|
+
declare const TextAreaCellEditor: React$1.ForwardRefExoticComponent<_ag_grid_community_react.CustomCellEditorProps<any, any, any>>;
|
|
443
|
+
declare const TextAreaCellRenderer: React$1.FC<_ag_grid_community_core.ICellRendererParams<any, any, any>>;
|
|
443
444
|
|
|
444
445
|
interface TextCellRendererParams {
|
|
445
446
|
typographyProps?: TypographyProps;
|
|
@@ -451,15 +452,15 @@ type TextCellColumnDefinition<TValue = string, TFilterOption = any, TFilterValue
|
|
|
451
452
|
interface TextCellRendererProps<TValue = string> extends DataTableCellRendererProps<TValue, TextCellColumnDefinition<TValue>> {
|
|
452
453
|
node?: RowNode;
|
|
453
454
|
}
|
|
454
|
-
declare const TextCellRenderer:
|
|
455
|
+
declare const TextCellRenderer: React$1.FC<_ag_grid_community_core.ICellRendererParams<any, any, any>>;
|
|
455
456
|
interface TextCellEditorProps<TValue = string> extends DataTableCellEditorProps<TValue, TextCellColumnDefinition<TValue>> {
|
|
456
457
|
}
|
|
457
|
-
declare const TextCellEditor:
|
|
458
|
+
declare const TextCellEditor: React$1.ForwardRefExoticComponent<_ag_grid_community_react.CustomCellEditorProps<any, any, any>>;
|
|
458
459
|
|
|
459
460
|
type GranularRequired<T, K extends keyof T> = Omit<T, K> & Required<Pick<T, K>>;
|
|
460
461
|
type GranularPartial<T, K extends keyof T> = Omit<T, K> & Partial<Pick<T, K>>;
|
|
461
462
|
/** Column Definitions */
|
|
462
|
-
interface ColumnDefinition<TValue = any, TRenderer = React.FC<ICellRendererParams<any, TValue>>, TRendererParams = any, TEditor = React.ForwardRefExoticComponent<
|
|
463
|
+
interface ColumnDefinition<TValue = any, TRenderer = React.FC<ICellRendererParams<any, TValue>>, TRendererParams = any, TEditor = React.ForwardRefExoticComponent<CustomCellEditorProps<any, TValue>>, TEditorParams = any, TFilterOption = TValue, TFilterValue = number | string | LocationFilterOpt | {
|
|
463
464
|
date: Date;
|
|
464
465
|
} | NumberFilterValue, TBulkEditor = string, TBulkEditorParams = any> {
|
|
465
466
|
aggFunc?: string | AggregationFunction<TValue>;
|
|
@@ -517,9 +518,11 @@ interface ColumnDefinition<TValue = any, TRenderer = React.FC<ICellRendererParam
|
|
|
517
518
|
rightAlign?: boolean;
|
|
518
519
|
rowGroup?: boolean;
|
|
519
520
|
sortable?: boolean;
|
|
521
|
+
/** @deprecated please use suppressHeaderMenuButton instead */
|
|
520
522
|
suppressMenu?: boolean;
|
|
521
523
|
suppressMovable?: boolean;
|
|
522
524
|
suppressSizeToFit?: boolean;
|
|
525
|
+
suppressHeaderMenuButton?: boolean;
|
|
523
526
|
valueGetter?: (params: ValueGetterParams) => TValue;
|
|
524
527
|
valueParser?: (params: ValueParserParams) => TValue;
|
|
525
528
|
valueSetter?: (params: ValueSetterParams) => boolean;
|
|
@@ -693,7 +696,6 @@ interface FirstDataRenderedEvent<TData = any, TContext = any> {
|
|
|
693
696
|
firstRow: number;
|
|
694
697
|
lastRow: number;
|
|
695
698
|
api: GridApi<TData>;
|
|
696
|
-
columnApi: ColumnApi;
|
|
697
699
|
context: TContext;
|
|
698
700
|
type: string;
|
|
699
701
|
}
|
|
@@ -752,7 +754,7 @@ interface DetailRowConfig<TRow = any> {
|
|
|
752
754
|
rowSelectionEnabled?: boolean | ((params: CheckboxSelectionCallbackParams<TRow>) => boolean);
|
|
753
755
|
rowSelection?: 'multiple' | 'single';
|
|
754
756
|
rowMultiSelectWithClick?: boolean;
|
|
755
|
-
|
|
757
|
+
enableClickSelection?: boolean | 'enableSelection' | 'enableDeselection';
|
|
756
758
|
}
|
|
757
759
|
type CustomRendererCell = {
|
|
758
760
|
component: React.ComponentType<any>;
|
|
@@ -992,6 +994,7 @@ interface TableProps<TRow = any, TBottomRow = any> {
|
|
|
992
994
|
onRowSelected?: (event: RowSelectedEvent) => void;
|
|
993
995
|
onSelectAll?: (param: SelectAllState.All | SelectAllState.None) => void;
|
|
994
996
|
onTableReady?: (tableApi: TableApi, tableApiRef: React.RefObject<TableApi>) => void;
|
|
997
|
+
onGridReady?: (event: GridReadyEvent) => void;
|
|
995
998
|
onColumnEverythingChanged?: (changeEvent: ColumnEverythingChangedEvent) => void;
|
|
996
999
|
onCellFocused?: (event: CellFocusedEvent) => void;
|
|
997
1000
|
onFirstDataRendered?: (event: FirstDataRenderedEvent) => void;
|
|
@@ -1027,7 +1030,14 @@ interface TableProps<TRow = any, TBottomRow = any> {
|
|
|
1027
1030
|
suppressExpandGroupsButton?: boolean;
|
|
1028
1031
|
suppressFieldDotNotation?: boolean;
|
|
1029
1032
|
suppressResetColumnsOption?: boolean;
|
|
1030
|
-
|
|
1033
|
+
/**
|
|
1034
|
+
* Choosing `'enableSelection'` allows selection of a row by clicking the row itself.
|
|
1035
|
+
* Choosing `'enableDeselection'` allows deselection of a row by CTRL-clicking the row itself.
|
|
1036
|
+
* Choosing `true` allows both selection and deselection of a row by clicking.
|
|
1037
|
+
* Choosing `false` prevents rows from being selected or deselected by clicking.
|
|
1038
|
+
* @default false
|
|
1039
|
+
*/
|
|
1040
|
+
enableClickSelection?: boolean | 'enableSelection' | 'enableDeselection';
|
|
1031
1041
|
stickyExpandedGroupRows?: boolean;
|
|
1032
1042
|
/**
|
|
1033
1043
|
* Allows overriding the default behaviour for when user hits Tab key when a cell is focused
|
|
@@ -1037,11 +1047,7 @@ interface TableProps<TRow = any, TBottomRow = any> {
|
|
|
1037
1047
|
type AggregationFunction<TValue> = (params: {
|
|
1038
1048
|
columnDefinition: ColumnDefinition;
|
|
1039
1049
|
values: TValue[];
|
|
1040
|
-
rowNode:
|
|
1041
|
-
allLeafChildren: {
|
|
1042
|
-
data: TValue;
|
|
1043
|
-
}[];
|
|
1044
|
-
};
|
|
1050
|
+
rowNode: IRowNode<TValue>;
|
|
1045
1051
|
/**
|
|
1046
1052
|
* If rendering in a nested table, this is the id of the parent row
|
|
1047
1053
|
*/
|
|
@@ -1140,6 +1146,7 @@ interface DataTableProps {
|
|
|
1140
1146
|
showExpandCollapseAllToggle?: boolean;
|
|
1141
1147
|
translations?: DataTableTranslations;
|
|
1142
1148
|
enableCellTextSelection?: boolean;
|
|
1149
|
+
headerCheckboxSelection?: boolean | HeaderCheckboxSelectionCallback;
|
|
1143
1150
|
}
|
|
1144
1151
|
interface ClientSideDataTableProps extends Omit<DataTableProps, 'onServerSideDataRequest' | 'showExpandCollapseAllToggle'> {
|
|
1145
1152
|
}
|
|
@@ -1173,18 +1180,18 @@ declare function useFilterState({ columnDefinitions, gridApi, enabled, }: {
|
|
|
1173
1180
|
}): {
|
|
1174
1181
|
allAvailableFilters: FilterRecord<any[] | NumberFilterModel>[];
|
|
1175
1182
|
changeFilterValue: typeof changeFilterValue;
|
|
1176
|
-
filterableColumns: ColumnDefinition<any,
|
|
1183
|
+
filterableColumns: ColumnDefinition<any, React$1.FC<_ag_grid_community_core.ICellRendererParams<any, any, any>>, any, React$1.ForwardRefExoticComponent<_ag_grid_community_react.CustomCellEditorProps<any, any, any>>, any, any, string | number | NumberFilterValue | LocationFilterOpt | {
|
|
1177
1184
|
date: Date;
|
|
1178
1185
|
}, string, any>[];
|
|
1179
1186
|
};
|
|
1180
|
-
declare function changeFilterValue(fieldName: string, values: string[] | NumberFilterModel | undefined, tableRef:
|
|
1187
|
+
declare function changeFilterValue(fieldName: string, values: string[] | NumberFilterModel | undefined, tableRef: React$1.RefObject<TableApi> | null): void;
|
|
1181
1188
|
|
|
1182
1189
|
type DateFilterComponentProps = FilterComponentProps<{
|
|
1183
1190
|
date: Date;
|
|
1184
1191
|
}, Array<{
|
|
1185
1192
|
date: Date;
|
|
1186
1193
|
}>>;
|
|
1187
|
-
declare const DateFilterRenderer: (props: DateFilterComponentProps) =>
|
|
1194
|
+
declare const DateFilterRenderer: (props: DateFilterComponentProps) => React$1.JSX.Element | null;
|
|
1188
1195
|
|
|
1189
1196
|
type LocationFilterProps = FilterComponentProps<LocationOption, LocationOption[]>;
|
|
1190
1197
|
interface LocationOption {
|
|
@@ -1193,9 +1200,9 @@ interface LocationOption {
|
|
|
1193
1200
|
id: string | number;
|
|
1194
1201
|
sublocations?: Omit<LocationOption, 'sublocations'>[];
|
|
1195
1202
|
}
|
|
1196
|
-
declare const LocationFilterRenderer: (props: LocationFilterProps) =>
|
|
1203
|
+
declare const LocationFilterRenderer: (props: LocationFilterProps) => React$1.JSX.Element | null;
|
|
1197
1204
|
|
|
1198
|
-
declare const MultiSelectFilterRenderer: (props: FilterComponentProps) =>
|
|
1205
|
+
declare const MultiSelectFilterRenderer: (props: FilterComponentProps) => React$1.JSX.Element | null;
|
|
1199
1206
|
|
|
1200
1207
|
interface IFilterProps<Opt = any, Val = number | string | null> {
|
|
1201
1208
|
columnDefinition: ColumnDefinition;
|
|
@@ -1307,7 +1314,6 @@ interface ISearchStorage {
|
|
|
1307
1314
|
|
|
1308
1315
|
interface InternalTableContext {
|
|
1309
1316
|
analytics?: AnalyticsConfig;
|
|
1310
|
-
columnApi?: ColumnApi;
|
|
1311
1317
|
columnDefinitions: ColumnDefinition[];
|
|
1312
1318
|
contextPanel: ContextPanelApi;
|
|
1313
1319
|
customBulkEditorFields?: CustomBulkEditorFields;
|
|
@@ -1318,7 +1324,7 @@ interface InternalTableContext {
|
|
|
1318
1324
|
getRowHeight: GetRowHeightWithFooters;
|
|
1319
1325
|
getRowId?: DataTableProps['getRowId'];
|
|
1320
1326
|
gridApi?: GridApi;
|
|
1321
|
-
grandTotalsLabelInnerRenderer?:
|
|
1327
|
+
grandTotalsLabelInnerRenderer?: React$1.FunctionComponent<GrandTotalsLabelRendererProps>;
|
|
1322
1328
|
initialTableConfig?: DataTableConfig;
|
|
1323
1329
|
filterState: ReturnType<typeof useFilterState>;
|
|
1324
1330
|
filterStorage: IFilterStorage;
|
|
@@ -1328,38 +1334,38 @@ interface InternalTableContext {
|
|
|
1328
1334
|
localStoragePersistenceKey?: string;
|
|
1329
1335
|
onTableConfigChange: () => void;
|
|
1330
1336
|
rowHeight: RowSize;
|
|
1331
|
-
rowSelectionRef?:
|
|
1337
|
+
rowSelectionRef?: React$1.MutableRefObject<RowSelectionRef>;
|
|
1332
1338
|
searchStorage: ISearchStorage;
|
|
1333
1339
|
selectedGroupIndex?: string | null;
|
|
1334
|
-
setColumnApi: (columnApi: ColumnApi) => void;
|
|
1335
1340
|
setGridApi: (gridApi: GridApi) => void;
|
|
1336
1341
|
setRowHeight: (rowHeight: RowSize, createTrackEvent?: boolean, triggerTableConfigChange?: boolean) => void;
|
|
1337
1342
|
showExpandCollapseAllToggle: boolean;
|
|
1338
|
-
expandCollapseStateRef:
|
|
1343
|
+
expandCollapseStateRef: React$1.MutableRefObject<{
|
|
1339
1344
|
expandedRoutes: string[];
|
|
1340
1345
|
collapsedRoutes: string[];
|
|
1341
1346
|
}> | null;
|
|
1342
|
-
tableRef:
|
|
1347
|
+
tableRef: React$1.RefObject<TableApi> | null;
|
|
1343
1348
|
getColumnDefinition: (field: string) => ColumnDefinition | undefined;
|
|
1344
1349
|
totalRowCount: number;
|
|
1345
|
-
setTotalRowCount:
|
|
1346
|
-
setSelectedGroupIndex?:
|
|
1350
|
+
setTotalRowCount: React$1.Dispatch<React$1.SetStateAction<number>>;
|
|
1351
|
+
setSelectedGroupIndex?: React$1.Dispatch<React$1.SetStateAction<string | null>>;
|
|
1352
|
+
headerCheckboxSelection?: boolean | HeaderCheckboxSelectionCallback;
|
|
1347
1353
|
}
|
|
1348
|
-
declare const InternalTableContext:
|
|
1354
|
+
declare const InternalTableContext: React$1.Context<InternalTableContext>;
|
|
1349
1355
|
|
|
1350
|
-
type AnalyticsProviderProps =
|
|
1356
|
+
type AnalyticsProviderProps = React$1.PropsWithChildren<{
|
|
1351
1357
|
analytics?: Analytics;
|
|
1352
1358
|
}>;
|
|
1353
1359
|
type HydratedContextValue = Pick<Analytics, 'trackEvent'>;
|
|
1354
1360
|
type DefaultContextValue = {};
|
|
1355
1361
|
type ContextValue = HydratedContextValue | DefaultContextValue;
|
|
1356
|
-
declare function AnalyticsProvider({ analytics, children, }: AnalyticsProviderProps):
|
|
1362
|
+
declare function AnalyticsProvider({ analytics, children, }: AnalyticsProviderProps): React$1.JSX.Element;
|
|
1357
1363
|
declare const useAnalyticsContext: () => HydratedContextValue;
|
|
1358
1364
|
declare const _default$2: {
|
|
1359
1365
|
Client: typeof Analytics;
|
|
1360
|
-
Consumer:
|
|
1366
|
+
Consumer: React$1.Consumer<ContextValue>;
|
|
1361
1367
|
Provider: typeof AnalyticsProvider;
|
|
1362
|
-
Context:
|
|
1368
|
+
Context: React$1.Context<ContextValue>;
|
|
1363
1369
|
};
|
|
1364
1370
|
|
|
1365
1371
|
declare class AnalyticsBulkClient extends _default$2.Client {
|
|
@@ -1371,20 +1377,20 @@ declare class AnalyticsBulkClient extends _default$2.Client {
|
|
|
1371
1377
|
sendAllEvents(): Promise<void>;
|
|
1372
1378
|
}
|
|
1373
1379
|
|
|
1374
|
-
declare const DateTimeCellRenderer:
|
|
1375
|
-
declare const DateTimeCellEditor:
|
|
1380
|
+
declare const DateTimeCellRenderer: React$1.FC<_ag_grid_community_core.ICellRendererParams<any, any, any>>;
|
|
1381
|
+
declare const DateTimeCellEditor: React$1.ForwardRefExoticComponent<_ag_grid_community_react.CustomCellEditorProps<any, any, any>>;
|
|
1376
1382
|
|
|
1377
|
-
declare const PersonCellRenderer:
|
|
1383
|
+
declare const PersonCellRenderer: React$1.FC<_ag_grid_community_core.ICellRendererParams<any, any, any>>;
|
|
1378
1384
|
|
|
1379
1385
|
interface SearchProps {
|
|
1380
|
-
onSearch?:
|
|
1386
|
+
onSearch?: React$1.ChangeEventHandler<HTMLInputElement>;
|
|
1381
1387
|
/** The placeholder to the Search input */
|
|
1382
1388
|
placeholder?: string;
|
|
1383
1389
|
disabled?: boolean;
|
|
1384
1390
|
}
|
|
1385
1391
|
|
|
1386
1392
|
interface QuickControlsProps extends Omit<SearchProps, 'disabled'> {
|
|
1387
|
-
style?:
|
|
1393
|
+
style?: React$1.CSSProperties;
|
|
1388
1394
|
disabledSearch?: boolean;
|
|
1389
1395
|
filterOverlayMatchesTriggerWidth?: boolean;
|
|
1390
1396
|
}
|
|
@@ -1400,72 +1406,64 @@ interface BulkActionProps {
|
|
|
1400
1406
|
showAlways?: boolean;
|
|
1401
1407
|
showEditButtonLabel?: boolean;
|
|
1402
1408
|
editButtonText?: string;
|
|
1403
|
-
style?:
|
|
1409
|
+
style?: React$1.CSSProperties;
|
|
1404
1410
|
}
|
|
1405
1411
|
|
|
1406
|
-
declare const _default$1: (({ analytics, children, columnDefinitions: _columnDefinitions, customBulkEditorFields, enableDynamicRowHeight, enableGroupEditAndValidation, filterGroups, getRowId, initialTableConfig: _initialTableConfig, onBulkEditUpdate, onTableConfigChange, translations, enableCellTextSelection, localStoragePersistenceKey, }:
|
|
1407
|
-
BulkActions:
|
|
1408
|
-
BulkEditActionButton:
|
|
1409
|
-
ConfigPanelButton:
|
|
1410
|
-
ContextPanel:
|
|
1411
|
-
QuickControls:
|
|
1412
|
-
QuickFilters:
|
|
1413
|
-
overlayMatchesTriggerWidth?: boolean
|
|
1412
|
+
declare const _default$1: (({ analytics, children, columnDefinitions: _columnDefinitions, customBulkEditorFields, enableDynamicRowHeight, enableGroupEditAndValidation, filterGroups, getRowId, initialTableConfig: _initialTableConfig, onBulkEditUpdate, onTableConfigChange, translations, enableCellTextSelection, localStoragePersistenceKey, headerCheckboxSelection, }: React$1.PropsWithChildren<ClientSideDataTableProps>) => React$1.JSX.Element) & {
|
|
1413
|
+
BulkActions: React$1.FunctionComponent<React$1.PropsWithChildren<BulkActionProps>>;
|
|
1414
|
+
BulkEditActionButton: React$1.FunctionComponent<ActionButtonProps>;
|
|
1415
|
+
ConfigPanelButton: React$1.FC<{}>;
|
|
1416
|
+
ContextPanel: React$1.FC<TablePanelProps>;
|
|
1417
|
+
QuickControls: React$1.FunctionComponent<QuickControlsProps>;
|
|
1418
|
+
QuickFilters: React$1.FunctionComponent<{
|
|
1419
|
+
overlayMatchesTriggerWidth?: boolean;
|
|
1414
1420
|
}>;
|
|
1415
|
-
RowGroupSelector:
|
|
1416
|
-
localeText:
|
|
1417
|
-
reset: string;
|
|
1418
|
-
placeholder: string;
|
|
1419
|
-
selectedItemsPrefix?: string | undefined;
|
|
1420
|
-
};
|
|
1421
|
+
RowGroupSelector: React$1.FC<{
|
|
1422
|
+
localeText: _procore_labs_group_by_select.GroupBySelectProps["localeText"];
|
|
1421
1423
|
}>;
|
|
1422
|
-
Search:
|
|
1423
|
-
Table:
|
|
1424
|
-
FiltersPanel:
|
|
1425
|
-
FiltersPanelButton:
|
|
1424
|
+
Search: React$1.FunctionComponent<SearchProps>;
|
|
1425
|
+
Table: React$1.FC<Omit<TableProps<any, any>, "selectionSSREnabled" | "modules">>;
|
|
1426
|
+
FiltersPanel: React$1.FunctionComponent<TablePanelProps>;
|
|
1427
|
+
FiltersPanelButton: React$1.FunctionComponent<{}>;
|
|
1426
1428
|
};
|
|
1427
1429
|
|
|
1428
1430
|
type EmptyRendererProps = {
|
|
1429
|
-
children?:
|
|
1431
|
+
children?: React$1.ReactNode;
|
|
1430
1432
|
hasFilters?: boolean;
|
|
1431
1433
|
hasSearch?: boolean;
|
|
1432
1434
|
itemsLabel?: string;
|
|
1433
1435
|
};
|
|
1434
1436
|
|
|
1435
|
-
declare const QuickDateFilterRenderer: (props: ServerSideFilterProps) =>
|
|
1437
|
+
declare const QuickDateFilterRenderer: (props: ServerSideFilterProps) => React$1.JSX.Element | null;
|
|
1436
1438
|
|
|
1437
|
-
declare const LocationQuickFilterRenderer:
|
|
1439
|
+
declare const LocationQuickFilterRenderer: React$1.FC<FilterProps>;
|
|
1438
1440
|
|
|
1439
|
-
declare const MultiSelectQuickFilterRenderer: (props: FilterProps<any[]>) =>
|
|
1441
|
+
declare const MultiSelectQuickFilterRenderer: (props: FilterProps<any[]>) => React$1.JSX.Element;
|
|
1440
1442
|
|
|
1441
|
-
declare const SingleSelectQuickFilterRenderer: (props: FilterProps<any[]>) =>
|
|
1443
|
+
declare const SingleSelectQuickFilterRenderer: (props: FilterProps<any[]>) => React$1.JSX.Element;
|
|
1442
1444
|
|
|
1443
|
-
declare const _default: (({ analytics, children, columnDefinitions: _columnDefinitions, customBulkEditorFields, enableDynamicRowHeight, enableGroupEditAndValidation, filterGroups, getRowId, initialTableConfig: _initialTableConfig, onBulkEditUpdate, onServerSideDataRequest, onTableConfigChange, enableCellTextSelection, showExpandCollapseAllToggle, translations, localStoragePersistenceKey, }:
|
|
1444
|
-
BulkActions:
|
|
1445
|
-
BulkEditActionButton:
|
|
1446
|
-
ConfigPanelButton:
|
|
1447
|
-
ContextPanel:
|
|
1448
|
-
QuickControls:
|
|
1449
|
-
QuickFilters:
|
|
1450
|
-
overlayMatchesTriggerWidth?: boolean
|
|
1445
|
+
declare const _default: (({ analytics, children, columnDefinitions: _columnDefinitions, customBulkEditorFields, enableDynamicRowHeight, enableGroupEditAndValidation, filterGroups, getRowId, initialTableConfig: _initialTableConfig, onBulkEditUpdate, onServerSideDataRequest, onTableConfigChange, enableCellTextSelection, showExpandCollapseAllToggle, translations, localStoragePersistenceKey, headerCheckboxSelection, }: React$1.PropsWithChildren<DataTableProps>) => React$1.JSX.Element) & {
|
|
1446
|
+
BulkActions: React$1.FunctionComponent<React$1.PropsWithChildren<BulkActionProps>>;
|
|
1447
|
+
BulkEditActionButton: React$1.FunctionComponent<ActionButtonProps>;
|
|
1448
|
+
ConfigPanelButton: React$1.FC<{}>;
|
|
1449
|
+
ContextPanel: React$1.FC<TablePanelProps>;
|
|
1450
|
+
QuickControls: React$1.FunctionComponent<QuickControlsProps>;
|
|
1451
|
+
QuickFilters: React$1.FunctionComponent<{
|
|
1452
|
+
overlayMatchesTriggerWidth?: boolean;
|
|
1451
1453
|
}>;
|
|
1452
|
-
RowGroupSelector:
|
|
1453
|
-
localeText:
|
|
1454
|
-
reset: string;
|
|
1455
|
-
placeholder: string;
|
|
1456
|
-
selectedItemsPrefix?: string | undefined;
|
|
1457
|
-
};
|
|
1454
|
+
RowGroupSelector: React$1.FC<{
|
|
1455
|
+
localeText: _procore_labs_group_by_select.GroupBySelectProps["localeText"];
|
|
1458
1456
|
}>;
|
|
1459
|
-
Search:
|
|
1460
|
-
Table:
|
|
1461
|
-
FiltersPanel:
|
|
1462
|
-
FiltersPanelButton:
|
|
1457
|
+
Search: React$1.FunctionComponent<SearchProps>;
|
|
1458
|
+
Table: React$1.FC<Omit<TableProps<any, any>, "rows" | "modules">>;
|
|
1459
|
+
FiltersPanel: React$1.FunctionComponent<TablePanelProps>;
|
|
1460
|
+
FiltersPanelButton: React$1.FunctionComponent<{}>;
|
|
1463
1461
|
};
|
|
1464
1462
|
|
|
1465
1463
|
declare const useRowSelectionState: () => IRowNode<any>[];
|
|
1466
1464
|
|
|
1467
|
-
declare function withDataTableEditor(Component:
|
|
1468
|
-
declare function withDataTableRenderer(Component:
|
|
1465
|
+
declare function withDataTableEditor(Component: React$1.ForwardRefExoticComponent<any>, editorType: 'input' | 'select' | 'date' | 'textarea'): React$1.ForwardRefExoticComponent<CustomCellEditorProps>;
|
|
1466
|
+
declare function withDataTableRenderer(Component: React$1.ComponentType<any>, editorType?: 'input' | 'select' | 'date' | 'textarea'): React$1.FC<ICellRendererParams>;
|
|
1469
1467
|
|
|
1470
1468
|
declare function assignAlphabeticalFilterIndices(columnDefinitions: ColumnDefinition[]): ColumnDefinition[];
|
|
1471
1469
|
|