@burdenoff/microfe-bigconsole 2026.924.2 → 2026.924.3

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 (124) hide show
  1. package/dist/bigconsole/BigConsoleRoutes.js +137 -138
  2. package/dist/bigconsole/BigConsoleRoutes.js.map +1 -1
  3. package/dist/bigconsole/assistant/previewController.js +10 -10
  4. package/dist/bigconsole/components/DrilldownDashboardRenderer.js +17 -17
  5. package/dist/bigconsole/components/builder/inspector/DataBindingSection.js +32 -32
  6. package/dist/bigconsole/components/dashboard/CreateDashboardDialog.js +52 -52
  7. package/dist/bigconsole/components/dashboard/CreateDashboardDialog.js.map +1 -1
  8. package/dist/bigconsole/components/dashboard/DashboardCanvas.js +7 -7
  9. package/dist/bigconsole/components/dashboard/DashboardStatusPill.js +53 -0
  10. package/dist/bigconsole/components/dashboard/DashboardStatusPill.js.map +1 -0
  11. package/dist/bigconsole/components/dashboard/DashboardToolbar.js +60 -60
  12. package/dist/bigconsole/components/dashboard/DrilldownBreadcrumb.js +21 -21
  13. package/dist/bigconsole/components/dashboard/GlobalFiltersBar/FilterChip.js +30 -30
  14. package/dist/bigconsole/components/dashboard/GlobalFiltersBar/FilterEditor.js +36 -36
  15. package/dist/bigconsole/components/dashboard/GlobalFiltersBar/FilterPresetSelector.js +34 -34
  16. package/dist/bigconsole/components/dashboard/GlobalFiltersBar/GlobalFiltersBar.js +38 -38
  17. package/dist/bigconsole/components/dashboard/GlobalFiltersBar/GlobalFiltersBar.js.map +1 -1
  18. package/dist/bigconsole/components/dashboard/ImportDashboardDialog.js +121 -121
  19. package/dist/bigconsole/components/dashboard/ImportDashboardDialog.js.map +1 -1
  20. package/dist/bigconsole/components/dashboard/PublishToStoreDialog.js +22 -22
  21. package/dist/bigconsole/components/dashboard/SavedViewsDropdown/SavedViewsDropdown.js +46 -46
  22. package/dist/bigconsole/components/dashboard/ShareDialog/EmbedTab.js +53 -53
  23. package/dist/bigconsole/components/dashboard/TemplatePicker/TemplatePicker.js +1 -1
  24. package/dist/bigconsole/components/dashboard/WidgetPalette.js +47 -47
  25. package/dist/bigconsole/components/dashboard/index.js +1 -0
  26. package/dist/bigconsole/components/datasink/CacheTTLSelector.js +35 -35
  27. package/dist/bigconsole/components/datasink/DataSinkDeleteDialog.js +18 -18
  28. package/dist/bigconsole/components/datasink/DataSinkRefreshDialog.js +20 -20
  29. package/dist/bigconsole/components/datasink/DataSinkStatusBadge.js +30 -29
  30. package/dist/bigconsole/components/datasink/DataSinkStatusBadge.js.map +1 -1
  31. package/dist/bigconsole/components/datasink/ImportDataGuideDialog.js +48 -48
  32. package/dist/bigconsole/components/datasink/ImportDataSinkDialog.js +103 -103
  33. package/dist/bigconsole/components/datasink/ImportDataSinkDialog.js.map +1 -1
  34. package/dist/bigconsole/components/datasink/RefreshTypeSelector.js +35 -35
  35. package/dist/bigconsole/components/overview/DashboardGuide.js +214 -0
  36. package/dist/bigconsole/components/overview/DashboardGuide.js.map +1 -0
  37. package/dist/bigconsole/components/overview/DataHealthCard.js +97 -0
  38. package/dist/bigconsole/components/overview/DataHealthCard.js.map +1 -0
  39. package/dist/bigconsole/components/overview/OverviewQuickActions.js +32 -0
  40. package/dist/bigconsole/components/overview/OverviewQuickActions.js.map +1 -0
  41. package/dist/bigconsole/components/overview/OverviewStatCard.js +57 -0
  42. package/dist/bigconsole/components/overview/OverviewStatCard.js.map +1 -0
  43. package/dist/bigconsole/components/overview/RecentDashboardsPanel.js +107 -0
  44. package/dist/bigconsole/components/overview/RecentDashboardsPanel.js.map +1 -0
  45. package/dist/bigconsole/components/overview/dashboardGuideSteps.js +119 -0
  46. package/dist/bigconsole/components/overview/dashboardGuideSteps.js.map +1 -0
  47. package/dist/bigconsole/components/overview/index.js +8 -0
  48. package/dist/bigconsole/components/overview/overviewModel.js +119 -0
  49. package/dist/bigconsole/components/overview/overviewModel.js.map +1 -0
  50. package/dist/bigconsole/components/overview/useOverviewData.js +48 -0
  51. package/dist/bigconsole/components/overview/useOverviewData.js.map +1 -0
  52. package/dist/bigconsole/components/parser/DataSinkSelector.js +40 -40
  53. package/dist/bigconsole/components/parser/ImportParserDialog.js +127 -127
  54. package/dist/bigconsole/components/parser/ImportParserDialog.js.map +1 -1
  55. package/dist/bigconsole/components/parser/ParserSelector.js +51 -51
  56. package/dist/bigconsole/components/preview/AiPreviewContent.js +5 -5
  57. package/dist/bigconsole/components/preview/AiPreviewMiniPanel.js +33 -33
  58. package/dist/bigconsole/components/preview/AiPreviewPanel.js +38 -38
  59. package/dist/bigconsole/components/widgets/ActionConfigDialog.js +13 -13
  60. package/dist/bigconsole/components/widgets/DrilldownConfigPanel.js +70 -70
  61. package/dist/bigconsole/components/widgets/PropertiesPanel.js +28 -28
  62. package/dist/bigconsole/components/widgets/calendar/CalendarWidget.js +25 -25
  63. package/dist/bigconsole/components/widgets/chart/ChartConfig.js +48 -48
  64. package/dist/bigconsole/components/widgets/comments/WidgetComments.js +46 -46
  65. package/dist/bigconsole/components/widgets/event-logs/EventLogViewer.js +61 -61
  66. package/dist/bigconsole/components/widgets/form/FormWidget.js +36 -36
  67. package/dist/bigconsole/components/widgets/gauge/GaugeConfig.js +42 -42
  68. package/dist/bigconsole/components/widgets/heatmap/HeatmapConfig.js +25 -25
  69. package/dist/bigconsole/components/widgets/kanban/KanbanWidget.js +21 -21
  70. package/dist/bigconsole/components/widgets/list/ListConfig.js +30 -30
  71. package/dist/bigconsole/components/widgets/metric-card/MetricCardConfig.js +38 -38
  72. package/dist/bigconsole/components/widgets/metric-card/SparklineChart.js +9 -9
  73. package/dist/bigconsole/components/widgets/metric-card/TrendIndicator.js +9 -9
  74. package/dist/bigconsole/components/widgets/pivot-table/PivotTableWidget.js +49 -49
  75. package/dist/bigconsole/components/widgets/progress/ProgressConfig.js +39 -39
  76. package/dist/bigconsole/components/widgets/table/TableConfig.js +73 -73
  77. package/dist/bigconsole/components/widgets/webhook-config/WebhookConfigPanel.js +64 -64
  78. package/dist/bigconsole/customWidget/CustomWidgetBuilderSheet.js +10 -10
  79. package/dist/bigconsole/customWidget/CustomWidgetProposalPanel.js +68 -68
  80. package/dist/bigconsole/customWidget/CustomWidgetProposalPanel.js.map +1 -1
  81. package/dist/bigconsole/pages/AdminPage.js +136 -136
  82. package/dist/bigconsole/pages/DashboardBuilderPage.js +10 -10
  83. package/dist/bigconsole/pages/DashboardViewPage.js +61 -61
  84. package/dist/bigconsole/pages/DashboardViewPage.js.map +1 -1
  85. package/dist/bigconsole/pages/DashboardsPage.js +327 -348
  86. package/dist/bigconsole/pages/DashboardsPage.js.map +1 -1
  87. package/dist/bigconsole/pages/DataParsersPage.js +5 -5
  88. package/dist/bigconsole/pages/DataSinkBuilderPage.js +10 -10
  89. package/dist/bigconsole/pages/DataSinkBuilderPage.js.map +1 -1
  90. package/dist/bigconsole/pages/DataSinkViewPage.js +83 -83
  91. package/dist/bigconsole/pages/DataSinkViewPage.js.map +1 -1
  92. package/dist/bigconsole/pages/DataSinksPage.js +11 -11
  93. package/dist/bigconsole/pages/DataSourcesPage.js +5 -5
  94. package/dist/bigconsole/pages/InsightsPage.js +315 -315
  95. package/dist/bigconsole/pages/InsightsPage.js.map +1 -1
  96. package/dist/bigconsole/pages/OverviewPage.js +244 -0
  97. package/dist/bigconsole/pages/OverviewPage.js.map +1 -0
  98. package/dist/bigconsole/pages/ParserBuilderPage.js +5 -5
  99. package/dist/bigconsole/pages/ParserViewPage.js +98 -98
  100. package/dist/bigconsole/pages/ParserViewPage.js.map +1 -1
  101. package/dist/bigconsole/pages/PipelineBuilderPage.js +8 -8
  102. package/dist/bigconsole/pages/PipelineViewPage.js +46 -46
  103. package/dist/bigconsole/pages/PipelineViewPage.js.map +1 -1
  104. package/dist/bigconsole/pages/PipelinesPage.js +80 -80
  105. package/dist/bigconsole/pages/PipelinesPage.js.map +1 -1
  106. package/dist/bigconsole/pages/SettingsPage.js +70 -70
  107. package/dist/bigconsole/pages/WidgetDemoPage.js +42 -42
  108. package/dist/bigconsole/pages/WorkflowViewPage.js +200 -200
  109. package/dist/bigconsole/pages/WorkflowViewPage.js.map +1 -1
  110. package/dist/bigconsole/pages/WorkflowsPage.js +78 -78
  111. package/dist/bigconsole/pages/WorkflowsPage.js.map +1 -1
  112. package/dist/bigconsole/renderers/adapters/AdaptiveCardRenderer.js +34 -34
  113. package/dist/bigconsole/renderers/adapters/BlockKitRenderer.js +79 -79
  114. package/dist/bigconsole/renderers/adapters/CustomRenderer.js +46 -46
  115. package/dist/bigconsole/utils/createDialogParam.js +14 -0
  116. package/dist/bigconsole/utils/createDialogParam.js.map +1 -0
  117. package/dist/generated/global-operations.js +1 -1
  118. package/dist/generated/wspace-operations.js +285 -222
  119. package/dist/generated/wspace-operations.js.map +1 -1
  120. package/dist/shared/hooks/useTr.js +10 -7
  121. package/dist/shared/hooks/useTr.js.map +1 -1
  122. package/package.json +1 -1
  123. package/dist/bigconsole/pages/HomePage.js +0 -318
  124. package/dist/bigconsole/pages/HomePage.js.map +0 -1
@@ -1,291 +1,290 @@
1
1
  import { useAppNavigate as e } from "./contexts/NavigationContext.js";
2
2
  import "./contexts/index.js";
3
- import t from "./pages/HomePage.js";
4
- import { GetWorkflowDocument as n } from "../generated/wspace-operations.js";
5
- import r from "./hooks/useWorkflowOperations.js";
6
- import { BOOTSTRAP_RETRY_DELAY_MS as i } from "./constants.js";
7
- import { Suspense as a, lazy as o, memo as s, useEffect as c, useMemo as l, useRef as u, useState as d } from "react";
8
- import { Navigate as f, Route as p, Routes as m, useParams as h } from "react-router";
3
+ import { GetWorkflowDocument as t } from "../generated/wspace-operations.js";
4
+ import n from "./hooks/useWorkflowOperations.js";
5
+ import { BOOTSTRAP_RETRY_DELAY_MS as r } from "./constants.js";
6
+ import { Suspense as i, lazy as a, memo as o, useEffect as s, useMemo as c, useRef as l, useState as u } from "react";
7
+ import { Navigate as d, Route as f, Routes as p, useParams as m } from "react-router";
8
+ import { Spinner as h } from "@burdenoff/fe-libs/ui";
9
9
  import { useApolloClient as g } from "@apollo/client/react";
10
- import { Spinner as _ } from "@burdenoff/fe-libs/ui";
11
- import { jsx as v, jsxs as y } from "react/jsx-runtime";
12
- import { ExecutionDetailPage as b, ExecutionsListPage as x, HistoryPage as S, NodesPage as C, SettingsPage as w, TemplatesPage as T, WorkflowBuilderPage as E } from "@burdenoff/fluidgrids-fe-sdk";
10
+ import { jsx as _, jsxs as v } from "react/jsx-runtime";
11
+ import { ExecutionDetailPage as y, ExecutionsListPage as b, HistoryPage as x, NodesPage as S, SettingsPage as C, TemplatesPage as w, WorkflowBuilderPage as T } from "@burdenoff/fluidgrids-fe-sdk";
13
12
  //#region src/bigconsole/BigConsoleRoutes.tsx
14
- var D = o(() => import("./pages/DashboardsPage.js")), O = o(() => import("./pages/DashboardViewPage.js")), k = o(() => import("./pages/DashboardBuilderPage.js")), A = o(() => import("./pages/DataSourcesPage.js")), j = o(() => import("./pages/InsightsPage.js")), M = o(() => import("./pages/SettingsPage.js")), N = o(() => import("./pages/WidgetDemoPage.js")), P = o(() => import("./pages/WorkflowsPage.js").then((e) => ({ default: e.WorkflowsPage }))), F = o(() => import("./pages/WorkflowViewPage.js").then((e) => ({ default: e.WorkflowViewPage }))), I = o(() => import("./pages/DataSinksPage.js")), L = o(() => import("./pages/DataSinkViewPage.js")), R = o(() => import("./pages/DataSinkBuilderPage.js")), z = o(() => import("./pages/DataParsersPage.js")), B = o(() => import("./pages/ParserViewPage.js")), V = o(() => import("./pages/ParserBuilderPage.js")), H = o(() => import("./pages/PipelinesPage.js")), U = o(() => import("./pages/PipelineViewPage.js")), W = o(() => import("./pages/PipelineBuilderPage.js"));
13
+ var E = a(() => import("./pages/OverviewPage.js")), D = a(() => import("./pages/DashboardsPage.js")), O = a(() => import("./pages/DashboardViewPage.js")), k = a(() => import("./pages/DashboardBuilderPage.js")), A = a(() => import("./pages/DataSourcesPage.js")), j = a(() => import("./pages/InsightsPage.js")), M = a(() => import("./pages/SettingsPage.js")), N = a(() => import("./pages/WidgetDemoPage.js")), P = a(() => import("./pages/WorkflowsPage.js").then((e) => ({ default: e.WorkflowsPage }))), F = a(() => import("./pages/WorkflowViewPage.js").then((e) => ({ default: e.WorkflowViewPage }))), I = a(() => import("./pages/DataSinksPage.js")), L = a(() => import("./pages/DataSinkViewPage.js")), R = a(() => import("./pages/DataSinkBuilderPage.js")), z = a(() => import("./pages/DataParsersPage.js")), B = a(() => import("./pages/ParserViewPage.js")), V = a(() => import("./pages/ParserBuilderPage.js")), H = a(() => import("./pages/PipelinesPage.js")), U = a(() => import("./pages/PipelineViewPage.js")), W = a(() => import("./pages/PipelineBuilderPage.js"));
15
14
  function G() {
16
- return /* @__PURE__ */ v("div", {
15
+ return /* @__PURE__ */ _("div", {
17
16
  className: "flex items-center justify-center min-h-[400px]",
18
- children: /* @__PURE__ */ v(_, { className: "h-8 w-8" })
17
+ children: /* @__PURE__ */ _(h, { className: "h-8 w-8" })
19
18
  });
20
19
  }
21
20
  var K = () => `/workflows/workflow/${crypto.randomUUID()}/v1`;
22
21
  function q() {
23
- return /* @__PURE__ */ v(f, {
24
- to: l(() => K(), []),
22
+ return /* @__PURE__ */ _(d, {
23
+ to: c(() => K(), []),
25
24
  replace: !0
26
25
  });
27
26
  }
28
- var J = s(function() {
29
- let { workflowId: t } = h(), n = e(), { fetchWorkflow: a } = r({ skipFetch: !0 }), [o, s] = d(null), l = u(0);
30
- return c(() => {
27
+ var J = o(function() {
28
+ let { workflowId: t } = m(), i = e(), { fetchWorkflow: a } = n({ skipFetch: !0 }), [o, c] = u(null), d = l(0);
29
+ return s(() => {
31
30
  if (!t) {
32
- s("No workflow ID provided");
31
+ c("No workflow ID provided");
33
32
  return;
34
33
  }
35
- l.current = 0, s(null);
36
- let e = !1, r = (o) => {
37
- e || (o?.key ? n(`/workflows/workflow/${o.key}/v1`, { replace: !0 }) : o ? n("/workflows/builder", { replace: !0 }) : l.current < 1 ? (l.current += 1, setTimeout(() => {
38
- e || a(t).then(r).catch((t) => {
39
- e || s(t?.message ?? "Failed to load workflow");
34
+ d.current = 0, c(null);
35
+ let e = !1, n = (o) => {
36
+ e || (o?.key ? i(`/workflows/workflow/${o.key}/v1`, { replace: !0 }) : o ? i("/workflows/builder", { replace: !0 }) : d.current < 1 ? (d.current += 1, setTimeout(() => {
37
+ e || a(t).then(n).catch((t) => {
38
+ e || c(t?.message ?? "Failed to load workflow");
40
39
  });
41
- }, i)) : s("Workflow not found"));
40
+ }, r)) : c("Workflow not found"));
42
41
  };
43
- return a(t).then(r).catch((t) => {
44
- e || s(t?.message ?? "Failed to load workflow");
42
+ return a(t).then(n).catch((t) => {
43
+ e || c(t?.message ?? "Failed to load workflow");
45
44
  }), () => {
46
45
  e = !0;
47
46
  };
48
47
  }, [
49
48
  t,
50
49
  a,
51
- n
52
- ]), o ? /* @__PURE__ */ y("div", {
50
+ i
51
+ ]), o ? /* @__PURE__ */ v("div", {
53
52
  className: "p-6 flex flex-col items-center justify-center min-h-[400px] text-center gap-4",
54
- children: [/* @__PURE__ */ v("p", {
53
+ children: [/* @__PURE__ */ _("p", {
55
54
  className: "text-sm text-text-secondary",
56
55
  children: o
57
- }), /* @__PURE__ */ v("button", {
56
+ }), /* @__PURE__ */ _("button", {
58
57
  type: "button",
59
- onClick: () => n("/workflows"),
58
+ onClick: () => i("/workflows"),
60
59
  className: "px-4 py-2 text-sm font-medium text-text-primary bg-bg-sunken hover:bg-border-default rounded-md transition-colors",
61
60
  children: "Back to Workflows"
62
61
  })]
63
- }) : /* @__PURE__ */ v("div", {
62
+ }) : /* @__PURE__ */ _("div", {
64
63
  className: "flex items-center justify-center min-h-[400px]",
65
- children: /* @__PURE__ */ v(_, { className: "h-8 w-8" })
64
+ children: /* @__PURE__ */ _(h, { className: "h-8 w-8" })
66
65
  });
67
- }), Y = /^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/i, X = s(function() {
68
- let { id: t, version: r } = h(), a = e(), o = g(), s = !!t && Y.test(t), [l, f] = d(null), [p, m] = d(null), [b, x] = d(0), S = u(0);
69
- return c(() => {
70
- if (!t || !s) return;
66
+ }), Y = /^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/i, X = o(function() {
67
+ let { id: n, version: i } = m(), a = e(), o = g(), c = !!n && Y.test(n), [d, f] = u(null), [p, y] = u(null), [b, x] = u(0), S = l(0);
68
+ return s(() => {
69
+ if (!n || !c) return;
71
70
  S.current = 0;
72
- let e = !1, c = r ?? "v1", l = () => {
71
+ let e = !1, s = i ?? "v1", l = () => {
73
72
  o.query({
74
- query: n,
75
- variables: { id: t },
73
+ query: t,
74
+ variables: { id: n },
76
75
  fetchPolicy: "network-only"
77
- }).then((n) => {
76
+ }).then((t) => {
78
77
  if (e) return;
79
- let r = n.data?.workflow;
80
- r ? r.key && r.key !== t ? a(`/workflows/workflow/${encodeURIComponent(r.key)}/${c}`, { replace: !0 }) : a("/workflows/builder", { replace: !0 }) : f(t);
78
+ let r = t.data?.workflow;
79
+ r ? r.key && r.key !== n ? a(`/workflows/workflow/${encodeURIComponent(r.key)}/${s}`, { replace: !0 }) : a("/workflows/builder", { replace: !0 }) : f(n);
81
80
  }).catch(() => {
82
81
  e || (S.current < 1 ? (S.current += 1, setTimeout(() => {
83
82
  e || l();
84
- }, i)) : m(t));
83
+ }, r)) : y(n));
85
84
  });
86
85
  };
87
86
  return l(), () => {
88
87
  e = !0;
89
88
  };
90
89
  }, [
91
- t,
92
- s,
93
- r,
90
+ n,
91
+ c,
92
+ i,
94
93
  o,
95
94
  a,
96
95
  b
97
- ]), !s || l === t ? /* @__PURE__ */ v(E, {}) : p === t ? /* @__PURE__ */ y("div", {
96
+ ]), !c || d === n ? /* @__PURE__ */ _(T, {}) : p === n ? /* @__PURE__ */ v("div", {
98
97
  className: "p-6 flex flex-col items-center justify-center min-h-[400px] text-center gap-4",
99
- children: [/* @__PURE__ */ v("p", {
98
+ children: [/* @__PURE__ */ _("p", {
100
99
  className: "text-sm text-text-secondary",
101
100
  children: "Couldn't load this workflow. Please try again."
102
- }), /* @__PURE__ */ y("div", {
101
+ }), /* @__PURE__ */ v("div", {
103
102
  className: "flex items-center gap-2",
104
- children: [/* @__PURE__ */ v("button", {
103
+ children: [/* @__PURE__ */ _("button", {
105
104
  type: "button",
106
105
  onClick: () => {
107
- m(null), x((e) => e + 1);
106
+ y(null), x((e) => e + 1);
108
107
  },
109
108
  className: "px-4 py-2 text-sm font-medium text-action-primary-fg bg-action-primary-bg hover:bg-action-primary-bgHover rounded-md transition-colors",
110
109
  children: "Try again"
111
- }), /* @__PURE__ */ v("button", {
110
+ }), /* @__PURE__ */ _("button", {
112
111
  type: "button",
113
112
  onClick: () => a("/workflows"),
114
113
  className: "px-4 py-2 text-sm font-medium text-text-primary bg-bg-sunken hover:bg-border-default rounded-md transition-colors",
115
114
  children: "Back to Workflows"
116
115
  })]
117
116
  })]
118
- }) : /* @__PURE__ */ v("div", {
117
+ }) : /* @__PURE__ */ _("div", {
119
118
  className: "flex items-center justify-center min-h-[400px]",
120
- children: /* @__PURE__ */ v(_, { className: "h-8 w-8" })
119
+ children: /* @__PURE__ */ _(h, { className: "h-8 w-8" })
121
120
  });
122
121
  });
123
122
  function Z(e) {
124
- return /* @__PURE__ */ v(a, {
125
- fallback: /* @__PURE__ */ v(G, {}),
126
- children: /* @__PURE__ */ y(m, { children: [
127
- /* @__PURE__ */ v(p, {
123
+ return /* @__PURE__ */ _(i, {
124
+ fallback: /* @__PURE__ */ _(G, {}),
125
+ children: /* @__PURE__ */ v(p, { children: [
126
+ /* @__PURE__ */ _(f, {
128
127
  path: "/",
129
- element: /* @__PURE__ */ v(t, {})
128
+ element: /* @__PURE__ */ _(E, {})
130
129
  }),
131
- /* @__PURE__ */ v(p, {
130
+ /* @__PURE__ */ _(f, {
132
131
  path: "/dashboards",
133
- element: /* @__PURE__ */ v(D, {})
132
+ element: /* @__PURE__ */ _(D, {})
134
133
  }),
135
- /* @__PURE__ */ v(p, {
134
+ /* @__PURE__ */ _(f, {
136
135
  path: "/dashboards/:dashboardId",
137
- element: /* @__PURE__ */ v(O, {})
136
+ element: /* @__PURE__ */ _(O, {})
138
137
  }),
139
- /* @__PURE__ */ v(p, {
138
+ /* @__PURE__ */ _(f, {
140
139
  path: "/dashboards/:dashboardId/builder",
141
- element: /* @__PURE__ */ v(k, {})
140
+ element: /* @__PURE__ */ _(k, {})
142
141
  }),
143
- /* @__PURE__ */ v(p, {
142
+ /* @__PURE__ */ _(f, {
144
143
  path: "/datasources",
145
- element: /* @__PURE__ */ v(A, {})
144
+ element: /* @__PURE__ */ _(A, {})
146
145
  }),
147
- /* @__PURE__ */ v(p, {
146
+ /* @__PURE__ */ _(f, {
148
147
  path: "/insights",
149
- element: /* @__PURE__ */ v(j, {})
148
+ element: /* @__PURE__ */ _(j, {})
150
149
  }),
151
- /* @__PURE__ */ v(p, {
150
+ /* @__PURE__ */ _(f, {
152
151
  path: "/settings",
153
- element: /* @__PURE__ */ v(M, {})
152
+ element: /* @__PURE__ */ _(M, {})
154
153
  }),
155
- /* @__PURE__ */ v(p, {
154
+ /* @__PURE__ */ _(f, {
156
155
  path: "/widgets/demo",
157
- element: /* @__PURE__ */ v(N, {})
156
+ element: /* @__PURE__ */ _(N, {})
158
157
  }),
159
- /* @__PURE__ */ v(p, {
158
+ /* @__PURE__ */ _(f, {
160
159
  path: "/datasinks",
161
- element: /* @__PURE__ */ v(I, {})
160
+ element: /* @__PURE__ */ _(I, {})
162
161
  }),
163
- /* @__PURE__ */ v(p, {
162
+ /* @__PURE__ */ _(f, {
164
163
  path: "/datasinks/new",
165
- element: /* @__PURE__ */ v(R, {})
164
+ element: /* @__PURE__ */ _(R, {})
166
165
  }),
167
- /* @__PURE__ */ v(p, {
166
+ /* @__PURE__ */ _(f, {
168
167
  path: "/datasinks/:dataSinkId",
169
- element: /* @__PURE__ */ v(L, {})
168
+ element: /* @__PURE__ */ _(L, {})
170
169
  }),
171
- /* @__PURE__ */ v(p, {
170
+ /* @__PURE__ */ _(f, {
172
171
  path: "/datasinks/:dataSinkId/edit",
173
- element: /* @__PURE__ */ v(R, {})
172
+ element: /* @__PURE__ */ _(R, {})
174
173
  }),
175
- /* @__PURE__ */ v(p, {
174
+ /* @__PURE__ */ _(f, {
176
175
  path: "/parsers",
177
- element: /* @__PURE__ */ v(z, {})
176
+ element: /* @__PURE__ */ _(z, {})
178
177
  }),
179
- /* @__PURE__ */ v(p, {
178
+ /* @__PURE__ */ _(f, {
180
179
  path: "/parsers/new",
181
- element: /* @__PURE__ */ v(V, {})
180
+ element: /* @__PURE__ */ _(V, {})
182
181
  }),
183
- /* @__PURE__ */ v(p, {
182
+ /* @__PURE__ */ _(f, {
184
183
  path: "/parsers/:parserId",
185
- element: /* @__PURE__ */ v(B, {})
184
+ element: /* @__PURE__ */ _(B, {})
186
185
  }),
187
- /* @__PURE__ */ v(p, {
186
+ /* @__PURE__ */ _(f, {
188
187
  path: "/parsers/:parserId/edit",
189
- element: /* @__PURE__ */ v(V, {})
188
+ element: /* @__PURE__ */ _(V, {})
190
189
  }),
191
- /* @__PURE__ */ v(p, {
190
+ /* @__PURE__ */ _(f, {
192
191
  path: "/dashboards/:consoleId/parsers",
193
- element: /* @__PURE__ */ v(z, {})
192
+ element: /* @__PURE__ */ _(z, {})
194
193
  }),
195
- /* @__PURE__ */ v(p, {
194
+ /* @__PURE__ */ _(f, {
196
195
  path: "/dashboards/:consoleId/parsers/new",
197
- element: /* @__PURE__ */ v(V, {})
196
+ element: /* @__PURE__ */ _(V, {})
198
197
  }),
199
- /* @__PURE__ */ v(p, {
198
+ /* @__PURE__ */ _(f, {
200
199
  path: "/dashboards/:consoleId/parsers/:parserId",
201
- element: /* @__PURE__ */ v(B, {})
200
+ element: /* @__PURE__ */ _(B, {})
202
201
  }),
203
- /* @__PURE__ */ v(p, {
202
+ /* @__PURE__ */ _(f, {
204
203
  path: "/dashboards/:consoleId/parsers/:parserId/edit",
205
- element: /* @__PURE__ */ v(V, {})
204
+ element: /* @__PURE__ */ _(V, {})
206
205
  }),
207
- /* @__PURE__ */ v(p, {
206
+ /* @__PURE__ */ _(f, {
208
207
  path: "/workflows",
209
- element: /* @__PURE__ */ v(P, {})
208
+ element: /* @__PURE__ */ _(P, {})
210
209
  }),
211
- /* @__PURE__ */ v(p, {
210
+ /* @__PURE__ */ _(f, {
212
211
  path: "/workflows/list",
213
- element: /* @__PURE__ */ v(P, {})
212
+ element: /* @__PURE__ */ _(P, {})
214
213
  }),
215
- /* @__PURE__ */ v(p, {
214
+ /* @__PURE__ */ _(f, {
216
215
  path: "/workflows/new",
217
- element: /* @__PURE__ */ v(q, {})
216
+ element: /* @__PURE__ */ _(q, {})
218
217
  }),
219
- /* @__PURE__ */ v(p, {
218
+ /* @__PURE__ */ _(f, {
220
219
  path: "/workflows/builder",
221
- element: /* @__PURE__ */ v(E, {})
220
+ element: /* @__PURE__ */ _(T, {})
222
221
  }),
223
- /* @__PURE__ */ v(p, {
222
+ /* @__PURE__ */ _(f, {
224
223
  path: "/workflows/builder/:id/:version",
225
- element: /* @__PURE__ */ v(X, {})
224
+ element: /* @__PURE__ */ _(X, {})
226
225
  }),
227
- /* @__PURE__ */ v(p, {
226
+ /* @__PURE__ */ _(f, {
228
227
  path: "/workflows/workflow/:id/:version",
229
- element: /* @__PURE__ */ v(X, {})
228
+ element: /* @__PURE__ */ _(X, {})
230
229
  }),
231
- /* @__PURE__ */ v(p, {
230
+ /* @__PURE__ */ _(f, {
232
231
  path: "/workflows/runs",
233
- element: /* @__PURE__ */ v(x, {})
232
+ element: /* @__PURE__ */ _(b, {})
234
233
  }),
235
- /* @__PURE__ */ v(p, {
234
+ /* @__PURE__ */ _(f, {
236
235
  path: "/workflows/runs/:runId",
237
- element: /* @__PURE__ */ v(b, {})
236
+ element: /* @__PURE__ */ _(y, {})
238
237
  }),
239
- /* @__PURE__ */ v(p, {
238
+ /* @__PURE__ */ _(f, {
240
239
  path: "/workflows/history",
241
- element: /* @__PURE__ */ v(S, {})
240
+ element: /* @__PURE__ */ _(x, {})
242
241
  }),
243
- /* @__PURE__ */ v(p, {
242
+ /* @__PURE__ */ _(f, {
244
243
  path: "/workflows/templates",
245
- element: /* @__PURE__ */ v(T, {})
244
+ element: /* @__PURE__ */ _(w, {})
246
245
  }),
247
- /* @__PURE__ */ v(p, {
246
+ /* @__PURE__ */ _(f, {
248
247
  path: "/workflows/nodes",
249
- element: /* @__PURE__ */ v(C, {})
248
+ element: /* @__PURE__ */ _(S, {})
250
249
  }),
251
- /* @__PURE__ */ v(p, {
250
+ /* @__PURE__ */ _(f, {
252
251
  path: "/workflows/settings",
253
- element: /* @__PURE__ */ v(w, {})
252
+ element: /* @__PURE__ */ _(C, {})
254
253
  }),
255
- /* @__PURE__ */ v(p, {
254
+ /* @__PURE__ */ _(f, {
256
255
  path: "/workflows/:workflowId",
257
- element: /* @__PURE__ */ v(F, {})
256
+ element: /* @__PURE__ */ _(F, {})
258
257
  }),
259
- /* @__PURE__ */ v(p, {
258
+ /* @__PURE__ */ _(f, {
260
259
  path: "/workflows/:workflowId/edit",
261
- element: /* @__PURE__ */ v(J, {})
260
+ element: /* @__PURE__ */ _(J, {})
262
261
  }),
263
- /* @__PURE__ */ v(p, {
262
+ /* @__PURE__ */ _(f, {
264
263
  path: "/workflow/:id/:version",
265
- element: /* @__PURE__ */ v(X, {})
264
+ element: /* @__PURE__ */ _(X, {})
266
265
  }),
267
- /* @__PURE__ */ v(p, {
266
+ /* @__PURE__ */ _(f, {
268
267
  path: "/list",
269
- element: /* @__PURE__ */ v(f, {
268
+ element: /* @__PURE__ */ _(d, {
270
269
  to: "/bigconsole/workflows/list",
271
270
  replace: !0
272
271
  })
273
272
  }),
274
- /* @__PURE__ */ v(p, {
273
+ /* @__PURE__ */ _(f, {
275
274
  path: "/pipelines",
276
- element: /* @__PURE__ */ v(H, {})
275
+ element: /* @__PURE__ */ _(H, {})
277
276
  }),
278
- /* @__PURE__ */ v(p, {
277
+ /* @__PURE__ */ _(f, {
279
278
  path: "/pipelines/new",
280
- element: /* @__PURE__ */ v(W, {})
279
+ element: /* @__PURE__ */ _(W, {})
281
280
  }),
282
- /* @__PURE__ */ v(p, {
281
+ /* @__PURE__ */ _(f, {
283
282
  path: "/pipelines/:pipelineId",
284
- element: /* @__PURE__ */ v(U, {})
283
+ element: /* @__PURE__ */ _(U, {})
285
284
  }),
286
- /* @__PURE__ */ v(p, {
285
+ /* @__PURE__ */ _(f, {
287
286
  path: "/pipelines/:pipelineId/edit",
288
- element: /* @__PURE__ */ v(W, {})
287
+ element: /* @__PURE__ */ _(W, {})
289
288
  })
290
289
  ] })
291
290
  });
@@ -1 +1 @@
1
- {"version":3,"file":"BigConsoleRoutes.js","names":[],"sources":["../../src/bigconsole/BigConsoleRoutes.tsx"],"sourcesContent":["import { lazy, Suspense, memo, useState, useMemo, useEffect, useRef } from 'react';\nimport { Route, Routes, Navigate, useParams } from 'react-router';\nimport { type BigConsoleRootProps } from './types';\nimport { HomePage } from './pages/HomePage';\nimport { Spinner } from '@burdenoff/fe-libs/ui';\nimport { useApolloClient } from '@apollo/client/react';\nimport { useAppNavigate } from './contexts';\nimport { useWorkflowOperations } from './hooks/useWorkflowOperations';\nimport { GetWorkflowDocument } from '../generated/wspace-operations';\nimport { BOOTSTRAP_RETRY_DELAY_MS } from './constants';\n\n// Import FluidGrids SDK workflow components (EXACT same as microfe-workflows)\nimport {\n WorkflowBuilderPage as SDKWorkflowBuilderPage,\n ExecutionsListPage,\n ExecutionDetailPage,\n HistoryPage,\n TemplatesPage,\n NodesPage,\n SettingsPage as WorkflowSettingsPage,\n} from '@burdenoff/fluidgrids-fe-sdk';\n\n// Lazy-loaded pages\nconst DashboardsPage = lazy(() => import('./pages/DashboardsPage'));\nconst DashboardViewPage = lazy(() => import('./pages/DashboardViewPage'));\nconst DashboardBuilderPage = lazy(() => import('./pages/DashboardBuilderPage'));\nconst DataSourcesPage = lazy(() => import('./pages/DataSourcesPage'));\nconst InsightsPage = lazy(() => import('./pages/InsightsPage'));\nconst SettingsPage = lazy(() => import('./pages/SettingsPage'));\nconst WidgetDemoPage = lazy(() => import('./pages/WidgetDemoPage'));\n// BigConsole-native workflow pages (query bigconsole-svc, not workflow-svc)\n// These use named exports (no default export), so we remap via .then()\nconst WorkflowsPage = lazy(() => import('./pages/WorkflowsPage').then((m) => ({ default: m.WorkflowsPage })));\nconst WorkflowViewPage = lazy(() => import('./pages/WorkflowViewPage').then((m) => ({ default: m.WorkflowViewPage })));\n// DataSink Pages\nconst DataSinksPage = lazy(() => import('./pages/DataSinksPage'));\nconst DataSinkViewPage = lazy(() => import('./pages/DataSinkViewPage'));\nconst DataSinkBuilderPage = lazy(() => import('./pages/DataSinkBuilderPage'));\n// Parser Pages\nconst DataParsersPage = lazy(() => import('./pages/DataParsersPage'));\nconst ParserViewPage = lazy(() => import('./pages/ParserViewPage'));\nconst ParserBuilderPage = lazy(() => import('./pages/ParserBuilderPage'));\n// Pipeline Pages\nconst PipelinesPage = lazy(() => import('./pages/PipelinesPage'));\nconst PipelineViewPage = lazy(() => import('./pages/PipelineViewPage'));\nconst PipelineBuilderPage = lazy(() => import('./pages/PipelineBuilderPage'));\n\n// Loading fallback component\nfunction PageLoader() {\n return (\n <div className=\"flex items-center justify-center min-h-[400px]\">\n <Spinner className=\"h-8 w-8\" />\n </div>\n );\n}\n\n/** Generate a new workflow builder path with a fresh UUID key. */\nexport const newWorkflowPath = () => `/workflows/workflow/${crypto.randomUUID()}/v1`;\n\n/**\n * Redirect /workflows/new to a UUID-based URL.\n * Uses <Navigate> for synchronous redirect (no blank frame).\n */\nfunction WorkflowNewRedirect() {\n const path = useMemo(() => newWorkflowPath(), []);\n return <Navigate to={path} replace />;\n}\n\n/**\n * Bridge component: resolves a BigConsole workflow ID to its externalWorkflowId\n * and navigates to the SDK's visual builder route.\n *\n * Route: /workflows/:workflowId/edit\n * Redirects to: /workflows/workflow/{workflowKey}/v1\n */\nconst WorkflowEditBridge = memo(function WorkflowEditBridge() {\n const { workflowId } = useParams<{ workflowId: string }>();\n const navigate = useAppNavigate();\n const { fetchWorkflow } = useWorkflowOperations({ skipFetch: true });\n const [error, setError] = useState<string | null>(null);\n const retryCount = useRef(0);\n\n useEffect(() => {\n if (!workflowId) {\n setError('No workflow ID provided');\n return;\n }\n\n // Reset retry budget and error when workflowId changes so a\n // previous failed attempt doesn't consume the new workflow's retry.\n retryCount.current = 0;\n setError(null);\n let cancelled = false;\n\n const handleResult = (workflow: Awaited<ReturnType<typeof fetchWorkflow>>) => {\n if (cancelled) return;\n\n if (workflow?.key) {\n // Navigate to the SDK builder route using the workflow key (e.g. \"github_user_profile\")\n // and default version \"v1\". The FluidGrids SDK fetches the definition by workflowKey.\n // Replace history so the bridge doesn't trap the back button.\n navigate(`/workflows/workflow/${workflow.key}/v1`, { replace: true });\n } else if (workflow) {\n // Workflow exists but has no key — open SDK builder in create mode\n navigate(`/workflows/builder`, { replace: true });\n } else if (retryCount.current < 1) {\n // On full-page loads the auth/workspace context may not be bootstrapped yet,\n // causing a false null. Retry once after a short delay (same pattern as WorkflowViewPage).\n retryCount.current += 1;\n setTimeout(() => {\n if (!cancelled) {\n fetchWorkflow(workflowId)\n .then(handleResult)\n .catch((err) => {\n if (!cancelled) setError(err?.message ?? 'Failed to load workflow');\n });\n }\n }, BOOTSTRAP_RETRY_DELAY_MS);\n } else {\n setError('Workflow not found');\n }\n };\n\n fetchWorkflow(workflowId)\n .then(handleResult)\n .catch((err) => {\n if (!cancelled) setError(err?.message ?? 'Failed to load workflow');\n });\n\n return () => {\n cancelled = true;\n };\n }, [workflowId, fetchWorkflow, navigate]);\n\n if (error) {\n return (\n <div className=\"p-6 flex flex-col items-center justify-center min-h-[400px] text-center gap-4\">\n <p className=\"text-sm text-text-secondary\">{error}</p>\n <button\n type=\"button\"\n onClick={() => navigate('/workflows')}\n className=\"px-4 py-2 text-sm font-medium text-text-primary bg-bg-sunken hover:bg-border-default rounded-md transition-colors\"\n >\n Back to Workflows\n </button>\n </div>\n );\n }\n\n return (\n <div className=\"flex items-center justify-center min-h-[400px]\">\n <Spinner className=\"h-8 w-8\" />\n </div>\n );\n});\n\n/**\n * Matches a canonical v4-style UUID. BigConsole workflow RECORD ids are UUIDs;\n * workflow KEYS are human slugs (e.g. \"users_analytics\"). New-workflow URLs also\n * use a fresh `crypto.randomUUID()` as the builder key. We only attempt record\n * resolution for UUID-shaped `:id`s — slugs are always real keys and skip the\n * lookup entirely (no extra round-trip, no spinner flash).\n */\nconst UUID_RE = /^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/i;\n\n/** Minimal shape of the GetWorkflow query — the resolver only needs the key. */\ntype WorkflowKeyLookup = { workflow: { key: string | null } | null };\n\n/**\n * Guards the SDK visual builder route.\n *\n * The SDK builder loads its definition from workflow-svc using the URL `:id` as\n * the `workflowKey`. That only works when `:id` is the workflow KEY. When a\n * BigConsole workflow RECORD id (a UUID) reaches the builder — via the SDK\n * card's `navigate(\"../workflow/\" + workflow.workflow_key + ...)`, a bookmarked\n * record-id URL, etc. — no definition matches that key, so the canvas is empty\n * AND the SDK silently creates a phantom 0-node definition keyed by the UUID.\n *\n * This resolver closes that gap centrally (the same id→key resolution the\n * `/workflows/:workflowId/edit` `WorkflowEditBridge` does, but applied to the\n * builder route itself so EVERY entry point is covered):\n * - `:id` is a slug → it's already a key → render the builder as-is.\n * - `:id` is a UUID that maps to a BigConsole record with a different key →\n * redirect to `/workflows/workflow/<key>/<version>`.\n * - `:id` is a UUID that is NOT a record (a fresh new-workflow id) → render\n * the builder as-is (create mode).\n */\nconst WorkflowBuilderResolver = memo(function WorkflowBuilderResolver() {\n const { id, version } = useParams<{ id: string; version: string }>();\n const navigate = useAppNavigate();\n const client = useApolloClient();\n // Slugs (real keys) render the builder immediately (derived below); only\n // UUID-shaped ids need a record lookup first.\n const isUuid = !!id && UUID_RE.test(id);\n // A UUID is only safe to open in the SDK builder once the lookup POSITIVELY\n // confirms it is not a BigConsole record (a clean not-found — e.g. a fresh\n // new-workflow id). Both verdicts are keyed by the id they describe so that\n // navigating between workflows re-resolves instead of reusing a stale answer.\n const [confirmedAbsentId, setConfirmedAbsentId] = useState<string | null>(null);\n const [failedId, setFailedId] = useState<string | null>(null);\n // Bumped by the \"Try again\" button to re-run the lookup effect after a failure.\n const [retryNonce, setRetryNonce] = useState(0);\n const retryCount = useRef(0);\n\n useEffect(() => {\n if (!id || !isUuid) return;\n\n retryCount.current = 0;\n let cancelled = false;\n const targetVersion = version ?? 'v1';\n\n const attempt = () => {\n // Query directly (not via fetchWorkflow, which swallows Apollo errors and\n // returns null) so we can tell a genuine \"no such record\" apart from a\n // transient lookup failure. Treating a failure as not-found would re-open\n // the builder with the record id and recreate a phantom 0-node definition.\n client\n .query<WorkflowKeyLookup>({\n query: GetWorkflowDocument,\n variables: { id },\n fetchPolicy: 'network-only',\n })\n .then((result) => {\n if (cancelled) return;\n const record = result.data?.workflow;\n if (record) {\n // The UUID IS a BigConsole record.\n if (record.key && record.key !== id) {\n // Open the builder under its real key (where the definition + nodes\n // live). encodeURIComponent guards against URL-unsafe key chars.\n // Replace history so the resolver doesn't trap the back button.\n navigate(`/workflows/workflow/${encodeURIComponent(record.key)}/${targetVersion}`, {\n replace: true,\n });\n } else {\n // Record exists but has no usable key — open a blank builder rather\n // than reusing the record UUID as the key (which would phantom).\n navigate('/workflows/builder', { replace: true });\n }\n } else {\n // Query succeeded with no record → a genuine new-workflow id.\n setConfirmedAbsentId(id);\n }\n })\n .catch(() => {\n if (cancelled) return;\n if (retryCount.current < 1) {\n // On a cold full-page load the auth/workspace context may not be\n // bootstrapped yet. Retry once before giving up.\n retryCount.current += 1;\n setTimeout(() => {\n if (!cancelled) attempt();\n }, BOOTSTRAP_RETRY_DELAY_MS);\n } else {\n // Lookup failed — do NOT assume create mode (the id may be a record);\n // surface a retry instead of risking a phantom definition.\n setFailedId(id);\n }\n });\n };\n\n attempt();\n\n return () => {\n cancelled = true;\n };\n }, [id, isUuid, version, client, navigate, retryNonce]);\n\n // Slug keys, and UUIDs confirmed not to be records, render the builder.\n if (!isUuid || confirmedAbsentId === id) {\n return <SDKWorkflowBuilderPage />;\n }\n\n // A lookup that ultimately failed: surface a retry rather than silently\n // opening the builder with what may be a record id.\n if (failedId === id) {\n return (\n <div className=\"p-6 flex flex-col items-center justify-center min-h-[400px] text-center gap-4\">\n <p className=\"text-sm text-text-secondary\">Couldn&apos;t load this workflow. Please try again.</p>\n <div className=\"flex items-center gap-2\">\n <button\n type=\"button\"\n onClick={() => {\n setFailedId(null);\n setRetryNonce((n) => n + 1);\n }}\n className=\"px-4 py-2 text-sm font-medium text-action-primary-fg bg-action-primary-bg hover:bg-action-primary-bgHover rounded-md transition-colors\"\n >\n Try again\n </button>\n <button\n type=\"button\"\n onClick={() => navigate('/workflows')}\n className=\"px-4 py-2 text-sm font-medium text-text-primary bg-bg-sunken hover:bg-border-default rounded-md transition-colors\"\n >\n Back to Workflows\n </button>\n </div>\n </div>\n );\n }\n\n return (\n <div className=\"flex items-center justify-center min-h-[400px]\">\n <Spinner className=\"h-8 w-8\" />\n </div>\n );\n});\n\nexport function BigConsoleRoutes(_props: BigConsoleRootProps) {\n return (\n <Suspense fallback={<PageLoader />}>\n <Routes>\n <Route path=\"/\" element={<HomePage />} />\n <Route path=\"/dashboards\" element={<DashboardsPage />} />\n <Route path=\"/dashboards/:dashboardId\" element={<DashboardViewPage />} />\n <Route path=\"/dashboards/:dashboardId/builder\" element={<DashboardBuilderPage />} />\n <Route path=\"/datasources\" element={<DataSourcesPage />} />\n <Route path=\"/insights\" element={<InsightsPage />} />\n <Route path=\"/settings\" element={<SettingsPage />} />\n <Route path=\"/widgets/demo\" element={<WidgetDemoPage />} />\n {/* DataSink Routes */}\n <Route path=\"/datasinks\" element={<DataSinksPage />} />\n <Route path=\"/datasinks/new\" element={<DataSinkBuilderPage />} />\n <Route path=\"/datasinks/:dataSinkId\" element={<DataSinkViewPage />} />\n <Route path=\"/datasinks/:dataSinkId/edit\" element={<DataSinkBuilderPage />} />\n {/* Parser Routes */}\n <Route path=\"/parsers\" element={<DataParsersPage />} />\n <Route path=\"/parsers/new\" element={<ParserBuilderPage />} />\n <Route path=\"/parsers/:parserId\" element={<ParserViewPage />} />\n <Route path=\"/parsers/:parserId/edit\" element={<ParserBuilderPage />} />\n {/* Dashboard-scoped Parser Routes */}\n <Route path=\"/dashboards/:consoleId/parsers\" element={<DataParsersPage />} />\n <Route path=\"/dashboards/:consoleId/parsers/new\" element={<ParserBuilderPage />} />\n <Route path=\"/dashboards/:consoleId/parsers/:parserId\" element={<ParserViewPage />} />\n <Route path=\"/dashboards/:consoleId/parsers/:parserId/edit\" element={<ParserBuilderPage />} />\n {/* Workflow Routes — list/view use BigConsole-native pages (query bigconsole-svc).\n All static routes are grouped before the dynamic :workflowId catch-all.\n React Router v6 prioritizes static segments regardless of declaration order,\n but keeping them above the param routes makes intent unambiguous for maintainers. */}\n <Route path=\"/workflows\" element={<WorkflowsPage />} />\n <Route path=\"/workflows/list\" element={<WorkflowsPage />} />\n {/* New workflow — redirect to UUID-based URL (matches FluidGrids pattern) */}\n <Route path=\"/workflows/new\" element={<WorkflowNewRedirect />} />\n {/* SDK visual workflow builder — design existing workflows */}\n <Route path=\"/workflows/builder\" element={<SDKWorkflowBuilderPage />} />\n {/* All parameterised builder routes go through WorkflowBuilderResolver so a\n record-id `:id` is resolved to its workflow key first (slugs/new-workflow\n UUIDs pass straight through); otherwise the SDK opens an empty canvas and\n creates a phantom 0-node definition keyed by the record id. */}\n <Route path=\"/workflows/builder/:id/:version\" element={<WorkflowBuilderResolver />} />\n <Route path=\"/workflows/workflow/:id/:version\" element={<WorkflowBuilderResolver />} />\n {/* SDK sub-pages (runs, history, templates, nodes, settings) */}\n <Route path=\"/workflows/runs\" element={<ExecutionsListPage />} />\n <Route path=\"/workflows/runs/:runId\" element={<ExecutionDetailPage />} />\n <Route path=\"/workflows/history\" element={<HistoryPage />} />\n <Route path=\"/workflows/templates\" element={<TemplatesPage />} />\n <Route path=\"/workflows/nodes\" element={<NodesPage />} />\n <Route path=\"/workflows/settings\" element={<WorkflowSettingsPage />} />\n {/* Dynamic routes — :workflowId catch-all AFTER all static segments */}\n <Route path=\"/workflows/:workflowId\" element={<WorkflowViewPage />} />\n <Route path=\"/workflows/:workflowId/edit\" element={<WorkflowEditBridge />} />\n {/* Support SDK's navigation pattern (without /workflows/ prefix) — also\n resolves record-id → key via WorkflowBuilderResolver. */}\n <Route path=\"/workflow/:id/:version\" element={<WorkflowBuilderResolver />} />\n {/* Redirect /list to /workflows/list (SDK uses relative navigation) */}\n <Route path=\"/list\" element={<Navigate to=\"/bigconsole/workflows/list\" replace />} />\n {/* Pipeline Routes */}\n <Route path=\"/pipelines\" element={<PipelinesPage />} />\n <Route path=\"/pipelines/new\" element={<PipelineBuilderPage />} />\n <Route path=\"/pipelines/:pipelineId\" element={<PipelineViewPage />} />\n <Route path=\"/pipelines/:pipelineId/edit\" element={<PipelineBuilderPage />} />\n </Routes>\n </Suspense>\n );\n}\n"],"mappings":";;;;;;;;;;;;;AAuBA,IAAM,IAAiB,QAAW,OAAO,6BAA0B,EAC7D,IAAoB,QAAW,OAAO,gCAA6B,EACnE,IAAuB,QAAW,OAAO,mCAAgC,EACzE,IAAkB,QAAW,OAAO,8BAA2B,EAC/D,IAAe,QAAW,OAAO,2BAAwB,EACzD,IAAe,QAAW,OAAO,2BAAwB,EACzD,IAAiB,QAAW,OAAO,6BAA0B,EAG7D,IAAgB,QAAW,OAAO,4BAAyB,MAAM,OAAO,EAAE,SAAS,EAAE,eAAe,EAAE,CAAC,EACvG,IAAmB,QAAW,OAAO,+BAA4B,MAAM,OAAO,EAAE,SAAS,EAAE,kBAAkB,EAAE,CAAC,EAEhH,IAAgB,QAAW,OAAO,4BAAyB,EAC3D,IAAmB,QAAW,OAAO,+BAA4B,EACjE,IAAsB,QAAW,OAAO,kCAA+B,EAEvE,IAAkB,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Q,SAAS,kBAAC,GAAD;KAAU,IAAG;KAA6B,SAAA;KAAU,CAAA;IAAI,CAAA;GAErF,kBAAC,GAAD;IAAO,MAAK;IAAa,SAAS,kBAAC,GAAD,EAAiB,CAAA;IAAI,CAAA;GACvD,kBAAC,GAAD;IAAO,MAAK;IAAiB,SAAS,kBAAC,GAAD,EAAuB,CAAA;IAAI,CAAA;GACjE,kBAAC,GAAD;IAAO,MAAK;IAAyB,SAAS,kBAAC,GAAD,EAAoB,CAAA;IAAI,CAAA;GACtE,kBAAC,GAAD;IAAO,MAAK;IAA8B,SAAS,kBAAC,GAAD,EAAuB,CAAA;IAAI,CAAA;GACvE,EAAA,CAAA;EACA,CAAA"}
1
+ {"version":3,"file":"BigConsoleRoutes.js","names":[],"sources":["../../src/bigconsole/BigConsoleRoutes.tsx"],"sourcesContent":["import { lazy, Suspense, memo, useState, useMemo, useEffect, useRef } from 'react';\nimport { Route, Routes, Navigate, useParams } from 'react-router';\nimport { type BigConsoleRootProps } from './types';\nimport { Spinner } from '@burdenoff/fe-libs/ui';\nimport { useApolloClient } from '@apollo/client/react';\nimport { useAppNavigate } from './contexts';\nimport { useWorkflowOperations } from './hooks/useWorkflowOperations';\nimport { GetWorkflowDocument } from '../generated/wspace-operations';\nimport { BOOTSTRAP_RETRY_DELAY_MS } from './constants';\n\n// Import FluidGrids SDK workflow components (EXACT same as microfe-workflows)\nimport {\n WorkflowBuilderPage as SDKWorkflowBuilderPage,\n ExecutionsListPage,\n ExecutionDetailPage,\n HistoryPage,\n TemplatesPage,\n NodesPage,\n SettingsPage as WorkflowSettingsPage,\n} from '@burdenoff/fluidgrids-fe-sdk';\n\n// Lazy-loaded pages\nconst OverviewPage = lazy(() => import('./pages/OverviewPage'));\nconst DashboardsPage = lazy(() => import('./pages/DashboardsPage'));\nconst DashboardViewPage = lazy(() => import('./pages/DashboardViewPage'));\nconst DashboardBuilderPage = lazy(() => import('./pages/DashboardBuilderPage'));\nconst DataSourcesPage = lazy(() => import('./pages/DataSourcesPage'));\nconst InsightsPage = lazy(() => import('./pages/InsightsPage'));\nconst SettingsPage = lazy(() => import('./pages/SettingsPage'));\nconst WidgetDemoPage = lazy(() => import('./pages/WidgetDemoPage'));\n// BigConsole-native workflow pages (query bigconsole-svc, not workflow-svc)\n// These use named exports (no default export), so we remap via .then()\nconst WorkflowsPage = lazy(() => import('./pages/WorkflowsPage').then((m) => ({ default: m.WorkflowsPage })));\nconst WorkflowViewPage = lazy(() => import('./pages/WorkflowViewPage').then((m) => ({ default: m.WorkflowViewPage })));\n// DataSink Pages\nconst DataSinksPage = lazy(() => import('./pages/DataSinksPage'));\nconst DataSinkViewPage = lazy(() => import('./pages/DataSinkViewPage'));\nconst DataSinkBuilderPage = lazy(() => import('./pages/DataSinkBuilderPage'));\n// Parser Pages\nconst DataParsersPage = lazy(() => import('./pages/DataParsersPage'));\nconst ParserViewPage = lazy(() => import('./pages/ParserViewPage'));\nconst ParserBuilderPage = lazy(() => import('./pages/ParserBuilderPage'));\n// Pipeline Pages\nconst PipelinesPage = lazy(() => import('./pages/PipelinesPage'));\nconst PipelineViewPage = lazy(() => import('./pages/PipelineViewPage'));\nconst PipelineBuilderPage = lazy(() => import('./pages/PipelineBuilderPage'));\n\n// Loading fallback component\nfunction PageLoader() {\n return (\n <div className=\"flex items-center justify-center min-h-[400px]\">\n <Spinner className=\"h-8 w-8\" />\n </div>\n );\n}\n\n/** Generate a new workflow builder path with a fresh UUID key. */\nexport const newWorkflowPath = () => `/workflows/workflow/${crypto.randomUUID()}/v1`;\n\n/**\n * Redirect /workflows/new to a UUID-based URL.\n * Uses <Navigate> for synchronous redirect (no blank frame).\n */\nfunction WorkflowNewRedirect() {\n const path = useMemo(() => newWorkflowPath(), []);\n return <Navigate to={path} replace />;\n}\n\n/**\n * Bridge component: resolves a BigConsole workflow ID to its externalWorkflowId\n * and navigates to the SDK's visual builder route.\n *\n * Route: /workflows/:workflowId/edit\n * Redirects to: /workflows/workflow/{workflowKey}/v1\n */\nconst WorkflowEditBridge = memo(function WorkflowEditBridge() {\n const { workflowId } = useParams<{ workflowId: string }>();\n const navigate = useAppNavigate();\n const { fetchWorkflow } = useWorkflowOperations({ skipFetch: true });\n const [error, setError] = useState<string | null>(null);\n const retryCount = useRef(0);\n\n useEffect(() => {\n if (!workflowId) {\n setError('No workflow ID provided');\n return;\n }\n\n // Reset retry budget and error when workflowId changes so a\n // previous failed attempt doesn't consume the new workflow's retry.\n retryCount.current = 0;\n setError(null);\n let cancelled = false;\n\n const handleResult = (workflow: Awaited<ReturnType<typeof fetchWorkflow>>) => {\n if (cancelled) return;\n\n if (workflow?.key) {\n // Navigate to the SDK builder route using the workflow key (e.g. \"github_user_profile\")\n // and default version \"v1\". The FluidGrids SDK fetches the definition by workflowKey.\n // Replace history so the bridge doesn't trap the back button.\n navigate(`/workflows/workflow/${workflow.key}/v1`, { replace: true });\n } else if (workflow) {\n // Workflow exists but has no key — open SDK builder in create mode\n navigate(`/workflows/builder`, { replace: true });\n } else if (retryCount.current < 1) {\n // On full-page loads the auth/workspace context may not be bootstrapped yet,\n // causing a false null. Retry once after a short delay (same pattern as WorkflowViewPage).\n retryCount.current += 1;\n setTimeout(() => {\n if (!cancelled) {\n fetchWorkflow(workflowId)\n .then(handleResult)\n .catch((err) => {\n if (!cancelled) setError(err?.message ?? 'Failed to load workflow');\n });\n }\n }, BOOTSTRAP_RETRY_DELAY_MS);\n } else {\n setError('Workflow not found');\n }\n };\n\n fetchWorkflow(workflowId)\n .then(handleResult)\n .catch((err) => {\n if (!cancelled) setError(err?.message ?? 'Failed to load workflow');\n });\n\n return () => {\n cancelled = true;\n };\n }, [workflowId, fetchWorkflow, navigate]);\n\n if (error) {\n return (\n <div className=\"p-6 flex flex-col items-center justify-center min-h-[400px] text-center gap-4\">\n <p className=\"text-sm text-text-secondary\">{error}</p>\n <button\n type=\"button\"\n onClick={() => navigate('/workflows')}\n className=\"px-4 py-2 text-sm font-medium text-text-primary bg-bg-sunken hover:bg-border-default rounded-md transition-colors\"\n >\n Back to Workflows\n </button>\n </div>\n );\n }\n\n return (\n <div className=\"flex items-center justify-center min-h-[400px]\">\n <Spinner className=\"h-8 w-8\" />\n </div>\n );\n});\n\n/**\n * Matches a canonical v4-style UUID. BigConsole workflow RECORD ids are UUIDs;\n * workflow KEYS are human slugs (e.g. \"users_analytics\"). New-workflow URLs also\n * use a fresh `crypto.randomUUID()` as the builder key. We only attempt record\n * resolution for UUID-shaped `:id`s — slugs are always real keys and skip the\n * lookup entirely (no extra round-trip, no spinner flash).\n */\nconst UUID_RE = /^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/i;\n\n/** Minimal shape of the GetWorkflow query — the resolver only needs the key. */\ntype WorkflowKeyLookup = { workflow: { key: string | null } | null };\n\n/**\n * Guards the SDK visual builder route.\n *\n * The SDK builder loads its definition from workflow-svc using the URL `:id` as\n * the `workflowKey`. That only works when `:id` is the workflow KEY. When a\n * BigConsole workflow RECORD id (a UUID) reaches the builder — via the SDK\n * card's `navigate(\"../workflow/\" + workflow.workflow_key + ...)`, a bookmarked\n * record-id URL, etc. — no definition matches that key, so the canvas is empty\n * AND the SDK silently creates a phantom 0-node definition keyed by the UUID.\n *\n * This resolver closes that gap centrally (the same id→key resolution the\n * `/workflows/:workflowId/edit` `WorkflowEditBridge` does, but applied to the\n * builder route itself so EVERY entry point is covered):\n * - `:id` is a slug → it's already a key → render the builder as-is.\n * - `:id` is a UUID that maps to a BigConsole record with a different key →\n * redirect to `/workflows/workflow/<key>/<version>`.\n * - `:id` is a UUID that is NOT a record (a fresh new-workflow id) → render\n * the builder as-is (create mode).\n */\nconst WorkflowBuilderResolver = memo(function WorkflowBuilderResolver() {\n const { id, version } = useParams<{ id: string; version: string }>();\n const navigate = useAppNavigate();\n const client = useApolloClient();\n // Slugs (real keys) render the builder immediately (derived below); only\n // UUID-shaped ids need a record lookup first.\n const isUuid = !!id && UUID_RE.test(id);\n // A UUID is only safe to open in the SDK builder once the lookup POSITIVELY\n // confirms it is not a BigConsole record (a clean not-found — e.g. a fresh\n // new-workflow id). Both verdicts are keyed by the id they describe so that\n // navigating between workflows re-resolves instead of reusing a stale answer.\n const [confirmedAbsentId, setConfirmedAbsentId] = useState<string | null>(null);\n const [failedId, setFailedId] = useState<string | null>(null);\n // Bumped by the \"Try again\" button to re-run the lookup effect after a failure.\n const [retryNonce, setRetryNonce] = useState(0);\n const retryCount = useRef(0);\n\n useEffect(() => {\n if (!id || !isUuid) return;\n\n retryCount.current = 0;\n let cancelled = false;\n const targetVersion = version ?? 'v1';\n\n const attempt = () => {\n // Query directly (not via fetchWorkflow, which swallows Apollo errors and\n // returns null) so we can tell a genuine \"no such record\" apart from a\n // transient lookup failure. Treating a failure as not-found would re-open\n // the builder with the record id and recreate a phantom 0-node definition.\n client\n .query<WorkflowKeyLookup>({\n query: GetWorkflowDocument,\n variables: { id },\n fetchPolicy: 'network-only',\n })\n .then((result) => {\n if (cancelled) return;\n const record = result.data?.workflow;\n if (record) {\n // The UUID IS a BigConsole record.\n if (record.key && record.key !== id) {\n // Open the builder under its real key (where the definition + nodes\n // live). encodeURIComponent guards against URL-unsafe key chars.\n // Replace history so the resolver doesn't trap the back button.\n navigate(`/workflows/workflow/${encodeURIComponent(record.key)}/${targetVersion}`, {\n replace: true,\n });\n } else {\n // Record exists but has no usable key — open a blank builder rather\n // than reusing the record UUID as the key (which would phantom).\n navigate('/workflows/builder', { replace: true });\n }\n } else {\n // Query succeeded with no record → a genuine new-workflow id.\n setConfirmedAbsentId(id);\n }\n })\n .catch(() => {\n if (cancelled) return;\n if (retryCount.current < 1) {\n // On a cold full-page load the auth/workspace context may not be\n // bootstrapped yet. Retry once before giving up.\n retryCount.current += 1;\n setTimeout(() => {\n if (!cancelled) attempt();\n }, BOOTSTRAP_RETRY_DELAY_MS);\n } else {\n // Lookup failed — do NOT assume create mode (the id may be a record);\n // surface a retry instead of risking a phantom definition.\n setFailedId(id);\n }\n });\n };\n\n attempt();\n\n return () => {\n cancelled = true;\n };\n }, [id, isUuid, version, client, navigate, retryNonce]);\n\n // Slug keys, and UUIDs confirmed not to be records, render the builder.\n if (!isUuid || confirmedAbsentId === id) {\n return <SDKWorkflowBuilderPage />;\n }\n\n // A lookup that ultimately failed: surface a retry rather than silently\n // opening the builder with what may be a record id.\n if (failedId === id) {\n return (\n <div className=\"p-6 flex flex-col items-center justify-center min-h-[400px] text-center gap-4\">\n <p className=\"text-sm text-text-secondary\">Couldn&apos;t load this workflow. Please try again.</p>\n <div className=\"flex items-center gap-2\">\n <button\n type=\"button\"\n onClick={() => {\n setFailedId(null);\n setRetryNonce((n) => n + 1);\n }}\n className=\"px-4 py-2 text-sm font-medium text-action-primary-fg bg-action-primary-bg hover:bg-action-primary-bgHover rounded-md transition-colors\"\n >\n Try again\n </button>\n <button\n type=\"button\"\n onClick={() => navigate('/workflows')}\n className=\"px-4 py-2 text-sm font-medium text-text-primary bg-bg-sunken hover:bg-border-default rounded-md transition-colors\"\n >\n Back to Workflows\n </button>\n </div>\n </div>\n );\n }\n\n return (\n <div className=\"flex items-center justify-center min-h-[400px]\">\n <Spinner className=\"h-8 w-8\" />\n </div>\n );\n});\n\nexport function BigConsoleRoutes(_props: BigConsoleRootProps) {\n return (\n <Suspense fallback={<PageLoader />}>\n <Routes>\n <Route path=\"/\" element={<OverviewPage />} />\n <Route path=\"/dashboards\" element={<DashboardsPage />} />\n <Route path=\"/dashboards/:dashboardId\" element={<DashboardViewPage />} />\n <Route path=\"/dashboards/:dashboardId/builder\" element={<DashboardBuilderPage />} />\n <Route path=\"/datasources\" element={<DataSourcesPage />} />\n <Route path=\"/insights\" element={<InsightsPage />} />\n <Route path=\"/settings\" element={<SettingsPage />} />\n <Route path=\"/widgets/demo\" element={<WidgetDemoPage />} />\n {/* DataSink Routes */}\n <Route path=\"/datasinks\" element={<DataSinksPage />} />\n <Route path=\"/datasinks/new\" element={<DataSinkBuilderPage />} />\n <Route path=\"/datasinks/:dataSinkId\" element={<DataSinkViewPage />} />\n <Route path=\"/datasinks/:dataSinkId/edit\" element={<DataSinkBuilderPage />} />\n {/* Parser Routes */}\n <Route path=\"/parsers\" element={<DataParsersPage />} />\n <Route path=\"/parsers/new\" element={<ParserBuilderPage />} />\n <Route path=\"/parsers/:parserId\" element={<ParserViewPage />} />\n <Route path=\"/parsers/:parserId/edit\" element={<ParserBuilderPage />} />\n {/* Dashboard-scoped Parser Routes */}\n <Route path=\"/dashboards/:consoleId/parsers\" element={<DataParsersPage />} />\n <Route path=\"/dashboards/:consoleId/parsers/new\" element={<ParserBuilderPage />} />\n <Route path=\"/dashboards/:consoleId/parsers/:parserId\" element={<ParserViewPage />} />\n <Route path=\"/dashboards/:consoleId/parsers/:parserId/edit\" element={<ParserBuilderPage />} />\n {/* Workflow Routes — list/view use BigConsole-native pages (query bigconsole-svc).\n All static routes are grouped before the dynamic :workflowId catch-all.\n React Router v6 prioritizes static segments regardless of declaration order,\n but keeping them above the param routes makes intent unambiguous for maintainers. */}\n <Route path=\"/workflows\" element={<WorkflowsPage />} />\n <Route path=\"/workflows/list\" element={<WorkflowsPage />} />\n {/* New workflow — redirect to UUID-based URL (matches FluidGrids pattern) */}\n <Route path=\"/workflows/new\" element={<WorkflowNewRedirect />} />\n {/* SDK visual workflow builder — design existing workflows */}\n <Route path=\"/workflows/builder\" element={<SDKWorkflowBuilderPage />} />\n {/* All parameterised builder routes go through WorkflowBuilderResolver so a\n record-id `:id` is resolved to its workflow key first (slugs/new-workflow\n UUIDs pass straight through); otherwise the SDK opens an empty canvas and\n creates a phantom 0-node definition keyed by the record id. */}\n <Route path=\"/workflows/builder/:id/:version\" element={<WorkflowBuilderResolver />} />\n <Route path=\"/workflows/workflow/:id/:version\" element={<WorkflowBuilderResolver />} />\n {/* SDK sub-pages (runs, history, templates, nodes, settings) */}\n <Route path=\"/workflows/runs\" element={<ExecutionsListPage />} />\n <Route path=\"/workflows/runs/:runId\" element={<ExecutionDetailPage />} />\n <Route path=\"/workflows/history\" element={<HistoryPage />} />\n <Route path=\"/workflows/templates\" element={<TemplatesPage />} />\n <Route path=\"/workflows/nodes\" element={<NodesPage />} />\n <Route path=\"/workflows/settings\" element={<WorkflowSettingsPage />} />\n {/* Dynamic routes — :workflowId catch-all AFTER all static segments */}\n <Route path=\"/workflows/:workflowId\" element={<WorkflowViewPage />} />\n <Route path=\"/workflows/:workflowId/edit\" element={<WorkflowEditBridge />} />\n {/* Support SDK's navigation pattern (without /workflows/ prefix) — also\n resolves record-id → key via WorkflowBuilderResolver. */}\n <Route path=\"/workflow/:id/:version\" element={<WorkflowBuilderResolver />} />\n {/* Redirect /list to /workflows/list (SDK uses relative navigation) */}\n <Route path=\"/list\" element={<Navigate to=\"/bigconsole/workflows/list\" replace />} />\n {/* Pipeline Routes */}\n <Route path=\"/pipelines\" element={<PipelinesPage />} />\n <Route path=\"/pipelines/new\" element={<PipelineBuilderPage />} />\n <Route path=\"/pipelines/:pipelineId\" element={<PipelineViewPage />} />\n <Route path=\"/pipelines/:pipelineId/edit\" element={<PipelineBuilderPage />} />\n </Routes>\n </Suspense>\n );\n}\n"],"mappings":";;;;;;;;;;;;AAsBA,IAAM,IAAe,QAAW,OAAO,2BAAwB,EACzD,IAAiB,QAAW,OAAO,6BAA0B,EAC7D,IAAoB,QAAW,OAAO,gCAA6B,EACnE,IAAuB,QAAW,OAAO,mCAAgC,EACzE,IAAkB,QAAW,OAAO,8BAA2B,EAC/D,IAAe,QAAW,OAAO,2BAAwB,EACzD,IAAe,QAAW,OAAO,2BAAwB,EACzD,IAAiB,QAAW,OAAO,6BAA0B,EAG7D,IAAgB,QAAW,OAAO,4BAAyB,MAAM,OAAO,EAAE,SAAS,EAAE,eAAe,EAAE,CAAC,EACvG,IAAmB,QAAW,OAAO,+BAA4B,MAAM,OAAO,EAAE,SAAS,EAAE,kBAAkB,EAAE,CAAC,EAEhH,IAAgB,QAAW,OAAO,4BAAyB,EAC3D,IAAmB,QAAW,OAAO,+BAA4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AAA;IAAI,CAAA;GAE7E,kBAAC,GAAD;IAAO,MAAK;IAAQ,SAAS,kBAAC,GAAD;KAAU,IAAG;KAA6B,SAAA;KAAU,CAAA;IAAI,CAAA;GAErF,kBAAC,GAAD;IAAO,MAAK;IAAa,SAAS,kBAAC,GAAD,EAAiB,CAAA;IAAI,CAAA;GACvD,kBAAC,GAAD;IAAO,MAAK;IAAiB,SAAS,kBAAC,GAAD,EAAuB,CAAA;IAAI,CAAA;GACjE,kBAAC,GAAD;IAAO,MAAK;IAAyB,SAAS,kBAAC,GAAD,EAAoB,CAAA;IAAI,CAAA;GACtE,kBAAC,GAAD;IAAO,MAAK;IAA8B,SAAS,kBAAC,GAAD,EAAuB,CAAA;IAAI,CAAA;GACvE,EAAA,CAAA;EACA,CAAA"}
@@ -2,26 +2,26 @@ import { PREVIEW_STEPS as e, useAssistantRunStore as t } from "./assistantRunSto
2
2
  import { PreviewMeta as n, STEP_LABEL as r, formatAgo as i, previewLabels as a } from "../components/preview/previewShared.js";
3
3
  import { previewRunAction as o } from "./previewRunAction.js";
4
4
  import { useMemo as s } from "react";
5
- import { useI18n as c } from "@burdenoff/fe-libs/shared/providers/shell/I18nProvider";
6
- import { jsx as l } from "react/jsx-runtime";
7
- import { AssistantEntityPreview as u, useAssistantStore as d } from "@burdenoff/fe-libs/shared/assistant";
5
+ import { jsx as c } from "react/jsx-runtime";
6
+ import { AssistantEntityPreview as l, useAssistantStore as u } from "@burdenoff/fe-libs/shared/assistant";
7
+ import { useI18n as d } from "@burdenoff/fe-libs/shared/providers/shell/I18nProvider";
8
8
  //#region src/bigconsole/assistant/previewController.tsx
9
9
  function f() {
10
- let { t: o } = c(), s = t((e) => e.isRunning), d = t((e) => e.steps), f = t((e) => e.caption), p = t((e) => e.error), m = t((e) => e.updatedAt), h = e.map((e) => ({
10
+ let { t: o } = d(), s = t((e) => e.isRunning), u = t((e) => e.steps), f = t((e) => e.caption), p = t((e) => e.error), m = t((e) => e.updatedAt), h = e.map((e) => ({
11
11
  id: e,
12
12
  label: o(r[e].key, r[e].fallback),
13
- status: d[e]
13
+ status: u[e]
14
14
  }));
15
- return /* @__PURE__ */ l("div", {
15
+ return /* @__PURE__ */ c("div", {
16
16
  "data-testid": "ai-preview-panel",
17
17
  "data-variant": "assistant",
18
18
  className: "min-w-0 p-3",
19
- children: /* @__PURE__ */ l(u, {
19
+ children: /* @__PURE__ */ c(l, {
20
20
  title: o("bigconsole.widget.aiPreviewMini.title", "AI Preview"),
21
21
  steps: h,
22
22
  caption: s ? f || o("bigconsole.widget.aiPreviewMini.working", "Working…") : o("bigconsole.widget.aiPreviewMini.done", "Done"),
23
23
  error: p,
24
- meta: /* @__PURE__ */ l(n, {
24
+ meta: /* @__PURE__ */ c(n, {
25
25
  state: s ? "running" : p ? "stopped" : "idle",
26
26
  stateLabel: s ? o("bigconsole.widget.aiPreviewMini.live", "Live") : p ? o("bigconsole.widget.aiPreviewMini.stopped", "Stopped") : null,
27
27
  updatedLabel: o("bigconsole.widget.aiPreviewMini.updated", "updated"),
@@ -34,7 +34,7 @@ function f() {
34
34
  }
35
35
  var p = /* @__PURE__ */ new Set();
36
36
  function m(e) {
37
- let n = d.getState(), r = n.conversations.find((t) => t.id === e.run.conversationId)?.mode ?? n.mode;
37
+ let n = u.getState(), r = n.conversations.find((t) => t.id === e.run.conversationId)?.mode ?? n.mode;
38
38
  if (o(e.kind, e.run.runId, r, p) === "ignore") return;
39
39
  let i = t.getState();
40
40
  if (e.kind === "start") {
@@ -50,7 +50,7 @@ function m(e) {
50
50
  function h() {
51
51
  return s(() => ({
52
52
  label: "Build preview",
53
- render: () => /* @__PURE__ */ l(f, {}),
53
+ render: () => /* @__PURE__ */ c(f, {}),
54
54
  onEvent: m
55
55
  }), []);
56
56
  }