@retinalabsllc/zairusjs 16.1.1 → 16.1.2
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/index.d.mts +11 -1
- package/dist/index.d.ts +11 -1
- package/dist/index.js +61 -7
- package/dist/index.mjs +63 -8
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -1030,11 +1030,20 @@ interface NotificationItem2 {
|
|
|
1030
1030
|
title: string;
|
|
1031
1031
|
message: string;
|
|
1032
1032
|
isRead: boolean;
|
|
1033
|
+
type?: string;
|
|
1034
|
+
meta_json?: any;
|
|
1033
1035
|
createdAt: string | Date;
|
|
1034
1036
|
}
|
|
1037
|
+
interface BarIconProps {
|
|
1038
|
+
icon: any;
|
|
1039
|
+
color?: string;
|
|
1040
|
+
onClick?: () => void;
|
|
1041
|
+
}
|
|
1035
1042
|
interface UniversalHome2Props {
|
|
1036
1043
|
fullName?: string;
|
|
1037
1044
|
avatarSrc?: string | null;
|
|
1045
|
+
userStatus?: 'ACTIVE' | 'BUSY' | 'AWAY' | 'OFFLINE' | string;
|
|
1046
|
+
barIcons?: BarIconProps[];
|
|
1038
1047
|
createHuddleAction?: HomeActionBtn2;
|
|
1039
1048
|
joinHuddleAction?: HomeActionBtn2;
|
|
1040
1049
|
notifications?: NotificationItem2[];
|
|
@@ -1043,10 +1052,11 @@ interface UniversalHome2Props {
|
|
|
1043
1052
|
isNotifsLoading?: boolean;
|
|
1044
1053
|
onNotificationPageChange?: (page: number) => void;
|
|
1045
1054
|
onNotificationClick?: (notif: NotificationItem2) => void;
|
|
1055
|
+
onResolveInvite?: (notif: NotificationItem2, resolution: 'ACCEPTED' | 'REJECTED') => Promise<void>;
|
|
1046
1056
|
formatNotifDate: (date: string | Date) => string;
|
|
1047
1057
|
customContent?: React.ReactNode;
|
|
1048
1058
|
departmentsProps: UniversalDepartmentsPageProps;
|
|
1049
1059
|
}
|
|
1050
1060
|
declare const UniversalHome2: React.FC<UniversalHome2Props>;
|
|
1051
1061
|
|
|
1052
|
-
export { AppBento2, type AppBento2Props, type BannerProps, type BentoFeature, type BoardMember, type CardData, CardInfoDialog, type CardInfoDialogProps, type CompanyDetails, type ConsultantProfile, ConsultantShowcase, type ConsultantShowcaseProps, ContentGridBlock, type ContentGridBlockProps, type CryptoOption, type DocumentSectionData, type EmailContact, Faq, type FaqItem, type FaqProps, FeatureScroll, type FeatureScrollProps, type FiatCurrencyOption, Footer, type FooterColumn, type FooterLink, type FooterProps, FundCardDialog, type FundCardDialogProps, GifFeatureCard, type GifFeatureCardProps, Header, type HeaderLink, type HeaderProps, type AppLogo$1 as HeroAppLogo, HeroSection, type HeroSectionProps, type HomeActionBtn, type HomeActionBtn2, type LeaderboardItem, ManagedBoardBlock, type ManagedBoardBlockProps, ManagedContactBlock, type ManagedContactBlockProps, ManagedDocument, type ManagedDocumentProps, ManagedNewsletterSplitBlock, type ManagedNewsletterSplitBlockProps, ManagedNotFoundBlock, type ManagedNotFoundBlockProps, ManagedPricingBlock, type ManagedPricingBlockProps, ManagedProjectsBlock, type ManagedProjectsBlockProps, ManagedToaster, MedicalFeatureStatsBlock, MobileNav, type MobileNavItem, type MobileNavProps, type NavItem, type NetworkOption, type NotificationItem, type NotificationItem2, NumberInput, type NumberInputProps, PageSpinner, type PageSpinnerProps, PinDialerBottomSheet, type PinDialerBottomSheetProps, PipleAuth, type PipleAuthProps, type PlatformFeatureItem, PlatformFeatures, type PlatformFeaturesProps, PortfolioHero, type PortfolioHeroProps, type AppLogo as PricingAppLogo, type PricingFeature, type PricingFeature2, type PricingPlan, type PricingTab, type ProjectItem, type RateCalculationPayload, type ReferralProfile, type RewardItem, type RewardProfile, type ScrollFeature, type SocialContact, type SocialLink, type StatItem, TextInput, type TextInputProps, ThreeDActionButton, type ThreeDActionButtonProps, ThreeDButton, type ThreeDButtonProps, type TierOption, UniversalBuyCryptoPage, type UniversalBuyCryptoPageProps, UniversalCardActionPage, type UniversalCardActionPageProps, UniversalCardPage, type UniversalCardPageProps, type UniversalDepartment, UniversalDepartmentsPage, type UniversalDepartmentsPageProps, UniversalErrorView, type UniversalErrorViewProps, UniversalHome2, type UniversalHome2Props, UniversalHomeView, type UniversalHomeViewProps, type UniversalMember, UniversalMembersPage, type UniversalMembersPageProps, UniversalOrganizationPage, type UniversalOrganizationPageProps, UniversalProfilePage, type UniversalProfilePageProps, UniversalProfileSettings, type UniversalProfileSettingsProps, type UniversalReferralItem, UniversalReferralPage, type UniversalReferralPageProps, UniversalRewardPage, type UniversalRewardPageProps, UniversalSecurityPage, type UniversalSecurityPageProps, UniversalSidebar, type UniversalSidebarProps, type UniversalTransaction, UniversalTransactionPage, type UniversalTransactionPageProps, UniversalVerificationPage, type UniversalVerificationPageProps, type UniversalWallet, UniversalWalletPage, type UniversalWalletPageProps, type VerificationStatus, WaitlistDialog, type WaitlistDialogProps };
|
|
1062
|
+
export { AppBento2, type AppBento2Props, type BannerProps, type BarIconProps, type BentoFeature, type BoardMember, type CardData, CardInfoDialog, type CardInfoDialogProps, type CompanyDetails, type ConsultantProfile, ConsultantShowcase, type ConsultantShowcaseProps, ContentGridBlock, type ContentGridBlockProps, type CryptoOption, type DocumentSectionData, type EmailContact, Faq, type FaqItem, type FaqProps, FeatureScroll, type FeatureScrollProps, type FiatCurrencyOption, Footer, type FooterColumn, type FooterLink, type FooterProps, FundCardDialog, type FundCardDialogProps, GifFeatureCard, type GifFeatureCardProps, Header, type HeaderLink, type HeaderProps, type AppLogo$1 as HeroAppLogo, HeroSection, type HeroSectionProps, type HomeActionBtn, type HomeActionBtn2, type LeaderboardItem, ManagedBoardBlock, type ManagedBoardBlockProps, ManagedContactBlock, type ManagedContactBlockProps, ManagedDocument, type ManagedDocumentProps, ManagedNewsletterSplitBlock, type ManagedNewsletterSplitBlockProps, ManagedNotFoundBlock, type ManagedNotFoundBlockProps, ManagedPricingBlock, type ManagedPricingBlockProps, ManagedProjectsBlock, type ManagedProjectsBlockProps, ManagedToaster, MedicalFeatureStatsBlock, MobileNav, type MobileNavItem, type MobileNavProps, type NavItem, type NetworkOption, type NotificationItem, type NotificationItem2, NumberInput, type NumberInputProps, PageSpinner, type PageSpinnerProps, PinDialerBottomSheet, type PinDialerBottomSheetProps, PipleAuth, type PipleAuthProps, type PlatformFeatureItem, PlatformFeatures, type PlatformFeaturesProps, PortfolioHero, type PortfolioHeroProps, type AppLogo as PricingAppLogo, type PricingFeature, type PricingFeature2, type PricingPlan, type PricingTab, type ProjectItem, type RateCalculationPayload, type ReferralProfile, type RewardItem, type RewardProfile, type ScrollFeature, type SocialContact, type SocialLink, type StatItem, TextInput, type TextInputProps, ThreeDActionButton, type ThreeDActionButtonProps, ThreeDButton, type ThreeDButtonProps, type TierOption, UniversalBuyCryptoPage, type UniversalBuyCryptoPageProps, UniversalCardActionPage, type UniversalCardActionPageProps, UniversalCardPage, type UniversalCardPageProps, type UniversalDepartment, UniversalDepartmentsPage, type UniversalDepartmentsPageProps, UniversalErrorView, type UniversalErrorViewProps, UniversalHome2, type UniversalHome2Props, UniversalHomeView, type UniversalHomeViewProps, type UniversalMember, UniversalMembersPage, type UniversalMembersPageProps, UniversalOrganizationPage, type UniversalOrganizationPageProps, UniversalProfilePage, type UniversalProfilePageProps, UniversalProfileSettings, type UniversalProfileSettingsProps, type UniversalReferralItem, UniversalReferralPage, type UniversalReferralPageProps, UniversalRewardPage, type UniversalRewardPageProps, UniversalSecurityPage, type UniversalSecurityPageProps, UniversalSidebar, type UniversalSidebarProps, type UniversalTransaction, UniversalTransactionPage, type UniversalTransactionPageProps, UniversalVerificationPage, type UniversalVerificationPageProps, type UniversalWallet, UniversalWalletPage, type UniversalWalletPageProps, type VerificationStatus, WaitlistDialog, type WaitlistDialogProps };
|
package/dist/index.d.ts
CHANGED
|
@@ -1030,11 +1030,20 @@ interface NotificationItem2 {
|
|
|
1030
1030
|
title: string;
|
|
1031
1031
|
message: string;
|
|
1032
1032
|
isRead: boolean;
|
|
1033
|
+
type?: string;
|
|
1034
|
+
meta_json?: any;
|
|
1033
1035
|
createdAt: string | Date;
|
|
1034
1036
|
}
|
|
1037
|
+
interface BarIconProps {
|
|
1038
|
+
icon: any;
|
|
1039
|
+
color?: string;
|
|
1040
|
+
onClick?: () => void;
|
|
1041
|
+
}
|
|
1035
1042
|
interface UniversalHome2Props {
|
|
1036
1043
|
fullName?: string;
|
|
1037
1044
|
avatarSrc?: string | null;
|
|
1045
|
+
userStatus?: 'ACTIVE' | 'BUSY' | 'AWAY' | 'OFFLINE' | string;
|
|
1046
|
+
barIcons?: BarIconProps[];
|
|
1038
1047
|
createHuddleAction?: HomeActionBtn2;
|
|
1039
1048
|
joinHuddleAction?: HomeActionBtn2;
|
|
1040
1049
|
notifications?: NotificationItem2[];
|
|
@@ -1043,10 +1052,11 @@ interface UniversalHome2Props {
|
|
|
1043
1052
|
isNotifsLoading?: boolean;
|
|
1044
1053
|
onNotificationPageChange?: (page: number) => void;
|
|
1045
1054
|
onNotificationClick?: (notif: NotificationItem2) => void;
|
|
1055
|
+
onResolveInvite?: (notif: NotificationItem2, resolution: 'ACCEPTED' | 'REJECTED') => Promise<void>;
|
|
1046
1056
|
formatNotifDate: (date: string | Date) => string;
|
|
1047
1057
|
customContent?: React.ReactNode;
|
|
1048
1058
|
departmentsProps: UniversalDepartmentsPageProps;
|
|
1049
1059
|
}
|
|
1050
1060
|
declare const UniversalHome2: React.FC<UniversalHome2Props>;
|
|
1051
1061
|
|
|
1052
|
-
export { AppBento2, type AppBento2Props, type BannerProps, type BentoFeature, type BoardMember, type CardData, CardInfoDialog, type CardInfoDialogProps, type CompanyDetails, type ConsultantProfile, ConsultantShowcase, type ConsultantShowcaseProps, ContentGridBlock, type ContentGridBlockProps, type CryptoOption, type DocumentSectionData, type EmailContact, Faq, type FaqItem, type FaqProps, FeatureScroll, type FeatureScrollProps, type FiatCurrencyOption, Footer, type FooterColumn, type FooterLink, type FooterProps, FundCardDialog, type FundCardDialogProps, GifFeatureCard, type GifFeatureCardProps, Header, type HeaderLink, type HeaderProps, type AppLogo$1 as HeroAppLogo, HeroSection, type HeroSectionProps, type HomeActionBtn, type HomeActionBtn2, type LeaderboardItem, ManagedBoardBlock, type ManagedBoardBlockProps, ManagedContactBlock, type ManagedContactBlockProps, ManagedDocument, type ManagedDocumentProps, ManagedNewsletterSplitBlock, type ManagedNewsletterSplitBlockProps, ManagedNotFoundBlock, type ManagedNotFoundBlockProps, ManagedPricingBlock, type ManagedPricingBlockProps, ManagedProjectsBlock, type ManagedProjectsBlockProps, ManagedToaster, MedicalFeatureStatsBlock, MobileNav, type MobileNavItem, type MobileNavProps, type NavItem, type NetworkOption, type NotificationItem, type NotificationItem2, NumberInput, type NumberInputProps, PageSpinner, type PageSpinnerProps, PinDialerBottomSheet, type PinDialerBottomSheetProps, PipleAuth, type PipleAuthProps, type PlatformFeatureItem, PlatformFeatures, type PlatformFeaturesProps, PortfolioHero, type PortfolioHeroProps, type AppLogo as PricingAppLogo, type PricingFeature, type PricingFeature2, type PricingPlan, type PricingTab, type ProjectItem, type RateCalculationPayload, type ReferralProfile, type RewardItem, type RewardProfile, type ScrollFeature, type SocialContact, type SocialLink, type StatItem, TextInput, type TextInputProps, ThreeDActionButton, type ThreeDActionButtonProps, ThreeDButton, type ThreeDButtonProps, type TierOption, UniversalBuyCryptoPage, type UniversalBuyCryptoPageProps, UniversalCardActionPage, type UniversalCardActionPageProps, UniversalCardPage, type UniversalCardPageProps, type UniversalDepartment, UniversalDepartmentsPage, type UniversalDepartmentsPageProps, UniversalErrorView, type UniversalErrorViewProps, UniversalHome2, type UniversalHome2Props, UniversalHomeView, type UniversalHomeViewProps, type UniversalMember, UniversalMembersPage, type UniversalMembersPageProps, UniversalOrganizationPage, type UniversalOrganizationPageProps, UniversalProfilePage, type UniversalProfilePageProps, UniversalProfileSettings, type UniversalProfileSettingsProps, type UniversalReferralItem, UniversalReferralPage, type UniversalReferralPageProps, UniversalRewardPage, type UniversalRewardPageProps, UniversalSecurityPage, type UniversalSecurityPageProps, UniversalSidebar, type UniversalSidebarProps, type UniversalTransaction, UniversalTransactionPage, type UniversalTransactionPageProps, UniversalVerificationPage, type UniversalVerificationPageProps, type UniversalWallet, UniversalWalletPage, type UniversalWalletPageProps, type VerificationStatus, WaitlistDialog, type WaitlistDialogProps };
|
|
1062
|
+
export { AppBento2, type AppBento2Props, type BannerProps, type BarIconProps, type BentoFeature, type BoardMember, type CardData, CardInfoDialog, type CardInfoDialogProps, type CompanyDetails, type ConsultantProfile, ConsultantShowcase, type ConsultantShowcaseProps, ContentGridBlock, type ContentGridBlockProps, type CryptoOption, type DocumentSectionData, type EmailContact, Faq, type FaqItem, type FaqProps, FeatureScroll, type FeatureScrollProps, type FiatCurrencyOption, Footer, type FooterColumn, type FooterLink, type FooterProps, FundCardDialog, type FundCardDialogProps, GifFeatureCard, type GifFeatureCardProps, Header, type HeaderLink, type HeaderProps, type AppLogo$1 as HeroAppLogo, HeroSection, type HeroSectionProps, type HomeActionBtn, type HomeActionBtn2, type LeaderboardItem, ManagedBoardBlock, type ManagedBoardBlockProps, ManagedContactBlock, type ManagedContactBlockProps, ManagedDocument, type ManagedDocumentProps, ManagedNewsletterSplitBlock, type ManagedNewsletterSplitBlockProps, ManagedNotFoundBlock, type ManagedNotFoundBlockProps, ManagedPricingBlock, type ManagedPricingBlockProps, ManagedProjectsBlock, type ManagedProjectsBlockProps, ManagedToaster, MedicalFeatureStatsBlock, MobileNav, type MobileNavItem, type MobileNavProps, type NavItem, type NetworkOption, type NotificationItem, type NotificationItem2, NumberInput, type NumberInputProps, PageSpinner, type PageSpinnerProps, PinDialerBottomSheet, type PinDialerBottomSheetProps, PipleAuth, type PipleAuthProps, type PlatformFeatureItem, PlatformFeatures, type PlatformFeaturesProps, PortfolioHero, type PortfolioHeroProps, type AppLogo as PricingAppLogo, type PricingFeature, type PricingFeature2, type PricingPlan, type PricingTab, type ProjectItem, type RateCalculationPayload, type ReferralProfile, type RewardItem, type RewardProfile, type ScrollFeature, type SocialContact, type SocialLink, type StatItem, TextInput, type TextInputProps, ThreeDActionButton, type ThreeDActionButtonProps, ThreeDButton, type ThreeDButtonProps, type TierOption, UniversalBuyCryptoPage, type UniversalBuyCryptoPageProps, UniversalCardActionPage, type UniversalCardActionPageProps, UniversalCardPage, type UniversalCardPageProps, type UniversalDepartment, UniversalDepartmentsPage, type UniversalDepartmentsPageProps, UniversalErrorView, type UniversalErrorViewProps, UniversalHome2, type UniversalHome2Props, UniversalHomeView, type UniversalHomeViewProps, type UniversalMember, UniversalMembersPage, type UniversalMembersPageProps, UniversalOrganizationPage, type UniversalOrganizationPageProps, UniversalProfilePage, type UniversalProfilePageProps, UniversalProfileSettings, type UniversalProfileSettingsProps, type UniversalReferralItem, UniversalReferralPage, type UniversalReferralPageProps, UniversalRewardPage, type UniversalRewardPageProps, UniversalSecurityPage, type UniversalSecurityPageProps, UniversalSidebar, type UniversalSidebarProps, type UniversalTransaction, UniversalTransactionPage, type UniversalTransactionPageProps, UniversalVerificationPage, type UniversalVerificationPageProps, type UniversalWallet, UniversalWalletPage, type UniversalWalletPageProps, type VerificationStatus, WaitlistDialog, type WaitlistDialogProps };
|
package/dist/index.js
CHANGED
|
@@ -4812,10 +4812,12 @@ var UniversalMembersPage = ({
|
|
|
4812
4812
|
var import_react81 = __toESM(require("react"));
|
|
4813
4813
|
var import_navigation6 = require("next/navigation");
|
|
4814
4814
|
var import_react82 = require("@hugeicons/react");
|
|
4815
|
+
var import_react_hot_toast14 = __toESM(require("react-hot-toast"));
|
|
4815
4816
|
var import_core_free_icons29 = require("@hugeicons/core-free-icons");
|
|
4816
4817
|
var UniversalHome2 = ({
|
|
4817
|
-
fullName = "",
|
|
4818
4818
|
avatarSrc,
|
|
4819
|
+
userStatus = "ACTIVE",
|
|
4820
|
+
barIcons = [],
|
|
4819
4821
|
createHuddleAction,
|
|
4820
4822
|
joinHuddleAction,
|
|
4821
4823
|
notifications = [],
|
|
@@ -4824,6 +4826,7 @@ var UniversalHome2 = ({
|
|
|
4824
4826
|
isNotifsLoading = false,
|
|
4825
4827
|
onNotificationPageChange,
|
|
4826
4828
|
onNotificationClick,
|
|
4829
|
+
onResolveInvite,
|
|
4827
4830
|
formatNotifDate,
|
|
4828
4831
|
customContent,
|
|
4829
4832
|
departmentsProps
|
|
@@ -4831,11 +4834,39 @@ var UniversalHome2 = ({
|
|
|
4831
4834
|
const [isAvatarLoaded, setIsAvatarLoaded] = (0, import_react81.useState)(false);
|
|
4832
4835
|
const [showNotifDialog, setShowNotifDialog] = (0, import_react81.useState)(false);
|
|
4833
4836
|
const [selectedNotif, setSelectedNotif] = (0, import_react81.useState)(null);
|
|
4837
|
+
const [isResolving, setIsResolving] = (0, import_react81.useState)(false);
|
|
4834
4838
|
const router = (0, import_navigation6.useRouter)();
|
|
4835
4839
|
const fallbackAvatarUrl = "https://storage.googleapis.com/retina-cloud-v2/assets/images/avatar.avif";
|
|
4836
4840
|
const finalAvatarSrc = avatarSrc || fallbackAvatarUrl;
|
|
4837
4841
|
const hasUnreadNotifs = notifications.some((n) => !n.isRead);
|
|
4838
|
-
|
|
4842
|
+
const getDisplayStatus = () => {
|
|
4843
|
+
if (userStatus === "ACTIVE") return "Online";
|
|
4844
|
+
if (userStatus === "BUSY") return "Busy";
|
|
4845
|
+
if (userStatus === "OFFLINE") return "Offline";
|
|
4846
|
+
if (userStatus === "AWAY") return "Away";
|
|
4847
|
+
return "Online";
|
|
4848
|
+
};
|
|
4849
|
+
const getStatusColor = () => {
|
|
4850
|
+
if (userStatus === "ACTIVE") return "bg-emerald-500";
|
|
4851
|
+
if (userStatus === "BUSY") return "bg-amber-500";
|
|
4852
|
+
if (userStatus === "OFFLINE") return "bg-rose-500";
|
|
4853
|
+
if (userStatus === "AWAY") return "bg-neutral-400";
|
|
4854
|
+
return "bg-emerald-500";
|
|
4855
|
+
};
|
|
4856
|
+
const handleResolve = async (resolution) => {
|
|
4857
|
+
if (!onResolveInvite || !selectedNotif) return;
|
|
4858
|
+
setIsResolving(true);
|
|
4859
|
+
try {
|
|
4860
|
+
await onResolveInvite(selectedNotif, resolution);
|
|
4861
|
+
setShowNotifDialog(false);
|
|
4862
|
+
setSelectedNotif(null);
|
|
4863
|
+
} catch (error) {
|
|
4864
|
+
import_react_hot_toast14.default.error("Failed to process invitation");
|
|
4865
|
+
} finally {
|
|
4866
|
+
setIsResolving(false);
|
|
4867
|
+
}
|
|
4868
|
+
};
|
|
4869
|
+
return /* @__PURE__ */ import_react81.default.createElement("div", { className: "w-full max-w-3xl mx-auto flex flex-col animate-in fade-in duration-300 relative" }, /* @__PURE__ */ import_react81.default.createElement("div", { className: "flex items-center justify-between w-full pb-4" }, /* @__PURE__ */ import_react81.default.createElement("div", { className: "w-10 h-10 shrink-0 cursor-pointer", onClick: () => router.push("/app/profile") }, /* @__PURE__ */ import_react81.default.createElement("div", { className: "relative w-full h-full rounded-lg overflow-hidden bg-white flex items-center justify-center" }, !isAvatarLoaded && /* @__PURE__ */ import_react81.default.createElement("div", { className: "absolute inset-0 flex items-center justify-center z-10 bg-white" }, /* @__PURE__ */ import_react81.default.createElement(import_react82.HugeiconsIcon, { icon: import_core_free_icons29.Loading03Icon, size: 16, className: "animate-spin text-black" })), /* @__PURE__ */ import_react81.default.createElement(
|
|
4839
4870
|
"img",
|
|
4840
4871
|
{
|
|
4841
4872
|
src: finalAvatarSrc,
|
|
@@ -4843,7 +4874,14 @@ var UniversalHome2 = ({
|
|
|
4843
4874
|
onLoad: () => setIsAvatarLoaded(true),
|
|
4844
4875
|
className: `w-full h-full object-cover transition-opacity duration-300 ${isAvatarLoaded ? "opacity-100" : "opacity-0"}`
|
|
4845
4876
|
}
|
|
4846
|
-
))), /* @__PURE__ */ import_react81.default.createElement(
|
|
4877
|
+
))), /* @__PURE__ */ import_react81.default.createElement("div", { className: "flex-1 h-10 bg-black rounded-full mx-3 flex items-center justify-between px-4" }, /* @__PURE__ */ import_react81.default.createElement("div", { className: "flex items-center gap-3" }, barIcons.map((item, idx) => /* @__PURE__ */ import_react81.default.createElement("button", { key: idx, onClick: item.onClick, className: "outline-none hover:opacity-70 transition-opacity flex items-center justify-center" }, /* @__PURE__ */ import_react81.default.createElement(import_react82.HugeiconsIcon, { icon: item.icon, size: 16, color: item.color || "white" })))), /* @__PURE__ */ import_react81.default.createElement("div", { className: "flex items-center gap-2" }, /* @__PURE__ */ import_react81.default.createElement("span", { className: "text-white text-[11px] tracking-widest" }, getDisplayStatus()), /* @__PURE__ */ import_react81.default.createElement("div", { className: `w-2 h-2 rounded-full ${getStatusColor()}` }))), /* @__PURE__ */ import_react81.default.createElement("div", { className: "flex items-center gap-2 shrink-0" }, /* @__PURE__ */ import_react81.default.createElement(
|
|
4878
|
+
"button",
|
|
4879
|
+
{
|
|
4880
|
+
onClick: () => router.push("/app/settings"),
|
|
4881
|
+
className: "relative w-10 h-10 flex items-center justify-center rounded-full bg-white outline-none hover:bg-neutral-50 transition-colors"
|
|
4882
|
+
},
|
|
4883
|
+
/* @__PURE__ */ import_react81.default.createElement(import_react82.HugeiconsIcon, { icon: import_core_free_icons29.Settings01Icon, size: 20, className: "text-black" })
|
|
4884
|
+
), /* @__PURE__ */ import_react81.default.createElement(
|
|
4847
4885
|
"button",
|
|
4848
4886
|
{
|
|
4849
4887
|
onClick: () => {
|
|
@@ -4854,7 +4892,7 @@ var UniversalHome2 = ({
|
|
|
4854
4892
|
},
|
|
4855
4893
|
/* @__PURE__ */ import_react81.default.createElement(import_react82.HugeiconsIcon, { icon: import_core_free_icons29.Notification01Icon, size: 20, className: "text-black" }),
|
|
4856
4894
|
hasUnreadNotifs && /* @__PURE__ */ import_react81.default.createElement("span", { className: "absolute top-2.5 right-2.5 w-2 h-2 bg-red-500 rounded-full border border-white" })
|
|
4857
|
-
)), /* @__PURE__ */ import_react81.default.createElement("div", { className: "w-full pb-6 flex flex-col gap-4" }, /* @__PURE__ */ import_react81.default.createElement("div", { className: "grid grid-cols-2 gap-2" }, /* @__PURE__ */ import_react81.default.createElement(
|
|
4895
|
+
))), /* @__PURE__ */ import_react81.default.createElement("div", { className: "w-full pb-6 flex flex-col gap-4" }, /* @__PURE__ */ import_react81.default.createElement("div", { className: "grid grid-cols-2 gap-2" }, /* @__PURE__ */ import_react81.default.createElement(
|
|
4858
4896
|
"div",
|
|
4859
4897
|
{
|
|
4860
4898
|
onClick: createHuddleAction?.onClick,
|
|
@@ -4866,7 +4904,7 @@ var UniversalHome2 = ({
|
|
|
4866
4904
|
{
|
|
4867
4905
|
src: "https://storage.googleapis.com/retina-cloud-v2/assets/images/cal_a.avif",
|
|
4868
4906
|
alt: "Create Huddle",
|
|
4869
|
-
className: "absolute bottom-4 right-2 translate-x-1/4 translate-y-1/2 w-32 h-auto object-contain z-0 pointer-events-none
|
|
4907
|
+
className: "absolute bottom-4 right-2 translate-x-1/4 translate-y-1/2 w-32 h-auto object-contain z-0 pointer-events-none"
|
|
4870
4908
|
}
|
|
4871
4909
|
)
|
|
4872
4910
|
), /* @__PURE__ */ import_react81.default.createElement(
|
|
@@ -4881,7 +4919,7 @@ var UniversalHome2 = ({
|
|
|
4881
4919
|
{
|
|
4882
4920
|
src: "https://storage.googleapis.com/retina-cloud-v2/assets/images/cam_a.avif",
|
|
4883
4921
|
alt: "Join Huddle",
|
|
4884
|
-
className: "absolute bottom-4 right-2 translate-x-1/4 translate-y-1/2 w-32 h-auto object-contain z-0 pointer-events-none
|
|
4922
|
+
className: "absolute bottom-4 right-2 translate-x-1/4 translate-y-1/2 w-32 h-auto object-contain z-0 pointer-events-none"
|
|
4885
4923
|
}
|
|
4886
4924
|
)
|
|
4887
4925
|
))), customContent && /* @__PURE__ */ import_react81.default.createElement("div", { className: "w-full" }, customContent), /* @__PURE__ */ import_react81.default.createElement("div", { className: "w-full mt-2" }, /* @__PURE__ */ import_react81.default.createElement(
|
|
@@ -4889,7 +4927,23 @@ var UniversalHome2 = ({
|
|
|
4889
4927
|
{
|
|
4890
4928
|
...departmentsProps
|
|
4891
4929
|
}
|
|
4892
|
-
)), showNotifDialog && /* @__PURE__ */ import_react81.default.createElement("div", { className: "fixed inset-0 z-120 flex items-center justify-center p-4 pointer-events-auto" }, /* @__PURE__ */ import_react81.default.createElement("div", { className: "absolute inset-0 bg-black/30", onClick: () => setShowNotifDialog(false) }), /* @__PURE__ */ import_react81.default.createElement("div", { className: "relative w-full max-w-sm bg-white rounded-2xl flex flex-col overflow-hidden shadow-2xl animate-in zoom-in-95 duration-200 h-[80vh]" }, /* @__PURE__ */ import_react81.default.createElement("div", { className: "flex items-center justify-between p-5 shrink-0" }, selectedNotif ? /* @__PURE__ */ import_react81.default.createElement("button", { onClick: () => setSelectedNotif(null), className: "text-neutral-400 hover:text-black transition-colors outline-none flex items-center gap-2 text-[11px] tracking-widest" }, /* @__PURE__ */ import_react81.default.createElement(import_react82.HugeiconsIcon, { icon: import_core_free_icons29.ArrowLeft01Icon, size: 14 }), " Back") : /* @__PURE__ */ import_react81.default.createElement("h3", { className: "text-[15px] text-black tracking-tight flex items-center gap-2" }, "Notifications", isNotifsLoading && /* @__PURE__ */ import_react81.default.createElement(import_react82.HugeiconsIcon, { icon: import_core_free_icons29.Loading03Icon, size: 14, className: "animate-spin text-neutral-400" })), /* @__PURE__ */ import_react81.default.createElement("button", { onClick: () => setShowNotifDialog(false), className: "text-neutral-400 hover:text-black transition-colors outline-none" }, /* @__PURE__ */ import_react81.default.createElement(import_react82.HugeiconsIcon, { icon: import_core_free_icons29.CancelCircleIcon, size: 18 }))), /* @__PURE__ */ import_react81.default.createElement("div", { className: "flex-1 overflow-y-auto custom-scrollbar p-2" }, selectedNotif ? /* @__PURE__ */ import_react81.default.createElement("div", { className: "p-4 text-left" }, /* @__PURE__ */ import_react81.default.createElement("h4", { className: "text-[14px] text-black mb-1" }, selectedNotif.title), /* @__PURE__ */ import_react81.default.createElement("span", { className: "text-[10px] text-neutral-400 tracking-widest mb-4 block" }, formatNotifDate(selectedNotif.createdAt)), /* @__PURE__ */ import_react81.default.createElement("p", { className: "text-[12px] text-neutral-600 leading-relaxed whitespace-pre-wrap" }, selectedNotif.message)
|
|
4930
|
+
)), showNotifDialog && /* @__PURE__ */ import_react81.default.createElement("div", { className: "fixed inset-0 z-120 flex items-center justify-center p-4 pointer-events-auto" }, /* @__PURE__ */ import_react81.default.createElement("div", { className: "absolute inset-0 bg-black/30", onClick: () => setShowNotifDialog(false) }), /* @__PURE__ */ import_react81.default.createElement("div", { className: "relative w-full max-w-sm bg-white rounded-2xl flex flex-col overflow-hidden shadow-2xl animate-in zoom-in-95 duration-200 h-[80vh]" }, /* @__PURE__ */ import_react81.default.createElement("div", { className: "flex items-center justify-between p-5 shrink-0" }, selectedNotif ? /* @__PURE__ */ import_react81.default.createElement("button", { onClick: () => setSelectedNotif(null), disabled: isResolving, className: "text-neutral-400 hover:text-black transition-colors outline-none flex items-center gap-2 text-[11px] tracking-widest disabled:opacity-50" }, /* @__PURE__ */ import_react81.default.createElement(import_react82.HugeiconsIcon, { icon: import_core_free_icons29.ArrowLeft01Icon, size: 14 }), " Back") : /* @__PURE__ */ import_react81.default.createElement("h3", { className: "text-[15px] text-black tracking-tight flex items-center gap-2" }, "Notifications", isNotifsLoading && /* @__PURE__ */ import_react81.default.createElement(import_react82.HugeiconsIcon, { icon: import_core_free_icons29.Loading03Icon, size: 14, className: "animate-spin text-neutral-400" })), /* @__PURE__ */ import_react81.default.createElement("button", { onClick: () => setShowNotifDialog(false), disabled: isResolving, className: "text-neutral-400 hover:text-black transition-colors outline-none disabled:opacity-50" }, /* @__PURE__ */ import_react81.default.createElement(import_react82.HugeiconsIcon, { icon: import_core_free_icons29.CancelCircleIcon, size: 18 }))), /* @__PURE__ */ import_react81.default.createElement("div", { className: "flex-1 overflow-y-auto custom-scrollbar p-2" }, selectedNotif ? /* @__PURE__ */ import_react81.default.createElement("div", { className: "p-4 text-left" }, /* @__PURE__ */ import_react81.default.createElement("h4", { className: "text-[14px] text-black mb-1" }, selectedNotif.title), /* @__PURE__ */ import_react81.default.createElement("span", { className: "text-[10px] text-neutral-400 tracking-widest mb-4 block" }, formatNotifDate(selectedNotif.createdAt)), /* @__PURE__ */ import_react81.default.createElement("p", { className: "text-[12px] text-neutral-600 leading-relaxed whitespace-pre-wrap" }, selectedNotif.message), selectedNotif.type === "HUDDLE_INVITE" && selectedNotif.meta_json?.action === "RESOLVE_INVITE" && /* @__PURE__ */ import_react81.default.createElement("div", { className: "mt-8 flex gap-3 pt-6 border-t border-neutral-100" }, /* @__PURE__ */ import_react81.default.createElement(
|
|
4931
|
+
"button",
|
|
4932
|
+
{
|
|
4933
|
+
onClick: () => handleResolve("ACCEPTED"),
|
|
4934
|
+
disabled: isResolving,
|
|
4935
|
+
className: "flex-1 py-3 rounded-full bg-black text-white text-[12px] tracking-wide transition-all outline-none hover:bg-neutral-800 flex justify-center items-center disabled:opacity-50"
|
|
4936
|
+
},
|
|
4937
|
+
isResolving ? /* @__PURE__ */ import_react81.default.createElement(import_react82.HugeiconsIcon, { icon: import_core_free_icons29.Loading03Icon, className: "animate-spin", size: 16 }) : "Accept"
|
|
4938
|
+
), /* @__PURE__ */ import_react81.default.createElement(
|
|
4939
|
+
"button",
|
|
4940
|
+
{
|
|
4941
|
+
onClick: () => handleResolve("REJECTED"),
|
|
4942
|
+
disabled: isResolving,
|
|
4943
|
+
className: "flex-1 py-3 rounded-full bg-white border border-neutral-200 text-black text-[12px] tracking-wide transition-all outline-none hover:bg-neutral-50 flex justify-center items-center disabled:opacity-50"
|
|
4944
|
+
},
|
|
4945
|
+
"Reject"
|
|
4946
|
+
))) : /* @__PURE__ */ import_react81.default.createElement("div", { className: "flex flex-col divide-y divide-neutral-50/50" }, notifications?.length === 0 && !isNotifsLoading ? /* @__PURE__ */ import_react81.default.createElement("div", { className: "p-8 text-center text-xs text-neutral-400" }, "You have no notifications.") : notifications?.map((notif) => /* @__PURE__ */ import_react81.default.createElement(
|
|
4893
4947
|
"div",
|
|
4894
4948
|
{
|
|
4895
4949
|
key: notif.id,
|
package/dist/index.mjs
CHANGED
|
@@ -4832,17 +4832,20 @@ var UniversalMembersPage = ({
|
|
|
4832
4832
|
import React48, { useState as useState33 } from "react";
|
|
4833
4833
|
import { useRouter as useRouter3 } from "next/navigation";
|
|
4834
4834
|
import { HugeiconsIcon as HugeiconsIcon34 } from "@hugeicons/react";
|
|
4835
|
+
import toast13 from "react-hot-toast";
|
|
4835
4836
|
import {
|
|
4836
4837
|
Loading03Icon as Loading03Icon22,
|
|
4837
4838
|
Notification01Icon as Notification01Icon2,
|
|
4838
4839
|
ArrowLeft01Icon as ArrowLeft01Icon15,
|
|
4839
4840
|
ArrowRight01Icon as ArrowRight01Icon11,
|
|
4840
4841
|
CancelCircleIcon as CancelCircleIcon9,
|
|
4841
|
-
ArrowUpRight01Icon as ArrowUpRight01Icon3
|
|
4842
|
+
ArrowUpRight01Icon as ArrowUpRight01Icon3,
|
|
4843
|
+
Settings01Icon
|
|
4842
4844
|
} from "@hugeicons/core-free-icons";
|
|
4843
4845
|
var UniversalHome2 = ({
|
|
4844
|
-
fullName = "",
|
|
4845
4846
|
avatarSrc,
|
|
4847
|
+
userStatus = "ACTIVE",
|
|
4848
|
+
barIcons = [],
|
|
4846
4849
|
createHuddleAction,
|
|
4847
4850
|
joinHuddleAction,
|
|
4848
4851
|
notifications = [],
|
|
@@ -4851,6 +4854,7 @@ var UniversalHome2 = ({
|
|
|
4851
4854
|
isNotifsLoading = false,
|
|
4852
4855
|
onNotificationPageChange,
|
|
4853
4856
|
onNotificationClick,
|
|
4857
|
+
onResolveInvite,
|
|
4854
4858
|
formatNotifDate,
|
|
4855
4859
|
customContent,
|
|
4856
4860
|
departmentsProps
|
|
@@ -4858,11 +4862,39 @@ var UniversalHome2 = ({
|
|
|
4858
4862
|
const [isAvatarLoaded, setIsAvatarLoaded] = useState33(false);
|
|
4859
4863
|
const [showNotifDialog, setShowNotifDialog] = useState33(false);
|
|
4860
4864
|
const [selectedNotif, setSelectedNotif] = useState33(null);
|
|
4865
|
+
const [isResolving, setIsResolving] = useState33(false);
|
|
4861
4866
|
const router = useRouter3();
|
|
4862
4867
|
const fallbackAvatarUrl = "https://storage.googleapis.com/retina-cloud-v2/assets/images/avatar.avif";
|
|
4863
4868
|
const finalAvatarSrc = avatarSrc || fallbackAvatarUrl;
|
|
4864
4869
|
const hasUnreadNotifs = notifications.some((n) => !n.isRead);
|
|
4865
|
-
|
|
4870
|
+
const getDisplayStatus = () => {
|
|
4871
|
+
if (userStatus === "ACTIVE") return "Online";
|
|
4872
|
+
if (userStatus === "BUSY") return "Busy";
|
|
4873
|
+
if (userStatus === "OFFLINE") return "Offline";
|
|
4874
|
+
if (userStatus === "AWAY") return "Away";
|
|
4875
|
+
return "Online";
|
|
4876
|
+
};
|
|
4877
|
+
const getStatusColor = () => {
|
|
4878
|
+
if (userStatus === "ACTIVE") return "bg-emerald-500";
|
|
4879
|
+
if (userStatus === "BUSY") return "bg-amber-500";
|
|
4880
|
+
if (userStatus === "OFFLINE") return "bg-rose-500";
|
|
4881
|
+
if (userStatus === "AWAY") return "bg-neutral-400";
|
|
4882
|
+
return "bg-emerald-500";
|
|
4883
|
+
};
|
|
4884
|
+
const handleResolve = async (resolution) => {
|
|
4885
|
+
if (!onResolveInvite || !selectedNotif) return;
|
|
4886
|
+
setIsResolving(true);
|
|
4887
|
+
try {
|
|
4888
|
+
await onResolveInvite(selectedNotif, resolution);
|
|
4889
|
+
setShowNotifDialog(false);
|
|
4890
|
+
setSelectedNotif(null);
|
|
4891
|
+
} catch (error) {
|
|
4892
|
+
toast13.error("Failed to process invitation");
|
|
4893
|
+
} finally {
|
|
4894
|
+
setIsResolving(false);
|
|
4895
|
+
}
|
|
4896
|
+
};
|
|
4897
|
+
return /* @__PURE__ */ React48.createElement("div", { className: "w-full max-w-3xl mx-auto flex flex-col animate-in fade-in duration-300 relative" }, /* @__PURE__ */ React48.createElement("div", { className: "flex items-center justify-between w-full pb-4" }, /* @__PURE__ */ React48.createElement("div", { className: "w-10 h-10 shrink-0 cursor-pointer", onClick: () => router.push("/app/profile") }, /* @__PURE__ */ React48.createElement("div", { className: "relative w-full h-full rounded-lg overflow-hidden bg-white flex items-center justify-center" }, !isAvatarLoaded && /* @__PURE__ */ React48.createElement("div", { className: "absolute inset-0 flex items-center justify-center z-10 bg-white" }, /* @__PURE__ */ React48.createElement(HugeiconsIcon34, { icon: Loading03Icon22, size: 16, className: "animate-spin text-black" })), /* @__PURE__ */ React48.createElement(
|
|
4866
4898
|
"img",
|
|
4867
4899
|
{
|
|
4868
4900
|
src: finalAvatarSrc,
|
|
@@ -4870,7 +4902,14 @@ var UniversalHome2 = ({
|
|
|
4870
4902
|
onLoad: () => setIsAvatarLoaded(true),
|
|
4871
4903
|
className: `w-full h-full object-cover transition-opacity duration-300 ${isAvatarLoaded ? "opacity-100" : "opacity-0"}`
|
|
4872
4904
|
}
|
|
4873
|
-
))), /* @__PURE__ */ React48.createElement(
|
|
4905
|
+
))), /* @__PURE__ */ React48.createElement("div", { className: "flex-1 h-10 bg-black rounded-full mx-3 flex items-center justify-between px-4" }, /* @__PURE__ */ React48.createElement("div", { className: "flex items-center gap-3" }, barIcons.map((item, idx) => /* @__PURE__ */ React48.createElement("button", { key: idx, onClick: item.onClick, className: "outline-none hover:opacity-70 transition-opacity flex items-center justify-center" }, /* @__PURE__ */ React48.createElement(HugeiconsIcon34, { icon: item.icon, size: 16, color: item.color || "white" })))), /* @__PURE__ */ React48.createElement("div", { className: "flex items-center gap-2" }, /* @__PURE__ */ React48.createElement("span", { className: "text-white text-[11px] tracking-widest" }, getDisplayStatus()), /* @__PURE__ */ React48.createElement("div", { className: `w-2 h-2 rounded-full ${getStatusColor()}` }))), /* @__PURE__ */ React48.createElement("div", { className: "flex items-center gap-2 shrink-0" }, /* @__PURE__ */ React48.createElement(
|
|
4906
|
+
"button",
|
|
4907
|
+
{
|
|
4908
|
+
onClick: () => router.push("/app/settings"),
|
|
4909
|
+
className: "relative w-10 h-10 flex items-center justify-center rounded-full bg-white outline-none hover:bg-neutral-50 transition-colors"
|
|
4910
|
+
},
|
|
4911
|
+
/* @__PURE__ */ React48.createElement(HugeiconsIcon34, { icon: Settings01Icon, size: 20, className: "text-black" })
|
|
4912
|
+
), /* @__PURE__ */ React48.createElement(
|
|
4874
4913
|
"button",
|
|
4875
4914
|
{
|
|
4876
4915
|
onClick: () => {
|
|
@@ -4881,7 +4920,7 @@ var UniversalHome2 = ({
|
|
|
4881
4920
|
},
|
|
4882
4921
|
/* @__PURE__ */ React48.createElement(HugeiconsIcon34, { icon: Notification01Icon2, size: 20, className: "text-black" }),
|
|
4883
4922
|
hasUnreadNotifs && /* @__PURE__ */ React48.createElement("span", { className: "absolute top-2.5 right-2.5 w-2 h-2 bg-red-500 rounded-full border border-white" })
|
|
4884
|
-
)), /* @__PURE__ */ React48.createElement("div", { className: "w-full pb-6 flex flex-col gap-4" }, /* @__PURE__ */ React48.createElement("div", { className: "grid grid-cols-2 gap-2" }, /* @__PURE__ */ React48.createElement(
|
|
4923
|
+
))), /* @__PURE__ */ React48.createElement("div", { className: "w-full pb-6 flex flex-col gap-4" }, /* @__PURE__ */ React48.createElement("div", { className: "grid grid-cols-2 gap-2" }, /* @__PURE__ */ React48.createElement(
|
|
4885
4924
|
"div",
|
|
4886
4925
|
{
|
|
4887
4926
|
onClick: createHuddleAction?.onClick,
|
|
@@ -4893,7 +4932,7 @@ var UniversalHome2 = ({
|
|
|
4893
4932
|
{
|
|
4894
4933
|
src: "https://storage.googleapis.com/retina-cloud-v2/assets/images/cal_a.avif",
|
|
4895
4934
|
alt: "Create Huddle",
|
|
4896
|
-
className: "absolute bottom-4 right-2 translate-x-1/4 translate-y-1/2 w-32 h-auto object-contain z-0 pointer-events-none
|
|
4935
|
+
className: "absolute bottom-4 right-2 translate-x-1/4 translate-y-1/2 w-32 h-auto object-contain z-0 pointer-events-none"
|
|
4897
4936
|
}
|
|
4898
4937
|
)
|
|
4899
4938
|
), /* @__PURE__ */ React48.createElement(
|
|
@@ -4908,7 +4947,7 @@ var UniversalHome2 = ({
|
|
|
4908
4947
|
{
|
|
4909
4948
|
src: "https://storage.googleapis.com/retina-cloud-v2/assets/images/cam_a.avif",
|
|
4910
4949
|
alt: "Join Huddle",
|
|
4911
|
-
className: "absolute bottom-4 right-2 translate-x-1/4 translate-y-1/2 w-32 h-auto object-contain z-0 pointer-events-none
|
|
4950
|
+
className: "absolute bottom-4 right-2 translate-x-1/4 translate-y-1/2 w-32 h-auto object-contain z-0 pointer-events-none"
|
|
4912
4951
|
}
|
|
4913
4952
|
)
|
|
4914
4953
|
))), customContent && /* @__PURE__ */ React48.createElement("div", { className: "w-full" }, customContent), /* @__PURE__ */ React48.createElement("div", { className: "w-full mt-2" }, /* @__PURE__ */ React48.createElement(
|
|
@@ -4916,7 +4955,23 @@ var UniversalHome2 = ({
|
|
|
4916
4955
|
{
|
|
4917
4956
|
...departmentsProps
|
|
4918
4957
|
}
|
|
4919
|
-
)), showNotifDialog && /* @__PURE__ */ React48.createElement("div", { className: "fixed inset-0 z-120 flex items-center justify-center p-4 pointer-events-auto" }, /* @__PURE__ */ React48.createElement("div", { className: "absolute inset-0 bg-black/30", onClick: () => setShowNotifDialog(false) }), /* @__PURE__ */ React48.createElement("div", { className: "relative w-full max-w-sm bg-white rounded-2xl flex flex-col overflow-hidden shadow-2xl animate-in zoom-in-95 duration-200 h-[80vh]" }, /* @__PURE__ */ React48.createElement("div", { className: "flex items-center justify-between p-5 shrink-0" }, selectedNotif ? /* @__PURE__ */ React48.createElement("button", { onClick: () => setSelectedNotif(null), className: "text-neutral-400 hover:text-black transition-colors outline-none flex items-center gap-2 text-[11px] tracking-widest" }, /* @__PURE__ */ React48.createElement(HugeiconsIcon34, { icon: ArrowLeft01Icon15, size: 14 }), " Back") : /* @__PURE__ */ React48.createElement("h3", { className: "text-[15px] text-black tracking-tight flex items-center gap-2" }, "Notifications", isNotifsLoading && /* @__PURE__ */ React48.createElement(HugeiconsIcon34, { icon: Loading03Icon22, size: 14, className: "animate-spin text-neutral-400" })), /* @__PURE__ */ React48.createElement("button", { onClick: () => setShowNotifDialog(false), className: "text-neutral-400 hover:text-black transition-colors outline-none" }, /* @__PURE__ */ React48.createElement(HugeiconsIcon34, { icon: CancelCircleIcon9, size: 18 }))), /* @__PURE__ */ React48.createElement("div", { className: "flex-1 overflow-y-auto custom-scrollbar p-2" }, selectedNotif ? /* @__PURE__ */ React48.createElement("div", { className: "p-4 text-left" }, /* @__PURE__ */ React48.createElement("h4", { className: "text-[14px] text-black mb-1" }, selectedNotif.title), /* @__PURE__ */ React48.createElement("span", { className: "text-[10px] text-neutral-400 tracking-widest mb-4 block" }, formatNotifDate(selectedNotif.createdAt)), /* @__PURE__ */ React48.createElement("p", { className: "text-[12px] text-neutral-600 leading-relaxed whitespace-pre-wrap" }, selectedNotif.message)
|
|
4958
|
+
)), showNotifDialog && /* @__PURE__ */ React48.createElement("div", { className: "fixed inset-0 z-120 flex items-center justify-center p-4 pointer-events-auto" }, /* @__PURE__ */ React48.createElement("div", { className: "absolute inset-0 bg-black/30", onClick: () => setShowNotifDialog(false) }), /* @__PURE__ */ React48.createElement("div", { className: "relative w-full max-w-sm bg-white rounded-2xl flex flex-col overflow-hidden shadow-2xl animate-in zoom-in-95 duration-200 h-[80vh]" }, /* @__PURE__ */ React48.createElement("div", { className: "flex items-center justify-between p-5 shrink-0" }, selectedNotif ? /* @__PURE__ */ React48.createElement("button", { onClick: () => setSelectedNotif(null), disabled: isResolving, className: "text-neutral-400 hover:text-black transition-colors outline-none flex items-center gap-2 text-[11px] tracking-widest disabled:opacity-50" }, /* @__PURE__ */ React48.createElement(HugeiconsIcon34, { icon: ArrowLeft01Icon15, size: 14 }), " Back") : /* @__PURE__ */ React48.createElement("h3", { className: "text-[15px] text-black tracking-tight flex items-center gap-2" }, "Notifications", isNotifsLoading && /* @__PURE__ */ React48.createElement(HugeiconsIcon34, { icon: Loading03Icon22, size: 14, className: "animate-spin text-neutral-400" })), /* @__PURE__ */ React48.createElement("button", { onClick: () => setShowNotifDialog(false), disabled: isResolving, className: "text-neutral-400 hover:text-black transition-colors outline-none disabled:opacity-50" }, /* @__PURE__ */ React48.createElement(HugeiconsIcon34, { icon: CancelCircleIcon9, size: 18 }))), /* @__PURE__ */ React48.createElement("div", { className: "flex-1 overflow-y-auto custom-scrollbar p-2" }, selectedNotif ? /* @__PURE__ */ React48.createElement("div", { className: "p-4 text-left" }, /* @__PURE__ */ React48.createElement("h4", { className: "text-[14px] text-black mb-1" }, selectedNotif.title), /* @__PURE__ */ React48.createElement("span", { className: "text-[10px] text-neutral-400 tracking-widest mb-4 block" }, formatNotifDate(selectedNotif.createdAt)), /* @__PURE__ */ React48.createElement("p", { className: "text-[12px] text-neutral-600 leading-relaxed whitespace-pre-wrap" }, selectedNotif.message), selectedNotif.type === "HUDDLE_INVITE" && selectedNotif.meta_json?.action === "RESOLVE_INVITE" && /* @__PURE__ */ React48.createElement("div", { className: "mt-8 flex gap-3 pt-6 border-t border-neutral-100" }, /* @__PURE__ */ React48.createElement(
|
|
4959
|
+
"button",
|
|
4960
|
+
{
|
|
4961
|
+
onClick: () => handleResolve("ACCEPTED"),
|
|
4962
|
+
disabled: isResolving,
|
|
4963
|
+
className: "flex-1 py-3 rounded-full bg-black text-white text-[12px] tracking-wide transition-all outline-none hover:bg-neutral-800 flex justify-center items-center disabled:opacity-50"
|
|
4964
|
+
},
|
|
4965
|
+
isResolving ? /* @__PURE__ */ React48.createElement(HugeiconsIcon34, { icon: Loading03Icon22, className: "animate-spin", size: 16 }) : "Accept"
|
|
4966
|
+
), /* @__PURE__ */ React48.createElement(
|
|
4967
|
+
"button",
|
|
4968
|
+
{
|
|
4969
|
+
onClick: () => handleResolve("REJECTED"),
|
|
4970
|
+
disabled: isResolving,
|
|
4971
|
+
className: "flex-1 py-3 rounded-full bg-white border border-neutral-200 text-black text-[12px] tracking-wide transition-all outline-none hover:bg-neutral-50 flex justify-center items-center disabled:opacity-50"
|
|
4972
|
+
},
|
|
4973
|
+
"Reject"
|
|
4974
|
+
))) : /* @__PURE__ */ React48.createElement("div", { className: "flex flex-col divide-y divide-neutral-50/50" }, notifications?.length === 0 && !isNotifsLoading ? /* @__PURE__ */ React48.createElement("div", { className: "p-8 text-center text-xs text-neutral-400" }, "You have no notifications.") : notifications?.map((notif) => /* @__PURE__ */ React48.createElement(
|
|
4920
4975
|
"div",
|
|
4921
4976
|
{
|
|
4922
4977
|
key: notif.id,
|