@procore/data-table 14.28.0 → 14.30.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.
@@ -54892,6 +54892,7 @@ function ServerSideNumberFilterRenderer({
54892
54892
  }
54893
54893
  );
54894
54894
  const prevValueRef = useRef([]);
54895
+ const internalClearRef = useRef(false);
54895
54896
  const debounceTimerRef = useRef(null);
54896
54897
  useEffect(() => {
54897
54898
  return () => {
@@ -54901,9 +54902,10 @@ function ServerSideNumberFilterRenderer({
54901
54902
  };
54902
54903
  }, []);
54903
54904
  useEffect(() => {
54904
- if (prevValueRef.current.length !== 0 && value.length === 0) {
54905
+ if (prevValueRef.current.length > 0 && value.length === 0 && !internalClearRef.current) {
54905
54906
  setLocalFilter({});
54906
54907
  }
54908
+ internalClearRef.current = false;
54907
54909
  prevValueRef.current = value;
54908
54910
  }, [value]);
54909
54911
  const transformToFilterArray = (filter) => {
@@ -54989,12 +54991,19 @@ function ServerSideNumberFilterRenderer({
54989
54991
  clearTimeout(debounceTimerRef.current);
54990
54992
  }
54991
54993
  debounceTimerRef.current = setTimeout(() => {
54992
- if (next.type === "inRange") {
54993
- if (next.value !== void 0 && next.valueTo !== void 0) {
54994
- updateFilter(next);
54995
- }
54996
- } else {
54994
+ const { type, value: value2, valueTo } = next;
54995
+ if (!type) {
54996
+ onChange?.([]);
54997
+ return;
54998
+ }
54999
+ const isInRange = type === "inRange";
55000
+ const hasValues = isInRange ? value2 !== void 0 && valueTo !== void 0 : value2 !== void 0;
55001
+ if (hasValues) {
54997
55002
  updateFilter(next);
55003
+ } else {
55004
+ internalClearRef.current = true;
55005
+ setLocalFilter(next);
55006
+ onChange?.([]);
54998
55007
  }
54999
55008
  }, DEBOUNCE_TIME);
55000
55009
  },
@@ -55127,6 +55136,17 @@ function ServerSideMultiNumberFilterRenderer({
55127
55136
  const [returnedFilter] = returnedFilterArray;
55128
55137
  const next = returnedFilter ? { ...returnedFilter, operator: firstFilter.operator } : { operator: firstFilter.operator };
55129
55138
  setFirstFilter(next);
55139
+ const isCleared = !returnedFilter || !isValidFilter(returnedFilter) && !returnedFilter.type;
55140
+ if (isCleared) {
55141
+ if (debounceTimerRef.current) {
55142
+ clearTimeout(debounceTimerRef.current);
55143
+ debounceTimerRef.current = null;
55144
+ }
55145
+ setFirstFilter({ operator: "and" });
55146
+ setSecondFilter({ operator: "and" });
55147
+ onChange?.([]);
55148
+ return;
55149
+ }
55130
55150
  if (debounceTimerRef.current)
55131
55151
  clearTimeout(debounceTimerRef.current);
55132
55152
  debounceTimerRef.current = setTimeout(() => {
@@ -55145,20 +55165,12 @@ function ServerSideMultiNumberFilterRenderer({
55145
55165
  };
55146
55166
  const fireOnChange = useCallback(
55147
55167
  (f1, f2) => {
55148
- if (!f1.type) {
55149
- onChange?.([]);
55150
- setFirstFilter({ operator: "and" });
55151
- setSecondFilter({ operator: "and" });
55152
- return;
55153
- }
55154
55168
  const f1Valid = isValidFilter(f1);
55155
55169
  const f2Valid = isValidFilter(f2);
55156
55170
  const values2 = [f1Valid ? f1 : null, f2Valid ? f2 : null].filter(
55157
55171
  (value2) => value2 !== null
55158
55172
  );
55159
- if (values2.length) {
55160
- onChange?.(values2);
55161
- }
55173
+ onChange?.(values2);
55162
55174
  },
55163
55175
  [onChange]
55164
55176
  );
@@ -60194,6 +60206,7 @@ var BulkActions = (props) => {
60194
60206
  const {
60195
60207
  children,
60196
60208
  showAlways = false,
60209
+ excludeGroupRowCount = false,
60197
60210
  showEditButtonLabel = false,
60198
60211
  editButtonText
60199
60212
  } = props;
@@ -60214,9 +60227,9 @@ var BulkActions = (props) => {
60214
60227
  if (selectedRows.length === 0 && !showAlways) {
60215
60228
  return null;
60216
60229
  }
60217
- const selectedItemsDesc = I18n.t("dataTable.bulkActions.selection", {
60218
- count: selectedRows.length,
60219
- number: selectedRows.length > 1 ? I18n.t("dataTable.bulkActions.many") : I18n.t("dataTable.bulkActions.one")
60230
+ const selectedRowsCount = excludeGroupRowCount ? selectedRows.filter((row2) => !row2.group).length : selectedRows.length;
60231
+ const selectedItemsDesc = I18n.t("dataTable.bulkActions.selection_count", {
60232
+ count: selectedRowsCount
60220
60233
  });
60221
60234
  return /* @__PURE__ */ React80.createElement(
60222
60235
  Box,
@@ -105118,12 +105131,14 @@ var ConfigurationColumns = React80.forwardRef(
105118
105131
  ));
105119
105132
  }
105120
105133
  );
105121
- var ConfigurationPanel = ({}) => {
105134
+ var ConfigurationPanel = ({
105135
+ children
105136
+ }) => {
105122
105137
  const { contextPanel, onServerSideDataRequest, enableDynamicRowHeight } = useInternalTableContext();
105123
105138
  const I18n = useI18nContext();
105124
105139
  const configurationColumnsRef = React80.useRef();
105125
105140
  const [isAllColumnsVisible, setIsAllColumnsVisible] = React80.useState(false);
105126
- return /* @__PURE__ */ React80.createElement(Panel, null, /* @__PURE__ */ React80.createElement(Panel.Header, { onClose: contextPanel.hide }, /* @__PURE__ */ React80.createElement(Panel.Title, null, I18n.t("dataTable.tableSettings.tableSettings"))), /* @__PURE__ */ React80.createElement(Panel.Body, { className: cx18("contextPanelBody") }, !onServerSideDataRequest && !enableDynamicRowHeight && /* @__PURE__ */ React80.createElement(
105141
+ return /* @__PURE__ */ React80.createElement(Panel, null, /* @__PURE__ */ React80.createElement(Panel.Header, { onClose: contextPanel.hide }, /* @__PURE__ */ React80.createElement(Panel.Title, null, I18n.t("dataTable.tableSettings.tableSettings"))), /* @__PURE__ */ React80.createElement(Panel.Body, { className: cx18("contextPanelBody") }, children && /* @__PURE__ */ React80.createElement(Panel.Section, null, children), !onServerSideDataRequest && !enableDynamicRowHeight && /* @__PURE__ */ React80.createElement(
105127
105142
  Panel.Section,
105128
105143
  {
105129
105144
  "data-qa": "data-table-config-panel-section-row-height",
@@ -105490,6 +105505,11 @@ var de_DE_default = {
105490
105505
  error: "Entschuldigung, die Elemente konnten nicht aktualisiert werden. Versuchen Sie es noch einmal.",
105491
105506
  placeholderForField: "%{fieldName} eingeben",
105492
105507
  selection: "%{count} %{number} ausgew\xE4hlt",
105508
+ selection_count: {
105509
+ zero: "%{count} Elemente ausgew\xE4hlt",
105510
+ one: "%{count} Element ausgew\xE4hlt",
105511
+ other: "%{count} Elemente ausgew\xE4hlt"
105512
+ },
105493
105513
  success: "Die Elemente wurden erfolgreich aktualisiert.",
105494
105514
  one: "Element",
105495
105515
  many: "Elemente"
@@ -105600,6 +105620,9 @@ var de_DE_default = {
105600
105620
  selectCell: {
105601
105621
  placeholder: "{{label}} ausw\xE4hlen"
105602
105622
  },
105623
+ multiSelectCell: {
105624
+ placeholder: "Werte ausw\xE4hlen"
105625
+ },
105603
105626
  booleanCell: {
105604
105627
  options: {
105605
105628
  yes: "Ja",
@@ -105653,6 +105676,11 @@ var en_AU_default = {
105653
105676
  error: "Sorry, the items couldn't be updated. Try again.",
105654
105677
  placeholderForField: "Enter %{fieldName}",
105655
105678
  selection: "%{count} %{number} selected",
105679
+ selection_count: {
105680
+ zero: "%{count} items selected",
105681
+ one: "%{count} item selected",
105682
+ other: "%{count} items selected"
105683
+ },
105656
105684
  success: "The items were successfully updated.",
105657
105685
  one: "item",
105658
105686
  many: "items"
@@ -105665,7 +105693,7 @@ var en_AU_default = {
105665
105693
  close: "Close",
105666
105694
  locationFilter: {
105667
105695
  selectAll: "Select all",
105668
- includeSublocations: "Include sublocations",
105696
+ includeSublocations: "Include sub-locations",
105669
105697
  searchLocations: "Search locations",
105670
105698
  locations: "Locations"
105671
105699
  },
@@ -105716,7 +105744,7 @@ var en_AU_default = {
105716
105744
  autoSizeAllColumns: "Autosize all columns",
105717
105745
  hideColumn: "Hide column",
105718
105746
  resetColumns: "Reset columns",
105719
- unGroupBy: "Un-group by {{label}}",
105747
+ unGroupBy: "Un-Group by {{label}}",
105720
105748
  groupBy: "Group by {{label}}"
105721
105749
  },
105722
105750
  grandTotals: "Grand totals",
@@ -105763,6 +105791,9 @@ var en_AU_default = {
105763
105791
  selectCell: {
105764
105792
  placeholder: "Select {{label}}"
105765
105793
  },
105794
+ multiSelectCell: {
105795
+ placeholder: "Select values"
105796
+ },
105766
105797
  booleanCell: {
105767
105798
  options: {
105768
105799
  yes: "Yes",
@@ -105816,6 +105847,11 @@ var en_CA_default = {
105816
105847
  error: "Sorry, the items couldn't be updated. Try again.",
105817
105848
  placeholderForField: "Enter %{fieldName}",
105818
105849
  selection: "%{count} %{number} selected",
105850
+ selection_count: {
105851
+ zero: "%{count} items selected",
105852
+ one: "%{count} item selected",
105853
+ other: "%{count} items selected"
105854
+ },
105819
105855
  success: "The items were successfully updated.",
105820
105856
  one: "item",
105821
105857
  many: "items"
@@ -105879,7 +105915,7 @@ var en_CA_default = {
105879
105915
  autoSizeAllColumns: "Autosize all columns",
105880
105916
  hideColumn: "Hide column",
105881
105917
  resetColumns: "Reset columns",
105882
- unGroupBy: "Un-group by {{label}}",
105918
+ unGroupBy: "Un-Group by {{label}}",
105883
105919
  groupBy: "Group by {{label}}"
105884
105920
  },
105885
105921
  grandTotals: "Grand totals",
@@ -105926,6 +105962,9 @@ var en_CA_default = {
105926
105962
  selectCell: {
105927
105963
  placeholder: "Select {{label}}"
105928
105964
  },
105965
+ multiSelectCell: {
105966
+ placeholder: "Select values"
105967
+ },
105929
105968
  booleanCell: {
105930
105969
  options: {
105931
105970
  yes: "Yes",
@@ -105979,6 +106018,11 @@ var en_GB_default = {
105979
106018
  error: "Sorry, the items couldn't be updated. Try again.",
105980
106019
  placeholderForField: "Enter %{fieldName}",
105981
106020
  selection: "%{count} %{number} selected",
106021
+ selection_count: {
106022
+ zero: "%{count} items selected",
106023
+ one: "%{count} item selected",
106024
+ other: "%{count} items selected"
106025
+ },
105982
106026
  success: "The items were successfully updated.",
105983
106027
  one: "item",
105984
106028
  many: "items"
@@ -106089,6 +106133,9 @@ var en_GB_default = {
106089
106133
  selectCell: {
106090
106134
  placeholder: "Select {{label}}"
106091
106135
  },
106136
+ multiSelectCell: {
106137
+ placeholder: "Select values"
106138
+ },
106092
106139
  booleanCell: {
106093
106140
  options: {
106094
106141
  yes: "Yes",
@@ -106142,6 +106189,11 @@ var en_default = {
106142
106189
  error: "Sorry, the items couldn't be updated. Try again.",
106143
106190
  placeholderForField: "Enter %{fieldName}",
106144
106191
  selection: "%{count} %{number} selected",
106192
+ selection_count: {
106193
+ zero: "%{count} items selected",
106194
+ one: "%{count} item selected",
106195
+ other: "%{count} items selected"
106196
+ },
106145
106197
  success: "The items were successfully updated.",
106146
106198
  one: "item",
106147
106199
  many: "items"
@@ -106308,6 +106360,11 @@ var es_ES_default = {
106308
106360
  error: "No se han podido actualizar los elementos. Int\xE9ntelo de nuevo.",
106309
106361
  placeholderForField: "Introducir %{fieldName}",
106310
106362
  selection: "%{count} %{number} seleccionados",
106363
+ selection_count: {
106364
+ zero: "%{count} elementos seleccionados",
106365
+ one: "%{count} elemento seleccionado",
106366
+ other: "%{count} elementos seleccionados"
106367
+ },
106311
106368
  success: "Los elementos se han actualizado correctamente.",
106312
106369
  one: "elemento",
106313
106370
  many: "elementos"
@@ -106418,6 +106475,9 @@ var es_ES_default = {
106418
106475
  selectCell: {
106419
106476
  placeholder: "Seleccionar {{label}}"
106420
106477
  },
106478
+ multiSelectCell: {
106479
+ placeholder: "Seleccionar valores"
106480
+ },
106421
106481
  booleanCell: {
106422
106482
  options: {
106423
106483
  yes: "S\xED",
@@ -106455,7 +106515,7 @@ var es_default = {
106455
106515
  title: "No hay \xEDtems para mostrar en este momento",
106456
106516
  itemsTitle: "No hay %{itemsLabel} para mostrar en este momento",
106457
106517
  tooltip: "El bot\xF3n %{featureName} se habilitar\xE1 una vez que agregue informaci\xF3n a la %{tableName}.",
106458
- searchTooltip: "La b\xFAsqueda se habilitar\xE1 una vez que agregue informaci\xF3n a %{tableName}",
106518
+ searchTooltip: "La b\xFAsqueda se habilitar\xE1 una vez que agregue informaci\xF3n a la %{tableName}.",
106459
106519
  featureFilter: "Filtro",
106460
106520
  featureQuickFilter: "Filtro r\xE1pido",
106461
106521
  featureGroupBy: "Agrupar por",
@@ -106468,9 +106528,14 @@ var es_default = {
106468
106528
  bulkEdit: "Edici\xF3n masiva",
106469
106529
  cancel: "Cancelar",
106470
106530
  editValues: "Editar valores",
106471
- error: "Lo sentimos, no se pudieron actualizar los \xEDtems. Int\xE9ntelo de nuevo.",
106531
+ error: "Lo sentimos, no se pudieron actualizar los \xEDtems. Vuelva a intentarlo.",
106472
106532
  placeholderForField: "Ingrese %{fieldName}",
106473
106533
  selection: "%{count} %{number} seleccionado",
106534
+ selection_count: {
106535
+ zero: "%{count} \xEDtems seleccionados",
106536
+ one: "%{count} \xEDtem seleccionado",
106537
+ other: "%{count} \xEDtems seleccionados"
106538
+ },
106474
106539
  success: "Los \xEDtems se actualizaron correctamente.",
106475
106540
  one: "\xEDtem",
106476
106541
  many: "\xEDtems"
@@ -106581,6 +106646,9 @@ var es_default = {
106581
106646
  selectCell: {
106582
106647
  placeholder: "Seleccionar {{label}}"
106583
106648
  },
106649
+ multiSelectCell: {
106650
+ placeholder: "Seleccionar valores"
106651
+ },
106584
106652
  booleanCell: {
106585
106653
  options: {
106586
106654
  yes: "S\xED",
@@ -106609,7 +106677,7 @@ var fr_CA_default = {
106609
106677
  dataTable: {
106610
106678
  emptyState: {
106611
106679
  noFilteredResults: {
106612
- description: "V\xE9rifiez l'orthographe et les options de filtrage, ou recherchez un autre mot cl\xE9.",
106680
+ description: "V\xE9rifiez l'orthographe et les options de filtrage, ou recherchez un autre mot-cl\xE9.",
106613
106681
  title: "Aucun item ne correspond \xE0 votre recherche",
106614
106682
  itemsTitle: "Aucun %{itemsLabel} ne correspond \xE0 votre recherche"
106615
106683
  },
@@ -106631,9 +106699,14 @@ var fr_CA_default = {
106631
106699
  bulkEdit: "Modifier en bloc",
106632
106700
  cancel: "Annuler",
106633
106701
  editValues: "Modifier les valeurs",
106634
- error: "D\xE9sol\xE9, les items n'ont pas pu \xEAtre mis \xE0 jour. Veuillez r\xE9essayer.",
106702
+ error: "D\xE9sol\xE9, les items n'ont pas pu \xEAtre mis \xE0 jour. R\xE9essayer.",
106635
106703
  placeholderForField: "Entrez %{fieldName}",
106636
106704
  selection: "%{count} %{number} s\xE9lectionn\xE9",
106705
+ selection_count: {
106706
+ zero: "%{count}\xA0items s\xE9lectionn\xE9s",
106707
+ one: "%{count}\xA0item s\xE9lectionn\xE9",
106708
+ other: "%{count}\xA0items s\xE9lectionn\xE9s"
106709
+ },
106637
106710
  success: "Les items ont \xE9t\xE9 mis \xE0 jour avec succ\xE8s.",
106638
106711
  one: "Item",
106639
106712
  many: "items"
@@ -106744,6 +106817,9 @@ var fr_CA_default = {
106744
106817
  selectCell: {
106745
106818
  placeholder: "S\xE9lectionner {{label}}"
106746
106819
  },
106820
+ multiSelectCell: {
106821
+ placeholder: "S\xE9lectionner les valeurs"
106822
+ },
106747
106823
  booleanCell: {
106748
106824
  options: {
106749
106825
  yes: "Oui",
@@ -106794,9 +106870,14 @@ var fr_FR_default = {
106794
106870
  bulkEdit: "Modifier en masse",
106795
106871
  cancel: "Annuler",
106796
106872
  editValues: "Modifier les valeurs",
106797
- error: "D\xE9sol\xE9, les \xE9l\xE9ments n'ont pas pu \xEAtre mis \xE0 jour. Veuillez r\xE9essayer.",
106873
+ error: "D\xE9sol\xE9, les \xE9l\xE9ments n'ont pas pu \xEAtre mis \xE0 jour. R\xE9essayez.",
106798
106874
  placeholderForField: "Saisissez %{fieldName}",
106799
106875
  selection: "%{count} %{number} s\xE9lectionn\xE9",
106876
+ selection_count: {
106877
+ zero: "%{count}\xA0\xE9l\xE9ments s\xE9lectionn\xE9s",
106878
+ one: "%{count}\xA0\xE9l\xE9ment s\xE9lectionn\xE9",
106879
+ other: "%{count}\xA0\xE9l\xE9ments s\xE9lectionn\xE9s"
106880
+ },
106800
106881
  success: "Les \xE9l\xE9ments ont bien \xE9t\xE9 mis \xE0 jour.",
106801
106882
  one: "\xE9l\xE9ment",
106802
106883
  many: "\xE9l\xE9ments"
@@ -106907,6 +106988,9 @@ var fr_FR_default = {
106907
106988
  selectCell: {
106908
106989
  placeholder: "S\xE9lectionner {{label}}"
106909
106990
  },
106991
+ multiSelectCell: {
106992
+ placeholder: "S\xE9lectionner les valeurs"
106993
+ },
106910
106994
  booleanCell: {
106911
106995
  options: {
106912
106996
  yes: "Oui",
@@ -106960,6 +107044,11 @@ var is_IS_default = {
106960
107044
  error: "\xDEv\xED mi\xF0ur var ekki h\xE6gt a\xF0 uppf\xE6ra atri\xF0in. Reyndu aftur.",
106961
107045
  placeholderForField: "Sl\xE1\xF0u inn %{fieldName}",
106962
107046
  selection: "%{count} %{number} valinn",
107047
+ selection_count: {
107048
+ zero: "%{count} atri\xF0i valin",
107049
+ one: "%{count} atri\xF0i vali\xF0",
107050
+ other: "%{count} atri\xF0i valin"
107051
+ },
106963
107052
  success: "Atri\xF0in voru uppf\xE6r\xF0.",
106964
107053
  one: "Atri\xF0i",
106965
107054
  many: "Hlutir"
@@ -107070,6 +107159,9 @@ var is_IS_default = {
107070
107159
  selectCell: {
107071
107160
  placeholder: "Veldu {{label}}"
107072
107161
  },
107162
+ multiSelectCell: {
107163
+ placeholder: "Veldu Gildi"
107164
+ },
107073
107165
  booleanCell: {
107074
107166
  options: {
107075
107167
  yes: "J\xE1",
@@ -107123,6 +107215,11 @@ var ja_JP_default = {
107123
107215
  error: "\u7533\u3057\u8A33\u3042\u308A\u307E\u305B\u3093\u304C\u3001\u9805\u76EE\u3092\u66F4\u65B0\u3067\u304D\u307E\u305B\u3093\u3067\u3057\u305F\u3002\u518D\u5EA6\u304A\u8A66\u3057\u304F\u3060\u3055\u3044\u3002",
107124
107216
  placeholderForField: "%{fieldName}\u3092\u5165\u529B",
107125
107217
  selection: "%{count}%{number}\u3092\u9078\u629E\u3057\u307E\u3057\u305F",
107218
+ selection_count: {
107219
+ zero: "%{count}\u500B\u306E\u9805\u76EE\u3092\u9078\u629E\u3057\u307E\u3057\u305F",
107220
+ one: "%{count}\u500B\u306E\u9805\u76EE\u3092\u9078\u629E\u3057\u307E\u3057\u305F",
107221
+ other: "%{count}\u500B\u306E\u9805\u76EE\u3092\u9078\u629E\u3057\u307E\u3057\u305F"
107222
+ },
107126
107223
  success: "\u9805\u76EE\u3092\u6B63\u5E38\u306B\u66F4\u65B0\u3057\u307E\u3057\u305F\u3002",
107127
107224
  one: "\u9805\u76EE",
107128
107225
  many: "\u9805\u76EE"
@@ -107233,6 +107330,9 @@ var ja_JP_default = {
107233
107330
  selectCell: {
107234
107331
  placeholder: "{{label}}\u3092\u9078\u629E\u3059\u308B"
107235
107332
  },
107333
+ multiSelectCell: {
107334
+ placeholder: "\u5024\u3092\u9078\u629E"
107335
+ },
107236
107336
  booleanCell: {
107237
107337
  options: {
107238
107338
  yes: "\u306F\u3044",
@@ -107286,6 +107386,11 @@ var pl_PL_default = {
107286
107386
  error: "Przepraszamy, nie mo\u017Cna zaktualizowa\u0107 pozycji. Spr\xF3buj ponownie.",
107287
107387
  placeholderForField: "Wprowad\u017A %{fieldName}",
107288
107388
  selection: "Wybrano %{count} %{number}",
107389
+ selection_count: {
107390
+ zero: "Wybrano pozycje: %{count}",
107391
+ one: "Wybrano pozycji: %{count}",
107392
+ other: "Wybrano pozycje: %{count}"
107393
+ },
107289
107394
  success: "Pozycje zosta\u0142y pomy\u015Blnie zaktualizowane.",
107290
107395
  one: "pozycja",
107291
107396
  many: "pozycje"
@@ -107396,6 +107501,9 @@ var pl_PL_default = {
107396
107501
  selectCell: {
107397
107502
  placeholder: "Wybierz {{label}}"
107398
107503
  },
107504
+ multiSelectCell: {
107505
+ placeholder: "Wybierz warto\u015Bci"
107506
+ },
107399
107507
  booleanCell: {
107400
107508
  options: {
107401
107509
  yes: "Tak",
@@ -107449,6 +107557,11 @@ var pseudo_default = {
107449
107557
  error: "[\u015E\u015E\u015E\u015E\u015E\u015E\u015E\u015E\u015E\u015E\u01FF\u0159\u0159\u1E8F, \xB7 \u0167\u0127\u1E17 \xB7 \u012B\u0167\u1E17\u1E3F\u015F \xB7 \u0188\u01FF\u016D\u0140\u1E13\u019E'\u0167 \xB7 \u0180\u1E17 \xB7 \u016D\u01A5\u1E13\u0227\u0167\u1E17\u1E13. \xB7 \u0166\u0159\u1E8F \xB7 \u0227\u0260\u0227\u012B\u019E..........]",
107450
107558
  placeholderForField: "[\u1E16\u1E16\u019E\u0167\u1E17\u0159 \xB7 \xB7 [NOTRANSLATE]%{fieldName}[/NOTRANSLATE]]",
107451
107559
  selection: "[[NOTRANSLATE]%{count}[/NOTRANSLATE] \xB7 \xB7 \xB7 [NOTRANSLATE]%{number}[/NOTRANSLATE] \xB7 \xB7 \u015F\u1E17\u0140\u1E17\u0188\u0167\u1E17\u1E13\u1E13]",
107560
+ selection_count: {
107561
+ zero: "[[NOTRANSLATE]%{count}[/NOTRANSLATE] \xB7 \xB7 \xB7 \u012B\u0167\u1E17\u1E3F\u015F \xB7 \u015F\u1E17\u0140\u1E17\u0188\u0167\u1E17\u1E13\u1E13\u1E13]",
107562
+ one: "[[NOTRANSLATE]%{count}[/NOTRANSLATE] \xB7 \xB7 \xB7 \u012B\u0167\u1E17\u1E3F \xB7 \u015F\u1E17\u0140\u1E17\u0188\u0167\u1E17\u1E13\u1E13\u1E13]",
107563
+ other: "[[NOTRANSLATE]%{count}[/NOTRANSLATE] \xB7 \xB7 \xB7 \u012B\u0167\u1E17\u1E3F\u015F \xB7 \u015F\u1E17\u0140\u1E17\u0188\u0167\u1E17\u1E13\u1E13\u1E13]"
107564
+ },
107452
107565
  success: "[\u0166\u0166\u0166\u0166\u0166\u0166\u0166\u0166\u0127\u1E17 \xB7 \u012B\u0167\u1E17\u1E3F\u015F \xB7 \u1E87\u1E17\u0159\u1E17 \xB7 \u015F\u016D\u0188\u0188\u1E17\u015F\u015F\u0192\u016D\u0140\u0140\u1E8F \xB7 \u016D\u01A5\u1E13\u0227\u0167\u1E17\u1E13........]",
107453
107566
  one: "[\u012B\u0167\u1E17\u1E3F]",
107454
107567
  many: "[\u012B\u0167\u1E17\u1E3F\u015F]"
@@ -107598,8 +107711,8 @@ var pt_BR_default = {
107598
107711
  description: "Depois que sua equipe criar esses itens, voc\xEA poder\xE1 acess\xE1-los aqui. ",
107599
107712
  title: "N\xE3o H\xE1 Itens para Exibir Agora",
107600
107713
  itemsTitle: "N\xE3o H\xE1 %{itemsLabel} para Exibir Agora",
107601
- tooltip: "O bot\xE3o %{featureName} ser\xE1 ativado assim que voc\xEA adicionar informa\xE7\xF5es ao %{tableName}",
107602
- searchTooltip: "A pesquisa ser\xE1 ativada assim que voc\xEA adicionar informa\xE7\xF5es \xE0 tabela %{tableName}",
107714
+ tooltip: "O bot\xE3o %{featureName} ser\xE1 ativado assim que voc\xEA adicionar informa\xE7\xF5es \xE0 %{tableName}",
107715
+ searchTooltip: "A pesquisa ser\xE1 ativada assim que voc\xEA adicionar informa\xE7\xF5es \xE0 %{tableName}",
107603
107716
  featureFilter: "Filtrar",
107604
107717
  featureQuickFilter: "Filtro r\xE1pido",
107605
107718
  featureGroupBy: "Agrupar por",
@@ -107612,9 +107725,14 @@ var pt_BR_default = {
107612
107725
  bulkEdit: "Edi\xE7\xE3o em Massa",
107613
107726
  cancel: "Cancelar",
107614
107727
  editValues: "Editar Valores",
107615
- error: "Sentimos muito, mas n\xE3o foi poss\xEDvel atualizar os itens. Tente novamente.",
107728
+ error: "Lamentamos, mas n\xE3o foi poss\xEDvel atualizar os itens. Tente novamente.",
107616
107729
  placeholderForField: "Digite %{fieldName}",
107617
107730
  selection: "%{count} %{number} selecionado",
107731
+ selection_count: {
107732
+ zero: "%{count} itens selecionados",
107733
+ one: "%{count} item selecionado",
107734
+ other: "%{count} itens selecionados"
107735
+ },
107618
107736
  success: "Os itens foram atualizados com sucesso.",
107619
107737
  one: "item",
107620
107738
  many: "itens"
@@ -107725,6 +107843,9 @@ var pt_BR_default = {
107725
107843
  selectCell: {
107726
107844
  placeholder: "Selecionar {{label}}"
107727
107845
  },
107846
+ multiSelectCell: {
107847
+ placeholder: "Selecionar Valores"
107848
+ },
107728
107849
  booleanCell: {
107729
107850
  options: {
107730
107851
  yes: "Sim",
@@ -107775,9 +107896,14 @@ var th_TH_default = {
107775
107896
  bulkEdit: "\u0E01\u0E32\u0E23\u0E41\u0E01\u0E49\u0E44\u0E02\u0E41\u0E1A\u0E1A\u0E01\u0E25\u0E38\u0E48\u0E21",
107776
107897
  cancel: "\u0E22\u0E01\u0E40\u0E25\u0E34\u0E01",
107777
107898
  editValues: "\u0E41\u0E01\u0E49\u0E44\u0E02\u0E04\u0E48\u0E32",
107778
- 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.",
107899
+ 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",
107779
107900
  placeholderForField: "\u0E1B\u0E49\u0E2D\u0E19 %{fieldName}",
107780
107901
  selection: "%{count} %{number} \u0E17\u0E35\u0E48\u0E40\u0E25\u0E37\u0E2D\u0E01",
107902
+ selection_count: {
107903
+ zero: "\u0E40\u0E25\u0E37\u0E2D\u0E01\u0E41\u0E25\u0E49\u0E27 %{count} \u0E23\u0E32\u0E22\u0E01\u0E32\u0E23",
107904
+ one: "\u0E40\u0E25\u0E37\u0E2D\u0E01\u0E41\u0E25\u0E49\u0E27 %{count} \u0E23\u0E32\u0E22\u0E01\u0E32\u0E23",
107905
+ other: "\u0E40\u0E25\u0E37\u0E2D\u0E01\u0E41\u0E25\u0E49\u0E27 %{count} \u0E23\u0E32\u0E22\u0E01\u0E32\u0E23"
107906
+ },
107781
107907
  success: "\u0E2D\u0E31\u0E1B\u0E40\u0E14\u0E15\u0E23\u0E32\u0E22\u0E01\u0E32\u0E23\u0E2A\u0E33\u0E40\u0E23\u0E47\u0E08\u0E41\u0E25\u0E49\u0E27",
107782
107908
  one: "\u0E23\u0E32\u0E22\u0E01\u0E32\u0E23",
107783
107909
  many: "\u0E23\u0E32\u0E22\u0E01\u0E32\u0E23"
@@ -107888,6 +108014,9 @@ var th_TH_default = {
107888
108014
  selectCell: {
107889
108015
  placeholder: "\u0E40\u0E25\u0E37\u0E2D\u0E01 {{label}}"
107890
108016
  },
108017
+ multiSelectCell: {
108018
+ placeholder: "\u0E40\u0E25\u0E37\u0E2D\u0E01\u0E04\u0E48\u0E32"
108019
+ },
107891
108020
  booleanCell: {
107892
108021
  options: {
107893
108022
  yes: "\u0E43\u0E0A\u0E48",
@@ -107941,6 +108070,11 @@ var zh_SG_default = {
107941
108070
  error: "\u62B1\u6B49\uFF0C\u65E0\u6CD5\u66F4\u65B0\u6B64\u9879\u3002\u8BF7\u91CD\u8BD5\u3002",
107942
108071
  placeholderForField: "\u8F93\u5165 %{fieldName}",
107943
108072
  selection: "\u5DF2\u9009\u62E9 %{count} %{number}",
108073
+ selection_count: {
108074
+ zero: "\u5DF2\u9009\u62E9 %{count} \u9879",
108075
+ one: "\u5DF2\u9009\u62E9 %{count} \u9879",
108076
+ other: "\u5DF2\u9009\u62E9 %{count} \u9879"
108077
+ },
107944
108078
  success: "\u5DF2\u6210\u529F\u66F4\u65B0\u8FD9\u4E9B\u9879\u3002",
107945
108079
  one: "\u9879",
107946
108080
  many: "\u9879"
@@ -108051,6 +108185,9 @@ var zh_SG_default = {
108051
108185
  selectCell: {
108052
108186
  placeholder: "\u9009\u62E9{{label}}"
108053
108187
  },
108188
+ multiSelectCell: {
108189
+ placeholder: "\u9009\u62E9\u503C"
108190
+ },
108054
108191
  booleanCell: {
108055
108192
  options: {
108056
108193
  yes: "\u662F",
@@ -109377,7 +109514,7 @@ var Table = (props) => {
109377
109514
  const internalTableContext = useInternalTableContext();
109378
109515
  const clientSideRowData = props.rows ? { rowData: props.rows } : {};
109379
109516
  const serverSideInfiniteScroll = internalTableContext.onServerSideDataRequest ? { serverSideInfiniteScroll: true } : {};
109380
- const { columnApi, getRowHeight, gridApi } = internalTableContext;
109517
+ const { columnApi, getRowHeight, gridApi, filterState } = internalTableContext;
109381
109518
  const [viewportWidth, setViewportWidth] = React80.useState(0);
109382
109519
  const rowActionsWidth = React80.useRef(0);
109383
109520
  const [tableHeight, setTableHeight] = React80.useState(0);
@@ -109606,6 +109743,13 @@ var Table = (props) => {
109606
109743
  setSiblingGroupsRowSelection(selectedGroupIndex, gridApi);
109607
109744
  }
109608
109745
  }, [internalTableContext.selectedGroupIndex]);
109746
+ React80.useEffect(() => {
109747
+ filterState.allAvailableFilters.forEach((filter) => {
109748
+ if (Array.isArray(filter.filterValues) && filter.filterValues.length === 0) {
109749
+ tableApi.removeFilter(filter.field);
109750
+ }
109751
+ });
109752
+ }, [filterState.allAvailableFilters]);
109609
109753
  function footerValueGetter(params) {
109610
109754
  if (props.getSubtotalLabel) {
109611
109755
  return props.getSubtotalLabel(
@@ -110307,7 +110451,7 @@ var ContextPanel = ({
110307
110451
  "data-qa": "data-table-context-panel",
110308
110452
  ...props
110309
110453
  },
110310
- /* @__PURE__ */ React80.createElement(Box, { className: cx19("contextPanelWrapper"), display: "flex-column" }, contextPanel.content === "configuration" && /* @__PURE__ */ React80.createElement(ConfigurationPanel, null), contextPanel.content === "bulkEdit" && /* @__PURE__ */ React80.createElement(BulkEditPanel, null), contextPanel.content === "custom" && children)
110454
+ /* @__PURE__ */ React80.createElement(Box, { className: cx19("contextPanelWrapper"), display: "flex-column" }, contextPanel.content === "configuration" && /* @__PURE__ */ React80.createElement(ConfigurationPanel, null, children), contextPanel.content === "bulkEdit" && /* @__PURE__ */ React80.createElement(BulkEditPanel, null), contextPanel.content === "custom" && children)
110311
110455
  );
110312
110456
  };
110313
110457
  function isLastColumnInGroup(params) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@procore/data-table",
3
- "version": "14.28.0",
3
+ "version": "14.30.0",
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",
@@ -113,7 +113,7 @@
113
113
  "@procore/core-css": "10.17.0",
114
114
  "@procore/core-icons": "12.6.0",
115
115
  "@procore/core-prettier": "10.2.0",
116
- "@procore/core-react": "12.21.0",
116
+ "@procore/core-react": "12.21.1",
117
117
  "@procore/eslint-config": "10.0.0",
118
118
  "@procore/globalization-toolkit": "3.1.0",
119
119
  "@procore/labs-financials-utils": "4.3.1",
@@ -130,7 +130,6 @@
130
130
  "@testing-library/react": "11.0.4",
131
131
  "@testing-library/react-hooks": "8.0.1",
132
132
  "@testing-library/user-event": "13.1.5",
133
- "@types/enzyme": "3.10.12",
134
133
  "@types/lodash.debounce": "4.0.7",
135
134
  "@types/lodash.isequal": "4.5.0",
136
135
  "@types/ramda": "0.28.23",
@@ -141,14 +140,12 @@
141
140
  "@types/testing-library__jest-dom": "5.14.5",
142
141
  "@typescript-eslint/eslint-plugin": "5.48.2",
143
142
  "@typescript-eslint/parser": "5.48.1",
144
- "@wojtekmaj/enzyme-adapter-react-17": "0.6.7",
145
143
  "css-loader": "6.7.1",
146
144
  "cypress": "13.6.1",
147
145
  "cypress-axe": "1.5.0",
148
146
  "cypress-multi-reporters": "1.6.4",
149
147
  "cypress-real-events": "^1.11.0",
150
148
  "cypress-web-vitals": "^4.1.2",
151
- "enzyme": "3.11.0",
152
149
  "esbuild-sass-plugin": "^2.16.1",
153
150
  "eslint": "8.31.0",
154
151
  "eslint-config-airbnb": "19.0.4",