@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.js
CHANGED
|
@@ -11,6 +11,7 @@ import { detectPrng, factory } from 'ulid';
|
|
|
11
11
|
import { useToastAlertContext, ToastAlertProvider } from '@procore/toast-alert';
|
|
12
12
|
import ReactDOM, { createPortal } from 'react-dom';
|
|
13
13
|
import { renderToString, renderToStaticMarkup } from 'react-dom/server';
|
|
14
|
+
import { storage } from '@procore/web-sdk-storage';
|
|
14
15
|
import _isEqual from 'lodash.isequal';
|
|
15
16
|
import ReactResizeDetector from 'react-resize-detector';
|
|
16
17
|
import { DateTimeSelectField } from '@procore/labs-datetime-select';
|
|
@@ -1403,7 +1404,7 @@ ag-grid, ag-grid-angular, ag-grid-ng2, ag-grid-polymer, ag-grid-aurelia {
|
|
|
1403
1404
|
animation-iteration-count: infinite;
|
|
1404
1405
|
animation-name: ag-shake-left-to-right;
|
|
1405
1406
|
}
|
|
1406
|
-
@keyframes _ag-shake-left-to-
|
|
1407
|
+
@keyframes _ag-shake-left-to-right_7x7l9_366 {
|
|
1407
1408
|
from {
|
|
1408
1409
|
padding-left: 6px;
|
|
1409
1410
|
padding-right: 2px;
|
|
@@ -5404,7 +5405,7 @@ input[class^=ag-][type=button]:focus, button[class^=ag-]:focus {
|
|
|
5404
5405
|
animation-iteration-count: infinite;
|
|
5405
5406
|
animation-timing-function: linear;
|
|
5406
5407
|
}
|
|
5407
|
-
@keyframes
|
|
5408
|
+
@keyframes _spin_7x7l9_1 {
|
|
5408
5409
|
from {
|
|
5409
5410
|
transform: rotate(0deg);
|
|
5410
5411
|
}
|
|
@@ -7525,6 +7526,18 @@ input[class^=ag-][type=range]:disabled {
|
|
|
7525
7526
|
box-shadow: 0px -6px 12px -3px hsla(200, 8%, 10%, 0.25);
|
|
7526
7527
|
z-index: 2;
|
|
7527
7528
|
}
|
|
7529
|
+
.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 {
|
|
7530
|
+
background-color: #f4f5f6;
|
|
7531
|
+
}
|
|
7532
|
+
.ag-theme-alpine.ag-theme-alpine .ag-floating-bottom .ag-pinned-left-floating-bottom {
|
|
7533
|
+
z-index: 1;
|
|
7534
|
+
box-shadow: 3px 0px 12px 0.5px hsl(200, 8%, 90%);
|
|
7535
|
+
border-right: 1px solid #d6dadc;
|
|
7536
|
+
}
|
|
7537
|
+
.ag-theme-alpine.ag-theme-alpine .ag-floating-bottom .ag-pinned-right-floating-bottom {
|
|
7538
|
+
box-shadow: -3px 0px 12px 0.5px hsl(200, 8%, 90%);
|
|
7539
|
+
border-left: 1px solid #d6dadc;
|
|
7540
|
+
}
|
|
7528
7541
|
.ag-theme-alpine.ag-theme-alpine .ag-group-value {
|
|
7529
7542
|
line-height: 16px;
|
|
7530
7543
|
}
|
|
@@ -7891,7 +7904,7 @@ input[class^=ag-][type=range]:disabled {
|
|
|
7891
7904
|
padding-left: 16px;
|
|
7892
7905
|
}
|
|
7893
7906
|
|
|
7894
|
-
div.
|
|
7907
|
+
div._contextPanel_7x7l9_7144 {
|
|
7895
7908
|
width: 400px;
|
|
7896
7909
|
transition: all ease 500ms;
|
|
7897
7910
|
flex: 0 0 auto;
|
|
@@ -7900,7 +7913,7 @@ div._contextPanel_10eap_7131 {
|
|
|
7900
7913
|
border: 1px solid #d6dadc;
|
|
7901
7914
|
display: flex;
|
|
7902
7915
|
}
|
|
7903
|
-
div._contextPanel--
|
|
7916
|
+
div._contextPanel--hidden_7x7l9_7153 {
|
|
7904
7917
|
border: none;
|
|
7905
7918
|
overflow: hidden;
|
|
7906
7919
|
padding: 0px;
|
|
@@ -7908,50 +7921,50 @@ div._contextPanel--hidden_10eap_7140 {
|
|
|
7908
7921
|
width: 0px;
|
|
7909
7922
|
}
|
|
7910
7923
|
|
|
7911
|
-
.
|
|
7924
|
+
._contextPanelWrapper_7x7l9_7161 {
|
|
7912
7925
|
position: relative;
|
|
7913
7926
|
flex-grow: 1;
|
|
7914
7927
|
}
|
|
7915
7928
|
|
|
7916
|
-
.
|
|
7929
|
+
._contextPanelBody_7x7l9_7166 {
|
|
7917
7930
|
width: clamp(380px, 400px, 100%);
|
|
7918
7931
|
}
|
|
7919
7932
|
|
|
7920
|
-
._contextPanel-
|
|
7933
|
+
._contextPanel-stickyHeader_7x7l9_7170 {
|
|
7921
7934
|
background-color: #ffffff;
|
|
7922
7935
|
position: sticky;
|
|
7923
7936
|
top: 0;
|
|
7924
7937
|
z-index: 5;
|
|
7925
7938
|
}
|
|
7926
7939
|
|
|
7927
|
-
._filters-
|
|
7940
|
+
._filters-list_7x7l9_7177 {
|
|
7928
7941
|
padding: 0;
|
|
7929
7942
|
margin: 0;
|
|
7930
7943
|
}
|
|
7931
|
-
._filters-
|
|
7944
|
+
._filters-list_7x7l9_7177 ol {
|
|
7932
7945
|
padding: 0;
|
|
7933
7946
|
margin: 0;
|
|
7934
7947
|
}
|
|
7935
7948
|
|
|
7936
|
-
._col-drag-column-
|
|
7949
|
+
._col-drag-column-icon_7x7l9_7186 {
|
|
7937
7950
|
color: #6a767c;
|
|
7938
7951
|
}
|
|
7939
7952
|
|
|
7940
|
-
._tabular-
|
|
7953
|
+
._tabular-nums_7x7l9_7190 {
|
|
7941
7954
|
font-variant-numeric: tabular-nums;
|
|
7942
7955
|
}`;
|
|
7943
7956
|
document.head.appendChild(document.createElement("style")).appendChild(document.createTextNode(css));
|
|
7944
7957
|
var styles_default = {
|
|
7945
|
-
"contextPanel": "
|
|
7946
|
-
"contextPanel--hidden": "_contextPanel--
|
|
7947
|
-
"contextPanelWrapper": "
|
|
7948
|
-
"contextPanelBody": "
|
|
7949
|
-
"contextPanel-stickyHeader": "_contextPanel-
|
|
7950
|
-
"filters-list": "_filters-
|
|
7951
|
-
"col-drag-column-icon": "_col-drag-column-
|
|
7952
|
-
"tabular-nums": "_tabular-
|
|
7953
|
-
"ag-shake-left-to-right": "_ag-shake-left-to-
|
|
7954
|
-
"spin": "
|
|
7958
|
+
"contextPanel": "_contextPanel_7x7l9_7144",
|
|
7959
|
+
"contextPanel--hidden": "_contextPanel--hidden_7x7l9_7153",
|
|
7960
|
+
"contextPanelWrapper": "_contextPanelWrapper_7x7l9_7161",
|
|
7961
|
+
"contextPanelBody": "_contextPanelBody_7x7l9_7166",
|
|
7962
|
+
"contextPanel-stickyHeader": "_contextPanel-stickyHeader_7x7l9_7170",
|
|
7963
|
+
"filters-list": "_filters-list_7x7l9_7177",
|
|
7964
|
+
"col-drag-column-icon": "_col-drag-column-icon_7x7l9_7186",
|
|
7965
|
+
"tabular-nums": "_tabular-nums_7x7l9_7190",
|
|
7966
|
+
"ag-shake-left-to-right": "_ag-shake-left-to-right_7x7l9_366",
|
|
7967
|
+
"spin": "_spin_7x7l9_1"
|
|
7955
7968
|
};
|
|
7956
7969
|
|
|
7957
7970
|
// src/utils/getCellValueTypographyProps.ts
|
|
@@ -55156,6 +55169,16 @@ function getParentSelectionState(parent, affectedRows, parentChildrenMap) {
|
|
|
55156
55169
|
return rowSelectionState.indeterminate;
|
|
55157
55170
|
}
|
|
55158
55171
|
}
|
|
55172
|
+
function getNodeSelectedState(node) {
|
|
55173
|
+
const filteredChildren = node.childrenAfterFilter || [];
|
|
55174
|
+
const numSelectedChildren = filteredChildren.filter(
|
|
55175
|
+
(child) => child.isSelected()
|
|
55176
|
+
).length;
|
|
55177
|
+
return {
|
|
55178
|
+
selected: filteredChildren.length > 0 ? numSelectedChildren > 0 : node.isSelected(),
|
|
55179
|
+
indeterminate: filteredChildren ? numSelectedChildren > 0 && filteredChildren.length !== numSelectedChildren : false
|
|
55180
|
+
};
|
|
55181
|
+
}
|
|
55159
55182
|
function getAffectedRows(currentRows, selectionNode, affectedRows) {
|
|
55160
55183
|
const isNodeRootLevel = isNodeRootLevelOfGrid(selectionNode.parent);
|
|
55161
55184
|
const nodeId = selectionNode.id;
|
|
@@ -55235,12 +55258,8 @@ function getAffectedRows(currentRows, selectionNode, affectedRows) {
|
|
|
55235
55258
|
function noop2() {
|
|
55236
55259
|
}
|
|
55237
55260
|
function ClientSideRowCheckbox(props) {
|
|
55238
|
-
const [
|
|
55239
|
-
const
|
|
55240
|
-
(child) => child.isSelected()
|
|
55241
|
-
).length;
|
|
55242
|
-
const selectedState = props.node.childrenAfterGroup ? numSelectedChildren > 0 : props.node.isSelected();
|
|
55243
|
-
const indeterminateState = props.node.childrenAfterGroup ? numSelectedChildren > 0 && props.node.childrenAfterGroup?.length !== numSelectedChildren : false;
|
|
55261
|
+
const [_selected, setSelected] = useState(props.node.isSelected());
|
|
55262
|
+
const { selected, indeterminate } = getNodeSelectedState(props.node);
|
|
55244
55263
|
function handleRowSelection(event) {
|
|
55245
55264
|
if (props.node === event.node) {
|
|
55246
55265
|
setSelected(event.node.isSelected());
|
|
@@ -55255,13 +55274,18 @@ function ClientSideRowCheckbox(props) {
|
|
|
55255
55274
|
return /* @__PURE__ */ React83.createElement(Box, { paddingRight: "md" }, /* @__PURE__ */ React83.createElement(
|
|
55256
55275
|
Checkbox,
|
|
55257
55276
|
{
|
|
55258
|
-
checked:
|
|
55277
|
+
checked: selected,
|
|
55259
55278
|
disabled: props.data?.checkboxDisabled,
|
|
55260
|
-
indeterminate
|
|
55279
|
+
indeterminate,
|
|
55261
55280
|
"data-qa": "rowCheckbox",
|
|
55262
55281
|
onClick: noop2,
|
|
55263
|
-
onChange: () => {
|
|
55264
|
-
props.node.
|
|
55282
|
+
onChange: (event) => {
|
|
55283
|
+
return props.node.setSelectedParams({
|
|
55284
|
+
newValue: event.target.checked,
|
|
55285
|
+
groupSelectsFiltered: true,
|
|
55286
|
+
event,
|
|
55287
|
+
source: "checkboxSelected"
|
|
55288
|
+
});
|
|
55265
55289
|
}
|
|
55266
55290
|
}
|
|
55267
55291
|
));
|
|
@@ -55423,23 +55447,33 @@ var AutoGroupCellRenderer = (props) => {
|
|
|
55423
55447
|
};
|
|
55424
55448
|
|
|
55425
55449
|
// src/CellRenderers/rowActionsCellStyles.scss
|
|
55426
|
-
var css6 =
|
|
55427
|
-
left:
|
|
55428
|
-
|
|
55450
|
+
var css6 = `.ag-theme-alpine.ag-theme-alpine div.ag-cell[col-id=rowActions] {
|
|
55451
|
+
left: var(--viewport-width) !important;
|
|
55452
|
+
width: 0px !important;
|
|
55453
|
+
padding: 0px !important;
|
|
55429
55454
|
position: sticky;
|
|
55430
55455
|
visibility: hidden;
|
|
55431
55456
|
flex: none;
|
|
55457
|
+
background: none;
|
|
55458
|
+
overflow: visible;
|
|
55432
55459
|
}
|
|
55433
|
-
.ag-
|
|
55460
|
+
.ag-theme-alpine.ag-theme-alpine div.ag-cell[col-id=rowActions] .inline-nonedit-wrapper {
|
|
55461
|
+
width: auto;
|
|
55462
|
+
height: 100%;
|
|
55463
|
+
padding: 0px 8px;
|
|
55464
|
+
position: absolute;
|
|
55465
|
+
right: 0px;
|
|
55466
|
+
}
|
|
55467
|
+
.ag-theme-alpine.ag-theme-alpine .ag-row-hover div.ag-cell[col-id=rowActions] .inline-nonedit-wrapper {
|
|
55434
55468
|
background: #f4f5f6;
|
|
55435
55469
|
}
|
|
55436
|
-
.ag-row-focus div[col-id=rowActions] {
|
|
55470
|
+
.ag-theme-alpine.ag-theme-alpine .ag-row-focus div.ag-cell[col-id=rowActions] .inline-nonedit-wrapper {
|
|
55437
55471
|
background: #f6f9fe;
|
|
55438
55472
|
}
|
|
55439
|
-
.ag-row-hover
|
|
55473
|
+
.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] {
|
|
55440
55474
|
visibility: visible;
|
|
55441
55475
|
}
|
|
55442
|
-
|
|
55476
|
+
.ag-theme-alpine.ag-theme-alpine .ag-cell[col-id=rowActions-pinned] {
|
|
55443
55477
|
background: "transparent";
|
|
55444
55478
|
left: calc(var(--viewport-width) - var(--rowActions-width)) !important;
|
|
55445
55479
|
padding: 2px 8px !important;
|
|
@@ -55448,8 +55482,18 @@ div[col-id=rowActions-pinned] {
|
|
|
55448
55482
|
document.head.appendChild(document.createElement("style")).appendChild(document.createTextNode(css6));
|
|
55449
55483
|
|
|
55450
55484
|
// src/CellRenderers/RowActionsCell.tsx
|
|
55485
|
+
function getRowActions(actions, rowProps) {
|
|
55486
|
+
if (typeof actions === "function") {
|
|
55487
|
+
return actions(rowProps);
|
|
55488
|
+
}
|
|
55489
|
+
return actions;
|
|
55490
|
+
}
|
|
55451
55491
|
var InternalRowActionsCellRenderer = (props) => {
|
|
55452
|
-
|
|
55492
|
+
const actions = getRowActions(
|
|
55493
|
+
props.columnDefinition.cellRendererParams.actions,
|
|
55494
|
+
props
|
|
55495
|
+
);
|
|
55496
|
+
if (props.rowPinned || props.columnDefinition.cellRendererParams.hideActionsOnGroupedRow && props.isGroup || actions.length === 0) {
|
|
55453
55497
|
return null;
|
|
55454
55498
|
}
|
|
55455
55499
|
return /* @__PURE__ */ React83.createElement(
|
|
@@ -55460,7 +55504,7 @@ var InternalRowActionsCellRenderer = (props) => {
|
|
|
55460
55504
|
size: "xs",
|
|
55461
55505
|
margin: "0px 4px"
|
|
55462
55506
|
},
|
|
55463
|
-
|
|
55507
|
+
actions.map((Action, idx) => {
|
|
55464
55508
|
const key = `${Action.displayName}${idx}`;
|
|
55465
55509
|
return /* @__PURE__ */ React83.createElement(Action, { ...props, key });
|
|
55466
55510
|
})
|
|
@@ -56112,6 +56156,7 @@ var css7 = `.ag-header-cell .data-table-header-menu {
|
|
|
56112
56156
|
document.head.appendChild(document.createElement("style")).appendChild(document.createTextNode(css7));
|
|
56113
56157
|
|
|
56114
56158
|
// src/GenericHeader/GenericHeader.tsx
|
|
56159
|
+
var filterChanged = "filterChanged";
|
|
56115
56160
|
var selectionChanged = "selectionChanged";
|
|
56116
56161
|
var paginationChanged = "paginationChanged";
|
|
56117
56162
|
var tooltipDelay = {
|
|
@@ -56413,7 +56458,7 @@ var GenericHeaderRenderer = (props) => {
|
|
|
56413
56458
|
if (node.selectable === false) {
|
|
56414
56459
|
return;
|
|
56415
56460
|
}
|
|
56416
|
-
if (node.
|
|
56461
|
+
if (getNodeSelectedState(node).selected) {
|
|
56417
56462
|
hasSelectedNodes = true;
|
|
56418
56463
|
} else {
|
|
56419
56464
|
isAllSelected = false;
|
|
@@ -56427,9 +56472,11 @@ var GenericHeaderRenderer = (props) => {
|
|
|
56427
56472
|
setSelectAll("none" /* None */);
|
|
56428
56473
|
}
|
|
56429
56474
|
}
|
|
56475
|
+
props.api.addEventListener(filterChanged, onSelectionChanged);
|
|
56430
56476
|
props.api.addEventListener(selectionChanged, onSelectionChanged);
|
|
56431
56477
|
onSelectionChanged();
|
|
56432
56478
|
return () => {
|
|
56479
|
+
removeEventListenerFromGrid(filterChanged, onSelectionChanged, props.api);
|
|
56433
56480
|
removeEventListenerFromGrid(
|
|
56434
56481
|
selectionChanged,
|
|
56435
56482
|
onSelectionChanged,
|
|
@@ -80964,9 +81011,20 @@ var useTableApi = ({
|
|
|
80964
81011
|
message
|
|
80965
81012
|
});
|
|
80966
81013
|
}, []);
|
|
81014
|
+
function getUnviewableGroupedColumns(columnApi2) {
|
|
81015
|
+
return (columnApi2?.getRowGroupColumns() ?? []).filter((column2) => {
|
|
81016
|
+
const colDef = column2.getColDef();
|
|
81017
|
+
return colDef.lockVisible && colDef.hide;
|
|
81018
|
+
}).map((column2) => column2.getColId());
|
|
81019
|
+
}
|
|
80967
81020
|
const setRowGrouping = React83.useCallback(
|
|
80968
81021
|
(value) => {
|
|
81022
|
+
const unviewableGroupedColumns = getUnviewableGroupedColumns(columnApi);
|
|
80969
81023
|
columnApi?.setRowGroupColumns(value);
|
|
81024
|
+
const recentlyUngroupedUnviewableColumns = unviewableGroupedColumns.filter((colId) => !value.includes(colId));
|
|
81025
|
+
if (recentlyUngroupedUnviewableColumns.length > 0) {
|
|
81026
|
+
columnApi?.setColumnsVisible(recentlyUngroupedUnviewableColumns, false);
|
|
81027
|
+
}
|
|
80970
81028
|
resetPagination();
|
|
80971
81029
|
},
|
|
80972
81030
|
[columnApi]
|
|
@@ -81436,15 +81494,16 @@ var DataTable = ({
|
|
|
81436
81494
|
onTableConfigChange,
|
|
81437
81495
|
showExpandCollapseAllToggle,
|
|
81438
81496
|
translations: translations2 = {},
|
|
81439
|
-
enableCellTextSelection
|
|
81497
|
+
enableCellTextSelection,
|
|
81498
|
+
localStoragePersistenceKey
|
|
81440
81499
|
}) => {
|
|
81441
|
-
const
|
|
81500
|
+
const initialTableConfig = localStoragePersistenceKey && storage.local.getItem(localStoragePersistenceKey) || _initialTableConfig;
|
|
81442
81501
|
const onServerSideDataRequestRef = React83.useRef(onServerSideDataRequest);
|
|
81443
81502
|
const tableRef = React83.useRef(null);
|
|
81444
81503
|
const [totalRowCount, setTotalRowCount] = React83.useState(0);
|
|
81445
81504
|
const [selectedGroupIndex, setSelectedGroupIndex] = React83.useState(null);
|
|
81446
81505
|
const [initialConfigSet, setInitialConfigSet] = React83.useState(
|
|
81447
|
-
!
|
|
81506
|
+
!initialTableConfig
|
|
81448
81507
|
);
|
|
81449
81508
|
const contextPanel = useContextPanel();
|
|
81450
81509
|
const clientI18n = useI18nContext();
|
|
@@ -81532,18 +81591,31 @@ var DataTable = ({
|
|
|
81532
81591
|
});
|
|
81533
81592
|
checkboxColumn.current = newCheckboxColumn;
|
|
81534
81593
|
}
|
|
81535
|
-
if (!gridApi || !columnApi
|
|
81594
|
+
if (!gridApi || !columnApi) {
|
|
81536
81595
|
return;
|
|
81537
81596
|
}
|
|
81538
81597
|
const config = tableRef?.current?.getTableConfiguration();
|
|
81539
81598
|
if (config) {
|
|
81540
|
-
|
|
81599
|
+
if (localStoragePersistenceKey) {
|
|
81600
|
+
storage.local.setItem(localStoragePersistenceKey, {
|
|
81601
|
+
...config,
|
|
81602
|
+
rowHeight: rowHeightRef.current,
|
|
81603
|
+
serverFilters: filterStorage.filtersState
|
|
81604
|
+
});
|
|
81605
|
+
}
|
|
81606
|
+
onTableConfigChange?.({
|
|
81541
81607
|
...config,
|
|
81542
81608
|
rowHeight: rowHeightRef.current,
|
|
81543
81609
|
serverFilters: filterStorage.filtersState
|
|
81544
81610
|
});
|
|
81545
81611
|
}
|
|
81546
|
-
}, [
|
|
81612
|
+
}, [
|
|
81613
|
+
gridApi,
|
|
81614
|
+
columnApi,
|
|
81615
|
+
onTableConfigChange,
|
|
81616
|
+
filterStorage.filtersState,
|
|
81617
|
+
localStoragePersistenceKey
|
|
81618
|
+
]);
|
|
81547
81619
|
const filtersRef = useRef(filterStorage.selectedFilters);
|
|
81548
81620
|
if (!_isEqual(filtersRef.current, filterStorage.selectedFilters)) {
|
|
81549
81621
|
filtersRef.current = filterStorage.selectedFilters;
|
|
@@ -81886,10 +81958,14 @@ var Table = (props) => {
|
|
|
81886
81958
|
suppressMovable: true,
|
|
81887
81959
|
suppressSizeToFit: true,
|
|
81888
81960
|
suppressMenu: true,
|
|
81889
|
-
width: rowActionsWidth.current,
|
|
81890
|
-
minWidth: rowActionsWidth.current,
|
|
81961
|
+
width: suppressColumnVirtualisation ? 0 : rowActionsWidth.current,
|
|
81962
|
+
minWidth: suppressColumnVirtualisation ? 0 : rowActionsWidth.current,
|
|
81891
81963
|
cellStyle: (params) => {
|
|
81892
|
-
|
|
81964
|
+
const actions = getRowActions(
|
|
81965
|
+
params.colDef.cellRendererParams.actions,
|
|
81966
|
+
params
|
|
81967
|
+
);
|
|
81968
|
+
if (params.node.rowPinned === "bottom" || actions.length === 0) {
|
|
81893
81969
|
return {
|
|
81894
81970
|
display: "none"
|
|
81895
81971
|
};
|
|
@@ -82478,6 +82554,7 @@ var Table = (props) => {
|
|
|
82478
82554
|
onSortChanged: onSortEventChanged,
|
|
82479
82555
|
onFilterChanged,
|
|
82480
82556
|
onFirstDataRendered: props.onFirstDataRendered,
|
|
82557
|
+
paginateChildRows: props.paginateChildRows,
|
|
82481
82558
|
pagination: props.pagination,
|
|
82482
82559
|
paginationPageSize: props.paginationPageSize || defaultPaginationPageSize,
|
|
82483
82560
|
popupParent: props.popupParent,
|
|
@@ -82510,18 +82587,14 @@ var Table = (props) => {
|
|
|
82510
82587
|
TablePagination,
|
|
82511
82588
|
{
|
|
82512
82589
|
gridApi,
|
|
82513
|
-
|
|
82514
|
-
pageSize: props.paginationPageSize,
|
|
82515
|
-
totalRowCount: internalTableContext.totalRowCount
|
|
82590
|
+
pageSize: props.paginationPageSize
|
|
82516
82591
|
}
|
|
82517
82592
|
)
|
|
82518
82593
|
);
|
|
82519
82594
|
};
|
|
82520
82595
|
var TablePagination = ({
|
|
82521
82596
|
gridApi,
|
|
82522
|
-
|
|
82523
|
-
pageSize,
|
|
82524
|
-
totalRowCount
|
|
82597
|
+
pageSize
|
|
82525
82598
|
}) => {
|
|
82526
82599
|
const [pagination, setPagination] = React83.useState({
|
|
82527
82600
|
page: 0,
|
|
@@ -82550,7 +82623,7 @@ var TablePagination = ({
|
|
|
82550
82623
|
{
|
|
82551
82624
|
activePage: pagination.page + 1,
|
|
82552
82625
|
"data-qa": "data-table-pagination",
|
|
82553
|
-
items:
|
|
82626
|
+
items: pagination.items,
|
|
82554
82627
|
onSelectPage: (_page) => {
|
|
82555
82628
|
gridApi?.paginationGoToPage(_page - 1);
|
|
82556
82629
|
},
|
|
@@ -82626,7 +82699,8 @@ var ClientSideDataTable = ({
|
|
|
82626
82699
|
onBulkEditUpdate,
|
|
82627
82700
|
onTableConfigChange,
|
|
82628
82701
|
translations: translations2 = {},
|
|
82629
|
-
enableCellTextSelection
|
|
82702
|
+
enableCellTextSelection,
|
|
82703
|
+
localStoragePersistenceKey
|
|
82630
82704
|
}) => {
|
|
82631
82705
|
return /* @__PURE__ */ React83.createElement(
|
|
82632
82706
|
DataTable,
|
|
@@ -82642,6 +82716,7 @@ var ClientSideDataTable = ({
|
|
|
82642
82716
|
onBulkEditUpdate,
|
|
82643
82717
|
showExpandCollapseAllToggle: true,
|
|
82644
82718
|
translations: translations2,
|
|
82719
|
+
localStoragePersistenceKey,
|
|
82645
82720
|
customBulkEditorFields,
|
|
82646
82721
|
enableCellTextSelection
|
|
82647
82722
|
},
|
|
@@ -87122,8 +87197,8 @@ var FilterListener = class FilterListener2 extends BeanStub {
|
|
|
87122
87197
|
Object.keys(allColKeysMap).forEach((key) => {
|
|
87123
87198
|
const oldJson = JSON.stringify(oldModel[key]);
|
|
87124
87199
|
const newJson = JSON.stringify(newModel[key]);
|
|
87125
|
-
const
|
|
87126
|
-
if (
|
|
87200
|
+
const filterChanged2 = oldJson != newJson;
|
|
87201
|
+
if (filterChanged2) {
|
|
87127
87202
|
res.push(key);
|
|
87128
87203
|
}
|
|
87129
87204
|
});
|
|
@@ -88034,7 +88109,8 @@ var ServerSideDataTable = ({
|
|
|
88034
88109
|
onTableConfigChange,
|
|
88035
88110
|
enableCellTextSelection,
|
|
88036
88111
|
showExpandCollapseAllToggle,
|
|
88037
|
-
translations: translations2 = {}
|
|
88112
|
+
translations: translations2 = {},
|
|
88113
|
+
localStoragePersistenceKey
|
|
88038
88114
|
}) => {
|
|
88039
88115
|
return /* @__PURE__ */ React83.createElement(
|
|
88040
88116
|
DataTable,
|
|
@@ -88052,7 +88128,8 @@ var ServerSideDataTable = ({
|
|
|
88052
88128
|
showExpandCollapseAllToggle,
|
|
88053
88129
|
translations: translations2,
|
|
88054
88130
|
customBulkEditorFields,
|
|
88055
|
-
enableCellTextSelection
|
|
88131
|
+
enableCellTextSelection,
|
|
88132
|
+
localStoragePersistenceKey
|
|
88056
88133
|
},
|
|
88057
88134
|
children
|
|
88058
88135
|
);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@procore/data-table",
|
|
3
|
-
"version": "14.
|
|
3
|
+
"version": "14.9.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",
|
|
@@ -27,7 +27,7 @@
|
|
|
27
27
|
],
|
|
28
28
|
"scripts": {
|
|
29
29
|
"build": "NODE_ENV=production tsup",
|
|
30
|
-
"chromatic": "
|
|
30
|
+
"chromatic": "dotenvx run -- chromatic",
|
|
31
31
|
"chromatic:ci": "chromatic --ci --storybook-build-dir ./storybook-static --project-token=${CHROMATIC_DATA_TABLE_TOKEN} --exit-once-uploaded --only-changed --skip=\"dependabot*\"",
|
|
32
32
|
"clean": "rimraf dist",
|
|
33
33
|
"cypress:dev:open": "start-server-and-test storybook-static:server http://127.0.0.1:6006 cypress:open",
|
|
@@ -58,7 +58,7 @@
|
|
|
58
58
|
],
|
|
59
59
|
"repository": {
|
|
60
60
|
"type": "git",
|
|
61
|
-
"url": "https://github.com
|
|
61
|
+
"url": "https://github.com/procore/core/",
|
|
62
62
|
"directory": "packages/data-table"
|
|
63
63
|
},
|
|
64
64
|
"author": "Procore Technologies",
|
|
@@ -81,6 +81,7 @@
|
|
|
81
81
|
"@procore/labs-datetime-select": "0.1.0",
|
|
82
82
|
"@procore/labs-group-by-select": "3.1.2",
|
|
83
83
|
"@procore/toast-alert": "5.1.0",
|
|
84
|
+
"@procore/web-sdk-storage": "^0.1.0",
|
|
84
85
|
"classnames": "2.5.1",
|
|
85
86
|
"date-fns": "2.29.1",
|
|
86
87
|
"decimal.js": "10.3.1",
|
|
@@ -104,11 +105,12 @@
|
|
|
104
105
|
"@ag-grid-enterprise/server-side-row-model": "30.1.0",
|
|
105
106
|
"@ag-grid-enterprise/set-filter": "30.1.0",
|
|
106
107
|
"@babel/eslint-parser": "7.21.3",
|
|
108
|
+
"@dotenvx/dotenvx": "1.6.4",
|
|
107
109
|
"@ngneat/falso": "6.4.0",
|
|
108
110
|
"@procore/core-css": "10.17.0",
|
|
109
|
-
"@procore/core-icons": "12.
|
|
111
|
+
"@procore/core-icons": "12.1.0",
|
|
110
112
|
"@procore/core-prettier": "10.2.0",
|
|
111
|
-
"@procore/core-react": "12.
|
|
113
|
+
"@procore/core-react": "12.7.0",
|
|
112
114
|
"@procore/eslint-config": "10.0.0",
|
|
113
115
|
"@procore/globalization-toolkit": "3.1.0",
|
|
114
116
|
"@procore/labs-financials-utils": "3.0.1",
|