@procore/data-table 14.46.1 → 14.46.3

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.
@@ -1400,7 +1400,7 @@ ag-grid, ag-grid-angular, ag-grid-ng2, ag-grid-polymer, ag-grid-aurelia {
1400
1400
  animation-iteration-count: infinite;
1401
1401
  animation-name: ag-shake-left-to-right;
1402
1402
  }
1403
- @keyframes _ag-shake-left-to-right_1ern5_342 {
1403
+ @keyframes _ag-shake-left-to-right_pphrk_342 {
1404
1404
  from {
1405
1405
  padding-left: 6px;
1406
1406
  padding-right: 2px;
@@ -5401,7 +5401,7 @@ input[class^=ag-][type=button]:focus, button[class^=ag-]:focus {
5401
5401
  animation-iteration-count: infinite;
5402
5402
  animation-timing-function: linear;
5403
5403
  }
5404
- @keyframes _spin_1ern5_1 {
5404
+ @keyframes _spin_pphrk_1 {
5405
5405
  from {
5406
5406
  transform: rotate(0deg);
5407
5407
  }
@@ -7933,7 +7933,7 @@ input[class^=ag-][type=range]:disabled {
7933
7933
  padding-left: 16px;
7934
7934
  }
7935
7935
 
7936
- div._contextPanel_1ern5_7159 {
7936
+ div._contextPanel_pphrk_7159 {
7937
7937
  width: 400px;
7938
7938
  transition: all ease 500ms;
7939
7939
  flex: 0 0 auto;
@@ -7942,7 +7942,12 @@ div._contextPanel_1ern5_7159 {
7942
7942
  border: 1px solid #d6dadc;
7943
7943
  display: flex;
7944
7944
  }
7945
- div._contextPanel--hidden_1ern5_7168 {
7945
+ div._contextPanel_pphrk_7159:focus {
7946
+ border-color: #2066df;
7947
+ box-shadow: inset 0 0 1px 0 #2066df;
7948
+ outline: none;
7949
+ }
7950
+ div._contextPanel--hidden_pphrk_7173 {
7946
7951
  border: none;
7947
7952
  overflow: hidden;
7948
7953
  padding: 0px;
@@ -7950,50 +7955,50 @@ div._contextPanel--hidden_1ern5_7168 {
7950
7955
  width: 0px;
7951
7956
  }
7952
7957
 
7953
- ._contextPanelWrapper_1ern5_7176 {
7958
+ ._contextPanelWrapper_pphrk_7181 {
7954
7959
  position: relative;
7955
7960
  flex-grow: 1;
7956
7961
  }
7957
7962
 
7958
- ._contextPanelBody_1ern5_7181 {
7963
+ ._contextPanelBody_pphrk_7186 {
7959
7964
  width: clamp(380px, 400px, 100%);
7960
7965
  }
7961
7966
 
7962
- ._contextPanel-stickyHeader_1ern5_7185 {
7967
+ ._contextPanel-stickyHeader_pphrk_7190 {
7963
7968
  background-color: #ffffff;
7964
7969
  position: sticky;
7965
7970
  top: 0;
7966
7971
  z-index: 5;
7967
7972
  }
7968
7973
 
7969
- ._filters-list_1ern5_7192 {
7974
+ ._filters-list_pphrk_7197 {
7970
7975
  padding: 0;
7971
7976
  margin: 0;
7972
7977
  }
7973
- ._filters-list_1ern5_7192 ol {
7978
+ ._filters-list_pphrk_7197 ol {
7974
7979
  padding: 0;
7975
7980
  margin: 0;
7976
7981
  }
7977
7982
 
7978
- ._col-drag-column-icon_1ern5_7201 {
7983
+ ._col-drag-column-icon_pphrk_7206 {
7979
7984
  color: #6a767c;
7980
7985
  }
7981
7986
 
7982
- ._tabular-nums_1ern5_7205 {
7987
+ ._tabular-nums_pphrk_7210 {
7983
7988
  font-variant-numeric: tabular-nums;
7984
7989
  }`;
7985
7990
  document.head.appendChild(document.createElement("style")).appendChild(document.createTextNode(css));
7986
7991
  var styles_default = {
7987
- "contextPanel": "_contextPanel_1ern5_7159",
7988
- "contextPanel--hidden": "_contextPanel--hidden_1ern5_7168",
7989
- "contextPanelWrapper": "_contextPanelWrapper_1ern5_7176",
7990
- "contextPanelBody": "_contextPanelBody_1ern5_7181",
7991
- "contextPanel-stickyHeader": "_contextPanel-stickyHeader_1ern5_7185",
7992
- "filters-list": "_filters-list_1ern5_7192",
7993
- "col-drag-column-icon": "_col-drag-column-icon_1ern5_7201",
7994
- "tabular-nums": "_tabular-nums_1ern5_7205",
7995
- "ag-shake-left-to-right": "_ag-shake-left-to-right_1ern5_342",
7996
- "spin": "_spin_1ern5_1"
7992
+ "contextPanel": "_contextPanel_pphrk_7159",
7993
+ "contextPanel--hidden": "_contextPanel--hidden_pphrk_7173",
7994
+ "contextPanelWrapper": "_contextPanelWrapper_pphrk_7181",
7995
+ "contextPanelBody": "_contextPanelBody_pphrk_7186",
7996
+ "contextPanel-stickyHeader": "_contextPanel-stickyHeader_pphrk_7190",
7997
+ "filters-list": "_filters-list_pphrk_7197",
7998
+ "col-drag-column-icon": "_col-drag-column-icon_pphrk_7206",
7999
+ "tabular-nums": "_tabular-nums_pphrk_7210",
8000
+ "ag-shake-left-to-right": "_ag-shake-left-to-right_pphrk_342",
8001
+ "spin": "_spin_pphrk_1"
7997
8002
  };
7998
8003
 
7999
8004
  // src/CellRenderers/BooleanCell.tsx
@@ -54298,7 +54303,7 @@ function ServerSideNumberFilterRenderer({
54298
54303
  },
54299
54304
  {
54300
54305
  id: "isEqual",
54301
- label: I18n.t("options.isEqual", {
54306
+ label: I18n.t("options.is_equal_to", {
54302
54307
  defaultValue: "Is Equal To",
54303
54308
  scope: "dataTable.filters.numberFilter"
54304
54309
  })
@@ -54785,26 +54790,19 @@ function serializeNode(node) {
54785
54790
  rowPinned: node.rowPinned
54786
54791
  };
54787
54792
  }
54788
- function transformToColDef(colDefinition, enableGroupEditAndValidation, enableDynamicRowHeight) {
54793
+ function transformToColDef(colDefinition, tableOptions) {
54789
54794
  if (isNestedColumnDefinition(colDefinition)) {
54790
54795
  return {
54791
54796
  ...colDefinition,
54792
54797
  children: colDefinition.children.map(
54793
- (childColDefinition) => transformColumnDefinitionToColDef(
54794
- childColDefinition,
54795
- enableGroupEditAndValidation,
54796
- enableDynamicRowHeight
54797
- )
54798
+ (childColDefinition) => transformColumnDefinitionToColDef(childColDefinition, tableOptions)
54798
54799
  )
54799
54800
  };
54800
54801
  }
54801
- return transformColumnDefinitionToColDef(
54802
- colDefinition,
54803
- enableGroupEditAndValidation,
54804
- enableDynamicRowHeight
54805
- );
54802
+ return transformColumnDefinitionToColDef(colDefinition, tableOptions);
54806
54803
  }
54807
- function transformColumnDefinitionToColDef(dataTableColumnDefinition, enableGroupEditAndValidation, enableDynamicRowHeight) {
54804
+ function transformColumnDefinitionToColDef(dataTableColumnDefinition, tableOptions) {
54805
+ const { enableGroupEditAndValidation, enableDynamicRowHeight } = tableOptions;
54808
54806
  const {
54809
54807
  aggFunc,
54810
54808
  bulkEditable,
@@ -54847,7 +54845,8 @@ function transformColumnDefinitionToColDef(dataTableColumnDefinition, enableGrou
54847
54845
  };
54848
54846
  const cellClassRules = {
54849
54847
  "invalid-cell": function isValid(params) {
54850
- const shouldValidate = !params.node.group && params.data && !params.data.isAggData || enableGroupEditAndValidation && (params.node.footer || params.node.group && !params.node.expanded);
54848
+ const shouldValidateGroupHeader = tableOptions.enableGroupHeaderEdit && params.node.group;
54849
+ const shouldValidate = !params.node.group && params.data && !params.data.isAggData || enableGroupEditAndValidation && (params.node.footer || params.node.group && !params.node.expanded) || shouldValidateGroupHeader;
54851
54850
  return (shouldValidate && valueValidator && !valueValidator({
54852
54851
  columnDefinition: transformToColumnDefinition(params.colDef),
54853
54852
  data: params.data,
@@ -55184,12 +55183,8 @@ function addAutoGroupParams(columnDefinition, isRowSelectable, siblingGroupsRowS
55184
55183
  }
55185
55184
  };
55186
55185
  }
55187
- function getDecoratedAutoGroupColDef(columnDefinition, enableGroupEditAndValidation, enableDynamicRowHeight, isRowSelectable, siblingGroupsRowSelectionDisabled, groupsAlwaysExpanded, isDetailTable) {
55188
- const colDef = columnDefinition ? transformToColDef(
55189
- columnDefinition,
55190
- enableGroupEditAndValidation,
55191
- enableDynamicRowHeight
55192
- ) : DEFAULT_AUTO_GROUP_COLUMN_DEFINITION;
55186
+ function getDecoratedAutoGroupColDef(columnDefinition, tableOptions, isRowSelectable, siblingGroupsRowSelectionDisabled, groupsAlwaysExpanded, isDetailTable) {
55187
+ const colDef = columnDefinition ? transformToColDef(columnDefinition, tableOptions) : DEFAULT_AUTO_GROUP_COLUMN_DEFINITION;
55193
55188
  return addAutoGroupParams(
55194
55189
  colDef,
55195
55190
  isRowSelectable,
@@ -55200,12 +55195,12 @@ function getDecoratedAutoGroupColDef(columnDefinition, enableGroupEditAndValidat
55200
55195
  }
55201
55196
 
55202
55197
  // src/CellRenderers/AutoGroupCell.scss
55203
- var css5 = `._autoGroupCell_1qx8z_1 {
55198
+ var css5 = `._autoGroupCell_1h6pf_1 {
55204
55199
  height: 100%;
55205
55200
  width: 100%;
55206
55201
  }
55207
55202
 
55208
- ._indent_1qx8z_6 {
55203
+ ._indent_1h6pf_6 {
55209
55204
  border-right: 1px solid #d6dadc;
55210
55205
  background: #f4f5f6;
55211
55206
  position: absolute;
@@ -55213,45 +55208,69 @@ var css5 = `._autoGroupCell_1qx8z_1 {
55213
55208
  bottom: -1px;
55214
55209
  width: 12px;
55215
55210
  }
55216
- ._indent_1qx8z_6._innermostLastIndent_1qx8z_14 {
55211
+ ._indent_1h6pf_6._innermostLastIndent_1h6pf_14 {
55217
55212
  bottom: 0px;
55218
55213
  }
55219
55214
 
55220
- ._expandableCaret_1qx8z_18 {
55215
+ ._expandableCaret_1h6pf_18 {
55221
55216
  margin-left: -8px;
55222
55217
  margin-right: 4px;
55223
55218
  width: 24px;
55224
55219
  flex-shrink: 0;
55225
55220
  }
55226
55221
 
55227
- ._expandCaret_1qx8z_25 {
55222
+ ._expandableCaretButton_1h6pf_25 {
55223
+ display: inline-flex;
55224
+ align-items: center;
55225
+ justify-content: center;
55226
+ width: 24px;
55227
+ height: 24px;
55228
+ padding: 0;
55229
+ margin-left: -8px;
55230
+ margin-right: 4px;
55231
+ border: none;
55232
+ border-radius: 2px;
55233
+ background: transparent;
55234
+ cursor: pointer;
55235
+ flex-shrink: 0;
55236
+ }
55237
+ ._expandableCaretButton_1h6pf_25:focus-visible {
55238
+ outline: 2px solid #2066df;
55239
+ outline-offset: 1px;
55240
+ }
55241
+ ._expandableCaretButton_1h6pf_25:hover {
55242
+ background-color: rgba(0, 0, 0, 0.06);
55243
+ }
55244
+
55245
+ ._expandCaret_1h6pf_48 {
55228
55246
  color: #2066df;
55229
55247
  cursor: pointer;
55230
55248
  }
55231
55249
 
55232
- ._collapseCaret_1qx8z_30 {
55250
+ ._collapseCaret_1h6pf_53 {
55233
55251
  color: #75838a;
55234
55252
  cursor: pointer;
55235
55253
  }
55236
55254
 
55237
- ._value_1qx8z_35 {
55255
+ ._value_1h6pf_58 {
55238
55256
  overflow: hidden;
55239
55257
  text-overflow: ellipsis;
55240
55258
  font-size: 12px;
55241
55259
  }
55242
- ._value_1qx8z_35._footer_1qx8z_40 {
55260
+ ._value_1h6pf_58._footer_1h6pf_63 {
55243
55261
  color: #6a767c;
55244
55262
  }`;
55245
55263
  document.head.appendChild(document.createElement("style")).appendChild(document.createTextNode(css5));
55246
55264
  var AutoGroupCell_default = {
55247
- "autoGroupCell": "_autoGroupCell_1qx8z_1",
55248
- "indent": "_indent_1qx8z_6",
55249
- "innermostLastIndent": "_innermostLastIndent_1qx8z_14",
55250
- "expandableCaret": "_expandableCaret_1qx8z_18",
55251
- "expandCaret": "_expandCaret_1qx8z_25",
55252
- "collapseCaret": "_collapseCaret_1qx8z_30",
55253
- "value": "_value_1qx8z_35",
55254
- "footer": "_footer_1qx8z_40"
55265
+ "autoGroupCell": "_autoGroupCell_1h6pf_1",
55266
+ "indent": "_indent_1h6pf_6",
55267
+ "innermostLastIndent": "_innermostLastIndent_1h6pf_14",
55268
+ "expandableCaret": "_expandableCaret_1h6pf_18",
55269
+ "expandableCaretButton": "_expandableCaretButton_1h6pf_25",
55270
+ "expandCaret": "_expandCaret_1h6pf_48",
55271
+ "collapseCaret": "_collapseCaret_1h6pf_53",
55272
+ "value": "_value_1h6pf_58",
55273
+ "footer": "_footer_1h6pf_63"
55255
55274
  };
55256
55275
 
55257
55276
  // src/utils/rowSelectionHelpers.ts
@@ -55508,6 +55527,7 @@ var LevelIndents = (props) => {
55508
55527
  };
55509
55528
  function GroupCaret(props) {
55510
55529
  const mounted = React80__default.default.useRef(false);
55530
+ const buttonRef = React80__default.default.useRef(null);
55511
55531
  const [expanded, setExpanded] = React80.useState(props.node.expanded);
55512
55532
  const ExpandableCaret = expanded ? coreIcons.CaretDown : coreIcons.CaretRight;
55513
55533
  const I18n = coreReact.useI18nContext();
@@ -55518,6 +55538,16 @@ function GroupCaret(props) {
55518
55538
  }, 0);
55519
55539
  }
55520
55540
  }
55541
+ const handleToggle = () => {
55542
+ props.api.setRowNodeExpanded(props.node, !expanded);
55543
+ };
55544
+ const handleKeyDown = (event) => {
55545
+ if (event.key === "Enter" || event.key === " ") {
55546
+ event.preventDefault();
55547
+ event.stopPropagation();
55548
+ handleToggle();
55549
+ }
55550
+ };
55521
55551
  React80.useEffect(() => {
55522
55552
  mounted.current = true;
55523
55553
  props.api.addEventListener("rowGroupOpened", handleRowGroupToggle);
@@ -55530,20 +55560,45 @@ function GroupCaret(props) {
55530
55560
  );
55531
55561
  };
55532
55562
  }, []);
55563
+ React80.useEffect(() => {
55564
+ if (!props.node.isExpandable()) return;
55565
+ const cell2 = buttonRef.current?.closest(".ag-cell");
55566
+ if (!cell2) return;
55567
+ const handleCellKeyDown = (event) => {
55568
+ if (event.key !== "Enter" && event.key !== " ") return;
55569
+ if (!event.isTrusted) return;
55570
+ const target = event.target;
55571
+ if (target.closest("button") || target.closest("input")) return;
55572
+ event.preventDefault();
55573
+ event.stopImmediatePropagation();
55574
+ buttonRef.current?.click();
55575
+ };
55576
+ cell2.addEventListener("keydown", handleCellKeyDown, { capture: true });
55577
+ return () => {
55578
+ cell2.removeEventListener("keydown", handleCellKeyDown, { capture: true });
55579
+ };
55580
+ }, []);
55581
+ if (!props.node.isExpandable()) {
55582
+ return /* @__PURE__ */ React80__default.default.createElement("div", { className: AutoGroupCell_default.expandableCaret });
55583
+ }
55533
55584
  return /* @__PURE__ */ React80__default.default.createElement(
55534
- coreReact.Box,
55585
+ "button",
55535
55586
  {
55587
+ type: "button",
55588
+ ref: buttonRef,
55589
+ "aria-expanded": expanded,
55536
55590
  "aria-label": I18n.t(
55537
55591
  `dataTable.groupCell.${expanded ? "collapse" : "expand"}`
55538
55592
  ),
55539
- className: AutoGroupCell_default.expandableCaret,
55540
- role: "button"
55593
+ className: AutoGroupCell_default.expandableCaretButton,
55594
+ onClick: handleToggle,
55595
+ onKeyDown: handleKeyDown,
55596
+ "data-qa": "group-expand-collapse"
55541
55597
  },
55542
- props.node.isExpandable() && /* @__PURE__ */ React80__default.default.createElement(
55598
+ /* @__PURE__ */ React80__default.default.createElement(
55543
55599
  ExpandableCaret,
55544
55600
  {
55545
- className: expanded ? AutoGroupCell_default.collapseCaret : AutoGroupCell_default.expandCaret,
55546
- onClick: () => props.api.setRowNodeExpanded(props.node, !expanded)
55601
+ className: expanded ? AutoGroupCell_default.collapseCaret : AutoGroupCell_default.expandCaret
55547
55602
  }
55548
55603
  )
55549
55604
  );
@@ -56400,10 +56455,15 @@ var css7 = `.data-table-container .ag-header-cell .data-table-header-menu {
56400
56455
  align-items: center;
56401
56456
  justify-content: center;
56402
56457
  background-color: #e3e6e8;
56458
+ border: none;
56403
56459
  border-radius: 2px;
56404
56460
  cursor: pointer;
56405
56461
  margin-right: 8px;
56406
56462
  }
56463
+ .data-table-container .ag-header-cell .expand-button:focus-visible {
56464
+ outline: 2px solid #2066df;
56465
+ outline-offset: 1px;
56466
+ }
56407
56467
  .data-table-container .ag-header-group-cell-with-group .ag-header-cell-comp-wrapper {
56408
56468
  width: 100%;
56409
56469
  overflow: hidden;
@@ -56416,10 +56476,15 @@ var css7 = `.data-table-container .ag-header-cell .data-table-header-menu {
56416
56476
  align-items: center;
56417
56477
  justify-content: center;
56418
56478
  background-color: #e3e6e8;
56479
+ border: none;
56419
56480
  border-radius: 2px;
56420
56481
  cursor: pointer;
56421
56482
  margin-left: auto;
56422
56483
  }
56484
+ .data-table-container .ag-header-group-cell-with-group .expand-button:focus-visible {
56485
+ outline: 2px solid #2066df;
56486
+ outline-offset: 1px;
56487
+ }
56423
56488
  .data-table-container .auto-column-expand-tooltip-content {
56424
56489
  width: 96px;
56425
56490
  }
@@ -56567,6 +56632,7 @@ var GenericHeaderRenderer = (props) => {
56567
56632
  I18n
56568
56633
  );
56569
56634
  const headerCellRef = React80.useRef(null);
56635
+ const expandButtonRef = React80.useRef(null);
56570
56636
  const menuButtonRef = React80.useRef(null);
56571
56637
  const headerCheckboxSelection = colDef.headerCheckboxSelection;
56572
56638
  const headerCheckboxSelectionEnabled = typeof headerCheckboxSelection === "function" ? headerCheckboxSelection({
@@ -56717,6 +56783,28 @@ var GenericHeaderRenderer = (props) => {
56717
56783
  );
56718
56784
  }
56719
56785
  React80__default.default.useEffect(updateExpandedState);
56786
+ React80__default.default.useEffect(() => {
56787
+ if (!isExpandable) return;
56788
+ const headerCell = headerCellRef.current?.closest(".ag-header-cell");
56789
+ if (!headerCell) return;
56790
+ const handleExpandKeyDown = (event) => {
56791
+ if (event.key !== "Enter" && event.key !== " ") return;
56792
+ if (!event.isTrusted) return;
56793
+ const target = event.target;
56794
+ if (target.closest("button") || target.closest("input")) return;
56795
+ event.preventDefault();
56796
+ event.stopImmediatePropagation();
56797
+ expandButtonRef.current?.click();
56798
+ };
56799
+ headerCell.addEventListener("keydown", handleExpandKeyDown, {
56800
+ capture: true
56801
+ });
56802
+ return () => {
56803
+ headerCell.removeEventListener("keydown", handleExpandKeyDown, {
56804
+ capture: true
56805
+ });
56806
+ };
56807
+ }, [isExpandable]);
56720
56808
  const [expansionVariant, setExpansionVariant] = React80__default.default.useState("closed");
56721
56809
  React80__default.default.useEffect(() => {
56722
56810
  const onExpandAllChange = (event) => {
@@ -56994,12 +57082,21 @@ var GenericHeaderRenderer = (props) => {
56994
57082
  overlay: /* @__PURE__ */ React80__default.default.createElement(coreReact.Tooltip.Content, { className: "auto-column-expand-tooltip-content" }, tooltipText[expansionVariant])
56995
57083
  },
56996
57084
  /* @__PURE__ */ React80__default.default.createElement(
56997
- "div",
57085
+ "button",
56998
57086
  {
57087
+ type: "button",
57088
+ ref: expandButtonRef,
57089
+ "aria-expanded": expansionVariant !== "closed",
56999
57090
  "aria-label": tooltipText[expansionVariant],
57000
57091
  className: "expand-button",
57001
57092
  onClick: onExpandToggle,
57002
- role: "button",
57093
+ onKeyDown: (e) => {
57094
+ if (e.key === "Enter" || e.key === " ") {
57095
+ e.preventDefault();
57096
+ e.stopPropagation();
57097
+ onExpandToggle(e);
57098
+ }
57099
+ },
57003
57100
  "data-qa": "expand-or-collapse-all-button"
57004
57101
  },
57005
57102
  /* @__PURE__ */ React80__default.default.createElement(ExpansionVariantIcon, { size: "sm" })
@@ -57824,6 +57921,7 @@ var InternalTableContext = React80__default.default.createContext({
57824
57921
  hide: () => {
57825
57922
  },
57826
57923
  isVisible: false,
57924
+ panelRef: React80__default.default.createRef(),
57827
57925
  show: () => {
57828
57926
  }
57829
57927
  },
@@ -59627,14 +59725,16 @@ var useRowSelectionState = () => {
59627
59725
  var BulkEditActionButton = (props) => {
59628
59726
  const { contextPanel } = useInternalTableContext();
59629
59727
  const i18n = coreReact.useI18nContext();
59728
+ const buttonRef = React80__default.default.useRef(null);
59630
59729
  const editActionLabel = props.actionText ?? i18n.t("dataTable.bulkActions.editValues");
59631
59730
  return /* @__PURE__ */ React80__default.default.createElement(
59632
59731
  coreReact.Button,
59633
59732
  {
59733
+ ref: buttonRef,
59634
59734
  "aria-label": i18n.t("dataTable.bulkActions.bulkEdit"),
59635
59735
  "data-qa": "bulkEditIcon",
59636
59736
  icon: /* @__PURE__ */ React80__default.default.createElement(coreIcons.Pencil, null),
59637
- onClick: () => contextPanel.show("bulkEdit"),
59737
+ onClick: () => contextPanel.show("bulkEdit", buttonRef.current ?? void 0),
59638
59738
  variant: "tertiary"
59639
59739
  },
59640
59740
  props.showLabel && editActionLabel
@@ -104261,10 +104361,6 @@ var BulkEditPanel = ({}) => {
104261
104361
  const { contextPanel, suppressBulkEditToasts } = useInternalTableContext();
104262
104362
  const I18n = coreReact.useI18nContext();
104263
104363
  const bulkEditRef = React80__default.default.useRef(null);
104264
- const bodyRef = React80__default.default.useRef(null);
104265
- React80.useEffect(() => {
104266
- bodyRef.current?.focus();
104267
- }, []);
104268
104364
  return /* @__PURE__ */ React80__default.default.createElement(coreReact.Panel, null, /* @__PURE__ */ React80__default.default.createElement(
104269
104365
  coreReact.Panel.Header,
104270
104366
  {
@@ -104274,7 +104370,7 @@ var BulkEditPanel = ({}) => {
104274
104370
  }
104275
104371
  },
104276
104372
  /* @__PURE__ */ React80__default.default.createElement(coreReact.Panel.Title, null, I18n.t("dataTable.bulkActions.editValues"))
104277
- ), /* @__PURE__ */ React80__default.default.createElement(coreReact.Panel.Body, { ref: bodyRef }, /* @__PURE__ */ React80__default.default.createElement(coreReact.Panel.Section, null, /* @__PURE__ */ React80__default.default.createElement(
104373
+ ), /* @__PURE__ */ React80__default.default.createElement(coreReact.Panel.Body, null, /* @__PURE__ */ React80__default.default.createElement(coreReact.Panel.Section, null, /* @__PURE__ */ React80__default.default.createElement(
104278
104374
  BulkEdit,
104279
104375
  {
104280
104376
  ref: bulkEditRef,
@@ -104555,11 +104651,10 @@ var ConfigurationColumns = React80__default.default.forwardRef(
104555
104651
  return columnDefs;
104556
104652
  }
104557
104653
  const columnDefinitionsMappedToDefs = columnDefinitions.map(
104558
- (colDef) => transformToColDef(
104559
- colDef,
104654
+ (colDef) => transformToColDef(colDef, {
104560
104655
  enableGroupEditAndValidation,
104561
104656
  enableDynamicRowHeight
104562
- )
104657
+ })
104563
104658
  );
104564
104659
  return toGroupedCols(columnDefinitionsMappedToDefs);
104565
104660
  });
@@ -104710,18 +104805,33 @@ var ConfigurationPanel = ({
104710
104805
  function useContextPanel() {
104711
104806
  const [content, setContent] = React80.useState();
104712
104807
  const visibility = coreReact.useVisibility({ afterHide: () => setContent(void 0) });
104713
- const show = React80.useCallback((panelContent) => {
104714
- setContent(panelContent);
104715
- visibility.show();
104716
- }, []);
104808
+ const triggerRef = React80.useRef(null);
104809
+ const panelRef = React80.useRef(null);
104810
+ const show = React80.useCallback(
104811
+ (panelContent, trigger) => {
104812
+ triggerRef.current = trigger ?? null;
104813
+ setContent(panelContent);
104814
+ visibility.show();
104815
+ },
104816
+ []
104817
+ );
104717
104818
  const hide = React80.useCallback(() => {
104819
+ const trigger = triggerRef.current;
104718
104820
  setContent(void 0);
104719
104821
  visibility.hide();
104822
+ trigger?.focus();
104823
+ triggerRef.current = null;
104720
104824
  }, []);
104825
+ React80.useEffect(() => {
104826
+ if (content) {
104827
+ panelRef.current?.focus();
104828
+ }
104829
+ }, [content]);
104721
104830
  return {
104722
104831
  content,
104723
104832
  hide,
104724
104833
  isVisible: visibility.isVisible,
104834
+ panelRef,
104725
104835
  show
104726
104836
  };
104727
104837
  }
@@ -104858,8 +104968,10 @@ var buildDetailRowsConfig_ = (detailRowConfig, {
104858
104968
  alwaysAggregateAtRootLevel: !isServerSideRowModel,
104859
104969
  autoGroupColumnDef: getDecoratedAutoGroupColDef(
104860
104970
  detailRowConfig.autoGroupColumnDefinition,
104861
- enableGroupEditAndValidation,
104862
- enableDynamicRowHeight,
104971
+ {
104972
+ enableGroupEditAndValidation,
104973
+ enableDynamicRowHeight
104974
+ },
104863
104975
  isRowSelectable,
104864
104976
  false,
104865
104977
  detailRowConfig.groupsAlwaysExpanded ?? false,
@@ -104871,11 +104983,10 @@ var buildDetailRowsConfig_ = (detailRowConfig, {
104871
104983
  },
104872
104984
  columnDefs: toGroupedCols(
104873
104985
  detailRowConfig.columnDefinitions.map(
104874
- (colDef) => transformToColDef(
104875
- colDef,
104986
+ (colDef) => transformToColDef(colDef, {
104876
104987
  enableGroupEditAndValidation,
104877
- colDef.autoHeight ?? enableDynamicRowHeight
104878
- )
104988
+ enableDynamicRowHeight: colDef.autoHeight ?? enableDynamicRowHeight
104989
+ })
104879
104990
  )
104880
104991
  ),
104881
104992
  groupsAlwaysExpanded: detailRowConfig.groupsAlwaysExpanded ?? false,
@@ -110008,11 +110119,16 @@ function getServerSideDatasource(onServerSideDataRequestCallbackRef, onEmptyResp
110008
110119
  };
110009
110120
  }
110010
110121
  var minimumColumnWidth = 140;
110122
+ function resolveGroupIncludeFooter(props, onSSDR) {
110123
+ if (props.enableGroupHeaderEdit) return false;
110124
+ if (!onSSDR && props.groupIncludeFooter === void 0) return true;
110125
+ return props.groupIncludeFooter;
110126
+ }
110011
110127
  function useComputeAgGridProps(props) {
110012
110128
  const internalTableContext = useInternalTableContext();
110013
110129
  const onSSDR = internalTableContext.onServerSideDataRequest;
110014
110130
  return {
110015
- groupIncludeFooter: !onSSDR && props.groupIncludeFooter === void 0 ? true : props.groupIncludeFooter,
110131
+ groupIncludeFooter: resolveGroupIncludeFooter(props, !!onSSDR),
110016
110132
  rowDragManaged: onSSDR ? false : props.rowDragManaged ?? true,
110017
110133
  rowModelType: onSSDR ? "serverSide" : void 0,
110018
110134
  groupSelectsChildren: (
@@ -110085,11 +110201,11 @@ var Table = (props) => {
110085
110201
  });
110086
110202
  const decoratedColDefs = React80__default.default.useMemo(
110087
110203
  () => internalTableContext.columnDefinitions?.map((colDef) => {
110088
- const newColDef = transformToColDef(
110089
- colDef,
110090
- internalTableContext.enableGroupEditAndValidation,
110091
- internalTableContext.enableDynamicRowHeight
110092
- );
110204
+ const newColDef = transformToColDef(colDef, {
110205
+ enableGroupEditAndValidation: internalTableContext.enableGroupEditAndValidation,
110206
+ enableDynamicRowHeight: internalTableContext.enableDynamicRowHeight,
110207
+ enableGroupHeaderEdit: props.enableGroupHeaderEdit
110208
+ });
110093
110209
  return {
110094
110210
  ...newColDef,
110095
110211
  editable: overrideEditable(colDef.editable)
@@ -110375,8 +110491,10 @@ var Table = (props) => {
110375
110491
  const decoratedAutoGroupColDef = React80__default.default.useMemo(
110376
110492
  () => getDecoratedAutoGroupColDef(
110377
110493
  props?.autoGroupColumnDefinition,
110378
- internalTableContext.enableGroupEditAndValidation,
110379
- internalTableContext.enableDynamicRowHeight,
110494
+ {
110495
+ enableGroupEditAndValidation: internalTableContext.enableGroupEditAndValidation,
110496
+ enableDynamicRowHeight: internalTableContext.enableDynamicRowHeight
110497
+ },
110380
110498
  isRowSelectable,
110381
110499
  props.siblingGroupsRowSelectionDisabled,
110382
110500
  props.groupsAlwaysExpanded ?? false,
@@ -110977,9 +111095,26 @@ var ContextPanel = ({
110977
111095
  ...props
110978
111096
  }) => {
110979
111097
  const { contextPanel } = useInternalTableContext();
111098
+ const I18n = coreReact.useI18nContext();
111099
+ const cardRef = React80__default.default.useRef(null);
111100
+ const panelLabelKeys = {
111101
+ configuration: "dataTable.tableSettings.tableSettings",
111102
+ bulkEdit: "dataTable.bulkActions.editValues"
111103
+ };
111104
+ const panelLabel = contextPanel.content ? panelLabelKeys[contextPanel.content] : void 0;
111105
+ const ariaLabel = panelLabel ? I18n.t(panelLabel) : void 0;
111106
+ React80__default.default.useLayoutEffect(() => {
111107
+ if (contextPanel.content && contextPanel.content !== "filters") {
111108
+ contextPanel.panelRef.current = cardRef.current;
111109
+ }
111110
+ }, [contextPanel.content, contextPanel.panelRef]);
110980
111111
  return /* @__PURE__ */ React80__default.default.createElement(
110981
111112
  coreReact.Card,
110982
111113
  {
111114
+ ref: cardRef,
111115
+ tabIndex: -1,
111116
+ role: "region",
111117
+ "aria-label": ariaLabel,
110983
111118
  className: cx19("contextPanel", className, {
110984
111119
  "contextPanel--hidden": !contextPanel.isVisible || contextPanel.content === "filters"
110985
111120
  }),
@@ -111251,19 +111386,27 @@ var BaseFiltersPanel = ({
111251
111386
  onClearAllFilters = noop5,
111252
111387
  ...props
111253
111388
  }) => {
111254
- const ref = React80__default.default.useRef(null);
111389
+ const cardRef = React80__default.default.useRef(null);
111255
111390
  const { contextPanel, filtersBodyId, filtersPanelId } = useInternalTableContext();
111256
111391
  const I18n = coreReact.useI18nContext();
111257
111392
  const hidden = !contextPanel.isVisible || contextPanel.content !== "filters";
111258
111393
  React80__default.default.useLayoutEffect(() => {
111259
- if (ref.current) {
111260
- ref.current.inert = hidden;
111394
+ if (contextPanel.content === "filters") {
111395
+ contextPanel.panelRef.current = cardRef.current;
111396
+ }
111397
+ }, [contextPanel.content, contextPanel.panelRef]);
111398
+ React80__default.default.useLayoutEffect(() => {
111399
+ if (cardRef.current) {
111400
+ cardRef.current.inert = hidden;
111261
111401
  }
111262
111402
  }, [hidden]);
111263
111403
  return /* @__PURE__ */ React80__default.default.createElement(
111264
111404
  coreReact.Card,
111265
111405
  {
111266
- ref,
111406
+ ref: cardRef,
111407
+ tabIndex: -1,
111408
+ role: "region",
111409
+ "aria-label": I18n.t("dataTable.filters.filters"),
111267
111410
  style: { maxHeight: "100vh" },
111268
111411
  className: cx20("contextPanel", className, {
111269
111412
  "contextPanel--hidden": hidden
@@ -111317,6 +111460,7 @@ var ConfigPanelButton = () => {
111317
111460
  const { contextPanel } = useInternalTableContext();
111318
111461
  const hasNoContent = useTableHasNoContent();
111319
111462
  const I18n = coreReact.useI18nContext();
111463
+ const buttonRef = React80__default.default.useRef(null);
111320
111464
  return /* @__PURE__ */ React80__default.default.createElement(
111321
111465
  EmptyResultsControlTooltip,
111322
111466
  {
@@ -111326,12 +111470,13 @@ var ConfigPanelButton = () => {
111326
111470
  /* @__PURE__ */ React80__default.default.createElement(
111327
111471
  coreReact.ToggleButton,
111328
111472
  {
111473
+ ref: buttonRef,
111329
111474
  disabled: hasNoContent,
111330
111475
  onClick: () => {
111331
111476
  if (contextPanel.content === "configuration") {
111332
111477
  contextPanel.hide();
111333
111478
  } else {
111334
- contextPanel.show("configuration");
111479
+ contextPanel.show("configuration", buttonRef.current ?? void 0);
111335
111480
  }
111336
111481
  },
111337
111482
  icon: /* @__PURE__ */ React80__default.default.createElement(
@@ -112484,26 +112629,12 @@ var SingleSelectQuickFilterRenderer = (props) => {
112484
112629
  return /* @__PURE__ */ React80__default.default.createElement(ClientSideSingleSelectQuickFilter, { ...props });
112485
112630
  };
112486
112631
  var SingleSelectQuickFilterRenderer_default = SingleSelectQuickFilterRenderer;
112487
- var FOCUSABLE_SELECTOR2 = 'button:not([disabled]), input:not([disabled]), select:not([disabled]), textarea:not([disabled]), [tabindex]:not([tabindex="-1"])';
112488
112632
  var FiltersPanelToggleButton = ({ hasDefinedFilters }) => {
112489
112633
  const I18n = coreReact.useI18nContext();
112490
- const { contextPanel, filtersBodyId, filtersPanelId } = useInternalTableContext();
112634
+ const { contextPanel, filtersPanelId } = useInternalTableContext();
112491
112635
  const hasNoContent = useTableHasNoContent();
112492
112636
  const buttonRef = React80__default.default.useRef(null);
112493
112637
  const isFiltersOpen = contextPanel.content === "filters";
112494
- const isMounted = React80__default.default.useRef(false);
112495
- React80__default.default.useEffect(() => {
112496
- if (!isMounted.current) {
112497
- isMounted.current = true;
112498
- return;
112499
- }
112500
- if (isFiltersOpen) {
112501
- const panel = filtersBodyId ? document.getElementById(filtersBodyId) : null;
112502
- panel?.querySelector(FOCUSABLE_SELECTOR2)?.focus();
112503
- } else {
112504
- buttonRef.current?.focus();
112505
- }
112506
- }, [isFiltersOpen, filtersBodyId]);
112507
112638
  if (!hasDefinedFilters) {
112508
112639
  return null;
112509
112640
  }
@@ -112524,7 +112655,7 @@ var FiltersPanelToggleButton = ({ hasDefinedFilters }) => {
112524
112655
  "aria-controls": filtersPanelId,
112525
112656
  onClick: () => {
112526
112657
  if (!isFiltersOpen) {
112527
- contextPanel.show("filters");
112658
+ contextPanel.show("filters", buttonRef.current ?? void 0);
112528
112659
  } else {
112529
112660
  contextPanel.hide();
112530
112661
  }