@procore/data-table 14.28.0-cdn.2 → 14.28.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +5 -4
- package/dist/legacy/index.cjs +110 -89
- package/dist/legacy/index.d.cts +3 -3
- package/dist/legacy/index.d.ts +3 -3
- package/dist/legacy/index.js +110 -89
- package/dist/modern/index.cjs +110 -86
- package/dist/modern/index.d.cts +3 -3
- package/dist/modern/index.d.ts +3 -3
- package/dist/modern/index.js +110 -86
- package/package.json +2 -3
package/CHANGELOG.md
CHANGED
|
@@ -1,16 +1,17 @@
|
|
|
1
1
|
# Change Log
|
|
2
2
|
|
|
3
|
-
##
|
|
3
|
+
## 14.28.0
|
|
4
4
|
|
|
5
5
|
### Minor Changes
|
|
6
6
|
|
|
7
|
+
- e6586a3: If a row is not selectable, make isRowSelected = false
|
|
8
|
+
- 92682a0: Fix: ensure "Select All" checkbox stays visible and functional when the first column is hidden
|
|
7
9
|
- 3f72970: Add placeholder implementation for MultiSelectCellRenderer component
|
|
8
|
-
-
|
|
10
|
+
- 89c28a0: Prevent infinite requests when getRowId returns duplicate IDs in ServerSideDataTable.
|
|
9
11
|
|
|
10
12
|
### Patch Changes
|
|
11
13
|
|
|
12
|
-
-
|
|
13
|
-
- @procore/core-react@12.21.0-cdn.0
|
|
14
|
+
- 5d92cf2: Fix Misalignment in Table Headers with Nested Column Definitions
|
|
14
15
|
|
|
15
16
|
## 14.27.1
|
|
16
17
|
|
package/dist/legacy/index.cjs
CHANGED
|
@@ -12,7 +12,6 @@ var labsFinancialsUtils = require('@procore/labs-financials-utils');
|
|
|
12
12
|
var styled4 = require('styled-components');
|
|
13
13
|
var format = require('@procore/labs-financials-utils/dist/format');
|
|
14
14
|
var ulid$1 = require('ulid');
|
|
15
|
-
var cdnTranslations = require('@procore/cdn-translations');
|
|
16
15
|
var toastAlert = require('@procore/toast-alert');
|
|
17
16
|
var ReactDOM = require('react-dom');
|
|
18
17
|
var server = require('react-dom/server');
|
|
@@ -1424,7 +1423,7 @@ ag-grid, ag-grid-angular, ag-grid-ng2, ag-grid-polymer, ag-grid-aurelia {
|
|
|
1424
1423
|
animation-iteration-count: infinite;
|
|
1425
1424
|
animation-name: ag-shake-left-to-right;
|
|
1426
1425
|
}
|
|
1427
|
-
@keyframes _ag-shake-left-to-
|
|
1426
|
+
@keyframes _ag-shake-left-to-right_if78k_369 {
|
|
1428
1427
|
from {
|
|
1429
1428
|
padding-left: 6px;
|
|
1430
1429
|
padding-right: 2px;
|
|
@@ -5425,7 +5424,7 @@ input[class^=ag-][type=button]:focus, button[class^=ag-]:focus {
|
|
|
5425
5424
|
animation-iteration-count: infinite;
|
|
5426
5425
|
animation-timing-function: linear;
|
|
5427
5426
|
}
|
|
5428
|
-
@keyframes
|
|
5427
|
+
@keyframes _spin_if78k_1 {
|
|
5429
5428
|
from {
|
|
5430
5429
|
transform: rotate(0deg);
|
|
5431
5430
|
}
|
|
@@ -7680,6 +7679,9 @@ input[class^=ag-][type=range]:disabled {
|
|
|
7680
7679
|
.ag-theme-alpine.ag-theme-alpine .ag-icon-tree-open::before {
|
|
7681
7680
|
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>");
|
|
7682
7681
|
}
|
|
7682
|
+
.ag-theme-alpine.ag-theme-alpine .ag-header-cell-resize {
|
|
7683
|
+
right: -5px;
|
|
7684
|
+
}
|
|
7683
7685
|
.ag-theme-alpine.ag-theme-alpine .ag-header-cell-resize::after {
|
|
7684
7686
|
width: 1px;
|
|
7685
7687
|
height: 100%;
|
|
@@ -7933,7 +7935,7 @@ input[class^=ag-][type=range]:disabled {
|
|
|
7933
7935
|
padding-left: 16px;
|
|
7934
7936
|
}
|
|
7935
7937
|
|
|
7936
|
-
div.
|
|
7938
|
+
div._contextPanel_if78k_7159 {
|
|
7937
7939
|
width: 400px;
|
|
7938
7940
|
transition: all ease 500ms;
|
|
7939
7941
|
flex: 0 0 auto;
|
|
@@ -7942,7 +7944,7 @@ div._contextPanel_1ajw9_7156 {
|
|
|
7942
7944
|
border: 1px solid #d6dadc;
|
|
7943
7945
|
display: flex;
|
|
7944
7946
|
}
|
|
7945
|
-
div._contextPanel--
|
|
7947
|
+
div._contextPanel--hidden_if78k_7168 {
|
|
7946
7948
|
border: none;
|
|
7947
7949
|
overflow: hidden;
|
|
7948
7950
|
padding: 0px;
|
|
@@ -7950,50 +7952,50 @@ div._contextPanel--hidden_1ajw9_7165 {
|
|
|
7950
7952
|
width: 0px;
|
|
7951
7953
|
}
|
|
7952
7954
|
|
|
7953
|
-
.
|
|
7955
|
+
._contextPanelWrapper_if78k_7176 {
|
|
7954
7956
|
position: relative;
|
|
7955
7957
|
flex-grow: 1;
|
|
7956
7958
|
}
|
|
7957
7959
|
|
|
7958
|
-
.
|
|
7960
|
+
._contextPanelBody_if78k_7181 {
|
|
7959
7961
|
width: clamp(380px, 400px, 100%);
|
|
7960
7962
|
}
|
|
7961
7963
|
|
|
7962
|
-
._contextPanel-
|
|
7964
|
+
._contextPanel-stickyHeader_if78k_7185 {
|
|
7963
7965
|
background-color: #ffffff;
|
|
7964
7966
|
position: sticky;
|
|
7965
7967
|
top: 0;
|
|
7966
7968
|
z-index: 5;
|
|
7967
7969
|
}
|
|
7968
7970
|
|
|
7969
|
-
._filters-
|
|
7971
|
+
._filters-list_if78k_7192 {
|
|
7970
7972
|
padding: 0;
|
|
7971
7973
|
margin: 0;
|
|
7972
7974
|
}
|
|
7973
|
-
._filters-
|
|
7975
|
+
._filters-list_if78k_7192 ol {
|
|
7974
7976
|
padding: 0;
|
|
7975
7977
|
margin: 0;
|
|
7976
7978
|
}
|
|
7977
7979
|
|
|
7978
|
-
._col-drag-column-
|
|
7980
|
+
._col-drag-column-icon_if78k_7201 {
|
|
7979
7981
|
color: #6a767c;
|
|
7980
7982
|
}
|
|
7981
7983
|
|
|
7982
|
-
._tabular-
|
|
7984
|
+
._tabular-nums_if78k_7205 {
|
|
7983
7985
|
font-variant-numeric: tabular-nums;
|
|
7984
7986
|
}`;
|
|
7985
7987
|
document.head.appendChild(document.createElement("style")).appendChild(document.createTextNode(css));
|
|
7986
7988
|
var styles_default = {
|
|
7987
|
-
"contextPanel": "
|
|
7988
|
-
"contextPanel--hidden": "_contextPanel--
|
|
7989
|
-
"contextPanelWrapper": "
|
|
7990
|
-
"contextPanelBody": "
|
|
7991
|
-
"contextPanel-stickyHeader": "_contextPanel-
|
|
7992
|
-
"filters-list": "_filters-
|
|
7993
|
-
"col-drag-column-icon": "_col-drag-column-
|
|
7994
|
-
"tabular-nums": "_tabular-
|
|
7995
|
-
"ag-shake-left-to-right": "_ag-shake-left-to-
|
|
7996
|
-
"spin": "
|
|
7989
|
+
"contextPanel": "_contextPanel_if78k_7159",
|
|
7990
|
+
"contextPanel--hidden": "_contextPanel--hidden_if78k_7168",
|
|
7991
|
+
"contextPanelWrapper": "_contextPanelWrapper_if78k_7176",
|
|
7992
|
+
"contextPanelBody": "_contextPanelBody_if78k_7181",
|
|
7993
|
+
"contextPanel-stickyHeader": "_contextPanel-stickyHeader_if78k_7185",
|
|
7994
|
+
"filters-list": "_filters-list_if78k_7192",
|
|
7995
|
+
"col-drag-column-icon": "_col-drag-column-icon_if78k_7201",
|
|
7996
|
+
"tabular-nums": "_tabular-nums_if78k_7205",
|
|
7997
|
+
"ag-shake-left-to-right": "_ag-shake-left-to-right_if78k_369",
|
|
7998
|
+
"spin": "_spin_if78k_1"
|
|
7997
7999
|
};
|
|
7998
8000
|
|
|
7999
8001
|
// src/utils/getCellValueTypographyProps.ts
|
|
@@ -54371,6 +54373,9 @@ function useFilterState({
|
|
|
54371
54373
|
},
|
|
54372
54374
|
[gridApi]
|
|
54373
54375
|
);
|
|
54376
|
+
const filterableColumns = React80__default.default.useMemo(() => {
|
|
54377
|
+
return columnDefinitions.filter((colDef) => !!colDef.filterRenderer).sort(sortColumnDefinitionsByFilterIndex);
|
|
54378
|
+
}, [columnDefinitions]);
|
|
54374
54379
|
const getFieldFilters = React80__default.default.useCallback(() => {
|
|
54375
54380
|
return filterableColumns.map((column2) => {
|
|
54376
54381
|
const filterInstance = getFieldFilter(column2.field);
|
|
@@ -54384,10 +54389,7 @@ function useFilterState({
|
|
|
54384
54389
|
...instanceOptions
|
|
54385
54390
|
};
|
|
54386
54391
|
}).filter((filter) => filter.instance !== void 0);
|
|
54387
|
-
}, [getFieldFilter, gridApi]);
|
|
54388
|
-
const filterableColumns = React80__default.default.useMemo(() => {
|
|
54389
|
-
return columnDefinitions.filter((colDef) => !!colDef.filterRenderer).sort(sortColumnDefinitionsByFilterIndex);
|
|
54390
|
-
}, [columnDefinitions]);
|
|
54392
|
+
}, [getFieldFilter, gridApi, filterableColumns]);
|
|
54391
54393
|
const filterEventFunction = function filterEventFunction2() {
|
|
54392
54394
|
if (listenersEnabled.current) {
|
|
54393
54395
|
const allFilters = getFieldFilters();
|
|
@@ -54503,6 +54505,10 @@ function ClientSideMultiSelectFilterRenderer({
|
|
|
54503
54505
|
value = [],
|
|
54504
54506
|
...props
|
|
54505
54507
|
}) {
|
|
54508
|
+
const filterOptions = React80__default.default.useMemo(
|
|
54509
|
+
() => (options ?? []).map((option) => option ?? ""),
|
|
54510
|
+
[options]
|
|
54511
|
+
);
|
|
54506
54512
|
return /* @__PURE__ */ React80__default.default.createElement(
|
|
54507
54513
|
coreReact.MultiSelect,
|
|
54508
54514
|
{
|
|
@@ -54518,8 +54524,8 @@ function ClientSideMultiSelectFilterRenderer({
|
|
|
54518
54524
|
return getLabel((_a = columnDefinition.filterProps) == null ? void 0 : _a.getLabel, option);
|
|
54519
54525
|
},
|
|
54520
54526
|
onChange,
|
|
54521
|
-
options,
|
|
54522
|
-
value: ramda.intersection(value || [],
|
|
54527
|
+
options: filterOptions,
|
|
54528
|
+
value: ramda.intersection(value || [], filterOptions)
|
|
54523
54529
|
}
|
|
54524
54530
|
);
|
|
54525
54531
|
}
|
|
@@ -57255,7 +57261,7 @@ var SortComponent = (props) => {
|
|
|
57255
57261
|
return null;
|
|
57256
57262
|
};
|
|
57257
57263
|
var isRowSelected = (rowNode) => {
|
|
57258
|
-
return Boolean(rowNode.selectable ? rowNode.isSelected() :
|
|
57264
|
+
return Boolean(rowNode.selectable ? rowNode.isSelected() : false);
|
|
57259
57265
|
};
|
|
57260
57266
|
var GenericHeaderRenderer = (props) => {
|
|
57261
57267
|
var _a;
|
|
@@ -57311,22 +57317,26 @@ var GenericHeaderRenderer = (props) => {
|
|
|
57311
57317
|
}, []);
|
|
57312
57318
|
React80__default.default.useEffect(() => {
|
|
57313
57319
|
function calculatePosition() {
|
|
57314
|
-
const
|
|
57315
|
-
if (!(
|
|
57320
|
+
const visibleColumns = props.columnApi.getAllDisplayedColumns();
|
|
57321
|
+
if (!(visibleColumns == null ? void 0 : visibleColumns.length))
|
|
57316
57322
|
return;
|
|
57317
|
-
|
|
57318
|
-
|
|
57319
|
-
setIsFirstColumn(true);
|
|
57320
|
-
} else {
|
|
57321
|
-
setIsFirstColumn(false);
|
|
57322
|
-
}
|
|
57323
|
+
const isCurrentFirst = visibleColumns[0].getColId() === colId;
|
|
57324
|
+
setIsFirstColumn(isCurrentFirst);
|
|
57323
57325
|
}
|
|
57324
57326
|
props.api.addEventListener("columnMoved", calculatePosition);
|
|
57327
|
+
props.api.addEventListener("columnPinned", calculatePosition);
|
|
57328
|
+
props.api.addEventListener("columnVisible", calculatePosition);
|
|
57325
57329
|
calculatePosition();
|
|
57326
57330
|
return () => {
|
|
57327
57331
|
removeEventListenerFromGrid("columnMoved", calculatePosition, props.api);
|
|
57332
|
+
removeEventListenerFromGrid("columnPinned", calculatePosition, props.api);
|
|
57333
|
+
removeEventListenerFromGrid(
|
|
57334
|
+
"columnVisible",
|
|
57335
|
+
calculatePosition,
|
|
57336
|
+
props.api
|
|
57337
|
+
);
|
|
57328
57338
|
};
|
|
57329
|
-
}, []);
|
|
57339
|
+
}, [colId, props.api]);
|
|
57330
57340
|
const onSortToggled = (event) => {
|
|
57331
57341
|
var _a2, _b, _c;
|
|
57332
57342
|
let currentSort = null;
|
|
@@ -57544,7 +57554,7 @@ var GenericHeaderRenderer = (props) => {
|
|
|
57544
57554
|
}
|
|
57545
57555
|
function updateSelectAllCheckbox(e) {
|
|
57546
57556
|
var _a2;
|
|
57547
|
-
if (e.source === "uiSelectAll") {
|
|
57557
|
+
if (e && e.source === "uiSelectAll") {
|
|
57548
57558
|
return;
|
|
57549
57559
|
}
|
|
57550
57560
|
const selectionState = props.api.getServerSideSelectionState();
|
|
@@ -57557,7 +57567,10 @@ var GenericHeaderRenderer = (props) => {
|
|
|
57557
57567
|
);
|
|
57558
57568
|
const isPagination = Boolean(props.api.paginationGetRowCount());
|
|
57559
57569
|
const currentRows = getCurrentRows(props.api, isPagination);
|
|
57560
|
-
const
|
|
57570
|
+
const selectableRows = currentRows.filter(
|
|
57571
|
+
(rowNode) => rowNode.selectable
|
|
57572
|
+
);
|
|
57573
|
+
const isAllSelected = isPagination ? selectableRows.length > 0 && selectableRows.every(isRowSelected) : isSelectionStateSelectAll;
|
|
57561
57574
|
const isPartialSelected = isPagination ? !isAllSelected && currentRows.some(isRowSelected) : isSelectionStatePartialSelected;
|
|
57562
57575
|
if (isAllSelected) {
|
|
57563
57576
|
setSelectAll("all" /* All */);
|
|
@@ -57569,6 +57582,7 @@ var GenericHeaderRenderer = (props) => {
|
|
|
57569
57582
|
}
|
|
57570
57583
|
props.api.addEventListener(selectionChanged, updateSelectAllCheckbox);
|
|
57571
57584
|
props.api.addEventListener(paginationChanged, updateSelectAllCheckbox);
|
|
57585
|
+
updateSelectAllCheckbox();
|
|
57572
57586
|
return () => {
|
|
57573
57587
|
removeEventListenerFromGrid(
|
|
57574
57588
|
selectionChanged,
|
|
@@ -57806,6 +57820,11 @@ function getGroupNodes(params) {
|
|
|
57806
57820
|
function CustomLoader(params) {
|
|
57807
57821
|
const I18n = coreReact.useI18nContext();
|
|
57808
57822
|
const groupNodes = getGroupNodes(params);
|
|
57823
|
+
const internalTableContext = useInternalTableContext();
|
|
57824
|
+
const hasDuplicateRowIds = internalTableContext.hasDuplicateRowIds ?? false;
|
|
57825
|
+
if (hasDuplicateRowIds) {
|
|
57826
|
+
return null;
|
|
57827
|
+
}
|
|
57809
57828
|
if (params.node === groupNodes.firstLoading) {
|
|
57810
57829
|
return /* @__PURE__ */ React80__default.default.createElement(coreReact.Flex, { style: { paddingLeft: "16px" } }, /* @__PURE__ */ React80__default.default.createElement(
|
|
57811
57830
|
LevelIndents,
|
|
@@ -58513,7 +58532,8 @@ var InternalTableContext = React80__default.default.createContext({
|
|
|
58513
58532
|
},
|
|
58514
58533
|
totalRowCount: 0,
|
|
58515
58534
|
setTotalRowCount: () => {
|
|
58516
|
-
}
|
|
58535
|
+
},
|
|
58536
|
+
hasDuplicateRowIds: false
|
|
58517
58537
|
});
|
|
58518
58538
|
var useInternalTableContext = () => React80__default.default.useContext(InternalTableContext);
|
|
58519
58539
|
var prng = ulid$1.detectPrng(true);
|
|
@@ -105875,7 +105895,7 @@ var en_AU_default = {
|
|
|
105875
105895
|
autoSizeAllColumns: "Autosize all columns",
|
|
105876
105896
|
hideColumn: "Hide column",
|
|
105877
105897
|
resetColumns: "Reset columns",
|
|
105878
|
-
unGroupBy: "Un-
|
|
105898
|
+
unGroupBy: "Un-group by {{label}}",
|
|
105879
105899
|
groupBy: "Group by {{label}}"
|
|
105880
105900
|
},
|
|
105881
105901
|
grandTotals: "Grand totals",
|
|
@@ -106038,7 +106058,7 @@ var en_CA_default = {
|
|
|
106038
106058
|
autoSizeAllColumns: "Autosize all columns",
|
|
106039
106059
|
hideColumn: "Hide column",
|
|
106040
106060
|
resetColumns: "Reset columns",
|
|
106041
|
-
unGroupBy: "Un-
|
|
106061
|
+
unGroupBy: "Un-group by {{label}}",
|
|
106042
106062
|
groupBy: "Group by {{label}}"
|
|
106043
106063
|
},
|
|
106044
106064
|
grandTotals: "Grand totals",
|
|
@@ -106613,7 +106633,7 @@ var es_default = {
|
|
|
106613
106633
|
description: "Una vez que su equipo cree \xEDtems, podr\xE1 acceder a ellos aqu\xED. ",
|
|
106614
106634
|
title: "No hay \xEDtems para mostrar en este momento",
|
|
106615
106635
|
itemsTitle: "No hay %{itemsLabel} para mostrar en este momento",
|
|
106616
|
-
tooltip: "El bot\xF3n %{featureName} se habilitar\xE1 una vez que agregue informaci\xF3n
|
|
106636
|
+
tooltip: "El bot\xF3n %{featureName} se habilitar\xE1 una vez que agregue informaci\xF3n a la %{tableName}.",
|
|
106617
106637
|
searchTooltip: "La b\xFAsqueda se habilitar\xE1 una vez que agregue informaci\xF3n a %{tableName}",
|
|
106618
106638
|
featureFilter: "Filtro",
|
|
106619
106639
|
featureQuickFilter: "Filtro r\xE1pido",
|
|
@@ -106627,7 +106647,7 @@ var es_default = {
|
|
|
106627
106647
|
bulkEdit: "Edici\xF3n masiva",
|
|
106628
106648
|
cancel: "Cancelar",
|
|
106629
106649
|
editValues: "Editar valores",
|
|
106630
|
-
error: "Lo sentimos, no se pudieron actualizar los \xEDtems.
|
|
106650
|
+
error: "Lo sentimos, no se pudieron actualizar los \xEDtems. Int\xE9ntelo de nuevo.",
|
|
106631
106651
|
placeholderForField: "Ingrese %{fieldName}",
|
|
106632
106652
|
selection: "%{count} %{number} seleccionado",
|
|
106633
106653
|
success: "Los \xEDtems se actualizaron correctamente.",
|
|
@@ -106673,14 +106693,14 @@ var es_default = {
|
|
|
106673
106693
|
}
|
|
106674
106694
|
},
|
|
106675
106695
|
loading: {
|
|
106676
|
-
initial: "Cargando informaci\xF3n
|
|
106696
|
+
initial: "Cargando informaci\xF3n...",
|
|
106677
106697
|
secondary: "Cargando informaci\xF3n. Gracias por su paciencia."
|
|
106678
106698
|
},
|
|
106679
106699
|
menuOptions: {
|
|
106680
106700
|
sortMenuItem: {
|
|
106681
106701
|
label: "Ordenar por esta columna",
|
|
106682
|
-
sortAscItem: "Ordenar columna
|
|
106683
|
-
sortDescItem: "Ordenar columna
|
|
106702
|
+
sortAscItem: "Ordenar columna - Ascendente",
|
|
106703
|
+
sortDescItem: "Ordenar columna - Descendente",
|
|
106684
106704
|
sortResetItem: "Columna no ordenada"
|
|
106685
106705
|
},
|
|
106686
106706
|
expandAllGroups: "Expandir todos los grupos",
|
|
@@ -106790,7 +106810,7 @@ var fr_CA_default = {
|
|
|
106790
106810
|
bulkEdit: "Modifier en bloc",
|
|
106791
106811
|
cancel: "Annuler",
|
|
106792
106812
|
editValues: "Modifier les valeurs",
|
|
106793
|
-
error: "D\xE9sol\xE9, les items n'ont pas pu \xEAtre mis \xE0 jour.
|
|
106813
|
+
error: "D\xE9sol\xE9, les items n'ont pas pu \xEAtre mis \xE0 jour. Veuillez r\xE9essayer.",
|
|
106794
106814
|
placeholderForField: "Entrez %{fieldName}",
|
|
106795
106815
|
selection: "%{count} %{number} s\xE9lectionn\xE9",
|
|
106796
106816
|
success: "Les items ont \xE9t\xE9 mis \xE0 jour avec succ\xE8s.",
|
|
@@ -106953,7 +106973,7 @@ var fr_FR_default = {
|
|
|
106953
106973
|
bulkEdit: "Modifier en masse",
|
|
106954
106974
|
cancel: "Annuler",
|
|
106955
106975
|
editValues: "Modifier les valeurs",
|
|
106956
|
-
error: "D\xE9sol\xE9, les \xE9l\xE9ments n'ont pas pu \xEAtre mis \xE0 jour.
|
|
106976
|
+
error: "D\xE9sol\xE9, les \xE9l\xE9ments n'ont pas pu \xEAtre mis \xE0 jour. Veuillez r\xE9essayer.",
|
|
106957
106977
|
placeholderForField: "Saisissez %{fieldName}",
|
|
106958
106978
|
selection: "%{count} %{number} s\xE9lectionn\xE9",
|
|
106959
106979
|
success: "Les \xE9l\xE9ments ont bien \xE9t\xE9 mis \xE0 jour.",
|
|
@@ -107771,7 +107791,7 @@ var pt_BR_default = {
|
|
|
107771
107791
|
bulkEdit: "Edi\xE7\xE3o em Massa",
|
|
107772
107792
|
cancel: "Cancelar",
|
|
107773
107793
|
editValues: "Editar Valores",
|
|
107774
|
-
error: "
|
|
107794
|
+
error: "Sentimos muito, mas n\xE3o foi poss\xEDvel atualizar os itens. Tente novamente.",
|
|
107775
107795
|
placeholderForField: "Digite %{fieldName}",
|
|
107776
107796
|
selection: "%{count} %{number} selecionado",
|
|
107777
107797
|
success: "Os itens foram atualizados com sucesso.",
|
|
@@ -107934,7 +107954,7 @@ var th_TH_default = {
|
|
|
107934
107954
|
bulkEdit: "\u0E01\u0E32\u0E23\u0E41\u0E01\u0E49\u0E44\u0E02\u0E41\u0E1A\u0E1A\u0E01\u0E25\u0E38\u0E48\u0E21",
|
|
107935
107955
|
cancel: "\u0E22\u0E01\u0E40\u0E25\u0E34\u0E01",
|
|
107936
107956
|
editValues: "\u0E41\u0E01\u0E49\u0E44\u0E02\u0E04\u0E48\u0E32",
|
|
107937
|
-
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 \
|
|
107957
|
+
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.",
|
|
107938
107958
|
placeholderForField: "\u0E1B\u0E49\u0E2D\u0E19 %{fieldName}",
|
|
107939
107959
|
selection: "%{count} %{number} \u0E17\u0E35\u0E48\u0E40\u0E25\u0E37\u0E2D\u0E01",
|
|
107940
107960
|
success: "\u0E2D\u0E31\u0E1B\u0E40\u0E14\u0E15\u0E23\u0E32\u0E22\u0E01\u0E32\u0E23\u0E2A\u0E33\u0E40\u0E23\u0E47\u0E08\u0E41\u0E25\u0E49\u0E27",
|
|
@@ -109232,8 +109252,7 @@ var DataTable = ({
|
|
|
109232
109252
|
showExpandCollapseAllToggle,
|
|
109233
109253
|
translations: translations2 = {},
|
|
109234
109254
|
enableCellTextSelection,
|
|
109235
|
-
localStoragePersistenceKey
|
|
109236
|
-
enableCDN
|
|
109255
|
+
localStoragePersistenceKey
|
|
109237
109256
|
}) => {
|
|
109238
109257
|
const initialTableConfig = localStoragePersistenceKey && webSdkStorage.storage.local.getItem(localStoragePersistenceKey) || _initialTableConfig;
|
|
109239
109258
|
const onServerSideDataRequestRef = React80__default.default.useRef(onServerSideDataRequest);
|
|
@@ -109245,28 +109264,14 @@ var DataTable = ({
|
|
|
109245
109264
|
);
|
|
109246
109265
|
const contextPanel = useContextPanel();
|
|
109247
109266
|
const clientI18n = coreReact.useI18nContext();
|
|
109248
|
-
const isCDNEnabled = cdnTranslations.isCDNFeatureFlagEnabled(clientI18n, enableCDN);
|
|
109249
|
-
const cdnTranslations$1 = cdnTranslations.useRequestTranslations(
|
|
109250
|
-
{
|
|
109251
|
-
locale: clientI18n.locale,
|
|
109252
|
-
type: "file",
|
|
109253
|
-
absolute_file_path: (locale) => `core/packages/data-table/src/locales/${locale}`
|
|
109254
|
-
},
|
|
109255
|
-
{ en: translations.en, pseudo: translations.pseudo },
|
|
109256
|
-
{
|
|
109257
|
-
oldTranslations: translations,
|
|
109258
|
-
enableCDN: isCDNEnabled
|
|
109259
|
-
}
|
|
109260
|
-
);
|
|
109261
109267
|
const internalI18n = coreReact.useI18n({
|
|
109262
|
-
|
|
109268
|
+
...clientI18n,
|
|
109263
109269
|
translations: ramda.mergeDeepLeft(
|
|
109264
109270
|
ramda.mergeDeepLeft(clientI18n.translations, {
|
|
109265
109271
|
[clientI18n.locale]: translations2
|
|
109266
109272
|
}),
|
|
109267
|
-
|
|
109268
|
-
)
|
|
109269
|
-
enableCDN: isCDNEnabled
|
|
109273
|
+
translations
|
|
109274
|
+
)
|
|
109270
109275
|
});
|
|
109271
109276
|
const rowSelectionRef = React80__default.default.useRef({
|
|
109272
109277
|
affectedRows: {},
|
|
@@ -109317,6 +109322,7 @@ var DataTable = ({
|
|
|
109317
109322
|
);
|
|
109318
109323
|
const [gridApi, setGridApi] = React80__default.default.useState();
|
|
109319
109324
|
const [columnApi, setColumnApi] = React80__default.default.useState();
|
|
109325
|
+
const [hasDuplicateRowIds, setHasDuplicateRowIds] = React80__default.default.useState(false);
|
|
109320
109326
|
const searchStorage = useSearchStorage();
|
|
109321
109327
|
const filterState = useFilterState({
|
|
109322
109328
|
columnDefinitions: columns,
|
|
@@ -109394,7 +109400,9 @@ var DataTable = ({
|
|
|
109394
109400
|
gridApi == null ? void 0 : gridApi.hideOverlay.bind(gridApi),
|
|
109395
109401
|
filterStorage.filtersState,
|
|
109396
109402
|
searchStorage.searchValue,
|
|
109397
|
-
setTotalRowCount
|
|
109403
|
+
setTotalRowCount,
|
|
109404
|
+
setHasDuplicateRowIds,
|
|
109405
|
+
getRowId
|
|
109398
109406
|
)
|
|
109399
109407
|
);
|
|
109400
109408
|
gridApi == null ? void 0 : gridApi.paginationGoToPage(0);
|
|
@@ -109489,7 +109497,8 @@ var DataTable = ({
|
|
|
109489
109497
|
tableRef,
|
|
109490
109498
|
totalRowCount,
|
|
109491
109499
|
setTotalRowCount,
|
|
109492
|
-
updateServerSideDataSource
|
|
109500
|
+
updateServerSideDataSource,
|
|
109501
|
+
hasDuplicateRowIds
|
|
109493
109502
|
}
|
|
109494
109503
|
},
|
|
109495
109504
|
children
|
|
@@ -109500,12 +109509,34 @@ var rowDragMoveEvent;
|
|
|
109500
109509
|
var rowDragEndEvent;
|
|
109501
109510
|
function getServerSideDatasource(onServerSideDataRequestCallbackRef, onEmptyResponseCallback = () => {
|
|
109502
109511
|
}, onNonEmptyResponseCallback = () => {
|
|
109503
|
-
}, filters, search, setTotalRowCount) {
|
|
109512
|
+
}, filters, search, setTotalRowCount, setHasDuplicateRowIds, getRowId) {
|
|
109504
109513
|
return {
|
|
109505
109514
|
getRows: async (params) => {
|
|
109506
109515
|
if (onServerSideDataRequestCallbackRef.current) {
|
|
109507
109516
|
const { request, success, fail } = params;
|
|
109508
109517
|
const onSuccess = (loadSuccessParams) => {
|
|
109518
|
+
const { rowData } = loadSuccessParams;
|
|
109519
|
+
if (rowData && Array.isArray(rowData) && getRowId) {
|
|
109520
|
+
const uniqueRowIds = /* @__PURE__ */ new Set();
|
|
109521
|
+
for (const row2 of rowData) {
|
|
109522
|
+
const id = getRowId({
|
|
109523
|
+
data: row2,
|
|
109524
|
+
level: 0,
|
|
109525
|
+
api: {},
|
|
109526
|
+
columnApi: {},
|
|
109527
|
+
context: {}
|
|
109528
|
+
});
|
|
109529
|
+
if (uniqueRowIds.has(id)) {
|
|
109530
|
+
setHasDuplicateRowIds(true);
|
|
109531
|
+
logger.error(
|
|
109532
|
+
"Duplicate row IDs detected in rowData. Check getRowId() to ensure it returns unique IDs."
|
|
109533
|
+
);
|
|
109534
|
+
fail();
|
|
109535
|
+
return;
|
|
109536
|
+
}
|
|
109537
|
+
uniqueRowIds.add(id);
|
|
109538
|
+
}
|
|
109539
|
+
}
|
|
109509
109540
|
if (!loadSuccessParams.rowCount && request.groupKeys.length === 0) {
|
|
109510
109541
|
onEmptyResponseCallback();
|
|
109511
109542
|
} else {
|
|
@@ -110523,13 +110554,7 @@ function ClientSideFilterInner(props) {
|
|
|
110523
110554
|
var _a, _b;
|
|
110524
110555
|
const { Component: Component4, columnDefinition, onChange, options, value } = props;
|
|
110525
110556
|
const filterHeading = ((_b = (_a = columnDefinition.filterProps) == null ? void 0 : _a.getFilterHeadingText) == null ? void 0 : _b.call(_a, columnDefinition)) ?? columnDefinition.headerName;
|
|
110526
|
-
const filterOptions = React80__default.default.useMemo(
|
|
110527
|
-
() => {
|
|
110528
|
-
var _a2;
|
|
110529
|
-
return (_a2 = options ?? []) == null ? void 0 : _a2.filter((option) => !!option);
|
|
110530
|
-
},
|
|
110531
|
-
[options]
|
|
110532
|
-
);
|
|
110557
|
+
const filterOptions = React80__default.default.useMemo(() => options ?? [], [options]);
|
|
110533
110558
|
return /* @__PURE__ */ React80__default.default.createElement(coreReact.Box, { as: "li", display: "block", paddingBottom: "xl", style: { width: "100%" } }, filterHeading ? /* @__PURE__ */ React80__default.default.createElement(
|
|
110534
110559
|
coreReact.Label,
|
|
110535
110560
|
{
|
|
@@ -112502,8 +112527,7 @@ var ClientSideDataTable = ({
|
|
|
112502
112527
|
onTableConfigChange,
|
|
112503
112528
|
translations: translations2 = {},
|
|
112504
112529
|
enableCellTextSelection,
|
|
112505
|
-
localStoragePersistenceKey
|
|
112506
|
-
enableCDN
|
|
112530
|
+
localStoragePersistenceKey
|
|
112507
112531
|
}) => {
|
|
112508
112532
|
return /* @__PURE__ */ React80__default.default.createElement(
|
|
112509
112533
|
DataTable,
|
|
@@ -112521,8 +112545,7 @@ var ClientSideDataTable = ({
|
|
|
112521
112545
|
translations: translations2,
|
|
112522
112546
|
localStoragePersistenceKey,
|
|
112523
112547
|
customBulkEditorFields,
|
|
112524
|
-
enableCellTextSelection
|
|
112525
|
-
enableCDN
|
|
112548
|
+
enableCellTextSelection
|
|
112526
112549
|
},
|
|
112527
112550
|
children
|
|
112528
112551
|
);
|
|
@@ -116983,8 +117006,7 @@ var ServerSideDataTable = ({
|
|
|
116983
117006
|
enableCellTextSelection,
|
|
116984
117007
|
showExpandCollapseAllToggle,
|
|
116985
117008
|
translations: translations2 = {},
|
|
116986
|
-
localStoragePersistenceKey
|
|
116987
|
-
enableCDN
|
|
117009
|
+
localStoragePersistenceKey
|
|
116988
117010
|
}) => {
|
|
116989
117011
|
return /* @__PURE__ */ React80__default.default.createElement(
|
|
116990
117012
|
DataTable,
|
|
@@ -117003,8 +117025,7 @@ var ServerSideDataTable = ({
|
|
|
117003
117025
|
translations: translations2,
|
|
117004
117026
|
customBulkEditorFields,
|
|
117005
117027
|
enableCellTextSelection,
|
|
117006
|
-
localStoragePersistenceKey
|
|
117007
|
-
enableCDN
|
|
117028
|
+
localStoragePersistenceKey
|
|
117008
117029
|
},
|
|
117009
117030
|
children
|
|
117010
117031
|
);
|
package/dist/legacy/index.d.cts
CHANGED
|
@@ -1148,7 +1148,6 @@ interface DataTableProps {
|
|
|
1148
1148
|
showExpandCollapseAllToggle?: boolean;
|
|
1149
1149
|
translations?: DataTableTranslations;
|
|
1150
1150
|
enableCellTextSelection?: boolean;
|
|
1151
|
-
enableCDN?: boolean;
|
|
1152
1151
|
}
|
|
1153
1152
|
interface ClientSideDataTableProps extends Omit<DataTableProps, 'onServerSideDataRequest' | 'showExpandCollapseAllToggle'> {
|
|
1154
1153
|
}
|
|
@@ -1378,6 +1377,7 @@ interface InternalTableContext {
|
|
|
1378
1377
|
getColumnDefinition: (field: string) => ColumnDefinition | undefined;
|
|
1379
1378
|
totalRowCount: number;
|
|
1380
1379
|
setTotalRowCount: React__default.Dispatch<React__default.SetStateAction<number>>;
|
|
1380
|
+
hasDuplicateRowIds: boolean;
|
|
1381
1381
|
setSelectedGroupIndex?: React__default.Dispatch<React__default.SetStateAction<string | null>>;
|
|
1382
1382
|
}
|
|
1383
1383
|
declare const InternalTableContext: React__default.Context<InternalTableContext>;
|
|
@@ -1438,7 +1438,7 @@ interface BulkActionProps {
|
|
|
1438
1438
|
style?: React__default.CSSProperties;
|
|
1439
1439
|
}
|
|
1440
1440
|
|
|
1441
|
-
declare const _default$1: (({ analytics, children, columnDefinitions: _columnDefinitions, customBulkEditorFields, enableDynamicRowHeight, enableGroupEditAndValidation, filterGroups, getRowId, initialTableConfig: _initialTableConfig, onBulkEditUpdate, onTableConfigChange, translations, enableCellTextSelection, localStoragePersistenceKey,
|
|
1441
|
+
declare const _default$1: (({ analytics, children, columnDefinitions: _columnDefinitions, customBulkEditorFields, enableDynamicRowHeight, enableGroupEditAndValidation, filterGroups, getRowId, initialTableConfig: _initialTableConfig, onBulkEditUpdate, onTableConfigChange, translations, enableCellTextSelection, localStoragePersistenceKey, }: React__default.PropsWithChildren<ClientSideDataTableProps>) => React__default.JSX.Element) & {
|
|
1442
1442
|
BulkActions: React__default.FunctionComponent<React__default.PropsWithChildren<BulkActionProps>>;
|
|
1443
1443
|
BulkEditActionButton: React__default.FunctionComponent<ActionButtonProps>;
|
|
1444
1444
|
ConfigPanelButton: React__default.FC<{}>;
|
|
@@ -1475,7 +1475,7 @@ declare const MultiSelectQuickFilterRenderer: (props: FilterProps<any[]>) => Rea
|
|
|
1475
1475
|
|
|
1476
1476
|
declare const SingleSelectQuickFilterRenderer: (props: FilterProps<any[]>) => React__default.JSX.Element;
|
|
1477
1477
|
|
|
1478
|
-
declare const _default: (({ analytics, children, columnDefinitions: _columnDefinitions, customBulkEditorFields, enableDynamicRowHeight, enableGroupEditAndValidation, filterGroups, getRowId, initialTableConfig: _initialTableConfig, onBulkEditUpdate, onServerSideDataRequest, onTableConfigChange, enableCellTextSelection, showExpandCollapseAllToggle, translations, localStoragePersistenceKey,
|
|
1478
|
+
declare const _default: (({ analytics, children, columnDefinitions: _columnDefinitions, customBulkEditorFields, enableDynamicRowHeight, enableGroupEditAndValidation, filterGroups, getRowId, initialTableConfig: _initialTableConfig, onBulkEditUpdate, onServerSideDataRequest, onTableConfigChange, enableCellTextSelection, showExpandCollapseAllToggle, translations, localStoragePersistenceKey, }: React__default.PropsWithChildren<DataTableProps>) => React__default.JSX.Element) & {
|
|
1479
1479
|
BulkActions: React__default.FunctionComponent<React__default.PropsWithChildren<BulkActionProps>>;
|
|
1480
1480
|
BulkEditActionButton: React__default.FunctionComponent<ActionButtonProps>;
|
|
1481
1481
|
ConfigPanelButton: React__default.FC<{}>;
|
package/dist/legacy/index.d.ts
CHANGED
|
@@ -1148,7 +1148,6 @@ interface DataTableProps {
|
|
|
1148
1148
|
showExpandCollapseAllToggle?: boolean;
|
|
1149
1149
|
translations?: DataTableTranslations;
|
|
1150
1150
|
enableCellTextSelection?: boolean;
|
|
1151
|
-
enableCDN?: boolean;
|
|
1152
1151
|
}
|
|
1153
1152
|
interface ClientSideDataTableProps extends Omit<DataTableProps, 'onServerSideDataRequest' | 'showExpandCollapseAllToggle'> {
|
|
1154
1153
|
}
|
|
@@ -1378,6 +1377,7 @@ interface InternalTableContext {
|
|
|
1378
1377
|
getColumnDefinition: (field: string) => ColumnDefinition | undefined;
|
|
1379
1378
|
totalRowCount: number;
|
|
1380
1379
|
setTotalRowCount: React__default.Dispatch<React__default.SetStateAction<number>>;
|
|
1380
|
+
hasDuplicateRowIds: boolean;
|
|
1381
1381
|
setSelectedGroupIndex?: React__default.Dispatch<React__default.SetStateAction<string | null>>;
|
|
1382
1382
|
}
|
|
1383
1383
|
declare const InternalTableContext: React__default.Context<InternalTableContext>;
|
|
@@ -1438,7 +1438,7 @@ interface BulkActionProps {
|
|
|
1438
1438
|
style?: React__default.CSSProperties;
|
|
1439
1439
|
}
|
|
1440
1440
|
|
|
1441
|
-
declare const _default$1: (({ analytics, children, columnDefinitions: _columnDefinitions, customBulkEditorFields, enableDynamicRowHeight, enableGroupEditAndValidation, filterGroups, getRowId, initialTableConfig: _initialTableConfig, onBulkEditUpdate, onTableConfigChange, translations, enableCellTextSelection, localStoragePersistenceKey,
|
|
1441
|
+
declare const _default$1: (({ analytics, children, columnDefinitions: _columnDefinitions, customBulkEditorFields, enableDynamicRowHeight, enableGroupEditAndValidation, filterGroups, getRowId, initialTableConfig: _initialTableConfig, onBulkEditUpdate, onTableConfigChange, translations, enableCellTextSelection, localStoragePersistenceKey, }: React__default.PropsWithChildren<ClientSideDataTableProps>) => React__default.JSX.Element) & {
|
|
1442
1442
|
BulkActions: React__default.FunctionComponent<React__default.PropsWithChildren<BulkActionProps>>;
|
|
1443
1443
|
BulkEditActionButton: React__default.FunctionComponent<ActionButtonProps>;
|
|
1444
1444
|
ConfigPanelButton: React__default.FC<{}>;
|
|
@@ -1475,7 +1475,7 @@ declare const MultiSelectQuickFilterRenderer: (props: FilterProps<any[]>) => Rea
|
|
|
1475
1475
|
|
|
1476
1476
|
declare const SingleSelectQuickFilterRenderer: (props: FilterProps<any[]>) => React__default.JSX.Element;
|
|
1477
1477
|
|
|
1478
|
-
declare const _default: (({ analytics, children, columnDefinitions: _columnDefinitions, customBulkEditorFields, enableDynamicRowHeight, enableGroupEditAndValidation, filterGroups, getRowId, initialTableConfig: _initialTableConfig, onBulkEditUpdate, onServerSideDataRequest, onTableConfigChange, enableCellTextSelection, showExpandCollapseAllToggle, translations, localStoragePersistenceKey,
|
|
1478
|
+
declare const _default: (({ analytics, children, columnDefinitions: _columnDefinitions, customBulkEditorFields, enableDynamicRowHeight, enableGroupEditAndValidation, filterGroups, getRowId, initialTableConfig: _initialTableConfig, onBulkEditUpdate, onServerSideDataRequest, onTableConfigChange, enableCellTextSelection, showExpandCollapseAllToggle, translations, localStoragePersistenceKey, }: React__default.PropsWithChildren<DataTableProps>) => React__default.JSX.Element) & {
|
|
1479
1479
|
BulkActions: React__default.FunctionComponent<React__default.PropsWithChildren<BulkActionProps>>;
|
|
1480
1480
|
BulkEditActionButton: React__default.FunctionComponent<ActionButtonProps>;
|
|
1481
1481
|
ConfigPanelButton: React__default.FC<{}>;
|