@burdenoff/fluidgrids-fe-sdk 2026.731.5 → 2026.731.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.
Files changed (36) hide show
  1. package/dist/ExecutionDetailPage-VCVJ2EOP.js +8 -0
  2. package/dist/{ExecutionDetailPage-Q2H7KMHW.js.map → ExecutionDetailPage-VCVJ2EOP.js.map} +1 -1
  3. package/dist/ExecutionsListPage-NXTMFIRZ.js +8 -0
  4. package/dist/{ExecutionsListPage-4FIHJBZV.js.map → ExecutionsListPage-NXTMFIRZ.js.map} +1 -1
  5. package/dist/{WorkflowBuilder-53YLICIC.js → WorkflowBuilder-IGQYC2UR.js} +6 -6
  6. package/dist/{WorkflowBuilder-53YLICIC.js.map → WorkflowBuilder-IGQYC2UR.js.map} +1 -1
  7. package/dist/WorkflowsList-S2MGY2UT.js +10 -0
  8. package/dist/{WorkflowsList-GTW56K3E.js.map → WorkflowsList-S2MGY2UT.js.map} +1 -1
  9. package/dist/{blocks-3FQ3K737.js → blocks-K5JPCH3D.js} +4 -4
  10. package/dist/{blocks-3FQ3K737.js.map → blocks-K5JPCH3D.js.map} +1 -1
  11. package/dist/{chunk-NGCKF56I.js → chunk-2XMPJHCW.js} +220 -102
  12. package/dist/chunk-2XMPJHCW.js.map +1 -0
  13. package/dist/{chunk-4BY7JVRA.js → chunk-6AK7GFWB.js} +3 -3
  14. package/dist/{chunk-4BY7JVRA.js.map → chunk-6AK7GFWB.js.map} +1 -1
  15. package/dist/{chunk-SBZ6J6UD.js → chunk-IVKT244I.js} +3 -3
  16. package/dist/{chunk-SBZ6J6UD.js.map → chunk-IVKT244I.js.map} +1 -1
  17. package/dist/{chunk-DBQLVCEW.js → chunk-JIZFSX6X.js} +3 -3
  18. package/dist/{chunk-DBQLVCEW.js.map → chunk-JIZFSX6X.js.map} +1 -1
  19. package/dist/{chunk-K7326LE2.js → chunk-NMS2QUXG.js} +7 -7
  20. package/dist/chunk-NMS2QUXG.js.map +1 -0
  21. package/dist/{chunk-IBPEITOH.js → chunk-TKAS26Q3.js} +4 -4
  22. package/dist/{chunk-IBPEITOH.js.map → chunk-TKAS26Q3.js.map} +1 -1
  23. package/dist/{chunk-ATNBIPGD.js → chunk-USFXD36A.js} +4 -4
  24. package/dist/{chunk-ATNBIPGD.js.map → chunk-USFXD36A.js.map} +1 -1
  25. package/dist/{chunk-IU65EQOS.js → chunk-XEYNX7YJ.js} +4 -2
  26. package/dist/chunk-XEYNX7YJ.js.map +1 -0
  27. package/dist/index.d.ts +2 -0
  28. package/dist/index.js +129 -131
  29. package/dist/index.js.map +1 -1
  30. package/package.json +1 -1
  31. package/dist/ExecutionDetailPage-Q2H7KMHW.js +0 -8
  32. package/dist/ExecutionsListPage-4FIHJBZV.js +0 -8
  33. package/dist/WorkflowsList-GTW56K3E.js +0 -10
  34. package/dist/chunk-IU65EQOS.js.map +0 -1
  35. package/dist/chunk-K7326LE2.js.map +0 -1
  36. package/dist/chunk-NGCKF56I.js.map +0 -1
package/dist/index.js CHANGED
@@ -1,29 +1,30 @@
1
1
  export { Label } from './chunk-6QCBKN3P.js';
2
- import { FluidGridsProvider, useImportWorkflowTemplate, FlowBuilderPage, useWorkflowTemplates, TemplateCard, Card } from './chunk-NGCKF56I.js';
3
- export { Card, CardContent, CardDescription, CardFooter, CardHeader, CardTitle, FluidGridsProvider, WorkflowBuilder as WorkflowBuilderPage, useFluidGridsContext } from './chunk-NGCKF56I.js';
2
+ import { FluidGridsProvider, useImportWorkflowTemplate, FlowBuilderPage, useWorkflowTemplates, TemplateCard, Card } from './chunk-2XMPJHCW.js';
3
+ export { Card, CardContent, CardDescription, CardFooter, CardHeader, CardTitle, FluidGridsProvider, WorkflowBuilder as WorkflowBuilderPage, useFluidGridsContext } from './chunk-2XMPJHCW.js';
4
4
  import { Input as Input$1 } from './chunk-MRVS73S2.js';
5
5
  export { Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger, Input } from './chunk-MRVS73S2.js';
6
6
  import { Button as Button$1 } from './chunk-DBOMRIP5.js';
7
7
  export { Badge, Button, badgeVariants, buttonVariants } from './chunk-DBOMRIP5.js';
8
- export { ExecutionsListPage } from './chunk-ATNBIPGD.js';
9
- export { ExecutionDetailPage } from './chunk-IBPEITOH.js';
10
- import './chunk-4BY7JVRA.js';
11
- export { ConfigSchemaForm, ConnectionFormDialog, ConnectionSelector, ProviderPicker, getProviderForm, listCustomBlocks, refetchStoreNodes, registerCustomBlock, resolveUiSpec, stripSubmitActions, useConnection, useConnectionDialog, useConnections, useConnectionsByProvider, useCreateConnection, useInitiateOAuth, useNodeExecution, useProviderByKey, useProviderCatalog, useProviders } from './chunk-SBZ6J6UD.js';
8
+ export { ExecutionsListPage } from './chunk-USFXD36A.js';
9
+ export { ExecutionDetailPage } from './chunk-TKAS26Q3.js';
10
+ import './chunk-6AK7GFWB.js';
11
+ export { ConfigSchemaForm, ConnectionFormDialog, ConnectionSelector, ProviderPicker, getProviderForm, listCustomBlocks, refetchStoreNodes, registerCustomBlock, resolveUiSpec, stripSubmitActions, useConnection, useConnectionDialog, useConnections, useConnectionsByProvider, useCreateConnection, useInitiateOAuth, useNodeExecution, useProviderByKey, useProviderCatalog, useProviders } from './chunk-IVKT244I.js';
12
12
  import { createGlobalStoreClient } from './chunk-BQXHJIER.js';
13
13
  export { createGlobalStoreClient, getGlobalStoreClient, resetGlobalStoreClient, setGlobalStoreClient } from './chunk-BQXHJIER.js';
14
14
  import './chunk-PNOA7CQV.js';
15
- export { WorkflowsList } from './chunk-DBQLVCEW.js';
16
- import { useWorkflowDefinitions, useDuplicateWorkflow, useWorkflowVersions } from './chunk-K7326LE2.js';
17
- export { useActivateWorkflow, useCreateWorkflow, useCreateWorkflowVersion, useDashboardSummary, useDeactivateWorkflow, useDeleteWorkflow, useDuplicateWorkflow, useLazyWorkflowDefinition, useRestoreWorkflowVersion, useTriggerWorkflow, useUpdateWorkflow, useWorkflowDefinition, useWorkflowDefinitions, useWorkflowRun, useWorkflowRuns, useWorkflowVersions } from './chunk-K7326LE2.js';
15
+ export { WorkflowsList } from './chunk-JIZFSX6X.js';
16
+ import { useWorkflowDefinitions, useDuplicateWorkflow } from './chunk-NMS2QUXG.js';
17
+ export { useActivateWorkflow, useCreateWorkflow, useCreateWorkflowVersion, useDashboardSummary, useDeactivateWorkflow, useDeleteWorkflow, useDuplicateWorkflow, useLazyWorkflowDefinition, useRestoreWorkflowVersion, useTriggerWorkflow, useUpdateWorkflow, useWorkflowDefinition, useWorkflowDefinitions, useWorkflowRun, useWorkflowRuns, useWorkflowVersions } from './chunk-NMS2QUXG.js';
18
18
  import { useFlowStore } from './chunk-KU64CCSV.js';
19
19
  export { useFlowStore } from './chunk-KU64CCSV.js';
20
20
  export { ALLOW_ALL_PERMISSIONS, FLUIDGRIDS_PERMISSIONS, FluidGridsPermissionsProvider, SdkPermissionButton, SdkPermissionGate, Tooltip, TooltipContent, TooltipProvider, TooltipTrigger, evaluatePermissionCheck, useFluidGridsPermission } from './chunk-UIY2HBWA.js';
21
21
  import { cn } from './chunk-3ZYUGTIT.js';
22
22
  export { cn } from './chunk-3ZYUGTIT.js';
23
- import { NodeEndpointConfigsDocument, NodeEndpointConfigDocument, NodeManifestDocument } from './chunk-IU65EQOS.js';
24
- export { ActivateWorkflowDefinitionDocument, ActiveExecutionsDocument, CancelExecutionDocument, CreateWorkflowDefinitionDocument, CreateWorkflowVersionDocument, DashboardSummaryDocument, DeactivateWorkflowDefinitionDocument, DeleteWorkflowDefinitionDocument, DuplicateWorkflowDocument, EventRegistrationsDocument, ExecutionDetailDocument, ExecutionLogsDocument, ExecutionStatsDocument, ExecutionsListDocument, ImportWorkflowTemplateDocument, NodeEndpointConfigDocument, NodeEndpointConfigsDocument, NodeManifestDocument, NodeSchemaIntrospectionDocument, NodeStatesDocument, NodeUsageStatusDocument, PauseExecutionDocument, RegisterNodeDocument, RemoveNodeFromWorkflowsDocument, RestoreWorkflowVersionDocument, ResumeExecutionDocument, RetryNodeDocument, RunLogAppendedDocument, RunLogLineFieldsFragmentDoc, RunLogsDocument, TerminateExecutionDocument, TriggerWorkflowDocument, UpdateWorkflowDefinitionDocument, UsageTimeSeriesDocument, WorkflowDefinitionDocument, WorkflowDefinitionsDocument, WorkflowRunDocument, WorkflowRunsDocument, WorkflowVersionsDocument, describeOperationError, throwIfResultError, useActivateWorkflowDefinitionMutation, useActiveExecutionsLazyQuery, useActiveExecutionsQuery, useActiveExecutionsSuspenseQuery, useCancelExecutionMutation, useCreateWorkflowDefinitionMutation, useCreateWorkflowVersionMutation, useDashboardSummaryLazyQuery, useDashboardSummaryQuery, useDashboardSummarySuspenseQuery, useDeactivateWorkflowDefinitionMutation, useDeleteWorkflowDefinitionMutation, useDuplicateWorkflowMutation, useEventRegistrationsLazyQuery, useEventRegistrationsQuery, useEventRegistrationsSuspenseQuery, useExecutionDetailLazyQuery, useExecutionDetailQuery, useExecutionDetailSuspenseQuery, useExecutionLogsLazyQuery, useExecutionLogsQuery, useExecutionLogsSuspenseQuery, useExecutionStatsLazyQuery, useExecutionStatsQuery, useExecutionStatsSuspenseQuery, useExecutionsListLazyQuery, useExecutionsListQuery, useExecutionsListSuspenseQuery, useImportWorkflowTemplateMutation, useNodeEndpointConfigLazyQuery, useNodeEndpointConfigQuery, useNodeEndpointConfigSuspenseQuery, useNodeEndpointConfigsLazyQuery, useNodeEndpointConfigsQuery, useNodeEndpointConfigsSuspenseQuery, useNodeManifestLazyQuery, useNodeManifestQuery, useNodeManifestSuspenseQuery, useNodeSchemaIntrospectionLazyQuery, useNodeSchemaIntrospectionQuery, useNodeSchemaIntrospectionSuspenseQuery, useNodeStatesLazyQuery, useNodeStatesQuery, useNodeStatesSuspenseQuery, useNodeUsageStatusLazyQuery, useNodeUsageStatusQuery, useNodeUsageStatusSuspenseQuery, usePauseExecutionMutation, useRegisterNodeMutation, useRemoveNodeFromWorkflowsMutation, useRestoreWorkflowVersionMutation, useResumeExecutionMutation, useRetryNodeMutation, useRunLogAppendedSubscription, useRunLogsLazyQuery, useRunLogsQuery, useRunLogsSuspenseQuery, useTerminateExecutionMutation, useTriggerWorkflowMutation, useUpdateWorkflowDefinitionMutation, useUsageTimeSeriesLazyQuery, useUsageTimeSeriesQuery, useUsageTimeSeriesSuspenseQuery, useWorkflowDefinitionLazyQuery, useWorkflowDefinitionQuery, useWorkflowDefinitionSuspenseQuery, useWorkflowDefinitionsLazyQuery, useWorkflowDefinitionsQuery, useWorkflowDefinitionsSuspenseQuery, useWorkflowRunLazyQuery, useWorkflowRunQuery, useWorkflowRunSuspenseQuery, useWorkflowRunsLazyQuery, useWorkflowRunsQuery, useWorkflowRunsSuspenseQuery, useWorkflowVersionsLazyQuery, useWorkflowVersionsQuery, useWorkflowVersionsSuspenseQuery } from './chunk-IU65EQOS.js';
23
+ import { NodeEndpointConfigsDocument, NodeEndpointConfigDocument, NodeManifestDocument } from './chunk-XEYNX7YJ.js';
24
+ export { ActivateWorkflowDefinitionDocument, ActiveExecutionsDocument, CancelExecutionDocument, CreateWorkflowDefinitionDocument, CreateWorkflowVersionDocument, DashboardSummaryDocument, DeactivateWorkflowDefinitionDocument, DeleteWorkflowDefinitionDocument, DuplicateWorkflowDocument, EventRegistrationsDocument, ExecutionDetailDocument, ExecutionLogsDocument, ExecutionStatsDocument, ExecutionsListDocument, ImportWorkflowTemplateDocument, NodeEndpointConfigDocument, NodeEndpointConfigsDocument, NodeManifestDocument, NodeSchemaIntrospectionDocument, NodeStatesDocument, NodeUsageStatusDocument, PauseExecutionDocument, RegisterNodeDocument, RemoveNodeFromWorkflowsDocument, RestoreWorkflowVersionDocument, ResumeExecutionDocument, RetryNodeDocument, RunLogAppendedDocument, RunLogLineFieldsFragmentDoc, RunLogsDocument, TerminateExecutionDocument, TriggerWorkflowDocument, UpdateWorkflowDefinitionDocument, UsageTimeSeriesDocument, WorkflowDefinitionDocument, WorkflowDefinitionsDocument, WorkflowRunDocument, WorkflowRunsDocument, WorkflowVersionsDocument, describeOperationError, throwIfResultError, useActivateWorkflowDefinitionMutation, useActiveExecutionsLazyQuery, useActiveExecutionsQuery, useActiveExecutionsSuspenseQuery, useCancelExecutionMutation, useCreateWorkflowDefinitionMutation, useCreateWorkflowVersionMutation, useDashboardSummaryLazyQuery, useDashboardSummaryQuery, useDashboardSummarySuspenseQuery, useDeactivateWorkflowDefinitionMutation, useDeleteWorkflowDefinitionMutation, useDuplicateWorkflowMutation, useEventRegistrationsLazyQuery, useEventRegistrationsQuery, useEventRegistrationsSuspenseQuery, useExecutionDetailLazyQuery, useExecutionDetailQuery, useExecutionDetailSuspenseQuery, useExecutionLogsLazyQuery, useExecutionLogsQuery, useExecutionLogsSuspenseQuery, useExecutionStatsLazyQuery, useExecutionStatsQuery, useExecutionStatsSuspenseQuery, useExecutionsListLazyQuery, useExecutionsListQuery, useExecutionsListSuspenseQuery, useImportWorkflowTemplateMutation, useNodeEndpointConfigLazyQuery, useNodeEndpointConfigQuery, useNodeEndpointConfigSuspenseQuery, useNodeEndpointConfigsLazyQuery, useNodeEndpointConfigsQuery, useNodeEndpointConfigsSuspenseQuery, useNodeManifestLazyQuery, useNodeManifestQuery, useNodeManifestSuspenseQuery, useNodeSchemaIntrospectionLazyQuery, useNodeSchemaIntrospectionQuery, useNodeSchemaIntrospectionSuspenseQuery, useNodeStatesLazyQuery, useNodeStatesQuery, useNodeStatesSuspenseQuery, useNodeUsageStatusLazyQuery, useNodeUsageStatusQuery, useNodeUsageStatusSuspenseQuery, usePauseExecutionMutation, useRegisterNodeMutation, useRemoveNodeFromWorkflowsMutation, useRestoreWorkflowVersionMutation, useResumeExecutionMutation, useRetryNodeMutation, useRunLogAppendedSubscription, useRunLogsLazyQuery, useRunLogsQuery, useRunLogsSuspenseQuery, useTerminateExecutionMutation, useTriggerWorkflowMutation, useUpdateWorkflowDefinitionMutation, useUsageTimeSeriesLazyQuery, useUsageTimeSeriesQuery, useUsageTimeSeriesSuspenseQuery, useWorkflowDefinitionLazyQuery, useWorkflowDefinitionQuery, useWorkflowDefinitionSuspenseQuery, useWorkflowDefinitionsLazyQuery, useWorkflowDefinitionsQuery, useWorkflowDefinitionsSuspenseQuery, useWorkflowRunLazyQuery, useWorkflowRunQuery, useWorkflowRunSuspenseQuery, useWorkflowRunsLazyQuery, useWorkflowRunsQuery, useWorkflowRunsSuspenseQuery, useWorkflowVersionsLazyQuery, useWorkflowVersionsQuery, useWorkflowVersionsSuspenseQuery } from './chunk-XEYNX7YJ.js';
25
25
  import { getFluidGridsClient, createFluidGridsClient } from './chunk-5BDQNSP3.js';
26
26
  export { createFluidGridsClient, getFluidGridsClient, getFluidGridsClientSafe, isFluidGridsClientReady, resetFluidGridsClient, setFluidGridsClient, waitForFluidGridsClient } from './chunk-5BDQNSP3.js';
27
+ import { getFluidGridsConfig } from './chunk-WWU2O2SR.js';
27
28
  export { config, getFluidGridsConfig, getGraphQLEndpoint, resetFluidGridsConfig, setFluidGridsConfig } from './chunk-WWU2O2SR.js';
28
29
  import './chunk-XQP33UJR.js';
29
30
  import * as React4 from 'react';
@@ -41,6 +42,7 @@ import { Button } from '@burdenoff/fe-libs/button';
41
42
  import { ErrorBoundary } from '@burdenoff/fe-libs/shared/components';
42
43
  import { ThemeProvider as ThemeProvider$1 } from '@burdenoff/fe-libs/shared/providers/shell';
43
44
  import { Input, Select, SelectTrigger, SelectValue, SelectContent, SelectItem, Badge, TooltipProvider, Tooltip, TooltipTrigger, TooltipContent, Tabs, TabsList, TabsTrigger, TabsContent, Skeleton, Card as Card$1, CardHeader, Switch, Label } from '@burdenoff/fe-libs/ui';
45
+ import { useActorProfiles, buildActorFallback } from '@burdenoff/fe-libs/shared';
44
46
  import { v4 } from 'uuid';
45
47
  import * as TabsPrimitive from '@radix-ui/react-tabs';
46
48
  import * as ScrollAreaPrimitive from '@radix-ui/react-scroll-area';
@@ -52,20 +54,20 @@ import * as SwitchPrimitives from '@radix-ui/react-switch';
52
54
  import * as PopoverPrimitive from '@radix-ui/react-popover';
53
55
 
54
56
  var WorkflowsList2 = lazy(
55
- () => import('./WorkflowsList-GTW56K3E.js').then((m) => ({ default: m.WorkflowsList }))
57
+ () => import('./WorkflowsList-S2MGY2UT.js').then((m) => ({ default: m.WorkflowsList }))
56
58
  );
57
59
  var WorkflowBuilder2 = lazy(
58
- () => import('./WorkflowBuilder-53YLICIC.js').then((m) => ({
60
+ () => import('./WorkflowBuilder-IGQYC2UR.js').then((m) => ({
59
61
  default: m.WorkflowBuilder
60
62
  }))
61
63
  );
62
64
  var ExecutionsListPage2 = lazy(
63
- () => import('./ExecutionsListPage-4FIHJBZV.js').then((m) => ({
65
+ () => import('./ExecutionsListPage-NXTMFIRZ.js').then((m) => ({
64
66
  default: m.ExecutionsListPage
65
67
  }))
66
68
  );
67
69
  var ExecutionDetailPage2 = lazy(
68
- () => import('./ExecutionDetailPage-Q2H7KMHW.js').then((m) => ({
70
+ () => import('./ExecutionDetailPage-VCVJ2EOP.js').then((m) => ({
69
71
  default: m.ExecutionDetailPage
70
72
  }))
71
73
  );
@@ -935,23 +937,12 @@ function postToParent(payload) {
935
937
  window.parent.postMessage(payload, "*");
936
938
  }
937
939
  var PAGE_SIZE = 20;
940
+ var FETCH_LIMIT = 500;
938
941
  var STATUS_STYLES = {
939
- ACTIVE: {
940
- className: "bg-emerald-500/15 text-emerald-400 border-emerald-500/30",
941
- label: "Active"
942
- },
943
- DRAFT: {
944
- className: "bg-amber-500/15 text-amber-400 border-amber-500/30",
945
- label: "Draft"
946
- },
947
- ARCHIVED: {
948
- className: "bg-zinc-500/15 text-zinc-400 border-zinc-500/30",
949
- label: "Archived"
950
- },
951
- DEPRECATED: {
952
- className: "bg-red-500/15 text-red-400 border-red-500/30",
953
- label: "Deprecated"
954
- }
942
+ ACTIVE: { label: "Active", variant: "default" },
943
+ DRAFT: { label: "Draft", variant: "secondary" },
944
+ ARCHIVED: { label: "Archived", variant: "outline" },
945
+ DEPRECATED: { label: "Deprecated", variant: "destructive" }
955
946
  };
956
947
  function HistoryTableSkeleton() {
957
948
  return /* @__PURE__ */ jsx("div", { className: "space-y-3", children: Array.from({ length: 6 }).map((_, i) => /* @__PURE__ */ jsx(
@@ -991,71 +982,73 @@ function ErrorState({
991
982
  )
992
983
  ] });
993
984
  }
994
- function VersionRowsFromWorkflow({
995
- workflow,
996
- onRowsReady
985
+ function StatCard({
986
+ label,
987
+ value,
988
+ valueClassName
997
989
  }) {
998
- const { versions, loading } = useWorkflowVersions(workflow.workflowKey);
999
- useMemo(() => {
1000
- if (!loading && versions.length > 0) {
1001
- const rows = versions.map((v) => ({
1002
- id: v.id,
1003
- workflowKey: v.workflowKey,
1004
- workflowName: v.name || workflow.name,
1005
- version: v.version,
1006
- status: v.status ?? "DRAFT",
1007
- createdBy: v.createdById ?? "Unknown",
1008
- updatedAt: v.updatedAt,
1009
- createdAt: v.createdAt
1010
- }));
1011
- onRowsReady(rows);
1012
- } else if (!loading && versions.length === 0) {
1013
- onRowsReady([
1014
- {
1015
- id: workflow.id,
1016
- workflowKey: workflow.workflowKey,
1017
- workflowName: workflow.name,
1018
- version: workflow.version,
1019
- status: workflow.status ?? "DRAFT",
1020
- createdBy: workflow.createdById ?? "Unknown",
1021
- updatedAt: workflow.updatedAt,
1022
- createdAt: workflow.createdAt
1023
- }
1024
- ]);
1025
- }
1026
- }, [loading, versions, workflow, onRowsReady]);
1027
- return null;
990
+ return /* @__PURE__ */ jsxs("div", { className: "p-3 rounded-lg bg-background-secondary border border-border-secondary", children: [
991
+ /* @__PURE__ */ jsx("p", { className: "text-xs text-text-secondary", children: label }),
992
+ /* @__PURE__ */ jsx(
993
+ "p",
994
+ {
995
+ className: `text-xl font-bold ${valueClassName ?? "text-text-primary"}`,
996
+ children: value
997
+ }
998
+ )
999
+ ] });
1028
1000
  }
1029
1001
  function HistoryPage() {
1030
1002
  const navigate = useNavigate();
1031
1003
  const [search, setSearch] = useState("");
1032
1004
  const [workflowFilter, setWorkflowFilter] = useState("all");
1033
1005
  const [page, setPage] = useState(0);
1034
- const [versionMap, setVersionMap] = useState(
1035
- {}
1006
+ const {
1007
+ workflows: versionRows,
1008
+ total,
1009
+ hasMore,
1010
+ loading,
1011
+ error,
1012
+ refetch
1013
+ } = useWorkflowDefinitions({ limit: FETCH_LIMIT });
1014
+ const allRows = useMemo(
1015
+ () => [...versionRows].sort(
1016
+ (a, b) => new Date(b.updatedAt).getTime() - new Date(a.updatedAt).getTime()
1017
+ ),
1018
+ [versionRows]
1036
1019
  );
1037
- const { workflows, loading, error, refetch } = useWorkflowDefinitions({
1038
- limit: 100
1020
+ const distinctWorkflows = useMemo(() => {
1021
+ const byKey = /* @__PURE__ */ new Map();
1022
+ for (const row of allRows) {
1023
+ if (!byKey.has(row.workflowKey)) {
1024
+ byKey.set(row.workflowKey, {
1025
+ workflowKey: row.workflowKey,
1026
+ name: row.name
1027
+ });
1028
+ }
1029
+ }
1030
+ return [...byKey.values()];
1031
+ }, [allRows]);
1032
+ const config2 = getFluidGridsConfig();
1033
+ const actorInputs = useMemo(() => {
1034
+ const ids = /* @__PURE__ */ new Set();
1035
+ for (const row of allRows) {
1036
+ if (row.createdById) ids.add(row.createdById);
1037
+ }
1038
+ return [...ids].map((actorId) => ({ actorId, actorType: "user" }));
1039
+ }, [allRows]);
1040
+ const actorProfiles = useActorProfiles(actorInputs, {
1041
+ workspaceId: config2.workspaceId || void 0,
1042
+ orgId: config2.organizationId,
1043
+ authToken: config2.authToken
1039
1044
  });
1040
- const handleRowsReady = useCallback(
1041
- (workflowKey) => (rows) => {
1042
- setVersionMap((prev) => {
1043
- if (prev[workflowKey] && prev[workflowKey].length === rows.length)
1044
- return prev;
1045
- return { ...prev, [workflowKey]: rows };
1046
- });
1045
+ const changedByLabel = useCallback(
1046
+ (createdById) => {
1047
+ if (!createdById) return "\u2014";
1048
+ return actorProfiles[createdById]?.displayName ?? buildActorFallback({ actorId: createdById, actorType: "user" }).displayName;
1047
1049
  },
1048
- []
1050
+ [actorProfiles]
1049
1051
  );
1050
- const allRows = useMemo(() => {
1051
- const combined = [];
1052
- for (const rows of Object.values(versionMap)) {
1053
- combined.push(...rows);
1054
- }
1055
- return combined.sort(
1056
- (a, b) => new Date(b.updatedAt).getTime() - new Date(a.updatedAt).getTime()
1057
- );
1058
- }, [versionMap]);
1059
1052
  const filteredRows = useMemo(() => {
1060
1053
  let rows = allRows;
1061
1054
  if (workflowFilter !== "all") {
@@ -1064,18 +1057,18 @@ function HistoryPage() {
1064
1057
  if (search.trim()) {
1065
1058
  const q = search.toLowerCase();
1066
1059
  rows = rows.filter(
1067
- (r) => r.workflowName.toLowerCase().includes(q) || r.version.toLowerCase().includes(q) || r.workflowKey.toLowerCase().includes(q)
1060
+ (r) => r.name.toLowerCase().includes(q) || r.version.toLowerCase().includes(q) || r.workflowKey.toLowerCase().includes(q) || changedByLabel(r.createdById).toLowerCase().includes(q)
1068
1061
  );
1069
1062
  }
1070
1063
  return rows;
1071
- }, [allRows, workflowFilter, search]);
1064
+ }, [allRows, workflowFilter, search, changedByLabel]);
1072
1065
  const totalPages = Math.max(1, Math.ceil(filteredRows.length / PAGE_SIZE));
1073
1066
  const paginatedRows = filteredRows.slice(
1074
1067
  page * PAGE_SIZE,
1075
1068
  (page + 1) * PAGE_SIZE
1076
1069
  );
1077
- const handleNavigateToVersion = (row) => {
1078
- navigate(`../workflow/${row.workflowKey}/${row.version}`);
1070
+ const handleNavigateToVersion = (workflowKey, version) => {
1071
+ navigate(`../workflow/${workflowKey}/${version}`);
1079
1072
  };
1080
1073
  const formatDate = (dateStr) => {
1081
1074
  try {
@@ -1090,16 +1083,8 @@ function HistoryPage() {
1090
1083
  return dateStr;
1091
1084
  }
1092
1085
  };
1093
- const isVersionsLoading = loading || workflows.length > 0 && allRows.length === 0;
1086
+ const countByStatus = (status) => allRows.filter((r) => r.status === status).length;
1094
1087
  return /* @__PURE__ */ jsxs("div", { className: "p-4 sm:p-6 bg-background-primary min-h-screen", children: [
1095
- workflows.map((w) => /* @__PURE__ */ jsx(
1096
- VersionRowsFromWorkflow,
1097
- {
1098
- workflow: w,
1099
- onRowsReady: handleRowsReady(w.workflowKey)
1100
- },
1101
- w.workflowKey
1102
- )),
1103
1088
  /* @__PURE__ */ jsxs("div", { className: "flex flex-col sm:flex-row sm:items-center sm:justify-between gap-4 mb-6", children: [
1104
1089
  /* @__PURE__ */ jsxs("div", { children: [
1105
1090
  /* @__PURE__ */ jsx("h1", { className: "text-2xl sm:text-3xl font-bold text-text-primary", children: "Version History" }),
@@ -1129,7 +1114,7 @@ function HistoryPage() {
1129
1114
  /* @__PURE__ */ jsx(
1130
1115
  Input,
1131
1116
  {
1132
- placeholder: "Search by name, version, or key...",
1117
+ placeholder: "Search by name, version, key, or author...",
1133
1118
  value: search,
1134
1119
  onChange: (e) => {
1135
1120
  setSearch(e.target.value);
@@ -1151,32 +1136,42 @@ function HistoryPage() {
1151
1136
  /* @__PURE__ */ jsx(SelectTrigger, { className: "w-[220px] bg-background-secondary border-border-secondary", children: /* @__PURE__ */ jsx(SelectValue, { placeholder: "All Workflows" }) }),
1152
1137
  /* @__PURE__ */ jsxs(SelectContent, { children: [
1153
1138
  /* @__PURE__ */ jsx(SelectItem, { value: "all", children: "All Workflows" }),
1154
- workflows.map((w) => /* @__PURE__ */ jsx(SelectItem, { value: w.workflowKey, children: w.name }, w.workflowKey))
1139
+ distinctWorkflows.map((w) => /* @__PURE__ */ jsx(SelectItem, { value: w.workflowKey, children: w.name }, w.workflowKey))
1155
1140
  ] })
1156
1141
  ]
1157
1142
  }
1158
1143
  )
1159
1144
  ] }),
1160
- /* @__PURE__ */ jsxs("div", { className: "grid grid-cols-2 sm:grid-cols-4 gap-3 mb-6", children: [
1161
- /* @__PURE__ */ jsxs("div", { className: "p-3 rounded-lg bg-background-secondary border border-border-secondary", children: [
1162
- /* @__PURE__ */ jsx("p", { className: "text-xs text-text-secondary", children: "Total Versions" }),
1163
- /* @__PURE__ */ jsx("p", { className: "text-xl font-bold text-text-primary", children: allRows.length })
1164
- ] }),
1165
- /* @__PURE__ */ jsxs("div", { className: "p-3 rounded-lg bg-background-secondary border border-border-secondary", children: [
1166
- /* @__PURE__ */ jsx("p", { className: "text-xs text-text-secondary", children: "Workflows" }),
1167
- /* @__PURE__ */ jsx("p", { className: "text-xl font-bold text-text-primary", children: workflows.length })
1168
- ] }),
1169
- /* @__PURE__ */ jsxs("div", { className: "p-3 rounded-lg bg-background-secondary border border-border-secondary", children: [
1170
- /* @__PURE__ */ jsx("p", { className: "text-xs text-text-secondary", children: "Active" }),
1171
- /* @__PURE__ */ jsx("p", { className: "text-xl font-bold text-emerald-400", children: allRows.filter((r) => r.status === "ACTIVE").length })
1172
- ] }),
1173
- /* @__PURE__ */ jsxs("div", { className: "p-3 rounded-lg bg-background-secondary border border-border-secondary", children: [
1174
- /* @__PURE__ */ jsx("p", { className: "text-xs text-text-secondary", children: "Draft" }),
1175
- /* @__PURE__ */ jsx("p", { className: "text-xl font-bold text-amber-400", children: allRows.filter((r) => r.status === "DRAFT").length })
1176
- ] })
1145
+ /* @__PURE__ */ jsxs("div", { className: "grid grid-cols-2 sm:grid-cols-5 gap-3 mb-6", children: [
1146
+ /* @__PURE__ */ jsx(StatCard, { label: "Total Versions", value: total || allRows.length }),
1147
+ /* @__PURE__ */ jsx(StatCard, { label: "Workflows", value: distinctWorkflows.length }),
1148
+ /* @__PURE__ */ jsx(
1149
+ StatCard,
1150
+ {
1151
+ label: "Active",
1152
+ value: countByStatus("ACTIVE"),
1153
+ valueClassName: "text-[var(--color-status-success-text)]"
1154
+ }
1155
+ ),
1156
+ /* @__PURE__ */ jsx(
1157
+ StatCard,
1158
+ {
1159
+ label: "Draft",
1160
+ value: countByStatus("DRAFT"),
1161
+ valueClassName: "text-[var(--color-status-warning-text)]"
1162
+ }
1163
+ ),
1164
+ /* @__PURE__ */ jsx(StatCard, { label: "Archived", value: countByStatus("ARCHIVED") })
1165
+ ] }),
1166
+ hasMore && /* @__PURE__ */ jsxs("p", { className: "text-xs text-text-secondary mb-4", children: [
1167
+ "Showing the ",
1168
+ allRows.length,
1169
+ " most recent versions of ",
1170
+ total,
1171
+ "."
1177
1172
  ] }),
1178
1173
  error && /* @__PURE__ */ jsx("div", { className: "mb-6", children: /* @__PURE__ */ jsx(ErrorState, { message: error.message, onRetry: refetch }) }),
1179
- isVersionsLoading ? /* @__PURE__ */ jsx(HistoryTableSkeleton, {}) : filteredRows.length === 0 ? /* @__PURE__ */ jsx(EmptyState, {}) : /* @__PURE__ */ jsx("div", { className: "overflow-x-auto rounded-lg border border-border-secondary", children: /* @__PURE__ */ jsxs("table", { className: "w-full text-sm", children: [
1174
+ loading ? /* @__PURE__ */ jsx(HistoryTableSkeleton, {}) : filteredRows.length === 0 ? /* @__PURE__ */ jsx(EmptyState, {}) : /* @__PURE__ */ jsx("div", { className: "overflow-x-auto rounded-lg border border-border-secondary", children: /* @__PURE__ */ jsxs("table", { className: "w-full text-sm", children: [
1180
1175
  /* @__PURE__ */ jsx("thead", { children: /* @__PURE__ */ jsxs("tr", { className: "border-b border-border-secondary bg-background-secondary", children: [
1181
1176
  /* @__PURE__ */ jsx("th", { className: "text-left px-4 py-3 font-medium text-text-secondary", children: "Workflow Name" }),
1182
1177
  /* @__PURE__ */ jsx("th", { className: "text-left px-4 py-3 font-medium text-text-secondary", children: "Version" }),
@@ -1191,7 +1186,7 @@ function HistoryPage() {
1191
1186
  "tr",
1192
1187
  {
1193
1188
  className: "border-b border-border-secondary last:border-0 hover:bg-background-secondary/50 cursor-pointer transition-colors",
1194
- onClick: () => handleNavigateToVersion(row),
1189
+ onClick: () => handleNavigateToVersion(row.workflowKey, row.version),
1195
1190
  children: [
1196
1191
  /* @__PURE__ */ jsx("td", { className: "px-4 py-3", children: /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2", children: [
1197
1192
  /* @__PURE__ */ jsx(
@@ -1203,23 +1198,23 @@ function HistoryPage() {
1203
1198
  }
1204
1199
  ),
1205
1200
  /* @__PURE__ */ jsxs("div", { children: [
1206
- /* @__PURE__ */ jsx("p", { className: "font-medium text-text-primary", children: row.workflowName }),
1201
+ /* @__PURE__ */ jsx("p", { className: "font-medium text-text-primary", children: row.name }),
1207
1202
  /* @__PURE__ */ jsx("p", { className: "text-xs text-text-secondary", children: row.workflowKey })
1208
1203
  ] })
1209
1204
  ] }) }),
1210
1205
  /* @__PURE__ */ jsx("td", { className: "px-4 py-3", children: /* @__PURE__ */ jsx("code", { className: "text-xs bg-background-secondary px-2 py-0.5 rounded text-text-primary", children: row.version }) }),
1211
- /* @__PURE__ */ jsx("td", { className: "px-4 py-3", children: /* @__PURE__ */ jsx(
1212
- Badge,
1206
+ /* @__PURE__ */ jsx("td", { className: "px-4 py-3", children: /* @__PURE__ */ jsx(Badge, { variant: statusStyle.variant, children: statusStyle.label }) }),
1207
+ /* @__PURE__ */ jsx("td", { className: "px-4 py-3 text-text-secondary", children: /* @__PURE__ */ jsxs(
1208
+ "div",
1213
1209
  {
1214
- variant: "outline",
1215
- className: statusStyle.className,
1216
- children: statusStyle.label
1210
+ className: "flex items-center gap-1.5",
1211
+ title: row.createdById ?? void 0,
1212
+ children: [
1213
+ /* @__PURE__ */ jsx(Icon, { icon: "mdi:account", width: 16 }),
1214
+ /* @__PURE__ */ jsx("span", { className: "truncate max-w-[160px]", children: changedByLabel(row.createdById) })
1215
+ ]
1217
1216
  }
1218
1217
  ) }),
1219
- /* @__PURE__ */ jsx("td", { className: "px-4 py-3 text-text-secondary", children: /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-1.5", children: [
1220
- /* @__PURE__ */ jsx(Icon, { icon: "mdi:account", width: 16 }),
1221
- /* @__PURE__ */ jsx("span", { className: "truncate max-w-[120px]", children: row.createdBy })
1222
- ] }) }),
1223
1218
  /* @__PURE__ */ jsx("td", { className: "px-4 py-3 text-text-secondary", children: formatDate(row.updatedAt) }),
1224
1219
  /* @__PURE__ */ jsx("td", { className: "px-4 py-3 text-right", children: /* @__PURE__ */ jsx(TooltipProvider, { children: /* @__PURE__ */ jsxs(Tooltip, { children: [
1225
1220
  /* @__PURE__ */ jsx(TooltipTrigger, { asChild: true, children: /* @__PURE__ */ jsx(
@@ -1227,7 +1222,10 @@ function HistoryPage() {
1227
1222
  {
1228
1223
  onClick: (e) => {
1229
1224
  e.stopPropagation();
1230
- handleNavigateToVersion(row);
1225
+ handleNavigateToVersion(
1226
+ row.workflowKey,
1227
+ row.version
1228
+ );
1231
1229
  },
1232
1230
  className: "p-1.5 rounded hover:bg-background-secondary text-text-secondary hover:text-text-primary transition-colors",
1233
1231
  children: /* @__PURE__ */ jsx(Icon, { icon: "mdi:open-in-new", width: 16 })
@@ -1237,7 +1235,7 @@ function HistoryPage() {
1237
1235
  ] }) }) })
1238
1236
  ]
1239
1237
  },
1240
- `${row.workflowKey}-${row.version}-${row.id}`
1238
+ row.id
1241
1239
  );
1242
1240
  }) })
1243
1241
  ] }) }),