@procore/data-table 14.28.0-cdn.2 → 14.28.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.
@@ -10,7 +10,6 @@ import { formatNumber, formatCurrency, formatPercentage } from '@procore/labs-fi
10
10
  import styled4, { css as css$1 } from 'styled-components';
11
11
  import { format } from '@procore/labs-financials-utils/dist/format';
12
12
  import { detectPrng, factory } from 'ulid';
13
- import { isCDNFeatureFlagEnabled, useRequestTranslations } from '@procore/cdn-translations';
14
13
  import { useToastAlertContext, ToastAlertProvider } from '@procore/toast-alert';
15
14
  import ReactDOM, { createPortal } from 'react-dom';
16
15
  import { renderToString, renderToStaticMarkup } from 'react-dom/server';
@@ -1411,7 +1410,7 @@ ag-grid, ag-grid-angular, ag-grid-ng2, ag-grid-polymer, ag-grid-aurelia {
1411
1410
  animation-iteration-count: infinite;
1412
1411
  animation-name: ag-shake-left-to-right;
1413
1412
  }
1414
- @keyframes _ag-shake-left-to-right_1ajw9_369 {
1413
+ @keyframes _ag-shake-left-to-right_if78k_369 {
1415
1414
  from {
1416
1415
  padding-left: 6px;
1417
1416
  padding-right: 2px;
@@ -5412,7 +5411,7 @@ input[class^=ag-][type=button]:focus, button[class^=ag-]:focus {
5412
5411
  animation-iteration-count: infinite;
5413
5412
  animation-timing-function: linear;
5414
5413
  }
5415
- @keyframes _spin_1ajw9_1 {
5414
+ @keyframes _spin_if78k_1 {
5416
5415
  from {
5417
5416
  transform: rotate(0deg);
5418
5417
  }
@@ -7667,6 +7666,9 @@ input[class^=ag-][type=range]:disabled {
7667
7666
  .ag-theme-alpine.ag-theme-alpine .ag-icon-tree-open::before {
7668
7667
  content: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='8px' height='4px'><path d='M0 0H8L4 4L0 0Z' fill='%232066DF'/></svg>");
7669
7668
  }
7669
+ .ag-theme-alpine.ag-theme-alpine .ag-header-cell-resize {
7670
+ right: -5px;
7671
+ }
7670
7672
  .ag-theme-alpine.ag-theme-alpine .ag-header-cell-resize::after {
7671
7673
  width: 1px;
7672
7674
  height: 100%;
@@ -7920,7 +7922,7 @@ input[class^=ag-][type=range]:disabled {
7920
7922
  padding-left: 16px;
7921
7923
  }
7922
7924
 
7923
- div._contextPanel_1ajw9_7156 {
7925
+ div._contextPanel_if78k_7159 {
7924
7926
  width: 400px;
7925
7927
  transition: all ease 500ms;
7926
7928
  flex: 0 0 auto;
@@ -7929,7 +7931,7 @@ div._contextPanel_1ajw9_7156 {
7929
7931
  border: 1px solid #d6dadc;
7930
7932
  display: flex;
7931
7933
  }
7932
- div._contextPanel--hidden_1ajw9_7165 {
7934
+ div._contextPanel--hidden_if78k_7168 {
7933
7935
  border: none;
7934
7936
  overflow: hidden;
7935
7937
  padding: 0px;
@@ -7937,50 +7939,50 @@ div._contextPanel--hidden_1ajw9_7165 {
7937
7939
  width: 0px;
7938
7940
  }
7939
7941
 
7940
- ._contextPanelWrapper_1ajw9_7173 {
7942
+ ._contextPanelWrapper_if78k_7176 {
7941
7943
  position: relative;
7942
7944
  flex-grow: 1;
7943
7945
  }
7944
7946
 
7945
- ._contextPanelBody_1ajw9_7178 {
7947
+ ._contextPanelBody_if78k_7181 {
7946
7948
  width: clamp(380px, 400px, 100%);
7947
7949
  }
7948
7950
 
7949
- ._contextPanel-stickyHeader_1ajw9_7182 {
7951
+ ._contextPanel-stickyHeader_if78k_7185 {
7950
7952
  background-color: #ffffff;
7951
7953
  position: sticky;
7952
7954
  top: 0;
7953
7955
  z-index: 5;
7954
7956
  }
7955
7957
 
7956
- ._filters-list_1ajw9_7189 {
7958
+ ._filters-list_if78k_7192 {
7957
7959
  padding: 0;
7958
7960
  margin: 0;
7959
7961
  }
7960
- ._filters-list_1ajw9_7189 ol {
7962
+ ._filters-list_if78k_7192 ol {
7961
7963
  padding: 0;
7962
7964
  margin: 0;
7963
7965
  }
7964
7966
 
7965
- ._col-drag-column-icon_1ajw9_7198 {
7967
+ ._col-drag-column-icon_if78k_7201 {
7966
7968
  color: #6a767c;
7967
7969
  }
7968
7970
 
7969
- ._tabular-nums_1ajw9_7202 {
7971
+ ._tabular-nums_if78k_7205 {
7970
7972
  font-variant-numeric: tabular-nums;
7971
7973
  }`;
7972
7974
  document.head.appendChild(document.createElement("style")).appendChild(document.createTextNode(css));
7973
7975
  var styles_default = {
7974
- "contextPanel": "_contextPanel_1ajw9_7156",
7975
- "contextPanel--hidden": "_contextPanel--hidden_1ajw9_7165",
7976
- "contextPanelWrapper": "_contextPanelWrapper_1ajw9_7173",
7977
- "contextPanelBody": "_contextPanelBody_1ajw9_7178",
7978
- "contextPanel-stickyHeader": "_contextPanel-stickyHeader_1ajw9_7182",
7979
- "filters-list": "_filters-list_1ajw9_7189",
7980
- "col-drag-column-icon": "_col-drag-column-icon_1ajw9_7198",
7981
- "tabular-nums": "_tabular-nums_1ajw9_7202",
7982
- "ag-shake-left-to-right": "_ag-shake-left-to-right_1ajw9_369",
7983
- "spin": "_spin_1ajw9_1"
7976
+ "contextPanel": "_contextPanel_if78k_7159",
7977
+ "contextPanel--hidden": "_contextPanel--hidden_if78k_7168",
7978
+ "contextPanelWrapper": "_contextPanelWrapper_if78k_7176",
7979
+ "contextPanelBody": "_contextPanelBody_if78k_7181",
7980
+ "contextPanel-stickyHeader": "_contextPanel-stickyHeader_if78k_7185",
7981
+ "filters-list": "_filters-list_if78k_7192",
7982
+ "col-drag-column-icon": "_col-drag-column-icon_if78k_7201",
7983
+ "tabular-nums": "_tabular-nums_if78k_7205",
7984
+ "ag-shake-left-to-right": "_ag-shake-left-to-right_if78k_369",
7985
+ "spin": "_spin_if78k_1"
7984
7986
  };
7985
7987
 
7986
7988
  // src/utils/getCellValueTypographyProps.ts
@@ -54358,6 +54360,9 @@ function useFilterState({
54358
54360
  },
54359
54361
  [gridApi]
54360
54362
  );
54363
+ const filterableColumns = React80.useMemo(() => {
54364
+ return columnDefinitions.filter((colDef) => !!colDef.filterRenderer).sort(sortColumnDefinitionsByFilterIndex);
54365
+ }, [columnDefinitions]);
54361
54366
  const getFieldFilters = React80.useCallback(() => {
54362
54367
  return filterableColumns.map((column2) => {
54363
54368
  const filterInstance = getFieldFilter(column2.field);
@@ -54371,10 +54376,7 @@ function useFilterState({
54371
54376
  ...instanceOptions
54372
54377
  };
54373
54378
  }).filter((filter) => filter.instance !== void 0);
54374
- }, [getFieldFilter, gridApi]);
54375
- const filterableColumns = React80.useMemo(() => {
54376
- return columnDefinitions.filter((colDef) => !!colDef.filterRenderer).sort(sortColumnDefinitionsByFilterIndex);
54377
- }, [columnDefinitions]);
54379
+ }, [getFieldFilter, gridApi, filterableColumns]);
54378
54380
  const filterEventFunction = function filterEventFunction2() {
54379
54381
  if (listenersEnabled.current) {
54380
54382
  const allFilters = getFieldFilters();
@@ -54490,6 +54492,10 @@ function ClientSideMultiSelectFilterRenderer({
54490
54492
  value = [],
54491
54493
  ...props
54492
54494
  }) {
54495
+ const filterOptions = React80.useMemo(
54496
+ () => (options ?? []).map((option) => option ?? ""),
54497
+ [options]
54498
+ );
54493
54499
  return /* @__PURE__ */ React80.createElement(
54494
54500
  MultiSelect,
54495
54501
  {
@@ -54505,8 +54511,8 @@ function ClientSideMultiSelectFilterRenderer({
54505
54511
  return getLabel((_a = columnDefinition.filterProps) == null ? void 0 : _a.getLabel, option);
54506
54512
  },
54507
54513
  onChange,
54508
- options,
54509
- value: intersection(value || [], options)
54514
+ options: filterOptions,
54515
+ value: intersection(value || [], filterOptions)
54510
54516
  }
54511
54517
  );
54512
54518
  }
@@ -57242,7 +57248,7 @@ var SortComponent = (props) => {
57242
57248
  return null;
57243
57249
  };
57244
57250
  var isRowSelected = (rowNode) => {
57245
- return Boolean(rowNode.selectable ? rowNode.isSelected() : true);
57251
+ return Boolean(rowNode.selectable ? rowNode.isSelected() : false);
57246
57252
  };
57247
57253
  var GenericHeaderRenderer = (props) => {
57248
57254
  var _a;
@@ -57298,22 +57304,26 @@ var GenericHeaderRenderer = (props) => {
57298
57304
  }, []);
57299
57305
  React80.useEffect(() => {
57300
57306
  function calculatePosition() {
57301
- const columns = props.columnApi.getColumnState();
57302
- if (!(columns == null ? void 0 : columns.length)) {
57307
+ const visibleColumns = props.columnApi.getAllDisplayedColumns();
57308
+ if (!(visibleColumns == null ? void 0 : visibleColumns.length))
57303
57309
  return;
57304
- }
57305
- if (columns[0].colId === colId) {
57306
- setIsFirstColumn(true);
57307
- } else {
57308
- setIsFirstColumn(false);
57309
- }
57310
+ const isCurrentFirst = visibleColumns[0].getColId() === colId;
57311
+ setIsFirstColumn(isCurrentFirst);
57310
57312
  }
57311
57313
  props.api.addEventListener("columnMoved", calculatePosition);
57314
+ props.api.addEventListener("columnPinned", calculatePosition);
57315
+ props.api.addEventListener("columnVisible", calculatePosition);
57312
57316
  calculatePosition();
57313
57317
  return () => {
57314
57318
  removeEventListenerFromGrid("columnMoved", calculatePosition, props.api);
57319
+ removeEventListenerFromGrid("columnPinned", calculatePosition, props.api);
57320
+ removeEventListenerFromGrid(
57321
+ "columnVisible",
57322
+ calculatePosition,
57323
+ props.api
57324
+ );
57315
57325
  };
57316
- }, []);
57326
+ }, [colId, props.api]);
57317
57327
  const onSortToggled = (event) => {
57318
57328
  var _a2, _b, _c;
57319
57329
  let currentSort = null;
@@ -57531,7 +57541,7 @@ var GenericHeaderRenderer = (props) => {
57531
57541
  }
57532
57542
  function updateSelectAllCheckbox(e) {
57533
57543
  var _a2;
57534
- if (e.source === "uiSelectAll") {
57544
+ if (e && e.source === "uiSelectAll") {
57535
57545
  return;
57536
57546
  }
57537
57547
  const selectionState = props.api.getServerSideSelectionState();
@@ -57544,7 +57554,10 @@ var GenericHeaderRenderer = (props) => {
57544
57554
  );
57545
57555
  const isPagination = Boolean(props.api.paginationGetRowCount());
57546
57556
  const currentRows = getCurrentRows(props.api, isPagination);
57547
- const isAllSelected = isPagination ? currentRows.length && currentRows.every(isRowSelected) : isSelectionStateSelectAll;
57557
+ const selectableRows = currentRows.filter(
57558
+ (rowNode) => rowNode.selectable
57559
+ );
57560
+ const isAllSelected = isPagination ? selectableRows.length > 0 && selectableRows.every(isRowSelected) : isSelectionStateSelectAll;
57548
57561
  const isPartialSelected = isPagination ? !isAllSelected && currentRows.some(isRowSelected) : isSelectionStatePartialSelected;
57549
57562
  if (isAllSelected) {
57550
57563
  setSelectAll("all" /* All */);
@@ -57556,6 +57569,7 @@ var GenericHeaderRenderer = (props) => {
57556
57569
  }
57557
57570
  props.api.addEventListener(selectionChanged, updateSelectAllCheckbox);
57558
57571
  props.api.addEventListener(paginationChanged, updateSelectAllCheckbox);
57572
+ updateSelectAllCheckbox();
57559
57573
  return () => {
57560
57574
  removeEventListenerFromGrid(
57561
57575
  selectionChanged,
@@ -57793,6 +57807,11 @@ function getGroupNodes(params) {
57793
57807
  function CustomLoader(params) {
57794
57808
  const I18n = useI18nContext();
57795
57809
  const groupNodes = getGroupNodes(params);
57810
+ const internalTableContext = useInternalTableContext();
57811
+ const hasDuplicateRowIds = internalTableContext.hasDuplicateRowIds ?? false;
57812
+ if (hasDuplicateRowIds) {
57813
+ return null;
57814
+ }
57796
57815
  if (params.node === groupNodes.firstLoading) {
57797
57816
  return /* @__PURE__ */ React80.createElement(Flex, { style: { paddingLeft: "16px" } }, /* @__PURE__ */ React80.createElement(
57798
57817
  LevelIndents,
@@ -58500,7 +58519,8 @@ var InternalTableContext = React80.createContext({
58500
58519
  },
58501
58520
  totalRowCount: 0,
58502
58521
  setTotalRowCount: () => {
58503
- }
58522
+ },
58523
+ hasDuplicateRowIds: false
58504
58524
  });
58505
58525
  var useInternalTableContext = () => React80.useContext(InternalTableContext);
58506
58526
  var prng = detectPrng(true);
@@ -105862,7 +105882,7 @@ var en_AU_default = {
105862
105882
  autoSizeAllColumns: "Autosize all columns",
105863
105883
  hideColumn: "Hide column",
105864
105884
  resetColumns: "Reset columns",
105865
- unGroupBy: "Un-Group by {{label}}",
105885
+ unGroupBy: "Un-group by {{label}}",
105866
105886
  groupBy: "Group by {{label}}"
105867
105887
  },
105868
105888
  grandTotals: "Grand totals",
@@ -106025,7 +106045,7 @@ var en_CA_default = {
106025
106045
  autoSizeAllColumns: "Autosize all columns",
106026
106046
  hideColumn: "Hide column",
106027
106047
  resetColumns: "Reset columns",
106028
- unGroupBy: "Un-Group by {{label}}",
106048
+ unGroupBy: "Un-group by {{label}}",
106029
106049
  groupBy: "Group by {{label}}"
106030
106050
  },
106031
106051
  grandTotals: "Grand totals",
@@ -106600,7 +106620,7 @@ var es_default = {
106600
106620
  description: "Una vez que su equipo cree \xEDtems, podr\xE1 acceder a ellos aqu\xED. ",
106601
106621
  title: "No hay \xEDtems para mostrar en este momento",
106602
106622
  itemsTitle: "No hay %{itemsLabel} para mostrar en este momento",
106603
- tooltip: "El bot\xF3n %{featureName} se habilitar\xE1 una vez que agregue informaci\xF3n al %{tableName}",
106623
+ tooltip: "El bot\xF3n %{featureName} se habilitar\xE1 una vez que agregue informaci\xF3n a la %{tableName}.",
106604
106624
  searchTooltip: "La b\xFAsqueda se habilitar\xE1 una vez que agregue informaci\xF3n a %{tableName}",
106605
106625
  featureFilter: "Filtro",
106606
106626
  featureQuickFilter: "Filtro r\xE1pido",
@@ -106614,7 +106634,7 @@ var es_default = {
106614
106634
  bulkEdit: "Edici\xF3n masiva",
106615
106635
  cancel: "Cancelar",
106616
106636
  editValues: "Editar valores",
106617
- error: "Lo sentimos, no se pudieron actualizar los \xEDtems. Vuelva a intentarlo.",
106637
+ error: "Lo sentimos, no se pudieron actualizar los \xEDtems. Int\xE9ntelo de nuevo.",
106618
106638
  placeholderForField: "Ingrese %{fieldName}",
106619
106639
  selection: "%{count} %{number} seleccionado",
106620
106640
  success: "Los \xEDtems se actualizaron correctamente.",
@@ -106660,14 +106680,14 @@ var es_default = {
106660
106680
  }
106661
106681
  },
106662
106682
  loading: {
106663
- initial: "Cargando informaci\xF3n.",
106683
+ initial: "Cargando informaci\xF3n...",
106664
106684
  secondary: "Cargando informaci\xF3n. Gracias por su paciencia."
106665
106685
  },
106666
106686
  menuOptions: {
106667
106687
  sortMenuItem: {
106668
106688
  label: "Ordenar por esta columna",
106669
- sortAscItem: "Ordenar columna ascendente",
106670
- sortDescItem: "Ordenar columna descendente",
106689
+ sortAscItem: "Ordenar columna - Ascendente",
106690
+ sortDescItem: "Ordenar columna - Descendente",
106671
106691
  sortResetItem: "Columna no ordenada"
106672
106692
  },
106673
106693
  expandAllGroups: "Expandir todos los grupos",
@@ -106777,7 +106797,7 @@ var fr_CA_default = {
106777
106797
  bulkEdit: "Modifier en bloc",
106778
106798
  cancel: "Annuler",
106779
106799
  editValues: "Modifier les valeurs",
106780
- error: "D\xE9sol\xE9, les items n'ont pas pu \xEAtre mis \xE0 jour. R\xE9essayer.",
106800
+ error: "D\xE9sol\xE9, les items n'ont pas pu \xEAtre mis \xE0 jour. Veuillez r\xE9essayer.",
106781
106801
  placeholderForField: "Entrez %{fieldName}",
106782
106802
  selection: "%{count} %{number} s\xE9lectionn\xE9",
106783
106803
  success: "Les items ont \xE9t\xE9 mis \xE0 jour avec succ\xE8s.",
@@ -106940,7 +106960,7 @@ var fr_FR_default = {
106940
106960
  bulkEdit: "Modifier en masse",
106941
106961
  cancel: "Annuler",
106942
106962
  editValues: "Modifier les valeurs",
106943
- error: "D\xE9sol\xE9, les \xE9l\xE9ments n'ont pas pu \xEAtre mis \xE0 jour. R\xE9essayez.",
106963
+ error: "D\xE9sol\xE9, les \xE9l\xE9ments n'ont pas pu \xEAtre mis \xE0 jour. Veuillez r\xE9essayer.",
106944
106964
  placeholderForField: "Saisissez %{fieldName}",
106945
106965
  selection: "%{count} %{number} s\xE9lectionn\xE9",
106946
106966
  success: "Les \xE9l\xE9ments ont bien \xE9t\xE9 mis \xE0 jour.",
@@ -107758,7 +107778,7 @@ var pt_BR_default = {
107758
107778
  bulkEdit: "Edi\xE7\xE3o em Massa",
107759
107779
  cancel: "Cancelar",
107760
107780
  editValues: "Editar Valores",
107761
- error: "Lamentamos, mas n\xE3o foi poss\xEDvel atualizar os itens. Tente novamente.",
107781
+ error: "Sentimos muito, mas n\xE3o foi poss\xEDvel atualizar os itens. Tente novamente.",
107762
107782
  placeholderForField: "Digite %{fieldName}",
107763
107783
  selection: "%{count} %{number} selecionado",
107764
107784
  success: "Os itens foram atualizados com sucesso.",
@@ -107921,7 +107941,7 @@ var th_TH_default = {
107921
107941
  bulkEdit: "\u0E01\u0E32\u0E23\u0E41\u0E01\u0E49\u0E44\u0E02\u0E41\u0E1A\u0E1A\u0E01\u0E25\u0E38\u0E48\u0E21",
107922
107942
  cancel: "\u0E22\u0E01\u0E40\u0E25\u0E34\u0E01",
107923
107943
  editValues: "\u0E41\u0E01\u0E49\u0E44\u0E02\u0E04\u0E48\u0E32",
107924
- error: "\u0E02\u0E2D\u0E2D\u0E20\u0E31\u0E22 \u0E44\u0E21\u0E48\u0E2A\u0E32\u0E21\u0E32\u0E23\u0E16\u0E2D\u0E31\u0E1B\u0E40\u0E14\u0E15\u0E23\u0E32\u0E22\u0E01\u0E32\u0E23\u0E44\u0E14\u0E49 \u0E42\u0E1B\u0E23\u0E14\u0E25\u0E2D\u0E07\u0E2D\u0E35\u0E01\u0E04\u0E23\u0E31\u0E49\u0E07",
107944
+ error: "\u0E02\u0E2D\u0E2D\u0E20\u0E31\u0E22 \u0E44\u0E21\u0E48\u0E2A\u0E32\u0E21\u0E32\u0E23\u0E16\u0E2D\u0E31\u0E1B\u0E40\u0E14\u0E15\u0E23\u0E32\u0E22\u0E01\u0E32\u0E23\u0E44\u0E14\u0E49 \u0E25\u0E2D\u0E07\u0E2D\u0E35\u0E01\u0E04\u0E23\u0E31\u0E49\u0E07.",
107925
107945
  placeholderForField: "\u0E1B\u0E49\u0E2D\u0E19 %{fieldName}",
107926
107946
  selection: "%{count} %{number} \u0E17\u0E35\u0E48\u0E40\u0E25\u0E37\u0E2D\u0E01",
107927
107947
  success: "\u0E2D\u0E31\u0E1B\u0E40\u0E14\u0E15\u0E23\u0E32\u0E22\u0E01\u0E32\u0E23\u0E2A\u0E33\u0E40\u0E23\u0E47\u0E08\u0E41\u0E25\u0E49\u0E27",
@@ -109219,8 +109239,7 @@ var DataTable = ({
109219
109239
  showExpandCollapseAllToggle,
109220
109240
  translations: translations2 = {},
109221
109241
  enableCellTextSelection,
109222
- localStoragePersistenceKey,
109223
- enableCDN
109242
+ localStoragePersistenceKey
109224
109243
  }) => {
109225
109244
  const initialTableConfig = localStoragePersistenceKey && storage.local.getItem(localStoragePersistenceKey) || _initialTableConfig;
109226
109245
  const onServerSideDataRequestRef = React80.useRef(onServerSideDataRequest);
@@ -109232,28 +109251,14 @@ var DataTable = ({
109232
109251
  );
109233
109252
  const contextPanel = useContextPanel();
109234
109253
  const clientI18n = useI18nContext();
109235
- const isCDNEnabled = isCDNFeatureFlagEnabled(clientI18n, enableCDN);
109236
- const cdnTranslations = useRequestTranslations(
109237
- {
109238
- locale: clientI18n.locale,
109239
- type: "file",
109240
- absolute_file_path: (locale) => `core/packages/data-table/src/locales/${locale}`
109241
- },
109242
- { en: translations.en, pseudo: translations.pseudo },
109243
- {
109244
- oldTranslations: translations,
109245
- enableCDN: isCDNEnabled
109246
- }
109247
- );
109248
109254
  const internalI18n = useI18n({
109249
- locale: clientI18n.locale,
109255
+ ...clientI18n,
109250
109256
  translations: mergeDeepLeft(
109251
109257
  mergeDeepLeft(clientI18n.translations, {
109252
109258
  [clientI18n.locale]: translations2
109253
109259
  }),
109254
- cdnTranslations.translations
109255
- ),
109256
- enableCDN: isCDNEnabled
109260
+ translations
109261
+ )
109257
109262
  });
109258
109263
  const rowSelectionRef = React80.useRef({
109259
109264
  affectedRows: {},
@@ -109304,6 +109309,7 @@ var DataTable = ({
109304
109309
  );
109305
109310
  const [gridApi, setGridApi] = React80.useState();
109306
109311
  const [columnApi, setColumnApi] = React80.useState();
109312
+ const [hasDuplicateRowIds, setHasDuplicateRowIds] = React80.useState(false);
109307
109313
  const searchStorage = useSearchStorage();
109308
109314
  const filterState = useFilterState({
109309
109315
  columnDefinitions: columns,
@@ -109381,7 +109387,9 @@ var DataTable = ({
109381
109387
  gridApi == null ? void 0 : gridApi.hideOverlay.bind(gridApi),
109382
109388
  filterStorage.filtersState,
109383
109389
  searchStorage.searchValue,
109384
- setTotalRowCount
109390
+ setTotalRowCount,
109391
+ setHasDuplicateRowIds,
109392
+ getRowId
109385
109393
  )
109386
109394
  );
109387
109395
  gridApi == null ? void 0 : gridApi.paginationGoToPage(0);
@@ -109476,7 +109484,8 @@ var DataTable = ({
109476
109484
  tableRef,
109477
109485
  totalRowCount,
109478
109486
  setTotalRowCount,
109479
- updateServerSideDataSource
109487
+ updateServerSideDataSource,
109488
+ hasDuplicateRowIds
109480
109489
  }
109481
109490
  },
109482
109491
  children
@@ -109487,12 +109496,34 @@ var rowDragMoveEvent;
109487
109496
  var rowDragEndEvent;
109488
109497
  function getServerSideDatasource(onServerSideDataRequestCallbackRef, onEmptyResponseCallback = () => {
109489
109498
  }, onNonEmptyResponseCallback = () => {
109490
- }, filters, search, setTotalRowCount) {
109499
+ }, filters, search, setTotalRowCount, setHasDuplicateRowIds, getRowId) {
109491
109500
  return {
109492
109501
  getRows: async (params) => {
109493
109502
  if (onServerSideDataRequestCallbackRef.current) {
109494
109503
  const { request, success, fail } = params;
109495
109504
  const onSuccess = (loadSuccessParams) => {
109505
+ const { rowData } = loadSuccessParams;
109506
+ if (rowData && Array.isArray(rowData) && getRowId) {
109507
+ const uniqueRowIds = /* @__PURE__ */ new Set();
109508
+ for (const row2 of rowData) {
109509
+ const id = getRowId({
109510
+ data: row2,
109511
+ level: 0,
109512
+ api: {},
109513
+ columnApi: {},
109514
+ context: {}
109515
+ });
109516
+ if (uniqueRowIds.has(id)) {
109517
+ setHasDuplicateRowIds(true);
109518
+ logger.error(
109519
+ "Duplicate row IDs detected in rowData. Check getRowId() to ensure it returns unique IDs."
109520
+ );
109521
+ fail();
109522
+ return;
109523
+ }
109524
+ uniqueRowIds.add(id);
109525
+ }
109526
+ }
109496
109527
  if (!loadSuccessParams.rowCount && request.groupKeys.length === 0) {
109497
109528
  onEmptyResponseCallback();
109498
109529
  } else {
@@ -110510,13 +110541,7 @@ function ClientSideFilterInner(props) {
110510
110541
  var _a, _b;
110511
110542
  const { Component: Component4, columnDefinition, onChange, options, value } = props;
110512
110543
  const filterHeading = ((_b = (_a = columnDefinition.filterProps) == null ? void 0 : _a.getFilterHeadingText) == null ? void 0 : _b.call(_a, columnDefinition)) ?? columnDefinition.headerName;
110513
- const filterOptions = React80.useMemo(
110514
- () => {
110515
- var _a2;
110516
- return (_a2 = options ?? []) == null ? void 0 : _a2.filter((option) => !!option);
110517
- },
110518
- [options]
110519
- );
110544
+ const filterOptions = React80.useMemo(() => options ?? [], [options]);
110520
110545
  return /* @__PURE__ */ React80.createElement(Box, { as: "li", display: "block", paddingBottom: "xl", style: { width: "100%" } }, filterHeading ? /* @__PURE__ */ React80.createElement(
110521
110546
  Label$1,
110522
110547
  {
@@ -112489,8 +112514,7 @@ var ClientSideDataTable = ({
112489
112514
  onTableConfigChange,
112490
112515
  translations: translations2 = {},
112491
112516
  enableCellTextSelection,
112492
- localStoragePersistenceKey,
112493
- enableCDN
112517
+ localStoragePersistenceKey
112494
112518
  }) => {
112495
112519
  return /* @__PURE__ */ React80.createElement(
112496
112520
  DataTable,
@@ -112508,8 +112532,7 @@ var ClientSideDataTable = ({
112508
112532
  translations: translations2,
112509
112533
  localStoragePersistenceKey,
112510
112534
  customBulkEditorFields,
112511
- enableCellTextSelection,
112512
- enableCDN
112535
+ enableCellTextSelection
112513
112536
  },
112514
112537
  children
112515
112538
  );
@@ -116970,8 +116993,7 @@ var ServerSideDataTable = ({
116970
116993
  enableCellTextSelection,
116971
116994
  showExpandCollapseAllToggle,
116972
116995
  translations: translations2 = {},
116973
- localStoragePersistenceKey,
116974
- enableCDN
116996
+ localStoragePersistenceKey
116975
116997
  }) => {
116976
116998
  return /* @__PURE__ */ React80.createElement(
116977
116999
  DataTable,
@@ -116990,8 +117012,7 @@ var ServerSideDataTable = ({
116990
117012
  translations: translations2,
116991
117013
  customBulkEditorFields,
116992
117014
  enableCellTextSelection,
116993
- localStoragePersistenceKey,
116994
- enableCDN
117015
+ localStoragePersistenceKey
116995
117016
  },
116996
117017
  children
116997
117018
  );