@eztrak/shared 0.15.1 → 0.15.3
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/dist/{chunk-HQPQ6TOE.mjs → chunk-QM2TGUZN.mjs} +24 -7
- package/dist/{chunk-HQPQ6TOE.mjs.map → chunk-QM2TGUZN.mjs.map} +1 -1
- package/dist/components/index.d.mts +12 -2
- package/dist/components/index.d.ts +12 -2
- package/dist/components/index.js +22 -5
- package/dist/components/index.js.map +1 -1
- package/dist/components/index.mjs +1 -1
- package/dist/index.js +22 -5
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +1 -1
- package/package.json +1 -1
|
@@ -1509,7 +1509,7 @@ var CustomCellEditor = forwardRef(
|
|
|
1509
1509
|
CustomCellEditor.displayName = "CustomCellEditor";
|
|
1510
1510
|
|
|
1511
1511
|
// src/components/popup-cell-renderer/PopupCellRenderer.tsx
|
|
1512
|
-
import { useState as useState4 } from "react";
|
|
1512
|
+
import { useRef as useRef6, useState as useState4 } from "react";
|
|
1513
1513
|
import Tippy from "@tippyjs/react";
|
|
1514
1514
|
import { BiDotsVerticalRounded } from "react-icons/bi";
|
|
1515
1515
|
import { jsx as jsx12, jsxs as jsxs9 } from "react/jsx-runtime";
|
|
@@ -1523,23 +1523,34 @@ function PopupCellRenderer({
|
|
|
1523
1523
|
onAction,
|
|
1524
1524
|
placement = "bottom-end",
|
|
1525
1525
|
tippyProps,
|
|
1526
|
-
ariaLabel = "Row actions"
|
|
1526
|
+
ariaLabel = "Row actions",
|
|
1527
|
+
openOnHover = false
|
|
1527
1528
|
}) {
|
|
1528
1529
|
const [visible, setVisible] = useState4(false);
|
|
1530
|
+
const instanceRef = useRef6(null);
|
|
1529
1531
|
const show = () => setVisible(true);
|
|
1530
|
-
const hide = () =>
|
|
1532
|
+
const hide = () => {
|
|
1533
|
+
setVisible(false);
|
|
1534
|
+
instanceRef.current?.hide();
|
|
1535
|
+
};
|
|
1531
1536
|
const rowData = params?.data;
|
|
1532
1537
|
const handleAction = (actionType, actionRowData) => {
|
|
1533
1538
|
onAction?.(actionType, actionRowData ?? rowData, hide);
|
|
1534
1539
|
hide();
|
|
1535
1540
|
};
|
|
1536
1541
|
const content = typeof dropDownContent === "function" ? dropDownContent(handleAction) : dropDownContent;
|
|
1542
|
+
const hoverOrClickProps = openOnHover ? {
|
|
1543
|
+
trigger: "mouseenter",
|
|
1544
|
+
delay: [0, 150],
|
|
1545
|
+
hideOnClick: false
|
|
1546
|
+
} : {
|
|
1547
|
+
visible,
|
|
1548
|
+
onClickOutside: hide
|
|
1549
|
+
};
|
|
1537
1550
|
return /* @__PURE__ */ jsx12("div", { className: "flex h-full", children: /* @__PURE__ */ jsx12(
|
|
1538
1551
|
Tippy,
|
|
1539
1552
|
{
|
|
1540
1553
|
content,
|
|
1541
|
-
visible,
|
|
1542
|
-
onClickOutside: hide,
|
|
1543
1554
|
allowHTML: true,
|
|
1544
1555
|
arrow: false,
|
|
1545
1556
|
appendTo: () => document.body,
|
|
@@ -1549,12 +1560,16 @@ function PopupCellRenderer({
|
|
|
1549
1560
|
theme: "light",
|
|
1550
1561
|
maxWidth: "none",
|
|
1551
1562
|
offset: [0, 5],
|
|
1563
|
+
onCreate: (instance) => {
|
|
1564
|
+
instanceRef.current = instance;
|
|
1565
|
+
},
|
|
1566
|
+
...hoverOrClickProps,
|
|
1552
1567
|
...tippyProps,
|
|
1553
1568
|
children: /* @__PURE__ */ jsxs9(
|
|
1554
1569
|
"button",
|
|
1555
1570
|
{
|
|
1556
1571
|
type: "button",
|
|
1557
|
-
onClick: visible ? hide : show,
|
|
1572
|
+
onClick: openOnHover ? void 0 : visible ? hide : show,
|
|
1558
1573
|
className: cn(
|
|
1559
1574
|
"flex items-center justify-center gap-2 rounded-full text-gray-500 hover:text-gray-800",
|
|
1560
1575
|
className
|
|
@@ -1748,6 +1763,7 @@ function RowActions({
|
|
|
1748
1763
|
triggerAriaLabel = "Row actions",
|
|
1749
1764
|
hasPermission,
|
|
1750
1765
|
placement = "bottom-end",
|
|
1766
|
+
openOnHover = false,
|
|
1751
1767
|
tippyProps,
|
|
1752
1768
|
presets,
|
|
1753
1769
|
confirmFn = confirmationAlert,
|
|
@@ -1862,6 +1878,7 @@ function RowActions({
|
|
|
1862
1878
|
hideTitle: true,
|
|
1863
1879
|
className,
|
|
1864
1880
|
placement,
|
|
1881
|
+
openOnHover,
|
|
1865
1882
|
tippyProps,
|
|
1866
1883
|
ariaLabel: triggerAriaLabel,
|
|
1867
1884
|
dropDownContent: (handleAction) => buildMenu(() => handleAction("close"))
|
|
@@ -1976,4 +1993,4 @@ export {
|
|
|
1976
1993
|
RowActions,
|
|
1977
1994
|
TableErrorBoundary
|
|
1978
1995
|
};
|
|
1979
|
-
//# sourceMappingURL=chunk-
|
|
1996
|
+
//# sourceMappingURL=chunk-QM2TGUZN.mjs.map
|