@retinalabsllc/zairusjs 16.0.95 → 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 +12 -1
- package/dist/index.d.ts +12 -1
- package/dist/index.js +124 -12
- package/dist/index.mjs +126 -13
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -1016,6 +1016,7 @@ interface UniversalMembersPageProps {
|
|
|
1016
1016
|
actionButtonText: string;
|
|
1017
1017
|
hideAction?: boolean;
|
|
1018
1018
|
onRemoveMember: (memberId: string) => Promise<void>;
|
|
1019
|
+
onInviteMember: (email: string) => Promise<void>;
|
|
1019
1020
|
}
|
|
1020
1021
|
declare const UniversalMembersPage: React.FC<UniversalMembersPageProps>;
|
|
1021
1022
|
|
|
@@ -1029,11 +1030,20 @@ interface NotificationItem2 {
|
|
|
1029
1030
|
title: string;
|
|
1030
1031
|
message: string;
|
|
1031
1032
|
isRead: boolean;
|
|
1033
|
+
type?: string;
|
|
1034
|
+
meta_json?: any;
|
|
1032
1035
|
createdAt: string | Date;
|
|
1033
1036
|
}
|
|
1037
|
+
interface BarIconProps {
|
|
1038
|
+
icon: any;
|
|
1039
|
+
color?: string;
|
|
1040
|
+
onClick?: () => void;
|
|
1041
|
+
}
|
|
1034
1042
|
interface UniversalHome2Props {
|
|
1035
1043
|
fullName?: string;
|
|
1036
1044
|
avatarSrc?: string | null;
|
|
1045
|
+
userStatus?: 'ACTIVE' | 'BUSY' | 'AWAY' | 'OFFLINE' | string;
|
|
1046
|
+
barIcons?: BarIconProps[];
|
|
1037
1047
|
createHuddleAction?: HomeActionBtn2;
|
|
1038
1048
|
joinHuddleAction?: HomeActionBtn2;
|
|
1039
1049
|
notifications?: NotificationItem2[];
|
|
@@ -1042,10 +1052,11 @@ interface UniversalHome2Props {
|
|
|
1042
1052
|
isNotifsLoading?: boolean;
|
|
1043
1053
|
onNotificationPageChange?: (page: number) => void;
|
|
1044
1054
|
onNotificationClick?: (notif: NotificationItem2) => void;
|
|
1055
|
+
onResolveInvite?: (notif: NotificationItem2, resolution: 'ACCEPTED' | 'REJECTED') => Promise<void>;
|
|
1045
1056
|
formatNotifDate: (date: string | Date) => string;
|
|
1046
1057
|
customContent?: React.ReactNode;
|
|
1047
1058
|
departmentsProps: UniversalDepartmentsPageProps;
|
|
1048
1059
|
}
|
|
1049
1060
|
declare const UniversalHome2: React.FC<UniversalHome2Props>;
|
|
1050
1061
|
|
|
1051
|
-
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
|
@@ -1016,6 +1016,7 @@ interface UniversalMembersPageProps {
|
|
|
1016
1016
|
actionButtonText: string;
|
|
1017
1017
|
hideAction?: boolean;
|
|
1018
1018
|
onRemoveMember: (memberId: string) => Promise<void>;
|
|
1019
|
+
onInviteMember: (email: string) => Promise<void>;
|
|
1019
1020
|
}
|
|
1020
1021
|
declare const UniversalMembersPage: React.FC<UniversalMembersPageProps>;
|
|
1021
1022
|
|
|
@@ -1029,11 +1030,20 @@ interface NotificationItem2 {
|
|
|
1029
1030
|
title: string;
|
|
1030
1031
|
message: string;
|
|
1031
1032
|
isRead: boolean;
|
|
1033
|
+
type?: string;
|
|
1034
|
+
meta_json?: any;
|
|
1032
1035
|
createdAt: string | Date;
|
|
1033
1036
|
}
|
|
1037
|
+
interface BarIconProps {
|
|
1038
|
+
icon: any;
|
|
1039
|
+
color?: string;
|
|
1040
|
+
onClick?: () => void;
|
|
1041
|
+
}
|
|
1034
1042
|
interface UniversalHome2Props {
|
|
1035
1043
|
fullName?: string;
|
|
1036
1044
|
avatarSrc?: string | null;
|
|
1045
|
+
userStatus?: 'ACTIVE' | 'BUSY' | 'AWAY' | 'OFFLINE' | string;
|
|
1046
|
+
barIcons?: BarIconProps[];
|
|
1037
1047
|
createHuddleAction?: HomeActionBtn2;
|
|
1038
1048
|
joinHuddleAction?: HomeActionBtn2;
|
|
1039
1049
|
notifications?: NotificationItem2[];
|
|
@@ -1042,10 +1052,11 @@ interface UniversalHome2Props {
|
|
|
1042
1052
|
isNotifsLoading?: boolean;
|
|
1043
1053
|
onNotificationPageChange?: (page: number) => void;
|
|
1044
1054
|
onNotificationClick?: (notif: NotificationItem2) => void;
|
|
1055
|
+
onResolveInvite?: (notif: NotificationItem2, resolution: 'ACCEPTED' | 'REJECTED') => Promise<void>;
|
|
1045
1056
|
formatNotifDate: (date: string | Date) => string;
|
|
1046
1057
|
customContent?: React.ReactNode;
|
|
1047
1058
|
departmentsProps: UniversalDepartmentsPageProps;
|
|
1048
1059
|
}
|
|
1049
1060
|
declare const UniversalHome2: React.FC<UniversalHome2Props>;
|
|
1050
1061
|
|
|
1051
|
-
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
|
@@ -4573,7 +4573,7 @@ var MemberAvatar = ({ src, status }) => {
|
|
|
4573
4573
|
return "bg-neutral-200";
|
|
4574
4574
|
}
|
|
4575
4575
|
};
|
|
4576
|
-
return /* @__PURE__ */ import_react79.default.createElement("div", { className: "relative w-10 h-10 shrink-0" }, /* @__PURE__ */ import_react79.default.createElement("div", { className: "w-full h-full rounded-lg bg-neutral-100 flex items-center justify-center overflow-hidden
|
|
4576
|
+
return /* @__PURE__ */ import_react79.default.createElement("div", { className: "relative w-10 h-10 shrink-0" }, /* @__PURE__ */ import_react79.default.createElement("div", { className: "w-full h-full rounded-lg bg-neutral-100 flex items-center justify-center overflow-hidden" }, !loaded && !error && /* @__PURE__ */ import_react79.default.createElement(import_react80.HugeiconsIcon, { icon: import_core_free_icons28.Loading03Icon, className: "animate-spin text-neutral-400 absolute", size: 14 }), /* @__PURE__ */ import_react79.default.createElement(
|
|
4577
4577
|
"img",
|
|
4578
4578
|
{
|
|
4579
4579
|
src: finalSrc,
|
|
@@ -4582,7 +4582,7 @@ var MemberAvatar = ({ src, status }) => {
|
|
|
4582
4582
|
onLoad: () => setLoaded(true),
|
|
4583
4583
|
onError: () => setError(true)
|
|
4584
4584
|
}
|
|
4585
|
-
)), /* @__PURE__ */ import_react79.default.createElement("div", { className: `absolute -bottom-1 -right-1 w-
|
|
4585
|
+
)), /* @__PURE__ */ import_react79.default.createElement("div", { className: `absolute -bottom-1 -right-1 w-2.5 h-2.5 rounded-full border-2 border-white z-10 ${getStatusColor()}` }));
|
|
4586
4586
|
};
|
|
4587
4587
|
var PageSpinner7 = () => /* @__PURE__ */ import_react79.default.createElement("div", { className: "flex justify-center items-center py-12" }, /* @__PURE__ */ import_react79.default.createElement(import_react80.HugeiconsIcon, { icon: import_core_free_icons28.Loading03Icon, size: 32, className: "animate-spin mb-4 text-black" }));
|
|
4588
4588
|
var UniversalMembersPage = ({
|
|
@@ -4601,17 +4601,22 @@ var UniversalMembersPage = ({
|
|
|
4601
4601
|
onRoleFilterChange,
|
|
4602
4602
|
actionButtonText,
|
|
4603
4603
|
hideAction = false,
|
|
4604
|
-
onRemoveMember
|
|
4604
|
+
onRemoveMember,
|
|
4605
|
+
onInviteMember
|
|
4605
4606
|
}) => {
|
|
4606
4607
|
const [expandedId, setExpandedId] = (0, import_react79.useState)(null);
|
|
4607
4608
|
const [memberToRemove, setMemberToRemove] = (0, import_react79.useState)(null);
|
|
4608
4609
|
const [isRemoving, setIsRemoving] = (0, import_react79.useState)(false);
|
|
4610
|
+
const [isInviteMode, setIsInviteMode] = (0, import_react79.useState)(false);
|
|
4611
|
+
const [inviteEmail, setInviteEmail] = (0, import_react79.useState)("");
|
|
4612
|
+
const [isInviting, setIsInviting] = (0, import_react79.useState)(false);
|
|
4609
4613
|
const [localSearchQuery, setLocalSearchQuery] = (0, import_react79.useState)(searchQuery);
|
|
4610
4614
|
const [isTyping, setIsTyping] = (0, import_react79.useState)(false);
|
|
4611
4615
|
const [isStatusModalOpen, setIsStatusModalOpen] = (0, import_react79.useState)(false);
|
|
4612
4616
|
const [isRoleModalOpen, setIsRoleModalOpen] = (0, import_react79.useState)(false);
|
|
4613
4617
|
const statusDropdownRef = (0, import_react79.useRef)(null);
|
|
4614
4618
|
const roleDropdownRef = (0, import_react79.useRef)(null);
|
|
4619
|
+
const cleanEmailId = (val) => val.toLowerCase().replace(/[^a-z0-9@._-]/g, "");
|
|
4615
4620
|
(0, import_react79.useEffect)(() => {
|
|
4616
4621
|
function handleClickOutside(event) {
|
|
4617
4622
|
if (statusDropdownRef.current && !statusDropdownRef.current.contains(event.target)) {
|
|
@@ -4651,6 +4656,20 @@ var UniversalMembersPage = ({
|
|
|
4651
4656
|
setIsRemoving(false);
|
|
4652
4657
|
}
|
|
4653
4658
|
};
|
|
4659
|
+
const handleInviteSubmit = async (e) => {
|
|
4660
|
+
e.preventDefault();
|
|
4661
|
+
if (inviteEmail.length < 5 || isInviting) return;
|
|
4662
|
+
setIsInviting(true);
|
|
4663
|
+
try {
|
|
4664
|
+
await onInviteMember(inviteEmail);
|
|
4665
|
+
setInviteEmail("");
|
|
4666
|
+
setIsInviteMode(false);
|
|
4667
|
+
} catch (error) {
|
|
4668
|
+
import_react_hot_toast13.default.error(error.message || "Failed to send invitation.");
|
|
4669
|
+
} finally {
|
|
4670
|
+
setIsInviting(false);
|
|
4671
|
+
}
|
|
4672
|
+
};
|
|
4654
4673
|
const isListLoading = isLoading || isTyping;
|
|
4655
4674
|
return /* @__PURE__ */ import_react79.default.createElement("div", { className: "w-full max-w-3xl mx-auto flex flex-col animate-in fade-in duration-300" }, /* @__PURE__ */ import_react79.default.createElement(ManagedToaster, null), /* @__PURE__ */ import_react79.default.createElement(
|
|
4656
4675
|
ConfirmationDialog,
|
|
@@ -4665,7 +4684,7 @@ var UniversalMembersPage = ({
|
|
|
4665
4684
|
onClose: () => setMemberToRemove(null),
|
|
4666
4685
|
onConfirm: handleConfirmRemove
|
|
4667
4686
|
}
|
|
4668
|
-
), /* @__PURE__ */ import_react79.default.createElement("div", { className: "flex flex-row flex-nowrap mb-4 items-center justify-between gap-4 w-full" }, /* @__PURE__ */ import_react79.default.createElement("div", { className: "relative flex-1 min-w-0 max-w-full" }, /* @__PURE__ */ import_react79.default.createElement("div", { className: "absolute inset-y-0 left-0 pl-4 flex items-center pointer-events-none" }, /* @__PURE__ */ import_react79.default.createElement(import_react80.HugeiconsIcon, { icon: import_core_free_icons28.Search01Icon, size: 16, className: "text-neutral-400" })), /* @__PURE__ */ import_react79.default.createElement(
|
|
4687
|
+
), !isInviteMode && /* @__PURE__ */ import_react79.default.createElement("div", { className: "flex flex-row flex-nowrap mb-4 items-center justify-between gap-4 w-full animate-in fade-in duration-300" }, /* @__PURE__ */ import_react79.default.createElement("div", { className: "relative flex-1 min-w-0 max-w-full" }, /* @__PURE__ */ import_react79.default.createElement("div", { className: "absolute inset-y-0 left-0 pl-4 flex items-center pointer-events-none" }, /* @__PURE__ */ import_react79.default.createElement(import_react80.HugeiconsIcon, { icon: import_core_free_icons28.Search01Icon, size: 16, className: "text-neutral-400" })), /* @__PURE__ */ import_react79.default.createElement(
|
|
4669
4688
|
"input",
|
|
4670
4689
|
{
|
|
4671
4690
|
type: "text",
|
|
@@ -4688,7 +4707,46 @@ var UniversalMembersPage = ({
|
|
|
4688
4707
|
className: "flex items-center justify-center bg-white w-9 h-9 rounded-full text-neutral-500 hover:text-black transition-colors outline-none"
|
|
4689
4708
|
},
|
|
4690
4709
|
/* @__PURE__ */ import_react79.default.createElement(import_react80.HugeiconsIcon, { icon: import_core_free_icons28.ListSettingIcon, size: 16 })
|
|
4691
|
-
))), /* @__PURE__ */ import_react79.default.createElement("div", { className: "flex flex-col gap-8 p-6 rounded-2xl bg-white w-full" }, /* @__PURE__ */ import_react79.default.createElement("div", { className: "flex flex-
|
|
4710
|
+
))), /* @__PURE__ */ import_react79.default.createElement("div", { className: "flex flex-col gap-8 p-6 rounded-2xl bg-white w-full" }, /* @__PURE__ */ import_react79.default.createElement("div", { className: "flex flex-row items-start justify-between gap-4" }, /* @__PURE__ */ import_react79.default.createElement("div", null, /* @__PURE__ */ import_react79.default.createElement("h1", { className: "text-black text-xl mb-1 tracking-tight" }, isInviteMode ? "Add Member" : headerTitle), headerDescription && !isInviteMode && /* @__PURE__ */ import_react79.default.createElement("p", { className: "text-[12px] text-neutral-500" }, headerDescription)), !isInviteMode && /* @__PURE__ */ import_react79.default.createElement(
|
|
4711
|
+
"button",
|
|
4712
|
+
{
|
|
4713
|
+
onClick: () => setIsInviteMode(true),
|
|
4714
|
+
className: "shrink-0 px-4 py-2 border border-neutral-200 text-black text-[12px] tracking-wide rounded-full hover:bg-neutral-50 transition-colors outline-none"
|
|
4715
|
+
},
|
|
4716
|
+
"Invite Team"
|
|
4717
|
+
)), /* @__PURE__ */ import_react79.default.createElement("div", { className: "w-full overflow-hidden" }, isInviteMode ? /* @__PURE__ */ import_react79.default.createElement("form", { onSubmit: handleInviteSubmit, className: "flex flex-col gap-8 animate-in fade-in duration-300" }, /* @__PURE__ */ import_react79.default.createElement("div", { className: "space-y-1.5 mt-2" }, /* @__PURE__ */ import_react79.default.createElement("label", { className: "text-[11px] text-neutral-400 tracking-[0.2em] block" }, "Email Address"), /* @__PURE__ */ import_react79.default.createElement(
|
|
4718
|
+
"input",
|
|
4719
|
+
{
|
|
4720
|
+
type: "email",
|
|
4721
|
+
value: inviteEmail,
|
|
4722
|
+
onChange: (e) => setInviteEmail(cleanEmailId(e.target.value)),
|
|
4723
|
+
required: true,
|
|
4724
|
+
autoFocus: true,
|
|
4725
|
+
className: "w-full px-2 py-3 bg-transparent text-sm border-b border-neutral-200 text-black outline-none focus:border-black transition-all duration-300",
|
|
4726
|
+
placeholder: "name@company.com"
|
|
4727
|
+
}
|
|
4728
|
+
)), /* @__PURE__ */ import_react79.default.createElement("div", { className: "flex flex-col gap-3" }, /* @__PURE__ */ import_react79.default.createElement(
|
|
4729
|
+
ThreeDActionButton,
|
|
4730
|
+
{
|
|
4731
|
+
type: "submit",
|
|
4732
|
+
disabled: inviteEmail.length < 5 || isInviting,
|
|
4733
|
+
isLoading: isInviting,
|
|
4734
|
+
className: "w-full"
|
|
4735
|
+
},
|
|
4736
|
+
"Send Invitation"
|
|
4737
|
+
), /* @__PURE__ */ import_react79.default.createElement(
|
|
4738
|
+
"button",
|
|
4739
|
+
{
|
|
4740
|
+
type: "button",
|
|
4741
|
+
onClick: () => {
|
|
4742
|
+
setIsInviteMode(false);
|
|
4743
|
+
setInviteEmail("");
|
|
4744
|
+
},
|
|
4745
|
+
disabled: isInviting,
|
|
4746
|
+
className: "w-full flex items-center justify-center py-2.5 rounded-full border border-neutral-200 text-black hover:bg-neutral-50 transition-colors outline-none text-xs tracking-wide"
|
|
4747
|
+
},
|
|
4748
|
+
"Cancel"
|
|
4749
|
+
))) : isListLoading ? /* @__PURE__ */ import_react79.default.createElement(PageSpinner7, null) : /* @__PURE__ */ import_react79.default.createElement("div", { className: "flex flex-col min-w-0 animate-in fade-in duration-300" }, /* @__PURE__ */ import_react79.default.createElement("div", null, members.length === 0 ? /* @__PURE__ */ import_react79.default.createElement("p", { className: "text-[12px] text-neutral-400 py-6 text-center" }, "No members found") : members.map((member) => /* @__PURE__ */ import_react79.default.createElement(import_react79.default.Fragment, { key: member.id }, expandedId === member.id ? /* @__PURE__ */ import_react79.default.createElement("div", { className: "flex flex-col p-5 bg-neutral-50 rounded-xl animate-in fade-in zoom-in-95 duration-200 gap-5 my-2" }, /* @__PURE__ */ import_react79.default.createElement("div", { className: "flex items-center gap-4" }, /* @__PURE__ */ import_react79.default.createElement(MemberAvatar, { src: member.avatarUrl, status: member.status }), /* @__PURE__ */ import_react79.default.createElement("div", { className: "flex flex-col min-w-0" }, /* @__PURE__ */ import_react79.default.createElement("span", { className: "text-[14px] text-black tracking-tight truncate" }, member.name), /* @__PURE__ */ import_react79.default.createElement("span", { className: "text-[12px] text-neutral-500 capitalize" }, member.role.toLowerCase()))), member.departmentName && /* @__PURE__ */ import_react79.default.createElement("div", { className: "pt-3 border-t border-neutral-200" }, /* @__PURE__ */ import_react79.default.createElement("span", { className: "text-[10px] tracking-[0.2em] text-neutral-400 block mb-1" }, "Department"), /* @__PURE__ */ import_react79.default.createElement("span", { className: "text-[13px] text-black truncate block" }, member.departmentName)), /* @__PURE__ */ import_react79.default.createElement("div", { className: "flex gap-3 pt-2" }, !hideAction && /* @__PURE__ */ import_react79.default.createElement(
|
|
4692
4750
|
"button",
|
|
4693
4751
|
{
|
|
4694
4752
|
onClick: () => setMemberToRemove(member),
|
|
@@ -4754,10 +4812,12 @@ var UniversalMembersPage = ({
|
|
|
4754
4812
|
var import_react81 = __toESM(require("react"));
|
|
4755
4813
|
var import_navigation6 = require("next/navigation");
|
|
4756
4814
|
var import_react82 = require("@hugeicons/react");
|
|
4815
|
+
var import_react_hot_toast14 = __toESM(require("react-hot-toast"));
|
|
4757
4816
|
var import_core_free_icons29 = require("@hugeicons/core-free-icons");
|
|
4758
4817
|
var UniversalHome2 = ({
|
|
4759
|
-
fullName = "",
|
|
4760
4818
|
avatarSrc,
|
|
4819
|
+
userStatus = "ACTIVE",
|
|
4820
|
+
barIcons = [],
|
|
4761
4821
|
createHuddleAction,
|
|
4762
4822
|
joinHuddleAction,
|
|
4763
4823
|
notifications = [],
|
|
@@ -4766,6 +4826,7 @@ var UniversalHome2 = ({
|
|
|
4766
4826
|
isNotifsLoading = false,
|
|
4767
4827
|
onNotificationPageChange,
|
|
4768
4828
|
onNotificationClick,
|
|
4829
|
+
onResolveInvite,
|
|
4769
4830
|
formatNotifDate,
|
|
4770
4831
|
customContent,
|
|
4771
4832
|
departmentsProps
|
|
@@ -4773,11 +4834,39 @@ var UniversalHome2 = ({
|
|
|
4773
4834
|
const [isAvatarLoaded, setIsAvatarLoaded] = (0, import_react81.useState)(false);
|
|
4774
4835
|
const [showNotifDialog, setShowNotifDialog] = (0, import_react81.useState)(false);
|
|
4775
4836
|
const [selectedNotif, setSelectedNotif] = (0, import_react81.useState)(null);
|
|
4837
|
+
const [isResolving, setIsResolving] = (0, import_react81.useState)(false);
|
|
4776
4838
|
const router = (0, import_navigation6.useRouter)();
|
|
4777
4839
|
const fallbackAvatarUrl = "https://storage.googleapis.com/retina-cloud-v2/assets/images/avatar.avif";
|
|
4778
4840
|
const finalAvatarSrc = avatarSrc || fallbackAvatarUrl;
|
|
4779
4841
|
const hasUnreadNotifs = notifications.some((n) => !n.isRead);
|
|
4780
|
-
|
|
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(
|
|
4781
4870
|
"img",
|
|
4782
4871
|
{
|
|
4783
4872
|
src: finalAvatarSrc,
|
|
@@ -4785,7 +4874,14 @@ var UniversalHome2 = ({
|
|
|
4785
4874
|
onLoad: () => setIsAvatarLoaded(true),
|
|
4786
4875
|
className: `w-full h-full object-cover transition-opacity duration-300 ${isAvatarLoaded ? "opacity-100" : "opacity-0"}`
|
|
4787
4876
|
}
|
|
4788
|
-
))), /* @__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(
|
|
4789
4885
|
"button",
|
|
4790
4886
|
{
|
|
4791
4887
|
onClick: () => {
|
|
@@ -4796,7 +4892,7 @@ var UniversalHome2 = ({
|
|
|
4796
4892
|
},
|
|
4797
4893
|
/* @__PURE__ */ import_react81.default.createElement(import_react82.HugeiconsIcon, { icon: import_core_free_icons29.Notification01Icon, size: 20, className: "text-black" }),
|
|
4798
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" })
|
|
4799
|
-
)), /* @__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(
|
|
4800
4896
|
"div",
|
|
4801
4897
|
{
|
|
4802
4898
|
onClick: createHuddleAction?.onClick,
|
|
@@ -4808,7 +4904,7 @@ var UniversalHome2 = ({
|
|
|
4808
4904
|
{
|
|
4809
4905
|
src: "https://storage.googleapis.com/retina-cloud-v2/assets/images/cal_a.avif",
|
|
4810
4906
|
alt: "Create Huddle",
|
|
4811
|
-
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"
|
|
4812
4908
|
}
|
|
4813
4909
|
)
|
|
4814
4910
|
), /* @__PURE__ */ import_react81.default.createElement(
|
|
@@ -4823,7 +4919,7 @@ var UniversalHome2 = ({
|
|
|
4823
4919
|
{
|
|
4824
4920
|
src: "https://storage.googleapis.com/retina-cloud-v2/assets/images/cam_a.avif",
|
|
4825
4921
|
alt: "Join Huddle",
|
|
4826
|
-
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"
|
|
4827
4923
|
}
|
|
4828
4924
|
)
|
|
4829
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(
|
|
@@ -4831,7 +4927,23 @@ var UniversalHome2 = ({
|
|
|
4831
4927
|
{
|
|
4832
4928
|
...departmentsProps
|
|
4833
4929
|
}
|
|
4834
|
-
)), 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(
|
|
4835
4947
|
"div",
|
|
4836
4948
|
{
|
|
4837
4949
|
key: notif.id,
|
package/dist/index.mjs
CHANGED
|
@@ -4593,7 +4593,7 @@ var MemberAvatar = ({ src, status }) => {
|
|
|
4593
4593
|
return "bg-neutral-200";
|
|
4594
4594
|
}
|
|
4595
4595
|
};
|
|
4596
|
-
return /* @__PURE__ */ React47.createElement("div", { className: "relative w-10 h-10 shrink-0" }, /* @__PURE__ */ React47.createElement("div", { className: "w-full h-full rounded-lg bg-neutral-100 flex items-center justify-center overflow-hidden
|
|
4596
|
+
return /* @__PURE__ */ React47.createElement("div", { className: "relative w-10 h-10 shrink-0" }, /* @__PURE__ */ React47.createElement("div", { className: "w-full h-full rounded-lg bg-neutral-100 flex items-center justify-center overflow-hidden" }, !loaded && !error && /* @__PURE__ */ React47.createElement(HugeiconsIcon33, { icon: Loading03Icon21, className: "animate-spin text-neutral-400 absolute", size: 14 }), /* @__PURE__ */ React47.createElement(
|
|
4597
4597
|
"img",
|
|
4598
4598
|
{
|
|
4599
4599
|
src: finalSrc,
|
|
@@ -4602,7 +4602,7 @@ var MemberAvatar = ({ src, status }) => {
|
|
|
4602
4602
|
onLoad: () => setLoaded(true),
|
|
4603
4603
|
onError: () => setError(true)
|
|
4604
4604
|
}
|
|
4605
|
-
)), /* @__PURE__ */ React47.createElement("div", { className: `absolute -bottom-1 -right-1 w-
|
|
4605
|
+
)), /* @__PURE__ */ React47.createElement("div", { className: `absolute -bottom-1 -right-1 w-2.5 h-2.5 rounded-full border-2 border-white z-10 ${getStatusColor()}` }));
|
|
4606
4606
|
};
|
|
4607
4607
|
var PageSpinner7 = () => /* @__PURE__ */ React47.createElement("div", { className: "flex justify-center items-center py-12" }, /* @__PURE__ */ React47.createElement(HugeiconsIcon33, { icon: Loading03Icon21, size: 32, className: "animate-spin mb-4 text-black" }));
|
|
4608
4608
|
var UniversalMembersPage = ({
|
|
@@ -4621,17 +4621,22 @@ var UniversalMembersPage = ({
|
|
|
4621
4621
|
onRoleFilterChange,
|
|
4622
4622
|
actionButtonText,
|
|
4623
4623
|
hideAction = false,
|
|
4624
|
-
onRemoveMember
|
|
4624
|
+
onRemoveMember,
|
|
4625
|
+
onInviteMember
|
|
4625
4626
|
}) => {
|
|
4626
4627
|
const [expandedId, setExpandedId] = useState32(null);
|
|
4627
4628
|
const [memberToRemove, setMemberToRemove] = useState32(null);
|
|
4628
4629
|
const [isRemoving, setIsRemoving] = useState32(false);
|
|
4630
|
+
const [isInviteMode, setIsInviteMode] = useState32(false);
|
|
4631
|
+
const [inviteEmail, setInviteEmail] = useState32("");
|
|
4632
|
+
const [isInviting, setIsInviting] = useState32(false);
|
|
4629
4633
|
const [localSearchQuery, setLocalSearchQuery] = useState32(searchQuery);
|
|
4630
4634
|
const [isTyping, setIsTyping] = useState32(false);
|
|
4631
4635
|
const [isStatusModalOpen, setIsStatusModalOpen] = useState32(false);
|
|
4632
4636
|
const [isRoleModalOpen, setIsRoleModalOpen] = useState32(false);
|
|
4633
4637
|
const statusDropdownRef = useRef12(null);
|
|
4634
4638
|
const roleDropdownRef = useRef12(null);
|
|
4639
|
+
const cleanEmailId = (val) => val.toLowerCase().replace(/[^a-z0-9@._-]/g, "");
|
|
4635
4640
|
useEffect18(() => {
|
|
4636
4641
|
function handleClickOutside(event) {
|
|
4637
4642
|
if (statusDropdownRef.current && !statusDropdownRef.current.contains(event.target)) {
|
|
@@ -4671,6 +4676,20 @@ var UniversalMembersPage = ({
|
|
|
4671
4676
|
setIsRemoving(false);
|
|
4672
4677
|
}
|
|
4673
4678
|
};
|
|
4679
|
+
const handleInviteSubmit = async (e) => {
|
|
4680
|
+
e.preventDefault();
|
|
4681
|
+
if (inviteEmail.length < 5 || isInviting) return;
|
|
4682
|
+
setIsInviting(true);
|
|
4683
|
+
try {
|
|
4684
|
+
await onInviteMember(inviteEmail);
|
|
4685
|
+
setInviteEmail("");
|
|
4686
|
+
setIsInviteMode(false);
|
|
4687
|
+
} catch (error) {
|
|
4688
|
+
toast12.error(error.message || "Failed to send invitation.");
|
|
4689
|
+
} finally {
|
|
4690
|
+
setIsInviting(false);
|
|
4691
|
+
}
|
|
4692
|
+
};
|
|
4674
4693
|
const isListLoading = isLoading || isTyping;
|
|
4675
4694
|
return /* @__PURE__ */ React47.createElement("div", { className: "w-full max-w-3xl mx-auto flex flex-col animate-in fade-in duration-300" }, /* @__PURE__ */ React47.createElement(ManagedToaster, null), /* @__PURE__ */ React47.createElement(
|
|
4676
4695
|
ConfirmationDialog,
|
|
@@ -4685,7 +4704,7 @@ var UniversalMembersPage = ({
|
|
|
4685
4704
|
onClose: () => setMemberToRemove(null),
|
|
4686
4705
|
onConfirm: handleConfirmRemove
|
|
4687
4706
|
}
|
|
4688
|
-
), /* @__PURE__ */ React47.createElement("div", { className: "flex flex-row flex-nowrap mb-4 items-center justify-between gap-4 w-full" }, /* @__PURE__ */ React47.createElement("div", { className: "relative flex-1 min-w-0 max-w-full" }, /* @__PURE__ */ React47.createElement("div", { className: "absolute inset-y-0 left-0 pl-4 flex items-center pointer-events-none" }, /* @__PURE__ */ React47.createElement(HugeiconsIcon33, { icon: Search01Icon3, size: 16, className: "text-neutral-400" })), /* @__PURE__ */ React47.createElement(
|
|
4707
|
+
), !isInviteMode && /* @__PURE__ */ React47.createElement("div", { className: "flex flex-row flex-nowrap mb-4 items-center justify-between gap-4 w-full animate-in fade-in duration-300" }, /* @__PURE__ */ React47.createElement("div", { className: "relative flex-1 min-w-0 max-w-full" }, /* @__PURE__ */ React47.createElement("div", { className: "absolute inset-y-0 left-0 pl-4 flex items-center pointer-events-none" }, /* @__PURE__ */ React47.createElement(HugeiconsIcon33, { icon: Search01Icon3, size: 16, className: "text-neutral-400" })), /* @__PURE__ */ React47.createElement(
|
|
4689
4708
|
"input",
|
|
4690
4709
|
{
|
|
4691
4710
|
type: "text",
|
|
@@ -4708,7 +4727,46 @@ var UniversalMembersPage = ({
|
|
|
4708
4727
|
className: "flex items-center justify-center bg-white w-9 h-9 rounded-full text-neutral-500 hover:text-black transition-colors outline-none"
|
|
4709
4728
|
},
|
|
4710
4729
|
/* @__PURE__ */ React47.createElement(HugeiconsIcon33, { icon: ListSettingIcon2, size: 16 })
|
|
4711
|
-
))), /* @__PURE__ */ React47.createElement("div", { className: "flex flex-col gap-8 p-6 rounded-2xl bg-white w-full" }, /* @__PURE__ */ React47.createElement("div", { className: "flex flex-
|
|
4730
|
+
))), /* @__PURE__ */ React47.createElement("div", { className: "flex flex-col gap-8 p-6 rounded-2xl bg-white w-full" }, /* @__PURE__ */ React47.createElement("div", { className: "flex flex-row items-start justify-between gap-4" }, /* @__PURE__ */ React47.createElement("div", null, /* @__PURE__ */ React47.createElement("h1", { className: "text-black text-xl mb-1 tracking-tight" }, isInviteMode ? "Add Member" : headerTitle), headerDescription && !isInviteMode && /* @__PURE__ */ React47.createElement("p", { className: "text-[12px] text-neutral-500" }, headerDescription)), !isInviteMode && /* @__PURE__ */ React47.createElement(
|
|
4731
|
+
"button",
|
|
4732
|
+
{
|
|
4733
|
+
onClick: () => setIsInviteMode(true),
|
|
4734
|
+
className: "shrink-0 px-4 py-2 border border-neutral-200 text-black text-[12px] tracking-wide rounded-full hover:bg-neutral-50 transition-colors outline-none"
|
|
4735
|
+
},
|
|
4736
|
+
"Invite Team"
|
|
4737
|
+
)), /* @__PURE__ */ React47.createElement("div", { className: "w-full overflow-hidden" }, isInviteMode ? /* @__PURE__ */ React47.createElement("form", { onSubmit: handleInviteSubmit, className: "flex flex-col gap-8 animate-in fade-in duration-300" }, /* @__PURE__ */ React47.createElement("div", { className: "space-y-1.5 mt-2" }, /* @__PURE__ */ React47.createElement("label", { className: "text-[11px] text-neutral-400 tracking-[0.2em] block" }, "Email Address"), /* @__PURE__ */ React47.createElement(
|
|
4738
|
+
"input",
|
|
4739
|
+
{
|
|
4740
|
+
type: "email",
|
|
4741
|
+
value: inviteEmail,
|
|
4742
|
+
onChange: (e) => setInviteEmail(cleanEmailId(e.target.value)),
|
|
4743
|
+
required: true,
|
|
4744
|
+
autoFocus: true,
|
|
4745
|
+
className: "w-full px-2 py-3 bg-transparent text-sm border-b border-neutral-200 text-black outline-none focus:border-black transition-all duration-300",
|
|
4746
|
+
placeholder: "name@company.com"
|
|
4747
|
+
}
|
|
4748
|
+
)), /* @__PURE__ */ React47.createElement("div", { className: "flex flex-col gap-3" }, /* @__PURE__ */ React47.createElement(
|
|
4749
|
+
ThreeDActionButton,
|
|
4750
|
+
{
|
|
4751
|
+
type: "submit",
|
|
4752
|
+
disabled: inviteEmail.length < 5 || isInviting,
|
|
4753
|
+
isLoading: isInviting,
|
|
4754
|
+
className: "w-full"
|
|
4755
|
+
},
|
|
4756
|
+
"Send Invitation"
|
|
4757
|
+
), /* @__PURE__ */ React47.createElement(
|
|
4758
|
+
"button",
|
|
4759
|
+
{
|
|
4760
|
+
type: "button",
|
|
4761
|
+
onClick: () => {
|
|
4762
|
+
setIsInviteMode(false);
|
|
4763
|
+
setInviteEmail("");
|
|
4764
|
+
},
|
|
4765
|
+
disabled: isInviting,
|
|
4766
|
+
className: "w-full flex items-center justify-center py-2.5 rounded-full border border-neutral-200 text-black hover:bg-neutral-50 transition-colors outline-none text-xs tracking-wide"
|
|
4767
|
+
},
|
|
4768
|
+
"Cancel"
|
|
4769
|
+
))) : isListLoading ? /* @__PURE__ */ React47.createElement(PageSpinner7, null) : /* @__PURE__ */ React47.createElement("div", { className: "flex flex-col min-w-0 animate-in fade-in duration-300" }, /* @__PURE__ */ React47.createElement("div", null, members.length === 0 ? /* @__PURE__ */ React47.createElement("p", { className: "text-[12px] text-neutral-400 py-6 text-center" }, "No members found") : members.map((member) => /* @__PURE__ */ React47.createElement(React47.Fragment, { key: member.id }, expandedId === member.id ? /* @__PURE__ */ React47.createElement("div", { className: "flex flex-col p-5 bg-neutral-50 rounded-xl animate-in fade-in zoom-in-95 duration-200 gap-5 my-2" }, /* @__PURE__ */ React47.createElement("div", { className: "flex items-center gap-4" }, /* @__PURE__ */ React47.createElement(MemberAvatar, { src: member.avatarUrl, status: member.status }), /* @__PURE__ */ React47.createElement("div", { className: "flex flex-col min-w-0" }, /* @__PURE__ */ React47.createElement("span", { className: "text-[14px] text-black tracking-tight truncate" }, member.name), /* @__PURE__ */ React47.createElement("span", { className: "text-[12px] text-neutral-500 capitalize" }, member.role.toLowerCase()))), member.departmentName && /* @__PURE__ */ React47.createElement("div", { className: "pt-3 border-t border-neutral-200" }, /* @__PURE__ */ React47.createElement("span", { className: "text-[10px] tracking-[0.2em] text-neutral-400 block mb-1" }, "Department"), /* @__PURE__ */ React47.createElement("span", { className: "text-[13px] text-black truncate block" }, member.departmentName)), /* @__PURE__ */ React47.createElement("div", { className: "flex gap-3 pt-2" }, !hideAction && /* @__PURE__ */ React47.createElement(
|
|
4712
4770
|
"button",
|
|
4713
4771
|
{
|
|
4714
4772
|
onClick: () => setMemberToRemove(member),
|
|
@@ -4774,17 +4832,20 @@ var UniversalMembersPage = ({
|
|
|
4774
4832
|
import React48, { useState as useState33 } from "react";
|
|
4775
4833
|
import { useRouter as useRouter3 } from "next/navigation";
|
|
4776
4834
|
import { HugeiconsIcon as HugeiconsIcon34 } from "@hugeicons/react";
|
|
4835
|
+
import toast13 from "react-hot-toast";
|
|
4777
4836
|
import {
|
|
4778
4837
|
Loading03Icon as Loading03Icon22,
|
|
4779
4838
|
Notification01Icon as Notification01Icon2,
|
|
4780
4839
|
ArrowLeft01Icon as ArrowLeft01Icon15,
|
|
4781
4840
|
ArrowRight01Icon as ArrowRight01Icon11,
|
|
4782
4841
|
CancelCircleIcon as CancelCircleIcon9,
|
|
4783
|
-
ArrowUpRight01Icon as ArrowUpRight01Icon3
|
|
4842
|
+
ArrowUpRight01Icon as ArrowUpRight01Icon3,
|
|
4843
|
+
Settings01Icon
|
|
4784
4844
|
} from "@hugeicons/core-free-icons";
|
|
4785
4845
|
var UniversalHome2 = ({
|
|
4786
|
-
fullName = "",
|
|
4787
4846
|
avatarSrc,
|
|
4847
|
+
userStatus = "ACTIVE",
|
|
4848
|
+
barIcons = [],
|
|
4788
4849
|
createHuddleAction,
|
|
4789
4850
|
joinHuddleAction,
|
|
4790
4851
|
notifications = [],
|
|
@@ -4793,6 +4854,7 @@ var UniversalHome2 = ({
|
|
|
4793
4854
|
isNotifsLoading = false,
|
|
4794
4855
|
onNotificationPageChange,
|
|
4795
4856
|
onNotificationClick,
|
|
4857
|
+
onResolveInvite,
|
|
4796
4858
|
formatNotifDate,
|
|
4797
4859
|
customContent,
|
|
4798
4860
|
departmentsProps
|
|
@@ -4800,11 +4862,39 @@ var UniversalHome2 = ({
|
|
|
4800
4862
|
const [isAvatarLoaded, setIsAvatarLoaded] = useState33(false);
|
|
4801
4863
|
const [showNotifDialog, setShowNotifDialog] = useState33(false);
|
|
4802
4864
|
const [selectedNotif, setSelectedNotif] = useState33(null);
|
|
4865
|
+
const [isResolving, setIsResolving] = useState33(false);
|
|
4803
4866
|
const router = useRouter3();
|
|
4804
4867
|
const fallbackAvatarUrl = "https://storage.googleapis.com/retina-cloud-v2/assets/images/avatar.avif";
|
|
4805
4868
|
const finalAvatarSrc = avatarSrc || fallbackAvatarUrl;
|
|
4806
4869
|
const hasUnreadNotifs = notifications.some((n) => !n.isRead);
|
|
4807
|
-
|
|
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(
|
|
4808
4898
|
"img",
|
|
4809
4899
|
{
|
|
4810
4900
|
src: finalAvatarSrc,
|
|
@@ -4812,7 +4902,14 @@ var UniversalHome2 = ({
|
|
|
4812
4902
|
onLoad: () => setIsAvatarLoaded(true),
|
|
4813
4903
|
className: `w-full h-full object-cover transition-opacity duration-300 ${isAvatarLoaded ? "opacity-100" : "opacity-0"}`
|
|
4814
4904
|
}
|
|
4815
|
-
))), /* @__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(
|
|
4816
4913
|
"button",
|
|
4817
4914
|
{
|
|
4818
4915
|
onClick: () => {
|
|
@@ -4823,7 +4920,7 @@ var UniversalHome2 = ({
|
|
|
4823
4920
|
},
|
|
4824
4921
|
/* @__PURE__ */ React48.createElement(HugeiconsIcon34, { icon: Notification01Icon2, size: 20, className: "text-black" }),
|
|
4825
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" })
|
|
4826
|
-
)), /* @__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(
|
|
4827
4924
|
"div",
|
|
4828
4925
|
{
|
|
4829
4926
|
onClick: createHuddleAction?.onClick,
|
|
@@ -4835,7 +4932,7 @@ var UniversalHome2 = ({
|
|
|
4835
4932
|
{
|
|
4836
4933
|
src: "https://storage.googleapis.com/retina-cloud-v2/assets/images/cal_a.avif",
|
|
4837
4934
|
alt: "Create Huddle",
|
|
4838
|
-
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"
|
|
4839
4936
|
}
|
|
4840
4937
|
)
|
|
4841
4938
|
), /* @__PURE__ */ React48.createElement(
|
|
@@ -4850,7 +4947,7 @@ var UniversalHome2 = ({
|
|
|
4850
4947
|
{
|
|
4851
4948
|
src: "https://storage.googleapis.com/retina-cloud-v2/assets/images/cam_a.avif",
|
|
4852
4949
|
alt: "Join Huddle",
|
|
4853
|
-
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"
|
|
4854
4951
|
}
|
|
4855
4952
|
)
|
|
4856
4953
|
))), customContent && /* @__PURE__ */ React48.createElement("div", { className: "w-full" }, customContent), /* @__PURE__ */ React48.createElement("div", { className: "w-full mt-2" }, /* @__PURE__ */ React48.createElement(
|
|
@@ -4858,7 +4955,23 @@ var UniversalHome2 = ({
|
|
|
4858
4955
|
{
|
|
4859
4956
|
...departmentsProps
|
|
4860
4957
|
}
|
|
4861
|
-
)), 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(
|
|
4862
4975
|
"div",
|
|
4863
4976
|
{
|
|
4864
4977
|
key: notif.id,
|