@procore/data-table 14.46.1 → 14.46.3
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 +23 -0
- package/dist/legacy/index.cjs +249 -115
- package/dist/legacy/index.d.cts +8 -2
- package/dist/legacy/index.d.ts +8 -2
- package/dist/legacy/index.js +249 -115
- package/dist/modern/index.cjs +244 -113
- package/dist/modern/index.d.cts +8 -2
- package/dist/modern/index.d.ts +8 -2
- package/dist/modern/index.js +244 -113
- package/package.json +6 -6
package/dist/modern/index.js
CHANGED
|
@@ -1387,7 +1387,7 @@ ag-grid, ag-grid-angular, ag-grid-ng2, ag-grid-polymer, ag-grid-aurelia {
|
|
|
1387
1387
|
animation-iteration-count: infinite;
|
|
1388
1388
|
animation-name: ag-shake-left-to-right;
|
|
1389
1389
|
}
|
|
1390
|
-
@keyframes _ag-shake-left-to-
|
|
1390
|
+
@keyframes _ag-shake-left-to-right_pphrk_342 {
|
|
1391
1391
|
from {
|
|
1392
1392
|
padding-left: 6px;
|
|
1393
1393
|
padding-right: 2px;
|
|
@@ -5388,7 +5388,7 @@ input[class^=ag-][type=button]:focus, button[class^=ag-]:focus {
|
|
|
5388
5388
|
animation-iteration-count: infinite;
|
|
5389
5389
|
animation-timing-function: linear;
|
|
5390
5390
|
}
|
|
5391
|
-
@keyframes
|
|
5391
|
+
@keyframes _spin_pphrk_1 {
|
|
5392
5392
|
from {
|
|
5393
5393
|
transform: rotate(0deg);
|
|
5394
5394
|
}
|
|
@@ -7920,7 +7920,7 @@ input[class^=ag-][type=range]:disabled {
|
|
|
7920
7920
|
padding-left: 16px;
|
|
7921
7921
|
}
|
|
7922
7922
|
|
|
7923
|
-
div.
|
|
7923
|
+
div._contextPanel_pphrk_7159 {
|
|
7924
7924
|
width: 400px;
|
|
7925
7925
|
transition: all ease 500ms;
|
|
7926
7926
|
flex: 0 0 auto;
|
|
@@ -7929,7 +7929,12 @@ div._contextPanel_1ern5_7159 {
|
|
|
7929
7929
|
border: 1px solid #d6dadc;
|
|
7930
7930
|
display: flex;
|
|
7931
7931
|
}
|
|
7932
|
-
div.
|
|
7932
|
+
div._contextPanel_pphrk_7159:focus {
|
|
7933
|
+
border-color: #2066df;
|
|
7934
|
+
box-shadow: inset 0 0 1px 0 #2066df;
|
|
7935
|
+
outline: none;
|
|
7936
|
+
}
|
|
7937
|
+
div._contextPanel--hidden_pphrk_7173 {
|
|
7933
7938
|
border: none;
|
|
7934
7939
|
overflow: hidden;
|
|
7935
7940
|
padding: 0px;
|
|
@@ -7937,50 +7942,50 @@ div._contextPanel--hidden_1ern5_7168 {
|
|
|
7937
7942
|
width: 0px;
|
|
7938
7943
|
}
|
|
7939
7944
|
|
|
7940
|
-
.
|
|
7945
|
+
._contextPanelWrapper_pphrk_7181 {
|
|
7941
7946
|
position: relative;
|
|
7942
7947
|
flex-grow: 1;
|
|
7943
7948
|
}
|
|
7944
7949
|
|
|
7945
|
-
.
|
|
7950
|
+
._contextPanelBody_pphrk_7186 {
|
|
7946
7951
|
width: clamp(380px, 400px, 100%);
|
|
7947
7952
|
}
|
|
7948
7953
|
|
|
7949
|
-
._contextPanel-
|
|
7954
|
+
._contextPanel-stickyHeader_pphrk_7190 {
|
|
7950
7955
|
background-color: #ffffff;
|
|
7951
7956
|
position: sticky;
|
|
7952
7957
|
top: 0;
|
|
7953
7958
|
z-index: 5;
|
|
7954
7959
|
}
|
|
7955
7960
|
|
|
7956
|
-
._filters-
|
|
7961
|
+
._filters-list_pphrk_7197 {
|
|
7957
7962
|
padding: 0;
|
|
7958
7963
|
margin: 0;
|
|
7959
7964
|
}
|
|
7960
|
-
._filters-
|
|
7965
|
+
._filters-list_pphrk_7197 ol {
|
|
7961
7966
|
padding: 0;
|
|
7962
7967
|
margin: 0;
|
|
7963
7968
|
}
|
|
7964
7969
|
|
|
7965
|
-
._col-drag-column-
|
|
7970
|
+
._col-drag-column-icon_pphrk_7206 {
|
|
7966
7971
|
color: #6a767c;
|
|
7967
7972
|
}
|
|
7968
7973
|
|
|
7969
|
-
._tabular-
|
|
7974
|
+
._tabular-nums_pphrk_7210 {
|
|
7970
7975
|
font-variant-numeric: tabular-nums;
|
|
7971
7976
|
}`;
|
|
7972
7977
|
document.head.appendChild(document.createElement("style")).appendChild(document.createTextNode(css));
|
|
7973
7978
|
var styles_default = {
|
|
7974
|
-
"contextPanel": "
|
|
7975
|
-
"contextPanel--hidden": "_contextPanel--
|
|
7976
|
-
"contextPanelWrapper": "
|
|
7977
|
-
"contextPanelBody": "
|
|
7978
|
-
"contextPanel-stickyHeader": "_contextPanel-
|
|
7979
|
-
"filters-list": "_filters-
|
|
7980
|
-
"col-drag-column-icon": "_col-drag-column-
|
|
7981
|
-
"tabular-nums": "_tabular-
|
|
7982
|
-
"ag-shake-left-to-right": "_ag-shake-left-to-
|
|
7983
|
-
"spin": "
|
|
7979
|
+
"contextPanel": "_contextPanel_pphrk_7159",
|
|
7980
|
+
"contextPanel--hidden": "_contextPanel--hidden_pphrk_7173",
|
|
7981
|
+
"contextPanelWrapper": "_contextPanelWrapper_pphrk_7181",
|
|
7982
|
+
"contextPanelBody": "_contextPanelBody_pphrk_7186",
|
|
7983
|
+
"contextPanel-stickyHeader": "_contextPanel-stickyHeader_pphrk_7190",
|
|
7984
|
+
"filters-list": "_filters-list_pphrk_7197",
|
|
7985
|
+
"col-drag-column-icon": "_col-drag-column-icon_pphrk_7206",
|
|
7986
|
+
"tabular-nums": "_tabular-nums_pphrk_7210",
|
|
7987
|
+
"ag-shake-left-to-right": "_ag-shake-left-to-right_pphrk_342",
|
|
7988
|
+
"spin": "_spin_pphrk_1"
|
|
7984
7989
|
};
|
|
7985
7990
|
|
|
7986
7991
|
// src/CellRenderers/BooleanCell.tsx
|
|
@@ -54285,7 +54290,7 @@ function ServerSideNumberFilterRenderer({
|
|
|
54285
54290
|
},
|
|
54286
54291
|
{
|
|
54287
54292
|
id: "isEqual",
|
|
54288
|
-
label: I18n.t("options.
|
|
54293
|
+
label: I18n.t("options.is_equal_to", {
|
|
54289
54294
|
defaultValue: "Is Equal To",
|
|
54290
54295
|
scope: "dataTable.filters.numberFilter"
|
|
54291
54296
|
})
|
|
@@ -54772,26 +54777,19 @@ function serializeNode(node) {
|
|
|
54772
54777
|
rowPinned: node.rowPinned
|
|
54773
54778
|
};
|
|
54774
54779
|
}
|
|
54775
|
-
function transformToColDef(colDefinition,
|
|
54780
|
+
function transformToColDef(colDefinition, tableOptions) {
|
|
54776
54781
|
if (isNestedColumnDefinition(colDefinition)) {
|
|
54777
54782
|
return {
|
|
54778
54783
|
...colDefinition,
|
|
54779
54784
|
children: colDefinition.children.map(
|
|
54780
|
-
(childColDefinition) => transformColumnDefinitionToColDef(
|
|
54781
|
-
childColDefinition,
|
|
54782
|
-
enableGroupEditAndValidation,
|
|
54783
|
-
enableDynamicRowHeight
|
|
54784
|
-
)
|
|
54785
|
+
(childColDefinition) => transformColumnDefinitionToColDef(childColDefinition, tableOptions)
|
|
54785
54786
|
)
|
|
54786
54787
|
};
|
|
54787
54788
|
}
|
|
54788
|
-
return transformColumnDefinitionToColDef(
|
|
54789
|
-
colDefinition,
|
|
54790
|
-
enableGroupEditAndValidation,
|
|
54791
|
-
enableDynamicRowHeight
|
|
54792
|
-
);
|
|
54789
|
+
return transformColumnDefinitionToColDef(colDefinition, tableOptions);
|
|
54793
54790
|
}
|
|
54794
|
-
function transformColumnDefinitionToColDef(dataTableColumnDefinition,
|
|
54791
|
+
function transformColumnDefinitionToColDef(dataTableColumnDefinition, tableOptions) {
|
|
54792
|
+
const { enableGroupEditAndValidation, enableDynamicRowHeight } = tableOptions;
|
|
54795
54793
|
const {
|
|
54796
54794
|
aggFunc,
|
|
54797
54795
|
bulkEditable,
|
|
@@ -54834,7 +54832,8 @@ function transformColumnDefinitionToColDef(dataTableColumnDefinition, enableGrou
|
|
|
54834
54832
|
};
|
|
54835
54833
|
const cellClassRules = {
|
|
54836
54834
|
"invalid-cell": function isValid(params) {
|
|
54837
|
-
const
|
|
54835
|
+
const shouldValidateGroupHeader = tableOptions.enableGroupHeaderEdit && params.node.group;
|
|
54836
|
+
const shouldValidate = !params.node.group && params.data && !params.data.isAggData || enableGroupEditAndValidation && (params.node.footer || params.node.group && !params.node.expanded) || shouldValidateGroupHeader;
|
|
54838
54837
|
return (shouldValidate && valueValidator && !valueValidator({
|
|
54839
54838
|
columnDefinition: transformToColumnDefinition(params.colDef),
|
|
54840
54839
|
data: params.data,
|
|
@@ -55171,12 +55170,8 @@ function addAutoGroupParams(columnDefinition, isRowSelectable, siblingGroupsRowS
|
|
|
55171
55170
|
}
|
|
55172
55171
|
};
|
|
55173
55172
|
}
|
|
55174
|
-
function getDecoratedAutoGroupColDef(columnDefinition,
|
|
55175
|
-
const colDef = columnDefinition ? transformToColDef(
|
|
55176
|
-
columnDefinition,
|
|
55177
|
-
enableGroupEditAndValidation,
|
|
55178
|
-
enableDynamicRowHeight
|
|
55179
|
-
) : DEFAULT_AUTO_GROUP_COLUMN_DEFINITION;
|
|
55173
|
+
function getDecoratedAutoGroupColDef(columnDefinition, tableOptions, isRowSelectable, siblingGroupsRowSelectionDisabled, groupsAlwaysExpanded, isDetailTable) {
|
|
55174
|
+
const colDef = columnDefinition ? transformToColDef(columnDefinition, tableOptions) : DEFAULT_AUTO_GROUP_COLUMN_DEFINITION;
|
|
55180
55175
|
return addAutoGroupParams(
|
|
55181
55176
|
colDef,
|
|
55182
55177
|
isRowSelectable,
|
|
@@ -55187,12 +55182,12 @@ function getDecoratedAutoGroupColDef(columnDefinition, enableGroupEditAndValidat
|
|
|
55187
55182
|
}
|
|
55188
55183
|
|
|
55189
55184
|
// src/CellRenderers/AutoGroupCell.scss
|
|
55190
|
-
var css5 = `.
|
|
55185
|
+
var css5 = `._autoGroupCell_1h6pf_1 {
|
|
55191
55186
|
height: 100%;
|
|
55192
55187
|
width: 100%;
|
|
55193
55188
|
}
|
|
55194
55189
|
|
|
55195
|
-
.
|
|
55190
|
+
._indent_1h6pf_6 {
|
|
55196
55191
|
border-right: 1px solid #d6dadc;
|
|
55197
55192
|
background: #f4f5f6;
|
|
55198
55193
|
position: absolute;
|
|
@@ -55200,45 +55195,69 @@ var css5 = `._autoGroupCell_1qx8z_1 {
|
|
|
55200
55195
|
bottom: -1px;
|
|
55201
55196
|
width: 12px;
|
|
55202
55197
|
}
|
|
55203
|
-
.
|
|
55198
|
+
._indent_1h6pf_6._innermostLastIndent_1h6pf_14 {
|
|
55204
55199
|
bottom: 0px;
|
|
55205
55200
|
}
|
|
55206
55201
|
|
|
55207
|
-
.
|
|
55202
|
+
._expandableCaret_1h6pf_18 {
|
|
55208
55203
|
margin-left: -8px;
|
|
55209
55204
|
margin-right: 4px;
|
|
55210
55205
|
width: 24px;
|
|
55211
55206
|
flex-shrink: 0;
|
|
55212
55207
|
}
|
|
55213
55208
|
|
|
55214
|
-
.
|
|
55209
|
+
._expandableCaretButton_1h6pf_25 {
|
|
55210
|
+
display: inline-flex;
|
|
55211
|
+
align-items: center;
|
|
55212
|
+
justify-content: center;
|
|
55213
|
+
width: 24px;
|
|
55214
|
+
height: 24px;
|
|
55215
|
+
padding: 0;
|
|
55216
|
+
margin-left: -8px;
|
|
55217
|
+
margin-right: 4px;
|
|
55218
|
+
border: none;
|
|
55219
|
+
border-radius: 2px;
|
|
55220
|
+
background: transparent;
|
|
55221
|
+
cursor: pointer;
|
|
55222
|
+
flex-shrink: 0;
|
|
55223
|
+
}
|
|
55224
|
+
._expandableCaretButton_1h6pf_25:focus-visible {
|
|
55225
|
+
outline: 2px solid #2066df;
|
|
55226
|
+
outline-offset: 1px;
|
|
55227
|
+
}
|
|
55228
|
+
._expandableCaretButton_1h6pf_25:hover {
|
|
55229
|
+
background-color: rgba(0, 0, 0, 0.06);
|
|
55230
|
+
}
|
|
55231
|
+
|
|
55232
|
+
._expandCaret_1h6pf_48 {
|
|
55215
55233
|
color: #2066df;
|
|
55216
55234
|
cursor: pointer;
|
|
55217
55235
|
}
|
|
55218
55236
|
|
|
55219
|
-
.
|
|
55237
|
+
._collapseCaret_1h6pf_53 {
|
|
55220
55238
|
color: #75838a;
|
|
55221
55239
|
cursor: pointer;
|
|
55222
55240
|
}
|
|
55223
55241
|
|
|
55224
|
-
.
|
|
55242
|
+
._value_1h6pf_58 {
|
|
55225
55243
|
overflow: hidden;
|
|
55226
55244
|
text-overflow: ellipsis;
|
|
55227
55245
|
font-size: 12px;
|
|
55228
55246
|
}
|
|
55229
|
-
.
|
|
55247
|
+
._value_1h6pf_58._footer_1h6pf_63 {
|
|
55230
55248
|
color: #6a767c;
|
|
55231
55249
|
}`;
|
|
55232
55250
|
document.head.appendChild(document.createElement("style")).appendChild(document.createTextNode(css5));
|
|
55233
55251
|
var AutoGroupCell_default = {
|
|
55234
|
-
"autoGroupCell": "
|
|
55235
|
-
"indent": "
|
|
55236
|
-
"innermostLastIndent": "
|
|
55237
|
-
"expandableCaret": "
|
|
55238
|
-
"
|
|
55239
|
-
"
|
|
55240
|
-
"
|
|
55241
|
-
"
|
|
55252
|
+
"autoGroupCell": "_autoGroupCell_1h6pf_1",
|
|
55253
|
+
"indent": "_indent_1h6pf_6",
|
|
55254
|
+
"innermostLastIndent": "_innermostLastIndent_1h6pf_14",
|
|
55255
|
+
"expandableCaret": "_expandableCaret_1h6pf_18",
|
|
55256
|
+
"expandableCaretButton": "_expandableCaretButton_1h6pf_25",
|
|
55257
|
+
"expandCaret": "_expandCaret_1h6pf_48",
|
|
55258
|
+
"collapseCaret": "_collapseCaret_1h6pf_53",
|
|
55259
|
+
"value": "_value_1h6pf_58",
|
|
55260
|
+
"footer": "_footer_1h6pf_63"
|
|
55242
55261
|
};
|
|
55243
55262
|
|
|
55244
55263
|
// src/utils/rowSelectionHelpers.ts
|
|
@@ -55495,6 +55514,7 @@ var LevelIndents = (props) => {
|
|
|
55495
55514
|
};
|
|
55496
55515
|
function GroupCaret(props) {
|
|
55497
55516
|
const mounted = React80.useRef(false);
|
|
55517
|
+
const buttonRef = React80.useRef(null);
|
|
55498
55518
|
const [expanded, setExpanded] = useState(props.node.expanded);
|
|
55499
55519
|
const ExpandableCaret = expanded ? CaretDown : CaretRight;
|
|
55500
55520
|
const I18n = useI18nContext();
|
|
@@ -55505,6 +55525,16 @@ function GroupCaret(props) {
|
|
|
55505
55525
|
}, 0);
|
|
55506
55526
|
}
|
|
55507
55527
|
}
|
|
55528
|
+
const handleToggle = () => {
|
|
55529
|
+
props.api.setRowNodeExpanded(props.node, !expanded);
|
|
55530
|
+
};
|
|
55531
|
+
const handleKeyDown = (event) => {
|
|
55532
|
+
if (event.key === "Enter" || event.key === " ") {
|
|
55533
|
+
event.preventDefault();
|
|
55534
|
+
event.stopPropagation();
|
|
55535
|
+
handleToggle();
|
|
55536
|
+
}
|
|
55537
|
+
};
|
|
55508
55538
|
useEffect(() => {
|
|
55509
55539
|
mounted.current = true;
|
|
55510
55540
|
props.api.addEventListener("rowGroupOpened", handleRowGroupToggle);
|
|
@@ -55517,20 +55547,45 @@ function GroupCaret(props) {
|
|
|
55517
55547
|
);
|
|
55518
55548
|
};
|
|
55519
55549
|
}, []);
|
|
55550
|
+
useEffect(() => {
|
|
55551
|
+
if (!props.node.isExpandable()) return;
|
|
55552
|
+
const cell2 = buttonRef.current?.closest(".ag-cell");
|
|
55553
|
+
if (!cell2) return;
|
|
55554
|
+
const handleCellKeyDown = (event) => {
|
|
55555
|
+
if (event.key !== "Enter" && event.key !== " ") return;
|
|
55556
|
+
if (!event.isTrusted) return;
|
|
55557
|
+
const target = event.target;
|
|
55558
|
+
if (target.closest("button") || target.closest("input")) return;
|
|
55559
|
+
event.preventDefault();
|
|
55560
|
+
event.stopImmediatePropagation();
|
|
55561
|
+
buttonRef.current?.click();
|
|
55562
|
+
};
|
|
55563
|
+
cell2.addEventListener("keydown", handleCellKeyDown, { capture: true });
|
|
55564
|
+
return () => {
|
|
55565
|
+
cell2.removeEventListener("keydown", handleCellKeyDown, { capture: true });
|
|
55566
|
+
};
|
|
55567
|
+
}, []);
|
|
55568
|
+
if (!props.node.isExpandable()) {
|
|
55569
|
+
return /* @__PURE__ */ React80.createElement("div", { className: AutoGroupCell_default.expandableCaret });
|
|
55570
|
+
}
|
|
55520
55571
|
return /* @__PURE__ */ React80.createElement(
|
|
55521
|
-
|
|
55572
|
+
"button",
|
|
55522
55573
|
{
|
|
55574
|
+
type: "button",
|
|
55575
|
+
ref: buttonRef,
|
|
55576
|
+
"aria-expanded": expanded,
|
|
55523
55577
|
"aria-label": I18n.t(
|
|
55524
55578
|
`dataTable.groupCell.${expanded ? "collapse" : "expand"}`
|
|
55525
55579
|
),
|
|
55526
|
-
className: AutoGroupCell_default.
|
|
55527
|
-
|
|
55580
|
+
className: AutoGroupCell_default.expandableCaretButton,
|
|
55581
|
+
onClick: handleToggle,
|
|
55582
|
+
onKeyDown: handleKeyDown,
|
|
55583
|
+
"data-qa": "group-expand-collapse"
|
|
55528
55584
|
},
|
|
55529
|
-
|
|
55585
|
+
/* @__PURE__ */ React80.createElement(
|
|
55530
55586
|
ExpandableCaret,
|
|
55531
55587
|
{
|
|
55532
|
-
className: expanded ? AutoGroupCell_default.collapseCaret : AutoGroupCell_default.expandCaret
|
|
55533
|
-
onClick: () => props.api.setRowNodeExpanded(props.node, !expanded)
|
|
55588
|
+
className: expanded ? AutoGroupCell_default.collapseCaret : AutoGroupCell_default.expandCaret
|
|
55534
55589
|
}
|
|
55535
55590
|
)
|
|
55536
55591
|
);
|
|
@@ -56387,10 +56442,15 @@ var css7 = `.data-table-container .ag-header-cell .data-table-header-menu {
|
|
|
56387
56442
|
align-items: center;
|
|
56388
56443
|
justify-content: center;
|
|
56389
56444
|
background-color: #e3e6e8;
|
|
56445
|
+
border: none;
|
|
56390
56446
|
border-radius: 2px;
|
|
56391
56447
|
cursor: pointer;
|
|
56392
56448
|
margin-right: 8px;
|
|
56393
56449
|
}
|
|
56450
|
+
.data-table-container .ag-header-cell .expand-button:focus-visible {
|
|
56451
|
+
outline: 2px solid #2066df;
|
|
56452
|
+
outline-offset: 1px;
|
|
56453
|
+
}
|
|
56394
56454
|
.data-table-container .ag-header-group-cell-with-group .ag-header-cell-comp-wrapper {
|
|
56395
56455
|
width: 100%;
|
|
56396
56456
|
overflow: hidden;
|
|
@@ -56403,10 +56463,15 @@ var css7 = `.data-table-container .ag-header-cell .data-table-header-menu {
|
|
|
56403
56463
|
align-items: center;
|
|
56404
56464
|
justify-content: center;
|
|
56405
56465
|
background-color: #e3e6e8;
|
|
56466
|
+
border: none;
|
|
56406
56467
|
border-radius: 2px;
|
|
56407
56468
|
cursor: pointer;
|
|
56408
56469
|
margin-left: auto;
|
|
56409
56470
|
}
|
|
56471
|
+
.data-table-container .ag-header-group-cell-with-group .expand-button:focus-visible {
|
|
56472
|
+
outline: 2px solid #2066df;
|
|
56473
|
+
outline-offset: 1px;
|
|
56474
|
+
}
|
|
56410
56475
|
.data-table-container .auto-column-expand-tooltip-content {
|
|
56411
56476
|
width: 96px;
|
|
56412
56477
|
}
|
|
@@ -56554,6 +56619,7 @@ var GenericHeaderRenderer = (props) => {
|
|
|
56554
56619
|
I18n
|
|
56555
56620
|
);
|
|
56556
56621
|
const headerCellRef = useRef(null);
|
|
56622
|
+
const expandButtonRef = useRef(null);
|
|
56557
56623
|
const menuButtonRef = useRef(null);
|
|
56558
56624
|
const headerCheckboxSelection = colDef.headerCheckboxSelection;
|
|
56559
56625
|
const headerCheckboxSelectionEnabled = typeof headerCheckboxSelection === "function" ? headerCheckboxSelection({
|
|
@@ -56704,6 +56770,28 @@ var GenericHeaderRenderer = (props) => {
|
|
|
56704
56770
|
);
|
|
56705
56771
|
}
|
|
56706
56772
|
React80.useEffect(updateExpandedState);
|
|
56773
|
+
React80.useEffect(() => {
|
|
56774
|
+
if (!isExpandable) return;
|
|
56775
|
+
const headerCell = headerCellRef.current?.closest(".ag-header-cell");
|
|
56776
|
+
if (!headerCell) return;
|
|
56777
|
+
const handleExpandKeyDown = (event) => {
|
|
56778
|
+
if (event.key !== "Enter" && event.key !== " ") return;
|
|
56779
|
+
if (!event.isTrusted) return;
|
|
56780
|
+
const target = event.target;
|
|
56781
|
+
if (target.closest("button") || target.closest("input")) return;
|
|
56782
|
+
event.preventDefault();
|
|
56783
|
+
event.stopImmediatePropagation();
|
|
56784
|
+
expandButtonRef.current?.click();
|
|
56785
|
+
};
|
|
56786
|
+
headerCell.addEventListener("keydown", handleExpandKeyDown, {
|
|
56787
|
+
capture: true
|
|
56788
|
+
});
|
|
56789
|
+
return () => {
|
|
56790
|
+
headerCell.removeEventListener("keydown", handleExpandKeyDown, {
|
|
56791
|
+
capture: true
|
|
56792
|
+
});
|
|
56793
|
+
};
|
|
56794
|
+
}, [isExpandable]);
|
|
56707
56795
|
const [expansionVariant, setExpansionVariant] = React80.useState("closed");
|
|
56708
56796
|
React80.useEffect(() => {
|
|
56709
56797
|
const onExpandAllChange = (event) => {
|
|
@@ -56981,12 +57069,21 @@ var GenericHeaderRenderer = (props) => {
|
|
|
56981
57069
|
overlay: /* @__PURE__ */ React80.createElement(Tooltip.Content, { className: "auto-column-expand-tooltip-content" }, tooltipText[expansionVariant])
|
|
56982
57070
|
},
|
|
56983
57071
|
/* @__PURE__ */ React80.createElement(
|
|
56984
|
-
"
|
|
57072
|
+
"button",
|
|
56985
57073
|
{
|
|
57074
|
+
type: "button",
|
|
57075
|
+
ref: expandButtonRef,
|
|
57076
|
+
"aria-expanded": expansionVariant !== "closed",
|
|
56986
57077
|
"aria-label": tooltipText[expansionVariant],
|
|
56987
57078
|
className: "expand-button",
|
|
56988
57079
|
onClick: onExpandToggle,
|
|
56989
|
-
|
|
57080
|
+
onKeyDown: (e) => {
|
|
57081
|
+
if (e.key === "Enter" || e.key === " ") {
|
|
57082
|
+
e.preventDefault();
|
|
57083
|
+
e.stopPropagation();
|
|
57084
|
+
onExpandToggle(e);
|
|
57085
|
+
}
|
|
57086
|
+
},
|
|
56990
57087
|
"data-qa": "expand-or-collapse-all-button"
|
|
56991
57088
|
},
|
|
56992
57089
|
/* @__PURE__ */ React80.createElement(ExpansionVariantIcon, { size: "sm" })
|
|
@@ -57811,6 +57908,7 @@ var InternalTableContext = React80.createContext({
|
|
|
57811
57908
|
hide: () => {
|
|
57812
57909
|
},
|
|
57813
57910
|
isVisible: false,
|
|
57911
|
+
panelRef: React80.createRef(),
|
|
57814
57912
|
show: () => {
|
|
57815
57913
|
}
|
|
57816
57914
|
},
|
|
@@ -59614,14 +59712,16 @@ var useRowSelectionState = () => {
|
|
|
59614
59712
|
var BulkEditActionButton = (props) => {
|
|
59615
59713
|
const { contextPanel } = useInternalTableContext();
|
|
59616
59714
|
const i18n = useI18nContext();
|
|
59715
|
+
const buttonRef = React80.useRef(null);
|
|
59617
59716
|
const editActionLabel = props.actionText ?? i18n.t("dataTable.bulkActions.editValues");
|
|
59618
59717
|
return /* @__PURE__ */ React80.createElement(
|
|
59619
59718
|
Button,
|
|
59620
59719
|
{
|
|
59720
|
+
ref: buttonRef,
|
|
59621
59721
|
"aria-label": i18n.t("dataTable.bulkActions.bulkEdit"),
|
|
59622
59722
|
"data-qa": "bulkEditIcon",
|
|
59623
59723
|
icon: /* @__PURE__ */ React80.createElement(Pencil, null),
|
|
59624
|
-
onClick: () => contextPanel.show("bulkEdit"),
|
|
59724
|
+
onClick: () => contextPanel.show("bulkEdit", buttonRef.current ?? void 0),
|
|
59625
59725
|
variant: "tertiary"
|
|
59626
59726
|
},
|
|
59627
59727
|
props.showLabel && editActionLabel
|
|
@@ -104248,10 +104348,6 @@ var BulkEditPanel = ({}) => {
|
|
|
104248
104348
|
const { contextPanel, suppressBulkEditToasts } = useInternalTableContext();
|
|
104249
104349
|
const I18n = useI18nContext();
|
|
104250
104350
|
const bulkEditRef = React80.useRef(null);
|
|
104251
|
-
const bodyRef = React80.useRef(null);
|
|
104252
|
-
useEffect(() => {
|
|
104253
|
-
bodyRef.current?.focus();
|
|
104254
|
-
}, []);
|
|
104255
104351
|
return /* @__PURE__ */ React80.createElement(Panel, null, /* @__PURE__ */ React80.createElement(
|
|
104256
104352
|
Panel.Header,
|
|
104257
104353
|
{
|
|
@@ -104261,7 +104357,7 @@ var BulkEditPanel = ({}) => {
|
|
|
104261
104357
|
}
|
|
104262
104358
|
},
|
|
104263
104359
|
/* @__PURE__ */ React80.createElement(Panel.Title, null, I18n.t("dataTable.bulkActions.editValues"))
|
|
104264
|
-
), /* @__PURE__ */ React80.createElement(Panel.Body,
|
|
104360
|
+
), /* @__PURE__ */ React80.createElement(Panel.Body, null, /* @__PURE__ */ React80.createElement(Panel.Section, null, /* @__PURE__ */ React80.createElement(
|
|
104265
104361
|
BulkEdit,
|
|
104266
104362
|
{
|
|
104267
104363
|
ref: bulkEditRef,
|
|
@@ -104542,11 +104638,10 @@ var ConfigurationColumns = React80.forwardRef(
|
|
|
104542
104638
|
return columnDefs;
|
|
104543
104639
|
}
|
|
104544
104640
|
const columnDefinitionsMappedToDefs = columnDefinitions.map(
|
|
104545
|
-
(colDef) => transformToColDef(
|
|
104546
|
-
colDef,
|
|
104641
|
+
(colDef) => transformToColDef(colDef, {
|
|
104547
104642
|
enableGroupEditAndValidation,
|
|
104548
104643
|
enableDynamicRowHeight
|
|
104549
|
-
)
|
|
104644
|
+
})
|
|
104550
104645
|
);
|
|
104551
104646
|
return toGroupedCols(columnDefinitionsMappedToDefs);
|
|
104552
104647
|
});
|
|
@@ -104697,18 +104792,33 @@ var ConfigurationPanel = ({
|
|
|
104697
104792
|
function useContextPanel() {
|
|
104698
104793
|
const [content, setContent] = useState();
|
|
104699
104794
|
const visibility = useVisibility({ afterHide: () => setContent(void 0) });
|
|
104700
|
-
const
|
|
104701
|
-
|
|
104702
|
-
|
|
104703
|
-
|
|
104795
|
+
const triggerRef = useRef(null);
|
|
104796
|
+
const panelRef = useRef(null);
|
|
104797
|
+
const show = useCallback(
|
|
104798
|
+
(panelContent, trigger) => {
|
|
104799
|
+
triggerRef.current = trigger ?? null;
|
|
104800
|
+
setContent(panelContent);
|
|
104801
|
+
visibility.show();
|
|
104802
|
+
},
|
|
104803
|
+
[]
|
|
104804
|
+
);
|
|
104704
104805
|
const hide = useCallback(() => {
|
|
104806
|
+
const trigger = triggerRef.current;
|
|
104705
104807
|
setContent(void 0);
|
|
104706
104808
|
visibility.hide();
|
|
104809
|
+
trigger?.focus();
|
|
104810
|
+
triggerRef.current = null;
|
|
104707
104811
|
}, []);
|
|
104812
|
+
useEffect(() => {
|
|
104813
|
+
if (content) {
|
|
104814
|
+
panelRef.current?.focus();
|
|
104815
|
+
}
|
|
104816
|
+
}, [content]);
|
|
104708
104817
|
return {
|
|
104709
104818
|
content,
|
|
104710
104819
|
hide,
|
|
104711
104820
|
isVisible: visibility.isVisible,
|
|
104821
|
+
panelRef,
|
|
104712
104822
|
show
|
|
104713
104823
|
};
|
|
104714
104824
|
}
|
|
@@ -104845,8 +104955,10 @@ var buildDetailRowsConfig_ = (detailRowConfig, {
|
|
|
104845
104955
|
alwaysAggregateAtRootLevel: !isServerSideRowModel,
|
|
104846
104956
|
autoGroupColumnDef: getDecoratedAutoGroupColDef(
|
|
104847
104957
|
detailRowConfig.autoGroupColumnDefinition,
|
|
104848
|
-
|
|
104849
|
-
|
|
104958
|
+
{
|
|
104959
|
+
enableGroupEditAndValidation,
|
|
104960
|
+
enableDynamicRowHeight
|
|
104961
|
+
},
|
|
104850
104962
|
isRowSelectable,
|
|
104851
104963
|
false,
|
|
104852
104964
|
detailRowConfig.groupsAlwaysExpanded ?? false,
|
|
@@ -104858,11 +104970,10 @@ var buildDetailRowsConfig_ = (detailRowConfig, {
|
|
|
104858
104970
|
},
|
|
104859
104971
|
columnDefs: toGroupedCols(
|
|
104860
104972
|
detailRowConfig.columnDefinitions.map(
|
|
104861
|
-
(colDef) => transformToColDef(
|
|
104862
|
-
colDef,
|
|
104973
|
+
(colDef) => transformToColDef(colDef, {
|
|
104863
104974
|
enableGroupEditAndValidation,
|
|
104864
|
-
colDef.autoHeight ?? enableDynamicRowHeight
|
|
104865
|
-
)
|
|
104975
|
+
enableDynamicRowHeight: colDef.autoHeight ?? enableDynamicRowHeight
|
|
104976
|
+
})
|
|
104866
104977
|
)
|
|
104867
104978
|
),
|
|
104868
104979
|
groupsAlwaysExpanded: detailRowConfig.groupsAlwaysExpanded ?? false,
|
|
@@ -109995,11 +110106,16 @@ function getServerSideDatasource(onServerSideDataRequestCallbackRef, onEmptyResp
|
|
|
109995
110106
|
};
|
|
109996
110107
|
}
|
|
109997
110108
|
var minimumColumnWidth = 140;
|
|
110109
|
+
function resolveGroupIncludeFooter(props, onSSDR) {
|
|
110110
|
+
if (props.enableGroupHeaderEdit) return false;
|
|
110111
|
+
if (!onSSDR && props.groupIncludeFooter === void 0) return true;
|
|
110112
|
+
return props.groupIncludeFooter;
|
|
110113
|
+
}
|
|
109998
110114
|
function useComputeAgGridProps(props) {
|
|
109999
110115
|
const internalTableContext = useInternalTableContext();
|
|
110000
110116
|
const onSSDR = internalTableContext.onServerSideDataRequest;
|
|
110001
110117
|
return {
|
|
110002
|
-
groupIncludeFooter:
|
|
110118
|
+
groupIncludeFooter: resolveGroupIncludeFooter(props, !!onSSDR),
|
|
110003
110119
|
rowDragManaged: onSSDR ? false : props.rowDragManaged ?? true,
|
|
110004
110120
|
rowModelType: onSSDR ? "serverSide" : void 0,
|
|
110005
110121
|
groupSelectsChildren: (
|
|
@@ -110072,11 +110188,11 @@ var Table = (props) => {
|
|
|
110072
110188
|
});
|
|
110073
110189
|
const decoratedColDefs = React80.useMemo(
|
|
110074
110190
|
() => internalTableContext.columnDefinitions?.map((colDef) => {
|
|
110075
|
-
const newColDef = transformToColDef(
|
|
110076
|
-
|
|
110077
|
-
internalTableContext.
|
|
110078
|
-
|
|
110079
|
-
);
|
|
110191
|
+
const newColDef = transformToColDef(colDef, {
|
|
110192
|
+
enableGroupEditAndValidation: internalTableContext.enableGroupEditAndValidation,
|
|
110193
|
+
enableDynamicRowHeight: internalTableContext.enableDynamicRowHeight,
|
|
110194
|
+
enableGroupHeaderEdit: props.enableGroupHeaderEdit
|
|
110195
|
+
});
|
|
110080
110196
|
return {
|
|
110081
110197
|
...newColDef,
|
|
110082
110198
|
editable: overrideEditable(colDef.editable)
|
|
@@ -110362,8 +110478,10 @@ var Table = (props) => {
|
|
|
110362
110478
|
const decoratedAutoGroupColDef = React80.useMemo(
|
|
110363
110479
|
() => getDecoratedAutoGroupColDef(
|
|
110364
110480
|
props?.autoGroupColumnDefinition,
|
|
110365
|
-
|
|
110366
|
-
|
|
110481
|
+
{
|
|
110482
|
+
enableGroupEditAndValidation: internalTableContext.enableGroupEditAndValidation,
|
|
110483
|
+
enableDynamicRowHeight: internalTableContext.enableDynamicRowHeight
|
|
110484
|
+
},
|
|
110367
110485
|
isRowSelectable,
|
|
110368
110486
|
props.siblingGroupsRowSelectionDisabled,
|
|
110369
110487
|
props.groupsAlwaysExpanded ?? false,
|
|
@@ -110964,9 +111082,26 @@ var ContextPanel = ({
|
|
|
110964
111082
|
...props
|
|
110965
111083
|
}) => {
|
|
110966
111084
|
const { contextPanel } = useInternalTableContext();
|
|
111085
|
+
const I18n = useI18nContext();
|
|
111086
|
+
const cardRef = React80.useRef(null);
|
|
111087
|
+
const panelLabelKeys = {
|
|
111088
|
+
configuration: "dataTable.tableSettings.tableSettings",
|
|
111089
|
+
bulkEdit: "dataTable.bulkActions.editValues"
|
|
111090
|
+
};
|
|
111091
|
+
const panelLabel = contextPanel.content ? panelLabelKeys[contextPanel.content] : void 0;
|
|
111092
|
+
const ariaLabel = panelLabel ? I18n.t(panelLabel) : void 0;
|
|
111093
|
+
React80.useLayoutEffect(() => {
|
|
111094
|
+
if (contextPanel.content && contextPanel.content !== "filters") {
|
|
111095
|
+
contextPanel.panelRef.current = cardRef.current;
|
|
111096
|
+
}
|
|
111097
|
+
}, [contextPanel.content, contextPanel.panelRef]);
|
|
110967
111098
|
return /* @__PURE__ */ React80.createElement(
|
|
110968
111099
|
Card,
|
|
110969
111100
|
{
|
|
111101
|
+
ref: cardRef,
|
|
111102
|
+
tabIndex: -1,
|
|
111103
|
+
role: "region",
|
|
111104
|
+
"aria-label": ariaLabel,
|
|
110970
111105
|
className: cx19("contextPanel", className, {
|
|
110971
111106
|
"contextPanel--hidden": !contextPanel.isVisible || contextPanel.content === "filters"
|
|
110972
111107
|
}),
|
|
@@ -111238,19 +111373,27 @@ var BaseFiltersPanel = ({
|
|
|
111238
111373
|
onClearAllFilters = noop5,
|
|
111239
111374
|
...props
|
|
111240
111375
|
}) => {
|
|
111241
|
-
const
|
|
111376
|
+
const cardRef = React80.useRef(null);
|
|
111242
111377
|
const { contextPanel, filtersBodyId, filtersPanelId } = useInternalTableContext();
|
|
111243
111378
|
const I18n = useI18nContext();
|
|
111244
111379
|
const hidden = !contextPanel.isVisible || contextPanel.content !== "filters";
|
|
111245
111380
|
React80.useLayoutEffect(() => {
|
|
111246
|
-
if (
|
|
111247
|
-
|
|
111381
|
+
if (contextPanel.content === "filters") {
|
|
111382
|
+
contextPanel.panelRef.current = cardRef.current;
|
|
111383
|
+
}
|
|
111384
|
+
}, [contextPanel.content, contextPanel.panelRef]);
|
|
111385
|
+
React80.useLayoutEffect(() => {
|
|
111386
|
+
if (cardRef.current) {
|
|
111387
|
+
cardRef.current.inert = hidden;
|
|
111248
111388
|
}
|
|
111249
111389
|
}, [hidden]);
|
|
111250
111390
|
return /* @__PURE__ */ React80.createElement(
|
|
111251
111391
|
Card,
|
|
111252
111392
|
{
|
|
111253
|
-
ref,
|
|
111393
|
+
ref: cardRef,
|
|
111394
|
+
tabIndex: -1,
|
|
111395
|
+
role: "region",
|
|
111396
|
+
"aria-label": I18n.t("dataTable.filters.filters"),
|
|
111254
111397
|
style: { maxHeight: "100vh" },
|
|
111255
111398
|
className: cx20("contextPanel", className, {
|
|
111256
111399
|
"contextPanel--hidden": hidden
|
|
@@ -111304,6 +111447,7 @@ var ConfigPanelButton = () => {
|
|
|
111304
111447
|
const { contextPanel } = useInternalTableContext();
|
|
111305
111448
|
const hasNoContent = useTableHasNoContent();
|
|
111306
111449
|
const I18n = useI18nContext();
|
|
111450
|
+
const buttonRef = React80.useRef(null);
|
|
111307
111451
|
return /* @__PURE__ */ React80.createElement(
|
|
111308
111452
|
EmptyResultsControlTooltip,
|
|
111309
111453
|
{
|
|
@@ -111313,12 +111457,13 @@ var ConfigPanelButton = () => {
|
|
|
111313
111457
|
/* @__PURE__ */ React80.createElement(
|
|
111314
111458
|
ToggleButton,
|
|
111315
111459
|
{
|
|
111460
|
+
ref: buttonRef,
|
|
111316
111461
|
disabled: hasNoContent,
|
|
111317
111462
|
onClick: () => {
|
|
111318
111463
|
if (contextPanel.content === "configuration") {
|
|
111319
111464
|
contextPanel.hide();
|
|
111320
111465
|
} else {
|
|
111321
|
-
contextPanel.show("configuration");
|
|
111466
|
+
contextPanel.show("configuration", buttonRef.current ?? void 0);
|
|
111322
111467
|
}
|
|
111323
111468
|
},
|
|
111324
111469
|
icon: /* @__PURE__ */ React80.createElement(
|
|
@@ -112471,26 +112616,12 @@ var SingleSelectQuickFilterRenderer = (props) => {
|
|
|
112471
112616
|
return /* @__PURE__ */ React80.createElement(ClientSideSingleSelectQuickFilter, { ...props });
|
|
112472
112617
|
};
|
|
112473
112618
|
var SingleSelectQuickFilterRenderer_default = SingleSelectQuickFilterRenderer;
|
|
112474
|
-
var FOCUSABLE_SELECTOR2 = 'button:not([disabled]), input:not([disabled]), select:not([disabled]), textarea:not([disabled]), [tabindex]:not([tabindex="-1"])';
|
|
112475
112619
|
var FiltersPanelToggleButton = ({ hasDefinedFilters }) => {
|
|
112476
112620
|
const I18n = useI18nContext();
|
|
112477
|
-
const { contextPanel,
|
|
112621
|
+
const { contextPanel, filtersPanelId } = useInternalTableContext();
|
|
112478
112622
|
const hasNoContent = useTableHasNoContent();
|
|
112479
112623
|
const buttonRef = React80.useRef(null);
|
|
112480
112624
|
const isFiltersOpen = contextPanel.content === "filters";
|
|
112481
|
-
const isMounted = React80.useRef(false);
|
|
112482
|
-
React80.useEffect(() => {
|
|
112483
|
-
if (!isMounted.current) {
|
|
112484
|
-
isMounted.current = true;
|
|
112485
|
-
return;
|
|
112486
|
-
}
|
|
112487
|
-
if (isFiltersOpen) {
|
|
112488
|
-
const panel = filtersBodyId ? document.getElementById(filtersBodyId) : null;
|
|
112489
|
-
panel?.querySelector(FOCUSABLE_SELECTOR2)?.focus();
|
|
112490
|
-
} else {
|
|
112491
|
-
buttonRef.current?.focus();
|
|
112492
|
-
}
|
|
112493
|
-
}, [isFiltersOpen, filtersBodyId]);
|
|
112494
112625
|
if (!hasDefinedFilters) {
|
|
112495
112626
|
return null;
|
|
112496
112627
|
}
|
|
@@ -112511,7 +112642,7 @@ var FiltersPanelToggleButton = ({ hasDefinedFilters }) => {
|
|
|
112511
112642
|
"aria-controls": filtersPanelId,
|
|
112512
112643
|
onClick: () => {
|
|
112513
112644
|
if (!isFiltersOpen) {
|
|
112514
|
-
contextPanel.show("filters");
|
|
112645
|
+
contextPanel.show("filters", buttonRef.current ?? void 0);
|
|
112515
112646
|
} else {
|
|
112516
112647
|
contextPanel.hide();
|
|
112517
112648
|
}
|