@elevasis/ui 2.7.0 → 2.8.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 (46) hide show
  1. package/dist/{chunk-T6R3V4GW.js → chunk-4JPW5U5I.js} +8 -9
  2. package/dist/{chunk-V6Z2U6ZV.js → chunk-4PHPENKX.js} +3044 -1753
  3. package/dist/chunk-7M2VOCYN.js +1 -0
  4. package/dist/{chunk-VGBMSGYC.js → chunk-7PDDPNQS.js} +1 -1
  5. package/dist/{chunk-X4HUZINF.js → chunk-AQQYVAFK.js} +23 -15
  6. package/dist/{chunk-YIWLA2B6.js → chunk-C2OFFC7J.js} +0 -1
  7. package/dist/{chunk-Z5RHDI7T.js → chunk-CTWYIRKW.js} +1 -2
  8. package/dist/{chunk-IFH4L6CR.js → chunk-F5QSLYUB.js} +4 -6
  9. package/dist/{chunk-6FDGVZFL.js → chunk-KGEYEUR5.js} +1 -3
  10. package/dist/{chunk-SMJLS23U.js → chunk-NYMKWGKN.js} +18 -1
  11. package/dist/{chunk-SPMKW4VO.js → chunk-OPT74SGF.js} +96 -82
  12. package/dist/{chunk-HRIJZKFL.js → chunk-UE5QQDCR.js} +7 -8
  13. package/dist/{chunk-N6GYYWY3.js → chunk-YCHZ4U5V.js} +10 -2
  14. package/dist/{chunk-SBND6P3L.js → chunk-ZZ35VSNF.js} +1 -3
  15. package/dist/components/index.d.ts +147 -70
  16. package/dist/components/index.js +17 -17
  17. package/dist/features/auth/index.d.ts +3 -3
  18. package/dist/features/crm/index.d.ts +66 -6
  19. package/dist/features/crm/index.js +5 -5
  20. package/dist/features/dashboard/index.js +5 -5
  21. package/dist/features/delivery/index.d.ts +69 -5
  22. package/dist/features/delivery/index.js +5 -5
  23. package/dist/features/lead-gen/index.d.ts +66 -6
  24. package/dist/features/lead-gen/index.js +8 -8
  25. package/dist/features/monitoring/index.d.ts +20 -1
  26. package/dist/features/monitoring/index.js +6 -6
  27. package/dist/features/operations/index.d.ts +20 -1
  28. package/dist/features/operations/index.js +7 -7
  29. package/dist/features/seo/index.d.ts +20 -1
  30. package/dist/features/seo/index.js +1 -1
  31. package/dist/features/settings/index.d.ts +20 -1
  32. package/dist/features/settings/index.js +5 -5
  33. package/dist/hooks/index.d.ts +7735 -7720
  34. package/dist/hooks/index.js +4 -4
  35. package/dist/hooks/published.d.ts +3493 -47
  36. package/dist/hooks/published.js +3 -3
  37. package/dist/index.d.ts +1416 -1375
  38. package/dist/index.js +4 -4
  39. package/dist/layout/index.d.ts +60 -2
  40. package/dist/layout/index.js +1 -1
  41. package/dist/provider/index.d.ts +30 -4
  42. package/dist/provider/index.js +2 -2
  43. package/dist/provider/published.d.ts +20 -2
  44. package/dist/provider/published.js +1 -1
  45. package/package.json +1 -1
  46. package/dist/chunk-TENLM2GN.js +0 -1303
@@ -0,0 +1 @@
1
+
@@ -1,5 +1,5 @@
1
1
  import { useCyberColors, CyberLegendItem, CyberAreaChart } from './chunk-KFICYU6S.js';
2
- import { useResourcesHealth } from './chunk-V6Z2U6ZV.js';
2
+ import { useResourcesHealth } from './chunk-4PHPENKX.js';
3
3
  import { getTimeRangeDates, formatBucketTime } from './chunk-LXHZYSMQ.js';
4
4
  import { CardHeader, EmptyState } from './chunk-Y3D3WFJG.js';
5
5
  import { Paper, Center, Loader, Group } from '@mantine/core';
@@ -3,14 +3,13 @@ import { PageContainer } from './chunk-BZZCNLT6.js';
3
3
  import { SubshellSidebarSection, SubshellNavItem } from './chunk-27COZ5AH.js';
4
4
  import { FilterBar } from './chunk-PDHTXPSF.js';
5
5
  import { CustomModal } from './chunk-GBMNCNHX.js';
6
- import { useProjects, useProject, useProjectNotes, useDeleteProject as useDeleteProject$1, useUpdateMilestone, useCreateNote } from './chunk-TENLM2GN.js';
7
- import { useDeleteProject, useTableSort, sortData, usePaginationState, useTableSelection } from './chunk-V6Z2U6ZV.js';
6
+ import { useProjects, useDeleteProject, useTableSort, sortData, usePaginationState, useTableSelection, useProject, useProjectNotes, useDeleteProject2, useUpdateMilestone, useCreateNote } from './chunk-4PHPENKX.js';
8
7
  import { SubshellContentContainer } from './chunk-RX4UWZZR.js';
9
8
  import { StatusBadge, EmptyState, PageTitleCaption, CenteredErrorState, StatCard } from './chunk-Y3D3WFJG.js';
10
9
  import { PAGE_SIZE_DEFAULT, formatTimeAgo, formatDate } from './chunk-IOKL7BKE.js';
11
10
  import { useRouterContext } from './chunk-Q7DJKLEN.js';
12
11
  import { SimpleGrid, Card, Stack, Group, ThemeIcon, Text, RingProgress, Paper, Timeline, Badge, Collapse, ActionIcon, Select, TextInput, Center, Loader, Table, Checkbox, Pagination, Title, Button, Alert, CopyButton, Tooltip, Divider, Tabs, Textarea } from '@mantine/core';
13
- import { IconBriefcase, IconHeartbeat, IconFlag, IconFileText, IconCalendar, IconInbox, IconLock, IconAlertTriangle, IconCircleCheck, IconClock, IconChevronDown, IconChevronRight, IconDownload, IconListCheck, IconMessageCircle, IconChecklist, IconSearch, IconArrowLeft, IconCheck, IconCopy, IconPlus, IconX, IconNotes } from '@tabler/icons-react';
12
+ import { IconNotes, IconBriefcase, IconChecklist, IconFlag, IconHeartbeat, IconFileText, IconCalendar, IconInbox, IconLock, IconAlertTriangle, IconCircleCheck, IconClock, IconChevronDown, IconChevronRight, IconDownload, IconListCheck, IconMessageCircle, IconSearch, IconArrowLeft, IconCheck, IconCopy, IconPlus, IconX } from '@tabler/icons-react';
14
13
  import { jsxs, jsx, Fragment } from 'react/jsx-runtime';
15
14
  import { useState, useMemo } from 'react';
16
15
 
@@ -277,13 +276,23 @@ function TaskCard({ task }) {
277
276
  var ProjectsSidebarTop = () => {
278
277
  return /* @__PURE__ */ jsx(SubshellSidebarSection, { icon: IconBriefcase, label: "Projects" });
279
278
  };
280
- var PROJECT_ITEMS = [{ label: "Projects", to: "/projects", icon: IconBriefcase, exact: true }];
281
- var WORK_ITEMS = [
279
+ var DELIVERY_PROJECT_ITEMS = [
280
+ { label: "Projects", to: "/projects", icon: IconBriefcase, exact: true }
281
+ ];
282
+ var DELIVERY_WORK_ITEMS = [
282
283
  { label: "Tasks", to: "/projects/tasks", icon: IconChecklist, exact: false },
283
284
  { label: "Milestones", to: "/projects/milestones", icon: IconFlag, exact: false }
284
285
  ];
285
- var COMMUNICATION_ITEMS = [{ label: "Notes", to: "/projects/notes", icon: IconNotes, exact: false }];
286
- var ProjectsSidebarMiddle = ({ currentPath, onNavigate } = {}) => {
286
+ var DELIVERY_COMMUNICATION_ITEMS = [
287
+ { label: "Notes", to: "/projects/notes", icon: IconNotes, exact: false }
288
+ ];
289
+ var ProjectsSidebarMiddle = ({
290
+ currentPath,
291
+ onNavigate,
292
+ projectItems = DELIVERY_PROJECT_ITEMS,
293
+ workItems = DELIVERY_WORK_ITEMS,
294
+ communicationItems = DELIVERY_COMMUNICATION_ITEMS
295
+ } = {}) => {
287
296
  const { currentPath: routerCurrentPath, navigate } = useRouterContext();
288
297
  const resolvedCurrentPath = currentPath ?? routerCurrentPath;
289
298
  const resolvedNavigate = onNavigate ?? navigate;
@@ -301,26 +310,25 @@ var ProjectsSidebarMiddle = ({ currentPath, onNavigate } = {}) => {
301
310
  );
302
311
  });
303
312
  return /* @__PURE__ */ jsxs(Stack, { gap: 0, style: { flex: 1, overflowY: "auto" }, children: [
304
- /* @__PURE__ */ jsx(Stack, { gap: 0, p: "sm", children: renderItems(PROJECT_ITEMS) }),
313
+ /* @__PURE__ */ jsx(Stack, { gap: 0, p: "sm", children: renderItems(projectItems) }),
305
314
  /* @__PURE__ */ jsxs(Fragment, { children: [
306
315
  /* @__PURE__ */ jsx(SubshellSidebarSection, { icon: IconListCheck, label: "Work", withTopBorder: true }),
307
- /* @__PURE__ */ jsx(Stack, { gap: 0, p: "sm", children: renderItems(WORK_ITEMS) })
316
+ /* @__PURE__ */ jsx(Stack, { gap: 0, p: "sm", children: renderItems(workItems) })
308
317
  ] }),
309
318
  /* @__PURE__ */ jsxs(Fragment, { children: [
310
319
  /* @__PURE__ */ jsx(SubshellSidebarSection, { icon: IconMessageCircle, label: "Communication", withTopBorder: true }),
311
- /* @__PURE__ */ jsx(Stack, { gap: 0, p: "sm", children: renderItems(COMMUNICATION_ITEMS) })
320
+ /* @__PURE__ */ jsx(Stack, { gap: 0, p: "sm", children: renderItems(communicationItems) })
312
321
  ] })
313
322
  ] });
314
323
  };
315
- var ProjectsSidebar = () => {
324
+ var ProjectsSidebar = ({ children } = {}) => {
316
325
  return /* @__PURE__ */ jsxs(Stack, { gap: 0, style: { height: "100%", display: "flex", flexDirection: "column" }, children: [
317
326
  /* @__PURE__ */ jsx(ProjectsSidebarTop, {}),
318
- /* @__PURE__ */ jsx(ProjectsSidebarMiddle, {})
327
+ children ?? /* @__PURE__ */ jsx(ProjectsSidebarMiddle, {})
319
328
  ] });
320
329
  };
321
330
  var deliveryManifest = {
322
331
  key: "delivery",
323
- label: "Projects",
324
332
  accessFeatureKey: "delivery",
325
333
  domainIds: ["delivery"],
326
334
  capabilityIds: ["delivery.projects.view"],
@@ -705,7 +713,7 @@ function AddNoteModal({ opened, onClose, projectId }) {
705
713
  function ProjectDetailPage({ projectId, onBack, backLabel = "Projects" }) {
706
714
  const { data: project, isLoading, error } = useProject(projectId);
707
715
  const { data: notes } = useProjectNotes({ projectId });
708
- const { mutate: deleteProject, isPending: isDeleting } = useDeleteProject$1();
716
+ const { mutate: deleteProject, isPending: isDeleting } = useDeleteProject2();
709
717
  const [addNoteOpen, setAddNoteOpen] = useState(false);
710
718
  const [deleteModalOpen, setDeleteModalOpen] = useState(false);
711
719
  if (isLoading) {
@@ -954,4 +962,4 @@ function ProjectDetailPage({ projectId, onBack, backLabel = "Projects" }) {
954
962
  ] }) }) });
955
963
  }
956
964
 
957
- export { AllTasksPage, HealthStatusCard, MilestoneTimeline, ProjectDetailPage, ProjectsListPage, ProjectsSidebar, ProjectsSidebarMiddle, ProjectsSidebarTop, TaskCard, UpcomingMilestonesPage, calculateProgress, deliveryManifest, formatStatusLabel, milestoneStatusColors, noteTypeColors, projectStatusColors, taskStatusColors, taskTypeColors };
965
+ export { AllTasksPage, DELIVERY_COMMUNICATION_ITEMS, DELIVERY_PROJECT_ITEMS, DELIVERY_WORK_ITEMS, HealthStatusCard, MilestoneTimeline, ProjectDetailPage, ProjectsListPage, ProjectsSidebar, ProjectsSidebarMiddle, ProjectsSidebarTop, TaskCard, UpcomingMilestonesPage, calculateProgress, deliveryManifest, formatStatusLabel, milestoneStatusColors, noteTypeColors, projectStatusColors, taskStatusColors, taskTypeColors };
@@ -37,7 +37,6 @@ var SEOSidebar = () => {
37
37
  // src/features/seo/manifest.ts
38
38
  var seoManifest = {
39
39
  key: "seo",
40
- label: "SEO",
41
40
  accessFeatureKey: "seo",
42
41
  sidebar: SEOSidebar,
43
42
  subshellRoutes: ["/seo"]
@@ -2,8 +2,7 @@ import { ResourceHealthChart } from './chunk-LGKLC5MG.js';
2
2
  import { useCyberColors, HeroStatsRow } from './chunk-KFICYU6S.js';
3
3
  import { AppShellCenteredContainer, AppShellLoader } from './chunk-YEX4MQSY.js';
4
4
  import { STATUS_COLORS, getStatusIcon, formatDuration, getStatusColors, AGENT_CONSTANTS, shouldAnimateEdge, TIMELINE_CONSTANTS, calculateBarPosition, CONTAINER_CONSTANTS, useExecutionPath, useUnifiedWorkflowLayout, WORKFLOW_CONSTANTS, useReactFlowAgent } from './chunk-XA34RETF.js';
5
- import { useTimeRangeDates } from './chunk-TENLM2GN.js';
6
- import { useDashboardMetrics, useResources, useUnresolvedErrors, useRecentExecutionsByResource, useCommandQueue, useScheduledTasks, useResourcesHealth } from './chunk-V6Z2U6ZV.js';
5
+ import { useDashboardMetrics, useResources, useTimeRangeDates, useUnresolvedErrors, useRecentExecutionsByResource, useCommandQueue, useScheduledTasks, useResourcesHealth } from './chunk-4PHPENKX.js';
7
6
  import { getTimeRangeDates } from './chunk-LXHZYSMQ.js';
8
7
  import { Graph_module_css_default, useDirectedChainHighlighting, useNodeSelection, useFitViewTrigger } from './chunk-22UVE3RA.js';
9
8
  import { glassBase } from './chunk-47YILFON.js';
@@ -1,17 +1,16 @@
1
1
  import { ChatHeader, ChatSidebar } from './chunk-ROSMICXG.js';
2
2
  import { SubshellLoader, CollapsibleSidebarGroup } from './chunk-IDACMRGQ.js';
3
- import { ResourceHealthPanel } from './chunk-VGBMSGYC.js';
3
+ import { ResourceHealthPanel } from './chunk-7PDDPNQS.js';
4
4
  import { PageContainer } from './chunk-BZZCNLT6.js';
5
5
  import { SubshellSidebarSection, SubshellNavItem } from './chunk-27COZ5AH.js';
6
6
  import { CustomModal, ConfirmationModal } from './chunk-GBMNCNHX.js';
7
- import { BaseNode, useGraphTheme, BaseEdge, ExecutionStats, UnifiedWorkflowGraph, WorkflowExecutionTimeline, AgentExecutionVisualizer, AgentExecutionTimeline, GraphBackground, GraphFitViewButton, GraphFitViewHandler } from './chunk-Z5RHDI7T.js';
7
+ import { BaseNode, useGraphTheme, BaseEdge, ExecutionStats, UnifiedWorkflowGraph, WorkflowExecutionTimeline, AgentExecutionVisualizer, AgentExecutionTimeline, GraphBackground, GraphFitViewButton, GraphFitViewHandler } from './chunk-CTWYIRKW.js';
8
8
  import { useCyberColors, CyberDonut } from './chunk-KFICYU6S.js';
9
9
  import { AppShellLoader } from './chunk-YEX4MQSY.js';
10
10
  import { getResourceStatusColor, useMergedExecution, useTimelineData, useAgentIterationData, getStatusIcon } from './chunk-XA34RETF.js';
11
- import { useStatusFilter, useResourceSearch, useResourcesDomainFilters, filterByDomainFilters, useCommandViewDomainFilters } from './chunk-TENLM2GN.js';
12
- import { useErrorDetail, useExecution, useArchivedLogs, useDeleteExecution, useRetryExecution, useCancelExecution, useCommandQueueTotals, usePaginationState, useResources, useRecentExecutionsByResource, useExecuteAsync, useResourceDefinition, isSessionCapable, useDeleteTask, useCommandQueue, useSubmitAction, useCommandViewData, useCommandViewStats, useResourceExecutions, useCheckpointTasks, useCalibrationProjects, useCalibrationProject, useAllCalibrationProjects, useCommandViewStore, useCalibrationSSE, useCalibrationRunFull, useExecuteRun, useGradeRun, useCalibrationRuns, useExecutionPanelState, useDeleteSession, useCreateSession, useSessions, useSessionExecutions, useSession, showApiErrorNotification, showSuccessNotification, calibrationKeys, useDeleteProject, useCreateProject, useBulkDeleteExecutions } from './chunk-V6Z2U6ZV.js';
11
+ import { useErrorDetail, useExecution, useArchivedLogs, useDeleteExecution, useRetryExecution, useCancelExecution, useCommandQueueTotals, useStatusFilter, useResourceSearch, useResourcesDomainFilters, usePaginationState, useResources, useRecentExecutionsByResource, filterByDomainFilters, useExecuteAsync, useResourceDefinition, isSessionCapable, useDeleteTask, useCommandQueue, useSubmitAction, useCommandViewData, useCommandViewStats, useResourceExecutions, useCheckpointTasks, useCalibrationProjects, useCalibrationProject, useAllCalibrationProjects, useCommandViewStore, useCommandViewDomainFilters, useCalibrationSSE, useCalibrationRunFull, useExecuteRun, useGradeRun, useCalibrationRuns, useExecutionPanelState, useDeleteSession, useCreateSession, useSessions, useSessionExecutions, useSession, showApiErrorNotification, showSuccessNotification, calibrationKeys, useDeleteProject, useCreateProject, useBulkDeleteExecutions } from './chunk-4PHPENKX.js';
13
12
  import { useGraphHighlighting, calculateGraphHeight, Graph_module_css_default, GRAPH_CONSTANTS } from './chunk-22UVE3RA.js';
14
- import { useOptionalElevasisFeatures, useElevasisFeatures } from './chunk-SPMKW4VO.js';
13
+ import { useOptionalElevasisFeatures, useElevasisFeatures } from './chunk-OPT74SGF.js';
15
14
  import { SubshellContainer, SubshellSidebar, SubshellRightSideContainer, SubshellContentContainer } from './chunk-RX4UWZZR.js';
16
15
  import { JsonViewer, CardHeader, PageTitleCaption, CollapsibleSection, TabCountBadge, ResourceCard, ContextViewer, EmptyState, APIErrorAlert } from './chunk-Y3D3WFJG.js';
17
16
  import { StyledMarkdown } from './chunk-3KMDHCAR.js';
@@ -9162,7 +9161,6 @@ function CommandQueueShell({
9162
9161
  }
9163
9162
  var operationsManifest = {
9164
9163
  key: "operations",
9165
- label: "Operations",
9166
9164
  accessFeatureKey: "operations",
9167
9165
  domainIds: ["operations"],
9168
9166
  capabilityIds: ["operations.organization-graph", "operations.command-view"],
@@ -2,8 +2,7 @@ import { FilterBar } from './chunk-PDHTXPSF.js';
2
2
  import { CustomModal } from './chunk-GBMNCNHX.js';
3
3
  import { AppShellLoader } from './chunk-YEX4MQSY.js';
4
4
  import { useAvailablePresets } from './chunk-VNUOQQNY.js';
5
- import { useDeleteCredential, useCreateCredential, useCredentials, MEMBERSHIP_STATUS_COLORS, transformMembershipToTableRow, useUserMemberships, useUpdateWebhookEndpoint, useDeleteWebhookEndpoint, useCreateWebhookEndpoint, useListWebhookEndpoints, useUpdateMemberConfig, useOrganizationMembers, useUpdateCredential, CredentialSchemas } from './chunk-TENLM2GN.js';
6
- import { useResources, showErrorNotification } from './chunk-V6Z2U6ZV.js';
5
+ import { useDeleteCredential, useCreateCredential, useCredentials, MEMBERSHIP_STATUS_COLORS, transformMembershipToTableRow, useUserMemberships, useUpdateWebhookEndpoint, useResources, useDeleteWebhookEndpoint, useCreateWebhookEndpoint, useListWebhookEndpoints, useUpdateMemberConfig, useOrganizationMembers, useUpdateCredential, CredentialSchemas, showErrorNotification } from './chunk-4PHPENKX.js';
7
6
  import { ListSkeleton, EmptyState, PageTitleCaption, CardHeader, APIErrorAlert, StatCard } from './chunk-Y3D3WFJG.js';
8
7
  import { formatDateTime, OAUTH_POPUP_CHECK_INTERVAL, OAUTH_FLOW_TIMEOUT } from './chunk-IOKL7BKE.js';
9
8
  import { useInitialization } from './chunk-TUXTSEAF.js';
@@ -2004,7 +2003,6 @@ function OAuthIntegrationsCard({ apiUrl }) {
2004
2003
  }
2005
2004
  var settingsManifest = {
2006
2005
  key: "settings",
2007
- label: "Settings",
2008
2006
  accessFeatureKey: "settings",
2009
2007
  navEntry: {
2010
2008
  label: "Settings",
@@ -1,3 +1,4 @@
1
+ import { SubshellNavItem } from './chunk-27COZ5AH.js';
1
2
  import { NavigationButton } from './chunk-NYBEU5TE.js';
2
3
  import { useAppearance } from './chunk-QJ2KCHKX.js';
3
4
  import { sidebarItemGap, sidebarSubLinkPaddingY, sidebarSubLinkPaddingX, sidebarSubLinkIndent, sidebarHoverDelay, sidebarTransitionDuration, sidebarCollapsedWidth, sidebarWidth, topbarHeight, sidebarToggleIconSize, sidebarSectionPadding } from './chunk-DT3QYZVU.js';
@@ -957,6 +958,22 @@ var Sidebar = memo(function Sidebar2({
957
958
  /* @__PURE__ */ jsx(SidebarBottomSection, { user, onLogout, onAccountClick })
958
959
  ] });
959
960
  });
961
+ var SubshellNavList = ({ items }) => {
962
+ const { currentPath, navigate } = useRouterContext();
963
+ return /* @__PURE__ */ jsx(Fragment, { children: items.map((item) => {
964
+ const isActive = item.exact ? currentPath === item.to || currentPath === `${item.to}/` : currentPath.startsWith(item.to);
965
+ return /* @__PURE__ */ jsx(
966
+ SubshellNavItem,
967
+ {
968
+ icon: item.icon,
969
+ label: item.label,
970
+ isActive,
971
+ onClick: () => navigate(item.to)
972
+ },
973
+ item.to
974
+ );
975
+ }) });
976
+ };
960
977
 
961
978
  // src/components/layout/sub-shell/constants.ts
962
979
  var subsidebarWidth = 200;
@@ -1050,4 +1067,4 @@ var Topbar = ({ version, leftContent, children }) => {
1050
1067
  ] });
1051
1068
  };
1052
1069
 
1053
- export { AppShellContainer, AppShellContentContainer, AppShellRightSideContainer, AppShellRightSideOuterContainer, AppTopbarAdjusterWrapper, CyberParticles, LinksGroup, Sidebar, SidebarContext, SidebarProvider, Topbar, TopbarContainer, Vignette, subsidebarWidth, useSidebar, useSidebarCollapse };
1070
+ export { AppShellContainer, AppShellContentContainer, AppShellRightSideContainer, AppShellRightSideOuterContainer, AppTopbarAdjusterWrapper, CyberParticles, LinksGroup, Sidebar, SidebarContext, SidebarProvider, SubshellNavList, Topbar, TopbarContainer, Vignette, subsidebarWidth, useSidebar, useSidebarCollapse };
@@ -125,12 +125,14 @@ function OrgServiceBridge({
125
125
  const isReady = !!currentWorkOSOrganizationId && !isInitializing && !isOrgRefreshing;
126
126
  return /* @__PURE__ */ jsx(ElevasisServiceProvider, { apiRequest, organizationId: currentWorkOSOrganizationId, isReady, children: /* @__PURE__ */ jsx(NotificationProvider, { adapter: notifications, children: /* @__PURE__ */ jsx(InitializationProvider, { children }) }) });
127
127
  }
128
+
129
+ // src/hooks/feature-access/aliases.ts
128
130
  var FEATURE_KEY_ALIASES = {
129
131
  crm: "acquisition",
130
132
  "lead-gen": "acquisition",
131
133
  projects: "delivery"
132
134
  };
133
- function createUseFeatureAccess({
135
+ function createFeatureAccessHook({
134
136
  useInitialization: useInitialization2,
135
137
  useOrganization: useOrganization2
136
138
  }) {
@@ -167,7 +169,82 @@ function createUseFeatureAccess({
167
169
  };
168
170
  };
169
171
  }
170
- var useFeatureAccess = createUseFeatureAccess({
172
+ var createUseFeatureAccess = createFeatureAccessHook;
173
+
174
+ // src/provider/resolvers/RouteResolver.ts
175
+ function normalizeRoutePath(path) {
176
+ const trimmedPath = path.trim();
177
+ if (!trimmedPath || trimmedPath === "/") {
178
+ return "/";
179
+ }
180
+ return trimmedPath.replace(/\/+$/, "") || "/";
181
+ }
182
+ function isRouteMatch(currentPath, route) {
183
+ const normalizedCurrentPath = normalizeRoutePath(currentPath);
184
+ const normalizedRoute = normalizeRoutePath(route);
185
+ return normalizedCurrentPath === normalizedRoute || normalizedCurrentPath.startsWith(`${normalizedRoute}/`);
186
+ }
187
+
188
+ // src/provider/resolvers/NavResolver.ts
189
+ function uniqueIds(ids) {
190
+ return ids ? [...new Set(ids)] : [];
191
+ }
192
+ function collectNavLinkPaths(links) {
193
+ if (!links?.length) {
194
+ return [];
195
+ }
196
+ return links.flatMap((link) => [link.link, ...collectNavLinkPaths(link.links)]);
197
+ }
198
+
199
+ // src/provider/validateManifests.ts
200
+ function validateManifests(manifests, organizationModel) {
201
+ if (!organizationModel) {
202
+ return;
203
+ }
204
+ const validFeatureKeys = new Set(Object.keys(organizationModel.features.enabled));
205
+ const validDomainIds = new Set(organizationModel.domains.map((d) => d.id));
206
+ const validCapabilityIds = /* @__PURE__ */ new Set([
207
+ ...organizationModel.domains.flatMap((d) => d.capabilityIds),
208
+ ...organizationModel.navigation.surfaces.flatMap((s) => s.capabilityIds),
209
+ ...organizationModel.resourceMappings.flatMap((r) => r.capabilityIds)
210
+ ]);
211
+ const errors = [];
212
+ for (const manifest of manifests) {
213
+ const key = manifest.key;
214
+ if (!validFeatureKeys.has(manifest.accessFeatureKey)) {
215
+ errors.push(
216
+ `Manifest "${key}": accessFeatureKey "${manifest.accessFeatureKey}" is not a known feature key. Valid values: ${[...validFeatureKeys].sort().join(", ")}`
217
+ );
218
+ }
219
+ if (manifest.domainIds) {
220
+ for (let i = 0; i < manifest.domainIds.length; i++) {
221
+ const domainId = manifest.domainIds[i];
222
+ if (!validDomainIds.has(domainId)) {
223
+ errors.push(
224
+ `Manifest "${key}": domainIds[${i}] references unknown domain "${domainId}". Valid domains: ${[...validDomainIds].sort().join(", ")}`
225
+ );
226
+ }
227
+ }
228
+ }
229
+ if (manifest.capabilityIds) {
230
+ for (let i = 0; i < manifest.capabilityIds.length; i++) {
231
+ const capabilityId = manifest.capabilityIds[i];
232
+ if (!validCapabilityIds.has(capabilityId)) {
233
+ errors.push(
234
+ `Manifest "${key}": capabilityIds[${i}] references unknown capability "${capabilityId}". Valid capabilities: ${[...validCapabilityIds].sort().join(", ")}`
235
+ );
236
+ }
237
+ }
238
+ }
239
+ }
240
+ if (errors.length > 0) {
241
+ throw new Error(
242
+ `Feature manifest validation failed with ${errors.length} error(s):
243
+ ` + errors.map((e, i) => ` ${i + 1}. ${e}`).join("\n")
244
+ );
245
+ }
246
+ }
247
+ var useFeatureAccess = createFeatureAccessHook({
171
248
  useInitialization,
172
249
  useOrganization
173
250
  });
@@ -184,21 +261,6 @@ function useElevasisFeatures() {
184
261
  function useOptionalElevasisFeatures() {
185
262
  return useContext(ElevasisFeaturesContext);
186
263
  }
187
- function normalizeRoutePath(path) {
188
- const trimmedPath = path.trim();
189
- if (!trimmedPath || trimmedPath === "/") {
190
- return "/";
191
- }
192
- return trimmedPath.replace(/\/+$/, "") || "/";
193
- }
194
- function isRouteMatch(currentPath, route) {
195
- const normalizedCurrentPath = normalizeRoutePath(currentPath);
196
- const normalizedRoute = normalizeRoutePath(route);
197
- return normalizedCurrentPath === normalizedRoute || normalizedCurrentPath.startsWith(`${normalizedRoute}/`);
198
- }
199
- function uniqueIds(ids) {
200
- return ids ? [...new Set(ids)] : [];
201
- }
202
264
  function hasOrganizationModelFeatureKey(organizationModel, key) {
203
265
  if (!organizationModel) {
204
266
  return false;
@@ -210,9 +272,7 @@ function findSurfaceByPath(organizationModel, path) {
210
272
  return void 0;
211
273
  }
212
274
  const normalizedPath = normalizeRoutePath(path);
213
- return organizationModel.navigation.surfaces.find(
214
- (surface) => normalizeRoutePath(surface.path) === normalizedPath
215
- );
275
+ return organizationModel.navigation.surfaces.find((surface) => normalizeRoutePath(surface.path) === normalizedPath);
216
276
  }
217
277
  function findSurfaceById(organizationModel, id) {
218
278
  if (!organizationModel) {
@@ -247,12 +307,6 @@ function isOrganizationModelFeatureEnabled(organizationModel, key) {
247
307
  }
248
308
  return organizationModel.features.enabled[key];
249
309
  }
250
- function collectNavLinkPaths(links) {
251
- if (!links?.length) {
252
- return [];
253
- }
254
- return links.flatMap((link) => [link.link, ...collectNavLinkPaths(link.links)]);
255
- }
256
310
  function resolveOrganizationGraphSurface(features, organizationModel) {
257
311
  for (const feature of features) {
258
312
  const graphBridge = feature.organizationGraph;
@@ -302,16 +356,12 @@ function resolveFeatureModule(feature, organizationModel) {
302
356
  };
303
357
  }
304
358
  function resolveFeatureSemantics(feature, resolvedFeature, organizationModel) {
305
- const linkedPaths = [
306
- resolvedFeature.navEntry?.link,
307
- ...collectNavLinkPaths(resolvedFeature.navEntry?.links)
308
- ].filter((path) => Boolean(path));
359
+ const linkedPaths = [resolvedFeature.navEntry?.link, ...collectNavLinkPaths(resolvedFeature.navEntry?.links)].filter(
360
+ (path) => Boolean(path)
361
+ );
309
362
  const linkedSurfaces = findSurfacesByPaths(organizationModel, linkedPaths);
310
363
  const organizationGraphSurface = feature.organizationGraph ? findSurfaceById(organizationModel, feature.organizationGraph.surfaceId) : void 0;
311
- const surfaces = [
312
- ...linkedSurfaces,
313
- ...organizationGraphSurface ? [organizationGraphSurface] : []
314
- ].filter(
364
+ const surfaces = [...linkedSurfaces, ...organizationGraphSurface ? [organizationGraphSurface] : []].filter(
315
365
  (surface, index, items) => Boolean(surface) && items.findIndex((candidate) => candidate.id === surface.id) === index
316
366
  );
317
367
  return {
@@ -372,13 +422,7 @@ function createFeatureShellNavItem(feature, links = feature.navEntry?.links) {
372
422
  if (!feature.navEntry) {
373
423
  return void 0;
374
424
  }
375
- return createShellNavItem(
376
- feature.navEntry,
377
- "primary",
378
- "feature",
379
- feature.access.featureKey,
380
- links
381
- );
425
+ return createShellNavItem(feature.navEntry, "primary", "feature", feature.access.featureKey, links);
382
426
  }
383
427
  function getFeatureNavItems(features, disabledSubsectionPaths, isFeatureEnabled) {
384
428
  return features.flatMap((feature) => {
@@ -395,12 +439,8 @@ function resolveAppShellOverrides(appShellOverrides, organizationModel) {
395
439
  return {};
396
440
  }
397
441
  return {
398
- primaryNavItems: appShellOverrides.primaryNavItems?.map(
399
- (navItem) => resolveNavEntry(navItem, organizationModel)
400
- ),
401
- bottomNavItems: appShellOverrides.bottomNavItems?.map(
402
- (navItem) => resolveNavEntry(navItem, organizationModel)
403
- )
442
+ primaryNavItems: appShellOverrides.primaryNavItems?.map((navItem) => resolveNavEntry(navItem, organizationModel)),
443
+ bottomNavItems: appShellOverrides.bottomNavItems?.map((navItem) => resolveNavEntry(navItem, organizationModel))
404
444
  };
405
445
  }
406
446
  function getAppShellNavItems(navItems, placement, disabledSubsectionPaths, isFeatureEnabled) {
@@ -479,16 +519,14 @@ function ElevasisFeaturesProvider({
479
519
  disabledSubsectionPaths = [],
480
520
  children
481
521
  }) {
522
+ useMemo(() => validateManifests(features, organizationModel), [features, organizationModel]);
482
523
  const { hasFeature } = useFeatureAccess();
483
524
  const hasResolvedFeature = useCallback(
484
525
  (key) => {
485
526
  if (!hasFeature(key)) {
486
527
  return false;
487
528
  }
488
- const organizationModelFeatureEnabled = isOrganizationModelFeatureEnabled(
489
- organizationModel,
490
- key
491
- );
529
+ const organizationModelFeatureEnabled = isOrganizationModelFeatureEnabled(organizationModel, key);
492
530
  if (organizationModelFeatureEnabled === void 0) {
493
531
  return true;
494
532
  }
@@ -513,11 +551,7 @@ function ElevasisFeaturesProvider({
513
551
  [resolvedFeatures]
514
552
  );
515
553
  const featureNavItems = useMemo(
516
- () => getFeatureNavItems(
517
- enabledResolvedFeatures,
518
- normalizedDisabledSubsectionPaths,
519
- hasResolvedFeature
520
- ),
554
+ () => getFeatureNavItems(enabledResolvedFeatures, normalizedDisabledSubsectionPaths, hasResolvedFeature),
521
555
  [enabledResolvedFeatures, normalizedDisabledSubsectionPaths, hasResolvedFeature]
522
556
  );
523
557
  const primaryNavItems = useMemo(
@@ -530,12 +564,7 @@ function ElevasisFeaturesProvider({
530
564
  ),
531
565
  ...featureNavItems
532
566
  ],
533
- [
534
- resolvedAppShellOverrides.primaryNavItems,
535
- normalizedDisabledSubsectionPaths,
536
- hasResolvedFeature,
537
- featureNavItems
538
- ]
567
+ [resolvedAppShellOverrides.primaryNavItems, normalizedDisabledSubsectionPaths, hasResolvedFeature, featureNavItems]
539
568
  );
540
569
  const bottomNavItems = useMemo(
541
570
  () => getAppShellNavItems(
@@ -544,16 +573,9 @@ function ElevasisFeaturesProvider({
544
573
  normalizedDisabledSubsectionPaths,
545
574
  hasResolvedFeature
546
575
  ),
547
- [
548
- resolvedAppShellOverrides.bottomNavItems,
549
- normalizedDisabledSubsectionPaths,
550
- hasResolvedFeature
551
- ]
552
- );
553
- const shellNavItems = useMemo(
554
- () => [...primaryNavItems, ...bottomNavItems],
555
- [primaryNavItems, bottomNavItems]
576
+ [resolvedAppShellOverrides.bottomNavItems, normalizedDisabledSubsectionPaths, hasResolvedFeature]
556
577
  );
578
+ const shellNavItems = useMemo(() => [...primaryNavItems, ...bottomNavItems], [primaryNavItems, bottomNavItems]);
557
579
  const shellModel = useMemo(
558
580
  () => ({
559
581
  navItems: shellNavItems
@@ -568,17 +590,9 @@ function ElevasisFeaturesProvider({
568
590
  (key) => resolvedFeatures.find((feature) => feature.key === key),
569
591
  [resolvedFeatures]
570
592
  );
571
- const isFeatureEnabled = useCallback(
572
- (key) => hasResolvedFeature(key),
573
- [hasResolvedFeature]
574
- );
593
+ const isFeatureEnabled = useCallback((key) => hasResolvedFeature(key), [hasResolvedFeature]);
575
594
  const resolveRouteByPath = useCallback(
576
- (path) => resolveRoute(
577
- enabledResolvedFeatures,
578
- path,
579
- normalizedDisabledSubsectionPaths,
580
- isFeatureEnabled
581
- ),
595
+ (path) => resolveRoute(enabledResolvedFeatures, path, normalizedDisabledSubsectionPaths, isFeatureEnabled),
582
596
  [enabledResolvedFeatures, normalizedDisabledSubsectionPaths, isFeatureEnabled]
583
597
  );
584
598
  const shellRuntime = useMemo(
@@ -636,4 +650,4 @@ function FeatureShell({ children }) {
636
650
  ] });
637
651
  }
638
652
 
639
- export { ElevasisCoreProvider, ElevasisFeaturesProvider, FeatureShell, NotificationProvider, createUseFeatureAccess, useElevasisFeatures, useNotificationAdapter, useOptionalElevasisFeatures };
653
+ export { ElevasisCoreProvider, ElevasisFeaturesProvider, FEATURE_KEY_ALIASES, FeatureShell, NotificationProvider, createFeatureAccessHook, createUseFeatureAccess, useElevasisFeatures, useNotificationAdapter, useOptionalElevasisFeatures };
@@ -3,14 +3,14 @@ import { PageContainer } from './chunk-BZZCNLT6.js';
3
3
  import { SubshellSidebarSection, SubshellNavItem } from './chunk-27COZ5AH.js';
4
4
  import { FilterBar } from './chunk-PDHTXPSF.js';
5
5
  import { CustomModal } from './chunk-GBMNCNHX.js';
6
- import { useDealTasksDue, useDeals, useCreateDealTask, useDeleteDeal, useTableSort, sortData, usePaginationState, useTableSelection, useDealDetail } from './chunk-V6Z2U6ZV.js';
6
+ import { useDealTasksDue, useDeals, useCreateDealTask, useDeleteDeal, useTableSort, sortData, usePaginationState, useTableSelection, useDealDetail } from './chunk-4PHPENKX.js';
7
7
  import { SubshellContentContainer } from './chunk-RX4UWZZR.js';
8
8
  import { CenteredErrorState, CardHeader, PageTitleCaption, EmptyState, ActivityTimeline } from './chunk-Y3D3WFJG.js';
9
9
  import { PAGE_SIZE_DEFAULT, formatTimeAgo } from './chunk-IOKL7BKE.js';
10
10
  import { useElevasisServices } from './chunk-QEPXAWE2.js';
11
11
  import { useRouterContext } from './chunk-Q7DJKLEN.js';
12
12
  import { Box, Stack, Group, Text, Badge, Center, Loader, UnstyledButton, Button, Modal, Select, TextInput, Textarea, Paper, Alert, SimpleGrid, Table, Checkbox, Pagination, Title, ActionIcon, Tabs, Card, Code, Divider, Anchor } from '@mantine/core';
13
- import { IconAddressBook, IconTrophy, IconClockExclamation, IconUser, IconPlus, IconLayoutGrid, IconColumns, IconFileInvoice, IconChecklist, IconAlertCircle, IconHistory, IconSearch, IconTargetArrow, IconAlertTriangle, IconArrowLeft, IconFileText, IconTrash, IconX, IconCheckbox, IconCalendar, IconMail, IconPhone, IconArrowRight, IconNote } from '@tabler/icons-react';
13
+ import { IconLayoutGrid, IconColumns, IconFileInvoice, IconAddressBook, IconTrophy, IconClockExclamation, IconUser, IconPlus, IconChecklist, IconAlertCircle, IconHistory, IconSearch, IconTargetArrow, IconAlertTriangle, IconArrowLeft, IconFileText, IconTrash, IconX, IconCheckbox, IconCalendar, IconMail, IconPhone, IconArrowRight, IconNote } from '@tabler/icons-react';
14
14
  import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
15
15
  import { useState, useMemo, useEffect } from 'react';
16
16
  import { useQuery, useQueryClient } from '@tanstack/react-query';
@@ -275,10 +275,10 @@ var CRM_ITEMS = [
275
275
  { label: "Pipeline", to: "/crm/pipeline", icon: IconColumns, exact: false },
276
276
  { label: "Deals", to: "/crm/deals", icon: IconFileInvoice, exact: false }
277
277
  ];
278
- var CrmSidebarMiddle = () => {
278
+ var CrmSidebarMiddle = ({ items = CRM_ITEMS } = {}) => {
279
279
  const { currentPath, navigate } = useRouterContext();
280
280
  return /* @__PURE__ */ jsxs(Stack, { gap: 0, style: { flex: 1, overflowY: "auto" }, children: [
281
- /* @__PURE__ */ jsx(Stack, { gap: 0, p: "sm", children: CRM_ITEMS.map((item) => {
281
+ /* @__PURE__ */ jsx(Stack, { gap: 0, p: "sm", children: items.map((item) => {
282
282
  const isActive = item.exact ? currentPath === item.to || currentPath === `${item.to}/` : currentPath.startsWith(item.to);
283
283
  return /* @__PURE__ */ jsx(
284
284
  SubshellNavItem,
@@ -303,10 +303,10 @@ var CrmSidebarMiddle = () => {
303
303
  ) })
304
304
  ] });
305
305
  };
306
- var CrmSidebar = () => {
306
+ var CrmSidebar = ({ children } = {}) => {
307
307
  return /* @__PURE__ */ jsxs(Stack, { gap: 0, style: { height: "100%", display: "flex", flexDirection: "column" }, children: [
308
308
  /* @__PURE__ */ jsx(CrmSidebarTop, {}),
309
- /* @__PURE__ */ jsx(CrmSidebarMiddle, {})
309
+ children ?? /* @__PURE__ */ jsx(CrmSidebarMiddle, {})
310
310
  ] });
311
311
  };
312
312
  var PIPELINE_FUNNEL_ORDER = [
@@ -693,7 +693,6 @@ function CrmOverview({
693
693
  }
694
694
  var crmManifest = {
695
695
  key: "crm",
696
- label: "CRM",
697
696
  accessFeatureKey: "acquisition",
698
697
  domainIds: ["crm"],
699
698
  capabilityIds: ["crm.pipeline.manage"],
@@ -1110,4 +1109,4 @@ function DealDetailPage({ dealId, renderActions, onDealLoaded }) {
1110
1109
  ] }) });
1111
1110
  }
1112
1111
 
1113
- export { ActivityFeedWidget, CrmOverview, CrmSidebar, CrmSidebarMiddle, CrmSidebarTop, DEAL_STAGE_COLORS, DEAL_STAGE_OPTIONS, DealDetailPage, DealsListPage, MetricsStrip, MyTasksPanel, PIPELINE_FUNNEL_ORDER, PipelineFunnelWidget, QuickCreateActions, SAVED_VIEW_PRESETS, SavedViewsPanel, TasksDueWidget, crmManifest, formatDealStageLabel, useCrmPipelineSummary, useCrmQuickMetrics, useRecentCrmActivity };
1112
+ export { ActivityFeedWidget, CRM_ITEMS, CrmOverview, CrmSidebar, CrmSidebarMiddle, CrmSidebarTop, DEAL_STAGE_COLORS, DEAL_STAGE_OPTIONS, DealDetailPage, DealsListPage, MetricsStrip, MyTasksPanel, PIPELINE_FUNNEL_ORDER, PipelineFunnelWidget, QuickCreateActions, SAVED_VIEW_PRESETS, SavedViewsPanel, TasksDueWidget, crmManifest, formatDealStageLabel, useCrmPipelineSummary, useCrmQuickMetrics, useRecentCrmActivity };
@@ -1,6 +1,6 @@
1
1
  import { PRESETS, getPreset, generateShades, mantineThemeOverride, createCssVariablesResolver, PresetsProvider } from './chunk-47YILFON.js';
2
2
  import { AppBackground } from './chunk-CYXZHBP4.js';
3
- import { ElevasisCoreProvider } from './chunk-SPMKW4VO.js';
3
+ import { ElevasisCoreProvider, ElevasisFeaturesProvider } from './chunk-OPT74SGF.js';
4
4
  import { ElevasisLoader } from './chunk-Y3D3WFJG.js';
5
5
  import { AppearanceProvider } from './chunk-QJ2KCHKX.js';
6
6
  import { getErrorInfo, formatErrorMessage, getErrorTitle } from './chunk-IOKL7BKE.js';
@@ -91,5 +91,13 @@ function ElevasisUIProvider({ theme, children, ...coreProps }) {
91
91
  }
92
92
  );
93
93
  }
94
+ function createTestFeaturesProvider({
95
+ organizationModel,
96
+ features = []
97
+ } = {}) {
98
+ return function TestFeaturesProvider({ children }) {
99
+ return /* @__PURE__ */ jsx(ElevasisFeaturesProvider, { features, organizationModel, children });
100
+ };
101
+ }
94
102
 
95
- export { ElevasisUIProvider };
103
+ export { ElevasisUIProvider, createTestFeaturesProvider };
@@ -3,8 +3,7 @@ import { CustomModal } from './chunk-GBMNCNHX.js';
3
3
  import { CyberAreaChart, CostTrendChart, ActivityTrendChart } from './chunk-KFICYU6S.js';
4
4
  import { AppShellLoader } from './chunk-YEX4MQSY.js';
5
5
  import { formatDuration } from './chunk-XA34RETF.js';
6
- import { useExecutionLogsFilters, useTimeRangeDates, useActivityFilters } from './chunk-TENLM2GN.js';
7
- import { useResolveError, useResolveAllErrors, usePaginationState, useErrorDetails, useMarkAsRead, useExecutionLogs, useExecutionHealth, useErrorAnalysis, useErrorDetail, useResolveErrorsByExecution, useResources, useCostTrends, useCostSummary, useCostByModel, useCostBreakdown, useActivityTrend, useActivities, useNotifications, useMarkAllAsRead, useTestNotification } from './chunk-V6Z2U6ZV.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';
8
7
  import { formatBucketTime, getTimeRangeDates } from './chunk-LXHZYSMQ.js';
9
8
  import { CenteredErrorState, CardHeader, StatsCardSkeleton, TrendIndicator, DetailCardSkeleton, EmptyState, PageTitleCaption, JsonViewer } from './chunk-Y3D3WFJG.js';
10
9
  import { PAGE_SIZE_DEFAULT } from './chunk-IOKL7BKE.js';
@@ -1790,7 +1789,6 @@ function NotificationCenter({ pageSize = 20 }) {
1790
1789
  }
1791
1790
  var monitoringManifest = {
1792
1791
  key: "monitoring",
1793
- label: "Monitoring",
1794
1792
  accessFeatureKey: "monitoring",
1795
1793
  navEntry: {
1796
1794
  label: "Monitoring",