@procore/data-table 14.37.0 → 14.39.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 CHANGED
@@ -1,5 +1,21 @@
1
1
  # Change Log
2
2
 
3
+ ## 14.39.0
4
+
5
+ ### Minor Changes
6
+
7
+ - 3052b62: Adds onExpandOrCollapseAll prop for tracking expand/collapse state
8
+
9
+ ## 14.38.0
10
+
11
+ ### Minor Changes
12
+
13
+ - 7576619: Allowing parent row to be editable when using grouping with `DataTable.Table enableGroupHeaderEdit`
14
+
15
+ ### Patch Changes
16
+
17
+ - 5be31e3: AutoGroupCell fix - adds flex-shrink: 0 to account for default svg behavior
18
+
3
19
  ## 14.37.0
4
20
 
5
21
  ### Minor Changes
@@ -54660,6 +54660,33 @@ function SingleSelectFilterRenderer({
54660
54660
  );
54661
54661
  }
54662
54662
 
54663
+ // src/utils/columnEditableHelpers.ts
54664
+ function createColumnEditableUtils(options) {
54665
+ return {
54666
+ overrideEditable: (columnEditable) => {
54667
+ return (params) => {
54668
+ var _a;
54669
+ const isGroupNodeExpanded = params.node.group && params.node.expanded;
54670
+ if (((_a = params.node) == null ? void 0 : _a.rowPinned) || !options.enableGroupHeaderEdit && isGroupNodeExpanded && !params.node.footer) {
54671
+ return false;
54672
+ }
54673
+ if (typeof columnEditable === "boolean") {
54674
+ return columnEditable;
54675
+ }
54676
+ return (columnEditable == null ? void 0 : columnEditable(params)) ?? false;
54677
+ };
54678
+ }
54679
+ };
54680
+ }
54681
+ function isColumnEditable(columnEditable) {
54682
+ return (params) => {
54683
+ if (typeof columnEditable === "boolean") {
54684
+ return columnEditable;
54685
+ }
54686
+ return (columnEditable == null ? void 0 : columnEditable(params)) ?? false;
54687
+ };
54688
+ }
54689
+
54663
54690
  // src/utils/transformers.ts
54664
54691
  var emptyObject = {};
54665
54692
  var DEFAULT_AUTO_GROUP_COLUMN_DEFINITION = {
@@ -54743,24 +54770,12 @@ function transformToColumnDefinition(colDef = emptyObject) {
54743
54770
  valueSetter: colDef.valueSetter
54744
54771
  };
54745
54772
  }
54746
- function isEditable(columnEditable) {
54747
- return (params) => {
54748
- var _a;
54749
- if (((_a = params.node) == null ? void 0 : _a.rowPinned) || params.node.group && params.node.expanded && !params.node.footer) {
54750
- return false;
54751
- }
54752
- if (typeof columnEditable === "boolean") {
54753
- return columnEditable;
54754
- }
54755
- return (columnEditable == null ? void 0 : columnEditable(params)) ?? false;
54756
- };
54757
- }
54758
54773
  function shouldHaveEditStyles(params) {
54759
54774
  var _a;
54760
54775
  if (!((_a = params.colDef) == null ? void 0 : _a.cellEditor)) {
54761
54776
  return false;
54762
54777
  }
54763
- return isEditable(params.colDef.editable);
54778
+ return isColumnEditable(params.colDef.editable);
54764
54779
  }
54765
54780
  var toExcelCellClass = (className) => `excel-export--${className}`;
54766
54781
  function transformToExcelStyles(excelDataFormats) {
@@ -54885,11 +54900,11 @@ function transformColumnDefinitionToColDef(dataTableColumnDefinition, enableGrou
54885
54900
  parentData: context == null ? void 0 : context.parentData,
54886
54901
  parentId: context == null ? void 0 : context.parentId
54887
54902
  }) : aggFunc,
54888
- bulkEditable: isEditable(bulkEditable),
54903
+ bulkEditable: isColumnEditable(bulkEditable),
54889
54904
  cellClass: cellExcelDataType ? toExcelCellClass(cellExcelDataType) : void 0,
54890
54905
  cellClassRules,
54891
54906
  comparator,
54892
- editable: isEditable(_editable),
54907
+ editable: isColumnEditable(_editable),
54893
54908
  filter: getFilter(dataTableColumnDefinition),
54894
54909
  // set filter by default
54895
54910
  filterParams: {
@@ -55214,12 +55229,12 @@ function getDecoratedAutoGroupColDef(columnDefinition, enableGroupEditAndValidat
55214
55229
  }
55215
55230
 
55216
55231
  // src/CellRenderers/AutoGroupCell.scss
55217
- var css5 = `._autoGroupCell_pq41h_1 {
55232
+ var css5 = `._autoGroupCell_1qx8z_1 {
55218
55233
  height: 100%;
55219
55234
  width: 100%;
55220
55235
  }
55221
55236
 
55222
- ._indent_pq41h_6 {
55237
+ ._indent_1qx8z_6 {
55223
55238
  border-right: 1px solid #d6dadc;
55224
55239
  background: #f4f5f6;
55225
55240
  position: absolute;
@@ -55227,44 +55242,45 @@ var css5 = `._autoGroupCell_pq41h_1 {
55227
55242
  bottom: -1px;
55228
55243
  width: 12px;
55229
55244
  }
55230
- ._indent_pq41h_6._innermostLastIndent_pq41h_14 {
55245
+ ._indent_1qx8z_6._innermostLastIndent_1qx8z_14 {
55231
55246
  bottom: 0px;
55232
55247
  }
55233
55248
 
55234
- ._expandableCaret_pq41h_18 {
55249
+ ._expandableCaret_1qx8z_18 {
55235
55250
  margin-left: -8px;
55236
55251
  margin-right: 4px;
55237
55252
  width: 24px;
55253
+ flex-shrink: 0;
55238
55254
  }
55239
55255
 
55240
- ._expandCaret_pq41h_24 {
55256
+ ._expandCaret_1qx8z_25 {
55241
55257
  color: #2066df;
55242
55258
  cursor: pointer;
55243
55259
  }
55244
55260
 
55245
- ._collapseCaret_pq41h_29 {
55261
+ ._collapseCaret_1qx8z_30 {
55246
55262
  color: #75838a;
55247
55263
  cursor: pointer;
55248
55264
  }
55249
55265
 
55250
- ._value_pq41h_34 {
55266
+ ._value_1qx8z_35 {
55251
55267
  overflow: hidden;
55252
55268
  text-overflow: ellipsis;
55253
55269
  font-size: 12px;
55254
55270
  }
55255
- ._value_pq41h_34._footer_pq41h_39 {
55271
+ ._value_1qx8z_35._footer_1qx8z_40 {
55256
55272
  color: #6a767c;
55257
55273
  }`;
55258
55274
  document.head.appendChild(document.createElement("style")).appendChild(document.createTextNode(css5));
55259
55275
  var AutoGroupCell_default = {
55260
- "autoGroupCell": "_autoGroupCell_pq41h_1",
55261
- "indent": "_indent_pq41h_6",
55262
- "innermostLastIndent": "_innermostLastIndent_pq41h_14",
55263
- "expandableCaret": "_expandableCaret_pq41h_18",
55264
- "expandCaret": "_expandCaret_pq41h_24",
55265
- "collapseCaret": "_collapseCaret_pq41h_29",
55266
- "value": "_value_pq41h_34",
55267
- "footer": "_footer_pq41h_39"
55276
+ "autoGroupCell": "_autoGroupCell_1qx8z_1",
55277
+ "indent": "_indent_1qx8z_6",
55278
+ "innermostLastIndent": "_innermostLastIndent_1qx8z_14",
55279
+ "expandableCaret": "_expandableCaret_1qx8z_18",
55280
+ "expandCaret": "_expandCaret_1qx8z_25",
55281
+ "collapseCaret": "_collapseCaret_1qx8z_30",
55282
+ "value": "_value_1qx8z_35",
55283
+ "footer": "_footer_1qx8z_40"
55268
55284
  };
55269
55285
 
55270
55286
  // src/utils/rowSelectionHelpers.ts
@@ -56580,9 +56596,10 @@ var GenericHeaderRenderer = (props) => {
56580
56596
  const {
56581
56597
  columnApi,
56582
56598
  tableRef,
56599
+ onExpandOrCollapseAll,
56583
56600
  onServerSideDataRequest,
56584
- showExpandCollapseAllToggle,
56585
- onTableConfigChange
56601
+ onTableConfigChange,
56602
+ showExpandCollapseAllToggle
56586
56603
  } = useInternalTableContext();
56587
56604
  const onSSDR = Boolean(onServerSideDataRequest);
56588
56605
  const [sortOrder, setSortOrder] = React80__default.default.useState(props.column.getSort());
@@ -56773,9 +56790,11 @@ var GenericHeaderRenderer = (props) => {
56773
56790
  }
56774
56791
  });
56775
56792
  setExpansionVariant("tierOne");
56793
+ onExpandOrCollapseAll == null ? void 0 : onExpandOrCollapseAll(true);
56776
56794
  } else {
56777
56795
  props.api.collapseAll();
56778
56796
  setExpansionVariant("closed");
56797
+ onExpandOrCollapseAll == null ? void 0 : onExpandOrCollapseAll(false);
56779
56798
  }
56780
56799
  return;
56781
56800
  }
@@ -56790,10 +56809,13 @@ var GenericHeaderRenderer = (props) => {
56790
56809
  props.api
56791
56810
  );
56792
56811
  setExpansionVariant(hasMoreExpandableNodes ? "tierOne" : "all");
56812
+ onExpandOrCollapseAll == null ? void 0 : onExpandOrCollapseAll(true);
56793
56813
  } else if (expansionVariant === "tierOne") {
56794
56814
  props.api.expandAll();
56815
+ onExpandOrCollapseAll == null ? void 0 : onExpandOrCollapseAll(true);
56795
56816
  } else {
56796
56817
  props.api.collapseAll();
56818
+ onExpandOrCollapseAll == null ? void 0 : onExpandOrCollapseAll(false);
56797
56819
  }
56798
56820
  }
56799
56821
  const tooltipText = {
@@ -56970,7 +56992,8 @@ var GenericHeaderRenderer = (props) => {
56970
56992
  "aria-label": tooltipText[expansionVariant],
56971
56993
  className: "expand-button",
56972
56994
  onClick: onExpandToggle,
56973
- role: "button"
56995
+ role: "button",
56996
+ "data-qa": "expand-or-collapse-all-button"
56974
56997
  },
56975
56998
  /* @__PURE__ */ React80__default.default.createElement(ExpansionVariantIcon, { size: "sm" })
56976
56999
  )
@@ -57830,6 +57853,8 @@ var InternalTableContext = React80__default.default.createContext({
57830
57853
  gridApi: void 0,
57831
57854
  localStoragePersistenceKey: void 0,
57832
57855
  onBulkEditUpdate: () => Promise.resolve(),
57856
+ onExpandOrCollapseAll: () => {
57857
+ },
57833
57858
  onServerSideDataRequest: void 0,
57834
57859
  onTableConfigChange: () => {
57835
57860
  },
@@ -76375,12 +76400,12 @@ var MenuItemMapper = class MenuItemMapper2 extends BeanStub {
76375
76400
  if (ModuleRegistry.__assertRegistered(ModuleNames.ClipboardModule, "Cut from Menu", this.context.getGridId())) {
76376
76401
  const focusedCell = this.focusService.getFocusedCell();
76377
76402
  const rowNode = focusedCell ? this.rowPositionUtils.getRowNode(focusedCell) : null;
76378
- const isEditable2 = rowNode ? focusedCell === null || focusedCell === void 0 ? void 0 : focusedCell.column.isCellEditable(rowNode) : false;
76403
+ const isEditable = rowNode ? focusedCell === null || focusedCell === void 0 ? void 0 : focusedCell.column.isCellEditable(rowNode) : false;
76379
76404
  return {
76380
76405
  name: localeTextFunc("cut", "Cut"),
76381
76406
  shortcut: localeTextFunc("ctrlX", "Ctrl+X"),
76382
76407
  icon: _.createIconNoSpan("clipboardCut", this.gridOptionsService, null),
76383
- disabled: !isEditable2 || this.gridOptionsService.is("suppressCutToClipboard"),
76408
+ disabled: !isEditable || this.gridOptionsService.is("suppressCutToClipboard"),
76384
76409
  action: () => this.clipboardService.cutToClipboard(void 0, "contextMenu")
76385
76410
  };
76386
76411
  } else {
@@ -108972,6 +108997,7 @@ var DataTable = ({
108972
108997
  getRowId,
108973
108998
  initialTableConfig: _initialTableConfig,
108974
108999
  onBulkEditUpdate,
109000
+ onExpandOrCollapseAll,
108975
109001
  onServerSideDataRequest,
108976
109002
  onTableConfigChange,
108977
109003
  showExpandCollapseAllToggle,
@@ -109222,6 +109248,7 @@ var DataTable = ({
109222
109248
  gridApi,
109223
109249
  initialTableConfig,
109224
109250
  onBulkEditUpdate,
109251
+ onExpandOrCollapseAll,
109225
109252
  onServerSideDataRequest,
109226
109253
  onTableConfigChange: internalOnTableConfigChange,
109227
109254
  rowSelectionRef,
@@ -109308,6 +109335,20 @@ function getServerSideDatasource(onServerSideDataRequestCallbackRef, onEmptyResp
109308
109335
  };
109309
109336
  }
109310
109337
  var minimumColumnWidth = 140;
109338
+ function useComputeAgGridProps(props) {
109339
+ const internalTableContext = useInternalTableContext();
109340
+ const onSSDR = internalTableContext.onServerSideDataRequest;
109341
+ return {
109342
+ groupIncludeFooter: !onSSDR && props.groupIncludeFooter === void 0 ? true : props.groupIncludeFooter,
109343
+ rowDragManaged: onSSDR ? false : props.rowDragManaged ?? true,
109344
+ rowModelType: onSSDR ? "serverSide" : void 0,
109345
+ groupSelectsChildren: (
109346
+ // Always true for client side, defaults to true for server side
109347
+ internalTableContext.totalRowCount > 0 && props.groupSelectsChildren !== false || !onSSDR
109348
+ ),
109349
+ groupDefaultExpanded: props.groupsAlwaysExpanded ? -1 : props.groupDefaultExpanded
109350
+ };
109351
+ }
109311
109352
  var Table = (props) => {
109312
109353
  var _a, _b, _c;
109313
109354
  const { suppressColumnVirtualisation = true, rowActionsConfig = {} } = props;
@@ -109358,16 +109399,30 @@ var Table = (props) => {
109358
109399
  React80__default.default.useImperativeHandle(internalTableContext.tableRef, () => tableApi, [
109359
109400
  tableApi
109360
109401
  ]);
109402
+ const {
109403
+ groupIncludeFooter,
109404
+ rowDragManaged,
109405
+ rowModelType,
109406
+ groupSelectsChildren,
109407
+ groupDefaultExpanded
109408
+ } = useComputeAgGridProps(props);
109409
+ const { overrideEditable } = createColumnEditableUtils({
109410
+ enableGroupHeaderEdit: props.enableGroupHeaderEdit
109411
+ });
109361
109412
  const decoratedColDefs = React80__default.default.useMemo(
109362
109413
  () => {
109363
109414
  var _a2;
109364
- return (_a2 = internalTableContext.columnDefinitions) == null ? void 0 : _a2.map(
109365
- (colDef) => transformToColDef(
109415
+ return (_a2 = internalTableContext.columnDefinitions) == null ? void 0 : _a2.map((colDef) => {
109416
+ const newColDef = transformToColDef(
109366
109417
  colDef,
109367
109418
  internalTableContext.enableGroupEditAndValidation,
109368
109419
  internalTableContext.enableDynamicRowHeight
109369
- )
109370
- );
109420
+ );
109421
+ return {
109422
+ ...newColDef,
109423
+ editable: overrideEditable(colDef.editable)
109424
+ };
109425
+ });
109371
109426
  },
109372
109427
  [internalTableContext.columnDefinitions]
109373
109428
  );
@@ -110139,13 +110194,10 @@ var Table = (props) => {
110139
110194
  getRowId: internalTableContext.getRowId,
110140
110195
  getRowStyle,
110141
110196
  groupAllowUnbalanced: true,
110142
- groupDefaultExpanded: props.groupsAlwaysExpanded ? -1 : props.groupDefaultExpanded,
110143
- groupIncludeFooter: !onSSDR && props.groupIncludeFooter === void 0 ? true : props.groupIncludeFooter,
110197
+ groupDefaultExpanded,
110198
+ groupIncludeFooter,
110144
110199
  getGroupRowAgg: props.getGroupRowAgg ? getGroupRowAgg : void 0,
110145
- groupSelectsChildren: (
110146
- // Always true for client side, defaults to true for server side
110147
- internalTableContext.totalRowCount > 0 && props.groupSelectsChildren !== false || !onSSDR
110148
- ),
110200
+ groupSelectsChildren,
110149
110201
  groupSelectsFiltered: true,
110150
110202
  headerHeight: props.headerHeight,
110151
110203
  icons: tableIcons,
@@ -110203,8 +110255,8 @@ var Table = (props) => {
110203
110255
  pinnedBottomRowData: props.pinnedBottomRowData,
110204
110256
  rowBuffer: props.rowBuffer,
110205
110257
  rowClassRules,
110206
- rowDragManaged: onSSDR ? false : props.rowDragManaged ?? true,
110207
- rowModelType: onSSDR ? "serverSide" : void 0,
110258
+ rowDragManaged,
110259
+ rowModelType,
110208
110260
  rowSelection: "multiple",
110209
110261
  ...serverSideInfiniteScroll,
110210
110262
  suppressClickEdit: true,
@@ -112275,6 +112327,7 @@ var ClientSideDataTable = ({
112275
112327
  getRowId,
112276
112328
  initialTableConfig: _initialTableConfig,
112277
112329
  onBulkEditUpdate,
112330
+ onExpandOrCollapseAll,
112278
112331
  onTableConfigChange,
112279
112332
  translations: translations2 = {},
112280
112333
  enableCellTextSelection,
@@ -112291,8 +112344,9 @@ var ClientSideDataTable = ({
112291
112344
  filterGroups,
112292
112345
  getRowId,
112293
112346
  initialTableConfig: _initialTableConfig,
112294
- onTableConfigChange,
112295
112347
  onBulkEditUpdate,
112348
+ onExpandOrCollapseAll,
112349
+ onTableConfigChange,
112296
112350
  showExpandCollapseAllToggle: true,
112297
112351
  translations: translations2,
112298
112352
  localStoragePersistenceKey,
@@ -116684,6 +116738,7 @@ var ServerSideDataTable = ({
116684
116738
  getRowId,
116685
116739
  initialTableConfig: _initialTableConfig,
116686
116740
  onBulkEditUpdate,
116741
+ onExpandOrCollapseAll,
116687
116742
  onServerSideDataRequest,
116688
116743
  onTableConfigChange,
116689
116744
  enableCellTextSelection,
@@ -116702,9 +116757,10 @@ var ServerSideDataTable = ({
116702
116757
  filterGroups,
116703
116758
  getRowId,
116704
116759
  initialTableConfig: _initialTableConfig,
116705
- onTableConfigChange,
116706
- onServerSideDataRequest,
116707
116760
  onBulkEditUpdate,
116761
+ onExpandOrCollapseAll,
116762
+ onServerSideDataRequest,
116763
+ onTableConfigChange,
116708
116764
  showExpandCollapseAllToggle,
116709
116765
  translations: translations2,
116710
116766
  customBulkEditorFields,
@@ -992,6 +992,7 @@ interface TableProps<TRow = any, TBottomRow = any> {
992
992
  groupsAlwaysExpanded?: boolean;
993
993
  groupDefaultExpanded?: number;
994
994
  groupIncludeFooter?: boolean;
995
+ enableGroupHeaderEdit?: boolean;
995
996
  groupSelectsChildren?: boolean;
996
997
  headerHeight?: number;
997
998
  hideActionsOnGroupedRow?: boolean;
@@ -1144,8 +1145,16 @@ interface DataTableProps {
1144
1145
  filterGroups?: FilterGroup[];
1145
1146
  getRowId?: (params: GetRowIdParams) => string;
1146
1147
  initialTableConfig?: DataTableConfig;
1147
- onTableConfigChange?: (config: DataTableConfig) => void;
1148
+ /**
1149
+ * Callback invoked when the row group expand/collapse state changes via
1150
+ * the Expand/Collapse toggle button. Use this to track the table's
1151
+ * expand/collapse state.
1152
+ * @param expanded - `true` when groups are expanded at any level, `false`
1153
+ * when all groups are collapsed.
1154
+ */
1155
+ onExpandOrCollapseAll?: (expanded: boolean) => void;
1148
1156
  onServerSideDataRequest?: (params: ServerSideGetRowsParams) => Promise<SuccessParams | void> | void;
1157
+ onTableConfigChange?: (config: DataTableConfig) => void;
1149
1158
  grandTotalsLabelRenderer?: React.FunctionComponent<GrandTotalsLabelRendererProps>;
1150
1159
  /**
1151
1160
  * Callback after bulk edit action is performed.
@@ -1373,6 +1382,7 @@ interface InternalTableContext {
1373
1382
  onServerSideDataRequest?: DataTableProps['onServerSideDataRequest'];
1374
1383
  updateServerSideDataSource: (params: UpdateServerSideDataSourceParams) => void;
1375
1384
  localStoragePersistenceKey?: string;
1385
+ onExpandOrCollapseAll?: (expanded: boolean) => void;
1376
1386
  onTableConfigChange: () => void;
1377
1387
  rowHeight: RowSize;
1378
1388
  rowSelectionRef?: React__default.MutableRefObject<RowSelectionRef>;
@@ -1453,7 +1463,7 @@ interface BulkActionProps {
1453
1463
  style?: React__default.CSSProperties;
1454
1464
  }
1455
1465
 
1456
- declare const _default$1: (({ analytics, children, columnDefinitions: _columnDefinitions, customBulkEditorFields, enableDynamicRowHeight, enableGroupEditAndValidation, filterGroups, getRowId, initialTableConfig: _initialTableConfig, onBulkEditUpdate, onTableConfigChange, translations, enableCellTextSelection, localStoragePersistenceKey, enableCDN, }: React__default.PropsWithChildren<ClientSideDataTableProps>) => React__default.JSX.Element) & {
1466
+ declare const _default$1: (({ analytics, children, columnDefinitions: _columnDefinitions, customBulkEditorFields, enableDynamicRowHeight, enableGroupEditAndValidation, filterGroups, getRowId, initialTableConfig: _initialTableConfig, onBulkEditUpdate, onExpandOrCollapseAll, onTableConfigChange, translations, enableCellTextSelection, localStoragePersistenceKey, enableCDN, }: React__default.PropsWithChildren<ClientSideDataTableProps>) => React__default.JSX.Element) & {
1457
1467
  BulkActions: React__default.FunctionComponent<React__default.PropsWithChildren<BulkActionProps>>;
1458
1468
  BulkEditActionButton: React__default.FunctionComponent<ActionButtonProps>;
1459
1469
  ConfigPanelButton: React__default.FC<{}>;
@@ -1490,7 +1500,7 @@ declare const MultiSelectQuickFilterRenderer: (props: FilterProps<any[]>) => Rea
1490
1500
 
1491
1501
  declare const SingleSelectQuickFilterRenderer: (props: FilterProps<any[]>) => React__default.JSX.Element;
1492
1502
 
1493
- declare const _default: (({ analytics, children, columnDefinitions: _columnDefinitions, customBulkEditorFields, enableDynamicRowHeight, enableGroupEditAndValidation, filterGroups, getRowId, initialTableConfig: _initialTableConfig, onBulkEditUpdate, onServerSideDataRequest, onTableConfigChange, enableCellTextSelection, showExpandCollapseAllToggle, translations, localStoragePersistenceKey, enableCDN, }: React__default.PropsWithChildren<DataTableProps>) => React__default.JSX.Element) & {
1503
+ declare const _default: (({ analytics, children, columnDefinitions: _columnDefinitions, customBulkEditorFields, enableDynamicRowHeight, enableGroupEditAndValidation, filterGroups, getRowId, initialTableConfig: _initialTableConfig, onBulkEditUpdate, onExpandOrCollapseAll, onServerSideDataRequest, onTableConfigChange, enableCellTextSelection, showExpandCollapseAllToggle, translations, localStoragePersistenceKey, enableCDN, }: React__default.PropsWithChildren<DataTableProps>) => React__default.JSX.Element) & {
1494
1504
  BulkActions: React__default.FunctionComponent<React__default.PropsWithChildren<BulkActionProps>>;
1495
1505
  BulkEditActionButton: React__default.FunctionComponent<ActionButtonProps>;
1496
1506
  ConfigPanelButton: React__default.FC<{}>;
@@ -992,6 +992,7 @@ interface TableProps<TRow = any, TBottomRow = any> {
992
992
  groupsAlwaysExpanded?: boolean;
993
993
  groupDefaultExpanded?: number;
994
994
  groupIncludeFooter?: boolean;
995
+ enableGroupHeaderEdit?: boolean;
995
996
  groupSelectsChildren?: boolean;
996
997
  headerHeight?: number;
997
998
  hideActionsOnGroupedRow?: boolean;
@@ -1144,8 +1145,16 @@ interface DataTableProps {
1144
1145
  filterGroups?: FilterGroup[];
1145
1146
  getRowId?: (params: GetRowIdParams) => string;
1146
1147
  initialTableConfig?: DataTableConfig;
1147
- onTableConfigChange?: (config: DataTableConfig) => void;
1148
+ /**
1149
+ * Callback invoked when the row group expand/collapse state changes via
1150
+ * the Expand/Collapse toggle button. Use this to track the table's
1151
+ * expand/collapse state.
1152
+ * @param expanded - `true` when groups are expanded at any level, `false`
1153
+ * when all groups are collapsed.
1154
+ */
1155
+ onExpandOrCollapseAll?: (expanded: boolean) => void;
1148
1156
  onServerSideDataRequest?: (params: ServerSideGetRowsParams) => Promise<SuccessParams | void> | void;
1157
+ onTableConfigChange?: (config: DataTableConfig) => void;
1149
1158
  grandTotalsLabelRenderer?: React.FunctionComponent<GrandTotalsLabelRendererProps>;
1150
1159
  /**
1151
1160
  * Callback after bulk edit action is performed.
@@ -1373,6 +1382,7 @@ interface InternalTableContext {
1373
1382
  onServerSideDataRequest?: DataTableProps['onServerSideDataRequest'];
1374
1383
  updateServerSideDataSource: (params: UpdateServerSideDataSourceParams) => void;
1375
1384
  localStoragePersistenceKey?: string;
1385
+ onExpandOrCollapseAll?: (expanded: boolean) => void;
1376
1386
  onTableConfigChange: () => void;
1377
1387
  rowHeight: RowSize;
1378
1388
  rowSelectionRef?: React__default.MutableRefObject<RowSelectionRef>;
@@ -1453,7 +1463,7 @@ interface BulkActionProps {
1453
1463
  style?: React__default.CSSProperties;
1454
1464
  }
1455
1465
 
1456
- declare const _default$1: (({ analytics, children, columnDefinitions: _columnDefinitions, customBulkEditorFields, enableDynamicRowHeight, enableGroupEditAndValidation, filterGroups, getRowId, initialTableConfig: _initialTableConfig, onBulkEditUpdate, onTableConfigChange, translations, enableCellTextSelection, localStoragePersistenceKey, enableCDN, }: React__default.PropsWithChildren<ClientSideDataTableProps>) => React__default.JSX.Element) & {
1466
+ declare const _default$1: (({ analytics, children, columnDefinitions: _columnDefinitions, customBulkEditorFields, enableDynamicRowHeight, enableGroupEditAndValidation, filterGroups, getRowId, initialTableConfig: _initialTableConfig, onBulkEditUpdate, onExpandOrCollapseAll, onTableConfigChange, translations, enableCellTextSelection, localStoragePersistenceKey, enableCDN, }: React__default.PropsWithChildren<ClientSideDataTableProps>) => React__default.JSX.Element) & {
1457
1467
  BulkActions: React__default.FunctionComponent<React__default.PropsWithChildren<BulkActionProps>>;
1458
1468
  BulkEditActionButton: React__default.FunctionComponent<ActionButtonProps>;
1459
1469
  ConfigPanelButton: React__default.FC<{}>;
@@ -1490,7 +1500,7 @@ declare const MultiSelectQuickFilterRenderer: (props: FilterProps<any[]>) => Rea
1490
1500
 
1491
1501
  declare const SingleSelectQuickFilterRenderer: (props: FilterProps<any[]>) => React__default.JSX.Element;
1492
1502
 
1493
- declare const _default: (({ analytics, children, columnDefinitions: _columnDefinitions, customBulkEditorFields, enableDynamicRowHeight, enableGroupEditAndValidation, filterGroups, getRowId, initialTableConfig: _initialTableConfig, onBulkEditUpdate, onServerSideDataRequest, onTableConfigChange, enableCellTextSelection, showExpandCollapseAllToggle, translations, localStoragePersistenceKey, enableCDN, }: React__default.PropsWithChildren<DataTableProps>) => React__default.JSX.Element) & {
1503
+ declare const _default: (({ analytics, children, columnDefinitions: _columnDefinitions, customBulkEditorFields, enableDynamicRowHeight, enableGroupEditAndValidation, filterGroups, getRowId, initialTableConfig: _initialTableConfig, onBulkEditUpdate, onExpandOrCollapseAll, onServerSideDataRequest, onTableConfigChange, enableCellTextSelection, showExpandCollapseAllToggle, translations, localStoragePersistenceKey, enableCDN, }: React__default.PropsWithChildren<DataTableProps>) => React__default.JSX.Element) & {
1494
1504
  BulkActions: React__default.FunctionComponent<React__default.PropsWithChildren<BulkActionProps>>;
1495
1505
  BulkEditActionButton: React__default.FunctionComponent<ActionButtonProps>;
1496
1506
  ConfigPanelButton: React__default.FC<{}>;