@procore/data-table 14.23.2 → 14.24.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.
@@ -55278,6 +55278,17 @@ function transformServerSideRequestObj(request, filtersState, searchValue) {
55278
55278
  )
55279
55279
  };
55280
55280
  }
55281
+ function isNumberFilterCondition(item) {
55282
+ return item && [
55283
+ "lessThan",
55284
+ "greaterThan",
55285
+ "isEqual",
55286
+ "inRange",
55287
+ "greaterThanOrEqual",
55288
+ "lessThanOrEqual",
55289
+ "no_value"
55290
+ ].includes(item.type);
55291
+ }
55281
55292
  var transformFilterValue = (value, field, formatter) => {
55282
55293
  const formattedValue = formatter == null ? void 0 : formatter(value, field);
55283
55294
  if (formattedValue)
@@ -55286,6 +55297,33 @@ var transformFilterValue = (value, field, formatter) => {
55286
55297
  return formatISO(value.date, { representation: "date" });
55287
55298
  return value.toString();
55288
55299
  };
55300
+ function buildNumberFilterParams(filters) {
55301
+ return filters.reduce((acc, filter, idx) => {
55302
+ const singleExpr = mapFilterToQueryParam(filter);
55303
+ if (idx === 0)
55304
+ return singleExpr;
55305
+ const separator = filter.operator === "or" ? "|" : ",";
55306
+ return acc + separator + singleExpr;
55307
+ }, "");
55308
+ }
55309
+ function mapFilterToQueryParam(filter) {
55310
+ const operatorMap = {
55311
+ lessThan: "lt",
55312
+ lessThanOrEqual: "lte",
55313
+ greaterThan: "gt",
55314
+ greaterThanOrEqual: "gte",
55315
+ isEqual: "eq",
55316
+ inRange: "range",
55317
+ no_value: "null"
55318
+ };
55319
+ if (filter.type === "inRange") {
55320
+ return `range:${filter.value}-${filter.valueTo}`;
55321
+ }
55322
+ if (filter.type === "no_value") {
55323
+ return "null";
55324
+ }
55325
+ return operatorMap[filter.type] ? `${operatorMap[filter.type]}:${filter.value}` : String(filter.value ?? "");
55326
+ }
55289
55327
  function getServerSideParams(request, filtersState, searchValue, options = {}) {
55290
55328
  var _a;
55291
55329
  const params = new URLSearchParams();
@@ -55310,10 +55348,17 @@ function getServerSideParams(request, filtersState, searchValue, options = {}) {
55310
55348
  if (options.filters !== false) {
55311
55349
  const formatter = options.filterValueFormatter;
55312
55350
  filtersState.forEach((filter) => {
55313
- const value = filter.selected.length === 1 ? transformFilterValue(filter.selected[0], filter.field, formatter) : `[${filter.selected.map(
55314
- (value2) => transformFilterValue(value2, filter.field, formatter)
55315
- )}]`;
55316
- params.set(`filters[${filter.field}]`, value);
55351
+ const isNumericCondition = filter.selected.every(isNumberFilterCondition);
55352
+ const hasCustomFormatter = typeof formatter === "function";
55353
+ if (isNumericCondition && filter.selected.length > 0 && !hasCustomFormatter) {
55354
+ const numericExpr = buildNumberFilterParams(filter.selected);
55355
+ params.set(`filters[${filter.field}]`, numericExpr);
55356
+ } else {
55357
+ const value = filter.selected.length === 1 ? transformFilterValue(filter.selected[0], filter.field, formatter) : `[${filter.selected.map(
55358
+ (val) => transformFilterValue(val, filter.field, formatter)
55359
+ )}]`;
55360
+ params.set(`filters[${filter.field}]`, value);
55361
+ }
55317
55362
  });
55318
55363
  request.groupKeys.forEach((groupKey, index) => {
55319
55364
  params.set(`filters[${request.rowGroupCols[index].field}]`, groupKey);
@@ -56517,6 +56562,7 @@ var getMainMenuItems = (props, I18n) => {
56517
56562
  value: "resetColumns",
56518
56563
  action() {
56519
56564
  props.columnApi.resetColumnState();
56565
+ props.onTableConfigChange();
56520
56566
  }
56521
56567
  };
56522
56568
  const rowUngroup = {
@@ -105196,6 +105242,12 @@ var de_DE_default = {
105196
105242
  less_than_equal_to: "Ist kleiner als oder gleich",
105197
105243
  no_value: "Kein Wert"
105198
105244
  }
105245
+ },
105246
+ multiSelectQuickFilter: {
105247
+ ariaLabel: "Schnell-Filter: mehrere Optionen ausw\xE4hlen"
105248
+ },
105249
+ singleSelectQuickFilter: {
105250
+ ariaLabel: "Schnell-Filter: eine Option ausw\xE4hlen"
105199
105251
  }
105200
105252
  },
105201
105253
  loading: {
@@ -105282,6 +105334,9 @@ var de_DE_default = {
105282
105334
  groupCell: {
105283
105335
  expand: "Gruppe erweitern",
105284
105336
  collapse: "Gruppe ausblenden"
105337
+ },
105338
+ rowCheckbox: {
105339
+ ariaLabel: "Zeile ausw\xE4hlen"
105285
105340
  }
105286
105341
  }
105287
105342
  };
@@ -105347,6 +105402,12 @@ var en_AU_default = {
105347
105402
  less_than_equal_to: "Is less than or equal to",
105348
105403
  no_value: "No value"
105349
105404
  }
105405
+ },
105406
+ multiSelectQuickFilter: {
105407
+ ariaLabel: "Quick filter: Select multiple options"
105408
+ },
105409
+ singleSelectQuickFilter: {
105410
+ ariaLabel: "Quick filter: Select an option"
105350
105411
  }
105351
105412
  },
105352
105413
  loading: {
@@ -105433,6 +105494,9 @@ var en_AU_default = {
105433
105494
  groupCell: {
105434
105495
  expand: "Expand group",
105435
105496
  collapse: "Collapse group"
105497
+ },
105498
+ rowCheckbox: {
105499
+ ariaLabel: "Select row"
105436
105500
  }
105437
105501
  }
105438
105502
  };
@@ -105498,6 +105562,12 @@ var en_CA_default = {
105498
105562
  less_than_equal_to: "Is less than or equal to",
105499
105563
  no_value: "No value"
105500
105564
  }
105565
+ },
105566
+ multiSelectQuickFilter: {
105567
+ ariaLabel: "Quick filter: Select multiple options"
105568
+ },
105569
+ singleSelectQuickFilter: {
105570
+ ariaLabel: "Quick filter: Select an option"
105501
105571
  }
105502
105572
  },
105503
105573
  loading: {
@@ -105584,6 +105654,9 @@ var en_CA_default = {
105584
105654
  groupCell: {
105585
105655
  expand: "Expand group",
105586
105656
  collapse: "Collapse group"
105657
+ },
105658
+ rowCheckbox: {
105659
+ ariaLabel: "Select row"
105587
105660
  }
105588
105661
  }
105589
105662
  };
@@ -105649,6 +105722,12 @@ var en_GB_default = {
105649
105722
  less_than_equal_to: "Is less than or equal to",
105650
105723
  no_value: "No value"
105651
105724
  }
105725
+ },
105726
+ multiSelectQuickFilter: {
105727
+ ariaLabel: "Quick filter: Select multiple options"
105728
+ },
105729
+ singleSelectQuickFilter: {
105730
+ ariaLabel: "Quick filter: Select an option"
105652
105731
  }
105653
105732
  },
105654
105733
  loading: {
@@ -105735,6 +105814,9 @@ var en_GB_default = {
105735
105814
  groupCell: {
105736
105815
  expand: "Expand group",
105737
105816
  collapse: "Collapse group"
105817
+ },
105818
+ rowCheckbox: {
105819
+ ariaLabel: "Select row"
105738
105820
  }
105739
105821
  }
105740
105822
  };
@@ -105960,6 +106042,12 @@ var es_ES_default = {
105960
106042
  less_than_equal_to: "Es menor o igual que",
105961
106043
  no_value: "Ning\xFAn valor"
105962
106044
  }
106045
+ },
106046
+ multiSelectQuickFilter: {
106047
+ ariaLabel: "Filtro r\xE1pido: seleccionar varias opciones"
106048
+ },
106049
+ singleSelectQuickFilter: {
106050
+ ariaLabel: "Filtro r\xE1pido: seleccionar una opci\xF3n"
105963
106051
  }
105964
106052
  },
105965
106053
  loading: {
@@ -106046,6 +106134,9 @@ var es_ES_default = {
106046
106134
  groupCell: {
106047
106135
  expand: "Expandir grupo",
106048
106136
  collapse: "Contraer grupo"
106137
+ },
106138
+ rowCheckbox: {
106139
+ ariaLabel: "Seleccionar fila"
106049
106140
  }
106050
106141
  }
106051
106142
  };
@@ -106111,6 +106202,12 @@ var es_default = {
106111
106202
  less_than_equal_to: "Es menor o igual a",
106112
106203
  no_value: "Ning\xFAn valor"
106113
106204
  }
106205
+ },
106206
+ multiSelectQuickFilter: {
106207
+ ariaLabel: "Filtro r\xE1pido: Seleccione varias opciones"
106208
+ },
106209
+ singleSelectQuickFilter: {
106210
+ ariaLabel: "Filtro r\xE1pido: Seleccione una opci\xF3n"
106114
106211
  }
106115
106212
  },
106116
106213
  loading: {
@@ -106197,6 +106294,9 @@ var es_default = {
106197
106294
  groupCell: {
106198
106295
  expand: "Expandir grupo",
106199
106296
  collapse: "Colapsar grupo"
106297
+ },
106298
+ rowCheckbox: {
106299
+ ariaLabel: "Seleccionar fila"
106200
106300
  }
106201
106301
  }
106202
106302
  };
@@ -106262,6 +106362,12 @@ var fr_CA_default = {
106262
106362
  less_than_equal_to: "Est inf\xE9rieur ou \xE9gal \xE0",
106263
106363
  no_value: "Aucune valeur"
106264
106364
  }
106365
+ },
106366
+ multiSelectQuickFilter: {
106367
+ ariaLabel: "Filtre rapide\xA0: s\xE9lectionner plusieurs options"
106368
+ },
106369
+ singleSelectQuickFilter: {
106370
+ ariaLabel: "Filtre rapide\xA0: s\xE9lectionner une option"
106265
106371
  }
106266
106372
  },
106267
106373
  loading: {
@@ -106348,6 +106454,9 @@ var fr_CA_default = {
106348
106454
  groupCell: {
106349
106455
  expand: "D\xE9velopper le groupe",
106350
106456
  collapse: "R\xE9duire le groupe"
106457
+ },
106458
+ rowCheckbox: {
106459
+ ariaLabel: "S\xE9lectionner une ligne"
106351
106460
  }
106352
106461
  }
106353
106462
  };
@@ -106413,6 +106522,12 @@ var fr_FR_default = {
106413
106522
  less_than_equal_to: "Est inf\xE9rieure ou \xE9gale \xE0",
106414
106523
  no_value: "Aucune valeur"
106415
106524
  }
106525
+ },
106526
+ multiSelectQuickFilter: {
106527
+ ariaLabel: "Filtre rapide : s\xE9lectionnez plusieurs options"
106528
+ },
106529
+ singleSelectQuickFilter: {
106530
+ ariaLabel: "Filtre rapide : s\xE9lectionnez une option"
106416
106531
  }
106417
106532
  },
106418
106533
  loading: {
@@ -106499,6 +106614,9 @@ var fr_FR_default = {
106499
106614
  groupCell: {
106500
106615
  expand: "D\xE9velopper le groupe",
106501
106616
  collapse: "R\xE9duire le groupe"
106617
+ },
106618
+ rowCheckbox: {
106619
+ ariaLabel: "S\xE9lectionner une ligne"
106502
106620
  }
106503
106621
  }
106504
106622
  };
@@ -106564,6 +106682,12 @@ var is_IS_default = {
106564
106682
  less_than_equal_to: "Er minna en e\xF0a jafnt",
106565
106683
  no_value: "Ekkert gildi"
106566
106684
  }
106685
+ },
106686
+ multiSelectQuickFilter: {
106687
+ ariaLabel: "Flj\xF3tleg s\xEDa: Veldu marga valkosti"
106688
+ },
106689
+ singleSelectQuickFilter: {
106690
+ ariaLabel: "Hra\xF0s\xEDa: Veldu valkost"
106567
106691
  }
106568
106692
  },
106569
106693
  loading: {
@@ -106650,6 +106774,9 @@ var is_IS_default = {
106650
106774
  groupCell: {
106651
106775
  expand: "St\xE6kka h\xF3pinn",
106652
106776
  collapse: "Hrunh\xF3pur"
106777
+ },
106778
+ rowCheckbox: {
106779
+ ariaLabel: "Veldu R\xF6\xF0"
106653
106780
  }
106654
106781
  }
106655
106782
  };
@@ -106715,6 +106842,12 @@ var ja_JP_default = {
106715
106842
  less_than_equal_to: "\u4EE5\u4E0B\u3067\u3059",
106716
106843
  no_value: "\u5024\u304C\u3042\u308A\u307E\u305B\u3093"
106717
106844
  }
106845
+ },
106846
+ multiSelectQuickFilter: {
106847
+ ariaLabel: "\u30AF\u30A4\u30C3\u30AF\u30D5\u30A3\u30EB\u30BF\u30FC: \u8907\u6570\u306E\u30AA\u30D7\u30B7\u30E7\u30F3\u3092\u9078\u629E"
106848
+ },
106849
+ singleSelectQuickFilter: {
106850
+ ariaLabel: "\u30AF\u30A4\u30C3\u30AF\u30D5\u30A3\u30EB\u30BF\u30FC: \u30AA\u30D7\u30B7\u30E7\u30F3\u3092\u9078\u629E"
106718
106851
  }
106719
106852
  },
106720
106853
  loading: {
@@ -106801,6 +106934,9 @@ var ja_JP_default = {
106801
106934
  groupCell: {
106802
106935
  expand: "\u30B0\u30EB\u30FC\u30D7\u3092\u5C55\u958B\u3059\u308B",
106803
106936
  collapse: "\u30B0\u30EB\u30FC\u30D7\u3092\u6298\u308A\u305F\u305F\u3080"
106937
+ },
106938
+ rowCheckbox: {
106939
+ ariaLabel: "\u884C\u3092\u9078\u629E"
106804
106940
  }
106805
106941
  }
106806
106942
  };
@@ -106832,7 +106968,7 @@ var pl_PL_default = {
106832
106968
  bulkEdit: "Edycja masowa",
106833
106969
  cancel: "Anuluj",
106834
106970
  editValues: "Edytuj warto\u015Bci",
106835
- error: "Przepraszamy, nie mo\u017Cna zaktualizowa\u0107 pozycji.Spr\xF3buj ponownie.",
106971
+ error: "Przepraszamy, nie mo\u017Cna zaktualizowa\u0107 pozycji. Spr\xF3buj ponownie.",
106836
106972
  placeholderForField: "Wprowad\u017A %{fieldName}",
106837
106973
  selection: "Wybrano %{count} %{number}",
106838
106974
  success: "Pozycje zosta\u0142y pomy\u015Blnie zaktualizowane.",
@@ -106866,6 +107002,12 @@ var pl_PL_default = {
106866
107002
  less_than_equal_to: "mniej ni\u017C lub r\xF3wne",
106867
107003
  no_value: "brak warto\u015Bci"
106868
107004
  }
107005
+ },
107006
+ multiSelectQuickFilter: {
107007
+ ariaLabel: "Szybki filtr: wybierz wiele opcji"
107008
+ },
107009
+ singleSelectQuickFilter: {
107010
+ ariaLabel: "Szybki filtr: wybierz opcj\u0119"
106869
107011
  }
106870
107012
  },
106871
107013
  loading: {
@@ -106952,6 +107094,9 @@ var pl_PL_default = {
106952
107094
  groupCell: {
106953
107095
  expand: "Rozwi\u0144 grup\u0119",
106954
107096
  collapse: "Zwi\u0144 grup\u0119"
107097
+ },
107098
+ rowCheckbox: {
107099
+ ariaLabel: "Wybierz wiersz"
106955
107100
  }
106956
107101
  }
106957
107102
  };
@@ -107177,6 +107322,12 @@ var pt_BR_default = {
107177
107322
  less_than_equal_to: "\xC9 Menor Que ou Igual a",
107178
107323
  no_value: "Nenhum Valor"
107179
107324
  }
107325
+ },
107326
+ multiSelectQuickFilter: {
107327
+ ariaLabel: "Filtro r\xE1pido: Selecione v\xE1rias op\xE7\xF5es"
107328
+ },
107329
+ singleSelectQuickFilter: {
107330
+ ariaLabel: "Filtro r\xE1pido: Selecione uma op\xE7\xE3o"
107180
107331
  }
107181
107332
  },
107182
107333
  loading: {
@@ -107263,6 +107414,9 @@ var pt_BR_default = {
107263
107414
  groupCell: {
107264
107415
  expand: "Expandir grupo",
107265
107416
  collapse: "Recolher grupo"
107417
+ },
107418
+ rowCheckbox: {
107419
+ ariaLabel: "Selecionar Linha"
107266
107420
  }
107267
107421
  }
107268
107422
  };
@@ -107328,6 +107482,12 @@ var th_TH_default = {
107328
107482
  less_than_equal_to: "\u0E19\u0E49\u0E2D\u0E22\u0E01\u0E27\u0E48\u0E32\u0E2B\u0E23\u0E37\u0E2D\u0E40\u0E17\u0E48\u0E32\u0E01\u0E31\u0E1A",
107329
107483
  no_value: "\u0E44\u0E21\u0E48\u0E21\u0E35\u0E04\u0E48\u0E32"
107330
107484
  }
107485
+ },
107486
+ multiSelectQuickFilter: {
107487
+ ariaLabel: "\u0E15\u0E31\u0E27\u0E01\u0E23\u0E2D\u0E07\u0E14\u0E48\u0E27\u0E19: \u0E40\u0E25\u0E37\u0E2D\u0E01\u0E15\u0E31\u0E27\u0E40\u0E25\u0E37\u0E2D\u0E01\u0E2B\u0E25\u0E32\u0E22\u0E23\u0E32\u0E22\u0E01\u0E32\u0E23"
107488
+ },
107489
+ singleSelectQuickFilter: {
107490
+ ariaLabel: "\u0E15\u0E31\u0E27\u0E01\u0E23\u0E2D\u0E07\u0E14\u0E48\u0E27\u0E19: \u0E40\u0E25\u0E37\u0E2D\u0E01\u0E15\u0E31\u0E27\u0E40\u0E25\u0E37\u0E2D\u0E01"
107331
107491
  }
107332
107492
  },
107333
107493
  loading: {
@@ -107414,6 +107574,9 @@ var th_TH_default = {
107414
107574
  groupCell: {
107415
107575
  expand: "\u0E02\u0E22\u0E32\u0E22\u0E01\u0E25\u0E38\u0E48\u0E21",
107416
107576
  collapse: "\u0E01\u0E32\u0E23\u0E22\u0E38\u0E1A\u0E01\u0E25\u0E38\u0E48\u0E21"
107577
+ },
107578
+ rowCheckbox: {
107579
+ ariaLabel: "\u0E40\u0E25\u0E37\u0E2D\u0E01\u0E41\u0E16\u0E27"
107417
107580
  }
107418
107581
  }
107419
107582
  };
@@ -107479,6 +107642,12 @@ var zh_SG_default = {
107479
107642
  less_than_equal_to: "\u5C0F\u4E8E\u6216\u7B49\u4E8E",
107480
107643
  no_value: "\u65E0\u503C"
107481
107644
  }
107645
+ },
107646
+ multiSelectQuickFilter: {
107647
+ ariaLabel: "\u5FEB\u901F\u7B5B\u9009\uFF1A\u9009\u62E9\u591A\u4E2A\u9009\u9879"
107648
+ },
107649
+ singleSelectQuickFilter: {
107650
+ ariaLabel: "\u5FEB\u901F\u7B5B\u9009\uFF1A\u9009\u62E9\u4E00\u4E2A\u9009\u9879"
107482
107651
  }
107483
107652
  },
107484
107653
  loading: {
@@ -107565,6 +107734,9 @@ var zh_SG_default = {
107565
107734
  groupCell: {
107566
107735
  expand: "\u5C55\u5F00\u7EC4",
107567
107736
  collapse: "\u6298\u53E0\u7EC4"
107737
+ },
107738
+ rowCheckbox: {
107739
+ ariaLabel: "\u9009\u62E9\u884C"
107568
107740
  }
107569
107741
  }
107570
107742
  };