@procore/data-table 14.28.0-cdn.1 → 14.28.0-cdn.10

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.
@@ -1409,7 +1409,7 @@ ag-grid, ag-grid-angular, ag-grid-ng2, ag-grid-polymer, ag-grid-aurelia {
1409
1409
  animation-iteration-count: infinite;
1410
1410
  animation-name: ag-shake-left-to-right;
1411
1411
  }
1412
- @keyframes _ag-shake-left-to-right_1ajw9_369 {
1412
+ @keyframes _ag-shake-left-to-right_if78k_369 {
1413
1413
  from {
1414
1414
  padding-left: 6px;
1415
1415
  padding-right: 2px;
@@ -5410,7 +5410,7 @@ input[class^=ag-][type=button]:focus, button[class^=ag-]:focus {
5410
5410
  animation-iteration-count: infinite;
5411
5411
  animation-timing-function: linear;
5412
5412
  }
5413
- @keyframes _spin_1ajw9_1 {
5413
+ @keyframes _spin_if78k_1 {
5414
5414
  from {
5415
5415
  transform: rotate(0deg);
5416
5416
  }
@@ -7665,6 +7665,9 @@ input[class^=ag-][type=range]:disabled {
7665
7665
  .ag-theme-alpine.ag-theme-alpine .ag-icon-tree-open::before {
7666
7666
  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>");
7667
7667
  }
7668
+ .ag-theme-alpine.ag-theme-alpine .ag-header-cell-resize {
7669
+ right: -5px;
7670
+ }
7668
7671
  .ag-theme-alpine.ag-theme-alpine .ag-header-cell-resize::after {
7669
7672
  width: 1px;
7670
7673
  height: 100%;
@@ -7918,7 +7921,7 @@ input[class^=ag-][type=range]:disabled {
7918
7921
  padding-left: 16px;
7919
7922
  }
7920
7923
 
7921
- div._contextPanel_1ajw9_7156 {
7924
+ div._contextPanel_if78k_7159 {
7922
7925
  width: 400px;
7923
7926
  transition: all ease 500ms;
7924
7927
  flex: 0 0 auto;
@@ -7927,7 +7930,7 @@ div._contextPanel_1ajw9_7156 {
7927
7930
  border: 1px solid #d6dadc;
7928
7931
  display: flex;
7929
7932
  }
7930
- div._contextPanel--hidden_1ajw9_7165 {
7933
+ div._contextPanel--hidden_if78k_7168 {
7931
7934
  border: none;
7932
7935
  overflow: hidden;
7933
7936
  padding: 0px;
@@ -7935,50 +7938,50 @@ div._contextPanel--hidden_1ajw9_7165 {
7935
7938
  width: 0px;
7936
7939
  }
7937
7940
 
7938
- ._contextPanelWrapper_1ajw9_7173 {
7941
+ ._contextPanelWrapper_if78k_7176 {
7939
7942
  position: relative;
7940
7943
  flex-grow: 1;
7941
7944
  }
7942
7945
 
7943
- ._contextPanelBody_1ajw9_7178 {
7946
+ ._contextPanelBody_if78k_7181 {
7944
7947
  width: clamp(380px, 400px, 100%);
7945
7948
  }
7946
7949
 
7947
- ._contextPanel-stickyHeader_1ajw9_7182 {
7950
+ ._contextPanel-stickyHeader_if78k_7185 {
7948
7951
  background-color: #ffffff;
7949
7952
  position: sticky;
7950
7953
  top: 0;
7951
7954
  z-index: 5;
7952
7955
  }
7953
7956
 
7954
- ._filters-list_1ajw9_7189 {
7957
+ ._filters-list_if78k_7192 {
7955
7958
  padding: 0;
7956
7959
  margin: 0;
7957
7960
  }
7958
- ._filters-list_1ajw9_7189 ol {
7961
+ ._filters-list_if78k_7192 ol {
7959
7962
  padding: 0;
7960
7963
  margin: 0;
7961
7964
  }
7962
7965
 
7963
- ._col-drag-column-icon_1ajw9_7198 {
7966
+ ._col-drag-column-icon_if78k_7201 {
7964
7967
  color: #6a767c;
7965
7968
  }
7966
7969
 
7967
- ._tabular-nums_1ajw9_7202 {
7970
+ ._tabular-nums_if78k_7205 {
7968
7971
  font-variant-numeric: tabular-nums;
7969
7972
  }`;
7970
7973
  document.head.appendChild(document.createElement("style")).appendChild(document.createTextNode(css));
7971
7974
  var styles_default = {
7972
- "contextPanel": "_contextPanel_1ajw9_7156",
7973
- "contextPanel--hidden": "_contextPanel--hidden_1ajw9_7165",
7974
- "contextPanelWrapper": "_contextPanelWrapper_1ajw9_7173",
7975
- "contextPanelBody": "_contextPanelBody_1ajw9_7178",
7976
- "contextPanel-stickyHeader": "_contextPanel-stickyHeader_1ajw9_7182",
7977
- "filters-list": "_filters-list_1ajw9_7189",
7978
- "col-drag-column-icon": "_col-drag-column-icon_1ajw9_7198",
7979
- "tabular-nums": "_tabular-nums_1ajw9_7202",
7980
- "ag-shake-left-to-right": "_ag-shake-left-to-right_1ajw9_369",
7981
- "spin": "_spin_1ajw9_1"
7975
+ "contextPanel": "_contextPanel_if78k_7159",
7976
+ "contextPanel--hidden": "_contextPanel--hidden_if78k_7168",
7977
+ "contextPanelWrapper": "_contextPanelWrapper_if78k_7176",
7978
+ "contextPanelBody": "_contextPanelBody_if78k_7181",
7979
+ "contextPanel-stickyHeader": "_contextPanel-stickyHeader_if78k_7185",
7980
+ "filters-list": "_filters-list_if78k_7192",
7981
+ "col-drag-column-icon": "_col-drag-column-icon_if78k_7201",
7982
+ "tabular-nums": "_tabular-nums_if78k_7205",
7983
+ "ag-shake-left-to-right": "_ag-shake-left-to-right_if78k_369",
7984
+ "spin": "_spin_if78k_1"
7982
7985
  };
7983
7986
 
7984
7987
  // src/utils/getCellValueTypographyProps.ts
@@ -54309,6 +54312,9 @@ function useFilterState({
54309
54312
  },
54310
54313
  [gridApi]
54311
54314
  );
54315
+ const filterableColumns = React80.useMemo(() => {
54316
+ return columnDefinitions.filter((colDef) => !!colDef.filterRenderer).sort(sortColumnDefinitionsByFilterIndex);
54317
+ }, [columnDefinitions]);
54312
54318
  const getFieldFilters = React80.useCallback(() => {
54313
54319
  return filterableColumns.map((column2) => {
54314
54320
  const filterInstance = getFieldFilter(column2.field);
@@ -54322,10 +54328,7 @@ function useFilterState({
54322
54328
  ...instanceOptions
54323
54329
  };
54324
54330
  }).filter((filter) => filter.instance !== void 0);
54325
- }, [getFieldFilter, gridApi]);
54326
- const filterableColumns = React80.useMemo(() => {
54327
- return columnDefinitions.filter((colDef) => !!colDef.filterRenderer).sort(sortColumnDefinitionsByFilterIndex);
54328
- }, [columnDefinitions]);
54331
+ }, [getFieldFilter, gridApi, filterableColumns]);
54329
54332
  const filterEventFunction = function filterEventFunction2() {
54330
54333
  if (listenersEnabled.current) {
54331
54334
  const allFilters = getFieldFilters();
@@ -54436,6 +54439,10 @@ function ClientSideMultiSelectFilterRenderer({
54436
54439
  value = [],
54437
54440
  ...props
54438
54441
  }) {
54442
+ const filterOptions = React80.useMemo(
54443
+ () => (options ?? []).map((option) => option ?? ""),
54444
+ [options]
54445
+ );
54439
54446
  return /* @__PURE__ */ React80.createElement(
54440
54447
  MultiSelect,
54441
54448
  {
@@ -54449,8 +54456,8 @@ function ClientSideMultiSelectFilterRenderer({
54449
54456
  return getLabel(columnDefinition.filterProps?.getLabel, option);
54450
54457
  },
54451
54458
  onChange,
54452
- options,
54453
- value: intersection(value || [], options)
54459
+ options: filterOptions,
54460
+ value: intersection(value || [], filterOptions)
54454
54461
  }
54455
54462
  );
54456
54463
  }
@@ -57141,7 +57148,7 @@ var SortComponent = (props) => {
57141
57148
  return null;
57142
57149
  };
57143
57150
  var isRowSelected = (rowNode) => {
57144
- return Boolean(rowNode.selectable ? rowNode.isSelected() : true);
57151
+ return Boolean(rowNode.selectable ? rowNode.isSelected() : false);
57145
57152
  };
57146
57153
  var GenericHeaderRenderer = (props) => {
57147
57154
  const colDef = props.column.getColDef();
@@ -57196,22 +57203,26 @@ var GenericHeaderRenderer = (props) => {
57196
57203
  }, []);
57197
57204
  React80.useEffect(() => {
57198
57205
  function calculatePosition() {
57199
- const columns = props.columnApi.getColumnState();
57200
- if (!columns?.length) {
57206
+ const visibleColumns = props.columnApi.getAllDisplayedColumns();
57207
+ if (!visibleColumns?.length)
57201
57208
  return;
57202
- }
57203
- if (columns[0].colId === colId) {
57204
- setIsFirstColumn(true);
57205
- } else {
57206
- setIsFirstColumn(false);
57207
- }
57209
+ const isCurrentFirst = visibleColumns[0].getColId() === colId;
57210
+ setIsFirstColumn(isCurrentFirst);
57208
57211
  }
57209
57212
  props.api.addEventListener("columnMoved", calculatePosition);
57213
+ props.api.addEventListener("columnPinned", calculatePosition);
57214
+ props.api.addEventListener("columnVisible", calculatePosition);
57210
57215
  calculatePosition();
57211
57216
  return () => {
57212
57217
  removeEventListenerFromGrid("columnMoved", calculatePosition, props.api);
57218
+ removeEventListenerFromGrid("columnPinned", calculatePosition, props.api);
57219
+ removeEventListenerFromGrid(
57220
+ "columnVisible",
57221
+ calculatePosition,
57222
+ props.api
57223
+ );
57213
57224
  };
57214
- }, []);
57225
+ }, [colId, props.api]);
57215
57226
  const onSortToggled = (event) => {
57216
57227
  let currentSort = null;
57217
57228
  if (Array.from(checkbox.current?.parentElement?.children || []).includes(
@@ -57423,7 +57434,7 @@ var GenericHeaderRenderer = (props) => {
57423
57434
  return;
57424
57435
  }
57425
57436
  function updateSelectAllCheckbox(e) {
57426
- if (e.source === "uiSelectAll") {
57437
+ if (e && e.source === "uiSelectAll") {
57427
57438
  return;
57428
57439
  }
57429
57440
  const selectionState = props.api.getServerSideSelectionState();
@@ -57436,7 +57447,10 @@ var GenericHeaderRenderer = (props) => {
57436
57447
  );
57437
57448
  const isPagination = Boolean(props.api.paginationGetRowCount());
57438
57449
  const currentRows = getCurrentRows(props.api, isPagination);
57439
- const isAllSelected = isPagination ? currentRows.length && currentRows.every(isRowSelected) : isSelectionStateSelectAll;
57450
+ const selectableRows = currentRows.filter(
57451
+ (rowNode) => rowNode.selectable
57452
+ );
57453
+ const isAllSelected = isPagination ? selectableRows.length > 0 && selectableRows.every(isRowSelected) : isSelectionStateSelectAll;
57440
57454
  const isPartialSelected = isPagination ? !isAllSelected && currentRows.some(isRowSelected) : isSelectionStatePartialSelected;
57441
57455
  if (isAllSelected) {
57442
57456
  setSelectAll("all" /* All */);
@@ -57448,6 +57462,7 @@ var GenericHeaderRenderer = (props) => {
57448
57462
  }
57449
57463
  props.api.addEventListener(selectionChanged, updateSelectAllCheckbox);
57450
57464
  props.api.addEventListener(paginationChanged, updateSelectAllCheckbox);
57465
+ updateSelectAllCheckbox();
57451
57466
  return () => {
57452
57467
  removeEventListenerFromGrid(
57453
57468
  selectionChanged,
@@ -57682,6 +57697,11 @@ function getGroupNodes(params) {
57682
57697
  function CustomLoader(params) {
57683
57698
  const I18n = useI18nContext();
57684
57699
  const groupNodes = getGroupNodes(params);
57700
+ const internalTableContext = useInternalTableContext();
57701
+ const hasDuplicateRowIds = internalTableContext.hasDuplicateRowIds ?? false;
57702
+ if (hasDuplicateRowIds) {
57703
+ return null;
57704
+ }
57685
57705
  if (params.node === groupNodes.firstLoading) {
57686
57706
  return /* @__PURE__ */ React80.createElement(Flex, { style: { paddingLeft: "16px" } }, /* @__PURE__ */ React80.createElement(
57687
57707
  LevelIndents,
@@ -58370,7 +58390,8 @@ var InternalTableContext = React80.createContext({
58370
58390
  },
58371
58391
  totalRowCount: 0,
58372
58392
  setTotalRowCount: () => {
58373
- }
58393
+ },
58394
+ hasDuplicateRowIds: false
58374
58395
  });
58375
58396
  var useInternalTableContext = () => React80.useContext(InternalTableContext);
58376
58397
  var prng = detectPrng(true);
@@ -105580,6 +105601,9 @@ var de_DE_default = {
105580
105601
  selectCell: {
105581
105602
  placeholder: "{{label}} ausw\xE4hlen"
105582
105603
  },
105604
+ multiSelectCell: {
105605
+ placeholder: "Werte ausw\xE4hlen"
105606
+ },
105583
105607
  booleanCell: {
105584
105608
  options: {
105585
105609
  yes: "Ja",
@@ -105645,7 +105669,7 @@ var en_AU_default = {
105645
105669
  close: "Close",
105646
105670
  locationFilter: {
105647
105671
  selectAll: "Select all",
105648
- includeSublocations: "Include sublocations",
105672
+ includeSublocations: "Include sub-locations",
105649
105673
  searchLocations: "Search locations",
105650
105674
  locations: "Locations"
105651
105675
  },
@@ -105696,7 +105720,7 @@ var en_AU_default = {
105696
105720
  autoSizeAllColumns: "Autosize all columns",
105697
105721
  hideColumn: "Hide column",
105698
105722
  resetColumns: "Reset columns",
105699
- unGroupBy: "Un-Group by {{label}}",
105723
+ unGroupBy: "Un-group by {{label}}",
105700
105724
  groupBy: "Group by {{label}}"
105701
105725
  },
105702
105726
  grandTotals: "Grand totals",
@@ -105743,6 +105767,9 @@ var en_AU_default = {
105743
105767
  selectCell: {
105744
105768
  placeholder: "Select {{label}}"
105745
105769
  },
105770
+ multiSelectCell: {
105771
+ placeholder: "Select values"
105772
+ },
105746
105773
  booleanCell: {
105747
105774
  options: {
105748
105775
  yes: "Yes",
@@ -105859,7 +105886,7 @@ var en_CA_default = {
105859
105886
  autoSizeAllColumns: "Autosize all columns",
105860
105887
  hideColumn: "Hide column",
105861
105888
  resetColumns: "Reset columns",
105862
- unGroupBy: "Un-Group by {{label}}",
105889
+ unGroupBy: "Un-group by {{label}}",
105863
105890
  groupBy: "Group by {{label}}"
105864
105891
  },
105865
105892
  grandTotals: "Grand totals",
@@ -105906,6 +105933,9 @@ var en_CA_default = {
105906
105933
  selectCell: {
105907
105934
  placeholder: "Select {{label}}"
105908
105935
  },
105936
+ multiSelectCell: {
105937
+ placeholder: "Select values"
105938
+ },
105909
105939
  booleanCell: {
105910
105940
  options: {
105911
105941
  yes: "Yes",
@@ -106069,6 +106099,9 @@ var en_GB_default = {
106069
106099
  selectCell: {
106070
106100
  placeholder: "Select {{label}}"
106071
106101
  },
106102
+ multiSelectCell: {
106103
+ placeholder: "Select values"
106104
+ },
106072
106105
  booleanCell: {
106073
106106
  options: {
106074
106107
  yes: "Yes",
@@ -106398,6 +106431,9 @@ var es_ES_default = {
106398
106431
  selectCell: {
106399
106432
  placeholder: "Seleccionar {{label}}"
106400
106433
  },
106434
+ multiSelectCell: {
106435
+ placeholder: "Seleccionar valores"
106436
+ },
106401
106437
  booleanCell: {
106402
106438
  options: {
106403
106439
  yes: "S\xED",
@@ -106434,7 +106470,7 @@ var es_default = {
106434
106470
  description: "Una vez que su equipo cree \xEDtems, podr\xE1 acceder a ellos aqu\xED. ",
106435
106471
  title: "No hay \xEDtems para mostrar en este momento",
106436
106472
  itemsTitle: "No hay %{itemsLabel} para mostrar en este momento",
106437
- tooltip: "El bot\xF3n %{featureName} se habilitar\xE1 una vez que agregue informaci\xF3n al %{tableName}",
106473
+ tooltip: "El bot\xF3n %{featureName} se habilitar\xE1 una vez que agregue informaci\xF3n a la %{tableName}.",
106438
106474
  searchTooltip: "La b\xFAsqueda se habilitar\xE1 una vez que agregue informaci\xF3n a %{tableName}",
106439
106475
  featureFilter: "Filtro",
106440
106476
  featureQuickFilter: "Filtro r\xE1pido",
@@ -106448,7 +106484,7 @@ var es_default = {
106448
106484
  bulkEdit: "Edici\xF3n masiva",
106449
106485
  cancel: "Cancelar",
106450
106486
  editValues: "Editar valores",
106451
- error: "Lo sentimos, no se pudieron actualizar los \xEDtems. Vuelva a intentarlo.",
106487
+ error: "Lo sentimos, no se pudieron actualizar los \xEDtems. Int\xE9ntelo de nuevo.",
106452
106488
  placeholderForField: "Ingrese %{fieldName}",
106453
106489
  selection: "%{count} %{number} seleccionado",
106454
106490
  success: "Los \xEDtems se actualizaron correctamente.",
@@ -106494,14 +106530,14 @@ var es_default = {
106494
106530
  }
106495
106531
  },
106496
106532
  loading: {
106497
- initial: "Cargando informaci\xF3n.",
106533
+ initial: "Cargando informaci\xF3n...",
106498
106534
  secondary: "Cargando informaci\xF3n. Gracias por su paciencia."
106499
106535
  },
106500
106536
  menuOptions: {
106501
106537
  sortMenuItem: {
106502
106538
  label: "Ordenar por esta columna",
106503
- sortAscItem: "Ordenar columna ascendente",
106504
- sortDescItem: "Ordenar columna descendente",
106539
+ sortAscItem: "Ordenar columna - Ascendente",
106540
+ sortDescItem: "Ordenar columna - Descendente",
106505
106541
  sortResetItem: "Columna no ordenada"
106506
106542
  },
106507
106543
  expandAllGroups: "Expandir todos los grupos",
@@ -106561,6 +106597,9 @@ var es_default = {
106561
106597
  selectCell: {
106562
106598
  placeholder: "Seleccionar {{label}}"
106563
106599
  },
106600
+ multiSelectCell: {
106601
+ placeholder: "Seleccionar valores"
106602
+ },
106564
106603
  booleanCell: {
106565
106604
  options: {
106566
106605
  yes: "S\xED",
@@ -106611,7 +106650,7 @@ var fr_CA_default = {
106611
106650
  bulkEdit: "Modifier en bloc",
106612
106651
  cancel: "Annuler",
106613
106652
  editValues: "Modifier les valeurs",
106614
- error: "D\xE9sol\xE9, les items n'ont pas pu \xEAtre mis \xE0 jour. R\xE9essayer.",
106653
+ error: "D\xE9sol\xE9, les items n'ont pas pu \xEAtre mis \xE0 jour. Veuillez r\xE9essayer.",
106615
106654
  placeholderForField: "Entrez %{fieldName}",
106616
106655
  selection: "%{count} %{number} s\xE9lectionn\xE9",
106617
106656
  success: "Les items ont \xE9t\xE9 mis \xE0 jour avec succ\xE8s.",
@@ -106724,6 +106763,9 @@ var fr_CA_default = {
106724
106763
  selectCell: {
106725
106764
  placeholder: "S\xE9lectionner {{label}}"
106726
106765
  },
106766
+ multiSelectCell: {
106767
+ placeholder: "S\xE9lectionner les valeurs"
106768
+ },
106727
106769
  booleanCell: {
106728
106770
  options: {
106729
106771
  yes: "Oui",
@@ -106774,7 +106816,7 @@ var fr_FR_default = {
106774
106816
  bulkEdit: "Modifier en masse",
106775
106817
  cancel: "Annuler",
106776
106818
  editValues: "Modifier les valeurs",
106777
- error: "D\xE9sol\xE9, les \xE9l\xE9ments n'ont pas pu \xEAtre mis \xE0 jour. R\xE9essayez.",
106819
+ error: "D\xE9sol\xE9, les \xE9l\xE9ments n'ont pas pu \xEAtre mis \xE0 jour. Veuillez r\xE9essayer.",
106778
106820
  placeholderForField: "Saisissez %{fieldName}",
106779
106821
  selection: "%{count} %{number} s\xE9lectionn\xE9",
106780
106822
  success: "Les \xE9l\xE9ments ont bien \xE9t\xE9 mis \xE0 jour.",
@@ -106887,6 +106929,9 @@ var fr_FR_default = {
106887
106929
  selectCell: {
106888
106930
  placeholder: "S\xE9lectionner {{label}}"
106889
106931
  },
106932
+ multiSelectCell: {
106933
+ placeholder: "S\xE9lectionner les valeurs"
106934
+ },
106890
106935
  booleanCell: {
106891
106936
  options: {
106892
106937
  yes: "Oui",
@@ -107050,6 +107095,9 @@ var is_IS_default = {
107050
107095
  selectCell: {
107051
107096
  placeholder: "Veldu {{label}}"
107052
107097
  },
107098
+ multiSelectCell: {
107099
+ placeholder: "Veldu Gildi"
107100
+ },
107053
107101
  booleanCell: {
107054
107102
  options: {
107055
107103
  yes: "J\xE1",
@@ -107213,6 +107261,9 @@ var ja_JP_default = {
107213
107261
  selectCell: {
107214
107262
  placeholder: "{{label}}\u3092\u9078\u629E\u3059\u308B"
107215
107263
  },
107264
+ multiSelectCell: {
107265
+ placeholder: "\u5024\u3092\u9078\u629E"
107266
+ },
107216
107267
  booleanCell: {
107217
107268
  options: {
107218
107269
  yes: "\u306F\u3044",
@@ -107376,6 +107427,9 @@ var pl_PL_default = {
107376
107427
  selectCell: {
107377
107428
  placeholder: "Wybierz {{label}}"
107378
107429
  },
107430
+ multiSelectCell: {
107431
+ placeholder: "Wybierz warto\u015Bci"
107432
+ },
107379
107433
  booleanCell: {
107380
107434
  options: {
107381
107435
  yes: "Tak",
@@ -107578,8 +107632,8 @@ var pt_BR_default = {
107578
107632
  description: "Depois que sua equipe criar esses itens, voc\xEA poder\xE1 acess\xE1-los aqui. ",
107579
107633
  title: "N\xE3o H\xE1 Itens para Exibir Agora",
107580
107634
  itemsTitle: "N\xE3o H\xE1 %{itemsLabel} para Exibir Agora",
107581
- tooltip: "O bot\xE3o %{featureName} ser\xE1 ativado assim que voc\xEA adicionar informa\xE7\xF5es ao %{tableName}",
107582
- searchTooltip: "A pesquisa ser\xE1 ativada assim que voc\xEA adicionar informa\xE7\xF5es \xE0 tabela %{tableName}",
107635
+ tooltip: "O bot\xE3o %{featureName} ser\xE1 ativado assim que voc\xEA adicionar informa\xE7\xF5es \xE0 %{tableName}",
107636
+ searchTooltip: "A pesquisa ser\xE1 ativada assim que voc\xEA adicionar informa\xE7\xF5es \xE0 %{tableName}",
107583
107637
  featureFilter: "Filtrar",
107584
107638
  featureQuickFilter: "Filtro r\xE1pido",
107585
107639
  featureGroupBy: "Agrupar por",
@@ -107592,7 +107646,7 @@ var pt_BR_default = {
107592
107646
  bulkEdit: "Edi\xE7\xE3o em Massa",
107593
107647
  cancel: "Cancelar",
107594
107648
  editValues: "Editar Valores",
107595
- error: "Lamentamos, mas n\xE3o foi poss\xEDvel atualizar os itens. Tente novamente.",
107649
+ error: "Sentimos muito, mas n\xE3o foi poss\xEDvel atualizar os itens. Tente novamente.",
107596
107650
  placeholderForField: "Digite %{fieldName}",
107597
107651
  selection: "%{count} %{number} selecionado",
107598
107652
  success: "Os itens foram atualizados com sucesso.",
@@ -107705,6 +107759,9 @@ var pt_BR_default = {
107705
107759
  selectCell: {
107706
107760
  placeholder: "Selecionar {{label}}"
107707
107761
  },
107762
+ multiSelectCell: {
107763
+ placeholder: "Selecionar Valores"
107764
+ },
107708
107765
  booleanCell: {
107709
107766
  options: {
107710
107767
  yes: "Sim",
@@ -107755,7 +107812,7 @@ var th_TH_default = {
107755
107812
  bulkEdit: "\u0E01\u0E32\u0E23\u0E41\u0E01\u0E49\u0E44\u0E02\u0E41\u0E1A\u0E1A\u0E01\u0E25\u0E38\u0E48\u0E21",
107756
107813
  cancel: "\u0E22\u0E01\u0E40\u0E25\u0E34\u0E01",
107757
107814
  editValues: "\u0E41\u0E01\u0E49\u0E44\u0E02\u0E04\u0E48\u0E32",
107758
- 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",
107815
+ 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.",
107759
107816
  placeholderForField: "\u0E1B\u0E49\u0E2D\u0E19 %{fieldName}",
107760
107817
  selection: "%{count} %{number} \u0E17\u0E35\u0E48\u0E40\u0E25\u0E37\u0E2D\u0E01",
107761
107818
  success: "\u0E2D\u0E31\u0E1B\u0E40\u0E14\u0E15\u0E23\u0E32\u0E22\u0E01\u0E32\u0E23\u0E2A\u0E33\u0E40\u0E23\u0E47\u0E08\u0E41\u0E25\u0E49\u0E27",
@@ -107868,6 +107925,9 @@ var th_TH_default = {
107868
107925
  selectCell: {
107869
107926
  placeholder: "\u0E40\u0E25\u0E37\u0E2D\u0E01 {{label}}"
107870
107927
  },
107928
+ multiSelectCell: {
107929
+ placeholder: "\u0E40\u0E25\u0E37\u0E2D\u0E01\u0E04\u0E48\u0E32"
107930
+ },
107871
107931
  booleanCell: {
107872
107932
  options: {
107873
107933
  yes: "\u0E43\u0E0A\u0E48",
@@ -108031,6 +108091,9 @@ var zh_SG_default = {
108031
108091
  selectCell: {
108032
108092
  placeholder: "\u9009\u62E9{{label}}"
108033
108093
  },
108094
+ multiSelectCell: {
108095
+ placeholder: "\u9009\u62E9\u503C"
108096
+ },
108034
108097
  booleanCell: {
108035
108098
  options: {
108036
108099
  yes: "\u662F",
@@ -109057,9 +109120,9 @@ var DataTable = ({
109057
109120
  {
109058
109121
  locale: clientI18n.locale,
109059
109122
  type: "file",
109060
- absolute_file_path: (locale) => `core/packages/data-table/src/locales/${locale}`
109123
+ absolute_file_path: (locale) => `core/packages/data-table/src/locales/${locale}.json`
109061
109124
  },
109062
- { en: translations.en },
109125
+ { en: translations.en, pseudo: translations.pseudo },
109063
109126
  {
109064
109127
  oldTranslations: translations,
109065
109128
  enableCDN: isCDNEnabled
@@ -109124,6 +109187,7 @@ var DataTable = ({
109124
109187
  );
109125
109188
  const [gridApi, setGridApi] = React80.useState();
109126
109189
  const [columnApi, setColumnApi] = React80.useState();
109190
+ const [hasDuplicateRowIds, setHasDuplicateRowIds] = React80.useState(false);
109127
109191
  const searchStorage = useSearchStorage();
109128
109192
  const filterState = useFilterState({
109129
109193
  columnDefinitions: columns,
@@ -109199,7 +109263,9 @@ var DataTable = ({
109199
109263
  gridApi?.hideOverlay.bind(gridApi),
109200
109264
  filterStorage.filtersState,
109201
109265
  searchStorage.searchValue,
109202
- setTotalRowCount
109266
+ setTotalRowCount,
109267
+ setHasDuplicateRowIds,
109268
+ getRowId
109203
109269
  )
109204
109270
  );
109205
109271
  gridApi?.paginationGoToPage(0);
@@ -109292,7 +109358,8 @@ var DataTable = ({
109292
109358
  tableRef,
109293
109359
  totalRowCount,
109294
109360
  setTotalRowCount,
109295
- updateServerSideDataSource
109361
+ updateServerSideDataSource,
109362
+ hasDuplicateRowIds
109296
109363
  }
109297
109364
  },
109298
109365
  children
@@ -109303,12 +109370,34 @@ var rowDragMoveEvent;
109303
109370
  var rowDragEndEvent;
109304
109371
  function getServerSideDatasource(onServerSideDataRequestCallbackRef, onEmptyResponseCallback = () => {
109305
109372
  }, onNonEmptyResponseCallback = () => {
109306
- }, filters, search, setTotalRowCount) {
109373
+ }, filters, search, setTotalRowCount, setHasDuplicateRowIds, getRowId) {
109307
109374
  return {
109308
109375
  getRows: async (params) => {
109309
109376
  if (onServerSideDataRequestCallbackRef.current) {
109310
109377
  const { request, success, fail } = params;
109311
109378
  const onSuccess = (loadSuccessParams) => {
109379
+ const { rowData } = loadSuccessParams;
109380
+ if (rowData && Array.isArray(rowData) && getRowId) {
109381
+ const uniqueRowIds = /* @__PURE__ */ new Set();
109382
+ for (const row2 of rowData) {
109383
+ const id = getRowId({
109384
+ data: row2,
109385
+ level: 0,
109386
+ api: {},
109387
+ columnApi: {},
109388
+ context: {}
109389
+ });
109390
+ if (uniqueRowIds.has(id)) {
109391
+ setHasDuplicateRowIds(true);
109392
+ logger.error(
109393
+ "Duplicate row IDs detected in rowData. Check getRowId() to ensure it returns unique IDs."
109394
+ );
109395
+ fail();
109396
+ return;
109397
+ }
109398
+ uniqueRowIds.add(id);
109399
+ }
109400
+ }
109312
109401
  if (!loadSuccessParams.rowCount && request.groupKeys.length === 0) {
109313
109402
  onEmptyResponseCallback();
109314
109403
  } else {
@@ -109346,7 +109435,7 @@ var Table = (props) => {
109346
109435
  const internalTableContext = useInternalTableContext();
109347
109436
  const clientSideRowData = props.rows ? { rowData: props.rows } : {};
109348
109437
  const serverSideInfiniteScroll = internalTableContext.onServerSideDataRequest ? { serverSideInfiniteScroll: true } : {};
109349
- const { columnApi, getRowHeight, gridApi } = internalTableContext;
109438
+ const { columnApi, getRowHeight, gridApi, filterState } = internalTableContext;
109350
109439
  const [viewportWidth, setViewportWidth] = React80.useState(0);
109351
109440
  const rowActionsWidth = React80.useRef(0);
109352
109441
  const [tableHeight, setTableHeight] = React80.useState(0);
@@ -109575,6 +109664,13 @@ var Table = (props) => {
109575
109664
  setSiblingGroupsRowSelection(selectedGroupIndex, gridApi);
109576
109665
  }
109577
109666
  }, [internalTableContext.selectedGroupIndex]);
109667
+ React80.useEffect(() => {
109668
+ filterState.allAvailableFilters.forEach((filter) => {
109669
+ if (Array.isArray(filter.filterValues) && filter.filterValues.length === 0) {
109670
+ tableApi.removeFilter(filter.field);
109671
+ }
109672
+ });
109673
+ }, [filterState.allAvailableFilters]);
109578
109674
  function footerValueGetter(params) {
109579
109675
  if (props.getSubtotalLabel) {
109580
109676
  return props.getSubtotalLabel(
@@ -110292,10 +110388,7 @@ function isLastColumnInGroup(params) {
110292
110388
  function ClientSideFilterInner(props) {
110293
110389
  const { Component: Component4, columnDefinition, onChange, options, value } = props;
110294
110390
  const filterHeading = columnDefinition.filterProps?.getFilterHeadingText?.(columnDefinition) ?? columnDefinition.headerName;
110295
- const filterOptions = React80.useMemo(
110296
- () => (options ?? [])?.filter((option) => !!option),
110297
- [options]
110298
- );
110391
+ const filterOptions = React80.useMemo(() => options ?? [], [options]);
110299
110392
  return /* @__PURE__ */ React80.createElement(Box, { as: "li", display: "block", paddingBottom: "xl", style: { width: "100%" } }, filterHeading ? /* @__PURE__ */ React80.createElement(
110300
110393
  Label$1,
110301
110394
  {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@procore/data-table",
3
- "version": "14.28.0-cdn.1",
3
+ "version": "14.28.0-cdn.10",
4
4
  "description": "Complex data grid built on top of ag-grid, with DST components and styles.",
5
5
  "type": "module",
6
6
  "main": "dist/legacy/index.cjs",
@@ -79,7 +79,7 @@
79
79
  "styled-components": ">= 5.1.1 < 6"
80
80
  },
81
81
  "dependencies": {
82
- "@procore/cdn-translations": "0.1.0",
82
+ "@procore/cdn-translations": "0.1.7",
83
83
  "@procore/error-pages": "0.2.1",
84
84
  "@procore/labs-datetime-select": "0.1.1",
85
85
  "@procore/labs-group-by-select": "4.0.0",
@@ -114,7 +114,7 @@
114
114
  "@procore/core-css": "10.17.0",
115
115
  "@procore/core-icons": "12.6.0",
116
116
  "@procore/core-prettier": "10.2.0",
117
- "@procore/core-react": "12.21.0-cdn.1",
117
+ "@procore/core-react": "12.21.0-cdn.10",
118
118
  "@procore/eslint-config": "10.0.0",
119
119
  "@procore/globalization-toolkit": "3.1.0",
120
120
  "@procore/labs-financials-utils": "4.3.1",
@@ -131,7 +131,6 @@
131
131
  "@testing-library/react": "11.0.4",
132
132
  "@testing-library/react-hooks": "8.0.1",
133
133
  "@testing-library/user-event": "13.1.5",
134
- "@types/enzyme": "3.10.12",
135
134
  "@types/lodash.debounce": "4.0.7",
136
135
  "@types/lodash.isequal": "4.5.0",
137
136
  "@types/ramda": "0.28.23",
@@ -142,14 +141,12 @@
142
141
  "@types/testing-library__jest-dom": "5.14.5",
143
142
  "@typescript-eslint/eslint-plugin": "5.48.2",
144
143
  "@typescript-eslint/parser": "5.48.1",
145
- "@wojtekmaj/enzyme-adapter-react-17": "0.6.7",
146
144
  "css-loader": "6.7.1",
147
145
  "cypress": "13.6.1",
148
146
  "cypress-axe": "1.5.0",
149
147
  "cypress-multi-reporters": "1.6.4",
150
148
  "cypress-real-events": "^1.11.0",
151
149
  "cypress-web-vitals": "^4.1.2",
152
- "enzyme": "3.11.0",
153
150
  "esbuild-sass-plugin": "^2.16.1",
154
151
  "eslint": "8.31.0",
155
152
  "eslint-config-airbnb": "19.0.4",