@procore/data-table 13.2.1 → 13.3.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,5 +1,5 @@
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, ColumnPinnedType, RowHeightParams, CheckboxSelectionCallbackParams, ExcelDataType, RowGroupOpenedEvent, Module, RowSelectedEvent, ColumnEverythingChangedEvent, GetRowIdParams, ColumnApi, IFilter, IScalarFilterParams, ISimpleFilterParams } 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, GetRowIdParams, ColumnApi, IFilter, IScalarFilterParams, ISimpleFilterParams } from '@ag-grid-community/core';
3
3
  import * as React$1 from 'react';
4
4
  import React__default from 'react';
5
5
  import { AgGridReactProps, AgReactUiProps } from '@ag-grid-community/react';
@@ -588,13 +588,13 @@ interface TableApi {
588
588
  * The row node ID is the one you provide from the callback `getRowId(data)`,
589
589
  * otherwise the ID is a number auto-generated by the grid when the row data is set.
590
590
  */
591
- selectRows: (rowIds: (string | number)[]) => void;
591
+ selectRows: (rowIds: (string | number)[], source?: SelectionEventSourceType) => void;
592
592
  /**
593
593
  * Deselects row nodes by their respective row node IDs.
594
594
  * The row node ID is the one you provide from the callback `getRowId(data)`,
595
595
  * otherwise the ID is a number auto-generated by the grid when the row data is set.
596
596
  */
597
- deselectRows: (rowIds: (string | number)[]) => void;
597
+ deselectRows: (rowIds: (string | number)[], source?: SelectionEventSourceType) => void;
598
598
  /**
599
599
  * Set a function determining if selection is enabled for each row as it's loaded into the table.
600
600
  * Note: Changing this will not affect existing rows that have already been loaded. Additionally,
@@ -780,7 +780,6 @@ type UpdateServerSideDataSourceParams = {
780
780
  search?: ISearchState;
781
781
  filter?: {
782
782
  field: string;
783
- internalFilterState?: any;
784
783
  value: any;
785
784
  };
786
785
  };
@@ -1144,9 +1143,8 @@ interface FilterComponentProps<Opt = any, Val = Opt[] | NumberFilterModel> {
1144
1143
  filter: FilterRecord<Opt[] | NumberFilterModel>;
1145
1144
  filterDef: IFilter;
1146
1145
  getOptions?: () => Promise<boolean>;
1147
- internalFilterState?: any;
1148
1146
  loading: boolean;
1149
- onChange: (value: Opt[] | NumberFilterModel | undefined, internalFilterState?: any) => void;
1147
+ onChange: (value: Opt[] | NumberFilterModel | undefined) => void;
1150
1148
  onRemove: () => void;
1151
1149
  options: Opt[];
1152
1150
  value: Val;
@@ -1175,11 +1173,6 @@ interface IFilterState<Opt = any, Val = number | string> {
1175
1173
  */
1176
1174
  value: Val[];
1177
1175
  field: string;
1178
- /**
1179
- * Internal config used to set up the filter UI. Primary use case for Quick Filters and
1180
- * Filters Panel Filters to update each others' UI.
1181
- */
1182
- internalFilterState?: any;
1183
1176
  }
1184
1177
  interface IServerFiltersState {
1185
1178
  [field: string]: IFilterState;
@@ -1187,14 +1180,12 @@ interface IServerFiltersState {
1187
1180
  interface IFilterStorage<UniversalOpt = any, UniversalVal = number | string> {
1188
1181
  hasDefinedFilters: boolean;
1189
1182
  hasSelectedFilters: boolean;
1190
- getInternalFilterState: (field: string) => any;
1191
1183
  getOptions: (field: string) => UniversalOpt[];
1192
1184
  getSelected: (field: string) => IFilterState<UniversalOpt, UniversalVal>;
1193
1185
  getListFilter: (field: string) => IFilterState<UniversalOpt, UniversalVal>;
1194
1186
  selectedFilters: IServerFiltersState;
1195
- onChangeFilterValue: ({ field, internalFilterState, value, }: {
1187
+ onChangeFilterValue: ({ field, value, }: {
1196
1188
  field: string;
1197
- internalFilterState?: any;
1198
1189
  value: any;
1199
1190
  }) => void;
1200
1191
  onClearFilter: (field: string) => void;
@@ -1,5 +1,5 @@
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, ColumnPinnedType, RowHeightParams, CheckboxSelectionCallbackParams, ExcelDataType, RowGroupOpenedEvent, Module, RowSelectedEvent, ColumnEverythingChangedEvent, GetRowIdParams, ColumnApi, IFilter, IScalarFilterParams, ISimpleFilterParams } 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, GetRowIdParams, ColumnApi, IFilter, IScalarFilterParams, ISimpleFilterParams } from '@ag-grid-community/core';
3
3
  import * as React$1 from 'react';
4
4
  import React__default from 'react';
5
5
  import { AgGridReactProps, AgReactUiProps } from '@ag-grid-community/react';
@@ -588,13 +588,13 @@ interface TableApi {
588
588
  * The row node ID is the one you provide from the callback `getRowId(data)`,
589
589
  * otherwise the ID is a number auto-generated by the grid when the row data is set.
590
590
  */
591
- selectRows: (rowIds: (string | number)[]) => void;
591
+ selectRows: (rowIds: (string | number)[], source?: SelectionEventSourceType) => void;
592
592
  /**
593
593
  * Deselects row nodes by their respective row node IDs.
594
594
  * The row node ID is the one you provide from the callback `getRowId(data)`,
595
595
  * otherwise the ID is a number auto-generated by the grid when the row data is set.
596
596
  */
597
- deselectRows: (rowIds: (string | number)[]) => void;
597
+ deselectRows: (rowIds: (string | number)[], source?: SelectionEventSourceType) => void;
598
598
  /**
599
599
  * Set a function determining if selection is enabled for each row as it's loaded into the table.
600
600
  * Note: Changing this will not affect existing rows that have already been loaded. Additionally,
@@ -780,7 +780,6 @@ type UpdateServerSideDataSourceParams = {
780
780
  search?: ISearchState;
781
781
  filter?: {
782
782
  field: string;
783
- internalFilterState?: any;
784
783
  value: any;
785
784
  };
786
785
  };
@@ -1144,9 +1143,8 @@ interface FilterComponentProps<Opt = any, Val = Opt[] | NumberFilterModel> {
1144
1143
  filter: FilterRecord<Opt[] | NumberFilterModel>;
1145
1144
  filterDef: IFilter;
1146
1145
  getOptions?: () => Promise<boolean>;
1147
- internalFilterState?: any;
1148
1146
  loading: boolean;
1149
- onChange: (value: Opt[] | NumberFilterModel | undefined, internalFilterState?: any) => void;
1147
+ onChange: (value: Opt[] | NumberFilterModel | undefined) => void;
1150
1148
  onRemove: () => void;
1151
1149
  options: Opt[];
1152
1150
  value: Val;
@@ -1175,11 +1173,6 @@ interface IFilterState<Opt = any, Val = number | string> {
1175
1173
  */
1176
1174
  value: Val[];
1177
1175
  field: string;
1178
- /**
1179
- * Internal config used to set up the filter UI. Primary use case for Quick Filters and
1180
- * Filters Panel Filters to update each others' UI.
1181
- */
1182
- internalFilterState?: any;
1183
1176
  }
1184
1177
  interface IServerFiltersState {
1185
1178
  [field: string]: IFilterState;
@@ -1187,14 +1180,12 @@ interface IServerFiltersState {
1187
1180
  interface IFilterStorage<UniversalOpt = any, UniversalVal = number | string> {
1188
1181
  hasDefinedFilters: boolean;
1189
1182
  hasSelectedFilters: boolean;
1190
- getInternalFilterState: (field: string) => any;
1191
1183
  getOptions: (field: string) => UniversalOpt[];
1192
1184
  getSelected: (field: string) => IFilterState<UniversalOpt, UniversalVal>;
1193
1185
  getListFilter: (field: string) => IFilterState<UniversalOpt, UniversalVal>;
1194
1186
  selectedFilters: IServerFiltersState;
1195
- onChangeFilterValue: ({ field, internalFilterState, value, }: {
1187
+ onChangeFilterValue: ({ field, value, }: {
1196
1188
  field: string;
1197
- internalFilterState?: any;
1198
1189
  value: any;
1199
1190
  }) => void;
1200
1191
  onClearFilter: (field: string) => void;