@burdenoff/microfe-bigconsole 2026.713.6 → 2026.714.1

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