@manta-eu/react 0.5.0 → 0.6.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.
- package/dist/components/chat-view/Chat.d.ts +8 -2
- package/dist/components/chat-view/Chat.d.ts.map +1 -1
- package/dist/components/chat-view/Chat.js +25 -3
- package/dist/components/chat-view/Chat.js.map +1 -1
- package/dist/components/chat-view/ToolApprovalPart.d.ts +12 -0
- package/dist/components/chat-view/ToolApprovalPart.d.ts.map +1 -0
- package/dist/components/chat-view/ToolApprovalPart.js +12 -0
- package/dist/components/chat-view/ToolApprovalPart.js.map +1 -0
- package/dist/components/chat-view/ToolMessagePart.d.ts.map +1 -1
- package/dist/components/chat-view/ToolMessagePart.js +7 -15
- package/dist/components/chat-view/ToolMessagePart.js.map +1 -1
- package/dist/components/chat-view/tool-part-rendering.js +1 -1
- package/dist/components/chat-view/tool-part-rendering.js.map +1 -1
- package/dist/components/layouts/Sidebar.d.ts.map +1 -1
- package/dist/components/layouts/Sidebar.js +4 -2
- package/dist/components/layouts/Sidebar.js.map +1 -1
- package/dist/components/planning/ActionPlanDetailView.d.ts +1 -0
- package/dist/components/planning/ActionPlanDetailView.d.ts.map +1 -1
- package/dist/components/planning/ActionPlanDetailView.js +2 -2
- package/dist/components/planning/ActionPlanDetailView.js.map +1 -1
- package/dist/components/planning/ConnectedPlanDetailView.d.ts +1 -0
- package/dist/components/planning/ConnectedPlanDetailView.d.ts.map +1 -1
- package/dist/components/planning/ConnectedPlanDetailView.js.map +1 -1
- package/dist/components/planning/TopBar.d.ts +1 -0
- package/dist/components/planning/TopBar.d.ts.map +1 -1
- package/dist/components/planning/TopBar.js +7 -4
- package/dist/components/planning/TopBar.js.map +1 -1
- package/dist/components/planning/plan-detail-utils.d.ts +1 -0
- package/dist/components/planning/plan-detail-utils.d.ts.map +1 -1
- package/dist/components/planning/plan-detail-utils.js +4 -1
- package/dist/components/planning/plan-detail-utils.js.map +1 -1
- package/dist/components/sidebar/nav-user.js +1 -1
- package/dist/components/sidebar/nav-user.js.map +1 -1
- package/dist/components/tool-invocation-card/ToolActions.d.ts +2 -4
- package/dist/components/tool-invocation-card/ToolActions.d.ts.map +1 -1
- package/dist/components/tool-invocation-card/ToolActions.js +2 -9
- package/dist/components/tool-invocation-card/ToolActions.js.map +1 -1
- package/dist/components/tool-invocation-card/ToolHeader.d.ts +0 -1
- package/dist/components/tool-invocation-card/ToolHeader.d.ts.map +1 -1
- package/dist/components/tool-invocation-card/ToolHeader.js +11 -4
- package/dist/components/tool-invocation-card/ToolHeader.js.map +1 -1
- package/dist/components/tool-invocation-card/ToolInvocationCard.d.ts +0 -7
- package/dist/components/tool-invocation-card/ToolInvocationCard.d.ts.map +1 -1
- package/dist/components/tool-invocation-card/ToolInvocationCard.js +6 -8
- package/dist/components/tool-invocation-card/ToolInvocationCard.js.map +1 -1
- package/dist/explain-fact/rule-presentation.d.ts.map +1 -1
- package/dist/explain-fact/rule-presentation.js +1 -6
- package/dist/explain-fact/rule-presentation.js.map +1 -1
- package/dist/explain-fact/tree-model.d.ts +2 -1
- package/dist/explain-fact/tree-model.d.ts.map +1 -1
- package/dist/explain-fact/tree-model.js +17 -2
- package/dist/explain-fact/tree-model.js.map +1 -1
- package/dist/hooks/use-connection-problems.d.ts.map +1 -1
- package/dist/hooks/use-manual-actions.js +1 -1
- package/dist/hooks/use-manual-actions.js.map +1 -1
- package/dist/hooks/useActionGraph.d.ts +7 -0
- package/dist/hooks/useActionGraph.d.ts.map +1 -0
- package/dist/hooks/useActionGraph.js +23 -0
- package/dist/hooks/useActionGraph.js.map +1 -0
- package/dist/hooks/useAuth.d.ts +1 -0
- package/dist/hooks/useAuth.d.ts.map +1 -1
- package/dist/hooks/useAuth.js +2 -1
- package/dist/hooks/useAuth.js.map +1 -1
- package/dist/hooks/useValidateActionPlan.d.ts.map +1 -1
- package/dist/lib/datastore-route-table.d.ts +1 -0
- package/dist/lib/datastore-route-table.d.ts.map +1 -1
- package/dist/lib/datastore-route-table.js +1 -0
- package/dist/lib/datastore-route-table.js.map +1 -1
- package/dist/lib/tool-icons.d.ts.map +1 -1
- package/dist/lib/tool-icons.js +1 -0
- package/dist/lib/tool-icons.js.map +1 -1
- package/dist/providers/AuthContext.d.ts +1 -0
- package/dist/providers/AuthContext.d.ts.map +1 -1
- package/dist/providers/AuthContext.js.map +1 -1
- package/dist/routes/plans/components/ActionPlansPage.d.ts.map +1 -1
- package/dist/routes/plans/components/ActionPlansPage.js +3 -3
- package/dist/routes/plans/components/ActionPlansPage.js.map +1 -1
- package/dist/routes/plans/components/PlanDetailRouteContent.d.ts.map +1 -1
- package/dist/routes/plans/components/PlanDetailRouteContent.js +3 -1
- package/dist/routes/plans/components/PlanDetailRouteContent.js.map +1 -1
- package/package.json +12 -7
- package/src/app-subpaths.json +1 -0
- package/src/components/chat-view/Chat.tsx +60 -5
- package/src/components/chat-view/ToolApprovalPart.tsx +27 -0
- package/src/components/chat-view/ToolMessagePart.tsx +8 -25
- package/src/components/chat-view/tool-part-rendering.ts +1 -1
- package/src/components/layouts/Sidebar.tsx +3 -2
- package/src/components/planning/ActionPlanDetailView.tsx +3 -0
- package/src/components/planning/ConnectedPlanDetailView.tsx +1 -0
- package/src/components/planning/TopBar.tsx +14 -3
- package/src/components/planning/plan-detail-utils.tsx +5 -1
- package/src/components/sidebar/nav-user.tsx +1 -1
- package/src/components/tool-invocation-card/ToolActions.tsx +5 -16
- package/src/components/tool-invocation-card/ToolHeader.tsx +13 -6
- package/src/components/tool-invocation-card/ToolInvocationCard.tsx +6 -23
- package/src/explain-fact/rule-presentation.ts +1 -6
- package/src/explain-fact/tree-model.ts +23 -1
- package/src/hooks/use-manual-actions.ts +1 -1
- package/src/hooks/useActionGraph.ts +41 -0
- package/src/hooks/useAuth.ts +3 -1
- package/src/lib/datastore-route-table.ts +2 -0
- package/src/lib/tool-icons.ts +1 -0
- package/src/providers/AuthContext.ts +1 -0
- package/src/routes/plans/components/ActionPlansPage.tsx +4 -4
- package/src/routes/plans/components/PlanDetailRouteContent.tsx +3 -0
|
@@ -20,6 +20,7 @@ export type AuthContextValue = Pick<
|
|
|
20
20
|
user: User;
|
|
21
21
|
// Only Manta's own web app may list the apps connected to someone; any other host's token is refused.
|
|
22
22
|
canDisconnectCustomApps?: boolean;
|
|
23
|
+
hasProfilePage?: boolean;
|
|
23
24
|
};
|
|
24
25
|
|
|
25
26
|
export const AuthContext = createContext<AuthContextValue | undefined>(undefined);
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
|
|
3
|
-
import { GQLActionPlanState } from "@manta-eu/client";
|
|
4
3
|
import { buildPlanHref as defaultBuildPlanHref } from "@manta-eu/client/shared/agent-mode";
|
|
5
4
|
import { isPresent } from "@manta-eu/lib/present";
|
|
6
5
|
import type { SortingState } from "@tanstack/react-table";
|
|
@@ -32,6 +31,7 @@ import {
|
|
|
32
31
|
} from "./actionPlansTableConfig";
|
|
33
32
|
import { renderDefaultActionPlansFrame, type ActionPlansFrameProps } from "./frame";
|
|
34
33
|
import { ExecutePlanDialog } from "#components/planning/ExecutePlanDialog";
|
|
34
|
+
import { canNeedApproval } from "#components/planning/plan-detail-utils";
|
|
35
35
|
import { createTableConfig, useTableState } from "#components/table/index";
|
|
36
36
|
import { useActionPlans } from "#hooks/useActionPlans";
|
|
37
37
|
import { useFittedPagination } from "#hooks/useFittedPagination";
|
|
@@ -168,13 +168,13 @@ export function ActionPlansPage(props: ActionPlansPageProps) {
|
|
|
168
168
|
}
|
|
169
169
|
}, [count, isLoading, pageIndex, totalPages]);
|
|
170
170
|
|
|
171
|
-
const
|
|
172
|
-
() => plans.filter((plan) => plan.state
|
|
171
|
+
const approvablePlanIris = useMemo(
|
|
172
|
+
() => plans.filter((plan) => canNeedApproval(plan.state)).map((plan) => plan.iri),
|
|
173
173
|
[plans],
|
|
174
174
|
);
|
|
175
175
|
|
|
176
176
|
const { data: manualActionsByPlan } = useManualActionsForPlans({
|
|
177
|
-
planGraphIris:
|
|
177
|
+
planGraphIris: approvablePlanIris,
|
|
178
178
|
refetchIntervalMs: 10000,
|
|
179
179
|
});
|
|
180
180
|
|
|
@@ -21,6 +21,7 @@ import type { PlanViewMode } from "#components/planning/TopBar";
|
|
|
21
21
|
import { useActionPlanDetail } from "#hooks/useActionPlanDetail";
|
|
22
22
|
import { useActionPlanExecution } from "#hooks/useActionPlanExecution";
|
|
23
23
|
import { ActionPlanChangesTable, useActionPlanExecutionProvenance, useManualActions } from "#ldo-ui";
|
|
24
|
+
import { getPendingManualActions } from "#lib/manual-actions";
|
|
24
25
|
import { useMantaClient } from "#providers/MantaClientProvider";
|
|
25
26
|
import { ActivityDetail } from "#routes/activity/detail/ActivityDetail";
|
|
26
27
|
import { invalidateActionPlanQueries } from "#shared/query-keys";
|
|
@@ -138,6 +139,7 @@ export function PlanDetailRouteContent(props: PlanDetailRouteContentProps) {
|
|
|
138
139
|
triggeredAtMs: executionControl.triggeredAtMs,
|
|
139
140
|
isRunningOverride: hasConfirmedExecution || hasExecutionEvidence,
|
|
140
141
|
});
|
|
142
|
+
const pendingApprovalCount = getPendingManualActions(manualActions).length;
|
|
141
143
|
const { triggeredAtMs, dryRun } = executionControl;
|
|
142
144
|
const isDryRun = deriveIsDryRun({ provenance: executionProvenance ?? null, triggeredAtMs, dryRun });
|
|
143
145
|
const shouldShowActioningSurface =
|
|
@@ -180,6 +182,7 @@ export function PlanDetailRouteContent(props: PlanDetailRouteContentProps) {
|
|
|
180
182
|
viewMode={activeViewMode}
|
|
181
183
|
stateOverride={derivedPlanState}
|
|
182
184
|
isDryRun={isDryRun}
|
|
185
|
+
pendingApprovalCount={pendingApprovalCount}
|
|
183
186
|
onViewModeChange={setViewMode}
|
|
184
187
|
onExecute={detailExecuteAction}
|
|
185
188
|
onCancel={detailCancelAction}
|