@procore/data-table 14.5.0 → 14.6.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 +21 -0
- package/dist/legacy/index.d.mts +16 -3
- package/dist/legacy/index.d.ts +16 -3
- package/dist/legacy/index.js +162 -97
- package/dist/legacy/index.mjs +162 -97
- package/dist/modern/index.d.mts +16 -3
- package/dist/modern/index.d.ts +16 -3
- package/dist/modern/index.js +159 -96
- package/dist/modern/index.mjs +159 -96
- package/package.json +4 -34
package/dist/legacy/index.mjs
CHANGED
|
@@ -1405,7 +1405,7 @@ ag-grid, ag-grid-angular, ag-grid-ng2, ag-grid-polymer, ag-grid-aurelia {
|
|
|
1405
1405
|
animation-iteration-count: infinite;
|
|
1406
1406
|
animation-name: ag-shake-left-to-right;
|
|
1407
1407
|
}
|
|
1408
|
-
@keyframes _ag-shake-left-to-
|
|
1408
|
+
@keyframes _ag-shake-left-to-right_taxt5_366 {
|
|
1409
1409
|
from {
|
|
1410
1410
|
padding-left: 6px;
|
|
1411
1411
|
padding-right: 2px;
|
|
@@ -5406,7 +5406,7 @@ input[class^=ag-][type=button]:focus, button[class^=ag-]:focus {
|
|
|
5406
5406
|
animation-iteration-count: infinite;
|
|
5407
5407
|
animation-timing-function: linear;
|
|
5408
5408
|
}
|
|
5409
|
-
@keyframes
|
|
5409
|
+
@keyframes _spin_taxt5_1 {
|
|
5410
5410
|
from {
|
|
5411
5411
|
transform: rotate(0deg);
|
|
5412
5412
|
}
|
|
@@ -7578,8 +7578,11 @@ input[class^=ag-][type=range]:disabled {
|
|
|
7578
7578
|
.ag-theme-alpine.ag-theme-alpine.ag-theme-alpine .ag-ltr .ag-header-cell .ag-header-cell-comp-wrapper .ag-header-cell-label {
|
|
7579
7579
|
padding: 8px 0;
|
|
7580
7580
|
}
|
|
7581
|
+
.ag-theme-alpine.ag-theme-alpine.ag-theme-alpine .ag-ltr .ag-header-cell .ag-header-cell-comp-wrapper .ag-header-cell-label .data-table-header-display-name-container {
|
|
7582
|
+
width: 100%;
|
|
7583
|
+
}
|
|
7581
7584
|
.ag-theme-alpine.ag-theme-alpine.ag-theme-alpine .ag-ltr .ag-header-cell .ag-header-cell-comp-wrapper .ag-header-cell-label .data-table-header-display-name {
|
|
7582
|
-
|
|
7585
|
+
word-wrap: break-word;
|
|
7583
7586
|
text-overflow: ellipsis;
|
|
7584
7587
|
overflow: hidden;
|
|
7585
7588
|
}
|
|
@@ -7885,7 +7888,7 @@ input[class^=ag-][type=range]:disabled {
|
|
|
7885
7888
|
padding-left: 16px;
|
|
7886
7889
|
}
|
|
7887
7890
|
|
|
7888
|
-
div.
|
|
7891
|
+
div._contextPanel_taxt5_7126 {
|
|
7889
7892
|
width: 400px;
|
|
7890
7893
|
transition: all ease 500ms;
|
|
7891
7894
|
flex: 0 0 auto;
|
|
@@ -7894,7 +7897,7 @@ div._contextPanel_qs3ag_7123 {
|
|
|
7894
7897
|
border: 1px solid #d6dadc;
|
|
7895
7898
|
display: flex;
|
|
7896
7899
|
}
|
|
7897
|
-
div._contextPanel--
|
|
7900
|
+
div._contextPanel--hidden_taxt5_7135 {
|
|
7898
7901
|
border: none;
|
|
7899
7902
|
overflow: hidden;
|
|
7900
7903
|
padding: 0px;
|
|
@@ -7902,50 +7905,50 @@ div._contextPanel--hidden_qs3ag_7132 {
|
|
|
7902
7905
|
width: 0px;
|
|
7903
7906
|
}
|
|
7904
7907
|
|
|
7905
|
-
.
|
|
7908
|
+
._contextPanelWrapper_taxt5_7143 {
|
|
7906
7909
|
position: relative;
|
|
7907
7910
|
flex-grow: 1;
|
|
7908
7911
|
}
|
|
7909
7912
|
|
|
7910
|
-
.
|
|
7913
|
+
._contextPanelBody_taxt5_7148 {
|
|
7911
7914
|
width: clamp(380px, 400px, 100%);
|
|
7912
7915
|
}
|
|
7913
7916
|
|
|
7914
|
-
._contextPanel-
|
|
7917
|
+
._contextPanel-stickyHeader_taxt5_7152 {
|
|
7915
7918
|
background-color: #ffffff;
|
|
7916
7919
|
position: sticky;
|
|
7917
7920
|
top: 0;
|
|
7918
7921
|
z-index: 5;
|
|
7919
7922
|
}
|
|
7920
7923
|
|
|
7921
|
-
._filters-
|
|
7924
|
+
._filters-list_taxt5_7159 {
|
|
7922
7925
|
padding: 0;
|
|
7923
7926
|
margin: 0;
|
|
7924
7927
|
}
|
|
7925
|
-
._filters-
|
|
7928
|
+
._filters-list_taxt5_7159 ol {
|
|
7926
7929
|
padding: 0;
|
|
7927
7930
|
margin: 0;
|
|
7928
7931
|
}
|
|
7929
7932
|
|
|
7930
|
-
._col-drag-column-
|
|
7933
|
+
._col-drag-column-icon_taxt5_7168 {
|
|
7931
7934
|
color: #6a767c;
|
|
7932
7935
|
}
|
|
7933
7936
|
|
|
7934
|
-
._tabular-
|
|
7937
|
+
._tabular-nums_taxt5_7172 {
|
|
7935
7938
|
font-variant-numeric: tabular-nums;
|
|
7936
7939
|
}`;
|
|
7937
7940
|
document.head.appendChild(document.createElement("style")).appendChild(document.createTextNode(css));
|
|
7938
7941
|
var styles_default = {
|
|
7939
|
-
"contextPanel": "
|
|
7940
|
-
"contextPanel--hidden": "_contextPanel--
|
|
7941
|
-
"contextPanelWrapper": "
|
|
7942
|
-
"contextPanelBody": "
|
|
7943
|
-
"contextPanel-stickyHeader": "_contextPanel-
|
|
7944
|
-
"filters-list": "_filters-
|
|
7945
|
-
"col-drag-column-icon": "_col-drag-column-
|
|
7946
|
-
"tabular-nums": "_tabular-
|
|
7947
|
-
"ag-shake-left-to-right": "_ag-shake-left-to-
|
|
7948
|
-
"spin": "
|
|
7942
|
+
"contextPanel": "_contextPanel_taxt5_7126",
|
|
7943
|
+
"contextPanel--hidden": "_contextPanel--hidden_taxt5_7135",
|
|
7944
|
+
"contextPanelWrapper": "_contextPanelWrapper_taxt5_7143",
|
|
7945
|
+
"contextPanelBody": "_contextPanelBody_taxt5_7148",
|
|
7946
|
+
"contextPanel-stickyHeader": "_contextPanel-stickyHeader_taxt5_7152",
|
|
7947
|
+
"filters-list": "_filters-list_taxt5_7159",
|
|
7948
|
+
"col-drag-column-icon": "_col-drag-column-icon_taxt5_7168",
|
|
7949
|
+
"tabular-nums": "_tabular-nums_taxt5_7172",
|
|
7950
|
+
"ag-shake-left-to-right": "_ag-shake-left-to-right_taxt5_366",
|
|
7951
|
+
"spin": "_spin_taxt5_1"
|
|
7949
7952
|
};
|
|
7950
7953
|
|
|
7951
7954
|
// src/utils/getCellValueTypographyProps.ts
|
|
@@ -8133,19 +8136,19 @@ var CompanyCellRenderer = withDataTableRenderer(Renderer2, "select");
|
|
|
8133
8136
|
|
|
8134
8137
|
// src/utils/isEmptyValue.ts
|
|
8135
8138
|
var isEmptyValue = (value) => {
|
|
8136
|
-
if (typeof value === "boolean") {
|
|
8139
|
+
if (typeof value === "boolean" || typeof value === "number") {
|
|
8137
8140
|
return false;
|
|
8138
8141
|
}
|
|
8139
|
-
if (
|
|
8140
|
-
return
|
|
8142
|
+
if (!value) {
|
|
8143
|
+
return true;
|
|
8141
8144
|
}
|
|
8142
|
-
if (value
|
|
8143
|
-
return
|
|
8145
|
+
if (Array.isArray(value)) {
|
|
8146
|
+
return value.length === 0;
|
|
8144
8147
|
}
|
|
8145
|
-
if (
|
|
8146
|
-
return
|
|
8148
|
+
if (Object.getPrototypeOf(value) === Object.prototype) {
|
|
8149
|
+
return Object.keys(value).length === 0;
|
|
8147
8150
|
}
|
|
8148
|
-
return
|
|
8151
|
+
return false;
|
|
8149
8152
|
};
|
|
8150
8153
|
|
|
8151
8154
|
// src/CellRenderers/CurrencyCell.tsx
|
|
@@ -56116,6 +56119,14 @@ function findNode(predicate, gridApi) {
|
|
|
56116
56119
|
return searchTarget;
|
|
56117
56120
|
}
|
|
56118
56121
|
|
|
56122
|
+
// src/utils/isServerSideGroupSelectionState.ts
|
|
56123
|
+
function isServerSideGroupSelectionState(value) {
|
|
56124
|
+
if (value === null) {
|
|
56125
|
+
return false;
|
|
56126
|
+
}
|
|
56127
|
+
return value.selectAll === void 0;
|
|
56128
|
+
}
|
|
56129
|
+
|
|
56119
56130
|
// src/GenericHeader/genericHeader.scss
|
|
56120
56131
|
var css7 = `.ag-header-cell .data-table-header-menu {
|
|
56121
56132
|
opacity: 1;
|
|
@@ -56529,13 +56540,22 @@ var GenericHeaderRenderer = (props) => {
|
|
|
56529
56540
|
return;
|
|
56530
56541
|
}
|
|
56531
56542
|
function updateSelectAllCheckbox(e) {
|
|
56543
|
+
var _a2;
|
|
56532
56544
|
if (e.source === "uiSelectAll") {
|
|
56533
56545
|
return;
|
|
56534
56546
|
}
|
|
56547
|
+
const selectionState = props.api.getServerSideSelectionState();
|
|
56548
|
+
const isGroupSelection = isServerSideGroupSelectionState(selectionState);
|
|
56549
|
+
const isSelectionStatePartialSelected = Boolean(
|
|
56550
|
+
(_a2 = selectionState == null ? void 0 : selectionState.toggledNodes) == null ? void 0 : _a2.length
|
|
56551
|
+
);
|
|
56552
|
+
const isSelectionStateSelectAll = !isSelectionStatePartialSelected && Boolean(
|
|
56553
|
+
isGroupSelection ? selectionState.selectAllChildren : selectionState == null ? void 0 : selectionState.selectAll
|
|
56554
|
+
);
|
|
56535
56555
|
const isPagination = Boolean(props.api.paginationGetRowCount());
|
|
56536
56556
|
const currentRows = getCurrentRows(props.api, isPagination);
|
|
56537
|
-
const isAllSelected = currentRows.length && currentRows.every(isRowSelected);
|
|
56538
|
-
const isPartialSelected = !isAllSelected && currentRows.some(isRowSelected);
|
|
56557
|
+
const isAllSelected = isPagination ? currentRows.length && currentRows.every(isRowSelected) : isSelectionStateSelectAll;
|
|
56558
|
+
const isPartialSelected = isPagination ? !isAllSelected && currentRows.some(isRowSelected) : isSelectionStatePartialSelected;
|
|
56539
56559
|
if (isAllSelected) {
|
|
56540
56560
|
setSelectAll("all" /* All */);
|
|
56541
56561
|
} else if (isPartialSelected) {
|
|
@@ -56560,24 +56580,28 @@ var GenericHeaderRenderer = (props) => {
|
|
|
56560
56580
|
};
|
|
56561
56581
|
}, [isFirstColumn2, props.selectionSSREnabled, props.api, onSSDR]);
|
|
56562
56582
|
const toggleSelectAll = React83.useCallback(() => {
|
|
56563
|
-
var _a2, _b, _c;
|
|
56583
|
+
var _a2, _b, _c, _d, _e;
|
|
56564
56584
|
const nextSelectedState = selectAll === "all" /* All */ ? "none" /* None */ : "all" /* All */;
|
|
56565
56585
|
setSelectAll(nextSelectedState);
|
|
56566
56586
|
(_a2 = props.onSelectAll) == null ? void 0 : _a2.call(props, nextSelectedState);
|
|
56567
56587
|
const isSelectAll = nextSelectedState == "all" /* All */;
|
|
56568
56588
|
if (props.selectionSSREnabled) {
|
|
56569
56589
|
const isPagination = Boolean(props.api.paginationGetRowCount());
|
|
56570
|
-
|
|
56571
|
-
|
|
56572
|
-
|
|
56573
|
-
|
|
56574
|
-
|
|
56575
|
-
|
|
56576
|
-
|
|
56577
|
-
|
|
56578
|
-
|
|
56579
|
-
|
|
56580
|
-
|
|
56590
|
+
if (isPagination) {
|
|
56591
|
+
const rowsIdsToSelectOrDeselect = getCurrentRows(
|
|
56592
|
+
props.api,
|
|
56593
|
+
isPagination
|
|
56594
|
+
).map((node) => node.id);
|
|
56595
|
+
isSelectAll ? (_b = tableRef == null ? void 0 : tableRef.current) == null ? void 0 : _b.selectRows(
|
|
56596
|
+
rowsIdsToSelectOrDeselect,
|
|
56597
|
+
"uiSelectAll"
|
|
56598
|
+
) : (_c = tableRef == null ? void 0 : tableRef.current) == null ? void 0 : _c.deselectRows(
|
|
56599
|
+
rowsIdsToSelectOrDeselect,
|
|
56600
|
+
"uiSelectAll"
|
|
56601
|
+
);
|
|
56602
|
+
} else {
|
|
56603
|
+
isSelectAll ? (_d = tableRef == null ? void 0 : tableRef.current) == null ? void 0 : _d.selectAll() : (_e = tableRef == null ? void 0 : tableRef.current) == null ? void 0 : _e.deselectAll();
|
|
56604
|
+
}
|
|
56581
56605
|
} else {
|
|
56582
56606
|
isSelectAll ? props.api.selectAllFiltered() : props.api.deselectAllFiltered();
|
|
56583
56607
|
}
|
|
@@ -56631,7 +56655,7 @@ var GenericHeaderRenderer = (props) => {
|
|
|
56631
56655
|
trigger: isOverflowing ? "hover" : "none",
|
|
56632
56656
|
overlay: /* @__PURE__ */ React83.createElement(Tooltip.Content, null, /* @__PURE__ */ React83.createElement("span", null, props.displayName))
|
|
56633
56657
|
},
|
|
56634
|
-
/* @__PURE__ */ React83.createElement("div",
|
|
56658
|
+
/* @__PURE__ */ React83.createElement("div", { className: "data-table-header-display-name-container" }, /* @__PURE__ */ React83.createElement("span", { ref, className: "data-table-header-display-name" }, props.displayName))
|
|
56635
56659
|
), HeaderNode && /* @__PURE__ */ React83.createElement(
|
|
56636
56660
|
Flex,
|
|
56637
56661
|
{
|
|
@@ -56958,7 +56982,7 @@ function shapeActiveFilters(filters = emptyArray2) {
|
|
|
56958
56982
|
field
|
|
56959
56983
|
};
|
|
56960
56984
|
});
|
|
56961
|
-
return
|
|
56985
|
+
return state;
|
|
56962
56986
|
}
|
|
56963
56987
|
function useFilterStorage({
|
|
56964
56988
|
columnDefinitions,
|
|
@@ -56969,7 +56993,7 @@ function useFilterStorage({
|
|
|
56969
56993
|
filterable: emptyObj,
|
|
56970
56994
|
filterOptions: emptyObj,
|
|
56971
56995
|
possibleFilters: emptyArray2,
|
|
56972
|
-
selectedFilters:
|
|
56996
|
+
selectedFilters: shapeActiveFilters(initialSelectedFilters)
|
|
56973
56997
|
});
|
|
56974
56998
|
function getOptions(field) {
|
|
56975
56999
|
return filtersState.filterOptions[field];
|
|
@@ -56992,16 +57016,25 @@ function useFilterStorage({
|
|
|
56992
57016
|
const filterableColumns = columnDefinitions.filter(
|
|
56993
57017
|
(col) => col.filterRenderer
|
|
56994
57018
|
);
|
|
56995
|
-
const
|
|
57019
|
+
const filterableMap = filterableColumns.reduce((acc, curr) => {
|
|
57020
|
+
return {
|
|
57021
|
+
...acc,
|
|
57022
|
+
[curr.field]: curr
|
|
57023
|
+
};
|
|
57024
|
+
}, {});
|
|
57025
|
+
const selectedFiltersState = Object.entries(
|
|
57026
|
+
filtersState.selectedFilters ?? {}
|
|
57027
|
+
).filter(([field]) => Object.keys(filterableMap).includes(field)).reduce(
|
|
57028
|
+
(acc, [field, filterState]) => ({
|
|
57029
|
+
...acc,
|
|
57030
|
+
[field]: filterState
|
|
57031
|
+
}),
|
|
57032
|
+
{}
|
|
57033
|
+
);
|
|
56996
57034
|
setFiltersState((prev) => ({
|
|
56997
57035
|
...prev,
|
|
56998
|
-
filterable:
|
|
56999
|
-
|
|
57000
|
-
...acc,
|
|
57001
|
-
[curr.field]: curr
|
|
57002
|
-
};
|
|
57003
|
-
}, {}),
|
|
57004
|
-
selectedFilters: state,
|
|
57036
|
+
filterable: filterableMap,
|
|
57037
|
+
selectedFilters: selectedFiltersState,
|
|
57005
57038
|
possibleFilters: filterableColumns.sort(sortColumnDefinitionsByFilterIndex).map(getFieldAttr)
|
|
57006
57039
|
}));
|
|
57007
57040
|
}, [columnDefinitions]);
|
|
@@ -57015,7 +57048,7 @@ function useFilterStorage({
|
|
|
57015
57048
|
(selectedFilters) => {
|
|
57016
57049
|
setFiltersState((prev) => ({
|
|
57017
57050
|
...prev,
|
|
57018
|
-
selectedFilters: shapeActiveFilters(selectedFilters)
|
|
57051
|
+
selectedFilters: shapeActiveFilters(selectedFilters)
|
|
57019
57052
|
}));
|
|
57020
57053
|
},
|
|
57021
57054
|
[]
|
|
@@ -77824,6 +77857,7 @@ function useContextPanel() {
|
|
|
77824
77857
|
}
|
|
77825
77858
|
var ConfigPanelButton = () => {
|
|
77826
77859
|
const { contextPanel, totalRowCount } = useInternalTableContext();
|
|
77860
|
+
const I18n = useI18nContext();
|
|
77827
77861
|
return /* @__PURE__ */ React83.createElement(
|
|
77828
77862
|
EmptyResultsControlTooltip,
|
|
77829
77863
|
{
|
|
@@ -77841,28 +77875,29 @@ var ConfigPanelButton = () => {
|
|
|
77841
77875
|
contextPanel.show("configuration");
|
|
77842
77876
|
}
|
|
77843
77877
|
},
|
|
77878
|
+
icon: /* @__PURE__ */ React83.createElement(
|
|
77879
|
+
"svg",
|
|
77880
|
+
{
|
|
77881
|
+
style: { marginTop: "6px" },
|
|
77882
|
+
focusable: false,
|
|
77883
|
+
width: "15",
|
|
77884
|
+
height: "15",
|
|
77885
|
+
viewBox: "0 0 20 20",
|
|
77886
|
+
fill: "none",
|
|
77887
|
+
xmlns: "http://www.w3.org/2000/svg"
|
|
77888
|
+
},
|
|
77889
|
+
/* @__PURE__ */ React83.createElement(
|
|
77890
|
+
"path",
|
|
77891
|
+
{
|
|
77892
|
+
d: "M0 11.5V13.5H4.5V11.5H0ZM0 1.5V3.5H7.5V1.5H0ZM8.5 15V13.5H15V11.5H8.5V10H6.66667V15H8.5ZM3.5 5V6.5H0V8.5H3.5V10H5.5V5H3.5ZM15 8.5V6.5H7.5V8.5H15ZM9.5 5H11.6667V3.5H15V1.5H11.6667V0H9.5V5Z",
|
|
77893
|
+
fill: "currentColor"
|
|
77894
|
+
}
|
|
77895
|
+
)
|
|
77896
|
+
),
|
|
77844
77897
|
selected: contextPanel.content === "configuration",
|
|
77845
77898
|
"data-qa": "table-config-button"
|
|
77846
77899
|
},
|
|
77847
|
-
|
|
77848
|
-
"svg",
|
|
77849
|
-
{
|
|
77850
|
-
style: { marginTop: "6px" },
|
|
77851
|
-
focusable: false,
|
|
77852
|
-
width: "15",
|
|
77853
|
-
height: "15",
|
|
77854
|
-
viewBox: "0 0 15 15",
|
|
77855
|
-
fill: "none",
|
|
77856
|
-
xmlns: "http://www.w3.org/2000/svg"
|
|
77857
|
-
},
|
|
77858
|
-
/* @__PURE__ */ React83.createElement(
|
|
77859
|
-
"path",
|
|
77860
|
-
{
|
|
77861
|
-
d: "M0 11.5V13.5H4.5V11.5H0ZM0 1.5V3.5H7.5V1.5H0ZM8.5 15V13.5H15V11.5H8.5V10H6.66667V15H8.5ZM3.5 5V6.5H0V8.5H3.5V10H5.5V5H3.5ZM15 8.5V6.5H7.5V8.5H15ZM9.5 5H11.6667V3.5H15V1.5H11.6667V0H9.5V5Z",
|
|
77862
|
-
fill: "currentColor"
|
|
77863
|
-
}
|
|
77864
|
-
)
|
|
77865
|
-
)
|
|
77900
|
+
I18n.t("dataTable.tableSettings.configure")
|
|
77866
77901
|
)
|
|
77867
77902
|
);
|
|
77868
77903
|
};
|
|
@@ -78697,7 +78732,8 @@ var de_DE_default = {
|
|
|
78697
78732
|
tableSettings: "Tabelleneinstellungen",
|
|
78698
78733
|
groupBy: "Gruppieren nach:",
|
|
78699
78734
|
reset: "Zur\xFCcksetzen",
|
|
78700
|
-
selectColumnGroup: "W\xE4hlen Sie eine Spalte zum Gruppieren."
|
|
78735
|
+
selectColumnGroup: "W\xE4hlen Sie eine Spalte zum Gruppieren.",
|
|
78736
|
+
configure: "Konfigurieren"
|
|
78701
78737
|
},
|
|
78702
78738
|
rowGroupToggle: {
|
|
78703
78739
|
expandTierOne: "\xD6ffnen Sie die ersten Gruppen in der Tabelle.",
|
|
@@ -78841,7 +78877,8 @@ var en_AU_default = {
|
|
|
78841
78877
|
tableSettings: "Table Settings",
|
|
78842
78878
|
groupBy: "Group by:",
|
|
78843
78879
|
reset: "Reset",
|
|
78844
|
-
selectColumnGroup: "Select a column to group"
|
|
78880
|
+
selectColumnGroup: "Select a column to group",
|
|
78881
|
+
configure: "Configure"
|
|
78845
78882
|
},
|
|
78846
78883
|
rowGroupToggle: {
|
|
78847
78884
|
expandTierOne: "Open first groups in the table.",
|
|
@@ -78985,7 +79022,8 @@ var en_CA_default = {
|
|
|
78985
79022
|
tableSettings: "Table Settings",
|
|
78986
79023
|
groupBy: "Group by:",
|
|
78987
79024
|
reset: "Reset",
|
|
78988
|
-
selectColumnGroup: "Select a column to group"
|
|
79025
|
+
selectColumnGroup: "Select a column to group",
|
|
79026
|
+
configure: "Configure"
|
|
78989
79027
|
},
|
|
78990
79028
|
rowGroupToggle: {
|
|
78991
79029
|
expandTierOne: "Open first groups in the table.",
|
|
@@ -79129,7 +79167,8 @@ var en_GB_default = {
|
|
|
79129
79167
|
tableSettings: "Table Settings",
|
|
79130
79168
|
groupBy: "Group by:",
|
|
79131
79169
|
reset: "Reset",
|
|
79132
|
-
selectColumnGroup: "Select a column to group"
|
|
79170
|
+
selectColumnGroup: "Select a column to group",
|
|
79171
|
+
configure: "Configure"
|
|
79133
79172
|
},
|
|
79134
79173
|
rowGroupToggle: {
|
|
79135
79174
|
expandTierOne: "Open first groups in the table.",
|
|
@@ -79273,7 +79312,8 @@ var en_default = {
|
|
|
79273
79312
|
tableSettings: "Table Settings",
|
|
79274
79313
|
groupBy: "Group by:",
|
|
79275
79314
|
reset: "Reset",
|
|
79276
|
-
selectColumnGroup: "Select a column to group"
|
|
79315
|
+
selectColumnGroup: "Select a column to group",
|
|
79316
|
+
configure: "Configure"
|
|
79277
79317
|
},
|
|
79278
79318
|
rowGroupToggle: {
|
|
79279
79319
|
expandTierOne: "Open first groups in the table.",
|
|
@@ -79417,7 +79457,8 @@ var es_ES_default = {
|
|
|
79417
79457
|
tableSettings: "Configuraci\xF3n de la tabla",
|
|
79418
79458
|
groupBy: "Agrupar por:",
|
|
79419
79459
|
reset: "Restablecer",
|
|
79420
|
-
selectColumnGroup: "Seleccione una columna para agrupar"
|
|
79460
|
+
selectColumnGroup: "Seleccione una columna para agrupar",
|
|
79461
|
+
configure: "Configurar"
|
|
79421
79462
|
},
|
|
79422
79463
|
rowGroupToggle: {
|
|
79423
79464
|
expandTierOne: "Abrir los primeros grupos de la tabla.",
|
|
@@ -79561,7 +79602,8 @@ var es_default = {
|
|
|
79561
79602
|
tableSettings: "Configuraci\xF3n de la tabla",
|
|
79562
79603
|
groupBy: "Agrupar por:",
|
|
79563
79604
|
reset: "Restablecer",
|
|
79564
|
-
selectColumnGroup: "Selecciona una columna para agrupar"
|
|
79605
|
+
selectColumnGroup: "Selecciona una columna para agrupar",
|
|
79606
|
+
configure: "Configurar"
|
|
79565
79607
|
},
|
|
79566
79608
|
rowGroupToggle: {
|
|
79567
79609
|
expandTierOne: "Abrir los primeros grupos de la tabla.",
|
|
@@ -79705,7 +79747,8 @@ var fr_CA_default = {
|
|
|
79705
79747
|
tableSettings: "Param\xE8tres du tableau",
|
|
79706
79748
|
groupBy: "Regrouper par :",
|
|
79707
79749
|
reset: "R\xE9initialiser",
|
|
79708
|
-
selectColumnGroup: "S\xE9lectionnez une colonne \xE0 grouper"
|
|
79750
|
+
selectColumnGroup: "S\xE9lectionnez une colonne \xE0 grouper",
|
|
79751
|
+
configure: "Configurer"
|
|
79709
79752
|
},
|
|
79710
79753
|
rowGroupToggle: {
|
|
79711
79754
|
expandTierOne: "Ouvrez les premiers groupes du tableau.",
|
|
@@ -79849,7 +79892,8 @@ var fr_FR_default = {
|
|
|
79849
79892
|
tableSettings: "Param\xE8tres du tableau",
|
|
79850
79893
|
groupBy: "Regrouper par\xA0:",
|
|
79851
79894
|
reset: "R\xE9initialiser",
|
|
79852
|
-
selectColumnGroup: "S\xE9lectionner une colonne \xE0 regrouper"
|
|
79895
|
+
selectColumnGroup: "S\xE9lectionner une colonne \xE0 regrouper",
|
|
79896
|
+
configure: "Configurer"
|
|
79853
79897
|
},
|
|
79854
79898
|
rowGroupToggle: {
|
|
79855
79899
|
expandTierOne: "Ouvrez les premiers groupes du tableau.",
|
|
@@ -79993,7 +80037,8 @@ var is_IS_default = {
|
|
|
79993
80037
|
tableSettings: "Tafla stillingar",
|
|
79994
80038
|
groupBy: "H\xF3pur eftir:",
|
|
79995
80039
|
reset: "Endurstilla",
|
|
79996
|
-
selectColumnGroup: "Veldu d\xE1lk til a\xF0 flokka"
|
|
80040
|
+
selectColumnGroup: "Veldu d\xE1lk til a\xF0 flokka",
|
|
80041
|
+
configure: "Stilla"
|
|
79997
80042
|
},
|
|
79998
80043
|
rowGroupToggle: {
|
|
79999
80044
|
expandTierOne: "Opna\xF0u fyrstu h\xF3pa \xED t\xF6flunni.",
|
|
@@ -80137,7 +80182,8 @@ var ja_JP_default = {
|
|
|
80137
80182
|
tableSettings: "\u8868\u306E\u8A2D\u5B9A",
|
|
80138
80183
|
groupBy: "\u30B0\u30EB\u30FC\u30D7\u5316:",
|
|
80139
80184
|
reset: "\u30EA\u30BB\u30C3\u30C8",
|
|
80140
|
-
selectColumnGroup: "\u30B0\u30EB\u30FC\u30D7\u5316\u3059\u308B\u5217\u3092\u9078\u629E"
|
|
80185
|
+
selectColumnGroup: "\u30B0\u30EB\u30FC\u30D7\u5316\u3059\u308B\u5217\u3092\u9078\u629E",
|
|
80186
|
+
configure: "\u69CB\u6210"
|
|
80141
80187
|
},
|
|
80142
80188
|
rowGroupToggle: {
|
|
80143
80189
|
expandTierOne: "\u8868\u306E\u6700\u521D\u306E\u30B0\u30EB\u30FC\u30D7\u3092\u958B\u304D\u307E\u3059\u3002",
|
|
@@ -80281,7 +80327,8 @@ var pt_BR_default = {
|
|
|
80281
80327
|
tableSettings: "Configura\xE7\xF5es da Tabela",
|
|
80282
80328
|
groupBy: "Agrupar por:",
|
|
80283
80329
|
reset: "Redefinir",
|
|
80284
|
-
selectColumnGroup: "Selecionar uma coluna para agrupar"
|
|
80330
|
+
selectColumnGroup: "Selecionar uma coluna para agrupar",
|
|
80331
|
+
configure: "Configurar"
|
|
80285
80332
|
},
|
|
80286
80333
|
rowGroupToggle: {
|
|
80287
80334
|
expandTierOne: "Abra os primeiros grupos na tabela.",
|
|
@@ -80425,7 +80472,8 @@ var th_TH_default = {
|
|
|
80425
80472
|
tableSettings: "\u0E01\u0E32\u0E23\u0E15\u0E31\u0E49\u0E07\u0E04\u0E48\u0E32\u0E15\u0E32\u0E23\u0E32\u0E07",
|
|
80426
80473
|
groupBy: "\u0E08\u0E31\u0E14\u0E01\u0E25\u0E38\u0E48\u0E21\u0E15\u0E32\u0E21:",
|
|
80427
80474
|
reset: "\u0E23\u0E35\u0E40\u0E0B\u0E47\u0E15",
|
|
80428
|
-
selectColumnGroup: "\u0E40\u0E25\u0E37\u0E2D\u0E01\u0E04\u0E2D\u0E25\u0E31\u0E21\u0E19\u0E4C\u0E17\u0E35\u0E48\u0E08\u0E30\u0E08\u0E31\u0E14\u0E01\u0E25\u0E38\u0E48\u0E21"
|
|
80475
|
+
selectColumnGroup: "\u0E40\u0E25\u0E37\u0E2D\u0E01\u0E04\u0E2D\u0E25\u0E31\u0E21\u0E19\u0E4C\u0E17\u0E35\u0E48\u0E08\u0E30\u0E08\u0E31\u0E14\u0E01\u0E25\u0E38\u0E48\u0E21",
|
|
80476
|
+
configure: "\u0E01\u0E33\u0E2B\u0E19\u0E14\u0E04\u0E48\u0E32"
|
|
80429
80477
|
},
|
|
80430
80478
|
rowGroupToggle: {
|
|
80431
80479
|
expandTierOne: "\u0E40\u0E1B\u0E34\u0E14\u0E01\u0E25\u0E38\u0E48\u0E21\u0E41\u0E23\u0E01\u0E43\u0E19\u0E15\u0E32\u0E23\u0E32\u0E07",
|
|
@@ -80569,7 +80617,8 @@ var zh_SG_default = {
|
|
|
80569
80617
|
tableSettings: "\u8868\u683C\u8BBE\u7F6E",
|
|
80570
80618
|
groupBy: "\u5206\u7EC4\u4F9D\u636E\uFF1A",
|
|
80571
80619
|
reset: "\u91CD\u7F6E",
|
|
80572
|
-
selectColumnGroup: "\u9009\u62E9\u8981\u5206\u7C7B\u7684\u5217"
|
|
80620
|
+
selectColumnGroup: "\u9009\u62E9\u8981\u5206\u7C7B\u7684\u5217",
|
|
80621
|
+
configure: "\u914D\u7F6E"
|
|
80573
80622
|
},
|
|
80574
80623
|
rowGroupToggle: {
|
|
80575
80624
|
expandTierOne: "\u6253\u5F00\u8868\u4E2D\u7684\u7B2C\u4E00\u4E2A\u7EC4\u3002",
|
|
@@ -81200,6 +81249,15 @@ var useTableApi = ({
|
|
|
81200
81249
|
}),
|
|
81201
81250
|
[columnApi, gridApi, rowHeight, filterStorage]
|
|
81202
81251
|
);
|
|
81252
|
+
function deselectParentsWithoutChildrenOrSelectAll(state, gridApi2) {
|
|
81253
|
+
var _a, _b, _c;
|
|
81254
|
+
if (state.selectAllChildren === false && !((_a = state.toggledNodes) == null ? void 0 : _a.length)) {
|
|
81255
|
+
(_b = gridApi2.getRowNode(state.nodeId || "")) == null ? void 0 : _b.setSelected(false);
|
|
81256
|
+
}
|
|
81257
|
+
(_c = state.toggledNodes) == null ? void 0 : _c.forEach(
|
|
81258
|
+
(node) => deselectParentsWithoutChildrenOrSelectAll(node, gridApi2)
|
|
81259
|
+
);
|
|
81260
|
+
}
|
|
81203
81261
|
const onSelectionChanged = (rowNode) => {
|
|
81204
81262
|
var _a;
|
|
81205
81263
|
const isGrouped = rowNode.group || ((_a = rowNode.parent) == null ? void 0 : _a.group) && !isNodeRootLevelOfGrid(rowNode.parent);
|
|
@@ -81221,13 +81279,18 @@ var useTableApi = ({
|
|
|
81221
81279
|
currAffectedRows
|
|
81222
81280
|
);
|
|
81223
81281
|
const rowValues = Object.values(rowsToUpdate);
|
|
81224
|
-
|
|
81225
|
-
|
|
81226
|
-
|
|
81227
|
-
|
|
81228
|
-
|
|
81229
|
-
|
|
81230
|
-
|
|
81282
|
+
const selectionState = gridApi == null ? void 0 : gridApi.getServerSideSelectionState();
|
|
81283
|
+
if (selectionState && isServerSideGroupSelectionState(selectionState) && gridApi) {
|
|
81284
|
+
deselectParentsWithoutChildrenOrSelectAll(selectionState, gridApi);
|
|
81285
|
+
} else {
|
|
81286
|
+
rowValues.forEach((row2) => {
|
|
81287
|
+
row2.node.setSelected(
|
|
81288
|
+
row2.selectedState === rowSelectionState.selected,
|
|
81289
|
+
false,
|
|
81290
|
+
"checkboxSelected"
|
|
81291
|
+
);
|
|
81292
|
+
});
|
|
81293
|
+
}
|
|
81231
81294
|
rowSelectionRef.current.affectedRows = {
|
|
81232
81295
|
...currAffectedRows,
|
|
81233
81296
|
...rowsToUpdate
|
|
@@ -81351,6 +81414,7 @@ function buildPartialTableApi({
|
|
|
81351
81414
|
rowSelectionRef
|
|
81352
81415
|
}) : void 0;
|
|
81353
81416
|
};
|
|
81417
|
+
const getServerSideSelectionState = () => gridApi == null ? void 0 : gridApi.getServerSideSelectionState();
|
|
81354
81418
|
const getTableConfiguration = () => {
|
|
81355
81419
|
var _a;
|
|
81356
81420
|
const columnState = (columnApi == null ? void 0 : columnApi.getColumnState().filter(
|
|
@@ -81466,6 +81530,7 @@ function buildPartialTableApi({
|
|
|
81466
81530
|
getRootAggregateData,
|
|
81467
81531
|
getRowData,
|
|
81468
81532
|
getSelectedRows: getSelectedRows2,
|
|
81533
|
+
getServerSideSelectionState,
|
|
81469
81534
|
getTableConfiguration,
|
|
81470
81535
|
refreshCells,
|
|
81471
81536
|
setPinnedBottomRowData,
|
|
@@ -82554,7 +82619,7 @@ var Table = (props) => {
|
|
|
82554
82619
|
groupDefaultExpanded: props.groupDefaultExpanded,
|
|
82555
82620
|
groupIncludeFooter: !onSSDR && props.groupIncludeFooter === void 0 ? true : props.groupIncludeFooter,
|
|
82556
82621
|
getGroupRowAgg: props.getGroupRowAgg ? getGroupRowAgg : void 0,
|
|
82557
|
-
groupSelectsChildren: !onSSDR,
|
|
82622
|
+
groupSelectsChildren: props.groupSelectsChildren || !onSSDR,
|
|
82558
82623
|
groupSelectsFiltered: true,
|
|
82559
82624
|
headerHeight: props.headerHeight,
|
|
82560
82625
|
icons: tableIcons,
|
package/dist/modern/index.d.mts
CHANGED
|
@@ -577,6 +577,10 @@ interface TableApi {
|
|
|
577
577
|
getFilteredAndSortedRowNodes: () => RowNode[];
|
|
578
578
|
getListFilter: (field: string) => Promise<any | undefined>;
|
|
579
579
|
getListFilters: (fields?: string[]) => Promise<ListFilter[]>;
|
|
580
|
+
/**
|
|
581
|
+
* Enables the ability to grab the complete selection state of an SSRM table when some of the selected rows have not yet been fetched.
|
|
582
|
+
*/
|
|
583
|
+
getServerSideSelectionState: () => ReturnType<GridApi['getServerSideSelectionState']> | undefined;
|
|
580
584
|
getTableConfiguration: () => DataTableConfig;
|
|
581
585
|
getBulkEditColumns: () => ColumnDefinition[];
|
|
582
586
|
hideContextPanel: ContextPanelApi['hide'];
|
|
@@ -641,7 +645,7 @@ interface TableApi {
|
|
|
641
645
|
*/
|
|
642
646
|
setIsRowSelectable?(isRowSelectableFunc: IsRowSelectable): void;
|
|
643
647
|
}
|
|
644
|
-
type PartialTableApi = Pick<TableApi, 'applyTransaction' | 'applyServerSideTransaction' | 'collapseAll' | 'deselectAll' | 'expandAll' | 'getColumnDefinitions' | 'getDetailGridTableApi' | 'getFilteredAndSortedRowNodes' | 'getRootAggregateData' | 'getRowData' | 'getSelectedRows' | 'getTableConfiguration' | 'refreshCells' | 'scrollToRow' | 'selectAll' | 'setPinnedBottomRowData' | 'setRowData' | 'setRowNodeExpanded' | 'sizeColumnsToFit'>;
|
|
648
|
+
type PartialTableApi = Pick<TableApi, 'applyTransaction' | 'applyServerSideTransaction' | 'collapseAll' | 'deselectAll' | 'expandAll' | 'getColumnDefinitions' | 'getDetailGridTableApi' | 'getFilteredAndSortedRowNodes' | 'getRootAggregateData' | 'getRowData' | 'getSelectedRows' | 'getServerSideSelectionState' | 'getTableConfiguration' | 'refreshCells' | 'scrollToRow' | 'selectAll' | 'setPinnedBottomRowData' | 'setRowData' | 'setRowNodeExpanded' | 'sizeColumnsToFit'>;
|
|
645
649
|
type AgDomLayout = 'normal' | 'autoHeight' | 'print' | undefined;
|
|
646
650
|
interface IsRowSelectable {
|
|
647
651
|
(node: RowNode): boolean;
|
|
@@ -932,6 +936,7 @@ interface TableProps<TRow = any, TBottomRow = any> {
|
|
|
932
936
|
getSubtotalLabel?: (columnDefinition: ColumnDefinition, rowData: TRow, value: string | number) => string;
|
|
933
937
|
groupDefaultExpanded?: number;
|
|
934
938
|
groupIncludeFooter?: boolean;
|
|
939
|
+
groupSelectsChildren?: boolean;
|
|
935
940
|
headerHeight?: number;
|
|
936
941
|
hideActionsOnGroupedRow?: boolean;
|
|
937
942
|
initialGroupOrderComparator?: (nodeA: RowNode, nodeB: RowNode) => number;
|
|
@@ -1340,7 +1345,11 @@ declare const _default$1: (({ analytics, children, columnDefinitions: _columnDef
|
|
|
1340
1345
|
overlayMatchesTriggerWidth?: boolean | undefined;
|
|
1341
1346
|
}>;
|
|
1342
1347
|
RowGroupSelector: React__default.FC<{
|
|
1343
|
-
localeText:
|
|
1348
|
+
localeText: {
|
|
1349
|
+
reset: string;
|
|
1350
|
+
placeholder: string;
|
|
1351
|
+
selectedItemsPrefix?: string | undefined;
|
|
1352
|
+
};
|
|
1344
1353
|
}>;
|
|
1345
1354
|
Search: React__default.FunctionComponent<SearchProps>;
|
|
1346
1355
|
Table: React__default.FC<Omit<TableProps<any, any>, "selectionSSREnabled" | "modules">>;
|
|
@@ -1373,7 +1382,11 @@ declare const _default: (({ analytics, children, columnDefinitions: _columnDefin
|
|
|
1373
1382
|
overlayMatchesTriggerWidth?: boolean | undefined;
|
|
1374
1383
|
}>;
|
|
1375
1384
|
RowGroupSelector: React__default.FC<{
|
|
1376
|
-
localeText:
|
|
1385
|
+
localeText: {
|
|
1386
|
+
reset: string;
|
|
1387
|
+
placeholder: string;
|
|
1388
|
+
selectedItemsPrefix?: string | undefined;
|
|
1389
|
+
};
|
|
1377
1390
|
}>;
|
|
1378
1391
|
Search: React__default.FunctionComponent<SearchProps>;
|
|
1379
1392
|
Table: React__default.FC<Omit<TableProps<any, any>, "rows" | "modules">>;
|
package/dist/modern/index.d.ts
CHANGED
|
@@ -577,6 +577,10 @@ interface TableApi {
|
|
|
577
577
|
getFilteredAndSortedRowNodes: () => RowNode[];
|
|
578
578
|
getListFilter: (field: string) => Promise<any | undefined>;
|
|
579
579
|
getListFilters: (fields?: string[]) => Promise<ListFilter[]>;
|
|
580
|
+
/**
|
|
581
|
+
* Enables the ability to grab the complete selection state of an SSRM table when some of the selected rows have not yet been fetched.
|
|
582
|
+
*/
|
|
583
|
+
getServerSideSelectionState: () => ReturnType<GridApi['getServerSideSelectionState']> | undefined;
|
|
580
584
|
getTableConfiguration: () => DataTableConfig;
|
|
581
585
|
getBulkEditColumns: () => ColumnDefinition[];
|
|
582
586
|
hideContextPanel: ContextPanelApi['hide'];
|
|
@@ -641,7 +645,7 @@ interface TableApi {
|
|
|
641
645
|
*/
|
|
642
646
|
setIsRowSelectable?(isRowSelectableFunc: IsRowSelectable): void;
|
|
643
647
|
}
|
|
644
|
-
type PartialTableApi = Pick<TableApi, 'applyTransaction' | 'applyServerSideTransaction' | 'collapseAll' | 'deselectAll' | 'expandAll' | 'getColumnDefinitions' | 'getDetailGridTableApi' | 'getFilteredAndSortedRowNodes' | 'getRootAggregateData' | 'getRowData' | 'getSelectedRows' | 'getTableConfiguration' | 'refreshCells' | 'scrollToRow' | 'selectAll' | 'setPinnedBottomRowData' | 'setRowData' | 'setRowNodeExpanded' | 'sizeColumnsToFit'>;
|
|
648
|
+
type PartialTableApi = Pick<TableApi, 'applyTransaction' | 'applyServerSideTransaction' | 'collapseAll' | 'deselectAll' | 'expandAll' | 'getColumnDefinitions' | 'getDetailGridTableApi' | 'getFilteredAndSortedRowNodes' | 'getRootAggregateData' | 'getRowData' | 'getSelectedRows' | 'getServerSideSelectionState' | 'getTableConfiguration' | 'refreshCells' | 'scrollToRow' | 'selectAll' | 'setPinnedBottomRowData' | 'setRowData' | 'setRowNodeExpanded' | 'sizeColumnsToFit'>;
|
|
645
649
|
type AgDomLayout = 'normal' | 'autoHeight' | 'print' | undefined;
|
|
646
650
|
interface IsRowSelectable {
|
|
647
651
|
(node: RowNode): boolean;
|
|
@@ -932,6 +936,7 @@ interface TableProps<TRow = any, TBottomRow = any> {
|
|
|
932
936
|
getSubtotalLabel?: (columnDefinition: ColumnDefinition, rowData: TRow, value: string | number) => string;
|
|
933
937
|
groupDefaultExpanded?: number;
|
|
934
938
|
groupIncludeFooter?: boolean;
|
|
939
|
+
groupSelectsChildren?: boolean;
|
|
935
940
|
headerHeight?: number;
|
|
936
941
|
hideActionsOnGroupedRow?: boolean;
|
|
937
942
|
initialGroupOrderComparator?: (nodeA: RowNode, nodeB: RowNode) => number;
|
|
@@ -1340,7 +1345,11 @@ declare const _default$1: (({ analytics, children, columnDefinitions: _columnDef
|
|
|
1340
1345
|
overlayMatchesTriggerWidth?: boolean | undefined;
|
|
1341
1346
|
}>;
|
|
1342
1347
|
RowGroupSelector: React__default.FC<{
|
|
1343
|
-
localeText:
|
|
1348
|
+
localeText: {
|
|
1349
|
+
reset: string;
|
|
1350
|
+
placeholder: string;
|
|
1351
|
+
selectedItemsPrefix?: string | undefined;
|
|
1352
|
+
};
|
|
1344
1353
|
}>;
|
|
1345
1354
|
Search: React__default.FunctionComponent<SearchProps>;
|
|
1346
1355
|
Table: React__default.FC<Omit<TableProps<any, any>, "selectionSSREnabled" | "modules">>;
|
|
@@ -1373,7 +1382,11 @@ declare const _default: (({ analytics, children, columnDefinitions: _columnDefin
|
|
|
1373
1382
|
overlayMatchesTriggerWidth?: boolean | undefined;
|
|
1374
1383
|
}>;
|
|
1375
1384
|
RowGroupSelector: React__default.FC<{
|
|
1376
|
-
localeText:
|
|
1385
|
+
localeText: {
|
|
1386
|
+
reset: string;
|
|
1387
|
+
placeholder: string;
|
|
1388
|
+
selectedItemsPrefix?: string | undefined;
|
|
1389
|
+
};
|
|
1377
1390
|
}>;
|
|
1378
1391
|
Search: React__default.FunctionComponent<SearchProps>;
|
|
1379
1392
|
Table: React__default.FC<Omit<TableProps<any, any>, "rows" | "modules">>;
|