@procore/data-table 14.5.0 → 14.6.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.
@@ -1417,7 +1417,7 @@ ag-grid, ag-grid-angular, ag-grid-ng2, ag-grid-polymer, ag-grid-aurelia {
1417
1417
  animation-iteration-count: infinite;
1418
1418
  animation-name: ag-shake-left-to-right;
1419
1419
  }
1420
- @keyframes _ag-shake-left-to-right_qs3ag_366 {
1420
+ @keyframes _ag-shake-left-to-right_taxt5_366 {
1421
1421
  from {
1422
1422
  padding-left: 6px;
1423
1423
  padding-right: 2px;
@@ -5418,7 +5418,7 @@ input[class^=ag-][type=button]:focus, button[class^=ag-]:focus {
5418
5418
  animation-iteration-count: infinite;
5419
5419
  animation-timing-function: linear;
5420
5420
  }
5421
- @keyframes _spin_qs3ag_1 {
5421
+ @keyframes _spin_taxt5_1 {
5422
5422
  from {
5423
5423
  transform: rotate(0deg);
5424
5424
  }
@@ -7590,8 +7590,11 @@ input[class^=ag-][type=range]:disabled {
7590
7590
  .ag-theme-alpine.ag-theme-alpine.ag-theme-alpine .ag-ltr .ag-header-cell .ag-header-cell-comp-wrapper .ag-header-cell-label {
7591
7591
  padding: 8px 0;
7592
7592
  }
7593
+ .ag-theme-alpine.ag-theme-alpine.ag-theme-alpine .ag-ltr .ag-header-cell .ag-header-cell-comp-wrapper .ag-header-cell-label .data-table-header-display-name-container {
7594
+ width: 100%;
7595
+ }
7593
7596
  .ag-theme-alpine.ag-theme-alpine.ag-theme-alpine .ag-ltr .ag-header-cell .ag-header-cell-comp-wrapper .ag-header-cell-label .data-table-header-display-name {
7594
- white-space: nowrap;
7597
+ word-wrap: break-word;
7595
7598
  text-overflow: ellipsis;
7596
7599
  overflow: hidden;
7597
7600
  }
@@ -7897,7 +7900,7 @@ input[class^=ag-][type=range]:disabled {
7897
7900
  padding-left: 16px;
7898
7901
  }
7899
7902
 
7900
- div._contextPanel_qs3ag_7123 {
7903
+ div._contextPanel_taxt5_7126 {
7901
7904
  width: 400px;
7902
7905
  transition: all ease 500ms;
7903
7906
  flex: 0 0 auto;
@@ -7906,7 +7909,7 @@ div._contextPanel_qs3ag_7123 {
7906
7909
  border: 1px solid #d6dadc;
7907
7910
  display: flex;
7908
7911
  }
7909
- div._contextPanel--hidden_qs3ag_7132 {
7912
+ div._contextPanel--hidden_taxt5_7135 {
7910
7913
  border: none;
7911
7914
  overflow: hidden;
7912
7915
  padding: 0px;
@@ -7914,50 +7917,50 @@ div._contextPanel--hidden_qs3ag_7132 {
7914
7917
  width: 0px;
7915
7918
  }
7916
7919
 
7917
- ._contextPanelWrapper_qs3ag_7140 {
7920
+ ._contextPanelWrapper_taxt5_7143 {
7918
7921
  position: relative;
7919
7922
  flex-grow: 1;
7920
7923
  }
7921
7924
 
7922
- ._contextPanelBody_qs3ag_7145 {
7925
+ ._contextPanelBody_taxt5_7148 {
7923
7926
  width: clamp(380px, 400px, 100%);
7924
7927
  }
7925
7928
 
7926
- ._contextPanel-stickyHeader_qs3ag_7149 {
7929
+ ._contextPanel-stickyHeader_taxt5_7152 {
7927
7930
  background-color: #ffffff;
7928
7931
  position: sticky;
7929
7932
  top: 0;
7930
7933
  z-index: 5;
7931
7934
  }
7932
7935
 
7933
- ._filters-list_qs3ag_7156 {
7936
+ ._filters-list_taxt5_7159 {
7934
7937
  padding: 0;
7935
7938
  margin: 0;
7936
7939
  }
7937
- ._filters-list_qs3ag_7156 ol {
7940
+ ._filters-list_taxt5_7159 ol {
7938
7941
  padding: 0;
7939
7942
  margin: 0;
7940
7943
  }
7941
7944
 
7942
- ._col-drag-column-icon_qs3ag_7165 {
7945
+ ._col-drag-column-icon_taxt5_7168 {
7943
7946
  color: #6a767c;
7944
7947
  }
7945
7948
 
7946
- ._tabular-nums_qs3ag_7169 {
7949
+ ._tabular-nums_taxt5_7172 {
7947
7950
  font-variant-numeric: tabular-nums;
7948
7951
  }`;
7949
7952
  document.head.appendChild(document.createElement("style")).appendChild(document.createTextNode(css));
7950
7953
  var styles_default = {
7951
- "contextPanel": "_contextPanel_qs3ag_7123",
7952
- "contextPanel--hidden": "_contextPanel--hidden_qs3ag_7132",
7953
- "contextPanelWrapper": "_contextPanelWrapper_qs3ag_7140",
7954
- "contextPanelBody": "_contextPanelBody_qs3ag_7145",
7955
- "contextPanel-stickyHeader": "_contextPanel-stickyHeader_qs3ag_7149",
7956
- "filters-list": "_filters-list_qs3ag_7156",
7957
- "col-drag-column-icon": "_col-drag-column-icon_qs3ag_7165",
7958
- "tabular-nums": "_tabular-nums_qs3ag_7169",
7959
- "ag-shake-left-to-right": "_ag-shake-left-to-right_qs3ag_366",
7960
- "spin": "_spin_qs3ag_1"
7954
+ "contextPanel": "_contextPanel_taxt5_7126",
7955
+ "contextPanel--hidden": "_contextPanel--hidden_taxt5_7135",
7956
+ "contextPanelWrapper": "_contextPanelWrapper_taxt5_7143",
7957
+ "contextPanelBody": "_contextPanelBody_taxt5_7148",
7958
+ "contextPanel-stickyHeader": "_contextPanel-stickyHeader_taxt5_7152",
7959
+ "filters-list": "_filters-list_taxt5_7159",
7960
+ "col-drag-column-icon": "_col-drag-column-icon_taxt5_7168",
7961
+ "tabular-nums": "_tabular-nums_taxt5_7172",
7962
+ "ag-shake-left-to-right": "_ag-shake-left-to-right_taxt5_366",
7963
+ "spin": "_spin_taxt5_1"
7961
7964
  };
7962
7965
 
7963
7966
  // src/utils/getCellValueTypographyProps.ts
@@ -8143,19 +8146,19 @@ var CompanyCellRenderer = withDataTableRenderer(Renderer2, "select");
8143
8146
 
8144
8147
  // src/utils/isEmptyValue.ts
8145
8148
  var isEmptyValue = (value) => {
8146
- if (typeof value === "boolean") {
8149
+ if (typeof value === "boolean" || typeof value === "number") {
8147
8150
  return false;
8148
8151
  }
8149
- if (Array.isArray(value)) {
8150
- return !value.length;
8152
+ if (!value) {
8153
+ return true;
8151
8154
  }
8152
- if (value === 0) {
8153
- return false;
8155
+ if (Array.isArray(value)) {
8156
+ return value.length === 0;
8154
8157
  }
8155
- if (value && Object.keys(value).length === 0 && Object.getPrototypeOf(value) === Object.prototype) {
8156
- return !!value;
8158
+ if (Object.getPrototypeOf(value) === Object.prototype) {
8159
+ return Object.keys(value).length === 0;
8157
8160
  }
8158
- return !value;
8161
+ return false;
8159
8162
  };
8160
8163
 
8161
8164
  // src/CellRenderers/CurrencyCell.tsx
@@ -56043,6 +56046,14 @@ function findNode(predicate, gridApi) {
56043
56046
  return searchTarget;
56044
56047
  }
56045
56048
 
56049
+ // src/utils/isServerSideGroupSelectionState.ts
56050
+ function isServerSideGroupSelectionState(value) {
56051
+ if (value === null) {
56052
+ return false;
56053
+ }
56054
+ return value.selectAll === void 0;
56055
+ }
56056
+
56046
56057
  // src/GenericHeader/genericHeader.scss
56047
56058
  var css7 = `.ag-header-cell .data-table-header-menu {
56048
56059
  opacity: 1;
@@ -56452,10 +56463,18 @@ var GenericHeaderRenderer = (props) => {
56452
56463
  if (e.source === "uiSelectAll") {
56453
56464
  return;
56454
56465
  }
56466
+ const selectionState = props.api.getServerSideSelectionState();
56467
+ const isGroupSelection = isServerSideGroupSelectionState(selectionState);
56468
+ const isSelectionStatePartialSelected = Boolean(
56469
+ selectionState?.toggledNodes?.length
56470
+ );
56471
+ const isSelectionStateSelectAll = !isSelectionStatePartialSelected && Boolean(
56472
+ isGroupSelection ? selectionState.selectAllChildren : selectionState?.selectAll
56473
+ );
56455
56474
  const isPagination = Boolean(props.api.paginationGetRowCount());
56456
56475
  const currentRows = getCurrentRows(props.api, isPagination);
56457
- const isAllSelected = currentRows.length && currentRows.every(isRowSelected);
56458
- const isPartialSelected = !isAllSelected && currentRows.some(isRowSelected);
56476
+ const isAllSelected = isPagination ? currentRows.length && currentRows.every(isRowSelected) : isSelectionStateSelectAll;
56477
+ const isPartialSelected = isPagination ? !isAllSelected && currentRows.some(isRowSelected) : isSelectionStatePartialSelected;
56459
56478
  if (isAllSelected) {
56460
56479
  setSelectAll("all" /* All */);
56461
56480
  } else if (isPartialSelected) {
@@ -56486,17 +56505,21 @@ var GenericHeaderRenderer = (props) => {
56486
56505
  const isSelectAll = nextSelectedState == "all" /* All */;
56487
56506
  if (props.selectionSSREnabled) {
56488
56507
  const isPagination = Boolean(props.api.paginationGetRowCount());
56489
- const rowsIdsToSelectOrDeselect = getCurrentRows(
56490
- props.api,
56491
- isPagination
56492
- ).map((node) => node.id);
56493
- isSelectAll ? tableRef?.current?.selectRows(
56494
- rowsIdsToSelectOrDeselect,
56495
- "uiSelectAll"
56496
- ) : tableRef?.current?.deselectRows(
56497
- rowsIdsToSelectOrDeselect,
56498
- "uiSelectAll"
56499
- );
56508
+ if (isPagination) {
56509
+ const rowsIdsToSelectOrDeselect = getCurrentRows(
56510
+ props.api,
56511
+ isPagination
56512
+ ).map((node) => node.id);
56513
+ isSelectAll ? tableRef?.current?.selectRows(
56514
+ rowsIdsToSelectOrDeselect,
56515
+ "uiSelectAll"
56516
+ ) : tableRef?.current?.deselectRows(
56517
+ rowsIdsToSelectOrDeselect,
56518
+ "uiSelectAll"
56519
+ );
56520
+ } else {
56521
+ isSelectAll ? tableRef?.current?.selectAll() : tableRef?.current?.deselectAll();
56522
+ }
56500
56523
  } else {
56501
56524
  isSelectAll ? props.api.selectAllFiltered() : props.api.deselectAllFiltered();
56502
56525
  }
@@ -56550,7 +56573,7 @@ var GenericHeaderRenderer = (props) => {
56550
56573
  trigger: isOverflowing ? "hover" : "none",
56551
56574
  overlay: /* @__PURE__ */ React83__default.default.createElement(coreReact.Tooltip.Content, null, /* @__PURE__ */ React83__default.default.createElement("span", null, props.displayName))
56552
56575
  },
56553
- /* @__PURE__ */ React83__default.default.createElement("div", null, /* @__PURE__ */ React83__default.default.createElement("span", { ref, className: "data-table-header-display-name" }, props.displayName))
56576
+ /* @__PURE__ */ React83__default.default.createElement("div", { className: "data-table-header-display-name-container" }, /* @__PURE__ */ React83__default.default.createElement("span", { ref, className: "data-table-header-display-name" }, props.displayName))
56554
56577
  ), HeaderNode && /* @__PURE__ */ React83__default.default.createElement(
56555
56578
  coreReact.Flex,
56556
56579
  {
@@ -56869,7 +56892,7 @@ function shapeActiveFilters(filters = emptyArray2) {
56869
56892
  field
56870
56893
  };
56871
56894
  });
56872
- return { state };
56895
+ return state;
56873
56896
  }
56874
56897
  function useFilterStorage({
56875
56898
  columnDefinitions,
@@ -56880,7 +56903,7 @@ function useFilterStorage({
56880
56903
  filterable: emptyObj,
56881
56904
  filterOptions: emptyObj,
56882
56905
  possibleFilters: emptyArray2,
56883
- selectedFilters: emptyObj
56906
+ selectedFilters: shapeActiveFilters(initialSelectedFilters)
56884
56907
  });
56885
56908
  function getOptions(field) {
56886
56909
  return filtersState.filterOptions[field];
@@ -56903,16 +56926,25 @@ function useFilterStorage({
56903
56926
  const filterableColumns = columnDefinitions.filter(
56904
56927
  (col) => col.filterRenderer
56905
56928
  );
56906
- const { state } = shapeActiveFilters(initialSelectedFilters);
56929
+ const filterableMap = filterableColumns.reduce((acc, curr) => {
56930
+ return {
56931
+ ...acc,
56932
+ [curr.field]: curr
56933
+ };
56934
+ }, {});
56935
+ const selectedFiltersState = Object.entries(
56936
+ filtersState.selectedFilters ?? {}
56937
+ ).filter(([field]) => Object.keys(filterableMap).includes(field)).reduce(
56938
+ (acc, [field, filterState]) => ({
56939
+ ...acc,
56940
+ [field]: filterState
56941
+ }),
56942
+ {}
56943
+ );
56907
56944
  setFiltersState((prev) => ({
56908
56945
  ...prev,
56909
- filterable: filterableColumns.reduce((acc, curr) => {
56910
- return {
56911
- ...acc,
56912
- [curr.field]: curr
56913
- };
56914
- }, {}),
56915
- selectedFilters: state,
56946
+ filterable: filterableMap,
56947
+ selectedFilters: selectedFiltersState,
56916
56948
  possibleFilters: filterableColumns.sort(sortColumnDefinitionsByFilterIndex).map(getFieldAttr)
56917
56949
  }));
56918
56950
  }, [columnDefinitions]);
@@ -56926,7 +56958,7 @@ function useFilterStorage({
56926
56958
  (selectedFilters) => {
56927
56959
  setFiltersState((prev) => ({
56928
56960
  ...prev,
56929
- selectedFilters: shapeActiveFilters(selectedFilters).state
56961
+ selectedFilters: shapeActiveFilters(selectedFilters)
56930
56962
  }));
56931
56963
  },
56932
56964
  []
@@ -77696,6 +77728,7 @@ function useContextPanel() {
77696
77728
  }
77697
77729
  var ConfigPanelButton = () => {
77698
77730
  const { contextPanel, totalRowCount } = useInternalTableContext();
77731
+ const I18n = coreReact.useI18nContext();
77699
77732
  return /* @__PURE__ */ React83__default.default.createElement(
77700
77733
  EmptyResultsControlTooltip,
77701
77734
  {
@@ -77713,28 +77746,29 @@ var ConfigPanelButton = () => {
77713
77746
  contextPanel.show("configuration");
77714
77747
  }
77715
77748
  },
77749
+ icon: /* @__PURE__ */ React83__default.default.createElement(
77750
+ "svg",
77751
+ {
77752
+ style: { marginTop: "6px" },
77753
+ focusable: false,
77754
+ width: "15",
77755
+ height: "15",
77756
+ viewBox: "0 0 20 20",
77757
+ fill: "none",
77758
+ xmlns: "http://www.w3.org/2000/svg"
77759
+ },
77760
+ /* @__PURE__ */ React83__default.default.createElement(
77761
+ "path",
77762
+ {
77763
+ d: "M0 11.5V13.5H4.5V11.5H0ZM0 1.5V3.5H7.5V1.5H0ZM8.5 15V13.5H15V11.5H8.5V10H6.66667V15H8.5ZM3.5 5V6.5H0V8.5H3.5V10H5.5V5H3.5ZM15 8.5V6.5H7.5V8.5H15ZM9.5 5H11.6667V3.5H15V1.5H11.6667V0H9.5V5Z",
77764
+ fill: "currentColor"
77765
+ }
77766
+ )
77767
+ ),
77716
77768
  selected: contextPanel.content === "configuration",
77717
77769
  "data-qa": "table-config-button"
77718
77770
  },
77719
- /* @__PURE__ */ React83__default.default.createElement(
77720
- "svg",
77721
- {
77722
- style: { marginTop: "6px" },
77723
- focusable: false,
77724
- width: "15",
77725
- height: "15",
77726
- viewBox: "0 0 15 15",
77727
- fill: "none",
77728
- xmlns: "http://www.w3.org/2000/svg"
77729
- },
77730
- /* @__PURE__ */ React83__default.default.createElement(
77731
- "path",
77732
- {
77733
- d: "M0 11.5V13.5H4.5V11.5H0ZM0 1.5V3.5H7.5V1.5H0ZM8.5 15V13.5H15V11.5H8.5V10H6.66667V15H8.5ZM3.5 5V6.5H0V8.5H3.5V10H5.5V5H3.5ZM15 8.5V6.5H7.5V8.5H15ZM9.5 5H11.6667V3.5H15V1.5H11.6667V0H9.5V5Z",
77734
- fill: "currentColor"
77735
- }
77736
- )
77737
- )
77771
+ I18n.t("dataTable.tableSettings.configure")
77738
77772
  )
77739
77773
  );
77740
77774
  };
@@ -78553,7 +78587,8 @@ var de_DE_default = {
78553
78587
  tableSettings: "Tabelleneinstellungen",
78554
78588
  groupBy: "Gruppieren nach:",
78555
78589
  reset: "Zur\xFCcksetzen",
78556
- selectColumnGroup: "W\xE4hlen Sie eine Spalte zum Gruppieren."
78590
+ selectColumnGroup: "W\xE4hlen Sie eine Spalte zum Gruppieren.",
78591
+ configure: "Konfigurieren"
78557
78592
  },
78558
78593
  rowGroupToggle: {
78559
78594
  expandTierOne: "\xD6ffnen Sie die ersten Gruppen in der Tabelle.",
@@ -78697,7 +78732,8 @@ var en_AU_default = {
78697
78732
  tableSettings: "Table Settings",
78698
78733
  groupBy: "Group by:",
78699
78734
  reset: "Reset",
78700
- selectColumnGroup: "Select a column to group"
78735
+ selectColumnGroup: "Select a column to group",
78736
+ configure: "Configure"
78701
78737
  },
78702
78738
  rowGroupToggle: {
78703
78739
  expandTierOne: "Open first groups in the table.",
@@ -78841,7 +78877,8 @@ var en_CA_default = {
78841
78877
  tableSettings: "Table Settings",
78842
78878
  groupBy: "Group by:",
78843
78879
  reset: "Reset",
78844
- selectColumnGroup: "Select a column to group"
78880
+ selectColumnGroup: "Select a column to group",
78881
+ configure: "Configure"
78845
78882
  },
78846
78883
  rowGroupToggle: {
78847
78884
  expandTierOne: "Open first groups in the table.",
@@ -78985,7 +79022,8 @@ var en_GB_default = {
78985
79022
  tableSettings: "Table Settings",
78986
79023
  groupBy: "Group by:",
78987
79024
  reset: "Reset",
78988
- selectColumnGroup: "Select a column to group"
79025
+ selectColumnGroup: "Select a column to group",
79026
+ configure: "Configure"
78989
79027
  },
78990
79028
  rowGroupToggle: {
78991
79029
  expandTierOne: "Open first groups in the table.",
@@ -79129,7 +79167,8 @@ var en_default = {
79129
79167
  tableSettings: "Table Settings",
79130
79168
  groupBy: "Group by:",
79131
79169
  reset: "Reset",
79132
- selectColumnGroup: "Select a column to group"
79170
+ selectColumnGroup: "Select a column to group",
79171
+ configure: "Configure"
79133
79172
  },
79134
79173
  rowGroupToggle: {
79135
79174
  expandTierOne: "Open first groups in the table.",
@@ -79273,7 +79312,8 @@ var es_ES_default = {
79273
79312
  tableSettings: "Configuraci\xF3n de la tabla",
79274
79313
  groupBy: "Agrupar por:",
79275
79314
  reset: "Restablecer",
79276
- selectColumnGroup: "Seleccione una columna para agrupar"
79315
+ selectColumnGroup: "Seleccione una columna para agrupar",
79316
+ configure: "Configurar"
79277
79317
  },
79278
79318
  rowGroupToggle: {
79279
79319
  expandTierOne: "Abrir los primeros grupos de la tabla.",
@@ -79417,7 +79457,8 @@ var es_default = {
79417
79457
  tableSettings: "Configuraci\xF3n de la tabla",
79418
79458
  groupBy: "Agrupar por:",
79419
79459
  reset: "Restablecer",
79420
- selectColumnGroup: "Selecciona una columna para agrupar"
79460
+ selectColumnGroup: "Selecciona una columna para agrupar",
79461
+ configure: "Configurar"
79421
79462
  },
79422
79463
  rowGroupToggle: {
79423
79464
  expandTierOne: "Abrir los primeros grupos de la tabla.",
@@ -79561,7 +79602,8 @@ var fr_CA_default = {
79561
79602
  tableSettings: "Param\xE8tres du tableau",
79562
79603
  groupBy: "Regrouper par :",
79563
79604
  reset: "R\xE9initialiser",
79564
- selectColumnGroup: "S\xE9lectionnez une colonne \xE0 grouper"
79605
+ selectColumnGroup: "S\xE9lectionnez une colonne \xE0 grouper",
79606
+ configure: "Configurer"
79565
79607
  },
79566
79608
  rowGroupToggle: {
79567
79609
  expandTierOne: "Ouvrez les premiers groupes du tableau.",
@@ -79705,7 +79747,8 @@ var fr_FR_default = {
79705
79747
  tableSettings: "Param\xE8tres du tableau",
79706
79748
  groupBy: "Regrouper par\xA0:",
79707
79749
  reset: "R\xE9initialiser",
79708
- selectColumnGroup: "S\xE9lectionner une colonne \xE0 regrouper"
79750
+ selectColumnGroup: "S\xE9lectionner une colonne \xE0 regrouper",
79751
+ configure: "Configurer"
79709
79752
  },
79710
79753
  rowGroupToggle: {
79711
79754
  expandTierOne: "Ouvrez les premiers groupes du tableau.",
@@ -79849,7 +79892,8 @@ var is_IS_default = {
79849
79892
  tableSettings: "Tafla stillingar",
79850
79893
  groupBy: "H\xF3pur eftir:",
79851
79894
  reset: "Endurstilla",
79852
- selectColumnGroup: "Veldu d\xE1lk til a\xF0 flokka"
79895
+ selectColumnGroup: "Veldu d\xE1lk til a\xF0 flokka",
79896
+ configure: "Stilla"
79853
79897
  },
79854
79898
  rowGroupToggle: {
79855
79899
  expandTierOne: "Opna\xF0u fyrstu h\xF3pa \xED t\xF6flunni.",
@@ -79993,7 +80037,8 @@ var ja_JP_default = {
79993
80037
  tableSettings: "\u8868\u306E\u8A2D\u5B9A",
79994
80038
  groupBy: "\u30B0\u30EB\u30FC\u30D7\u5316:",
79995
80039
  reset: "\u30EA\u30BB\u30C3\u30C8",
79996
- selectColumnGroup: "\u30B0\u30EB\u30FC\u30D7\u5316\u3059\u308B\u5217\u3092\u9078\u629E"
80040
+ selectColumnGroup: "\u30B0\u30EB\u30FC\u30D7\u5316\u3059\u308B\u5217\u3092\u9078\u629E",
80041
+ configure: "\u69CB\u6210"
79997
80042
  },
79998
80043
  rowGroupToggle: {
79999
80044
  expandTierOne: "\u8868\u306E\u6700\u521D\u306E\u30B0\u30EB\u30FC\u30D7\u3092\u958B\u304D\u307E\u3059\u3002",
@@ -80137,7 +80182,8 @@ var pt_BR_default = {
80137
80182
  tableSettings: "Configura\xE7\xF5es da Tabela",
80138
80183
  groupBy: "Agrupar por:",
80139
80184
  reset: "Redefinir",
80140
- selectColumnGroup: "Selecionar uma coluna para agrupar"
80185
+ selectColumnGroup: "Selecionar uma coluna para agrupar",
80186
+ configure: "Configurar"
80141
80187
  },
80142
80188
  rowGroupToggle: {
80143
80189
  expandTierOne: "Abra os primeiros grupos na tabela.",
@@ -80281,7 +80327,8 @@ var th_TH_default = {
80281
80327
  tableSettings: "\u0E01\u0E32\u0E23\u0E15\u0E31\u0E49\u0E07\u0E04\u0E48\u0E32\u0E15\u0E32\u0E23\u0E32\u0E07",
80282
80328
  groupBy: "\u0E08\u0E31\u0E14\u0E01\u0E25\u0E38\u0E48\u0E21\u0E15\u0E32\u0E21:",
80283
80329
  reset: "\u0E23\u0E35\u0E40\u0E0B\u0E47\u0E15",
80284
- selectColumnGroup: "\u0E40\u0E25\u0E37\u0E2D\u0E01\u0E04\u0E2D\u0E25\u0E31\u0E21\u0E19\u0E4C\u0E17\u0E35\u0E48\u0E08\u0E30\u0E08\u0E31\u0E14\u0E01\u0E25\u0E38\u0E48\u0E21"
80330
+ selectColumnGroup: "\u0E40\u0E25\u0E37\u0E2D\u0E01\u0E04\u0E2D\u0E25\u0E31\u0E21\u0E19\u0E4C\u0E17\u0E35\u0E48\u0E08\u0E30\u0E08\u0E31\u0E14\u0E01\u0E25\u0E38\u0E48\u0E21",
80331
+ configure: "\u0E01\u0E33\u0E2B\u0E19\u0E14\u0E04\u0E48\u0E32"
80285
80332
  },
80286
80333
  rowGroupToggle: {
80287
80334
  expandTierOne: "\u0E40\u0E1B\u0E34\u0E14\u0E01\u0E25\u0E38\u0E48\u0E21\u0E41\u0E23\u0E01\u0E43\u0E19\u0E15\u0E32\u0E23\u0E32\u0E07",
@@ -80425,7 +80472,8 @@ var zh_SG_default = {
80425
80472
  tableSettings: "\u8868\u683C\u8BBE\u7F6E",
80426
80473
  groupBy: "\u5206\u7EC4\u4F9D\u636E\uFF1A",
80427
80474
  reset: "\u91CD\u7F6E",
80428
- selectColumnGroup: "\u9009\u62E9\u8981\u5206\u7C7B\u7684\u5217"
80475
+ selectColumnGroup: "\u9009\u62E9\u8981\u5206\u7C7B\u7684\u5217",
80476
+ configure: "\u914D\u7F6E"
80429
80477
  },
80430
80478
  rowGroupToggle: {
80431
80479
  expandTierOne: "\u6253\u5F00\u8868\u4E2D\u7684\u7B2C\u4E00\u4E2A\u7EC4\u3002",
@@ -81050,6 +81098,14 @@ var useTableApi = ({
81050
81098
  }),
81051
81099
  [columnApi, gridApi, rowHeight, filterStorage]
81052
81100
  );
81101
+ function deselectParentsWithoutChildrenOrSelectAll(state, gridApi2) {
81102
+ if (state.selectAllChildren === false && !state.toggledNodes?.length) {
81103
+ gridApi2.getRowNode(state.nodeId || "")?.setSelected(false);
81104
+ }
81105
+ state.toggledNodes?.forEach(
81106
+ (node) => deselectParentsWithoutChildrenOrSelectAll(node, gridApi2)
81107
+ );
81108
+ }
81053
81109
  const onSelectionChanged = (rowNode) => {
81054
81110
  const isGrouped = rowNode.group || rowNode.parent?.group && !isNodeRootLevelOfGrid(rowNode.parent);
81055
81111
  const currAffectedRows = rowSelectionRef.current.affectedRows;
@@ -81070,13 +81126,18 @@ var useTableApi = ({
81070
81126
  currAffectedRows
81071
81127
  );
81072
81128
  const rowValues = Object.values(rowsToUpdate);
81073
- rowValues.forEach((row2) => {
81074
- row2.node.setSelected(
81075
- row2.selectedState === rowSelectionState.selected,
81076
- false,
81077
- "checkboxSelected"
81078
- );
81079
- });
81129
+ const selectionState = gridApi?.getServerSideSelectionState();
81130
+ if (selectionState && isServerSideGroupSelectionState(selectionState) && gridApi) {
81131
+ deselectParentsWithoutChildrenOrSelectAll(selectionState, gridApi);
81132
+ } else {
81133
+ rowValues.forEach((row2) => {
81134
+ row2.node.setSelected(
81135
+ row2.selectedState === rowSelectionState.selected,
81136
+ false,
81137
+ "checkboxSelected"
81138
+ );
81139
+ });
81140
+ }
81080
81141
  rowSelectionRef.current.affectedRows = {
81081
81142
  ...currAffectedRows,
81082
81143
  ...rowsToUpdate
@@ -81198,6 +81259,7 @@ function buildPartialTableApi({
81198
81259
  rowSelectionRef
81199
81260
  }) : void 0;
81200
81261
  };
81262
+ const getServerSideSelectionState = () => gridApi?.getServerSideSelectionState();
81201
81263
  const getTableConfiguration = () => {
81202
81264
  const columnState = columnApi?.getColumnState().filter(
81203
81265
  (column2) => !["rowActions", "rowActions-pinned"].includes(
@@ -81311,6 +81373,7 @@ function buildPartialTableApi({
81311
81373
  getRootAggregateData,
81312
81374
  getRowData,
81313
81375
  getSelectedRows: getSelectedRows2,
81376
+ getServerSideSelectionState,
81314
81377
  getTableConfiguration,
81315
81378
  refreshCells,
81316
81379
  setPinnedBottomRowData,
@@ -82362,7 +82425,7 @@ var Table = (props) => {
82362
82425
  groupDefaultExpanded: props.groupDefaultExpanded,
82363
82426
  groupIncludeFooter: !onSSDR && props.groupIncludeFooter === void 0 ? true : props.groupIncludeFooter,
82364
82427
  getGroupRowAgg: props.getGroupRowAgg ? getGroupRowAgg : void 0,
82365
- groupSelectsChildren: !onSSDR,
82428
+ groupSelectsChildren: props.groupSelectsChildren || !onSSDR,
82366
82429
  groupSelectsFiltered: true,
82367
82430
  headerHeight: props.headerHeight,
82368
82431
  icons: tableIcons,