@procore/data-table 14.7.0 → 14.9.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 +19 -0
- package/dist/legacy/index.cjs +141 -64
- package/dist/legacy/index.d.cts +5 -3
- package/dist/legacy/index.d.ts +5 -3
- package/dist/legacy/index.js +141 -64
- package/dist/modern/index.cjs +139 -62
- package/dist/modern/index.d.cts +5 -3
- package/dist/modern/index.d.ts +5 -3
- package/dist/modern/index.js +139 -62
- package/package.json +7 -5
package/dist/modern/index.cjs
CHANGED
|
@@ -13,6 +13,7 @@ var ulid$1 = require('ulid');
|
|
|
13
13
|
var toastAlert = require('@procore/toast-alert');
|
|
14
14
|
var ReactDOM = require('react-dom');
|
|
15
15
|
var server = require('react-dom/server');
|
|
16
|
+
var webSdkStorage = require('@procore/web-sdk-storage');
|
|
16
17
|
var _isEqual = require('lodash.isequal');
|
|
17
18
|
var ReactResizeDetector = require('react-resize-detector');
|
|
18
19
|
var labsDatetimeSelect = require('@procore/labs-datetime-select');
|
|
@@ -1417,7 +1418,7 @@ ag-grid, ag-grid-angular, ag-grid-ng2, ag-grid-polymer, ag-grid-aurelia {
|
|
|
1417
1418
|
animation-iteration-count: infinite;
|
|
1418
1419
|
animation-name: ag-shake-left-to-right;
|
|
1419
1420
|
}
|
|
1420
|
-
@keyframes _ag-shake-left-to-
|
|
1421
|
+
@keyframes _ag-shake-left-to-right_7x7l9_366 {
|
|
1421
1422
|
from {
|
|
1422
1423
|
padding-left: 6px;
|
|
1423
1424
|
padding-right: 2px;
|
|
@@ -5418,7 +5419,7 @@ input[class^=ag-][type=button]:focus, button[class^=ag-]:focus {
|
|
|
5418
5419
|
animation-iteration-count: infinite;
|
|
5419
5420
|
animation-timing-function: linear;
|
|
5420
5421
|
}
|
|
5421
|
-
@keyframes
|
|
5422
|
+
@keyframes _spin_7x7l9_1 {
|
|
5422
5423
|
from {
|
|
5423
5424
|
transform: rotate(0deg);
|
|
5424
5425
|
}
|
|
@@ -7539,6 +7540,18 @@ input[class^=ag-][type=range]:disabled {
|
|
|
7539
7540
|
box-shadow: 0px -6px 12px -3px hsla(200, 8%, 10%, 0.25);
|
|
7540
7541
|
z-index: 2;
|
|
7541
7542
|
}
|
|
7543
|
+
.ag-theme-alpine.ag-theme-alpine .ag-floating-bottom .ag-pinned-left-floating-bottom .ag-row, .ag-theme-alpine.ag-theme-alpine .ag-floating-bottom .ag-pinned-right-floating-bottom .ag-row {
|
|
7544
|
+
background-color: #f4f5f6;
|
|
7545
|
+
}
|
|
7546
|
+
.ag-theme-alpine.ag-theme-alpine .ag-floating-bottom .ag-pinned-left-floating-bottom {
|
|
7547
|
+
z-index: 1;
|
|
7548
|
+
box-shadow: 3px 0px 12px 0.5px hsl(200, 8%, 90%);
|
|
7549
|
+
border-right: 1px solid #d6dadc;
|
|
7550
|
+
}
|
|
7551
|
+
.ag-theme-alpine.ag-theme-alpine .ag-floating-bottom .ag-pinned-right-floating-bottom {
|
|
7552
|
+
box-shadow: -3px 0px 12px 0.5px hsl(200, 8%, 90%);
|
|
7553
|
+
border-left: 1px solid #d6dadc;
|
|
7554
|
+
}
|
|
7542
7555
|
.ag-theme-alpine.ag-theme-alpine .ag-group-value {
|
|
7543
7556
|
line-height: 16px;
|
|
7544
7557
|
}
|
|
@@ -7905,7 +7918,7 @@ input[class^=ag-][type=range]:disabled {
|
|
|
7905
7918
|
padding-left: 16px;
|
|
7906
7919
|
}
|
|
7907
7920
|
|
|
7908
|
-
div.
|
|
7921
|
+
div._contextPanel_7x7l9_7144 {
|
|
7909
7922
|
width: 400px;
|
|
7910
7923
|
transition: all ease 500ms;
|
|
7911
7924
|
flex: 0 0 auto;
|
|
@@ -7914,7 +7927,7 @@ div._contextPanel_10eap_7131 {
|
|
|
7914
7927
|
border: 1px solid #d6dadc;
|
|
7915
7928
|
display: flex;
|
|
7916
7929
|
}
|
|
7917
|
-
div._contextPanel--
|
|
7930
|
+
div._contextPanel--hidden_7x7l9_7153 {
|
|
7918
7931
|
border: none;
|
|
7919
7932
|
overflow: hidden;
|
|
7920
7933
|
padding: 0px;
|
|
@@ -7922,50 +7935,50 @@ div._contextPanel--hidden_10eap_7140 {
|
|
|
7922
7935
|
width: 0px;
|
|
7923
7936
|
}
|
|
7924
7937
|
|
|
7925
|
-
.
|
|
7938
|
+
._contextPanelWrapper_7x7l9_7161 {
|
|
7926
7939
|
position: relative;
|
|
7927
7940
|
flex-grow: 1;
|
|
7928
7941
|
}
|
|
7929
7942
|
|
|
7930
|
-
.
|
|
7943
|
+
._contextPanelBody_7x7l9_7166 {
|
|
7931
7944
|
width: clamp(380px, 400px, 100%);
|
|
7932
7945
|
}
|
|
7933
7946
|
|
|
7934
|
-
._contextPanel-
|
|
7947
|
+
._contextPanel-stickyHeader_7x7l9_7170 {
|
|
7935
7948
|
background-color: #ffffff;
|
|
7936
7949
|
position: sticky;
|
|
7937
7950
|
top: 0;
|
|
7938
7951
|
z-index: 5;
|
|
7939
7952
|
}
|
|
7940
7953
|
|
|
7941
|
-
._filters-
|
|
7954
|
+
._filters-list_7x7l9_7177 {
|
|
7942
7955
|
padding: 0;
|
|
7943
7956
|
margin: 0;
|
|
7944
7957
|
}
|
|
7945
|
-
._filters-
|
|
7958
|
+
._filters-list_7x7l9_7177 ol {
|
|
7946
7959
|
padding: 0;
|
|
7947
7960
|
margin: 0;
|
|
7948
7961
|
}
|
|
7949
7962
|
|
|
7950
|
-
._col-drag-column-
|
|
7963
|
+
._col-drag-column-icon_7x7l9_7186 {
|
|
7951
7964
|
color: #6a767c;
|
|
7952
7965
|
}
|
|
7953
7966
|
|
|
7954
|
-
._tabular-
|
|
7967
|
+
._tabular-nums_7x7l9_7190 {
|
|
7955
7968
|
font-variant-numeric: tabular-nums;
|
|
7956
7969
|
}`;
|
|
7957
7970
|
document.head.appendChild(document.createElement("style")).appendChild(document.createTextNode(css));
|
|
7958
7971
|
var styles_default = {
|
|
7959
|
-
"contextPanel": "
|
|
7960
|
-
"contextPanel--hidden": "_contextPanel--
|
|
7961
|
-
"contextPanelWrapper": "
|
|
7962
|
-
"contextPanelBody": "
|
|
7963
|
-
"contextPanel-stickyHeader": "_contextPanel-
|
|
7964
|
-
"filters-list": "_filters-
|
|
7965
|
-
"col-drag-column-icon": "_col-drag-column-
|
|
7966
|
-
"tabular-nums": "_tabular-
|
|
7967
|
-
"ag-shake-left-to-right": "_ag-shake-left-to-
|
|
7968
|
-
"spin": "
|
|
7972
|
+
"contextPanel": "_contextPanel_7x7l9_7144",
|
|
7973
|
+
"contextPanel--hidden": "_contextPanel--hidden_7x7l9_7153",
|
|
7974
|
+
"contextPanelWrapper": "_contextPanelWrapper_7x7l9_7161",
|
|
7975
|
+
"contextPanelBody": "_contextPanelBody_7x7l9_7166",
|
|
7976
|
+
"contextPanel-stickyHeader": "_contextPanel-stickyHeader_7x7l9_7170",
|
|
7977
|
+
"filters-list": "_filters-list_7x7l9_7177",
|
|
7978
|
+
"col-drag-column-icon": "_col-drag-column-icon_7x7l9_7186",
|
|
7979
|
+
"tabular-nums": "_tabular-nums_7x7l9_7190",
|
|
7980
|
+
"ag-shake-left-to-right": "_ag-shake-left-to-right_7x7l9_366",
|
|
7981
|
+
"spin": "_spin_7x7l9_1"
|
|
7969
7982
|
};
|
|
7970
7983
|
|
|
7971
7984
|
// src/utils/getCellValueTypographyProps.ts
|
|
@@ -55170,6 +55183,16 @@ function getParentSelectionState(parent, affectedRows, parentChildrenMap) {
|
|
|
55170
55183
|
return rowSelectionState.indeterminate;
|
|
55171
55184
|
}
|
|
55172
55185
|
}
|
|
55186
|
+
function getNodeSelectedState(node) {
|
|
55187
|
+
const filteredChildren = node.childrenAfterFilter || [];
|
|
55188
|
+
const numSelectedChildren = filteredChildren.filter(
|
|
55189
|
+
(child) => child.isSelected()
|
|
55190
|
+
).length;
|
|
55191
|
+
return {
|
|
55192
|
+
selected: filteredChildren.length > 0 ? numSelectedChildren > 0 : node.isSelected(),
|
|
55193
|
+
indeterminate: filteredChildren ? numSelectedChildren > 0 && filteredChildren.length !== numSelectedChildren : false
|
|
55194
|
+
};
|
|
55195
|
+
}
|
|
55173
55196
|
function getAffectedRows(currentRows, selectionNode, affectedRows) {
|
|
55174
55197
|
const isNodeRootLevel = isNodeRootLevelOfGrid(selectionNode.parent);
|
|
55175
55198
|
const nodeId = selectionNode.id;
|
|
@@ -55249,12 +55272,8 @@ function getAffectedRows(currentRows, selectionNode, affectedRows) {
|
|
|
55249
55272
|
function noop2() {
|
|
55250
55273
|
}
|
|
55251
55274
|
function ClientSideRowCheckbox(props) {
|
|
55252
|
-
const [
|
|
55253
|
-
const
|
|
55254
|
-
(child) => child.isSelected()
|
|
55255
|
-
).length;
|
|
55256
|
-
const selectedState = props.node.childrenAfterGroup ? numSelectedChildren > 0 : props.node.isSelected();
|
|
55257
|
-
const indeterminateState = props.node.childrenAfterGroup ? numSelectedChildren > 0 && props.node.childrenAfterGroup?.length !== numSelectedChildren : false;
|
|
55275
|
+
const [_selected, setSelected] = React83.useState(props.node.isSelected());
|
|
55276
|
+
const { selected, indeterminate } = getNodeSelectedState(props.node);
|
|
55258
55277
|
function handleRowSelection(event) {
|
|
55259
55278
|
if (props.node === event.node) {
|
|
55260
55279
|
setSelected(event.node.isSelected());
|
|
@@ -55269,13 +55288,18 @@ function ClientSideRowCheckbox(props) {
|
|
|
55269
55288
|
return /* @__PURE__ */ React83__default.default.createElement(coreReact.Box, { paddingRight: "md" }, /* @__PURE__ */ React83__default.default.createElement(
|
|
55270
55289
|
coreReact.Checkbox,
|
|
55271
55290
|
{
|
|
55272
|
-
checked:
|
|
55291
|
+
checked: selected,
|
|
55273
55292
|
disabled: props.data?.checkboxDisabled,
|
|
55274
|
-
indeterminate
|
|
55293
|
+
indeterminate,
|
|
55275
55294
|
"data-qa": "rowCheckbox",
|
|
55276
55295
|
onClick: noop2,
|
|
55277
|
-
onChange: () => {
|
|
55278
|
-
props.node.
|
|
55296
|
+
onChange: (event) => {
|
|
55297
|
+
return props.node.setSelectedParams({
|
|
55298
|
+
newValue: event.target.checked,
|
|
55299
|
+
groupSelectsFiltered: true,
|
|
55300
|
+
event,
|
|
55301
|
+
source: "checkboxSelected"
|
|
55302
|
+
});
|
|
55279
55303
|
}
|
|
55280
55304
|
}
|
|
55281
55305
|
));
|
|
@@ -55437,23 +55461,33 @@ var AutoGroupCellRenderer = (props) => {
|
|
|
55437
55461
|
};
|
|
55438
55462
|
|
|
55439
55463
|
// src/CellRenderers/rowActionsCellStyles.scss
|
|
55440
|
-
var css6 =
|
|
55441
|
-
left:
|
|
55442
|
-
|
|
55464
|
+
var css6 = `.ag-theme-alpine.ag-theme-alpine div.ag-cell[col-id=rowActions] {
|
|
55465
|
+
left: var(--viewport-width) !important;
|
|
55466
|
+
width: 0px !important;
|
|
55467
|
+
padding: 0px !important;
|
|
55443
55468
|
position: sticky;
|
|
55444
55469
|
visibility: hidden;
|
|
55445
55470
|
flex: none;
|
|
55471
|
+
background: none;
|
|
55472
|
+
overflow: visible;
|
|
55446
55473
|
}
|
|
55447
|
-
.ag-
|
|
55474
|
+
.ag-theme-alpine.ag-theme-alpine div.ag-cell[col-id=rowActions] .inline-nonedit-wrapper {
|
|
55475
|
+
width: auto;
|
|
55476
|
+
height: 100%;
|
|
55477
|
+
padding: 0px 8px;
|
|
55478
|
+
position: absolute;
|
|
55479
|
+
right: 0px;
|
|
55480
|
+
}
|
|
55481
|
+
.ag-theme-alpine.ag-theme-alpine .ag-row-hover div.ag-cell[col-id=rowActions] .inline-nonedit-wrapper {
|
|
55448
55482
|
background: #f4f5f6;
|
|
55449
55483
|
}
|
|
55450
|
-
.ag-row-focus div[col-id=rowActions] {
|
|
55484
|
+
.ag-theme-alpine.ag-theme-alpine .ag-row-focus div.ag-cell[col-id=rowActions] .inline-nonedit-wrapper {
|
|
55451
55485
|
background: #f6f9fe;
|
|
55452
55486
|
}
|
|
55453
|
-
.ag-row-hover
|
|
55487
|
+
.ag-theme-alpine.ag-theme-alpine .ag-row-hover .ag-cell[col-id=rowActions], .ag-theme-alpine.ag-theme-alpine .ag-row-focus .ag-cell[col-id=rowActions] {
|
|
55454
55488
|
visibility: visible;
|
|
55455
55489
|
}
|
|
55456
|
-
|
|
55490
|
+
.ag-theme-alpine.ag-theme-alpine .ag-cell[col-id=rowActions-pinned] {
|
|
55457
55491
|
background: "transparent";
|
|
55458
55492
|
left: calc(var(--viewport-width) - var(--rowActions-width)) !important;
|
|
55459
55493
|
padding: 2px 8px !important;
|
|
@@ -55462,8 +55496,18 @@ div[col-id=rowActions-pinned] {
|
|
|
55462
55496
|
document.head.appendChild(document.createElement("style")).appendChild(document.createTextNode(css6));
|
|
55463
55497
|
|
|
55464
55498
|
// src/CellRenderers/RowActionsCell.tsx
|
|
55499
|
+
function getRowActions(actions, rowProps) {
|
|
55500
|
+
if (typeof actions === "function") {
|
|
55501
|
+
return actions(rowProps);
|
|
55502
|
+
}
|
|
55503
|
+
return actions;
|
|
55504
|
+
}
|
|
55465
55505
|
var InternalRowActionsCellRenderer = (props) => {
|
|
55466
|
-
|
|
55506
|
+
const actions = getRowActions(
|
|
55507
|
+
props.columnDefinition.cellRendererParams.actions,
|
|
55508
|
+
props
|
|
55509
|
+
);
|
|
55510
|
+
if (props.rowPinned || props.columnDefinition.cellRendererParams.hideActionsOnGroupedRow && props.isGroup || actions.length === 0) {
|
|
55467
55511
|
return null;
|
|
55468
55512
|
}
|
|
55469
55513
|
return /* @__PURE__ */ React83__default.default.createElement(
|
|
@@ -55474,7 +55518,7 @@ var InternalRowActionsCellRenderer = (props) => {
|
|
|
55474
55518
|
size: "xs",
|
|
55475
55519
|
margin: "0px 4px"
|
|
55476
55520
|
},
|
|
55477
|
-
|
|
55521
|
+
actions.map((Action, idx) => {
|
|
55478
55522
|
const key = `${Action.displayName}${idx}`;
|
|
55479
55523
|
return /* @__PURE__ */ React83__default.default.createElement(Action, { ...props, key });
|
|
55480
55524
|
})
|
|
@@ -56126,6 +56170,7 @@ var css7 = `.ag-header-cell .data-table-header-menu {
|
|
|
56126
56170
|
document.head.appendChild(document.createElement("style")).appendChild(document.createTextNode(css7));
|
|
56127
56171
|
|
|
56128
56172
|
// src/GenericHeader/GenericHeader.tsx
|
|
56173
|
+
var filterChanged = "filterChanged";
|
|
56129
56174
|
var selectionChanged = "selectionChanged";
|
|
56130
56175
|
var paginationChanged = "paginationChanged";
|
|
56131
56176
|
var tooltipDelay = {
|
|
@@ -56427,7 +56472,7 @@ var GenericHeaderRenderer = (props) => {
|
|
|
56427
56472
|
if (node.selectable === false) {
|
|
56428
56473
|
return;
|
|
56429
56474
|
}
|
|
56430
|
-
if (node.
|
|
56475
|
+
if (getNodeSelectedState(node).selected) {
|
|
56431
56476
|
hasSelectedNodes = true;
|
|
56432
56477
|
} else {
|
|
56433
56478
|
isAllSelected = false;
|
|
@@ -56441,9 +56486,11 @@ var GenericHeaderRenderer = (props) => {
|
|
|
56441
56486
|
setSelectAll("none" /* None */);
|
|
56442
56487
|
}
|
|
56443
56488
|
}
|
|
56489
|
+
props.api.addEventListener(filterChanged, onSelectionChanged);
|
|
56444
56490
|
props.api.addEventListener(selectionChanged, onSelectionChanged);
|
|
56445
56491
|
onSelectionChanged();
|
|
56446
56492
|
return () => {
|
|
56493
|
+
removeEventListenerFromGrid(filterChanged, onSelectionChanged, props.api);
|
|
56447
56494
|
removeEventListenerFromGrid(
|
|
56448
56495
|
selectionChanged,
|
|
56449
56496
|
onSelectionChanged,
|
|
@@ -80978,9 +81025,20 @@ var useTableApi = ({
|
|
|
80978
81025
|
message
|
|
80979
81026
|
});
|
|
80980
81027
|
}, []);
|
|
81028
|
+
function getUnviewableGroupedColumns(columnApi2) {
|
|
81029
|
+
return (columnApi2?.getRowGroupColumns() ?? []).filter((column2) => {
|
|
81030
|
+
const colDef = column2.getColDef();
|
|
81031
|
+
return colDef.lockVisible && colDef.hide;
|
|
81032
|
+
}).map((column2) => column2.getColId());
|
|
81033
|
+
}
|
|
80981
81034
|
const setRowGrouping = React83__default.default.useCallback(
|
|
80982
81035
|
(value) => {
|
|
81036
|
+
const unviewableGroupedColumns = getUnviewableGroupedColumns(columnApi);
|
|
80983
81037
|
columnApi?.setRowGroupColumns(value);
|
|
81038
|
+
const recentlyUngroupedUnviewableColumns = unviewableGroupedColumns.filter((colId) => !value.includes(colId));
|
|
81039
|
+
if (recentlyUngroupedUnviewableColumns.length > 0) {
|
|
81040
|
+
columnApi?.setColumnsVisible(recentlyUngroupedUnviewableColumns, false);
|
|
81041
|
+
}
|
|
80984
81042
|
resetPagination();
|
|
80985
81043
|
},
|
|
80986
81044
|
[columnApi]
|
|
@@ -81450,15 +81508,16 @@ var DataTable = ({
|
|
|
81450
81508
|
onTableConfigChange,
|
|
81451
81509
|
showExpandCollapseAllToggle,
|
|
81452
81510
|
translations: translations2 = {},
|
|
81453
|
-
enableCellTextSelection
|
|
81511
|
+
enableCellTextSelection,
|
|
81512
|
+
localStoragePersistenceKey
|
|
81454
81513
|
}) => {
|
|
81455
|
-
const
|
|
81514
|
+
const initialTableConfig = localStoragePersistenceKey && webSdkStorage.storage.local.getItem(localStoragePersistenceKey) || _initialTableConfig;
|
|
81456
81515
|
const onServerSideDataRequestRef = React83__default.default.useRef(onServerSideDataRequest);
|
|
81457
81516
|
const tableRef = React83__default.default.useRef(null);
|
|
81458
81517
|
const [totalRowCount, setTotalRowCount] = React83__default.default.useState(0);
|
|
81459
81518
|
const [selectedGroupIndex, setSelectedGroupIndex] = React83__default.default.useState(null);
|
|
81460
81519
|
const [initialConfigSet, setInitialConfigSet] = React83__default.default.useState(
|
|
81461
|
-
!
|
|
81520
|
+
!initialTableConfig
|
|
81462
81521
|
);
|
|
81463
81522
|
const contextPanel = useContextPanel();
|
|
81464
81523
|
const clientI18n = coreReact.useI18nContext();
|
|
@@ -81546,18 +81605,31 @@ var DataTable = ({
|
|
|
81546
81605
|
});
|
|
81547
81606
|
checkboxColumn.current = newCheckboxColumn;
|
|
81548
81607
|
}
|
|
81549
|
-
if (!gridApi || !columnApi
|
|
81608
|
+
if (!gridApi || !columnApi) {
|
|
81550
81609
|
return;
|
|
81551
81610
|
}
|
|
81552
81611
|
const config = tableRef?.current?.getTableConfiguration();
|
|
81553
81612
|
if (config) {
|
|
81554
|
-
|
|
81613
|
+
if (localStoragePersistenceKey) {
|
|
81614
|
+
webSdkStorage.storage.local.setItem(localStoragePersistenceKey, {
|
|
81615
|
+
...config,
|
|
81616
|
+
rowHeight: rowHeightRef.current,
|
|
81617
|
+
serverFilters: filterStorage.filtersState
|
|
81618
|
+
});
|
|
81619
|
+
}
|
|
81620
|
+
onTableConfigChange?.({
|
|
81555
81621
|
...config,
|
|
81556
81622
|
rowHeight: rowHeightRef.current,
|
|
81557
81623
|
serverFilters: filterStorage.filtersState
|
|
81558
81624
|
});
|
|
81559
81625
|
}
|
|
81560
|
-
}, [
|
|
81626
|
+
}, [
|
|
81627
|
+
gridApi,
|
|
81628
|
+
columnApi,
|
|
81629
|
+
onTableConfigChange,
|
|
81630
|
+
filterStorage.filtersState,
|
|
81631
|
+
localStoragePersistenceKey
|
|
81632
|
+
]);
|
|
81561
81633
|
const filtersRef = React83.useRef(filterStorage.selectedFilters);
|
|
81562
81634
|
if (!_isEqual__default.default(filtersRef.current, filterStorage.selectedFilters)) {
|
|
81563
81635
|
filtersRef.current = filterStorage.selectedFilters;
|
|
@@ -81900,10 +81972,14 @@ var Table = (props) => {
|
|
|
81900
81972
|
suppressMovable: true,
|
|
81901
81973
|
suppressSizeToFit: true,
|
|
81902
81974
|
suppressMenu: true,
|
|
81903
|
-
width: rowActionsWidth.current,
|
|
81904
|
-
minWidth: rowActionsWidth.current,
|
|
81975
|
+
width: suppressColumnVirtualisation ? 0 : rowActionsWidth.current,
|
|
81976
|
+
minWidth: suppressColumnVirtualisation ? 0 : rowActionsWidth.current,
|
|
81905
81977
|
cellStyle: (params) => {
|
|
81906
|
-
|
|
81978
|
+
const actions = getRowActions(
|
|
81979
|
+
params.colDef.cellRendererParams.actions,
|
|
81980
|
+
params
|
|
81981
|
+
);
|
|
81982
|
+
if (params.node.rowPinned === "bottom" || actions.length === 0) {
|
|
81907
81983
|
return {
|
|
81908
81984
|
display: "none"
|
|
81909
81985
|
};
|
|
@@ -82492,6 +82568,7 @@ var Table = (props) => {
|
|
|
82492
82568
|
onSortChanged: onSortEventChanged,
|
|
82493
82569
|
onFilterChanged,
|
|
82494
82570
|
onFirstDataRendered: props.onFirstDataRendered,
|
|
82571
|
+
paginateChildRows: props.paginateChildRows,
|
|
82495
82572
|
pagination: props.pagination,
|
|
82496
82573
|
paginationPageSize: props.paginationPageSize || defaultPaginationPageSize,
|
|
82497
82574
|
popupParent: props.popupParent,
|
|
@@ -82524,18 +82601,14 @@ var Table = (props) => {
|
|
|
82524
82601
|
TablePagination,
|
|
82525
82602
|
{
|
|
82526
82603
|
gridApi,
|
|
82527
|
-
|
|
82528
|
-
pageSize: props.paginationPageSize,
|
|
82529
|
-
totalRowCount: internalTableContext.totalRowCount
|
|
82604
|
+
pageSize: props.paginationPageSize
|
|
82530
82605
|
}
|
|
82531
82606
|
)
|
|
82532
82607
|
);
|
|
82533
82608
|
};
|
|
82534
82609
|
var TablePagination = ({
|
|
82535
82610
|
gridApi,
|
|
82536
|
-
|
|
82537
|
-
pageSize,
|
|
82538
|
-
totalRowCount
|
|
82611
|
+
pageSize
|
|
82539
82612
|
}) => {
|
|
82540
82613
|
const [pagination, setPagination] = React83__default.default.useState({
|
|
82541
82614
|
page: 0,
|
|
@@ -82564,7 +82637,7 @@ var TablePagination = ({
|
|
|
82564
82637
|
{
|
|
82565
82638
|
activePage: pagination.page + 1,
|
|
82566
82639
|
"data-qa": "data-table-pagination",
|
|
82567
|
-
items:
|
|
82640
|
+
items: pagination.items,
|
|
82568
82641
|
onSelectPage: (_page) => {
|
|
82569
82642
|
gridApi?.paginationGoToPage(_page - 1);
|
|
82570
82643
|
},
|
|
@@ -82640,7 +82713,8 @@ var ClientSideDataTable = ({
|
|
|
82640
82713
|
onBulkEditUpdate,
|
|
82641
82714
|
onTableConfigChange,
|
|
82642
82715
|
translations: translations2 = {},
|
|
82643
|
-
enableCellTextSelection
|
|
82716
|
+
enableCellTextSelection,
|
|
82717
|
+
localStoragePersistenceKey
|
|
82644
82718
|
}) => {
|
|
82645
82719
|
return /* @__PURE__ */ React83__default.default.createElement(
|
|
82646
82720
|
DataTable,
|
|
@@ -82656,6 +82730,7 @@ var ClientSideDataTable = ({
|
|
|
82656
82730
|
onBulkEditUpdate,
|
|
82657
82731
|
showExpandCollapseAllToggle: true,
|
|
82658
82732
|
translations: translations2,
|
|
82733
|
+
localStoragePersistenceKey,
|
|
82659
82734
|
customBulkEditorFields,
|
|
82660
82735
|
enableCellTextSelection
|
|
82661
82736
|
},
|
|
@@ -87136,8 +87211,8 @@ var FilterListener = class FilterListener2 extends BeanStub {
|
|
|
87136
87211
|
Object.keys(allColKeysMap).forEach((key) => {
|
|
87137
87212
|
const oldJson = JSON.stringify(oldModel[key]);
|
|
87138
87213
|
const newJson = JSON.stringify(newModel[key]);
|
|
87139
|
-
const
|
|
87140
|
-
if (
|
|
87214
|
+
const filterChanged2 = oldJson != newJson;
|
|
87215
|
+
if (filterChanged2) {
|
|
87141
87216
|
res.push(key);
|
|
87142
87217
|
}
|
|
87143
87218
|
});
|
|
@@ -88048,7 +88123,8 @@ var ServerSideDataTable = ({
|
|
|
88048
88123
|
onTableConfigChange,
|
|
88049
88124
|
enableCellTextSelection,
|
|
88050
88125
|
showExpandCollapseAllToggle,
|
|
88051
|
-
translations: translations2 = {}
|
|
88126
|
+
translations: translations2 = {},
|
|
88127
|
+
localStoragePersistenceKey
|
|
88052
88128
|
}) => {
|
|
88053
88129
|
return /* @__PURE__ */ React83__default.default.createElement(
|
|
88054
88130
|
DataTable,
|
|
@@ -88066,7 +88142,8 @@ var ServerSideDataTable = ({
|
|
|
88066
88142
|
showExpandCollapseAllToggle,
|
|
88067
88143
|
translations: translations2,
|
|
88068
88144
|
customBulkEditorFields,
|
|
88069
|
-
enableCellTextSelection
|
|
88145
|
+
enableCellTextSelection,
|
|
88146
|
+
localStoragePersistenceKey
|
|
88070
88147
|
},
|
|
88071
88148
|
children
|
|
88072
88149
|
);
|
package/dist/modern/index.d.cts
CHANGED
|
@@ -955,11 +955,12 @@ interface TableProps<TRow = any, TBottomRow = any> {
|
|
|
955
955
|
onTableReady?: (tableApi: TableApi, tableApiRef: React.RefObject<TableApi>) => void;
|
|
956
956
|
onColumnEverythingChanged?: (changeEvent: ColumnEverythingChangedEvent) => void;
|
|
957
957
|
onFirstDataRendered?: (event: FirstDataRenderedEvent) => void;
|
|
958
|
+
paginateChildRows?: boolean;
|
|
958
959
|
pagination?: boolean;
|
|
959
960
|
paginationPageSize?: number;
|
|
960
961
|
pinnedBottomRowData?: TBottomRow[];
|
|
961
962
|
popupParent?: HTMLElement;
|
|
962
|
-
rowActions?: React.FunctionComponent<any>[];
|
|
963
|
+
rowActions?: React.FunctionComponent<any>[] | ((rowProps: DataTableCellRendererProps) => React.FunctionComponent<any>[]);
|
|
963
964
|
/**
|
|
964
965
|
* @private
|
|
965
966
|
* Unsafe to use.
|
|
@@ -1087,6 +1088,7 @@ interface DataTableProps {
|
|
|
1087
1088
|
* the updated values
|
|
1088
1089
|
*/
|
|
1089
1090
|
onBulkEditUpdate?: (rows: BulkEditResult[]) => Promise<void>;
|
|
1091
|
+
localStoragePersistenceKey?: string;
|
|
1090
1092
|
showExpandCollapseAllToggle?: boolean;
|
|
1091
1093
|
translations?: DataTableTranslations;
|
|
1092
1094
|
enableCellTextSelection?: boolean;
|
|
@@ -1335,7 +1337,7 @@ interface BulkActionProps {
|
|
|
1335
1337
|
style?: React__default.CSSProperties;
|
|
1336
1338
|
}
|
|
1337
1339
|
|
|
1338
|
-
declare const _default$1: (({ analytics, children, columnDefinitions: _columnDefinitions, customBulkEditorFields, enableDynamicRowHeight, enableGroupEditAndValidation, filterGroups, getRowId, initialTableConfig: _initialTableConfig, onBulkEditUpdate, onTableConfigChange, translations, enableCellTextSelection, }: React__default.PropsWithChildren<ClientSideDataTableProps>) => React__default.JSX.Element) & {
|
|
1340
|
+
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) & {
|
|
1339
1341
|
BulkActions: React__default.FunctionComponent<React__default.PropsWithChildren<BulkActionProps>>;
|
|
1340
1342
|
BulkEditActionButton: React__default.FunctionComponent<ActionButtonProps>;
|
|
1341
1343
|
ConfigPanelButton: React__default.FC<{}>;
|
|
@@ -1372,7 +1374,7 @@ declare const MultiSelectQuickFilterRenderer: (props: FilterProps<any[]>) => Rea
|
|
|
1372
1374
|
|
|
1373
1375
|
declare const SingleSelectQuickFilterRenderer: (props: FilterProps<any[]>) => React__default.JSX.Element;
|
|
1374
1376
|
|
|
1375
|
-
declare const _default: (({ analytics, children, columnDefinitions: _columnDefinitions, customBulkEditorFields, enableDynamicRowHeight, enableGroupEditAndValidation, filterGroups, getRowId, initialTableConfig: _initialTableConfig, onBulkEditUpdate, onServerSideDataRequest, onTableConfigChange, enableCellTextSelection, showExpandCollapseAllToggle, translations, }: React__default.PropsWithChildren<DataTableProps>) => React__default.JSX.Element) & {
|
|
1377
|
+
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) & {
|
|
1376
1378
|
BulkActions: React__default.FunctionComponent<React__default.PropsWithChildren<BulkActionProps>>;
|
|
1377
1379
|
BulkEditActionButton: React__default.FunctionComponent<ActionButtonProps>;
|
|
1378
1380
|
ConfigPanelButton: React__default.FC<{}>;
|
package/dist/modern/index.d.ts
CHANGED
|
@@ -955,11 +955,12 @@ interface TableProps<TRow = any, TBottomRow = any> {
|
|
|
955
955
|
onTableReady?: (tableApi: TableApi, tableApiRef: React.RefObject<TableApi>) => void;
|
|
956
956
|
onColumnEverythingChanged?: (changeEvent: ColumnEverythingChangedEvent) => void;
|
|
957
957
|
onFirstDataRendered?: (event: FirstDataRenderedEvent) => void;
|
|
958
|
+
paginateChildRows?: boolean;
|
|
958
959
|
pagination?: boolean;
|
|
959
960
|
paginationPageSize?: number;
|
|
960
961
|
pinnedBottomRowData?: TBottomRow[];
|
|
961
962
|
popupParent?: HTMLElement;
|
|
962
|
-
rowActions?: React.FunctionComponent<any>[];
|
|
963
|
+
rowActions?: React.FunctionComponent<any>[] | ((rowProps: DataTableCellRendererProps) => React.FunctionComponent<any>[]);
|
|
963
964
|
/**
|
|
964
965
|
* @private
|
|
965
966
|
* Unsafe to use.
|
|
@@ -1087,6 +1088,7 @@ interface DataTableProps {
|
|
|
1087
1088
|
* the updated values
|
|
1088
1089
|
*/
|
|
1089
1090
|
onBulkEditUpdate?: (rows: BulkEditResult[]) => Promise<void>;
|
|
1091
|
+
localStoragePersistenceKey?: string;
|
|
1090
1092
|
showExpandCollapseAllToggle?: boolean;
|
|
1091
1093
|
translations?: DataTableTranslations;
|
|
1092
1094
|
enableCellTextSelection?: boolean;
|
|
@@ -1335,7 +1337,7 @@ interface BulkActionProps {
|
|
|
1335
1337
|
style?: React__default.CSSProperties;
|
|
1336
1338
|
}
|
|
1337
1339
|
|
|
1338
|
-
declare const _default$1: (({ analytics, children, columnDefinitions: _columnDefinitions, customBulkEditorFields, enableDynamicRowHeight, enableGroupEditAndValidation, filterGroups, getRowId, initialTableConfig: _initialTableConfig, onBulkEditUpdate, onTableConfigChange, translations, enableCellTextSelection, }: React__default.PropsWithChildren<ClientSideDataTableProps>) => React__default.JSX.Element) & {
|
|
1340
|
+
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) & {
|
|
1339
1341
|
BulkActions: React__default.FunctionComponent<React__default.PropsWithChildren<BulkActionProps>>;
|
|
1340
1342
|
BulkEditActionButton: React__default.FunctionComponent<ActionButtonProps>;
|
|
1341
1343
|
ConfigPanelButton: React__default.FC<{}>;
|
|
@@ -1372,7 +1374,7 @@ declare const MultiSelectQuickFilterRenderer: (props: FilterProps<any[]>) => Rea
|
|
|
1372
1374
|
|
|
1373
1375
|
declare const SingleSelectQuickFilterRenderer: (props: FilterProps<any[]>) => React__default.JSX.Element;
|
|
1374
1376
|
|
|
1375
|
-
declare const _default: (({ analytics, children, columnDefinitions: _columnDefinitions, customBulkEditorFields, enableDynamicRowHeight, enableGroupEditAndValidation, filterGroups, getRowId, initialTableConfig: _initialTableConfig, onBulkEditUpdate, onServerSideDataRequest, onTableConfigChange, enableCellTextSelection, showExpandCollapseAllToggle, translations, }: React__default.PropsWithChildren<DataTableProps>) => React__default.JSX.Element) & {
|
|
1377
|
+
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) & {
|
|
1376
1378
|
BulkActions: React__default.FunctionComponent<React__default.PropsWithChildren<BulkActionProps>>;
|
|
1377
1379
|
BulkEditActionButton: React__default.FunctionComponent<ActionButtonProps>;
|
|
1378
1380
|
ConfigPanelButton: React__default.FC<{}>;
|