@procore/data-table 14.5.0 → 14.5.1

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.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,13 @@
1
1
  # Change Log
2
2
 
3
+ ## 14.5.1
4
+
5
+ ### Patch Changes
6
+
7
+ - 276ec0423: Add label to "Configure" button
8
+ - 4743df6b3: Fix column header text is cutoff when too long
9
+ - b88566710: Refactor `isEmptyValue`, removing extraneous code paths and adding test cases.
10
+
3
11
  ## 14.5.0
4
12
 
5
13
  ### Minor Changes
@@ -648,9 +656,9 @@ TextCellColumnDefinition<
648
656
  'customBottomRowRenderer', // pinned row renderer
649
657
  string,
650
658
  string
651
- >
659
+ >;
652
660
  // v8
653
- TextCellColumnDefinition<string, string, string>
661
+ TextCellColumnDefinition<string, string, string>;
654
662
  ```
655
663
 
656
664
  ### Server Side Row Model Breaking Changes
@@ -1419,7 +1419,7 @@ ag-grid, ag-grid-angular, ag-grid-ng2, ag-grid-polymer, ag-grid-aurelia {
1419
1419
  animation-iteration-count: infinite;
1420
1420
  animation-name: ag-shake-left-to-right;
1421
1421
  }
1422
- @keyframes _ag-shake-left-to-right_qs3ag_366 {
1422
+ @keyframes _ag-shake-left-to-right_taxt5_366 {
1423
1423
  from {
1424
1424
  padding-left: 6px;
1425
1425
  padding-right: 2px;
@@ -5420,7 +5420,7 @@ input[class^=ag-][type=button]:focus, button[class^=ag-]:focus {
5420
5420
  animation-iteration-count: infinite;
5421
5421
  animation-timing-function: linear;
5422
5422
  }
5423
- @keyframes _spin_qs3ag_1 {
5423
+ @keyframes _spin_taxt5_1 {
5424
5424
  from {
5425
5425
  transform: rotate(0deg);
5426
5426
  }
@@ -7592,8 +7592,11 @@ input[class^=ag-][type=range]:disabled {
7592
7592
  .ag-theme-alpine.ag-theme-alpine.ag-theme-alpine .ag-ltr .ag-header-cell .ag-header-cell-comp-wrapper .ag-header-cell-label {
7593
7593
  padding: 8px 0;
7594
7594
  }
7595
+ .ag-theme-alpine.ag-theme-alpine.ag-theme-alpine .ag-ltr .ag-header-cell .ag-header-cell-comp-wrapper .ag-header-cell-label .data-table-header-display-name-container {
7596
+ width: 100%;
7597
+ }
7595
7598
  .ag-theme-alpine.ag-theme-alpine.ag-theme-alpine .ag-ltr .ag-header-cell .ag-header-cell-comp-wrapper .ag-header-cell-label .data-table-header-display-name {
7596
- white-space: nowrap;
7599
+ word-wrap: break-word;
7597
7600
  text-overflow: ellipsis;
7598
7601
  overflow: hidden;
7599
7602
  }
@@ -7899,7 +7902,7 @@ input[class^=ag-][type=range]:disabled {
7899
7902
  padding-left: 16px;
7900
7903
  }
7901
7904
 
7902
- div._contextPanel_qs3ag_7123 {
7905
+ div._contextPanel_taxt5_7126 {
7903
7906
  width: 400px;
7904
7907
  transition: all ease 500ms;
7905
7908
  flex: 0 0 auto;
@@ -7908,7 +7911,7 @@ div._contextPanel_qs3ag_7123 {
7908
7911
  border: 1px solid #d6dadc;
7909
7912
  display: flex;
7910
7913
  }
7911
- div._contextPanel--hidden_qs3ag_7132 {
7914
+ div._contextPanel--hidden_taxt5_7135 {
7912
7915
  border: none;
7913
7916
  overflow: hidden;
7914
7917
  padding: 0px;
@@ -7916,50 +7919,50 @@ div._contextPanel--hidden_qs3ag_7132 {
7916
7919
  width: 0px;
7917
7920
  }
7918
7921
 
7919
- ._contextPanelWrapper_qs3ag_7140 {
7922
+ ._contextPanelWrapper_taxt5_7143 {
7920
7923
  position: relative;
7921
7924
  flex-grow: 1;
7922
7925
  }
7923
7926
 
7924
- ._contextPanelBody_qs3ag_7145 {
7927
+ ._contextPanelBody_taxt5_7148 {
7925
7928
  width: clamp(380px, 400px, 100%);
7926
7929
  }
7927
7930
 
7928
- ._contextPanel-stickyHeader_qs3ag_7149 {
7931
+ ._contextPanel-stickyHeader_taxt5_7152 {
7929
7932
  background-color: #ffffff;
7930
7933
  position: sticky;
7931
7934
  top: 0;
7932
7935
  z-index: 5;
7933
7936
  }
7934
7937
 
7935
- ._filters-list_qs3ag_7156 {
7938
+ ._filters-list_taxt5_7159 {
7936
7939
  padding: 0;
7937
7940
  margin: 0;
7938
7941
  }
7939
- ._filters-list_qs3ag_7156 ol {
7942
+ ._filters-list_taxt5_7159 ol {
7940
7943
  padding: 0;
7941
7944
  margin: 0;
7942
7945
  }
7943
7946
 
7944
- ._col-drag-column-icon_qs3ag_7165 {
7947
+ ._col-drag-column-icon_taxt5_7168 {
7945
7948
  color: #6a767c;
7946
7949
  }
7947
7950
 
7948
- ._tabular-nums_qs3ag_7169 {
7951
+ ._tabular-nums_taxt5_7172 {
7949
7952
  font-variant-numeric: tabular-nums;
7950
7953
  }`;
7951
7954
  document.head.appendChild(document.createElement("style")).appendChild(document.createTextNode(css));
7952
7955
  var styles_default = {
7953
- "contextPanel": "_contextPanel_qs3ag_7123",
7954
- "contextPanel--hidden": "_contextPanel--hidden_qs3ag_7132",
7955
- "contextPanelWrapper": "_contextPanelWrapper_qs3ag_7140",
7956
- "contextPanelBody": "_contextPanelBody_qs3ag_7145",
7957
- "contextPanel-stickyHeader": "_contextPanel-stickyHeader_qs3ag_7149",
7958
- "filters-list": "_filters-list_qs3ag_7156",
7959
- "col-drag-column-icon": "_col-drag-column-icon_qs3ag_7165",
7960
- "tabular-nums": "_tabular-nums_qs3ag_7169",
7961
- "ag-shake-left-to-right": "_ag-shake-left-to-right_qs3ag_366",
7962
- "spin": "_spin_qs3ag_1"
7956
+ "contextPanel": "_contextPanel_taxt5_7126",
7957
+ "contextPanel--hidden": "_contextPanel--hidden_taxt5_7135",
7958
+ "contextPanelWrapper": "_contextPanelWrapper_taxt5_7143",
7959
+ "contextPanelBody": "_contextPanelBody_taxt5_7148",
7960
+ "contextPanel-stickyHeader": "_contextPanel-stickyHeader_taxt5_7152",
7961
+ "filters-list": "_filters-list_taxt5_7159",
7962
+ "col-drag-column-icon": "_col-drag-column-icon_taxt5_7168",
7963
+ "tabular-nums": "_tabular-nums_taxt5_7172",
7964
+ "ag-shake-left-to-right": "_ag-shake-left-to-right_taxt5_366",
7965
+ "spin": "_spin_taxt5_1"
7963
7966
  };
7964
7967
 
7965
7968
  // src/utils/getCellValueTypographyProps.ts
@@ -8147,19 +8150,19 @@ var CompanyCellRenderer = withDataTableRenderer(Renderer2, "select");
8147
8150
 
8148
8151
  // src/utils/isEmptyValue.ts
8149
8152
  var isEmptyValue = (value) => {
8150
- if (typeof value === "boolean") {
8153
+ if (typeof value === "boolean" || typeof value === "number") {
8151
8154
  return false;
8152
8155
  }
8153
- if (Array.isArray(value)) {
8154
- return !value.length;
8156
+ if (!value) {
8157
+ return true;
8155
8158
  }
8156
- if (value === 0) {
8157
- return false;
8159
+ if (Array.isArray(value)) {
8160
+ return value.length === 0;
8158
8161
  }
8159
- if (value && Object.keys(value).length === 0 && Object.getPrototypeOf(value) === Object.prototype) {
8160
- return !!value;
8162
+ if (Object.getPrototypeOf(value) === Object.prototype) {
8163
+ return Object.keys(value).length === 0;
8161
8164
  }
8162
- return !value;
8165
+ return false;
8163
8166
  };
8164
8167
 
8165
8168
  // src/CellRenderers/CurrencyCell.tsx
@@ -56645,7 +56648,7 @@ var GenericHeaderRenderer = (props) => {
56645
56648
  trigger: isOverflowing ? "hover" : "none",
56646
56649
  overlay: /* @__PURE__ */ React83__default.default.createElement(coreReact.Tooltip.Content, null, /* @__PURE__ */ React83__default.default.createElement("span", null, props.displayName))
56647
56650
  },
56648
- /* @__PURE__ */ React83__default.default.createElement("div", null, /* @__PURE__ */ React83__default.default.createElement("span", { ref, className: "data-table-header-display-name" }, props.displayName))
56651
+ /* @__PURE__ */ React83__default.default.createElement("div", { className: "data-table-header-display-name-container" }, /* @__PURE__ */ React83__default.default.createElement("span", { ref, className: "data-table-header-display-name" }, props.displayName))
56649
56652
  ), HeaderNode && /* @__PURE__ */ React83__default.default.createElement(
56650
56653
  coreReact.Flex,
56651
56654
  {
@@ -77838,6 +77841,7 @@ function useContextPanel() {
77838
77841
  }
77839
77842
  var ConfigPanelButton = () => {
77840
77843
  const { contextPanel, totalRowCount } = useInternalTableContext();
77844
+ const I18n = coreReact.useI18nContext();
77841
77845
  return /* @__PURE__ */ React83__default.default.createElement(
77842
77846
  EmptyResultsControlTooltip,
77843
77847
  {
@@ -77855,28 +77859,29 @@ var ConfigPanelButton = () => {
77855
77859
  contextPanel.show("configuration");
77856
77860
  }
77857
77861
  },
77862
+ icon: /* @__PURE__ */ React83__default.default.createElement(
77863
+ "svg",
77864
+ {
77865
+ style: { marginTop: "6px" },
77866
+ focusable: false,
77867
+ width: "15",
77868
+ height: "15",
77869
+ viewBox: "0 0 20 20",
77870
+ fill: "none",
77871
+ xmlns: "http://www.w3.org/2000/svg"
77872
+ },
77873
+ /* @__PURE__ */ React83__default.default.createElement(
77874
+ "path",
77875
+ {
77876
+ d: "M0 11.5V13.5H4.5V11.5H0ZM0 1.5V3.5H7.5V1.5H0ZM8.5 15V13.5H15V11.5H8.5V10H6.66667V15H8.5ZM3.5 5V6.5H0V8.5H3.5V10H5.5V5H3.5ZM15 8.5V6.5H7.5V8.5H15ZM9.5 5H11.6667V3.5H15V1.5H11.6667V0H9.5V5Z",
77877
+ fill: "currentColor"
77878
+ }
77879
+ )
77880
+ ),
77858
77881
  selected: contextPanel.content === "configuration",
77859
77882
  "data-qa": "table-config-button"
77860
77883
  },
77861
- /* @__PURE__ */ React83__default.default.createElement(
77862
- "svg",
77863
- {
77864
- style: { marginTop: "6px" },
77865
- focusable: false,
77866
- width: "15",
77867
- height: "15",
77868
- viewBox: "0 0 15 15",
77869
- fill: "none",
77870
- xmlns: "http://www.w3.org/2000/svg"
77871
- },
77872
- /* @__PURE__ */ React83__default.default.createElement(
77873
- "path",
77874
- {
77875
- d: "M0 11.5V13.5H4.5V11.5H0ZM0 1.5V3.5H7.5V1.5H0ZM8.5 15V13.5H15V11.5H8.5V10H6.66667V15H8.5ZM3.5 5V6.5H0V8.5H3.5V10H5.5V5H3.5ZM15 8.5V6.5H7.5V8.5H15ZM9.5 5H11.6667V3.5H15V1.5H11.6667V0H9.5V5Z",
77876
- fill: "currentColor"
77877
- }
77878
- )
77879
- )
77884
+ I18n.t("dataTable.tableSettings.configure")
77880
77885
  )
77881
77886
  );
77882
77887
  };
@@ -78711,7 +78716,8 @@ var de_DE_default = {
78711
78716
  tableSettings: "Tabelleneinstellungen",
78712
78717
  groupBy: "Gruppieren nach:",
78713
78718
  reset: "Zur\xFCcksetzen",
78714
- selectColumnGroup: "W\xE4hlen Sie eine Spalte zum Gruppieren."
78719
+ selectColumnGroup: "W\xE4hlen Sie eine Spalte zum Gruppieren.",
78720
+ configure: "Konfigurieren"
78715
78721
  },
78716
78722
  rowGroupToggle: {
78717
78723
  expandTierOne: "\xD6ffnen Sie die ersten Gruppen in der Tabelle.",
@@ -78855,7 +78861,8 @@ var en_AU_default = {
78855
78861
  tableSettings: "Table Settings",
78856
78862
  groupBy: "Group by:",
78857
78863
  reset: "Reset",
78858
- selectColumnGroup: "Select a column to group"
78864
+ selectColumnGroup: "Select a column to group",
78865
+ configure: "Configure"
78859
78866
  },
78860
78867
  rowGroupToggle: {
78861
78868
  expandTierOne: "Open first groups in the table.",
@@ -78999,7 +79006,8 @@ var en_CA_default = {
78999
79006
  tableSettings: "Table Settings",
79000
79007
  groupBy: "Group by:",
79001
79008
  reset: "Reset",
79002
- selectColumnGroup: "Select a column to group"
79009
+ selectColumnGroup: "Select a column to group",
79010
+ configure: "Configure"
79003
79011
  },
79004
79012
  rowGroupToggle: {
79005
79013
  expandTierOne: "Open first groups in the table.",
@@ -79143,7 +79151,8 @@ var en_GB_default = {
79143
79151
  tableSettings: "Table Settings",
79144
79152
  groupBy: "Group by:",
79145
79153
  reset: "Reset",
79146
- selectColumnGroup: "Select a column to group"
79154
+ selectColumnGroup: "Select a column to group",
79155
+ configure: "Configure"
79147
79156
  },
79148
79157
  rowGroupToggle: {
79149
79158
  expandTierOne: "Open first groups in the table.",
@@ -79287,7 +79296,8 @@ var en_default = {
79287
79296
  tableSettings: "Table Settings",
79288
79297
  groupBy: "Group by:",
79289
79298
  reset: "Reset",
79290
- selectColumnGroup: "Select a column to group"
79299
+ selectColumnGroup: "Select a column to group",
79300
+ configure: "Configure"
79291
79301
  },
79292
79302
  rowGroupToggle: {
79293
79303
  expandTierOne: "Open first groups in the table.",
@@ -79431,7 +79441,8 @@ var es_ES_default = {
79431
79441
  tableSettings: "Configuraci\xF3n de la tabla",
79432
79442
  groupBy: "Agrupar por:",
79433
79443
  reset: "Restablecer",
79434
- selectColumnGroup: "Seleccione una columna para agrupar"
79444
+ selectColumnGroup: "Seleccione una columna para agrupar",
79445
+ configure: "Configurar"
79435
79446
  },
79436
79447
  rowGroupToggle: {
79437
79448
  expandTierOne: "Abrir los primeros grupos de la tabla.",
@@ -79575,7 +79586,8 @@ var es_default = {
79575
79586
  tableSettings: "Configuraci\xF3n de la tabla",
79576
79587
  groupBy: "Agrupar por:",
79577
79588
  reset: "Restablecer",
79578
- selectColumnGroup: "Selecciona una columna para agrupar"
79589
+ selectColumnGroup: "Selecciona una columna para agrupar",
79590
+ configure: "Configurar"
79579
79591
  },
79580
79592
  rowGroupToggle: {
79581
79593
  expandTierOne: "Abrir los primeros grupos de la tabla.",
@@ -79719,7 +79731,8 @@ var fr_CA_default = {
79719
79731
  tableSettings: "Param\xE8tres du tableau",
79720
79732
  groupBy: "Regrouper par :",
79721
79733
  reset: "R\xE9initialiser",
79722
- selectColumnGroup: "S\xE9lectionnez une colonne \xE0 grouper"
79734
+ selectColumnGroup: "S\xE9lectionnez une colonne \xE0 grouper",
79735
+ configure: "Configurer"
79723
79736
  },
79724
79737
  rowGroupToggle: {
79725
79738
  expandTierOne: "Ouvrez les premiers groupes du tableau.",
@@ -79863,7 +79876,8 @@ var fr_FR_default = {
79863
79876
  tableSettings: "Param\xE8tres du tableau",
79864
79877
  groupBy: "Regrouper par\xA0:",
79865
79878
  reset: "R\xE9initialiser",
79866
- selectColumnGroup: "S\xE9lectionner une colonne \xE0 regrouper"
79879
+ selectColumnGroup: "S\xE9lectionner une colonne \xE0 regrouper",
79880
+ configure: "Configurer"
79867
79881
  },
79868
79882
  rowGroupToggle: {
79869
79883
  expandTierOne: "Ouvrez les premiers groupes du tableau.",
@@ -80007,7 +80021,8 @@ var is_IS_default = {
80007
80021
  tableSettings: "Tafla stillingar",
80008
80022
  groupBy: "H\xF3pur eftir:",
80009
80023
  reset: "Endurstilla",
80010
- selectColumnGroup: "Veldu d\xE1lk til a\xF0 flokka"
80024
+ selectColumnGroup: "Veldu d\xE1lk til a\xF0 flokka",
80025
+ configure: "Stilla"
80011
80026
  },
80012
80027
  rowGroupToggle: {
80013
80028
  expandTierOne: "Opna\xF0u fyrstu h\xF3pa \xED t\xF6flunni.",
@@ -80151,7 +80166,8 @@ var ja_JP_default = {
80151
80166
  tableSettings: "\u8868\u306E\u8A2D\u5B9A",
80152
80167
  groupBy: "\u30B0\u30EB\u30FC\u30D7\u5316:",
80153
80168
  reset: "\u30EA\u30BB\u30C3\u30C8",
80154
- selectColumnGroup: "\u30B0\u30EB\u30FC\u30D7\u5316\u3059\u308B\u5217\u3092\u9078\u629E"
80169
+ selectColumnGroup: "\u30B0\u30EB\u30FC\u30D7\u5316\u3059\u308B\u5217\u3092\u9078\u629E",
80170
+ configure: "\u69CB\u6210"
80155
80171
  },
80156
80172
  rowGroupToggle: {
80157
80173
  expandTierOne: "\u8868\u306E\u6700\u521D\u306E\u30B0\u30EB\u30FC\u30D7\u3092\u958B\u304D\u307E\u3059\u3002",
@@ -80295,7 +80311,8 @@ var pt_BR_default = {
80295
80311
  tableSettings: "Configura\xE7\xF5es da Tabela",
80296
80312
  groupBy: "Agrupar por:",
80297
80313
  reset: "Redefinir",
80298
- selectColumnGroup: "Selecionar uma coluna para agrupar"
80314
+ selectColumnGroup: "Selecionar uma coluna para agrupar",
80315
+ configure: "Configurar"
80299
80316
  },
80300
80317
  rowGroupToggle: {
80301
80318
  expandTierOne: "Abra os primeiros grupos na tabela.",
@@ -80439,7 +80456,8 @@ var th_TH_default = {
80439
80456
  tableSettings: "\u0E01\u0E32\u0E23\u0E15\u0E31\u0E49\u0E07\u0E04\u0E48\u0E32\u0E15\u0E32\u0E23\u0E32\u0E07",
80440
80457
  groupBy: "\u0E08\u0E31\u0E14\u0E01\u0E25\u0E38\u0E48\u0E21\u0E15\u0E32\u0E21:",
80441
80458
  reset: "\u0E23\u0E35\u0E40\u0E0B\u0E47\u0E15",
80442
- selectColumnGroup: "\u0E40\u0E25\u0E37\u0E2D\u0E01\u0E04\u0E2D\u0E25\u0E31\u0E21\u0E19\u0E4C\u0E17\u0E35\u0E48\u0E08\u0E30\u0E08\u0E31\u0E14\u0E01\u0E25\u0E38\u0E48\u0E21"
80459
+ selectColumnGroup: "\u0E40\u0E25\u0E37\u0E2D\u0E01\u0E04\u0E2D\u0E25\u0E31\u0E21\u0E19\u0E4C\u0E17\u0E35\u0E48\u0E08\u0E30\u0E08\u0E31\u0E14\u0E01\u0E25\u0E38\u0E48\u0E21",
80460
+ configure: "\u0E01\u0E33\u0E2B\u0E19\u0E14\u0E04\u0E48\u0E32"
80443
80461
  },
80444
80462
  rowGroupToggle: {
80445
80463
  expandTierOne: "\u0E40\u0E1B\u0E34\u0E14\u0E01\u0E25\u0E38\u0E48\u0E21\u0E41\u0E23\u0E01\u0E43\u0E19\u0E15\u0E32\u0E23\u0E32\u0E07",
@@ -80583,7 +80601,8 @@ var zh_SG_default = {
80583
80601
  tableSettings: "\u8868\u683C\u8BBE\u7F6E",
80584
80602
  groupBy: "\u5206\u7EC4\u4F9D\u636E\uFF1A",
80585
80603
  reset: "\u91CD\u7F6E",
80586
- selectColumnGroup: "\u9009\u62E9\u8981\u5206\u7C7B\u7684\u5217"
80604
+ selectColumnGroup: "\u9009\u62E9\u8981\u5206\u7C7B\u7684\u5217",
80605
+ configure: "\u914D\u7F6E"
80587
80606
  },
80588
80607
  rowGroupToggle: {
80589
80608
  expandTierOne: "\u6253\u5F00\u8868\u4E2D\u7684\u7B2C\u4E00\u4E2A\u7EC4\u3002",