@procore/data-table 14.46.2 → 14.46.4
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 +17 -0
- package/dist/legacy/index.cjs +86 -54
- package/dist/legacy/index.d.cts +3 -1
- package/dist/legacy/index.d.ts +3 -1
- package/dist/legacy/index.js +86 -54
- package/dist/modern/index.cjs +85 -52
- package/dist/modern/index.d.cts +3 -1
- package/dist/modern/index.d.ts +3 -1
- package/dist/modern/index.js +85 -52
- package/package.json +5 -5
package/dist/legacy/index.js
CHANGED
|
@@ -1389,7 +1389,7 @@ ag-grid, ag-grid-angular, ag-grid-ng2, ag-grid-polymer, ag-grid-aurelia {
|
|
|
1389
1389
|
animation-iteration-count: infinite;
|
|
1390
1390
|
animation-name: ag-shake-left-to-right;
|
|
1391
1391
|
}
|
|
1392
|
-
@keyframes _ag-shake-left-to-
|
|
1392
|
+
@keyframes _ag-shake-left-to-right_pphrk_342 {
|
|
1393
1393
|
from {
|
|
1394
1394
|
padding-left: 6px;
|
|
1395
1395
|
padding-right: 2px;
|
|
@@ -5390,7 +5390,7 @@ input[class^=ag-][type=button]:focus, button[class^=ag-]:focus {
|
|
|
5390
5390
|
animation-iteration-count: infinite;
|
|
5391
5391
|
animation-timing-function: linear;
|
|
5392
5392
|
}
|
|
5393
|
-
@keyframes
|
|
5393
|
+
@keyframes _spin_pphrk_1 {
|
|
5394
5394
|
from {
|
|
5395
5395
|
transform: rotate(0deg);
|
|
5396
5396
|
}
|
|
@@ -7922,7 +7922,7 @@ input[class^=ag-][type=range]:disabled {
|
|
|
7922
7922
|
padding-left: 16px;
|
|
7923
7923
|
}
|
|
7924
7924
|
|
|
7925
|
-
div.
|
|
7925
|
+
div._contextPanel_pphrk_7159 {
|
|
7926
7926
|
width: 400px;
|
|
7927
7927
|
transition: all ease 500ms;
|
|
7928
7928
|
flex: 0 0 auto;
|
|
@@ -7931,7 +7931,12 @@ div._contextPanel_1ern5_7159 {
|
|
|
7931
7931
|
border: 1px solid #d6dadc;
|
|
7932
7932
|
display: flex;
|
|
7933
7933
|
}
|
|
7934
|
-
div.
|
|
7934
|
+
div._contextPanel_pphrk_7159:focus {
|
|
7935
|
+
border-color: #2066df;
|
|
7936
|
+
box-shadow: inset 0 0 1px 0 #2066df;
|
|
7937
|
+
outline: none;
|
|
7938
|
+
}
|
|
7939
|
+
div._contextPanel--hidden_pphrk_7173 {
|
|
7935
7940
|
border: none;
|
|
7936
7941
|
overflow: hidden;
|
|
7937
7942
|
padding: 0px;
|
|
@@ -7939,50 +7944,50 @@ div._contextPanel--hidden_1ern5_7168 {
|
|
|
7939
7944
|
width: 0px;
|
|
7940
7945
|
}
|
|
7941
7946
|
|
|
7942
|
-
.
|
|
7947
|
+
._contextPanelWrapper_pphrk_7181 {
|
|
7943
7948
|
position: relative;
|
|
7944
7949
|
flex-grow: 1;
|
|
7945
7950
|
}
|
|
7946
7951
|
|
|
7947
|
-
.
|
|
7952
|
+
._contextPanelBody_pphrk_7186 {
|
|
7948
7953
|
width: clamp(380px, 400px, 100%);
|
|
7949
7954
|
}
|
|
7950
7955
|
|
|
7951
|
-
._contextPanel-
|
|
7956
|
+
._contextPanel-stickyHeader_pphrk_7190 {
|
|
7952
7957
|
background-color: #ffffff;
|
|
7953
7958
|
position: sticky;
|
|
7954
7959
|
top: 0;
|
|
7955
7960
|
z-index: 5;
|
|
7956
7961
|
}
|
|
7957
7962
|
|
|
7958
|
-
._filters-
|
|
7963
|
+
._filters-list_pphrk_7197 {
|
|
7959
7964
|
padding: 0;
|
|
7960
7965
|
margin: 0;
|
|
7961
7966
|
}
|
|
7962
|
-
._filters-
|
|
7967
|
+
._filters-list_pphrk_7197 ol {
|
|
7963
7968
|
padding: 0;
|
|
7964
7969
|
margin: 0;
|
|
7965
7970
|
}
|
|
7966
7971
|
|
|
7967
|
-
._col-drag-column-
|
|
7972
|
+
._col-drag-column-icon_pphrk_7206 {
|
|
7968
7973
|
color: #6a767c;
|
|
7969
7974
|
}
|
|
7970
7975
|
|
|
7971
|
-
._tabular-
|
|
7976
|
+
._tabular-nums_pphrk_7210 {
|
|
7972
7977
|
font-variant-numeric: tabular-nums;
|
|
7973
7978
|
}`;
|
|
7974
7979
|
document.head.appendChild(document.createElement("style")).appendChild(document.createTextNode(css));
|
|
7975
7980
|
var styles_default = {
|
|
7976
|
-
"contextPanel": "
|
|
7977
|
-
"contextPanel--hidden": "_contextPanel--
|
|
7978
|
-
"contextPanelWrapper": "
|
|
7979
|
-
"contextPanelBody": "
|
|
7980
|
-
"contextPanel-stickyHeader": "_contextPanel-
|
|
7981
|
-
"filters-list": "_filters-
|
|
7982
|
-
"col-drag-column-icon": "_col-drag-column-
|
|
7983
|
-
"tabular-nums": "_tabular-
|
|
7984
|
-
"ag-shake-left-to-right": "_ag-shake-left-to-
|
|
7985
|
-
"spin": "
|
|
7981
|
+
"contextPanel": "_contextPanel_pphrk_7159",
|
|
7982
|
+
"contextPanel--hidden": "_contextPanel--hidden_pphrk_7173",
|
|
7983
|
+
"contextPanelWrapper": "_contextPanelWrapper_pphrk_7181",
|
|
7984
|
+
"contextPanelBody": "_contextPanelBody_pphrk_7186",
|
|
7985
|
+
"contextPanel-stickyHeader": "_contextPanel-stickyHeader_pphrk_7190",
|
|
7986
|
+
"filters-list": "_filters-list_pphrk_7197",
|
|
7987
|
+
"col-drag-column-icon": "_col-drag-column-icon_pphrk_7206",
|
|
7988
|
+
"tabular-nums": "_tabular-nums_pphrk_7210",
|
|
7989
|
+
"ag-shake-left-to-right": "_ag-shake-left-to-right_pphrk_342",
|
|
7990
|
+
"spin": "_spin_pphrk_1"
|
|
7986
7991
|
};
|
|
7987
7992
|
|
|
7988
7993
|
// src/CellRenderers/BooleanCell.tsx
|
|
@@ -54770,6 +54775,7 @@ function transformToColumnDefinition(colDef = emptyObject) {
|
|
|
54770
54775
|
getStringFormattedValue,
|
|
54771
54776
|
columnHeaderParams: colDef.headerComponentParams,
|
|
54772
54777
|
headerName: colDef.headerName,
|
|
54778
|
+
headerClass: colDef.headerClass,
|
|
54773
54779
|
hidden: colDef.hide,
|
|
54774
54780
|
filterRenderer: colDef.filterRenderer,
|
|
54775
54781
|
lockVisible: colDef.lockVisible,
|
|
@@ -58012,6 +58018,7 @@ var InternalTableContext = React80.createContext({
|
|
|
58012
58018
|
hide: () => {
|
|
58013
58019
|
},
|
|
58014
58020
|
isVisible: false,
|
|
58021
|
+
panelRef: React80.createRef(),
|
|
58015
58022
|
show: () => {
|
|
58016
58023
|
}
|
|
58017
58024
|
},
|
|
@@ -59816,14 +59823,16 @@ var useRowSelectionState = () => {
|
|
|
59816
59823
|
var BulkEditActionButton = (props) => {
|
|
59817
59824
|
const { contextPanel } = useInternalTableContext();
|
|
59818
59825
|
const i18n = useI18nContext();
|
|
59826
|
+
const buttonRef = React80.useRef(null);
|
|
59819
59827
|
const editActionLabel = props.actionText ?? i18n.t("dataTable.bulkActions.editValues");
|
|
59820
59828
|
return /* @__PURE__ */ React80.createElement(
|
|
59821
59829
|
Button,
|
|
59822
59830
|
{
|
|
59831
|
+
ref: buttonRef,
|
|
59823
59832
|
"aria-label": i18n.t("dataTable.bulkActions.bulkEdit"),
|
|
59824
59833
|
"data-qa": "bulkEditIcon",
|
|
59825
59834
|
icon: /* @__PURE__ */ React80.createElement(Pencil, null),
|
|
59826
|
-
onClick: () => contextPanel.show("bulkEdit"),
|
|
59835
|
+
onClick: () => contextPanel.show("bulkEdit", buttonRef.current ?? void 0),
|
|
59827
59836
|
variant: "tertiary"
|
|
59828
59837
|
},
|
|
59829
59838
|
props.showLabel && editActionLabel
|
|
@@ -104468,11 +104477,6 @@ var BulkEditPanel = ({}) => {
|
|
|
104468
104477
|
const { contextPanel, suppressBulkEditToasts } = useInternalTableContext();
|
|
104469
104478
|
const I18n = useI18nContext();
|
|
104470
104479
|
const bulkEditRef = React80.useRef(null);
|
|
104471
|
-
const bodyRef = React80.useRef(null);
|
|
104472
|
-
useEffect(() => {
|
|
104473
|
-
var _a;
|
|
104474
|
-
(_a = bodyRef.current) == null ? void 0 : _a.focus();
|
|
104475
|
-
}, []);
|
|
104476
104480
|
return /* @__PURE__ */ React80.createElement(Panel, null, /* @__PURE__ */ React80.createElement(
|
|
104477
104481
|
Panel.Header,
|
|
104478
104482
|
{
|
|
@@ -104483,7 +104487,7 @@ var BulkEditPanel = ({}) => {
|
|
|
104483
104487
|
}
|
|
104484
104488
|
},
|
|
104485
104489
|
/* @__PURE__ */ React80.createElement(Panel.Title, null, I18n.t("dataTable.bulkActions.editValues"))
|
|
104486
|
-
), /* @__PURE__ */ React80.createElement(Panel.Body,
|
|
104490
|
+
), /* @__PURE__ */ React80.createElement(Panel.Body, null, /* @__PURE__ */ React80.createElement(Panel.Section, null, /* @__PURE__ */ React80.createElement(
|
|
104487
104491
|
BulkEdit,
|
|
104488
104492
|
{
|
|
104489
104493
|
ref: bulkEditRef,
|
|
@@ -104929,18 +104933,34 @@ var ConfigurationPanel = ({
|
|
|
104929
104933
|
function useContextPanel() {
|
|
104930
104934
|
const [content, setContent] = useState();
|
|
104931
104935
|
const visibility = useVisibility({ afterHide: () => setContent(void 0) });
|
|
104932
|
-
const
|
|
104933
|
-
|
|
104934
|
-
|
|
104935
|
-
|
|
104936
|
+
const triggerRef = useRef(null);
|
|
104937
|
+
const panelRef = useRef(null);
|
|
104938
|
+
const show = useCallback(
|
|
104939
|
+
(panelContent, trigger) => {
|
|
104940
|
+
triggerRef.current = trigger ?? null;
|
|
104941
|
+
setContent(panelContent);
|
|
104942
|
+
visibility.show();
|
|
104943
|
+
},
|
|
104944
|
+
[]
|
|
104945
|
+
);
|
|
104936
104946
|
const hide = useCallback(() => {
|
|
104947
|
+
const trigger = triggerRef.current;
|
|
104937
104948
|
setContent(void 0);
|
|
104938
104949
|
visibility.hide();
|
|
104950
|
+
trigger == null ? void 0 : trigger.focus();
|
|
104951
|
+
triggerRef.current = null;
|
|
104939
104952
|
}, []);
|
|
104953
|
+
useEffect(() => {
|
|
104954
|
+
var _a;
|
|
104955
|
+
if (content) {
|
|
104956
|
+
(_a = panelRef.current) == null ? void 0 : _a.focus();
|
|
104957
|
+
}
|
|
104958
|
+
}, [content]);
|
|
104940
104959
|
return {
|
|
104941
104960
|
content,
|
|
104942
104961
|
hide,
|
|
104943
104962
|
isVisible: visibility.isVisible,
|
|
104963
|
+
panelRef,
|
|
104944
104964
|
show
|
|
104945
104965
|
};
|
|
104946
104966
|
}
|
|
@@ -111260,9 +111280,26 @@ var ContextPanel = ({
|
|
|
111260
111280
|
...props
|
|
111261
111281
|
}) => {
|
|
111262
111282
|
const { contextPanel } = useInternalTableContext();
|
|
111283
|
+
const I18n = useI18nContext();
|
|
111284
|
+
const cardRef = React80.useRef(null);
|
|
111285
|
+
const panelLabelKeys = {
|
|
111286
|
+
configuration: "dataTable.tableSettings.tableSettings",
|
|
111287
|
+
bulkEdit: "dataTable.bulkActions.editValues"
|
|
111288
|
+
};
|
|
111289
|
+
const panelLabel = contextPanel.content ? panelLabelKeys[contextPanel.content] : void 0;
|
|
111290
|
+
const ariaLabel = panelLabel ? I18n.t(panelLabel) : void 0;
|
|
111291
|
+
React80.useLayoutEffect(() => {
|
|
111292
|
+
if (contextPanel.content && contextPanel.content !== "filters") {
|
|
111293
|
+
contextPanel.panelRef.current = cardRef.current;
|
|
111294
|
+
}
|
|
111295
|
+
}, [contextPanel.content, contextPanel.panelRef]);
|
|
111263
111296
|
return /* @__PURE__ */ React80.createElement(
|
|
111264
111297
|
Card,
|
|
111265
111298
|
{
|
|
111299
|
+
ref: cardRef,
|
|
111300
|
+
tabIndex: -1,
|
|
111301
|
+
role: "region",
|
|
111302
|
+
"aria-label": ariaLabel,
|
|
111266
111303
|
className: cx19("contextPanel", className, {
|
|
111267
111304
|
"contextPanel--hidden": !contextPanel.isVisible || contextPanel.content === "filters"
|
|
111268
111305
|
}),
|
|
@@ -111535,19 +111572,27 @@ var BaseFiltersPanel = ({
|
|
|
111535
111572
|
onClearAllFilters = noop5,
|
|
111536
111573
|
...props
|
|
111537
111574
|
}) => {
|
|
111538
|
-
const
|
|
111575
|
+
const cardRef = React80.useRef(null);
|
|
111539
111576
|
const { contextPanel, filtersBodyId, filtersPanelId } = useInternalTableContext();
|
|
111540
111577
|
const I18n = useI18nContext();
|
|
111541
111578
|
const hidden = !contextPanel.isVisible || contextPanel.content !== "filters";
|
|
111542
111579
|
React80.useLayoutEffect(() => {
|
|
111543
|
-
if (
|
|
111544
|
-
|
|
111580
|
+
if (contextPanel.content === "filters") {
|
|
111581
|
+
contextPanel.panelRef.current = cardRef.current;
|
|
111582
|
+
}
|
|
111583
|
+
}, [contextPanel.content, contextPanel.panelRef]);
|
|
111584
|
+
React80.useLayoutEffect(() => {
|
|
111585
|
+
if (cardRef.current) {
|
|
111586
|
+
cardRef.current.inert = hidden;
|
|
111545
111587
|
}
|
|
111546
111588
|
}, [hidden]);
|
|
111547
111589
|
return /* @__PURE__ */ React80.createElement(
|
|
111548
111590
|
Card,
|
|
111549
111591
|
{
|
|
111550
|
-
ref,
|
|
111592
|
+
ref: cardRef,
|
|
111593
|
+
tabIndex: -1,
|
|
111594
|
+
role: "region",
|
|
111595
|
+
"aria-label": I18n.t("dataTable.filters.filters"),
|
|
111551
111596
|
style: { maxHeight: "100vh" },
|
|
111552
111597
|
className: cx20("contextPanel", className, {
|
|
111553
111598
|
"contextPanel--hidden": hidden
|
|
@@ -111602,6 +111647,7 @@ var ConfigPanelButton = () => {
|
|
|
111602
111647
|
const { contextPanel } = useInternalTableContext();
|
|
111603
111648
|
const hasNoContent = useTableHasNoContent();
|
|
111604
111649
|
const I18n = useI18nContext();
|
|
111650
|
+
const buttonRef = React80.useRef(null);
|
|
111605
111651
|
return /* @__PURE__ */ React80.createElement(
|
|
111606
111652
|
EmptyResultsControlTooltip,
|
|
111607
111653
|
{
|
|
@@ -111611,12 +111657,13 @@ var ConfigPanelButton = () => {
|
|
|
111611
111657
|
/* @__PURE__ */ React80.createElement(
|
|
111612
111658
|
ToggleButton,
|
|
111613
111659
|
{
|
|
111660
|
+
ref: buttonRef,
|
|
111614
111661
|
disabled: hasNoContent,
|
|
111615
111662
|
onClick: () => {
|
|
111616
111663
|
if (contextPanel.content === "configuration") {
|
|
111617
111664
|
contextPanel.hide();
|
|
111618
111665
|
} else {
|
|
111619
|
-
contextPanel.show("configuration");
|
|
111666
|
+
contextPanel.show("configuration", buttonRef.current ?? void 0);
|
|
111620
111667
|
}
|
|
111621
111668
|
},
|
|
111622
111669
|
icon: /* @__PURE__ */ React80.createElement(
|
|
@@ -112793,27 +112840,12 @@ var SingleSelectQuickFilterRenderer = (props) => {
|
|
|
112793
112840
|
return /* @__PURE__ */ React80.createElement(ClientSideSingleSelectQuickFilter, { ...props });
|
|
112794
112841
|
};
|
|
112795
112842
|
var SingleSelectQuickFilterRenderer_default = SingleSelectQuickFilterRenderer;
|
|
112796
|
-
var FOCUSABLE_SELECTOR2 = 'button:not([disabled]), input:not([disabled]), select:not([disabled]), textarea:not([disabled]), [tabindex]:not([tabindex="-1"])';
|
|
112797
112843
|
var FiltersPanelToggleButton = ({ hasDefinedFilters }) => {
|
|
112798
112844
|
const I18n = useI18nContext();
|
|
112799
|
-
const { contextPanel,
|
|
112845
|
+
const { contextPanel, filtersPanelId } = useInternalTableContext();
|
|
112800
112846
|
const hasNoContent = useTableHasNoContent();
|
|
112801
112847
|
const buttonRef = React80.useRef(null);
|
|
112802
112848
|
const isFiltersOpen = contextPanel.content === "filters";
|
|
112803
|
-
const isMounted = React80.useRef(false);
|
|
112804
|
-
React80.useEffect(() => {
|
|
112805
|
-
var _a, _b;
|
|
112806
|
-
if (!isMounted.current) {
|
|
112807
|
-
isMounted.current = true;
|
|
112808
|
-
return;
|
|
112809
|
-
}
|
|
112810
|
-
if (isFiltersOpen) {
|
|
112811
|
-
const panel = filtersBodyId ? document.getElementById(filtersBodyId) : null;
|
|
112812
|
-
(_a = panel == null ? void 0 : panel.querySelector(FOCUSABLE_SELECTOR2)) == null ? void 0 : _a.focus();
|
|
112813
|
-
} else {
|
|
112814
|
-
(_b = buttonRef.current) == null ? void 0 : _b.focus();
|
|
112815
|
-
}
|
|
112816
|
-
}, [isFiltersOpen, filtersBodyId]);
|
|
112817
112849
|
if (!hasDefinedFilters) {
|
|
112818
112850
|
return null;
|
|
112819
112851
|
}
|
|
@@ -112834,7 +112866,7 @@ var FiltersPanelToggleButton = ({ hasDefinedFilters }) => {
|
|
|
112834
112866
|
"aria-controls": filtersPanelId,
|
|
112835
112867
|
onClick: () => {
|
|
112836
112868
|
if (!isFiltersOpen) {
|
|
112837
|
-
contextPanel.show("filters");
|
|
112869
|
+
contextPanel.show("filters", buttonRef.current ?? void 0);
|
|
112838
112870
|
} else {
|
|
112839
112871
|
contextPanel.hide();
|
|
112840
112872
|
}
|
package/dist/modern/index.cjs
CHANGED
|
@@ -1400,7 +1400,7 @@ ag-grid, ag-grid-angular, ag-grid-ng2, ag-grid-polymer, ag-grid-aurelia {
|
|
|
1400
1400
|
animation-iteration-count: infinite;
|
|
1401
1401
|
animation-name: ag-shake-left-to-right;
|
|
1402
1402
|
}
|
|
1403
|
-
@keyframes _ag-shake-left-to-
|
|
1403
|
+
@keyframes _ag-shake-left-to-right_pphrk_342 {
|
|
1404
1404
|
from {
|
|
1405
1405
|
padding-left: 6px;
|
|
1406
1406
|
padding-right: 2px;
|
|
@@ -5401,7 +5401,7 @@ input[class^=ag-][type=button]:focus, button[class^=ag-]:focus {
|
|
|
5401
5401
|
animation-iteration-count: infinite;
|
|
5402
5402
|
animation-timing-function: linear;
|
|
5403
5403
|
}
|
|
5404
|
-
@keyframes
|
|
5404
|
+
@keyframes _spin_pphrk_1 {
|
|
5405
5405
|
from {
|
|
5406
5406
|
transform: rotate(0deg);
|
|
5407
5407
|
}
|
|
@@ -7933,7 +7933,7 @@ input[class^=ag-][type=range]:disabled {
|
|
|
7933
7933
|
padding-left: 16px;
|
|
7934
7934
|
}
|
|
7935
7935
|
|
|
7936
|
-
div.
|
|
7936
|
+
div._contextPanel_pphrk_7159 {
|
|
7937
7937
|
width: 400px;
|
|
7938
7938
|
transition: all ease 500ms;
|
|
7939
7939
|
flex: 0 0 auto;
|
|
@@ -7942,7 +7942,12 @@ div._contextPanel_1ern5_7159 {
|
|
|
7942
7942
|
border: 1px solid #d6dadc;
|
|
7943
7943
|
display: flex;
|
|
7944
7944
|
}
|
|
7945
|
-
div.
|
|
7945
|
+
div._contextPanel_pphrk_7159:focus {
|
|
7946
|
+
border-color: #2066df;
|
|
7947
|
+
box-shadow: inset 0 0 1px 0 #2066df;
|
|
7948
|
+
outline: none;
|
|
7949
|
+
}
|
|
7950
|
+
div._contextPanel--hidden_pphrk_7173 {
|
|
7946
7951
|
border: none;
|
|
7947
7952
|
overflow: hidden;
|
|
7948
7953
|
padding: 0px;
|
|
@@ -7950,50 +7955,50 @@ div._contextPanel--hidden_1ern5_7168 {
|
|
|
7950
7955
|
width: 0px;
|
|
7951
7956
|
}
|
|
7952
7957
|
|
|
7953
|
-
.
|
|
7958
|
+
._contextPanelWrapper_pphrk_7181 {
|
|
7954
7959
|
position: relative;
|
|
7955
7960
|
flex-grow: 1;
|
|
7956
7961
|
}
|
|
7957
7962
|
|
|
7958
|
-
.
|
|
7963
|
+
._contextPanelBody_pphrk_7186 {
|
|
7959
7964
|
width: clamp(380px, 400px, 100%);
|
|
7960
7965
|
}
|
|
7961
7966
|
|
|
7962
|
-
._contextPanel-
|
|
7967
|
+
._contextPanel-stickyHeader_pphrk_7190 {
|
|
7963
7968
|
background-color: #ffffff;
|
|
7964
7969
|
position: sticky;
|
|
7965
7970
|
top: 0;
|
|
7966
7971
|
z-index: 5;
|
|
7967
7972
|
}
|
|
7968
7973
|
|
|
7969
|
-
._filters-
|
|
7974
|
+
._filters-list_pphrk_7197 {
|
|
7970
7975
|
padding: 0;
|
|
7971
7976
|
margin: 0;
|
|
7972
7977
|
}
|
|
7973
|
-
._filters-
|
|
7978
|
+
._filters-list_pphrk_7197 ol {
|
|
7974
7979
|
padding: 0;
|
|
7975
7980
|
margin: 0;
|
|
7976
7981
|
}
|
|
7977
7982
|
|
|
7978
|
-
._col-drag-column-
|
|
7983
|
+
._col-drag-column-icon_pphrk_7206 {
|
|
7979
7984
|
color: #6a767c;
|
|
7980
7985
|
}
|
|
7981
7986
|
|
|
7982
|
-
._tabular-
|
|
7987
|
+
._tabular-nums_pphrk_7210 {
|
|
7983
7988
|
font-variant-numeric: tabular-nums;
|
|
7984
7989
|
}`;
|
|
7985
7990
|
document.head.appendChild(document.createElement("style")).appendChild(document.createTextNode(css));
|
|
7986
7991
|
var styles_default = {
|
|
7987
|
-
"contextPanel": "
|
|
7988
|
-
"contextPanel--hidden": "_contextPanel--
|
|
7989
|
-
"contextPanelWrapper": "
|
|
7990
|
-
"contextPanelBody": "
|
|
7991
|
-
"contextPanel-stickyHeader": "_contextPanel-
|
|
7992
|
-
"filters-list": "_filters-
|
|
7993
|
-
"col-drag-column-icon": "_col-drag-column-
|
|
7994
|
-
"tabular-nums": "_tabular-
|
|
7995
|
-
"ag-shake-left-to-right": "_ag-shake-left-to-
|
|
7996
|
-
"spin": "
|
|
7992
|
+
"contextPanel": "_contextPanel_pphrk_7159",
|
|
7993
|
+
"contextPanel--hidden": "_contextPanel--hidden_pphrk_7173",
|
|
7994
|
+
"contextPanelWrapper": "_contextPanelWrapper_pphrk_7181",
|
|
7995
|
+
"contextPanelBody": "_contextPanelBody_pphrk_7186",
|
|
7996
|
+
"contextPanel-stickyHeader": "_contextPanel-stickyHeader_pphrk_7190",
|
|
7997
|
+
"filters-list": "_filters-list_pphrk_7197",
|
|
7998
|
+
"col-drag-column-icon": "_col-drag-column-icon_pphrk_7206",
|
|
7999
|
+
"tabular-nums": "_tabular-nums_pphrk_7210",
|
|
8000
|
+
"ag-shake-left-to-right": "_ag-shake-left-to-right_pphrk_342",
|
|
8001
|
+
"spin": "_spin_pphrk_1"
|
|
7997
8002
|
};
|
|
7998
8003
|
|
|
7999
8004
|
// src/CellRenderers/BooleanCell.tsx
|
|
@@ -54733,6 +54738,7 @@ function transformToColumnDefinition(colDef = emptyObject) {
|
|
|
54733
54738
|
getStringFormattedValue,
|
|
54734
54739
|
columnHeaderParams: colDef.headerComponentParams,
|
|
54735
54740
|
headerName: colDef.headerName,
|
|
54741
|
+
headerClass: colDef.headerClass,
|
|
54736
54742
|
hidden: colDef.hide,
|
|
54737
54743
|
filterRenderer: colDef.filterRenderer,
|
|
54738
54744
|
lockVisible: colDef.lockVisible,
|
|
@@ -57916,6 +57922,7 @@ var InternalTableContext = React80__default.default.createContext({
|
|
|
57916
57922
|
hide: () => {
|
|
57917
57923
|
},
|
|
57918
57924
|
isVisible: false,
|
|
57925
|
+
panelRef: React80__default.default.createRef(),
|
|
57919
57926
|
show: () => {
|
|
57920
57927
|
}
|
|
57921
57928
|
},
|
|
@@ -59719,14 +59726,16 @@ var useRowSelectionState = () => {
|
|
|
59719
59726
|
var BulkEditActionButton = (props) => {
|
|
59720
59727
|
const { contextPanel } = useInternalTableContext();
|
|
59721
59728
|
const i18n = coreReact.useI18nContext();
|
|
59729
|
+
const buttonRef = React80__default.default.useRef(null);
|
|
59722
59730
|
const editActionLabel = props.actionText ?? i18n.t("dataTable.bulkActions.editValues");
|
|
59723
59731
|
return /* @__PURE__ */ React80__default.default.createElement(
|
|
59724
59732
|
coreReact.Button,
|
|
59725
59733
|
{
|
|
59734
|
+
ref: buttonRef,
|
|
59726
59735
|
"aria-label": i18n.t("dataTable.bulkActions.bulkEdit"),
|
|
59727
59736
|
"data-qa": "bulkEditIcon",
|
|
59728
59737
|
icon: /* @__PURE__ */ React80__default.default.createElement(coreIcons.Pencil, null),
|
|
59729
|
-
onClick: () => contextPanel.show("bulkEdit"),
|
|
59738
|
+
onClick: () => contextPanel.show("bulkEdit", buttonRef.current ?? void 0),
|
|
59730
59739
|
variant: "tertiary"
|
|
59731
59740
|
},
|
|
59732
59741
|
props.showLabel && editActionLabel
|
|
@@ -104353,10 +104362,6 @@ var BulkEditPanel = ({}) => {
|
|
|
104353
104362
|
const { contextPanel, suppressBulkEditToasts } = useInternalTableContext();
|
|
104354
104363
|
const I18n = coreReact.useI18nContext();
|
|
104355
104364
|
const bulkEditRef = React80__default.default.useRef(null);
|
|
104356
|
-
const bodyRef = React80__default.default.useRef(null);
|
|
104357
|
-
React80.useEffect(() => {
|
|
104358
|
-
bodyRef.current?.focus();
|
|
104359
|
-
}, []);
|
|
104360
104365
|
return /* @__PURE__ */ React80__default.default.createElement(coreReact.Panel, null, /* @__PURE__ */ React80__default.default.createElement(
|
|
104361
104366
|
coreReact.Panel.Header,
|
|
104362
104367
|
{
|
|
@@ -104366,7 +104371,7 @@ var BulkEditPanel = ({}) => {
|
|
|
104366
104371
|
}
|
|
104367
104372
|
},
|
|
104368
104373
|
/* @__PURE__ */ React80__default.default.createElement(coreReact.Panel.Title, null, I18n.t("dataTable.bulkActions.editValues"))
|
|
104369
|
-
), /* @__PURE__ */ React80__default.default.createElement(coreReact.Panel.Body,
|
|
104374
|
+
), /* @__PURE__ */ React80__default.default.createElement(coreReact.Panel.Body, null, /* @__PURE__ */ React80__default.default.createElement(coreReact.Panel.Section, null, /* @__PURE__ */ React80__default.default.createElement(
|
|
104370
104375
|
BulkEdit,
|
|
104371
104376
|
{
|
|
104372
104377
|
ref: bulkEditRef,
|
|
@@ -104801,18 +104806,33 @@ var ConfigurationPanel = ({
|
|
|
104801
104806
|
function useContextPanel() {
|
|
104802
104807
|
const [content, setContent] = React80.useState();
|
|
104803
104808
|
const visibility = coreReact.useVisibility({ afterHide: () => setContent(void 0) });
|
|
104804
|
-
const
|
|
104805
|
-
|
|
104806
|
-
|
|
104807
|
-
|
|
104809
|
+
const triggerRef = React80.useRef(null);
|
|
104810
|
+
const panelRef = React80.useRef(null);
|
|
104811
|
+
const show = React80.useCallback(
|
|
104812
|
+
(panelContent, trigger) => {
|
|
104813
|
+
triggerRef.current = trigger ?? null;
|
|
104814
|
+
setContent(panelContent);
|
|
104815
|
+
visibility.show();
|
|
104816
|
+
},
|
|
104817
|
+
[]
|
|
104818
|
+
);
|
|
104808
104819
|
const hide = React80.useCallback(() => {
|
|
104820
|
+
const trigger = triggerRef.current;
|
|
104809
104821
|
setContent(void 0);
|
|
104810
104822
|
visibility.hide();
|
|
104823
|
+
trigger?.focus();
|
|
104824
|
+
triggerRef.current = null;
|
|
104811
104825
|
}, []);
|
|
104826
|
+
React80.useEffect(() => {
|
|
104827
|
+
if (content) {
|
|
104828
|
+
panelRef.current?.focus();
|
|
104829
|
+
}
|
|
104830
|
+
}, [content]);
|
|
104812
104831
|
return {
|
|
104813
104832
|
content,
|
|
104814
104833
|
hide,
|
|
104815
104834
|
isVisible: visibility.isVisible,
|
|
104835
|
+
panelRef,
|
|
104816
104836
|
show
|
|
104817
104837
|
};
|
|
104818
104838
|
}
|
|
@@ -111076,9 +111096,26 @@ var ContextPanel = ({
|
|
|
111076
111096
|
...props
|
|
111077
111097
|
}) => {
|
|
111078
111098
|
const { contextPanel } = useInternalTableContext();
|
|
111099
|
+
const I18n = coreReact.useI18nContext();
|
|
111100
|
+
const cardRef = React80__default.default.useRef(null);
|
|
111101
|
+
const panelLabelKeys = {
|
|
111102
|
+
configuration: "dataTable.tableSettings.tableSettings",
|
|
111103
|
+
bulkEdit: "dataTable.bulkActions.editValues"
|
|
111104
|
+
};
|
|
111105
|
+
const panelLabel = contextPanel.content ? panelLabelKeys[contextPanel.content] : void 0;
|
|
111106
|
+
const ariaLabel = panelLabel ? I18n.t(panelLabel) : void 0;
|
|
111107
|
+
React80__default.default.useLayoutEffect(() => {
|
|
111108
|
+
if (contextPanel.content && contextPanel.content !== "filters") {
|
|
111109
|
+
contextPanel.panelRef.current = cardRef.current;
|
|
111110
|
+
}
|
|
111111
|
+
}, [contextPanel.content, contextPanel.panelRef]);
|
|
111079
111112
|
return /* @__PURE__ */ React80__default.default.createElement(
|
|
111080
111113
|
coreReact.Card,
|
|
111081
111114
|
{
|
|
111115
|
+
ref: cardRef,
|
|
111116
|
+
tabIndex: -1,
|
|
111117
|
+
role: "region",
|
|
111118
|
+
"aria-label": ariaLabel,
|
|
111082
111119
|
className: cx19("contextPanel", className, {
|
|
111083
111120
|
"contextPanel--hidden": !contextPanel.isVisible || contextPanel.content === "filters"
|
|
111084
111121
|
}),
|
|
@@ -111350,19 +111387,27 @@ var BaseFiltersPanel = ({
|
|
|
111350
111387
|
onClearAllFilters = noop5,
|
|
111351
111388
|
...props
|
|
111352
111389
|
}) => {
|
|
111353
|
-
const
|
|
111390
|
+
const cardRef = React80__default.default.useRef(null);
|
|
111354
111391
|
const { contextPanel, filtersBodyId, filtersPanelId } = useInternalTableContext();
|
|
111355
111392
|
const I18n = coreReact.useI18nContext();
|
|
111356
111393
|
const hidden = !contextPanel.isVisible || contextPanel.content !== "filters";
|
|
111357
111394
|
React80__default.default.useLayoutEffect(() => {
|
|
111358
|
-
if (
|
|
111359
|
-
|
|
111395
|
+
if (contextPanel.content === "filters") {
|
|
111396
|
+
contextPanel.panelRef.current = cardRef.current;
|
|
111397
|
+
}
|
|
111398
|
+
}, [contextPanel.content, contextPanel.panelRef]);
|
|
111399
|
+
React80__default.default.useLayoutEffect(() => {
|
|
111400
|
+
if (cardRef.current) {
|
|
111401
|
+
cardRef.current.inert = hidden;
|
|
111360
111402
|
}
|
|
111361
111403
|
}, [hidden]);
|
|
111362
111404
|
return /* @__PURE__ */ React80__default.default.createElement(
|
|
111363
111405
|
coreReact.Card,
|
|
111364
111406
|
{
|
|
111365
|
-
ref,
|
|
111407
|
+
ref: cardRef,
|
|
111408
|
+
tabIndex: -1,
|
|
111409
|
+
role: "region",
|
|
111410
|
+
"aria-label": I18n.t("dataTable.filters.filters"),
|
|
111366
111411
|
style: { maxHeight: "100vh" },
|
|
111367
111412
|
className: cx20("contextPanel", className, {
|
|
111368
111413
|
"contextPanel--hidden": hidden
|
|
@@ -111416,6 +111461,7 @@ var ConfigPanelButton = () => {
|
|
|
111416
111461
|
const { contextPanel } = useInternalTableContext();
|
|
111417
111462
|
const hasNoContent = useTableHasNoContent();
|
|
111418
111463
|
const I18n = coreReact.useI18nContext();
|
|
111464
|
+
const buttonRef = React80__default.default.useRef(null);
|
|
111419
111465
|
return /* @__PURE__ */ React80__default.default.createElement(
|
|
111420
111466
|
EmptyResultsControlTooltip,
|
|
111421
111467
|
{
|
|
@@ -111425,12 +111471,13 @@ var ConfigPanelButton = () => {
|
|
|
111425
111471
|
/* @__PURE__ */ React80__default.default.createElement(
|
|
111426
111472
|
coreReact.ToggleButton,
|
|
111427
111473
|
{
|
|
111474
|
+
ref: buttonRef,
|
|
111428
111475
|
disabled: hasNoContent,
|
|
111429
111476
|
onClick: () => {
|
|
111430
111477
|
if (contextPanel.content === "configuration") {
|
|
111431
111478
|
contextPanel.hide();
|
|
111432
111479
|
} else {
|
|
111433
|
-
contextPanel.show("configuration");
|
|
111480
|
+
contextPanel.show("configuration", buttonRef.current ?? void 0);
|
|
111434
111481
|
}
|
|
111435
111482
|
},
|
|
111436
111483
|
icon: /* @__PURE__ */ React80__default.default.createElement(
|
|
@@ -112583,26 +112630,12 @@ var SingleSelectQuickFilterRenderer = (props) => {
|
|
|
112583
112630
|
return /* @__PURE__ */ React80__default.default.createElement(ClientSideSingleSelectQuickFilter, { ...props });
|
|
112584
112631
|
};
|
|
112585
112632
|
var SingleSelectQuickFilterRenderer_default = SingleSelectQuickFilterRenderer;
|
|
112586
|
-
var FOCUSABLE_SELECTOR2 = 'button:not([disabled]), input:not([disabled]), select:not([disabled]), textarea:not([disabled]), [tabindex]:not([tabindex="-1"])';
|
|
112587
112633
|
var FiltersPanelToggleButton = ({ hasDefinedFilters }) => {
|
|
112588
112634
|
const I18n = coreReact.useI18nContext();
|
|
112589
|
-
const { contextPanel,
|
|
112635
|
+
const { contextPanel, filtersPanelId } = useInternalTableContext();
|
|
112590
112636
|
const hasNoContent = useTableHasNoContent();
|
|
112591
112637
|
const buttonRef = React80__default.default.useRef(null);
|
|
112592
112638
|
const isFiltersOpen = contextPanel.content === "filters";
|
|
112593
|
-
const isMounted = React80__default.default.useRef(false);
|
|
112594
|
-
React80__default.default.useEffect(() => {
|
|
112595
|
-
if (!isMounted.current) {
|
|
112596
|
-
isMounted.current = true;
|
|
112597
|
-
return;
|
|
112598
|
-
}
|
|
112599
|
-
if (isFiltersOpen) {
|
|
112600
|
-
const panel = filtersBodyId ? document.getElementById(filtersBodyId) : null;
|
|
112601
|
-
panel?.querySelector(FOCUSABLE_SELECTOR2)?.focus();
|
|
112602
|
-
} else {
|
|
112603
|
-
buttonRef.current?.focus();
|
|
112604
|
-
}
|
|
112605
|
-
}, [isFiltersOpen, filtersBodyId]);
|
|
112606
112639
|
if (!hasDefinedFilters) {
|
|
112607
112640
|
return null;
|
|
112608
112641
|
}
|
|
@@ -112623,7 +112656,7 @@ var FiltersPanelToggleButton = ({ hasDefinedFilters }) => {
|
|
|
112623
112656
|
"aria-controls": filtersPanelId,
|
|
112624
112657
|
onClick: () => {
|
|
112625
112658
|
if (!isFiltersOpen) {
|
|
112626
|
-
contextPanel.show("filters");
|
|
112659
|
+
contextPanel.show("filters", buttonRef.current ?? void 0);
|
|
112627
112660
|
} else {
|
|
112628
112661
|
contextPanel.hide();
|
|
112629
112662
|
}
|
package/dist/modern/index.d.cts
CHANGED
|
@@ -502,6 +502,7 @@ interface ColumnDefinition<TValue = any, TRenderer = React.FC<ICellRendererParam
|
|
|
502
502
|
getStringFormattedValue?: (value: TValue) => string;
|
|
503
503
|
getFilterKeyCreator?: ColDef['keyCreator'];
|
|
504
504
|
headerName?: string;
|
|
505
|
+
headerClass?: ColDef['headerClass'];
|
|
505
506
|
columnHeaderParams?: {
|
|
506
507
|
menuOptions?: MenuDropdownOption[];
|
|
507
508
|
headerNode?: (props: {
|
|
@@ -724,7 +725,8 @@ interface ContextPanelApi {
|
|
|
724
725
|
content?: ContextPanelContent;
|
|
725
726
|
hide: () => void;
|
|
726
727
|
isVisible: boolean;
|
|
727
|
-
|
|
728
|
+
panelRef: React.RefObject<HTMLElement>;
|
|
729
|
+
show: (content: ContextPanelContent, trigger?: HTMLElement) => void;
|
|
728
730
|
}
|
|
729
731
|
interface CustomFooterConfig {
|
|
730
732
|
height?: RowSize;
|
package/dist/modern/index.d.ts
CHANGED
|
@@ -502,6 +502,7 @@ interface ColumnDefinition<TValue = any, TRenderer = React.FC<ICellRendererParam
|
|
|
502
502
|
getStringFormattedValue?: (value: TValue) => string;
|
|
503
503
|
getFilterKeyCreator?: ColDef['keyCreator'];
|
|
504
504
|
headerName?: string;
|
|
505
|
+
headerClass?: ColDef['headerClass'];
|
|
505
506
|
columnHeaderParams?: {
|
|
506
507
|
menuOptions?: MenuDropdownOption[];
|
|
507
508
|
headerNode?: (props: {
|
|
@@ -724,7 +725,8 @@ interface ContextPanelApi {
|
|
|
724
725
|
content?: ContextPanelContent;
|
|
725
726
|
hide: () => void;
|
|
726
727
|
isVisible: boolean;
|
|
727
|
-
|
|
728
|
+
panelRef: React.RefObject<HTMLElement>;
|
|
729
|
+
show: (content: ContextPanelContent, trigger?: HTMLElement) => void;
|
|
728
730
|
}
|
|
729
731
|
interface CustomFooterConfig {
|
|
730
732
|
height?: RowSize;
|