@elevasis/ui 2.37.0 → 2.38.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 (61) hide show
  1. package/dist/app/index.d.ts +55 -2
  2. package/dist/app/index.js +8 -7
  3. package/dist/auth/index.d.ts +4 -0
  4. package/dist/auth/index.js +4 -4
  5. package/dist/charts/index.js +4 -4
  6. package/dist/{chunk-JPVZRZ3X.js → chunk-4UCAUBOL.js} +1 -1
  7. package/dist/{chunk-NWMPBG4U.js → chunk-566XWGPP.js} +76 -109
  8. package/dist/chunk-6D4LCJ52.js +10 -0
  9. package/dist/{chunk-CWYQRM5T.js → chunk-7ZWXTH5J.js} +2 -8
  10. package/dist/{chunk-S3KBYQTI.js → chunk-B2DZLPDL.js} +1 -1
  11. package/dist/{chunk-NYNOMAAS.js → chunk-C6BDBZRO.js} +1 -1
  12. package/dist/{chunk-JZ2WID2G.js → chunk-H2MEFUQD.js} +1 -1
  13. package/dist/{chunk-T3NI7DOA.js → chunk-LWDVD3XR.js} +218 -54
  14. package/dist/{chunk-LNC6PZAE.js → chunk-M7Q4UBRY.js} +1 -1
  15. package/dist/{chunk-6NREL3KL.js → chunk-P34FFSOX.js} +1 -1
  16. package/dist/{chunk-5CTJ7TW2.js → chunk-PGWANFNE.js} +5 -4
  17. package/dist/{chunk-LCJQ6OWC.js → chunk-YGUNUIME.js} +10 -2
  18. package/dist/components/index.d.ts +46 -0
  19. package/dist/components/index.js +11 -10
  20. package/dist/components/navigation/index.js +3 -3
  21. package/dist/features/auth/index.d.ts +45 -0
  22. package/dist/features/auth/index.js +12 -11
  23. package/dist/features/clients/index.js +11 -10
  24. package/dist/features/crm/index.d.ts +45 -0
  25. package/dist/features/crm/index.js +11 -10
  26. package/dist/features/dashboard/index.js +11 -10
  27. package/dist/features/delivery/index.d.ts +45 -0
  28. package/dist/features/delivery/index.js +11 -10
  29. package/dist/features/knowledge/index.js +3 -3
  30. package/dist/features/lead-gen/index.d.ts +10 -2
  31. package/dist/features/lead-gen/index.js +11 -10
  32. package/dist/features/monitoring/index.js +11 -10
  33. package/dist/features/monitoring/requests/index.js +11 -10
  34. package/dist/features/operations/index.d.ts +10 -2
  35. package/dist/features/operations/index.js +11 -10
  36. package/dist/features/right-panel-host/index.js +0 -1
  37. package/dist/features/settings/index.d.ts +45 -0
  38. package/dist/features/settings/index.js +11 -10
  39. package/dist/hooks/access/index.d.ts +4 -0
  40. package/dist/hooks/access/index.js +3 -3
  41. package/dist/hooks/delivery/index.d.ts +45 -0
  42. package/dist/hooks/delivery/index.js +11 -10
  43. package/dist/hooks/index.d.ts +50 -0
  44. package/dist/hooks/index.js +11 -10
  45. package/dist/hooks/published.d.ts +50 -0
  46. package/dist/hooks/published.js +11 -10
  47. package/dist/index.d.ts +60 -2
  48. package/dist/index.js +11 -10
  49. package/dist/initialization/index.d.ts +45 -0
  50. package/dist/knowledge/index.d.ts +10 -2
  51. package/dist/knowledge/index.js +167 -25
  52. package/dist/organization/index.js +11 -10
  53. package/dist/profile/index.d.ts +45 -0
  54. package/dist/provider/index.d.ts +55 -2
  55. package/dist/provider/index.js +8 -7
  56. package/dist/provider/published.d.ts +55 -2
  57. package/dist/provider/published.js +5 -5
  58. package/dist/supabase/index.d.ts +87 -0
  59. package/dist/theme/index.js +3 -2
  60. package/dist/types/index.d.ts +45 -0
  61. package/package.json +5 -5
@@ -1,6 +1,6 @@
1
- import { useAvailablePresets } from './chunk-S3KBYQTI.js';
1
+ import { useAvailablePresets } from './chunk-B2DZLPDL.js';
2
2
  import { useSupabase } from './chunk-BRXELOHC.js';
3
- import { useBreadcrumbs } from './chunk-LNC6PZAE.js';
3
+ import { useBreadcrumbs } from './chunk-M7Q4UBRY.js';
4
4
  import { ChatHeader, ChatSidebar } from './chunk-CXY7FMUM.js';
5
5
  import { observabilityKeys, useCyberColors, CyberLegendItem, CyberAreaChart, CyberDonut, HeroStatsRow, CostTrendChart, ActivityTrendChart } from './chunk-7GQFIWP4.js';
6
6
  import { DEFAULT_ORGANIZATION_GRAPH_FILTERS, ORGANIZATION_GRAPH_NODE_KIND_ORDER, ORGANIZATION_GRAPH_NODE_KIND_LABELS, ORGANIZATION_GRAPH_EDGE_KIND_LABELS, ORGANIZATION_GRAPH_NODE_KIND_DETAIL_LABELS, ORGANIZATION_GRAPH_NODE_KIND_MEANINGS, ORGANIZATION_GRAPH_EDGE_KIND_MEANINGS } from './chunk-5EYJ2GIN.js';
@@ -9,8 +9,8 @@ import { SubshellNavItem } from './chunk-X4WBGKJQ.js';
9
9
  import { SubshellSidebarSection } from './chunk-IIMU5YAJ.js';
10
10
  import { Graph_module_css_default, useDirectedChainHighlighting, useNodeSelection, useFitViewTrigger, useGraphHighlighting, calculateGraphHeight, GRAPH_CONSTANTS } from './chunk-HENXLGVD.js';
11
11
  import { STATUS_COLORS, getStatusIcon, formatDuration, getStatusColors, AGENT_CONSTANTS, shouldAnimateEdge, TIMELINE_CONSTANTS, calculateBarPosition, CONTAINER_CONSTANTS, useExecutionPath, useUnifiedWorkflowLayout, WORKFLOW_CONSTANTS, useReactFlowAgent, getResourceStatusColor, useMergedExecution, useTimelineData, useAgentIterationData } from './chunk-7FPLLSHN.js';
12
- import { glassBase } from './chunk-CWYQRM5T.js';
13
- import { useNotificationAdapter, useCrmActions, useListActions } from './chunk-JZ2WID2G.js';
12
+ import { glassBase } from './chunk-7ZWXTH5J.js';
13
+ import { useNotificationAdapter, useCrmActions, useListActions } from './chunk-H2MEFUQD.js';
14
14
  import { EmptyState, CenteredErrorState, StatsCardSkeleton, TrendIndicator, DetailCardSkeleton, GlowDot, JsonViewer, ListSkeleton, PageTitleCaption, StatCard, APIErrorAlert, CollapsibleSection, ActivityTimeline, ContextViewer, StatusBadge, TabCountBadge, ResourceCard } from './chunk-I53EX4VU.js';
15
15
  import { StyledMarkdown } from './chunk-3KMDHCAR.js';
16
16
  import { CardHeader } from './chunk-S3XR4II4.js';
@@ -20,11 +20,11 @@ import { topbarHeight } from './chunk-DT3QYZVU.js';
20
20
  import { useRouterContext } from './chunk-Q7DJKLEN.js';
21
21
  import { ResourceTypeSchema, NonEmptyStringSchema, OriginResourceTypeSchema, UuidSchema, CredentialNameSchema, getErrorInfo, formatErrorMessage, getErrorTitle, isAPIClientError, getTimeRangeDates, formatBucketTime, PAGE_SIZE_DEFAULT, REFETCH_INTERVAL_DASHBOARD, REFETCH_INTERVAL_RUNNING, WS_MAX_RETRIES_BEFORE_ERROR, WS_RECONNECT_BASE_DELAY, WS_RECONNECT_MAX_DELAY, APIClientError, formatDateTime, getResourceIcon, formatTimeAgo, formatDate, formatRelativeTime, debounce, OAUTH_FLOW_TIMEOUT } from './chunk-X66MVMZT.js';
22
22
  import { ResourceStatusColors, toWorkflowLogMessages } from './chunk-KRWALB24.js';
23
- import { useStableAccessToken } from './chunk-JPVZRZ3X.js';
24
- import { useAccess, AccessKeys } from './chunk-LCJQ6OWC.js';
25
- import { useOptionalElevasisSystems, useElevasisSystems } from './chunk-NYNOMAAS.js';
23
+ import { useStableAccessToken } from './chunk-4UCAUBOL.js';
24
+ import { useAccess, AccessKeys } from './chunk-YGUNUIME.js';
25
+ import { useOptionalElevasisSystems, useElevasisSystems } from './chunk-C6BDBZRO.js';
26
26
  import { useInitialization } from './chunk-533DUEQY.js';
27
- import { OrgKnowledgeNodeSchema, defineResources, defineActions, defineTopology, topologyRef, resolveOrganizationModel, listAllSystems, projectOrganizationSurfaces, topologyRelationship, PROJECTS_VIEW_ACTION_ID, resolveSemanticIconComponent, getAllBuildTemplates, getLeadGenStageCatalog, buildOrganizationGraph, getResourcesForSystem, getSystem, SemanticIcon, compileOrganizationOntology, getSystemAncestors } from './chunk-NWMPBG4U.js';
27
+ import { defineEntities, OrgKnowledgeNodeSchema, defineResources, defineActions, defineTopology, topologyRef, resolveOrganizationModel, listAllSystems, projectOrganizationSurfaces, topologyRelationship, PROJECTS_VIEW_ACTION_ID, resolveSemanticIconComponent, getAllBuildTemplates, getLeadGenStageCatalog, buildOrganizationGraph, getResourcesForSystem, getSystem, SemanticIcon, compileOrganizationOntology, getSystemAncestors } from './chunk-566XWGPP.js';
28
28
  import { useOrganization } from './chunk-DD3CCMCZ.js';
29
29
  import { useUserProfile } from './chunk-2Q2JQSQO.js';
30
30
  import { STALE_TIME_MONITORING, STALE_TIME_DEFAULT, STALE_TIME_ADMIN, GC_TIME_MEDIUM, GC_TIME_SHORT } from './chunk-6ROXVZ3L.js';
@@ -2811,7 +2811,11 @@ function useInFlightExecutions(resourceId, options = {}) {
2811
2811
  const limit = options.limit ?? 20;
2812
2812
  const offset = options.offset ?? 0;
2813
2813
  return useQuery({
2814
- queryKey: options.listId ? [...acquisitionListKeys.executions(workOSOrganizationId, options.listId, { resourceId, limit }), "in-flight"] : [...executionsKeys.executions(workOSOrganizationId, resourceId, "all", limit, offset), "in-flight"],
2814
+ // eslint-disable-next-line @tanstack/query/exhaustive-deps -- resourceId/limit/offset/listId are already folded into the executions key builders; the rule can't trace through them
2815
+ queryKey: options.listId ? [
2816
+ ...acquisitionListKeys.executions(workOSOrganizationId, options.listId, { resourceId, limit }),
2817
+ "in-flight"
2818
+ ] : [...executionsKeys.executions(workOSOrganizationId, resourceId, "all", limit, offset), "in-flight"],
2815
2819
  queryFn: async () => {
2816
2820
  if (options.listId) {
2817
2821
  const executions2 = await apiRequest(
@@ -14319,13 +14323,123 @@ function DealKanbanCard({ deal, config, onClick, onDragStart, onDragEnd }) {
14319
14323
  );
14320
14324
  }
14321
14325
 
14326
+ // ../elevasis-core/src/organization-model/entities.ts
14327
+ var ENTITY_ENTRY_INPUTS = [
14328
+ {
14329
+ id: "crm.deal",
14330
+ order: 10,
14331
+ label: "Deal",
14332
+ description: "A CRM opportunity or sales pipeline record.",
14333
+ ownedBySystemId: "sales.crm",
14334
+ table: "crm_deals",
14335
+ stateCatalogId: "crm.pipeline",
14336
+ links: [{ toEntity: "crm.contact", kind: "has-many", via: "deal_contacts", label: "contacts" }]
14337
+ },
14338
+ {
14339
+ id: "crm.contact",
14340
+ order: 20,
14341
+ label: "CRM Contact",
14342
+ description: "A person associated with a CRM relationship or deal.",
14343
+ ownedBySystemId: "sales.crm",
14344
+ table: "crm_contacts"
14345
+ },
14346
+ {
14347
+ id: "leadgen.list",
14348
+ order: 30,
14349
+ label: "Lead List",
14350
+ description: "A prospecting list that groups companies and contacts for acquisition workflows.",
14351
+ ownedBySystemId: "sales.lead-gen",
14352
+ table: "acq_lists",
14353
+ links: [
14354
+ { toEntity: "leadgen.company", kind: "has-many", via: "acq_list_companies", label: "companies" },
14355
+ { toEntity: "leadgen.contact", kind: "has-many", via: "acq_list_members", label: "contacts" }
14356
+ ]
14357
+ },
14358
+ {
14359
+ id: "leadgen.company",
14360
+ order: 40,
14361
+ label: "Lead Company",
14362
+ description: "A company record sourced, enriched, and qualified during prospecting.",
14363
+ ownedBySystemId: "sales.lead-gen",
14364
+ table: "acq_list_companies",
14365
+ stateCatalogId: "lead-gen.company",
14366
+ links: [
14367
+ { toEntity: "leadgen.list", kind: "belongs-to", via: "list_id", label: "list" },
14368
+ { toEntity: "leadgen.contact", kind: "has-many", via: "company_id", label: "contacts" }
14369
+ ]
14370
+ },
14371
+ {
14372
+ id: "leadgen.contact",
14373
+ order: 50,
14374
+ label: "Lead Contact",
14375
+ description: "A prospect contact discovered or enriched during lead generation.",
14376
+ ownedBySystemId: "sales.lead-gen",
14377
+ table: "acq_list_members",
14378
+ stateCatalogId: "lead-gen.contact",
14379
+ links: [
14380
+ { toEntity: "leadgen.list", kind: "belongs-to", via: "list_id", label: "list" },
14381
+ { toEntity: "leadgen.company", kind: "belongs-to", via: "company_id", label: "company" }
14382
+ ]
14383
+ },
14384
+ {
14385
+ id: "delivery.project",
14386
+ order: 60,
14387
+ label: "Project",
14388
+ description: "A client delivery project.",
14389
+ ownedBySystemId: "projects",
14390
+ table: "projects",
14391
+ links: [
14392
+ { toEntity: "delivery.milestone", kind: "has-many", via: "project_id", label: "milestones" },
14393
+ { toEntity: "delivery.task", kind: "has-many", via: "project_id", label: "tasks" }
14394
+ ]
14395
+ },
14396
+ {
14397
+ id: "delivery.milestone",
14398
+ order: 70,
14399
+ label: "Milestone",
14400
+ description: "A delivery checkpoint within a project.",
14401
+ ownedBySystemId: "projects",
14402
+ table: "project_milestones",
14403
+ links: [
14404
+ { toEntity: "delivery.project", kind: "belongs-to", via: "project_id", label: "project" },
14405
+ { toEntity: "delivery.task", kind: "has-many", via: "milestone_id", label: "tasks" }
14406
+ ]
14407
+ },
14408
+ {
14409
+ id: "delivery.task",
14410
+ order: 80,
14411
+ label: "Task",
14412
+ description: "A delivery task that can move through the task status catalog.",
14413
+ ownedBySystemId: "projects",
14414
+ table: "project_tasks",
14415
+ stateCatalogId: "delivery.task",
14416
+ links: [
14417
+ { toEntity: "delivery.project", kind: "belongs-to", via: "project_id", label: "project" },
14418
+ { toEntity: "delivery.milestone", kind: "belongs-to", via: "milestone_id", label: "milestone" }
14419
+ ]
14420
+ }
14421
+ ];
14422
+ var ELEVASIS_ORGANIZATION_MODEL_ENTITIES = defineEntities(ENTITY_ENTRY_INPUTS);
14423
+
14322
14424
  // ../elevasis-core/src/organization-model/identity.ts
14323
14425
  var platformBranding = {
14324
14426
  organizationName: "Elevasis",
14325
14427
  productName: "Elevasis Command Center",
14326
- shortName: "Elevasis"
14428
+ shortName: "Elevasis",
14429
+ voice: "Clear, practical, and grounded in the work SMB teams actually need to automate. Elevasis explains complex AI orchestration in plain language, with a bias toward useful outcomes, operational trust, and human control.",
14430
+ tagline: "AI orchestration for SMB teams ready to automate complex work with intelligent agents and workflows.",
14431
+ values: [
14432
+ "Make automation practical for real business work",
14433
+ "Keep humans in control of consequential decisions",
14434
+ "Earn trust through clear systems and observable workflows",
14435
+ "Design agents around outcomes, not novelty",
14436
+ "Respect the constraints of growing SMB teams"
14437
+ ]
14327
14438
  };
14328
14439
  var platformIdentity = {
14440
+ organizationName: "Elevasis",
14441
+ productName: "Elevasis Command Center",
14442
+ shortName: "Elevasis",
14329
14443
  mission: "Help SMBs automate complex work using intelligent AI agents and workflows.",
14330
14444
  vision: "Become the operating system for the modern AI-driven business.",
14331
14445
  legalName: "Elevasis",
@@ -18426,35 +18540,39 @@ function assignResponsibleRoles(systems) {
18426
18540
  }
18427
18541
  return applyToMap(systems);
18428
18542
  }
18429
- var canonicalOrganizationModel = resolveOrganizationModel({
18430
- version: 1,
18431
- // D7: domainMetadata for all 12 domain keys. Date reflects Wave 2 migration (2026-05-11).
18432
- domainMetadata: {
18433
- branding: { version: 1, lastModified: "2026-05-11" },
18434
- identity: { version: 1, lastModified: "2026-05-11" },
18435
- customers: { version: 1, lastModified: "2026-05-11" },
18436
- offerings: { version: 1, lastModified: "2026-05-11" },
18437
- roles: { version: 1, lastModified: "2026-05-11" },
18438
- goals: { version: 1, lastModified: "2026-05-11" },
18439
- systems: { version: 1, lastModified: "2026-05-11" },
18440
- resources: { version: 1, lastModified: "2026-05-11" },
18441
- actions: { version: 1, lastModified: "2026-05-11" },
18442
- entities: { version: 1, lastModified: "2026-05-11" },
18443
- policies: { version: 1, lastModified: "2026-05-11" },
18444
- knowledge: { version: 1, lastModified: "2026-05-11" },
18445
- topology: { version: 1, lastModified: "2026-05-14" }
18543
+ var canonicalOrganizationModel = resolveOrganizationModel(
18544
+ {
18545
+ version: 1,
18546
+ // D7: domainMetadata for all 12 domain keys. Date reflects Wave 2 migration (2026-05-11).
18547
+ domainMetadata: {
18548
+ branding: { version: 1, lastModified: "2026-05-11" },
18549
+ identity: { version: 1, lastModified: "2026-05-11" },
18550
+ customers: { version: 1, lastModified: "2026-05-11" },
18551
+ offerings: { version: 1, lastModified: "2026-05-11" },
18552
+ roles: { version: 1, lastModified: "2026-05-11" },
18553
+ goals: { version: 1, lastModified: "2026-05-11" },
18554
+ systems: { version: 1, lastModified: "2026-05-11" },
18555
+ resources: { version: 1, lastModified: "2026-05-11" },
18556
+ actions: { version: 1, lastModified: "2026-05-11" },
18557
+ entities: { version: 1, lastModified: "2026-05-11" },
18558
+ policies: { version: 1, lastModified: "2026-05-11" },
18559
+ knowledge: { version: 1, lastModified: "2026-05-11" },
18560
+ topology: { version: 1, lastModified: "2026-05-14" }
18561
+ },
18562
+ branding: platformBranding,
18563
+ navigation: platformNavigation,
18564
+ identity: platformIdentity,
18565
+ roles: platformRoles,
18566
+ systems: assignResponsibleRoles(platformSystems),
18567
+ actions: ELEVASIS_DEFAULT_ORGANIZATION_MODEL_ACTIONS,
18568
+ entities: ELEVASIS_ORGANIZATION_MODEL_ENTITIES,
18569
+ resources: platformResourceDescriptors,
18570
+ topology: platformTopology,
18571
+ // D3: knowledge is a flat Record<id, OrgKnowledgeNode> — no wrapper object.
18572
+ knowledge: platformKnowledgeNodes
18446
18573
  },
18447
- branding: platformBranding,
18448
- navigation: platformNavigation,
18449
- identity: platformIdentity,
18450
- roles: platformRoles,
18451
- systems: assignResponsibleRoles(platformSystems),
18452
- actions: ELEVASIS_DEFAULT_ORGANIZATION_MODEL_ACTIONS,
18453
- resources: platformResourceDescriptors,
18454
- topology: platformTopology,
18455
- // D3: knowledge is a flat Record<id, OrgKnowledgeNode> — no wrapper object.
18456
- knowledge: platformKnowledgeNodes
18457
- }, { mergeDefaults: false });
18574
+ { mergeDefaults: false }
18575
+ );
18458
18576
  var canonicalSystemPaths = new Set(listAllSystems(canonicalOrganizationModel).map(({ path }) => path));
18459
18577
  for (const resource2 of Object.values(canonicalOrganizationModel.resources)) {
18460
18578
  if (!canonicalSystemPaths.has(resource2.systemPath)) {
@@ -21376,6 +21494,7 @@ function LeadGenListsPage() {
21376
21494
  const [showBatchDelete, setShowBatchDelete] = useState(false);
21377
21495
  const { data: lists, isLoading: listsLoading } = useLists();
21378
21496
  const { data: telemetry, isLoading: telemetryLoading } = useListsTelemetry();
21497
+ const canManageLeadGen = useAccess(AccessKeys.leadGenManage);
21379
21498
  const createListMutation = useCreateList();
21380
21499
  const deleteListsMutation = useDeleteLists();
21381
21500
  const { sort, toggleSort } = useTableSort("created");
@@ -21423,6 +21542,7 @@ function LeadGenListsPage() {
21423
21542
  setShowCreateList(false);
21424
21543
  }
21425
21544
  function handleCreateList() {
21545
+ if (!canManageLeadGen.allowed) return;
21426
21546
  const trimmedName = newListName.trim();
21427
21547
  if (!trimmedName) return;
21428
21548
  const body = {
@@ -21446,7 +21566,7 @@ function LeadGenListsPage() {
21446
21566
  {
21447
21567
  title: "Lists",
21448
21568
  caption: "Lead lists and contact organization",
21449
- rightSection: /* @__PURE__ */ jsx(
21569
+ rightSection: canManageLeadGen.allowed ? /* @__PURE__ */ jsx(
21450
21570
  Button,
21451
21571
  {
21452
21572
  leftSection: /* @__PURE__ */ jsx(IconPlus, { size: 16 }),
@@ -21455,7 +21575,7 @@ function LeadGenListsPage() {
21455
21575
  size: "xs",
21456
21576
  children: "New List"
21457
21577
  }
21458
- )
21578
+ ) : null
21459
21579
  }
21460
21580
  ) }),
21461
21581
  /* @__PURE__ */ jsx(Paper, { children: /* @__PURE__ */ jsxs(Stack, { children: [
@@ -21466,7 +21586,7 @@ function LeadGenListsPage() {
21466
21586
  TableSelectionToolbar,
21467
21587
  {
21468
21588
  selectedCount: selection.selectedCount,
21469
- onDelete: () => setShowBatchDelete(true),
21589
+ onDelete: canManageLeadGen.allowed ? () => setShowBatchDelete(true) : void 0,
21470
21590
  isDeleting: deleteListsMutation.isPending
21471
21591
  }
21472
21592
  ),
@@ -21501,7 +21621,7 @@ function LeadGenListsPage() {
21501
21621
  icon: IconList,
21502
21622
  title: searchQuery.trim() || statusFilter ? "No lists match your filters" : "No lists yet",
21503
21623
  description: searchQuery.trim() || statusFilter ? void 0 : "Create one to get started.",
21504
- action: searchQuery.trim() || statusFilter ? void 0 : {
21624
+ action: searchQuery.trim() || statusFilter || !canManageLeadGen.allowed ? void 0 : {
21505
21625
  label: "Create List",
21506
21626
  onClick: () => setShowCreateList(true),
21507
21627
  icon: /* @__PURE__ */ jsx(IconPlus, { size: 16 })
@@ -21696,7 +21816,9 @@ function LeadGenListsPage() {
21696
21816
  {
21697
21817
  color: "red",
21698
21818
  loading: deleteListsMutation.isPending,
21819
+ disabled: !canManageLeadGen.allowed,
21699
21820
  onClick: () => {
21821
+ if (!canManageLeadGen.allowed) return;
21700
21822
  deleteListsMutation.mutate([...selection.selectedIds], {
21701
21823
  onSuccess: () => {
21702
21824
  setShowBatchDelete(false);
@@ -22801,7 +22923,7 @@ function PipelineStagesCard({
22801
22923
  ] })
22802
22924
  ] }) });
22803
22925
  }
22804
- function ListConfigCard({ list }) {
22926
+ function ListConfigCard({ list, canManage }) {
22805
22927
  const updateListConfig = useUpdateListConfig(list.id);
22806
22928
  const icp = list.icp ?? {};
22807
22929
  const scraping = list.scrapingConfig ?? {};
@@ -22809,6 +22931,7 @@ function ListConfigCard({ list }) {
22809
22931
  const hasScraping = Object.values(scraping).some((v) => v !== void 0 && v !== null && v !== "");
22810
22932
  const dataMode = getListDataMode(list);
22811
22933
  const handleDataModeChange = (value) => {
22934
+ if (!canManage) return;
22812
22935
  if (value !== "mock" && value !== "live") return;
22813
22936
  if (value === dataMode) return;
22814
22937
  updateListConfig.mutate({
@@ -22830,7 +22953,7 @@ function ListConfigCard({ list }) {
22830
22953
  data: DATA_MODE_OPTIONS2,
22831
22954
  value: dataMode,
22832
22955
  onChange: handleDataModeChange,
22833
- disabled: updateListConfig.isPending,
22956
+ disabled: !canManage || updateListConfig.isPending,
22834
22957
  w: 180,
22835
22958
  size: "xs"
22836
22959
  }
@@ -22895,6 +23018,7 @@ function ListConfigCard({ list }) {
22895
23018
  function OverviewTab({
22896
23019
  list,
22897
23020
  progress,
23021
+ canManage,
22898
23022
  leadGenConfig
22899
23023
  }) {
22900
23024
  const hasMetadata = list.metadata && Object.keys(list.metadata).length > 0;
@@ -22910,7 +23034,7 @@ function OverviewTab({
22910
23034
  /* @__PURE__ */ jsx(StatCard, { label: "Members", value: progress.totalMembers, icon: IconUsers })
22911
23035
  ] }),
22912
23036
  /* @__PURE__ */ jsx(PipelineStagesCard, { list, progress, leadGenConfig }),
22913
- /* @__PURE__ */ jsx(ListConfigCard, { list }),
23037
+ /* @__PURE__ */ jsx(ListConfigCard, { list, canManage }),
22914
23038
  hasMetadata && /* @__PURE__ */ jsx(Card, { withBorder: true, children: /* @__PURE__ */ jsxs(Stack, { gap: "xs", children: [
22915
23039
  /* @__PURE__ */ jsx(Title, { order: 5, children: "Metadata" }),
22916
23040
  /* @__PURE__ */ jsx(JsonViewer, { data: list.metadata, maxHeight: 320 })
@@ -23088,6 +23212,7 @@ function CredentialRequirementsPanel({
23088
23212
  selections,
23089
23213
  verificationByCredentialId,
23090
23214
  verifyingCredentialId,
23215
+ disabled,
23091
23216
  onSelect,
23092
23217
  onVerify
23093
23218
  }) {
@@ -23115,7 +23240,7 @@ function CredentialRequirementsPanel({
23115
23240
  onSelect(requirement, credentials.find((credential) => credential.id === credentialId) ?? null);
23116
23241
  },
23117
23242
  required: requirement.required,
23118
- disabled: credentialsLoading || credentialsUnavailable || credentials.length === 0,
23243
+ disabled: disabled || credentialsLoading || credentialsUnavailable || credentials.length === 0,
23119
23244
  style: { flex: 1 }
23120
23245
  }
23121
23246
  ),
@@ -23124,7 +23249,7 @@ function CredentialRequirementsPanel({
23124
23249
  {
23125
23250
  size: "xs",
23126
23251
  variant: "light",
23127
- disabled: !selectedCredential,
23252
+ disabled: disabled || !selectedCredential,
23128
23253
  loading: selectedCredential ? verifyingCredentialId === selectedCredential.id : false,
23129
23254
  onClick: () => selectedCredential && onVerify(selectedCredential),
23130
23255
  children: "Test credential"
@@ -23214,6 +23339,7 @@ function StepRecordsPanel({
23214
23339
  exportWorkflowId,
23215
23340
  stageCatalog,
23216
23341
  approvalByCompanyId,
23342
+ canManage,
23217
23343
  onApprovalChange
23218
23344
  }) {
23219
23345
  const [page, setPage] = useState(1);
@@ -23293,8 +23419,10 @@ function StepRecordsPanel({
23293
23419
  size: "compact-xs",
23294
23420
  variant: approvalByCompanyId[companyId] === "approved" ? "filled" : "light",
23295
23421
  color: "green",
23422
+ disabled: !canManage,
23296
23423
  onClick: (event) => {
23297
23424
  event.stopPropagation();
23425
+ if (!canManage) return;
23298
23426
  setApproval(companyId, "approved");
23299
23427
  },
23300
23428
  children: "Approve"
@@ -23306,8 +23434,10 @@ function StepRecordsPanel({
23306
23434
  size: "compact-xs",
23307
23435
  variant: approvalByCompanyId[companyId] === "rejected" ? "filled" : "light",
23308
23436
  color: "red",
23437
+ disabled: !canManage,
23309
23438
  onClick: (event) => {
23310
23439
  event.stopPropagation();
23440
+ if (!canManage) return;
23311
23441
  setApproval(companyId, "rejected");
23312
23442
  },
23313
23443
  children: "Reject"
@@ -23349,6 +23479,7 @@ function BuildTab({
23349
23479
  optimisticRuns,
23350
23480
  exportWorkflowId,
23351
23481
  stageCatalog,
23482
+ canManage,
23352
23483
  onRunStep,
23353
23484
  onRetryStep,
23354
23485
  onViewRunLog
@@ -23427,7 +23558,7 @@ function BuildTab({
23427
23558
  const selectedExportDisabledReason = !selectedStepIsReviewExport || activeRightColumnTab !== "records" ? null : approvedCompanyIds.length === 0 ? "Approve records" : isSelectedClickUpExportPath && !selectedClickupCredential ? "Select ClickUp credential" : isSelectedClickUpExportPath && !normalizedClickupListId ? "Enter ClickUp List ID" : null;
23428
23559
  const canRunSelectedAction = !!selectedStep?.action && (selectedActionKind === "retry_failed" || selectedActionKind === "run_next_batch");
23429
23560
  const selectedResourceIsRunning = selectedResourceId ? (runningResources[selectedResourceId] ?? false) || runningResourceIds.has(selectedResourceId) : false;
23430
- const selectedActionDisabled = selectedStepIsReviewExport && activeRightColumnTab !== "records" ? false : selectedStepIsReviewExport ? !canExportSelectedRecords || exportExecution.isPending : !canRunSelectedAction || selectedResourceIsRunning;
23561
+ const selectedActionDisabled = !canManage ? true : selectedStepIsReviewExport && activeRightColumnTab !== "records" ? false : selectedStepIsReviewExport ? !canExportSelectedRecords || exportExecution.isPending : !canRunSelectedAction || selectedResourceIsRunning;
23431
23562
  const selectedActionLabel = selectedResourceIsRunning ? "Running..." : selectedStepIsReviewExport && activeRightColumnTab !== "records" ? "Approve records" : selectedStepIsReviewExport ? selectedExportDisabledReason ?? (isSelectedClickUpExportPath ? "Export to ClickUp" : "Export approved") : selectedActionKind === "none" ? "No action" : getStepActionLabel(selectedActionKind);
23432
23563
  const selectedActionIcon = selectedStepIsReviewExport && activeRightColumnTab !== "records" ? /* @__PURE__ */ jsx(IconAddressBook, { size: 14 }) : selectedActionKind === "retry_failed" ? /* @__PURE__ */ jsx(IconRefresh, { size: 14 }) : /* @__PURE__ */ jsx(IconPlayerPlay, { size: 14 });
23433
23564
  const handleResourceRunningChange = useCallback((resourceId, isRunning) => {
@@ -23467,10 +23598,12 @@ function BuildTab({
23467
23598
  setStepInputInitialized(true);
23468
23599
  }, [stepInputInitialized, recentRunsQuery.isLoading, recentRuns, selectedCapabilityKey]);
23469
23600
  const handleStepInputChange = (next) => {
23601
+ if (!canManage) return;
23470
23602
  setStepInputFormState(next);
23471
23603
  if (stepInputError) setStepInputError(null);
23472
23604
  };
23473
23605
  const handleCredentialSelect = (requirement, credential) => {
23606
+ if (!canManage) return;
23474
23607
  setCredentialSelections((current) => ({
23475
23608
  ...current,
23476
23609
  [requirement.key]: credential?.id ?? null
@@ -23479,6 +23612,7 @@ function BuildTab({
23479
23612
  if (stepInputError) setStepInputError(null);
23480
23613
  };
23481
23614
  const handleVerifyCredential = (credential) => {
23615
+ if (!canManage) return;
23482
23616
  verifyCredential.mutate(credential.id, {
23483
23617
  onSuccess: (result) => {
23484
23618
  setCredentialVerificationById((current) => ({
@@ -23503,15 +23637,18 @@ function BuildTab({
23503
23637
  });
23504
23638
  };
23505
23639
  const handleClickupListIdChange = (value) => {
23640
+ if (!canManage) return;
23506
23641
  setClickupListId(value);
23507
23642
  setStepInputFormState((current) => setValueAtInputPath(current, "clickupListId", value));
23508
23643
  if (stepInputError) setStepInputError(null);
23509
23644
  };
23510
23645
  const handleReviewExportApprovalChange = (companyId, status) => {
23646
+ if (!canManage) return;
23511
23647
  setReviewExportApprovals((current) => ({ ...current, [companyId]: status }));
23512
23648
  if (stepInputError) setStepInputError(null);
23513
23649
  };
23514
23650
  const exportApprovedRecords = async () => {
23651
+ if (!canManage) return;
23515
23652
  try {
23516
23653
  const result = await exportExecution.execute({
23517
23654
  input: {
@@ -23534,6 +23671,7 @@ function BuildTab({
23534
23671
  }
23535
23672
  };
23536
23673
  const handleSelectedAction = async () => {
23674
+ if (!canManage) return;
23537
23675
  if (!selectedStep || selectedActionDisabled) return;
23538
23676
  if (selectedStepIsReviewExport && activeRightColumnTab !== "records") {
23539
23677
  setActiveRightColumnTab("records");
@@ -23568,6 +23706,7 @@ function BuildTab({
23568
23706
  }
23569
23707
  };
23570
23708
  const loadRecentRunInput = (run2) => {
23709
+ if (!canManage) return;
23571
23710
  setStepInputFormState(sanitizeStepInput(asRecord2(getRunInput(run2)), selectedCapabilityKey));
23572
23711
  setStepInputResetKey((k) => k + 1);
23573
23712
  setActiveRightColumnTab("configuration");
@@ -23677,7 +23816,7 @@ function BuildTab({
23677
23816
  layout: visibleStepLayout,
23678
23817
  value: stepInputFormState,
23679
23818
  onChange: (v) => handleStepInputChange(asRecord2(v) ?? {}),
23680
- disabled: !canRunSelectedAction
23819
+ disabled: !canManage || !canRunSelectedAction
23681
23820
  },
23682
23821
  `${selectedResourceId ?? "none"}-main-${stepInputResetKey}`
23683
23822
  ) : !credentialRequirements.length ? /* @__PURE__ */ jsx(Text, { size: "xs", c: "dimmed", children: "No configuration for this step." }) : null,
@@ -23691,6 +23830,7 @@ function BuildTab({
23691
23830
  selections: credentialSelections,
23692
23831
  verificationByCredentialId: credentialVerificationById,
23693
23832
  verifyingCredentialId: verifyCredential.isPending ? verifyCredential.variables ?? null : null,
23833
+ disabled: !canManage,
23694
23834
  onSelect: handleCredentialSelect,
23695
23835
  onVerify: handleVerifyCredential
23696
23836
  }
@@ -23702,7 +23842,8 @@ function BuildTab({
23702
23842
  description: "Destination List ID for approved company tasks.",
23703
23843
  placeholder: "123456789",
23704
23844
  value: clickupListId,
23705
- onChange: (event) => handleClickupListIdChange(event.currentTarget.value)
23845
+ onChange: (event) => handleClickupListIdChange(event.currentTarget.value),
23846
+ disabled: !canManage
23706
23847
  }
23707
23848
  ) : null
23708
23849
  ] }),
@@ -23714,7 +23855,7 @@ function BuildTab({
23714
23855
  layout: visibleStepLayout,
23715
23856
  value: stepInputFormState,
23716
23857
  onChange: (v) => handleStepInputChange(asRecord2(v) ?? {}),
23717
- disabled: !canRunSelectedAction
23858
+ disabled: !canManage || !canRunSelectedAction
23718
23859
  },
23719
23860
  `${selectedResourceId ?? "none"}-advanced-${stepInputResetKey}`
23720
23861
  ) : void 0,
@@ -23726,6 +23867,7 @@ function BuildTab({
23726
23867
  exportWorkflowId,
23727
23868
  stageCatalog,
23728
23869
  approvalByCompanyId: reviewExportApprovals,
23870
+ canManage,
23729
23871
  onApprovalChange: handleReviewExportApprovalChange
23730
23872
  },
23731
23873
  selectedStep.id
@@ -23767,7 +23909,7 @@ function BuildTab({
23767
23909
  size: "xs",
23768
23910
  variant: "subtle",
23769
23911
  leftSection: /* @__PURE__ */ jsx(IconSettings, { size: 12 }),
23770
- disabled: !canUseSettings,
23912
+ disabled: !canManage || !canUseSettings,
23771
23913
  onClick: () => loadRecentRunInput(run2),
23772
23914
  children: "Use settings"
23773
23915
  }
@@ -23914,6 +24056,7 @@ function LeadGenListDetailPage({ listId }) {
23914
24056
  const listQuery = useList(listId);
23915
24057
  const progressQuery = useListProgress(listId);
23916
24058
  const executionsQuery = useListExecutions(listId);
24059
+ const canManageLeadGen = useAccess(AccessKeys.leadGenManage);
23917
24060
  const deleteListMutation = useDeleteList();
23918
24061
  const executeAsync = useExecuteAsync();
23919
24062
  const queryClient = useQueryClient();
@@ -23982,6 +24125,7 @@ function LeadGenListDetailPage({ listId }) {
23982
24125
  const buildSteps = buildResolution.steps;
23983
24126
  const recommendedBuildStep = buildResolution.recommendedStep;
23984
24127
  const runStep = async (step, inputAtSubmit) => {
24128
+ if (!canManageLeadGen.allowed) return null;
23985
24129
  const resourceId = step.action?.resourceId;
23986
24130
  if (!resourceId) return null;
23987
24131
  try {
@@ -24018,6 +24162,7 @@ function LeadGenListDetailPage({ listId }) {
24018
24162
  showSuccessNotification("Copied list command to clipboard");
24019
24163
  };
24020
24164
  const handleDeleteList = () => {
24165
+ if (!canManageLeadGen.allowed) return;
24021
24166
  deleteListMutation.mutate(list.id, {
24022
24167
  onSuccess: () => {
24023
24168
  setDeleteModalOpen(false);
@@ -24055,6 +24200,7 @@ function LeadGenListDetailPage({ listId }) {
24055
24200
  color: "red",
24056
24201
  size: "sm",
24057
24202
  "aria-label": "Delete list",
24203
+ disabled: !canManageLeadGen.allowed,
24058
24204
  loading: deleteListMutation.isPending,
24059
24205
  onClick: () => setDeleteModalOpen(true),
24060
24206
  children: /* @__PURE__ */ jsx(IconTrash, { size: 14 })
@@ -24070,7 +24216,15 @@ function LeadGenListDetailPage({ listId }) {
24070
24216
  /* @__PURE__ */ jsx(Tabs.Tab, { value: "build", leftSection: /* @__PURE__ */ jsx(IconBolt, { size: 14 }), children: "Build" }),
24071
24217
  /* @__PURE__ */ jsx(Tabs.Tab, { value: "runs", leftSection: /* @__PURE__ */ jsx(IconPlayerPlay, { size: 14 }), children: "Runs" })
24072
24218
  ] }),
24073
- /* @__PURE__ */ jsx(Tabs.Panel, { value: "overview", pt: "sm", children: /* @__PURE__ */ jsx(OverviewTab, { list, progress: businessProgress, leadGenConfig }) }),
24219
+ /* @__PURE__ */ jsx(Tabs.Panel, { value: "overview", pt: "sm", children: /* @__PURE__ */ jsx(
24220
+ OverviewTab,
24221
+ {
24222
+ list,
24223
+ progress: businessProgress,
24224
+ canManage: canManageLeadGen.allowed,
24225
+ leadGenConfig
24226
+ }
24227
+ ) }),
24074
24228
  /* @__PURE__ */ jsx(Tabs.Panel, { value: "members", pt: "sm", children: /* @__PURE__ */ jsx(
24075
24229
  MembersTab,
24076
24230
  {
@@ -24090,6 +24244,7 @@ function LeadGenListDetailPage({ listId }) {
24090
24244
  optimisticRuns,
24091
24245
  exportWorkflowId: leadGenConfig.exportWorkflowId,
24092
24246
  stageCatalog,
24247
+ canManage: canManageLeadGen.allowed,
24093
24248
  onRunStep: runStep,
24094
24249
  onRetryStep: runStep,
24095
24250
  onViewRunLog: (resourceId, executionId) => {
@@ -24134,7 +24289,16 @@ function LeadGenListDetailPage({ listId }) {
24134
24289
  /* @__PURE__ */ jsx(Text, { size: "sm", c: "dimmed", children: "This removes the list and its list membership links. Companies and contacts remain in the shared lead-gen database." }),
24135
24290
  /* @__PURE__ */ jsxs(Group, { justify: "flex-end", mt: "md", children: [
24136
24291
  /* @__PURE__ */ jsx(Button, { variant: "light", onClick: () => setDeleteModalOpen(false), disabled: deleteListMutation.isPending, children: "Cancel" }),
24137
- /* @__PURE__ */ jsx(Button, { color: "red", loading: deleteListMutation.isPending, onClick: handleDeleteList, children: "Delete" })
24292
+ /* @__PURE__ */ jsx(
24293
+ Button,
24294
+ {
24295
+ color: "red",
24296
+ loading: deleteListMutation.isPending,
24297
+ disabled: !canManageLeadGen.allowed,
24298
+ onClick: handleDeleteList,
24299
+ children: "Delete"
24300
+ }
24301
+ )
24138
24302
  ] })
24139
24303
  ] })
24140
24304
  }
@@ -1,5 +1,5 @@
1
1
  import { useRouterContext } from './chunk-Q7DJKLEN.js';
2
- import { useOptionalElevasisSystems } from './chunk-NYNOMAAS.js';
2
+ import { useOptionalElevasisSystems } from './chunk-C6BDBZRO.js';
3
3
  import { useMemo } from 'react';
4
4
 
5
5
  var useBreadcrumbs = (options = {}) => {
@@ -1,4 +1,4 @@
1
- import { buildOrganizationGraph, projectOrganizationSurfaces, compileOrganizationOntology, SemanticIcon, getSortedSidebarEntries, parseOntologyId, getSystem, resolveSystemConfig } from './chunk-NWMPBG4U.js';
1
+ import { buildOrganizationGraph, projectOrganizationSurfaces, compileOrganizationOntology, SemanticIcon, getSortedSidebarEntries, parseOntologyId, getSystem, resolveSystemConfig } from './chunk-566XWGPP.js';
2
2
  import { useMemo, useState, useRef, useEffect } from 'react';
3
3
  import { useTree, Text, Tree, UnstyledButton, Group, TextInput } from '@mantine/core';
4
4
  import { useClipboard } from '@mantine/hooks';
@@ -1,12 +1,13 @@
1
- import { mantineThemeOverride, createCssVariablesResolver, PresetsProvider } from './chunk-CWYQRM5T.js';
1
+ import { mantineThemeOverride, createCssVariablesResolver } from './chunk-7ZWXTH5J.js';
2
+ import { PresetsProvider } from './chunk-6D4LCJ52.js';
2
3
  import { PRESETS, getPreset, generateShades } from './chunk-WF7CONXF.js';
3
4
  import { AppBackground } from './chunk-WLOQ4IBG.js';
4
- import { ElevasisCoreProvider } from './chunk-JZ2WID2G.js';
5
+ import { ElevasisCoreProvider } from './chunk-H2MEFUQD.js';
5
6
  import { ElevasisLoader } from './chunk-I53EX4VU.js';
6
7
  import { AppearanceProvider } from './chunk-A7IG36LB.js';
7
8
  import { getErrorInfo, formatErrorMessage, getErrorTitle } from './chunk-X66MVMZT.js';
8
- import { useElevasisSystems, ElevasisSystemsProvider } from './chunk-NYNOMAAS.js';
9
- import { resolveOrganizationModel } from './chunk-NWMPBG4U.js';
9
+ import { useElevasisSystems, ElevasisSystemsProvider } from './chunk-C6BDBZRO.js';
10
+ import { resolveOrganizationModel } from './chunk-566XWGPP.js';
10
11
  import { useMemo, useEffect } from 'react';
11
12
  import { Loader, mergeThemeOverrides, MantineProvider } from '@mantine/core';
12
13
  import '@mantine/core/styles.css';