@burdenoff/microfe-bigconsole 2026.804.2 → 2026.805.2

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 (53) hide show
  1. package/dist/bigconsole/AdminRoot.js +21 -16
  2. package/dist/bigconsole/AdminRoot.js.map +1 -1
  3. package/dist/bigconsole/BigConsoleRoot.js +44 -39
  4. package/dist/bigconsole/BigConsoleRoot.js.map +1 -1
  5. package/dist/bigconsole/components/dashboard/DashboardToolbar.js +115 -100
  6. package/dist/bigconsole/components/dashboard/DashboardToolbar.js.map +1 -1
  7. package/dist/bigconsole/components/dashboard/PageTabsManager/PageTabsManager.js +100 -98
  8. package/dist/bigconsole/components/dashboard/PageTabsManager/PageTabsManager.js.map +1 -1
  9. package/dist/bigconsole/components/dashboard/ShareDialog/EmbedTab.js +164 -161
  10. package/dist/bigconsole/components/dashboard/ShareDialog/EmbedTab.js.map +1 -1
  11. package/dist/bigconsole/components/datasink/DataSinkCard.js +20 -20
  12. package/dist/bigconsole/components/datasink/DataSinkCard.js.map +1 -1
  13. package/dist/bigconsole/components/datasink/ImportDataGuideDialog.js +216 -49
  14. package/dist/bigconsole/components/datasink/ImportDataGuideDialog.js.map +1 -1
  15. package/dist/bigconsole/components/widgets/ActionConfigDialog.js +96 -90
  16. package/dist/bigconsole/components/widgets/ActionConfigDialog.js.map +1 -1
  17. package/dist/bigconsole/components/widgets/WidgetMenu.js +87 -76
  18. package/dist/bigconsole/components/widgets/WidgetMenu.js.map +1 -1
  19. package/dist/bigconsole/components/widgets/widget-actions/WidgetActions.js +120 -118
  20. package/dist/bigconsole/components/widgets/widget-actions/WidgetActions.js.map +1 -1
  21. package/dist/bigconsole/pages/DashboardBuilderPage.js +113 -104
  22. package/dist/bigconsole/pages/DashboardBuilderPage.js.map +1 -1
  23. package/dist/bigconsole/pages/DashboardViewPage.js +208 -199
  24. package/dist/bigconsole/pages/DashboardViewPage.js.map +1 -1
  25. package/dist/bigconsole/pages/DashboardsPage.js +376 -325
  26. package/dist/bigconsole/pages/DashboardsPage.js.map +1 -1
  27. package/dist/bigconsole/pages/DataParsersPage.js +135 -125
  28. package/dist/bigconsole/pages/DataParsersPage.js.map +1 -1
  29. package/dist/bigconsole/pages/DataSinkBuilderPage.js +182 -172
  30. package/dist/bigconsole/pages/DataSinkBuilderPage.js.map +1 -1
  31. package/dist/bigconsole/pages/DataSinkViewPage.js +233 -198
  32. package/dist/bigconsole/pages/DataSinkViewPage.js.map +1 -1
  33. package/dist/bigconsole/pages/DataSinksPage.js +281 -268
  34. package/dist/bigconsole/pages/DataSinksPage.js.map +1 -1
  35. package/dist/bigconsole/pages/ParserBuilderPage.js +238 -223
  36. package/dist/bigconsole/pages/ParserBuilderPage.js.map +1 -1
  37. package/dist/bigconsole/pages/ParserViewPage.js +162 -144
  38. package/dist/bigconsole/pages/ParserViewPage.js.map +1 -1
  39. package/dist/bigconsole/pages/PipelineBuilderPage.js +212 -204
  40. package/dist/bigconsole/pages/PipelineBuilderPage.js.map +1 -1
  41. package/dist/bigconsole/pages/PipelineViewPage.js +191 -183
  42. package/dist/bigconsole/pages/PipelineViewPage.js.map +1 -1
  43. package/dist/bigconsole/pages/PipelinesPage.js +128 -103
  44. package/dist/bigconsole/pages/PipelinesPage.js.map +1 -1
  45. package/dist/bigconsole/pages/WorkflowViewPage.js +238 -217
  46. package/dist/bigconsole/pages/WorkflowViewPage.js.map +1 -1
  47. package/dist/bigconsole/pages/WorkflowsPage.js +116 -102
  48. package/dist/bigconsole/pages/WorkflowsPage.js.map +1 -1
  49. package/dist/bigconsole/utils/csv.js +91 -0
  50. package/dist/bigconsole/utils/csv.js.map +1 -0
  51. package/dist/constants/permissions.js +83 -0
  52. package/dist/constants/permissions.js.map +1 -0
  53. package/package.json +2 -2
@@ -4,45 +4,50 @@ import { AdminRoutes as t } from "./AdminRoutes.js";
4
4
  import { useEffect as n } from "react";
5
5
  import { ErrorBoundary as r } from "@burdenoff/fe-libs/shared/components";
6
6
  import { FeatureFlagProvider as i } from "@burdenoff/fe-libs/shared/feature-flags";
7
- import { BarChart3 as a } from "lucide-react";
8
- import { jsx as o } from "react/jsx-runtime";
7
+ import { PermissionProvider as a } from "@burdenoff/fe-libs/shared/providers/shell";
8
+ import { BarChart3 as o } from "lucide-react";
9
+ import { jsx as s } from "react/jsx-runtime";
9
10
  //#region src/bigconsole/AdminRoot.tsx
10
- var s = (s) => {
11
- let { registerNavItems: c, registerFooterItems: l, basePath: u = "/admin/bigconsole" } = s;
11
+ var c = (c) => {
12
+ let { registerNavItems: l, registerFooterItems: u, basePath: d = "/admin/bigconsole" } = c;
12
13
  return n(() => {
13
- if (c) return c([{
14
+ if (l) return l([{
14
15
  id: "bigconsole-admin",
15
16
  label: "BigConsole",
16
- path: u,
17
- icon: /* @__PURE__ */ o(a, { size: 20 }),
17
+ path: d,
18
+ icon: /* @__PURE__ */ s(o, { size: 20 }),
18
19
  order: 55,
19
20
  group: "admin"
20
21
  }]);
21
- }, [c, u]), n(() => {
22
- if (l) return l([{
22
+ }, [l, d]), n(() => {
23
+ if (u) return u([{
23
24
  id: "bigconsole-admin-status",
24
25
  label: "BigConsole Admin",
25
26
  type: "status",
26
27
  order: 55,
27
28
  section: "left"
28
29
  }]);
29
- }, [l]), /* @__PURE__ */ o(r, {
30
- fallback: /* @__PURE__ */ o("div", {
30
+ }, [u]), /* @__PURE__ */ s(r, {
31
+ fallback: /* @__PURE__ */ s("div", {
31
32
  className: "p-6 text-center text-text-secondary",
32
33
  children: "Something went wrong loading BigConsole Admin. Please refresh the page."
33
34
  }),
34
- children: /* @__PURE__ */ o(i, {
35
+ children: /* @__PURE__ */ s(i, {
35
36
  workspaceId: null,
36
37
  gateway: "global",
37
38
  defaultEnabled: !0,
38
- children: /* @__PURE__ */ o(e, {
39
- props: s,
40
- children: /* @__PURE__ */ o(t, {})
39
+ children: /* @__PURE__ */ s(a, {
40
+ scopeId: c.workspaceId ?? null,
41
+ gateway: "workspace",
42
+ children: /* @__PURE__ */ s(e, {
43
+ props: c,
44
+ children: /* @__PURE__ */ s(t, {})
45
+ })
41
46
  })
42
47
  })
43
48
  });
44
49
  };
45
50
  //#endregion
46
- export { s as AdminRoot };
51
+ export { c as AdminRoot };
47
52
 
48
53
  //# sourceMappingURL=AdminRoot.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"AdminRoot.js","names":[],"sources":["../../src/bigconsole/AdminRoot.tsx"],"sourcesContent":["/**\n * BigConsole Admin Root\n *\n * Entry point for the BigConsole admin surface mounted inside the platform\n * admin-app. Reuses the same provider stack as the main BigConsoleRoot where\n * appropriate, but keeps the admin UI lightweight and independent of dashboard\n * rendering concerns.\n */\n\nimport type { FC } from 'react';\nimport { useEffect } from 'react';\nimport { BarChart3 } from 'lucide-react';\nimport { ErrorBoundary } from '@burdenoff/fe-libs/shared/components';\nimport { FeatureFlagProvider } from '@burdenoff/fe-libs/shared/feature-flags';\nimport type { AdminRootProps } from './types';\nimport { AdminRoutes } from './AdminRoutes';\nimport { BigConsoleProvider } from './context';\n\n/**\n * Root component for the BigConsole admin microfrontend.\n *\n * This is the admin entry point that host applications import and render.\n */\nexport const AdminRoot: FC<AdminRootProps> = (props) => {\n const { registerNavItems, registerFooterItems, basePath = '/admin/bigconsole' } = props;\n\n // Register a single admin nav item with the shell\n useEffect(() => {\n if (!registerNavItems) return;\n\n const cleanup = registerNavItems([\n {\n id: 'bigconsole-admin',\n label: 'BigConsole',\n path: basePath,\n icon: <BarChart3 size={20} />,\n order: 55,\n group: 'admin',\n },\n ]);\n\n return cleanup;\n }, [registerNavItems, basePath]);\n\n // Register footer status item\n useEffect(() => {\n if (!registerFooterItems) return;\n\n const cleanup = registerFooterItems([\n {\n id: 'bigconsole-admin-status',\n label: 'BigConsole Admin',\n type: 'status' as const,\n order: 55,\n section: 'left' as const,\n },\n ]);\n\n return cleanup;\n }, [registerFooterItems]);\n\n return (\n <ErrorBoundary\n fallback={\n <div className=\"p-6 text-center text-text-secondary\">\n Something went wrong loading BigConsole Admin. Please refresh the page.\n </div>\n }\n >\n <FeatureFlagProvider workspaceId={null} gateway=\"global\" defaultEnabled={true}>\n <BigConsoleProvider props={props}>\n <AdminRoutes />\n </BigConsoleProvider>\n </FeatureFlagProvider>\n </ErrorBoundary>\n );\n};\n"],"mappings":";;;;;;;;;AAuBA,IAAa,KAAiC,MAAU;CACtD,IAAM,EAAE,qBAAkB,wBAAqB,cAAW,wBAAwB;AAqClF,QAlCA,QAAgB;AACT,QAaL,QAXgB,EAAiB,CAC/B;GACE,IAAI;GACJ,OAAO;GACP,MAAM;GACN,MAAM,kBAAC,GAAD,EAAW,MAAM,IAAM,CAAA;GAC7B,OAAO;GACP,OAAO;GACR,CACF,CAAC;IAGD,CAAC,GAAkB,EAAS,CAAC,EAGhC,QAAgB;AACT,QAYL,QAVgB,EAAoB,CAClC;GACE,IAAI;GACJ,OAAO;GACP,MAAM;GACN,OAAO;GACP,SAAS;GACV,CACF,CAAC;IAGD,CAAC,EAAoB,CAAC,EAGvB,kBAAC,GAAD;EACE,UACE,kBAAC,OAAD;GAAK,WAAU;aAAsC;GAE/C,CAAA;YAGR,kBAAC,GAAD;GAAqB,aAAa;GAAM,SAAQ;GAAS,gBAAgB;aACvE,kBAAC,GAAD;IAA2B;cACzB,kBAAC,GAAD,EAAe,CAAA;IACI,CAAA;GACD,CAAA;EACR,CAAA"}
1
+ {"version":3,"file":"AdminRoot.js","names":[],"sources":["../../src/bigconsole/AdminRoot.tsx"],"sourcesContent":["/**\n * BigConsole Admin Root\n *\n * Entry point for the BigConsole admin surface mounted inside the platform\n * admin-app. Reuses the same provider stack as the main BigConsoleRoot where\n * appropriate, but keeps the admin UI lightweight and independent of dashboard\n * rendering concerns.\n */\n\nimport type { FC } from 'react';\nimport { useEffect } from 'react';\nimport { BarChart3 } from 'lucide-react';\nimport { ErrorBoundary } from '@burdenoff/fe-libs/shared/components';\nimport { FeatureFlagProvider } from '@burdenoff/fe-libs/shared/feature-flags';\nimport { PermissionProvider } from '@burdenoff/fe-libs/shared/providers/shell';\nimport type { AdminRootProps } from './types';\nimport { AdminRoutes } from './AdminRoutes';\nimport { BigConsoleProvider } from './context';\n\n/**\n * Root component for the BigConsole admin microfrontend.\n *\n * This is the admin entry point that host applications import and render.\n */\nexport const AdminRoot: FC<AdminRootProps> = (props) => {\n const { registerNavItems, registerFooterItems, basePath = '/admin/bigconsole' } = props;\n\n // Register a single admin nav item with the shell\n useEffect(() => {\n if (!registerNavItems) return;\n\n const cleanup = registerNavItems([\n {\n id: 'bigconsole-admin',\n label: 'BigConsole',\n path: basePath,\n icon: <BarChart3 size={20} />,\n order: 55,\n group: 'admin',\n },\n ]);\n\n return cleanup;\n }, [registerNavItems, basePath]);\n\n // Register footer status item\n useEffect(() => {\n if (!registerFooterItems) return;\n\n const cleanup = registerFooterItems([\n {\n id: 'bigconsole-admin-status',\n label: 'BigConsole Admin',\n type: 'status' as const,\n order: 55,\n section: 'left' as const,\n },\n ]);\n\n return cleanup;\n }, [registerFooterItems]);\n\n return (\n <ErrorBoundary\n fallback={\n <div className=\"p-6 text-center text-text-secondary\">\n Something went wrong loading BigConsole Admin. Please refresh the page.\n </div>\n }\n >\n <FeatureFlagProvider workspaceId={null} gateway=\"global\" defaultEnabled={true}>\n {/* PermissionProvider fetches myPermissions from wspace-rbac-svc via the\n workspace gateway (requires the shell's AuthProvider), scoped to the\n active workspace so admin UI gating matches gateway enforcement. */}\n <PermissionProvider scopeId={props.workspaceId ?? null} gateway=\"workspace\">\n <BigConsoleProvider props={props}>\n <AdminRoutes />\n </BigConsoleProvider>\n </PermissionProvider>\n </FeatureFlagProvider>\n </ErrorBoundary>\n );\n};\n"],"mappings":";;;;;;;;;;AAwBA,IAAa,KAAiC,MAAU;CACtD,IAAM,EAAE,qBAAkB,wBAAqB,cAAW,wBAAwB;AAqClF,QAlCA,QAAgB;AACT,QAaL,QAXgB,EAAiB,CAC/B;GACE,IAAI;GACJ,OAAO;GACP,MAAM;GACN,MAAM,kBAAC,GAAD,EAAW,MAAM,IAAM,CAAA;GAC7B,OAAO;GACP,OAAO;GACR,CACF,CAAC;IAGD,CAAC,GAAkB,EAAS,CAAC,EAGhC,QAAgB;AACT,QAYL,QAVgB,EAAoB,CAClC;GACE,IAAI;GACJ,OAAO;GACP,MAAM;GACN,OAAO;GACP,SAAS;GACV,CACF,CAAC;IAGD,CAAC,EAAoB,CAAC,EAGvB,kBAAC,GAAD;EACE,UACE,kBAAC,OAAD;GAAK,WAAU;aAAsC;GAE/C,CAAA;YAGR,kBAAC,GAAD;GAAqB,aAAa;GAAM,SAAQ;GAAS,gBAAgB;aAIvE,kBAAC,GAAD;IAAoB,SAAS,EAAM,eAAe;IAAM,SAAQ;cAC9D,kBAAC,GAAD;KAA2B;eACzB,kBAAC,GAAD,EAAe,CAAA;KACI,CAAA;IACF,CAAA;GACD,CAAA;EACR,CAAA"}
@@ -8,21 +8,22 @@ import { BigConsoleProvider as s } from "./context/BigConsoleContext.js";
8
8
  import "./context/index.js";
9
9
  import { BigConsoleQuotaProvider as c } from "./providers/BigConsoleQuotaProvider.js";
10
10
  import l from "./hooks/useFilterUrlSync.js";
11
- import u from "./components/DrilldownDashboardRenderer.js";
12
- import d from "./components/preview/AiPreviewPanel.js";
13
- import f from "./components/DrilldownModal.js";
14
- import { useCallback as p, useEffect as m, useLayoutEffect as h, useRef as g, useState as _ } from "react";
15
- import { useSearchParams as v } from "react-router";
16
- import { ErrorBoundary as y } from "@burdenoff/fe-libs/shared/components";
17
- import { FeatureFlagProvider as b } from "@burdenoff/fe-libs/shared/feature-flags";
18
- import { BarChart3 as x, Boxes as S, Database as C, LayoutDashboard as w, Lightbulb as T, Settings as ee } from "lucide-react";
11
+ import ee from "./components/DrilldownDashboardRenderer.js";
12
+ import u from "./components/preview/AiPreviewPanel.js";
13
+ import d from "./components/DrilldownModal.js";
14
+ import { useCallback as f, useEffect as p, useLayoutEffect as m, useRef as h, useState as g } from "react";
15
+ import { useSearchParams as _ } from "react-router";
16
+ import { ErrorBoundary as v } from "@burdenoff/fe-libs/shared/components";
17
+ import { FeatureFlagProvider as y } from "@burdenoff/fe-libs/shared/feature-flags";
18
+ import { PermissionProvider as b } from "@burdenoff/fe-libs/shared/providers/shell";
19
+ import { BarChart3 as x, Boxes as S, Database as C, LayoutDashboard as w, Lightbulb as te, Settings as T } from "lucide-react";
19
20
  import { jsx as E, jsxs as D } from "react/jsx-runtime";
20
21
  import { resetFluidGridsClient as O, resetFluidGridsConfig as k, resetGlobalStoreClient as A, setFluidGridsClient as j, setFluidGridsConfig as M, setGlobalStoreClient as N } from "@burdenoff/fluidgrids-fe-sdk";
21
22
  import { useGatewayClient as P } from "@burdenoff/fe-libs/shared/graphql";
22
23
  //#region src/bigconsole/BigConsoleRoot.tsx
23
24
  var F = i, I = r, L = a, R = /* @__PURE__ */ new Set(), z = (r) => {
24
- let { registerNavItems: i, registerFooterItems: a, basePath: z = "/bigconsole", navigate: B } = r, V = P("workspace"), H = P("global"), [U, W] = _(!1), [G, K] = _(null), q = (e, t) => (e.endsWith("/") ? e.slice(0, -1) : e) + (t.startsWith("/") ? t : `/${t}`);
25
- m(() => {
25
+ let { registerNavItems: i, registerFooterItems: a, basePath: z = "/bigconsole", navigate: B } = r, V = P("workspace"), H = P("global"), [U, W] = g(!1), [G, K] = g(null), q = (e, t) => (e.endsWith("/") ? e.slice(0, -1) : e) + (t.startsWith("/") ? t : `/${t}`);
26
+ p(() => {
26
27
  if (i) return i({
27
28
  id: "bigconsole",
28
29
  label: "Analytics",
@@ -56,7 +57,7 @@ var F = i, I = r, L = a, R = /* @__PURE__ */ new Set(), z = (r) => {
56
57
  id: "bigconsole-insights",
57
58
  label: "AI Insights",
58
59
  path: q(z, "insights"),
59
- icon: /* @__PURE__ */ E(T, { size: 16 }),
60
+ icon: /* @__PURE__ */ E(te, { size: 16 }),
60
61
  order: 40
61
62
  },
62
63
  {
@@ -70,12 +71,12 @@ var F = i, I = r, L = a, R = /* @__PURE__ */ new Set(), z = (r) => {
70
71
  id: "bigconsole-settings",
71
72
  label: "Settings",
72
73
  path: q(z, "settings"),
73
- icon: /* @__PURE__ */ E(ee, { size: 16 }),
74
+ icon: /* @__PURE__ */ E(T, { size: 16 }),
74
75
  order: 60
75
76
  }
76
77
  ]
77
78
  });
78
- }, [i, z]), m(() => {
79
+ }, [i, z]), p(() => {
79
80
  if (a) return a([{
80
81
  id: "bigconsole-status",
81
82
  label: "Analytics Ready",
@@ -83,16 +84,16 @@ var F = i, I = r, L = a, R = /* @__PURE__ */ new Set(), z = (r) => {
83
84
  order: 15,
84
85
  section: "left"
85
86
  }]);
86
- }, [a]), m(() => (V && H && (j(V), N(H), W(!0)), () => {
87
+ }, [a]), p(() => (V && H && (j(V), N(H), W(!0)), () => {
87
88
  O(), A();
88
- }), [V, H]), m(() => {
89
+ }), [V, H]), p(() => {
89
90
  if (U) return;
90
91
  let e = setTimeout(() => {
91
92
  U || K("BigConsole could not connect to the gateway. Please refresh the page or check your configuration.");
92
93
  }, 1e4);
93
94
  return () => clearTimeout(e);
94
95
  }, [U]);
95
- let J = p(async (e) => {
96
+ let J = f(async (e) => {
96
97
  if (e.operation === "created") {
97
98
  if (!V) {
98
99
  console.warn("[BigConsole] onWorkflowSaved: workspace client not ready");
@@ -123,10 +124,10 @@ var F = i, I = r, L = a, R = /* @__PURE__ */ new Set(), z = (r) => {
123
124
  }
124
125
  }
125
126
  }
126
- }, [V]), Y = g(J);
127
- h(() => {
127
+ }, [V]), Y = h(J);
128
+ m(() => {
128
129
  Y.current = J;
129
- }, [J]), m(() => {
130
+ }, [J]), p(() => {
130
131
  if (r.apiGatewayUrl) {
131
132
  let e = r.apiGatewayUrl.endsWith("/") ? r.apiGatewayUrl.slice(0, -1) : r.apiGatewayUrl;
132
133
  console.log("[BigConsole] Setting FluidGrids config", {
@@ -156,9 +157,9 @@ var F = i, I = r, L = a, R = /* @__PURE__ */ new Set(), z = (r) => {
156
157
  r.productId,
157
158
  r.productName
158
159
  ]);
159
- let [X, Z] = v(), Q = e((e) => e.isOpen), $ = e((e) => e.closeModal);
160
+ let [X, Z] = _(), Q = e((e) => e.isOpen), $ = e((e) => e.closeModal);
160
161
  l();
161
- let te = p(() => {
162
+ let ne = f(() => {
162
163
  $();
163
164
  let e = new URLSearchParams(X);
164
165
  Array.from(e.keys()).forEach((t) => {
@@ -168,39 +169,43 @@ var F = i, I = r, L = a, R = /* @__PURE__ */ new Set(), z = (r) => {
168
169
  $,
169
170
  X,
170
171
  Z
171
- ]), ne = p(() => {
172
+ ]), re = f(() => {
172
173
  if (B) {
173
174
  B("/billing");
174
175
  return;
175
176
  }
176
177
  window.location.assign("/billing");
177
- }, [B]), re = p((e, t) => /* @__PURE__ */ E(u, {
178
+ }, [B]), ie = f((e, t) => /* @__PURE__ */ E(ee, {
178
179
  dashboardId: e,
179
180
  params: t
180
181
  }), []);
181
- return U ? /* @__PURE__ */ E(y, {
182
+ return U ? /* @__PURE__ */ E(v, {
182
183
  fallback: /* @__PURE__ */ E("div", {
183
184
  className: "p-6 text-center text-text-secondary",
184
185
  children: "Something went wrong loading BigConsole. Please refresh the page."
185
186
  }),
186
- children: /* @__PURE__ */ E(b, {
187
+ children: /* @__PURE__ */ E(y, {
187
188
  workspaceId: null,
188
189
  gateway: "global",
189
190
  defaultEnabled: !0,
190
- children: /* @__PURE__ */ E(s, {
191
- props: r,
192
- children: /* @__PURE__ */ E(c, {
193
- onViewBilling: ne,
194
- children: /* @__PURE__ */ E(n, {
195
- basePath: z,
196
- children: /* @__PURE__ */ D(t, { children: [
197
- /* @__PURE__ */ E(d, {}),
198
- /* @__PURE__ */ E(o, { ...r }),
199
- Q && /* @__PURE__ */ E(f, {
200
- onClose: te,
201
- renderDashboard: re
202
- })
203
- ] })
191
+ children: /* @__PURE__ */ E(b, {
192
+ scopeId: r.workspaceId ?? null,
193
+ gateway: "workspace",
194
+ children: /* @__PURE__ */ E(s, {
195
+ props: r,
196
+ children: /* @__PURE__ */ E(c, {
197
+ onViewBilling: re,
198
+ children: /* @__PURE__ */ E(n, {
199
+ basePath: z,
200
+ children: /* @__PURE__ */ D(t, { children: [
201
+ /* @__PURE__ */ E(u, {}),
202
+ /* @__PURE__ */ E(o, { ...r }),
203
+ Q && /* @__PURE__ */ E(d, {
204
+ onClose: ne,
205
+ renderDashboard: ie
206
+ })
207
+ ] })
208
+ })
204
209
  })
205
210
  })
206
211
  })
@@ -1 +1 @@
1
- {"version":3,"file":"BigConsoleRoot.js","names":[],"sources":["../../src/bigconsole/BigConsoleRoot.tsx"],"sourcesContent":["import type { FC } from 'react';\nimport { useEffect, useCallback, useLayoutEffect, useRef, useState } from 'react';\nimport { useSearchParams } from 'react-router';\nimport type { TypedDocumentNode } from '@apollo/client';\nimport { ErrorBoundary } from '@burdenoff/fe-libs/shared/components';\nimport { FeatureFlagProvider } from '@burdenoff/fe-libs/shared/feature-flags';\nimport { BarChart3, Database, LayoutDashboard, Lightbulb, Settings, Boxes } from 'lucide-react';\nimport type { BigConsoleRootProps } from './types';\nimport { BigConsoleRoutes } from './BigConsoleRoutes';\nimport { BigConsoleProvider } from './context';\nimport { NavigationProvider, CrossFilterProvider } from './contexts';\nimport { BigConsoleQuotaProvider } from './providers/BigConsoleQuotaProvider';\nimport { AiPreviewPanel } from './components/preview/AiPreviewPanel';\nimport { DrilldownModal } from './components/DrilldownModal';\nimport { DrilldownDashboardRenderer } from './components/DrilldownDashboardRenderer';\nimport { useFilterUrlSync } from './hooks/useFilterUrlSync';\nimport { useDrilldownStore } from './store/drilldownStore';\n\n// FluidGrids SDK client injection (needed for workflow components)\nimport {\n setFluidGridsClient,\n resetFluidGridsClient,\n setFluidGridsConfig,\n resetFluidGridsConfig,\n setGlobalStoreClient,\n resetGlobalStoreClient,\n} from '@burdenoff/fluidgrids-fe-sdk';\n// Use the shared gateway Apollo clients from the shell\nimport { useGatewayClient } from '@burdenoff/fe-libs/shared/graphql';\nimport {\n CreateWorkflowDocument,\n GetWorkflowByKeyDocument,\n ListWorkflowsDocument,\n type GetWorkflowByKeyQuery,\n type GetWorkflowByKeyQueryVariables,\n type CreateWorkflowMutation,\n type CreateWorkflowMutationVariables,\n type ListWorkflowsQuery,\n type ListWorkflowsQueryVariables,\n} from '../generated/wspace-operations';\n\nconst getWorkflowByKeyDocument = GetWorkflowByKeyDocument as unknown as TypedDocumentNode<\n GetWorkflowByKeyQuery,\n GetWorkflowByKeyQueryVariables\n>;\nconst createWorkflowDocument = CreateWorkflowDocument as unknown as TypedDocumentNode<\n CreateWorkflowMutation,\n CreateWorkflowMutationVariables\n>;\nconst listWorkflowsDocument = ListWorkflowsDocument as unknown as TypedDocumentNode<\n ListWorkflowsQuery,\n ListWorkflowsQueryVariables\n>;\n\n/**\n * Local contract for the workflow-save payload emitted by the embedded FluidGrids builder.\n * Kept explicit here to maintain strict typing at the BigConsole boundary.\n */\ninterface WorkflowSavedResult {\n dbId: string;\n workflowKey: string;\n version: string;\n name: string;\n description?: string;\n operation: 'created' | 'updated' | 'versioned';\n}\n\n// In-flight guard: prevents duplicate BigConsole records when the callback\n// fires twice in rapid succession (React StrictMode, retry, double-click).\n// Server unique constraint on `key` is the ultimate backstop.\nconst inFlightKeys = new Set<string>();\n\n/**\n * Root component for the BigConsole microfrontend.\n *\n * This is the main entry point that host applications import and render.\n * It sets up the necessary providers and renders the internal routing.\n * Automatically registers navigation items with the shell if registration functions are provided.\n *\n * @example\n * ```tsx\n * import { BigConsoleRoot, type BigConsoleRootProps } from '@burdenoff/microfe-bigconsole';\n *\n * function App() {\n * const props: BigConsoleRootProps = {\n * basePath: '/analytics',\n * navigate: (path) => router.push(path),\n * currentUser: { id: '1', email: 'user@example.com' },\n * apiGatewayUrl: 'https://api.example.com',\n * authToken: 'token',\n * };\n *\n * return <BigConsoleRoot {...props} />;\n * }\n * ```\n */\nexport const BigConsoleRoot: FC<BigConsoleRootProps> = (props) => {\n const { registerNavItems, registerFooterItems, basePath = '/bigconsole', navigate: hostNavigate } = props;\n\n // Use the shared Apollo clients from the shell (both workspace and global)\n const workspaceClient = useGatewayClient('workspace');\n const globalClient = useGatewayClient('global');\n const [clientReady, setClientReady] = useState(false);\n const [clientError, setClientError] = useState<string | null>(null);\n\n // Helper to join paths correctly, avoiding double slashes\n const joinPath = (base: string, path: string): string => {\n const cleanBase = base.endsWith('/') ? base.slice(0, -1) : base;\n const cleanPath = path.startsWith('/') ? path : `/${path}`;\n return cleanBase + cleanPath;\n };\n\n // Register navigation items with the shell\n useEffect(() => {\n if (!registerNavItems) return;\n\n const bigConsoleNavItem = {\n id: 'bigconsole',\n label: 'Analytics',\n path: basePath,\n icon: <BarChart3 size={20} />,\n order: 15,\n group: 'bigconsole',\n children: [\n {\n id: 'bigconsole-home',\n label: 'Overview',\n path: basePath,\n icon: <BarChart3 size={16} />,\n order: 10,\n },\n {\n id: 'bigconsole-dashboards',\n label: 'Dashboards',\n path: joinPath(basePath, 'dashboards'),\n icon: <LayoutDashboard size={16} />,\n order: 20,\n },\n {\n id: 'bigconsole-datasources',\n label: 'Data Sources',\n path: joinPath(basePath, 'datasources'),\n icon: <Database size={16} />,\n order: 30,\n },\n {\n id: 'bigconsole-insights',\n label: 'AI Insights',\n path: joinPath(basePath, 'insights'),\n icon: <Lightbulb size={16} />,\n order: 40,\n },\n {\n id: 'bigconsole-widgets',\n label: 'Widget Demo',\n path: joinPath(basePath, 'widgets/demo'),\n icon: <Boxes size={16} />,\n order: 50,\n },\n {\n id: 'bigconsole-settings',\n label: 'Settings',\n path: joinPath(basePath, 'settings'),\n icon: <Settings size={16} />,\n order: 60,\n },\n ],\n };\n\n const cleanup = registerNavItems(bigConsoleNavItem);\n return cleanup;\n }, [registerNavItems, basePath]);\n\n // Register footer items\n useEffect(() => {\n if (!registerFooterItems) return;\n\n const footerItems = [\n {\n id: 'bigconsole-status',\n label: 'Analytics Ready',\n type: 'status' as const,\n order: 15,\n section: 'left' as const,\n },\n ];\n\n const cleanup = registerFooterItems(footerItems);\n return cleanup;\n }, [registerFooterItems]);\n\n // Inject Apollo clients into FluidGrids SDK (for workflow components)\n // This synchronizes external stores (module-level client singletons in the SDK)\n // with React's lifecycle. The setState call is intentional — it gates rendering\n // so children don't mount before the SDK clients are available.\n //\n // KNOWN TRADE-OFF: clientReady is NOT reset in cleanup. When workspaceClient/globalClient\n // change references (e.g. token refresh), children continue rendering against a briefly\n // uninitialized SDK client until the next effect run re-injects the new client. This avoids\n // a visible spinner flash mid-session. Failed SDK requests during this short window will\n // be retried by React Query / Apollo's retry policies. If this becomes a real issue,\n // consider using startTransition to reset clientReady without the visual disruption.\n useEffect(() => {\n if (workspaceClient && globalClient) {\n setFluidGridsClient(workspaceClient);\n setGlobalStoreClient(globalClient);\n // eslint-disable-next-line react-hooks/set-state-in-effect -- intentional: gate children until external SDK clients are injected\n setClientReady(true);\n }\n return () => {\n resetFluidGridsClient();\n resetGlobalStoreClient();\n };\n }, [workspaceClient, globalClient]);\n\n // Timeout fallback: if gateway clients are never provided (test env, shell\n // misconfiguration, auth failure before hydration), show an error rather\n // than spinning indefinitely.\n useEffect(() => {\n if (clientReady) return;\n const timer = setTimeout(() => {\n if (!clientReady) {\n setClientError(\n 'BigConsole could not connect to the gateway. Please refresh the page or check your configuration.'\n );\n }\n }, 10_000);\n return () => clearTimeout(timer);\n }, [clientReady]);\n\n // Callback: sync workflow metadata to BigConsole after FluidGrids SDK saves\n const handleWorkflowSaved = useCallback(\n async (result: WorkflowSavedResult) => {\n // Only create a BigConsole record for brand-new workflows.\n // 'updated' = edit of existing, 'versioned' = new snapshot of same key — both already have records.\n if (result.operation !== 'created') return;\n\n if (!workspaceClient) {\n console.warn('[BigConsole] onWorkflowSaved: workspace client not ready');\n return;\n }\n\n // In-flight guard: prevent duplicate records from rapid double-fire\n // (React StrictMode, retry, fast double-click).\n if (inFlightKeys.has(result.workflowKey)) return;\n inFlightKeys.add(result.workflowKey);\n\n try {\n // Idempotency check — avoid creating duplicates if callback fires twice\n const existing = await workspaceClient.query<GetWorkflowByKeyQuery>({\n query: getWorkflowByKeyDocument,\n variables: { key: result.workflowKey },\n fetchPolicy: 'network-only',\n });\n\n if (existing.data?.workflowByKey) {\n return;\n }\n\n // Create BigConsole metadata record linked to the SDK workflow\n await workspaceClient.mutate<CreateWorkflowMutation>({\n mutation: createWorkflowDocument,\n variables: {\n input: {\n name: result.name,\n key: result.workflowKey,\n description: result.description,\n externalWorkflowId: result.dbId,\n },\n },\n refetchQueries: [{ query: listWorkflowsDocument }],\n });\n } catch (err) {\n // Possible: network error, or duplicate-key constraint (race condition).\n // SDK save already succeeded — never block the user.\n console.warn('[BigConsole] onWorkflowSaved: failed to create record:', err);\n } finally {\n inFlightKeys.delete(result.workflowKey);\n }\n },\n [workspaceClient]\n );\n\n // BOFF-1870 follow-up: keep this ref bridge explicit as the breadcrumb for\n // why this callback is decoupled from SDK config updates.\n // Ref-forwarding: decouple the callback from the SDK config effect so that\n // workspaceClient reference changes don't trigger resetFluidGridsConfig() + re-init.\n const handleWorkflowSavedRef = useRef(handleWorkflowSaved);\n // eslint-disable-next-line react-hooks/set-state-in-effect -- intentional: keep ref in sync with latest callback\n useLayoutEffect(() => {\n handleWorkflowSavedRef.current = handleWorkflowSaved;\n }, [handleWorkflowSaved]);\n\n // Configure FluidGrids SDK settings\n useEffect(() => {\n if (props.apiGatewayUrl) {\n const normalizedBase = props.apiGatewayUrl.endsWith('/') ? props.apiGatewayUrl.slice(0, -1) : props.apiGatewayUrl;\n\n console.log('[BigConsole] Setting FluidGrids config', {\n apiGatewayUrl: normalizedBase,\n workspaceId: props.workspaceId,\n tenantId: props.tenantId,\n productId: props.productId,\n productName: props.productName,\n });\n\n setFluidGridsConfig({\n apiGatewayUrl: normalizedBase,\n authToken: props.authToken,\n workspaceId: props.workspaceId ?? '',\n tenantId: props.tenantId,\n // Default to 'bigconsole' when unset — the SDK uses productId for workflow isolation\n // (filtering workflows by product). undefined would show all products' workflows.\n productId: props.productId ?? 'bigconsole',\n productName: props.productName ?? 'BigConsole',\n // Stable wrapper via ref — avoids SDK re-init when workspaceClient changes reference\n onWorkflowSaved: (result: WorkflowSavedResult) => handleWorkflowSavedRef.current(result),\n });\n }\n return () => {\n resetFluidGridsConfig();\n };\n // handleWorkflowSavedRef is stable (useRef) — intentionally excluded to prevent SDK re-init on client change\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [props.apiGatewayUrl, props.authToken, props.workspaceId, props.tenantId, props.productId, props.productName]);\n\n // Drilldown modal state from store\n const [searchParams, setSearchParams] = useSearchParams();\n const isModalOpen = useDrilldownStore((state) => state.isOpen);\n const closeModal = useDrilldownStore((state) => state.closeModal);\n useFilterUrlSync();\n\n const handleDrilldownClose = useCallback(() => {\n closeModal();\n // Clear any cross-filter URL params when closing drilldown modal\n const newParams = new URLSearchParams(searchParams);\n Array.from(newParams.keys()).forEach((key) => {\n if (key.startsWith('filter_') || key.startsWith('ctx_')) {\n newParams.delete(key);\n }\n });\n setSearchParams(newParams, { replace: true });\n // Remove focus from any element to prevent blue border\n if (document.activeElement instanceof HTMLElement) {\n document.activeElement.blur();\n }\n }, [closeModal, searchParams, setSearchParams]);\n\n const handleViewBilling = useCallback(() => {\n if (hostNavigate) {\n hostNavigate('/billing');\n return;\n }\n window.location.assign('/billing');\n }, [hostNavigate]);\n\n // Render a DrilldownDashboardRenderer inside the modal when a drilldown is active.\n // This callback is only invoked by DrilldownModal when isOpen && dashboardId are set,\n // so the renderer always receives a valid dashboardId.\n // NOTE: Must be declared before the early return below to satisfy React's rules of hooks.\n const renderDrilldownDashboard = useCallback(\n (dashboardId: string, params: Record<string, unknown>) => (\n <DrilldownDashboardRenderer dashboardId={dashboardId} params={params} />\n ),\n []\n );\n\n // Don't render until client is ready (same pattern as microfe-workflows)\n if (!clientReady) {\n if (clientError) {\n return (\n <div className=\"flex h-full min-h-[200px] w-full items-center justify-center p-6\">\n <div className=\"text-center\">\n <p className=\"text-sm text-text-secondary mb-4\">{clientError}</p>\n <button\n type=\"button\"\n onClick={() => window.location.reload()}\n className=\"px-4 py-2 text-sm font-medium text-white bg-action-primary-bg hover:bg-action-primary-bg/90 rounded-md transition-colors\"\n >\n Reload Page\n </button>\n </div>\n </div>\n );\n }\n return (\n <div className=\"flex h-full min-h-[200px] w-full items-center justify-center\">\n <div className=\"h-8 w-8 animate-spin rounded-full border-4 border-gray-300 border-t-blue-600\" />\n </div>\n );\n }\n\n return (\n <ErrorBoundary\n fallback={\n <div className=\"p-6 text-center text-text-secondary\">\n Something went wrong loading BigConsole. Please refresh the page.\n </div>\n }\n >\n <FeatureFlagProvider workspaceId={null} gateway=\"global\" defaultEnabled={true}>\n <BigConsoleProvider props={props}>\n <BigConsoleQuotaProvider onViewBilling={handleViewBilling}>\n <NavigationProvider basePath={basePath}>\n <CrossFilterProvider>\n {/* Sits ABOVE the routed page, so when the assistant starts building\n you watch it happen on whatever screen you were already on —\n rather than having to guess which list to go and refresh. */}\n <AiPreviewPanel />\n <BigConsoleRoutes {...props} />\n {isModalOpen && (\n <DrilldownModal onClose={handleDrilldownClose} renderDashboard={renderDrilldownDashboard} />\n )}\n </CrossFilterProvider>\n </NavigationProvider>\n </BigConsoleQuotaProvider>\n </BigConsoleProvider>\n </FeatureFlagProvider>\n </ErrorBoundary>\n );\n};\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;AAyCA,IAAM,IAA2B,GAI3B,IAAyB,GAIzB,IAAwB,GAqBxB,oBAAe,IAAI,KAAa,EA0BzB,KAA2C,MAAU;CAChE,IAAM,EAAE,qBAAkB,wBAAqB,cAAW,eAAe,UAAU,MAAiB,GAG9F,IAAkB,EAAiB,YAAY,EAC/C,IAAe,EAAiB,SAAS,EACzC,CAAC,GAAa,KAAkB,EAAS,GAAM,EAC/C,CAAC,GAAa,KAAkB,EAAwB,KAAK,EAG7D,KAAY,GAAc,OACZ,EAAK,SAAS,IAAI,GAAG,EAAK,MAAM,GAAG,GAAG,GAAG,MACzC,EAAK,WAAW,IAAI,GAAG,IAAO,IAAI;AA8GtD,CAzGA,QAAgB;AACT,QAwDL,QADgB,EArDU;GACxB,IAAI;G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CAAA;OAE1E,EAAA,CAAA;MACH,CAAA;KACG,CAAA;IACP,CAAA;GACD,CAAA;EACR,CAAA,GAjDZ,IAEA,kBAAC,OAAD;EAAK,WAAU;YACb,kBAAC,OAAD;GAAK,WAAU;aAAf,CACE,kBAAC,KAAD;IAAG,WAAU;cAAoC;IAAgB,CAAA,EACjE,kBAAC,UAAD;IACE,MAAK;IACL,eAAe,OAAO,SAAS,QAAQ;IACvC,WAAU;cACX;IAEQ,CAAA,CACL;;EACF,CAAA,GAIR,kBAAC,OAAD;EAAK,WAAU;YACb,kBAAC,OAAD,EAAK,WAAU,gFAAiF,CAAA;EAC5F,CAAA"}
1
+ {"version":3,"file":"BigConsoleRoot.js","names":[],"sources":["../../src/bigconsole/BigConsoleRoot.tsx"],"sourcesContent":["import type { FC } from 'react';\nimport { useEffect, useCallback, useLayoutEffect, useRef, useState } from 'react';\nimport { useSearchParams } from 'react-router';\nimport type { TypedDocumentNode } from '@apollo/client';\nimport { ErrorBoundary } from '@burdenoff/fe-libs/shared/components';\nimport { FeatureFlagProvider } from '@burdenoff/fe-libs/shared/feature-flags';\nimport { PermissionProvider } from '@burdenoff/fe-libs/shared/providers/shell';\nimport { BarChart3, Database, LayoutDashboard, Lightbulb, Settings, Boxes } from 'lucide-react';\nimport type { BigConsoleRootProps } from './types';\nimport { BigConsoleRoutes } from './BigConsoleRoutes';\nimport { BigConsoleProvider } from './context';\nimport { NavigationProvider, CrossFilterProvider } from './contexts';\nimport { BigConsoleQuotaProvider } from './providers/BigConsoleQuotaProvider';\nimport { AiPreviewPanel } from './components/preview/AiPreviewPanel';\nimport { DrilldownModal } from './components/DrilldownModal';\nimport { DrilldownDashboardRenderer } from './components/DrilldownDashboardRenderer';\nimport { useFilterUrlSync } from './hooks/useFilterUrlSync';\nimport { useDrilldownStore } from './store/drilldownStore';\n\n// FluidGrids SDK client injection (needed for workflow components)\nimport {\n setFluidGridsClient,\n resetFluidGridsClient,\n setFluidGridsConfig,\n resetFluidGridsConfig,\n setGlobalStoreClient,\n resetGlobalStoreClient,\n} from '@burdenoff/fluidgrids-fe-sdk';\n// Use the shared gateway Apollo clients from the shell\nimport { useGatewayClient } from '@burdenoff/fe-libs/shared/graphql';\nimport {\n CreateWorkflowDocument,\n GetWorkflowByKeyDocument,\n ListWorkflowsDocument,\n type GetWorkflowByKeyQuery,\n type GetWorkflowByKeyQueryVariables,\n type CreateWorkflowMutation,\n type CreateWorkflowMutationVariables,\n type ListWorkflowsQuery,\n type ListWorkflowsQueryVariables,\n} from '../generated/wspace-operations';\n\nconst getWorkflowByKeyDocument = GetWorkflowByKeyDocument as unknown as TypedDocumentNode<\n GetWorkflowByKeyQuery,\n GetWorkflowByKeyQueryVariables\n>;\nconst createWorkflowDocument = CreateWorkflowDocument as unknown as TypedDocumentNode<\n CreateWorkflowMutation,\n CreateWorkflowMutationVariables\n>;\nconst listWorkflowsDocument = ListWorkflowsDocument as unknown as TypedDocumentNode<\n ListWorkflowsQuery,\n ListWorkflowsQueryVariables\n>;\n\n/**\n * Local contract for the workflow-save payload emitted by the embedded FluidGrids builder.\n * Kept explicit here to maintain strict typing at the BigConsole boundary.\n */\ninterface WorkflowSavedResult {\n dbId: string;\n workflowKey: string;\n version: string;\n name: string;\n description?: string;\n operation: 'created' | 'updated' | 'versioned';\n}\n\n// In-flight guard: prevents duplicate BigConsole records when the callback\n// fires twice in rapid succession (React StrictMode, retry, double-click).\n// Server unique constraint on `key` is the ultimate backstop.\nconst inFlightKeys = new Set<string>();\n\n/**\n * Root component for the BigConsole microfrontend.\n *\n * This is the main entry point that host applications import and render.\n * It sets up the necessary providers and renders the internal routing.\n * Automatically registers navigation items with the shell if registration functions are provided.\n *\n * @example\n * ```tsx\n * import { BigConsoleRoot, type BigConsoleRootProps } from '@burdenoff/microfe-bigconsole';\n *\n * function App() {\n * const props: BigConsoleRootProps = {\n * basePath: '/analytics',\n * navigate: (path) => router.push(path),\n * currentUser: { id: '1', email: 'user@example.com' },\n * apiGatewayUrl: 'https://api.example.com',\n * authToken: 'token',\n * };\n *\n * return <BigConsoleRoot {...props} />;\n * }\n * ```\n */\nexport const BigConsoleRoot: FC<BigConsoleRootProps> = (props) => {\n const { registerNavItems, registerFooterItems, basePath = '/bigconsole', navigate: hostNavigate } = props;\n\n // Use the shared Apollo clients from the shell (both workspace and global)\n const workspaceClient = useGatewayClient('workspace');\n const globalClient = useGatewayClient('global');\n const [clientReady, setClientReady] = useState(false);\n const [clientError, setClientError] = useState<string | null>(null);\n\n // Helper to join paths correctly, avoiding double slashes\n const joinPath = (base: string, path: string): string => {\n const cleanBase = base.endsWith('/') ? base.slice(0, -1) : base;\n const cleanPath = path.startsWith('/') ? path : `/${path}`;\n return cleanBase + cleanPath;\n };\n\n // Register navigation items with the shell\n useEffect(() => {\n if (!registerNavItems) return;\n\n const bigConsoleNavItem = {\n id: 'bigconsole',\n label: 'Analytics',\n path: basePath,\n icon: <BarChart3 size={20} />,\n order: 15,\n group: 'bigconsole',\n children: [\n {\n id: 'bigconsole-home',\n label: 'Overview',\n path: basePath,\n icon: <BarChart3 size={16} />,\n order: 10,\n },\n {\n id: 'bigconsole-dashboards',\n label: 'Dashboards',\n path: joinPath(basePath, 'dashboards'),\n icon: <LayoutDashboard size={16} />,\n order: 20,\n },\n {\n id: 'bigconsole-datasources',\n label: 'Data Sources',\n path: joinPath(basePath, 'datasources'),\n icon: <Database size={16} />,\n order: 30,\n },\n {\n id: 'bigconsole-insights',\n label: 'AI Insights',\n path: joinPath(basePath, 'insights'),\n icon: <Lightbulb size={16} />,\n order: 40,\n },\n {\n id: 'bigconsole-widgets',\n label: 'Widget Demo',\n path: joinPath(basePath, 'widgets/demo'),\n icon: <Boxes size={16} />,\n order: 50,\n },\n {\n id: 'bigconsole-settings',\n label: 'Settings',\n path: joinPath(basePath, 'settings'),\n icon: <Settings size={16} />,\n order: 60,\n },\n ],\n };\n\n const cleanup = registerNavItems(bigConsoleNavItem);\n return cleanup;\n }, [registerNavItems, basePath]);\n\n // Register footer items\n useEffect(() => {\n if (!registerFooterItems) return;\n\n const footerItems = [\n {\n id: 'bigconsole-status',\n label: 'Analytics Ready',\n type: 'status' as const,\n order: 15,\n section: 'left' as const,\n },\n ];\n\n const cleanup = registerFooterItems(footerItems);\n return cleanup;\n }, [registerFooterItems]);\n\n // Inject Apollo clients into FluidGrids SDK (for workflow components)\n // This synchronizes external stores (module-level client singletons in the SDK)\n // with React's lifecycle. The setState call is intentional — it gates rendering\n // so children don't mount before the SDK clients are available.\n //\n // KNOWN TRADE-OFF: clientReady is NOT reset in cleanup. When workspaceClient/globalClient\n // change references (e.g. token refresh), children continue rendering against a briefly\n // uninitialized SDK client until the next effect run re-injects the new client. This avoids\n // a visible spinner flash mid-session. Failed SDK requests during this short window will\n // be retried by React Query / Apollo's retry policies. If this becomes a real issue,\n // consider using startTransition to reset clientReady without the visual disruption.\n useEffect(() => {\n if (workspaceClient && globalClient) {\n setFluidGridsClient(workspaceClient);\n setGlobalStoreClient(globalClient);\n // eslint-disable-next-line react-hooks/set-state-in-effect -- intentional: gate children until external SDK clients are injected\n setClientReady(true);\n }\n return () => {\n resetFluidGridsClient();\n resetGlobalStoreClient();\n };\n }, [workspaceClient, globalClient]);\n\n // Timeout fallback: if gateway clients are never provided (test env, shell\n // misconfiguration, auth failure before hydration), show an error rather\n // than spinning indefinitely.\n useEffect(() => {\n if (clientReady) return;\n const timer = setTimeout(() => {\n if (!clientReady) {\n setClientError(\n 'BigConsole could not connect to the gateway. Please refresh the page or check your configuration.'\n );\n }\n }, 10_000);\n return () => clearTimeout(timer);\n }, [clientReady]);\n\n // Callback: sync workflow metadata to BigConsole after FluidGrids SDK saves\n const handleWorkflowSaved = useCallback(\n async (result: WorkflowSavedResult) => {\n // Only create a BigConsole record for brand-new workflows.\n // 'updated' = edit of existing, 'versioned' = new snapshot of same key — both already have records.\n if (result.operation !== 'created') return;\n\n if (!workspaceClient) {\n console.warn('[BigConsole] onWorkflowSaved: workspace client not ready');\n return;\n }\n\n // In-flight guard: prevent duplicate records from rapid double-fire\n // (React StrictMode, retry, fast double-click).\n if (inFlightKeys.has(result.workflowKey)) return;\n inFlightKeys.add(result.workflowKey);\n\n try {\n // Idempotency check — avoid creating duplicates if callback fires twice\n const existing = await workspaceClient.query<GetWorkflowByKeyQuery>({\n query: getWorkflowByKeyDocument,\n variables: { key: result.workflowKey },\n fetchPolicy: 'network-only',\n });\n\n if (existing.data?.workflowByKey) {\n return;\n }\n\n // Create BigConsole metadata record linked to the SDK workflow\n await workspaceClient.mutate<CreateWorkflowMutation>({\n mutation: createWorkflowDocument,\n variables: {\n input: {\n name: result.name,\n key: result.workflowKey,\n description: result.description,\n externalWorkflowId: result.dbId,\n },\n },\n refetchQueries: [{ query: listWorkflowsDocument }],\n });\n } catch (err) {\n // Possible: network error, or duplicate-key constraint (race condition).\n // SDK save already succeeded — never block the user.\n console.warn('[BigConsole] onWorkflowSaved: failed to create record:', err);\n } finally {\n inFlightKeys.delete(result.workflowKey);\n }\n },\n [workspaceClient]\n );\n\n // BOFF-1870 follow-up: keep this ref bridge explicit as the breadcrumb for\n // why this callback is decoupled from SDK config updates.\n // Ref-forwarding: decouple the callback from the SDK config effect so that\n // workspaceClient reference changes don't trigger resetFluidGridsConfig() + re-init.\n const handleWorkflowSavedRef = useRef(handleWorkflowSaved);\n // eslint-disable-next-line react-hooks/set-state-in-effect -- intentional: keep ref in sync with latest callback\n useLayoutEffect(() => {\n handleWorkflowSavedRef.current = handleWorkflowSaved;\n }, [handleWorkflowSaved]);\n\n // Configure FluidGrids SDK settings\n useEffect(() => {\n if (props.apiGatewayUrl) {\n const normalizedBase = props.apiGatewayUrl.endsWith('/') ? props.apiGatewayUrl.slice(0, -1) : props.apiGatewayUrl;\n\n console.log('[BigConsole] Setting FluidGrids config', {\n apiGatewayUrl: normalizedBase,\n workspaceId: props.workspaceId,\n tenantId: props.tenantId,\n productId: props.productId,\n productName: props.productName,\n });\n\n setFluidGridsConfig({\n apiGatewayUrl: normalizedBase,\n authToken: props.authToken,\n workspaceId: props.workspaceId ?? '',\n tenantId: props.tenantId,\n // Default to 'bigconsole' when unset — the SDK uses productId for workflow isolation\n // (filtering workflows by product). undefined would show all products' workflows.\n productId: props.productId ?? 'bigconsole',\n productName: props.productName ?? 'BigConsole',\n // Stable wrapper via ref — avoids SDK re-init when workspaceClient changes reference\n onWorkflowSaved: (result: WorkflowSavedResult) => handleWorkflowSavedRef.current(result),\n });\n }\n return () => {\n resetFluidGridsConfig();\n };\n // handleWorkflowSavedRef is stable (useRef) — intentionally excluded to prevent SDK re-init on client change\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [props.apiGatewayUrl, props.authToken, props.workspaceId, props.tenantId, props.productId, props.productName]);\n\n // Drilldown modal state from store\n const [searchParams, setSearchParams] = useSearchParams();\n const isModalOpen = useDrilldownStore((state) => state.isOpen);\n const closeModal = useDrilldownStore((state) => state.closeModal);\n useFilterUrlSync();\n\n const handleDrilldownClose = useCallback(() => {\n closeModal();\n // Clear any cross-filter URL params when closing drilldown modal\n const newParams = new URLSearchParams(searchParams);\n Array.from(newParams.keys()).forEach((key) => {\n if (key.startsWith('filter_') || key.startsWith('ctx_')) {\n newParams.delete(key);\n }\n });\n setSearchParams(newParams, { replace: true });\n // Remove focus from any element to prevent blue border\n if (document.activeElement instanceof HTMLElement) {\n document.activeElement.blur();\n }\n }, [closeModal, searchParams, setSearchParams]);\n\n const handleViewBilling = useCallback(() => {\n if (hostNavigate) {\n hostNavigate('/billing');\n return;\n }\n window.location.assign('/billing');\n }, [hostNavigate]);\n\n // Render a DrilldownDashboardRenderer inside the modal when a drilldown is active.\n // This callback is only invoked by DrilldownModal when isOpen && dashboardId are set,\n // so the renderer always receives a valid dashboardId.\n // NOTE: Must be declared before the early return below to satisfy React's rules of hooks.\n const renderDrilldownDashboard = useCallback(\n (dashboardId: string, params: Record<string, unknown>) => (\n <DrilldownDashboardRenderer dashboardId={dashboardId} params={params} />\n ),\n []\n );\n\n // Don't render until client is ready (same pattern as microfe-workflows)\n if (!clientReady) {\n if (clientError) {\n return (\n <div className=\"flex h-full min-h-[200px] w-full items-center justify-center p-6\">\n <div className=\"text-center\">\n <p className=\"text-sm text-text-secondary mb-4\">{clientError}</p>\n <button\n type=\"button\"\n onClick={() => window.location.reload()}\n className=\"px-4 py-2 text-sm font-medium text-white bg-action-primary-bg hover:bg-action-primary-bg/90 rounded-md transition-colors\"\n >\n Reload Page\n </button>\n </div>\n </div>\n );\n }\n return (\n <div className=\"flex h-full min-h-[200px] w-full items-center justify-center\">\n <div className=\"h-8 w-8 animate-spin rounded-full border-4 border-gray-300 border-t-blue-600\" />\n </div>\n );\n }\n\n return (\n <ErrorBoundary\n fallback={\n <div className=\"p-6 text-center text-text-secondary\">\n Something went wrong loading BigConsole. Please refresh the page.\n </div>\n }\n >\n <FeatureFlagProvider workspaceId={null} gateway=\"global\" defaultEnabled={true}>\n {/* PermissionProvider fetches myPermissions from wspace-rbac-svc via the\n workspace gateway (requires the shell's AuthProvider). Scoped to the\n active workspace so UI gating matches what the gateway enforces. */}\n <PermissionProvider scopeId={props.workspaceId ?? null} gateway=\"workspace\">\n <BigConsoleProvider props={props}>\n <BigConsoleQuotaProvider onViewBilling={handleViewBilling}>\n <NavigationProvider basePath={basePath}>\n <CrossFilterProvider>\n {/* Sits ABOVE the routed page, so when the assistant starts building\n you watch it happen on whatever screen you were already on —\n rather than having to guess which list to go and refresh. */}\n <AiPreviewPanel />\n <BigConsoleRoutes {...props} />\n {isModalOpen && (\n <DrilldownModal onClose={handleDrilldownClose} renderDashboard={renderDrilldownDashboard} />\n )}\n </CrossFilterProvider>\n </NavigationProvider>\n </BigConsoleQuotaProvider>\n </BigConsoleProvider>\n </PermissionProvider>\n </FeatureFlagProvider>\n </ErrorBoundary>\n );\n};\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;AA0CA,IAAM,IAA2B,GAI3B,IAAyB,GAIzB,IAAwB,GAqBxB,oBAAe,IAAI,KAAa,EA0BzB,KAA2C,MAAU;CAChE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