@patternfly/react-table 4.105.7 → 4.105.8
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 +8 -0
- package/dist/umd/react-table.css +2152 -2152
- package/dist/umd/react-table.js +85 -53
- package/dist/umd/react-table.min.css +364 -364
- 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
|
|
|
@@ -4417,7 +4456,7 @@
|
|
|
4417
4456
|
const Tooltip = (_a) => {
|
|
4418
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',
|
|
4419
4458
|
// For every initial starting position, there are 3 escape positions
|
|
4420
|
-
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"]);
|
|
4421
4460
|
{
|
|
4422
4461
|
boundary !== undefined &&
|
|
4423
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.');
|
|
@@ -4528,7 +4567,7 @@
|
|
|
4528
4567
|
}
|
|
4529
4568
|
return children;
|
|
4530
4569
|
};
|
|
4531
|
-
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 }));
|
|
4532
4571
|
};
|
|
4533
4572
|
Tooltip.displayName = 'Tooltip';
|
|
4534
4573
|
|
|
@@ -4789,7 +4828,7 @@
|
|
|
4789
4828
|
render() {
|
|
4790
4829
|
const _a = this.props, { children, className, direction, dropdownItems, isOpen, isPlain, isText, isGrouped, isFullHeight,
|
|
4791
4830
|
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
4792
|
-
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"]);
|
|
4793
4832
|
const id = toggle.props.id || `pf-dropdown-toggle-id-${DropdownWithContext.currentId++}`;
|
|
4794
4833
|
let component;
|
|
4795
4834
|
let renderedContent;
|
|
@@ -4832,7 +4871,7 @@
|
|
|
4832
4871
|
}
|
|
4833
4872
|
return null;
|
|
4834
4873
|
};
|
|
4835
|
-
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 }));
|
|
4836
4875
|
}));
|
|
4837
4876
|
}
|
|
4838
4877
|
}
|
|
@@ -4858,9 +4897,9 @@
|
|
|
4858
4897
|
var { onSelect,
|
|
4859
4898
|
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
4860
4899
|
ref, // Types of Ref are different for React.FunctionComponent vs React.Component
|
|
4861
|
-
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"]);
|
|
4862
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) },
|
|
4863
|
-
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))));
|
|
4864
4903
|
};
|
|
4865
4904
|
Dropdown.displayName = 'Dropdown';
|
|
4866
4905
|
|
|
@@ -6933,7 +6972,7 @@
|
|
|
6933
6972
|
/* eslint-enable @typescript-eslint/no-unused-vars */
|
|
6934
6973
|
menuAppendTo, favorites, onFavorite,
|
|
6935
6974
|
/* eslint-disable @typescript-eslint/no-unused-vars */
|
|
6936
|
-
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"]);
|
|
6937
6976
|
const { focusFirstOption: openedOnEnter, typeaheadCurrIndex, typeaheadInputValue, typeaheadFilteredChildren, favoritesGroup } = this.state;
|
|
6938
6977
|
const selectToggleId = toggleId || `pf-select-toggle-id-${currentId++}`;
|
|
6939
6978
|
const selections = Array.isArray(selectionsProp) ? selectionsProp : [selectionsProp];
|
|
@@ -7158,7 +7197,7 @@
|
|
|
7158
7197
|
variant,
|
|
7159
7198
|
inputIdPrefix: inputIdPrefix || randomId,
|
|
7160
7199
|
shouldResetOnSelect
|
|
7161
|
-
} }, 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 }))))));
|
|
7162
7201
|
}
|
|
7163
7202
|
}
|
|
7164
7203
|
Select.displayName = 'Select';
|
|
@@ -7210,7 +7249,8 @@
|
|
|
7210
7249
|
isInputFilterPersisted: false,
|
|
7211
7250
|
isCreateSelectOptionObject: false,
|
|
7212
7251
|
shouldResetOnSelect: true,
|
|
7213
|
-
isFlipEnabled: false
|
|
7252
|
+
isFlipEnabled: false,
|
|
7253
|
+
removeFindDomNode: false
|
|
7214
7254
|
};
|
|
7215
7255
|
|
|
7216
7256
|
// tslint:disable-next-line:no-empty
|
|
@@ -7342,16 +7382,8 @@
|
|
|
7342
7382
|
|
|
7343
7383
|
const PopoverCloseButton = (_a) => {
|
|
7344
7384
|
var { onClose = () => undefined } = _a, props = __rest$1(_a, ["onClose"]);
|
|
7345
|
-
|
|
7346
|
-
|
|
7347
|
-
closeButtonElement && closeButtonElement.addEventListener('click', onClose, false);
|
|
7348
|
-
return () => {
|
|
7349
|
-
closeButtonElement && closeButtonElement.removeEventListener('click', onClose, false);
|
|
7350
|
-
};
|
|
7351
|
-
}, [closeButtonElement]);
|
|
7352
|
-
return (React__namespace.createElement(FindRefWrapper, { onFoundRef: (foundRef) => setCloseButtonElement(foundRef) },
|
|
7353
|
-
React__namespace.createElement(Button, Object.assign({ variant: "plain", "aria-label": true }, props, { style: { pointerEvents: 'auto' } }),
|
|
7354
|
-
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)));
|
|
7355
7387
|
};
|
|
7356
7388
|
PopoverCloseButton.displayName = 'PopoverCloseButton';
|
|
7357
7389
|
|
|
@@ -7401,7 +7433,7 @@
|
|
|
7401
7433
|
const Popover = (_a) => {
|
|
7402
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,
|
|
7403
7435
|
// For every initial starting position, there are 3 escape positions
|
|
7404
|
-
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"]);
|
|
7405
7437
|
{
|
|
7406
7438
|
boundary !== undefined &&
|
|
7407
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.');
|
|
@@ -7561,7 +7593,7 @@
|
|
|
7561
7593
|
React__namespace.createElement(PopoverBody, { id: `popover-${uniqueId}-body` }, typeof bodyContent === 'function' ? bodyContent(hide) : bodyContent),
|
|
7562
7594
|
footerContent && (React__namespace.createElement(PopoverFooter, { id: `popover-${uniqueId}-footer` }, typeof footerContent === 'function' ? footerContent(hide) : footerContent)))));
|
|
7563
7595
|
return (React__namespace.createElement(PopoverContext.Provider, { value: { headerComponent } },
|
|
7564
|
-
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 })));
|
|
7565
7597
|
};
|
|
7566
7598
|
Popover.displayName = 'Popover';
|
|
7567
7599
|
|