@elevasis/ui 2.79.0 → 2.81.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 (108) hide show
  1. package/dist/{CoreAuthKitInner-PSTKG4B3.js → CoreAuthKitInner-5J7P7ZDL.js} +1 -1
  2. package/dist/api/index.js +6 -6
  3. package/dist/app/index.d.ts +1 -15
  4. package/dist/app/index.js +18 -18
  5. package/dist/auth/index.js +10 -10
  6. package/dist/charts/index.d.ts +4 -4
  7. package/dist/charts/index.js +10 -10
  8. package/dist/{chunk-NCPNKI3V.js → chunk-2HXDI4RY.js} +1 -1
  9. package/dist/{chunk-TVTSASST.js → chunk-34B3ACOZ.js} +9 -1
  10. package/dist/{chunk-AZCDL2SS.js → chunk-3ZADOARU.js} +5 -5
  11. package/dist/{chunk-2IU6BP6F.js → chunk-42C2WVYU.js} +11 -10
  12. package/dist/{chunk-3ONNZ4SO.js → chunk-52AZTFUR.js} +6 -6
  13. package/dist/{chunk-MGCXAAX4.js → chunk-5GYJ3IDO.js} +15 -9
  14. package/dist/{chunk-SJRIO26Q.js → chunk-6J3SCCZ2.js} +2 -2
  15. package/dist/{chunk-A37T4NIZ.js → chunk-6YWBMLEM.js} +22 -11
  16. package/dist/{chunk-GWCLI2RX.js → chunk-75OLN23F.js} +22 -39
  17. package/dist/{chunk-LDQSTEFW.js → chunk-7D4FKBB4.js} +38 -14
  18. package/dist/{chunk-JZQNUQE4.js → chunk-7RS2NUC6.js} +10 -2
  19. package/dist/{chunk-7ICEQPBU.js → chunk-AI5OYVLR.js} +1 -1
  20. package/dist/{chunk-G3WOMHVI.js → chunk-BLYK6I4D.js} +4 -3
  21. package/dist/{chunk-5ZK7K7YP.js → chunk-DEZW7QDI.js} +38 -25
  22. package/dist/{chunk-QLEY6Q7K.js → chunk-FPRDEKFY.js} +1 -1
  23. package/dist/{chunk-SVZR4GYA.js → chunk-G6VHIXWD.js} +1 -1
  24. package/dist/{chunk-VM2OWOXL.js → chunk-GY7FXTC4.js} +2 -3
  25. package/dist/{chunk-GFSOQH3N.js → chunk-HDITVHZT.js} +8 -11
  26. package/dist/{chunk-ASI3FDPC.js → chunk-HDLYC63N.js} +1 -1
  27. package/dist/{chunk-2GIJBHZT.js → chunk-IIMC4TRH.js} +3 -3
  28. package/dist/{chunk-22TWX4XG.js → chunk-ILOKKA6L.js} +8 -8
  29. package/dist/{chunk-4ZHX5KOT.js → chunk-JLKZUO2I.js} +1 -1
  30. package/dist/{chunk-WJO6QEI7.js → chunk-K635QVGI.js} +33 -78
  31. package/dist/{chunk-R42OYAQ2.js → chunk-KU7KN5VN.js} +1 -1
  32. package/dist/{chunk-6AJUWYKS.js → chunk-LGJASP5H.js} +1 -1
  33. package/dist/{chunk-4IYWLUXA.js → chunk-LTKBVL7D.js} +14 -10
  34. package/dist/{chunk-INCEZAM3.js → chunk-LTRJZOHA.js} +1 -1
  35. package/dist/{chunk-RMLWK3IR.js → chunk-O4XUKLRY.js} +1 -1
  36. package/dist/{chunk-3RK2NNJX.js → chunk-PJN6CMWZ.js} +1 -1
  37. package/dist/{chunk-KXNRTJAE.js → chunk-PNCJJE4Z.js} +1 -1
  38. package/dist/{chunk-4VGPEDQF.js → chunk-PSGSFPWA.js} +126 -69
  39. package/dist/{chunk-QMAIUPXK.js → chunk-QEQXPWOK.js} +23 -231
  40. package/dist/{chunk-M77G2MGW.js → chunk-QFKOHZM3.js} +3 -3
  41. package/dist/{chunk-P6HHXMLJ.js → chunk-ROC2TFPS.js} +10 -9
  42. package/dist/{chunk-QMOBXKW3.js → chunk-SHJYK2X4.js} +222 -191
  43. package/dist/{chunk-ODXLZZFR.js → chunk-SOBKRB4N.js} +1 -1
  44. package/dist/{chunk-SXZMHLH6.js → chunk-SWC54W3A.js} +4 -4
  45. package/dist/{chunk-G4IEH7NX.js → chunk-TLMNBOAG.js} +5 -5
  46. package/dist/{chunk-N6K2Q5BM.js → chunk-WDABHUIL.js} +9 -21
  47. package/dist/{chunk-3KCLWJDC.js → chunk-XUL4UBYJ.js} +22 -11
  48. package/dist/{chunk-UD657ICS.js → chunk-YJ437RDY.js} +29 -16
  49. package/dist/components/index.d.ts +18 -20
  50. package/dist/components/index.js +48 -48
  51. package/dist/components/navigation/index.js +11 -11
  52. package/dist/execution/index.js +2 -2
  53. package/dist/features/auth/index.d.ts +1 -1
  54. package/dist/features/auth/index.js +12 -12
  55. package/dist/features/clients/index.js +14 -15
  56. package/dist/features/content/index.js +13 -13
  57. package/dist/features/crm/index.d.ts +0 -14
  58. package/dist/features/crm/index.js +16 -16
  59. package/dist/features/dashboard/index.d.ts +8 -8
  60. package/dist/features/dashboard/index.js +13 -13
  61. package/dist/features/delivery/index.d.ts +0 -14
  62. package/dist/features/delivery/index.js +25 -25
  63. package/dist/features/knowledge/index.js +10 -10
  64. package/dist/features/lead-gen/index.d.ts +103 -48
  65. package/dist/features/lead-gen/index.js +17 -17
  66. package/dist/features/monitoring/index.d.ts +10 -10
  67. package/dist/features/monitoring/index.js +15 -15
  68. package/dist/features/monitoring/requests/index.js +12 -12
  69. package/dist/features/notes/index.js +1 -1
  70. package/dist/features/operations/index.d.ts +12 -12
  71. package/dist/features/operations/index.js +18 -18
  72. package/dist/features/public-agent-chat/index.js +4 -4
  73. package/dist/features/seo/index.d.ts +105 -17
  74. package/dist/features/seo/index.js +13 -13
  75. package/dist/features/settings/index.d.ts +1 -1
  76. package/dist/features/settings/index.js +13 -13
  77. package/dist/hooks/access/index.d.ts +60 -1
  78. package/dist/hooks/access/index.js +10 -10
  79. package/dist/hooks/delivery/index.d.ts +0 -14
  80. package/dist/hooks/delivery/index.js +6 -6
  81. package/dist/hooks/published.d.ts +286 -107
  82. package/dist/hooks/published.js +23 -23
  83. package/dist/hooks/user-notes/index.js +1 -1
  84. package/dist/initialization/index.d.ts +13 -1
  85. package/dist/initialization/index.js +1 -1
  86. package/dist/knowledge/index.d.ts +1 -1
  87. package/dist/knowledge/index.js +93 -91
  88. package/dist/{knowledge-search-index-6GQK55IQ.js → knowledge-search-index-UPKXCXQP.js} +91 -91
  89. package/dist/layout/index.js +14 -14
  90. package/dist/organization/index.d.ts +17 -1
  91. package/dist/organization/index.js +2 -2
  92. package/dist/profile/index.d.ts +1 -1
  93. package/dist/profile/index.js +1 -1
  94. package/dist/provider/ElevasisServiceContext.js +1 -1
  95. package/dist/provider/index.d.ts +0 -14
  96. package/dist/provider/index.js +10 -10
  97. package/dist/provider/published.d.ts +0 -14
  98. package/dist/provider/published.js +10 -10
  99. package/dist/sse/index.d.ts +7 -1
  100. package/dist/sse/index.js +36 -2
  101. package/dist/test-utils/index.d.ts +3 -1
  102. package/dist/test-utils/index.js +32 -9
  103. package/dist/types/index.d.ts +13 -15
  104. package/dist/utils/index.d.ts +25 -7
  105. package/dist/utils/index.js +4 -4
  106. package/package.json +24 -14
  107. /package/dist/{chunk-Y6I3IC45.js → chunk-6XBZPKMI.js} +0 -0
  108. /package/dist/{chunk-5F3QGBEI.js → chunk-7ZUXA2NW.js} +0 -0
@@ -1,31 +1,31 @@
1
- import { SubshellLoader } from './chunk-4ZHX5KOT.js';
2
- import { CollapsibleJsonSection, ExecutionStats, UnifiedWorkflowGraph, WorkflowExecutionTimeline, AgentExecutionVisualizer, AgentExecutionTimeline, AgentIterationDetailPanel } from './chunk-3KCLWJDC.js';
3
- import { useCommandViewData, useCommandViewStats, useCommandViewStore, useResourceExecutions, useCheckpointTasks, useSessionMessages, useSessionWebSocket, useSessionExecutions } from './chunk-SXZMHLH6.js';
4
- import { findNavigationSurfaceForSystem, getSystemApiInterfaceReadiness } from './chunk-3RK2NNJX.js';
1
+ import { SubshellLoader } from './chunk-JLKZUO2I.js';
2
+ import { CollapsibleJsonSection, ExecutionStats, UnifiedWorkflowGraph, WorkflowExecutionTimeline, AgentExecutionVisualizer, AgentExecutionTimeline, AgentIterationDetailPanel } from './chunk-XUL4UBYJ.js';
3
+ import { useCommandViewData, useCommandViewStats, useCommandViewStore, useResourceExecutions, useCheckpointTasks, useSessionMessages, useSessionWebSocket, useSessionExecutions } from './chunk-SWC54W3A.js';
4
+ import { findNavigationSurfaceForSystem, getSystemApiInterfaceReadiness } from './chunk-PJN6CMWZ.js';
5
5
  import { FormFieldRenderer } from './chunk-3MEXPLWT.js';
6
6
  import { ChatInterface, ChatHeader } from './chunk-SNZDFCOQ.js';
7
7
  import { mergeSessionMessages } from './chunk-QFGNRKIE.js';
8
- import { ResourceHealthPanel } from './chunk-G3WOMHVI.js';
9
- import { AppShellLoader } from './chunk-6AJUWYKS.js';
8
+ import { ResourceHealthPanel } from './chunk-BLYK6I4D.js';
9
+ import { AppShellLoader } from './chunk-LGJASP5H.js';
10
10
  import { Graph_module_css_default } from './chunk-HENXLGVD.js';
11
11
  import { PageContainer } from './chunk-BZZCNLT6.js';
12
- import { DEFAULT_ORGANIZATION_GRAPH_FILTERS, resolveSemanticIconComponent, CustomModal, useAppearance, useErrorDetail, JsonViewer, useExecution, useArchivedLogs, useDeleteExecution, useRetryExecution, useCancelExecution, ConfirmationModal, PageTitleCaption, CollapsibleSection, useStatusFilter, useResourceSearch, useResourcesDomainFilters, usePaginationState, useResources, useRecentExecutionsByResource, filterByDomainFilters, TabCountBadge, ResourceCard, useResourceDefinition, isSessionCapable, useOptionalElevasisSystems, useDeleteTask, useCommandQueue, useSubmitAction, useCommandQueueTask, ContextViewer, useElevasisSystems, buildOrganizationGraph, EmptyState, useExecutionPanelState, useSessions, SessionListItem, useDeleteSession, useEndSession, useCreateSession, topbarHeight, useSession, getSessionView, SubshellContentContainer, ORGANIZATION_NODE_ID, collectResourceFilterFacets, SemanticIcon, useSystemsViewState, aggregateSystemMetrics, useSystemHealth, ORGANIZATION_GRAPH_NODE_KIND_ORDER, formatResourceAttribution, SYSTEM_RESOURCE_KINDS, 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-4VGPEDQF.js';
13
- import { showApiErrorNotification, showSuccessNotification } from './chunk-KXNRTJAE.js';
12
+ import { DEFAULT_ORGANIZATION_GRAPH_FILTERS, resolveSemanticIconComponent, CustomModal, useAppearance, useErrorDetail, JsonViewer, useExecution, useArchivedLogs, useDeleteExecution, useRetryExecution, useCancelExecution, ConfirmationModal, PageTitleCaption, CollapsibleSection, useResolvedTimeRange, useStatusFilter, useResourceSearch, useResourcesDomainFilters, usePaginationState, useResources, useRecentExecutionsByResource, filterByDomainFilters, TabCountBadge, ResourceCard, useResourceDefinition, isSessionCapable, useOptionalElevasisSystems, useDeleteTask, useCommandQueue, useSubmitAction, useCommandQueueTask, ContextViewer, useElevasisSystems, buildOrganizationGraph, EmptyState, useExecutionPanelState, useSessions, SessionListItem, useDeleteSession, useEndSession, useCreateSession, topbarHeight, useSession, getSessionView, SubshellContentContainer, ORGANIZATION_NODE_ID, collectResourceFilterFacets, SemanticIcon, useSystemsViewState, aggregateSystemMetrics, useSystemHealth, ORGANIZATION_GRAPH_NODE_KIND_ORDER, formatResourceAttribution, SYSTEM_RESOURCE_KINDS, 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-PSGSFPWA.js';
13
+ import { showApiErrorNotification, showSuccessNotification } from './chunk-PNCJJE4Z.js';
14
14
  import { CardHeader } from './chunk-62GVNH5U.js';
15
15
  import { useInitialization } from './chunk-P45GQ3ZW.js';
16
16
  import { StyledMarkdown } from './chunk-3KMDHCAR.js';
17
- import { getResourceStatusColor, useMergedExecution, useTimelineData, useAgentIterationData } from './chunk-NCPNKI3V.js';
17
+ import { getResourceStatusColor, useMergedExecution, useTimelineData, useAgentIterationData } from './chunk-2HXDI4RY.js';
18
18
  import { useOrganization } from './chunk-DD3CCMCZ.js';
19
- import { getErrorInfo, formatErrorMessage, getResourceIcon, formatRelativeTime, PAGE_SIZE_DEFAULT, listAllSystems, getSystem, compileOrganizationOntology, getSystemAncestors } from './chunk-5ZK7K7YP.js';
20
- import { ResourceStatusColors, toWorkflowLogMessages } from './chunk-5F3QGBEI.js';
19
+ import { getErrorInfo, formatErrorMessage, getResourceIcon, formatRelativeTime, PAGE_SIZE_DEFAULT, listAllSystems, getSystem, compileOrganizationOntology, getSystemAncestors } from './chunk-DEZW7QDI.js';
20
+ import { ResourceStatusColors, toWorkflowLogMessages } from './chunk-7ZUXA2NW.js';
21
21
  import { useElevasisServices } from './chunk-BI5VDO2K.js';
22
22
  import { useRouterContext } from './chunk-Q7DJKLEN.js';
23
23
  import { Stack, Title, Text, Textarea, Alert, Group, Button, Card, ThemeIcon, Badge, SimpleGrid, Collapse, Divider, Paper, ActionIcon, Space, CopyButton, Center, Tooltip, Code, Menu, Progress, Tabs, Pagination, Loader, SegmentedControl, Box, Select, useMantineTheme, Modal, LoadingOverlay, ScrollArea, Switch, Breadcrumbs, Anchor, Checkbox, UnstyledButton, NumberInput, MultiSelect, TextInput, Accordion, Table } from '@mantine/core';
24
- import { IconMail, IconSend, IconFileText, IconClock, IconArrowUp, IconMessageCircle, IconRocket, IconEye, IconEdit, IconAlertTriangle, IconRefresh, IconX, IconCheck, IconAlertCircle, IconTool, IconSettings, IconCpu, IconClockHour4, IconVersions, IconBrain, IconChevronRight, IconSitemap, IconCopy, IconPlayerStop, IconReload, IconTrash, IconTerminal2, IconBug, IconChevronDown, IconPlayerPlay, IconMessage, IconArrowLeft, IconRobot, IconGitBranch, IconDotsVertical, IconDatabase, IconApps, IconRoute, IconExternalLink, IconFolders, IconBraces, IconBolt, IconTopologyStar3, IconInfoCircle, IconPlus, IconTimeline, IconNote, IconArchive, IconDownload, IconActivityHeartbeat, IconCircleCheck, IconClockPause, IconArrowsMaximize, IconCircleX, IconCircleDashed, IconShare2, IconFolder, IconSearch, IconBookmark, IconBookmarkPlus, IconArrowRight, IconScript, IconPlugConnected } from '@tabler/icons-react';
24
+ import { IconMail, IconSend, IconFileText, IconClock, IconArrowUp, IconMessageCircle, IconRocket, IconEye, IconEdit, IconAlertTriangle, IconRefresh, IconX, IconCheck, IconAlertCircle, IconTool, IconSettings, IconCpu, IconClockHour4, IconVersions, IconBrain, IconChevronRight, IconSitemap, IconCopy, IconPlayerStop, IconReload, IconTrash, IconTerminal2, IconBug, IconChevronDown, IconPlayerPlay, IconMessage, IconArrowLeft, IconRobot, IconGitBranch, IconDotsVertical, IconDatabase, IconApps, IconRoute, IconExternalLink, IconFolders, IconBraces, IconBolt, IconTopologyStar3, IconInfoCircle, IconPlus, IconTimeline, IconNote, IconArchive, IconDownload, IconActivityHeartbeat, IconCircleCheck, IconClockPause, IconArrowsMaximize, IconCircleX, IconCircleDashed, IconShare2, IconFolder, IconSearch, IconArrowRight, IconScript, IconPlugConnected } from '@tabler/icons-react';
25
25
  import { useForm } from '@mantine/form';
26
26
  import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
27
27
  import { useState, useMemo, useRef, useCallback, useEffect, useDeferredValue, useEffectEvent } from 'react';
28
- import { useClipboard, useDisclosure } from '@mantine/hooks';
28
+ import { useClipboard } from '@mantine/hooks';
29
29
  import { notifications } from '@mantine/notifications';
30
30
  import { useNavigate } from '@tanstack/react-router';
31
31
  import { useQueryClient, useQuery, useMutation } from '@tanstack/react-query';
@@ -1698,10 +1698,11 @@ function SessionMemory({ memory }) {
1698
1698
  function ResourcesPage({
1699
1699
  initialFilter,
1700
1700
  onTypeChange,
1701
- timeRange,
1701
+ timeRange: timeRangeProp,
1702
1702
  onResourceClick,
1703
1703
  pageSize = 20
1704
1704
  }) {
1705
+ const timeRange = useResolvedTimeRange(timeRangeProp);
1705
1706
  const { organizationReady } = useInitialization();
1706
1707
  const urlType = initialFilter;
1707
1708
  const [selectedFilter, setSelectedFilter] = useState(urlType || "all");
@@ -1996,13 +1997,14 @@ function AgentPublicAccessControls({ resourceId }) {
1996
1997
  function ResourceDetailPage({
1997
1998
  type,
1998
1999
  resourceId,
1999
- timeRange,
2000
+ timeRange: timeRangeProp,
2000
2001
  renderExecutionPanel,
2001
2002
  renderExecuteDialog,
2002
2003
  onNavigateToResources,
2003
2004
  onNavigateToSessions,
2004
2005
  onNavigateBack
2005
2006
  }) {
2007
+ const timeRange = useResolvedTimeRange(timeRangeProp);
2006
2008
  const { organizationReady } = useInitialization();
2007
2009
  const { data, isLoading, error } = useResources();
2008
2010
  const [connected, setConnected] = useState(false);
@@ -7621,203 +7623,6 @@ function expandAroundGraph(graph, request, options = {}) {
7621
7623
  message: summaryMessages[0] ?? ""
7622
7624
  };
7623
7625
  }
7624
- var expansionRecipeKeys = {
7625
- all: ["expansion-recipes"],
7626
- lists: () => [...expansionRecipeKeys.all, "list"],
7627
- list: (orgId) => [...expansionRecipeKeys.all, "list", orgId]
7628
- };
7629
- function useSavedExpansionRecipes() {
7630
- const { apiRequest, isReady, workOSOrganizationId } = useElevasisServices();
7631
- return useQuery({
7632
- queryKey: expansionRecipeKeys.list(workOSOrganizationId),
7633
- queryFn: async () => {
7634
- const data = await apiRequest("/command-view/expansion-recipes");
7635
- return data;
7636
- },
7637
- enabled: isReady
7638
- });
7639
- }
7640
- function useCreateSavedRecipe() {
7641
- const { apiRequest, workOSOrganizationId } = useElevasisServices();
7642
- const queryClient = useQueryClient();
7643
- return useMutation({
7644
- mutationFn: async (body) => {
7645
- const data = await apiRequest("/command-view/expansion-recipes", {
7646
- method: "POST",
7647
- body: JSON.stringify(body)
7648
- });
7649
- return data;
7650
- },
7651
- onSuccess: () => {
7652
- queryClient.invalidateQueries({ queryKey: expansionRecipeKeys.list(workOSOrganizationId) });
7653
- },
7654
- onError: (error) => {
7655
- showApiErrorNotification(error);
7656
- }
7657
- });
7658
- }
7659
- function useDeleteSavedRecipe() {
7660
- const { apiRequest, workOSOrganizationId } = useElevasisServices();
7661
- const queryClient = useQueryClient();
7662
- return useMutation({
7663
- mutationFn: async (id) => {
7664
- await apiRequest(`/command-view/expansion-recipes/${id}`, {
7665
- method: "DELETE"
7666
- });
7667
- },
7668
- onSuccess: () => {
7669
- queryClient.invalidateQueries({ queryKey: expansionRecipeKeys.list(workOSOrganizationId) });
7670
- },
7671
- onError: (error) => {
7672
- showApiErrorNotification(error);
7673
- }
7674
- });
7675
- }
7676
- var MIN_NAME_LENGTH = 1;
7677
- var MAX_NAME_LENGTH = 80;
7678
- function validateRecipeName(name) {
7679
- const trimmed = name.trim();
7680
- if (trimmed.length < MIN_NAME_LENGTH) {
7681
- return "Recipe name is required.";
7682
- }
7683
- if (trimmed.length > MAX_NAME_LENGTH) {
7684
- return `Recipe name must be at most ${MAX_NAME_LENGTH} characters.`;
7685
- }
7686
- return null;
7687
- }
7688
- var BUILT_IN_PRESETS = [
7689
- { value: "coverage", label: "Coverage" },
7690
- { value: "operational-dependencies", label: "Operational dependencies" },
7691
- { value: "org-context", label: "Org context" },
7692
- { value: "impact-path", label: "Impact path" }
7693
- ];
7694
- function SavedRecipesMenu({ currentValue, hasSelectedNode, onLoadPreset, onLoadRecipe }) {
7695
- const { data: savedRecipes, isLoading } = useSavedExpansionRecipes();
7696
- const createMutation = useCreateSavedRecipe();
7697
- const deleteMutation = useDeleteSavedRecipe();
7698
- const [saveModalOpened, { open: openSaveModal, close: closeSaveModal }] = useDisclosure(false);
7699
- const [recipeName, setRecipeName] = useState("");
7700
- const [nameError, setNameError] = useState(null);
7701
- function handleSaveClick() {
7702
- setRecipeName("");
7703
- setNameError(null);
7704
- openSaveModal();
7705
- }
7706
- async function handleSaveConfirm() {
7707
- const error = validateRecipeName(recipeName);
7708
- if (error) {
7709
- setNameError(error);
7710
- return;
7711
- }
7712
- await createMutation.mutateAsync({
7713
- name: recipeName.trim(),
7714
- recipe: currentValue
7715
- });
7716
- closeSaveModal();
7717
- setRecipeName("");
7718
- setNameError(null);
7719
- }
7720
- function handleLoadRecipe(recipe) {
7721
- const value = recipe.recipe;
7722
- onLoadRecipe(value);
7723
- }
7724
- function handleDeleteRecipe(id, event) {
7725
- event.stopPropagation();
7726
- deleteMutation.mutate(id);
7727
- }
7728
- return /* @__PURE__ */ jsxs(Fragment, { children: [
7729
- /* @__PURE__ */ jsxs(Menu, { shadow: "md", width: 260, position: "bottom-start", transitionProps: { duration: 0 }, children: [
7730
- /* @__PURE__ */ jsx(Menu.Target, { children: /* @__PURE__ */ jsx(Button, { size: "xs", variant: "light", rightSection: /* @__PURE__ */ jsx(IconChevronDown, { size: 12 }), children: "Recipes" }) }),
7731
- /* @__PURE__ */ jsxs(Menu.Dropdown, { children: [
7732
- /* @__PURE__ */ jsx(Menu.Label, { children: "Built-in" }),
7733
- BUILT_IN_PRESETS.map((preset) => /* @__PURE__ */ jsx(
7734
- Menu.Item,
7735
- {
7736
- leftSection: /* @__PURE__ */ jsx(IconBookmark, { size: 14 }),
7737
- onClick: () => onLoadPreset(preset.value),
7738
- children: preset.label
7739
- },
7740
- preset.value
7741
- )),
7742
- /* @__PURE__ */ jsx(Menu.Divider, {}),
7743
- /* @__PURE__ */ jsx(Menu.Label, { children: /* @__PURE__ */ jsxs(Group, { justify: "space-between", gap: "xs", children: [
7744
- /* @__PURE__ */ jsx("span", { children: "Saved" }),
7745
- /* @__PURE__ */ jsx(Tooltip, { label: "Save current configuration", position: "right", withArrow: true, children: /* @__PURE__ */ jsx(
7746
- ActionIcon,
7747
- {
7748
- size: "xs",
7749
- variant: "subtle",
7750
- disabled: !hasSelectedNode,
7751
- onClick: (e) => {
7752
- e.stopPropagation();
7753
- handleSaveClick();
7754
- },
7755
- "aria-label": "Save current recipe",
7756
- children: /* @__PURE__ */ jsx(IconBookmarkPlus, { size: 12 })
7757
- }
7758
- ) })
7759
- ] }) }),
7760
- isLoading ? /* @__PURE__ */ jsx(Menu.Item, { disabled: true, children: /* @__PURE__ */ jsxs(Group, { gap: "xs", children: [
7761
- /* @__PURE__ */ jsx(Loader, { size: "xs" }),
7762
- /* @__PURE__ */ jsx(Text, { size: "xs", c: "dimmed", children: "Loading\u2026" })
7763
- ] }) }) : !savedRecipes || savedRecipes.length === 0 ? /* @__PURE__ */ jsx(Menu.Item, { disabled: true, children: /* @__PURE__ */ jsx(Text, { size: "xs", c: "dimmed", children: "No saved recipes yet" }) }) : savedRecipes.map((recipe) => /* @__PURE__ */ jsx(
7764
- Menu.Item,
7765
- {
7766
- leftSection: /* @__PURE__ */ jsx(IconBookmark, { size: 14 }),
7767
- rightSection: /* @__PURE__ */ jsx(
7768
- ActionIcon,
7769
- {
7770
- size: "xs",
7771
- variant: "subtle",
7772
- color: "red",
7773
- onClick: (e) => handleDeleteRecipe(recipe.id, e),
7774
- loading: deleteMutation.isPending && deleteMutation.variables === recipe.id,
7775
- "aria-label": `Delete recipe ${recipe.name}`,
7776
- children: /* @__PURE__ */ jsx(IconTrash, { size: 12 })
7777
- }
7778
- ),
7779
- onClick: () => handleLoadRecipe(recipe),
7780
- children: /* @__PURE__ */ jsx(Text, { size: "sm", truncate: true, children: recipe.name })
7781
- },
7782
- recipe.id
7783
- )),
7784
- /* @__PURE__ */ jsx(Menu.Item, { leftSection: /* @__PURE__ */ jsx(IconBookmarkPlus, { size: 14 }), disabled: !hasSelectedNode, onClick: handleSaveClick, children: "Save current configuration\u2026" })
7785
- ] })
7786
- ] }),
7787
- /* @__PURE__ */ jsx(
7788
- Modal,
7789
- {
7790
- opened: saveModalOpened,
7791
- onClose: closeSaveModal,
7792
- title: "Save recipe",
7793
- size: "sm",
7794
- withinPortal: false,
7795
- transitionProps: { duration: 0 },
7796
- children: /* @__PURE__ */ jsxs(Stack, { gap: "md", children: [
7797
- /* @__PURE__ */ jsx(
7798
- TextInput,
7799
- {
7800
- label: "Recipe name",
7801
- placeholder: "e.g. Billing service deps",
7802
- value: recipeName,
7803
- onChange: (e) => {
7804
- setRecipeName(e.currentTarget.value);
7805
- if (nameError) setNameError(null);
7806
- },
7807
- error: nameError,
7808
- maxLength: MAX_NAME_LENGTH,
7809
- "data-autofocus": true
7810
- }
7811
- ),
7812
- /* @__PURE__ */ jsxs(Group, { justify: "flex-end", gap: "xs", children: [
7813
- /* @__PURE__ */ jsx(Button, { variant: "subtle", onClick: closeSaveModal, disabled: createMutation.isPending, children: "Cancel" }),
7814
- /* @__PURE__ */ jsx(Button, { onClick: handleSaveConfirm, loading: createMutation.isPending, children: "Save" })
7815
- ] })
7816
- ] })
7817
- }
7818
- )
7819
- ] });
7820
- }
7821
7626
  var PRESET_OPTIONS = [
7822
7627
  { value: "coverage", label: "Coverage" },
7823
7628
  { value: "operational-dependencies", label: "Operational dependencies" },
@@ -7879,31 +7684,18 @@ function ExpandAroundPanel({
7879
7684
  const disabled = !selectedNode;
7880
7685
  const canApply = Boolean(result && result.expandedNodeIds.length > 0);
7881
7686
  const rootIsTooBroad = selectedNode?.kind === "organization" && !value.preset;
7882
- const handleLoadPreset = (preset) => updateValue(value, "preset", preset, onChange);
7883
- const handleLoadRecipe = (recipeValue) => onChange(recipeValue);
7884
7687
  return /* @__PURE__ */ jsx(Paper, { withBorder: true, radius: "md", p: "sm", children: /* @__PURE__ */ jsxs(Stack, { gap: "sm", children: [
7885
7688
  /* @__PURE__ */ jsxs(Group, { justify: "space-between", align: "flex-start", wrap: "wrap", children: [
7886
7689
  /* @__PURE__ */ jsxs(Stack, { gap: 2, children: [
7887
7690
  /* @__PURE__ */ jsx(Text, { size: "sm", fw: 800, children: "Expand Around" }),
7888
7691
  /* @__PURE__ */ jsx(Text, { size: "xs", c: "dimmed", children: selectedNode ? `Preview typed graph context around ${selectedNode.label}.` : "Select a graph node to preview nearby operational context." })
7889
7692
  ] }),
7890
- /* @__PURE__ */ jsxs(Group, { gap: "xs", wrap: "wrap", children: [
7891
- /* @__PURE__ */ jsx(
7892
- SavedRecipesMenu,
7893
- {
7894
- currentValue: value,
7895
- hasSelectedNode: !disabled,
7896
- onLoadPreset: handleLoadPreset,
7897
- onLoadRecipe: handleLoadRecipe
7898
- }
7899
- ),
7900
- appliedNodeCount > 0 || appliedEdgeCount > 0 ? /* @__PURE__ */ jsxs(Badge, { variant: "light", color: "blue", children: [
7901
- appliedNodeCount,
7902
- " nodes / ",
7903
- appliedEdgeCount,
7904
- " edges applied"
7905
- ] }) : null
7906
- ] })
7693
+ /* @__PURE__ */ jsx(Group, { gap: "xs", wrap: "wrap", children: appliedNodeCount > 0 || appliedEdgeCount > 0 ? /* @__PURE__ */ jsxs(Badge, { variant: "light", color: "blue", children: [
7694
+ appliedNodeCount,
7695
+ " nodes / ",
7696
+ appliedEdgeCount,
7697
+ " edges applied"
7698
+ ] }) : null })
7907
7699
  ] }),
7908
7700
  /* @__PURE__ */ jsxs(SimpleGrid, { cols: { base: 1, sm: 2 }, spacing: "sm", children: [
7909
7701
  /* @__PURE__ */ jsx(
@@ -1,6 +1,6 @@
1
- import { dealKeys } from './chunk-4VGPEDQF.js';
2
- import { showApiErrorNotification } from './chunk-KXNRTJAE.js';
3
- import { APIClientError } from './chunk-5ZK7K7YP.js';
1
+ import { dealKeys } from './chunk-PSGSFPWA.js';
2
+ import { showApiErrorNotification } from './chunk-PNCJJE4Z.js';
3
+ import { APIClientError } from './chunk-DEZW7QDI.js';
4
4
  import { useElevasisServices } from './chunk-BI5VDO2K.js';
5
5
  import { useQuery, useQueryClient, useMutation } from '@tanstack/react-query';
6
6
 
@@ -1,4 +1,5 @@
1
- import { showApiErrorNotification } from './chunk-KXNRTJAE.js';
1
+ import { showApiErrorNotification } from './chunk-PNCJJE4Z.js';
2
+ import { buildQueryString } from './chunk-DEZW7QDI.js';
2
3
  import { useElevasisServices } from './chunk-BI5VDO2K.js';
3
4
  import { useQuery, useQueryClient, useMutation } from '@tanstack/react-query';
4
5
 
@@ -18,14 +19,14 @@ function useClients(filters = {}) {
18
19
  queryKey: clientsKeys.list(workOSOrganizationId ?? void 0, filters),
19
20
  queryFn: async () => {
20
21
  const { status, source, search, limit, offset } = filters;
21
- const params = new URLSearchParams();
22
- if (status) params.set("status", status);
23
- if (source) params.set("source", source);
24
- if (search) params.set("search", search);
25
- if (limit !== void 0) params.set("limit", String(limit));
26
- if (offset !== void 0) params.set("offset", String(offset));
27
- const query = params.toString();
28
- return apiRequest(`/clients${query ? "?" + query : ""}`);
22
+ const query = buildQueryString({
23
+ status: status || void 0,
24
+ source: source || void 0,
25
+ search: search || void 0,
26
+ limit,
27
+ offset
28
+ });
29
+ return apiRequest(`/clients${query}`);
29
30
  },
30
31
  enabled: isReady
31
32
  });