@patternfly/react-table 4.105.6 → 4.105.9
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 +24 -0
- package/dist/umd/react-table.css +585 -585
- package/dist/umd/react-table.js +103 -56
- package/dist/umd/react-table.min.css +2797 -2797
- package/dist/umd/react-table.min.js +4 -4
- package/package.json +6 -6
package/dist/umd/react-table.js
CHANGED
|
@@ -1461,10 +1461,10 @@
|
|
|
1461
1461
|
return trap;
|
|
1462
1462
|
};
|
|
1463
1463
|
|
|
1464
|
-
class
|
|
1464
|
+
class FocusTrapBase extends React__namespace.Component {
|
|
1465
1465
|
constructor(props) {
|
|
1466
1466
|
super(props);
|
|
1467
|
-
this.divRef = React__namespace.createRef();
|
|
1467
|
+
this.divRef = this.props.innerRef || React__namespace.createRef();
|
|
1468
1468
|
if (typeof document !== 'undefined') {
|
|
1469
1469
|
this.previouslyFocusedElement = document.activeElement;
|
|
1470
1470
|
}
|
|
@@ -1506,18 +1506,22 @@
|
|
|
1506
1506
|
}
|
|
1507
1507
|
}
|
|
1508
1508
|
render() {
|
|
1509
|
-
|
|
1510
|
-
|
|
1509
|
+
const _a = this.props, { children, className,
|
|
1510
|
+
/* eslint-disable @typescript-eslint/no-unused-vars */
|
|
1511
|
+
focusTrapOptions, active, paused, preventScrollOnDeactivate, innerRef } = _a,
|
|
1512
|
+
/* eslint-enable @typescript-eslint/no-unused-vars */
|
|
1513
|
+
rest = __rest$1(_a, ["children", "className", "focusTrapOptions", "active", "paused", "preventScrollOnDeactivate", "innerRef"]);
|
|
1511
1514
|
return (React__namespace.createElement("div", Object.assign({ ref: this.divRef, className: className }, rest), children));
|
|
1512
1515
|
}
|
|
1513
1516
|
}
|
|
1514
|
-
|
|
1515
|
-
|
|
1517
|
+
FocusTrapBase.displayName = 'FocusTrap';
|
|
1518
|
+
FocusTrapBase.defaultProps = {
|
|
1516
1519
|
active: true,
|
|
1517
1520
|
paused: false,
|
|
1518
1521
|
focusTrapOptions: {},
|
|
1519
1522
|
preventScrollOnDeactivate: false
|
|
1520
1523
|
};
|
|
1524
|
+
const FocusTrap = React__namespace.forwardRef((props, ref) => (React__namespace.createElement(FocusTrapBase, Object.assign({ innerRef: ref }, props))));
|
|
1521
1525
|
|
|
1522
1526
|
/** This Component can be used to wrap a functional component in order to generate a random ID
|
|
1523
1527
|
* Example of how to use this component
|
|
@@ -1941,26 +1945,6 @@
|
|
|
1941
1945
|
event.preventDefault();
|
|
1942
1946
|
} })), {});
|
|
1943
1947
|
|
|
1944
|
-
/**
|
|
1945
|
-
* This component wraps any ReactNode and finds its ref
|
|
1946
|
-
* It has to be a class for findDOMNode to work
|
|
1947
|
-
* Ideally, all components used as triggers/toggles are either:
|
|
1948
|
-
* - class based components we can assign our own ref to
|
|
1949
|
-
* - functional components that have forwardRef implemented
|
|
1950
|
-
* However, there is no guarantee that is what will get passed in as trigger/toggle in the case of tooltips and popovers
|
|
1951
|
-
*/
|
|
1952
|
-
class FindRefWrapper extends React__namespace.Component {
|
|
1953
|
-
componentDidMount() {
|
|
1954
|
-
// eslint-disable-next-line react/no-find-dom-node
|
|
1955
|
-
const root = ReactDOM__namespace.findDOMNode(this);
|
|
1956
|
-
this.props.onFoundRef(root);
|
|
1957
|
-
}
|
|
1958
|
-
render() {
|
|
1959
|
-
return this.props.children || null;
|
|
1960
|
-
}
|
|
1961
|
-
}
|
|
1962
|
-
FindRefWrapper.displayName = 'FindRefWrapper';
|
|
1963
|
-
|
|
1964
1948
|
/**
|
|
1965
1949
|
* @param element
|
|
1966
1950
|
*/
|
|
@@ -3605,10 +3589,30 @@
|
|
|
3605
3589
|
};
|
|
3606
3590
|
};
|
|
3607
3591
|
|
|
3592
|
+
/**
|
|
3593
|
+
* This component wraps any ReactNode and finds its ref
|
|
3594
|
+
* It has to be a class for findDOMNode to work
|
|
3595
|
+
* Ideally, all components used as triggers/toggles are either:
|
|
3596
|
+
* - class based components we can assign our own ref to
|
|
3597
|
+
* - functional components that have forwardRef implemented
|
|
3598
|
+
* However, there is no guarantee that is what will get passed in as trigger/toggle in the case of tooltips and popovers
|
|
3599
|
+
*/
|
|
3600
|
+
class FindRefWrapper extends React__namespace.Component {
|
|
3601
|
+
componentDidMount() {
|
|
3602
|
+
// eslint-disable-next-line react/no-find-dom-node
|
|
3603
|
+
const root = ReactDOM__namespace.findDOMNode(this);
|
|
3604
|
+
this.props.onFoundRef(root);
|
|
3605
|
+
}
|
|
3606
|
+
render() {
|
|
3607
|
+
return this.props.children || null;
|
|
3608
|
+
}
|
|
3609
|
+
}
|
|
3610
|
+
FindRefWrapper.displayName = 'FindRefWrapper';
|
|
3611
|
+
|
|
3608
3612
|
const hash = { left: 'right', right: 'left', bottom: 'top', top: 'bottom' };
|
|
3609
3613
|
const getOppositePlacement = (placement) => placement.replace(/left|right|bottom|top/g, (matched) => hash[matched]);
|
|
3610
3614
|
const getOpacityTransition = (animationDuration) => `opacity ${animationDuration}ms cubic-bezier(.54, 1.5, .38, 1.11)`;
|
|
3611
|
-
const Popper = ({ trigger, popper, popperMatchesTriggerWidth = true, direction = 'down', position = 'left', placement, appendTo = () => document.body, zIndex = 9999, isVisible = true, positionModifiers, distance = 0, onMouseEnter, onMouseLeave, onFocus, onBlur, onDocumentClick, onTriggerClick, onTriggerEnter, onPopperClick, onPopperMouseEnter, onPopperMouseLeave, onDocumentKeyDown, enableFlip = true, flipBehavior = 'flip', reference }) => {
|
|
3615
|
+
const Popper = ({ trigger, popper, popperMatchesTriggerWidth = true, direction = 'down', position = 'left', placement, appendTo = () => document.body, zIndex = 9999, isVisible = true, positionModifiers, distance = 0, onMouseEnter, onMouseLeave, onFocus, onBlur, onDocumentClick, onTriggerClick, onTriggerEnter, onPopperClick, onPopperMouseEnter, onPopperMouseLeave, onDocumentKeyDown, enableFlip = true, flipBehavior = 'flip', reference, removeFindDomNode = false, popperRef }) => {
|
|
3612
3616
|
const [triggerElement, setTriggerElement] = React__namespace.useState(null);
|
|
3613
3617
|
const [refElement, setRefElement] = React__namespace.useState(null);
|
|
3614
3618
|
const [popperElement, setPopperElement] = React__namespace.useState(null);
|
|
@@ -3628,6 +3632,17 @@
|
|
|
3628
3632
|
}
|
|
3629
3633
|
}
|
|
3630
3634
|
}, [reference]);
|
|
3635
|
+
React__namespace.useEffect(() => {
|
|
3636
|
+
// When the popperRef is defined or the popper visiblity changes, ensure the popper element is up to date
|
|
3637
|
+
if (popperRef) {
|
|
3638
|
+
if (popperRef.current) {
|
|
3639
|
+
setPopperElement(popperRef.current);
|
|
3640
|
+
}
|
|
3641
|
+
else if (typeof popperRef === 'function') {
|
|
3642
|
+
setPopperElement(popperRef());
|
|
3643
|
+
}
|
|
3644
|
+
}
|
|
3645
|
+
}, [isVisible, popperRef]);
|
|
3631
3646
|
const addEventListener = (listener, element, event) => {
|
|
3632
3647
|
if (listener && element) {
|
|
3633
3648
|
element.addEventListener(event, listener);
|
|
@@ -3751,18 +3766,42 @@
|
|
|
3751
3766
|
}
|
|
3752
3767
|
return positionModifiers.top;
|
|
3753
3768
|
};
|
|
3754
|
-
const
|
|
3769
|
+
const options = Object.assign({ className: css(popper.props && popper.props.className, positionModifiers && modifierFromPopperPosition()), style: Object.assign(Object.assign(Object.assign({}, ((popper.props && popper.props.style) || {})), popperStyles.popper), { zIndex }) }, attributes.popper);
|
|
3770
|
+
const menuWithPopper = React__namespace.cloneElement(popper, options);
|
|
3755
3771
|
const getTarget = () => {
|
|
3756
3772
|
if (typeof appendTo === 'function') {
|
|
3757
3773
|
return appendTo();
|
|
3758
3774
|
}
|
|
3759
3775
|
return appendTo;
|
|
3760
3776
|
};
|
|
3777
|
+
/**
|
|
3778
|
+
* To enable strict mode, the popper must either have its reference defined via the popperRef property,
|
|
3779
|
+
* or the removeFindDomNode flag must be present. Even if the reference is passed in, unlike the trigger,
|
|
3780
|
+
* the popper property must still be passed.
|
|
3781
|
+
* The trigger must similarly have either its reference defined via the reference property, or the
|
|
3782
|
+
* removeFindDomNode flag must be present. The trigger property is not required when the reference is passed.
|
|
3783
|
+
*
|
|
3784
|
+
* Strict mode may be enabled by passing both reference properties to Popper, or by passing the
|
|
3785
|
+
* removeFindDomNode flag with either reference property, or by solely passing the removeFindDomNode
|
|
3786
|
+
* flag.
|
|
3787
|
+
*/
|
|
3788
|
+
let popperPortal;
|
|
3789
|
+
if (removeFindDomNode) {
|
|
3790
|
+
// If removeFindDomNode is passed, use the removeFindDomNode method of wrapping divs
|
|
3791
|
+
popperPortal = React__namespace.createElement("div", { ref: node => setPopperElement(node === null || node === void 0 ? void 0 : node.firstElementChild) }, menuWithPopper);
|
|
3792
|
+
}
|
|
3793
|
+
else if (popperRef) {
|
|
3794
|
+
// If removeFindDomNode is not passed and popperRef is passed, use the popperRef method
|
|
3795
|
+
popperPortal = menuWithPopper;
|
|
3796
|
+
}
|
|
3797
|
+
else {
|
|
3798
|
+
// If neither removeFindDomNode and popperRef exist, use the old method of FindRefWrapper
|
|
3799
|
+
popperPortal = (React__namespace.createElement(FindRefWrapper, { onFoundRef: (foundRef) => setPopperElement(foundRef) }, menuWithPopper));
|
|
3800
|
+
}
|
|
3761
3801
|
return (React__namespace.createElement(React__namespace.Fragment, null,
|
|
3762
|
-
!reference && trigger && (React__namespace.createElement(FindRefWrapper, { onFoundRef: (foundRef) => setTriggerElement(foundRef) }, trigger)),
|
|
3763
|
-
|
|
3764
|
-
|
|
3765
|
-
ReactDOM__namespace.createPortal(React__namespace.createElement(FindRefWrapper, { onFoundRef: (foundRef) => setPopperElement(foundRef) }, menuWithPopper), getTarget())));
|
|
3802
|
+
!reference && trigger && React__namespace.isValidElement(trigger) && !removeFindDomNode && (React__namespace.createElement(FindRefWrapper, { onFoundRef: (foundRef) => setTriggerElement(foundRef) }, trigger)),
|
|
3803
|
+
!reference && trigger && React__namespace.isValidElement(trigger) && removeFindDomNode && (React__namespace.createElement("div", { ref: node => setTriggerElement(node === null || node === void 0 ? void 0 : node.firstElementChild) }, trigger)),
|
|
3804
|
+
ready && isVisible && ReactDOM__namespace.createPortal(popperPortal, getTarget())));
|
|
3766
3805
|
};
|
|
3767
3806
|
Popper.displayName = 'Popper';
|
|
3768
3807
|
|
|
@@ -4014,22 +4053,37 @@
|
|
|
4014
4053
|
* );
|
|
4015
4054
|
* }
|
|
4016
4055
|
*
|
|
4056
|
+
* Example 3 - With debounced method passed in:
|
|
4057
|
+
*
|
|
4058
|
+
* public componentDidMount() {
|
|
4059
|
+
* this.observer = getResizeObserver(this.inputRef.current, debounce(this.handleResize, 250), false);
|
|
4060
|
+
* }
|
|
4061
|
+
*
|
|
4017
4062
|
* @param {Element} containerRefElement The container reference to observe
|
|
4018
4063
|
* @param {Function} handleResize The function to call for resize events
|
|
4064
|
+
* @param {boolean} useRequestAnimationFrame Whether to pass the handleResize function as a callback to requestAnimationFrame. Pass in false when the function passed in is debounced. Defaults to true.
|
|
4019
4065
|
* @return {Function} The function used to unobserve resize events
|
|
4020
4066
|
*/
|
|
4021
|
-
const getResizeObserver = (containerRefElement, handleResize) => {
|
|
4067
|
+
const getResizeObserver = (containerRefElement, handleResize, useRequestAnimationFrame = true) => {
|
|
4022
4068
|
let unobserve;
|
|
4023
4069
|
if (canUseDOM) {
|
|
4024
4070
|
const { ResizeObserver } = window;
|
|
4025
4071
|
if (containerRefElement && ResizeObserver) {
|
|
4026
4072
|
const resizeObserver = new ResizeObserver((entries) => {
|
|
4027
4073
|
// Wrap resize function in requestAnimationFrame to avoid "ResizeObserver loop limit exceeded" errors
|
|
4028
|
-
|
|
4074
|
+
if (useRequestAnimationFrame) {
|
|
4075
|
+
window.requestAnimationFrame(() => {
|
|
4076
|
+
if (Array.isArray(entries) && entries.length > 0) {
|
|
4077
|
+
handleResize();
|
|
4078
|
+
}
|
|
4079
|
+
});
|
|
4080
|
+
// Avoid wrapping function in requestAnimationFrame if the function is debounced
|
|
4081
|
+
}
|
|
4082
|
+
else {
|
|
4029
4083
|
if (Array.isArray(entries) && entries.length > 0) {
|
|
4030
4084
|
handleResize();
|
|
4031
4085
|
}
|
|
4032
|
-
}
|
|
4086
|
+
}
|
|
4033
4087
|
});
|
|
4034
4088
|
resizeObserver.observe(containerRefElement);
|
|
4035
4089
|
unobserve = () => resizeObserver.unobserve(containerRefElement);
|
|
@@ -4402,7 +4456,7 @@
|
|
|
4402
4456
|
const Tooltip = (_a) => {
|
|
4403
4457
|
var { content: bodyContent, position = 'top', trigger = 'mouseenter focus', isVisible = false, isContentLeftAligned = false, enableFlip = true, className = '', entryDelay = 300, exitDelay = 300, appendTo = () => document.body, zIndex = 9999, maxWidth = tooltipMaxWidth.value, distance = 15, aria = 'describedby',
|
|
4404
4458
|
// For every initial starting position, there are 3 escape positions
|
|
4405
|
-
flipBehavior = ['top', 'right', 'bottom', 'left', 'top', 'right', 'bottom'], id = `pf-tooltip-${pfTooltipIdCounter++}`, children, animationDuration = 300, reference, 'aria-live': ariaLive = reference ? 'polite' : 'off', boundary, isAppLauncher, tippyProps } = _a, rest = __rest$1(_a, ["content", "position", "trigger", "isVisible", "isContentLeftAligned", "enableFlip", "className", "entryDelay", "exitDelay", "appendTo", "zIndex", "maxWidth", "distance", "aria", "flipBehavior", "id", "children", "animationDuration", "reference", 'aria-live', "boundary", "isAppLauncher", "tippyProps"]);
|
|
4459
|
+
flipBehavior = ['top', 'right', 'bottom', 'left', 'top', 'right', 'bottom'], id = `pf-tooltip-${pfTooltipIdCounter++}`, children, animationDuration = 300, reference, 'aria-live': ariaLive = reference ? 'polite' : 'off', boundary, isAppLauncher, tippyProps, removeFindDomNode = false } = _a, rest = __rest$1(_a, ["content", "position", "trigger", "isVisible", "isContentLeftAligned", "enableFlip", "className", "entryDelay", "exitDelay", "appendTo", "zIndex", "maxWidth", "distance", "aria", "flipBehavior", "id", "children", "animationDuration", "reference", 'aria-live', "boundary", "isAppLauncher", "tippyProps", "removeFindDomNode"]);
|
|
4406
4460
|
{
|
|
4407
4461
|
boundary !== undefined &&
|
|
4408
4462
|
console.warn('The Tooltip boundary prop has been deprecated. If you want to constrain the popper to a specific element use the appendTo prop instead.');
|
|
@@ -4513,7 +4567,7 @@
|
|
|
4513
4567
|
}
|
|
4514
4568
|
return children;
|
|
4515
4569
|
};
|
|
4516
|
-
return (React__namespace.createElement(Popper, { trigger: aria !== 'none' && visible ? addAriaToTrigger() : children, reference: reference, popper: content, popperMatchesTriggerWidth: false, appendTo: appendTo, isVisible: visible, positionModifiers: positionModifiers, distance: distance, placement: position, onMouseEnter: triggerOnMouseenter && show, onMouseLeave: triggerOnMouseenter && hide, onPopperMouseEnter: triggerOnMouseenter && show, onPopperMouseLeave: triggerOnMouseenter && hide, onFocus: triggerOnFocus && show, onBlur: triggerOnFocus && hide, onDocumentClick: triggerOnClick && onDocumentClick, onDocumentKeyDown: triggerManually ? null : onDocumentKeyDown, onTriggerEnter: triggerManually ? null : onTriggerEnter, enableFlip: enableFlip, zIndex: zIndex, flipBehavior: flipBehavior }));
|
|
4570
|
+
return (React__namespace.createElement(Popper, { trigger: aria !== 'none' && visible ? addAriaToTrigger() : children, reference: reference, popper: content, popperMatchesTriggerWidth: false, appendTo: appendTo, isVisible: visible, positionModifiers: positionModifiers, distance: distance, placement: position, onMouseEnter: triggerOnMouseenter && show, onMouseLeave: triggerOnMouseenter && hide, onPopperMouseEnter: triggerOnMouseenter && show, onPopperMouseLeave: triggerOnMouseenter && hide, onFocus: triggerOnFocus && show, onBlur: triggerOnFocus && hide, onDocumentClick: triggerOnClick && onDocumentClick, onDocumentKeyDown: triggerManually ? null : onDocumentKeyDown, onTriggerEnter: triggerManually ? null : onTriggerEnter, enableFlip: enableFlip, zIndex: zIndex, flipBehavior: flipBehavior, removeFindDomNode: removeFindDomNode }));
|
|
4517
4571
|
};
|
|
4518
4572
|
Tooltip.displayName = 'Tooltip';
|
|
4519
4573
|
|
|
@@ -4774,7 +4828,7 @@
|
|
|
4774
4828
|
render() {
|
|
4775
4829
|
const _a = this.props, { children, className, direction, dropdownItems, isOpen, isPlain, isText, isGrouped, isFullHeight,
|
|
4776
4830
|
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
4777
|
-
onSelect, position, toggle, autoFocus, menuAppendTo, isFlipEnabled } = _a, props = __rest$1(_a, ["children", "className", "direction", "dropdownItems", "isOpen", "isPlain", "isText", "isGrouped", "isFullHeight", "onSelect", "position", "toggle", "autoFocus", "menuAppendTo", "isFlipEnabled"]);
|
|
4831
|
+
onSelect, position, toggle, autoFocus, menuAppendTo, isFlipEnabled, removeFindDomNode } = _a, props = __rest$1(_a, ["children", "className", "direction", "dropdownItems", "isOpen", "isPlain", "isText", "isGrouped", "isFullHeight", "onSelect", "position", "toggle", "autoFocus", "menuAppendTo", "isFlipEnabled", "removeFindDomNode"]);
|
|
4778
4832
|
const id = toggle.props.id || `pf-dropdown-toggle-id-${DropdownWithContext.currentId++}`;
|
|
4779
4833
|
let component;
|
|
4780
4834
|
let renderedContent;
|
|
@@ -4817,7 +4871,7 @@
|
|
|
4817
4871
|
}
|
|
4818
4872
|
return null;
|
|
4819
4873
|
};
|
|
4820
|
-
return menuAppendTo === 'inline' ? (mainContainer) : (React__namespace.createElement(Popper, { trigger: mainContainer, popper: popperContainer, direction: direction, position: position, appendTo: menuAppendTo === 'parent' ? getParentElement() : menuAppendTo, isVisible: isOpen }));
|
|
4874
|
+
return menuAppendTo === 'inline' ? (mainContainer) : (React__namespace.createElement(Popper, { trigger: mainContainer, popper: popperContainer, direction: direction, position: position, appendTo: menuAppendTo === 'parent' ? getParentElement() : menuAppendTo, isVisible: isOpen, removeFindDomNode: removeFindDomNode }));
|
|
4821
4875
|
}));
|
|
4822
4876
|
}
|
|
4823
4877
|
}
|
|
@@ -4843,9 +4897,9 @@
|
|
|
4843
4897
|
var { onSelect,
|
|
4844
4898
|
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
4845
4899
|
ref, // Types of Ref are different for React.FunctionComponent vs React.Component
|
|
4846
|
-
ouiaId, ouiaSafe, alignments, contextProps, menuAppendTo = 'inline', isFlipEnabled = false } = _a, props = __rest$1(_a, ["onSelect", "ref", "ouiaId", "ouiaSafe", "alignments", "contextProps", "menuAppendTo", "isFlipEnabled"]);
|
|
4900
|
+
ouiaId, ouiaSafe, alignments, contextProps, menuAppendTo = 'inline', isFlipEnabled = false, removeFindDomNode = false } = _a, props = __rest$1(_a, ["onSelect", "ref", "ouiaId", "ouiaSafe", "alignments", "contextProps", "menuAppendTo", "isFlipEnabled", "removeFindDomNode"]);
|
|
4847
4901
|
return (React__namespace.createElement(DropdownContext.Provider, { value: Object.assign({ onSelect: event => onSelect && onSelect(event), toggleTextClass: styles$8.dropdownToggleText, toggleIconClass: styles$8.dropdownToggleImage, toggleIndicatorClass: styles$8.dropdownToggleIcon, menuClass: styles$8.dropdownMenu, itemClass: styles$8.dropdownMenuItem, toggleClass: styles$8.dropdownToggle, baseClass: styles$8.dropdown, baseComponent: 'div', sectionClass: styles$8.dropdownGroup, sectionTitleClass: styles$8.dropdownGroupTitle, sectionComponent: 'section', disabledClass: styles$8.modifiers.disabled, plainTextClass: styles$8.modifiers.text, ouiaId: useOUIAId(Dropdown.displayName, ouiaId), ouiaSafe, ouiaComponentType: Dropdown.displayName, alignments }, contextProps) },
|
|
4848
|
-
React__namespace.createElement(DropdownWithContext, Object.assign({ menuAppendTo: menuAppendTo, isFlipEnabled: isFlipEnabled }, props))));
|
|
4902
|
+
React__namespace.createElement(DropdownWithContext, Object.assign({ menuAppendTo: menuAppendTo, isFlipEnabled: isFlipEnabled, removeFindDomNode: removeFindDomNode }, props))));
|
|
4849
4903
|
};
|
|
4850
4904
|
Dropdown.displayName = 'Dropdown';
|
|
4851
4905
|
|
|
@@ -6918,7 +6972,7 @@
|
|
|
6918
6972
|
/* eslint-enable @typescript-eslint/no-unused-vars */
|
|
6919
6973
|
menuAppendTo, favorites, onFavorite,
|
|
6920
6974
|
/* eslint-disable @typescript-eslint/no-unused-vars */
|
|
6921
|
-
favoritesLabel, footer, loadingVariant, isCreateSelectOptionObject, shouldResetOnSelect, isFlipEnabled } = _a, props = __rest$1(_a, ["children", "chipGroupProps", "chipGroupComponent", "className", "customContent", "variant", "direction", "onSelect", "onClear", "onBlur", "toggleId", "isOpen", "isGrouped", "isPlain", "isDisabled", "hasPlaceholderStyle", "validated", "selections", "typeAheadAriaLabel", "typeAheadAriaDescribedby", "clearSelectionsAriaLabel", "toggleAriaLabel", "removeSelectionAriaLabel", 'aria-label', 'aria-labelledby', 'aria-describedby', 'aria-invalid', "placeholderText", "width", "maxHeight", "toggleIcon", "ouiaId", "ouiaSafe", "hasInlineFilter", "isCheckboxSelectionBadgeHidden", "inlineFilterPlaceholderText", "onFilter", "onTypeaheadInputChanged", "onCreateOption", "isCreatable", "onToggle", "createText", "noResultsFoundText", "customBadgeText", "inputIdPrefix", "inputAutoComplete", "isInputValuePersisted", "isInputFilterPersisted", "menuAppendTo", "favorites", "onFavorite", "favoritesLabel", "footer", "loadingVariant", "isCreateSelectOptionObject", "shouldResetOnSelect", "isFlipEnabled"]);
|
|
6975
|
+
favoritesLabel, footer, loadingVariant, isCreateSelectOptionObject, shouldResetOnSelect, isFlipEnabled, removeFindDomNode } = _a, props = __rest$1(_a, ["children", "chipGroupProps", "chipGroupComponent", "className", "customContent", "variant", "direction", "onSelect", "onClear", "onBlur", "toggleId", "isOpen", "isGrouped", "isPlain", "isDisabled", "hasPlaceholderStyle", "validated", "selections", "typeAheadAriaLabel", "typeAheadAriaDescribedby", "clearSelectionsAriaLabel", "toggleAriaLabel", "removeSelectionAriaLabel", 'aria-label', 'aria-labelledby', 'aria-describedby', 'aria-invalid', "placeholderText", "width", "maxHeight", "toggleIcon", "ouiaId", "ouiaSafe", "hasInlineFilter", "isCheckboxSelectionBadgeHidden", "inlineFilterPlaceholderText", "onFilter", "onTypeaheadInputChanged", "onCreateOption", "isCreatable", "onToggle", "createText", "noResultsFoundText", "customBadgeText", "inputIdPrefix", "inputAutoComplete", "isInputValuePersisted", "isInputFilterPersisted", "menuAppendTo", "favorites", "onFavorite", "favoritesLabel", "footer", "loadingVariant", "isCreateSelectOptionObject", "shouldResetOnSelect", "isFlipEnabled", "removeFindDomNode"]);
|
|
6922
6976
|
const { focusFirstOption: openedOnEnter, typeaheadCurrIndex, typeaheadInputValue, typeaheadFilteredChildren, favoritesGroup } = this.state;
|
|
6923
6977
|
const selectToggleId = toggleId || `pf-select-toggle-id-${currentId++}`;
|
|
6924
6978
|
const selections = Array.isArray(selectionsProp) ? selectionsProp : [selectionsProp];
|
|
@@ -7143,7 +7197,7 @@
|
|
|
7143
7197
|
variant,
|
|
7144
7198
|
inputIdPrefix: inputIdPrefix || randomId,
|
|
7145
7199
|
shouldResetOnSelect
|
|
7146
|
-
} }, menuAppendTo === 'inline' ? (mainContainer) : (React__namespace.createElement(Popper, { trigger: mainContainer, popper: popperContainer, direction: direction, appendTo: menuAppendTo === 'parent' ? getParentElement() : menuAppendTo, isVisible: isOpen }))))));
|
|
7200
|
+
} }, menuAppendTo === 'inline' ? (mainContainer) : (React__namespace.createElement(Popper, { trigger: mainContainer, popper: popperContainer, direction: direction, appendTo: menuAppendTo === 'parent' ? getParentElement() : menuAppendTo, isVisible: isOpen, removeFindDomNode: removeFindDomNode }))))));
|
|
7147
7201
|
}
|
|
7148
7202
|
}
|
|
7149
7203
|
Select.displayName = 'Select';
|
|
@@ -7195,7 +7249,8 @@
|
|
|
7195
7249
|
isInputFilterPersisted: false,
|
|
7196
7250
|
isCreateSelectOptionObject: false,
|
|
7197
7251
|
shouldResetOnSelect: true,
|
|
7198
|
-
isFlipEnabled: false
|
|
7252
|
+
isFlipEnabled: false,
|
|
7253
|
+
removeFindDomNode: false
|
|
7199
7254
|
};
|
|
7200
7255
|
|
|
7201
7256
|
// tslint:disable-next-line:no-empty
|
|
@@ -7327,16 +7382,8 @@
|
|
|
7327
7382
|
|
|
7328
7383
|
const PopoverCloseButton = (_a) => {
|
|
7329
7384
|
var { onClose = () => undefined } = _a, props = __rest$1(_a, ["onClose"]);
|
|
7330
|
-
|
|
7331
|
-
|
|
7332
|
-
closeButtonElement && closeButtonElement.addEventListener('click', onClose, false);
|
|
7333
|
-
return () => {
|
|
7334
|
-
closeButtonElement && closeButtonElement.removeEventListener('click', onClose, false);
|
|
7335
|
-
};
|
|
7336
|
-
}, [closeButtonElement]);
|
|
7337
|
-
return (React__namespace.createElement(FindRefWrapper, { onFoundRef: (foundRef) => setCloseButtonElement(foundRef) },
|
|
7338
|
-
React__namespace.createElement(Button, Object.assign({ variant: "plain", "aria-label": true }, props, { style: { pointerEvents: 'auto' } }),
|
|
7339
|
-
React__namespace.createElement(TimesIcon$1, null))));
|
|
7385
|
+
return (React__namespace.createElement(Button, Object.assign({ onClick: onClose, variant: "plain", "aria-label": true }, props, { style: { pointerEvents: 'auto' } }),
|
|
7386
|
+
React__namespace.createElement(TimesIcon$1, null)));
|
|
7340
7387
|
};
|
|
7341
7388
|
PopoverCloseButton.displayName = 'PopoverCloseButton';
|
|
7342
7389
|
|
|
@@ -7386,7 +7433,7 @@
|
|
|
7386
7433
|
const Popover = (_a) => {
|
|
7387
7434
|
var { children, position = 'top', enableFlip = true, className = '', isVisible = null, shouldClose = () => null, shouldOpen = () => null, 'aria-label': ariaLabel = '', bodyContent, headerContent = null, headerComponent = 'h6', headerIcon = null, alertSeverityVariant, alertSeverityScreenReaderText, footerContent = null, appendTo = () => document.body, hideOnOutsideClick = true, onHide = () => null, onHidden = () => null, onShow = () => null, onShown = () => null, onMount = () => null, zIndex = 9999, minWidth = popoverMinWidth && popoverMinWidth.value, maxWidth = popoverMaxWidth && popoverMaxWidth.value, closeBtnAriaLabel = 'Close', showClose = true, distance = 25,
|
|
7388
7435
|
// For every initial starting position, there are 3 escape positions
|
|
7389
|
-
flipBehavior = ['top', 'right', 'bottom', 'left', 'top', 'right', 'bottom'], animationDuration = 300, id, withFocusTrap: propWithFocusTrap, boundary, tippyProps, reference, hasNoPadding = false, hasAutoWidth = false } = _a, rest = __rest$1(_a, ["children", "position", "enableFlip", "className", "isVisible", "shouldClose", "shouldOpen", 'aria-label', "bodyContent", "headerContent", "headerComponent", "headerIcon", "alertSeverityVariant", "alertSeverityScreenReaderText", "footerContent", "appendTo", "hideOnOutsideClick", "onHide", "onHidden", "onShow", "onShown", "onMount", "zIndex", "minWidth", "maxWidth", "closeBtnAriaLabel", "showClose", "distance", "flipBehavior", "animationDuration", "id", "withFocusTrap", "boundary", "tippyProps", "reference", "hasNoPadding", "hasAutoWidth"]);
|
|
7436
|
+
flipBehavior = ['top', 'right', 'bottom', 'left', 'top', 'right', 'bottom'], animationDuration = 300, id, withFocusTrap: propWithFocusTrap, boundary, tippyProps, reference, hasNoPadding = false, hasAutoWidth = false, removeFindDomNode = false } = _a, rest = __rest$1(_a, ["children", "position", "enableFlip", "className", "isVisible", "shouldClose", "shouldOpen", 'aria-label', "bodyContent", "headerContent", "headerComponent", "headerIcon", "alertSeverityVariant", "alertSeverityScreenReaderText", "footerContent", "appendTo", "hideOnOutsideClick", "onHide", "onHidden", "onShow", "onShown", "onMount", "zIndex", "minWidth", "maxWidth", "closeBtnAriaLabel", "showClose", "distance", "flipBehavior", "animationDuration", "id", "withFocusTrap", "boundary", "tippyProps", "reference", "hasNoPadding", "hasAutoWidth", "removeFindDomNode"]);
|
|
7390
7437
|
{
|
|
7391
7438
|
boundary !== undefined &&
|
|
7392
7439
|
console.warn('The Popover boundary prop has been deprecated. If you want to constrain the popper to a specific element use the appendTo prop instead.');
|
|
@@ -7546,7 +7593,7 @@
|
|
|
7546
7593
|
React__namespace.createElement(PopoverBody, { id: `popover-${uniqueId}-body` }, typeof bodyContent === 'function' ? bodyContent(hide) : bodyContent),
|
|
7547
7594
|
footerContent && (React__namespace.createElement(PopoverFooter, { id: `popover-${uniqueId}-footer` }, typeof footerContent === 'function' ? footerContent(hide) : footerContent)))));
|
|
7548
7595
|
return (React__namespace.createElement(PopoverContext.Provider, { value: { headerComponent } },
|
|
7549
|
-
React__namespace.createElement(Popper, { trigger: children, reference: reference, popper: content, popperMatchesTriggerWidth: false, appendTo: appendTo, isVisible: visible, positionModifiers: positionModifiers, distance: distance, placement: position, onTriggerClick: onTriggerClick, onDocumentClick: onDocumentClick, onDocumentKeyDown: onDocumentKeyDown, enableFlip: enableFlip, zIndex: zIndex, flipBehavior: flipBehavior })));
|
|
7596
|
+
React__namespace.createElement(Popper, { trigger: children, reference: reference, popper: content, popperMatchesTriggerWidth: false, appendTo: appendTo, isVisible: visible, positionModifiers: positionModifiers, distance: distance, placement: position, onTriggerClick: onTriggerClick, onDocumentClick: onDocumentClick, onDocumentKeyDown: onDocumentKeyDown, enableFlip: enableFlip, zIndex: zIndex, flipBehavior: flipBehavior, removeFindDomNode: removeFindDomNode })));
|
|
7550
7597
|
};
|
|
7551
7598
|
Popover.displayName = 'Popover';
|
|
7552
7599
|
|