@burdenoff/microfe-bigconsole 2026.805.1 → 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 (49) 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/widgets/ActionConfigDialog.js +96 -90
  14. package/dist/bigconsole/components/widgets/ActionConfigDialog.js.map +1 -1
  15. package/dist/bigconsole/components/widgets/WidgetMenu.js +87 -76
  16. package/dist/bigconsole/components/widgets/WidgetMenu.js.map +1 -1
  17. package/dist/bigconsole/components/widgets/widget-actions/WidgetActions.js +120 -118
  18. package/dist/bigconsole/components/widgets/widget-actions/WidgetActions.js.map +1 -1
  19. package/dist/bigconsole/pages/DashboardBuilderPage.js +113 -104
  20. package/dist/bigconsole/pages/DashboardBuilderPage.js.map +1 -1
  21. package/dist/bigconsole/pages/DashboardViewPage.js +208 -199
  22. package/dist/bigconsole/pages/DashboardViewPage.js.map +1 -1
  23. package/dist/bigconsole/pages/DashboardsPage.js +376 -325
  24. package/dist/bigconsole/pages/DashboardsPage.js.map +1 -1
  25. package/dist/bigconsole/pages/DataParsersPage.js +135 -125
  26. package/dist/bigconsole/pages/DataParsersPage.js.map +1 -1
  27. package/dist/bigconsole/pages/DataSinkBuilderPage.js +182 -172
  28. package/dist/bigconsole/pages/DataSinkBuilderPage.js.map +1 -1
  29. package/dist/bigconsole/pages/DataSinkViewPage.js +237 -219
  30. package/dist/bigconsole/pages/DataSinkViewPage.js.map +1 -1
  31. package/dist/bigconsole/pages/DataSinksPage.js +281 -268
  32. package/dist/bigconsole/pages/DataSinksPage.js.map +1 -1
  33. package/dist/bigconsole/pages/ParserBuilderPage.js +238 -223
  34. package/dist/bigconsole/pages/ParserBuilderPage.js.map +1 -1
  35. package/dist/bigconsole/pages/ParserViewPage.js +162 -144
  36. package/dist/bigconsole/pages/ParserViewPage.js.map +1 -1
  37. package/dist/bigconsole/pages/PipelineBuilderPage.js +212 -204
  38. package/dist/bigconsole/pages/PipelineBuilderPage.js.map +1 -1
  39. package/dist/bigconsole/pages/PipelineViewPage.js +191 -183
  40. package/dist/bigconsole/pages/PipelineViewPage.js.map +1 -1
  41. package/dist/bigconsole/pages/PipelinesPage.js +128 -103
  42. package/dist/bigconsole/pages/PipelinesPage.js.map +1 -1
  43. package/dist/bigconsole/pages/WorkflowViewPage.js +238 -217
  44. package/dist/bigconsole/pages/WorkflowViewPage.js.map +1 -1
  45. package/dist/bigconsole/pages/WorkflowsPage.js +116 -102
  46. package/dist/bigconsole/pages/WorkflowsPage.js.map +1 -1
  47. package/dist/constants/permissions.js +83 -0
  48. package/dist/constants/permissions.js.map +1 -0
  49. package/package.json +1 -1
@@ -4,8 +4,9 @@ import "../contexts/index.js";
4
4
  import { newWorkflowPath as n } from "../BigConsoleRoutes.js";
5
5
  import ee from "../components/datasink/DataSinkTableViewer.js";
6
6
  import te from "../hooks/useDataSinkOperations.js";
7
- import r from "../components/datasink/DataSinkStatusBadge.js";
8
- import { isNative as i, nativeConfirm as ne, nativeImpact as re, nativeNotify as a } from "../../utils/nativeBridge.js";
7
+ import { BIGCONSOLE_PERMISSIONS as r } from "../../constants/permissions.js";
8
+ import i from "../components/datasink/DataSinkStatusBadge.js";
9
+ import { isNative as a, nativeConfirm as ne, nativeImpact as re, nativeNotify as o } from "../../utils/nativeBridge.js";
9
10
  import ie from "../hooks/useDataSinkSubscription.js";
10
11
  import ae from "../components/datasink/DataSinkDataViewer.js";
11
12
  import oe from "../components/datasink/LinkedWorkflowsPanel.js";
@@ -13,36 +14,38 @@ import se from "../components/datasink/LinkedParsersPanel.js";
13
14
  import ce from "../components/datasink/WorkflowStatusPanel.js";
14
15
  import le from "../components/datasink/ExportDataSinkDialog.js";
15
16
  import ue from "../components/datasink/ImportDataGuideDialog.js";
16
- import { memo as o, useCallback as s, useEffect as de, useState as c } from "react";
17
- import { useParams as fe } from "react-router";
18
- import { AlertCircle as pe, ArrowLeft as l, Code as me, Database as u, Download as he, Edit as ge, Eye as _e, EyeOff as d, Grid3X3 as ve, Loader2 as f, RefreshCw as ye, Trash2 as be, Upload as p } from "lucide-react";
19
- import { Button as m, Card as h, CardContent as g, CardHeader as _, CardTitle as v, GlassCard as xe, IllustratedEmptyState as Se, NextSteps as Ce, PagePurpose as we } from "@burdenoff/fe-libs/ui";
20
- import { Fragment as y, jsx as b, jsxs as x } from "react/jsx-runtime";
21
- import { formatDistanceToNow as S } from "date-fns";
17
+ import { memo as s, useCallback as c, useEffect as de, useState as l } from "react";
18
+ import { useParams as u } from "react-router";
19
+ import { AccessDenied as fe, PermissionButton as d } from "@burdenoff/fe-libs/shared/components";
20
+ import { usePermissions as pe } from "@burdenoff/fe-libs/shared/providers/shell";
21
+ import { AlertCircle as me, ArrowLeft as f, Code as he, Database as p, Download as ge, Edit as _e, Eye as ve, EyeOff as ye, Grid3X3 as be, Loader2 as m, RefreshCw as xe, Trash2 as Se, Upload as h } from "lucide-react";
22
+ import { Button as g, Card as Ce, CardContent as _, CardHeader as v, CardTitle as y, GlassCard as we, IllustratedEmptyState as Te, NextSteps as Ee, PagePurpose as De } from "@burdenoff/fe-libs/ui";
23
+ import { Fragment as b, jsx as x, jsxs as S } from "react/jsx-runtime";
24
+ import { formatDistanceToNow as C } from "date-fns";
22
25
  //#region src/bigconsole/pages/DataSinkViewPage.tsx
23
- var C = o(function() {
24
- let { dataSinkId: o } = fe(), C = t(), [w, T] = c(!1), [E, D] = c(!1), [O, k] = c(!1), [Te, A] = c(!1), [Ee, j] = c(!1), [M, De] = c(null), [N, P] = c(!1), [F, I] = c("table"), [L, Oe] = c(100), [R, ke] = c(0), [z, Ae] = c(null), [je, Me] = c(!1), B = e((e) => o ? e.dataSinks.get(o) : void 0), { loading: Ne, error: V, fetchDataSink: H, getDataSinkData: U, refreshDataSink: W, updateDataSink: G, deleteDataSink: K } = te({ skipFetch: !0 });
26
+ var w = s(function() {
27
+ let { dataSinkId: s } = u(), w = t(), { hasPermission: Oe, isLoading: ke } = pe(), Ae = Oe(r.DATASINK_READ), [T, E] = l(!1), [D, O] = l(!1), [k, A] = l(!1), [je, j] = l(!1), [Me, M] = l(!1), [N, Ne] = l(null), [P, F] = l(!1), [I, L] = l("table"), [R, Pe] = l(100), [z, Fe] = l(0), [B, Ie] = l(null), [Le, Re] = l(!1), V = e((e) => s ? e.dataSinks.get(s) : void 0), { loading: ze, error: H, fetchDataSink: U, getDataSinkData: W, refreshDataSink: G, updateDataSink: K, deleteDataSink: q } = te({ skipFetch: !0 });
25
28
  ie({
26
- dataSinkId: o,
27
- enabled: !!o
29
+ dataSinkId: s,
30
+ enabled: !!s
28
31
  }), de(() => {
29
- o && H(o);
30
- }, [o, H]);
31
- let q = s(() => {
32
- C("/datasinks");
33
- }, [C]), Pe = s(() => {
34
- C(`/datasinks/${o}/edit`);
35
- }, [C, o]), J = s(async () => {
36
- if (o) {
37
- D(!0);
32
+ s && U(s);
33
+ }, [s, U]);
34
+ let J = c(() => {
35
+ w("/datasinks");
36
+ }, [w]), Be = c(() => {
37
+ w(`/datasinks/${s}/edit`);
38
+ }, [w, s]), Y = c(async () => {
39
+ if (s) {
40
+ O(!0);
38
41
  try {
39
- await W({ id: o });
42
+ await G({ id: s });
40
43
  } catch {} finally {
41
- D(!1);
44
+ O(!1);
42
45
  }
43
46
  }
44
- }, [o, W]), Fe = s(async () => {
45
- if (!o) return;
47
+ }, [s, G]), Ve = c(async () => {
48
+ if (!s) return;
46
49
  let e = await ne({
47
50
  title: "Delete DataSink?",
48
51
  message: "Are you sure you want to delete this DataSink?",
@@ -50,188 +53,203 @@ var C = o(function() {
50
53
  cancelButtonTitle: "Cancel"
51
54
  });
52
55
  if (e === null ? window.confirm("Are you sure you want to delete this DataSink?") : e) {
53
- re("medium"), k(!0);
56
+ re("medium"), A(!0);
54
57
  try {
55
- await K(o), i() && a("success"), C("/datasinks");
58
+ await q(s), a() && o("success"), w("/datasinks");
56
59
  } catch {
57
- i() && a("error");
60
+ a() && o("error");
58
61
  } finally {
59
- k(!1);
62
+ A(!1);
60
63
  }
61
64
  }
62
65
  }, [
63
- o,
64
- K,
65
- C
66
- ]), Y = s(async (e, t) => {
67
- if (o) {
68
- P(!0);
66
+ s,
67
+ q,
68
+ w
69
+ ]), X = c(async (e, t) => {
70
+ if (s) {
71
+ F(!0);
69
72
  try {
70
- let n = await U({ id: o }, {
73
+ let n = await W({ id: s }, {
71
74
  limit: t,
72
75
  offset: e
73
76
  });
74
- n && (De(n.raw || {}), Ae(typeof n.totalCount == "number" ? n.totalCount : null), Me(!!n.hasMore), ke(e));
77
+ n && (Ne(n.raw || {}), Ie(typeof n.totalCount == "number" ? n.totalCount : null), Re(!!n.hasMore), Fe(e));
75
78
  } catch {} finally {
76
- P(!1);
79
+ F(!1);
77
80
  }
78
81
  }
79
- }, [o, U]), X = s(async () => {
80
- if (o) {
81
- if (w) {
82
- T(!1);
82
+ }, [s, W]), Z = c(async () => {
83
+ if (s) {
84
+ if (T) {
85
+ E(!1);
83
86
  return;
84
87
  }
85
- await Y(0, L), T(!0);
88
+ await X(0, R), E(!0);
86
89
  }
87
90
  }, [
88
- o,
89
- w,
90
- Y,
91
- L
92
- ]), Z = s((e) => {
93
- Oe(e), Y(0, e);
94
- }, [Y]), Q = s(() => {
95
- A(!0);
96
- }, []), Ie = s(() => {
97
- A(!1);
98
- }, []), $ = s(() => {
91
+ s,
92
+ T,
93
+ X,
94
+ R
95
+ ]), He = c((e) => {
96
+ Pe(e), X(0, e);
97
+ }, [X]), Q = c(() => {
99
98
  j(!0);
100
- }, []), Le = s(() => {
99
+ }, []), Ue = c(() => {
101
100
  j(!1);
102
- }, []), Re = s(() => {
103
- j(!1), C(n());
104
- }, [C]), ze = s(async (e) => {
105
- if (!B || !await G({
106
- id: B.id,
107
- version: B.version,
101
+ }, []), $ = c(() => {
102
+ M(!0);
103
+ }, []), We = c(() => {
104
+ M(!1);
105
+ }, []), Ge = c(() => {
106
+ M(!1), w(n());
107
+ }, [w]), Ke = c(async (e) => {
108
+ if (!V || !await K({
109
+ id: V.id,
110
+ version: V.version,
108
111
  data: e
109
112
  })) return !1;
110
113
  try {
111
- await Y(0, L), T(!0);
114
+ await X(0, R), E(!0);
112
115
  } catch {}
113
116
  return !0;
114
117
  }, [
115
- B,
116
- G,
117
- Y,
118
- L
118
+ V,
119
+ K,
120
+ X,
121
+ R
119
122
  ]);
120
- return Ne && !B ? /* @__PURE__ */ b("div", {
123
+ return ze && !V ? /* @__PURE__ */ x("div", {
121
124
  className: "flex items-center justify-center min-h-[400px]",
122
- children: /* @__PURE__ */ b(f, { className: "w-8 h-8 text-text-secondary animate-spin" })
123
- }) : V && !B ? /* @__PURE__ */ b("div", {
125
+ children: /* @__PURE__ */ x(m, { className: "w-8 h-8 text-text-secondary animate-spin" })
126
+ }) : H && !V ? /* @__PURE__ */ x("div", {
124
127
  className: "flex items-center justify-center min-h-[400px] p-card-padding",
125
- children: /* @__PURE__ */ x("div", {
128
+ children: /* @__PURE__ */ S("div", {
126
129
  className: "text-center",
127
130
  children: [
128
- /* @__PURE__ */ b(pe, { className: "w-12 h-12 text-status-error-text mx-auto mb-4" }),
129
- /* @__PURE__ */ b("p", {
131
+ /* @__PURE__ */ x(me, { className: "w-12 h-12 text-status-error-text mx-auto mb-4" }),
132
+ /* @__PURE__ */ x("p", {
130
133
  className: "text-status-error-text text-body-sm font-medium mb-2",
131
134
  children: "Failed to load DataSink"
132
135
  }),
133
- /* @__PURE__ */ b("p", {
136
+ /* @__PURE__ */ x("p", {
134
137
  className: "text-text-tertiary text-body-xs mb-6",
135
- children: V.message
138
+ children: H.message
136
139
  }),
137
- /* @__PURE__ */ x(m, {
138
- onClick: q,
140
+ /* @__PURE__ */ S(g, {
141
+ onClick: J,
139
142
  variant: "ghost",
140
143
  size: "sm",
141
- children: [/* @__PURE__ */ b(l, { className: "w-4 h-4 mr-2" }), "Go back"]
144
+ children: [/* @__PURE__ */ x(f, { className: "w-4 h-4 mr-2" }), "Go back"]
142
145
  })
143
146
  ]
144
147
  })
145
- }) : B ? /* @__PURE__ */ x("div", {
148
+ }) : !ke && !Ae ? /* @__PURE__ */ x(fe, {
149
+ title: "Access Denied",
150
+ description: "You don't have permission to view this data sink."
151
+ }) : V ? /* @__PURE__ */ S("div", {
146
152
  className: "p-card-padding space-y-6",
147
153
  children: [
148
- /* @__PURE__ */ x("div", {
154
+ /* @__PURE__ */ S("div", {
149
155
  className: "flex flex-col sm:flex-row sm:items-start sm:justify-between gap-4",
150
- children: [/* @__PURE__ */ x("div", {
156
+ children: [/* @__PURE__ */ S("div", {
151
157
  className: "flex-1",
152
158
  children: [
153
- /* @__PURE__ */ x(m, {
154
- onClick: q,
159
+ /* @__PURE__ */ S(g, {
160
+ onClick: J,
155
161
  variant: "ghost",
156
162
  size: "sm",
157
163
  className: "mb-4",
158
- children: [/* @__PURE__ */ b(l, { className: "w-4 h-4 mr-2" }), "Back to DataSinks"]
164
+ children: [/* @__PURE__ */ x(f, { className: "w-4 h-4 mr-2" }), "Back to DataSinks"]
159
165
  }),
160
- /* @__PURE__ */ x("div", {
166
+ /* @__PURE__ */ S("div", {
161
167
  className: "flex items-center gap-2 flex-wrap",
162
- children: [/* @__PURE__ */ b("h1", {
168
+ children: [/* @__PURE__ */ x("h1", {
163
169
  className: "text-heading-h1 font-bold text-text-primary",
164
- children: B.name || "Untitled"
165
- }), /* @__PURE__ */ b(r, { status: B.status })]
170
+ children: V.name || "Untitled"
171
+ }), /* @__PURE__ */ x(i, { status: V.status })]
166
172
  }),
167
- /* @__PURE__ */ b("p", {
173
+ /* @__PURE__ */ x("p", {
168
174
  className: "text-body-sm text-text-tertiary font-mono mt-1",
169
- children: B.key
175
+ children: V.key
170
176
  }),
171
- B.description && /* @__PURE__ */ b("p", {
177
+ V.description && /* @__PURE__ */ x("p", {
172
178
  className: "text-body-sm text-text-secondary mt-2",
173
- children: B.description
179
+ children: V.description
174
180
  })
175
181
  ]
176
- }), /* @__PURE__ */ x("div", {
182
+ }), /* @__PURE__ */ S("div", {
177
183
  className: "flex items-center gap-2 flex-wrap",
178
184
  children: [
179
- /* @__PURE__ */ x(m, {
180
- onClick: J,
181
- disabled: E,
182
- variant: "secondary",
183
- size: "default",
184
- children: [/* @__PURE__ */ b(ye, { className: `w-4 h-4 mr-2 ${E ? "animate-spin" : ""}` }), E ? "Refreshing..." : "Refresh"]
185
+ /* @__PURE__ */ x(d, {
186
+ permission: r.DATASINK_EXECUTE,
187
+ deniedBehavior: "disable",
188
+ children: /* @__PURE__ */ S(g, {
189
+ onClick: Y,
190
+ disabled: D,
191
+ variant: "secondary",
192
+ size: "default",
193
+ children: [/* @__PURE__ */ x(xe, { className: `w-4 h-4 mr-2 ${D ? "animate-spin" : ""}` }), D ? "Refreshing..." : "Refresh"]
194
+ })
185
195
  }),
186
- /* @__PURE__ */ x(m, {
196
+ /* @__PURE__ */ S(g, {
187
197
  onClick: $,
188
198
  variant: "secondary",
189
199
  size: "default",
190
- children: [/* @__PURE__ */ b(p, { className: "w-4 h-4 mr-2" }), "Import Data"]
200
+ children: [/* @__PURE__ */ x(h, { className: "w-4 h-4 mr-2" }), "Import Data"]
191
201
  }),
192
- /* @__PURE__ */ x(m, {
202
+ /* @__PURE__ */ S(g, {
193
203
  onClick: Q,
194
204
  variant: "secondary",
195
205
  size: "default",
196
- children: [/* @__PURE__ */ b(he, { className: "w-4 h-4 mr-2" }), "Export"]
206
+ children: [/* @__PURE__ */ x(ge, { className: "w-4 h-4 mr-2" }), "Export"]
197
207
  }),
198
- /* @__PURE__ */ x(m, {
199
- onClick: Pe,
200
- variant: "secondary",
201
- size: "default",
202
- children: [/* @__PURE__ */ b(ge, { className: "w-4 h-4 mr-2" }), "Edit"]
208
+ /* @__PURE__ */ x(d, {
209
+ permission: r.DATASINK_UPDATE,
210
+ deniedBehavior: "disable",
211
+ children: /* @__PURE__ */ S(g, {
212
+ onClick: Be,
213
+ variant: "secondary",
214
+ size: "default",
215
+ children: [/* @__PURE__ */ x(_e, { className: "w-4 h-4 mr-2" }), "Edit"]
216
+ })
203
217
  }),
204
- /* @__PURE__ */ x(m, {
205
- onClick: Fe,
206
- disabled: O,
207
- variant: "destructive",
208
- size: "default",
209
- children: [/* @__PURE__ */ b(be, { className: "w-4 h-4 mr-2" }), O ? "Deleting..." : "Delete"]
218
+ /* @__PURE__ */ x(d, {
219
+ permission: r.DATASINK_DELETE,
220
+ deniedBehavior: "hide",
221
+ children: /* @__PURE__ */ S(g, {
222
+ onClick: Ve,
223
+ disabled: k,
224
+ variant: "destructive",
225
+ size: "default",
226
+ children: [/* @__PURE__ */ x(Se, { className: "w-4 h-4 mr-2" }), k ? "Deleting..." : "Delete"]
227
+ })
210
228
  })
211
229
  ]
212
230
  })]
213
231
  }),
214
- /* @__PURE__ */ b(we, { children: "A data sink is a structured store that holds your processed data and serves it to dashboards. From here you can inspect its schema and stats, preview the cached rows, refresh it from its linked workflow, or export it." }),
215
- /* @__PURE__ */ b(Ce, {
232
+ /* @__PURE__ */ x(De, { children: "A data sink is a structured store that holds your processed data and serves it to dashboards. From here you can inspect its schema and stats, preview the cached rows, refresh it from its linked workflow, or export it." }),
233
+ /* @__PURE__ */ x(Ee, {
216
234
  storageKey: "bigconsole-datasink-view",
217
235
  steps: [
218
236
  {
219
237
  id: "preview",
220
238
  label: "Preview the data",
221
239
  description: "Open the cached rows to confirm the sink holds what you expect.",
222
- onClick: X
240
+ onClick: Z
223
241
  },
224
242
  {
225
243
  id: "refresh",
226
244
  label: "Refresh from source",
227
245
  description: "Re-run the linked workflow to pull the latest data.",
228
- onClick: J
246
+ onClick: Y
229
247
  },
230
248
  {
231
249
  id: "build-dashboard",
232
250
  label: "Visualize it on a dashboard",
233
251
  description: "Add widgets that query this sink to see your data live.",
234
- onClick: () => C("/dashboards")
252
+ onClick: () => w("/dashboards")
235
253
  },
236
254
  {
237
255
  id: "export",
@@ -241,227 +259,227 @@ var C = o(function() {
241
259
  }
242
260
  ]
243
261
  }),
244
- /* @__PURE__ */ x("div", {
262
+ /* @__PURE__ */ S("div", {
245
263
  className: "grid gap-6 md:grid-cols-2",
246
264
  children: [
247
- /* @__PURE__ */ x(xe, {
265
+ /* @__PURE__ */ S(we, {
248
266
  treatment: "glass",
249
267
  glow: !0,
250
- children: [/* @__PURE__ */ b(_, { children: /* @__PURE__ */ b(v, { children: "Details" }) }), /* @__PURE__ */ b(g, { children: /* @__PURE__ */ x("dl", {
268
+ children: [/* @__PURE__ */ x(v, { children: /* @__PURE__ */ x(y, { children: "Details" }) }), /* @__PURE__ */ x(_, { children: /* @__PURE__ */ S("dl", {
251
269
  className: "space-y-4 text-body-sm",
252
270
  children: [
253
- /* @__PURE__ */ x("div", {
271
+ /* @__PURE__ */ S("div", {
254
272
  className: "flex justify-between items-center",
255
- children: [/* @__PURE__ */ b("dt", {
273
+ children: [/* @__PURE__ */ x("dt", {
256
274
  className: "text-text-secondary",
257
275
  children: "Status"
258
- }), /* @__PURE__ */ b("dd", { children: /* @__PURE__ */ b(r, { status: B.status }) })]
276
+ }), /* @__PURE__ */ x("dd", { children: /* @__PURE__ */ x(i, { status: V.status }) })]
259
277
  }),
260
- /* @__PURE__ */ x("div", {
278
+ /* @__PURE__ */ S("div", {
261
279
  className: "flex justify-between items-center",
262
- children: [/* @__PURE__ */ b("dt", {
280
+ children: [/* @__PURE__ */ x("dt", {
263
281
  className: "text-text-secondary",
264
282
  children: "Cache TTL"
265
- }), /* @__PURE__ */ b("dd", {
283
+ }), /* @__PURE__ */ x("dd", {
266
284
  className: "text-text-primary font-medium",
267
- children: B.ttl ? `${B.ttl}s` : "None"
285
+ children: V.ttl ? `${V.ttl}s` : "None"
268
286
  })]
269
287
  }),
270
- /* @__PURE__ */ x("div", {
288
+ /* @__PURE__ */ S("div", {
271
289
  className: "flex justify-between items-center",
272
- children: [/* @__PURE__ */ b("dt", {
290
+ children: [/* @__PURE__ */ x("dt", {
273
291
  className: "text-text-secondary",
274
292
  children: "Refresh Type"
275
- }), /* @__PURE__ */ b("dd", {
293
+ }), /* @__PURE__ */ x("dd", {
276
294
  className: "text-text-primary font-medium capitalize",
277
- children: B.refresh?.type || "Manual"
295
+ children: V.refresh?.type || "Manual"
278
296
  })]
279
297
  }),
280
- /* @__PURE__ */ x("div", {
298
+ /* @__PURE__ */ S("div", {
281
299
  className: "flex justify-between items-center",
282
- children: [/* @__PURE__ */ b("dt", {
300
+ children: [/* @__PURE__ */ x("dt", {
283
301
  className: "text-text-secondary",
284
302
  children: "Size"
285
- }), /* @__PURE__ */ b("dd", {
303
+ }), /* @__PURE__ */ x("dd", {
286
304
  className: "text-text-primary font-medium",
287
- children: B.sizeBytes ? `${(B.sizeBytes / 1024).toFixed(2)} KB` : "0 KB"
305
+ children: V.sizeBytes ? `${(V.sizeBytes / 1024).toFixed(2)} KB` : "0 KB"
288
306
  })]
289
307
  }),
290
- /* @__PURE__ */ x("div", {
308
+ /* @__PURE__ */ S("div", {
291
309
  className: "flex justify-between items-center",
292
- children: [/* @__PURE__ */ b("dt", {
310
+ children: [/* @__PURE__ */ x("dt", {
293
311
  className: "text-text-secondary",
294
312
  children: "Version"
295
- }), /* @__PURE__ */ b("dd", {
313
+ }), /* @__PURE__ */ x("dd", {
296
314
  className: "text-text-primary font-medium",
297
- children: B.version || 1
315
+ children: V.version || 1
298
316
  })]
299
317
  }),
300
- /* @__PURE__ */ x("div", {
318
+ /* @__PURE__ */ S("div", {
301
319
  className: "flex justify-between items-center",
302
- children: [/* @__PURE__ */ b("dt", {
320
+ children: [/* @__PURE__ */ x("dt", {
303
321
  className: "text-text-secondary",
304
322
  children: "Last Refreshed"
305
- }), /* @__PURE__ */ b("dd", {
323
+ }), /* @__PURE__ */ x("dd", {
306
324
  className: "text-text-primary font-medium",
307
- children: B.lastRefreshedAt ? S(new Date(B.lastRefreshedAt), { addSuffix: !0 }) : "Never"
325
+ children: V.lastRefreshedAt ? C(new Date(V.lastRefreshedAt), { addSuffix: !0 }) : "Never"
308
326
  })]
309
327
  }),
310
- /* @__PURE__ */ x("div", {
328
+ /* @__PURE__ */ S("div", {
311
329
  className: "flex justify-between items-center",
312
- children: [/* @__PURE__ */ b("dt", {
330
+ children: [/* @__PURE__ */ x("dt", {
313
331
  className: "text-text-secondary",
314
332
  children: "Created"
315
- }), /* @__PURE__ */ b("dd", {
333
+ }), /* @__PURE__ */ x("dd", {
316
334
  className: "text-text-primary font-medium",
317
- children: S(new Date(B.createdAt), { addSuffix: !0 })
335
+ children: C(new Date(V.createdAt), { addSuffix: !0 })
318
336
  })]
319
337
  })
320
338
  ]
321
339
  }) })]
322
340
  }),
323
- B.fluidGridsWorkflowId && /* @__PURE__ */ b(ce, {
324
- workflowId: B.fluidGridsWorkflowId,
325
- executionId: B.fluidGridsWorkflowExecutionId || void 0,
326
- lastRefreshedAt: B.lastRefreshedAt || void 0,
327
- setupState: B.setupState,
328
- status: B.status,
329
- onRerunWorkflow: J,
330
- disabled: E,
331
- isRerunning: E
341
+ V.fluidGridsWorkflowId && /* @__PURE__ */ x(ce, {
342
+ workflowId: V.fluidGridsWorkflowId,
343
+ executionId: V.fluidGridsWorkflowExecutionId || void 0,
344
+ lastRefreshedAt: V.lastRefreshedAt || void 0,
345
+ setupState: V.setupState,
346
+ status: V.status,
347
+ onRerunWorkflow: Y,
348
+ disabled: D,
349
+ isRerunning: D
332
350
  }),
333
- /* @__PURE__ */ b(oe, { workflowLinks: B.workflowLinks }),
334
- /* @__PURE__ */ b(se, { dataSinkKey: B.key })
351
+ /* @__PURE__ */ x(oe, { workflowLinks: V.workflowLinks }),
352
+ /* @__PURE__ */ x(se, { dataSinkKey: V.key })
335
353
  ]
336
354
  }),
337
- /* @__PURE__ */ x(h, { children: [
338
- /* @__PURE__ */ x(_, {
355
+ /* @__PURE__ */ S(Ce, { children: [
356
+ /* @__PURE__ */ S(v, {
339
357
  className: "flex flex-row items-center justify-between space-y-0",
340
- children: [/* @__PURE__ */ x(v, {
358
+ children: [/* @__PURE__ */ S(y, {
341
359
  className: "flex items-center gap-2",
342
- children: [/* @__PURE__ */ b(u, { className: "w-4 h-4 text-text-secondary" }), "Data Preview"]
343
- }), /* @__PURE__ */ x("div", {
360
+ children: [/* @__PURE__ */ x(p, { className: "w-4 h-4 text-text-secondary" }), "Data Preview"]
361
+ }), /* @__PURE__ */ S("div", {
344
362
  className: "flex items-center gap-2",
345
- children: [w && /* @__PURE__ */ x("div", {
363
+ children: [T && /* @__PURE__ */ S("div", {
346
364
  className: "flex items-center border border-border-default rounded-md overflow-hidden",
347
- children: [/* @__PURE__ */ b("button", {
365
+ children: [/* @__PURE__ */ x("button", {
348
366
  type: "button",
349
- onClick: () => I("table"),
350
- className: `p-1.5 ${F === "table" ? "bg-bg-sunken text-text-primary" : "text-text-secondary hover:text-text-primary"}`,
367
+ onClick: () => L("table"),
368
+ className: `p-1.5 ${I === "table" ? "bg-bg-sunken text-text-primary" : "text-text-secondary hover:text-text-primary"}`,
351
369
  title: "Table view",
352
- children: /* @__PURE__ */ b(ve, { className: "w-4 h-4" })
353
- }), /* @__PURE__ */ b("button", {
370
+ children: /* @__PURE__ */ x(be, { className: "w-4 h-4" })
371
+ }), /* @__PURE__ */ x("button", {
354
372
  type: "button",
355
- onClick: () => I("json"),
356
- className: `p-1.5 ${F === "json" ? "bg-bg-sunken text-text-primary" : "text-text-secondary hover:text-text-primary"}`,
373
+ onClick: () => L("json"),
374
+ className: `p-1.5 ${I === "json" ? "bg-bg-sunken text-text-primary" : "text-text-secondary hover:text-text-primary"}`,
357
375
  title: "JSON view",
358
- children: /* @__PURE__ */ b(me, { className: "w-4 h-4" })
376
+ children: /* @__PURE__ */ x(he, { className: "w-4 h-4" })
359
377
  })]
360
- }), /* @__PURE__ */ b(m, {
361
- onClick: X,
362
- disabled: N,
363
- variant: w ? "secondary" : "default",
378
+ }), /* @__PURE__ */ x(g, {
379
+ onClick: Z,
380
+ disabled: P,
381
+ variant: T ? "secondary" : "default",
364
382
  size: "sm",
365
- children: N ? /* @__PURE__ */ x(y, { children: [/* @__PURE__ */ b(f, { className: "w-4 h-4 mr-2 animate-spin" }), "Loading..."] }) : w ? /* @__PURE__ */ x(y, { children: [/* @__PURE__ */ b(d, { className: "w-4 h-4 mr-2" }), "Hide Data"] }) : /* @__PURE__ */ x(y, { children: [/* @__PURE__ */ b(_e, { className: "w-4 h-4 mr-2" }), "Show Data"] })
383
+ children: P ? /* @__PURE__ */ S(b, { children: [/* @__PURE__ */ x(m, { className: "w-4 h-4 mr-2 animate-spin" }), "Loading..."] }) : T ? /* @__PURE__ */ S(b, { children: [/* @__PURE__ */ x(ye, { className: "w-4 h-4 mr-2" }), "Hide Data"] }) : /* @__PURE__ */ S(b, { children: [/* @__PURE__ */ x(ve, { className: "w-4 h-4 mr-2" }), "Show Data"] })
366
384
  })]
367
385
  })]
368
386
  }),
369
- w && M && /* @__PURE__ */ x(g, { children: [b(F === "table" ? ee : ae, {
370
- data: M,
387
+ T && N && /* @__PURE__ */ S(_, { children: [x(I === "table" ? ee : ae, {
388
+ data: N,
371
389
  maxHeight: "400px"
372
- }), z !== null && /* @__PURE__ */ x("div", {
390
+ }), B !== null && /* @__PURE__ */ S("div", {
373
391
  className: "flex items-center justify-between gap-4 mt-4 pt-4 border-t border-border-subtle",
374
- children: [/* @__PURE__ */ x("div", {
392
+ children: [/* @__PURE__ */ S("div", {
375
393
  className: "flex items-center gap-2 text-body-sm text-text-secondary",
376
- children: [/* @__PURE__ */ b("span", { children: "Rows per page" }), /* @__PURE__ */ b("select", {
394
+ children: [/* @__PURE__ */ x("span", { children: "Rows per page" }), /* @__PURE__ */ x("select", {
377
395
  "aria-label": "Rows per page",
378
396
  className: "bg-bg-canvas border border-border-default rounded px-2 py-0.5 text-text-primary",
379
- value: L,
380
- onChange: (e) => Z(Number(e.target.value)),
397
+ value: R,
398
+ onChange: (e) => He(Number(e.target.value)),
381
399
  children: [
382
400
  100,
383
401
  500,
384
402
  1e3
385
- ].map((e) => /* @__PURE__ */ b("option", {
403
+ ].map((e) => /* @__PURE__ */ x("option", {
386
404
  value: e,
387
405
  children: e
388
406
  }, e))
389
407
  })]
390
- }), /* @__PURE__ */ x("div", {
408
+ }), /* @__PURE__ */ S("div", {
391
409
  className: "flex items-center gap-4 text-body-sm text-text-secondary",
392
410
  children: [
393
- /* @__PURE__ */ b("span", { children: z === 0 ? "0 rows" : `${R + 1}–${Math.min(R + L, z)} of ${z}` }),
394
- /* @__PURE__ */ b(m, {
411
+ /* @__PURE__ */ x("span", { children: B === 0 ? "0 rows" : `${z + 1}–${Math.min(z + R, B)} of ${B}` }),
412
+ /* @__PURE__ */ x(g, {
395
413
  variant: "secondary",
396
414
  size: "sm",
397
- disabled: R === 0 || N,
398
- onClick: () => void Y(Math.max(0, R - L), L),
415
+ disabled: z === 0 || P,
416
+ onClick: () => void X(Math.max(0, z - R), R),
399
417
  children: "Previous"
400
418
  }),
401
- /* @__PURE__ */ b(m, {
419
+ /* @__PURE__ */ x(g, {
402
420
  variant: "secondary",
403
421
  size: "sm",
404
- disabled: !je || N,
405
- onClick: () => void Y(R + L, L),
422
+ disabled: !Le || P,
423
+ onClick: () => void X(z + R, R),
406
424
  children: "Next"
407
425
  })
408
426
  ]
409
427
  })]
410
428
  })] }),
411
- !w && (B.data && Object.keys(B.data).length > 0 ? /* @__PURE__ */ x(g, {
429
+ !T && (V.data && Object.keys(V.data).length > 0 ? /* @__PURE__ */ S(_, {
412
430
  className: "text-center p-8",
413
- children: [/* @__PURE__ */ b(u, { className: "w-10 h-10 text-text-tertiary mx-auto mb-4" }), /* @__PURE__ */ b("p", {
431
+ children: [/* @__PURE__ */ x(p, { className: "w-10 h-10 text-text-tertiary mx-auto mb-4" }), /* @__PURE__ */ x("p", {
414
432
  className: "text-body-sm text-text-secondary",
415
433
  children: "Click \"Show Data\" to preview the cached data."
416
434
  })]
417
- }) : /* @__PURE__ */ x(g, {
435
+ }) : /* @__PURE__ */ S(_, {
418
436
  className: "text-center p-8",
419
437
  children: [
420
- /* @__PURE__ */ b(u, { className: "w-10 h-10 text-text-tertiary mx-auto mb-4" }),
421
- /* @__PURE__ */ b("p", {
438
+ /* @__PURE__ */ x(p, { className: "w-10 h-10 text-text-tertiary mx-auto mb-4" }),
439
+ /* @__PURE__ */ x("p", {
422
440
  className: "text-body-sm text-text-secondary mb-4",
423
441
  children: "This data sink has no data yet. Upload a CSV or build a workflow to import data."
424
442
  }),
425
- /* @__PURE__ */ x(m, {
443
+ /* @__PURE__ */ S(g, {
426
444
  onClick: $,
427
445
  variant: "default",
428
446
  size: "sm",
429
- children: [/* @__PURE__ */ b(p, { className: "w-4 h-4 mr-2" }), "Import Data"]
447
+ children: [/* @__PURE__ */ x(h, { className: "w-4 h-4 mr-2" }), "Import Data"]
430
448
  })
431
449
  ]
432
450
  }))
433
451
  ] }),
434
- /* @__PURE__ */ b(le, {
435
- isOpen: Te,
436
- dataSinkId: o || null,
437
- dataSinkName: B.name || B.key,
438
- onClose: Ie
452
+ /* @__PURE__ */ x(le, {
453
+ isOpen: je,
454
+ dataSinkId: s || null,
455
+ dataSinkName: V.name || V.key,
456
+ onClose: Ue
439
457
  }),
440
- /* @__PURE__ */ b(ue, {
441
- isOpen: Ee,
442
- dataSinkName: B.name || B.key,
443
- hasExistingData: !!(B.data && Object.keys(B.data).length > 0),
444
- onClose: Le,
445
- onGoToWorkflows: Re,
446
- onImportCsv: ze
458
+ /* @__PURE__ */ x(ue, {
459
+ isOpen: Me,
460
+ dataSinkName: V.name || V.key,
461
+ hasExistingData: !!(V.data && Object.keys(V.data).length > 0),
462
+ onClose: We,
463
+ onGoToWorkflows: Ge,
464
+ onImportCsv: Ke
447
465
  })
448
466
  ]
449
- }) : /* @__PURE__ */ b("div", {
467
+ }) : /* @__PURE__ */ x("div", {
450
468
  className: "flex items-center justify-center min-h-[400px] p-card-padding",
451
- children: /* @__PURE__ */ b(Se, {
469
+ children: /* @__PURE__ */ x(Te, {
452
470
  illustration: "empty-data",
453
471
  title: "DataSink not found",
454
472
  description: "The DataSink you're looking for doesn't exist or has been deleted.",
455
- action: /* @__PURE__ */ x(m, {
456
- onClick: q,
473
+ action: /* @__PURE__ */ S(g, {
474
+ onClick: J,
457
475
  variant: "default",
458
476
  size: "default",
459
- children: [/* @__PURE__ */ b(l, { className: "w-4 h-4 mr-2" }), "Go back to DataSinks"]
477
+ children: [/* @__PURE__ */ x(f, { className: "w-4 h-4 mr-2" }), "Go back to DataSinks"]
460
478
  })
461
479
  })
462
480
  });
463
481
  });
464
482
  //#endregion
465
- export { C as DataSinkViewPage, C as default };
483
+ export { w as DataSinkViewPage, w as default };
466
484
 
467
485
  //# sourceMappingURL=DataSinkViewPage.js.map