@burdenoff/microfe-bigconsole 2026.1004.2 → 2026.1004.4

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