@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.
@@ -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, ICellEditorParams, RowDataTransaction, RowNodeTransaction, ServerSideTransaction, GridApi, ICellEditor, RefreshCellsParams, RowNode as RowNode$1, Column, SelectionEventSourceType, ColumnPinnedType, RowHeightParams, CheckboxSelectionCallbackParams, ExcelDataType, RowGroupOpenedEvent, Module, RowSelectedEvent, ColumnEverythingChangedEvent, CellFocusedEvent, TabToNextCellParams, CellPosition, GetRowIdParams, ColumnApi, IFilter, IScalarFilterParams, ISimpleFilterParams } from '@ag-grid-community/core';
3
- import * as React$1 from 'react';
4
- import React__default from 'react';
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: React__default.FunctionComponent<GrandTotalsLabelRendererProps>;
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: React__default.NamedExoticComponent<NumberFilterProps>;
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) | React__default.MutableRefObject<HTMLElement | null> | null;
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: React__default.FC<_ag_grid_community_core.ICellRendererParams<any, any, any>>;
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: React__default.ForwardRefExoticComponent<_ag_grid_community_core.ICellEditorParams<any, any, any>>;
214
+ declare const BooleanCellEditor: React$1.ForwardRefExoticComponent<_ag_grid_community_react.CustomCellEditorProps<any, any, any>>;
214
215
 
215
216
  interface ButtonsCellRendererParams {
216
- buttons: React__default.FunctionComponent<DataTableCellRendererProps>[];
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: React__default.FC<_ag_grid_community_core.ICellRendererParams<any, any, any>>;
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: React__default.FC<_ag_grid_community_core.ICellRendererParams<any, any, any>>;
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: React__default.FC<_ag_grid_community_core.ICellRendererParams<any, any, any>>;
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: React__default.ForwardRefExoticComponent<_ag_grid_community_core.ICellEditorParams<any, any, any>>;
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: React__default.FC<_ag_grid_community_core.ICellRendererParams<any, any, any>>;
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: React__default.ForwardRefExoticComponent<_ag_grid_community_core.ICellEditorParams<any, any, any>>;
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$1.FC<any>;
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: React__default.FC<_ag_grid_community_core.ICellRendererParams<any, any, any>>;
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: React__default.ChangeEvent<HTMLInputElement>;
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: React__default.FC<_ag_grid_community_core.ICellRendererParams<any, any, any>>;
336
- declare const MultiSelectCellEditor: React__default.ForwardRefExoticComponent<_ag_grid_community_core.ICellEditorParams<any, any, any>>;
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: React__default.FC<_ag_grid_community_core.ICellRendererParams<any, any, any>>;
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: React__default.ForwardRefExoticComponent<_ag_grid_community_core.ICellEditorParams<any, any, any>>;
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: React__default.FC<_ag_grid_community_core.ICellRendererParams<any, any, any>>;
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: React__default.FC<_ag_grid_community_core.ICellRendererParams<any, any, any>>;
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: React__default.ForwardRefExoticComponent<_ag_grid_community_core.ICellEditorParams<any, any, any>>;
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: React__default.FC<_ag_grid_community_core.ICellRendererParams<any, any, any>>;
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: React__default.ForwardRefExoticComponent<_ag_grid_community_core.ICellEditorParams<any, any, any>>;
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: React__default.FC<_ag_grid_community_core.ICellRendererParams<any, any, any>>;
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: React__default.ChangeEvent<HTMLInputElement>;
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: React__default.ForwardRefExoticComponent<_ag_grid_community_core.ICellEditorParams<any, any, any>>;
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: React__default.ForwardRefExoticComponent<_ag_grid_community_core.ICellEditorParams<any, any, any>>;
442
- declare const TextAreaCellRenderer: React__default.FC<_ag_grid_community_core.ICellRendererParams<any, any, any>>;
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: React__default.FC<_ag_grid_community_core.ICellRendererParams<any, any, any>>;
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: React__default.ForwardRefExoticComponent<_ag_grid_community_core.ICellEditorParams<any, any, any>>;
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<ICellEditorParams<any, TValue>>, TEditorParams = any, TFilterOption = TValue, TFilterValue = number | string | LocationFilterOpt | {
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
- suppressRowClickSelection?: boolean;
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
- suppressRowClickSelection?: boolean;
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, React__default.FC<_ag_grid_community_core.ICellRendererParams<any, any, any>>, any, React__default.ForwardRefExoticComponent<_ag_grid_community_core.ICellEditorParams<any, any, any>>, any, any, string | number | NumberFilterValue | LocationFilterOpt | {
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: React__default.RefObject<TableApi> | null): void;
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) => React__default.JSX.Element | null;
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) => React__default.JSX.Element | null;
1203
+ declare const LocationFilterRenderer: (props: LocationFilterProps) => React$1.JSX.Element | null;
1197
1204
 
1198
- declare const MultiSelectFilterRenderer: (props: FilterComponentProps) => React__default.JSX.Element | null;
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?: React__default.FunctionComponent<GrandTotalsLabelRendererProps>;
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?: React__default.MutableRefObject<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: React__default.MutableRefObject<{
1343
+ expandCollapseStateRef: React$1.MutableRefObject<{
1339
1344
  expandedRoutes: string[];
1340
1345
  collapsedRoutes: string[];
1341
1346
  }> | null;
1342
- tableRef: React__default.RefObject<TableApi> | null;
1347
+ tableRef: React$1.RefObject<TableApi> | null;
1343
1348
  getColumnDefinition: (field: string) => ColumnDefinition | undefined;
1344
1349
  totalRowCount: number;
1345
- setTotalRowCount: React__default.Dispatch<React__default.SetStateAction<number>>;
1346
- setSelectedGroupIndex?: React__default.Dispatch<React__default.SetStateAction<string | null>>;
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: React__default.Context<InternalTableContext>;
1354
+ declare const InternalTableContext: React$1.Context<InternalTableContext>;
1349
1355
 
1350
- type AnalyticsProviderProps = React__default.PropsWithChildren<{
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): React__default.JSX.Element;
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: React__default.Consumer<ContextValue>;
1366
+ Consumer: React$1.Consumer<ContextValue>;
1361
1367
  Provider: typeof AnalyticsProvider;
1362
- Context: React__default.Context<ContextValue>;
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: React__default.FC<_ag_grid_community_core.ICellRendererParams<any, any, any>>;
1375
- declare const DateTimeCellEditor: React__default.ForwardRefExoticComponent<_ag_grid_community_core.ICellEditorParams<any, any, any>>;
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: React__default.FC<_ag_grid_community_core.ICellRendererParams<any, any, any>>;
1383
+ declare const PersonCellRenderer: React$1.FC<_ag_grid_community_core.ICellRendererParams<any, any, any>>;
1378
1384
 
1379
1385
  interface SearchProps {
1380
- onSearch?: React__default.ChangeEventHandler<HTMLInputElement>;
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?: React__default.CSSProperties;
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?: React__default.CSSProperties;
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, }: React__default.PropsWithChildren<ClientSideDataTableProps>) => React__default.JSX.Element) & {
1407
- BulkActions: React__default.FunctionComponent<React__default.PropsWithChildren<BulkActionProps>>;
1408
- BulkEditActionButton: React__default.FunctionComponent<ActionButtonProps>;
1409
- ConfigPanelButton: React__default.FC<{}>;
1410
- ContextPanel: React__default.FC<TablePanelProps>;
1411
- QuickControls: React__default.FunctionComponent<QuickControlsProps>;
1412
- QuickFilters: React__default.FunctionComponent<{
1413
- overlayMatchesTriggerWidth?: boolean | undefined;
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: React__default.FC<{
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: React__default.FunctionComponent<SearchProps>;
1423
- Table: React__default.FC<Omit<TableProps<any, any>, "selectionSSREnabled" | "modules">>;
1424
- FiltersPanel: React__default.FunctionComponent<TablePanelProps>;
1425
- FiltersPanelButton: React__default.FunctionComponent<{}>;
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?: React__default.ReactNode;
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) => React__default.JSX.Element | null;
1437
+ declare const QuickDateFilterRenderer: (props: ServerSideFilterProps) => React$1.JSX.Element | null;
1436
1438
 
1437
- declare const LocationQuickFilterRenderer: React__default.FC<FilterProps>;
1439
+ declare const LocationQuickFilterRenderer: React$1.FC<FilterProps>;
1438
1440
 
1439
- declare const MultiSelectQuickFilterRenderer: (props: FilterProps<any[]>) => React__default.JSX.Element;
1441
+ declare const MultiSelectQuickFilterRenderer: (props: FilterProps<any[]>) => React$1.JSX.Element;
1440
1442
 
1441
- declare const SingleSelectQuickFilterRenderer: (props: FilterProps<any[]>) => React__default.JSX.Element;
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, }: React__default.PropsWithChildren<DataTableProps>) => React__default.JSX.Element) & {
1444
- BulkActions: React__default.FunctionComponent<React__default.PropsWithChildren<BulkActionProps>>;
1445
- BulkEditActionButton: React__default.FunctionComponent<ActionButtonProps>;
1446
- ConfigPanelButton: React__default.FC<{}>;
1447
- ContextPanel: React__default.FC<TablePanelProps>;
1448
- QuickControls: React__default.FunctionComponent<QuickControlsProps>;
1449
- QuickFilters: React__default.FunctionComponent<{
1450
- overlayMatchesTriggerWidth?: boolean | undefined;
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: React__default.FC<{
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: React__default.FunctionComponent<SearchProps>;
1460
- Table: React__default.FC<Omit<TableProps<any, any>, "rows" | "modules">>;
1461
- FiltersPanel: React__default.FunctionComponent<TablePanelProps>;
1462
- FiltersPanelButton: React__default.FunctionComponent<{}>;
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: React__default.ForwardRefExoticComponent<any>, editorType: 'input' | 'select' | 'date' | 'textarea'): React__default.ForwardRefExoticComponent<ICellEditorParams>;
1468
- declare function withDataTableRenderer(Component: React__default.ComponentType<any>, editorType?: 'input' | 'select' | 'date' | 'textarea'): React__default.FC<ICellRendererParams>;
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