@retinalabsllc/zairusjs 21.1.6 → 21.1.9
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 +56 -1
- package/dist/index.d.ts +56 -1
- package/dist/index.js +184 -55
- package/dist/index.mjs +185 -55
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -1390,4 +1390,59 @@ interface UniversalApplicationPage2Props {
|
|
|
1390
1390
|
}
|
|
1391
1391
|
declare const UniversalApplicationPage2: React.FC<UniversalApplicationPage2Props>;
|
|
1392
1392
|
|
|
1393
|
-
|
|
1393
|
+
interface UniversalApplicationDetailsProps {
|
|
1394
|
+
onBackHref: string;
|
|
1395
|
+
application: {
|
|
1396
|
+
id: string;
|
|
1397
|
+
name: string;
|
|
1398
|
+
type: string;
|
|
1399
|
+
status: string;
|
|
1400
|
+
};
|
|
1401
|
+
canDelete: boolean;
|
|
1402
|
+
onDeleteSubmit: () => Promise<void>;
|
|
1403
|
+
}
|
|
1404
|
+
declare const UniversalApplicationDetails: React.FC<UniversalApplicationDetailsProps>;
|
|
1405
|
+
|
|
1406
|
+
interface UniversalMemberApp {
|
|
1407
|
+
id: string;
|
|
1408
|
+
userId: string;
|
|
1409
|
+
fullName: string;
|
|
1410
|
+
avatarUrl?: string | null;
|
|
1411
|
+
role: string;
|
|
1412
|
+
}
|
|
1413
|
+
interface UniversalCompanyApp {
|
|
1414
|
+
id: string;
|
|
1415
|
+
name: string;
|
|
1416
|
+
isPrivate: boolean;
|
|
1417
|
+
}
|
|
1418
|
+
interface UniversalCreateApplicationProps {
|
|
1419
|
+
onBackHref: string;
|
|
1420
|
+
userRole?: string;
|
|
1421
|
+
members: UniversalMemberApp[];
|
|
1422
|
+
isMembersLoading: boolean;
|
|
1423
|
+
membersCurrentPage: number;
|
|
1424
|
+
membersTotalPages: number;
|
|
1425
|
+
onMembersPageChange: (page: number) => void;
|
|
1426
|
+
membersSearchQuery: string;
|
|
1427
|
+
onMembersSearchChange: (query: string) => void;
|
|
1428
|
+
companies: UniversalCompanyApp[];
|
|
1429
|
+
isCompaniesLoading: boolean;
|
|
1430
|
+
companiesCurrentPage: number;
|
|
1431
|
+
companiesTotalPages: number;
|
|
1432
|
+
onCompaniesPageChange: (page: number) => void;
|
|
1433
|
+
companiesSearchQuery: string;
|
|
1434
|
+
onCompaniesSearchChange: (query: string) => void;
|
|
1435
|
+
onCreateSubmit: (payload: {
|
|
1436
|
+
creationMode: 'NEW' | 'EXISTING';
|
|
1437
|
+
companyId?: string;
|
|
1438
|
+
newCompany?: {
|
|
1439
|
+
name: string;
|
|
1440
|
+
isPrivate: boolean;
|
|
1441
|
+
assignedUsers: string[];
|
|
1442
|
+
};
|
|
1443
|
+
type: string;
|
|
1444
|
+
}) => Promise<void>;
|
|
1445
|
+
}
|
|
1446
|
+
declare const UniversalCreateApplication: React.FC<UniversalCreateApplicationProps>;
|
|
1447
|
+
|
|
1448
|
+
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, 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 HomeActionBtn3, HomeHuddleCalendar, type HomeHuddleCalendarProps, 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 NavItem2, type NetworkOption, type NotificationItem, type NotificationItem2, type NotificationItem3, 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, RootSidebar, type RootSidebarProps, type ScrollFeature, type SocialContact, type SocialLink, type StatItem, TextInput, type TextInputProps, ThreeDActionButton, type ThreeDActionButtonProps, ThreeDButton, type ThreeDButtonProps, type TierOption, type UniversalApplication, UniversalApplicationDetails, type UniversalApplicationDetailsProps, UniversalApplicationPage2, type UniversalApplicationPage2Props, UniversalApplicationsPage, type UniversalApplicationsPageProps, UniversalBuyCryptoPage, type UniversalBuyCryptoPageProps, UniversalCardActionPage, type UniversalCardActionPageProps, UniversalCardPage, type UniversalCardPageProps, type UniversalCompanyApp, UniversalCreateApplication, type UniversalCreateApplicationProps, UniversalCreateHuddle, type UniversalCreateHuddleProps, UniversalDeveloperSettings, type UniversalDeveloperSettingsProps, UniversalErrorView, type UniversalErrorViewProps, UniversalHome2, type UniversalHome2Props, UniversalHome3, type UniversalHome3Props, UniversalHomeView, type UniversalHomeViewProps, type UniversalHuddle, UniversalHuddleDetails, type UniversalHuddleDetailsProps, UniversalHuddlesPage, type UniversalHuddlesPageProps, type UniversalMember, type UniversalMember2$1 as UniversalMember2, type UniversalMember3, type UniversalMemberApp, UniversalMembersPage, type UniversalMembersPageProps, UniversalOrganizationPage, type UniversalOrganizationPageProps, UniversalProfilePage, type UniversalProfilePageProps, UniversalProfileSettings, type UniversalProfileSettingsProps, type UniversalReferralItem, UniversalReferralPage, type UniversalReferralPageProps, UniversalRewardPage, type UniversalRewardPageProps, UniversalSecurityPage, type UniversalSecurityPageProps, UniversalSettings, UniversalSettings2, type UniversalSettings2Props, type UniversalSettingsProps, UniversalSidebar, type UniversalSidebarProps, type UniversalTransaction, UniversalTransactionPage, type UniversalTransactionPageProps, UniversalVerificationPage, type UniversalVerificationPageProps, type UniversalWallet, UniversalWalletPage, type UniversalWalletPageProps, type VerificationStatus, WaitlistDialog, type WaitlistDialogProps, type WorkspaceItem };
|
package/dist/index.d.ts
CHANGED
|
@@ -1390,4 +1390,59 @@ interface UniversalApplicationPage2Props {
|
|
|
1390
1390
|
}
|
|
1391
1391
|
declare const UniversalApplicationPage2: React.FC<UniversalApplicationPage2Props>;
|
|
1392
1392
|
|
|
1393
|
-
|
|
1393
|
+
interface UniversalApplicationDetailsProps {
|
|
1394
|
+
onBackHref: string;
|
|
1395
|
+
application: {
|
|
1396
|
+
id: string;
|
|
1397
|
+
name: string;
|
|
1398
|
+
type: string;
|
|
1399
|
+
status: string;
|
|
1400
|
+
};
|
|
1401
|
+
canDelete: boolean;
|
|
1402
|
+
onDeleteSubmit: () => Promise<void>;
|
|
1403
|
+
}
|
|
1404
|
+
declare const UniversalApplicationDetails: React.FC<UniversalApplicationDetailsProps>;
|
|
1405
|
+
|
|
1406
|
+
interface UniversalMemberApp {
|
|
1407
|
+
id: string;
|
|
1408
|
+
userId: string;
|
|
1409
|
+
fullName: string;
|
|
1410
|
+
avatarUrl?: string | null;
|
|
1411
|
+
role: string;
|
|
1412
|
+
}
|
|
1413
|
+
interface UniversalCompanyApp {
|
|
1414
|
+
id: string;
|
|
1415
|
+
name: string;
|
|
1416
|
+
isPrivate: boolean;
|
|
1417
|
+
}
|
|
1418
|
+
interface UniversalCreateApplicationProps {
|
|
1419
|
+
onBackHref: string;
|
|
1420
|
+
userRole?: string;
|
|
1421
|
+
members: UniversalMemberApp[];
|
|
1422
|
+
isMembersLoading: boolean;
|
|
1423
|
+
membersCurrentPage: number;
|
|
1424
|
+
membersTotalPages: number;
|
|
1425
|
+
onMembersPageChange: (page: number) => void;
|
|
1426
|
+
membersSearchQuery: string;
|
|
1427
|
+
onMembersSearchChange: (query: string) => void;
|
|
1428
|
+
companies: UniversalCompanyApp[];
|
|
1429
|
+
isCompaniesLoading: boolean;
|
|
1430
|
+
companiesCurrentPage: number;
|
|
1431
|
+
companiesTotalPages: number;
|
|
1432
|
+
onCompaniesPageChange: (page: number) => void;
|
|
1433
|
+
companiesSearchQuery: string;
|
|
1434
|
+
onCompaniesSearchChange: (query: string) => void;
|
|
1435
|
+
onCreateSubmit: (payload: {
|
|
1436
|
+
creationMode: 'NEW' | 'EXISTING';
|
|
1437
|
+
companyId?: string;
|
|
1438
|
+
newCompany?: {
|
|
1439
|
+
name: string;
|
|
1440
|
+
isPrivate: boolean;
|
|
1441
|
+
assignedUsers: string[];
|
|
1442
|
+
};
|
|
1443
|
+
type: string;
|
|
1444
|
+
}) => Promise<void>;
|
|
1445
|
+
}
|
|
1446
|
+
declare const UniversalCreateApplication: React.FC<UniversalCreateApplicationProps>;
|
|
1447
|
+
|
|
1448
|
+
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, 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 HomeActionBtn3, HomeHuddleCalendar, type HomeHuddleCalendarProps, 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 NavItem2, type NetworkOption, type NotificationItem, type NotificationItem2, type NotificationItem3, 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, RootSidebar, type RootSidebarProps, type ScrollFeature, type SocialContact, type SocialLink, type StatItem, TextInput, type TextInputProps, ThreeDActionButton, type ThreeDActionButtonProps, ThreeDButton, type ThreeDButtonProps, type TierOption, type UniversalApplication, UniversalApplicationDetails, type UniversalApplicationDetailsProps, UniversalApplicationPage2, type UniversalApplicationPage2Props, UniversalApplicationsPage, type UniversalApplicationsPageProps, UniversalBuyCryptoPage, type UniversalBuyCryptoPageProps, UniversalCardActionPage, type UniversalCardActionPageProps, UniversalCardPage, type UniversalCardPageProps, type UniversalCompanyApp, UniversalCreateApplication, type UniversalCreateApplicationProps, UniversalCreateHuddle, type UniversalCreateHuddleProps, UniversalDeveloperSettings, type UniversalDeveloperSettingsProps, UniversalErrorView, type UniversalErrorViewProps, UniversalHome2, type UniversalHome2Props, UniversalHome3, type UniversalHome3Props, UniversalHomeView, type UniversalHomeViewProps, type UniversalHuddle, UniversalHuddleDetails, type UniversalHuddleDetailsProps, UniversalHuddlesPage, type UniversalHuddlesPageProps, type UniversalMember, type UniversalMember2$1 as UniversalMember2, type UniversalMember3, type UniversalMemberApp, UniversalMembersPage, type UniversalMembersPageProps, UniversalOrganizationPage, type UniversalOrganizationPageProps, UniversalProfilePage, type UniversalProfilePageProps, UniversalProfileSettings, type UniversalProfileSettingsProps, type UniversalReferralItem, UniversalReferralPage, type UniversalReferralPageProps, UniversalRewardPage, type UniversalRewardPageProps, UniversalSecurityPage, type UniversalSecurityPageProps, UniversalSettings, UniversalSettings2, type UniversalSettings2Props, type UniversalSettingsProps, UniversalSidebar, type UniversalSidebarProps, type UniversalTransaction, UniversalTransactionPage, type UniversalTransactionPageProps, UniversalVerificationPage, type UniversalVerificationPageProps, type UniversalWallet, UniversalWalletPage, type UniversalWalletPageProps, type VerificationStatus, WaitlistDialog, type WaitlistDialogProps, type WorkspaceItem };
|
package/dist/index.js
CHANGED
|
@@ -63,11 +63,13 @@ __export(index_exports, {
|
|
|
63
63
|
TextInput: () => TextInput,
|
|
64
64
|
ThreeDActionButton: () => ThreeDActionButton,
|
|
65
65
|
ThreeDButton: () => ThreeDButton,
|
|
66
|
+
UniversalApplicationDetails: () => UniversalApplicationDetails,
|
|
66
67
|
UniversalApplicationPage2: () => UniversalApplicationPage2,
|
|
67
68
|
UniversalApplicationsPage: () => UniversalApplicationsPage,
|
|
68
69
|
UniversalBuyCryptoPage: () => UniversalBuyCryptoPage,
|
|
69
70
|
UniversalCardActionPage: () => UniversalCardActionPage,
|
|
70
71
|
UniversalCardPage: () => UniversalCardPage,
|
|
72
|
+
UniversalCreateApplication: () => UniversalCreateApplication,
|
|
71
73
|
UniversalCreateHuddle: () => UniversalCreateHuddle,
|
|
72
74
|
UniversalDeveloperSettings: () => UniversalDeveloperSettings,
|
|
73
75
|
UniversalErrorView: () => UniversalErrorView,
|
|
@@ -6428,19 +6430,11 @@ var UniversalHome3 = ({
|
|
|
6428
6430
|
setIsResolving(false);
|
|
6429
6431
|
}
|
|
6430
6432
|
};
|
|
6431
|
-
return /* @__PURE__ */ import_react97.default.createElement("div", { className: "w-full max-w-3xl mx-auto flex flex-col animate-in fade-in duration-300 relative" }, /* @__PURE__ */ import_react97.default.createElement("div", { className: "flex items-center justify-between w-full pb-4" }, /* @__PURE__ */ import_react97.default.createElement("div", { className: "flex items-center gap-
|
|
6432
|
-
"button",
|
|
6433
|
-
{
|
|
6434
|
-
onClick: () => window.dispatchEvent(new Event("open-sidebar")),
|
|
6435
|
-
className: "md:hidden flex items-center justify-center w-7 h-7 bg-white rounded-full text-black transition-all duration-300 outline-none hover:bg-stone-50",
|
|
6436
|
-
"aria-label": "Open Menu"
|
|
6437
|
-
},
|
|
6438
|
-
/* @__PURE__ */ import_react97.default.createElement(import_react98.HugeiconsIcon, { icon: import_core_free_icons38.SidebarLeft01Icon, size: 16 })
|
|
6439
|
-
)), /* @__PURE__ */ import_react97.default.createElement("div", { className: "flex items-center gap-2 shrink-0" }, /* @__PURE__ */ import_react97.default.createElement(
|
|
6433
|
+
return /* @__PURE__ */ import_react97.default.createElement("div", { className: "w-full max-w-3xl mx-auto flex flex-col animate-in fade-in duration-300 relative" }, /* @__PURE__ */ import_react97.default.createElement("div", { className: "flex items-center justify-between w-full pb-4" }, /* @__PURE__ */ import_react97.default.createElement("div", { className: "flex items-center gap-2 shrink-0" }, /* @__PURE__ */ import_react97.default.createElement(
|
|
6440
6434
|
"button",
|
|
6441
6435
|
{
|
|
6442
6436
|
onClick: () => router.push("/app/ai"),
|
|
6443
|
-
className: "relative w-
|
|
6437
|
+
className: "relative w-9 h-9 flex items-center justify-center rounded-full bg-white outline-none hover:bg-stone-50 transition-colors"
|
|
6444
6438
|
},
|
|
6445
6439
|
/* @__PURE__ */ import_react97.default.createElement(import_react98.HugeiconsIcon, { icon: import_core_free_icons38.Robot01Icon, size: 16, className: "text-black" })
|
|
6446
6440
|
), /* @__PURE__ */ import_react97.default.createElement(
|
|
@@ -6450,7 +6444,7 @@ var UniversalHome3 = ({
|
|
|
6450
6444
|
setShowNotifDialog(true);
|
|
6451
6445
|
setSelectedNotif(null);
|
|
6452
6446
|
},
|
|
6453
|
-
className: "relative w-
|
|
6447
|
+
className: "relative w-9 h-9 flex items-center justify-center rounded-full bg-white outline-none hover:bg-stone-50 transition-colors"
|
|
6454
6448
|
},
|
|
6455
6449
|
/* @__PURE__ */ import_react97.default.createElement(import_react98.HugeiconsIcon, { icon: import_core_free_icons38.Notification01Icon, size: 16, className: "text-black" }),
|
|
6456
6450
|
hasUnreadNotifs && /* @__PURE__ */ import_react97.default.createElement("span", { className: "absolute top-2.5 right-2.5 w-2 h-2 bg-[#d97757] rounded-full border border-white" })
|
|
@@ -6464,7 +6458,7 @@ var UniversalHome3 = ({
|
|
|
6464
6458
|
/* @__PURE__ */ import_react97.default.createElement(
|
|
6465
6459
|
"img",
|
|
6466
6460
|
{
|
|
6467
|
-
src: "https://storage.googleapis.com/retina-cloud-v2/assets/images/
|
|
6461
|
+
src: "https://storage.googleapis.com/retina-cloud-v2/assets/images/create-file.avif",
|
|
6468
6462
|
alt: "New Application",
|
|
6469
6463
|
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 opacity-30"
|
|
6470
6464
|
}
|
|
@@ -6479,7 +6473,7 @@ var UniversalHome3 = ({
|
|
|
6479
6473
|
/* @__PURE__ */ import_react97.default.createElement(
|
|
6480
6474
|
"img",
|
|
6481
6475
|
{
|
|
6482
|
-
src: "https://storage.googleapis.com/retina-cloud-v2/assets/images/
|
|
6476
|
+
src: "https://storage.googleapis.com/retina-cloud-v2/assets/images/search-file.avif",
|
|
6483
6477
|
alt: "Check Application",
|
|
6484
6478
|
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 opacity-30"
|
|
6485
6479
|
}
|
|
@@ -7013,15 +7007,7 @@ var UniversalSettings2 = ({
|
|
|
7013
7007
|
tabs.push({ id: "ORGANIZATION", label: "Organization" });
|
|
7014
7008
|
}
|
|
7015
7009
|
tabs.push({ id: "ACCOUNT", label: "Profile" });
|
|
7016
|
-
return /* @__PURE__ */ import_react101.default.createElement("div", { className: "w-full max-w-3xl mx-auto flex flex-col animate-in fade-in duration-300" }, /* @__PURE__ */ import_react101.default.createElement(ManagedToaster, null), /* @__PURE__ */ import_react101.default.createElement("div", { className: "flex flex-col gap-1 mb-8 px-1" }, /* @__PURE__ */ import_react101.default.createElement("div", { className: "flex items-center
|
|
7017
|
-
"button",
|
|
7018
|
-
{
|
|
7019
|
-
onClick: () => window.dispatchEvent(new Event("open-sidebar")),
|
|
7020
|
-
className: "md:hidden flex shrink-0 items-center justify-center w-7 h-7 bg-white rounded-full text-black transition-all duration-300 outline-none hover:bg-stone-50",
|
|
7021
|
-
"aria-label": "Open Menu"
|
|
7022
|
-
},
|
|
7023
|
-
/* @__PURE__ */ import_react101.default.createElement(import_react102.HugeiconsIcon, { icon: import_core_free_icons40.SidebarLeft01Icon, size: 16 })
|
|
7024
|
-
), /* @__PURE__ */ import_react101.default.createElement("h1", { className: "text-black text-xl tracking-tight" }, "System Settings")), /* @__PURE__ */ import_react101.default.createElement("p", { className: "text-xs text-stone-500" }, "Manage your workspace identity, team configurations, and AI billing parameters.")), /* @__PURE__ */ import_react101.default.createElement("div", { className: "flex items-center mb-4 w-full animate-in fade-in duration-300 px-2" }, /* @__PURE__ */ import_react101.default.createElement("div", { className: "flex items-center bg-white rounded-full p-1 sm:p-1.5 max-w-full overflow-x-auto custom-scrollbar" }, tabs.map((tab, idx) => {
|
|
7010
|
+
return /* @__PURE__ */ import_react101.default.createElement("div", { className: "w-full max-w-3xl mx-auto flex flex-col animate-in fade-in duration-300" }, /* @__PURE__ */ import_react101.default.createElement(ManagedToaster, null), /* @__PURE__ */ import_react101.default.createElement("div", { className: "flex flex-col gap-1 mb-8 px-1" }, /* @__PURE__ */ import_react101.default.createElement("div", { className: "flex items-center" }, /* @__PURE__ */ import_react101.default.createElement("h1", { className: "text-black text-xl tracking-tight" }, "System Settings")), /* @__PURE__ */ import_react101.default.createElement("p", { className: "text-xs text-stone-500" }, "Manage your workspace identity, team configurations, and AI billing parameters.")), /* @__PURE__ */ import_react101.default.createElement("div", { className: "flex items-center mb-4 w-full animate-in fade-in duration-300 px-2" }, /* @__PURE__ */ import_react101.default.createElement("div", { className: "flex items-center bg-white rounded-full p-1 sm:p-1.5 max-w-full overflow-x-auto custom-scrollbar" }, tabs.map((tab, idx) => {
|
|
7025
7011
|
const isActive = activeTab === tab.id;
|
|
7026
7012
|
return /* @__PURE__ */ import_react101.default.createElement(
|
|
7027
7013
|
"button",
|
|
@@ -7051,7 +7037,7 @@ var UniversalSettings2 = ({
|
|
|
7051
7037
|
onClose: () => setMemberToRemove(null),
|
|
7052
7038
|
onConfirm: handleConfirmRemove
|
|
7053
7039
|
}
|
|
7054
|
-
),
|
|
7040
|
+
), /* @__PURE__ */ import_react101.default.createElement("div", { className: "flex flex-col gap-8 p-6 rounded-2xl bg-white w-full" }, activeExpandedMember ? /* @__PURE__ */ import_react101.default.createElement("div", { className: "flex flex-col animate-in fade-in zoom-in-95 duration-300 w-full" }, /* @__PURE__ */ import_react101.default.createElement("div", { className: "mb-6 flex w-full items-center" }, /* @__PURE__ */ import_react101.default.createElement(
|
|
7055
7041
|
"button",
|
|
7056
7042
|
{
|
|
7057
7043
|
onClick: () => setExpandedId(null),
|
|
@@ -7071,7 +7057,7 @@ var UniversalSettings2 = ({
|
|
|
7071
7057
|
))))))) : /* @__PURE__ */ import_react101.default.createElement(import_react101.default.Fragment, null, /* @__PURE__ */ import_react101.default.createElement("div", { className: "flex flex-col gap-1" }, /* @__PURE__ */ import_react101.default.createElement("div", { className: "flex flex-row items-center justify-between gap-4" }, /* @__PURE__ */ import_react101.default.createElement("h2", { className: "text-black text-xl tracking-tight" }, isInviteMode ? "Add Member" : "Team Directory"), !isInviteMode && canManage && /* @__PURE__ */ import_react101.default.createElement("button", { onClick: () => setIsInviteMode(true), className: "shrink-0 px-4 py-1.5 border border-stone-200 text-black text-xs tracking-wide rounded-full hover:bg-stone-50 transition-colors outline-none" }, "Invite Team")), !isInviteMode && /* @__PURE__ */ import_react101.default.createElement("p", { className: "text-xs text-stone-500" }, "Manage members and access controls across your organization.")), /* @__PURE__ */ import_react101.default.createElement("div", { className: "w-full overflow-hidden" }, isInviteMode ? /* @__PURE__ */ import_react101.default.createElement("form", { onSubmit: handleInviteSubmit, className: "flex flex-col gap-8 animate-in fade-in duration-300" }, /* @__PURE__ */ import_react101.default.createElement("div", { className: "space-y-1.5 mt-2" }, /* @__PURE__ */ import_react101.default.createElement("label", { className: "text-xs text-stone-400 tracking-[0.2em] block" }, "Email Address"), /* @__PURE__ */ import_react101.default.createElement("input", { type: "email", value: inviteEmail, onChange: (e) => setInviteEmail(cleanEmailId(e.target.value)), required: true, autoFocus: true, className: "w-full px-2 py-3 bg-transparent text-sm border-b border-stone-200 text-black outline-none focus:border-black transition-all duration-300", placeholder: "name@company.com" })), /* @__PURE__ */ import_react101.default.createElement("div", { className: "flex flex-col gap-3" }, /* @__PURE__ */ import_react101.default.createElement(ThreeDActionButton, { type: "submit", disabled: inviteEmail.length < 5 || isInviting, isLoading: isInviting, className: "w-full" }, "Send Invitation"), /* @__PURE__ */ import_react101.default.createElement("button", { type: "button", onClick: () => {
|
|
7072
7058
|
setIsInviteMode(false);
|
|
7073
7059
|
setInviteEmail("");
|
|
7074
|
-
}, disabled: isInviting, className: "w-full flex items-center justify-center py-2.5 rounded-full border border-stone-200 text-black hover:bg-stone-50 transition-colors outline-none text-xs tracking-wide" }, "Cancel"))) : isMembersLoading || isTyping ? /* @__PURE__ */ import_react101.default.createElement(PageSpinner10, null) : /* @__PURE__ */ import_react101.default.createElement("div", { className: "flex flex-col min-w-0 animate-in fade-in duration-300" }, /* @__PURE__ */ import_react101.default.createElement("div", null, members.length === 0 ? /* @__PURE__ */ import_react101.default.createElement("p", { className: "text-xs text-stone-400 py-6 text-center" }, "No members found") : members.map((member) => /* @__PURE__ */ import_react101.default.createElement("div", { key: member.id, onClick: () => setExpandedId(member.id), className: "flex items-center justify-between py-3 hover:bg-stone-50 transition-colors cursor-pointer group min-w-0 px-3 -mx-3 rounded-xl" }, /* @__PURE__ */ import_react101.default.createElement("div", { className: "flex items-center gap-4 min-w-0 flex-1" }, /* @__PURE__ */ import_react101.default.createElement(MemberAvatar5, { src: member.avatarUrl, status: member.status }), /* @__PURE__ */ import_react101.default.createElement("div", { className: "min-w-0 flex-1 flex flex-col gap-0.5" }, /* @__PURE__ */ import_react101.default.createElement("p", { className: "text-sm text-black truncate" }, member.fullName), /* @__PURE__ */ import_react101.default.createElement("p", { className: "text-xs text-stone-500 capitalize truncate" }, member.role.toLowerCase())))))), /* @__PURE__ */ import_react101.default.createElement("div", { className: "flex items-center justify-between pt-6 mt-2 " }, /* @__PURE__ */ import_react101.default.createElement("span", { className: "text-xs text-stone-400 tracking-[0.2em]" }, "Page ", membersCurrentPage, " of ", membersTotalPages === 0 ? 1 : membersTotalPages), /* @__PURE__ */ import_react101.default.createElement("div", { className: "flex items-center gap-2" }, /* @__PURE__ */ import_react101.default.createElement("button", { onClick: () => onMembersPageChange(membersCurrentPage - 1), disabled: membersCurrentPage <= 1 || isMembersLoading, className: "p-2 bg-white border border-stone-200 rounded-full text-black hover:bg-stone-50 disabled:opacity-30 disabled:cursor-not-allowed transition-all outline-none" }, /* @__PURE__ */ import_react101.default.createElement(import_react102.HugeiconsIcon, { icon: import_core_free_icons40.ArrowLeft01Icon, size: 14 })), /* @__PURE__ */ import_react101.default.createElement("button", { onClick: () => onMembersPageChange(membersCurrentPage + 1), disabled: membersCurrentPage >= membersTotalPages || isMembersLoading || membersTotalPages === 0, className: "p-2 bg-white border border-stone-200 rounded-full text-black hover:bg-stone-50 disabled:opacity-30 disabled:cursor-not-allowed transition-all outline-none" }, /* @__PURE__ */ import_react101.default.createElement(import_react102.HugeiconsIcon, { icon: import_core_free_icons40.ArrowRight01Icon, size: 14 })))))))), /* @__PURE__ */ import_react101.default.createElement(ReusableOptions, { isOpen:
|
|
7060
|
+
}, disabled: isInviting, className: "w-full flex items-center justify-center py-2.5 rounded-full border border-stone-200 text-black hover:bg-stone-50 transition-colors outline-none text-xs tracking-wide" }, "Cancel"))) : isMembersLoading || isTyping ? /* @__PURE__ */ import_react101.default.createElement(PageSpinner10, null) : /* @__PURE__ */ import_react101.default.createElement("div", { className: "flex flex-col min-w-0 animate-in fade-in duration-300" }, /* @__PURE__ */ import_react101.default.createElement("div", null, members.length === 0 ? /* @__PURE__ */ import_react101.default.createElement("p", { className: "text-xs text-stone-400 py-6 text-center" }, "No members found") : members.map((member) => /* @__PURE__ */ import_react101.default.createElement("div", { key: member.id, onClick: () => setExpandedId(member.id), className: "flex items-center justify-between py-3 hover:bg-stone-50 transition-colors cursor-pointer group min-w-0 px-3 -mx-3 rounded-xl" }, /* @__PURE__ */ import_react101.default.createElement("div", { className: "flex items-center gap-4 min-w-0 flex-1" }, /* @__PURE__ */ import_react101.default.createElement(MemberAvatar5, { src: member.avatarUrl, status: member.status }), /* @__PURE__ */ import_react101.default.createElement("div", { className: "min-w-0 flex-1 flex flex-col gap-0.5" }, /* @__PURE__ */ import_react101.default.createElement("p", { className: "text-sm text-black truncate" }, member.fullName), /* @__PURE__ */ import_react101.default.createElement("p", { className: "text-xs text-stone-500 capitalize truncate" }, member.role.toLowerCase())))))), /* @__PURE__ */ import_react101.default.createElement("div", { className: "flex items-center justify-between pt-6 mt-2 " }, /* @__PURE__ */ import_react101.default.createElement("span", { className: "text-xs text-stone-400 tracking-[0.2em]" }, "Page ", membersCurrentPage, " of ", membersTotalPages === 0 ? 1 : membersTotalPages), /* @__PURE__ */ import_react101.default.createElement("div", { className: "flex items-center gap-2" }, /* @__PURE__ */ import_react101.default.createElement("button", { onClick: () => onMembersPageChange(membersCurrentPage - 1), disabled: membersCurrentPage <= 1 || isMembersLoading, className: "p-2 bg-white border border-stone-200 rounded-full text-black hover:bg-stone-50 disabled:opacity-30 disabled:cursor-not-allowed transition-all outline-none" }, /* @__PURE__ */ import_react101.default.createElement(import_react102.HugeiconsIcon, { icon: import_core_free_icons40.ArrowLeft01Icon, size: 14 })), /* @__PURE__ */ import_react101.default.createElement("button", { onClick: () => onMembersPageChange(membersCurrentPage + 1), disabled: membersCurrentPage >= membersTotalPages || isMembersLoading || membersTotalPages === 0, className: "p-2 bg-white border border-stone-200 rounded-full text-black hover:bg-stone-50 disabled:opacity-30 disabled:cursor-not-allowed transition-all outline-none" }, /* @__PURE__ */ import_react101.default.createElement(import_react102.HugeiconsIcon, { icon: import_core_free_icons40.ArrowRight01Icon, size: 14 })))))))), /* @__PURE__ */ import_react101.default.createElement(ReusableOptions, { isOpen: !!roleEditTarget, onClose: () => setRoleEditTarget(null), title: "Modify Access Role", options: ["ADMIN", "MANAGER", "MEMBER"], selectedOption: roleEditTarget?.role || "", onSelect: handleRoleUpdate })), activeTab === "ORGANIZATION" && isOrg && /* @__PURE__ */ import_react101.default.createElement("div", { className: "flex flex-col gap-8 animate-in rounded-2xl p-6 bg-white fade-in duration-300" }, /* @__PURE__ */ import_react101.default.createElement("div", { className: "flex items-start justify-between gap-4" }, /* @__PURE__ */ import_react101.default.createElement("div", { className: "flex items-center gap-4" }, /* @__PURE__ */ import_react101.default.createElement("div", { className: "relative group cursor-pointer shrink-0", onClick: () => canManage && !isSavingOrg ? orgFileInputRef.current?.click() : void 0 }, /* @__PURE__ */ import_react101.default.createElement(OrgAvatar3, { src: orgAvatarUrl, sizeClass: "w-14 h-14" }), canManage && /* @__PURE__ */ import_react101.default.createElement("div", { className: "absolute -bottom-1 -right-1 w-6 h-6 bg-white border border-stone-200 rounded-full flex items-center justify-center text-stone-500 group-hover:text-black transition-colors z-10" }, isUploadingOrgAvatar ? /* @__PURE__ */ import_react101.default.createElement(import_react102.HugeiconsIcon, { icon: import_core_free_icons40.Loading03Icon, size: 12, className: "animate-spin" }) : /* @__PURE__ */ import_react101.default.createElement(import_react102.HugeiconsIcon, { icon: import_core_free_icons40.CloudUploadIcon, size: 14 })), /* @__PURE__ */ import_react101.default.createElement("input", { type: "file", ref: orgFileInputRef, className: "hidden", accept: ".png, .jpg, .jpeg", onChange: (e) => handleFileSelect(e, "ORGANIZATION") })), /* @__PURE__ */ import_react101.default.createElement("div", null, /* @__PURE__ */ import_react101.default.createElement("h2", { className: "text-black text-xl mb-1 tracking-tight" }, "Workspace Details"), /* @__PURE__ */ import_react101.default.createElement("p", { className: "text-xs text-stone-500" }, "Manage your organizational identity and handles."))), !canManage && /* @__PURE__ */ import_react101.default.createElement("span", { className: "p-2 w-9 h-9 bg-stone-100 text-stone-400 rounded-full shrink-0" }, /* @__PURE__ */ import_react101.default.createElement(import_react102.HugeiconsIcon, { icon: import_core_free_icons40.CircleLock02Icon, size: 18, className: "text-current" }))), /* @__PURE__ */ import_react101.default.createElement("form", { className: "flex flex-col gap-8 w-full max-w-5xl", onSubmit: handleSaveOrganization, autoComplete: "off" }, /* @__PURE__ */ import_react101.default.createElement(TextInput, { label: "Workspace Name", value: orgName, onChange: handleOrgNameChange, disabled: !canManage || isSavingOrg, placeholder: "Acme Corporation", maxLength: 50 }), /* @__PURE__ */ import_react101.default.createElement("div", { className: "space-y-1.5 relative w-full" }, /* @__PURE__ */ import_react101.default.createElement("label", { className: "text-xs text-stone-400 tracking-[0.2em] block" }, "Workspace Handle"), /* @__PURE__ */ import_react101.default.createElement("div", { className: "flex items-center relative w-full border-b border-stone-200 focus-within:border-black transition-all duration-300 overflow-hidden" }, /* @__PURE__ */ import_react101.default.createElement("input", { type: "text", value: orgSlug, disabled: !canManage || isSavingOrg, onChange: (e) => handleOrgSlugChange(e.target.value), spellCheck: "false", autoComplete: "off", className: "w-full pr-10 pl-0 py-3 text-sm bg-transparent text-black outline-none disabled:opacity-50 disabled:cursor-not-allowed", placeholder: "workspace-handle" }), /* @__PURE__ */ import_react101.default.createElement("div", { className: "absolute right-2 top-1/2 -translate-y-1/2" }, isCheckingSlug && /* @__PURE__ */ import_react101.default.createElement(InputSpinner4, null), !isCheckingSlug && canManage && orgSlug !== initialOrgSlug && orgSlug.length >= 3 && slugAvailable === false && /* @__PURE__ */ import_react101.default.createElement("span", { className: "inline-flex items-center justify-center w-4 h-4 rounded-full bg-[#d97757]/10" }, /* @__PURE__ */ import_react101.default.createElement("svg", { className: "w-2 h-2 text-[#d97757]", viewBox: "0 0 20 20", fill: "currentColor" }, /* @__PURE__ */ import_react101.default.createElement("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M4.293 4.293a1 1 0 011.414 0L10 8.586l4.293-4.293a1 1 0 111.414 1.414L11.414 10l4.293 4.293a1 1 0 01-1.414 1.414L10 11.414l-4.293 4.293a1 1 0 01-1.414-1.414L8.586 10 4.293 5.707a1 1 0 010-1.414z" }))), !isCheckingSlug && canManage && orgSlug !== initialOrgSlug && orgSlug.length >= 3 && slugAvailable === true && /* @__PURE__ */ import_react101.default.createElement("span", { className: "inline-flex items-center justify-center w-4 h-4 rounded-full bg-green-100" }, /* @__PURE__ */ import_react101.default.createElement("svg", { className: "w-2 h-2 text-green-600", viewBox: "0 0 20 20", fill: "currentColor" }, /* @__PURE__ */ import_react101.default.createElement("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M16.707 5.293a1 1 0 00-1.414 0L8 12.586 4.707 9.293a1 1 0 10-1.414 1.414l4 4a1 1 0 001.414 0l8-8a1 1 0 000-1.414z" })))))), /* @__PURE__ */ import_react101.default.createElement("div", { className: "pt-8 mt-2 flex items-center gap-4" }, /* @__PURE__ */ import_react101.default.createElement(ThreeDActionButton, { type: "submit", disabled: isOrgSaveDisabled, isLoading: isSavingOrg, className: "min-w-32" }, "Save Changes"), hasOrgChanges && !isSavingOrg && canManage && /* @__PURE__ */ import_react101.default.createElement("button", { type: "button", onClick: () => {
|
|
7075
7061
|
setOrgName(initialOrgName || "");
|
|
7076
7062
|
setOrgSlug(initialOrgSlug || "");
|
|
7077
7063
|
setOrgAvatarUrl(initialOrgAvatarUrl || "");
|
|
@@ -7092,8 +7078,6 @@ var UniversalSettings2 = ({
|
|
|
7092
7078
|
// src/components/UniversalDeveloperSettings.tsx
|
|
7093
7079
|
var import_react103 = __toESM(require("react"));
|
|
7094
7080
|
var import_react_hot_toast20 = require("react-hot-toast");
|
|
7095
|
-
var import_react104 = require("@hugeicons/react");
|
|
7096
|
-
var import_core_free_icons41 = require("@hugeicons/core-free-icons");
|
|
7097
7081
|
var UniversalDeveloperSettings = ({
|
|
7098
7082
|
initialPublicKey,
|
|
7099
7083
|
initialWebhookUrl,
|
|
@@ -7166,15 +7150,7 @@ AUDDITUR_SECRET_KEY="${secKey}"
|
|
|
7166
7150
|
};
|
|
7167
7151
|
const hasWebhookChanges = webhookUrl !== initialWebhookUrl;
|
|
7168
7152
|
const isWebhookSaveDisabled = isSavingWebhook || isReadOnly || !hasWebhookChanges;
|
|
7169
|
-
return /* @__PURE__ */ import_react103.default.createElement("div", { className: "flex flex-col max-w-3xl rounded-2xl p-6 bg-white gap-8 animate-in fade-in duration-300 min-h-full" }, /* @__PURE__ */ import_react103.default.createElement(ManagedToaster, null), /* @__PURE__ */ import_react103.default.createElement("div", { className: "flex flex-col sm:flex-row sm:items-start justify-between gap-3 sm:gap-4" }, /* @__PURE__ */ import_react103.default.createElement("div", { className: "flex flex-col min-w-0 gap-1" }, /* @__PURE__ */ import_react103.default.createElement("div", { className: "flex items-center gap-2" }, /* @__PURE__ */ import_react103.default.createElement(
|
|
7170
|
-
"button",
|
|
7171
|
-
{
|
|
7172
|
-
onClick: () => window.dispatchEvent(new Event("open-sidebar")),
|
|
7173
|
-
className: "md:hidden flex shrink-0 items-center justify-center w-7 h-7 bg-white rounded-full text-black transition-all duration-300 outline-none hover:bg-stone-50",
|
|
7174
|
-
"aria-label": "Open Menu"
|
|
7175
|
-
},
|
|
7176
|
-
/* @__PURE__ */ import_react103.default.createElement(import_react104.HugeiconsIcon, { icon: import_core_free_icons41.SidebarLeft01Icon, size: 16 })
|
|
7177
|
-
), /* @__PURE__ */ import_react103.default.createElement("h1", { className: "font-serif text-xl text-black truncate tracking-tight" }, "Developer Settings")), /* @__PURE__ */ import_react103.default.createElement("p", { className: "text-xs text-neutral-500 truncate" }, "Manage your API credentials and webhook integrations.")), isReadOnly && /* @__PURE__ */ import_react103.default.createElement("span", { className: "px-3 py-1 bg-neutral-50 text-neutral-500 rounded-full text-[10px] tracking-[0.2em] shrink-0 w-fit sm:mt-1" }, "Read Only Access")), /* @__PURE__ */ import_react103.default.createElement("div", { className: "w-full max-w-2xl flex flex-col gap-12" }, /* @__PURE__ */ import_react103.default.createElement("div", { className: "flex flex-col gap-6" }, /* @__PURE__ */ import_react103.default.createElement("div", { className: "space-y-2 min-w-0" }, /* @__PURE__ */ import_react103.default.createElement(
|
|
7153
|
+
return /* @__PURE__ */ import_react103.default.createElement("div", { className: "flex flex-col max-w-3xl rounded-2xl p-6 bg-white gap-8 animate-in fade-in duration-300 min-h-full" }, /* @__PURE__ */ import_react103.default.createElement(ManagedToaster, null), /* @__PURE__ */ import_react103.default.createElement("div", { className: "flex flex-col sm:flex-row sm:items-start justify-between gap-3 sm:gap-4" }, /* @__PURE__ */ import_react103.default.createElement("div", { className: "flex flex-col min-w-0 gap-1" }, /* @__PURE__ */ import_react103.default.createElement("div", { className: "flex items-center" }, /* @__PURE__ */ import_react103.default.createElement("h1", { className: "font-serif text-xl text-black truncate tracking-tight" }, "Developer Settings")), /* @__PURE__ */ import_react103.default.createElement("p", { className: "text-xs text-neutral-500 truncate" }, "Manage your API credentials and webhook integrations.")), isReadOnly && /* @__PURE__ */ import_react103.default.createElement("span", { className: "px-3 py-1 bg-neutral-50 text-neutral-500 rounded-full text-[10px] tracking-[0.2em] shrink-0 w-fit sm:mt-1" }, "Read Only Access")), /* @__PURE__ */ import_react103.default.createElement("div", { className: "w-full max-w-2xl flex flex-col gap-12" }, /* @__PURE__ */ import_react103.default.createElement("div", { className: "flex flex-col gap-6" }, /* @__PURE__ */ import_react103.default.createElement("div", { className: "space-y-2 min-w-0" }, /* @__PURE__ */ import_react103.default.createElement(
|
|
7178
7154
|
TextInput,
|
|
7179
7155
|
{
|
|
7180
7156
|
label: "Public Key",
|
|
@@ -7239,9 +7215,9 @@ AUDDITUR_SECRET_KEY="${secKey}"
|
|
|
7239
7215
|
};
|
|
7240
7216
|
|
|
7241
7217
|
// src/components/UniversalApplicationPage2.tsx
|
|
7242
|
-
var
|
|
7243
|
-
var
|
|
7244
|
-
var
|
|
7218
|
+
var import_react104 = __toESM(require("react"));
|
|
7219
|
+
var import_react105 = require("@hugeicons/react");
|
|
7220
|
+
var import_core_free_icons41 = require("@hugeicons/core-free-icons");
|
|
7245
7221
|
var UniversalApplicationPage2 = ({
|
|
7246
7222
|
userRole = "MEMBER",
|
|
7247
7223
|
applications,
|
|
@@ -7257,9 +7233,9 @@ var UniversalApplicationPage2 = ({
|
|
|
7257
7233
|
onCreateApplication
|
|
7258
7234
|
}) => {
|
|
7259
7235
|
const canManage = userRole === "ADMIN" || userRole === "MANAGER" || userRole === "OWNER";
|
|
7260
|
-
const [showStatusModal, setShowStatusModal] = (0,
|
|
7261
|
-
const [localSearchQuery, setLocalSearchQuery] = (0,
|
|
7262
|
-
const typingTimer = (0,
|
|
7236
|
+
const [showStatusModal, setShowStatusModal] = (0, import_react104.useState)(false);
|
|
7237
|
+
const [localSearchQuery, setLocalSearchQuery] = (0, import_react104.useState)(searchQuery);
|
|
7238
|
+
const typingTimer = (0, import_react104.useRef)(null);
|
|
7263
7239
|
const handleSearchInput = (e) => {
|
|
7264
7240
|
const val = e.target.value;
|
|
7265
7241
|
setLocalSearchQuery(val);
|
|
@@ -7277,15 +7253,7 @@ var UniversalApplicationPage2 = ({
|
|
|
7277
7253
|
"QUERIED",
|
|
7278
7254
|
"AWAITING_PAYMENT"
|
|
7279
7255
|
];
|
|
7280
|
-
return /* @__PURE__ */
|
|
7281
|
-
"button",
|
|
7282
|
-
{
|
|
7283
|
-
onClick: () => window.dispatchEvent(new Event("open-sidebar")),
|
|
7284
|
-
className: "md:hidden flex shrink-0 items-center justify-center w-7 h-7 bg-white rounded-full text-black transition-all duration-300 outline-none hover:bg-stone-50",
|
|
7285
|
-
"aria-label": "Open Menu"
|
|
7286
|
-
},
|
|
7287
|
-
/* @__PURE__ */ import_react105.default.createElement(import_react106.HugeiconsIcon, { icon: import_core_free_icons42.SidebarLeft01Icon, size: 16 })
|
|
7288
|
-
), /* @__PURE__ */ import_react105.default.createElement("h1", { className: "text-black text-xl tracking-tight" }, "Applications Directory")), /* @__PURE__ */ import_react105.default.createElement("p", { className: "text-xs text-stone-500" }, "Search, filter, and track all your organizational applications.")), /* @__PURE__ */ import_react105.default.createElement("div", { className: "flex flex-row flex-nowrap mb-2 items-center justify-between gap-4 w-full px-1" }, /* @__PURE__ */ import_react105.default.createElement("div", { className: "relative flex-1 min-w-0 max-w-full" }, /* @__PURE__ */ import_react105.default.createElement("div", { className: "absolute inset-y-0 left-0 pl-4 flex items-center pointer-events-none" }, /* @__PURE__ */ import_react105.default.createElement(import_react106.HugeiconsIcon, { icon: import_core_free_icons42.Search01Icon, size: 16, className: "text-stone-400" })), /* @__PURE__ */ import_react105.default.createElement(
|
|
7256
|
+
return /* @__PURE__ */ import_react104.default.createElement("div", { className: "w-full max-w-3xl mx-auto flex flex-col animate-in fade-in duration-300 relative" }, /* @__PURE__ */ import_react104.default.createElement("div", { className: "flex flex-col gap-1 mb-8 px-1" }, /* @__PURE__ */ import_react104.default.createElement("div", { className: "flex items-center" }, /* @__PURE__ */ import_react104.default.createElement("h1", { className: "text-black text-xl tracking-tight" }, "Applications Directory")), /* @__PURE__ */ import_react104.default.createElement("p", { className: "text-xs text-stone-500" }, "Search, filter, and track all your organizational applications.")), /* @__PURE__ */ import_react104.default.createElement("div", { className: "flex flex-row flex-nowrap mb-2 items-center justify-between gap-4 w-full px-1" }, /* @__PURE__ */ import_react104.default.createElement("div", { className: "relative flex-1 min-w-0 max-w-full" }, /* @__PURE__ */ import_react104.default.createElement("div", { className: "absolute inset-y-0 left-0 pl-4 flex items-center pointer-events-none" }, /* @__PURE__ */ import_react104.default.createElement(import_react105.HugeiconsIcon, { icon: import_core_free_icons41.Search01Icon, size: 16, className: "text-stone-400" })), /* @__PURE__ */ import_react104.default.createElement(
|
|
7289
7257
|
"input",
|
|
7290
7258
|
{
|
|
7291
7259
|
type: "text",
|
|
@@ -7294,15 +7262,15 @@ var UniversalApplicationPage2 = ({
|
|
|
7294
7262
|
onChange: handleSearchInput,
|
|
7295
7263
|
className: "w-full pl-10 pr-4 py-2.5 bg-white rounded-full text-sm text-black placeholder-stone-400 outline-none transition-colors focus:border-[#d97757] border border-transparent shadow-[0_2px_10px_rgba(0,0,0,0.02)]"
|
|
7296
7264
|
}
|
|
7297
|
-
)), /* @__PURE__ */
|
|
7265
|
+
)), /* @__PURE__ */ import_react104.default.createElement("div", { className: "flex items-center gap-3 w-auto pb-0 shrink-0" }, /* @__PURE__ */ import_react104.default.createElement(
|
|
7298
7266
|
"button",
|
|
7299
7267
|
{
|
|
7300
7268
|
onClick: () => setShowStatusModal(true),
|
|
7301
7269
|
className: "flex items-center justify-center bg-white shadow-[0_2px_10px_rgba(0,0,0,0.02)] w-10 h-10 rounded-full text-stone-500 hover:text-black transition-colors outline-none relative"
|
|
7302
7270
|
},
|
|
7303
|
-
/* @__PURE__ */
|
|
7304
|
-
activeStatusFilter !== "ALL" && /* @__PURE__ */
|
|
7305
|
-
))), /* @__PURE__ */
|
|
7271
|
+
/* @__PURE__ */ import_react104.default.createElement(import_react105.HugeiconsIcon, { icon: import_core_free_icons41.SearchList02Icon, size: 18 }),
|
|
7272
|
+
activeStatusFilter !== "ALL" && /* @__PURE__ */ import_react104.default.createElement("span", { className: "absolute top-2 right-2 w-2 h-2 bg-[#d97757] rounded-full border border-white" })
|
|
7273
|
+
))), /* @__PURE__ */ import_react104.default.createElement("div", { className: "w-full mt-2" }, /* @__PURE__ */ import_react104.default.createElement(
|
|
7306
7274
|
UniversalApplicationsPage,
|
|
7307
7275
|
{
|
|
7308
7276
|
headerTitle: "Recent Filings",
|
|
@@ -7315,7 +7283,7 @@ var UniversalApplicationPage2 = ({
|
|
|
7315
7283
|
onApplicationClick,
|
|
7316
7284
|
onCreateApplication: canManage ? onCreateApplication : void 0
|
|
7317
7285
|
}
|
|
7318
|
-
)), /* @__PURE__ */
|
|
7286
|
+
)), /* @__PURE__ */ import_react104.default.createElement(
|
|
7319
7287
|
ReusableOptions,
|
|
7320
7288
|
{
|
|
7321
7289
|
isOpen: showStatusModal,
|
|
@@ -7330,6 +7298,165 @@ var UniversalApplicationPage2 = ({
|
|
|
7330
7298
|
}
|
|
7331
7299
|
));
|
|
7332
7300
|
};
|
|
7301
|
+
|
|
7302
|
+
// src/components/UniversalApplicationDetails.tsx
|
|
7303
|
+
var import_react106 = __toESM(require("react"));
|
|
7304
|
+
var import_react107 = require("@hugeicons/react");
|
|
7305
|
+
var import_core_free_icons42 = require("@hugeicons/core-free-icons");
|
|
7306
|
+
var formatType2 = (type) => type.split("_").map((w) => w[0] + w.slice(1).toLowerCase()).join(" ");
|
|
7307
|
+
var UniversalApplicationDetails = ({
|
|
7308
|
+
onBackHref,
|
|
7309
|
+
application,
|
|
7310
|
+
canDelete,
|
|
7311
|
+
onDeleteSubmit
|
|
7312
|
+
}) => {
|
|
7313
|
+
const [isDeleting, setIsDeleting] = (0, import_react106.useState)(false);
|
|
7314
|
+
const [confirmDialog, setConfirmDialog] = (0, import_react106.useState)(false);
|
|
7315
|
+
const isLockedStatus = ["COMPLETED", "PENDING", "REJECTED", "QUERIED"].includes(application.status);
|
|
7316
|
+
const deletePermitted = canDelete && !isLockedStatus;
|
|
7317
|
+
const handleDelete = async () => {
|
|
7318
|
+
setIsDeleting(true);
|
|
7319
|
+
try {
|
|
7320
|
+
await onDeleteSubmit();
|
|
7321
|
+
setConfirmDialog(false);
|
|
7322
|
+
} catch (error) {
|
|
7323
|
+
}
|
|
7324
|
+
setIsDeleting(false);
|
|
7325
|
+
};
|
|
7326
|
+
return /* @__PURE__ */ import_react106.default.createElement("div", { className: "w-full max-w-3xl mx-auto flex flex-col animate-in fade-in duration-300 relative" }, /* @__PURE__ */ import_react106.default.createElement(ManagedToaster, null), /* @__PURE__ */ import_react106.default.createElement(
|
|
7327
|
+
ConfirmationDialog,
|
|
7328
|
+
{
|
|
7329
|
+
isOpen: confirmDialog,
|
|
7330
|
+
title: "Delete Application",
|
|
7331
|
+
message: "Are you sure you want to permanently delete this application and its assets? This action cannot be undone.",
|
|
7332
|
+
confirmText: "Delete Application",
|
|
7333
|
+
cancelText: "Cancel",
|
|
7334
|
+
isProcessing: isDeleting,
|
|
7335
|
+
isDestructive: true,
|
|
7336
|
+
onClose: () => setConfirmDialog(false),
|
|
7337
|
+
onConfirm: handleDelete
|
|
7338
|
+
}
|
|
7339
|
+
), /* @__PURE__ */ import_react106.default.createElement("div", { className: "mb-6 flex w-full items-center px-1" }, /* @__PURE__ */ import_react106.default.createElement("a", { href: onBackHref, className: "flex items-center gap-2 text-[#d97757] hover:text-[#d97757] transition-colors text-sm outline-none" }, /* @__PURE__ */ import_react106.default.createElement(import_react107.HugeiconsIcon, { icon: import_core_free_icons42.ArrowLeft01Icon, size: 16 }), " Back")), /* @__PURE__ */ import_react106.default.createElement("div", { className: "mb-8 px-1 flex flex-col sm:flex-row sm:items-center justify-between gap-4" }, /* @__PURE__ */ import_react106.default.createElement("div", null, /* @__PURE__ */ import_react106.default.createElement("h1", { className: "text-black text-xl tracking-tight" }, "Application Details"), /* @__PURE__ */ import_react106.default.createElement("p", { className: "text-xs text-stone-500" }, "Review your filing entity and access its workspace.")), /* @__PURE__ */ import_react106.default.createElement("div", { className: "px-4 py-1.5 bg-stone-100 text-stone-600 rounded-full text-xs self-start sm:self-auto uppercase tracking-widest font-medium" }, application.status)), /* @__PURE__ */ import_react106.default.createElement("div", { className: "flex flex-col gap-8 animate-in rounded-2xl p-6 bg-white fade-in duration-300" }, /* @__PURE__ */ import_react106.default.createElement("div", { className: "flex flex-col gap-1 w-full" }, /* @__PURE__ */ import_react106.default.createElement("label", { className: "text-xs text-stone-400 tracking-[0.2em] block" }, "Target Company"), /* @__PURE__ */ import_react106.default.createElement("span", { className: "text-sm text-black py-2 font-medium" }, application.name)), /* @__PURE__ */ import_react106.default.createElement("div", { className: "flex flex-col gap-1 w-full border-t border-stone-100 pt-6" }, /* @__PURE__ */ import_react106.default.createElement("label", { className: "text-xs text-stone-400 tracking-[0.2em] block" }, "Filing Type"), /* @__PURE__ */ import_react106.default.createElement("span", { className: "text-sm text-black py-2" }, formatType2(application.type))), /* @__PURE__ */ import_react106.default.createElement("div", { className: "flex flex-col sm:flex-row items-center gap-3 pt-6 mt-2 border-t border-stone-100" }, /* @__PURE__ */ import_react106.default.createElement("a", { href: `/app/applications/app/${application.id}`, className: "flex-1 w-full py-2.5 bg-[#d97757] text-white rounded-full text-center text-xs transition-colors hover:bg-[#d97757]/90" }, "Open Application"), /* @__PURE__ */ import_react106.default.createElement("a", { href: `/app/applications/assets/${application.id}`, className: "flex-1 w-full py-2.5 bg-transparent border border-stone-200 text-black rounded-full text-center text-xs transition-colors hover:bg-stone-50" }, "Application Assets"), deletePermitted && /* @__PURE__ */ import_react106.default.createElement("button", { onClick: () => setConfirmDialog(true), className: "flex-1 w-full py-2.5 bg-transparent border border-stone-200 text-black rounded-full text-center text-xs transition-colors hover:bg-stone-50" }, "Delete Application"))));
|
|
7340
|
+
};
|
|
7341
|
+
|
|
7342
|
+
// src/components/UniversalCreateApplication.tsx
|
|
7343
|
+
var import_react108 = __toESM(require("react"));
|
|
7344
|
+
var import_react_hot_toast21 = __toESM(require("react-hot-toast"));
|
|
7345
|
+
var import_react109 = require("@hugeicons/react");
|
|
7346
|
+
var import_core_free_icons43 = require("@hugeicons/core-free-icons");
|
|
7347
|
+
var MemberAvatar6 = ({ src, sizeClass = "w-10 h-10" }) => {
|
|
7348
|
+
const [loaded, setLoaded] = (0, import_react108.useState)(false);
|
|
7349
|
+
const [error, setError] = (0, import_react108.useState)(false);
|
|
7350
|
+
const defaultAvatar = "https://storage.googleapis.com/retina-cloud-v2/assets/images/avatar.avif";
|
|
7351
|
+
return /* @__PURE__ */ import_react108.default.createElement("div", { className: `relative shrink-0 ${sizeClass}` }, /* @__PURE__ */ import_react108.default.createElement("div", { className: "w-full h-full rounded-lg bg-stone-100 flex items-center justify-center overflow-hidden" }, !loaded && !error && /* @__PURE__ */ import_react108.default.createElement(import_react109.HugeiconsIcon, { icon: import_core_free_icons43.Loading03Icon, className: "animate-spin text-stone-400 absolute", size: 14 }), /* @__PURE__ */ import_react108.default.createElement("img", { src: error || !src ? defaultAvatar : src, alt: "Avatar", className: `w-full h-full object-cover transition-opacity duration-300 ${loaded || error ? "opacity-100" : "opacity-0"}`, onLoad: () => setLoaded(true), onError: () => setError(true) })));
|
|
7352
|
+
};
|
|
7353
|
+
var APPLICATION_TYPES = [
|
|
7354
|
+
"COMPANY_REGISTRATION",
|
|
7355
|
+
"BUSINESS_NAME",
|
|
7356
|
+
"NGO_INCORPORATION",
|
|
7357
|
+
"TRADEMARK",
|
|
7358
|
+
"COPYRIGHT",
|
|
7359
|
+
"PATENT",
|
|
7360
|
+
"NDPC",
|
|
7361
|
+
"GDPR",
|
|
7362
|
+
"SCUML_CERTIFICATE",
|
|
7363
|
+
"TAX_FILING",
|
|
7364
|
+
"TIN_APPLICATION",
|
|
7365
|
+
"VAT_REGISTRATION",
|
|
7366
|
+
"ANNUAL_RETURNS",
|
|
7367
|
+
"CHANGE_OF_DIRECTORS",
|
|
7368
|
+
"CHANGE_OF_NAME",
|
|
7369
|
+
"NAFDAC_REGISTRATION",
|
|
7370
|
+
"OTHER"
|
|
7371
|
+
];
|
|
7372
|
+
var formatType3 = (type) => type.split("_").map((w) => w[0] + w.slice(1).toLowerCase()).join(" ");
|
|
7373
|
+
var FORMATTED_TYPES = APPLICATION_TYPES.map(formatType3);
|
|
7374
|
+
var UniversalCreateApplication = ({
|
|
7375
|
+
onBackHref,
|
|
7376
|
+
userRole = "MEMBER",
|
|
7377
|
+
members,
|
|
7378
|
+
isMembersLoading,
|
|
7379
|
+
membersCurrentPage,
|
|
7380
|
+
membersTotalPages,
|
|
7381
|
+
onMembersPageChange,
|
|
7382
|
+
membersSearchQuery,
|
|
7383
|
+
onMembersSearchChange,
|
|
7384
|
+
companies,
|
|
7385
|
+
isCompaniesLoading,
|
|
7386
|
+
companiesCurrentPage,
|
|
7387
|
+
companiesTotalPages,
|
|
7388
|
+
onCompaniesPageChange,
|
|
7389
|
+
companiesSearchQuery,
|
|
7390
|
+
onCompaniesSearchChange,
|
|
7391
|
+
onCreateSubmit
|
|
7392
|
+
}) => {
|
|
7393
|
+
const canManage = userRole === "ADMIN" || userRole === "MANAGER" || userRole === "OWNER";
|
|
7394
|
+
const [creationMode, setCreationMode] = (0, import_react108.useState)("EXISTING");
|
|
7395
|
+
const [selectedTypeFormatted, setSelectedTypeFormatted] = (0, import_react108.useState)("Company Registration");
|
|
7396
|
+
const [selectedCompanyId, setSelectedCompanyId] = (0, import_react108.useState)(null);
|
|
7397
|
+
const [newCompanyName, setNewCompanyName] = (0, import_react108.useState)("");
|
|
7398
|
+
const [isPrivate, setIsPrivate] = (0, import_react108.useState)(false);
|
|
7399
|
+
const [selectedParticipants, setSelectedParticipants] = (0, import_react108.useState)(/* @__PURE__ */ new Set());
|
|
7400
|
+
const [isSubmitting, setIsSubmitting] = (0, import_react108.useState)(false);
|
|
7401
|
+
const [showTypeModal, setShowTypeModal] = (0, import_react108.useState)(false);
|
|
7402
|
+
const [showMembersModal, setShowMembersModal] = (0, import_react108.useState)(false);
|
|
7403
|
+
const [showCompaniesModal, setShowCompaniesModal] = (0, import_react108.useState)(false);
|
|
7404
|
+
const [localMemSearch, setLocalMemSearch] = (0, import_react108.useState)(membersSearchQuery);
|
|
7405
|
+
const memTimer = (0, import_react108.useRef)(null);
|
|
7406
|
+
const handleMemSearch = (e) => {
|
|
7407
|
+
const val = e.target.value;
|
|
7408
|
+
setLocalMemSearch(val);
|
|
7409
|
+
if (memTimer.current) clearTimeout(memTimer.current);
|
|
7410
|
+
memTimer.current = setTimeout(() => onMembersSearchChange(val), 500);
|
|
7411
|
+
};
|
|
7412
|
+
const [localCompSearch, setLocalCompSearch] = (0, import_react108.useState)(companiesSearchQuery);
|
|
7413
|
+
const compTimer = (0, import_react108.useRef)(null);
|
|
7414
|
+
const handleCompSearch = (e) => {
|
|
7415
|
+
const val = e.target.value;
|
|
7416
|
+
setLocalCompSearch(val);
|
|
7417
|
+
if (compTimer.current) clearTimeout(compTimer.current);
|
|
7418
|
+
compTimer.current = setTimeout(() => onCompaniesSearchChange(val), 500);
|
|
7419
|
+
};
|
|
7420
|
+
const toggleParticipant = (userId) => {
|
|
7421
|
+
if (!canManage) return;
|
|
7422
|
+
const newSet = new Set(selectedParticipants);
|
|
7423
|
+
if (newSet.has(userId)) newSet.delete(userId);
|
|
7424
|
+
else newSet.add(userId);
|
|
7425
|
+
setSelectedParticipants(newSet);
|
|
7426
|
+
};
|
|
7427
|
+
const handleSubmit = async (e) => {
|
|
7428
|
+
e.preventDefault();
|
|
7429
|
+
if (!canManage) return;
|
|
7430
|
+
const rawType = APPLICATION_TYPES[FORMATTED_TYPES.indexOf(selectedTypeFormatted)];
|
|
7431
|
+
if (!rawType) return import_react_hot_toast21.default.error("Please select a valid application type.");
|
|
7432
|
+
if (creationMode === "EXISTING" && !selectedCompanyId) return import_react_hot_toast21.default.error("Please select a company.");
|
|
7433
|
+
if (creationMode === "NEW" && newCompanyName.trim().length < 2) return import_react_hot_toast21.default.error("Company name is required.");
|
|
7434
|
+
setIsSubmitting(true);
|
|
7435
|
+
try {
|
|
7436
|
+
await onCreateSubmit({
|
|
7437
|
+
creationMode,
|
|
7438
|
+
companyId: creationMode === "EXISTING" ? selectedCompanyId : void 0,
|
|
7439
|
+
newCompany: creationMode === "NEW" ? {
|
|
7440
|
+
name: newCompanyName.trim(),
|
|
7441
|
+
isPrivate,
|
|
7442
|
+
assignedUsers: isPrivate ? Array.from(selectedParticipants) : []
|
|
7443
|
+
} : void 0,
|
|
7444
|
+
type: rawType
|
|
7445
|
+
});
|
|
7446
|
+
} catch (error) {
|
|
7447
|
+
import_react_hot_toast21.default.error(error.message || "Failed to create application.");
|
|
7448
|
+
setIsSubmitting(false);
|
|
7449
|
+
}
|
|
7450
|
+
};
|
|
7451
|
+
const activeCompany = companies.find((c) => c.id === selectedCompanyId);
|
|
7452
|
+
return /* @__PURE__ */ import_react108.default.createElement("div", { className: "w-full max-w-3xl mx-auto flex flex-col animate-in fade-in duration-300 relative" }, /* @__PURE__ */ import_react108.default.createElement(ManagedToaster, null), /* @__PURE__ */ import_react108.default.createElement("div", { className: "mb-6 flex w-full items-center px-1" }, /* @__PURE__ */ import_react108.default.createElement("a", { href: onBackHref, className: "flex items-center gap-2 text-[#d97757] hover:text-[#d97757] transition-colors text-sm outline-none" }, /* @__PURE__ */ import_react108.default.createElement(import_react109.HugeiconsIcon, { icon: import_core_free_icons43.ArrowLeft01Icon, size: 16 }), " Back")), /* @__PURE__ */ import_react108.default.createElement("div", { className: "flex flex-col gap-1 mb-6 px-1" }, /* @__PURE__ */ import_react108.default.createElement("h1", { className: "text-black text-xl tracking-tight" }, "Create Application"), /* @__PURE__ */ import_react108.default.createElement("p", { className: "text-xs text-stone-500" }, "Initiate a new registration or filing for a company.")), /* @__PURE__ */ import_react108.default.createElement("div", { className: "flex items-center gap-6 mb-6 px-1" }, /* @__PURE__ */ import_react108.default.createElement("button", { onClick: () => setCreationMode("EXISTING"), disabled: isSubmitting, className: `pb-2 text-sm outline-none transition-colors border-b-2 ${creationMode === "EXISTING" ? "border-black text-black" : "border-transparent text-stone-500 hover:text-black"}` }, "Select Company"), /* @__PURE__ */ import_react108.default.createElement("button", { onClick: () => setCreationMode("NEW"), disabled: isSubmitting, className: `pb-2 text-sm outline-none transition-colors border-b-2 ${creationMode === "NEW" ? "border-black text-black" : "border-transparent text-stone-500 hover:text-black"}` }, "New Company")), /* @__PURE__ */ import_react108.default.createElement("div", { className: "flex flex-col gap-8 animate-in rounded-2xl p-6 bg-white fade-in duration-300" }, /* @__PURE__ */ import_react108.default.createElement("form", { className: "flex flex-col gap-8", onSubmit: handleSubmit, autoComplete: "off" }, !canManage && /* @__PURE__ */ import_react108.default.createElement("div", { className: "flex items-start gap-3 p-4 bg-stone-50 rounded-xl" }, /* @__PURE__ */ import_react108.default.createElement(import_react109.HugeiconsIcon, { icon: import_core_free_icons43.CircleLock02Icon, size: 20, className: "text-stone-500 shrink-0 mt-0.5" }), /* @__PURE__ */ import_react108.default.createElement("div", { className: "flex flex-col" }, /* @__PURE__ */ import_react108.default.createElement("span", { className: "text-sm text-black tracking-tight" }, "Access Restricted"), /* @__PURE__ */ import_react108.default.createElement("span", { className: "text-xs text-stone-500 mt-1 leading-relaxed" }, "You lack clearance to create applications."))), creationMode === "EXISTING" ? /* @__PURE__ */ import_react108.default.createElement("div", { className: "space-y-1.5 w-full" }, /* @__PURE__ */ import_react108.default.createElement("label", { className: "text-xs text-stone-400 tracking-[0.2em] block" }, "Target Company"), /* @__PURE__ */ import_react108.default.createElement("div", { onClick: () => canManage && !isSubmitting && setShowCompaniesModal(true), className: `flex items-center relative w-full border-b border-stone-200 transition-all duration-300 pb-3 pt-3 ${!canManage || isSubmitting ? "opacity-50 pointer-events-none" : "hover:border-black cursor-pointer"}` }, /* @__PURE__ */ import_react108.default.createElement(import_react109.HugeiconsIcon, { icon: import_core_free_icons43.Building03Icon, size: 16, className: "text-stone-400 absolute left-0" }), /* @__PURE__ */ import_react108.default.createElement("span", { className: `w-full pl-8 text-sm truncate block ${activeCompany ? "text-black" : "text-stone-400"}` }, activeCompany ? activeCompany.name : "Select an existing company..."))) : /* @__PURE__ */ import_react108.default.createElement(import_react108.default.Fragment, null, /* @__PURE__ */ import_react108.default.createElement(TextInput, { label: "Company Name", value: newCompanyName, onChange: (val) => setNewCompanyName(val), disabled: isSubmitting || !canManage, placeholder: "e.g. Acme Innovations Ltd.", maxLength: 80 }), /* @__PURE__ */ import_react108.default.createElement("div", { className: `flex items-center justify-between py-2 mt-2 ${!canManage ? "opacity-50 pointer-events-none" : ""}` }, /* @__PURE__ */ import_react108.default.createElement("div", { className: "flex flex-col" }, /* @__PURE__ */ import_react108.default.createElement("span", { className: "text-sm text-black tracking-tight" }, "Private Company"), /* @__PURE__ */ import_react108.default.createElement("span", { className: "text-xs text-stone-500" }, "Only assigned members can view and access its applications.")), /* @__PURE__ */ import_react108.default.createElement("button", { type: "button", onClick: () => setIsPrivate(!isPrivate), disabled: !canManage || isSubmitting, className: `relative w-11 h-6 rounded-full transition-colors outline-none shrink-0 ${isPrivate ? "bg-[#d97757]" : "bg-stone-200"}` }, /* @__PURE__ */ import_react108.default.createElement("div", { className: `absolute top-1 left-1 bg-white w-4 h-4 rounded-full transition-transform ${isPrivate ? "translate-x-5" : "translate-x-0"}` }))), isPrivate && /* @__PURE__ */ import_react108.default.createElement("div", { className: `flex items-center justify-between animate-in fade-in zoom-in-95 duration-200 bg-stone-50 p-4 rounded-xl ${!canManage ? "opacity-50" : ""}` }, /* @__PURE__ */ import_react108.default.createElement("div", { className: "flex flex-col" }, /* @__PURE__ */ import_react108.default.createElement("span", { className: "text-xs text-black tracking-tight" }, "Assigned Members"), /* @__PURE__ */ import_react108.default.createElement("span", { className: "text-xs text-[#d97757] " }, selectedParticipants.size, " added")), /* @__PURE__ */ import_react108.default.createElement("button", { type: "button", onClick: () => setShowMembersModal(true), disabled: !canManage || isSubmitting, className: "px-4 py-2 border border-stone-200 text-black text-xs tracking-wide rounded-full hover:bg-white transition-colors outline-none bg-transparent" }, "Manage Access"))), /* @__PURE__ */ import_react108.default.createElement("div", { className: "space-y-1.5 w-full" }, /* @__PURE__ */ import_react108.default.createElement("label", { className: "text-xs text-stone-400 tracking-[0.2em] block" }, "Application Type"), /* @__PURE__ */ import_react108.default.createElement("div", { onClick: () => canManage && !isSubmitting && setShowTypeModal(true), className: `flex items-center relative w-full border-b border-stone-200 transition-all duration-300 pb-3 pt-3 ${!canManage || isSubmitting ? "opacity-50 pointer-events-none" : "hover:border-black cursor-pointer"}` }, /* @__PURE__ */ import_react108.default.createElement(import_react109.HugeiconsIcon, { icon: import_core_free_icons43.File02Icon, size: 16, className: "text-stone-400 absolute left-0" }), /* @__PURE__ */ import_react108.default.createElement("span", { className: "w-full pl-8 text-sm text-black truncate block" }, selectedTypeFormatted))), canManage && /* @__PURE__ */ import_react108.default.createElement("div", { className: "pt-6" }, /* @__PURE__ */ import_react108.default.createElement(ThreeDActionButton, { type: "submit", disabled: isSubmitting || creationMode === "EXISTING" && !selectedCompanyId || creationMode === "NEW" && newCompanyName.length < 2, isLoading: isSubmitting, className: "w-full sm:w-auto min-w-40" }, "Create Application")))), canManage && /* @__PURE__ */ import_react108.default.createElement(ReusableOptions, { isOpen: showTypeModal, onClose: () => setShowTypeModal(false), title: "Application Type", options: FORMATTED_TYPES, selectedOption: selectedTypeFormatted, onSelect: (t) => setSelectedTypeFormatted(t), showSearch: true }), showCompaniesModal && canManage && /* @__PURE__ */ import_react108.default.createElement("div", { className: "fixed inset-0 z-120 flex items-center justify-center p-4 pointer-events-auto" }, /* @__PURE__ */ import_react108.default.createElement("div", { className: "absolute inset-0 bg-black/30", onClick: () => setShowCompaniesModal(false) }), /* @__PURE__ */ import_react108.default.createElement("div", { className: "relative w-full max-w-md bg-white rounded-2xl flex flex-col overflow-hidden shadow-2xl animate-in zoom-in-95 duration-200 h-[80vh]" }, /* @__PURE__ */ import_react108.default.createElement("div", { className: "flex items-center justify-between p-5 shrink-0" }, /* @__PURE__ */ import_react108.default.createElement("h3", { className: "text-sm text-black tracking-tight" }, "Select Company"), /* @__PURE__ */ import_react108.default.createElement("button", { onClick: () => setShowCompaniesModal(false), className: "text-[#d97757] outline-none text-sm" }, "Close")), /* @__PURE__ */ import_react108.default.createElement("div", { className: "p-4 shrink-0" }, /* @__PURE__ */ import_react108.default.createElement("div", { className: "relative w-full" }, /* @__PURE__ */ import_react108.default.createElement(import_react109.HugeiconsIcon, { icon: import_core_free_icons43.Search01Icon, size: 16, className: "text-stone-400 absolute left-4 top-1/2 -translate-y-1/2 pointer-events-none" }), /* @__PURE__ */ import_react108.default.createElement("input", { type: "text", placeholder: "Search companies...", value: localCompSearch, onChange: handleCompSearch, className: "w-full pl-10 pr-4 py-2.5 bg-stone-100 rounded-full focus:border-[#d97757] border border-transparent text-sm text-black outline-none focus:bg-stone-200 transition-colors" }))), /* @__PURE__ */ import_react108.default.createElement("div", { className: "flex-1 overflow-y-auto custom-scrollbar p-2" }, isCompaniesLoading ? /* @__PURE__ */ import_react108.default.createElement("div", { className: "absolute inset-0 flex items-center justify-center" }, /* @__PURE__ */ import_react108.default.createElement(import_react109.HugeiconsIcon, { icon: import_core_free_icons43.Loading03Icon, size: 28, className: "animate-spin text-black" })) : companies.length === 0 ? /* @__PURE__ */ import_react108.default.createElement("div", { className: "p-8 text-center text-xs text-stone-400" }, "No companies available.") : companies.map((comp) => /* @__PURE__ */ import_react108.default.createElement("div", { key: comp.id, onClick: () => {
|
|
7453
|
+
setSelectedCompanyId(comp.id);
|
|
7454
|
+
setShowCompaniesModal(false);
|
|
7455
|
+
}, className: "flex items-center justify-between p-3 rounded-xl cursor-pointer hover:bg-stone-50 transition-colors" }, /* @__PURE__ */ import_react108.default.createElement("div", { className: "flex flex-col min-w-0 flex-1 pl-2" }, /* @__PURE__ */ import_react108.default.createElement("span", { className: "text-sm text-black truncate" }, comp.name), comp.isPrivate && /* @__PURE__ */ import_react108.default.createElement("span", { className: "text-[10px] text-[#d97757] mt-0.5 tracking-widest uppercase" }, "Private")), selectedCompanyId === comp.id && /* @__PURE__ */ import_react108.default.createElement(import_react109.HugeiconsIcon, { icon: import_core_free_icons43.Tick02Icon, size: 16, className: "text-[#d97757] mr-2" })))), /* @__PURE__ */ import_react108.default.createElement("div", { className: "p-4 flex items-center justify-between shrink-0 bg-white" }, /* @__PURE__ */ import_react108.default.createElement("span", { className: "text-xs text-stone-400 tracking-widest" }, "Page ", companiesCurrentPage, " of ", companiesTotalPages || 1), /* @__PURE__ */ import_react108.default.createElement("div", { className: "flex gap-1" }, /* @__PURE__ */ import_react108.default.createElement("button", { disabled: companiesCurrentPage <= 1 || isCompaniesLoading, onClick: () => onCompaniesPageChange(companiesCurrentPage - 1), className: "w-7 h-7 flex items-center justify-center rounded-full bg-white border border-stone-200 text-stone-600 disabled:opacity-30 outline-none hover:bg-stone-50" }, /* @__PURE__ */ import_react108.default.createElement(import_react109.HugeiconsIcon, { icon: import_core_free_icons43.ArrowLeft01Icon, size: 12 })), /* @__PURE__ */ import_react108.default.createElement("button", { disabled: companiesCurrentPage >= companiesTotalPages || isCompaniesLoading, onClick: () => onCompaniesPageChange(companiesCurrentPage + 1), className: "w-7 h-7 flex items-center justify-center rounded-full bg-white border border-stone-200 text-stone-600 disabled:opacity-30 outline-none hover:bg-stone-50" }, /* @__PURE__ */ import_react108.default.createElement(import_react109.HugeiconsIcon, { icon: import_core_free_icons43.ArrowRight01Icon, size: 12 })))))), showMembersModal && canManage && /* @__PURE__ */ import_react108.default.createElement("div", { className: "fixed inset-0 z-120 flex items-center justify-center p-4 pointer-events-auto" }, /* @__PURE__ */ import_react108.default.createElement("div", { className: "absolute inset-0 bg-black/30", onClick: () => setShowMembersModal(false) }), /* @__PURE__ */ import_react108.default.createElement("div", { className: "relative w-full max-w-md bg-white rounded-2xl flex flex-col overflow-hidden shadow-2xl animate-in zoom-in-95 duration-200 h-[80vh]" }, /* @__PURE__ */ import_react108.default.createElement("div", { className: "flex items-center justify-between p-5 shrink-0" }, /* @__PURE__ */ import_react108.default.createElement("h3", { className: "text-sm text-black tracking-tight" }, "Assign Members"), /* @__PURE__ */ import_react108.default.createElement("button", { onClick: () => setShowMembersModal(false), className: "text-[#d97757] outline-none text-sm" }, "Done")), /* @__PURE__ */ import_react108.default.createElement("div", { className: "p-4 shrink-0" }, /* @__PURE__ */ import_react108.default.createElement("div", { className: "relative w-full" }, /* @__PURE__ */ import_react108.default.createElement(import_react109.HugeiconsIcon, { icon: import_core_free_icons43.Search01Icon, size: 16, className: "text-stone-400 absolute left-4 top-1/2 -translate-y-1/2 pointer-events-none" }), /* @__PURE__ */ import_react108.default.createElement("input", { type: "text", placeholder: "Search team...", value: localMemSearch, onChange: handleMemSearch, className: "w-full pl-10 pr-4 py-2.5 bg-stone-100 rounded-full focus:border-[#d97757] border border-transparent text-sm text-black outline-none focus:bg-stone-200 transition-colors" }))), /* @__PURE__ */ import_react108.default.createElement("div", { className: "flex-1 overflow-y-auto custom-scrollbar p-2" }, isMembersLoading ? /* @__PURE__ */ import_react108.default.createElement("div", { className: "absolute inset-0 flex items-center justify-center" }, /* @__PURE__ */ import_react108.default.createElement(import_react109.HugeiconsIcon, { icon: import_core_free_icons43.Loading03Icon, size: 28, className: "animate-spin text-black" })) : members.length === 0 ? /* @__PURE__ */ import_react108.default.createElement("div", { className: "p-8 text-center text-xs text-stone-400" }, "No members found.") : members.map((member) => {
|
|
7456
|
+
const isChecked = selectedParticipants.has(member.userId);
|
|
7457
|
+
return /* @__PURE__ */ import_react108.default.createElement("div", { key: member.id, onClick: () => toggleParticipant(member.userId), className: "flex items-center justify-between p-3 rounded-xl cursor-pointer hover:bg-stone-50 transition-colors select-none" }, /* @__PURE__ */ import_react108.default.createElement("div", { className: "flex items-center gap-3 min-w-0 flex-1" }, /* @__PURE__ */ import_react108.default.createElement(MemberAvatar6, { src: member.avatarUrl, sizeClass: "w-9 h-9" }), /* @__PURE__ */ import_react108.default.createElement("div", { className: "flex flex-col min-w-0 flex-1" }, /* @__PURE__ */ import_react108.default.createElement("span", { className: "text-sm text-black truncate" }, member.fullName), /* @__PURE__ */ import_react108.default.createElement("span", { className: "text-xs text-stone-400 capitalize truncate" }, member.role.toLowerCase()))), /* @__PURE__ */ import_react108.default.createElement("div", { className: "shrink-0 pl-3" }, /* @__PURE__ */ import_react108.default.createElement("div", { className: `w-5 h-5 rounded-full flex items-center justify-center transition-colors ${isChecked ? "bg-[#d97757]" : "border border-stone-300 bg-white"}` }, isChecked && /* @__PURE__ */ import_react108.default.createElement(import_react109.HugeiconsIcon, { icon: import_core_free_icons43.Tick02Icon, size: 14, className: "text-white" }))));
|
|
7458
|
+
})), /* @__PURE__ */ import_react108.default.createElement("div", { className: "p-4 flex items-center justify-between shrink-0 bg-white" }, /* @__PURE__ */ import_react108.default.createElement("span", { className: "text-xs text-stone-400 tracking-widest" }, "Page ", membersCurrentPage, " of ", membersTotalPages || 1), /* @__PURE__ */ import_react108.default.createElement("div", { className: "flex gap-1" }, /* @__PURE__ */ import_react108.default.createElement("button", { disabled: membersCurrentPage <= 1 || isMembersLoading, onClick: () => onMembersPageChange(membersCurrentPage - 1), className: "w-7 h-7 flex items-center justify-center rounded-full bg-white border border-stone-200 text-stone-600 disabled:opacity-30 outline-none hover:bg-stone-50" }, /* @__PURE__ */ import_react108.default.createElement(import_react109.HugeiconsIcon, { icon: import_core_free_icons43.ArrowLeft01Icon, size: 12 })), /* @__PURE__ */ import_react108.default.createElement("button", { disabled: membersCurrentPage >= membersTotalPages || isMembersLoading, onClick: () => onMembersPageChange(membersCurrentPage + 1), className: "w-7 h-7 flex items-center justify-center rounded-full bg-white border border-stone-200 text-stone-600 disabled:opacity-30 outline-none hover:bg-stone-50" }, /* @__PURE__ */ import_react108.default.createElement(import_react109.HugeiconsIcon, { icon: import_core_free_icons43.ArrowRight01Icon, size: 12 })))))));
|
|
7459
|
+
};
|
|
7333
7460
|
// Annotate the CommonJS export names for ESM import in node:
|
|
7334
7461
|
0 && (module.exports = {
|
|
7335
7462
|
AppBento2,
|
|
@@ -7364,11 +7491,13 @@ var UniversalApplicationPage2 = ({
|
|
|
7364
7491
|
TextInput,
|
|
7365
7492
|
ThreeDActionButton,
|
|
7366
7493
|
ThreeDButton,
|
|
7494
|
+
UniversalApplicationDetails,
|
|
7367
7495
|
UniversalApplicationPage2,
|
|
7368
7496
|
UniversalApplicationsPage,
|
|
7369
7497
|
UniversalBuyCryptoPage,
|
|
7370
7498
|
UniversalCardActionPage,
|
|
7371
7499
|
UniversalCardPage,
|
|
7500
|
+
UniversalCreateApplication,
|
|
7372
7501
|
UniversalCreateHuddle,
|
|
7373
7502
|
UniversalDeveloperSettings,
|
|
7374
7503
|
UniversalErrorView,
|
package/dist/index.mjs
CHANGED
|
@@ -6473,8 +6473,7 @@ import {
|
|
|
6473
6473
|
ArrowRight01Icon as ArrowRight01Icon17,
|
|
6474
6474
|
CancelCircleIcon as CancelCircleIcon14,
|
|
6475
6475
|
ArrowUpRight01Icon as ArrowUpRight01Icon4,
|
|
6476
|
-
Robot01Icon as Robot01Icon2
|
|
6477
|
-
SidebarLeft01Icon
|
|
6476
|
+
Robot01Icon as Robot01Icon2
|
|
6478
6477
|
} from "@hugeicons/core-free-icons";
|
|
6479
6478
|
var UniversalHome3 = ({
|
|
6480
6479
|
createApplicationAction,
|
|
@@ -6506,19 +6505,11 @@ var UniversalHome3 = ({
|
|
|
6506
6505
|
setIsResolving(false);
|
|
6507
6506
|
}
|
|
6508
6507
|
};
|
|
6509
|
-
return /* @__PURE__ */ React56.createElement("div", { className: "w-full max-w-3xl mx-auto flex flex-col animate-in fade-in duration-300 relative" }, /* @__PURE__ */ React56.createElement("div", { className: "flex items-center justify-between w-full pb-4" }, /* @__PURE__ */ React56.createElement("div", { className: "flex items-center gap-
|
|
6510
|
-
"button",
|
|
6511
|
-
{
|
|
6512
|
-
onClick: () => window.dispatchEvent(new Event("open-sidebar")),
|
|
6513
|
-
className: "md:hidden flex items-center justify-center w-7 h-7 bg-white rounded-full text-black transition-all duration-300 outline-none hover:bg-stone-50",
|
|
6514
|
-
"aria-label": "Open Menu"
|
|
6515
|
-
},
|
|
6516
|
-
/* @__PURE__ */ React56.createElement(HugeiconsIcon42, { icon: SidebarLeft01Icon, size: 16 })
|
|
6517
|
-
)), /* @__PURE__ */ React56.createElement("div", { className: "flex items-center gap-2 shrink-0" }, /* @__PURE__ */ React56.createElement(
|
|
6508
|
+
return /* @__PURE__ */ React56.createElement("div", { className: "w-full max-w-3xl mx-auto flex flex-col animate-in fade-in duration-300 relative" }, /* @__PURE__ */ React56.createElement("div", { className: "flex items-center justify-between w-full pb-4" }, /* @__PURE__ */ React56.createElement("div", { className: "flex items-center gap-2 shrink-0" }, /* @__PURE__ */ React56.createElement(
|
|
6518
6509
|
"button",
|
|
6519
6510
|
{
|
|
6520
6511
|
onClick: () => router.push("/app/ai"),
|
|
6521
|
-
className: "relative w-
|
|
6512
|
+
className: "relative w-9 h-9 flex items-center justify-center rounded-full bg-white outline-none hover:bg-stone-50 transition-colors"
|
|
6522
6513
|
},
|
|
6523
6514
|
/* @__PURE__ */ React56.createElement(HugeiconsIcon42, { icon: Robot01Icon2, size: 16, className: "text-black" })
|
|
6524
6515
|
), /* @__PURE__ */ React56.createElement(
|
|
@@ -6528,7 +6519,7 @@ var UniversalHome3 = ({
|
|
|
6528
6519
|
setShowNotifDialog(true);
|
|
6529
6520
|
setSelectedNotif(null);
|
|
6530
6521
|
},
|
|
6531
|
-
className: "relative w-
|
|
6522
|
+
className: "relative w-9 h-9 flex items-center justify-center rounded-full bg-white outline-none hover:bg-stone-50 transition-colors"
|
|
6532
6523
|
},
|
|
6533
6524
|
/* @__PURE__ */ React56.createElement(HugeiconsIcon42, { icon: Notification01Icon3, size: 16, className: "text-black" }),
|
|
6534
6525
|
hasUnreadNotifs && /* @__PURE__ */ React56.createElement("span", { className: "absolute top-2.5 right-2.5 w-2 h-2 bg-[#d97757] rounded-full border border-white" })
|
|
@@ -6542,7 +6533,7 @@ var UniversalHome3 = ({
|
|
|
6542
6533
|
/* @__PURE__ */ React56.createElement(
|
|
6543
6534
|
"img",
|
|
6544
6535
|
{
|
|
6545
|
-
src: "https://storage.googleapis.com/retina-cloud-v2/assets/images/
|
|
6536
|
+
src: "https://storage.googleapis.com/retina-cloud-v2/assets/images/create-file.avif",
|
|
6546
6537
|
alt: "New Application",
|
|
6547
6538
|
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 opacity-30"
|
|
6548
6539
|
}
|
|
@@ -6557,7 +6548,7 @@ var UniversalHome3 = ({
|
|
|
6557
6548
|
/* @__PURE__ */ React56.createElement(
|
|
6558
6549
|
"img",
|
|
6559
6550
|
{
|
|
6560
|
-
src: "https://storage.googleapis.com/retina-cloud-v2/assets/images/
|
|
6551
|
+
src: "https://storage.googleapis.com/retina-cloud-v2/assets/images/search-file.avif",
|
|
6561
6552
|
alt: "Check Application",
|
|
6562
6553
|
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 opacity-30"
|
|
6563
6554
|
}
|
|
@@ -6797,12 +6788,8 @@ import {
|
|
|
6797
6788
|
ArrowLeft01Icon as ArrowLeft01Icon23,
|
|
6798
6789
|
ArrowRight01Icon as ArrowRight01Icon18,
|
|
6799
6790
|
Loading03Icon as Loading03Icon32,
|
|
6800
|
-
Search01Icon as Search01Icon9,
|
|
6801
|
-
SearchList02Icon as SearchList02Icon4,
|
|
6802
|
-
ListSettingIcon as ListSettingIcon4,
|
|
6803
6791
|
CircleLock02Icon as CircleLock02Icon5,
|
|
6804
|
-
CloudUploadIcon as CloudUploadIcon2
|
|
6805
|
-
SidebarLeft01Icon as SidebarLeft01Icon3
|
|
6792
|
+
CloudUploadIcon as CloudUploadIcon2
|
|
6806
6793
|
} from "@hugeicons/core-free-icons";
|
|
6807
6794
|
var MemberAvatar5 = ({ src, status, sizeClass = "w-10 h-10" }) => {
|
|
6808
6795
|
const [loaded, setLoaded] = useState42(false);
|
|
@@ -7108,15 +7095,7 @@ var UniversalSettings2 = ({
|
|
|
7108
7095
|
tabs.push({ id: "ORGANIZATION", label: "Organization" });
|
|
7109
7096
|
}
|
|
7110
7097
|
tabs.push({ id: "ACCOUNT", label: "Profile" });
|
|
7111
|
-
return /* @__PURE__ */ React58.createElement("div", { className: "w-full max-w-3xl mx-auto flex flex-col animate-in fade-in duration-300" }, /* @__PURE__ */ React58.createElement(ManagedToaster, null), /* @__PURE__ */ React58.createElement("div", { className: "flex flex-col gap-1 mb-8 px-1" }, /* @__PURE__ */ React58.createElement("div", { className: "flex items-center
|
|
7112
|
-
"button",
|
|
7113
|
-
{
|
|
7114
|
-
onClick: () => window.dispatchEvent(new Event("open-sidebar")),
|
|
7115
|
-
className: "md:hidden flex shrink-0 items-center justify-center w-7 h-7 bg-white rounded-full text-black transition-all duration-300 outline-none hover:bg-stone-50",
|
|
7116
|
-
"aria-label": "Open Menu"
|
|
7117
|
-
},
|
|
7118
|
-
/* @__PURE__ */ React58.createElement(HugeiconsIcon44, { icon: SidebarLeft01Icon3, size: 16 })
|
|
7119
|
-
), /* @__PURE__ */ React58.createElement("h1", { className: "text-black text-xl tracking-tight" }, "System Settings")), /* @__PURE__ */ React58.createElement("p", { className: "text-xs text-stone-500" }, "Manage your workspace identity, team configurations, and AI billing parameters.")), /* @__PURE__ */ React58.createElement("div", { className: "flex items-center mb-4 w-full animate-in fade-in duration-300 px-2" }, /* @__PURE__ */ React58.createElement("div", { className: "flex items-center bg-white rounded-full p-1 sm:p-1.5 max-w-full overflow-x-auto custom-scrollbar" }, tabs.map((tab, idx) => {
|
|
7098
|
+
return /* @__PURE__ */ React58.createElement("div", { className: "w-full max-w-3xl mx-auto flex flex-col animate-in fade-in duration-300" }, /* @__PURE__ */ React58.createElement(ManagedToaster, null), /* @__PURE__ */ React58.createElement("div", { className: "flex flex-col gap-1 mb-8 px-1" }, /* @__PURE__ */ React58.createElement("div", { className: "flex items-center" }, /* @__PURE__ */ React58.createElement("h1", { className: "text-black text-xl tracking-tight" }, "System Settings")), /* @__PURE__ */ React58.createElement("p", { className: "text-xs text-stone-500" }, "Manage your workspace identity, team configurations, and AI billing parameters.")), /* @__PURE__ */ React58.createElement("div", { className: "flex items-center mb-4 w-full animate-in fade-in duration-300 px-2" }, /* @__PURE__ */ React58.createElement("div", { className: "flex items-center bg-white rounded-full p-1 sm:p-1.5 max-w-full overflow-x-auto custom-scrollbar" }, tabs.map((tab, idx) => {
|
|
7120
7099
|
const isActive = activeTab === tab.id;
|
|
7121
7100
|
return /* @__PURE__ */ React58.createElement(
|
|
7122
7101
|
"button",
|
|
@@ -7146,7 +7125,7 @@ var UniversalSettings2 = ({
|
|
|
7146
7125
|
onClose: () => setMemberToRemove(null),
|
|
7147
7126
|
onConfirm: handleConfirmRemove
|
|
7148
7127
|
}
|
|
7149
|
-
),
|
|
7128
|
+
), /* @__PURE__ */ React58.createElement("div", { className: "flex flex-col gap-8 p-6 rounded-2xl bg-white w-full" }, activeExpandedMember ? /* @__PURE__ */ React58.createElement("div", { className: "flex flex-col animate-in fade-in zoom-in-95 duration-300 w-full" }, /* @__PURE__ */ React58.createElement("div", { className: "mb-6 flex w-full items-center" }, /* @__PURE__ */ React58.createElement(
|
|
7150
7129
|
"button",
|
|
7151
7130
|
{
|
|
7152
7131
|
onClick: () => setExpandedId(null),
|
|
@@ -7166,7 +7145,7 @@ var UniversalSettings2 = ({
|
|
|
7166
7145
|
))))))) : /* @__PURE__ */ React58.createElement(React58.Fragment, null, /* @__PURE__ */ React58.createElement("div", { className: "flex flex-col gap-1" }, /* @__PURE__ */ React58.createElement("div", { className: "flex flex-row items-center justify-between gap-4" }, /* @__PURE__ */ React58.createElement("h2", { className: "text-black text-xl tracking-tight" }, isInviteMode ? "Add Member" : "Team Directory"), !isInviteMode && canManage && /* @__PURE__ */ React58.createElement("button", { onClick: () => setIsInviteMode(true), className: "shrink-0 px-4 py-1.5 border border-stone-200 text-black text-xs tracking-wide rounded-full hover:bg-stone-50 transition-colors outline-none" }, "Invite Team")), !isInviteMode && /* @__PURE__ */ React58.createElement("p", { className: "text-xs text-stone-500" }, "Manage members and access controls across your organization.")), /* @__PURE__ */ React58.createElement("div", { className: "w-full overflow-hidden" }, isInviteMode ? /* @__PURE__ */ React58.createElement("form", { onSubmit: handleInviteSubmit, className: "flex flex-col gap-8 animate-in fade-in duration-300" }, /* @__PURE__ */ React58.createElement("div", { className: "space-y-1.5 mt-2" }, /* @__PURE__ */ React58.createElement("label", { className: "text-xs text-stone-400 tracking-[0.2em] block" }, "Email Address"), /* @__PURE__ */ React58.createElement("input", { type: "email", value: inviteEmail, onChange: (e) => setInviteEmail(cleanEmailId(e.target.value)), required: true, autoFocus: true, className: "w-full px-2 py-3 bg-transparent text-sm border-b border-stone-200 text-black outline-none focus:border-black transition-all duration-300", placeholder: "name@company.com" })), /* @__PURE__ */ React58.createElement("div", { className: "flex flex-col gap-3" }, /* @__PURE__ */ React58.createElement(ThreeDActionButton, { type: "submit", disabled: inviteEmail.length < 5 || isInviting, isLoading: isInviting, className: "w-full" }, "Send Invitation"), /* @__PURE__ */ React58.createElement("button", { type: "button", onClick: () => {
|
|
7167
7146
|
setIsInviteMode(false);
|
|
7168
7147
|
setInviteEmail("");
|
|
7169
|
-
}, disabled: isInviting, className: "w-full flex items-center justify-center py-2.5 rounded-full border border-stone-200 text-black hover:bg-stone-50 transition-colors outline-none text-xs tracking-wide" }, "Cancel"))) : isMembersLoading || isTyping ? /* @__PURE__ */ React58.createElement(PageSpinner10, null) : /* @__PURE__ */ React58.createElement("div", { className: "flex flex-col min-w-0 animate-in fade-in duration-300" }, /* @__PURE__ */ React58.createElement("div", null, members.length === 0 ? /* @__PURE__ */ React58.createElement("p", { className: "text-xs text-stone-400 py-6 text-center" }, "No members found") : members.map((member) => /* @__PURE__ */ React58.createElement("div", { key: member.id, onClick: () => setExpandedId(member.id), className: "flex items-center justify-between py-3 hover:bg-stone-50 transition-colors cursor-pointer group min-w-0 px-3 -mx-3 rounded-xl" }, /* @__PURE__ */ React58.createElement("div", { className: "flex items-center gap-4 min-w-0 flex-1" }, /* @__PURE__ */ React58.createElement(MemberAvatar5, { src: member.avatarUrl, status: member.status }), /* @__PURE__ */ React58.createElement("div", { className: "min-w-0 flex-1 flex flex-col gap-0.5" }, /* @__PURE__ */ React58.createElement("p", { className: "text-sm text-black truncate" }, member.fullName), /* @__PURE__ */ React58.createElement("p", { className: "text-xs text-stone-500 capitalize truncate" }, member.role.toLowerCase())))))), /* @__PURE__ */ React58.createElement("div", { className: "flex items-center justify-between pt-6 mt-2 " }, /* @__PURE__ */ React58.createElement("span", { className: "text-xs text-stone-400 tracking-[0.2em]" }, "Page ", membersCurrentPage, " of ", membersTotalPages === 0 ? 1 : membersTotalPages), /* @__PURE__ */ React58.createElement("div", { className: "flex items-center gap-2" }, /* @__PURE__ */ React58.createElement("button", { onClick: () => onMembersPageChange(membersCurrentPage - 1), disabled: membersCurrentPage <= 1 || isMembersLoading, className: "p-2 bg-white border border-stone-200 rounded-full text-black hover:bg-stone-50 disabled:opacity-30 disabled:cursor-not-allowed transition-all outline-none" }, /* @__PURE__ */ React58.createElement(HugeiconsIcon44, { icon: ArrowLeft01Icon23, size: 14 })), /* @__PURE__ */ React58.createElement("button", { onClick: () => onMembersPageChange(membersCurrentPage + 1), disabled: membersCurrentPage >= membersTotalPages || isMembersLoading || membersTotalPages === 0, className: "p-2 bg-white border border-stone-200 rounded-full text-black hover:bg-stone-50 disabled:opacity-30 disabled:cursor-not-allowed transition-all outline-none" }, /* @__PURE__ */ React58.createElement(HugeiconsIcon44, { icon: ArrowRight01Icon18, size: 14 })))))))), /* @__PURE__ */ React58.createElement(ReusableOptions, { isOpen:
|
|
7148
|
+
}, disabled: isInviting, className: "w-full flex items-center justify-center py-2.5 rounded-full border border-stone-200 text-black hover:bg-stone-50 transition-colors outline-none text-xs tracking-wide" }, "Cancel"))) : isMembersLoading || isTyping ? /* @__PURE__ */ React58.createElement(PageSpinner10, null) : /* @__PURE__ */ React58.createElement("div", { className: "flex flex-col min-w-0 animate-in fade-in duration-300" }, /* @__PURE__ */ React58.createElement("div", null, members.length === 0 ? /* @__PURE__ */ React58.createElement("p", { className: "text-xs text-stone-400 py-6 text-center" }, "No members found") : members.map((member) => /* @__PURE__ */ React58.createElement("div", { key: member.id, onClick: () => setExpandedId(member.id), className: "flex items-center justify-between py-3 hover:bg-stone-50 transition-colors cursor-pointer group min-w-0 px-3 -mx-3 rounded-xl" }, /* @__PURE__ */ React58.createElement("div", { className: "flex items-center gap-4 min-w-0 flex-1" }, /* @__PURE__ */ React58.createElement(MemberAvatar5, { src: member.avatarUrl, status: member.status }), /* @__PURE__ */ React58.createElement("div", { className: "min-w-0 flex-1 flex flex-col gap-0.5" }, /* @__PURE__ */ React58.createElement("p", { className: "text-sm text-black truncate" }, member.fullName), /* @__PURE__ */ React58.createElement("p", { className: "text-xs text-stone-500 capitalize truncate" }, member.role.toLowerCase())))))), /* @__PURE__ */ React58.createElement("div", { className: "flex items-center justify-between pt-6 mt-2 " }, /* @__PURE__ */ React58.createElement("span", { className: "text-xs text-stone-400 tracking-[0.2em]" }, "Page ", membersCurrentPage, " of ", membersTotalPages === 0 ? 1 : membersTotalPages), /* @__PURE__ */ React58.createElement("div", { className: "flex items-center gap-2" }, /* @__PURE__ */ React58.createElement("button", { onClick: () => onMembersPageChange(membersCurrentPage - 1), disabled: membersCurrentPage <= 1 || isMembersLoading, className: "p-2 bg-white border border-stone-200 rounded-full text-black hover:bg-stone-50 disabled:opacity-30 disabled:cursor-not-allowed transition-all outline-none" }, /* @__PURE__ */ React58.createElement(HugeiconsIcon44, { icon: ArrowLeft01Icon23, size: 14 })), /* @__PURE__ */ React58.createElement("button", { onClick: () => onMembersPageChange(membersCurrentPage + 1), disabled: membersCurrentPage >= membersTotalPages || isMembersLoading || membersTotalPages === 0, className: "p-2 bg-white border border-stone-200 rounded-full text-black hover:bg-stone-50 disabled:opacity-30 disabled:cursor-not-allowed transition-all outline-none" }, /* @__PURE__ */ React58.createElement(HugeiconsIcon44, { icon: ArrowRight01Icon18, size: 14 })))))))), /* @__PURE__ */ React58.createElement(ReusableOptions, { isOpen: !!roleEditTarget, onClose: () => setRoleEditTarget(null), title: "Modify Access Role", options: ["ADMIN", "MANAGER", "MEMBER"], selectedOption: roleEditTarget?.role || "", onSelect: handleRoleUpdate })), activeTab === "ORGANIZATION" && isOrg && /* @__PURE__ */ React58.createElement("div", { className: "flex flex-col gap-8 animate-in rounded-2xl p-6 bg-white fade-in duration-300" }, /* @__PURE__ */ React58.createElement("div", { className: "flex items-start justify-between gap-4" }, /* @__PURE__ */ React58.createElement("div", { className: "flex items-center gap-4" }, /* @__PURE__ */ React58.createElement("div", { className: "relative group cursor-pointer shrink-0", onClick: () => canManage && !isSavingOrg ? orgFileInputRef.current?.click() : void 0 }, /* @__PURE__ */ React58.createElement(OrgAvatar3, { src: orgAvatarUrl, sizeClass: "w-14 h-14" }), canManage && /* @__PURE__ */ React58.createElement("div", { className: "absolute -bottom-1 -right-1 w-6 h-6 bg-white border border-stone-200 rounded-full flex items-center justify-center text-stone-500 group-hover:text-black transition-colors z-10" }, isUploadingOrgAvatar ? /* @__PURE__ */ React58.createElement(HugeiconsIcon44, { icon: Loading03Icon32, size: 12, className: "animate-spin" }) : /* @__PURE__ */ React58.createElement(HugeiconsIcon44, { icon: CloudUploadIcon2, size: 14 })), /* @__PURE__ */ React58.createElement("input", { type: "file", ref: orgFileInputRef, className: "hidden", accept: ".png, .jpg, .jpeg", onChange: (e) => handleFileSelect(e, "ORGANIZATION") })), /* @__PURE__ */ React58.createElement("div", null, /* @__PURE__ */ React58.createElement("h2", { className: "text-black text-xl mb-1 tracking-tight" }, "Workspace Details"), /* @__PURE__ */ React58.createElement("p", { className: "text-xs text-stone-500" }, "Manage your organizational identity and handles."))), !canManage && /* @__PURE__ */ React58.createElement("span", { className: "p-2 w-9 h-9 bg-stone-100 text-stone-400 rounded-full shrink-0" }, /* @__PURE__ */ React58.createElement(HugeiconsIcon44, { icon: CircleLock02Icon5, size: 18, className: "text-current" }))), /* @__PURE__ */ React58.createElement("form", { className: "flex flex-col gap-8 w-full max-w-5xl", onSubmit: handleSaveOrganization, autoComplete: "off" }, /* @__PURE__ */ React58.createElement(TextInput, { label: "Workspace Name", value: orgName, onChange: handleOrgNameChange, disabled: !canManage || isSavingOrg, placeholder: "Acme Corporation", maxLength: 50 }), /* @__PURE__ */ React58.createElement("div", { className: "space-y-1.5 relative w-full" }, /* @__PURE__ */ React58.createElement("label", { className: "text-xs text-stone-400 tracking-[0.2em] block" }, "Workspace Handle"), /* @__PURE__ */ React58.createElement("div", { className: "flex items-center relative w-full border-b border-stone-200 focus-within:border-black transition-all duration-300 overflow-hidden" }, /* @__PURE__ */ React58.createElement("input", { type: "text", value: orgSlug, disabled: !canManage || isSavingOrg, onChange: (e) => handleOrgSlugChange(e.target.value), spellCheck: "false", autoComplete: "off", className: "w-full pr-10 pl-0 py-3 text-sm bg-transparent text-black outline-none disabled:opacity-50 disabled:cursor-not-allowed", placeholder: "workspace-handle" }), /* @__PURE__ */ React58.createElement("div", { className: "absolute right-2 top-1/2 -translate-y-1/2" }, isCheckingSlug && /* @__PURE__ */ React58.createElement(InputSpinner4, null), !isCheckingSlug && canManage && orgSlug !== initialOrgSlug && orgSlug.length >= 3 && slugAvailable === false && /* @__PURE__ */ React58.createElement("span", { className: "inline-flex items-center justify-center w-4 h-4 rounded-full bg-[#d97757]/10" }, /* @__PURE__ */ React58.createElement("svg", { className: "w-2 h-2 text-[#d97757]", viewBox: "0 0 20 20", fill: "currentColor" }, /* @__PURE__ */ React58.createElement("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M4.293 4.293a1 1 0 011.414 0L10 8.586l4.293-4.293a1 1 0 111.414 1.414L11.414 10l4.293 4.293a1 1 0 01-1.414 1.414L10 11.414l-4.293 4.293a1 1 0 01-1.414-1.414L8.586 10 4.293 5.707a1 1 0 010-1.414z" }))), !isCheckingSlug && canManage && orgSlug !== initialOrgSlug && orgSlug.length >= 3 && slugAvailable === true && /* @__PURE__ */ React58.createElement("span", { className: "inline-flex items-center justify-center w-4 h-4 rounded-full bg-green-100" }, /* @__PURE__ */ React58.createElement("svg", { className: "w-2 h-2 text-green-600", viewBox: "0 0 20 20", fill: "currentColor" }, /* @__PURE__ */ React58.createElement("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M16.707 5.293a1 1 0 00-1.414 0L8 12.586 4.707 9.293a1 1 0 10-1.414 1.414l4 4a1 1 0 001.414 0l8-8a1 1 0 000-1.414z" })))))), /* @__PURE__ */ React58.createElement("div", { className: "pt-8 mt-2 flex items-center gap-4" }, /* @__PURE__ */ React58.createElement(ThreeDActionButton, { type: "submit", disabled: isOrgSaveDisabled, isLoading: isSavingOrg, className: "min-w-32" }, "Save Changes"), hasOrgChanges && !isSavingOrg && canManage && /* @__PURE__ */ React58.createElement("button", { type: "button", onClick: () => {
|
|
7170
7149
|
setOrgName(initialOrgName || "");
|
|
7171
7150
|
setOrgSlug(initialOrgSlug || "");
|
|
7172
7151
|
setOrgAvatarUrl(initialOrgAvatarUrl || "");
|
|
@@ -7187,8 +7166,6 @@ var UniversalSettings2 = ({
|
|
|
7187
7166
|
// src/components/UniversalDeveloperSettings.tsx
|
|
7188
7167
|
import React59, { useState as useState43, useEffect as useEffect25 } from "react";
|
|
7189
7168
|
import { toast as toast19 } from "react-hot-toast";
|
|
7190
|
-
import { HugeiconsIcon as HugeiconsIcon45 } from "@hugeicons/react";
|
|
7191
|
-
import { SidebarLeft01Icon as SidebarLeft01Icon4 } from "@hugeicons/core-free-icons";
|
|
7192
7169
|
var UniversalDeveloperSettings = ({
|
|
7193
7170
|
initialPublicKey,
|
|
7194
7171
|
initialWebhookUrl,
|
|
@@ -7261,15 +7238,7 @@ AUDDITUR_SECRET_KEY="${secKey}"
|
|
|
7261
7238
|
};
|
|
7262
7239
|
const hasWebhookChanges = webhookUrl !== initialWebhookUrl;
|
|
7263
7240
|
const isWebhookSaveDisabled = isSavingWebhook || isReadOnly || !hasWebhookChanges;
|
|
7264
|
-
return /* @__PURE__ */ React59.createElement("div", { className: "flex flex-col max-w-3xl rounded-2xl p-6 bg-white gap-8 animate-in fade-in duration-300 min-h-full" }, /* @__PURE__ */ React59.createElement(ManagedToaster, null), /* @__PURE__ */ React59.createElement("div", { className: "flex flex-col sm:flex-row sm:items-start justify-between gap-3 sm:gap-4" }, /* @__PURE__ */ React59.createElement("div", { className: "flex flex-col min-w-0 gap-1" }, /* @__PURE__ */ React59.createElement("div", { className: "flex items-center gap-2" }, /* @__PURE__ */ React59.createElement(
|
|
7265
|
-
"button",
|
|
7266
|
-
{
|
|
7267
|
-
onClick: () => window.dispatchEvent(new Event("open-sidebar")),
|
|
7268
|
-
className: "md:hidden flex shrink-0 items-center justify-center w-7 h-7 bg-white rounded-full text-black transition-all duration-300 outline-none hover:bg-stone-50",
|
|
7269
|
-
"aria-label": "Open Menu"
|
|
7270
|
-
},
|
|
7271
|
-
/* @__PURE__ */ React59.createElement(HugeiconsIcon45, { icon: SidebarLeft01Icon4, size: 16 })
|
|
7272
|
-
), /* @__PURE__ */ React59.createElement("h1", { className: "font-serif text-xl text-black truncate tracking-tight" }, "Developer Settings")), /* @__PURE__ */ React59.createElement("p", { className: "text-xs text-neutral-500 truncate" }, "Manage your API credentials and webhook integrations.")), isReadOnly && /* @__PURE__ */ React59.createElement("span", { className: "px-3 py-1 bg-neutral-50 text-neutral-500 rounded-full text-[10px] tracking-[0.2em] shrink-0 w-fit sm:mt-1" }, "Read Only Access")), /* @__PURE__ */ React59.createElement("div", { className: "w-full max-w-2xl flex flex-col gap-12" }, /* @__PURE__ */ React59.createElement("div", { className: "flex flex-col gap-6" }, /* @__PURE__ */ React59.createElement("div", { className: "space-y-2 min-w-0" }, /* @__PURE__ */ React59.createElement(
|
|
7241
|
+
return /* @__PURE__ */ React59.createElement("div", { className: "flex flex-col max-w-3xl rounded-2xl p-6 bg-white gap-8 animate-in fade-in duration-300 min-h-full" }, /* @__PURE__ */ React59.createElement(ManagedToaster, null), /* @__PURE__ */ React59.createElement("div", { className: "flex flex-col sm:flex-row sm:items-start justify-between gap-3 sm:gap-4" }, /* @__PURE__ */ React59.createElement("div", { className: "flex flex-col min-w-0 gap-1" }, /* @__PURE__ */ React59.createElement("div", { className: "flex items-center" }, /* @__PURE__ */ React59.createElement("h1", { className: "font-serif text-xl text-black truncate tracking-tight" }, "Developer Settings")), /* @__PURE__ */ React59.createElement("p", { className: "text-xs text-neutral-500 truncate" }, "Manage your API credentials and webhook integrations.")), isReadOnly && /* @__PURE__ */ React59.createElement("span", { className: "px-3 py-1 bg-neutral-50 text-neutral-500 rounded-full text-[10px] tracking-[0.2em] shrink-0 w-fit sm:mt-1" }, "Read Only Access")), /* @__PURE__ */ React59.createElement("div", { className: "w-full max-w-2xl flex flex-col gap-12" }, /* @__PURE__ */ React59.createElement("div", { className: "flex flex-col gap-6" }, /* @__PURE__ */ React59.createElement("div", { className: "space-y-2 min-w-0" }, /* @__PURE__ */ React59.createElement(
|
|
7273
7242
|
TextInput,
|
|
7274
7243
|
{
|
|
7275
7244
|
label: "Public Key",
|
|
@@ -7335,11 +7304,10 @@ AUDDITUR_SECRET_KEY="${secKey}"
|
|
|
7335
7304
|
|
|
7336
7305
|
// src/components/UniversalApplicationPage2.tsx
|
|
7337
7306
|
import React60, { useState as useState44, useRef as useRef18 } from "react";
|
|
7338
|
-
import { HugeiconsIcon as
|
|
7307
|
+
import { HugeiconsIcon as HugeiconsIcon45 } from "@hugeicons/react";
|
|
7339
7308
|
import {
|
|
7340
7309
|
Search01Icon as Search01Icon10,
|
|
7341
|
-
SearchList02Icon as SearchList02Icon5
|
|
7342
|
-
SidebarLeft01Icon as SidebarLeft01Icon5
|
|
7310
|
+
SearchList02Icon as SearchList02Icon5
|
|
7343
7311
|
} from "@hugeicons/core-free-icons";
|
|
7344
7312
|
var UniversalApplicationPage2 = ({
|
|
7345
7313
|
userRole = "MEMBER",
|
|
@@ -7376,15 +7344,7 @@ var UniversalApplicationPage2 = ({
|
|
|
7376
7344
|
"QUERIED",
|
|
7377
7345
|
"AWAITING_PAYMENT"
|
|
7378
7346
|
];
|
|
7379
|
-
return /* @__PURE__ */ React60.createElement("div", { className: "w-full max-w-3xl mx-auto flex flex-col animate-in fade-in duration-300 relative" }, /* @__PURE__ */ React60.createElement("div", { className: "flex flex-col gap-1 mb-8 px-1" }, /* @__PURE__ */ React60.createElement("div", { className: "flex items-center gap-
|
|
7380
|
-
"button",
|
|
7381
|
-
{
|
|
7382
|
-
onClick: () => window.dispatchEvent(new Event("open-sidebar")),
|
|
7383
|
-
className: "md:hidden flex shrink-0 items-center justify-center w-7 h-7 bg-white rounded-full text-black transition-all duration-300 outline-none hover:bg-stone-50",
|
|
7384
|
-
"aria-label": "Open Menu"
|
|
7385
|
-
},
|
|
7386
|
-
/* @__PURE__ */ React60.createElement(HugeiconsIcon46, { icon: SidebarLeft01Icon5, size: 16 })
|
|
7387
|
-
), /* @__PURE__ */ React60.createElement("h1", { className: "text-black text-xl tracking-tight" }, "Applications Directory")), /* @__PURE__ */ React60.createElement("p", { className: "text-xs text-stone-500" }, "Search, filter, and track all your organizational applications.")), /* @__PURE__ */ React60.createElement("div", { className: "flex flex-row flex-nowrap mb-2 items-center justify-between gap-4 w-full px-1" }, /* @__PURE__ */ React60.createElement("div", { className: "relative flex-1 min-w-0 max-w-full" }, /* @__PURE__ */ React60.createElement("div", { className: "absolute inset-y-0 left-0 pl-4 flex items-center pointer-events-none" }, /* @__PURE__ */ React60.createElement(HugeiconsIcon46, { icon: Search01Icon10, size: 16, className: "text-stone-400" })), /* @__PURE__ */ React60.createElement(
|
|
7347
|
+
return /* @__PURE__ */ React60.createElement("div", { className: "w-full max-w-3xl mx-auto flex flex-col animate-in fade-in duration-300 relative" }, /* @__PURE__ */ React60.createElement("div", { className: "flex flex-col gap-1 mb-8 px-1" }, /* @__PURE__ */ React60.createElement("div", { className: "flex items-center" }, /* @__PURE__ */ React60.createElement("h1", { className: "text-black text-xl tracking-tight" }, "Applications Directory")), /* @__PURE__ */ React60.createElement("p", { className: "text-xs text-stone-500" }, "Search, filter, and track all your organizational applications.")), /* @__PURE__ */ React60.createElement("div", { className: "flex flex-row flex-nowrap mb-2 items-center justify-between gap-4 w-full px-1" }, /* @__PURE__ */ React60.createElement("div", { className: "relative flex-1 min-w-0 max-w-full" }, /* @__PURE__ */ React60.createElement("div", { className: "absolute inset-y-0 left-0 pl-4 flex items-center pointer-events-none" }, /* @__PURE__ */ React60.createElement(HugeiconsIcon45, { icon: Search01Icon10, size: 16, className: "text-stone-400" })), /* @__PURE__ */ React60.createElement(
|
|
7388
7348
|
"input",
|
|
7389
7349
|
{
|
|
7390
7350
|
type: "text",
|
|
@@ -7399,7 +7359,7 @@ var UniversalApplicationPage2 = ({
|
|
|
7399
7359
|
onClick: () => setShowStatusModal(true),
|
|
7400
7360
|
className: "flex items-center justify-center bg-white shadow-[0_2px_10px_rgba(0,0,0,0.02)] w-10 h-10 rounded-full text-stone-500 hover:text-black transition-colors outline-none relative"
|
|
7401
7361
|
},
|
|
7402
|
-
/* @__PURE__ */ React60.createElement(
|
|
7362
|
+
/* @__PURE__ */ React60.createElement(HugeiconsIcon45, { icon: SearchList02Icon5, size: 18 }),
|
|
7403
7363
|
activeStatusFilter !== "ALL" && /* @__PURE__ */ React60.createElement("span", { className: "absolute top-2 right-2 w-2 h-2 bg-[#d97757] rounded-full border border-white" })
|
|
7404
7364
|
))), /* @__PURE__ */ React60.createElement("div", { className: "w-full mt-2" }, /* @__PURE__ */ React60.createElement(
|
|
7405
7365
|
UniversalApplicationsPage,
|
|
@@ -7429,6 +7389,174 @@ var UniversalApplicationPage2 = ({
|
|
|
7429
7389
|
}
|
|
7430
7390
|
));
|
|
7431
7391
|
};
|
|
7392
|
+
|
|
7393
|
+
// src/components/UniversalApplicationDetails.tsx
|
|
7394
|
+
import React61, { useState as useState45 } from "react";
|
|
7395
|
+
import { HugeiconsIcon as HugeiconsIcon46 } from "@hugeicons/react";
|
|
7396
|
+
import { ArrowLeft01Icon as ArrowLeft01Icon24 } from "@hugeicons/core-free-icons";
|
|
7397
|
+
var formatType2 = (type) => type.split("_").map((w) => w[0] + w.slice(1).toLowerCase()).join(" ");
|
|
7398
|
+
var UniversalApplicationDetails = ({
|
|
7399
|
+
onBackHref,
|
|
7400
|
+
application,
|
|
7401
|
+
canDelete,
|
|
7402
|
+
onDeleteSubmit
|
|
7403
|
+
}) => {
|
|
7404
|
+
const [isDeleting, setIsDeleting] = useState45(false);
|
|
7405
|
+
const [confirmDialog, setConfirmDialog] = useState45(false);
|
|
7406
|
+
const isLockedStatus = ["COMPLETED", "PENDING", "REJECTED", "QUERIED"].includes(application.status);
|
|
7407
|
+
const deletePermitted = canDelete && !isLockedStatus;
|
|
7408
|
+
const handleDelete = async () => {
|
|
7409
|
+
setIsDeleting(true);
|
|
7410
|
+
try {
|
|
7411
|
+
await onDeleteSubmit();
|
|
7412
|
+
setConfirmDialog(false);
|
|
7413
|
+
} catch (error) {
|
|
7414
|
+
}
|
|
7415
|
+
setIsDeleting(false);
|
|
7416
|
+
};
|
|
7417
|
+
return /* @__PURE__ */ React61.createElement("div", { className: "w-full max-w-3xl mx-auto flex flex-col animate-in fade-in duration-300 relative" }, /* @__PURE__ */ React61.createElement(ManagedToaster, null), /* @__PURE__ */ React61.createElement(
|
|
7418
|
+
ConfirmationDialog,
|
|
7419
|
+
{
|
|
7420
|
+
isOpen: confirmDialog,
|
|
7421
|
+
title: "Delete Application",
|
|
7422
|
+
message: "Are you sure you want to permanently delete this application and its assets? This action cannot be undone.",
|
|
7423
|
+
confirmText: "Delete Application",
|
|
7424
|
+
cancelText: "Cancel",
|
|
7425
|
+
isProcessing: isDeleting,
|
|
7426
|
+
isDestructive: true,
|
|
7427
|
+
onClose: () => setConfirmDialog(false),
|
|
7428
|
+
onConfirm: handleDelete
|
|
7429
|
+
}
|
|
7430
|
+
), /* @__PURE__ */ React61.createElement("div", { className: "mb-6 flex w-full items-center px-1" }, /* @__PURE__ */ React61.createElement("a", { href: onBackHref, className: "flex items-center gap-2 text-[#d97757] hover:text-[#d97757] transition-colors text-sm outline-none" }, /* @__PURE__ */ React61.createElement(HugeiconsIcon46, { icon: ArrowLeft01Icon24, size: 16 }), " Back")), /* @__PURE__ */ React61.createElement("div", { className: "mb-8 px-1 flex flex-col sm:flex-row sm:items-center justify-between gap-4" }, /* @__PURE__ */ React61.createElement("div", null, /* @__PURE__ */ React61.createElement("h1", { className: "text-black text-xl tracking-tight" }, "Application Details"), /* @__PURE__ */ React61.createElement("p", { className: "text-xs text-stone-500" }, "Review your filing entity and access its workspace.")), /* @__PURE__ */ React61.createElement("div", { className: "px-4 py-1.5 bg-stone-100 text-stone-600 rounded-full text-xs self-start sm:self-auto uppercase tracking-widest font-medium" }, application.status)), /* @__PURE__ */ React61.createElement("div", { className: "flex flex-col gap-8 animate-in rounded-2xl p-6 bg-white fade-in duration-300" }, /* @__PURE__ */ React61.createElement("div", { className: "flex flex-col gap-1 w-full" }, /* @__PURE__ */ React61.createElement("label", { className: "text-xs text-stone-400 tracking-[0.2em] block" }, "Target Company"), /* @__PURE__ */ React61.createElement("span", { className: "text-sm text-black py-2 font-medium" }, application.name)), /* @__PURE__ */ React61.createElement("div", { className: "flex flex-col gap-1 w-full border-t border-stone-100 pt-6" }, /* @__PURE__ */ React61.createElement("label", { className: "text-xs text-stone-400 tracking-[0.2em] block" }, "Filing Type"), /* @__PURE__ */ React61.createElement("span", { className: "text-sm text-black py-2" }, formatType2(application.type))), /* @__PURE__ */ React61.createElement("div", { className: "flex flex-col sm:flex-row items-center gap-3 pt-6 mt-2 border-t border-stone-100" }, /* @__PURE__ */ React61.createElement("a", { href: `/app/applications/app/${application.id}`, className: "flex-1 w-full py-2.5 bg-[#d97757] text-white rounded-full text-center text-xs transition-colors hover:bg-[#d97757]/90" }, "Open Application"), /* @__PURE__ */ React61.createElement("a", { href: `/app/applications/assets/${application.id}`, className: "flex-1 w-full py-2.5 bg-transparent border border-stone-200 text-black rounded-full text-center text-xs transition-colors hover:bg-stone-50" }, "Application Assets"), deletePermitted && /* @__PURE__ */ React61.createElement("button", { onClick: () => setConfirmDialog(true), className: "flex-1 w-full py-2.5 bg-transparent border border-stone-200 text-black rounded-full text-center text-xs transition-colors hover:bg-stone-50" }, "Delete Application"))));
|
|
7431
|
+
};
|
|
7432
|
+
|
|
7433
|
+
// src/components/UniversalCreateApplication.tsx
|
|
7434
|
+
import React62, { useState as useState46, useRef as useRef19 } from "react";
|
|
7435
|
+
import toast20 from "react-hot-toast";
|
|
7436
|
+
import { HugeiconsIcon as HugeiconsIcon47 } from "@hugeicons/react";
|
|
7437
|
+
import {
|
|
7438
|
+
ArrowLeft01Icon as ArrowLeft01Icon25,
|
|
7439
|
+
ArrowRight01Icon as ArrowRight01Icon19,
|
|
7440
|
+
Loading03Icon as Loading03Icon33,
|
|
7441
|
+
Search01Icon as Search01Icon11,
|
|
7442
|
+
CircleLock02Icon as CircleLock02Icon6,
|
|
7443
|
+
Tick02Icon as Tick02Icon4,
|
|
7444
|
+
Building03Icon,
|
|
7445
|
+
File02Icon
|
|
7446
|
+
} from "@hugeicons/core-free-icons";
|
|
7447
|
+
var MemberAvatar6 = ({ src, sizeClass = "w-10 h-10" }) => {
|
|
7448
|
+
const [loaded, setLoaded] = useState46(false);
|
|
7449
|
+
const [error, setError] = useState46(false);
|
|
7450
|
+
const defaultAvatar = "https://storage.googleapis.com/retina-cloud-v2/assets/images/avatar.avif";
|
|
7451
|
+
return /* @__PURE__ */ React62.createElement("div", { className: `relative shrink-0 ${sizeClass}` }, /* @__PURE__ */ React62.createElement("div", { className: "w-full h-full rounded-lg bg-stone-100 flex items-center justify-center overflow-hidden" }, !loaded && !error && /* @__PURE__ */ React62.createElement(HugeiconsIcon47, { icon: Loading03Icon33, className: "animate-spin text-stone-400 absolute", size: 14 }), /* @__PURE__ */ React62.createElement("img", { src: error || !src ? defaultAvatar : src, alt: "Avatar", className: `w-full h-full object-cover transition-opacity duration-300 ${loaded || error ? "opacity-100" : "opacity-0"}`, onLoad: () => setLoaded(true), onError: () => setError(true) })));
|
|
7452
|
+
};
|
|
7453
|
+
var APPLICATION_TYPES = [
|
|
7454
|
+
"COMPANY_REGISTRATION",
|
|
7455
|
+
"BUSINESS_NAME",
|
|
7456
|
+
"NGO_INCORPORATION",
|
|
7457
|
+
"TRADEMARK",
|
|
7458
|
+
"COPYRIGHT",
|
|
7459
|
+
"PATENT",
|
|
7460
|
+
"NDPC",
|
|
7461
|
+
"GDPR",
|
|
7462
|
+
"SCUML_CERTIFICATE",
|
|
7463
|
+
"TAX_FILING",
|
|
7464
|
+
"TIN_APPLICATION",
|
|
7465
|
+
"VAT_REGISTRATION",
|
|
7466
|
+
"ANNUAL_RETURNS",
|
|
7467
|
+
"CHANGE_OF_DIRECTORS",
|
|
7468
|
+
"CHANGE_OF_NAME",
|
|
7469
|
+
"NAFDAC_REGISTRATION",
|
|
7470
|
+
"OTHER"
|
|
7471
|
+
];
|
|
7472
|
+
var formatType3 = (type) => type.split("_").map((w) => w[0] + w.slice(1).toLowerCase()).join(" ");
|
|
7473
|
+
var FORMATTED_TYPES = APPLICATION_TYPES.map(formatType3);
|
|
7474
|
+
var UniversalCreateApplication = ({
|
|
7475
|
+
onBackHref,
|
|
7476
|
+
userRole = "MEMBER",
|
|
7477
|
+
members,
|
|
7478
|
+
isMembersLoading,
|
|
7479
|
+
membersCurrentPage,
|
|
7480
|
+
membersTotalPages,
|
|
7481
|
+
onMembersPageChange,
|
|
7482
|
+
membersSearchQuery,
|
|
7483
|
+
onMembersSearchChange,
|
|
7484
|
+
companies,
|
|
7485
|
+
isCompaniesLoading,
|
|
7486
|
+
companiesCurrentPage,
|
|
7487
|
+
companiesTotalPages,
|
|
7488
|
+
onCompaniesPageChange,
|
|
7489
|
+
companiesSearchQuery,
|
|
7490
|
+
onCompaniesSearchChange,
|
|
7491
|
+
onCreateSubmit
|
|
7492
|
+
}) => {
|
|
7493
|
+
const canManage = userRole === "ADMIN" || userRole === "MANAGER" || userRole === "OWNER";
|
|
7494
|
+
const [creationMode, setCreationMode] = useState46("EXISTING");
|
|
7495
|
+
const [selectedTypeFormatted, setSelectedTypeFormatted] = useState46("Company Registration");
|
|
7496
|
+
const [selectedCompanyId, setSelectedCompanyId] = useState46(null);
|
|
7497
|
+
const [newCompanyName, setNewCompanyName] = useState46("");
|
|
7498
|
+
const [isPrivate, setIsPrivate] = useState46(false);
|
|
7499
|
+
const [selectedParticipants, setSelectedParticipants] = useState46(/* @__PURE__ */ new Set());
|
|
7500
|
+
const [isSubmitting, setIsSubmitting] = useState46(false);
|
|
7501
|
+
const [showTypeModal, setShowTypeModal] = useState46(false);
|
|
7502
|
+
const [showMembersModal, setShowMembersModal] = useState46(false);
|
|
7503
|
+
const [showCompaniesModal, setShowCompaniesModal] = useState46(false);
|
|
7504
|
+
const [localMemSearch, setLocalMemSearch] = useState46(membersSearchQuery);
|
|
7505
|
+
const memTimer = useRef19(null);
|
|
7506
|
+
const handleMemSearch = (e) => {
|
|
7507
|
+
const val = e.target.value;
|
|
7508
|
+
setLocalMemSearch(val);
|
|
7509
|
+
if (memTimer.current) clearTimeout(memTimer.current);
|
|
7510
|
+
memTimer.current = setTimeout(() => onMembersSearchChange(val), 500);
|
|
7511
|
+
};
|
|
7512
|
+
const [localCompSearch, setLocalCompSearch] = useState46(companiesSearchQuery);
|
|
7513
|
+
const compTimer = useRef19(null);
|
|
7514
|
+
const handleCompSearch = (e) => {
|
|
7515
|
+
const val = e.target.value;
|
|
7516
|
+
setLocalCompSearch(val);
|
|
7517
|
+
if (compTimer.current) clearTimeout(compTimer.current);
|
|
7518
|
+
compTimer.current = setTimeout(() => onCompaniesSearchChange(val), 500);
|
|
7519
|
+
};
|
|
7520
|
+
const toggleParticipant = (userId) => {
|
|
7521
|
+
if (!canManage) return;
|
|
7522
|
+
const newSet = new Set(selectedParticipants);
|
|
7523
|
+
if (newSet.has(userId)) newSet.delete(userId);
|
|
7524
|
+
else newSet.add(userId);
|
|
7525
|
+
setSelectedParticipants(newSet);
|
|
7526
|
+
};
|
|
7527
|
+
const handleSubmit = async (e) => {
|
|
7528
|
+
e.preventDefault();
|
|
7529
|
+
if (!canManage) return;
|
|
7530
|
+
const rawType = APPLICATION_TYPES[FORMATTED_TYPES.indexOf(selectedTypeFormatted)];
|
|
7531
|
+
if (!rawType) return toast20.error("Please select a valid application type.");
|
|
7532
|
+
if (creationMode === "EXISTING" && !selectedCompanyId) return toast20.error("Please select a company.");
|
|
7533
|
+
if (creationMode === "NEW" && newCompanyName.trim().length < 2) return toast20.error("Company name is required.");
|
|
7534
|
+
setIsSubmitting(true);
|
|
7535
|
+
try {
|
|
7536
|
+
await onCreateSubmit({
|
|
7537
|
+
creationMode,
|
|
7538
|
+
companyId: creationMode === "EXISTING" ? selectedCompanyId : void 0,
|
|
7539
|
+
newCompany: creationMode === "NEW" ? {
|
|
7540
|
+
name: newCompanyName.trim(),
|
|
7541
|
+
isPrivate,
|
|
7542
|
+
assignedUsers: isPrivate ? Array.from(selectedParticipants) : []
|
|
7543
|
+
} : void 0,
|
|
7544
|
+
type: rawType
|
|
7545
|
+
});
|
|
7546
|
+
} catch (error) {
|
|
7547
|
+
toast20.error(error.message || "Failed to create application.");
|
|
7548
|
+
setIsSubmitting(false);
|
|
7549
|
+
}
|
|
7550
|
+
};
|
|
7551
|
+
const activeCompany = companies.find((c) => c.id === selectedCompanyId);
|
|
7552
|
+
return /* @__PURE__ */ React62.createElement("div", { className: "w-full max-w-3xl mx-auto flex flex-col animate-in fade-in duration-300 relative" }, /* @__PURE__ */ React62.createElement(ManagedToaster, null), /* @__PURE__ */ React62.createElement("div", { className: "mb-6 flex w-full items-center px-1" }, /* @__PURE__ */ React62.createElement("a", { href: onBackHref, className: "flex items-center gap-2 text-[#d97757] hover:text-[#d97757] transition-colors text-sm outline-none" }, /* @__PURE__ */ React62.createElement(HugeiconsIcon47, { icon: ArrowLeft01Icon25, size: 16 }), " Back")), /* @__PURE__ */ React62.createElement("div", { className: "flex flex-col gap-1 mb-6 px-1" }, /* @__PURE__ */ React62.createElement("h1", { className: "text-black text-xl tracking-tight" }, "Create Application"), /* @__PURE__ */ React62.createElement("p", { className: "text-xs text-stone-500" }, "Initiate a new registration or filing for a company.")), /* @__PURE__ */ React62.createElement("div", { className: "flex items-center gap-6 mb-6 px-1" }, /* @__PURE__ */ React62.createElement("button", { onClick: () => setCreationMode("EXISTING"), disabled: isSubmitting, className: `pb-2 text-sm outline-none transition-colors border-b-2 ${creationMode === "EXISTING" ? "border-black text-black" : "border-transparent text-stone-500 hover:text-black"}` }, "Select Company"), /* @__PURE__ */ React62.createElement("button", { onClick: () => setCreationMode("NEW"), disabled: isSubmitting, className: `pb-2 text-sm outline-none transition-colors border-b-2 ${creationMode === "NEW" ? "border-black text-black" : "border-transparent text-stone-500 hover:text-black"}` }, "New Company")), /* @__PURE__ */ React62.createElement("div", { className: "flex flex-col gap-8 animate-in rounded-2xl p-6 bg-white fade-in duration-300" }, /* @__PURE__ */ React62.createElement("form", { className: "flex flex-col gap-8", onSubmit: handleSubmit, autoComplete: "off" }, !canManage && /* @__PURE__ */ React62.createElement("div", { className: "flex items-start gap-3 p-4 bg-stone-50 rounded-xl" }, /* @__PURE__ */ React62.createElement(HugeiconsIcon47, { icon: CircleLock02Icon6, size: 20, className: "text-stone-500 shrink-0 mt-0.5" }), /* @__PURE__ */ React62.createElement("div", { className: "flex flex-col" }, /* @__PURE__ */ React62.createElement("span", { className: "text-sm text-black tracking-tight" }, "Access Restricted"), /* @__PURE__ */ React62.createElement("span", { className: "text-xs text-stone-500 mt-1 leading-relaxed" }, "You lack clearance to create applications."))), creationMode === "EXISTING" ? /* @__PURE__ */ React62.createElement("div", { className: "space-y-1.5 w-full" }, /* @__PURE__ */ React62.createElement("label", { className: "text-xs text-stone-400 tracking-[0.2em] block" }, "Target Company"), /* @__PURE__ */ React62.createElement("div", { onClick: () => canManage && !isSubmitting && setShowCompaniesModal(true), className: `flex items-center relative w-full border-b border-stone-200 transition-all duration-300 pb-3 pt-3 ${!canManage || isSubmitting ? "opacity-50 pointer-events-none" : "hover:border-black cursor-pointer"}` }, /* @__PURE__ */ React62.createElement(HugeiconsIcon47, { icon: Building03Icon, size: 16, className: "text-stone-400 absolute left-0" }), /* @__PURE__ */ React62.createElement("span", { className: `w-full pl-8 text-sm truncate block ${activeCompany ? "text-black" : "text-stone-400"}` }, activeCompany ? activeCompany.name : "Select an existing company..."))) : /* @__PURE__ */ React62.createElement(React62.Fragment, null, /* @__PURE__ */ React62.createElement(TextInput, { label: "Company Name", value: newCompanyName, onChange: (val) => setNewCompanyName(val), disabled: isSubmitting || !canManage, placeholder: "e.g. Acme Innovations Ltd.", maxLength: 80 }), /* @__PURE__ */ React62.createElement("div", { className: `flex items-center justify-between py-2 mt-2 ${!canManage ? "opacity-50 pointer-events-none" : ""}` }, /* @__PURE__ */ React62.createElement("div", { className: "flex flex-col" }, /* @__PURE__ */ React62.createElement("span", { className: "text-sm text-black tracking-tight" }, "Private Company"), /* @__PURE__ */ React62.createElement("span", { className: "text-xs text-stone-500" }, "Only assigned members can view and access its applications.")), /* @__PURE__ */ React62.createElement("button", { type: "button", onClick: () => setIsPrivate(!isPrivate), disabled: !canManage || isSubmitting, className: `relative w-11 h-6 rounded-full transition-colors outline-none shrink-0 ${isPrivate ? "bg-[#d97757]" : "bg-stone-200"}` }, /* @__PURE__ */ React62.createElement("div", { className: `absolute top-1 left-1 bg-white w-4 h-4 rounded-full transition-transform ${isPrivate ? "translate-x-5" : "translate-x-0"}` }))), isPrivate && /* @__PURE__ */ React62.createElement("div", { className: `flex items-center justify-between animate-in fade-in zoom-in-95 duration-200 bg-stone-50 p-4 rounded-xl ${!canManage ? "opacity-50" : ""}` }, /* @__PURE__ */ React62.createElement("div", { className: "flex flex-col" }, /* @__PURE__ */ React62.createElement("span", { className: "text-xs text-black tracking-tight" }, "Assigned Members"), /* @__PURE__ */ React62.createElement("span", { className: "text-xs text-[#d97757] " }, selectedParticipants.size, " added")), /* @__PURE__ */ React62.createElement("button", { type: "button", onClick: () => setShowMembersModal(true), disabled: !canManage || isSubmitting, className: "px-4 py-2 border border-stone-200 text-black text-xs tracking-wide rounded-full hover:bg-white transition-colors outline-none bg-transparent" }, "Manage Access"))), /* @__PURE__ */ React62.createElement("div", { className: "space-y-1.5 w-full" }, /* @__PURE__ */ React62.createElement("label", { className: "text-xs text-stone-400 tracking-[0.2em] block" }, "Application Type"), /* @__PURE__ */ React62.createElement("div", { onClick: () => canManage && !isSubmitting && setShowTypeModal(true), className: `flex items-center relative w-full border-b border-stone-200 transition-all duration-300 pb-3 pt-3 ${!canManage || isSubmitting ? "opacity-50 pointer-events-none" : "hover:border-black cursor-pointer"}` }, /* @__PURE__ */ React62.createElement(HugeiconsIcon47, { icon: File02Icon, size: 16, className: "text-stone-400 absolute left-0" }), /* @__PURE__ */ React62.createElement("span", { className: "w-full pl-8 text-sm text-black truncate block" }, selectedTypeFormatted))), canManage && /* @__PURE__ */ React62.createElement("div", { className: "pt-6" }, /* @__PURE__ */ React62.createElement(ThreeDActionButton, { type: "submit", disabled: isSubmitting || creationMode === "EXISTING" && !selectedCompanyId || creationMode === "NEW" && newCompanyName.length < 2, isLoading: isSubmitting, className: "w-full sm:w-auto min-w-40" }, "Create Application")))), canManage && /* @__PURE__ */ React62.createElement(ReusableOptions, { isOpen: showTypeModal, onClose: () => setShowTypeModal(false), title: "Application Type", options: FORMATTED_TYPES, selectedOption: selectedTypeFormatted, onSelect: (t) => setSelectedTypeFormatted(t), showSearch: true }), showCompaniesModal && canManage && /* @__PURE__ */ React62.createElement("div", { className: "fixed inset-0 z-120 flex items-center justify-center p-4 pointer-events-auto" }, /* @__PURE__ */ React62.createElement("div", { className: "absolute inset-0 bg-black/30", onClick: () => setShowCompaniesModal(false) }), /* @__PURE__ */ React62.createElement("div", { className: "relative w-full max-w-md bg-white rounded-2xl flex flex-col overflow-hidden shadow-2xl animate-in zoom-in-95 duration-200 h-[80vh]" }, /* @__PURE__ */ React62.createElement("div", { className: "flex items-center justify-between p-5 shrink-0" }, /* @__PURE__ */ React62.createElement("h3", { className: "text-sm text-black tracking-tight" }, "Select Company"), /* @__PURE__ */ React62.createElement("button", { onClick: () => setShowCompaniesModal(false), className: "text-[#d97757] outline-none text-sm" }, "Close")), /* @__PURE__ */ React62.createElement("div", { className: "p-4 shrink-0" }, /* @__PURE__ */ React62.createElement("div", { className: "relative w-full" }, /* @__PURE__ */ React62.createElement(HugeiconsIcon47, { icon: Search01Icon11, size: 16, className: "text-stone-400 absolute left-4 top-1/2 -translate-y-1/2 pointer-events-none" }), /* @__PURE__ */ React62.createElement("input", { type: "text", placeholder: "Search companies...", value: localCompSearch, onChange: handleCompSearch, className: "w-full pl-10 pr-4 py-2.5 bg-stone-100 rounded-full focus:border-[#d97757] border border-transparent text-sm text-black outline-none focus:bg-stone-200 transition-colors" }))), /* @__PURE__ */ React62.createElement("div", { className: "flex-1 overflow-y-auto custom-scrollbar p-2" }, isCompaniesLoading ? /* @__PURE__ */ React62.createElement("div", { className: "absolute inset-0 flex items-center justify-center" }, /* @__PURE__ */ React62.createElement(HugeiconsIcon47, { icon: Loading03Icon33, size: 28, className: "animate-spin text-black" })) : companies.length === 0 ? /* @__PURE__ */ React62.createElement("div", { className: "p-8 text-center text-xs text-stone-400" }, "No companies available.") : companies.map((comp) => /* @__PURE__ */ React62.createElement("div", { key: comp.id, onClick: () => {
|
|
7553
|
+
setSelectedCompanyId(comp.id);
|
|
7554
|
+
setShowCompaniesModal(false);
|
|
7555
|
+
}, className: "flex items-center justify-between p-3 rounded-xl cursor-pointer hover:bg-stone-50 transition-colors" }, /* @__PURE__ */ React62.createElement("div", { className: "flex flex-col min-w-0 flex-1 pl-2" }, /* @__PURE__ */ React62.createElement("span", { className: "text-sm text-black truncate" }, comp.name), comp.isPrivate && /* @__PURE__ */ React62.createElement("span", { className: "text-[10px] text-[#d97757] mt-0.5 tracking-widest uppercase" }, "Private")), selectedCompanyId === comp.id && /* @__PURE__ */ React62.createElement(HugeiconsIcon47, { icon: Tick02Icon4, size: 16, className: "text-[#d97757] mr-2" })))), /* @__PURE__ */ React62.createElement("div", { className: "p-4 flex items-center justify-between shrink-0 bg-white" }, /* @__PURE__ */ React62.createElement("span", { className: "text-xs text-stone-400 tracking-widest" }, "Page ", companiesCurrentPage, " of ", companiesTotalPages || 1), /* @__PURE__ */ React62.createElement("div", { className: "flex gap-1" }, /* @__PURE__ */ React62.createElement("button", { disabled: companiesCurrentPage <= 1 || isCompaniesLoading, onClick: () => onCompaniesPageChange(companiesCurrentPage - 1), className: "w-7 h-7 flex items-center justify-center rounded-full bg-white border border-stone-200 text-stone-600 disabled:opacity-30 outline-none hover:bg-stone-50" }, /* @__PURE__ */ React62.createElement(HugeiconsIcon47, { icon: ArrowLeft01Icon25, size: 12 })), /* @__PURE__ */ React62.createElement("button", { disabled: companiesCurrentPage >= companiesTotalPages || isCompaniesLoading, onClick: () => onCompaniesPageChange(companiesCurrentPage + 1), className: "w-7 h-7 flex items-center justify-center rounded-full bg-white border border-stone-200 text-stone-600 disabled:opacity-30 outline-none hover:bg-stone-50" }, /* @__PURE__ */ React62.createElement(HugeiconsIcon47, { icon: ArrowRight01Icon19, size: 12 })))))), showMembersModal && canManage && /* @__PURE__ */ React62.createElement("div", { className: "fixed inset-0 z-120 flex items-center justify-center p-4 pointer-events-auto" }, /* @__PURE__ */ React62.createElement("div", { className: "absolute inset-0 bg-black/30", onClick: () => setShowMembersModal(false) }), /* @__PURE__ */ React62.createElement("div", { className: "relative w-full max-w-md bg-white rounded-2xl flex flex-col overflow-hidden shadow-2xl animate-in zoom-in-95 duration-200 h-[80vh]" }, /* @__PURE__ */ React62.createElement("div", { className: "flex items-center justify-between p-5 shrink-0" }, /* @__PURE__ */ React62.createElement("h3", { className: "text-sm text-black tracking-tight" }, "Assign Members"), /* @__PURE__ */ React62.createElement("button", { onClick: () => setShowMembersModal(false), className: "text-[#d97757] outline-none text-sm" }, "Done")), /* @__PURE__ */ React62.createElement("div", { className: "p-4 shrink-0" }, /* @__PURE__ */ React62.createElement("div", { className: "relative w-full" }, /* @__PURE__ */ React62.createElement(HugeiconsIcon47, { icon: Search01Icon11, size: 16, className: "text-stone-400 absolute left-4 top-1/2 -translate-y-1/2 pointer-events-none" }), /* @__PURE__ */ React62.createElement("input", { type: "text", placeholder: "Search team...", value: localMemSearch, onChange: handleMemSearch, className: "w-full pl-10 pr-4 py-2.5 bg-stone-100 rounded-full focus:border-[#d97757] border border-transparent text-sm text-black outline-none focus:bg-stone-200 transition-colors" }))), /* @__PURE__ */ React62.createElement("div", { className: "flex-1 overflow-y-auto custom-scrollbar p-2" }, isMembersLoading ? /* @__PURE__ */ React62.createElement("div", { className: "absolute inset-0 flex items-center justify-center" }, /* @__PURE__ */ React62.createElement(HugeiconsIcon47, { icon: Loading03Icon33, size: 28, className: "animate-spin text-black" })) : members.length === 0 ? /* @__PURE__ */ React62.createElement("div", { className: "p-8 text-center text-xs text-stone-400" }, "No members found.") : members.map((member) => {
|
|
7556
|
+
const isChecked = selectedParticipants.has(member.userId);
|
|
7557
|
+
return /* @__PURE__ */ React62.createElement("div", { key: member.id, onClick: () => toggleParticipant(member.userId), className: "flex items-center justify-between p-3 rounded-xl cursor-pointer hover:bg-stone-50 transition-colors select-none" }, /* @__PURE__ */ React62.createElement("div", { className: "flex items-center gap-3 min-w-0 flex-1" }, /* @__PURE__ */ React62.createElement(MemberAvatar6, { src: member.avatarUrl, sizeClass: "w-9 h-9" }), /* @__PURE__ */ React62.createElement("div", { className: "flex flex-col min-w-0 flex-1" }, /* @__PURE__ */ React62.createElement("span", { className: "text-sm text-black truncate" }, member.fullName), /* @__PURE__ */ React62.createElement("span", { className: "text-xs text-stone-400 capitalize truncate" }, member.role.toLowerCase()))), /* @__PURE__ */ React62.createElement("div", { className: "shrink-0 pl-3" }, /* @__PURE__ */ React62.createElement("div", { className: `w-5 h-5 rounded-full flex items-center justify-center transition-colors ${isChecked ? "bg-[#d97757]" : "border border-stone-300 bg-white"}` }, isChecked && /* @__PURE__ */ React62.createElement(HugeiconsIcon47, { icon: Tick02Icon4, size: 14, className: "text-white" }))));
|
|
7558
|
+
})), /* @__PURE__ */ React62.createElement("div", { className: "p-4 flex items-center justify-between shrink-0 bg-white" }, /* @__PURE__ */ React62.createElement("span", { className: "text-xs text-stone-400 tracking-widest" }, "Page ", membersCurrentPage, " of ", membersTotalPages || 1), /* @__PURE__ */ React62.createElement("div", { className: "flex gap-1" }, /* @__PURE__ */ React62.createElement("button", { disabled: membersCurrentPage <= 1 || isMembersLoading, onClick: () => onMembersPageChange(membersCurrentPage - 1), className: "w-7 h-7 flex items-center justify-center rounded-full bg-white border border-stone-200 text-stone-600 disabled:opacity-30 outline-none hover:bg-stone-50" }, /* @__PURE__ */ React62.createElement(HugeiconsIcon47, { icon: ArrowLeft01Icon25, size: 12 })), /* @__PURE__ */ React62.createElement("button", { disabled: membersCurrentPage >= membersTotalPages || isMembersLoading, onClick: () => onMembersPageChange(membersCurrentPage + 1), className: "w-7 h-7 flex items-center justify-center rounded-full bg-white border border-stone-200 text-stone-600 disabled:opacity-30 outline-none hover:bg-stone-50" }, /* @__PURE__ */ React62.createElement(HugeiconsIcon47, { icon: ArrowRight01Icon19, size: 12 })))))));
|
|
7559
|
+
};
|
|
7432
7560
|
export {
|
|
7433
7561
|
AppBento2,
|
|
7434
7562
|
CardInfoDialog,
|
|
@@ -7462,11 +7590,13 @@ export {
|
|
|
7462
7590
|
TextInput,
|
|
7463
7591
|
ThreeDActionButton,
|
|
7464
7592
|
ThreeDButton,
|
|
7593
|
+
UniversalApplicationDetails,
|
|
7465
7594
|
UniversalApplicationPage2,
|
|
7466
7595
|
UniversalApplicationsPage,
|
|
7467
7596
|
UniversalBuyCryptoPage,
|
|
7468
7597
|
UniversalCardActionPage,
|
|
7469
7598
|
UniversalCardPage,
|
|
7599
|
+
UniversalCreateApplication,
|
|
7470
7600
|
UniversalCreateHuddle,
|
|
7471
7601
|
UniversalDeveloperSettings,
|
|
7472
7602
|
UniversalErrorView,
|