analytica-frontend-lib 1.1.59 → 1.1.61
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/CheckBox/index.d.mts +1 -1
- package/dist/CheckBox/index.d.ts +1 -1
- package/dist/NotificationCard/index.d.mts +1 -1
- package/dist/NotificationCard/index.d.ts +1 -1
- package/dist/NotificationCard/index.js +76 -62
- package/dist/NotificationCard/index.js.map +1 -1
- package/dist/NotificationCard/index.mjs +76 -62
- package/dist/NotificationCard/index.mjs.map +1 -1
- package/dist/{NotificationCard-DpSGkWEa.d.mts → NotificationCard-4GgB0Nsf.d.mts} +5 -0
- package/dist/{NotificationCard-DpSGkWEa.d.ts → NotificationCard-4GgB0Nsf.d.ts} +5 -0
- package/dist/Radio/index.d.mts +2 -2
- package/dist/Radio/index.d.ts +2 -2
- package/dist/Search/index.d.mts +1 -1
- package/dist/Search/index.d.ts +1 -1
- package/dist/SubjectInfo/index.js +16 -16
- package/dist/SubjectInfo/index.js.map +1 -1
- package/dist/SubjectInfo/index.mjs +16 -16
- package/dist/SubjectInfo/index.mjs.map +1 -1
- package/dist/index.d.mts +3 -3
- package/dist/index.d.ts +3 -3
- package/dist/index.js +93 -79
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +93 -79
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
|
@@ -1641,6 +1641,7 @@ var NotificationCenter = ({
|
|
|
1641
1641
|
getActionLabel,
|
|
1642
1642
|
onFetchNotifications,
|
|
1643
1643
|
onMarkAllAsRead,
|
|
1644
|
+
onOpenChange,
|
|
1644
1645
|
emptyStateImage,
|
|
1645
1646
|
emptyStateTitle,
|
|
1646
1647
|
emptyStateDescription,
|
|
@@ -1656,6 +1657,13 @@ var NotificationCenter = ({
|
|
|
1656
1657
|
const handleDesktopClick = () => {
|
|
1657
1658
|
onToggleActive?.();
|
|
1658
1659
|
};
|
|
1660
|
+
const handleOpenChange = (open) => {
|
|
1661
|
+
const controlledByParent = typeof isActive === "boolean" && typeof onToggleActive === "function";
|
|
1662
|
+
onOpenChange?.(open);
|
|
1663
|
+
if (controlledByParent && !onOpenChange && !open && isActive) {
|
|
1664
|
+
onToggleActive?.();
|
|
1665
|
+
}
|
|
1666
|
+
};
|
|
1659
1667
|
useEffect6(() => {
|
|
1660
1668
|
if (isActive) {
|
|
1661
1669
|
onFetchNotifications?.();
|
|
@@ -1733,72 +1741,78 @@ var NotificationCenter = ({
|
|
|
1733
1741
|
] });
|
|
1734
1742
|
}
|
|
1735
1743
|
return /* @__PURE__ */ jsxs7(Fragment2, { children: [
|
|
1736
|
-
/* @__PURE__ */ jsxs7(
|
|
1737
|
-
|
|
1738
|
-
|
|
1739
|
-
{
|
|
1740
|
-
|
|
1741
|
-
|
|
1742
|
-
|
|
1743
|
-
Bell2,
|
|
1744
|
+
/* @__PURE__ */ jsxs7(
|
|
1745
|
+
DropdownMenu_default,
|
|
1746
|
+
{
|
|
1747
|
+
...typeof isActive === "boolean" ? { open: isActive, onOpenChange: handleOpenChange } : { onOpenChange: handleOpenChange },
|
|
1748
|
+
children: [
|
|
1749
|
+
/* @__PURE__ */ jsx10(DropdownMenuTrigger, { className: "text-primary cursor-pointer", children: /* @__PURE__ */ jsx10(
|
|
1750
|
+
IconButton_default,
|
|
1744
1751
|
{
|
|
1745
|
-
|
|
1746
|
-
|
|
1747
|
-
|
|
1748
|
-
|
|
1749
|
-
className
|
|
1750
|
-
}
|
|
1751
|
-
) }),
|
|
1752
|
-
/* @__PURE__ */ jsx10(
|
|
1753
|
-
DropdownMenuContent,
|
|
1754
|
-
{
|
|
1755
|
-
className: "min-w-[320px] max-w-[400px] max-h-[500px] overflow-hidden",
|
|
1756
|
-
side: "bottom",
|
|
1757
|
-
align: "end",
|
|
1758
|
-
children: /* @__PURE__ */ jsxs7("div", { className: "flex flex-col", children: [
|
|
1759
|
-
/* @__PURE__ */ jsxs7("div", { className: "px-4 py-3 border-b border-border-200", children: [
|
|
1760
|
-
/* @__PURE__ */ jsx10(
|
|
1761
|
-
NotificationHeader,
|
|
1752
|
+
active: isActive,
|
|
1753
|
+
onClick: handleDesktopClick,
|
|
1754
|
+
icon: /* @__PURE__ */ jsx10(
|
|
1755
|
+
Bell2,
|
|
1762
1756
|
{
|
|
1763
|
-
|
|
1764
|
-
|
|
1757
|
+
size: 24,
|
|
1758
|
+
className: isActive ? "text-primary-950" : "text-primary"
|
|
1765
1759
|
}
|
|
1766
1760
|
),
|
|
1767
|
-
|
|
1768
|
-
|
|
1769
|
-
|
|
1770
|
-
|
|
1771
|
-
|
|
1772
|
-
|
|
1773
|
-
|
|
1774
|
-
|
|
1775
|
-
|
|
1776
|
-
|
|
1777
|
-
|
|
1778
|
-
|
|
1779
|
-
|
|
1780
|
-
|
|
1781
|
-
|
|
1782
|
-
|
|
1783
|
-
|
|
1784
|
-
|
|
1785
|
-
|
|
1786
|
-
|
|
1787
|
-
|
|
1788
|
-
|
|
1789
|
-
|
|
1790
|
-
|
|
1791
|
-
|
|
1792
|
-
|
|
1793
|
-
|
|
1794
|
-
|
|
1795
|
-
|
|
1796
|
-
|
|
1797
|
-
|
|
1798
|
-
|
|
1799
|
-
|
|
1800
|
-
|
|
1801
|
-
|
|
1761
|
+
className
|
|
1762
|
+
}
|
|
1763
|
+
) }),
|
|
1764
|
+
/* @__PURE__ */ jsx10(
|
|
1765
|
+
DropdownMenuContent,
|
|
1766
|
+
{
|
|
1767
|
+
className: "min-w-[320px] max-w-[400px] max-h-[500px] overflow-hidden",
|
|
1768
|
+
side: "bottom",
|
|
1769
|
+
align: "end",
|
|
1770
|
+
children: /* @__PURE__ */ jsxs7("div", { className: "flex flex-col", children: [
|
|
1771
|
+
/* @__PURE__ */ jsxs7("div", { className: "px-4 py-3 border-b border-border-200", children: [
|
|
1772
|
+
/* @__PURE__ */ jsx10(
|
|
1773
|
+
NotificationHeader,
|
|
1774
|
+
{
|
|
1775
|
+
unreadCount,
|
|
1776
|
+
variant: "dropdown"
|
|
1777
|
+
}
|
|
1778
|
+
),
|
|
1779
|
+
unreadCount > 0 && onMarkAllAsRead && /* @__PURE__ */ jsx10(
|
|
1780
|
+
"button",
|
|
1781
|
+
{
|
|
1782
|
+
type: "button",
|
|
1783
|
+
onClick: onMarkAllAsRead,
|
|
1784
|
+
className: "text-sm font-medium text-info-600 hover:text-info-700 cursor-pointer mt-2",
|
|
1785
|
+
children: "Marcar todas como lidas"
|
|
1786
|
+
}
|
|
1787
|
+
)
|
|
1788
|
+
] }),
|
|
1789
|
+
/* @__PURE__ */ jsx10("div", { className: "max-h-[350px] overflow-y-auto", children: /* @__PURE__ */ jsx10(
|
|
1790
|
+
NotificationList,
|
|
1791
|
+
{
|
|
1792
|
+
groupedNotifications,
|
|
1793
|
+
loading,
|
|
1794
|
+
error,
|
|
1795
|
+
onRetry,
|
|
1796
|
+
onMarkAsReadById,
|
|
1797
|
+
onDeleteById,
|
|
1798
|
+
onNavigateById,
|
|
1799
|
+
onGlobalNotificationClick: (notification) => {
|
|
1800
|
+
setGlobalNotificationModal({
|
|
1801
|
+
isOpen: true,
|
|
1802
|
+
notification
|
|
1803
|
+
});
|
|
1804
|
+
},
|
|
1805
|
+
getActionLabel,
|
|
1806
|
+
renderEmpty: renderEmptyState,
|
|
1807
|
+
emptyStateImage
|
|
1808
|
+
}
|
|
1809
|
+
) })
|
|
1810
|
+
] })
|
|
1811
|
+
}
|
|
1812
|
+
)
|
|
1813
|
+
]
|
|
1814
|
+
}
|
|
1815
|
+
),
|
|
1802
1816
|
/* @__PURE__ */ jsx10(
|
|
1803
1817
|
Modal_default,
|
|
1804
1818
|
{
|