@elevasis/ui 2.25.4 → 2.25.6
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.
- package/dist/app/index.css +2 -6
- package/dist/app/index.d.ts +63 -56
- package/dist/app/index.js +3 -2
- package/dist/charts/index.js +1 -1
- package/dist/chunk-5RLYII6P.js +314 -0
- package/dist/chunk-6U7AIIHF.js +880 -0
- package/dist/{chunk-5O5VC4HB.js → chunk-7F3IQMLI.js} +1 -1
- package/dist/{chunk-ZBRRVDYJ.js → chunk-ARJPZ66V.js} +42 -760
- package/dist/{chunk-IS53MXE4.js → chunk-BDKM56TP.js} +1 -1
- package/dist/{chunk-FVXM2MN6.js → chunk-C7IBFI5B.js} +1 -1
- package/dist/{chunk-DUUH3CHC.js → chunk-CPAJXBTL.js} +10 -6
- package/dist/{chunk-3FBCFSDF.js → chunk-ECNNI3NT.js} +2 -1
- package/dist/chunk-HAEJ4M54.js +94 -0
- package/dist/{chunk-7RPH2VXV.js → chunk-JXSBOG2R.js} +1 -1
- package/dist/{chunk-E7WTCAVX.js → chunk-KNISO652.js} +2 -2
- package/dist/{chunk-5PLAJ6IS.js → chunk-L7D6KNHV.js} +457 -335
- package/dist/{chunk-JMI7L7Y7.js → chunk-LPM7O6XM.js} +2 -233
- package/dist/{chunk-2XWXFT2Z.js → chunk-QARSVM7Q.js} +1 -1
- package/dist/{chunk-FYT6LYJP.js → chunk-SBQ4MYQV.js} +3 -2
- package/dist/{chunk-MU4VPAMR.js → chunk-YRKQNPK2.js} +1 -1
- package/dist/components/index.css +2 -6
- package/dist/components/index.d.ts +11 -2
- package/dist/components/index.js +25 -23
- package/dist/components/navigation/index.css +2 -6
- package/dist/features/auth/index.css +2 -6
- package/dist/features/crm/index.css +2 -6
- package/dist/features/crm/index.js +9 -8
- package/dist/features/dashboard/index.css +2 -6
- package/dist/features/dashboard/index.js +9 -8
- package/dist/features/delivery/index.css +2 -6
- package/dist/features/delivery/index.js +10 -9
- package/dist/features/knowledge/index.d.ts +33 -0
- package/dist/features/knowledge/index.js +406 -0
- package/dist/features/lead-gen/index.css +2 -6
- package/dist/features/lead-gen/index.d.ts +158 -151
- package/dist/features/lead-gen/index.js +10 -9
- package/dist/features/monitoring/index.css +2 -6
- package/dist/features/monitoring/index.js +10 -9
- package/dist/features/monitoring/requests/index.css +2 -6
- package/dist/features/monitoring/requests/index.js +8 -7
- package/dist/features/operations/index.css +2 -6
- package/dist/features/operations/index.js +15 -13
- package/dist/features/settings/index.css +2 -6
- package/dist/features/settings/index.js +9 -8
- package/dist/hooks/delivery/index.css +2 -6
- package/dist/hooks/index.css +2 -6
- package/dist/hooks/index.d.ts +14 -3
- package/dist/hooks/index.js +8 -7
- package/dist/hooks/published.css +2 -6
- package/dist/hooks/published.d.ts +14 -3
- package/dist/hooks/published.js +8 -7
- package/dist/index.css +2 -6
- package/dist/index.d.ts +611 -593
- package/dist/index.js +8 -7
- package/dist/knowledge/index.d.ts +643 -0
- package/dist/knowledge/index.js +496 -0
- package/dist/organization/index.css +2 -6
- package/dist/provider/index.css +2 -6
- package/dist/provider/index.d.ts +346 -339
- package/dist/provider/index.js +6 -5
- package/dist/provider/published.css +2 -6
- package/dist/provider/published.d.ts +346 -339
- package/dist/provider/published.js +5 -4
- package/dist/vite-plugin-knowledge/index.d.ts +37 -0
- package/dist/vite-plugin-knowledge/index.js +67 -0
- package/package.json +45 -33
- package/src/knowledge/README.md +31 -0
- package/dist/{chunk-U2KJXTTV.js → chunk-TAIX4NO3.js} +1 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { DisplayMetadataSchema, ModelIdSchema, DescriptionSchema } from './chunk-
|
|
1
|
+
import { DisplayMetadataSchema, ModelIdSchema, DescriptionSchema } from './chunk-5RLYII6P.js';
|
|
2
2
|
import { z } from 'zod';
|
|
3
3
|
|
|
4
4
|
var ProspectingLifecycleStageSchema = DisplayMetadataSchema.extend({
|
|
@@ -2,7 +2,7 @@ import { AppShellLoader } from './chunk-RYTEQBAO.js';
|
|
|
2
2
|
import { FilterBar } from './chunk-PDHTXPSF.js';
|
|
3
3
|
import { CustomModal } from './chunk-KVJ3LFH2.js';
|
|
4
4
|
import { useAvailablePresets } from './chunk-SNHGSCKH.js';
|
|
5
|
-
import { useDeleteCredential, useCreateCredential, useCredentials, MEMBERSHIP_STATUS_COLORS, transformMembershipToTableRow, useUserMemberships, useUpdateWebhookEndpoint, useResources, useDeleteWebhookEndpoint, useCreateWebhookEndpoint, useListWebhookEndpoints, useOrgRoles, useAssignRole, useRevokeRole, useHasPermission, useUpdateMemberConfig, useOrganizationMembers, useUpdateCredential, CredentialSchemas } from './chunk-
|
|
5
|
+
import { useDeleteCredential, useCreateCredential, useCredentials, MEMBERSHIP_STATUS_COLORS, transformMembershipToTableRow, useUserMemberships, useUpdateWebhookEndpoint, useResources, useDeleteWebhookEndpoint, useCreateWebhookEndpoint, useListWebhookEndpoints, useOrgRoles, useAssignRole, useRevokeRole, useHasPermission, useUpdateMemberConfig, useOrganizationMembers, useUpdateCredential, CredentialSchemas } from './chunk-CPAJXBTL.js';
|
|
6
6
|
import { showApiErrorNotification, showErrorNotification, showSuccessNotification } from './chunk-HKBEURCV.js';
|
|
7
7
|
import { ListSkeleton, EmptyState, PageTitleCaption, CardHeader, APIErrorAlert, StatCard } from './chunk-U36X6NZM.js';
|
|
8
8
|
import { RoleBadge } from './chunk-GESXCQWY.js';
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { useSupabase } from './chunk-BRXELOHC.js';
|
|
2
1
|
import { observabilityKeys } from './chunk-VKMNWHTL.js';
|
|
3
2
|
import { showApiErrorNotification, showSuccessNotification, projectKeys, noteKeys, taskKeys, milestoneKeys } from './chunk-HKBEURCV.js';
|
|
3
|
+
import { useSupabase } from './chunk-BRXELOHC.js';
|
|
4
4
|
import { GRAPH_CONSTANTS } from './chunk-22UVE3RA.js';
|
|
5
|
-
import { useNotificationAdapter, deriveActions } from './chunk-
|
|
5
|
+
import { useNotificationAdapter, deriveActions } from './chunk-LPM7O6XM.js';
|
|
6
6
|
import { useOptionalElevasisFeatures } from './chunk-V3HUIZJX.js';
|
|
7
7
|
import { HTTP_HEADERS } from './chunk-T6INEVX6.js';
|
|
8
8
|
import { ResourceTypeSchema, NonEmptyStringSchema, OriginResourceTypeSchema, UuidSchema, CredentialNameSchema, STALE_TIME_DEFAULT, REFETCH_INTERVAL_DASHBOARD, STALE_TIME_MONITORING, STALE_TIME_ADMIN, getTimeRangeDates, REFETCH_INTERVAL_RUNNING, WS_MAX_RETRIES_BEFORE_ERROR, WS_RECONNECT_BASE_DELAY, WS_RECONNECT_MAX_DELAY, APIClientError, GC_TIME_MEDIUM, GC_TIME_SHORT } from './chunk-SGXXJE52.js';
|
|
@@ -3552,7 +3552,7 @@ var acquisitionListKeys = {
|
|
|
3552
3552
|
detail: (organizationId, listId) => [...acquisitionListKeys.all, organizationId, listId],
|
|
3553
3553
|
telemetry: (organizationId) => [...acquisitionListKeys.all, "telemetry", organizationId],
|
|
3554
3554
|
progress: (organizationId, listId) => [...acquisitionListKeys.all, "progress", organizationId, listId],
|
|
3555
|
-
executions: (organizationId, listId) => [...acquisitionListKeys.all, "executions", organizationId, listId]
|
|
3555
|
+
executions: (organizationId, listId, filters) => [...acquisitionListKeys.all, "executions", organizationId, listId, filters?.resourceId ?? null, filters?.limit ?? null]
|
|
3556
3556
|
};
|
|
3557
3557
|
function useLists() {
|
|
3558
3558
|
const { apiRequest, isReady, organizationId } = useElevasisServices();
|
|
@@ -3586,11 +3586,15 @@ function useListProgress(listId) {
|
|
|
3586
3586
|
enabled: isReady && !!listId
|
|
3587
3587
|
});
|
|
3588
3588
|
}
|
|
3589
|
-
function useListExecutions(listId) {
|
|
3589
|
+
function useListExecutions(listId, filters = {}) {
|
|
3590
3590
|
const { apiRequest, isReady, organizationId } = useElevasisServices();
|
|
3591
3591
|
return useQuery({
|
|
3592
|
-
queryKey: acquisitionListKeys.executions(organizationId, listId),
|
|
3593
|
-
queryFn: () =>
|
|
3592
|
+
queryKey: acquisitionListKeys.executions(organizationId, listId, filters),
|
|
3593
|
+
queryFn: async () => {
|
|
3594
|
+
const executions = await apiRequest(`/acquisition/lists/${listId}/executions`);
|
|
3595
|
+
const filteredExecutions = filters.resourceId ? executions.filter((execution) => execution.resourceId === filters.resourceId) : executions;
|
|
3596
|
+
return typeof filters.limit === "number" ? filteredExecutions.slice(0, filters.limit) : filteredExecutions;
|
|
3597
|
+
},
|
|
3594
3598
|
enabled: isReady && !!listId
|
|
3595
3599
|
});
|
|
3596
3600
|
}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
// ../core/src/organization-model/contracts.ts
|
|
2
|
+
var KNOWLEDGE_FEATURE_ID = "knowledge";
|
|
2
3
|
var PROJECTS_FEATURE_ID = "projects";
|
|
3
4
|
var PROJECTS_VIEW_CAPABILITY_ID = "delivery.projects.view";
|
|
4
5
|
|
|
5
|
-
export { PROJECTS_FEATURE_ID, PROJECTS_VIEW_CAPABILITY_ID };
|
|
6
|
+
export { KNOWLEDGE_FEATURE_ID, PROJECTS_FEATURE_ID, PROJECTS_VIEW_CAPABILITY_ID };
|
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
import { useMemo } from 'react';
|
|
2
|
+
import { Stack, Text, Group, Badge, UnstyledButton } from '@mantine/core';
|
|
3
|
+
import { jsx, jsxs } from 'react/jsx-runtime';
|
|
4
|
+
|
|
5
|
+
// src/knowledge/KnowledgeTree.tsx
|
|
6
|
+
|
|
7
|
+
// ../core/src/knowledge/queries.ts
|
|
8
|
+
function toGraphNodeId(omNodeId) {
|
|
9
|
+
return `knowledge:${omNodeId}`;
|
|
10
|
+
}
|
|
11
|
+
function buildKnowledgeSourceIdMap(graph) {
|
|
12
|
+
const map = /* @__PURE__ */ new Map();
|
|
13
|
+
for (const node of graph.nodes) {
|
|
14
|
+
if (node.kind === "knowledge" && node.sourceId) {
|
|
15
|
+
map.set(node.id, node.sourceId);
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
return map;
|
|
19
|
+
}
|
|
20
|
+
function byFeature(graph, featureId, knowledgeNodes) {
|
|
21
|
+
const targetGraphNodeId = `feature:${featureId}`;
|
|
22
|
+
const governingKnowledgeNodeIds = /* @__PURE__ */ new Set();
|
|
23
|
+
for (const edge of graph.edges) {
|
|
24
|
+
if (edge.kind === "governs" && edge.targetId === targetGraphNodeId && edge.sourceId.startsWith("knowledge:")) {
|
|
25
|
+
governingKnowledgeNodeIds.add(edge.sourceId);
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
const sourceIdMap = buildKnowledgeSourceIdMap(graph);
|
|
29
|
+
const matchingOmIds = /* @__PURE__ */ new Set();
|
|
30
|
+
for (const graphNodeId of governingKnowledgeNodeIds) {
|
|
31
|
+
const omId = sourceIdMap.get(graphNodeId);
|
|
32
|
+
if (omId) matchingOmIds.add(omId);
|
|
33
|
+
}
|
|
34
|
+
return knowledgeNodes.filter((n) => matchingOmIds.has(n.id));
|
|
35
|
+
}
|
|
36
|
+
function governs(graph, nodeId) {
|
|
37
|
+
const graphNodeId = nodeId.startsWith("knowledge:") ? nodeId : toGraphNodeId(nodeId);
|
|
38
|
+
const results = [];
|
|
39
|
+
for (const edge of graph.edges) {
|
|
40
|
+
if (edge.kind === "governs" && edge.sourceId === graphNodeId) {
|
|
41
|
+
results.push(edge.targetId);
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
return results;
|
|
45
|
+
}
|
|
46
|
+
function governedBy(graph, nodeId) {
|
|
47
|
+
const targetId = nodeId.startsWith("feature:") || nodeId.startsWith("knowledge:") || nodeId.startsWith("resource:") ? nodeId : `feature:${nodeId}`;
|
|
48
|
+
const results = [];
|
|
49
|
+
for (const edge of graph.edges) {
|
|
50
|
+
if (edge.kind === "governs" && edge.targetId === targetId) {
|
|
51
|
+
results.push(edge.sourceId);
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
return results;
|
|
55
|
+
}
|
|
56
|
+
function KnowledgeTree({ graph, knowledgeNodes, onSelectNode, selectedNodeId }) {
|
|
57
|
+
const groups = useMemo(() => {
|
|
58
|
+
const featureNodes = graph.nodes.filter((n) => n.kind === "feature");
|
|
59
|
+
return featureNodes.map((feature) => {
|
|
60
|
+
const featureId = feature.featureId ?? feature.sourceId ?? feature.id.replace(/^feature:/, "");
|
|
61
|
+
const nodes = byFeature(graph, featureId, knowledgeNodes);
|
|
62
|
+
return { feature, nodes };
|
|
63
|
+
}).filter((group) => group.nodes.length > 0);
|
|
64
|
+
}, [graph, knowledgeNodes]);
|
|
65
|
+
if (groups.length === 0) {
|
|
66
|
+
return /* @__PURE__ */ jsx(Stack, { gap: "xs", style: { padding: "var(--mantine-spacing-md)" }, children: /* @__PURE__ */ jsx(Text, { size: "sm", c: "dimmed", children: "No knowledge nodes governing any feature." }) });
|
|
67
|
+
}
|
|
68
|
+
return /* @__PURE__ */ jsx(Stack, { gap: "md", style: { padding: "var(--mantine-spacing-sm)" }, children: groups.map(({ feature, nodes }) => /* @__PURE__ */ jsxs(Stack, { gap: 4, children: [
|
|
69
|
+
/* @__PURE__ */ jsxs(Group, { gap: "xs", children: [
|
|
70
|
+
/* @__PURE__ */ jsx(Text, { size: "xs", fw: 600, tt: "uppercase", c: "dimmed", style: { letterSpacing: "0.05em" }, children: feature.label }),
|
|
71
|
+
/* @__PURE__ */ jsx(Badge, { size: "xs", variant: "light", color: "gray", children: nodes.length })
|
|
72
|
+
] }),
|
|
73
|
+
/* @__PURE__ */ jsx(Stack, { gap: 2, children: nodes.map((node) => {
|
|
74
|
+
const isActive = node.id === selectedNodeId;
|
|
75
|
+
return /* @__PURE__ */ jsx(
|
|
76
|
+
UnstyledButton,
|
|
77
|
+
{
|
|
78
|
+
onClick: () => onSelectNode(node),
|
|
79
|
+
style: {
|
|
80
|
+
padding: "6px 10px",
|
|
81
|
+
borderRadius: "var(--mantine-radius-sm)",
|
|
82
|
+
backgroundColor: isActive ? "color-mix(in srgb, var(--color-primary) 10%, transparent)" : "transparent",
|
|
83
|
+
width: "100%",
|
|
84
|
+
textAlign: "left"
|
|
85
|
+
},
|
|
86
|
+
children: /* @__PURE__ */ jsx(Text, { size: "sm", c: isActive ? "var(--color-primary)" : void 0, fw: isActive ? 600 : 400, children: node.title })
|
|
87
|
+
},
|
|
88
|
+
node.id
|
|
89
|
+
);
|
|
90
|
+
}) })
|
|
91
|
+
] }, feature.id)) });
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
export { KnowledgeTree, governedBy, governs };
|
|
@@ -3,7 +3,7 @@ import { AppShellLoader } from './chunk-RYTEQBAO.js';
|
|
|
3
3
|
import { FilterBar } from './chunk-PDHTXPSF.js';
|
|
4
4
|
import { CustomModal } from './chunk-KVJ3LFH2.js';
|
|
5
5
|
import { formatDuration } from './chunk-E4WQGJNS.js';
|
|
6
|
-
import { useResolveError, useResolveAllErrors, usePaginationState, useErrorDetails, useMarkAsRead, useExecutionLogsFilters, useExecutionLogs, useExecutionHealth, useErrorAnalysis, useTimeRangeDates, useErrorDetail, useResolveErrorsByExecution, useResources, useCostTrends, useCostSummary, useCostByModel, useCostBreakdown, useActivityFilters, useActivityTrend, useActivities, useNotifications, useMarkAllAsRead, useTestNotification } from './chunk-
|
|
6
|
+
import { useResolveError, useResolveAllErrors, usePaginationState, useErrorDetails, useMarkAsRead, useExecutionLogsFilters, useExecutionLogs, useExecutionHealth, useErrorAnalysis, useTimeRangeDates, useErrorDetail, useResolveErrorsByExecution, useResources, useCostTrends, useCostSummary, useCostByModel, useCostBreakdown, useActivityFilters, useActivityTrend, useActivities, useNotifications, useMarkAllAsRead, useTestNotification } from './chunk-CPAJXBTL.js';
|
|
7
7
|
import { CenteredErrorState, CardHeader, StatsCardSkeleton, TrendIndicator, DetailCardSkeleton, EmptyState, PageTitleCaption, JsonViewer } from './chunk-U36X6NZM.js';
|
|
8
8
|
import { useRouterContext } from './chunk-Q7DJKLEN.js';
|
|
9
9
|
import { formatBucketTime, PAGE_SIZE_DEFAULT, getTimeRangeDates } from './chunk-SGXXJE52.js';
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { PROJECTS_VIEW_CAPABILITY_ID, PROJECTS_FEATURE_ID } from './chunk-
|
|
1
|
+
import { PROJECTS_VIEW_CAPABILITY_ID, PROJECTS_FEATURE_ID } from './chunk-ECNNI3NT.js';
|
|
2
2
|
import { PageContainer } from './chunk-BZZCNLT6.js';
|
|
3
3
|
import { TableSelectionToolbar, SortableHeader } from './chunk-TUMSNGTX.js';
|
|
4
4
|
import { SubshellNavItem } from './chunk-X4WBGKJQ.js';
|
|
5
5
|
import { SubshellSidebarSection } from './chunk-IIMU5YAJ.js';
|
|
6
6
|
import { FilterBar } from './chunk-PDHTXPSF.js';
|
|
7
7
|
import { CustomModal } from './chunk-KVJ3LFH2.js';
|
|
8
|
-
import { useProjectRealtime, useTableSort, sortData, usePaginationState, useTableSelection, useProjectActivities } from './chunk-
|
|
8
|
+
import { useProjectRealtime, useTableSort, sortData, usePaginationState, useTableSelection, useProjectActivities } from './chunk-CPAJXBTL.js';
|
|
9
9
|
import { useCreateTask, useCreateMilestone, useProjectMilestones, useUpdateTask, useProjects, useDeleteProject, useProject, useProjectNotes, useUpdateMilestone, useCreateNote, showApiErrorNotification, projectKeys } from './chunk-HKBEURCV.js';
|
|
10
10
|
import { SubshellContentContainer } from './chunk-TKAYX2SP.js';
|
|
11
11
|
import { StatusBadge, EmptyState, PageTitleCaption, CenteredErrorState, StatCard, CardHeader } from './chunk-U36X6NZM.js';
|