funda-ui 4.7.515 → 4.7.525
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/CascadingSelect/index.css +105 -88
- package/CascadingSelect/index.js +23 -23
- package/CascadingSelectE2E/index.css +105 -88
- package/CascadingSelectE2E/index.js +24 -24
- package/Select/index.js +110 -88
- package/Tooltip/index.css +69 -68
- package/Tooltip/index.d.ts +15 -1
- package/Tooltip/index.js +153 -57
- package/lib/cjs/CascadingSelect/index.js +23 -23
- package/lib/cjs/CascadingSelectE2E/index.js +24 -24
- package/lib/cjs/Select/index.js +110 -88
- package/lib/cjs/Tooltip/index.d.ts +15 -1
- package/lib/cjs/Tooltip/index.js +153 -57
- package/lib/css/CascadingSelect/index.css +105 -88
- package/lib/css/CascadingSelectE2E/index.css +105 -88
- package/lib/css/Tooltip/index.css +69 -68
- package/lib/esm/CascadingSelect/Group.tsx +3 -5
- package/lib/esm/CascadingSelect/index.scss +89 -68
- package/lib/esm/CascadingSelect/index.tsx +21 -20
- package/lib/esm/CascadingSelectE2E/Group.tsx +4 -3
- package/lib/esm/CascadingSelectE2E/index.scss +83 -63
- package/lib/esm/CascadingSelectE2E/index.tsx +22 -21
- package/lib/esm/Select/index.tsx +165 -148
- package/lib/esm/Tooltip/index.scss +63 -60
- package/lib/esm/Tooltip/index.tsx +143 -44
- package/package.json +1 -1
package/Tooltip/index.js
CHANGED
|
@@ -1431,6 +1431,12 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
1431
1431
|
/* harmony import */ var funda_utils_dist_cjs_cls__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(funda_utils_dist_cjs_cls__WEBPACK_IMPORTED_MODULE_5__);
|
|
1432
1432
|
/* harmony import */ var funda_utils_dist_cjs_inputsCalculation__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(954);
|
|
1433
1433
|
/* harmony import */ var funda_utils_dist_cjs_inputsCalculation__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(funda_utils_dist_cjs_inputsCalculation__WEBPACK_IMPORTED_MODULE_6__);
|
|
1434
|
+
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); }
|
|
1435
|
+
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; }
|
|
1436
|
+
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; }
|
|
1437
|
+
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; }
|
|
1438
|
+
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
|
|
1439
|
+
function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
|
|
1434
1440
|
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
1435
1441
|
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
1436
1442
|
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
|
|
@@ -1444,35 +1450,8 @@ function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
|
1444
1450
|
|
|
1445
1451
|
|
|
1446
1452
|
|
|
1447
|
-
|
|
1448
|
-
|
|
1449
|
-
width: 0,
|
|
1450
|
-
height: 0
|
|
1451
|
-
}),
|
|
1452
|
-
_useState2 = _slicedToArray(_useState, 2),
|
|
1453
|
-
dimensions = _useState2[0],
|
|
1454
|
-
setDimensions = _useState2[1];
|
|
1455
|
-
useEffect(function () {
|
|
1456
|
-
var getDimensions = function getDimensions() {
|
|
1457
|
-
return {
|
|
1458
|
-
width: myRef.current.offsetWidth,
|
|
1459
|
-
height: myRef.current.offsetHeight
|
|
1460
|
-
};
|
|
1461
|
-
};
|
|
1462
|
-
var handleResize = function handleResize() {
|
|
1463
|
-
setDimensions(getDimensions());
|
|
1464
|
-
};
|
|
1465
|
-
if (myRef.current) {
|
|
1466
|
-
setDimensions(getDimensions());
|
|
1467
|
-
}
|
|
1468
|
-
window.addEventListener("resize", handleResize);
|
|
1469
|
-
return function () {
|
|
1470
|
-
window.removeEventListener("resize", handleResize);
|
|
1471
|
-
};
|
|
1472
|
-
}, [myRef]);
|
|
1473
|
-
return dimensions;
|
|
1474
|
-
};
|
|
1475
|
-
var Tooltip = function Tooltip(props) {
|
|
1453
|
+
// Use forwardRef to expose imperative methods
|
|
1454
|
+
var Tooltip = /*#__PURE__*/(0,react__WEBPACK_IMPORTED_MODULE_0__.forwardRef)(function (props, ref) {
|
|
1476
1455
|
var triggerClassName = props.triggerClassName,
|
|
1477
1456
|
wrapperClassName = props.wrapperClassName,
|
|
1478
1457
|
direction = props.direction,
|
|
@@ -1483,7 +1462,14 @@ var Tooltip = function Tooltip(props) {
|
|
|
1483
1462
|
mouseOutDelay = props.mouseOutDelay,
|
|
1484
1463
|
content = props.content,
|
|
1485
1464
|
id = props.id,
|
|
1486
|
-
children = props.children
|
|
1465
|
+
children = props.children,
|
|
1466
|
+
controlled = props.controlled,
|
|
1467
|
+
popupArrowColor = props.popupArrowColor,
|
|
1468
|
+
popupContentStyle = props.popupContentStyle,
|
|
1469
|
+
delayedClose = props.delayedClose,
|
|
1470
|
+
delayedCloseTimeout = props.delayedCloseTimeout,
|
|
1471
|
+
onContentMouseEnter = props.onContentMouseEnter,
|
|
1472
|
+
onContentMouseLeave = props.onContentMouseLeave;
|
|
1487
1473
|
var POS_OFFSET = Number(offset) || 4;
|
|
1488
1474
|
var EXCEEDED_SIDE_POS_OFFSET = Number(exceededSidePosOffset) || 15;
|
|
1489
1475
|
var uniqueID = funda_utils_dist_cjs_useComId__WEBPACK_IMPORTED_MODULE_2___default()();
|
|
@@ -1492,33 +1478,85 @@ var Tooltip = function Tooltip(props) {
|
|
|
1492
1478
|
var modalRef = (0,react__WEBPACK_IMPORTED_MODULE_0__.useRef)(null);
|
|
1493
1479
|
var HOVER_DELAY = hoverDelay ? hoverDelay : 200;
|
|
1494
1480
|
var MOUSE_OUT_DELAY = mouseOutDelay ? mouseOutDelay : HOVER_DELAY;
|
|
1481
|
+
var _useState = (0,react__WEBPACK_IMPORTED_MODULE_0__.useState)(false),
|
|
1482
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
1483
|
+
hasBeenShown = _useState2[0],
|
|
1484
|
+
setHasBeenShown = _useState2[1];
|
|
1495
1485
|
var _useState3 = (0,react__WEBPACK_IMPORTED_MODULE_0__.useState)(false),
|
|
1496
1486
|
_useState4 = _slicedToArray(_useState3, 2),
|
|
1497
|
-
|
|
1498
|
-
|
|
1499
|
-
var _useState5 = (0,react__WEBPACK_IMPORTED_MODULE_0__.useState)(
|
|
1500
|
-
_useState6 = _slicedToArray(_useState5, 2),
|
|
1501
|
-
isShow = _useState6[0],
|
|
1502
|
-
setIsShow = _useState6[1];
|
|
1503
|
-
var _useState7 = (0,react__WEBPACK_IMPORTED_MODULE_0__.useState)({
|
|
1487
|
+
isShow = _useState4[0],
|
|
1488
|
+
setIsShow = _useState4[1];
|
|
1489
|
+
var _useState5 = (0,react__WEBPACK_IMPORTED_MODULE_0__.useState)({
|
|
1504
1490
|
x: 0,
|
|
1505
1491
|
y: 0
|
|
1506
1492
|
}),
|
|
1507
|
-
|
|
1508
|
-
position =
|
|
1509
|
-
setPosition =
|
|
1493
|
+
_useState6 = _slicedToArray(_useState5, 2),
|
|
1494
|
+
position = _useState6[0],
|
|
1495
|
+
setPosition = _useState6[1];
|
|
1496
|
+
var popupArrowStyle = (0,react__WEBPACK_IMPORTED_MODULE_0__.useMemo)(function () {
|
|
1497
|
+
if (typeof popupArrowColor !== 'undefined' && Array.isArray(popupArrowColor) && popupArrowColor.length === 4) {
|
|
1498
|
+
return {
|
|
1499
|
+
'--cus-tooltip-arrow-bg-top': "url(\"data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D%22http%3A//www.w3.org/2000/svg%22%20width%3D%2236px%22%20height%3D%2212px%22%3E%3Cpath%20fill%3D%22rgba%28".concat(popupArrowColor[0], ",%20").concat(popupArrowColor[1], ",%20").concat(popupArrowColor[2], ",%20").concat(popupArrowColor[3], "%29%22%20transform%3D%22rotate%280%29%22%20d%3D%22M2.658,0.000%20C-13.615,0.000%2050.938,0.000%2034.662,0.000%20C28.662,0.000%2023.035,12.002%2018.660,12.002%20C14.285,12.002%208.594,0.000%202.658,0.000%20Z%22/%3E%3C/svg%3E\") no-repeat"),
|
|
1500
|
+
'--cus-tooltip-arrow-bg-bottom': "url(\"data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D%22http%3A//www.w3.org/2000/svg%22%20width%3D%2236px%22%20height%3D%2212px%22%3E%3Cpath%20fill%3D%22rgba%28".concat(popupArrowColor[0], ",%20").concat(popupArrowColor[1], ",%20").concat(popupArrowColor[2], ",%20").concat(popupArrowColor[3], "%29%22%20transform%3D%22rotate%28180%2018%206%29%22%20d%3D%22M2.658,0.000%20C-13.615,0.000%2050.938,0.000%2034.662,0.000%20C28.662,0.000%2023.035,12.002%2018.660,12.002%20C14.285,12.002%208.594,0.000%202.658,0.000%20Z%22/%3E%3C/svg%3E\") no-repeat"),
|
|
1501
|
+
'--cus-tooltip-arrow-bg-left': "url(\"data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D%22http%3A//www.w3.org/2000/svg%22%20width%3D%2212px%22%20height%3D%2236px%22%3E%3Cpath%20fill%3D%22rgba%28".concat(popupArrowColor[0], ",%20").concat(popupArrowColor[1], ",%20").concat(popupArrowColor[2], ",%20").concat(popupArrowColor[3], "%29%22%20transform%3D%22rotate%28-90%2018%2018%29%22%20d%3D%22M2.658,0.000%20C-13.615,0.000%2050.938,0.000%2034.662,0.000%20C28.662,0.000%2023.035,12.002%2018.660,12.002%20C14.285,12.002%208.594,0.000%202.658,0.000%20Z%22/%3E%3C/svg%3E\") no-repeat"),
|
|
1502
|
+
'--cus-tooltip-arrow-bg-right': "url(\"data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D%22http%3A//www.w3.org/2000/svg%22%20width%3D%2212px%22%20height%3D%2236px%22%3E%3Cpath%20fill%3D%22rgba%28".concat(popupArrowColor[0], ",%20").concat(popupArrowColor[1], ",%20").concat(popupArrowColor[2], ",%20").concat(popupArrowColor[3], "%29%22%20transform%3D%22rotate%2890%206%206%29%22%20d%3D%22M2.658,0.000%20C-13.615,0.000%2050.938,0.000%2034.662,0.000%20C28.662,0.000%2023.035,12.002%2018.660,12.002%20C14.285,12.002%208.594,0.000%202.658,0.000%20Z%22/%3E%3C/svg%3E\") no-repeat")
|
|
1503
|
+
};
|
|
1504
|
+
}
|
|
1505
|
+
return undefined;
|
|
1506
|
+
}, [popupArrowColor]);
|
|
1507
|
+
|
|
1508
|
+
// Expose show/hide methods to parent via ref
|
|
1509
|
+
(0,react__WEBPACK_IMPORTED_MODULE_0__.useImperativeHandle)(ref, function () {
|
|
1510
|
+
return {
|
|
1511
|
+
show: function show() {
|
|
1512
|
+
// Find the trigger element
|
|
1513
|
+
var triggerEl = rootRef.current;
|
|
1514
|
+
if (triggerEl) {
|
|
1515
|
+
// Calculate position (copy from handleMouseEnter)
|
|
1516
|
+
var _getAbsolutePositionO = (0,funda_utils_dist_cjs_getElementProperty__WEBPACK_IMPORTED_MODULE_4__.getAbsolutePositionOfStage)(triggerEl),
|
|
1517
|
+
x = _getAbsolutePositionO.x,
|
|
1518
|
+
y = _getAbsolutePositionO.y,
|
|
1519
|
+
width = _getAbsolutePositionO.width,
|
|
1520
|
+
height = _getAbsolutePositionO.height;
|
|
1521
|
+
var pos = triggerEl.dataset.microtipPosition;
|
|
1522
|
+
if (typeof pos === 'undefined') pos = 'top';
|
|
1523
|
+
if (pos.indexOf('top') >= 0) {
|
|
1524
|
+
setPosition({
|
|
1525
|
+
x: x + width / 2 + 'px',
|
|
1526
|
+
y: y - height - POS_OFFSET + 'px'
|
|
1527
|
+
});
|
|
1528
|
+
}
|
|
1529
|
+
if (pos.indexOf('bottom') >= 0) {
|
|
1530
|
+
setPosition({
|
|
1531
|
+
x: x + width / 2 + 'px',
|
|
1532
|
+
y: y + height + POS_OFFSET + 'px'
|
|
1533
|
+
});
|
|
1534
|
+
}
|
|
1535
|
+
}
|
|
1536
|
+
setIsShow(true);
|
|
1537
|
+
},
|
|
1538
|
+
hide: function hide() {
|
|
1539
|
+
hideTip();
|
|
1540
|
+
}
|
|
1541
|
+
};
|
|
1542
|
+
}, [POS_OFFSET]);
|
|
1510
1543
|
|
|
1511
1544
|
// click outside
|
|
1512
1545
|
funda_utils_dist_cjs_useClickOutside__WEBPACK_IMPORTED_MODULE_3___default()({
|
|
1513
|
-
enabled: isShow && rootRef.current,
|
|
1546
|
+
enabled: isShow && rootRef.current && !controlled,
|
|
1547
|
+
// Only auto-close if not controlled
|
|
1514
1548
|
isOutside: function isOutside(event) {
|
|
1549
|
+
// Prevent closing when clicking inside the tooltip wrapper
|
|
1550
|
+
if (modalRef.current && modalRef.current.contains(event.target)) {
|
|
1551
|
+
return false; // Click is inside the tooltip wrapper, do not close
|
|
1552
|
+
}
|
|
1515
1553
|
// close dropdown when other dropdown is opened
|
|
1516
1554
|
return rootRef.current !== event.target && !rootRef.current.contains(event.target);
|
|
1517
1555
|
},
|
|
1518
1556
|
handle: function handle(event) {
|
|
1519
1557
|
hideTip();
|
|
1520
1558
|
}
|
|
1521
|
-
}, [isShow, rootRef]);
|
|
1559
|
+
}, [isShow, rootRef, controlled]);
|
|
1522
1560
|
|
|
1523
1561
|
//timer hover
|
|
1524
1562
|
var timeoutHoverIdRef = (0,react__WEBPACK_IMPORTED_MODULE_0__.useRef)(null);
|
|
@@ -1552,7 +1590,7 @@ var Tooltip = function Tooltip(props) {
|
|
|
1552
1590
|
//------------------
|
|
1553
1591
|
var _modalRef = modalRef.current;
|
|
1554
1592
|
if (_modalRef === null) return;
|
|
1555
|
-
var _modalContent = _modalRef.querySelector('.tooltip__content');
|
|
1593
|
+
var _modalContent = _modalRef.querySelector('.cus-tooltip__content');
|
|
1556
1594
|
var _modalBox = _modalContent.getBoundingClientRect();
|
|
1557
1595
|
if (typeof _modalContent.dataset.offset === 'undefined' && _modalBox.left > 0) {
|
|
1558
1596
|
// Adjust the coordinates due to height
|
|
@@ -1590,6 +1628,7 @@ var Tooltip = function Tooltip(props) {
|
|
|
1590
1628
|
};
|
|
1591
1629
|
|
|
1592
1630
|
function handleMouseEnter(e) {
|
|
1631
|
+
if (controlled) return; // Do nothing if controlled
|
|
1593
1632
|
stopTimerHover();
|
|
1594
1633
|
stopTimerMouseout();
|
|
1595
1634
|
startTimerHover();
|
|
@@ -1600,11 +1639,11 @@ var Tooltip = function Tooltip(props) {
|
|
|
1600
1639
|
|
|
1601
1640
|
// console.log(getAbsolutePositionOfStage(_triggerRef));
|
|
1602
1641
|
if (_triggerRef !== null) {
|
|
1603
|
-
var
|
|
1604
|
-
x =
|
|
1605
|
-
y =
|
|
1606
|
-
width =
|
|
1607
|
-
height =
|
|
1642
|
+
var _getAbsolutePositionO2 = (0,funda_utils_dist_cjs_getElementProperty__WEBPACK_IMPORTED_MODULE_4__.getAbsolutePositionOfStage)(_triggerRef),
|
|
1643
|
+
x = _getAbsolutePositionO2.x,
|
|
1644
|
+
y = _getAbsolutePositionO2.y,
|
|
1645
|
+
width = _getAbsolutePositionO2.width,
|
|
1646
|
+
height = _getAbsolutePositionO2.height;
|
|
1608
1647
|
var pos = _triggerRef.dataset.microtipPosition;
|
|
1609
1648
|
if (typeof pos === 'undefined') pos = 'top';
|
|
1610
1649
|
|
|
@@ -1628,6 +1667,7 @@ var Tooltip = function Tooltip(props) {
|
|
|
1628
1667
|
}
|
|
1629
1668
|
}
|
|
1630
1669
|
function handleMouseLeave() {
|
|
1670
|
+
if (controlled) return; // Do nothing if controlled
|
|
1631
1671
|
stopTimerHover();
|
|
1632
1672
|
stopTimerMouseout();
|
|
1633
1673
|
startTimerMouseout();
|
|
@@ -1635,10 +1675,59 @@ var Tooltip = function Tooltip(props) {
|
|
|
1635
1675
|
function hideTip() {
|
|
1636
1676
|
setIsShow(false);
|
|
1637
1677
|
}
|
|
1678
|
+
|
|
1679
|
+
// Timer for delayed close
|
|
1680
|
+
var delayedCloseTimerRef = (0,react__WEBPACK_IMPORTED_MODULE_0__.useRef)(null);
|
|
1681
|
+
var DELAYED_CLOSE_TIMEOUT = typeof delayedCloseTimeout === 'number' ? delayedCloseTimeout : 1500;
|
|
1682
|
+
|
|
1683
|
+
// Handler for mouse leave on trigger (when delayedClose is enabled)
|
|
1684
|
+
function handleTriggerMouseLeave() {
|
|
1685
|
+
if (controlled) return;
|
|
1686
|
+
if (delayedClose) {
|
|
1687
|
+
// Start delayed close timer
|
|
1688
|
+
if (delayedCloseTimerRef.current) clearTimeout(delayedCloseTimerRef.current);
|
|
1689
|
+
delayedCloseTimerRef.current = setTimeout(function () {
|
|
1690
|
+
hideTip();
|
|
1691
|
+
}, DELAYED_CLOSE_TIMEOUT);
|
|
1692
|
+
} else {
|
|
1693
|
+
stopTimerHover();
|
|
1694
|
+
stopTimerMouseout();
|
|
1695
|
+
startTimerMouseout();
|
|
1696
|
+
}
|
|
1697
|
+
}
|
|
1698
|
+
|
|
1699
|
+
// Handler for mouse enter on wrapper (cancel delayed close)
|
|
1700
|
+
function handleWrapperMouseEnter(event) {
|
|
1701
|
+
if (controlled) return;
|
|
1702
|
+
if (delayedClose && delayedCloseTimerRef.current) {
|
|
1703
|
+
clearTimeout(delayedCloseTimerRef.current);
|
|
1704
|
+
delayedCloseTimerRef.current = null;
|
|
1705
|
+
}
|
|
1706
|
+
// Call user-provided handler if present
|
|
1707
|
+
if (onContentMouseEnter && event) {
|
|
1708
|
+
onContentMouseEnter(event);
|
|
1709
|
+
}
|
|
1710
|
+
}
|
|
1711
|
+
|
|
1712
|
+
// Handler for mouse leave on wrapper (restart delayed close timer)
|
|
1713
|
+
function handleWrapperMouseLeave(event) {
|
|
1714
|
+
if (controlled) return;
|
|
1715
|
+
if (delayedClose) {
|
|
1716
|
+
if (delayedCloseTimerRef.current) clearTimeout(delayedCloseTimerRef.current);
|
|
1717
|
+
delayedCloseTimerRef.current = setTimeout(function () {
|
|
1718
|
+
hideTip();
|
|
1719
|
+
}, DELAYED_CLOSE_TIMEOUT);
|
|
1720
|
+
}
|
|
1721
|
+
// Call user-provided handler if present
|
|
1722
|
+
if (onContentMouseLeave && event) {
|
|
1723
|
+
onContentMouseLeave(event);
|
|
1724
|
+
}
|
|
1725
|
+
}
|
|
1638
1726
|
(0,react__WEBPACK_IMPORTED_MODULE_0__.useEffect)(function () {
|
|
1639
1727
|
return function () {
|
|
1640
1728
|
stopTimerHover();
|
|
1641
1729
|
stopTimerMouseout();
|
|
1730
|
+
if (delayedCloseTimerRef.current) clearTimeout(delayedCloseTimerRef.current);
|
|
1642
1731
|
};
|
|
1643
1732
|
}, []);
|
|
1644
1733
|
|
|
@@ -1648,31 +1737,38 @@ var Tooltip = function Tooltip(props) {
|
|
|
1648
1737
|
});
|
|
1649
1738
|
return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement((react__WEBPACK_IMPORTED_MODULE_0___default().Fragment), null, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("div", {
|
|
1650
1739
|
ref: rootRef,
|
|
1651
|
-
"data-overlay-id": "tooltip__wrapper-".concat(idRes),
|
|
1652
|
-
className: (0,funda_utils_dist_cjs_cls__WEBPACK_IMPORTED_MODULE_5__.combinedCls)('tooltip__trigger', (0,funda_utils_dist_cjs_cls__WEBPACK_IMPORTED_MODULE_5__.clsWrite)(triggerClassName, 'd-inline-block')),
|
|
1740
|
+
"data-overlay-id": "cus-tooltip__wrapper-".concat(idRes),
|
|
1741
|
+
className: (0,funda_utils_dist_cjs_cls__WEBPACK_IMPORTED_MODULE_5__.combinedCls)('cus-tooltip__trigger', (0,funda_utils_dist_cjs_cls__WEBPACK_IMPORTED_MODULE_5__.clsWrite)(triggerClassName, 'd-inline-block')),
|
|
1653
1742
|
"data-microtip-position": direction || 'top',
|
|
1654
1743
|
"data-microtip-size": size || 'auto',
|
|
1655
1744
|
onMouseEnter: handleMouseEnter,
|
|
1656
|
-
onMouseLeave: handleMouseLeave
|
|
1745
|
+
onMouseLeave: delayedClose ? handleTriggerMouseLeave : handleMouseLeave
|
|
1657
1746
|
}, children), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement((funda_root_portal__WEBPACK_IMPORTED_MODULE_1___default()), {
|
|
1658
1747
|
show: isShow,
|
|
1659
1748
|
containerClassName: "Tooltip"
|
|
1660
1749
|
}, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("div", {
|
|
1661
1750
|
ref: modalRef,
|
|
1662
|
-
id: "tooltip__wrapper-".concat(idRes),
|
|
1663
|
-
className: (0,funda_utils_dist_cjs_cls__WEBPACK_IMPORTED_MODULE_5__.combinedCls)('tooltip__wrapper', wrapperClassName, 'active'),
|
|
1751
|
+
id: "cus-tooltip__wrapper-".concat(idRes),
|
|
1752
|
+
className: (0,funda_utils_dist_cjs_cls__WEBPACK_IMPORTED_MODULE_5__.combinedCls)('cus-tooltip__wrapper', wrapperClassName, 'active'),
|
|
1664
1753
|
role: "tooltip",
|
|
1665
1754
|
"data-microtip-position": direction || 'top',
|
|
1666
1755
|
"data-microtip-size": size || 'auto',
|
|
1667
|
-
style: {
|
|
1756
|
+
style: _objectSpread({
|
|
1668
1757
|
left: position.x,
|
|
1669
1758
|
top: position.y,
|
|
1670
1759
|
display: 'none'
|
|
1671
|
-
}
|
|
1760
|
+
}, popupArrowStyle),
|
|
1761
|
+
onMouseEnter: delayedClose || onContentMouseEnter ? function (e) {
|
|
1762
|
+
return handleWrapperMouseEnter(e);
|
|
1763
|
+
} : undefined,
|
|
1764
|
+
onMouseLeave: delayedClose || onContentMouseLeave ? function (e) {
|
|
1765
|
+
return handleWrapperMouseLeave(e);
|
|
1766
|
+
} : undefined
|
|
1672
1767
|
}, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("div", {
|
|
1673
|
-
className: "tooltip__content"
|
|
1768
|
+
className: "cus-tooltip__content",
|
|
1769
|
+
style: _objectSpread({}, popupContentStyle)
|
|
1674
1770
|
}, content))));
|
|
1675
|
-
};
|
|
1771
|
+
});
|
|
1676
1772
|
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (Tooltip);
|
|
1677
1773
|
})();
|
|
1678
1774
|
|
|
@@ -2183,7 +2183,7 @@ function Group(props) {
|
|
|
2183
2183
|
"data-id": item.id,
|
|
2184
2184
|
"data-value": JSON.stringify(item),
|
|
2185
2185
|
"data-level": level,
|
|
2186
|
-
className: (0,cls.combinedCls)('casc-
|
|
2186
|
+
className: (0,cls.combinedCls)('casc-menu__opt', {
|
|
2187
2187
|
'active': item.current
|
|
2188
2188
|
}),
|
|
2189
2189
|
dangerouslySetInnerHTML: {
|
|
@@ -2197,13 +2197,13 @@ function Group(props) {
|
|
|
2197
2197
|
} else {
|
|
2198
2198
|
return columnTitle[level] === '' || perColumnHeadersShow === false ? null : /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("h3", {
|
|
2199
2199
|
key: index,
|
|
2200
|
-
className: "casc-
|
|
2200
|
+
className: "casc-menu__opt-header"
|
|
2201
2201
|
}, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("span", {
|
|
2202
2202
|
dangerouslySetInnerHTML: {
|
|
2203
2203
|
__html: columnTitle[level]
|
|
2204
2204
|
}
|
|
2205
2205
|
}), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("div", {
|
|
2206
|
-
className: "casc-
|
|
2206
|
+
className: "casc-menu__opt-header__clean"
|
|
2207
2207
|
}, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("a", {
|
|
2208
2208
|
tabIndex: -1,
|
|
2209
2209
|
href: "#",
|
|
@@ -2416,7 +2416,7 @@ var CascadingSelect = /*#__PURE__*/(0,external_root_React_commonjs2_react_common
|
|
|
2416
2416
|
if (rootRef.current === null || inputRef.current === null) return;
|
|
2417
2417
|
|
|
2418
2418
|
// update modal position
|
|
2419
|
-
var _modalRef = document.querySelector("#casc-
|
|
2419
|
+
var _modalRef = document.querySelector("#casc-menu__items-wrapper-".concat(idRes));
|
|
2420
2420
|
var _triggerRef = inputRef.current;
|
|
2421
2421
|
|
|
2422
2422
|
// console.log(getAbsolutePositionOfStage(_triggerRef));
|
|
@@ -2488,7 +2488,7 @@ var CascadingSelect = /*#__PURE__*/(0,external_root_React_commonjs2_react_common
|
|
|
2488
2488
|
}
|
|
2489
2489
|
|
|
2490
2490
|
function popwinPosHide() {
|
|
2491
|
-
var _modalRef = document.querySelector("#casc-
|
|
2491
|
+
var _modalRef = document.querySelector("#casc-menu__items-wrapper-".concat(idRes));
|
|
2492
2492
|
if (_modalRef !== null) {
|
|
2493
2493
|
// remove classnames and styles
|
|
2494
2494
|
_modalRef.classList.remove('active');
|
|
@@ -2499,9 +2499,9 @@ var CascadingSelect = /*#__PURE__*/(0,external_root_React_commonjs2_react_common
|
|
|
2499
2499
|
var level = arguments.length > 2 ? arguments[2] : undefined;
|
|
2500
2500
|
if (listRef.current === null) return;
|
|
2501
2501
|
var latestDisplayColIndex = 0;
|
|
2502
|
-
var currentItemsInner = listRef.current.querySelector('.casc-
|
|
2502
|
+
var currentItemsInner = listRef.current.querySelector('.casc-menu__items-inner');
|
|
2503
2503
|
if (currentItemsInner !== null) {
|
|
2504
|
-
var colItemsWrapper = [].slice.call(currentItemsInner.querySelectorAll('.casc-
|
|
2504
|
+
var colItemsWrapper = [].slice.call(currentItemsInner.querySelectorAll('.casc-menu__items-col'));
|
|
2505
2505
|
colItemsWrapper.forEach(function (perCol) {
|
|
2506
2506
|
perCol.classList.remove('hide-col');
|
|
2507
2507
|
});
|
|
@@ -2701,10 +2701,10 @@ var CascadingSelect = /*#__PURE__*/(0,external_root_React_commonjs2_react_common
|
|
|
2701
2701
|
|
|
2702
2702
|
// active current option with DOM
|
|
2703
2703
|
//////////////////////////////////////////
|
|
2704
|
-
var currentItemsInner = e.currentTarget.closest('.casc-
|
|
2704
|
+
var currentItemsInner = e.currentTarget.closest('.casc-menu__items-inner');
|
|
2705
2705
|
if (currentItemsInner !== null) {
|
|
2706
2706
|
curData.forEach(function (v, col) {
|
|
2707
|
-
var colItemsWrapper = currentItemsInner.querySelectorAll('.casc-
|
|
2707
|
+
var colItemsWrapper = currentItemsInner.querySelectorAll('.casc-menu__items-col');
|
|
2708
2708
|
colItemsWrapper.forEach(function (perCol) {
|
|
2709
2709
|
var _col = Number(perCol.dataset.col);
|
|
2710
2710
|
if (_col >= level) {
|
|
@@ -3149,9 +3149,9 @@ var CascadingSelect = /*#__PURE__*/(0,external_root_React_commonjs2_react_common
|
|
|
3149
3149
|
}
|
|
3150
3150
|
}, [listData.current.length]);
|
|
3151
3151
|
return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement((external_root_React_commonjs2_react_commonjs_react_amd_react_default()).Fragment, null, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("div", {
|
|
3152
|
-
className: (0,cls.clsWrite)(wrapperClassName, 'casc-
|
|
3152
|
+
className: (0,cls.clsWrite)(wrapperClassName, 'casc-menu__wrapper mb-3 position-relative', "casc-menu__wrapper ".concat(wrapperClassName)),
|
|
3153
3153
|
ref: rootRef,
|
|
3154
|
-
"data-overlay-id": "casc-
|
|
3154
|
+
"data-overlay-id": "casc-menu__items-wrapper-".concat(idRes)
|
|
3155
3155
|
}, label ? /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement((external_root_React_commonjs2_react_commonjs_react_amd_react_default()).Fragment, null, typeof label === 'string' ? /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("label", {
|
|
3156
3156
|
htmlFor: idRes,
|
|
3157
3157
|
className: "form-label",
|
|
@@ -3162,23 +3162,23 @@ var CascadingSelect = /*#__PURE__*/(0,external_root_React_commonjs2_react_common
|
|
|
3162
3162
|
htmlFor: idRes,
|
|
3163
3163
|
className: "form-label"
|
|
3164
3164
|
}, label)) : null, triggerContent ? /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement((external_root_React_commonjs2_react_commonjs_react_amd_react_default()).Fragment, null, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("div", {
|
|
3165
|
-
className: (0,cls.clsWrite)(wrapperClassName, 'casc-
|
|
3165
|
+
className: (0,cls.clsWrite)(wrapperClassName, 'casc-menu__trigger d-inline w-auto', "casc-menu__trigger ".concat(triggerClassName)),
|
|
3166
3166
|
onClick: handleDisplayOptions
|
|
3167
3167
|
}, triggerContent)) : null, !hasErr ? /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement((cjs_default()), {
|
|
3168
3168
|
show: true,
|
|
3169
3169
|
containerClassName: "CascadingSelect"
|
|
3170
3170
|
}, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("div", {
|
|
3171
3171
|
ref: listRef,
|
|
3172
|
-
id: "casc-
|
|
3173
|
-
className: "casc-
|
|
3172
|
+
id: "casc-menu__items-wrapper-".concat(idRes),
|
|
3173
|
+
className: "casc-menu__items-wrapper position-absolute border shadow small",
|
|
3174
3174
|
style: {
|
|
3175
3175
|
zIndex: DEPTH,
|
|
3176
3176
|
display: 'none'
|
|
3177
3177
|
}
|
|
3178
3178
|
}, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("ul", {
|
|
3179
|
-
className: "casc-
|
|
3179
|
+
className: "casc-menu__items-inner"
|
|
3180
3180
|
}, loading ? /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement((external_root_React_commonjs2_react_commonjs_react_amd_react_default()).Fragment, null, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("div", {
|
|
3181
|
-
className: "casc-
|
|
3181
|
+
className: "casc-menu__items-loader"
|
|
3182
3182
|
}, loader || /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("svg", {
|
|
3183
3183
|
height: "12px",
|
|
3184
3184
|
width: "12px",
|
|
@@ -3214,7 +3214,7 @@ var CascadingSelect = /*#__PURE__*/(0,external_root_React_commonjs2_react_common
|
|
|
3214
3214
|
e.preventDefault();
|
|
3215
3215
|
cancel();
|
|
3216
3216
|
},
|
|
3217
|
-
className: "casc-
|
|
3217
|
+
className: "casc-menu__close position-absolute top-0 end-0 mt-0 mx-1"
|
|
3218
3218
|
}, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("svg", {
|
|
3219
3219
|
width: "10px",
|
|
3220
3220
|
height: "10px",
|
|
@@ -3235,9 +3235,9 @@ var CascadingSelect = /*#__PURE__*/(0,external_root_React_commonjs2_react_common
|
|
|
3235
3235
|
return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("li", {
|
|
3236
3236
|
key: level,
|
|
3237
3237
|
"data-col": level,
|
|
3238
|
-
className: "casc-
|
|
3238
|
+
className: "casc-menu__items-col"
|
|
3239
3239
|
}, searchable && /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("div", {
|
|
3240
|
-
className: "casc-
|
|
3240
|
+
className: "casc-menu__items-col-searchbox"
|
|
3241
3241
|
}, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("input", {
|
|
3242
3242
|
type: "text",
|
|
3243
3243
|
placeholder: searchPlaceholder,
|
|
@@ -3263,7 +3263,7 @@ var CascadingSelect = /*#__PURE__*/(0,external_root_React_commonjs2_react_common
|
|
|
3263
3263
|
return null;
|
|
3264
3264
|
}
|
|
3265
3265
|
})))) : null, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("div", {
|
|
3266
|
-
className: (0,cls.combinedCls)('casc-
|
|
3266
|
+
className: (0,cls.combinedCls)('casc-menu__val', {
|
|
3267
3267
|
'inputable': inputable
|
|
3268
3268
|
}),
|
|
3269
3269
|
onClick: handleDisplayOptions
|
|
@@ -3286,7 +3286,7 @@ var CascadingSelect = /*#__PURE__*/(0,external_root_React_commonjs2_react_common
|
|
|
3286
3286
|
}
|
|
3287
3287
|
},
|
|
3288
3288
|
id: idRes,
|
|
3289
|
-
"data-overlay-id": "casc-
|
|
3289
|
+
"data-overlay-id": "casc-menu__items-wrapper-".concat(idRes),
|
|
3290
3290
|
name: name,
|
|
3291
3291
|
className: (0,cls.combinedCls)((0,cls.clsWrite)(controlClassName, 'form-control'), controlExClassName, {
|
|
3292
3292
|
'rounded': !propExist(iconLeft) && !propExist(iconRight) && !propExist(units),
|
|
@@ -3335,7 +3335,7 @@ var CascadingSelect = /*#__PURE__*/(0,external_root_React_commonjs2_react_common
|
|
|
3335
3335
|
}
|
|
3336
3336
|
} : undefined
|
|
3337
3337
|
}, attributes)), !inputable ? /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("div", {
|
|
3338
|
-
className: "casc-
|
|
3338
|
+
className: "casc-menu__result"
|
|
3339
3339
|
}, displayInfo()) : null, required ? /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement((external_root_React_commonjs2_react_commonjs_react_amd_react_default()).Fragment, null, requiredLabel || requiredLabel === '' ? requiredLabel : /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("span", {
|
|
3340
3340
|
className: "position-absolute end-0 top-0 my-2 mx-2 pe-3"
|
|
3341
3341
|
}, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("span", {
|
|
@@ -3345,7 +3345,7 @@ var CascadingSelect = /*#__PURE__*/(0,external_root_React_commonjs2_react_common
|
|
|
3345
3345
|
}, units)) : null, propExist(iconRight) ? /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement((external_root_React_commonjs2_react_commonjs_react_amd_react_default()).Fragment, null, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("span", {
|
|
3346
3346
|
className: (0,cls.clsWrite)(controlGroupTextClassName, 'input-group-text')
|
|
3347
3347
|
}, iconRight)) : null), isShow ? /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("div", {
|
|
3348
|
-
className: "casc-
|
|
3348
|
+
className: "casc-menu__closemask",
|
|
3349
3349
|
onClick: function onClick(e) {
|
|
3350
3350
|
e.preventDefault();
|
|
3351
3351
|
cancel();
|