@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,159 +4,164 @@ import t from "../hooks/useWorkflowOperations.js";
4
4
  import { BOOTSTRAP_RETRY_DELAY_MS as n } from "../constants.js";
5
5
  import { useBigConsole as r } from "../context/BigConsoleContext.js";
6
6
  import "../context/index.js";
7
- import { isNative as i, nativeCopyText as a, nativeNotify as o, nativeToast as ee } from "../../utils/nativeBridge.js";
8
- import te from "../components/workflow/WorkflowStatusBadge.js";
9
- import s from "../components/workflow/WorkflowDeleteDialog.js";
10
- import { memo as c, useCallback as l, useEffect as u, useState as d } from "react";
11
- import { useParams as f } from "react-router";
12
- import { GlassCard as ne, IllustratedEmptyState as p, NextSteps as m, PagePurpose as h } from "@burdenoff/fe-libs/ui";
13
- import { Fragment as g, jsx as _, jsxs as v } from "react/jsx-runtime";
14
- import { WorkflowBuilder as y } from "@burdenoff/fluidgrids-fe-sdk";
15
- import { formatDistanceToNow as b } from "date-fns";
7
+ import { BIGCONSOLE_PERMISSIONS as i } from "../../constants/permissions.js";
8
+ import { isNative as a, nativeCopyText as o, nativeNotify as s, nativeToast as c } from "../../utils/nativeBridge.js";
9
+ import ee from "../components/workflow/WorkflowStatusBadge.js";
10
+ import te from "../components/workflow/WorkflowDeleteDialog.js";
11
+ import { memo as l, useCallback as u, useEffect as ne, useState as d } from "react";
12
+ import { useParams as re } from "react-router";
13
+ import { AccessDenied as f, PermissionButton as p } from "@burdenoff/fe-libs/shared/components";
14
+ import { usePermissions as m } from "@burdenoff/fe-libs/shared/providers/shell";
15
+ import { GlassCard as h, IllustratedEmptyState as g, NextSteps as _, PagePurpose as v } from "@burdenoff/fe-libs/ui";
16
+ import { Fragment as y, jsx as b, jsxs as x } from "react/jsx-runtime";
17
+ import { WorkflowBuilder as S } from "@burdenoff/fluidgrids-fe-sdk";
18
+ import { formatDistanceToNow as C } from "date-fns";
16
19
  //#region src/bigconsole/pages/WorkflowViewPage.tsx
17
- var x = ({ className: e }) => /* @__PURE__ */ _("svg", {
20
+ var w = ({ className: e }) => /* @__PURE__ */ b("svg", {
18
21
  className: e,
19
22
  fill: "none",
20
23
  stroke: "currentColor",
21
24
  viewBox: "0 0 24 24",
22
- children: /* @__PURE__ */ _("path", {
25
+ children: /* @__PURE__ */ b("path", {
23
26
  strokeLinecap: "round",
24
27
  strokeLinejoin: "round",
25
28
  strokeWidth: 2,
26
29
  d: "M15 19l-7-7 7-7"
27
30
  })
28
- }), S = ({ className: e }) => /* @__PURE__ */ _("svg", {
31
+ }), T = ({ className: e }) => /* @__PURE__ */ b("svg", {
29
32
  className: e,
30
33
  fill: "none",
31
34
  stroke: "currentColor",
32
35
  viewBox: "0 0 24 24",
33
- children: /* @__PURE__ */ _("path", {
36
+ children: /* @__PURE__ */ b("path", {
34
37
  strokeLinecap: "round",
35
38
  strokeLinejoin: "round",
36
39
  strokeWidth: 2,
37
40
  d: "M11 5H6a2 2 0 00-2 2v11a2 2 0 002 2h11a2 2 0 002-2v-5m-1.414-9.414a2 2 0 112.828 2.828L11.828 15H9v-2.828l8.586-8.586z"
38
41
  })
39
- }), C = ({ className: e }) => /* @__PURE__ */ _("svg", {
42
+ }), ie = ({ className: e }) => /* @__PURE__ */ b("svg", {
40
43
  className: e,
41
44
  fill: "none",
42
45
  stroke: "currentColor",
43
46
  viewBox: "0 0 24 24",
44
- children: /* @__PURE__ */ _("path", {
47
+ children: /* @__PURE__ */ b("path", {
45
48
  strokeLinecap: "round",
46
49
  strokeLinejoin: "round",
47
50
  strokeWidth: 2,
48
51
  d: "M19 7l-.867 12.142A2 2 0 0116.138 21H7.862a2 2 0 01-1.995-1.858L5 7m5 4v6m4-6v6m1-10V4a1 1 0 00-1-1h-4a1 1 0 00-1 1v3M4 7h16"
49
52
  })
50
- }), w = ({ className: e }) => /* @__PURE__ */ v("svg", {
53
+ }), ae = ({ className: e }) => /* @__PURE__ */ x("svg", {
51
54
  className: e,
52
55
  fill: "none",
53
56
  stroke: "currentColor",
54
57
  viewBox: "0 0 24 24",
55
- children: [/* @__PURE__ */ _("path", {
58
+ children: [/* @__PURE__ */ b("path", {
56
59
  strokeLinecap: "round",
57
60
  strokeLinejoin: "round",
58
61
  strokeWidth: 2,
59
62
  d: "M14.752 11.168l-3.197-2.132A1 1 0 0010 9.87v4.263a1 1 0 001.555.832l3.197-2.132a1 1 0 000-1.664z"
60
- }), /* @__PURE__ */ _("path", {
63
+ }), /* @__PURE__ */ b("path", {
61
64
  strokeLinecap: "round",
62
65
  strokeLinejoin: "round",
63
66
  strokeWidth: 2,
64
67
  d: "M21 12a9 9 0 11-18 0 9 9 0 0118 0z"
65
68
  })]
66
- }), T = ({ className: e }) => /* @__PURE__ */ _("svg", {
69
+ }), oe = ({ className: e }) => /* @__PURE__ */ b("svg", {
67
70
  className: e,
68
71
  fill: "none",
69
72
  stroke: "currentColor",
70
73
  viewBox: "0 0 24 24",
71
- children: /* @__PURE__ */ _("path", {
74
+ children: /* @__PURE__ */ b("path", {
72
75
  strokeLinecap: "round",
73
76
  strokeLinejoin: "round",
74
77
  strokeWidth: 2,
75
78
  d: "M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"
76
79
  })
77
- }), E = ({ className: e }) => /* @__PURE__ */ _("svg", {
80
+ }), se = ({ className: e }) => /* @__PURE__ */ b("svg", {
78
81
  className: e,
79
82
  fill: "none",
80
83
  stroke: "currentColor",
81
84
  viewBox: "0 0 24 24",
82
- children: /* @__PURE__ */ _("path", {
85
+ children: /* @__PURE__ */ b("path", {
83
86
  strokeLinecap: "round",
84
87
  strokeLinejoin: "round",
85
88
  strokeWidth: 2,
86
89
  d: "M5 13l4 4L19 7"
87
90
  })
88
- }), D = ({ className: e }) => /* @__PURE__ */ _("svg", {
91
+ }), ce = ({ className: e }) => /* @__PURE__ */ b("svg", {
89
92
  className: e,
90
93
  fill: "none",
91
94
  stroke: "currentColor",
92
95
  viewBox: "0 0 24 24",
93
- children: /* @__PURE__ */ _("path", {
96
+ children: /* @__PURE__ */ b("path", {
94
97
  strokeLinecap: "round",
95
98
  strokeLinejoin: "round",
96
99
  strokeWidth: 2,
97
100
  d: "M4 7v10c0 2.21 3.582 4 8 4s8-1.79 8-4V7M4 7c0 2.21 3.582 4 8 4s8-1.79 8-4M4 7c0-2.21 3.582-4 8-4s8 1.79 8 4"
98
101
  })
99
- }), re = ({ className: e }) => /* @__PURE__ */ _("svg", {
102
+ }), le = ({ className: e }) => /* @__PURE__ */ b("svg", {
100
103
  className: e,
101
104
  fill: "none",
102
105
  stroke: "currentColor",
103
106
  viewBox: "0 0 24 24",
104
- children: /* @__PURE__ */ _("path", {
107
+ children: /* @__PURE__ */ b("path", {
105
108
  strokeLinecap: "round",
106
109
  strokeLinejoin: "round",
107
110
  strokeWidth: 2,
108
111
  d: "M19 9l-7 7-7-7"
109
112
  })
110
- }), O = c(function() {
111
- let c = e(), { workflowId: O } = f(), { apiGatewayUrl: ie, authToken: ae, workspaceId: oe } = r(), [k, A] = d(null), [j, M] = d(!1), [, N] = d(!1), [P, F] = d(!1), [I, L] = d(!1), [R, z] = d(!1), [B, V] = d(!1), [H, U] = d(null), { loading: W, error: G, fetchWorkflow: K, deleteWorkflow: q, executeWorkflow: J, pollWorkflowExecution: Y } = t({ skipFetch: !0 });
112
- u(() => {
113
- if (!O) {
114
- V(!0);
113
+ }), E = l(function() {
114
+ let l = e(), { workflowId: E } = re(), { apiGatewayUrl: ue, authToken: de, workspaceId: fe } = r(), { hasPermission: D, isLoading: pe } = m(), O = D(i.WORKFLOW_READ), k = D(i.WORKFLOW_UPDATE);
115
+ D(i.WORKFLOW_DELETE);
116
+ let A = D(i.WORKFLOW_EXECUTE), [j, M] = d(null), [N, P] = d(!1), [, F] = d(!1), [I, L] = d(!1), [R, z] = d(!1), [B, V] = d(!1), [me, H] = d(!1), [U, W] = d(null), { loading: he, error: G, fetchWorkflow: K, deleteWorkflow: q, executeWorkflow: J, pollWorkflowExecution: Y } = t({ skipFetch: !0 });
117
+ ne(() => {
118
+ if (!E) {
119
+ H(!0);
115
120
  return;
116
121
  }
117
122
  let e = !1, t = async (r) => {
118
123
  try {
119
- let i = await K(O);
124
+ let i = await K(E);
120
125
  if (e) return;
121
- i ? (A(i), V(!0)) : r === 0 ? setTimeout(() => {
126
+ i ? (M(i), H(!0)) : r === 0 ? setTimeout(() => {
122
127
  e || t(1);
123
- }, n) : V(!0);
128
+ }, n) : H(!0);
124
129
  } catch {
125
- e || V(!0);
130
+ e || H(!0);
126
131
  }
127
132
  };
128
133
  return t(0), () => {
129
134
  e = !0;
130
135
  };
131
- }, [O, K]);
132
- let X = l(() => {
133
- c("/workflows");
134
- }, [c]), Z = l(() => {
135
- c(`/workflows/${O}/edit`);
136
- }, [c, O]), se = l(async () => {
137
- if (O) {
138
- N(!0);
136
+ }, [E, K]);
137
+ let X = u(() => {
138
+ l("/workflows");
139
+ }, [l]), Z = u(() => {
140
+ l(`/workflows/${E}/edit`);
141
+ }, [l, E]), ge = u(async () => {
142
+ if (E) {
143
+ F(!0);
139
144
  try {
140
- await q(O) ? (i() && o("success"), c("/workflows")) : i() && o("error");
145
+ await q(E) ? (a() && s("success"), l("/workflows")) : a() && s("error");
141
146
  } catch {
142
- i() && o("error");
147
+ a() && s("error");
143
148
  } finally {
144
- N(!1), M(!1);
149
+ F(!1), P(!1);
145
150
  }
146
151
  }
147
152
  }, [
148
- O,
153
+ E,
149
154
  q,
150
- c
151
- ]), Q = l(async () => {
152
- if (!O) return;
153
- F(!0), U(null);
155
+ l
156
+ ]), Q = u(async () => {
157
+ if (!E) return;
158
+ L(!0), W(null);
154
159
  let e = Date.now();
155
160
  try {
156
- let t = await J(O);
161
+ let t = await J(E);
157
162
  if (t) {
158
163
  let n = Date.now() - e;
159
- t.externalWorkflowId ? (U({
164
+ t.externalWorkflowId ? (W({
160
165
  success: !0,
161
166
  output: {
162
167
  externalWorkflowId: t.externalWorkflowId,
@@ -165,14 +170,14 @@ var x = ({ className: e }) => /* @__PURE__ */ _("svg", {
165
170
  },
166
171
  error: null,
167
172
  executionTimeMs: n
168
- }), Y(O, {
173
+ }), Y(E, {
169
174
  intervalMs: 3e3,
170
175
  timeoutMs: 12e4,
171
176
  onProgress: (e) => {
172
- A(e);
177
+ M(e);
173
178
  }
174
179
  }).then((t) => {
175
- t && (A(t), U((n) => n && {
180
+ t && (M(t), W((n) => n && {
176
181
  ...n,
177
182
  output: {
178
183
  ...n.output || {},
@@ -182,7 +187,7 @@ var x = ({ className: e }) => /* @__PURE__ */ _("svg", {
182
187
  },
183
188
  executionTimeMs: Date.now() - e
184
189
  }));
185
- })) : U({
190
+ })) : W({
186
191
  success: !0,
187
192
  output: {
188
193
  executionCount: t.executionCount,
@@ -192,302 +197,318 @@ var x = ({ className: e }) => /* @__PURE__ */ _("svg", {
192
197
  error: null,
193
198
  executionTimeMs: n
194
199
  });
195
- let r = await K(O);
196
- r && A(r);
200
+ let r = await K(E);
201
+ r && M(r);
197
202
  }
198
203
  } catch (t) {
199
- U({
204
+ W({
200
205
  success: !1,
201
206
  output: null,
202
207
  error: t instanceof Error ? t.message : "Execution failed",
203
208
  executionTimeMs: Date.now() - e
204
209
  });
205
210
  } finally {
206
- F(!1);
211
+ L(!1);
207
212
  }
208
213
  }, [
209
- O,
214
+ E,
210
215
  J,
211
216
  K,
212
217
  Y
213
- ]), ce = l(async () => {
214
- if (k?.webhookUrl) try {
215
- await a(k.webhookUrl), L(!0), i() && ee("Webhook copied"), setTimeout(() => L(!1), 2e3);
218
+ ]), _e = u(async () => {
219
+ if (j?.webhookUrl) try {
220
+ await o(j.webhookUrl), z(!0), a() && c("Webhook copied"), setTimeout(() => z(!1), 2e3);
216
221
  } catch {}
217
- }, [k?.webhookUrl]), le = l((e) => {
218
- c(`/datasinks/${e}`);
219
- }, [c]);
220
- if (!B || W && !k) return /* @__PURE__ */ _("div", {
222
+ }, [j?.webhookUrl]), ve = u((e) => {
223
+ l(`/datasinks/${e}`);
224
+ }, [l]);
225
+ if (!me || he && !j || pe) return /* @__PURE__ */ b("div", {
221
226
  className: "p-6 flex items-center justify-center min-h-[400px]",
222
- children: /* @__PURE__ */ v("svg", {
227
+ children: /* @__PURE__ */ x("svg", {
223
228
  className: "w-8 h-8 text-action-primary-bg animate-spin",
224
229
  fill: "none",
225
230
  viewBox: "0 0 24 24",
226
- children: [/* @__PURE__ */ _("circle", {
231
+ children: [/* @__PURE__ */ b("circle", {
227
232
  className: "opacity-25",
228
233
  cx: "12",
229
234
  cy: "12",
230
235
  r: "10",
231
236
  stroke: "currentColor",
232
237
  strokeWidth: "4"
233
- }), /* @__PURE__ */ _("path", {
238
+ }), /* @__PURE__ */ b("path", {
234
239
  className: "opacity-75",
235
240
  fill: "currentColor",
236
241
  d: "M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"
237
242
  })]
238
243
  })
239
244
  });
240
- if (G || !k) return /* @__PURE__ */ v("div", {
245
+ if (!O) return /* @__PURE__ */ b(f, {
246
+ title: "Access Denied",
247
+ description: "You don't have permission to view this workflow."
248
+ });
249
+ if (G || !j) return /* @__PURE__ */ x("div", {
241
250
  className: "p-6",
242
- children: [/* @__PURE__ */ v("button", {
251
+ children: [/* @__PURE__ */ x("button", {
243
252
  type: "button",
244
253
  onClick: X,
245
254
  className: "inline-flex items-center gap-1 text-sm text-text-secondary hover:text-text-primary mb-4",
246
- children: [/* @__PURE__ */ _(x, { className: "w-4 h-4" }), "Back to Workflows"]
247
- }), /* @__PURE__ */ _(p, {
255
+ children: [/* @__PURE__ */ b(w, { className: "w-4 h-4" }), "Back to Workflows"]
256
+ }), /* @__PURE__ */ b(g, {
248
257
  illustration: "empty-data",
249
258
  title: "Workflow not found",
250
259
  description: G?.message || "The workflow you are looking for does not exist."
251
260
  })]
252
261
  });
253
- let $ = k.dataSinkLinks?.length || 0;
254
- return /* @__PURE__ */ v("div", {
262
+ let $ = j.dataSinkLinks?.length || 0, ye = [
263
+ ...A ? [{
264
+ id: "execute",
265
+ label: "Run the workflow",
266
+ description: "Trigger an execution to pull fresh data now.",
267
+ onClick: Q
268
+ }] : [],
269
+ {
270
+ id: "design",
271
+ label: "Inspect the design",
272
+ description: "Expand the read-only preview to see each step.",
273
+ onClick: () => V(!0)
274
+ },
275
+ ...k ? [{
276
+ id: "edit",
277
+ label: "Edit in the builder",
278
+ description: "Open the FluidGrids visual builder to change the flow.",
279
+ onClick: Z
280
+ }] : [],
281
+ {
282
+ id: "sinks",
283
+ label: "Check the linked data sinks",
284
+ description: "See where this workflow writes its output.",
285
+ onClick: () => l("/datasinks")
286
+ }
287
+ ];
288
+ return /* @__PURE__ */ x("div", {
255
289
  className: "p-6 max-w-5xl mx-auto",
256
290
  children: [
257
- /* @__PURE__ */ v("div", {
291
+ /* @__PURE__ */ x("div", {
258
292
  className: "mb-8",
259
- children: [/* @__PURE__ */ v("button", {
293
+ children: [/* @__PURE__ */ x("button", {
260
294
  type: "button",
261
295
  onClick: X,
262
296
  className: "inline-flex items-center gap-1 text-sm text-text-secondary hover:text-text-primary mb-4",
263
- children: [/* @__PURE__ */ _(x, { className: "w-4 h-4" }), "Back to Workflows"]
264
- }), /* @__PURE__ */ v("div", {
297
+ children: [/* @__PURE__ */ b(w, { className: "w-4 h-4" }), "Back to Workflows"]
298
+ }), /* @__PURE__ */ x("div", {
265
299
  className: "flex items-start justify-between",
266
- children: [/* @__PURE__ */ v("div", { children: [
267
- /* @__PURE__ */ v("div", {
300
+ children: [/* @__PURE__ */ x("div", { children: [
301
+ /* @__PURE__ */ x("div", {
268
302
  className: "flex items-center gap-3 mb-2",
269
- children: [/* @__PURE__ */ _("h1", {
303
+ children: [/* @__PURE__ */ b("h1", {
270
304
  className: "text-2xl font-bold text-text-primary",
271
- children: k.name
272
- }), /* @__PURE__ */ _(te, { status: k.status })]
305
+ children: j.name
306
+ }), /* @__PURE__ */ b(ee, { status: j.status })]
273
307
  }),
274
- /* @__PURE__ */ _("p", {
308
+ /* @__PURE__ */ b("p", {
275
309
  className: "text-sm text-text-secondary font-mono",
276
- children: k.key
310
+ children: j.key
277
311
  }),
278
- k.externalWorkflowId && /* @__PURE__ */ v("p", {
312
+ j.externalWorkflowId && /* @__PURE__ */ x("p", {
279
313
  className: "text-xs text-text-tertiary mt-1",
280
- children: ["FluidGrids ID: ", /* @__PURE__ */ _("span", {
314
+ children: ["FluidGrids ID: ", /* @__PURE__ */ b("span", {
281
315
  className: "font-mono",
282
- children: k.externalWorkflowId
316
+ children: j.externalWorkflowId
283
317
  })]
284
318
  })
285
- ] }), /* @__PURE__ */ v("div", {
319
+ ] }), /* @__PURE__ */ x("div", {
286
320
  className: "flex items-center gap-2",
287
321
  children: [
288
- /* @__PURE__ */ v("button", {
289
- type: "button",
290
- onClick: Q,
291
- disabled: P,
292
- className: "inline-flex items-center gap-2 px-4 py-2 text-sm font-medium text-white bg-status-success-bg hover:bg-status-success-bg/90 rounded-md transition-colors disabled:opacity-50",
293
- children: [/* @__PURE__ */ _(w, { className: "w-4 h-4" }), P ? "Executing..." : "Execute"]
322
+ /* @__PURE__ */ b(p, {
323
+ permission: i.WORKFLOW_EXECUTE,
324
+ deniedBehavior: "disable",
325
+ children: /* @__PURE__ */ x("button", {
326
+ type: "button",
327
+ onClick: Q,
328
+ disabled: I,
329
+ className: "inline-flex items-center gap-2 px-4 py-2 text-sm font-medium text-white bg-status-success-bg hover:bg-status-success-bg/90 rounded-md transition-colors disabled:opacity-50",
330
+ children: [/* @__PURE__ */ b(ae, { className: "w-4 h-4" }), I ? "Executing..." : "Execute"]
331
+ })
294
332
  }),
295
- /* @__PURE__ */ v("button", {
296
- type: "button",
297
- onClick: Z,
298
- className: "inline-flex items-center gap-2 px-4 py-2 text-sm font-medium text-text-primary bg-bg-sunken hover:bg-border-default rounded-md transition-colors",
299
- children: [/* @__PURE__ */ _(S, { className: "w-4 h-4" }), "Edit"]
333
+ /* @__PURE__ */ b(p, {
334
+ permission: i.WORKFLOW_UPDATE,
335
+ deniedBehavior: "disable",
336
+ children: /* @__PURE__ */ x("button", {
337
+ type: "button",
338
+ onClick: Z,
339
+ className: "inline-flex items-center gap-2 px-4 py-2 text-sm font-medium text-text-primary bg-bg-sunken hover:bg-border-default rounded-md transition-colors",
340
+ children: [/* @__PURE__ */ b(T, { className: "w-4 h-4" }), "Edit"]
341
+ })
300
342
  }),
301
- /* @__PURE__ */ v("button", {
302
- type: "button",
303
- onClick: () => M(!0),
304
- className: "inline-flex items-center gap-2 px-4 py-2 text-sm font-medium text-status-error-text bg-status-error-bg/10 hover:bg-status-error-bg/20 rounded-md transition-colors",
305
- children: [/* @__PURE__ */ _(C, { className: "w-4 h-4" }), "Delete"]
343
+ /* @__PURE__ */ b(p, {
344
+ permission: i.WORKFLOW_DELETE,
345
+ deniedBehavior: "hide",
346
+ children: /* @__PURE__ */ x("button", {
347
+ type: "button",
348
+ onClick: () => P(!0),
349
+ className: "inline-flex items-center gap-2 px-4 py-2 text-sm font-medium text-status-error-text bg-status-error-bg/10 hover:bg-status-error-bg/20 rounded-md transition-colors",
350
+ children: [/* @__PURE__ */ b(ie, { className: "w-4 h-4" }), "Delete"]
351
+ })
306
352
  })
307
353
  ]
308
354
  })]
309
355
  })]
310
356
  }),
311
- /* @__PURE__ */ _(h, {
357
+ /* @__PURE__ */ b(v, {
312
358
  className: "mb-6",
313
359
  children: "A workflow is the visual ETL job that feeds this BigConsole — it fetches, transforms, and delivers data into linked data sinks. From here you can run it on demand, inspect its design and execution history, copy its webhook trigger, and edit it in the visual builder."
314
360
  }),
315
- /* @__PURE__ */ _(m, {
361
+ /* @__PURE__ */ b(_, {
316
362
  storageKey: "bigconsole-workflow-view",
317
- steps: [
318
- {
319
- id: "execute",
320
- label: "Run the workflow",
321
- description: "Trigger an execution to pull fresh data now.",
322
- onClick: Q
323
- },
324
- {
325
- id: "design",
326
- label: "Inspect the design",
327
- description: "Expand the read-only preview to see each step.",
328
- onClick: () => z(!0)
329
- },
330
- {
331
- id: "edit",
332
- label: "Edit in the builder",
333
- description: "Open the FluidGrids visual builder to change the flow.",
334
- onClick: Z
335
- },
336
- {
337
- id: "sinks",
338
- label: "Check the linked data sinks",
339
- description: "See where this workflow writes its output.",
340
- onClick: () => c("/datasinks")
341
- }
342
- ]
363
+ steps: ye
343
364
  }),
344
- H && /* @__PURE__ */ v("div", {
345
- className: `mb-6 p-4 rounded-lg border ${H.success ? "bg-status-success-bg/10 border-status-success-border/20" : "bg-status-error-bg/10 border-status-error-border/20"}`,
365
+ U && /* @__PURE__ */ x("div", {
366
+ className: `mb-6 p-4 rounded-lg border ${U.success ? "bg-status-success-bg/10 border-status-success-border/20" : "bg-status-error-bg/10 border-status-error-border/20"}`,
346
367
  children: [
347
- /* @__PURE__ */ v("div", {
368
+ /* @__PURE__ */ x("div", {
348
369
  className: "flex items-center justify-between mb-2",
349
- children: [/* @__PURE__ */ _("h3", {
370
+ children: [/* @__PURE__ */ b("h3", {
350
371
  className: "text-sm font-semibold text-text-primary",
351
- children: H.success ? "Execution Triggered" : "Execution Failed"
352
- }), /* @__PURE__ */ v("span", {
372
+ children: U.success ? "Execution Triggered" : "Execution Failed"
373
+ }), /* @__PURE__ */ x("span", {
353
374
  className: "text-xs text-text-secondary",
354
- children: [H.executionTimeMs, "ms"]
375
+ children: [U.executionTimeMs, "ms"]
355
376
  })]
356
377
  }),
357
- H.error ? /* @__PURE__ */ _("p", {
378
+ U.error ? /* @__PURE__ */ b("p", {
358
379
  className: "text-sm text-status-error-text",
359
- children: H.error
360
- }) : /* @__PURE__ */ _("pre", {
380
+ children: U.error
381
+ }) : /* @__PURE__ */ b("pre", {
361
382
  className: "text-xs text-text-secondary font-mono bg-bg-sunken p-2 rounded overflow-auto max-h-[200px]",
362
- children: JSON.stringify(H.output, null, 2)
383
+ children: JSON.stringify(U.output, null, 2)
363
384
  }),
364
- H.runId && /* @__PURE__ */ v("p", {
385
+ U.runId && /* @__PURE__ */ x("p", {
365
386
  className: "text-xs text-text-tertiary mt-2",
366
- children: ["Run ID: ", /* @__PURE__ */ _("span", {
387
+ children: ["Run ID: ", /* @__PURE__ */ b("span", {
367
388
  className: "font-mono",
368
- children: H.runId
389
+ children: U.runId
369
390
  })]
370
391
  })
371
392
  ]
372
393
  }),
373
- /* @__PURE__ */ v("div", {
394
+ /* @__PURE__ */ x("div", {
374
395
  className: "grid grid-cols-1 md:grid-cols-2 gap-6 mb-8",
375
- children: [/* @__PURE__ */ v("div", {
396
+ children: [/* @__PURE__ */ x("div", {
376
397
  className: "bg-bg-surface border border-border-default rounded-lg p-4",
377
- children: [/* @__PURE__ */ _("h3", {
398
+ children: [/* @__PURE__ */ b("h3", {
378
399
  className: "text-sm font-medium text-text-secondary mb-2",
379
400
  children: "Description"
380
- }), /* @__PURE__ */ _("p", {
401
+ }), /* @__PURE__ */ b("p", {
381
402
  className: "text-sm text-text-primary",
382
- children: k.description || "No description"
403
+ children: j.description || "No description"
383
404
  })]
384
- }), /* @__PURE__ */ v(ne, {
405
+ }), /* @__PURE__ */ x(h, {
385
406
  treatment: "glass",
386
407
  glow: !0,
387
408
  className: "p-4",
388
- children: [/* @__PURE__ */ _("h3", {
409
+ children: [/* @__PURE__ */ b("h3", {
389
410
  className: "text-sm font-medium text-text-secondary mb-2",
390
411
  children: "Execution Stats"
391
- }), /* @__PURE__ */ v("div", {
412
+ }), /* @__PURE__ */ x("div", {
392
413
  className: "grid grid-cols-2 gap-4",
393
- children: [/* @__PURE__ */ v("div", { children: [/* @__PURE__ */ _("p", {
414
+ children: [/* @__PURE__ */ x("div", { children: [/* @__PURE__ */ b("p", {
394
415
  className: "text-2xl font-bold text-text-primary",
395
- children: k.executionCount
396
- }), /* @__PURE__ */ _("p", {
416
+ children: j.executionCount
417
+ }), /* @__PURE__ */ b("p", {
397
418
  className: "text-xs text-text-secondary",
398
419
  children: "Total Executions"
399
- })] }), /* @__PURE__ */ v("div", { children: [/* @__PURE__ */ _("p", {
420
+ })] }), /* @__PURE__ */ x("div", { children: [/* @__PURE__ */ b("p", {
400
421
  className: "text-sm font-medium text-text-primary",
401
- children: k.lastExecutedAt ? b(new Date(k.lastExecutedAt), { addSuffix: !0 }) : "Never"
402
- }), /* @__PURE__ */ _("p", {
422
+ children: j.lastExecutedAt ? C(new Date(j.lastExecutedAt), { addSuffix: !0 }) : "Never"
423
+ }), /* @__PURE__ */ b("p", {
403
424
  className: "text-xs text-text-secondary",
404
425
  children: "Last Executed"
405
426
  })] })]
406
427
  })]
407
428
  })]
408
429
  }),
409
- k.webhookUrl && /* @__PURE__ */ v("div", {
430
+ j.webhookUrl && /* @__PURE__ */ x("div", {
410
431
  className: "bg-bg-surface border border-border-default rounded-lg p-4 mb-8",
411
- children: [/* @__PURE__ */ _("h3", {
432
+ children: [/* @__PURE__ */ b("h3", {
412
433
  className: "text-sm font-medium text-text-secondary mb-2",
413
434
  children: "Webhook URL"
414
- }), /* @__PURE__ */ v("div", {
435
+ }), /* @__PURE__ */ x("div", {
415
436
  className: "flex items-center gap-2",
416
- children: [/* @__PURE__ */ _("code", {
437
+ children: [/* @__PURE__ */ b("code", {
417
438
  className: "flex-1 text-sm text-text-primary font-mono bg-bg-sunken px-3 py-2 rounded overflow-auto",
418
- children: k.webhookUrl
419
- }), /* @__PURE__ */ _("button", {
439
+ children: j.webhookUrl
440
+ }), /* @__PURE__ */ b("button", {
420
441
  type: "button",
421
- onClick: ce,
442
+ onClick: _e,
422
443
  className: "flex items-center gap-1 px-3 py-2 text-sm text-text-secondary hover:text-text-primary transition-colors",
423
- children: I ? /* @__PURE__ */ v(g, { children: [/* @__PURE__ */ _(E, { className: "w-4 h-4 text-status-success-text" }), "Copied!"] }) : /* @__PURE__ */ v(g, { children: [/* @__PURE__ */ _(T, { className: "w-4 h-4" }), "Copy"] })
444
+ children: R ? /* @__PURE__ */ x(y, { children: [/* @__PURE__ */ b(se, { className: "w-4 h-4 text-status-success-text" }), "Copied!"] }) : /* @__PURE__ */ x(y, { children: [/* @__PURE__ */ b(oe, { className: "w-4 h-4" }), "Copy"] })
424
445
  })]
425
446
  })]
426
447
  }),
427
- k.externalWorkflowId && /* @__PURE__ */ v("div", {
448
+ j.externalWorkflowId && /* @__PURE__ */ x("div", {
428
449
  className: "bg-bg-surface border border-border-default rounded-lg mb-8 overflow-hidden",
429
- children: [/* @__PURE__ */ v("button", {
450
+ children: [/* @__PURE__ */ x("button", {
430
451
  type: "button",
431
- onClick: () => z((e) => !e),
452
+ onClick: () => V((e) => !e),
432
453
  className: "w-full flex items-center justify-between px-4 py-3 text-sm font-medium text-text-primary hover:bg-bg-sunken transition-colors",
433
- children: [/* @__PURE__ */ _("span", { children: "Workflow Design Preview" }), /* @__PURE__ */ _(re, { className: `w-4 h-4 text-text-secondary transition-transform ${R ? "rotate-180" : ""}` })]
434
- }), R && /* @__PURE__ */ _("div", {
454
+ children: [/* @__PURE__ */ b("span", { children: "Workflow Design Preview" }), /* @__PURE__ */ b(le, { className: `w-4 h-4 text-text-secondary transition-transform ${B ? "rotate-180" : ""}` })]
455
+ }), B && /* @__PURE__ */ b("div", {
435
456
  className: "border-t border-border-default",
436
457
  style: { height: "450px" },
437
- children: /* @__PURE__ */ _(y, {
438
- apiGatewayUrl: ie,
439
- workspaceId: oe || "default",
440
- authToken: ae,
441
- workflowId: k.externalWorkflowId,
458
+ children: /* @__PURE__ */ b(S, {
459
+ apiGatewayUrl: ue,
460
+ workspaceId: fe || "default",
461
+ authToken: de,
462
+ workflowId: j.externalWorkflowId,
442
463
  readonly: !0,
443
464
  hideHeader: !0,
444
465
  className: "h-full"
445
466
  })
446
467
  })]
447
468
  }),
448
- /* @__PURE__ */ v("div", {
469
+ /* @__PURE__ */ x("div", {
449
470
  className: "bg-bg-surface border border-border-default rounded-lg p-4 mb-8",
450
- children: [/* @__PURE__ */ v("h3", {
471
+ children: [/* @__PURE__ */ x("h3", {
451
472
  className: "text-sm font-medium text-text-secondary mb-4",
452
473
  children: [
453
474
  "Linked DataSinks (",
454
475
  $,
455
476
  ")"
456
477
  ]
457
- }), $ === 0 ? /* @__PURE__ */ _(p, {
478
+ }), $ === 0 ? /* @__PURE__ */ b(g, {
458
479
  illustration: "empty-generic",
459
480
  title: "No data sinks linked",
460
481
  description: "This workflow has no data sinks linked yet — its output isn't being stored."
461
- }) : /* @__PURE__ */ _("div", {
482
+ }) : /* @__PURE__ */ b("div", {
462
483
  className: "space-y-2",
463
- children: k.dataSinkLinks?.map((e) => /* @__PURE__ */ v("div", {
484
+ children: j.dataSinkLinks?.map((e) => /* @__PURE__ */ x("div", {
464
485
  className: "flex items-center justify-between px-3 py-2 bg-bg-sunken rounded-md",
465
- children: [/* @__PURE__ */ v("div", {
486
+ children: [/* @__PURE__ */ x("div", {
466
487
  className: "flex items-center gap-3",
467
- children: [/* @__PURE__ */ _(D, { className: "w-4 h-4 text-text-secondary" }), /* @__PURE__ */ v("div", { children: [/* @__PURE__ */ _("p", {
488
+ children: [/* @__PURE__ */ b(ce, { className: "w-4 h-4 text-text-secondary" }), /* @__PURE__ */ x("div", { children: [/* @__PURE__ */ b("p", {
468
489
  className: "text-sm font-medium text-text-primary",
469
490
  children: e.dataSink?.name || e.dataSink?.key || e.dataSinkId
470
- }), e.dataSink?.key && /* @__PURE__ */ _("p", {
491
+ }), e.dataSink?.key && /* @__PURE__ */ b("p", {
471
492
  className: "text-xs text-text-secondary font-mono",
472
493
  children: e.dataSink.key
473
494
  })] })]
474
- }), /* @__PURE__ */ v("div", {
495
+ }), /* @__PURE__ */ x("div", {
475
496
  className: "flex items-center gap-4",
476
- children: [/* @__PURE__ */ v("div", {
497
+ children: [/* @__PURE__ */ x("div", {
477
498
  className: "flex items-center gap-2",
478
- children: [e.isEnabled ? /* @__PURE__ */ _("span", {
499
+ children: [e.isEnabled ? /* @__PURE__ */ b("span", {
479
500
  className: "text-xs text-status-success-text",
480
501
  children: "Enabled"
481
- }) : /* @__PURE__ */ _("span", {
502
+ }) : /* @__PURE__ */ b("span", {
482
503
  className: "text-xs text-text-secondary",
483
504
  children: "Disabled"
484
- }), /* @__PURE__ */ v("span", {
505
+ }), /* @__PURE__ */ x("span", {
485
506
  className: "text-xs text-text-secondary",
486
507
  children: ["Priority: ", e.priority]
487
508
  })]
488
- }), e.dataSink && /* @__PURE__ */ _("button", {
509
+ }), e.dataSink && /* @__PURE__ */ b("button", {
489
510
  type: "button",
490
- onClick: () => le(e.dataSinkId),
511
+ onClick: () => ve(e.dataSinkId),
491
512
  className: "text-xs text-action-primary-bg hover:underline",
492
513
  children: "View"
493
514
  })]
@@ -495,52 +516,52 @@ var x = ({ className: e }) => /* @__PURE__ */ _("svg", {
495
516
  }, e.id))
496
517
  })]
497
518
  }),
498
- /* @__PURE__ */ v("div", {
519
+ /* @__PURE__ */ x("div", {
499
520
  className: "grid grid-cols-1 md:grid-cols-2 gap-6",
500
- children: [/* @__PURE__ */ v("div", {
521
+ children: [/* @__PURE__ */ x("div", {
501
522
  className: "bg-bg-surface border border-border-default rounded-lg p-4",
502
523
  children: [
503
- /* @__PURE__ */ _("h3", {
524
+ /* @__PURE__ */ b("h3", {
504
525
  className: "text-sm font-medium text-text-secondary mb-2",
505
526
  children: "Created"
506
527
  }),
507
- /* @__PURE__ */ _("p", {
528
+ /* @__PURE__ */ b("p", {
508
529
  className: "text-sm text-text-primary",
509
- children: b(new Date(k.createdAt), { addSuffix: !0 })
530
+ children: C(new Date(j.createdAt), { addSuffix: !0 })
510
531
  }),
511
- /* @__PURE__ */ v("p", {
532
+ /* @__PURE__ */ x("p", {
512
533
  className: "text-xs text-text-secondary",
513
- children: ["by ", k.createdBy]
534
+ children: ["by ", j.createdBy]
514
535
  })
515
536
  ]
516
- }), /* @__PURE__ */ v("div", {
537
+ }), /* @__PURE__ */ x("div", {
517
538
  className: "bg-bg-surface border border-border-default rounded-lg p-4",
518
539
  children: [
519
- /* @__PURE__ */ _("h3", {
540
+ /* @__PURE__ */ b("h3", {
520
541
  className: "text-sm font-medium text-text-secondary mb-2",
521
542
  children: "Last Updated"
522
543
  }),
523
- /* @__PURE__ */ _("p", {
544
+ /* @__PURE__ */ b("p", {
524
545
  className: "text-sm text-text-primary",
525
- children: b(new Date(k.updatedAt), { addSuffix: !0 })
546
+ children: C(new Date(j.updatedAt), { addSuffix: !0 })
526
547
  }),
527
- /* @__PURE__ */ v("p", {
548
+ /* @__PURE__ */ x("p", {
528
549
  className: "text-xs text-text-secondary",
529
- children: ["by ", k.updatedBy || k.createdBy]
550
+ children: ["by ", j.updatedBy || j.createdBy]
530
551
  })
531
552
  ]
532
553
  })]
533
554
  }),
534
- k && /* @__PURE__ */ _(s, {
535
- workflow: k,
536
- isOpen: j,
537
- onClose: () => M(!1),
538
- onConfirm: se
555
+ j && /* @__PURE__ */ b(te, {
556
+ workflow: j,
557
+ isOpen: N,
558
+ onClose: () => P(!1),
559
+ onConfirm: ge
539
560
  })
540
561
  ]
541
562
  });
542
563
  });
543
564
  //#endregion
544
- export { O as WorkflowViewPage };
565
+ export { E as WorkflowViewPage };
545
566
 
546
567
  //# sourceMappingURL=WorkflowViewPage.js.map