@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/legacy/index.cjs
CHANGED
|
@@ -1402,7 +1402,7 @@ ag-grid, ag-grid-angular, ag-grid-ng2, ag-grid-polymer, ag-grid-aurelia {
|
|
|
1402
1402
|
animation-iteration-count: infinite;
|
|
1403
1403
|
animation-name: ag-shake-left-to-right;
|
|
1404
1404
|
}
|
|
1405
|
-
@keyframes _ag-shake-left-to-
|
|
1405
|
+
@keyframes _ag-shake-left-to-right_pphrk_342 {
|
|
1406
1406
|
from {
|
|
1407
1407
|
padding-left: 6px;
|
|
1408
1408
|
padding-right: 2px;
|
|
@@ -5403,7 +5403,7 @@ input[class^=ag-][type=button]:focus, button[class^=ag-]:focus {
|
|
|
5403
5403
|
animation-iteration-count: infinite;
|
|
5404
5404
|
animation-timing-function: linear;
|
|
5405
5405
|
}
|
|
5406
|
-
@keyframes
|
|
5406
|
+
@keyframes _spin_pphrk_1 {
|
|
5407
5407
|
from {
|
|
5408
5408
|
transform: rotate(0deg);
|
|
5409
5409
|
}
|
|
@@ -7935,7 +7935,7 @@ input[class^=ag-][type=range]:disabled {
|
|
|
7935
7935
|
padding-left: 16px;
|
|
7936
7936
|
}
|
|
7937
7937
|
|
|
7938
|
-
div.
|
|
7938
|
+
div._contextPanel_pphrk_7159 {
|
|
7939
7939
|
width: 400px;
|
|
7940
7940
|
transition: all ease 500ms;
|
|
7941
7941
|
flex: 0 0 auto;
|
|
@@ -7944,7 +7944,12 @@ div._contextPanel_1ern5_7159 {
|
|
|
7944
7944
|
border: 1px solid #d6dadc;
|
|
7945
7945
|
display: flex;
|
|
7946
7946
|
}
|
|
7947
|
-
div.
|
|
7947
|
+
div._contextPanel_pphrk_7159:focus {
|
|
7948
|
+
border-color: #2066df;
|
|
7949
|
+
box-shadow: inset 0 0 1px 0 #2066df;
|
|
7950
|
+
outline: none;
|
|
7951
|
+
}
|
|
7952
|
+
div._contextPanel--hidden_pphrk_7173 {
|
|
7948
7953
|
border: none;
|
|
7949
7954
|
overflow: hidden;
|
|
7950
7955
|
padding: 0px;
|
|
@@ -7952,50 +7957,50 @@ div._contextPanel--hidden_1ern5_7168 {
|
|
|
7952
7957
|
width: 0px;
|
|
7953
7958
|
}
|
|
7954
7959
|
|
|
7955
|
-
.
|
|
7960
|
+
._contextPanelWrapper_pphrk_7181 {
|
|
7956
7961
|
position: relative;
|
|
7957
7962
|
flex-grow: 1;
|
|
7958
7963
|
}
|
|
7959
7964
|
|
|
7960
|
-
.
|
|
7965
|
+
._contextPanelBody_pphrk_7186 {
|
|
7961
7966
|
width: clamp(380px, 400px, 100%);
|
|
7962
7967
|
}
|
|
7963
7968
|
|
|
7964
|
-
._contextPanel-
|
|
7969
|
+
._contextPanel-stickyHeader_pphrk_7190 {
|
|
7965
7970
|
background-color: #ffffff;
|
|
7966
7971
|
position: sticky;
|
|
7967
7972
|
top: 0;
|
|
7968
7973
|
z-index: 5;
|
|
7969
7974
|
}
|
|
7970
7975
|
|
|
7971
|
-
._filters-
|
|
7976
|
+
._filters-list_pphrk_7197 {
|
|
7972
7977
|
padding: 0;
|
|
7973
7978
|
margin: 0;
|
|
7974
7979
|
}
|
|
7975
|
-
._filters-
|
|
7980
|
+
._filters-list_pphrk_7197 ol {
|
|
7976
7981
|
padding: 0;
|
|
7977
7982
|
margin: 0;
|
|
7978
7983
|
}
|
|
7979
7984
|
|
|
7980
|
-
._col-drag-column-
|
|
7985
|
+
._col-drag-column-icon_pphrk_7206 {
|
|
7981
7986
|
color: #6a767c;
|
|
7982
7987
|
}
|
|
7983
7988
|
|
|
7984
|
-
._tabular-
|
|
7989
|
+
._tabular-nums_pphrk_7210 {
|
|
7985
7990
|
font-variant-numeric: tabular-nums;
|
|
7986
7991
|
}`;
|
|
7987
7992
|
document.head.appendChild(document.createElement("style")).appendChild(document.createTextNode(css));
|
|
7988
7993
|
var styles_default = {
|
|
7989
|
-
"contextPanel": "
|
|
7990
|
-
"contextPanel--hidden": "_contextPanel--
|
|
7991
|
-
"contextPanelWrapper": "
|
|
7992
|
-
"contextPanelBody": "
|
|
7993
|
-
"contextPanel-stickyHeader": "_contextPanel-
|
|
7994
|
-
"filters-list": "_filters-
|
|
7995
|
-
"col-drag-column-icon": "_col-drag-column-
|
|
7996
|
-
"tabular-nums": "_tabular-
|
|
7997
|
-
"ag-shake-left-to-right": "_ag-shake-left-to-
|
|
7998
|
-
"spin": "
|
|
7994
|
+
"contextPanel": "_contextPanel_pphrk_7159",
|
|
7995
|
+
"contextPanel--hidden": "_contextPanel--hidden_pphrk_7173",
|
|
7996
|
+
"contextPanelWrapper": "_contextPanelWrapper_pphrk_7181",
|
|
7997
|
+
"contextPanelBody": "_contextPanelBody_pphrk_7186",
|
|
7998
|
+
"contextPanel-stickyHeader": "_contextPanel-stickyHeader_pphrk_7190",
|
|
7999
|
+
"filters-list": "_filters-list_pphrk_7197",
|
|
8000
|
+
"col-drag-column-icon": "_col-drag-column-icon_pphrk_7206",
|
|
8001
|
+
"tabular-nums": "_tabular-nums_pphrk_7210",
|
|
8002
|
+
"ag-shake-left-to-right": "_ag-shake-left-to-right_pphrk_342",
|
|
8003
|
+
"spin": "_spin_pphrk_1"
|
|
7999
8004
|
};
|
|
8000
8005
|
|
|
8001
8006
|
// src/CellRenderers/BooleanCell.tsx
|
|
@@ -54338,7 +54343,7 @@ function ServerSideNumberFilterRenderer({
|
|
|
54338
54343
|
},
|
|
54339
54344
|
{
|
|
54340
54345
|
id: "isEqual",
|
|
54341
|
-
label: I18n.t("options.
|
|
54346
|
+
label: I18n.t("options.is_equal_to", {
|
|
54342
54347
|
defaultValue: "Is Equal To",
|
|
54343
54348
|
scope: "dataTable.filters.numberFilter"
|
|
54344
54349
|
})
|
|
@@ -54836,26 +54841,19 @@ function serializeNode(node) {
|
|
|
54836
54841
|
rowPinned: node.rowPinned
|
|
54837
54842
|
};
|
|
54838
54843
|
}
|
|
54839
|
-
function transformToColDef(colDefinition,
|
|
54844
|
+
function transformToColDef(colDefinition, tableOptions) {
|
|
54840
54845
|
if (isNestedColumnDefinition(colDefinition)) {
|
|
54841
54846
|
return {
|
|
54842
54847
|
...colDefinition,
|
|
54843
54848
|
children: colDefinition.children.map(
|
|
54844
|
-
(childColDefinition) => transformColumnDefinitionToColDef(
|
|
54845
|
-
childColDefinition,
|
|
54846
|
-
enableGroupEditAndValidation,
|
|
54847
|
-
enableDynamicRowHeight
|
|
54848
|
-
)
|
|
54849
|
+
(childColDefinition) => transformColumnDefinitionToColDef(childColDefinition, tableOptions)
|
|
54849
54850
|
)
|
|
54850
54851
|
};
|
|
54851
54852
|
}
|
|
54852
|
-
return transformColumnDefinitionToColDef(
|
|
54853
|
-
colDefinition,
|
|
54854
|
-
enableGroupEditAndValidation,
|
|
54855
|
-
enableDynamicRowHeight
|
|
54856
|
-
);
|
|
54853
|
+
return transformColumnDefinitionToColDef(colDefinition, tableOptions);
|
|
54857
54854
|
}
|
|
54858
|
-
function transformColumnDefinitionToColDef(dataTableColumnDefinition,
|
|
54855
|
+
function transformColumnDefinitionToColDef(dataTableColumnDefinition, tableOptions) {
|
|
54856
|
+
const { enableGroupEditAndValidation, enableDynamicRowHeight } = tableOptions;
|
|
54859
54857
|
const {
|
|
54860
54858
|
aggFunc,
|
|
54861
54859
|
bulkEditable,
|
|
@@ -54898,7 +54896,8 @@ function transformColumnDefinitionToColDef(dataTableColumnDefinition, enableGrou
|
|
|
54898
54896
|
};
|
|
54899
54897
|
const cellClassRules = {
|
|
54900
54898
|
"invalid-cell": function isValid(params) {
|
|
54901
|
-
const
|
|
54899
|
+
const shouldValidateGroupHeader = tableOptions.enableGroupHeaderEdit && params.node.group;
|
|
54900
|
+
const shouldValidate = !params.node.group && params.data && !params.data.isAggData || enableGroupEditAndValidation && (params.node.footer || params.node.group && !params.node.expanded) || shouldValidateGroupHeader;
|
|
54902
54901
|
return (shouldValidate && valueValidator && !valueValidator({
|
|
54903
54902
|
columnDefinition: transformToColumnDefinition(params.colDef),
|
|
54904
54903
|
data: params.data,
|
|
@@ -55241,12 +55240,8 @@ function addAutoGroupParams(columnDefinition, isRowSelectable, siblingGroupsRowS
|
|
|
55241
55240
|
}
|
|
55242
55241
|
};
|
|
55243
55242
|
}
|
|
55244
|
-
function getDecoratedAutoGroupColDef(columnDefinition,
|
|
55245
|
-
const colDef = columnDefinition ? transformToColDef(
|
|
55246
|
-
columnDefinition,
|
|
55247
|
-
enableGroupEditAndValidation,
|
|
55248
|
-
enableDynamicRowHeight
|
|
55249
|
-
) : DEFAULT_AUTO_GROUP_COLUMN_DEFINITION;
|
|
55243
|
+
function getDecoratedAutoGroupColDef(columnDefinition, tableOptions, isRowSelectable, siblingGroupsRowSelectionDisabled, groupsAlwaysExpanded, isDetailTable) {
|
|
55244
|
+
const colDef = columnDefinition ? transformToColDef(columnDefinition, tableOptions) : DEFAULT_AUTO_GROUP_COLUMN_DEFINITION;
|
|
55250
55245
|
return addAutoGroupParams(
|
|
55251
55246
|
colDef,
|
|
55252
55247
|
isRowSelectable,
|
|
@@ -55257,12 +55252,12 @@ function getDecoratedAutoGroupColDef(columnDefinition, enableGroupEditAndValidat
|
|
|
55257
55252
|
}
|
|
55258
55253
|
|
|
55259
55254
|
// src/CellRenderers/AutoGroupCell.scss
|
|
55260
|
-
var css5 = `.
|
|
55255
|
+
var css5 = `._autoGroupCell_1h6pf_1 {
|
|
55261
55256
|
height: 100%;
|
|
55262
55257
|
width: 100%;
|
|
55263
55258
|
}
|
|
55264
55259
|
|
|
55265
|
-
.
|
|
55260
|
+
._indent_1h6pf_6 {
|
|
55266
55261
|
border-right: 1px solid #d6dadc;
|
|
55267
55262
|
background: #f4f5f6;
|
|
55268
55263
|
position: absolute;
|
|
@@ -55270,45 +55265,69 @@ var css5 = `._autoGroupCell_1qx8z_1 {
|
|
|
55270
55265
|
bottom: -1px;
|
|
55271
55266
|
width: 12px;
|
|
55272
55267
|
}
|
|
55273
|
-
.
|
|
55268
|
+
._indent_1h6pf_6._innermostLastIndent_1h6pf_14 {
|
|
55274
55269
|
bottom: 0px;
|
|
55275
55270
|
}
|
|
55276
55271
|
|
|
55277
|
-
.
|
|
55272
|
+
._expandableCaret_1h6pf_18 {
|
|
55278
55273
|
margin-left: -8px;
|
|
55279
55274
|
margin-right: 4px;
|
|
55280
55275
|
width: 24px;
|
|
55281
55276
|
flex-shrink: 0;
|
|
55282
55277
|
}
|
|
55283
55278
|
|
|
55284
|
-
.
|
|
55279
|
+
._expandableCaretButton_1h6pf_25 {
|
|
55280
|
+
display: inline-flex;
|
|
55281
|
+
align-items: center;
|
|
55282
|
+
justify-content: center;
|
|
55283
|
+
width: 24px;
|
|
55284
|
+
height: 24px;
|
|
55285
|
+
padding: 0;
|
|
55286
|
+
margin-left: -8px;
|
|
55287
|
+
margin-right: 4px;
|
|
55288
|
+
border: none;
|
|
55289
|
+
border-radius: 2px;
|
|
55290
|
+
background: transparent;
|
|
55291
|
+
cursor: pointer;
|
|
55292
|
+
flex-shrink: 0;
|
|
55293
|
+
}
|
|
55294
|
+
._expandableCaretButton_1h6pf_25:focus-visible {
|
|
55295
|
+
outline: 2px solid #2066df;
|
|
55296
|
+
outline-offset: 1px;
|
|
55297
|
+
}
|
|
55298
|
+
._expandableCaretButton_1h6pf_25:hover {
|
|
55299
|
+
background-color: rgba(0, 0, 0, 0.06);
|
|
55300
|
+
}
|
|
55301
|
+
|
|
55302
|
+
._expandCaret_1h6pf_48 {
|
|
55285
55303
|
color: #2066df;
|
|
55286
55304
|
cursor: pointer;
|
|
55287
55305
|
}
|
|
55288
55306
|
|
|
55289
|
-
.
|
|
55307
|
+
._collapseCaret_1h6pf_53 {
|
|
55290
55308
|
color: #75838a;
|
|
55291
55309
|
cursor: pointer;
|
|
55292
55310
|
}
|
|
55293
55311
|
|
|
55294
|
-
.
|
|
55312
|
+
._value_1h6pf_58 {
|
|
55295
55313
|
overflow: hidden;
|
|
55296
55314
|
text-overflow: ellipsis;
|
|
55297
55315
|
font-size: 12px;
|
|
55298
55316
|
}
|
|
55299
|
-
.
|
|
55317
|
+
._value_1h6pf_58._footer_1h6pf_63 {
|
|
55300
55318
|
color: #6a767c;
|
|
55301
55319
|
}`;
|
|
55302
55320
|
document.head.appendChild(document.createElement("style")).appendChild(document.createTextNode(css5));
|
|
55303
55321
|
var AutoGroupCell_default = {
|
|
55304
|
-
"autoGroupCell": "
|
|
55305
|
-
"indent": "
|
|
55306
|
-
"innermostLastIndent": "
|
|
55307
|
-
"expandableCaret": "
|
|
55308
|
-
"
|
|
55309
|
-
"
|
|
55310
|
-
"
|
|
55311
|
-
"
|
|
55322
|
+
"autoGroupCell": "_autoGroupCell_1h6pf_1",
|
|
55323
|
+
"indent": "_indent_1h6pf_6",
|
|
55324
|
+
"innermostLastIndent": "_innermostLastIndent_1h6pf_14",
|
|
55325
|
+
"expandableCaret": "_expandableCaret_1h6pf_18",
|
|
55326
|
+
"expandableCaretButton": "_expandableCaretButton_1h6pf_25",
|
|
55327
|
+
"expandCaret": "_expandCaret_1h6pf_48",
|
|
55328
|
+
"collapseCaret": "_collapseCaret_1h6pf_53",
|
|
55329
|
+
"value": "_value_1h6pf_58",
|
|
55330
|
+
"footer": "_footer_1h6pf_63"
|
|
55312
55331
|
};
|
|
55313
55332
|
|
|
55314
55333
|
// src/utils/rowSelectionHelpers.ts
|
|
@@ -55573,6 +55592,7 @@ var LevelIndents = (props) => {
|
|
|
55573
55592
|
};
|
|
55574
55593
|
function GroupCaret(props) {
|
|
55575
55594
|
const mounted = React80__default.default.useRef(false);
|
|
55595
|
+
const buttonRef = React80__default.default.useRef(null);
|
|
55576
55596
|
const [expanded, setExpanded] = React80.useState(props.node.expanded);
|
|
55577
55597
|
const ExpandableCaret = expanded ? coreIcons.CaretDown : coreIcons.CaretRight;
|
|
55578
55598
|
const I18n = coreReact.useI18nContext();
|
|
@@ -55583,6 +55603,16 @@ function GroupCaret(props) {
|
|
|
55583
55603
|
}, 0);
|
|
55584
55604
|
}
|
|
55585
55605
|
}
|
|
55606
|
+
const handleToggle = () => {
|
|
55607
|
+
props.api.setRowNodeExpanded(props.node, !expanded);
|
|
55608
|
+
};
|
|
55609
|
+
const handleKeyDown = (event) => {
|
|
55610
|
+
if (event.key === "Enter" || event.key === " ") {
|
|
55611
|
+
event.preventDefault();
|
|
55612
|
+
event.stopPropagation();
|
|
55613
|
+
handleToggle();
|
|
55614
|
+
}
|
|
55615
|
+
};
|
|
55586
55616
|
React80.useEffect(() => {
|
|
55587
55617
|
mounted.current = true;
|
|
55588
55618
|
props.api.addEventListener("rowGroupOpened", handleRowGroupToggle);
|
|
@@ -55595,20 +55625,47 @@ function GroupCaret(props) {
|
|
|
55595
55625
|
);
|
|
55596
55626
|
};
|
|
55597
55627
|
}, []);
|
|
55628
|
+
React80.useEffect(() => {
|
|
55629
|
+
var _a;
|
|
55630
|
+
if (!props.node.isExpandable()) return;
|
|
55631
|
+
const cell2 = (_a = buttonRef.current) == null ? void 0 : _a.closest(".ag-cell");
|
|
55632
|
+
if (!cell2) return;
|
|
55633
|
+
const handleCellKeyDown = (event) => {
|
|
55634
|
+
var _a2;
|
|
55635
|
+
if (event.key !== "Enter" && event.key !== " ") return;
|
|
55636
|
+
if (!event.isTrusted) return;
|
|
55637
|
+
const target = event.target;
|
|
55638
|
+
if (target.closest("button") || target.closest("input")) return;
|
|
55639
|
+
event.preventDefault();
|
|
55640
|
+
event.stopImmediatePropagation();
|
|
55641
|
+
(_a2 = buttonRef.current) == null ? void 0 : _a2.click();
|
|
55642
|
+
};
|
|
55643
|
+
cell2.addEventListener("keydown", handleCellKeyDown, { capture: true });
|
|
55644
|
+
return () => {
|
|
55645
|
+
cell2.removeEventListener("keydown", handleCellKeyDown, { capture: true });
|
|
55646
|
+
};
|
|
55647
|
+
}, []);
|
|
55648
|
+
if (!props.node.isExpandable()) {
|
|
55649
|
+
return /* @__PURE__ */ React80__default.default.createElement("div", { className: AutoGroupCell_default.expandableCaret });
|
|
55650
|
+
}
|
|
55598
55651
|
return /* @__PURE__ */ React80__default.default.createElement(
|
|
55599
|
-
|
|
55652
|
+
"button",
|
|
55600
55653
|
{
|
|
55654
|
+
type: "button",
|
|
55655
|
+
ref: buttonRef,
|
|
55656
|
+
"aria-expanded": expanded,
|
|
55601
55657
|
"aria-label": I18n.t(
|
|
55602
55658
|
`dataTable.groupCell.${expanded ? "collapse" : "expand"}`
|
|
55603
55659
|
),
|
|
55604
|
-
className: AutoGroupCell_default.
|
|
55605
|
-
|
|
55660
|
+
className: AutoGroupCell_default.expandableCaretButton,
|
|
55661
|
+
onClick: handleToggle,
|
|
55662
|
+
onKeyDown: handleKeyDown,
|
|
55663
|
+
"data-qa": "group-expand-collapse"
|
|
55606
55664
|
},
|
|
55607
|
-
|
|
55665
|
+
/* @__PURE__ */ React80__default.default.createElement(
|
|
55608
55666
|
ExpandableCaret,
|
|
55609
55667
|
{
|
|
55610
|
-
className: expanded ? AutoGroupCell_default.collapseCaret : AutoGroupCell_default.expandCaret
|
|
55611
|
-
onClick: () => props.api.setRowNodeExpanded(props.node, !expanded)
|
|
55668
|
+
className: expanded ? AutoGroupCell_default.collapseCaret : AutoGroupCell_default.expandCaret
|
|
55612
55669
|
}
|
|
55613
55670
|
)
|
|
55614
55671
|
);
|
|
@@ -56478,10 +56535,15 @@ var css7 = `.data-table-container .ag-header-cell .data-table-header-menu {
|
|
|
56478
56535
|
align-items: center;
|
|
56479
56536
|
justify-content: center;
|
|
56480
56537
|
background-color: #e3e6e8;
|
|
56538
|
+
border: none;
|
|
56481
56539
|
border-radius: 2px;
|
|
56482
56540
|
cursor: pointer;
|
|
56483
56541
|
margin-right: 8px;
|
|
56484
56542
|
}
|
|
56543
|
+
.data-table-container .ag-header-cell .expand-button:focus-visible {
|
|
56544
|
+
outline: 2px solid #2066df;
|
|
56545
|
+
outline-offset: 1px;
|
|
56546
|
+
}
|
|
56485
56547
|
.data-table-container .ag-header-group-cell-with-group .ag-header-cell-comp-wrapper {
|
|
56486
56548
|
width: 100%;
|
|
56487
56549
|
overflow: hidden;
|
|
@@ -56494,10 +56556,15 @@ var css7 = `.data-table-container .ag-header-cell .data-table-header-menu {
|
|
|
56494
56556
|
align-items: center;
|
|
56495
56557
|
justify-content: center;
|
|
56496
56558
|
background-color: #e3e6e8;
|
|
56559
|
+
border: none;
|
|
56497
56560
|
border-radius: 2px;
|
|
56498
56561
|
cursor: pointer;
|
|
56499
56562
|
margin-left: auto;
|
|
56500
56563
|
}
|
|
56564
|
+
.data-table-container .ag-header-group-cell-with-group .expand-button:focus-visible {
|
|
56565
|
+
outline: 2px solid #2066df;
|
|
56566
|
+
outline-offset: 1px;
|
|
56567
|
+
}
|
|
56501
56568
|
.data-table-container .auto-column-expand-tooltip-content {
|
|
56502
56569
|
width: 96px;
|
|
56503
56570
|
}
|
|
@@ -56647,6 +56714,7 @@ var GenericHeaderRenderer = (props) => {
|
|
|
56647
56714
|
I18n
|
|
56648
56715
|
);
|
|
56649
56716
|
const headerCellRef = React80.useRef(null);
|
|
56717
|
+
const expandButtonRef = React80.useRef(null);
|
|
56650
56718
|
const menuButtonRef = React80.useRef(null);
|
|
56651
56719
|
const headerCheckboxSelection = colDef.headerCheckboxSelection;
|
|
56652
56720
|
const headerCheckboxSelectionEnabled = typeof headerCheckboxSelection === "function" ? headerCheckboxSelection({
|
|
@@ -56799,6 +56867,30 @@ var GenericHeaderRenderer = (props) => {
|
|
|
56799
56867
|
);
|
|
56800
56868
|
}
|
|
56801
56869
|
React80__default.default.useEffect(updateExpandedState);
|
|
56870
|
+
React80__default.default.useEffect(() => {
|
|
56871
|
+
var _a2;
|
|
56872
|
+
if (!isExpandable) return;
|
|
56873
|
+
const headerCell = (_a2 = headerCellRef.current) == null ? void 0 : _a2.closest(".ag-header-cell");
|
|
56874
|
+
if (!headerCell) return;
|
|
56875
|
+
const handleExpandKeyDown = (event) => {
|
|
56876
|
+
var _a3;
|
|
56877
|
+
if (event.key !== "Enter" && event.key !== " ") return;
|
|
56878
|
+
if (!event.isTrusted) return;
|
|
56879
|
+
const target = event.target;
|
|
56880
|
+
if (target.closest("button") || target.closest("input")) return;
|
|
56881
|
+
event.preventDefault();
|
|
56882
|
+
event.stopImmediatePropagation();
|
|
56883
|
+
(_a3 = expandButtonRef.current) == null ? void 0 : _a3.click();
|
|
56884
|
+
};
|
|
56885
|
+
headerCell.addEventListener("keydown", handleExpandKeyDown, {
|
|
56886
|
+
capture: true
|
|
56887
|
+
});
|
|
56888
|
+
return () => {
|
|
56889
|
+
headerCell.removeEventListener("keydown", handleExpandKeyDown, {
|
|
56890
|
+
capture: true
|
|
56891
|
+
});
|
|
56892
|
+
};
|
|
56893
|
+
}, [isExpandable]);
|
|
56802
56894
|
const [expansionVariant, setExpansionVariant] = React80__default.default.useState("closed");
|
|
56803
56895
|
React80__default.default.useEffect(() => {
|
|
56804
56896
|
var _a2;
|
|
@@ -57083,12 +57175,21 @@ var GenericHeaderRenderer = (props) => {
|
|
|
57083
57175
|
overlay: /* @__PURE__ */ React80__default.default.createElement(coreReact.Tooltip.Content, { className: "auto-column-expand-tooltip-content" }, tooltipText[expansionVariant])
|
|
57084
57176
|
},
|
|
57085
57177
|
/* @__PURE__ */ React80__default.default.createElement(
|
|
57086
|
-
"
|
|
57178
|
+
"button",
|
|
57087
57179
|
{
|
|
57180
|
+
type: "button",
|
|
57181
|
+
ref: expandButtonRef,
|
|
57182
|
+
"aria-expanded": expansionVariant !== "closed",
|
|
57088
57183
|
"aria-label": tooltipText[expansionVariant],
|
|
57089
57184
|
className: "expand-button",
|
|
57090
57185
|
onClick: onExpandToggle,
|
|
57091
|
-
|
|
57186
|
+
onKeyDown: (e) => {
|
|
57187
|
+
if (e.key === "Enter" || e.key === " ") {
|
|
57188
|
+
e.preventDefault();
|
|
57189
|
+
e.stopPropagation();
|
|
57190
|
+
onExpandToggle(e);
|
|
57191
|
+
}
|
|
57192
|
+
},
|
|
57092
57193
|
"data-qa": "expand-or-collapse-all-button"
|
|
57093
57194
|
},
|
|
57094
57195
|
/* @__PURE__ */ React80__default.default.createElement(ExpansionVariantIcon, { size: "sm" })
|
|
@@ -57929,6 +58030,7 @@ var InternalTableContext = React80__default.default.createContext({
|
|
|
57929
58030
|
hide: () => {
|
|
57930
58031
|
},
|
|
57931
58032
|
isVisible: false,
|
|
58033
|
+
panelRef: React80__default.default.createRef(),
|
|
57932
58034
|
show: () => {
|
|
57933
58035
|
}
|
|
57934
58036
|
},
|
|
@@ -59733,14 +59835,16 @@ var useRowSelectionState = () => {
|
|
|
59733
59835
|
var BulkEditActionButton = (props) => {
|
|
59734
59836
|
const { contextPanel } = useInternalTableContext();
|
|
59735
59837
|
const i18n = coreReact.useI18nContext();
|
|
59838
|
+
const buttonRef = React80__default.default.useRef(null);
|
|
59736
59839
|
const editActionLabel = props.actionText ?? i18n.t("dataTable.bulkActions.editValues");
|
|
59737
59840
|
return /* @__PURE__ */ React80__default.default.createElement(
|
|
59738
59841
|
coreReact.Button,
|
|
59739
59842
|
{
|
|
59843
|
+
ref: buttonRef,
|
|
59740
59844
|
"aria-label": i18n.t("dataTable.bulkActions.bulkEdit"),
|
|
59741
59845
|
"data-qa": "bulkEditIcon",
|
|
59742
59846
|
icon: /* @__PURE__ */ React80__default.default.createElement(coreIcons.Pencil, null),
|
|
59743
|
-
onClick: () => contextPanel.show("bulkEdit"),
|
|
59847
|
+
onClick: () => contextPanel.show("bulkEdit", buttonRef.current ?? void 0),
|
|
59744
59848
|
variant: "tertiary"
|
|
59745
59849
|
},
|
|
59746
59850
|
props.showLabel && editActionLabel
|
|
@@ -104385,11 +104489,6 @@ var BulkEditPanel = ({}) => {
|
|
|
104385
104489
|
const { contextPanel, suppressBulkEditToasts } = useInternalTableContext();
|
|
104386
104490
|
const I18n = coreReact.useI18nContext();
|
|
104387
104491
|
const bulkEditRef = React80__default.default.useRef(null);
|
|
104388
|
-
const bodyRef = React80__default.default.useRef(null);
|
|
104389
|
-
React80.useEffect(() => {
|
|
104390
|
-
var _a;
|
|
104391
|
-
(_a = bodyRef.current) == null ? void 0 : _a.focus();
|
|
104392
|
-
}, []);
|
|
104393
104492
|
return /* @__PURE__ */ React80__default.default.createElement(coreReact.Panel, null, /* @__PURE__ */ React80__default.default.createElement(
|
|
104394
104493
|
coreReact.Panel.Header,
|
|
104395
104494
|
{
|
|
@@ -104400,7 +104499,7 @@ var BulkEditPanel = ({}) => {
|
|
|
104400
104499
|
}
|
|
104401
104500
|
},
|
|
104402
104501
|
/* @__PURE__ */ React80__default.default.createElement(coreReact.Panel.Title, null, I18n.t("dataTable.bulkActions.editValues"))
|
|
104403
|
-
), /* @__PURE__ */ React80__default.default.createElement(coreReact.Panel.Body,
|
|
104502
|
+
), /* @__PURE__ */ React80__default.default.createElement(coreReact.Panel.Body, null, /* @__PURE__ */ React80__default.default.createElement(coreReact.Panel.Section, null, /* @__PURE__ */ React80__default.default.createElement(
|
|
104404
104503
|
BulkEdit,
|
|
104405
104504
|
{
|
|
104406
104505
|
ref: bulkEditRef,
|
|
@@ -104684,11 +104783,10 @@ var ConfigurationColumns = React80__default.default.forwardRef(
|
|
|
104684
104783
|
return columnDefs;
|
|
104685
104784
|
}
|
|
104686
104785
|
const columnDefinitionsMappedToDefs = columnDefinitions.map(
|
|
104687
|
-
(colDef) => transformToColDef(
|
|
104688
|
-
colDef,
|
|
104786
|
+
(colDef) => transformToColDef(colDef, {
|
|
104689
104787
|
enableGroupEditAndValidation,
|
|
104690
104788
|
enableDynamicRowHeight
|
|
104691
|
-
)
|
|
104789
|
+
})
|
|
104692
104790
|
);
|
|
104693
104791
|
return toGroupedCols(columnDefinitionsMappedToDefs);
|
|
104694
104792
|
});
|
|
@@ -104847,18 +104945,34 @@ var ConfigurationPanel = ({
|
|
|
104847
104945
|
function useContextPanel() {
|
|
104848
104946
|
const [content, setContent] = React80.useState();
|
|
104849
104947
|
const visibility = coreReact.useVisibility({ afterHide: () => setContent(void 0) });
|
|
104850
|
-
const
|
|
104851
|
-
|
|
104852
|
-
|
|
104853
|
-
|
|
104948
|
+
const triggerRef = React80.useRef(null);
|
|
104949
|
+
const panelRef = React80.useRef(null);
|
|
104950
|
+
const show = React80.useCallback(
|
|
104951
|
+
(panelContent, trigger) => {
|
|
104952
|
+
triggerRef.current = trigger ?? null;
|
|
104953
|
+
setContent(panelContent);
|
|
104954
|
+
visibility.show();
|
|
104955
|
+
},
|
|
104956
|
+
[]
|
|
104957
|
+
);
|
|
104854
104958
|
const hide = React80.useCallback(() => {
|
|
104959
|
+
const trigger = triggerRef.current;
|
|
104855
104960
|
setContent(void 0);
|
|
104856
104961
|
visibility.hide();
|
|
104962
|
+
trigger == null ? void 0 : trigger.focus();
|
|
104963
|
+
triggerRef.current = null;
|
|
104857
104964
|
}, []);
|
|
104965
|
+
React80.useEffect(() => {
|
|
104966
|
+
var _a;
|
|
104967
|
+
if (content) {
|
|
104968
|
+
(_a = panelRef.current) == null ? void 0 : _a.focus();
|
|
104969
|
+
}
|
|
104970
|
+
}, [content]);
|
|
104858
104971
|
return {
|
|
104859
104972
|
content,
|
|
104860
104973
|
hide,
|
|
104861
104974
|
isVisible: visibility.isVisible,
|
|
104975
|
+
panelRef,
|
|
104862
104976
|
show
|
|
104863
104977
|
};
|
|
104864
104978
|
}
|
|
@@ -104996,8 +105110,10 @@ var buildDetailRowsConfig_ = (detailRowConfig, {
|
|
|
104996
105110
|
alwaysAggregateAtRootLevel: !isServerSideRowModel,
|
|
104997
105111
|
autoGroupColumnDef: getDecoratedAutoGroupColDef(
|
|
104998
105112
|
detailRowConfig.autoGroupColumnDefinition,
|
|
104999
|
-
|
|
105000
|
-
|
|
105113
|
+
{
|
|
105114
|
+
enableGroupEditAndValidation,
|
|
105115
|
+
enableDynamicRowHeight
|
|
105116
|
+
},
|
|
105001
105117
|
isRowSelectable,
|
|
105002
105118
|
false,
|
|
105003
105119
|
detailRowConfig.groupsAlwaysExpanded ?? false,
|
|
@@ -105009,11 +105125,10 @@ var buildDetailRowsConfig_ = (detailRowConfig, {
|
|
|
105009
105125
|
},
|
|
105010
105126
|
columnDefs: toGroupedCols(
|
|
105011
105127
|
detailRowConfig.columnDefinitions.map(
|
|
105012
|
-
(colDef) => transformToColDef(
|
|
105013
|
-
colDef,
|
|
105128
|
+
(colDef) => transformToColDef(colDef, {
|
|
105014
105129
|
enableGroupEditAndValidation,
|
|
105015
|
-
colDef.autoHeight ?? enableDynamicRowHeight
|
|
105016
|
-
)
|
|
105130
|
+
enableDynamicRowHeight: colDef.autoHeight ?? enableDynamicRowHeight
|
|
105131
|
+
})
|
|
105017
105132
|
)
|
|
105018
105133
|
),
|
|
105019
105134
|
groupsAlwaysExpanded: detailRowConfig.groupsAlwaysExpanded ?? false,
|
|
@@ -110168,11 +110283,16 @@ function getServerSideDatasource(onServerSideDataRequestCallbackRef, onEmptyResp
|
|
|
110168
110283
|
};
|
|
110169
110284
|
}
|
|
110170
110285
|
var minimumColumnWidth = 140;
|
|
110286
|
+
function resolveGroupIncludeFooter(props, onSSDR) {
|
|
110287
|
+
if (props.enableGroupHeaderEdit) return false;
|
|
110288
|
+
if (!onSSDR && props.groupIncludeFooter === void 0) return true;
|
|
110289
|
+
return props.groupIncludeFooter;
|
|
110290
|
+
}
|
|
110171
110291
|
function useComputeAgGridProps(props) {
|
|
110172
110292
|
const internalTableContext = useInternalTableContext();
|
|
110173
110293
|
const onSSDR = internalTableContext.onServerSideDataRequest;
|
|
110174
110294
|
return {
|
|
110175
|
-
groupIncludeFooter:
|
|
110295
|
+
groupIncludeFooter: resolveGroupIncludeFooter(props, !!onSSDR),
|
|
110176
110296
|
rowDragManaged: onSSDR ? false : props.rowDragManaged ?? true,
|
|
110177
110297
|
rowModelType: onSSDR ? "serverSide" : void 0,
|
|
110178
110298
|
groupSelectsChildren: (
|
|
@@ -110248,11 +110368,11 @@ var Table = (props) => {
|
|
|
110248
110368
|
() => {
|
|
110249
110369
|
var _a2;
|
|
110250
110370
|
return (_a2 = internalTableContext.columnDefinitions) == null ? void 0 : _a2.map((colDef) => {
|
|
110251
|
-
const newColDef = transformToColDef(
|
|
110252
|
-
|
|
110253
|
-
internalTableContext.
|
|
110254
|
-
|
|
110255
|
-
);
|
|
110371
|
+
const newColDef = transformToColDef(colDef, {
|
|
110372
|
+
enableGroupEditAndValidation: internalTableContext.enableGroupEditAndValidation,
|
|
110373
|
+
enableDynamicRowHeight: internalTableContext.enableDynamicRowHeight,
|
|
110374
|
+
enableGroupHeaderEdit: props.enableGroupHeaderEdit
|
|
110375
|
+
});
|
|
110256
110376
|
return {
|
|
110257
110377
|
...newColDef,
|
|
110258
110378
|
editable: overrideEditable(colDef.editable)
|
|
@@ -110554,8 +110674,10 @@ var Table = (props) => {
|
|
|
110554
110674
|
const decoratedAutoGroupColDef = React80__default.default.useMemo(
|
|
110555
110675
|
() => getDecoratedAutoGroupColDef(
|
|
110556
110676
|
props == null ? void 0 : props.autoGroupColumnDefinition,
|
|
110557
|
-
|
|
110558
|
-
|
|
110677
|
+
{
|
|
110678
|
+
enableGroupEditAndValidation: internalTableContext.enableGroupEditAndValidation,
|
|
110679
|
+
enableDynamicRowHeight: internalTableContext.enableDynamicRowHeight
|
|
110680
|
+
},
|
|
110559
110681
|
isRowSelectable,
|
|
110560
110682
|
props.siblingGroupsRowSelectionDisabled,
|
|
110561
110683
|
props.groupsAlwaysExpanded ?? false,
|
|
@@ -111170,9 +111292,26 @@ var ContextPanel = ({
|
|
|
111170
111292
|
...props
|
|
111171
111293
|
}) => {
|
|
111172
111294
|
const { contextPanel } = useInternalTableContext();
|
|
111295
|
+
const I18n = coreReact.useI18nContext();
|
|
111296
|
+
const cardRef = React80__default.default.useRef(null);
|
|
111297
|
+
const panelLabelKeys = {
|
|
111298
|
+
configuration: "dataTable.tableSettings.tableSettings",
|
|
111299
|
+
bulkEdit: "dataTable.bulkActions.editValues"
|
|
111300
|
+
};
|
|
111301
|
+
const panelLabel = contextPanel.content ? panelLabelKeys[contextPanel.content] : void 0;
|
|
111302
|
+
const ariaLabel = panelLabel ? I18n.t(panelLabel) : void 0;
|
|
111303
|
+
React80__default.default.useLayoutEffect(() => {
|
|
111304
|
+
if (contextPanel.content && contextPanel.content !== "filters") {
|
|
111305
|
+
contextPanel.panelRef.current = cardRef.current;
|
|
111306
|
+
}
|
|
111307
|
+
}, [contextPanel.content, contextPanel.panelRef]);
|
|
111173
111308
|
return /* @__PURE__ */ React80__default.default.createElement(
|
|
111174
111309
|
coreReact.Card,
|
|
111175
111310
|
{
|
|
111311
|
+
ref: cardRef,
|
|
111312
|
+
tabIndex: -1,
|
|
111313
|
+
role: "region",
|
|
111314
|
+
"aria-label": ariaLabel,
|
|
111176
111315
|
className: cx19("contextPanel", className, {
|
|
111177
111316
|
"contextPanel--hidden": !contextPanel.isVisible || contextPanel.content === "filters"
|
|
111178
111317
|
}),
|
|
@@ -111445,19 +111584,27 @@ var BaseFiltersPanel = ({
|
|
|
111445
111584
|
onClearAllFilters = noop5,
|
|
111446
111585
|
...props
|
|
111447
111586
|
}) => {
|
|
111448
|
-
const
|
|
111587
|
+
const cardRef = React80__default.default.useRef(null);
|
|
111449
111588
|
const { contextPanel, filtersBodyId, filtersPanelId } = useInternalTableContext();
|
|
111450
111589
|
const I18n = coreReact.useI18nContext();
|
|
111451
111590
|
const hidden = !contextPanel.isVisible || contextPanel.content !== "filters";
|
|
111452
111591
|
React80__default.default.useLayoutEffect(() => {
|
|
111453
|
-
if (
|
|
111454
|
-
|
|
111592
|
+
if (contextPanel.content === "filters") {
|
|
111593
|
+
contextPanel.panelRef.current = cardRef.current;
|
|
111594
|
+
}
|
|
111595
|
+
}, [contextPanel.content, contextPanel.panelRef]);
|
|
111596
|
+
React80__default.default.useLayoutEffect(() => {
|
|
111597
|
+
if (cardRef.current) {
|
|
111598
|
+
cardRef.current.inert = hidden;
|
|
111455
111599
|
}
|
|
111456
111600
|
}, [hidden]);
|
|
111457
111601
|
return /* @__PURE__ */ React80__default.default.createElement(
|
|
111458
111602
|
coreReact.Card,
|
|
111459
111603
|
{
|
|
111460
|
-
ref,
|
|
111604
|
+
ref: cardRef,
|
|
111605
|
+
tabIndex: -1,
|
|
111606
|
+
role: "region",
|
|
111607
|
+
"aria-label": I18n.t("dataTable.filters.filters"),
|
|
111461
111608
|
style: { maxHeight: "100vh" },
|
|
111462
111609
|
className: cx20("contextPanel", className, {
|
|
111463
111610
|
"contextPanel--hidden": hidden
|
|
@@ -111512,6 +111659,7 @@ var ConfigPanelButton = () => {
|
|
|
111512
111659
|
const { contextPanel } = useInternalTableContext();
|
|
111513
111660
|
const hasNoContent = useTableHasNoContent();
|
|
111514
111661
|
const I18n = coreReact.useI18nContext();
|
|
111662
|
+
const buttonRef = React80__default.default.useRef(null);
|
|
111515
111663
|
return /* @__PURE__ */ React80__default.default.createElement(
|
|
111516
111664
|
EmptyResultsControlTooltip,
|
|
111517
111665
|
{
|
|
@@ -111521,12 +111669,13 @@ var ConfigPanelButton = () => {
|
|
|
111521
111669
|
/* @__PURE__ */ React80__default.default.createElement(
|
|
111522
111670
|
coreReact.ToggleButton,
|
|
111523
111671
|
{
|
|
111672
|
+
ref: buttonRef,
|
|
111524
111673
|
disabled: hasNoContent,
|
|
111525
111674
|
onClick: () => {
|
|
111526
111675
|
if (contextPanel.content === "configuration") {
|
|
111527
111676
|
contextPanel.hide();
|
|
111528
111677
|
} else {
|
|
111529
|
-
contextPanel.show("configuration");
|
|
111678
|
+
contextPanel.show("configuration", buttonRef.current ?? void 0);
|
|
111530
111679
|
}
|
|
111531
111680
|
},
|
|
111532
111681
|
icon: /* @__PURE__ */ React80__default.default.createElement(
|
|
@@ -112703,27 +112852,12 @@ var SingleSelectQuickFilterRenderer = (props) => {
|
|
|
112703
112852
|
return /* @__PURE__ */ React80__default.default.createElement(ClientSideSingleSelectQuickFilter, { ...props });
|
|
112704
112853
|
};
|
|
112705
112854
|
var SingleSelectQuickFilterRenderer_default = SingleSelectQuickFilterRenderer;
|
|
112706
|
-
var FOCUSABLE_SELECTOR2 = 'button:not([disabled]), input:not([disabled]), select:not([disabled]), textarea:not([disabled]), [tabindex]:not([tabindex="-1"])';
|
|
112707
112855
|
var FiltersPanelToggleButton = ({ hasDefinedFilters }) => {
|
|
112708
112856
|
const I18n = coreReact.useI18nContext();
|
|
112709
|
-
const { contextPanel,
|
|
112857
|
+
const { contextPanel, filtersPanelId } = useInternalTableContext();
|
|
112710
112858
|
const hasNoContent = useTableHasNoContent();
|
|
112711
112859
|
const buttonRef = React80__default.default.useRef(null);
|
|
112712
112860
|
const isFiltersOpen = contextPanel.content === "filters";
|
|
112713
|
-
const isMounted = React80__default.default.useRef(false);
|
|
112714
|
-
React80__default.default.useEffect(() => {
|
|
112715
|
-
var _a, _b;
|
|
112716
|
-
if (!isMounted.current) {
|
|
112717
|
-
isMounted.current = true;
|
|
112718
|
-
return;
|
|
112719
|
-
}
|
|
112720
|
-
if (isFiltersOpen) {
|
|
112721
|
-
const panel = filtersBodyId ? document.getElementById(filtersBodyId) : null;
|
|
112722
|
-
(_a = panel == null ? void 0 : panel.querySelector(FOCUSABLE_SELECTOR2)) == null ? void 0 : _a.focus();
|
|
112723
|
-
} else {
|
|
112724
|
-
(_b = buttonRef.current) == null ? void 0 : _b.focus();
|
|
112725
|
-
}
|
|
112726
|
-
}, [isFiltersOpen, filtersBodyId]);
|
|
112727
112861
|
if (!hasDefinedFilters) {
|
|
112728
112862
|
return null;
|
|
112729
112863
|
}
|
|
@@ -112744,7 +112878,7 @@ var FiltersPanelToggleButton = ({ hasDefinedFilters }) => {
|
|
|
112744
112878
|
"aria-controls": filtersPanelId,
|
|
112745
112879
|
onClick: () => {
|
|
112746
112880
|
if (!isFiltersOpen) {
|
|
112747
|
-
contextPanel.show("filters");
|
|
112881
|
+
contextPanel.show("filters", buttonRef.current ?? void 0);
|
|
112748
112882
|
} else {
|
|
112749
112883
|
contextPanel.hide();
|
|
112750
112884
|
}
|