@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.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');
|
|
@@ -1422,7 +1421,7 @@ ag-grid, ag-grid-angular, ag-grid-ng2, ag-grid-polymer, ag-grid-aurelia {
|
|
|
1422
1421
|
animation-iteration-count: infinite;
|
|
1423
1422
|
animation-name: ag-shake-left-to-right;
|
|
1424
1423
|
}
|
|
1425
|
-
@keyframes _ag-shake-left-to-
|
|
1424
|
+
@keyframes _ag-shake-left-to-right_if78k_369 {
|
|
1426
1425
|
from {
|
|
1427
1426
|
padding-left: 6px;
|
|
1428
1427
|
padding-right: 2px;
|
|
@@ -5423,7 +5422,7 @@ input[class^=ag-][type=button]:focus, button[class^=ag-]:focus {
|
|
|
5423
5422
|
animation-iteration-count: infinite;
|
|
5424
5423
|
animation-timing-function: linear;
|
|
5425
5424
|
}
|
|
5426
|
-
@keyframes
|
|
5425
|
+
@keyframes _spin_if78k_1 {
|
|
5427
5426
|
from {
|
|
5428
5427
|
transform: rotate(0deg);
|
|
5429
5428
|
}
|
|
@@ -7678,6 +7677,9 @@ input[class^=ag-][type=range]:disabled {
|
|
|
7678
7677
|
.ag-theme-alpine.ag-theme-alpine .ag-icon-tree-open::before {
|
|
7679
7678
|
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>");
|
|
7680
7679
|
}
|
|
7680
|
+
.ag-theme-alpine.ag-theme-alpine .ag-header-cell-resize {
|
|
7681
|
+
right: -5px;
|
|
7682
|
+
}
|
|
7681
7683
|
.ag-theme-alpine.ag-theme-alpine .ag-header-cell-resize::after {
|
|
7682
7684
|
width: 1px;
|
|
7683
7685
|
height: 100%;
|
|
@@ -7931,7 +7933,7 @@ input[class^=ag-][type=range]:disabled {
|
|
|
7931
7933
|
padding-left: 16px;
|
|
7932
7934
|
}
|
|
7933
7935
|
|
|
7934
|
-
div.
|
|
7936
|
+
div._contextPanel_if78k_7159 {
|
|
7935
7937
|
width: 400px;
|
|
7936
7938
|
transition: all ease 500ms;
|
|
7937
7939
|
flex: 0 0 auto;
|
|
@@ -7940,7 +7942,7 @@ div._contextPanel_1ajw9_7156 {
|
|
|
7940
7942
|
border: 1px solid #d6dadc;
|
|
7941
7943
|
display: flex;
|
|
7942
7944
|
}
|
|
7943
|
-
div._contextPanel--
|
|
7945
|
+
div._contextPanel--hidden_if78k_7168 {
|
|
7944
7946
|
border: none;
|
|
7945
7947
|
overflow: hidden;
|
|
7946
7948
|
padding: 0px;
|
|
@@ -7948,50 +7950,50 @@ div._contextPanel--hidden_1ajw9_7165 {
|
|
|
7948
7950
|
width: 0px;
|
|
7949
7951
|
}
|
|
7950
7952
|
|
|
7951
|
-
.
|
|
7953
|
+
._contextPanelWrapper_if78k_7176 {
|
|
7952
7954
|
position: relative;
|
|
7953
7955
|
flex-grow: 1;
|
|
7954
7956
|
}
|
|
7955
7957
|
|
|
7956
|
-
.
|
|
7958
|
+
._contextPanelBody_if78k_7181 {
|
|
7957
7959
|
width: clamp(380px, 400px, 100%);
|
|
7958
7960
|
}
|
|
7959
7961
|
|
|
7960
|
-
._contextPanel-
|
|
7962
|
+
._contextPanel-stickyHeader_if78k_7185 {
|
|
7961
7963
|
background-color: #ffffff;
|
|
7962
7964
|
position: sticky;
|
|
7963
7965
|
top: 0;
|
|
7964
7966
|
z-index: 5;
|
|
7965
7967
|
}
|
|
7966
7968
|
|
|
7967
|
-
._filters-
|
|
7969
|
+
._filters-list_if78k_7192 {
|
|
7968
7970
|
padding: 0;
|
|
7969
7971
|
margin: 0;
|
|
7970
7972
|
}
|
|
7971
|
-
._filters-
|
|
7973
|
+
._filters-list_if78k_7192 ol {
|
|
7972
7974
|
padding: 0;
|
|
7973
7975
|
margin: 0;
|
|
7974
7976
|
}
|
|
7975
7977
|
|
|
7976
|
-
._col-drag-column-
|
|
7978
|
+
._col-drag-column-icon_if78k_7201 {
|
|
7977
7979
|
color: #6a767c;
|
|
7978
7980
|
}
|
|
7979
7981
|
|
|
7980
|
-
._tabular-
|
|
7982
|
+
._tabular-nums_if78k_7205 {
|
|
7981
7983
|
font-variant-numeric: tabular-nums;
|
|
7982
7984
|
}`;
|
|
7983
7985
|
document.head.appendChild(document.createElement("style")).appendChild(document.createTextNode(css));
|
|
7984
7986
|
var styles_default = {
|
|
7985
|
-
"contextPanel": "
|
|
7986
|
-
"contextPanel--hidden": "_contextPanel--
|
|
7987
|
-
"contextPanelWrapper": "
|
|
7988
|
-
"contextPanelBody": "
|
|
7989
|
-
"contextPanel-stickyHeader": "_contextPanel-
|
|
7990
|
-
"filters-list": "_filters-
|
|
7991
|
-
"col-drag-column-icon": "_col-drag-column-
|
|
7992
|
-
"tabular-nums": "_tabular-
|
|
7993
|
-
"ag-shake-left-to-right": "_ag-shake-left-to-
|
|
7994
|
-
"spin": "
|
|
7987
|
+
"contextPanel": "_contextPanel_if78k_7159",
|
|
7988
|
+
"contextPanel--hidden": "_contextPanel--hidden_if78k_7168",
|
|
7989
|
+
"contextPanelWrapper": "_contextPanelWrapper_if78k_7176",
|
|
7990
|
+
"contextPanelBody": "_contextPanelBody_if78k_7181",
|
|
7991
|
+
"contextPanel-stickyHeader": "_contextPanel-stickyHeader_if78k_7185",
|
|
7992
|
+
"filters-list": "_filters-list_if78k_7192",
|
|
7993
|
+
"col-drag-column-icon": "_col-drag-column-icon_if78k_7201",
|
|
7994
|
+
"tabular-nums": "_tabular-nums_if78k_7205",
|
|
7995
|
+
"ag-shake-left-to-right": "_ag-shake-left-to-right_if78k_369",
|
|
7996
|
+
"spin": "_spin_if78k_1"
|
|
7995
7997
|
};
|
|
7996
7998
|
|
|
7997
7999
|
// src/utils/getCellValueTypographyProps.ts
|
|
@@ -54322,6 +54324,9 @@ function useFilterState({
|
|
|
54322
54324
|
},
|
|
54323
54325
|
[gridApi]
|
|
54324
54326
|
);
|
|
54327
|
+
const filterableColumns = React80__default.default.useMemo(() => {
|
|
54328
|
+
return columnDefinitions.filter((colDef) => !!colDef.filterRenderer).sort(sortColumnDefinitionsByFilterIndex);
|
|
54329
|
+
}, [columnDefinitions]);
|
|
54325
54330
|
const getFieldFilters = React80__default.default.useCallback(() => {
|
|
54326
54331
|
return filterableColumns.map((column2) => {
|
|
54327
54332
|
const filterInstance = getFieldFilter(column2.field);
|
|
@@ -54335,10 +54340,7 @@ function useFilterState({
|
|
|
54335
54340
|
...instanceOptions
|
|
54336
54341
|
};
|
|
54337
54342
|
}).filter((filter) => filter.instance !== void 0);
|
|
54338
|
-
}, [getFieldFilter, gridApi]);
|
|
54339
|
-
const filterableColumns = React80__default.default.useMemo(() => {
|
|
54340
|
-
return columnDefinitions.filter((colDef) => !!colDef.filterRenderer).sort(sortColumnDefinitionsByFilterIndex);
|
|
54341
|
-
}, [columnDefinitions]);
|
|
54343
|
+
}, [getFieldFilter, gridApi, filterableColumns]);
|
|
54342
54344
|
const filterEventFunction = function filterEventFunction2() {
|
|
54343
54345
|
if (listenersEnabled.current) {
|
|
54344
54346
|
const allFilters = getFieldFilters();
|
|
@@ -54449,6 +54451,10 @@ function ClientSideMultiSelectFilterRenderer({
|
|
|
54449
54451
|
value = [],
|
|
54450
54452
|
...props
|
|
54451
54453
|
}) {
|
|
54454
|
+
const filterOptions = React80__default.default.useMemo(
|
|
54455
|
+
() => (options ?? []).map((option) => option ?? ""),
|
|
54456
|
+
[options]
|
|
54457
|
+
);
|
|
54452
54458
|
return /* @__PURE__ */ React80__default.default.createElement(
|
|
54453
54459
|
coreReact.MultiSelect,
|
|
54454
54460
|
{
|
|
@@ -54462,8 +54468,8 @@ function ClientSideMultiSelectFilterRenderer({
|
|
|
54462
54468
|
return getLabel(columnDefinition.filterProps?.getLabel, option);
|
|
54463
54469
|
},
|
|
54464
54470
|
onChange,
|
|
54465
|
-
options,
|
|
54466
|
-
value: ramda.intersection(value || [],
|
|
54471
|
+
options: filterOptions,
|
|
54472
|
+
value: ramda.intersection(value || [], filterOptions)
|
|
54467
54473
|
}
|
|
54468
54474
|
);
|
|
54469
54475
|
}
|
|
@@ -57154,7 +57160,7 @@ var SortComponent = (props) => {
|
|
|
57154
57160
|
return null;
|
|
57155
57161
|
};
|
|
57156
57162
|
var isRowSelected = (rowNode) => {
|
|
57157
|
-
return Boolean(rowNode.selectable ? rowNode.isSelected() :
|
|
57163
|
+
return Boolean(rowNode.selectable ? rowNode.isSelected() : false);
|
|
57158
57164
|
};
|
|
57159
57165
|
var GenericHeaderRenderer = (props) => {
|
|
57160
57166
|
const colDef = props.column.getColDef();
|
|
@@ -57209,22 +57215,26 @@ var GenericHeaderRenderer = (props) => {
|
|
|
57209
57215
|
}, []);
|
|
57210
57216
|
React80__default.default.useEffect(() => {
|
|
57211
57217
|
function calculatePosition() {
|
|
57212
|
-
const
|
|
57213
|
-
if (!
|
|
57218
|
+
const visibleColumns = props.columnApi.getAllDisplayedColumns();
|
|
57219
|
+
if (!visibleColumns?.length)
|
|
57214
57220
|
return;
|
|
57215
|
-
|
|
57216
|
-
|
|
57217
|
-
setIsFirstColumn(true);
|
|
57218
|
-
} else {
|
|
57219
|
-
setIsFirstColumn(false);
|
|
57220
|
-
}
|
|
57221
|
+
const isCurrentFirst = visibleColumns[0].getColId() === colId;
|
|
57222
|
+
setIsFirstColumn(isCurrentFirst);
|
|
57221
57223
|
}
|
|
57222
57224
|
props.api.addEventListener("columnMoved", calculatePosition);
|
|
57225
|
+
props.api.addEventListener("columnPinned", calculatePosition);
|
|
57226
|
+
props.api.addEventListener("columnVisible", calculatePosition);
|
|
57223
57227
|
calculatePosition();
|
|
57224
57228
|
return () => {
|
|
57225
57229
|
removeEventListenerFromGrid("columnMoved", calculatePosition, props.api);
|
|
57230
|
+
removeEventListenerFromGrid("columnPinned", calculatePosition, props.api);
|
|
57231
|
+
removeEventListenerFromGrid(
|
|
57232
|
+
"columnVisible",
|
|
57233
|
+
calculatePosition,
|
|
57234
|
+
props.api
|
|
57235
|
+
);
|
|
57226
57236
|
};
|
|
57227
|
-
}, []);
|
|
57237
|
+
}, [colId, props.api]);
|
|
57228
57238
|
const onSortToggled = (event) => {
|
|
57229
57239
|
let currentSort = null;
|
|
57230
57240
|
if (Array.from(checkbox.current?.parentElement?.children || []).includes(
|
|
@@ -57436,7 +57446,7 @@ var GenericHeaderRenderer = (props) => {
|
|
|
57436
57446
|
return;
|
|
57437
57447
|
}
|
|
57438
57448
|
function updateSelectAllCheckbox(e) {
|
|
57439
|
-
if (e.source === "uiSelectAll") {
|
|
57449
|
+
if (e && e.source === "uiSelectAll") {
|
|
57440
57450
|
return;
|
|
57441
57451
|
}
|
|
57442
57452
|
const selectionState = props.api.getServerSideSelectionState();
|
|
@@ -57449,7 +57459,10 @@ var GenericHeaderRenderer = (props) => {
|
|
|
57449
57459
|
);
|
|
57450
57460
|
const isPagination = Boolean(props.api.paginationGetRowCount());
|
|
57451
57461
|
const currentRows = getCurrentRows(props.api, isPagination);
|
|
57452
|
-
const
|
|
57462
|
+
const selectableRows = currentRows.filter(
|
|
57463
|
+
(rowNode) => rowNode.selectable
|
|
57464
|
+
);
|
|
57465
|
+
const isAllSelected = isPagination ? selectableRows.length > 0 && selectableRows.every(isRowSelected) : isSelectionStateSelectAll;
|
|
57453
57466
|
const isPartialSelected = isPagination ? !isAllSelected && currentRows.some(isRowSelected) : isSelectionStatePartialSelected;
|
|
57454
57467
|
if (isAllSelected) {
|
|
57455
57468
|
setSelectAll("all" /* All */);
|
|
@@ -57461,6 +57474,7 @@ var GenericHeaderRenderer = (props) => {
|
|
|
57461
57474
|
}
|
|
57462
57475
|
props.api.addEventListener(selectionChanged, updateSelectAllCheckbox);
|
|
57463
57476
|
props.api.addEventListener(paginationChanged, updateSelectAllCheckbox);
|
|
57477
|
+
updateSelectAllCheckbox();
|
|
57464
57478
|
return () => {
|
|
57465
57479
|
removeEventListenerFromGrid(
|
|
57466
57480
|
selectionChanged,
|
|
@@ -57695,6 +57709,11 @@ function getGroupNodes(params) {
|
|
|
57695
57709
|
function CustomLoader(params) {
|
|
57696
57710
|
const I18n = coreReact.useI18nContext();
|
|
57697
57711
|
const groupNodes = getGroupNodes(params);
|
|
57712
|
+
const internalTableContext = useInternalTableContext();
|
|
57713
|
+
const hasDuplicateRowIds = internalTableContext.hasDuplicateRowIds ?? false;
|
|
57714
|
+
if (hasDuplicateRowIds) {
|
|
57715
|
+
return null;
|
|
57716
|
+
}
|
|
57698
57717
|
if (params.node === groupNodes.firstLoading) {
|
|
57699
57718
|
return /* @__PURE__ */ React80__default.default.createElement(coreReact.Flex, { style: { paddingLeft: "16px" } }, /* @__PURE__ */ React80__default.default.createElement(
|
|
57700
57719
|
LevelIndents,
|
|
@@ -58383,7 +58402,8 @@ var InternalTableContext = React80__default.default.createContext({
|
|
|
58383
58402
|
},
|
|
58384
58403
|
totalRowCount: 0,
|
|
58385
58404
|
setTotalRowCount: () => {
|
|
58386
|
-
}
|
|
58405
|
+
},
|
|
58406
|
+
hasDuplicateRowIds: false
|
|
58387
58407
|
});
|
|
58388
58408
|
var useInternalTableContext = () => React80__default.default.useContext(InternalTableContext);
|
|
58389
58409
|
var prng = ulid$1.detectPrng(true);
|
|
@@ -105709,7 +105729,7 @@ var en_AU_default = {
|
|
|
105709
105729
|
autoSizeAllColumns: "Autosize all columns",
|
|
105710
105730
|
hideColumn: "Hide column",
|
|
105711
105731
|
resetColumns: "Reset columns",
|
|
105712
|
-
unGroupBy: "Un-
|
|
105732
|
+
unGroupBy: "Un-group by {{label}}",
|
|
105713
105733
|
groupBy: "Group by {{label}}"
|
|
105714
105734
|
},
|
|
105715
105735
|
grandTotals: "Grand totals",
|
|
@@ -105872,7 +105892,7 @@ var en_CA_default = {
|
|
|
105872
105892
|
autoSizeAllColumns: "Autosize all columns",
|
|
105873
105893
|
hideColumn: "Hide column",
|
|
105874
105894
|
resetColumns: "Reset columns",
|
|
105875
|
-
unGroupBy: "Un-
|
|
105895
|
+
unGroupBy: "Un-group by {{label}}",
|
|
105876
105896
|
groupBy: "Group by {{label}}"
|
|
105877
105897
|
},
|
|
105878
105898
|
grandTotals: "Grand totals",
|
|
@@ -106447,7 +106467,7 @@ var es_default = {
|
|
|
106447
106467
|
description: "Una vez que su equipo cree \xEDtems, podr\xE1 acceder a ellos aqu\xED. ",
|
|
106448
106468
|
title: "No hay \xEDtems para mostrar en este momento",
|
|
106449
106469
|
itemsTitle: "No hay %{itemsLabel} para mostrar en este momento",
|
|
106450
|
-
tooltip: "El bot\xF3n %{featureName} se habilitar\xE1 una vez que agregue informaci\xF3n
|
|
106470
|
+
tooltip: "El bot\xF3n %{featureName} se habilitar\xE1 una vez que agregue informaci\xF3n a la %{tableName}.",
|
|
106451
106471
|
searchTooltip: "La b\xFAsqueda se habilitar\xE1 una vez que agregue informaci\xF3n a %{tableName}",
|
|
106452
106472
|
featureFilter: "Filtro",
|
|
106453
106473
|
featureQuickFilter: "Filtro r\xE1pido",
|
|
@@ -106461,7 +106481,7 @@ var es_default = {
|
|
|
106461
106481
|
bulkEdit: "Edici\xF3n masiva",
|
|
106462
106482
|
cancel: "Cancelar",
|
|
106463
106483
|
editValues: "Editar valores",
|
|
106464
|
-
error: "Lo sentimos, no se pudieron actualizar los \xEDtems.
|
|
106484
|
+
error: "Lo sentimos, no se pudieron actualizar los \xEDtems. Int\xE9ntelo de nuevo.",
|
|
106465
106485
|
placeholderForField: "Ingrese %{fieldName}",
|
|
106466
106486
|
selection: "%{count} %{number} seleccionado",
|
|
106467
106487
|
success: "Los \xEDtems se actualizaron correctamente.",
|
|
@@ -106507,14 +106527,14 @@ var es_default = {
|
|
|
106507
106527
|
}
|
|
106508
106528
|
},
|
|
106509
106529
|
loading: {
|
|
106510
|
-
initial: "Cargando informaci\xF3n
|
|
106530
|
+
initial: "Cargando informaci\xF3n...",
|
|
106511
106531
|
secondary: "Cargando informaci\xF3n. Gracias por su paciencia."
|
|
106512
106532
|
},
|
|
106513
106533
|
menuOptions: {
|
|
106514
106534
|
sortMenuItem: {
|
|
106515
106535
|
label: "Ordenar por esta columna",
|
|
106516
|
-
sortAscItem: "Ordenar columna
|
|
106517
|
-
sortDescItem: "Ordenar columna
|
|
106536
|
+
sortAscItem: "Ordenar columna - Ascendente",
|
|
106537
|
+
sortDescItem: "Ordenar columna - Descendente",
|
|
106518
106538
|
sortResetItem: "Columna no ordenada"
|
|
106519
106539
|
},
|
|
106520
106540
|
expandAllGroups: "Expandir todos los grupos",
|
|
@@ -106624,7 +106644,7 @@ var fr_CA_default = {
|
|
|
106624
106644
|
bulkEdit: "Modifier en bloc",
|
|
106625
106645
|
cancel: "Annuler",
|
|
106626
106646
|
editValues: "Modifier les valeurs",
|
|
106627
|
-
error: "D\xE9sol\xE9, les items n'ont pas pu \xEAtre mis \xE0 jour.
|
|
106647
|
+
error: "D\xE9sol\xE9, les items n'ont pas pu \xEAtre mis \xE0 jour. Veuillez r\xE9essayer.",
|
|
106628
106648
|
placeholderForField: "Entrez %{fieldName}",
|
|
106629
106649
|
selection: "%{count} %{number} s\xE9lectionn\xE9",
|
|
106630
106650
|
success: "Les items ont \xE9t\xE9 mis \xE0 jour avec succ\xE8s.",
|
|
@@ -106787,7 +106807,7 @@ var fr_FR_default = {
|
|
|
106787
106807
|
bulkEdit: "Modifier en masse",
|
|
106788
106808
|
cancel: "Annuler",
|
|
106789
106809
|
editValues: "Modifier les valeurs",
|
|
106790
|
-
error: "D\xE9sol\xE9, les \xE9l\xE9ments n'ont pas pu \xEAtre mis \xE0 jour.
|
|
106810
|
+
error: "D\xE9sol\xE9, les \xE9l\xE9ments n'ont pas pu \xEAtre mis \xE0 jour. Veuillez r\xE9essayer.",
|
|
106791
106811
|
placeholderForField: "Saisissez %{fieldName}",
|
|
106792
106812
|
selection: "%{count} %{number} s\xE9lectionn\xE9",
|
|
106793
106813
|
success: "Les \xE9l\xE9ments ont bien \xE9t\xE9 mis \xE0 jour.",
|
|
@@ -107605,7 +107625,7 @@ var pt_BR_default = {
|
|
|
107605
107625
|
bulkEdit: "Edi\xE7\xE3o em Massa",
|
|
107606
107626
|
cancel: "Cancelar",
|
|
107607
107627
|
editValues: "Editar Valores",
|
|
107608
|
-
error: "
|
|
107628
|
+
error: "Sentimos muito, mas n\xE3o foi poss\xEDvel atualizar os itens. Tente novamente.",
|
|
107609
107629
|
placeholderForField: "Digite %{fieldName}",
|
|
107610
107630
|
selection: "%{count} %{number} selecionado",
|
|
107611
107631
|
success: "Os itens foram atualizados com sucesso.",
|
|
@@ -107768,7 +107788,7 @@ var th_TH_default = {
|
|
|
107768
107788
|
bulkEdit: "\u0E01\u0E32\u0E23\u0E41\u0E01\u0E49\u0E44\u0E02\u0E41\u0E1A\u0E1A\u0E01\u0E25\u0E38\u0E48\u0E21",
|
|
107769
107789
|
cancel: "\u0E22\u0E01\u0E40\u0E25\u0E34\u0E01",
|
|
107770
107790
|
editValues: "\u0E41\u0E01\u0E49\u0E44\u0E02\u0E04\u0E48\u0E32",
|
|
107771
|
-
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 \
|
|
107791
|
+
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.",
|
|
107772
107792
|
placeholderForField: "\u0E1B\u0E49\u0E2D\u0E19 %{fieldName}",
|
|
107773
107793
|
selection: "%{count} %{number} \u0E17\u0E35\u0E48\u0E40\u0E25\u0E37\u0E2D\u0E01",
|
|
107774
107794
|
success: "\u0E2D\u0E31\u0E1B\u0E40\u0E14\u0E15\u0E23\u0E32\u0E22\u0E01\u0E32\u0E23\u0E2A\u0E33\u0E40\u0E23\u0E47\u0E08\u0E41\u0E25\u0E49\u0E27",
|
|
@@ -109052,8 +109072,7 @@ var DataTable = ({
|
|
|
109052
109072
|
showExpandCollapseAllToggle,
|
|
109053
109073
|
translations: translations2 = {},
|
|
109054
109074
|
enableCellTextSelection,
|
|
109055
|
-
localStoragePersistenceKey
|
|
109056
|
-
enableCDN
|
|
109075
|
+
localStoragePersistenceKey
|
|
109057
109076
|
}) => {
|
|
109058
109077
|
const initialTableConfig = localStoragePersistenceKey && webSdkStorage.storage.local.getItem(localStoragePersistenceKey) || _initialTableConfig;
|
|
109059
109078
|
const onServerSideDataRequestRef = React80__default.default.useRef(onServerSideDataRequest);
|
|
@@ -109065,28 +109084,14 @@ var DataTable = ({
|
|
|
109065
109084
|
);
|
|
109066
109085
|
const contextPanel = useContextPanel();
|
|
109067
109086
|
const clientI18n = coreReact.useI18nContext();
|
|
109068
|
-
const isCDNEnabled = cdnTranslations.isCDNFeatureFlagEnabled(clientI18n, enableCDN);
|
|
109069
|
-
const cdnTranslations$1 = cdnTranslations.useRequestTranslations(
|
|
109070
|
-
{
|
|
109071
|
-
locale: clientI18n.locale,
|
|
109072
|
-
type: "file",
|
|
109073
|
-
absolute_file_path: (locale) => `core/packages/data-table/src/locales/${locale}`
|
|
109074
|
-
},
|
|
109075
|
-
{ en: translations.en, pseudo: translations.pseudo },
|
|
109076
|
-
{
|
|
109077
|
-
oldTranslations: translations,
|
|
109078
|
-
enableCDN: isCDNEnabled
|
|
109079
|
-
}
|
|
109080
|
-
);
|
|
109081
109087
|
const internalI18n = coreReact.useI18n({
|
|
109082
|
-
|
|
109088
|
+
...clientI18n,
|
|
109083
109089
|
translations: ramda.mergeDeepLeft(
|
|
109084
109090
|
ramda.mergeDeepLeft(clientI18n.translations, {
|
|
109085
109091
|
[clientI18n.locale]: translations2
|
|
109086
109092
|
}),
|
|
109087
|
-
|
|
109088
|
-
)
|
|
109089
|
-
enableCDN: isCDNEnabled
|
|
109093
|
+
translations
|
|
109094
|
+
)
|
|
109090
109095
|
});
|
|
109091
109096
|
const rowSelectionRef = React80__default.default.useRef({
|
|
109092
109097
|
affectedRows: {},
|
|
@@ -109137,6 +109142,7 @@ var DataTable = ({
|
|
|
109137
109142
|
);
|
|
109138
109143
|
const [gridApi, setGridApi] = React80__default.default.useState();
|
|
109139
109144
|
const [columnApi, setColumnApi] = React80__default.default.useState();
|
|
109145
|
+
const [hasDuplicateRowIds, setHasDuplicateRowIds] = React80__default.default.useState(false);
|
|
109140
109146
|
const searchStorage = useSearchStorage();
|
|
109141
109147
|
const filterState = useFilterState({
|
|
109142
109148
|
columnDefinitions: columns,
|
|
@@ -109212,7 +109218,9 @@ var DataTable = ({
|
|
|
109212
109218
|
gridApi?.hideOverlay.bind(gridApi),
|
|
109213
109219
|
filterStorage.filtersState,
|
|
109214
109220
|
searchStorage.searchValue,
|
|
109215
|
-
setTotalRowCount
|
|
109221
|
+
setTotalRowCount,
|
|
109222
|
+
setHasDuplicateRowIds,
|
|
109223
|
+
getRowId
|
|
109216
109224
|
)
|
|
109217
109225
|
);
|
|
109218
109226
|
gridApi?.paginationGoToPage(0);
|
|
@@ -109305,7 +109313,8 @@ var DataTable = ({
|
|
|
109305
109313
|
tableRef,
|
|
109306
109314
|
totalRowCount,
|
|
109307
109315
|
setTotalRowCount,
|
|
109308
|
-
updateServerSideDataSource
|
|
109316
|
+
updateServerSideDataSource,
|
|
109317
|
+
hasDuplicateRowIds
|
|
109309
109318
|
}
|
|
109310
109319
|
},
|
|
109311
109320
|
children
|
|
@@ -109316,12 +109325,34 @@ var rowDragMoveEvent;
|
|
|
109316
109325
|
var rowDragEndEvent;
|
|
109317
109326
|
function getServerSideDatasource(onServerSideDataRequestCallbackRef, onEmptyResponseCallback = () => {
|
|
109318
109327
|
}, onNonEmptyResponseCallback = () => {
|
|
109319
|
-
}, filters, search, setTotalRowCount) {
|
|
109328
|
+
}, filters, search, setTotalRowCount, setHasDuplicateRowIds, getRowId) {
|
|
109320
109329
|
return {
|
|
109321
109330
|
getRows: async (params) => {
|
|
109322
109331
|
if (onServerSideDataRequestCallbackRef.current) {
|
|
109323
109332
|
const { request, success, fail } = params;
|
|
109324
109333
|
const onSuccess = (loadSuccessParams) => {
|
|
109334
|
+
const { rowData } = loadSuccessParams;
|
|
109335
|
+
if (rowData && Array.isArray(rowData) && getRowId) {
|
|
109336
|
+
const uniqueRowIds = /* @__PURE__ */ new Set();
|
|
109337
|
+
for (const row2 of rowData) {
|
|
109338
|
+
const id = getRowId({
|
|
109339
|
+
data: row2,
|
|
109340
|
+
level: 0,
|
|
109341
|
+
api: {},
|
|
109342
|
+
columnApi: {},
|
|
109343
|
+
context: {}
|
|
109344
|
+
});
|
|
109345
|
+
if (uniqueRowIds.has(id)) {
|
|
109346
|
+
setHasDuplicateRowIds(true);
|
|
109347
|
+
logger.error(
|
|
109348
|
+
"Duplicate row IDs detected in rowData. Check getRowId() to ensure it returns unique IDs."
|
|
109349
|
+
);
|
|
109350
|
+
fail();
|
|
109351
|
+
return;
|
|
109352
|
+
}
|
|
109353
|
+
uniqueRowIds.add(id);
|
|
109354
|
+
}
|
|
109355
|
+
}
|
|
109325
109356
|
if (!loadSuccessParams.rowCount && request.groupKeys.length === 0) {
|
|
109326
109357
|
onEmptyResponseCallback();
|
|
109327
109358
|
} else {
|
|
@@ -110305,10 +110336,7 @@ function isLastColumnInGroup(params) {
|
|
|
110305
110336
|
function ClientSideFilterInner(props) {
|
|
110306
110337
|
const { Component: Component4, columnDefinition, onChange, options, value } = props;
|
|
110307
110338
|
const filterHeading = columnDefinition.filterProps?.getFilterHeadingText?.(columnDefinition) ?? columnDefinition.headerName;
|
|
110308
|
-
const filterOptions = React80__default.default.useMemo(
|
|
110309
|
-
() => (options ?? [])?.filter((option) => !!option),
|
|
110310
|
-
[options]
|
|
110311
|
-
);
|
|
110339
|
+
const filterOptions = React80__default.default.useMemo(() => options ?? [], [options]);
|
|
110312
110340
|
return /* @__PURE__ */ React80__default.default.createElement(coreReact.Box, { as: "li", display: "block", paddingBottom: "xl", style: { width: "100%" } }, filterHeading ? /* @__PURE__ */ React80__default.default.createElement(
|
|
110313
110341
|
coreReact.Label,
|
|
110314
110342
|
{
|
|
@@ -112240,8 +112268,7 @@ var ClientSideDataTable = ({
|
|
|
112240
112268
|
onTableConfigChange,
|
|
112241
112269
|
translations: translations2 = {},
|
|
112242
112270
|
enableCellTextSelection,
|
|
112243
|
-
localStoragePersistenceKey
|
|
112244
|
-
enableCDN
|
|
112271
|
+
localStoragePersistenceKey
|
|
112245
112272
|
}) => {
|
|
112246
112273
|
return /* @__PURE__ */ React80__default.default.createElement(
|
|
112247
112274
|
DataTable,
|
|
@@ -112259,8 +112286,7 @@ var ClientSideDataTable = ({
|
|
|
112259
112286
|
translations: translations2,
|
|
112260
112287
|
localStoragePersistenceKey,
|
|
112261
112288
|
customBulkEditorFields,
|
|
112262
|
-
enableCellTextSelection
|
|
112263
|
-
enableCDN
|
|
112289
|
+
enableCellTextSelection
|
|
112264
112290
|
},
|
|
112265
112291
|
children
|
|
112266
112292
|
);
|
|
@@ -116720,8 +116746,7 @@ var ServerSideDataTable = ({
|
|
|
116720
116746
|
enableCellTextSelection,
|
|
116721
116747
|
showExpandCollapseAllToggle,
|
|
116722
116748
|
translations: translations2 = {},
|
|
116723
|
-
localStoragePersistenceKey
|
|
116724
|
-
enableCDN
|
|
116749
|
+
localStoragePersistenceKey
|
|
116725
116750
|
}) => {
|
|
116726
116751
|
return /* @__PURE__ */ React80__default.default.createElement(
|
|
116727
116752
|
DataTable,
|
|
@@ -116740,8 +116765,7 @@ var ServerSideDataTable = ({
|
|
|
116740
116765
|
translations: translations2,
|
|
116741
116766
|
customBulkEditorFields,
|
|
116742
116767
|
enableCellTextSelection,
|
|
116743
|
-
localStoragePersistenceKey
|
|
116744
|
-
enableCDN
|
|
116768
|
+
localStoragePersistenceKey
|
|
116745
116769
|
},
|
|
116746
116770
|
children
|
|
116747
116771
|
);
|
package/dist/modern/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/modern/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<{}>;
|