@retinalabsllc/zairusjs 0.2.5 → 0.2.6
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 +63 -1
- package/dist/index.d.ts +63 -1
- package/dist/index.js +172 -0
- package/dist/index.mjs +169 -0
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -747,4 +747,66 @@ interface UniversalOverviewPageProps {
|
|
|
747
747
|
}
|
|
748
748
|
declare const UniversalOverviewPage: React.FC<UniversalOverviewPageProps>;
|
|
749
749
|
|
|
750
|
-
|
|
750
|
+
interface UniversalErrorViewProps {
|
|
751
|
+
isBooting: boolean;
|
|
752
|
+
isLoading: boolean;
|
|
753
|
+
activeData: any;
|
|
754
|
+
activeError: any;
|
|
755
|
+
/** The dynamic name of the environment failing to load (e.g., "application", "workspace") */
|
|
756
|
+
envName: string;
|
|
757
|
+
/** Function to execute when the user clicks "Refresh" */
|
|
758
|
+
onRetry: () => void;
|
|
759
|
+
/** URL to fallback to on a hard error. Defaults to '/app' */
|
|
760
|
+
returnUrl?: string;
|
|
761
|
+
/** Label for the hard fallback button. Defaults to 'Return to Workspace' */
|
|
762
|
+
returnLabel?: string;
|
|
763
|
+
}
|
|
764
|
+
declare const UniversalErrorView: React.FC<UniversalErrorViewProps>;
|
|
765
|
+
|
|
766
|
+
interface SearchTypeOption {
|
|
767
|
+
value: string;
|
|
768
|
+
label: string;
|
|
769
|
+
}
|
|
770
|
+
interface UniversalLookupPageProps {
|
|
771
|
+
headerTitle: string;
|
|
772
|
+
headerDescription: string;
|
|
773
|
+
searchOptions: SearchTypeOption[];
|
|
774
|
+
selectedSearchType: string;
|
|
775
|
+
onSearchTypeChange: (val: string) => void;
|
|
776
|
+
searchQuery: string;
|
|
777
|
+
onSearchQueryChange: (val: string) => void;
|
|
778
|
+
isSearching: boolean;
|
|
779
|
+
onSearch: (e: React.FormEvent) => void;
|
|
780
|
+
resultContent?: React.ReactNode;
|
|
781
|
+
modals?: React.ReactNode;
|
|
782
|
+
}
|
|
783
|
+
declare const UniversalLookupPage: React.FC<UniversalLookupPageProps>;
|
|
784
|
+
|
|
785
|
+
interface DirectoryItem {
|
|
786
|
+
id: string;
|
|
787
|
+
icon: React.ReactNode;
|
|
788
|
+
primaryText: React.ReactNode;
|
|
789
|
+
secondaryText: React.ReactNode;
|
|
790
|
+
rightBadge?: string;
|
|
791
|
+
rightBadgeClass?: string;
|
|
792
|
+
}
|
|
793
|
+
interface UniversalDirectoryPageProps {
|
|
794
|
+
headerTitle: string;
|
|
795
|
+
headerDescription: string;
|
|
796
|
+
searchPlaceholder?: string;
|
|
797
|
+
searchQuery: string;
|
|
798
|
+
onSearchChange: (val: string) => void;
|
|
799
|
+
currentView: 'list' | 'details';
|
|
800
|
+
onBackToList: () => void;
|
|
801
|
+
items: DirectoryItem[];
|
|
802
|
+
isLoading: boolean;
|
|
803
|
+
currentPage: number;
|
|
804
|
+
totalPages: number;
|
|
805
|
+
onPageChange: (page: number) => void;
|
|
806
|
+
onRowClick: (id: string) => void;
|
|
807
|
+
detailsContent?: React.ReactNode;
|
|
808
|
+
modals?: React.ReactNode;
|
|
809
|
+
}
|
|
810
|
+
declare const UniversalDirectoryPage: React.FC<UniversalDirectoryPageProps>;
|
|
811
|
+
|
|
812
|
+
export { AITranscriptionFeature, type AITranscriptionFeatureProps, type AgentFilePayload, type AgentStat, AppBento2, type AppBento2Props, type BentoFeature, type BoardMember, type CompanyDetails, type DashboardList, type DashboardListItem, type DashboardStat, type DocumentSectionData, type EmailContact, Faq, type FaqItem, type FaqProps, FeatureScroll, type FeatureScrollProps, Footer, type FooterColumn, type FooterLink, type FooterProps, GifFeatureCard, type GifFeatureCardProps, Header, type HeaderLink, type HeaderProps, HeroSection, type HeroSectionProps, ManagedBoardBlock, type ManagedBoardBlockProps, ManagedContactBlock, type ManagedContactBlockProps, ManagedDocument, type ManagedDocumentProps, ManagedNewsletterSplitBlock, type ManagedNewsletterSplitBlockProps, ManagedNotFoundBlock, type ManagedNotFoundBlockProps, ManagedPricingBlock, type ManagedPricingBlockProps, ManagedProjectsBlock, type ManagedProjectsBlockProps, ManagedToaster, type NavItem, NumberInput, type NumberInputProps, type OverviewAlert, type OverviewStat, PageSpinner, type PageSpinnerProps, type PlatformFeatureItem, PlatformFeatures, type PlatformFeaturesProps, PortfolioHero, type PortfolioHeroProps, type PricingFeature, type PricingPlan, ProductHero, type ProductHeroProps, type ProjectItem, type ScrollFeature, type SearchTypeOption, type SocialContact, type SocialLink, TextInput, type TextInputProps, type ThemeColorOption, ThreeDActionButton, type ThreeDActionButtonProps, ThreeDButton, type ThreeDButtonProps, UniversalAgentConsole, type UniversalAgentConsoleProps, UniversalBillingPage, type UniversalBillingPageProps, UniversalDashboardPage, type UniversalDashboardPageProps, UniversalDirectoryPage, type UniversalDirectoryPageProps, UniversalErrorView, type UniversalErrorViewProps, UniversalHeader, type UniversalHeaderProps, UniversalIdentityPage, type UniversalIdentityPageProps, type UniversalInvoice, UniversalLookupPage, type UniversalLookupPageProps, type UniversalMember, UniversalMembersPage, type UniversalMembersPageProps, UniversalOrganizationPage, type UniversalOrganizationPageProps, UniversalOverviewPage, type UniversalOverviewPageProps, UniversalProfileSettings, type UniversalProfileSettingsProps, UniversalSidebar, type UniversalSidebarProps, type WorkspaceItem, ZairusAuth, type ZairusAuthProps };
|
package/dist/index.d.ts
CHANGED
|
@@ -747,4 +747,66 @@ interface UniversalOverviewPageProps {
|
|
|
747
747
|
}
|
|
748
748
|
declare const UniversalOverviewPage: React.FC<UniversalOverviewPageProps>;
|
|
749
749
|
|
|
750
|
-
|
|
750
|
+
interface UniversalErrorViewProps {
|
|
751
|
+
isBooting: boolean;
|
|
752
|
+
isLoading: boolean;
|
|
753
|
+
activeData: any;
|
|
754
|
+
activeError: any;
|
|
755
|
+
/** The dynamic name of the environment failing to load (e.g., "application", "workspace") */
|
|
756
|
+
envName: string;
|
|
757
|
+
/** Function to execute when the user clicks "Refresh" */
|
|
758
|
+
onRetry: () => void;
|
|
759
|
+
/** URL to fallback to on a hard error. Defaults to '/app' */
|
|
760
|
+
returnUrl?: string;
|
|
761
|
+
/** Label for the hard fallback button. Defaults to 'Return to Workspace' */
|
|
762
|
+
returnLabel?: string;
|
|
763
|
+
}
|
|
764
|
+
declare const UniversalErrorView: React.FC<UniversalErrorViewProps>;
|
|
765
|
+
|
|
766
|
+
interface SearchTypeOption {
|
|
767
|
+
value: string;
|
|
768
|
+
label: string;
|
|
769
|
+
}
|
|
770
|
+
interface UniversalLookupPageProps {
|
|
771
|
+
headerTitle: string;
|
|
772
|
+
headerDescription: string;
|
|
773
|
+
searchOptions: SearchTypeOption[];
|
|
774
|
+
selectedSearchType: string;
|
|
775
|
+
onSearchTypeChange: (val: string) => void;
|
|
776
|
+
searchQuery: string;
|
|
777
|
+
onSearchQueryChange: (val: string) => void;
|
|
778
|
+
isSearching: boolean;
|
|
779
|
+
onSearch: (e: React.FormEvent) => void;
|
|
780
|
+
resultContent?: React.ReactNode;
|
|
781
|
+
modals?: React.ReactNode;
|
|
782
|
+
}
|
|
783
|
+
declare const UniversalLookupPage: React.FC<UniversalLookupPageProps>;
|
|
784
|
+
|
|
785
|
+
interface DirectoryItem {
|
|
786
|
+
id: string;
|
|
787
|
+
icon: React.ReactNode;
|
|
788
|
+
primaryText: React.ReactNode;
|
|
789
|
+
secondaryText: React.ReactNode;
|
|
790
|
+
rightBadge?: string;
|
|
791
|
+
rightBadgeClass?: string;
|
|
792
|
+
}
|
|
793
|
+
interface UniversalDirectoryPageProps {
|
|
794
|
+
headerTitle: string;
|
|
795
|
+
headerDescription: string;
|
|
796
|
+
searchPlaceholder?: string;
|
|
797
|
+
searchQuery: string;
|
|
798
|
+
onSearchChange: (val: string) => void;
|
|
799
|
+
currentView: 'list' | 'details';
|
|
800
|
+
onBackToList: () => void;
|
|
801
|
+
items: DirectoryItem[];
|
|
802
|
+
isLoading: boolean;
|
|
803
|
+
currentPage: number;
|
|
804
|
+
totalPages: number;
|
|
805
|
+
onPageChange: (page: number) => void;
|
|
806
|
+
onRowClick: (id: string) => void;
|
|
807
|
+
detailsContent?: React.ReactNode;
|
|
808
|
+
modals?: React.ReactNode;
|
|
809
|
+
}
|
|
810
|
+
declare const UniversalDirectoryPage: React.FC<UniversalDirectoryPageProps>;
|
|
811
|
+
|
|
812
|
+
export { AITranscriptionFeature, type AITranscriptionFeatureProps, type AgentFilePayload, type AgentStat, AppBento2, type AppBento2Props, type BentoFeature, type BoardMember, type CompanyDetails, type DashboardList, type DashboardListItem, type DashboardStat, type DocumentSectionData, type EmailContact, Faq, type FaqItem, type FaqProps, FeatureScroll, type FeatureScrollProps, Footer, type FooterColumn, type FooterLink, type FooterProps, GifFeatureCard, type GifFeatureCardProps, Header, type HeaderLink, type HeaderProps, HeroSection, type HeroSectionProps, ManagedBoardBlock, type ManagedBoardBlockProps, ManagedContactBlock, type ManagedContactBlockProps, ManagedDocument, type ManagedDocumentProps, ManagedNewsletterSplitBlock, type ManagedNewsletterSplitBlockProps, ManagedNotFoundBlock, type ManagedNotFoundBlockProps, ManagedPricingBlock, type ManagedPricingBlockProps, ManagedProjectsBlock, type ManagedProjectsBlockProps, ManagedToaster, type NavItem, NumberInput, type NumberInputProps, type OverviewAlert, type OverviewStat, PageSpinner, type PageSpinnerProps, type PlatformFeatureItem, PlatformFeatures, type PlatformFeaturesProps, PortfolioHero, type PortfolioHeroProps, type PricingFeature, type PricingPlan, ProductHero, type ProductHeroProps, type ProjectItem, type ScrollFeature, type SearchTypeOption, type SocialContact, type SocialLink, TextInput, type TextInputProps, type ThemeColorOption, ThreeDActionButton, type ThreeDActionButtonProps, ThreeDButton, type ThreeDButtonProps, UniversalAgentConsole, type UniversalAgentConsoleProps, UniversalBillingPage, type UniversalBillingPageProps, UniversalDashboardPage, type UniversalDashboardPageProps, UniversalDirectoryPage, type UniversalDirectoryPageProps, UniversalErrorView, type UniversalErrorViewProps, UniversalHeader, type UniversalHeaderProps, UniversalIdentityPage, type UniversalIdentityPageProps, type UniversalInvoice, UniversalLookupPage, type UniversalLookupPageProps, type UniversalMember, UniversalMembersPage, type UniversalMembersPageProps, UniversalOrganizationPage, type UniversalOrganizationPageProps, UniversalOverviewPage, type UniversalOverviewPageProps, UniversalProfileSettings, type UniversalProfileSettingsProps, UniversalSidebar, type UniversalSidebarProps, type WorkspaceItem, ZairusAuth, type ZairusAuthProps };
|
package/dist/index.js
CHANGED
|
@@ -58,8 +58,11 @@ __export(index_exports, {
|
|
|
58
58
|
UniversalAgentConsole: () => UniversalAgentConsole,
|
|
59
59
|
UniversalBillingPage: () => UniversalBillingPage,
|
|
60
60
|
UniversalDashboardPage: () => UniversalDashboardPage,
|
|
61
|
+
UniversalDirectoryPage: () => UniversalDirectoryPage,
|
|
62
|
+
UniversalErrorView: () => UniversalErrorView,
|
|
61
63
|
UniversalHeader: () => UniversalHeader,
|
|
62
64
|
UniversalIdentityPage: () => UniversalIdentityPage,
|
|
65
|
+
UniversalLookupPage: () => UniversalLookupPage,
|
|
63
66
|
UniversalMembersPage: () => UniversalMembersPage,
|
|
64
67
|
UniversalOrganizationPage: () => UniversalOrganizationPage,
|
|
65
68
|
UniversalOverviewPage: () => UniversalOverviewPage,
|
|
@@ -2746,6 +2749,172 @@ var UniversalOverviewPage = ({
|
|
|
2746
2749
|
return /* @__PURE__ */ import_react53.default.createElement("div", { key: idx, className: `mt-4 p-5 rounded-xl flex flex-col gap-4 ${bgClass}` }, /* @__PURE__ */ import_react53.default.createElement("div", { className: "flex items-center gap-2" }, /* @__PURE__ */ import_react53.default.createElement("span", { className: `text-[11px] tracking-widest uppercase ${textClass}` }, alert.title)), alert.items.map((item, itemIdx) => /* @__PURE__ */ import_react53.default.createElement("div", { key: itemIdx }, /* @__PURE__ */ import_react53.default.createElement("span", { className: `text-[10px] tracking-[0.2em] block mb-1 uppercase ${lblClass}` }, item.label), /* @__PURE__ */ import_react53.default.createElement("p", { className: `text-[13px] leading-relaxed ${valClass}` }, item.text))));
|
|
2747
2750
|
}))));
|
|
2748
2751
|
};
|
|
2752
|
+
|
|
2753
|
+
// src/components/UniversalErrorView.tsx
|
|
2754
|
+
var import_react54 = __toESM(require("react"));
|
|
2755
|
+
var import_react55 = require("@hugeicons/react");
|
|
2756
|
+
var import_core_free_icons16 = require("@hugeicons/core-free-icons");
|
|
2757
|
+
var UniversalErrorView = ({
|
|
2758
|
+
isBooting,
|
|
2759
|
+
isLoading,
|
|
2760
|
+
activeData,
|
|
2761
|
+
activeError,
|
|
2762
|
+
envName,
|
|
2763
|
+
onRetry,
|
|
2764
|
+
returnUrl = "/app",
|
|
2765
|
+
returnLabel = "Return to Workspace"
|
|
2766
|
+
}) => {
|
|
2767
|
+
if (isBooting || isLoading && !activeData) {
|
|
2768
|
+
return /* @__PURE__ */ import_react54.default.createElement("div", { className: "flex items-center justify-center h-screen w-full bg-transparent" }, /* @__PURE__ */ import_react54.default.createElement(PageSpinner, null));
|
|
2769
|
+
}
|
|
2770
|
+
if (!isLoading && (!activeData || activeError)) {
|
|
2771
|
+
const errorString = typeof activeError === "string" ? activeError : JSON.stringify(activeError || "");
|
|
2772
|
+
const errorMsg = errorString.toLowerCase();
|
|
2773
|
+
const isPermissionError = errorMsg.includes("forbidden") || errorMsg.includes("unauthorized") || errorMsg.includes("permission");
|
|
2774
|
+
const isNetworkError = errorMsg.includes("network") || errorMsg.includes("connection") || errorMsg.includes("fetch");
|
|
2775
|
+
const isNotFoundError = errorMsg.includes("not found") || errorMsg.includes("404") || errorMsg.includes("does not exist") || !activeData && !isPermissionError && !isNetworkError;
|
|
2776
|
+
const apiMessage = typeof activeError === "string" && activeError.trim() !== "" ? activeError : null;
|
|
2777
|
+
let title = "Oops Connection Error";
|
|
2778
|
+
let description = apiMessage || `We could not load your request. Please check your connection and try again.`;
|
|
2779
|
+
let IconComponent = import_core_free_icons16.ConfusedIcon;
|
|
2780
|
+
if (isNotFoundError) {
|
|
2781
|
+
title = "Oops its not your fault";
|
|
2782
|
+
description = apiMessage || `We could not reach the ${envName} you just loaded. Our team has been notified.`;
|
|
2783
|
+
} else if (isPermissionError) {
|
|
2784
|
+
title = "Access Restricted";
|
|
2785
|
+
description = apiMessage || `You have insufficient permissions to view this ${envName}. Please contact your administrator.`;
|
|
2786
|
+
}
|
|
2787
|
+
return /* @__PURE__ */ import_react54.default.createElement("div", { className: "flex flex-col items-center justify-center h-screen w-full px-4 animate-in fade-in duration-500" }, /* @__PURE__ */ import_react54.default.createElement("div", { className: "mb-4 flex justify-center" }, /* @__PURE__ */ import_react54.default.createElement(import_react55.HugeiconsIcon, { icon: IconComponent, size: 48, className: "text-neutral-300" })), /* @__PURE__ */ import_react54.default.createElement("h2", { className: "text-lg text-black tracking-tight " }, title), /* @__PURE__ */ import_react54.default.createElement("p", { className: "text-xs mt-2 mb-8 text-neutral-500 max-w-sm text-center leading-relaxed" }, description), /* @__PURE__ */ import_react54.default.createElement("div", { className: "flex flex-col sm:flex-row items-center gap-3 w-full justify-center sm:w-auto" }, isNotFoundError || isPermissionError ? /* @__PURE__ */ import_react54.default.createElement(
|
|
2788
|
+
"button",
|
|
2789
|
+
{
|
|
2790
|
+
onClick: () => window.location.href = returnUrl,
|
|
2791
|
+
className: "px-6 py-2 bg-neutral-100 hover:bg-neutral-200 text-black rounded-full text-[11px] tracking-widest transition-colors w-full sm:w-auto outline-none"
|
|
2792
|
+
},
|
|
2793
|
+
returnLabel
|
|
2794
|
+
) : (
|
|
2795
|
+
// Soft errors (Network timeouts) allow them to retry or optionally retreat
|
|
2796
|
+
/* @__PURE__ */ import_react54.default.createElement(import_react54.default.Fragment, null, envName.toLowerCase().includes("application") && /* @__PURE__ */ import_react54.default.createElement(
|
|
2797
|
+
"button",
|
|
2798
|
+
{
|
|
2799
|
+
onClick: () => window.location.href = returnUrl,
|
|
2800
|
+
className: "px-6 py-2 bg-transparent border border-neutral-200 hover:bg-neutral-50 text-neutral-600 hover:text-black rounded-full text-[11px] tracking-widest transition-colors w-full sm:w-auto outline-none"
|
|
2801
|
+
},
|
|
2802
|
+
"Back Home"
|
|
2803
|
+
), /* @__PURE__ */ import_react54.default.createElement(
|
|
2804
|
+
"button",
|
|
2805
|
+
{
|
|
2806
|
+
onClick: onRetry,
|
|
2807
|
+
className: "px-6 py-2 bg-black hover:bg-neutral-800 text-white rounded-full text-[11px] tracking-widest transition-colors w-full sm:w-auto outline-none capitalize"
|
|
2808
|
+
},
|
|
2809
|
+
"Refresh ",
|
|
2810
|
+
envName
|
|
2811
|
+
))
|
|
2812
|
+
)));
|
|
2813
|
+
}
|
|
2814
|
+
return null;
|
|
2815
|
+
};
|
|
2816
|
+
|
|
2817
|
+
// src/components/UniversalLookupPage.tsx
|
|
2818
|
+
var import_react56 = __toESM(require("react"));
|
|
2819
|
+
var import_react57 = require("@hugeicons/react");
|
|
2820
|
+
var import_core_free_icons17 = require("@hugeicons/core-free-icons");
|
|
2821
|
+
var UniversalLookupPage = ({
|
|
2822
|
+
headerTitle,
|
|
2823
|
+
headerDescription,
|
|
2824
|
+
searchOptions,
|
|
2825
|
+
selectedSearchType,
|
|
2826
|
+
onSearchTypeChange,
|
|
2827
|
+
searchQuery,
|
|
2828
|
+
onSearchQueryChange,
|
|
2829
|
+
isSearching,
|
|
2830
|
+
onSearch,
|
|
2831
|
+
resultContent,
|
|
2832
|
+
modals
|
|
2833
|
+
}) => {
|
|
2834
|
+
const [isTypeModalOpen, setIsTypeModalOpen] = (0, import_react56.useState)(false);
|
|
2835
|
+
const currentOptionLabel = searchOptions.find((opt) => opt.value === selectedSearchType)?.label || "Select Type";
|
|
2836
|
+
return /* @__PURE__ */ import_react56.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 pb-20" }, /* @__PURE__ */ import_react56.default.createElement(ManagedToaster, null), /* @__PURE__ */ import_react56.default.createElement("div", { className: "flex flex-col sm:flex-row sm:items-start justify-between gap-3 sm:gap-4" }, /* @__PURE__ */ import_react56.default.createElement("div", { className: "min-w-0" }, /* @__PURE__ */ import_react56.default.createElement("h1", { className: "text-xl text-black mb-1 truncate tracking-tight" }, headerTitle), /* @__PURE__ */ import_react56.default.createElement("p", { className: "text-xs text-neutral-500 truncate" }, headerDescription))), /* @__PURE__ */ import_react56.default.createElement("div", { className: "w-full max-w-2xl pb-8" }, /* @__PURE__ */ import_react56.default.createElement("form", { className: "flex flex-col gap-6", onSubmit: onSearch, autoComplete: "off" }, /* @__PURE__ */ import_react56.default.createElement("div", { className: "flex gap-4" }, /* @__PURE__ */ import_react56.default.createElement(
|
|
2837
|
+
"button",
|
|
2838
|
+
{
|
|
2839
|
+
type: "button",
|
|
2840
|
+
onClick: () => setIsTypeModalOpen(true),
|
|
2841
|
+
className: "mt-2 text-[12px] tracking-widest bg-transparent border-b border-neutral-200 text-black text-left outline-none focus:border-black shrink-0 uppercase"
|
|
2842
|
+
},
|
|
2843
|
+
currentOptionLabel
|
|
2844
|
+
), /* @__PURE__ */ import_react56.default.createElement("div", { className: "flex-1" }, /* @__PURE__ */ import_react56.default.createElement(
|
|
2845
|
+
TextInput,
|
|
2846
|
+
{
|
|
2847
|
+
placeholder: "Enter Exact ID, Email, or Slug...",
|
|
2848
|
+
value: searchQuery,
|
|
2849
|
+
onChange: onSearchQueryChange,
|
|
2850
|
+
disabled: isSearching
|
|
2851
|
+
}
|
|
2852
|
+
))), /* @__PURE__ */ import_react56.default.createElement("div", { className: "flex justify-end" }, /* @__PURE__ */ import_react56.default.createElement(
|
|
2853
|
+
ThreeDActionButton,
|
|
2854
|
+
{
|
|
2855
|
+
type: "submit",
|
|
2856
|
+
disabled: isSearching || !searchQuery,
|
|
2857
|
+
isLoading: isSearching,
|
|
2858
|
+
className: "min-w-32"
|
|
2859
|
+
},
|
|
2860
|
+
/* @__PURE__ */ import_react56.default.createElement(import_react57.HugeiconsIcon, { icon: import_core_free_icons17.Search01Icon, size: 14, className: "mr-2" }),
|
|
2861
|
+
" Lookup"
|
|
2862
|
+
)))), resultContent && /* @__PURE__ */ import_react56.default.createElement("div", { className: "w-full max-w-2xl bg-white text-left animate-in fade-in slide-in-from-bottom-4" }, /* @__PURE__ */ import_react56.default.createElement("h3", { className: "text-[10px] text-neutral-400 tracking-[0.2em] mb-6 uppercase" }, "Entity Record Found"), resultContent), isTypeModalOpen && /* @__PURE__ */ import_react56.default.createElement("div", { className: "fixed inset-0 z-110 flex items-center justify-center p-4" }, /* @__PURE__ */ import_react56.default.createElement("div", { className: "absolute inset-0 bg-black/30", onClick: () => setIsTypeModalOpen(false) }), /* @__PURE__ */ import_react56.default.createElement("div", { className: "relative w-80 bg-white shadow-2xl rounded-2xl flex flex-col items-center overflow-hidden animate-in zoom-in-95 duration-200" }, /* @__PURE__ */ import_react56.default.createElement("div", { className: "p-6 text-center w-full" }, /* @__PURE__ */ import_react56.default.createElement("h3", { className: "text-[14px] text-black tracking-tight mb-2" }, "Select Entity Type")), /* @__PURE__ */ import_react56.default.createElement("div", { className: "w-full flex flex-col pl-2 pr-2 pb-2" }, searchOptions.map((option) => /* @__PURE__ */ import_react56.default.createElement(
|
|
2863
|
+
"button",
|
|
2864
|
+
{
|
|
2865
|
+
key: option.value,
|
|
2866
|
+
type: "button",
|
|
2867
|
+
onClick: () => {
|
|
2868
|
+
onSearchTypeChange(option.value);
|
|
2869
|
+
setIsTypeModalOpen(false);
|
|
2870
|
+
},
|
|
2871
|
+
className: `text-left px-4 py-3 text-[12px] tracking-wide transition-colors rounded-full flex items-center justify-between outline-none ${selectedSearchType === option.value ? "bg-neutral-100 text-black" : "text-neutral-500 hover:bg-neutral-50 hover:text-black"}`
|
|
2872
|
+
},
|
|
2873
|
+
/* @__PURE__ */ import_react56.default.createElement("span", { className: "truncate pr-2" }, option.label),
|
|
2874
|
+
selectedSearchType === option.value && /* @__PURE__ */ import_react56.default.createElement("div", { className: "w-1.5 h-1.5 bg-black rounded-full shrink-0" })
|
|
2875
|
+
))), /* @__PURE__ */ import_react56.default.createElement("div", { className: "w-full flex" }, /* @__PURE__ */ import_react56.default.createElement("button", { type: "button", onClick: () => setIsTypeModalOpen(false), className: "w-full py-2.5 text-[13px] text-neutral-600 hover:bg-neutral-50 transition-colors outline-none" }, "Cancel")))), modals);
|
|
2876
|
+
};
|
|
2877
|
+
|
|
2878
|
+
// src/components/UniversalDirectoryPage.tsx
|
|
2879
|
+
var import_react58 = __toESM(require("react"));
|
|
2880
|
+
var import_react59 = require("@hugeicons/react");
|
|
2881
|
+
var import_core_free_icons18 = require("@hugeicons/core-free-icons");
|
|
2882
|
+
var PageSpinner4 = () => /* @__PURE__ */ import_react58.default.createElement("div", { className: "flex justify-center items-center py-12" }, /* @__PURE__ */ import_react58.default.createElement(import_react59.HugeiconsIcon, { icon: import_core_free_icons18.Loading03Icon, size: 32, className: "animate-spin mb-4 text-black" }));
|
|
2883
|
+
var UniversalDirectoryPage = ({
|
|
2884
|
+
headerTitle,
|
|
2885
|
+
headerDescription,
|
|
2886
|
+
searchPlaceholder = "Search...",
|
|
2887
|
+
searchQuery,
|
|
2888
|
+
onSearchChange,
|
|
2889
|
+
currentView,
|
|
2890
|
+
onBackToList,
|
|
2891
|
+
items,
|
|
2892
|
+
isLoading,
|
|
2893
|
+
currentPage,
|
|
2894
|
+
totalPages,
|
|
2895
|
+
onPageChange,
|
|
2896
|
+
onRowClick,
|
|
2897
|
+
detailsContent,
|
|
2898
|
+
modals
|
|
2899
|
+
}) => {
|
|
2900
|
+
return /* @__PURE__ */ import_react58.default.createElement("div", { className: "flex flex-col gap-8 animate-in max-w-3xl fade-in duration-300 p-6 rounded-2xl bg-white min-h-full" }, /* @__PURE__ */ import_react58.default.createElement(ManagedToaster, null), /* @__PURE__ */ import_react58.default.createElement("div", { className: "flex flex-col sm:flex-row sm:items-start justify-between gap-4" }, currentView === "list" ? /* @__PURE__ */ import_react58.default.createElement("div", { className: "w-full" }, /* @__PURE__ */ import_react58.default.createElement("h1", { className: "text-xl text-black mb-1 tracking-tight" }, headerTitle), /* @__PURE__ */ import_react58.default.createElement("p", { className: "text-xs text-neutral-500 mb-6" }, headerDescription), /* @__PURE__ */ import_react58.default.createElement(
|
|
2901
|
+
TextInput,
|
|
2902
|
+
{
|
|
2903
|
+
placeholder: searchPlaceholder,
|
|
2904
|
+
value: searchQuery,
|
|
2905
|
+
onChange: onSearchChange
|
|
2906
|
+
}
|
|
2907
|
+
)) : /* @__PURE__ */ import_react58.default.createElement("div", { className: "flex flex-col items-start gap-3" }, /* @__PURE__ */ import_react58.default.createElement("button", { onClick: onBackToList, className: "text-[10px] text-neutral-400 hover:text-black tracking-[0.2em] flex items-center gap-1.5 transition-colors outline-none uppercase" }, /* @__PURE__ */ import_react58.default.createElement(import_react59.HugeiconsIcon, { icon: import_core_free_icons18.ArrowLeft01Icon, size: 12 }), " Back"))), currentView === "list" && /* @__PURE__ */ import_react58.default.createElement("div", { className: "w-full overflow-hidden pt-2" }, isLoading ? /* @__PURE__ */ import_react58.default.createElement(PageSpinner4, null) : /* @__PURE__ */ import_react58.default.createElement("div", { className: "flex flex-col min-w-0" }, /* @__PURE__ */ import_react58.default.createElement("div", { className: "divide-y divide-neutral-100" }, items.length === 0 ? /* @__PURE__ */ import_react58.default.createElement("p", { className: "text-xs text-neutral-500 py-6 text-center" }, "No records found.") : items.map((item) => /* @__PURE__ */ import_react58.default.createElement(
|
|
2908
|
+
"div",
|
|
2909
|
+
{
|
|
2910
|
+
key: item.id,
|
|
2911
|
+
onClick: () => onRowClick(item.id),
|
|
2912
|
+
className: "flex items-center justify-between p-4 sm:p-5 hover:bg-neutral-50/50 transition-colors cursor-pointer group min-w-0"
|
|
2913
|
+
},
|
|
2914
|
+
/* @__PURE__ */ import_react58.default.createElement("div", { className: "flex items-center gap-3 sm:gap-4 min-w-0 flex-1" }, /* @__PURE__ */ import_react58.default.createElement("div", { className: "w-10 h-10 shrink-0 rounded-full flex items-center justify-center bg-neutral-100 text-black text-xs" }, item.icon), /* @__PURE__ */ import_react58.default.createElement("div", { className: "min-w-0 flex-1" }, /* @__PURE__ */ import_react58.default.createElement("div", { className: "text-sm text-black truncate pr-2" }, item.primaryText), /* @__PURE__ */ import_react58.default.createElement("div", { className: "text-xs text-neutral-500 truncate pr-2 mt-0.5" }, item.secondaryText))),
|
|
2915
|
+
item.rightBadge && /* @__PURE__ */ import_react58.default.createElement("div", { className: "shrink-0 pl-2" }, /* @__PURE__ */ import_react58.default.createElement("span", { className: `text-[10px] tracking-[0.2em] px-3 py-1 rounded-full whitespace-nowrap uppercase ${item.rightBadgeClass || "text-neutral-500 border border-neutral-200 bg-white"}` }, item.rightBadge))
|
|
2916
|
+
))), totalPages > 1 && /* @__PURE__ */ import_react58.default.createElement("div", { className: "flex items-center justify-between p-4 sm:p-5" }, /* @__PURE__ */ import_react58.default.createElement("span", { className: "text-[10px] text-neutral-400 tracking-[0.2em] uppercase" }, "Page ", currentPage, " of ", totalPages), /* @__PURE__ */ import_react58.default.createElement("div", { className: "flex items-center gap-2" }, /* @__PURE__ */ import_react58.default.createElement("button", { onClick: () => onPageChange(currentPage - 1), disabled: currentPage === 1 || isLoading, className: "p-2 border border-neutral-200 rounded-full bg-white text-neutral-500 hover:text-black outline-none disabled:opacity-30" }, /* @__PURE__ */ import_react58.default.createElement(import_react59.HugeiconsIcon, { icon: import_core_free_icons18.ArrowLeft01Icon, size: 14 })), /* @__PURE__ */ import_react58.default.createElement("button", { onClick: () => onPageChange(currentPage + 1), disabled: currentPage >= totalPages || isLoading, className: "p-2 border border-neutral-200 rounded-full bg-white text-neutral-500 hover:text-black outline-none disabled:opacity-30" }, /* @__PURE__ */ import_react58.default.createElement(import_react59.HugeiconsIcon, { icon: import_core_free_icons18.ArrowRight01Icon, size: 14 })))))), currentView === "details" && detailsContent, modals);
|
|
2917
|
+
};
|
|
2749
2918
|
// Annotate the CommonJS export names for ESM import in node:
|
|
2750
2919
|
0 && (module.exports = {
|
|
2751
2920
|
AITranscriptionFeature,
|
|
@@ -2775,8 +2944,11 @@ var UniversalOverviewPage = ({
|
|
|
2775
2944
|
UniversalAgentConsole,
|
|
2776
2945
|
UniversalBillingPage,
|
|
2777
2946
|
UniversalDashboardPage,
|
|
2947
|
+
UniversalDirectoryPage,
|
|
2948
|
+
UniversalErrorView,
|
|
2778
2949
|
UniversalHeader,
|
|
2779
2950
|
UniversalIdentityPage,
|
|
2951
|
+
UniversalLookupPage,
|
|
2780
2952
|
UniversalMembersPage,
|
|
2781
2953
|
UniversalOrganizationPage,
|
|
2782
2954
|
UniversalOverviewPage,
|
package/dist/index.mjs
CHANGED
|
@@ -2706,6 +2706,172 @@ var UniversalOverviewPage = ({
|
|
|
2706
2706
|
return /* @__PURE__ */ React34.createElement("div", { key: idx, className: `mt-4 p-5 rounded-xl flex flex-col gap-4 ${bgClass}` }, /* @__PURE__ */ React34.createElement("div", { className: "flex items-center gap-2" }, /* @__PURE__ */ React34.createElement("span", { className: `text-[11px] tracking-widest uppercase ${textClass}` }, alert.title)), alert.items.map((item, itemIdx) => /* @__PURE__ */ React34.createElement("div", { key: itemIdx }, /* @__PURE__ */ React34.createElement("span", { className: `text-[10px] tracking-[0.2em] block mb-1 uppercase ${lblClass}` }, item.label), /* @__PURE__ */ React34.createElement("p", { className: `text-[13px] leading-relaxed ${valClass}` }, item.text))));
|
|
2707
2707
|
}))));
|
|
2708
2708
|
};
|
|
2709
|
+
|
|
2710
|
+
// src/components/UniversalErrorView.tsx
|
|
2711
|
+
import React35 from "react";
|
|
2712
|
+
import { HugeiconsIcon as HugeiconsIcon20 } from "@hugeicons/react";
|
|
2713
|
+
import { ConfusedIcon } from "@hugeicons/core-free-icons";
|
|
2714
|
+
var UniversalErrorView = ({
|
|
2715
|
+
isBooting,
|
|
2716
|
+
isLoading,
|
|
2717
|
+
activeData,
|
|
2718
|
+
activeError,
|
|
2719
|
+
envName,
|
|
2720
|
+
onRetry,
|
|
2721
|
+
returnUrl = "/app",
|
|
2722
|
+
returnLabel = "Return to Workspace"
|
|
2723
|
+
}) => {
|
|
2724
|
+
if (isBooting || isLoading && !activeData) {
|
|
2725
|
+
return /* @__PURE__ */ React35.createElement("div", { className: "flex items-center justify-center h-screen w-full bg-transparent" }, /* @__PURE__ */ React35.createElement(PageSpinner, null));
|
|
2726
|
+
}
|
|
2727
|
+
if (!isLoading && (!activeData || activeError)) {
|
|
2728
|
+
const errorString = typeof activeError === "string" ? activeError : JSON.stringify(activeError || "");
|
|
2729
|
+
const errorMsg = errorString.toLowerCase();
|
|
2730
|
+
const isPermissionError = errorMsg.includes("forbidden") || errorMsg.includes("unauthorized") || errorMsg.includes("permission");
|
|
2731
|
+
const isNetworkError = errorMsg.includes("network") || errorMsg.includes("connection") || errorMsg.includes("fetch");
|
|
2732
|
+
const isNotFoundError = errorMsg.includes("not found") || errorMsg.includes("404") || errorMsg.includes("does not exist") || !activeData && !isPermissionError && !isNetworkError;
|
|
2733
|
+
const apiMessage = typeof activeError === "string" && activeError.trim() !== "" ? activeError : null;
|
|
2734
|
+
let title = "Oops Connection Error";
|
|
2735
|
+
let description = apiMessage || `We could not load your request. Please check your connection and try again.`;
|
|
2736
|
+
let IconComponent = ConfusedIcon;
|
|
2737
|
+
if (isNotFoundError) {
|
|
2738
|
+
title = "Oops its not your fault";
|
|
2739
|
+
description = apiMessage || `We could not reach the ${envName} you just loaded. Our team has been notified.`;
|
|
2740
|
+
} else if (isPermissionError) {
|
|
2741
|
+
title = "Access Restricted";
|
|
2742
|
+
description = apiMessage || `You have insufficient permissions to view this ${envName}. Please contact your administrator.`;
|
|
2743
|
+
}
|
|
2744
|
+
return /* @__PURE__ */ React35.createElement("div", { className: "flex flex-col items-center justify-center h-screen w-full px-4 animate-in fade-in duration-500" }, /* @__PURE__ */ React35.createElement("div", { className: "mb-4 flex justify-center" }, /* @__PURE__ */ React35.createElement(HugeiconsIcon20, { icon: IconComponent, size: 48, className: "text-neutral-300" })), /* @__PURE__ */ React35.createElement("h2", { className: "text-lg text-black tracking-tight " }, title), /* @__PURE__ */ React35.createElement("p", { className: "text-xs mt-2 mb-8 text-neutral-500 max-w-sm text-center leading-relaxed" }, description), /* @__PURE__ */ React35.createElement("div", { className: "flex flex-col sm:flex-row items-center gap-3 w-full justify-center sm:w-auto" }, isNotFoundError || isPermissionError ? /* @__PURE__ */ React35.createElement(
|
|
2745
|
+
"button",
|
|
2746
|
+
{
|
|
2747
|
+
onClick: () => window.location.href = returnUrl,
|
|
2748
|
+
className: "px-6 py-2 bg-neutral-100 hover:bg-neutral-200 text-black rounded-full text-[11px] tracking-widest transition-colors w-full sm:w-auto outline-none"
|
|
2749
|
+
},
|
|
2750
|
+
returnLabel
|
|
2751
|
+
) : (
|
|
2752
|
+
// Soft errors (Network timeouts) allow them to retry or optionally retreat
|
|
2753
|
+
/* @__PURE__ */ React35.createElement(React35.Fragment, null, envName.toLowerCase().includes("application") && /* @__PURE__ */ React35.createElement(
|
|
2754
|
+
"button",
|
|
2755
|
+
{
|
|
2756
|
+
onClick: () => window.location.href = returnUrl,
|
|
2757
|
+
className: "px-6 py-2 bg-transparent border border-neutral-200 hover:bg-neutral-50 text-neutral-600 hover:text-black rounded-full text-[11px] tracking-widest transition-colors w-full sm:w-auto outline-none"
|
|
2758
|
+
},
|
|
2759
|
+
"Back Home"
|
|
2760
|
+
), /* @__PURE__ */ React35.createElement(
|
|
2761
|
+
"button",
|
|
2762
|
+
{
|
|
2763
|
+
onClick: onRetry,
|
|
2764
|
+
className: "px-6 py-2 bg-black hover:bg-neutral-800 text-white rounded-full text-[11px] tracking-widest transition-colors w-full sm:w-auto outline-none capitalize"
|
|
2765
|
+
},
|
|
2766
|
+
"Refresh ",
|
|
2767
|
+
envName
|
|
2768
|
+
))
|
|
2769
|
+
)));
|
|
2770
|
+
}
|
|
2771
|
+
return null;
|
|
2772
|
+
};
|
|
2773
|
+
|
|
2774
|
+
// src/components/UniversalLookupPage.tsx
|
|
2775
|
+
import React36, { useState as useState18 } from "react";
|
|
2776
|
+
import { HugeiconsIcon as HugeiconsIcon21 } from "@hugeicons/react";
|
|
2777
|
+
import { Search01Icon } from "@hugeicons/core-free-icons";
|
|
2778
|
+
var UniversalLookupPage = ({
|
|
2779
|
+
headerTitle,
|
|
2780
|
+
headerDescription,
|
|
2781
|
+
searchOptions,
|
|
2782
|
+
selectedSearchType,
|
|
2783
|
+
onSearchTypeChange,
|
|
2784
|
+
searchQuery,
|
|
2785
|
+
onSearchQueryChange,
|
|
2786
|
+
isSearching,
|
|
2787
|
+
onSearch,
|
|
2788
|
+
resultContent,
|
|
2789
|
+
modals
|
|
2790
|
+
}) => {
|
|
2791
|
+
const [isTypeModalOpen, setIsTypeModalOpen] = useState18(false);
|
|
2792
|
+
const currentOptionLabel = searchOptions.find((opt) => opt.value === selectedSearchType)?.label || "Select Type";
|
|
2793
|
+
return /* @__PURE__ */ React36.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 pb-20" }, /* @__PURE__ */ React36.createElement(ManagedToaster, null), /* @__PURE__ */ React36.createElement("div", { className: "flex flex-col sm:flex-row sm:items-start justify-between gap-3 sm:gap-4" }, /* @__PURE__ */ React36.createElement("div", { className: "min-w-0" }, /* @__PURE__ */ React36.createElement("h1", { className: "text-xl text-black mb-1 truncate tracking-tight" }, headerTitle), /* @__PURE__ */ React36.createElement("p", { className: "text-xs text-neutral-500 truncate" }, headerDescription))), /* @__PURE__ */ React36.createElement("div", { className: "w-full max-w-2xl pb-8" }, /* @__PURE__ */ React36.createElement("form", { className: "flex flex-col gap-6", onSubmit: onSearch, autoComplete: "off" }, /* @__PURE__ */ React36.createElement("div", { className: "flex gap-4" }, /* @__PURE__ */ React36.createElement(
|
|
2794
|
+
"button",
|
|
2795
|
+
{
|
|
2796
|
+
type: "button",
|
|
2797
|
+
onClick: () => setIsTypeModalOpen(true),
|
|
2798
|
+
className: "mt-2 text-[12px] tracking-widest bg-transparent border-b border-neutral-200 text-black text-left outline-none focus:border-black shrink-0 uppercase"
|
|
2799
|
+
},
|
|
2800
|
+
currentOptionLabel
|
|
2801
|
+
), /* @__PURE__ */ React36.createElement("div", { className: "flex-1" }, /* @__PURE__ */ React36.createElement(
|
|
2802
|
+
TextInput,
|
|
2803
|
+
{
|
|
2804
|
+
placeholder: "Enter Exact ID, Email, or Slug...",
|
|
2805
|
+
value: searchQuery,
|
|
2806
|
+
onChange: onSearchQueryChange,
|
|
2807
|
+
disabled: isSearching
|
|
2808
|
+
}
|
|
2809
|
+
))), /* @__PURE__ */ React36.createElement("div", { className: "flex justify-end" }, /* @__PURE__ */ React36.createElement(
|
|
2810
|
+
ThreeDActionButton,
|
|
2811
|
+
{
|
|
2812
|
+
type: "submit",
|
|
2813
|
+
disabled: isSearching || !searchQuery,
|
|
2814
|
+
isLoading: isSearching,
|
|
2815
|
+
className: "min-w-32"
|
|
2816
|
+
},
|
|
2817
|
+
/* @__PURE__ */ React36.createElement(HugeiconsIcon21, { icon: Search01Icon, size: 14, className: "mr-2" }),
|
|
2818
|
+
" Lookup"
|
|
2819
|
+
)))), resultContent && /* @__PURE__ */ React36.createElement("div", { className: "w-full max-w-2xl bg-white text-left animate-in fade-in slide-in-from-bottom-4" }, /* @__PURE__ */ React36.createElement("h3", { className: "text-[10px] text-neutral-400 tracking-[0.2em] mb-6 uppercase" }, "Entity Record Found"), resultContent), isTypeModalOpen && /* @__PURE__ */ React36.createElement("div", { className: "fixed inset-0 z-110 flex items-center justify-center p-4" }, /* @__PURE__ */ React36.createElement("div", { className: "absolute inset-0 bg-black/30", onClick: () => setIsTypeModalOpen(false) }), /* @__PURE__ */ React36.createElement("div", { className: "relative w-80 bg-white shadow-2xl rounded-2xl flex flex-col items-center overflow-hidden animate-in zoom-in-95 duration-200" }, /* @__PURE__ */ React36.createElement("div", { className: "p-6 text-center w-full" }, /* @__PURE__ */ React36.createElement("h3", { className: "text-[14px] text-black tracking-tight mb-2" }, "Select Entity Type")), /* @__PURE__ */ React36.createElement("div", { className: "w-full flex flex-col pl-2 pr-2 pb-2" }, searchOptions.map((option) => /* @__PURE__ */ React36.createElement(
|
|
2820
|
+
"button",
|
|
2821
|
+
{
|
|
2822
|
+
key: option.value,
|
|
2823
|
+
type: "button",
|
|
2824
|
+
onClick: () => {
|
|
2825
|
+
onSearchTypeChange(option.value);
|
|
2826
|
+
setIsTypeModalOpen(false);
|
|
2827
|
+
},
|
|
2828
|
+
className: `text-left px-4 py-3 text-[12px] tracking-wide transition-colors rounded-full flex items-center justify-between outline-none ${selectedSearchType === option.value ? "bg-neutral-100 text-black" : "text-neutral-500 hover:bg-neutral-50 hover:text-black"}`
|
|
2829
|
+
},
|
|
2830
|
+
/* @__PURE__ */ React36.createElement("span", { className: "truncate pr-2" }, option.label),
|
|
2831
|
+
selectedSearchType === option.value && /* @__PURE__ */ React36.createElement("div", { className: "w-1.5 h-1.5 bg-black rounded-full shrink-0" })
|
|
2832
|
+
))), /* @__PURE__ */ React36.createElement("div", { className: "w-full flex" }, /* @__PURE__ */ React36.createElement("button", { type: "button", onClick: () => setIsTypeModalOpen(false), className: "w-full py-2.5 text-[13px] text-neutral-600 hover:bg-neutral-50 transition-colors outline-none" }, "Cancel")))), modals);
|
|
2833
|
+
};
|
|
2834
|
+
|
|
2835
|
+
// src/components/UniversalDirectoryPage.tsx
|
|
2836
|
+
import React37 from "react";
|
|
2837
|
+
import { HugeiconsIcon as HugeiconsIcon22 } from "@hugeicons/react";
|
|
2838
|
+
import { ArrowLeft01Icon as ArrowLeft01Icon6, ArrowRight01Icon as ArrowRight01Icon6, Loading03Icon as Loading03Icon10 } from "@hugeicons/core-free-icons";
|
|
2839
|
+
var PageSpinner4 = () => /* @__PURE__ */ React37.createElement("div", { className: "flex justify-center items-center py-12" }, /* @__PURE__ */ React37.createElement(HugeiconsIcon22, { icon: Loading03Icon10, size: 32, className: "animate-spin mb-4 text-black" }));
|
|
2840
|
+
var UniversalDirectoryPage = ({
|
|
2841
|
+
headerTitle,
|
|
2842
|
+
headerDescription,
|
|
2843
|
+
searchPlaceholder = "Search...",
|
|
2844
|
+
searchQuery,
|
|
2845
|
+
onSearchChange,
|
|
2846
|
+
currentView,
|
|
2847
|
+
onBackToList,
|
|
2848
|
+
items,
|
|
2849
|
+
isLoading,
|
|
2850
|
+
currentPage,
|
|
2851
|
+
totalPages,
|
|
2852
|
+
onPageChange,
|
|
2853
|
+
onRowClick,
|
|
2854
|
+
detailsContent,
|
|
2855
|
+
modals
|
|
2856
|
+
}) => {
|
|
2857
|
+
return /* @__PURE__ */ React37.createElement("div", { className: "flex flex-col gap-8 animate-in max-w-3xl fade-in duration-300 p-6 rounded-2xl bg-white min-h-full" }, /* @__PURE__ */ React37.createElement(ManagedToaster, null), /* @__PURE__ */ React37.createElement("div", { className: "flex flex-col sm:flex-row sm:items-start justify-between gap-4" }, currentView === "list" ? /* @__PURE__ */ React37.createElement("div", { className: "w-full" }, /* @__PURE__ */ React37.createElement("h1", { className: "text-xl text-black mb-1 tracking-tight" }, headerTitle), /* @__PURE__ */ React37.createElement("p", { className: "text-xs text-neutral-500 mb-6" }, headerDescription), /* @__PURE__ */ React37.createElement(
|
|
2858
|
+
TextInput,
|
|
2859
|
+
{
|
|
2860
|
+
placeholder: searchPlaceholder,
|
|
2861
|
+
value: searchQuery,
|
|
2862
|
+
onChange: onSearchChange
|
|
2863
|
+
}
|
|
2864
|
+
)) : /* @__PURE__ */ React37.createElement("div", { className: "flex flex-col items-start gap-3" }, /* @__PURE__ */ React37.createElement("button", { onClick: onBackToList, className: "text-[10px] text-neutral-400 hover:text-black tracking-[0.2em] flex items-center gap-1.5 transition-colors outline-none uppercase" }, /* @__PURE__ */ React37.createElement(HugeiconsIcon22, { icon: ArrowLeft01Icon6, size: 12 }), " Back"))), currentView === "list" && /* @__PURE__ */ React37.createElement("div", { className: "w-full overflow-hidden pt-2" }, isLoading ? /* @__PURE__ */ React37.createElement(PageSpinner4, null) : /* @__PURE__ */ React37.createElement("div", { className: "flex flex-col min-w-0" }, /* @__PURE__ */ React37.createElement("div", { className: "divide-y divide-neutral-100" }, items.length === 0 ? /* @__PURE__ */ React37.createElement("p", { className: "text-xs text-neutral-500 py-6 text-center" }, "No records found.") : items.map((item) => /* @__PURE__ */ React37.createElement(
|
|
2865
|
+
"div",
|
|
2866
|
+
{
|
|
2867
|
+
key: item.id,
|
|
2868
|
+
onClick: () => onRowClick(item.id),
|
|
2869
|
+
className: "flex items-center justify-between p-4 sm:p-5 hover:bg-neutral-50/50 transition-colors cursor-pointer group min-w-0"
|
|
2870
|
+
},
|
|
2871
|
+
/* @__PURE__ */ React37.createElement("div", { className: "flex items-center gap-3 sm:gap-4 min-w-0 flex-1" }, /* @__PURE__ */ React37.createElement("div", { className: "w-10 h-10 shrink-0 rounded-full flex items-center justify-center bg-neutral-100 text-black text-xs" }, item.icon), /* @__PURE__ */ React37.createElement("div", { className: "min-w-0 flex-1" }, /* @__PURE__ */ React37.createElement("div", { className: "text-sm text-black truncate pr-2" }, item.primaryText), /* @__PURE__ */ React37.createElement("div", { className: "text-xs text-neutral-500 truncate pr-2 mt-0.5" }, item.secondaryText))),
|
|
2872
|
+
item.rightBadge && /* @__PURE__ */ React37.createElement("div", { className: "shrink-0 pl-2" }, /* @__PURE__ */ React37.createElement("span", { className: `text-[10px] tracking-[0.2em] px-3 py-1 rounded-full whitespace-nowrap uppercase ${item.rightBadgeClass || "text-neutral-500 border border-neutral-200 bg-white"}` }, item.rightBadge))
|
|
2873
|
+
))), totalPages > 1 && /* @__PURE__ */ React37.createElement("div", { className: "flex items-center justify-between p-4 sm:p-5" }, /* @__PURE__ */ React37.createElement("span", { className: "text-[10px] text-neutral-400 tracking-[0.2em] uppercase" }, "Page ", currentPage, " of ", totalPages), /* @__PURE__ */ React37.createElement("div", { className: "flex items-center gap-2" }, /* @__PURE__ */ React37.createElement("button", { onClick: () => onPageChange(currentPage - 1), disabled: currentPage === 1 || isLoading, className: "p-2 border border-neutral-200 rounded-full bg-white text-neutral-500 hover:text-black outline-none disabled:opacity-30" }, /* @__PURE__ */ React37.createElement(HugeiconsIcon22, { icon: ArrowLeft01Icon6, size: 14 })), /* @__PURE__ */ React37.createElement("button", { onClick: () => onPageChange(currentPage + 1), disabled: currentPage >= totalPages || isLoading, className: "p-2 border border-neutral-200 rounded-full bg-white text-neutral-500 hover:text-black outline-none disabled:opacity-30" }, /* @__PURE__ */ React37.createElement(HugeiconsIcon22, { icon: ArrowRight01Icon6, size: 14 })))))), currentView === "details" && detailsContent, modals);
|
|
2874
|
+
};
|
|
2709
2875
|
export {
|
|
2710
2876
|
AITranscriptionFeature,
|
|
2711
2877
|
AppBento2,
|
|
@@ -2734,8 +2900,11 @@ export {
|
|
|
2734
2900
|
UniversalAgentConsole,
|
|
2735
2901
|
UniversalBillingPage,
|
|
2736
2902
|
UniversalDashboardPage,
|
|
2903
|
+
UniversalDirectoryPage,
|
|
2904
|
+
UniversalErrorView,
|
|
2737
2905
|
UniversalHeader,
|
|
2738
2906
|
UniversalIdentityPage,
|
|
2907
|
+
UniversalLookupPage,
|
|
2739
2908
|
UniversalMembersPage,
|
|
2740
2909
|
UniversalOrganizationPage,
|
|
2741
2910
|
UniversalOverviewPage,
|