@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/dist/modern/index.js
CHANGED
|
@@ -10,7 +10,6 @@ import { formatNumber, formatCurrency, formatPercentage } from '@procore/labs-fi
|
|
|
10
10
|
import styled4, { css as css$1 } from 'styled-components';
|
|
11
11
|
import { format } from '@procore/labs-financials-utils/dist/format';
|
|
12
12
|
import { detectPrng, factory } from 'ulid';
|
|
13
|
-
import { isCDNFeatureFlagEnabled, useRequestTranslations } from '@procore/cdn-translations';
|
|
14
13
|
import { useToastAlertContext, ToastAlertProvider } from '@procore/toast-alert';
|
|
15
14
|
import ReactDOM, { createPortal } from 'react-dom';
|
|
16
15
|
import { renderToString, renderToStaticMarkup } from 'react-dom/server';
|
|
@@ -1409,7 +1408,7 @@ ag-grid, ag-grid-angular, ag-grid-ng2, ag-grid-polymer, ag-grid-aurelia {
|
|
|
1409
1408
|
animation-iteration-count: infinite;
|
|
1410
1409
|
animation-name: ag-shake-left-to-right;
|
|
1411
1410
|
}
|
|
1412
|
-
@keyframes _ag-shake-left-to-
|
|
1411
|
+
@keyframes _ag-shake-left-to-right_if78k_369 {
|
|
1413
1412
|
from {
|
|
1414
1413
|
padding-left: 6px;
|
|
1415
1414
|
padding-right: 2px;
|
|
@@ -5410,7 +5409,7 @@ input[class^=ag-][type=button]:focus, button[class^=ag-]:focus {
|
|
|
5410
5409
|
animation-iteration-count: infinite;
|
|
5411
5410
|
animation-timing-function: linear;
|
|
5412
5411
|
}
|
|
5413
|
-
@keyframes
|
|
5412
|
+
@keyframes _spin_if78k_1 {
|
|
5414
5413
|
from {
|
|
5415
5414
|
transform: rotate(0deg);
|
|
5416
5415
|
}
|
|
@@ -7665,6 +7664,9 @@ input[class^=ag-][type=range]:disabled {
|
|
|
7665
7664
|
.ag-theme-alpine.ag-theme-alpine .ag-icon-tree-open::before {
|
|
7666
7665
|
content: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='8px' height='4px'><path d='M0 0H8L4 4L0 0Z' fill='%232066DF'/></svg>");
|
|
7667
7666
|
}
|
|
7667
|
+
.ag-theme-alpine.ag-theme-alpine .ag-header-cell-resize {
|
|
7668
|
+
right: -5px;
|
|
7669
|
+
}
|
|
7668
7670
|
.ag-theme-alpine.ag-theme-alpine .ag-header-cell-resize::after {
|
|
7669
7671
|
width: 1px;
|
|
7670
7672
|
height: 100%;
|
|
@@ -7918,7 +7920,7 @@ input[class^=ag-][type=range]:disabled {
|
|
|
7918
7920
|
padding-left: 16px;
|
|
7919
7921
|
}
|
|
7920
7922
|
|
|
7921
|
-
div.
|
|
7923
|
+
div._contextPanel_if78k_7159 {
|
|
7922
7924
|
width: 400px;
|
|
7923
7925
|
transition: all ease 500ms;
|
|
7924
7926
|
flex: 0 0 auto;
|
|
@@ -7927,7 +7929,7 @@ div._contextPanel_1ajw9_7156 {
|
|
|
7927
7929
|
border: 1px solid #d6dadc;
|
|
7928
7930
|
display: flex;
|
|
7929
7931
|
}
|
|
7930
|
-
div._contextPanel--
|
|
7932
|
+
div._contextPanel--hidden_if78k_7168 {
|
|
7931
7933
|
border: none;
|
|
7932
7934
|
overflow: hidden;
|
|
7933
7935
|
padding: 0px;
|
|
@@ -7935,50 +7937,50 @@ div._contextPanel--hidden_1ajw9_7165 {
|
|
|
7935
7937
|
width: 0px;
|
|
7936
7938
|
}
|
|
7937
7939
|
|
|
7938
|
-
.
|
|
7940
|
+
._contextPanelWrapper_if78k_7176 {
|
|
7939
7941
|
position: relative;
|
|
7940
7942
|
flex-grow: 1;
|
|
7941
7943
|
}
|
|
7942
7944
|
|
|
7943
|
-
.
|
|
7945
|
+
._contextPanelBody_if78k_7181 {
|
|
7944
7946
|
width: clamp(380px, 400px, 100%);
|
|
7945
7947
|
}
|
|
7946
7948
|
|
|
7947
|
-
._contextPanel-
|
|
7949
|
+
._contextPanel-stickyHeader_if78k_7185 {
|
|
7948
7950
|
background-color: #ffffff;
|
|
7949
7951
|
position: sticky;
|
|
7950
7952
|
top: 0;
|
|
7951
7953
|
z-index: 5;
|
|
7952
7954
|
}
|
|
7953
7955
|
|
|
7954
|
-
._filters-
|
|
7956
|
+
._filters-list_if78k_7192 {
|
|
7955
7957
|
padding: 0;
|
|
7956
7958
|
margin: 0;
|
|
7957
7959
|
}
|
|
7958
|
-
._filters-
|
|
7960
|
+
._filters-list_if78k_7192 ol {
|
|
7959
7961
|
padding: 0;
|
|
7960
7962
|
margin: 0;
|
|
7961
7963
|
}
|
|
7962
7964
|
|
|
7963
|
-
._col-drag-column-
|
|
7965
|
+
._col-drag-column-icon_if78k_7201 {
|
|
7964
7966
|
color: #6a767c;
|
|
7965
7967
|
}
|
|
7966
7968
|
|
|
7967
|
-
._tabular-
|
|
7969
|
+
._tabular-nums_if78k_7205 {
|
|
7968
7970
|
font-variant-numeric: tabular-nums;
|
|
7969
7971
|
}`;
|
|
7970
7972
|
document.head.appendChild(document.createElement("style")).appendChild(document.createTextNode(css));
|
|
7971
7973
|
var styles_default = {
|
|
7972
|
-
"contextPanel": "
|
|
7973
|
-
"contextPanel--hidden": "_contextPanel--
|
|
7974
|
-
"contextPanelWrapper": "
|
|
7975
|
-
"contextPanelBody": "
|
|
7976
|
-
"contextPanel-stickyHeader": "_contextPanel-
|
|
7977
|
-
"filters-list": "_filters-
|
|
7978
|
-
"col-drag-column-icon": "_col-drag-column-
|
|
7979
|
-
"tabular-nums": "_tabular-
|
|
7980
|
-
"ag-shake-left-to-right": "_ag-shake-left-to-
|
|
7981
|
-
"spin": "
|
|
7974
|
+
"contextPanel": "_contextPanel_if78k_7159",
|
|
7975
|
+
"contextPanel--hidden": "_contextPanel--hidden_if78k_7168",
|
|
7976
|
+
"contextPanelWrapper": "_contextPanelWrapper_if78k_7176",
|
|
7977
|
+
"contextPanelBody": "_contextPanelBody_if78k_7181",
|
|
7978
|
+
"contextPanel-stickyHeader": "_contextPanel-stickyHeader_if78k_7185",
|
|
7979
|
+
"filters-list": "_filters-list_if78k_7192",
|
|
7980
|
+
"col-drag-column-icon": "_col-drag-column-icon_if78k_7201",
|
|
7981
|
+
"tabular-nums": "_tabular-nums_if78k_7205",
|
|
7982
|
+
"ag-shake-left-to-right": "_ag-shake-left-to-right_if78k_369",
|
|
7983
|
+
"spin": "_spin_if78k_1"
|
|
7982
7984
|
};
|
|
7983
7985
|
|
|
7984
7986
|
// src/utils/getCellValueTypographyProps.ts
|
|
@@ -54309,6 +54311,9 @@ function useFilterState({
|
|
|
54309
54311
|
},
|
|
54310
54312
|
[gridApi]
|
|
54311
54313
|
);
|
|
54314
|
+
const filterableColumns = React80.useMemo(() => {
|
|
54315
|
+
return columnDefinitions.filter((colDef) => !!colDef.filterRenderer).sort(sortColumnDefinitionsByFilterIndex);
|
|
54316
|
+
}, [columnDefinitions]);
|
|
54312
54317
|
const getFieldFilters = React80.useCallback(() => {
|
|
54313
54318
|
return filterableColumns.map((column2) => {
|
|
54314
54319
|
const filterInstance = getFieldFilter(column2.field);
|
|
@@ -54322,10 +54327,7 @@ function useFilterState({
|
|
|
54322
54327
|
...instanceOptions
|
|
54323
54328
|
};
|
|
54324
54329
|
}).filter((filter) => filter.instance !== void 0);
|
|
54325
|
-
}, [getFieldFilter, gridApi]);
|
|
54326
|
-
const filterableColumns = React80.useMemo(() => {
|
|
54327
|
-
return columnDefinitions.filter((colDef) => !!colDef.filterRenderer).sort(sortColumnDefinitionsByFilterIndex);
|
|
54328
|
-
}, [columnDefinitions]);
|
|
54330
|
+
}, [getFieldFilter, gridApi, filterableColumns]);
|
|
54329
54331
|
const filterEventFunction = function filterEventFunction2() {
|
|
54330
54332
|
if (listenersEnabled.current) {
|
|
54331
54333
|
const allFilters = getFieldFilters();
|
|
@@ -54436,6 +54438,10 @@ function ClientSideMultiSelectFilterRenderer({
|
|
|
54436
54438
|
value = [],
|
|
54437
54439
|
...props
|
|
54438
54440
|
}) {
|
|
54441
|
+
const filterOptions = React80.useMemo(
|
|
54442
|
+
() => (options ?? []).map((option) => option ?? ""),
|
|
54443
|
+
[options]
|
|
54444
|
+
);
|
|
54439
54445
|
return /* @__PURE__ */ React80.createElement(
|
|
54440
54446
|
MultiSelect,
|
|
54441
54447
|
{
|
|
@@ -54449,8 +54455,8 @@ function ClientSideMultiSelectFilterRenderer({
|
|
|
54449
54455
|
return getLabel(columnDefinition.filterProps?.getLabel, option);
|
|
54450
54456
|
},
|
|
54451
54457
|
onChange,
|
|
54452
|
-
options,
|
|
54453
|
-
value: intersection(value || [],
|
|
54458
|
+
options: filterOptions,
|
|
54459
|
+
value: intersection(value || [], filterOptions)
|
|
54454
54460
|
}
|
|
54455
54461
|
);
|
|
54456
54462
|
}
|
|
@@ -57141,7 +57147,7 @@ var SortComponent = (props) => {
|
|
|
57141
57147
|
return null;
|
|
57142
57148
|
};
|
|
57143
57149
|
var isRowSelected = (rowNode) => {
|
|
57144
|
-
return Boolean(rowNode.selectable ? rowNode.isSelected() :
|
|
57150
|
+
return Boolean(rowNode.selectable ? rowNode.isSelected() : false);
|
|
57145
57151
|
};
|
|
57146
57152
|
var GenericHeaderRenderer = (props) => {
|
|
57147
57153
|
const colDef = props.column.getColDef();
|
|
@@ -57196,22 +57202,26 @@ var GenericHeaderRenderer = (props) => {
|
|
|
57196
57202
|
}, []);
|
|
57197
57203
|
React80.useEffect(() => {
|
|
57198
57204
|
function calculatePosition() {
|
|
57199
|
-
const
|
|
57200
|
-
if (!
|
|
57205
|
+
const visibleColumns = props.columnApi.getAllDisplayedColumns();
|
|
57206
|
+
if (!visibleColumns?.length)
|
|
57201
57207
|
return;
|
|
57202
|
-
|
|
57203
|
-
|
|
57204
|
-
setIsFirstColumn(true);
|
|
57205
|
-
} else {
|
|
57206
|
-
setIsFirstColumn(false);
|
|
57207
|
-
}
|
|
57208
|
+
const isCurrentFirst = visibleColumns[0].getColId() === colId;
|
|
57209
|
+
setIsFirstColumn(isCurrentFirst);
|
|
57208
57210
|
}
|
|
57209
57211
|
props.api.addEventListener("columnMoved", calculatePosition);
|
|
57212
|
+
props.api.addEventListener("columnPinned", calculatePosition);
|
|
57213
|
+
props.api.addEventListener("columnVisible", calculatePosition);
|
|
57210
57214
|
calculatePosition();
|
|
57211
57215
|
return () => {
|
|
57212
57216
|
removeEventListenerFromGrid("columnMoved", calculatePosition, props.api);
|
|
57217
|
+
removeEventListenerFromGrid("columnPinned", calculatePosition, props.api);
|
|
57218
|
+
removeEventListenerFromGrid(
|
|
57219
|
+
"columnVisible",
|
|
57220
|
+
calculatePosition,
|
|
57221
|
+
props.api
|
|
57222
|
+
);
|
|
57213
57223
|
};
|
|
57214
|
-
}, []);
|
|
57224
|
+
}, [colId, props.api]);
|
|
57215
57225
|
const onSortToggled = (event) => {
|
|
57216
57226
|
let currentSort = null;
|
|
57217
57227
|
if (Array.from(checkbox.current?.parentElement?.children || []).includes(
|
|
@@ -57423,7 +57433,7 @@ var GenericHeaderRenderer = (props) => {
|
|
|
57423
57433
|
return;
|
|
57424
57434
|
}
|
|
57425
57435
|
function updateSelectAllCheckbox(e) {
|
|
57426
|
-
if (e.source === "uiSelectAll") {
|
|
57436
|
+
if (e && e.source === "uiSelectAll") {
|
|
57427
57437
|
return;
|
|
57428
57438
|
}
|
|
57429
57439
|
const selectionState = props.api.getServerSideSelectionState();
|
|
@@ -57436,7 +57446,10 @@ var GenericHeaderRenderer = (props) => {
|
|
|
57436
57446
|
);
|
|
57437
57447
|
const isPagination = Boolean(props.api.paginationGetRowCount());
|
|
57438
57448
|
const currentRows = getCurrentRows(props.api, isPagination);
|
|
57439
|
-
const
|
|
57449
|
+
const selectableRows = currentRows.filter(
|
|
57450
|
+
(rowNode) => rowNode.selectable
|
|
57451
|
+
);
|
|
57452
|
+
const isAllSelected = isPagination ? selectableRows.length > 0 && selectableRows.every(isRowSelected) : isSelectionStateSelectAll;
|
|
57440
57453
|
const isPartialSelected = isPagination ? !isAllSelected && currentRows.some(isRowSelected) : isSelectionStatePartialSelected;
|
|
57441
57454
|
if (isAllSelected) {
|
|
57442
57455
|
setSelectAll("all" /* All */);
|
|
@@ -57448,6 +57461,7 @@ var GenericHeaderRenderer = (props) => {
|
|
|
57448
57461
|
}
|
|
57449
57462
|
props.api.addEventListener(selectionChanged, updateSelectAllCheckbox);
|
|
57450
57463
|
props.api.addEventListener(paginationChanged, updateSelectAllCheckbox);
|
|
57464
|
+
updateSelectAllCheckbox();
|
|
57451
57465
|
return () => {
|
|
57452
57466
|
removeEventListenerFromGrid(
|
|
57453
57467
|
selectionChanged,
|
|
@@ -57682,6 +57696,11 @@ function getGroupNodes(params) {
|
|
|
57682
57696
|
function CustomLoader(params) {
|
|
57683
57697
|
const I18n = useI18nContext();
|
|
57684
57698
|
const groupNodes = getGroupNodes(params);
|
|
57699
|
+
const internalTableContext = useInternalTableContext();
|
|
57700
|
+
const hasDuplicateRowIds = internalTableContext.hasDuplicateRowIds ?? false;
|
|
57701
|
+
if (hasDuplicateRowIds) {
|
|
57702
|
+
return null;
|
|
57703
|
+
}
|
|
57685
57704
|
if (params.node === groupNodes.firstLoading) {
|
|
57686
57705
|
return /* @__PURE__ */ React80.createElement(Flex, { style: { paddingLeft: "16px" } }, /* @__PURE__ */ React80.createElement(
|
|
57687
57706
|
LevelIndents,
|
|
@@ -58370,7 +58389,8 @@ var InternalTableContext = React80.createContext({
|
|
|
58370
58389
|
},
|
|
58371
58390
|
totalRowCount: 0,
|
|
58372
58391
|
setTotalRowCount: () => {
|
|
58373
|
-
}
|
|
58392
|
+
},
|
|
58393
|
+
hasDuplicateRowIds: false
|
|
58374
58394
|
});
|
|
58375
58395
|
var useInternalTableContext = () => React80.useContext(InternalTableContext);
|
|
58376
58396
|
var prng = detectPrng(true);
|
|
@@ -105696,7 +105716,7 @@ var en_AU_default = {
|
|
|
105696
105716
|
autoSizeAllColumns: "Autosize all columns",
|
|
105697
105717
|
hideColumn: "Hide column",
|
|
105698
105718
|
resetColumns: "Reset columns",
|
|
105699
|
-
unGroupBy: "Un-
|
|
105719
|
+
unGroupBy: "Un-group by {{label}}",
|
|
105700
105720
|
groupBy: "Group by {{label}}"
|
|
105701
105721
|
},
|
|
105702
105722
|
grandTotals: "Grand totals",
|
|
@@ -105859,7 +105879,7 @@ var en_CA_default = {
|
|
|
105859
105879
|
autoSizeAllColumns: "Autosize all columns",
|
|
105860
105880
|
hideColumn: "Hide column",
|
|
105861
105881
|
resetColumns: "Reset columns",
|
|
105862
|
-
unGroupBy: "Un-
|
|
105882
|
+
unGroupBy: "Un-group by {{label}}",
|
|
105863
105883
|
groupBy: "Group by {{label}}"
|
|
105864
105884
|
},
|
|
105865
105885
|
grandTotals: "Grand totals",
|
|
@@ -106434,7 +106454,7 @@ var es_default = {
|
|
|
106434
106454
|
description: "Una vez que su equipo cree \xEDtems, podr\xE1 acceder a ellos aqu\xED. ",
|
|
106435
106455
|
title: "No hay \xEDtems para mostrar en este momento",
|
|
106436
106456
|
itemsTitle: "No hay %{itemsLabel} para mostrar en este momento",
|
|
106437
|
-
tooltip: "El bot\xF3n %{featureName} se habilitar\xE1 una vez que agregue informaci\xF3n
|
|
106457
|
+
tooltip: "El bot\xF3n %{featureName} se habilitar\xE1 una vez que agregue informaci\xF3n a la %{tableName}.",
|
|
106438
106458
|
searchTooltip: "La b\xFAsqueda se habilitar\xE1 una vez que agregue informaci\xF3n a %{tableName}",
|
|
106439
106459
|
featureFilter: "Filtro",
|
|
106440
106460
|
featureQuickFilter: "Filtro r\xE1pido",
|
|
@@ -106448,7 +106468,7 @@ var es_default = {
|
|
|
106448
106468
|
bulkEdit: "Edici\xF3n masiva",
|
|
106449
106469
|
cancel: "Cancelar",
|
|
106450
106470
|
editValues: "Editar valores",
|
|
106451
|
-
error: "Lo sentimos, no se pudieron actualizar los \xEDtems.
|
|
106471
|
+
error: "Lo sentimos, no se pudieron actualizar los \xEDtems. Int\xE9ntelo de nuevo.",
|
|
106452
106472
|
placeholderForField: "Ingrese %{fieldName}",
|
|
106453
106473
|
selection: "%{count} %{number} seleccionado",
|
|
106454
106474
|
success: "Los \xEDtems se actualizaron correctamente.",
|
|
@@ -106494,14 +106514,14 @@ var es_default = {
|
|
|
106494
106514
|
}
|
|
106495
106515
|
},
|
|
106496
106516
|
loading: {
|
|
106497
|
-
initial: "Cargando informaci\xF3n
|
|
106517
|
+
initial: "Cargando informaci\xF3n...",
|
|
106498
106518
|
secondary: "Cargando informaci\xF3n. Gracias por su paciencia."
|
|
106499
106519
|
},
|
|
106500
106520
|
menuOptions: {
|
|
106501
106521
|
sortMenuItem: {
|
|
106502
106522
|
label: "Ordenar por esta columna",
|
|
106503
|
-
sortAscItem: "Ordenar columna
|
|
106504
|
-
sortDescItem: "Ordenar columna
|
|
106523
|
+
sortAscItem: "Ordenar columna - Ascendente",
|
|
106524
|
+
sortDescItem: "Ordenar columna - Descendente",
|
|
106505
106525
|
sortResetItem: "Columna no ordenada"
|
|
106506
106526
|
},
|
|
106507
106527
|
expandAllGroups: "Expandir todos los grupos",
|
|
@@ -106611,7 +106631,7 @@ var fr_CA_default = {
|
|
|
106611
106631
|
bulkEdit: "Modifier en bloc",
|
|
106612
106632
|
cancel: "Annuler",
|
|
106613
106633
|
editValues: "Modifier les valeurs",
|
|
106614
|
-
error: "D\xE9sol\xE9, les items n'ont pas pu \xEAtre mis \xE0 jour.
|
|
106634
|
+
error: "D\xE9sol\xE9, les items n'ont pas pu \xEAtre mis \xE0 jour. Veuillez r\xE9essayer.",
|
|
106615
106635
|
placeholderForField: "Entrez %{fieldName}",
|
|
106616
106636
|
selection: "%{count} %{number} s\xE9lectionn\xE9",
|
|
106617
106637
|
success: "Les items ont \xE9t\xE9 mis \xE0 jour avec succ\xE8s.",
|
|
@@ -106774,7 +106794,7 @@ var fr_FR_default = {
|
|
|
106774
106794
|
bulkEdit: "Modifier en masse",
|
|
106775
106795
|
cancel: "Annuler",
|
|
106776
106796
|
editValues: "Modifier les valeurs",
|
|
106777
|
-
error: "D\xE9sol\xE9, les \xE9l\xE9ments n'ont pas pu \xEAtre mis \xE0 jour.
|
|
106797
|
+
error: "D\xE9sol\xE9, les \xE9l\xE9ments n'ont pas pu \xEAtre mis \xE0 jour. Veuillez r\xE9essayer.",
|
|
106778
106798
|
placeholderForField: "Saisissez %{fieldName}",
|
|
106779
106799
|
selection: "%{count} %{number} s\xE9lectionn\xE9",
|
|
106780
106800
|
success: "Les \xE9l\xE9ments ont bien \xE9t\xE9 mis \xE0 jour.",
|
|
@@ -107592,7 +107612,7 @@ var pt_BR_default = {
|
|
|
107592
107612
|
bulkEdit: "Edi\xE7\xE3o em Massa",
|
|
107593
107613
|
cancel: "Cancelar",
|
|
107594
107614
|
editValues: "Editar Valores",
|
|
107595
|
-
error: "
|
|
107615
|
+
error: "Sentimos muito, mas n\xE3o foi poss\xEDvel atualizar os itens. Tente novamente.",
|
|
107596
107616
|
placeholderForField: "Digite %{fieldName}",
|
|
107597
107617
|
selection: "%{count} %{number} selecionado",
|
|
107598
107618
|
success: "Os itens foram atualizados com sucesso.",
|
|
@@ -107755,7 +107775,7 @@ var th_TH_default = {
|
|
|
107755
107775
|
bulkEdit: "\u0E01\u0E32\u0E23\u0E41\u0E01\u0E49\u0E44\u0E02\u0E41\u0E1A\u0E1A\u0E01\u0E25\u0E38\u0E48\u0E21",
|
|
107756
107776
|
cancel: "\u0E22\u0E01\u0E40\u0E25\u0E34\u0E01",
|
|
107757
107777
|
editValues: "\u0E41\u0E01\u0E49\u0E44\u0E02\u0E04\u0E48\u0E32",
|
|
107758
|
-
error: "\u0E02\u0E2D\u0E2D\u0E20\u0E31\u0E22 \u0E44\u0E21\u0E48\u0E2A\u0E32\u0E21\u0E32\u0E23\u0E16\u0E2D\u0E31\u0E1B\u0E40\u0E14\u0E15\u0E23\u0E32\u0E22\u0E01\u0E32\u0E23\u0E44\u0E14\u0E49 \
|
|
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.",
|
|
107759
107779
|
placeholderForField: "\u0E1B\u0E49\u0E2D\u0E19 %{fieldName}",
|
|
107760
107780
|
selection: "%{count} %{number} \u0E17\u0E35\u0E48\u0E40\u0E25\u0E37\u0E2D\u0E01",
|
|
107761
107781
|
success: "\u0E2D\u0E31\u0E1B\u0E40\u0E14\u0E15\u0E23\u0E32\u0E22\u0E01\u0E32\u0E23\u0E2A\u0E33\u0E40\u0E23\u0E47\u0E08\u0E41\u0E25\u0E49\u0E27",
|
|
@@ -109039,8 +109059,7 @@ var DataTable = ({
|
|
|
109039
109059
|
showExpandCollapseAllToggle,
|
|
109040
109060
|
translations: translations2 = {},
|
|
109041
109061
|
enableCellTextSelection,
|
|
109042
|
-
localStoragePersistenceKey
|
|
109043
|
-
enableCDN
|
|
109062
|
+
localStoragePersistenceKey
|
|
109044
109063
|
}) => {
|
|
109045
109064
|
const initialTableConfig = localStoragePersistenceKey && storage.local.getItem(localStoragePersistenceKey) || _initialTableConfig;
|
|
109046
109065
|
const onServerSideDataRequestRef = React80.useRef(onServerSideDataRequest);
|
|
@@ -109052,28 +109071,14 @@ var DataTable = ({
|
|
|
109052
109071
|
);
|
|
109053
109072
|
const contextPanel = useContextPanel();
|
|
109054
109073
|
const clientI18n = useI18nContext();
|
|
109055
|
-
const isCDNEnabled = isCDNFeatureFlagEnabled(clientI18n, enableCDN);
|
|
109056
|
-
const cdnTranslations = useRequestTranslations(
|
|
109057
|
-
{
|
|
109058
|
-
locale: clientI18n.locale,
|
|
109059
|
-
type: "file",
|
|
109060
|
-
absolute_file_path: (locale) => `core/packages/data-table/src/locales/${locale}`
|
|
109061
|
-
},
|
|
109062
|
-
{ en: translations.en, pseudo: translations.pseudo },
|
|
109063
|
-
{
|
|
109064
|
-
oldTranslations: translations,
|
|
109065
|
-
enableCDN: isCDNEnabled
|
|
109066
|
-
}
|
|
109067
|
-
);
|
|
109068
109074
|
const internalI18n = useI18n({
|
|
109069
|
-
|
|
109075
|
+
...clientI18n,
|
|
109070
109076
|
translations: mergeDeepLeft(
|
|
109071
109077
|
mergeDeepLeft(clientI18n.translations, {
|
|
109072
109078
|
[clientI18n.locale]: translations2
|
|
109073
109079
|
}),
|
|
109074
|
-
|
|
109075
|
-
)
|
|
109076
|
-
enableCDN: isCDNEnabled
|
|
109080
|
+
translations
|
|
109081
|
+
)
|
|
109077
109082
|
});
|
|
109078
109083
|
const rowSelectionRef = React80.useRef({
|
|
109079
109084
|
affectedRows: {},
|
|
@@ -109124,6 +109129,7 @@ var DataTable = ({
|
|
|
109124
109129
|
);
|
|
109125
109130
|
const [gridApi, setGridApi] = React80.useState();
|
|
109126
109131
|
const [columnApi, setColumnApi] = React80.useState();
|
|
109132
|
+
const [hasDuplicateRowIds, setHasDuplicateRowIds] = React80.useState(false);
|
|
109127
109133
|
const searchStorage = useSearchStorage();
|
|
109128
109134
|
const filterState = useFilterState({
|
|
109129
109135
|
columnDefinitions: columns,
|
|
@@ -109199,7 +109205,9 @@ var DataTable = ({
|
|
|
109199
109205
|
gridApi?.hideOverlay.bind(gridApi),
|
|
109200
109206
|
filterStorage.filtersState,
|
|
109201
109207
|
searchStorage.searchValue,
|
|
109202
|
-
setTotalRowCount
|
|
109208
|
+
setTotalRowCount,
|
|
109209
|
+
setHasDuplicateRowIds,
|
|
109210
|
+
getRowId
|
|
109203
109211
|
)
|
|
109204
109212
|
);
|
|
109205
109213
|
gridApi?.paginationGoToPage(0);
|
|
@@ -109292,7 +109300,8 @@ var DataTable = ({
|
|
|
109292
109300
|
tableRef,
|
|
109293
109301
|
totalRowCount,
|
|
109294
109302
|
setTotalRowCount,
|
|
109295
|
-
updateServerSideDataSource
|
|
109303
|
+
updateServerSideDataSource,
|
|
109304
|
+
hasDuplicateRowIds
|
|
109296
109305
|
}
|
|
109297
109306
|
},
|
|
109298
109307
|
children
|
|
@@ -109303,12 +109312,34 @@ var rowDragMoveEvent;
|
|
|
109303
109312
|
var rowDragEndEvent;
|
|
109304
109313
|
function getServerSideDatasource(onServerSideDataRequestCallbackRef, onEmptyResponseCallback = () => {
|
|
109305
109314
|
}, onNonEmptyResponseCallback = () => {
|
|
109306
|
-
}, filters, search, setTotalRowCount) {
|
|
109315
|
+
}, filters, search, setTotalRowCount, setHasDuplicateRowIds, getRowId) {
|
|
109307
109316
|
return {
|
|
109308
109317
|
getRows: async (params) => {
|
|
109309
109318
|
if (onServerSideDataRequestCallbackRef.current) {
|
|
109310
109319
|
const { request, success, fail } = params;
|
|
109311
109320
|
const onSuccess = (loadSuccessParams) => {
|
|
109321
|
+
const { rowData } = loadSuccessParams;
|
|
109322
|
+
if (rowData && Array.isArray(rowData) && getRowId) {
|
|
109323
|
+
const uniqueRowIds = /* @__PURE__ */ new Set();
|
|
109324
|
+
for (const row2 of rowData) {
|
|
109325
|
+
const id = getRowId({
|
|
109326
|
+
data: row2,
|
|
109327
|
+
level: 0,
|
|
109328
|
+
api: {},
|
|
109329
|
+
columnApi: {},
|
|
109330
|
+
context: {}
|
|
109331
|
+
});
|
|
109332
|
+
if (uniqueRowIds.has(id)) {
|
|
109333
|
+
setHasDuplicateRowIds(true);
|
|
109334
|
+
logger.error(
|
|
109335
|
+
"Duplicate row IDs detected in rowData. Check getRowId() to ensure it returns unique IDs."
|
|
109336
|
+
);
|
|
109337
|
+
fail();
|
|
109338
|
+
return;
|
|
109339
|
+
}
|
|
109340
|
+
uniqueRowIds.add(id);
|
|
109341
|
+
}
|
|
109342
|
+
}
|
|
109312
109343
|
if (!loadSuccessParams.rowCount && request.groupKeys.length === 0) {
|
|
109313
109344
|
onEmptyResponseCallback();
|
|
109314
109345
|
} else {
|
|
@@ -110292,10 +110323,7 @@ function isLastColumnInGroup(params) {
|
|
|
110292
110323
|
function ClientSideFilterInner(props) {
|
|
110293
110324
|
const { Component: Component4, columnDefinition, onChange, options, value } = props;
|
|
110294
110325
|
const filterHeading = columnDefinition.filterProps?.getFilterHeadingText?.(columnDefinition) ?? columnDefinition.headerName;
|
|
110295
|
-
const filterOptions = React80.useMemo(
|
|
110296
|
-
() => (options ?? [])?.filter((option) => !!option),
|
|
110297
|
-
[options]
|
|
110298
|
-
);
|
|
110326
|
+
const filterOptions = React80.useMemo(() => options ?? [], [options]);
|
|
110299
110327
|
return /* @__PURE__ */ React80.createElement(Box, { as: "li", display: "block", paddingBottom: "xl", style: { width: "100%" } }, filterHeading ? /* @__PURE__ */ React80.createElement(
|
|
110300
110328
|
Label$1,
|
|
110301
110329
|
{
|
|
@@ -112227,8 +112255,7 @@ var ClientSideDataTable = ({
|
|
|
112227
112255
|
onTableConfigChange,
|
|
112228
112256
|
translations: translations2 = {},
|
|
112229
112257
|
enableCellTextSelection,
|
|
112230
|
-
localStoragePersistenceKey
|
|
112231
|
-
enableCDN
|
|
112258
|
+
localStoragePersistenceKey
|
|
112232
112259
|
}) => {
|
|
112233
112260
|
return /* @__PURE__ */ React80.createElement(
|
|
112234
112261
|
DataTable,
|
|
@@ -112246,8 +112273,7 @@ var ClientSideDataTable = ({
|
|
|
112246
112273
|
translations: translations2,
|
|
112247
112274
|
localStoragePersistenceKey,
|
|
112248
112275
|
customBulkEditorFields,
|
|
112249
|
-
enableCellTextSelection
|
|
112250
|
-
enableCDN
|
|
112276
|
+
enableCellTextSelection
|
|
112251
112277
|
},
|
|
112252
112278
|
children
|
|
112253
112279
|
);
|
|
@@ -116707,8 +116733,7 @@ var ServerSideDataTable = ({
|
|
|
116707
116733
|
enableCellTextSelection,
|
|
116708
116734
|
showExpandCollapseAllToggle,
|
|
116709
116735
|
translations: translations2 = {},
|
|
116710
|
-
localStoragePersistenceKey
|
|
116711
|
-
enableCDN
|
|
116736
|
+
localStoragePersistenceKey
|
|
116712
116737
|
}) => {
|
|
116713
116738
|
return /* @__PURE__ */ React80.createElement(
|
|
116714
116739
|
DataTable,
|
|
@@ -116727,8 +116752,7 @@ var ServerSideDataTable = ({
|
|
|
116727
116752
|
translations: translations2,
|
|
116728
116753
|
customBulkEditorFields,
|
|
116729
116754
|
enableCellTextSelection,
|
|
116730
|
-
localStoragePersistenceKey
|
|
116731
|
-
enableCDN
|
|
116755
|
+
localStoragePersistenceKey
|
|
116732
116756
|
},
|
|
116733
116757
|
children
|
|
116734
116758
|
);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@procore/data-table",
|
|
3
|
-
"version": "14.28.0
|
|
3
|
+
"version": "14.28.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",
|
|
@@ -79,7 +79,6 @@
|
|
|
79
79
|
"styled-components": ">= 5.1.1 < 6"
|
|
80
80
|
},
|
|
81
81
|
"dependencies": {
|
|
82
|
-
"@procore/cdn-translations": "0.1.0",
|
|
83
82
|
"@procore/error-pages": "0.2.1",
|
|
84
83
|
"@procore/labs-datetime-select": "0.1.1",
|
|
85
84
|
"@procore/labs-group-by-select": "4.0.0",
|
|
@@ -114,7 +113,7 @@
|
|
|
114
113
|
"@procore/core-css": "10.17.0",
|
|
115
114
|
"@procore/core-icons": "12.6.0",
|
|
116
115
|
"@procore/core-prettier": "10.2.0",
|
|
117
|
-
"@procore/core-react": "12.21.0
|
|
116
|
+
"@procore/core-react": "12.21.0",
|
|
118
117
|
"@procore/eslint-config": "10.0.0",
|
|
119
118
|
"@procore/globalization-toolkit": "3.1.0",
|
|
120
119
|
"@procore/labs-financials-utils": "4.3.1",
|