@elevasis/ui 2.4.0 → 2.5.0

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 (61) hide show
  1. package/dist/{chunk-2DZACNOX.js → chunk-3VTACYBT.js} +4 -1
  2. package/dist/{chunk-IPRMGSCV.js → chunk-5RYRL7DP.js} +1 -1
  3. package/dist/{chunk-WN764MR7.js → chunk-CKBJVNSA.js} +3 -2
  4. package/dist/{chunk-PEZ4WOPF.js → chunk-DRBMVLJE.js} +2 -2
  5. package/dist/{chunk-JT7WDIZI.js → chunk-GEJZ6WLM.js} +1 -1
  6. package/dist/{chunk-WSL5MNAI.js → chunk-RBRSRRG4.js} +5 -2
  7. package/dist/{chunk-KRTZTBVP.js → chunk-S5EXLTGK.js} +8 -5
  8. package/dist/{chunk-ISHNN42L.js → chunk-TNYUWKSJ.js} +225 -33
  9. package/dist/{chunk-ZG7MLOBE.js → chunk-URFYQRJO.js} +1 -1
  10. package/dist/{chunk-G3G2QEB6.js → chunk-UXYE5ZBY.js} +2 -2
  11. package/dist/{chunk-3ONP2CEB.js → chunk-XGUMNEIR.js} +5 -2
  12. package/dist/{chunk-J5KWNRSD.js → chunk-YIWLA2B6.js} +1 -0
  13. package/dist/{chunk-5XGBMKUY.js → chunk-ZGV3X3UQ.js} +3 -2
  14. package/dist/components/index.d.ts +127 -99
  15. package/dist/components/index.js +16 -16
  16. package/dist/features/crm/index.d.ts +24 -0
  17. package/dist/features/crm/index.js +5 -5
  18. package/dist/features/dashboard/index.d.ts +25 -0
  19. package/dist/features/dashboard/index.js +5 -5
  20. package/dist/features/delivery/index.d.ts +25 -0
  21. package/dist/features/delivery/index.js +5 -5
  22. package/dist/features/lead-gen/index.d.ts +25 -1
  23. package/dist/features/lead-gen/index.js +8 -8
  24. package/dist/features/monitoring/index.d.ts +25 -0
  25. package/dist/features/monitoring/index.js +6 -6
  26. package/dist/features/operations/index.d.ts +24 -0
  27. package/dist/features/operations/index.js +7 -7
  28. package/dist/features/seo/index.d.ts +25 -0
  29. package/dist/features/seo/index.js +1 -1
  30. package/dist/features/settings/index.d.ts +24 -0
  31. package/dist/features/settings/index.js +5 -5
  32. package/dist/hooks/index.d.ts +239 -239
  33. package/dist/hooks/index.js +4 -4
  34. package/dist/hooks/published.d.ts +169 -169
  35. package/dist/hooks/published.js +3 -3
  36. package/dist/index.d.ts +303 -241
  37. package/dist/index.js +4 -4
  38. package/dist/provider/index.d.ts +64 -2
  39. package/dist/provider/index.js +2 -2
  40. package/dist/provider/published.d.ts +64 -2
  41. package/dist/provider/published.js +1 -1
  42. package/dist/types/index.d.ts +134 -134
  43. package/package.json +4 -3
  44. package/src/README.md +29 -0
  45. package/src/api/README.md +18 -0
  46. package/src/auth/README.md +18 -0
  47. package/src/components/README.md +24 -0
  48. package/src/execution/README.md +16 -0
  49. package/src/features/README.md +28 -0
  50. package/src/graph/README.md +16 -0
  51. package/src/hooks/README.md +24 -0
  52. package/src/initialization/README.md +19 -0
  53. package/src/organization/README.md +18 -0
  54. package/src/profile/README.md +19 -0
  55. package/src/provider/README.md +31 -0
  56. package/src/router/README.md +18 -0
  57. package/src/sse/README.md +13 -0
  58. package/src/theme/README.md +23 -0
  59. package/src/types/README.md +16 -0
  60. package/src/utils/README.md +18 -0
  61. package/src/zustand/README.md +18 -0
@@ -3,7 +3,7 @@ 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-IPRMGSCV.js';
6
+ import { useDealTasksDue, useDeals, useCreateDealTask, useDeleteDeal, useTableSort, sortData, usePaginationState, useTableSelection, useDealDetail } from './chunk-5RYRL7DP.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';
@@ -694,6 +694,9 @@ function CrmOverview({
694
694
  var crmManifest = {
695
695
  key: "crm",
696
696
  label: "CRM",
697
+ accessFeatureKey: "acquisition",
698
+ domainIds: ["crm"],
699
+ capabilityIds: ["crm.pipeline.manage"],
697
700
  sidebar: CrmSidebar,
698
701
  subshellRoutes: ["/crm"],
699
702
  navEntry: {
@@ -1,6 +1,6 @@
1
1
  import { getTimeRangeDates, observabilityKeys } from './chunk-LXHZYSMQ.js';
2
2
  import { GRAPH_CONSTANTS } from './chunk-22UVE3RA.js';
3
- import { useNotificationAdapter } from './chunk-ISHNN42L.js';
3
+ import { useNotificationAdapter } from './chunk-TNYUWKSJ.js';
4
4
  import { HTTP_HEADERS } from './chunk-NVOCKXUQ.js';
5
5
  import { STALE_TIME_MONITORING, REFETCH_INTERVAL_DASHBOARD, REFETCH_INTERVAL_RUNNING, WS_MAX_RETRIES_BEFORE_ERROR, WS_RECONNECT_BASE_DELAY, WS_RECONNECT_MAX_DELAY, getErrorInfo, formatErrorMessage, getErrorTitle, STALE_TIME_DEFAULT, STALE_TIME_ADMIN, APIClientError } from './chunk-IOKL7BKE.js';
6
6
  import { useStableAccessToken } from './chunk-MTJ43R2E.js';
@@ -2,8 +2,8 @@ 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-PEZ4WOPF.js';
6
- import { useResources, showErrorNotification } from './chunk-IPRMGSCV.js';
5
+ import { useDeleteCredential, useCreateCredential, useCredentials, MEMBERSHIP_STATUS_COLORS, transformMembershipToTableRow, useUserMemberships, useUpdateWebhookEndpoint, useDeleteWebhookEndpoint, useCreateWebhookEndpoint, useListWebhookEndpoints, useUpdateMemberConfig, useOrganizationMembers, useUpdateCredential, CredentialSchemas } from './chunk-DRBMVLJE.js';
6
+ import { useResources, showErrorNotification } from './chunk-5RYRL7DP.js';
7
7
  import { ListSkeleton, EmptyState, PageTitleCaption, CardHeader, APIErrorAlert, StatCard } from './chunk-Y3D3WFJG.js';
8
8
  import { formatDateTime, OAUTH_POPUP_CHECK_INTERVAL, OAUTH_FLOW_TIMEOUT } from './chunk-IOKL7BKE.js';
9
9
  import { useInitialization } from './chunk-TUXTSEAF.js';
@@ -2005,6 +2005,7 @@ function OAuthIntegrationsCard({ apiUrl }) {
2005
2005
  var settingsManifest = {
2006
2006
  key: "settings",
2007
2007
  label: "Settings",
2008
+ accessFeatureKey: "settings",
2008
2009
  navEntry: {
2009
2010
  label: "Settings",
2010
2011
  icon: IconSettings,
@@ -1,6 +1,6 @@
1
- import { CredentialNameSchema, UuidSchema, useErrorNotification, showApiErrorNotification } from './chunk-IPRMGSCV.js';
1
+ import { CredentialNameSchema, UuidSchema, useErrorNotification, showApiErrorNotification } from './chunk-5RYRL7DP.js';
2
2
  import { getTimeRangeDates } from './chunk-LXHZYSMQ.js';
3
- import { useNotificationAdapter } from './chunk-ISHNN42L.js';
3
+ import { useNotificationAdapter } from './chunk-TNYUWKSJ.js';
4
4
  import { GC_TIME_SHORT, STALE_TIME_MONITORING, GC_TIME_MEDIUM, STALE_TIME_DEFAULT } from './chunk-IOKL7BKE.js';
5
5
  import { useElevasisServices } from './chunk-QEPXAWE2.js';
6
6
  import { z } from 'zod';
@@ -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-ISHNN42L.js';
3
+ import { ElevasisCoreProvider } from './chunk-TNYUWKSJ.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';
@@ -3,8 +3,8 @@ 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-PEZ4WOPF.js';
7
- import { useDeleteProject, useTableSort, sortData, usePaginationState, useTableSelection } from './chunk-IPRMGSCV.js';
6
+ import { useProjects, useProject, useProjectNotes, useDeleteProject as useDeleteProject$1, useUpdateMilestone, useCreateNote } from './chunk-DRBMVLJE.js';
7
+ import { useDeleteProject, useTableSort, sortData, usePaginationState, useTableSelection } from './chunk-5RYRL7DP.js';
8
8
  import { SubshellContentContainer } from './chunk-RX4UWZZR.js';
9
9
  import { StatusBadge, EmptyState, PageTitleCaption, CenteredErrorState, StatCard } from './chunk-Y3D3WFJG.js';
10
10
  import { PAGE_SIZE_DEFAULT, formatTimeAgo, formatDate } from './chunk-IOKL7BKE.js';
@@ -321,6 +321,9 @@ var ProjectsSidebar = () => {
321
321
  var deliveryManifest = {
322
322
  key: "delivery",
323
323
  label: "Projects",
324
+ accessFeatureKey: "delivery",
325
+ domainIds: ["delivery"],
326
+ capabilityIds: ["delivery.projects.view"],
324
327
  navEntry: {
325
328
  label: "Projects",
326
329
  icon: IconBriefcase,
@@ -1,17 +1,17 @@
1
1
  import { ChatHeader, ChatSidebar } from './chunk-ROSMICXG.js';
2
2
  import { SubshellLoader, CollapsibleSidebarGroup } from './chunk-IDACMRGQ.js';
3
- import { ResourceHealthPanel } from './chunk-ZG7MLOBE.js';
3
+ import { ResourceHealthPanel } from './chunk-URFYQRJO.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-G3G2QEB6.js';
7
+ import { BaseNode, useGraphTheme, BaseEdge, ExecutionStats, UnifiedWorkflowGraph, WorkflowExecutionTimeline, AgentExecutionVisualizer, AgentExecutionTimeline, GraphBackground, GraphFitViewButton, GraphFitViewHandler } from './chunk-UXYE5ZBY.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-PEZ4WOPF.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-IPRMGSCV.js';
11
+ import { useStatusFilter, useResourceSearch, useResourcesDomainFilters, filterByDomainFilters, useCommandViewDomainFilters } from './chunk-DRBMVLJE.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-5RYRL7DP.js';
13
13
  import { useGraphHighlighting, calculateGraphHeight, Graph_module_css_default, GRAPH_CONSTANTS } from './chunk-22UVE3RA.js';
14
- import { useOptionalElevasisFeatures, useElevasisFeatures } from './chunk-ISHNN42L.js';
14
+ import { useOptionalElevasisFeatures, useElevasisFeatures } from './chunk-TNYUWKSJ.js';
15
15
  import { SubshellContainer, SubshellSidebar, SubshellRightSideContainer, SubshellContentContainer } from './chunk-RX4UWZZR.js';
16
16
  import { JsonViewer, CardHeader, PageTitleCaption, CollapsibleSection, TabCountBadge, ResourceCard, ContextViewer, EmptyState, APIErrorAlert } from './chunk-Y3D3WFJG.js';
17
17
  import { StyledMarkdown } from './chunk-3KMDHCAR.js';
@@ -8988,6 +8988,9 @@ function CommandQueueShell({
8988
8988
  var operationsManifest = {
8989
8989
  key: "operations",
8990
8990
  label: "Operations",
8991
+ accessFeatureKey: "operations",
8992
+ domainIds: ["operations"],
8993
+ capabilityIds: ["operations.organization-graph", "operations.command-view"],
8991
8994
  sidebar: OperationsSidebar,
8992
8995
  subshellRoutes: ["/operations"],
8993
8996
  organizationGraph: {
@@ -183,17 +183,6 @@ function useElevasisFeatures() {
183
183
  function useOptionalElevasisFeatures() {
184
184
  return useContext(ElevasisFeaturesContext);
185
185
  }
186
- function getEnabledFeatures(features, hasFeature) {
187
- return features.filter((feature) => {
188
- const accessKeys = [feature.key, feature.navEntry?.featureKey].filter(
189
- (key) => Boolean(key)
190
- );
191
- if (accessKeys.length === 0) {
192
- return true;
193
- }
194
- return accessKeys.some((key) => hasFeature(key));
195
- });
196
- }
197
186
  function normalizeRoutePath(path) {
198
187
  const trimmedPath = path.trim();
199
188
  if (!trimmedPath || trimmedPath === "/") {
@@ -206,6 +195,22 @@ function isRouteMatch(currentPath, route) {
206
195
  const normalizedRoute = normalizeRoutePath(route);
207
196
  return normalizedCurrentPath === normalizedRoute || normalizedCurrentPath.startsWith(`${normalizedRoute}/`);
208
197
  }
198
+ function getFeatureAccessKey(feature) {
199
+ return feature.accessFeatureKey ?? feature.navEntry?.featureKey;
200
+ }
201
+ function getFeatureAccessKeys(feature) {
202
+ return [...new Set([feature.key, feature.accessFeatureKey, feature.navEntry?.featureKey].filter((key) => Boolean(key)))];
203
+ }
204
+ function isFeatureModuleEnabled(feature, hasFeature) {
205
+ const accessKeys = getFeatureAccessKeys(feature);
206
+ if (accessKeys.length === 0) {
207
+ return true;
208
+ }
209
+ return accessKeys.some((key) => hasFeature(key));
210
+ }
211
+ function uniqueIds(ids) {
212
+ return ids ? [...new Set(ids)] : [];
213
+ }
209
214
  function hasOrganizationModelFeatureKey(organizationModel, key) {
210
215
  if (!organizationModel) {
211
216
  return false;
@@ -227,6 +232,15 @@ function findSurfaceById(organizationModel, id) {
227
232
  }
228
233
  return organizationModel.navigation.surfaces.find((surface) => surface.id === id);
229
234
  }
235
+ function findSurfacesByPaths(organizationModel, paths) {
236
+ if (!organizationModel || paths.length === 0) {
237
+ return [];
238
+ }
239
+ const normalizedPaths = new Set(paths.map((path) => normalizeRoutePath(path)));
240
+ return organizationModel.navigation.surfaces.filter(
241
+ (surface) => normalizedPaths.has(normalizeRoutePath(surface.path))
242
+ );
243
+ }
230
244
  function getOrganizationModelFeatureLabel(organizationModel, key) {
231
245
  if (!organizationModel || !key) {
232
246
  return void 0;
@@ -245,6 +259,12 @@ function isOrganizationModelFeatureEnabled(organizationModel, key) {
245
259
  }
246
260
  return organizationModel.features.enabled[key];
247
261
  }
262
+ function collectNavLinkPaths(links) {
263
+ if (!links?.length) {
264
+ return [];
265
+ }
266
+ return links.flatMap((link) => [link.link, ...collectNavLinkPaths(link.links)]);
267
+ }
248
268
  function resolveOrganizationGraphSurface(features, organizationModel) {
249
269
  for (const feature of features) {
250
270
  const graphBridge = feature.organizationGraph;
@@ -274,22 +294,70 @@ function resolveNavLink(link, organizationModel) {
274
294
  links: link.links?.map((nestedLink) => resolveNavLink(nestedLink, organizationModel))
275
295
  };
276
296
  }
297
+ function resolveNavEntry(navEntry, organizationModel) {
298
+ const matchedSurface = navEntry.link ? findSurfaceByPath(organizationModel, navEntry.link) : void 0;
299
+ const featureLabel = getOrganizationModelFeatureLabel(organizationModel, navEntry.featureKey);
300
+ return {
301
+ ...navEntry,
302
+ label: matchedSurface?.label ?? featureLabel ?? navEntry.label,
303
+ link: matchedSurface?.path ?? navEntry.link,
304
+ links: navEntry.links?.map((link) => resolveNavLink(link, organizationModel))
305
+ };
306
+ }
277
307
  function resolveFeatureModule(feature, organizationModel) {
278
308
  if (!feature.navEntry) {
279
309
  return feature;
280
310
  }
281
- const matchedSurface = feature.navEntry.link ? findSurfaceByPath(organizationModel, feature.navEntry.link) : void 0;
282
- const featureLabel = getOrganizationModelFeatureLabel(organizationModel, feature.navEntry.featureKey);
283
311
  return {
284
312
  ...feature,
285
- navEntry: {
286
- ...feature.navEntry,
287
- label: matchedSurface?.label ?? featureLabel ?? feature.navEntry.label,
288
- link: matchedSurface?.path ?? feature.navEntry.link,
289
- links: feature.navEntry.links?.map((link) => resolveNavLink(link, organizationModel))
290
- }
313
+ navEntry: resolveNavEntry(feature.navEntry, organizationModel)
314
+ };
315
+ }
316
+ function resolveFeatureSemantics(feature, resolvedFeature, organizationModel) {
317
+ const linkedPaths = [
318
+ resolvedFeature.navEntry?.link,
319
+ ...collectNavLinkPaths(resolvedFeature.navEntry?.links)
320
+ ].filter((path) => Boolean(path));
321
+ const linkedSurfaces = findSurfacesByPaths(organizationModel, linkedPaths);
322
+ const organizationGraphSurface = feature.organizationGraph ? findSurfaceById(organizationModel, feature.organizationGraph.surfaceId) : void 0;
323
+ const surfaces = [
324
+ ...linkedSurfaces,
325
+ ...organizationGraphSurface ? [organizationGraphSurface] : []
326
+ ].filter(
327
+ (surface, index, items) => Boolean(surface) && items.findIndex((candidate) => candidate.id === surface.id) === index
328
+ );
329
+ return {
330
+ domainIds: uniqueIds([
331
+ ...feature.domainIds ?? [],
332
+ ...surfaces.flatMap((surface) => surface.domainIds)
333
+ ]),
334
+ capabilityIds: uniqueIds([
335
+ ...feature.capabilityIds ?? [],
336
+ ...surfaces.flatMap((surface) => surface.capabilityIds)
337
+ ]),
338
+ surfaceIds: surfaces.map((surface) => surface.id),
339
+ surfaces
291
340
  };
292
341
  }
342
+ function resolveFeatureModules(features, organizationModel, isFeatureEnabled) {
343
+ return features.map((feature) => {
344
+ const resolvedFeature = resolveFeatureModule(feature, organizationModel);
345
+ const accessFeatureKey = getFeatureAccessKey(feature);
346
+ return {
347
+ ...resolvedFeature,
348
+ shellModule: {
349
+ key: feature.key,
350
+ label: resolvedFeature.label ?? feature.label
351
+ },
352
+ access: {
353
+ featureKey: accessFeatureKey,
354
+ label: getOrganizationModelFeatureLabel(organizationModel, accessFeatureKey),
355
+ enabled: accessFeatureKey ? isFeatureEnabled(accessFeatureKey) : isFeatureModuleEnabled(feature, isFeatureEnabled)
356
+ },
357
+ semantics: resolveFeatureSemantics(feature, resolvedFeature, organizationModel)
358
+ };
359
+ });
360
+ }
293
361
  function filterNavLinks(links, disabledSubsectionPaths, isFeatureEnabled) {
294
362
  return links.flatMap((link) => {
295
363
  if (link.featureKey && !isFeatureEnabled(link.featureKey)) {
@@ -307,7 +375,7 @@ function filterNavLinks(links, disabledSubsectionPaths, isFeatureEnabled) {
307
375
  ];
308
376
  });
309
377
  }
310
- function getNavItems(features, disabledSubsectionPaths, isFeatureEnabled) {
378
+ function getFeatureNavItems(features, disabledSubsectionPaths, isFeatureEnabled) {
311
379
  return features.flatMap((feature) => {
312
380
  if (!feature.navEntry) {
313
381
  return [];
@@ -316,7 +384,47 @@ function getNavItems(features, disabledSubsectionPaths, isFeatureEnabled) {
316
384
  return [
317
385
  {
318
386
  ...feature.navEntry,
319
- links
387
+ links,
388
+ placement: "primary",
389
+ source: "feature",
390
+ shellModuleKey: feature.key,
391
+ accessFeatureKey: feature.access.featureKey
392
+ }
393
+ ];
394
+ });
395
+ }
396
+ function resolveAppShellOverrides(appShellOverrides, organizationModel) {
397
+ if (!appShellOverrides) {
398
+ return {};
399
+ }
400
+ return {
401
+ primaryNavItems: appShellOverrides.primaryNavItems?.map(
402
+ (navItem) => resolveNavEntry(navItem, organizationModel)
403
+ ),
404
+ bottomNavItems: appShellOverrides.bottomNavItems?.map(
405
+ (navItem) => resolveNavEntry(navItem, organizationModel)
406
+ )
407
+ };
408
+ }
409
+ function getAppShellNavItems(navItems, placement, disabledSubsectionPaths, isFeatureEnabled) {
410
+ if (!navItems?.length) {
411
+ return [];
412
+ }
413
+ return navItems.flatMap((navItem) => {
414
+ if (navItem.featureKey && !isFeatureEnabled(navItem.featureKey)) {
415
+ return [];
416
+ }
417
+ const links = navItem.links?.length ? filterNavLinks(navItem.links, disabledSubsectionPaths, isFeatureEnabled) : void 0;
418
+ if (navItem.links && !links?.length && !navItem.link) {
419
+ return [];
420
+ }
421
+ return [
422
+ {
423
+ ...navItem,
424
+ links,
425
+ placement,
426
+ source: "app",
427
+ accessFeatureKey: navItem.featureKey
320
428
  }
321
429
  ];
322
430
  });
@@ -375,6 +483,7 @@ function resolveNavRoute(features, currentPath, disabledSubsectionPaths, isFeatu
375
483
  function ElevasisFeaturesProvider({
376
484
  features,
377
485
  organizationModel,
486
+ appShellOverrides,
378
487
  timeRange,
379
488
  operationsApiUrl,
380
489
  operationsSSEManager,
@@ -402,39 +511,114 @@ function ElevasisFeaturesProvider({
402
511
  () => disabledSubsectionPaths.map((path) => normalizeRoutePath(path)),
403
512
  [disabledSubsectionPaths]
404
513
  );
514
+ const resolvedFeatures = useMemo(
515
+ () => resolveFeatureModules(features, organizationModel, hasResolvedFeature),
516
+ [features, organizationModel, hasResolvedFeature]
517
+ );
518
+ const resolvedAppShellOverrides = useMemo(
519
+ () => resolveAppShellOverrides(appShellOverrides, organizationModel),
520
+ [appShellOverrides, organizationModel]
521
+ );
522
+ const enabledResolvedFeatures = useMemo(
523
+ () => resolvedFeatures.filter((feature) => isFeatureModuleEnabled(feature, hasResolvedFeature)),
524
+ [resolvedFeatures, hasResolvedFeature]
525
+ );
405
526
  const enabledFeatures = useMemo(
406
- () => getEnabledFeatures(features, hasResolvedFeature).map((feature) => resolveFeatureModule(feature, organizationModel)),
407
- [features, hasResolvedFeature, organizationModel]
527
+ () => enabledResolvedFeatures,
528
+ [enabledResolvedFeatures]
408
529
  );
409
530
  const allFeatures = useMemo(
410
- () => features.map((feature) => resolveFeatureModule(feature, organizationModel)),
411
- [features, organizationModel]
531
+ () => resolvedFeatures,
532
+ [resolvedFeatures]
533
+ );
534
+ const featureNavItems = useMemo(
535
+ () => getFeatureNavItems(
536
+ enabledResolvedFeatures,
537
+ normalizedDisabledSubsectionPaths,
538
+ hasResolvedFeature
539
+ ),
540
+ [enabledResolvedFeatures, normalizedDisabledSubsectionPaths, hasResolvedFeature]
541
+ );
542
+ const primaryNavItems = useMemo(
543
+ () => [
544
+ ...getAppShellNavItems(
545
+ resolvedAppShellOverrides.primaryNavItems,
546
+ "primary",
547
+ normalizedDisabledSubsectionPaths,
548
+ hasResolvedFeature
549
+ ),
550
+ ...featureNavItems
551
+ ],
552
+ [
553
+ resolvedAppShellOverrides.primaryNavItems,
554
+ normalizedDisabledSubsectionPaths,
555
+ hasResolvedFeature,
556
+ featureNavItems
557
+ ]
558
+ );
559
+ const bottomNavItems = useMemo(
560
+ () => getAppShellNavItems(
561
+ resolvedAppShellOverrides.bottomNavItems,
562
+ "bottom",
563
+ normalizedDisabledSubsectionPaths,
564
+ hasResolvedFeature
565
+ ),
566
+ [
567
+ resolvedAppShellOverrides.bottomNavItems,
568
+ normalizedDisabledSubsectionPaths,
569
+ hasResolvedFeature
570
+ ]
571
+ );
572
+ const shellModel = useMemo(
573
+ () => ({
574
+ primaryNavItems,
575
+ bottomNavItems,
576
+ navItems: [...primaryNavItems, ...bottomNavItems]
577
+ }),
578
+ [primaryNavItems, bottomNavItems]
412
579
  );
413
580
  const navItems = useMemo(
414
- () => getNavItems(enabledFeatures, normalizedDisabledSubsectionPaths, hasResolvedFeature),
415
- [enabledFeatures, normalizedDisabledSubsectionPaths, hasResolvedFeature]
581
+ () => shellModel.navItems,
582
+ [shellModel]
416
583
  );
417
584
  const organizationGraph = useMemo(
418
- () => resolveOrganizationGraphSurface(enabledFeatures, organizationModel),
419
- [enabledFeatures, organizationModel]
585
+ () => resolveOrganizationGraphSurface(enabledResolvedFeatures, organizationModel),
586
+ [enabledResolvedFeatures, organizationModel]
420
587
  );
421
588
  const getFeature = useCallback(
422
589
  (key) => allFeatures.find((feature) => feature.key === key),
423
590
  [allFeatures]
424
591
  );
592
+ const getResolvedFeature = useCallback(
593
+ (key) => resolvedFeatures.find((feature) => feature.key === key),
594
+ [resolvedFeatures]
595
+ );
425
596
  const isFeatureEnabled = useCallback(
426
597
  (key) => hasResolvedFeature(key),
427
598
  [hasResolvedFeature]
428
599
  );
429
600
  const resolveNavRouteByPath = useCallback(
430
- (path) => resolveNavRoute(enabledFeatures, path, normalizedDisabledSubsectionPaths, isFeatureEnabled),
431
- [enabledFeatures, normalizedDisabledSubsectionPaths, isFeatureEnabled]
601
+ (path) => resolveNavRoute(enabledResolvedFeatures, path, normalizedDisabledSubsectionPaths, isFeatureEnabled),
602
+ [enabledResolvedFeatures, normalizedDisabledSubsectionPaths, isFeatureEnabled]
603
+ );
604
+ const shellRuntime = useMemo(
605
+ () => ({
606
+ shellModel,
607
+ resolveNavRoute: resolveNavRouteByPath
608
+ }),
609
+ [shellModel, resolveNavRouteByPath]
432
610
  );
433
611
  const value = useMemo(
434
612
  () => ({
435
613
  navItems,
614
+ primaryNavItems,
615
+ bottomNavItems,
616
+ shellModel,
617
+ shellRuntime,
436
618
  enabledFeatures,
437
619
  allFeatures,
620
+ enabledResolvedFeatures,
621
+ resolvedFeatures,
438
622
  organizationGraph,
439
623
  organizationModel,
440
624
  timeRange,
@@ -443,12 +627,19 @@ function ElevasisFeaturesProvider({
443
627
  disabledSubsectionPaths: normalizedDisabledSubsectionPaths,
444
628
  isFeatureEnabled,
445
629
  getFeature,
630
+ getResolvedFeature,
446
631
  resolveNavRoute: resolveNavRouteByPath
447
632
  }),
448
633
  [
449
634
  navItems,
635
+ primaryNavItems,
636
+ bottomNavItems,
637
+ shellModel,
638
+ shellRuntime,
450
639
  enabledFeatures,
451
640
  allFeatures,
641
+ enabledResolvedFeatures,
642
+ resolvedFeatures,
452
643
  organizationGraph,
453
644
  organizationModel,
454
645
  timeRange,
@@ -457,15 +648,16 @@ function ElevasisFeaturesProvider({
457
648
  normalizedDisabledSubsectionPaths,
458
649
  isFeatureEnabled,
459
650
  getFeature,
651
+ getResolvedFeature,
460
652
  resolveNavRouteByPath
461
653
  ]
462
654
  );
463
655
  return /* @__PURE__ */ jsx(ElevasisFeaturesContext.Provider, { value, children });
464
656
  }
465
657
  function FeatureShell({ children }) {
466
- const { resolveNavRoute: resolveNavRoute2 } = useElevasisFeatures();
658
+ const { shellRuntime } = useElevasisFeatures();
467
659
  const { currentPath } = useRouterContext();
468
- const routeResolution = resolveNavRoute2(currentPath);
660
+ const routeResolution = shellRuntime.resolveNavRoute(currentPath);
469
661
  if (routeResolution.state === "disabled") {
470
662
  return /* @__PURE__ */ jsx(FeatureUnavailableState, { path: currentPath });
471
663
  }
@@ -1,5 +1,5 @@
1
1
  import { useCyberColors, CyberLegendItem, CyberAreaChart } from './chunk-KFICYU6S.js';
2
- import { useResourcesHealth } from './chunk-IPRMGSCV.js';
2
+ import { useResourcesHealth } from './chunk-5RYRL7DP.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';
@@ -2,8 +2,8 @@ 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-PEZ4WOPF.js';
6
- import { useDashboardMetrics, useResources, useUnresolvedErrors, useRecentExecutionsByResource, useCommandQueue, useScheduledTasks, useResourcesHealth } from './chunk-IPRMGSCV.js';
5
+ import { useTimeRangeDates } from './chunk-DRBMVLJE.js';
6
+ import { useDashboardMetrics, useResources, useUnresolvedErrors, useRecentExecutionsByResource, useCommandQueue, useScheduledTasks, useResourcesHealth } from './chunk-5RYRL7DP.js';
7
7
  import { getTimeRangeDates } from './chunk-LXHZYSMQ.js';
8
8
  import { Graph_module_css_default, useDirectedChainHighlighting, useNodeSelection, useFitViewTrigger } from './chunk-22UVE3RA.js';
9
9
  import { glassBase } from './chunk-47YILFON.js';
@@ -1,10 +1,10 @@
1
- import { ResourceExecuteDialog } from './chunk-KRTZTBVP.js';
1
+ import { ResourceExecuteDialog } from './chunk-S5EXLTGK.js';
2
2
  import { TableSelectionToolbar, SortableHeader } from './chunk-TUMSNGTX.js';
3
3
  import { PageContainer } from './chunk-BZZCNLT6.js';
4
4
  import { SubshellSidebarSection, SubshellNavItem } from './chunk-27COZ5AH.js';
5
5
  import { FilterBar } from './chunk-PDHTXPSF.js';
6
6
  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-IPRMGSCV.js';
7
+ import { showApiErrorNotification, acquisitionListKeys, showSuccessNotification, useListsTelemetry, useLists, useCreateList, useTableSort, sortData, usePaginationState, useTableSelection, useList, useListProgress, useListExecutions, useResourceDefinition, useCompanies, useDeleteCompanies, useContacts, useDeleteContacts } from './chunk-5RYRL7DP.js';
8
8
  import { SubshellContentContainer } from './chunk-RX4UWZZR.js';
9
9
  import { PageTitleCaption, CenteredErrorState, StatCard, EmptyState } from './chunk-Y3D3WFJG.js';
10
10
  import { useElevasisServices } from './chunk-QEPXAWE2.js';
@@ -51,6 +51,9 @@ var LeadGenSidebar = () => {
51
51
  var leadGenManifest = {
52
52
  key: "lead-gen",
53
53
  label: "Lead Gen",
54
+ accessFeatureKey: "acquisition",
55
+ domainIds: ["lead-gen"],
56
+ capabilityIds: ["leadgen.lists.manage"],
54
57
  sidebar: LeadGenSidebar,
55
58
  subshellRoutes: ["/lead-gen"],
56
59
  navEntry: {
@@ -38,6 +38,7 @@ var SEOSidebar = () => {
38
38
  var seoManifest = {
39
39
  key: "seo",
40
40
  label: "SEO",
41
+ accessFeatureKey: "seo",
41
42
  sidebar: SEOSidebar,
42
43
  subshellRoutes: ["/seo"]
43
44
  };
@@ -3,8 +3,8 @@ 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-PEZ4WOPF.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-IPRMGSCV.js';
6
+ import { useExecutionLogsFilters, useTimeRangeDates, useActivityFilters } from './chunk-DRBMVLJE.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-5RYRL7DP.js';
8
8
  import { formatBucketTime, getTimeRangeDates } from './chunk-LXHZYSMQ.js';
9
9
  import { CenteredErrorState, CardHeader, StatsCardSkeleton, TrendIndicator, DetailCardSkeleton, EmptyState, PageTitleCaption, JsonViewer } from './chunk-Y3D3WFJG.js';
10
10
  import { PAGE_SIZE_DEFAULT } from './chunk-IOKL7BKE.js';
@@ -1791,6 +1791,7 @@ function NotificationCenter({ pageSize = 20 }) {
1791
1791
  var monitoringManifest = {
1792
1792
  key: "monitoring",
1793
1793
  label: "Monitoring",
1794
+ accessFeatureKey: "monitoring",
1794
1795
  navEntry: {
1795
1796
  label: "Monitoring",
1796
1797
  icon: IconActivity,