@luminati-io/uikit 3.3.3 → 3.3.5-beta.0
Sign up to get free protection for your applications and to get access to all the features.
@@ -36004,6 +36004,7 @@ function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) r
|
|
36004
36004
|
|
36005
36005
|
|
36006
36006
|
var assign = Object.assign;
|
36007
|
+
var DEFAULT_CLOSE_DELAY = 200;
|
36007
36008
|
var withPopover = function withPopover(Comp, PopoverComp) {
|
36008
36009
|
var popoverOptions = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
|
36009
36010
|
var WithPopover = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().forwardRef(function (props, ref) {
|
@@ -36016,7 +36017,9 @@ var withPopover = function withPopover(Comp, PopoverComp) {
|
|
36016
36017
|
var placement = popoverOptions.placement,
|
36017
36018
|
zIndex = popoverOptions.zIndex,
|
36018
36019
|
wrapperClassName = popoverOptions.wrapperClassName,
|
36019
|
-
wrapperStyle = popoverOptions.wrapperStyle
|
36020
|
+
wrapperStyle = popoverOptions.wrapperStyle,
|
36021
|
+
interactive = popoverOptions.interactive,
|
36022
|
+
delay = popoverOptions.delay;
|
36020
36023
|
var _useState = (0,react__WEBPACK_IMPORTED_MODULE_0__.useState)(null),
|
36021
36024
|
_useState2 = _slicedToArray(_useState, 2),
|
36022
36025
|
referenceElement = _useState2[0],
|
@@ -36029,11 +36032,19 @@ var withPopover = function withPopover(Comp, PopoverComp) {
|
|
36029
36032
|
_useStateWithCallback2 = _slicedToArray(_useStateWithCallback, 2),
|
36030
36033
|
popoverVisible = _useStateWithCallback2[0],
|
36031
36034
|
setPopoverVisible = _useStateWithCallback2[1];
|
36035
|
+
var timer = (0,react__WEBPACK_IMPORTED_MODULE_0__.useRef)();
|
36036
|
+
var close_delay = delay || DEFAULT_CLOSE_DELAY;
|
36032
36037
|
var showPopover = (0,react__WEBPACK_IMPORTED_MODULE_0__.useCallback)(function () {
|
36033
|
-
|
36038
|
+
clearTimeout(timer.current);
|
36039
|
+
timer.current = setTimeout(function () {
|
36040
|
+
return setPopoverVisible(true);
|
36041
|
+
}, interactive ? delay : 0);
|
36034
36042
|
}, []);
|
36035
36043
|
var hidePopover = (0,react__WEBPACK_IMPORTED_MODULE_0__.useCallback)(function () {
|
36036
|
-
|
36044
|
+
clearTimeout(timer.current);
|
36045
|
+
timer.current = setTimeout(function () {
|
36046
|
+
return setPopoverVisible(false);
|
36047
|
+
}, interactive ? close_delay : 0);
|
36037
36048
|
}, []);
|
36038
36049
|
var togglePopover = (0,react__WEBPACK_IMPORTED_MODULE_0__.useCallback)(function () {
|
36039
36050
|
return setPopoverVisible(function (v) {
|
@@ -36077,7 +36088,9 @@ var withPopover = function withPopover(Comp, PopoverComp) {
|
|
36077
36088
|
}, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(Comp, _extends({
|
36078
36089
|
ref: ref
|
36079
36090
|
}, compProps, {
|
36080
|
-
popover: popoverApi
|
36091
|
+
popover: popoverApi,
|
36092
|
+
onPointerEnter: interactive ? showPopover : undefined,
|
36093
|
+
onPointerLeave: interactive ? hidePopover : undefined
|
36081
36094
|
}))), popoverVisible && /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(PopoverContainer, {
|
36082
36095
|
ref: setPopperElement,
|
36083
36096
|
style: styles.popper,
|
@@ -36086,6 +36099,8 @@ var withPopover = function withPopover(Comp, PopoverComp) {
|
|
36086
36099
|
portalTarget: portalTarget,
|
36087
36100
|
zIndex: zIndex
|
36088
36101
|
}, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(PopoverComp, _extends({}, restPopoverProps, {
|
36102
|
+
onPointerEnter: showPopover,
|
36103
|
+
onPointerLeave: hidePopover,
|
36089
36104
|
popover: popoverApi
|
36090
36105
|
}))));
|
36091
36106
|
});
|
@@ -40192,7 +40207,7 @@ MenuItem.propTypes = {
|
|
40192
40207
|
disabled: (prop_types__WEBPACK_IMPORTED_MODULE_1___default().bool),
|
40193
40208
|
selected: (prop_types__WEBPACK_IMPORTED_MODULE_1___default().bool),
|
40194
40209
|
subMenu: (prop_types__WEBPACK_IMPORTED_MODULE_1___default().bool),
|
40195
|
-
tooltip: (prop_types__WEBPACK_IMPORTED_MODULE_1___default().
|
40210
|
+
tooltip: (prop_types__WEBPACK_IMPORTED_MODULE_1___default().node)
|
40196
40211
|
};
|
40197
40212
|
var MenuItemComp = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2___default().forwardRef(function (props, ref) {
|
40198
40213
|
var subItems = props.subItems,
|
@@ -41709,7 +41724,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
41709
41724
|
|
41710
41725
|
/*jslint react:true*/
|
41711
41726
|
function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
|
41712
|
-
var _excluded = ["data", "columnsSort", "pageSize", "pageSizes", "children", "stateManager", "hooks", "NoDataComp", "LoadingComp", "ExpandHandleComp", "noDataText", "loadingText", "isLoading", "onPageChange", "manualPagination", "totalCount", "paginateExpandedRows", "getHeaderProps", "getColumnProps", "getRowProps", "getCellProps", "getFooterProps"];
|
41727
|
+
var _excluded = ["data", "columnsSort", "pageSize", "pageSizes", "children", "stateManager", "hooks", "NoDataComp", "LoadingComp", "ExpandHandleComp", "noDataText", "loadingText", "isLoading", "onPageChange", "manualPagination", "totalCount", "paginateExpandedRows", "getHeaderProps", "getColumnProps", "getRowProps", "getCellProps", "getFooterProps", "selectedRowIds"];
|
41713
41728
|
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
41714
41729
|
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
41715
41730
|
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
@@ -41795,6 +41810,7 @@ var Provider = function Provider(props) {
|
|
41795
41810
|
getCellProps = _props$getCellProps === void 0 ? defaultPropGetter : _props$getCellProps,
|
41796
41811
|
_props$getFooterProps = props.getFooterProps,
|
41797
41812
|
getFooterProps = _props$getFooterProps === void 0 ? defaultPropGetter : _props$getFooterProps,
|
41813
|
+
selectedRowIds = props.selectedRowIds,
|
41798
41814
|
rest = _objectWithoutProperties(props, _excluded);
|
41799
41815
|
var _useState = (0,react__WEBPACK_IMPORTED_MODULE_1__.useState)(0),
|
41800
41816
|
_useState2 = _slicedToArray(_useState, 2),
|
@@ -41811,6 +41827,8 @@ var Provider = function Provider(props) {
|
|
41811
41827
|
pinnedColumns: pinnedColumns
|
41812
41828
|
}, columnOrder && {
|
41813
41829
|
columnOrder: columnOrder
|
41830
|
+
}, selectedRowIds && {
|
41831
|
+
selectedRowIds: selectedRowIds
|
41814
41832
|
});
|
41815
41833
|
var table = react_table__WEBPACK_IMPORTED_MODULE_2__.useTable.apply(void 0, [_objectSpread({
|
41816
41834
|
data: data,
|