@elevasis/ui 2.9.1 → 2.10.1

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.
Files changed (74) hide show
  1. package/dist/app/index.css +137 -0
  2. package/dist/app/index.d.ts +223 -0
  3. package/dist/app/index.js +95 -0
  4. package/dist/charts/index.js +3 -2
  5. package/dist/{chunk-NYMKWGKN.js → chunk-4BF74JVD.js} +110 -7
  6. package/dist/{chunk-47YILFON.js → chunk-6PNHW4X2.js} +159 -144
  7. package/dist/chunk-ADSSLKKP.js +10 -0
  8. package/dist/chunk-AEBKE4IX.js +13 -0
  9. package/dist/{chunk-C2OFFC7J.js → chunk-AL23U6C3.js} +3 -2
  10. package/dist/{chunk-27COZ5AH.js → chunk-CEWTOKE7.js} +3 -50
  11. package/dist/{chunk-AQQYVAFK.js → chunk-CLXMNMIS.js} +8 -7
  12. package/dist/{chunk-4PHPENKX.js → chunk-E3IFHX6A.js} +27 -377
  13. package/dist/{chunk-CYXZHBP4.js → chunk-F4TPY6YL.js} +14 -3
  14. package/dist/chunk-G2TDX3W6.js +5 -0
  15. package/dist/{chunk-CTWYIRKW.js → chunk-GJVGV7QZ.js} +24 -34
  16. package/dist/chunk-IIMU5YAJ.js +53 -0
  17. package/dist/{chunk-VNUOQQNY.js → chunk-KYOF6NYW.js} +2 -2
  18. package/dist/{chunk-W4VYXIN7.js → chunk-L4XXM55J.js} +3 -142
  19. package/dist/{chunk-YCHZ4U5V.js → chunk-LPSBID5V.js} +5 -13
  20. package/dist/{chunk-F5QSLYUB.js → chunk-LW5NKRI7.js} +1189 -1300
  21. package/dist/{chunk-KGEYEUR5.js → chunk-M6ZZ2FW5.js} +7 -6
  22. package/dist/{chunk-OPT74SGF.js → chunk-N5CLIRBS.js} +31 -176
  23. package/dist/chunk-R7WLWGPO.js +126 -0
  24. package/dist/{chunk-Y3D3WFJG.js → chunk-SQQGLGHW.js} +2 -11
  25. package/dist/{chunk-KFICYU6S.js → chunk-STZJ7SY5.js} +1 -1
  26. package/dist/chunk-SZHARWKU.js +15 -0
  27. package/dist/{chunk-7PDDPNQS.js → chunk-TSX4I3NW.js} +3 -3
  28. package/dist/chunk-V7XHGJQZ.js +145 -0
  29. package/dist/{chunk-UE5QQDCR.js → chunk-WHQXDETX.js} +5 -5
  30. package/dist/{chunk-4JPW5U5I.js → chunk-XB4NWSI3.js} +53 -54
  31. package/dist/{chunk-ZZ35VSNF.js → chunk-YQLE5HR5.js} +4 -4
  32. package/dist/components/index.d.ts +6 -253
  33. package/dist/components/index.js +31 -25
  34. package/dist/features/auth/index.d.ts +0 -107
  35. package/dist/features/auth/index.js +0 -1
  36. package/dist/features/crm/index.d.ts +3 -136
  37. package/dist/features/crm/index.js +14 -9
  38. package/dist/features/dashboard/index.js +13 -9
  39. package/dist/features/delivery/index.d.ts +3 -137
  40. package/dist/features/delivery/index.js +15 -9
  41. package/dist/features/lead-gen/index.d.ts +3 -29
  42. package/dist/features/lead-gen/index.js +20 -14
  43. package/dist/features/monitoring/index.d.ts +3 -30
  44. package/dist/features/monitoring/index.js +14 -10
  45. package/dist/features/operations/index.d.ts +18 -1324
  46. package/dist/features/operations/index.js +18 -13
  47. package/dist/features/seo/index.d.ts +3 -30
  48. package/dist/features/seo/index.js +3 -2
  49. package/dist/features/settings/index.d.ts +6 -146
  50. package/dist/features/settings/index.js +13 -9
  51. package/dist/hooks/index.d.ts +10 -1403
  52. package/dist/hooks/index.js +11 -7
  53. package/dist/hooks/published.d.ts +10 -1403
  54. package/dist/hooks/published.js +11 -7
  55. package/dist/index.d.ts +97 -1510
  56. package/dist/index.js +12 -8
  57. package/dist/initialization/index.d.ts +3 -117
  58. package/dist/layout/index.d.ts +12 -2
  59. package/dist/layout/index.js +5 -4
  60. package/dist/organization/index.d.ts +3 -10
  61. package/dist/organization/index.js +2 -1
  62. package/dist/profile/index.d.ts +0 -107
  63. package/dist/provider/index.d.ts +45 -65
  64. package/dist/provider/index.js +10 -6
  65. package/dist/provider/published.d.ts +45 -65
  66. package/dist/provider/published.js +6 -3
  67. package/dist/supabase/index.d.ts +0 -209
  68. package/dist/theme/index.d.ts +1 -1
  69. package/dist/theme/index.js +3 -3
  70. package/dist/typeform/index.js +10 -10
  71. package/dist/types/index.d.ts +68 -1738
  72. package/package.json +20 -4
  73. package/src/app/README.md +24 -0
  74. package/dist/chunk-IDACMRGQ.js +0 -115
@@ -0,0 +1,145 @@
1
+ import { OrganizationContext } from './chunk-DD3CCMCZ.js';
2
+ import { useProfile } from './chunk-QEPXAWE2.js';
3
+ import { useAuthContext } from './chunk-BRJ3QZ4E.js';
4
+ import { useState, useRef, useEffect, useCallback, createElement } from 'react';
5
+ import { useQueryClient } from '@tanstack/react-query';
6
+
7
+ function OrganizationProvider({ apiRequest, children }) {
8
+ const { user, organizationId: workosOrgId } = useAuthContext();
9
+ const { profile } = useProfile();
10
+ const queryClient = useQueryClient();
11
+ const [memberships, setMemberships] = useState([]);
12
+ const [currentWorkOSOrganizationId, setCurrentWorkOSOrganizationId] = useState(null);
13
+ const [currentSupabaseOrganizationId, setCurrentSupabaseOrganizationId] = useState(null);
14
+ const [currentMembership, setCurrentMembership] = useState(null);
15
+ const [isInitializing, setIsInitializing] = useState(true);
16
+ const [isOrgRefreshing, setIsOrgRefreshing] = useState(false);
17
+ const [error, setError] = useState(null);
18
+ const hasInitializedRef = useRef(false);
19
+ const [profileLoaded, setProfileLoaded] = useState(false);
20
+ useEffect(() => {
21
+ if (profile !== void 0 && profile !== null) {
22
+ setProfileLoaded(true);
23
+ }
24
+ }, [profile]);
25
+ useEffect(() => {
26
+ if (!user) {
27
+ setMemberships([]);
28
+ setCurrentWorkOSOrganizationId(null);
29
+ setCurrentSupabaseOrganizationId(null);
30
+ setCurrentMembership(null);
31
+ setIsInitializing(false);
32
+ setIsOrgRefreshing(false);
33
+ setError(null);
34
+ hasInitializedRef.current = false;
35
+ setProfileLoaded(false);
36
+ }
37
+ }, [user]);
38
+ const applyMembership = useCallback((membership) => {
39
+ setCurrentMembership(membership);
40
+ setCurrentSupabaseOrganizationId(membership?.organization?.id ?? null);
41
+ setCurrentWorkOSOrganizationId(membership?.organization?.workos_org_id ?? null);
42
+ }, []);
43
+ const selectOrganization = useCallback(
44
+ (data) => {
45
+ let selected = null;
46
+ if (profile?.last_visited_org) {
47
+ selected = data.find((m) => m.organizationId === profile.last_visited_org) ?? null;
48
+ }
49
+ if (!selected && workosOrgId) {
50
+ selected = data.find((m) => m.organization?.workos_org_id === workosOrgId) ?? null;
51
+ }
52
+ if (!selected && data.length > 0) {
53
+ selected = data[0];
54
+ }
55
+ if (selected) {
56
+ applyMembership(selected);
57
+ }
58
+ },
59
+ [profile?.last_visited_org, workosOrgId, applyMembership]
60
+ );
61
+ const fetchAndInitialize = useCallback(async () => {
62
+ if (!user?.id || !profileLoaded) return;
63
+ setError(null);
64
+ if (memberships.length === 0) {
65
+ setIsInitializing(true);
66
+ } else {
67
+ setIsOrgRefreshing(true);
68
+ }
69
+ try {
70
+ const data = await apiRequest("/memberships/my-memberships");
71
+ if (!Array.isArray(data)) {
72
+ throw new Error("Invalid memberships response");
73
+ }
74
+ setMemberships(data);
75
+ if (data.length === 0) {
76
+ hasInitializedRef.current = true;
77
+ return;
78
+ }
79
+ if (!currentWorkOSOrganizationId) {
80
+ selectOrganization(data);
81
+ } else {
82
+ const stillPresent = data.find((m) => m.organization?.workos_org_id === currentWorkOSOrganizationId);
83
+ if (!stillPresent) {
84
+ applyMembership(data[0] ?? null);
85
+ } else if (stillPresent.id !== currentMembership?.id) {
86
+ applyMembership(stillPresent);
87
+ }
88
+ }
89
+ hasInitializedRef.current = true;
90
+ } catch (err) {
91
+ setError(err instanceof Error ? err.message : "Failed to load organizations");
92
+ } finally {
93
+ setIsInitializing(false);
94
+ setIsOrgRefreshing(false);
95
+ }
96
+ }, [
97
+ user?.id,
98
+ profileLoaded,
99
+ memberships.length,
100
+ apiRequest,
101
+ currentWorkOSOrganizationId,
102
+ currentMembership?.id,
103
+ selectOrganization,
104
+ applyMembership
105
+ ]);
106
+ useEffect(() => {
107
+ if (!user?.id || !profileLoaded || hasInitializedRef.current) return;
108
+ fetchAndInitialize();
109
+ }, [user?.id, profileLoaded, fetchAndInitialize]);
110
+ const switchOrganization = useCallback(
111
+ (workosOrgId2) => {
112
+ const target = memberships.find((m) => m.organization?.workos_org_id === workosOrgId2);
113
+ if (!target) return;
114
+ applyMembership(target);
115
+ void queryClient.invalidateQueries();
116
+ void apiRequest("/users/me", {
117
+ method: "PATCH",
118
+ headers: { "Content-Type": "application/json" },
119
+ body: JSON.stringify({ last_visited_org: target.organizationId })
120
+ }).catch((err) => {
121
+ console.warn("Failed to persist last_visited_org preference:", err);
122
+ });
123
+ },
124
+ [memberships, applyMembership, queryClient, apiRequest]
125
+ );
126
+ const retry = useCallback(async () => {
127
+ hasInitializedRef.current = false;
128
+ setError(null);
129
+ await fetchAndInitialize();
130
+ }, [fetchAndInitialize]);
131
+ const value = {
132
+ currentWorkOSOrganizationId,
133
+ currentSupabaseOrganizationId,
134
+ currentMembership,
135
+ memberships,
136
+ isInitializing,
137
+ isOrgRefreshing,
138
+ error,
139
+ switchOrganization,
140
+ retry
141
+ };
142
+ return createElement(OrganizationContext.Provider, { value }, children);
143
+ }
144
+
145
+ export { OrganizationProvider };
@@ -1,11 +1,12 @@
1
1
  import { TableSelectionToolbar, SortableHeader } from './chunk-TUMSNGTX.js';
2
2
  import { PageContainer } from './chunk-BZZCNLT6.js';
3
- import { SubshellSidebarSection, SubshellNavItem } from './chunk-27COZ5AH.js';
3
+ import { SubshellNavItem } from './chunk-CEWTOKE7.js';
4
+ import { SubshellSidebarSection } from './chunk-IIMU5YAJ.js';
4
5
  import { FilterBar } from './chunk-PDHTXPSF.js';
5
6
  import { CustomModal } from './chunk-GBMNCNHX.js';
6
- import { useDealTasksDue, useDeals, useCreateDealTask, useDeleteDeal, useTableSort, sortData, usePaginationState, useTableSelection, useDealDetail } from './chunk-4PHPENKX.js';
7
+ import { useDealTasksDue, useDeals, useCreateDealTask, useDeleteDeal, useTableSort, sortData, usePaginationState, useTableSelection, useDealDetail } from './chunk-E3IFHX6A.js';
7
8
  import { SubshellContentContainer } from './chunk-RX4UWZZR.js';
8
- import { CenteredErrorState, CardHeader, PageTitleCaption, EmptyState, ActivityTimeline } from './chunk-Y3D3WFJG.js';
9
+ import { CenteredErrorState, CardHeader, PageTitleCaption, EmptyState, ActivityTimeline } from './chunk-SQQGLGHW.js';
9
10
  import { PAGE_SIZE_DEFAULT, formatTimeAgo } from './chunk-IOKL7BKE.js';
10
11
  import { useElevasisServices } from './chunk-QEPXAWE2.js';
11
12
  import { useRouterContext } from './chunk-Q7DJKLEN.js';
@@ -693,8 +694,7 @@ function CrmOverview({
693
694
  }
694
695
  var crmManifest = {
695
696
  key: "crm",
696
- accessFeatureKey: "acquisition",
697
- domainIds: ["crm"],
697
+ featureId: "crm",
698
698
  capabilityIds: ["crm.pipeline.manage"],
699
699
  sidebar: CrmSidebar,
700
700
  subshellRoutes: ["/crm"],
@@ -1,12 +1,13 @@
1
- import { ResourceExecuteDialog } from './chunk-F5QSLYUB.js';
1
+ import { ResourceExecuteDialog } from './chunk-LW5NKRI7.js';
2
2
  import { TableSelectionToolbar, SortableHeader } from './chunk-TUMSNGTX.js';
3
3
  import { PageContainer } from './chunk-BZZCNLT6.js';
4
- import { SubshellSidebarSection, SubshellNavItem } from './chunk-27COZ5AH.js';
4
+ import { SubshellNavItem } from './chunk-CEWTOKE7.js';
5
+ import { SubshellSidebarSection } from './chunk-IIMU5YAJ.js';
5
6
  import { FilterBar } from './chunk-PDHTXPSF.js';
6
7
  import { CustomModal } from './chunk-GBMNCNHX.js';
7
- import { showApiErrorNotification, acquisitionListKeys, showSuccessNotification, useListsTelemetry, useLists, useCreateList, useTableSort, sortData, usePaginationState, useTableSelection, useList, useListProgress, useListExecutions, useResourceDefinition, useCompanies, useDeleteCompanies, useContacts, useDeleteContacts } from './chunk-4PHPENKX.js';
8
+ import { showApiErrorNotification, acquisitionListKeys, showSuccessNotification, useListsTelemetry, useLists, useCreateList, useTableSort, sortData, usePaginationState, useTableSelection, useList, useListProgress, useListExecutions, useResourceDefinition, useCompanies, useDeleteCompanies, useContacts, useDeleteContacts } from './chunk-E3IFHX6A.js';
8
9
  import { SubshellContentContainer } from './chunk-RX4UWZZR.js';
9
- import { PageTitleCaption, CenteredErrorState, StatCard, EmptyState } from './chunk-Y3D3WFJG.js';
10
+ import { PageTitleCaption, CenteredErrorState, StatCard, EmptyState } from './chunk-SQQGLGHW.js';
10
11
  import { useElevasisServices } from './chunk-QEPXAWE2.js';
11
12
  import { useRouterContext } from './chunk-Q7DJKLEN.js';
12
13
  import { Stack, Paper, Text, Anchor, Group, Title, ActionIcon, Divider, Box, SimpleGrid, Badge, Card, Button, Center, Loader, Alert, Table, Progress, TextInput, Checkbox, Pagination, Textarea, Select, Code, Modal } from '@mantine/core';
@@ -50,8 +51,7 @@ var LeadGenSidebar = ({ children } = {}) => {
50
51
  };
51
52
  var leadGenManifest = {
52
53
  key: "lead-gen",
53
- accessFeatureKey: "acquisition",
54
- domainIds: ["lead-gen"],
54
+ featureId: "lead-gen",
55
55
  capabilityIds: ["leadgen.lists.manage"],
56
56
  sidebar: LeadGenSidebar,
57
57
  subshellRoutes: ["/lead-gen"],
@@ -575,12 +575,8 @@ function getPrimaryAction({
575
575
  tone: "gray"
576
576
  };
577
577
  }
578
- function CompactPipelineStage({
579
- label,
580
- value,
581
- ratio
582
- }) {
583
- return /* @__PURE__ */ jsx(Paper, { withBorder: true, p: "sm", children: /* @__PURE__ */ jsxs(Stack, { gap: 6, children: [
578
+ function CompactPipelineStage({ label, value, ratio }) {
579
+ return /* @__PURE__ */ jsx(Card, { withBorder: true, p: "sm", children: /* @__PURE__ */ jsxs(Stack, { gap: 6, children: [
584
580
  /* @__PURE__ */ jsxs(Group, { justify: "space-between", gap: "xs", wrap: "nowrap", children: [
585
581
  /* @__PURE__ */ jsx(Text, { size: "xs", c: "dimmed", tt: "uppercase", fw: 600, children: label }),
586
582
  /* @__PURE__ */ jsx(Badge, { size: "xs", variant: "light", color: "blue", children: formatPercentage(ratio) })
@@ -590,6 +586,7 @@ function CompactPipelineStage({
590
586
  ] }) });
591
587
  }
592
588
  function LeadGenOverviewPage() {
589
+ const navigate = useNavigate();
593
590
  const telemetryQuery = useListsTelemetry();
594
591
  const listsQuery = useLists();
595
592
  const data = telemetryQuery.data;
@@ -712,21 +709,21 @@ function LeadGenOverviewPage() {
712
709
  /* @__PURE__ */ jsx(Button, { component: Link, to: primaryAction.buttonTo, size: "sm", variant: "light", children: primaryAction.buttonLabel })
713
710
  ] }),
714
711
  /* @__PURE__ */ jsxs(SimpleGrid, { cols: { base: 1, md: 3 }, children: [
715
- /* @__PURE__ */ jsxs(Paper, { withBorder: true, p: "sm", children: [
712
+ /* @__PURE__ */ jsxs(Card, { withBorder: true, p: "sm", children: [
716
713
  /* @__PURE__ */ jsx(Text, { size: "xs", c: "dimmed", tt: "uppercase", fw: 600, children: "Verification" }),
717
714
  /* @__PURE__ */ jsxs(Group, { justify: "space-between", align: "flex-end", mt: 6, children: [
718
715
  /* @__PURE__ */ jsx(Title, { order: 4, children: verificationBacklog }),
719
716
  /* @__PURE__ */ jsx(Text, { size: "sm", c: "dimmed", children: "waiting" })
720
717
  ] })
721
718
  ] }),
722
- /* @__PURE__ */ jsxs(Paper, { withBorder: true, p: "sm", children: [
719
+ /* @__PURE__ */ jsxs(Card, { withBorder: true, p: "sm", children: [
723
720
  /* @__PURE__ */ jsx(Text, { size: "xs", c: "dimmed", tt: "uppercase", fw: 600, children: "Personalization" }),
724
721
  /* @__PURE__ */ jsxs(Group, { justify: "space-between", align: "flex-end", mt: 6, children: [
725
722
  /* @__PURE__ */ jsx(Title, { order: 4, children: personalizationBacklog }),
726
723
  /* @__PURE__ */ jsx(Text, { size: "sm", c: "dimmed", children: "ready" })
727
724
  ] })
728
725
  ] }),
729
- /* @__PURE__ */ jsxs(Paper, { withBorder: true, p: "sm", children: [
726
+ /* @__PURE__ */ jsxs(Card, { withBorder: true, p: "sm", children: [
730
727
  /* @__PURE__ */ jsx(Text, { size: "xs", c: "dimmed", tt: "uppercase", fw: 600, children: "Completion" }),
731
728
  /* @__PURE__ */ jsxs(Group, { justify: "space-between", align: "flex-end", mt: 6, children: [
732
729
  /* @__PURE__ */ jsx(Title, { order: 4, children: computeCompletionPercentage(stageTotals.populated, stageTotals.personalized) }),
@@ -775,38 +772,46 @@ function LeadGenOverviewPage() {
775
772
  /* @__PURE__ */ jsx(Table.Th, { children: "Progress" }),
776
773
  /* @__PURE__ */ jsx(Table.Th, { children: "Status" })
777
774
  ] }) }),
778
- /* @__PURE__ */ jsx(Table.Tbody, { children: overviewRows.map((list) => /* @__PURE__ */ jsxs(Table.Tr, { children: [
779
- /* @__PURE__ */ jsx(Table.Td, { children: /* @__PURE__ */ jsxs(Stack, { gap: 2, children: [
780
- /* @__PURE__ */ jsx(Link, { to: "/lead-gen/lists/$listId", params: { listId: list.listId }, children: /* @__PURE__ */ jsx(Text, { size: "sm", fw: 600, component: "span", c: "blue.4", children: list.name }) }),
781
- /* @__PURE__ */ jsx(Text, { size: "xs", c: "dimmed", children: list.listId })
782
- ] }) }),
783
- /* @__PURE__ */ jsx(Table.Td, { children: list.totalCompanies }),
784
- /* @__PURE__ */ jsx(Table.Td, { children: list.totalContacts }),
785
- /* @__PURE__ */ jsx(Table.Td, { children: /* @__PURE__ */ jsxs(Stack, { gap: 2, children: [
786
- /* @__PURE__ */ jsx(Text, { size: "sm", fw: 500, children: list.nextFocus.label }),
787
- /* @__PURE__ */ jsx(Text, { size: "xs", c: "dimmed", children: list.nextFocus.count == null ? "No outstanding count" : `${list.nextFocus.count} item${list.nextFocus.count === 1 ? "" : "s"} queued` })
788
- ] }) }),
789
- /* @__PURE__ */ jsx(Table.Td, { children: /* @__PURE__ */ jsxs(Stack, { gap: "xs", miw: 150, children: [
790
- /* @__PURE__ */ jsxs(Group, { justify: "space-between", gap: "xs", children: [
791
- /* @__PURE__ */ jsx(Text, { size: "sm", children: formatPercentage(list.completionRatio) }),
792
- /* @__PURE__ */ jsxs(Text, { size: "xs", c: "dimmed", children: [
793
- list.stageCounts.personalized,
794
- "/",
795
- list.stageCounts.populated || 0
796
- ] })
797
- ] }),
798
- /* @__PURE__ */ jsx(
799
- Progress,
800
- {
801
- value: list.completionRatio == null ? 0 : list.completionRatio * 100,
802
- size: "sm",
803
- radius: "xl",
804
- color: "blue"
805
- }
806
- )
807
- ] }) }),
808
- /* @__PURE__ */ jsx(Table.Td, { children: /* @__PURE__ */ jsx(Badge, { size: "sm", variant: "light", color: list.status.color, children: list.status.label }) })
809
- ] }, list.listId)) })
775
+ /* @__PURE__ */ jsx(Table.Tbody, { children: overviewRows.map((list) => /* @__PURE__ */ jsxs(
776
+ Table.Tr,
777
+ {
778
+ style: { cursor: "pointer" },
779
+ onClick: () => navigate({ to: "/lead-gen/lists/$listId", params: { listId: list.listId } }),
780
+ children: [
781
+ /* @__PURE__ */ jsx(Table.Td, { children: /* @__PURE__ */ jsxs(Stack, { gap: 2, children: [
782
+ /* @__PURE__ */ jsx(Text, { size: "sm", fw: 600, children: list.name }),
783
+ /* @__PURE__ */ jsx(Text, { size: "xs", c: "dimmed", children: list.listId })
784
+ ] }) }),
785
+ /* @__PURE__ */ jsx(Table.Td, { children: list.totalCompanies }),
786
+ /* @__PURE__ */ jsx(Table.Td, { children: list.totalContacts }),
787
+ /* @__PURE__ */ jsx(Table.Td, { children: /* @__PURE__ */ jsxs(Stack, { gap: 2, children: [
788
+ /* @__PURE__ */ jsx(Text, { size: "sm", fw: 500, children: list.nextFocus.label }),
789
+ /* @__PURE__ */ jsx(Text, { size: "xs", c: "dimmed", children: list.nextFocus.count == null ? "No outstanding count" : `${list.nextFocus.count} item${list.nextFocus.count === 1 ? "" : "s"} queued` })
790
+ ] }) }),
791
+ /* @__PURE__ */ jsx(Table.Td, { children: /* @__PURE__ */ jsxs(Stack, { gap: "xs", miw: 150, children: [
792
+ /* @__PURE__ */ jsxs(Group, { justify: "space-between", gap: "xs", children: [
793
+ /* @__PURE__ */ jsx(Text, { size: "sm", children: formatPercentage(list.completionRatio) }),
794
+ /* @__PURE__ */ jsxs(Text, { size: "xs", c: "dimmed", children: [
795
+ list.stageCounts.personalized,
796
+ "/",
797
+ list.stageCounts.populated || 0
798
+ ] })
799
+ ] }),
800
+ /* @__PURE__ */ jsx(
801
+ Progress,
802
+ {
803
+ value: list.completionRatio == null ? 0 : list.completionRatio * 100,
804
+ size: "sm",
805
+ radius: "xl",
806
+ color: "blue"
807
+ }
808
+ )
809
+ ] }) }),
810
+ /* @__PURE__ */ jsx(Table.Td, { children: /* @__PURE__ */ jsx(Badge, { size: "sm", variant: "light", color: list.status.color, children: list.status.label }) })
811
+ ]
812
+ },
813
+ list.listId
814
+ )) })
810
815
  ] })
811
816
  ] }) })
812
817
  ] })
@@ -870,13 +875,7 @@ function LeadGenDeliverabilityPage() {
870
875
  { label: "Bounce Rate", value: computeBounceRate(totals), icon: IconChecklist }
871
876
  ];
872
877
  return /* @__PURE__ */ jsx(SubshellContentContainer, { children: /* @__PURE__ */ jsx(PageContainer, { children: /* @__PURE__ */ jsxs(Stack, { children: [
873
- /* @__PURE__ */ jsx(
874
- PageTitleCaption,
875
- {
876
- title: "Deliverability",
877
- caption: "Email validity breakdown and bounce health across lists"
878
- }
879
- ),
878
+ /* @__PURE__ */ jsx(PageTitleCaption, { title: "Deliverability", caption: "Email validity breakdown and bounce health across lists" }),
880
879
  /* @__PURE__ */ jsx(SimpleGrid, { cols: { base: 2, sm: 3, lg: 6 }, children: summaryTiles.map((tile) => /* @__PURE__ */ jsx(StatCard, { variant: "hero", icon: tile.icon, value: tile.value, label: tile.label }, tile.label)) }),
881
880
  /* @__PURE__ */ jsx(Paper, { withBorder: true, children: /* @__PURE__ */ jsxs(Table, { children: [
882
881
  /* @__PURE__ */ jsx(Table.Thead, { children: /* @__PURE__ */ jsxs(Table.Tr, { children: [
@@ -1,11 +1,11 @@
1
1
  import { FilterBar } from './chunk-PDHTXPSF.js';
2
2
  import { CustomModal } from './chunk-GBMNCNHX.js';
3
- import { CyberAreaChart, CostTrendChart, ActivityTrendChart } from './chunk-KFICYU6S.js';
3
+ import { CyberAreaChart, CostTrendChart, ActivityTrendChart } from './chunk-STZJ7SY5.js';
4
4
  import { AppShellLoader } from './chunk-YEX4MQSY.js';
5
5
  import { formatDuration } from './chunk-XA34RETF.js';
6
- import { useResolveError, useResolveAllErrors, usePaginationState, useErrorDetails, useMarkAsRead, useExecutionLogsFilters, useExecutionLogs, useExecutionHealth, useErrorAnalysis, useTimeRangeDates, useErrorDetail, useResolveErrorsByExecution, useResources, useCostTrends, useCostSummary, useCostByModel, useCostBreakdown, useActivityFilters, useActivityTrend, useActivities, useNotifications, useMarkAllAsRead, useTestNotification } from './chunk-4PHPENKX.js';
6
+ import { useResolveError, useResolveAllErrors, usePaginationState, useErrorDetails, useMarkAsRead, useExecutionLogsFilters, useExecutionLogs, useExecutionHealth, useErrorAnalysis, useTimeRangeDates, useErrorDetail, useResolveErrorsByExecution, useResources, useCostTrends, useCostSummary, useCostByModel, useCostBreakdown, useActivityFilters, useActivityTrend, useActivities, useNotifications, useMarkAllAsRead, useTestNotification } from './chunk-E3IFHX6A.js';
7
7
  import { formatBucketTime, getTimeRangeDates } from './chunk-LXHZYSMQ.js';
8
- import { CenteredErrorState, CardHeader, StatsCardSkeleton, TrendIndicator, DetailCardSkeleton, EmptyState, PageTitleCaption, JsonViewer } from './chunk-Y3D3WFJG.js';
8
+ import { CenteredErrorState, CardHeader, StatsCardSkeleton, TrendIndicator, DetailCardSkeleton, EmptyState, PageTitleCaption, JsonViewer } from './chunk-SQQGLGHW.js';
9
9
  import { PAGE_SIZE_DEFAULT } from './chunk-IOKL7BKE.js';
10
10
  import { useRouterContext } from './chunk-Q7DJKLEN.js';
11
11
  import { useState, useMemo, useCallback } from 'react';
@@ -1789,7 +1789,7 @@ function NotificationCenter({ pageSize = 20 }) {
1789
1789
  }
1790
1790
  var monitoringManifest = {
1791
1791
  key: "monitoring",
1792
- accessFeatureKey: "monitoring",
1792
+ featureId: "monitoring",
1793
1793
  navEntry: {
1794
1794
  label: "Monitoring",
1795
1795
  icon: IconActivity,
@@ -1992,113 +1992,6 @@ type Database$1 = {
1992
1992
  }
1993
1993
  ];
1994
1994
  };
1995
- calibration_projects: {
1996
- Row: {
1997
- created_at: string | null;
1998
- description: string | null;
1999
- id: string;
2000
- name: string;
2001
- organization_id: string;
2002
- resource_id: string;
2003
- resource_type: string;
2004
- updated_at: string | null;
2005
- };
2006
- Insert: {
2007
- created_at?: string | null;
2008
- description?: string | null;
2009
- id?: string;
2010
- name: string;
2011
- organization_id: string;
2012
- resource_id: string;
2013
- resource_type: string;
2014
- updated_at?: string | null;
2015
- };
2016
- Update: {
2017
- created_at?: string | null;
2018
- description?: string | null;
2019
- id?: string;
2020
- name?: string;
2021
- organization_id?: string;
2022
- resource_id?: string;
2023
- resource_type?: string;
2024
- updated_at?: string | null;
2025
- };
2026
- Relationships: [
2027
- {
2028
- foreignKeyName: "calibration_projects_organization_id_fkey";
2029
- columns: ["organization_id"];
2030
- isOneToOne: false;
2031
- referencedRelation: "organizations";
2032
- referencedColumns: ["id"];
2033
- }
2034
- ];
2035
- };
2036
- calibration_runs: {
2037
- Row: {
2038
- completed_at: string | null;
2039
- config_variants: Json$1;
2040
- created_at: string | null;
2041
- description: string | null;
2042
- execution_mode: string;
2043
- grader_model: string | null;
2044
- grading_rubric: Json$1 | null;
2045
- id: string;
2046
- name: string;
2047
- organization_id: string;
2048
- project_id: string;
2049
- results: Json$1;
2050
- status: string;
2051
- test_inputs: Json$1;
2052
- };
2053
- Insert: {
2054
- completed_at?: string | null;
2055
- config_variants: Json$1;
2056
- created_at?: string | null;
2057
- description?: string | null;
2058
- execution_mode?: string;
2059
- grader_model?: string | null;
2060
- grading_rubric?: Json$1 | null;
2061
- id?: string;
2062
- name: string;
2063
- organization_id: string;
2064
- project_id: string;
2065
- results?: Json$1;
2066
- status?: string;
2067
- test_inputs: Json$1;
2068
- };
2069
- Update: {
2070
- completed_at?: string | null;
2071
- config_variants?: Json$1;
2072
- created_at?: string | null;
2073
- description?: string | null;
2074
- execution_mode?: string;
2075
- grader_model?: string | null;
2076
- grading_rubric?: Json$1 | null;
2077
- id?: string;
2078
- name?: string;
2079
- organization_id?: string;
2080
- project_id?: string;
2081
- results?: Json$1;
2082
- status?: string;
2083
- test_inputs?: Json$1;
2084
- };
2085
- Relationships: [
2086
- {
2087
- foreignKeyName: "calibration_runs_organization_id_fkey";
2088
- columns: ["organization_id"];
2089
- isOneToOne: false;
2090
- referencedRelation: "organizations";
2091
- referencedColumns: ["id"];
2092
- },
2093
- {
2094
- foreignKeyName: "calibration_runs_project_id_fkey";
2095
- columns: ["project_id"];
2096
- isOneToOne: false;
2097
- referencedRelation: "calibration_projects";
2098
- referencedColumns: ["id"];
2099
- }
2100
- ];
2101
- };
2102
1995
  command_queue: {
2103
1996
  Row: {
2104
1997
  action_payload: Json$1 | null;
@@ -3830,18 +3723,11 @@ type ListConfigInput = z.infer<typeof ListConfigSchema>;
3830
3723
  */
3831
3724
  /**
3832
3725
  * Per-user-per-org config (stored in org_memberships.config)
3833
- * Controls which features a specific member can access within their org
3834
- * Valid feature keys: operations, monitoring, acquisition, delivery, calibration, seo
3726
+ * Controls which features a specific member can access within their org.
3727
+ * Keys are feature IDs from the organization model (e.g. crm, lead-gen, projects, seo).
3835
3728
  */
3836
3729
  interface MembershipFeatureConfig {
3837
- features?: {
3838
- operations?: boolean;
3839
- monitoring?: boolean;
3840
- acquisition?: boolean;
3841
- delivery?: boolean;
3842
- calibration?: boolean;
3843
- seo?: boolean;
3844
- };
3730
+ features?: Record<string, boolean>;
3845
3731
  }
3846
3732
 
3847
3733
  /**
@@ -5532,113 +5418,6 @@ type Database = {
5532
5418
  },
5533
5419
  ]
5534
5420
  }
5535
- calibration_projects: {
5536
- Row: {
5537
- created_at: string | null
5538
- description: string | null
5539
- id: string
5540
- name: string
5541
- organization_id: string
5542
- resource_id: string
5543
- resource_type: string
5544
- updated_at: string | null
5545
- }
5546
- Insert: {
5547
- created_at?: string | null
5548
- description?: string | null
5549
- id?: string
5550
- name: string
5551
- organization_id: string
5552
- resource_id: string
5553
- resource_type: string
5554
- updated_at?: string | null
5555
- }
5556
- Update: {
5557
- created_at?: string | null
5558
- description?: string | null
5559
- id?: string
5560
- name?: string
5561
- organization_id?: string
5562
- resource_id?: string
5563
- resource_type?: string
5564
- updated_at?: string | null
5565
- }
5566
- Relationships: [
5567
- {
5568
- foreignKeyName: "calibration_projects_organization_id_fkey"
5569
- columns: ["organization_id"]
5570
- isOneToOne: false
5571
- referencedRelation: "organizations"
5572
- referencedColumns: ["id"]
5573
- },
5574
- ]
5575
- }
5576
- calibration_runs: {
5577
- Row: {
5578
- completed_at: string | null
5579
- config_variants: Json
5580
- created_at: string | null
5581
- description: string | null
5582
- execution_mode: string
5583
- grader_model: string | null
5584
- grading_rubric: Json | null
5585
- id: string
5586
- name: string
5587
- organization_id: string
5588
- project_id: string
5589
- results: Json
5590
- status: string
5591
- test_inputs: Json
5592
- }
5593
- Insert: {
5594
- completed_at?: string | null
5595
- config_variants: Json
5596
- created_at?: string | null
5597
- description?: string | null
5598
- execution_mode?: string
5599
- grader_model?: string | null
5600
- grading_rubric?: Json | null
5601
- id?: string
5602
- name: string
5603
- organization_id: string
5604
- project_id: string
5605
- results?: Json
5606
- status?: string
5607
- test_inputs: Json
5608
- }
5609
- Update: {
5610
- completed_at?: string | null
5611
- config_variants?: Json
5612
- created_at?: string | null
5613
- description?: string | null
5614
- execution_mode?: string
5615
- grader_model?: string | null
5616
- grading_rubric?: Json | null
5617
- id?: string
5618
- name?: string
5619
- organization_id?: string
5620
- project_id?: string
5621
- results?: Json
5622
- status?: string
5623
- test_inputs?: Json
5624
- }
5625
- Relationships: [
5626
- {
5627
- foreignKeyName: "calibration_runs_organization_id_fkey"
5628
- columns: ["organization_id"]
5629
- isOneToOne: false
5630
- referencedRelation: "organizations"
5631
- referencedColumns: ["id"]
5632
- },
5633
- {
5634
- foreignKeyName: "calibration_runs_project_id_fkey"
5635
- columns: ["project_id"]
5636
- isOneToOne: false
5637
- referencedRelation: "calibration_projects"
5638
- referencedColumns: ["id"]
5639
- },
5640
- ]
5641
- }
5642
5421
  command_queue: {
5643
5422
  Row: {
5644
5423
  action_payload: Json | null
@@ -8778,27 +8557,6 @@ interface QuickCreateActionsProps {
8778
8557
  }
8779
8558
  declare function QuickCreateActions({ showSectionLabel }: QuickCreateActionsProps): react_jsx_runtime.JSX.Element;
8780
8559
 
8781
- declare const SemanticDomainSchema = DisplayMetadataSchema.extend({
8782
- id: ModelIdSchema,
8783
- entityIds: ReferenceIdsSchema,
8784
- surfaceIds: ReferenceIdsSchema,
8785
- resourceIds: ReferenceIdsSchema,
8786
- capabilityIds: ReferenceIdsSchema
8787
- })
8788
-
8789
- declare const FeatureKeySchema = z.enum([
8790
- 'acquisition',
8791
- 'delivery',
8792
- 'operations',
8793
- 'monitoring',
8794
- 'settings',
8795
- 'seo',
8796
- 'calibration'
8797
- ])
8798
-
8799
- type OrganizationModelFeatureKey = z.infer<typeof FeatureKeySchema>
8800
- type OrganizationModelSemanticDomain = z.infer<typeof SemanticDomainSchema>
8801
-
8802
8560
  interface FeatureNavLink {
8803
8561
  label: string;
8804
8562
  link: string;
@@ -8817,15 +8575,10 @@ interface FeatureNavEntry {
8817
8575
  }
8818
8576
  type FeatureSidebarComponent = ComponentType;
8819
8577
  interface FeatureModule {
8820
- /** Unique stable identifier for this feature (e.g. `'crm'`, `'delivery'`). */
8578
+ /** Unique stable identifier for this feature (e.g. `'crm'`, `'projects'`). */
8821
8579
  key: string;
8822
- /** Feature key used for access-flag gating in the organization model. */
8823
- accessFeatureKey: OrganizationModelFeatureKey;
8824
- /**
8825
- * Semantic domain identifiers contributed by this feature.
8826
- * Merged with surface-derived domain IDs during resolution.
8827
- */
8828
- domainIds?: OrganizationModelSemanticDomain['id'][];
8580
+ /** Feature ID used for access-flag gating — must match the `id` of a feature in the organization model. */
8581
+ featureId: string;
8829
8582
  /**
8830
8583
  * Capability identifiers contributed by this feature.
8831
8584
  * Merged into `ResolvedFeatureSemantics.capabilityIds` at resolution time.