@procore/data-table 14.37.0 → 14.38.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,15 @@
1
1
  # Change Log
2
2
 
3
+ ## 14.38.0
4
+
5
+ ### Minor Changes
6
+
7
+ - 7576619: Allowing parent row to be editable when using grouping with `DataTable.Table enableGroupHeaderEdit`
8
+
9
+ ### Patch Changes
10
+
11
+ - 5be31e3: AutoGroupCell fix - adds flex-shrink: 0 to account for default svg behavior
12
+
3
13
  ## 14.37.0
4
14
 
5
15
  ### 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
@@ -76375,12 +76391,12 @@ var MenuItemMapper = class MenuItemMapper2 extends BeanStub {
76375
76391
  if (ModuleRegistry.__assertRegistered(ModuleNames.ClipboardModule, "Cut from Menu", this.context.getGridId())) {
76376
76392
  const focusedCell = this.focusService.getFocusedCell();
76377
76393
  const rowNode = focusedCell ? this.rowPositionUtils.getRowNode(focusedCell) : null;
76378
- const isEditable2 = rowNode ? focusedCell === null || focusedCell === void 0 ? void 0 : focusedCell.column.isCellEditable(rowNode) : false;
76394
+ const isEditable = rowNode ? focusedCell === null || focusedCell === void 0 ? void 0 : focusedCell.column.isCellEditable(rowNode) : false;
76379
76395
  return {
76380
76396
  name: localeTextFunc("cut", "Cut"),
76381
76397
  shortcut: localeTextFunc("ctrlX", "Ctrl+X"),
76382
76398
  icon: _.createIconNoSpan("clipboardCut", this.gridOptionsService, null),
76383
- disabled: !isEditable2 || this.gridOptionsService.is("suppressCutToClipboard"),
76399
+ disabled: !isEditable || this.gridOptionsService.is("suppressCutToClipboard"),
76384
76400
  action: () => this.clipboardService.cutToClipboard(void 0, "contextMenu")
76385
76401
  };
76386
76402
  } else {
@@ -109308,6 +109324,20 @@ function getServerSideDatasource(onServerSideDataRequestCallbackRef, onEmptyResp
109308
109324
  };
109309
109325
  }
109310
109326
  var minimumColumnWidth = 140;
109327
+ function useComputeAgGridProps(props) {
109328
+ const internalTableContext = useInternalTableContext();
109329
+ const onSSDR = internalTableContext.onServerSideDataRequest;
109330
+ return {
109331
+ groupIncludeFooter: !onSSDR && props.groupIncludeFooter === void 0 ? true : props.groupIncludeFooter,
109332
+ rowDragManaged: onSSDR ? false : props.rowDragManaged ?? true,
109333
+ rowModelType: onSSDR ? "serverSide" : void 0,
109334
+ groupSelectsChildren: (
109335
+ // Always true for client side, defaults to true for server side
109336
+ internalTableContext.totalRowCount > 0 && props.groupSelectsChildren !== false || !onSSDR
109337
+ ),
109338
+ groupDefaultExpanded: props.groupsAlwaysExpanded ? -1 : props.groupDefaultExpanded
109339
+ };
109340
+ }
109311
109341
  var Table = (props) => {
109312
109342
  var _a, _b, _c;
109313
109343
  const { suppressColumnVirtualisation = true, rowActionsConfig = {} } = props;
@@ -109358,16 +109388,30 @@ var Table = (props) => {
109358
109388
  React80__default.default.useImperativeHandle(internalTableContext.tableRef, () => tableApi, [
109359
109389
  tableApi
109360
109390
  ]);
109391
+ const {
109392
+ groupIncludeFooter,
109393
+ rowDragManaged,
109394
+ rowModelType,
109395
+ groupSelectsChildren,
109396
+ groupDefaultExpanded
109397
+ } = useComputeAgGridProps(props);
109398
+ const { overrideEditable } = createColumnEditableUtils({
109399
+ enableGroupHeaderEdit: props.enableGroupHeaderEdit
109400
+ });
109361
109401
  const decoratedColDefs = React80__default.default.useMemo(
109362
109402
  () => {
109363
109403
  var _a2;
109364
- return (_a2 = internalTableContext.columnDefinitions) == null ? void 0 : _a2.map(
109365
- (colDef) => transformToColDef(
109404
+ return (_a2 = internalTableContext.columnDefinitions) == null ? void 0 : _a2.map((colDef) => {
109405
+ const newColDef = transformToColDef(
109366
109406
  colDef,
109367
109407
  internalTableContext.enableGroupEditAndValidation,
109368
109408
  internalTableContext.enableDynamicRowHeight
109369
- )
109370
- );
109409
+ );
109410
+ return {
109411
+ ...newColDef,
109412
+ editable: overrideEditable(colDef.editable)
109413
+ };
109414
+ });
109371
109415
  },
109372
109416
  [internalTableContext.columnDefinitions]
109373
109417
  );
@@ -110139,13 +110183,10 @@ var Table = (props) => {
110139
110183
  getRowId: internalTableContext.getRowId,
110140
110184
  getRowStyle,
110141
110185
  groupAllowUnbalanced: true,
110142
- groupDefaultExpanded: props.groupsAlwaysExpanded ? -1 : props.groupDefaultExpanded,
110143
- groupIncludeFooter: !onSSDR && props.groupIncludeFooter === void 0 ? true : props.groupIncludeFooter,
110186
+ groupDefaultExpanded,
110187
+ groupIncludeFooter,
110144
110188
  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
- ),
110189
+ groupSelectsChildren,
110149
110190
  groupSelectsFiltered: true,
110150
110191
  headerHeight: props.headerHeight,
110151
110192
  icons: tableIcons,
@@ -110203,8 +110244,8 @@ var Table = (props) => {
110203
110244
  pinnedBottomRowData: props.pinnedBottomRowData,
110204
110245
  rowBuffer: props.rowBuffer,
110205
110246
  rowClassRules,
110206
- rowDragManaged: onSSDR ? false : props.rowDragManaged ?? true,
110207
- rowModelType: onSSDR ? "serverSide" : void 0,
110247
+ rowDragManaged,
110248
+ rowModelType,
110208
110249
  rowSelection: "multiple",
110209
110250
  ...serverSideInfiniteScroll,
110210
110251
  suppressClickEdit: true,
@@ -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;
@@ -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;
@@ -54647,6 +54647,33 @@ function SingleSelectFilterRenderer({
54647
54647
  );
54648
54648
  }
54649
54649
 
54650
+ // src/utils/columnEditableHelpers.ts
54651
+ function createColumnEditableUtils(options) {
54652
+ return {
54653
+ overrideEditable: (columnEditable) => {
54654
+ return (params) => {
54655
+ var _a;
54656
+ const isGroupNodeExpanded = params.node.group && params.node.expanded;
54657
+ if (((_a = params.node) == null ? void 0 : _a.rowPinned) || !options.enableGroupHeaderEdit && isGroupNodeExpanded && !params.node.footer) {
54658
+ return false;
54659
+ }
54660
+ if (typeof columnEditable === "boolean") {
54661
+ return columnEditable;
54662
+ }
54663
+ return (columnEditable == null ? void 0 : columnEditable(params)) ?? false;
54664
+ };
54665
+ }
54666
+ };
54667
+ }
54668
+ function isColumnEditable(columnEditable) {
54669
+ return (params) => {
54670
+ if (typeof columnEditable === "boolean") {
54671
+ return columnEditable;
54672
+ }
54673
+ return (columnEditable == null ? void 0 : columnEditable(params)) ?? false;
54674
+ };
54675
+ }
54676
+
54650
54677
  // src/utils/transformers.ts
54651
54678
  var emptyObject = {};
54652
54679
  var DEFAULT_AUTO_GROUP_COLUMN_DEFINITION = {
@@ -54730,24 +54757,12 @@ function transformToColumnDefinition(colDef = emptyObject) {
54730
54757
  valueSetter: colDef.valueSetter
54731
54758
  };
54732
54759
  }
54733
- function isEditable(columnEditable) {
54734
- return (params) => {
54735
- var _a;
54736
- if (((_a = params.node) == null ? void 0 : _a.rowPinned) || params.node.group && params.node.expanded && !params.node.footer) {
54737
- return false;
54738
- }
54739
- if (typeof columnEditable === "boolean") {
54740
- return columnEditable;
54741
- }
54742
- return (columnEditable == null ? void 0 : columnEditable(params)) ?? false;
54743
- };
54744
- }
54745
54760
  function shouldHaveEditStyles(params) {
54746
54761
  var _a;
54747
54762
  if (!((_a = params.colDef) == null ? void 0 : _a.cellEditor)) {
54748
54763
  return false;
54749
54764
  }
54750
- return isEditable(params.colDef.editable);
54765
+ return isColumnEditable(params.colDef.editable);
54751
54766
  }
54752
54767
  var toExcelCellClass = (className) => `excel-export--${className}`;
54753
54768
  function transformToExcelStyles(excelDataFormats) {
@@ -54872,11 +54887,11 @@ function transformColumnDefinitionToColDef(dataTableColumnDefinition, enableGrou
54872
54887
  parentData: context == null ? void 0 : context.parentData,
54873
54888
  parentId: context == null ? void 0 : context.parentId
54874
54889
  }) : aggFunc,
54875
- bulkEditable: isEditable(bulkEditable),
54890
+ bulkEditable: isColumnEditable(bulkEditable),
54876
54891
  cellClass: cellExcelDataType ? toExcelCellClass(cellExcelDataType) : void 0,
54877
54892
  cellClassRules,
54878
54893
  comparator,
54879
- editable: isEditable(_editable),
54894
+ editable: isColumnEditable(_editable),
54880
54895
  filter: getFilter(dataTableColumnDefinition),
54881
54896
  // set filter by default
54882
54897
  filterParams: {
@@ -55201,12 +55216,12 @@ function getDecoratedAutoGroupColDef(columnDefinition, enableGroupEditAndValidat
55201
55216
  }
55202
55217
 
55203
55218
  // src/CellRenderers/AutoGroupCell.scss
55204
- var css5 = `._autoGroupCell_pq41h_1 {
55219
+ var css5 = `._autoGroupCell_1qx8z_1 {
55205
55220
  height: 100%;
55206
55221
  width: 100%;
55207
55222
  }
55208
55223
 
55209
- ._indent_pq41h_6 {
55224
+ ._indent_1qx8z_6 {
55210
55225
  border-right: 1px solid #d6dadc;
55211
55226
  background: #f4f5f6;
55212
55227
  position: absolute;
@@ -55214,44 +55229,45 @@ var css5 = `._autoGroupCell_pq41h_1 {
55214
55229
  bottom: -1px;
55215
55230
  width: 12px;
55216
55231
  }
55217
- ._indent_pq41h_6._innermostLastIndent_pq41h_14 {
55232
+ ._indent_1qx8z_6._innermostLastIndent_1qx8z_14 {
55218
55233
  bottom: 0px;
55219
55234
  }
55220
55235
 
55221
- ._expandableCaret_pq41h_18 {
55236
+ ._expandableCaret_1qx8z_18 {
55222
55237
  margin-left: -8px;
55223
55238
  margin-right: 4px;
55224
55239
  width: 24px;
55240
+ flex-shrink: 0;
55225
55241
  }
55226
55242
 
55227
- ._expandCaret_pq41h_24 {
55243
+ ._expandCaret_1qx8z_25 {
55228
55244
  color: #2066df;
55229
55245
  cursor: pointer;
55230
55246
  }
55231
55247
 
55232
- ._collapseCaret_pq41h_29 {
55248
+ ._collapseCaret_1qx8z_30 {
55233
55249
  color: #75838a;
55234
55250
  cursor: pointer;
55235
55251
  }
55236
55252
 
55237
- ._value_pq41h_34 {
55253
+ ._value_1qx8z_35 {
55238
55254
  overflow: hidden;
55239
55255
  text-overflow: ellipsis;
55240
55256
  font-size: 12px;
55241
55257
  }
55242
- ._value_pq41h_34._footer_pq41h_39 {
55258
+ ._value_1qx8z_35._footer_1qx8z_40 {
55243
55259
  color: #6a767c;
55244
55260
  }`;
55245
55261
  document.head.appendChild(document.createElement("style")).appendChild(document.createTextNode(css5));
55246
55262
  var AutoGroupCell_default = {
55247
- "autoGroupCell": "_autoGroupCell_pq41h_1",
55248
- "indent": "_indent_pq41h_6",
55249
- "innermostLastIndent": "_innermostLastIndent_pq41h_14",
55250
- "expandableCaret": "_expandableCaret_pq41h_18",
55251
- "expandCaret": "_expandCaret_pq41h_24",
55252
- "collapseCaret": "_collapseCaret_pq41h_29",
55253
- "value": "_value_pq41h_34",
55254
- "footer": "_footer_pq41h_39"
55263
+ "autoGroupCell": "_autoGroupCell_1qx8z_1",
55264
+ "indent": "_indent_1qx8z_6",
55265
+ "innermostLastIndent": "_innermostLastIndent_1qx8z_14",
55266
+ "expandableCaret": "_expandableCaret_1qx8z_18",
55267
+ "expandCaret": "_expandCaret_1qx8z_25",
55268
+ "collapseCaret": "_collapseCaret_1qx8z_30",
55269
+ "value": "_value_1qx8z_35",
55270
+ "footer": "_footer_1qx8z_40"
55255
55271
  };
55256
55272
 
55257
55273
  // src/utils/rowSelectionHelpers.ts
@@ -76362,12 +76378,12 @@ var MenuItemMapper = class MenuItemMapper2 extends BeanStub {
76362
76378
  if (ModuleRegistry.__assertRegistered(ModuleNames.ClipboardModule, "Cut from Menu", this.context.getGridId())) {
76363
76379
  const focusedCell = this.focusService.getFocusedCell();
76364
76380
  const rowNode = focusedCell ? this.rowPositionUtils.getRowNode(focusedCell) : null;
76365
- const isEditable2 = rowNode ? focusedCell === null || focusedCell === void 0 ? void 0 : focusedCell.column.isCellEditable(rowNode) : false;
76381
+ const isEditable = rowNode ? focusedCell === null || focusedCell === void 0 ? void 0 : focusedCell.column.isCellEditable(rowNode) : false;
76366
76382
  return {
76367
76383
  name: localeTextFunc("cut", "Cut"),
76368
76384
  shortcut: localeTextFunc("ctrlX", "Ctrl+X"),
76369
76385
  icon: _.createIconNoSpan("clipboardCut", this.gridOptionsService, null),
76370
- disabled: !isEditable2 || this.gridOptionsService.is("suppressCutToClipboard"),
76386
+ disabled: !isEditable || this.gridOptionsService.is("suppressCutToClipboard"),
76371
76387
  action: () => this.clipboardService.cutToClipboard(void 0, "contextMenu")
76372
76388
  };
76373
76389
  } else {
@@ -109295,6 +109311,20 @@ function getServerSideDatasource(onServerSideDataRequestCallbackRef, onEmptyResp
109295
109311
  };
109296
109312
  }
109297
109313
  var minimumColumnWidth = 140;
109314
+ function useComputeAgGridProps(props) {
109315
+ const internalTableContext = useInternalTableContext();
109316
+ const onSSDR = internalTableContext.onServerSideDataRequest;
109317
+ return {
109318
+ groupIncludeFooter: !onSSDR && props.groupIncludeFooter === void 0 ? true : props.groupIncludeFooter,
109319
+ rowDragManaged: onSSDR ? false : props.rowDragManaged ?? true,
109320
+ rowModelType: onSSDR ? "serverSide" : void 0,
109321
+ groupSelectsChildren: (
109322
+ // Always true for client side, defaults to true for server side
109323
+ internalTableContext.totalRowCount > 0 && props.groupSelectsChildren !== false || !onSSDR
109324
+ ),
109325
+ groupDefaultExpanded: props.groupsAlwaysExpanded ? -1 : props.groupDefaultExpanded
109326
+ };
109327
+ }
109298
109328
  var Table = (props) => {
109299
109329
  var _a, _b, _c;
109300
109330
  const { suppressColumnVirtualisation = true, rowActionsConfig = {} } = props;
@@ -109345,16 +109375,30 @@ var Table = (props) => {
109345
109375
  React80.useImperativeHandle(internalTableContext.tableRef, () => tableApi, [
109346
109376
  tableApi
109347
109377
  ]);
109378
+ const {
109379
+ groupIncludeFooter,
109380
+ rowDragManaged,
109381
+ rowModelType,
109382
+ groupSelectsChildren,
109383
+ groupDefaultExpanded
109384
+ } = useComputeAgGridProps(props);
109385
+ const { overrideEditable } = createColumnEditableUtils({
109386
+ enableGroupHeaderEdit: props.enableGroupHeaderEdit
109387
+ });
109348
109388
  const decoratedColDefs = React80.useMemo(
109349
109389
  () => {
109350
109390
  var _a2;
109351
- return (_a2 = internalTableContext.columnDefinitions) == null ? void 0 : _a2.map(
109352
- (colDef) => transformToColDef(
109391
+ return (_a2 = internalTableContext.columnDefinitions) == null ? void 0 : _a2.map((colDef) => {
109392
+ const newColDef = transformToColDef(
109353
109393
  colDef,
109354
109394
  internalTableContext.enableGroupEditAndValidation,
109355
109395
  internalTableContext.enableDynamicRowHeight
109356
- )
109357
- );
109396
+ );
109397
+ return {
109398
+ ...newColDef,
109399
+ editable: overrideEditable(colDef.editable)
109400
+ };
109401
+ });
109358
109402
  },
109359
109403
  [internalTableContext.columnDefinitions]
109360
109404
  );
@@ -110126,13 +110170,10 @@ var Table = (props) => {
110126
110170
  getRowId: internalTableContext.getRowId,
110127
110171
  getRowStyle,
110128
110172
  groupAllowUnbalanced: true,
110129
- groupDefaultExpanded: props.groupsAlwaysExpanded ? -1 : props.groupDefaultExpanded,
110130
- groupIncludeFooter: !onSSDR && props.groupIncludeFooter === void 0 ? true : props.groupIncludeFooter,
110173
+ groupDefaultExpanded,
110174
+ groupIncludeFooter,
110131
110175
  getGroupRowAgg: props.getGroupRowAgg ? getGroupRowAgg : void 0,
110132
- groupSelectsChildren: (
110133
- // Always true for client side, defaults to true for server side
110134
- internalTableContext.totalRowCount > 0 && props.groupSelectsChildren !== false || !onSSDR
110135
- ),
110176
+ groupSelectsChildren,
110136
110177
  groupSelectsFiltered: true,
110137
110178
  headerHeight: props.headerHeight,
110138
110179
  icons: tableIcons,
@@ -110190,8 +110231,8 @@ var Table = (props) => {
110190
110231
  pinnedBottomRowData: props.pinnedBottomRowData,
110191
110232
  rowBuffer: props.rowBuffer,
110192
110233
  rowClassRules,
110193
- rowDragManaged: onSSDR ? false : props.rowDragManaged ?? true,
110194
- rowModelType: onSSDR ? "serverSide" : void 0,
110234
+ rowDragManaged,
110235
+ rowModelType,
110195
110236
  rowSelection: "multiple",
110196
110237
  ...serverSideInfiniteScroll,
110197
110238
  suppressClickEdit: true,
@@ -54615,6 +54615,32 @@ function SingleSelectFilterRenderer({
54615
54615
  );
54616
54616
  }
54617
54617
 
54618
+ // src/utils/columnEditableHelpers.ts
54619
+ function createColumnEditableUtils(options) {
54620
+ return {
54621
+ overrideEditable: (columnEditable) => {
54622
+ return (params) => {
54623
+ const isGroupNodeExpanded = params.node.group && params.node.expanded;
54624
+ if (params.node?.rowPinned || !options.enableGroupHeaderEdit && isGroupNodeExpanded && !params.node.footer) {
54625
+ return false;
54626
+ }
54627
+ if (typeof columnEditable === "boolean") {
54628
+ return columnEditable;
54629
+ }
54630
+ return columnEditable?.(params) ?? false;
54631
+ };
54632
+ }
54633
+ };
54634
+ }
54635
+ function isColumnEditable(columnEditable) {
54636
+ return (params) => {
54637
+ if (typeof columnEditable === "boolean") {
54638
+ return columnEditable;
54639
+ }
54640
+ return columnEditable?.(params) ?? false;
54641
+ };
54642
+ }
54643
+
54618
54644
  // src/utils/transformers.ts
54619
54645
  var emptyObject = {};
54620
54646
  var DEFAULT_AUTO_GROUP_COLUMN_DEFINITION = {
@@ -54695,22 +54721,11 @@ function transformToColumnDefinition(colDef = emptyObject) {
54695
54721
  valueSetter: colDef.valueSetter
54696
54722
  };
54697
54723
  }
54698
- function isEditable(columnEditable) {
54699
- return (params) => {
54700
- if (params.node?.rowPinned || params.node.group && params.node.expanded && !params.node.footer) {
54701
- return false;
54702
- }
54703
- if (typeof columnEditable === "boolean") {
54704
- return columnEditable;
54705
- }
54706
- return columnEditable?.(params) ?? false;
54707
- };
54708
- }
54709
54724
  function shouldHaveEditStyles(params) {
54710
54725
  if (!params.colDef?.cellEditor) {
54711
54726
  return false;
54712
54727
  }
54713
- return isEditable(params.colDef.editable);
54728
+ return isColumnEditable(params.colDef.editable);
54714
54729
  }
54715
54730
  var toExcelCellClass = (className) => `excel-export--${className}`;
54716
54731
  function transformToExcelStyles(excelDataFormats) {
@@ -54833,11 +54848,11 @@ function transformColumnDefinitionToColDef(dataTableColumnDefinition, enableGrou
54833
54848
  parentData: context?.parentData,
54834
54849
  parentId: context?.parentId
54835
54850
  }) : aggFunc,
54836
- bulkEditable: isEditable(bulkEditable),
54851
+ bulkEditable: isColumnEditable(bulkEditable),
54837
54852
  cellClass: cellExcelDataType ? toExcelCellClass(cellExcelDataType) : void 0,
54838
54853
  cellClassRules,
54839
54854
  comparator,
54840
- editable: isEditable(_editable),
54855
+ editable: isColumnEditable(_editable),
54841
54856
  filter: getFilter(dataTableColumnDefinition),
54842
54857
  // set filter by default
54843
54858
  filterParams: {
@@ -55158,12 +55173,12 @@ function getDecoratedAutoGroupColDef(columnDefinition, enableGroupEditAndValidat
55158
55173
  }
55159
55174
 
55160
55175
  // src/CellRenderers/AutoGroupCell.scss
55161
- var css5 = `._autoGroupCell_pq41h_1 {
55176
+ var css5 = `._autoGroupCell_1qx8z_1 {
55162
55177
  height: 100%;
55163
55178
  width: 100%;
55164
55179
  }
55165
55180
 
55166
- ._indent_pq41h_6 {
55181
+ ._indent_1qx8z_6 {
55167
55182
  border-right: 1px solid #d6dadc;
55168
55183
  background: #f4f5f6;
55169
55184
  position: absolute;
@@ -55171,44 +55186,45 @@ var css5 = `._autoGroupCell_pq41h_1 {
55171
55186
  bottom: -1px;
55172
55187
  width: 12px;
55173
55188
  }
55174
- ._indent_pq41h_6._innermostLastIndent_pq41h_14 {
55189
+ ._indent_1qx8z_6._innermostLastIndent_1qx8z_14 {
55175
55190
  bottom: 0px;
55176
55191
  }
55177
55192
 
55178
- ._expandableCaret_pq41h_18 {
55193
+ ._expandableCaret_1qx8z_18 {
55179
55194
  margin-left: -8px;
55180
55195
  margin-right: 4px;
55181
55196
  width: 24px;
55197
+ flex-shrink: 0;
55182
55198
  }
55183
55199
 
55184
- ._expandCaret_pq41h_24 {
55200
+ ._expandCaret_1qx8z_25 {
55185
55201
  color: #2066df;
55186
55202
  cursor: pointer;
55187
55203
  }
55188
55204
 
55189
- ._collapseCaret_pq41h_29 {
55205
+ ._collapseCaret_1qx8z_30 {
55190
55206
  color: #75838a;
55191
55207
  cursor: pointer;
55192
55208
  }
55193
55209
 
55194
- ._value_pq41h_34 {
55210
+ ._value_1qx8z_35 {
55195
55211
  overflow: hidden;
55196
55212
  text-overflow: ellipsis;
55197
55213
  font-size: 12px;
55198
55214
  }
55199
- ._value_pq41h_34._footer_pq41h_39 {
55215
+ ._value_1qx8z_35._footer_1qx8z_40 {
55200
55216
  color: #6a767c;
55201
55217
  }`;
55202
55218
  document.head.appendChild(document.createElement("style")).appendChild(document.createTextNode(css5));
55203
55219
  var AutoGroupCell_default = {
55204
- "autoGroupCell": "_autoGroupCell_pq41h_1",
55205
- "indent": "_indent_pq41h_6",
55206
- "innermostLastIndent": "_innermostLastIndent_pq41h_14",
55207
- "expandableCaret": "_expandableCaret_pq41h_18",
55208
- "expandCaret": "_expandCaret_pq41h_24",
55209
- "collapseCaret": "_collapseCaret_pq41h_29",
55210
- "value": "_value_pq41h_34",
55211
- "footer": "_footer_pq41h_39"
55220
+ "autoGroupCell": "_autoGroupCell_1qx8z_1",
55221
+ "indent": "_indent_1qx8z_6",
55222
+ "innermostLastIndent": "_innermostLastIndent_1qx8z_14",
55223
+ "expandableCaret": "_expandableCaret_1qx8z_18",
55224
+ "expandCaret": "_expandCaret_1qx8z_25",
55225
+ "collapseCaret": "_collapseCaret_1qx8z_30",
55226
+ "value": "_value_1qx8z_35",
55227
+ "footer": "_footer_1qx8z_40"
55212
55228
  };
55213
55229
 
55214
55230
  // src/utils/rowSelectionHelpers.ts
@@ -76272,12 +76288,12 @@ var MenuItemMapper = class MenuItemMapper2 extends BeanStub {
76272
76288
  if (ModuleRegistry.__assertRegistered(ModuleNames.ClipboardModule, "Cut from Menu", this.context.getGridId())) {
76273
76289
  const focusedCell = this.focusService.getFocusedCell();
76274
76290
  const rowNode = focusedCell ? this.rowPositionUtils.getRowNode(focusedCell) : null;
76275
- const isEditable2 = rowNode ? focusedCell === null || focusedCell === void 0 ? void 0 : focusedCell.column.isCellEditable(rowNode) : false;
76291
+ const isEditable = rowNode ? focusedCell === null || focusedCell === void 0 ? void 0 : focusedCell.column.isCellEditable(rowNode) : false;
76276
76292
  return {
76277
76293
  name: localeTextFunc("cut", "Cut"),
76278
76294
  shortcut: localeTextFunc("ctrlX", "Ctrl+X"),
76279
76295
  icon: _.createIconNoSpan("clipboardCut", this.gridOptionsService, null),
76280
- disabled: !isEditable2 || this.gridOptionsService.is("suppressCutToClipboard"),
76296
+ disabled: !isEditable || this.gridOptionsService.is("suppressCutToClipboard"),
76281
76297
  action: () => this.clipboardService.cutToClipboard(void 0, "contextMenu")
76282
76298
  };
76283
76299
  } else {
@@ -109153,6 +109169,20 @@ function getServerSideDatasource(onServerSideDataRequestCallbackRef, onEmptyResp
109153
109169
  };
109154
109170
  }
109155
109171
  var minimumColumnWidth = 140;
109172
+ function useComputeAgGridProps(props) {
109173
+ const internalTableContext = useInternalTableContext();
109174
+ const onSSDR = internalTableContext.onServerSideDataRequest;
109175
+ return {
109176
+ groupIncludeFooter: !onSSDR && props.groupIncludeFooter === void 0 ? true : props.groupIncludeFooter,
109177
+ rowDragManaged: onSSDR ? false : props.rowDragManaged ?? true,
109178
+ rowModelType: onSSDR ? "serverSide" : void 0,
109179
+ groupSelectsChildren: (
109180
+ // Always true for client side, defaults to true for server side
109181
+ internalTableContext.totalRowCount > 0 && props.groupSelectsChildren !== false || !onSSDR
109182
+ ),
109183
+ groupDefaultExpanded: props.groupsAlwaysExpanded ? -1 : props.groupDefaultExpanded
109184
+ };
109185
+ }
109156
109186
  var Table = (props) => {
109157
109187
  const { suppressColumnVirtualisation = true, rowActionsConfig = {} } = props;
109158
109188
  const I18n = coreReact.useI18nContext();
@@ -109202,14 +109232,28 @@ var Table = (props) => {
109202
109232
  React80__default.default.useImperativeHandle(internalTableContext.tableRef, () => tableApi, [
109203
109233
  tableApi
109204
109234
  ]);
109235
+ const {
109236
+ groupIncludeFooter,
109237
+ rowDragManaged,
109238
+ rowModelType,
109239
+ groupSelectsChildren,
109240
+ groupDefaultExpanded
109241
+ } = useComputeAgGridProps(props);
109242
+ const { overrideEditable } = createColumnEditableUtils({
109243
+ enableGroupHeaderEdit: props.enableGroupHeaderEdit
109244
+ });
109205
109245
  const decoratedColDefs = React80__default.default.useMemo(
109206
- () => internalTableContext.columnDefinitions?.map(
109207
- (colDef) => transformToColDef(
109246
+ () => internalTableContext.columnDefinitions?.map((colDef) => {
109247
+ const newColDef = transformToColDef(
109208
109248
  colDef,
109209
109249
  internalTableContext.enableGroupEditAndValidation,
109210
109250
  internalTableContext.enableDynamicRowHeight
109211
- )
109212
- ),
109251
+ );
109252
+ return {
109253
+ ...newColDef,
109254
+ editable: overrideEditable(colDef.editable)
109255
+ };
109256
+ }),
109213
109257
  [internalTableContext.columnDefinitions]
109214
109258
  );
109215
109259
  const hasRowActions = React80__default.default.useMemo(
@@ -109951,13 +109995,10 @@ var Table = (props) => {
109951
109995
  getRowId: internalTableContext.getRowId,
109952
109996
  getRowStyle,
109953
109997
  groupAllowUnbalanced: true,
109954
- groupDefaultExpanded: props.groupsAlwaysExpanded ? -1 : props.groupDefaultExpanded,
109955
- groupIncludeFooter: !onSSDR && props.groupIncludeFooter === void 0 ? true : props.groupIncludeFooter,
109998
+ groupDefaultExpanded,
109999
+ groupIncludeFooter,
109956
110000
  getGroupRowAgg: props.getGroupRowAgg ? getGroupRowAgg : void 0,
109957
- groupSelectsChildren: (
109958
- // Always true for client side, defaults to true for server side
109959
- internalTableContext.totalRowCount > 0 && props.groupSelectsChildren !== false || !onSSDR
109960
- ),
110001
+ groupSelectsChildren,
109961
110002
  groupSelectsFiltered: true,
109962
110003
  headerHeight: props.headerHeight,
109963
110004
  icons: tableIcons,
@@ -110015,8 +110056,8 @@ var Table = (props) => {
110015
110056
  pinnedBottomRowData: props.pinnedBottomRowData,
110016
110057
  rowBuffer: props.rowBuffer,
110017
110058
  rowClassRules,
110018
- rowDragManaged: onSSDR ? false : props.rowDragManaged ?? true,
110019
- rowModelType: onSSDR ? "serverSide" : void 0,
110059
+ rowDragManaged,
110060
+ rowModelType,
110020
110061
  rowSelection: "multiple",
110021
110062
  ...serverSideInfiniteScroll,
110022
110063
  suppressClickEdit: true,
@@ -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;
@@ -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;
@@ -54602,6 +54602,32 @@ function SingleSelectFilterRenderer({
54602
54602
  );
54603
54603
  }
54604
54604
 
54605
+ // src/utils/columnEditableHelpers.ts
54606
+ function createColumnEditableUtils(options) {
54607
+ return {
54608
+ overrideEditable: (columnEditable) => {
54609
+ return (params) => {
54610
+ const isGroupNodeExpanded = params.node.group && params.node.expanded;
54611
+ if (params.node?.rowPinned || !options.enableGroupHeaderEdit && isGroupNodeExpanded && !params.node.footer) {
54612
+ return false;
54613
+ }
54614
+ if (typeof columnEditable === "boolean") {
54615
+ return columnEditable;
54616
+ }
54617
+ return columnEditable?.(params) ?? false;
54618
+ };
54619
+ }
54620
+ };
54621
+ }
54622
+ function isColumnEditable(columnEditable) {
54623
+ return (params) => {
54624
+ if (typeof columnEditable === "boolean") {
54625
+ return columnEditable;
54626
+ }
54627
+ return columnEditable?.(params) ?? false;
54628
+ };
54629
+ }
54630
+
54605
54631
  // src/utils/transformers.ts
54606
54632
  var emptyObject = {};
54607
54633
  var DEFAULT_AUTO_GROUP_COLUMN_DEFINITION = {
@@ -54682,22 +54708,11 @@ function transformToColumnDefinition(colDef = emptyObject) {
54682
54708
  valueSetter: colDef.valueSetter
54683
54709
  };
54684
54710
  }
54685
- function isEditable(columnEditable) {
54686
- return (params) => {
54687
- if (params.node?.rowPinned || params.node.group && params.node.expanded && !params.node.footer) {
54688
- return false;
54689
- }
54690
- if (typeof columnEditable === "boolean") {
54691
- return columnEditable;
54692
- }
54693
- return columnEditable?.(params) ?? false;
54694
- };
54695
- }
54696
54711
  function shouldHaveEditStyles(params) {
54697
54712
  if (!params.colDef?.cellEditor) {
54698
54713
  return false;
54699
54714
  }
54700
- return isEditable(params.colDef.editable);
54715
+ return isColumnEditable(params.colDef.editable);
54701
54716
  }
54702
54717
  var toExcelCellClass = (className) => `excel-export--${className}`;
54703
54718
  function transformToExcelStyles(excelDataFormats) {
@@ -54820,11 +54835,11 @@ function transformColumnDefinitionToColDef(dataTableColumnDefinition, enableGrou
54820
54835
  parentData: context?.parentData,
54821
54836
  parentId: context?.parentId
54822
54837
  }) : aggFunc,
54823
- bulkEditable: isEditable(bulkEditable),
54838
+ bulkEditable: isColumnEditable(bulkEditable),
54824
54839
  cellClass: cellExcelDataType ? toExcelCellClass(cellExcelDataType) : void 0,
54825
54840
  cellClassRules,
54826
54841
  comparator,
54827
- editable: isEditable(_editable),
54842
+ editable: isColumnEditable(_editable),
54828
54843
  filter: getFilter(dataTableColumnDefinition),
54829
54844
  // set filter by default
54830
54845
  filterParams: {
@@ -55145,12 +55160,12 @@ function getDecoratedAutoGroupColDef(columnDefinition, enableGroupEditAndValidat
55145
55160
  }
55146
55161
 
55147
55162
  // src/CellRenderers/AutoGroupCell.scss
55148
- var css5 = `._autoGroupCell_pq41h_1 {
55163
+ var css5 = `._autoGroupCell_1qx8z_1 {
55149
55164
  height: 100%;
55150
55165
  width: 100%;
55151
55166
  }
55152
55167
 
55153
- ._indent_pq41h_6 {
55168
+ ._indent_1qx8z_6 {
55154
55169
  border-right: 1px solid #d6dadc;
55155
55170
  background: #f4f5f6;
55156
55171
  position: absolute;
@@ -55158,44 +55173,45 @@ var css5 = `._autoGroupCell_pq41h_1 {
55158
55173
  bottom: -1px;
55159
55174
  width: 12px;
55160
55175
  }
55161
- ._indent_pq41h_6._innermostLastIndent_pq41h_14 {
55176
+ ._indent_1qx8z_6._innermostLastIndent_1qx8z_14 {
55162
55177
  bottom: 0px;
55163
55178
  }
55164
55179
 
55165
- ._expandableCaret_pq41h_18 {
55180
+ ._expandableCaret_1qx8z_18 {
55166
55181
  margin-left: -8px;
55167
55182
  margin-right: 4px;
55168
55183
  width: 24px;
55184
+ flex-shrink: 0;
55169
55185
  }
55170
55186
 
55171
- ._expandCaret_pq41h_24 {
55187
+ ._expandCaret_1qx8z_25 {
55172
55188
  color: #2066df;
55173
55189
  cursor: pointer;
55174
55190
  }
55175
55191
 
55176
- ._collapseCaret_pq41h_29 {
55192
+ ._collapseCaret_1qx8z_30 {
55177
55193
  color: #75838a;
55178
55194
  cursor: pointer;
55179
55195
  }
55180
55196
 
55181
- ._value_pq41h_34 {
55197
+ ._value_1qx8z_35 {
55182
55198
  overflow: hidden;
55183
55199
  text-overflow: ellipsis;
55184
55200
  font-size: 12px;
55185
55201
  }
55186
- ._value_pq41h_34._footer_pq41h_39 {
55202
+ ._value_1qx8z_35._footer_1qx8z_40 {
55187
55203
  color: #6a767c;
55188
55204
  }`;
55189
55205
  document.head.appendChild(document.createElement("style")).appendChild(document.createTextNode(css5));
55190
55206
  var AutoGroupCell_default = {
55191
- "autoGroupCell": "_autoGroupCell_pq41h_1",
55192
- "indent": "_indent_pq41h_6",
55193
- "innermostLastIndent": "_innermostLastIndent_pq41h_14",
55194
- "expandableCaret": "_expandableCaret_pq41h_18",
55195
- "expandCaret": "_expandCaret_pq41h_24",
55196
- "collapseCaret": "_collapseCaret_pq41h_29",
55197
- "value": "_value_pq41h_34",
55198
- "footer": "_footer_pq41h_39"
55207
+ "autoGroupCell": "_autoGroupCell_1qx8z_1",
55208
+ "indent": "_indent_1qx8z_6",
55209
+ "innermostLastIndent": "_innermostLastIndent_1qx8z_14",
55210
+ "expandableCaret": "_expandableCaret_1qx8z_18",
55211
+ "expandCaret": "_expandCaret_1qx8z_25",
55212
+ "collapseCaret": "_collapseCaret_1qx8z_30",
55213
+ "value": "_value_1qx8z_35",
55214
+ "footer": "_footer_1qx8z_40"
55199
55215
  };
55200
55216
 
55201
55217
  // src/utils/rowSelectionHelpers.ts
@@ -76259,12 +76275,12 @@ var MenuItemMapper = class MenuItemMapper2 extends BeanStub {
76259
76275
  if (ModuleRegistry.__assertRegistered(ModuleNames.ClipboardModule, "Cut from Menu", this.context.getGridId())) {
76260
76276
  const focusedCell = this.focusService.getFocusedCell();
76261
76277
  const rowNode = focusedCell ? this.rowPositionUtils.getRowNode(focusedCell) : null;
76262
- const isEditable2 = rowNode ? focusedCell === null || focusedCell === void 0 ? void 0 : focusedCell.column.isCellEditable(rowNode) : false;
76278
+ const isEditable = rowNode ? focusedCell === null || focusedCell === void 0 ? void 0 : focusedCell.column.isCellEditable(rowNode) : false;
76263
76279
  return {
76264
76280
  name: localeTextFunc("cut", "Cut"),
76265
76281
  shortcut: localeTextFunc("ctrlX", "Ctrl+X"),
76266
76282
  icon: _.createIconNoSpan("clipboardCut", this.gridOptionsService, null),
76267
- disabled: !isEditable2 || this.gridOptionsService.is("suppressCutToClipboard"),
76283
+ disabled: !isEditable || this.gridOptionsService.is("suppressCutToClipboard"),
76268
76284
  action: () => this.clipboardService.cutToClipboard(void 0, "contextMenu")
76269
76285
  };
76270
76286
  } else {
@@ -109140,6 +109156,20 @@ function getServerSideDatasource(onServerSideDataRequestCallbackRef, onEmptyResp
109140
109156
  };
109141
109157
  }
109142
109158
  var minimumColumnWidth = 140;
109159
+ function useComputeAgGridProps(props) {
109160
+ const internalTableContext = useInternalTableContext();
109161
+ const onSSDR = internalTableContext.onServerSideDataRequest;
109162
+ return {
109163
+ groupIncludeFooter: !onSSDR && props.groupIncludeFooter === void 0 ? true : props.groupIncludeFooter,
109164
+ rowDragManaged: onSSDR ? false : props.rowDragManaged ?? true,
109165
+ rowModelType: onSSDR ? "serverSide" : void 0,
109166
+ groupSelectsChildren: (
109167
+ // Always true for client side, defaults to true for server side
109168
+ internalTableContext.totalRowCount > 0 && props.groupSelectsChildren !== false || !onSSDR
109169
+ ),
109170
+ groupDefaultExpanded: props.groupsAlwaysExpanded ? -1 : props.groupDefaultExpanded
109171
+ };
109172
+ }
109143
109173
  var Table = (props) => {
109144
109174
  const { suppressColumnVirtualisation = true, rowActionsConfig = {} } = props;
109145
109175
  const I18n = useI18nContext();
@@ -109189,14 +109219,28 @@ var Table = (props) => {
109189
109219
  React80.useImperativeHandle(internalTableContext.tableRef, () => tableApi, [
109190
109220
  tableApi
109191
109221
  ]);
109222
+ const {
109223
+ groupIncludeFooter,
109224
+ rowDragManaged,
109225
+ rowModelType,
109226
+ groupSelectsChildren,
109227
+ groupDefaultExpanded
109228
+ } = useComputeAgGridProps(props);
109229
+ const { overrideEditable } = createColumnEditableUtils({
109230
+ enableGroupHeaderEdit: props.enableGroupHeaderEdit
109231
+ });
109192
109232
  const decoratedColDefs = React80.useMemo(
109193
- () => internalTableContext.columnDefinitions?.map(
109194
- (colDef) => transformToColDef(
109233
+ () => internalTableContext.columnDefinitions?.map((colDef) => {
109234
+ const newColDef = transformToColDef(
109195
109235
  colDef,
109196
109236
  internalTableContext.enableGroupEditAndValidation,
109197
109237
  internalTableContext.enableDynamicRowHeight
109198
- )
109199
- ),
109238
+ );
109239
+ return {
109240
+ ...newColDef,
109241
+ editable: overrideEditable(colDef.editable)
109242
+ };
109243
+ }),
109200
109244
  [internalTableContext.columnDefinitions]
109201
109245
  );
109202
109246
  const hasRowActions = React80.useMemo(
@@ -109938,13 +109982,10 @@ var Table = (props) => {
109938
109982
  getRowId: internalTableContext.getRowId,
109939
109983
  getRowStyle,
109940
109984
  groupAllowUnbalanced: true,
109941
- groupDefaultExpanded: props.groupsAlwaysExpanded ? -1 : props.groupDefaultExpanded,
109942
- groupIncludeFooter: !onSSDR && props.groupIncludeFooter === void 0 ? true : props.groupIncludeFooter,
109985
+ groupDefaultExpanded,
109986
+ groupIncludeFooter,
109943
109987
  getGroupRowAgg: props.getGroupRowAgg ? getGroupRowAgg : void 0,
109944
- groupSelectsChildren: (
109945
- // Always true for client side, defaults to true for server side
109946
- internalTableContext.totalRowCount > 0 && props.groupSelectsChildren !== false || !onSSDR
109947
- ),
109988
+ groupSelectsChildren,
109948
109989
  groupSelectsFiltered: true,
109949
109990
  headerHeight: props.headerHeight,
109950
109991
  icons: tableIcons,
@@ -110002,8 +110043,8 @@ var Table = (props) => {
110002
110043
  pinnedBottomRowData: props.pinnedBottomRowData,
110003
110044
  rowBuffer: props.rowBuffer,
110004
110045
  rowClassRules,
110005
- rowDragManaged: onSSDR ? false : props.rowDragManaged ?? true,
110006
- rowModelType: onSSDR ? "serverSide" : void 0,
110046
+ rowDragManaged,
110047
+ rowModelType,
110007
110048
  rowSelection: "multiple",
110008
110049
  ...serverSideInfiniteScroll,
110009
110050
  suppressClickEdit: true,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@procore/data-table",
3
- "version": "14.37.0",
3
+ "version": "14.38.0",
4
4
  "description": "Complex data grid built on top of ag-grid, with DST components and styles.",
5
5
  "author": "Procore Technologies",
6
6
  "homepage": "https://github.com/procore/core/tree/main/packages/data-table",
@@ -59,8 +59,7 @@
59
59
  "pseudo": "pseudolocalize run ./src/locales",
60
60
  "storybook": "storybook dev -p 6006",
61
61
  "storybook-static:server": "http-server ./storybook-static -p 6006 -c-1 --silent",
62
- "test": "jest --runInBand --silent --logHeapUsage",
63
- "test:coverage": "yarn test -- --collectCoverage",
62
+ "test": "jest --runInBand --silent --logHeapUsage --collectCoverage",
64
63
  "test:watch": "yarn run test --watch"
65
64
  },
66
65
  "peerDependencies": {
@@ -107,9 +106,9 @@
107
106
  "@dotenvx/dotenvx": "1.6.4",
108
107
  "@ngneat/falso": "6.4.0",
109
108
  "@procore/core-css": "10.17.0",
110
- "@procore/core-icons": "^12.10.1",
109
+ "@procore/core-icons": "^12.11.0",
111
110
  "@procore/core-prettier": "10.2.0",
112
- "@procore/core-react": "^12.31.0",
111
+ "@procore/core-react": "^12.32.0",
113
112
  "@procore/eslint-config": "10.0.0",
114
113
  "@procore/globalization-toolkit": "3.1.0",
115
114
  "@procore/labs-financials-utils": "4.3.1",