@burdenoff/microfe-bigconsole 2026.1008.11 → 2026.1008.12

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 (131) hide show
  1. package/dist/bigconsole/BigConsoleRoutes.d.ts.map +1 -1
  2. package/dist/bigconsole/BigConsoleRoutes.js +136 -127
  3. package/dist/bigconsole/BigConsoleRoutes.js.map +1 -1
  4. package/dist/bigconsole/assistant/assistantProduct.d.ts.map +1 -1
  5. package/dist/bigconsole/assistant/assistantProduct.js +3 -1
  6. package/dist/bigconsole/assistant/assistantProduct.js.map +1 -1
  7. package/dist/bigconsole/components/builder/inspector/DataBindingSection.js +31 -31
  8. package/dist/bigconsole/components/dashboard/CreateDashboardDialog.js +44 -44
  9. package/dist/bigconsole/components/dashboard/CreateDashboardDialog.js.map +1 -1
  10. package/dist/bigconsole/components/dashboard/DashboardCanvas.js +36 -36
  11. package/dist/bigconsole/components/dashboard/DashboardCanvas.js.map +1 -1
  12. package/dist/bigconsole/components/dashboard/DashboardToolbar.js +59 -59
  13. package/dist/bigconsole/components/dashboard/DrilldownBreadcrumb.js +15 -15
  14. package/dist/bigconsole/components/dashboard/GlobalFiltersBar/FilterChip.js +30 -30
  15. package/dist/bigconsole/components/dashboard/GlobalFiltersBar/FilterEditor.js +41 -41
  16. package/dist/bigconsole/components/dashboard/GlobalFiltersBar/FilterPresetSelector.js +34 -34
  17. package/dist/bigconsole/components/dashboard/GlobalFiltersBar/GlobalFiltersBar.js +34 -34
  18. package/dist/bigconsole/components/dashboard/ImportDashboardDialog.js +110 -110
  19. package/dist/bigconsole/components/dashboard/ImportDashboardDialog.js.map +1 -1
  20. package/dist/bigconsole/components/dashboard/PublishToStoreDialog.js +21 -21
  21. package/dist/bigconsole/components/dashboard/SavedViewsDropdown/SavedViewsDropdown.js +46 -46
  22. package/dist/bigconsole/components/dashboard/ShareDialog/EmbedTab.js +91 -91
  23. package/dist/bigconsole/components/dashboard/ShareDialog/EmbedTab.js.map +1 -1
  24. package/dist/bigconsole/components/dashboard/ShareDialog/ShareDialog.js +101 -101
  25. package/dist/bigconsole/components/dashboard/ShareDialog/ShareDialog.js.map +1 -1
  26. package/dist/bigconsole/components/dashboard/TemplateInstallOptions.js +31 -31
  27. package/dist/bigconsole/components/dashboard/TemplateLayoutPreview.js +15 -15
  28. package/dist/bigconsole/components/dashboard/TemplatePicker/TemplatePicker.js +1 -1
  29. package/dist/bigconsole/components/dashboard/WidgetPalette.js +46 -46
  30. package/dist/bigconsole/components/datasink/AlertExecutionHistory.js +37 -37
  31. package/dist/bigconsole/components/datasink/AlertRuleEditor.js +66 -66
  32. package/dist/bigconsole/components/datasink/CacheTTLSelector.js +35 -35
  33. package/dist/bigconsole/components/datasink/DataSinkCard.js +29 -29
  34. package/dist/bigconsole/components/datasink/DataSinkDeleteDialog.js +18 -18
  35. package/dist/bigconsole/components/datasink/DataSinkRefreshDialog.js +20 -20
  36. package/dist/bigconsole/components/datasink/ImportDataGuideDialog.js +47 -47
  37. package/dist/bigconsole/components/datasink/ImportDataSinkDialog.js +91 -91
  38. package/dist/bigconsole/components/datasink/RefreshTypeSelector.js +35 -35
  39. package/dist/bigconsole/components/parser/DataSinkSelector.js +40 -40
  40. package/dist/bigconsole/components/parser/ImportParserDialog.js +120 -120
  41. package/dist/bigconsole/components/parser/ImportParserDialog.js.map +1 -1
  42. package/dist/bigconsole/components/parser/ParserSelector.js +51 -51
  43. package/dist/bigconsole/components/pipeline/PipelineScopePicker.js +10 -10
  44. package/dist/bigconsole/components/preview/AiPreviewMiniPanel.js +27 -27
  45. package/dist/bigconsole/components/preview/AiPreviewPanel.js +30 -30
  46. package/dist/bigconsole/components/widgets/ActionConfigDialog.js +4 -4
  47. package/dist/bigconsole/components/widgets/DrilldownConfigPanel.js +93 -93
  48. package/dist/bigconsole/components/widgets/DrilldownConfigPanel.js.map +1 -1
  49. package/dist/bigconsole/components/widgets/PropertiesPanel.d.ts.map +1 -1
  50. package/dist/bigconsole/components/widgets/PropertiesPanel.js +280 -273
  51. package/dist/bigconsole/components/widgets/PropertiesPanel.js.map +1 -1
  52. package/dist/bigconsole/components/widgets/calendar/CalendarWidget.js +4 -4
  53. package/dist/bigconsole/components/widgets/chart/ChartConfig.js +48 -48
  54. package/dist/bigconsole/components/widgets/comments/WidgetComments.js +46 -46
  55. package/dist/bigconsole/components/widgets/event-logs/EventLogViewer.js +61 -61
  56. package/dist/bigconsole/components/widgets/form/FormWidget.js +36 -36
  57. package/dist/bigconsole/components/widgets/gauge/GaugeConfig.js +42 -42
  58. package/dist/bigconsole/components/widgets/heatmap/HeatmapConfig.js +25 -25
  59. package/dist/bigconsole/components/widgets/kanban/KanbanWidget.js +4 -4
  60. package/dist/bigconsole/components/widgets/list/ListConfig.js +30 -30
  61. package/dist/bigconsole/components/widgets/metric-card/MetricCardConfig.js +38 -38
  62. package/dist/bigconsole/components/widgets/metric-card/SparklineChart.js +9 -9
  63. package/dist/bigconsole/components/widgets/metric-card/TrendIndicator.js +9 -9
  64. package/dist/bigconsole/components/widgets/pivot-table/PivotTableWidget.js +49 -49
  65. package/dist/bigconsole/components/widgets/progress/ProgressConfig.js +39 -39
  66. package/dist/bigconsole/components/widgets/table/TableConfig.js +73 -73
  67. package/dist/bigconsole/components/widgets/webhook-config/WebhookConfigPanel.js +64 -64
  68. package/dist/bigconsole/components/workflow/WorkflowOpenGuard.js +15 -15
  69. package/dist/bigconsole/components/workflow/WorkflowSinkLinkForm.js +15 -15
  70. package/dist/bigconsole/customWidget/CustomWidgetBuilderSheet.js +9 -9
  71. package/dist/bigconsole/customWidget/CustomWidgetProposalPanel.js +67 -67
  72. package/dist/bigconsole/customWidget/CustomWidgetProposalPanel.js.map +1 -1
  73. package/dist/bigconsole/hooks/useDashboardLayoutBaseline.d.ts +15 -0
  74. package/dist/bigconsole/hooks/useDashboardLayoutBaseline.d.ts.map +1 -0
  75. package/dist/bigconsole/hooks/useDashboardLayoutBaseline.js +34 -0
  76. package/dist/bigconsole/hooks/useDashboardLayoutBaseline.js.map +1 -0
  77. package/dist/bigconsole/hooks/useDrilldown.js +3 -3
  78. package/dist/bigconsole/hooks/useGlobalFilters.js +3 -3
  79. package/dist/bigconsole/pages/AdminPage.js +130 -130
  80. package/dist/bigconsole/pages/DashboardBuilderPage.d.ts.map +1 -1
  81. package/dist/bigconsole/pages/DashboardBuilderPage.js +72 -60
  82. package/dist/bigconsole/pages/DashboardBuilderPage.js.map +1 -1
  83. package/dist/bigconsole/pages/DashboardViewPage.js +1 -1
  84. package/dist/bigconsole/pages/DataSinkAlertsPage.d.ts.map +1 -1
  85. package/dist/bigconsole/pages/DataSinkAlertsPage.js +30 -23
  86. package/dist/bigconsole/pages/DataSinkAlertsPage.js.map +1 -1
  87. package/dist/bigconsole/pages/DataSinkBuilderPage.d.ts.map +1 -1
  88. package/dist/bigconsole/pages/DataSinkBuilderPage.js +272 -263
  89. package/dist/bigconsole/pages/DataSinkBuilderPage.js.map +1 -1
  90. package/dist/bigconsole/pages/DataSinkViewPage.js +1 -1
  91. package/dist/bigconsole/pages/DataSinksPage.js +1 -1
  92. package/dist/bigconsole/pages/DataSourcesPage.js +5 -5
  93. package/dist/bigconsole/pages/InsightsPage.js +181 -181
  94. package/dist/bigconsole/pages/InsightsPage.js.map +1 -1
  95. package/dist/bigconsole/pages/OverviewPage.js +47 -47
  96. package/dist/bigconsole/pages/OverviewPage.js.map +1 -1
  97. package/dist/bigconsole/pages/ParserBuilderPage.d.ts.map +1 -1
  98. package/dist/bigconsole/pages/ParserBuilderPage.js +227 -211
  99. package/dist/bigconsole/pages/ParserBuilderPage.js.map +1 -1
  100. package/dist/bigconsole/pages/ParserViewPage.js +97 -97
  101. package/dist/bigconsole/pages/PipelineBuilderPage.d.ts.map +1 -1
  102. package/dist/bigconsole/pages/PipelineBuilderPage.js +256 -214
  103. package/dist/bigconsole/pages/PipelineBuilderPage.js.map +1 -1
  104. package/dist/bigconsole/pages/PipelineViewPage.js +146 -146
  105. package/dist/bigconsole/pages/PipelinesPage.js +88 -88
  106. package/dist/bigconsole/pages/PipelinesPage.js.map +1 -1
  107. package/dist/bigconsole/pages/SettingsPage.d.ts.map +1 -1
  108. package/dist/bigconsole/pages/SettingsPage.js +179 -173
  109. package/dist/bigconsole/pages/SettingsPage.js.map +1 -1
  110. package/dist/bigconsole/pages/WidgetDemoPage.js +42 -42
  111. package/dist/bigconsole/pages/WorkflowViewPage.js +1 -1
  112. package/dist/bigconsole/pages/WorkflowsPage.js +141 -141
  113. package/dist/bigconsole/pages/WorkflowsPage.js.map +1 -1
  114. package/dist/bigconsole/providers/BigConsoleQuotaProvider.js +12 -12
  115. package/dist/bigconsole/renderers/adapters/AdaptiveCardRenderer.js +34 -34
  116. package/dist/bigconsole/renderers/adapters/BlockKitRenderer.js +79 -79
  117. package/dist/bigconsole/renderers/adapters/CustomRenderer.js +46 -46
  118. package/dist/bigconsole/store/widgetStore.d.ts +12 -0
  119. package/dist/bigconsole/store/widgetStore.d.ts.map +1 -1
  120. package/dist/bigconsole/store/widgetStore.js +3 -1
  121. package/dist/bigconsole/store/widgetStore.js.map +1 -1
  122. package/dist/bigconsole/utils/formDirty.d.ts +83 -0
  123. package/dist/bigconsole/utils/formDirty.d.ts.map +1 -0
  124. package/dist/bigconsole/utils/formDirty.js +23 -0
  125. package/dist/bigconsole/utils/formDirty.js.map +1 -0
  126. package/dist/bigconsole/utils/layoutBaseline.d.ts +131 -0
  127. package/dist/bigconsole/utils/layoutBaseline.d.ts.map +1 -0
  128. package/dist/bigconsole/utils/layoutBaseline.js +98 -0
  129. package/dist/bigconsole/utils/layoutBaseline.js.map +1 -0
  130. package/dist/translations/en.d.ts.map +1 -1
  131. package/package.json +1 -1
@@ -7,21 +7,23 @@ import te from "../hooks/useDataSinkOperations.js";
7
7
  import { BIGCONSOLE_PERMISSIONS as r } from "../../constants/permissions.js";
8
8
  import { loadBigConsoleSettings as ne } from "../hooks/useBigConsoleSettings.js";
9
9
  import { isNative as re, nativeCopyText as ie, nativeToast as ae } from "../../utils/nativeBridge.js";
10
- import i from "../components/datasink/CacheTTLSelector.js";
11
- import a from "../components/datasink/RefreshTypeSelector.js";
12
- import { memo as o, useCallback as s, useEffect as c, useMemo as oe, useState as l } from "react";
13
- import { useParams as se } from "react-router";
14
- import { AccessDenied as ce, PermissionButton as le } from "@burdenoff/fe-libs/shared/components";
15
- import { usePermissions as ue } from "@burdenoff/fe-libs/shared/providers/shell";
16
- import { AlertCircle as u, ArrowLeft as d, Check as f, Copy as p, Database as m, Eye as h, ListChecks as g, Loader2 as _, Save as de, Settings as fe } from "lucide-react";
17
- import { Button as v, IllustratedEmptyState as pe, Input as y, Label as b, PagePurpose as me, Textarea as x } from "@burdenoff/fe-libs/ui";
18
- import { Fragment as S, jsx as C, jsxs as w } from "react/jsx-runtime";
19
- import { useI18n as he } from "@burdenoff/fe-libs/shared/providers/shell/I18nProvider";
10
+ import oe from "../components/datasink/CacheTTLSelector.js";
11
+ import se from "../components/datasink/RefreshTypeSelector.js";
12
+ import { isDirty as ce } from "../utils/formDirty.js";
13
+ import { memo as i, useCallback as a, useEffect as o, useMemo as le, useState as s } from "react";
14
+ import { useParams as ue } from "react-router";
15
+ import { AccessDenied as de, PermissionButton as fe } from "@burdenoff/fe-libs/shared/components";
16
+ import { usePermissions as pe } from "@burdenoff/fe-libs/shared/providers/shell";
17
+ import { AlertCircle as c, ArrowLeft as l, Check as u, Copy as d, Database as f, Eye as p, ListChecks as me, Loader2 as m, Save as he, Settings as ge } from "lucide-react";
18
+ import { Button as h, IllustratedEmptyState as _e, Input as g, Label as _, PagePurpose as ve, Textarea as v } from "@burdenoff/fe-libs/ui";
19
+ import { useUnsavedChanges as ye } from "@burdenoff/fe-libs/shared/hooks";
20
+ import { useI18n as be } from "@burdenoff/fe-libs/shared/providers/shell/I18nProvider";
21
+ import { Fragment as y, jsx as b, jsxs as x } from "react/jsx-runtime";
20
22
  //#region src/bigconsole/pages/DataSinkBuilderPage.tsx
21
- function ge(e) {
23
+ function xe(e) {
22
24
  return e.toLowerCase().replace(/[^a-z0-9]+/g, "_").replace(/^_+|_+$/g, "").substring(0, 64);
23
25
  }
24
- function _e(e, t) {
26
+ function Se(e, t) {
25
27
  let n = {};
26
28
  if (e.name.trim() ? e.name.length < 2 ? n.name = t("bigconsole.dataSinks.builder.validation.nameMinLength", "Name must be at least 2 characters") : e.name.length > 100 && (n.name = t("bigconsole.dataSinks.builder.validation.nameMaxLength", "Name must be less than 100 characters")) : n.name = t("bigconsole.dataSinks.builder.validation.nameRequired", "Name is required"), e.key.trim() ? /^[a-z0-9_]+$/.test(e.key) ? e.key.length > 64 && (n.key = t("bigconsole.dataSinks.builder.validation.keyMaxLength", "Key must be less than 64 characters")) : n.key = t("bigconsole.dataSinks.builder.validation.keyFormat", "Key can only contain lowercase letters, numbers, and underscores") : n.key = t("bigconsole.dataSinks.builder.validation.keyRequired", "Key is required"), e.data && e.data.trim()) try {
27
29
  JSON.parse(e.data);
@@ -30,8 +32,8 @@ function _e(e, t) {
30
32
  }
31
33
  return n;
32
34
  }
33
- var T = o(function() {
34
- let { dataSinkId: o } = se(), T = e(), { t: E } = he(), D = o !== "new" && !!o, { hasPermission: ve, isLoading: ye } = ue(), be = ve(r.DATASINK_READ), xe = D ? r.DATASINK_UPDATE : r.DATASINK_CREATE, [O, k] = l({
35
+ var S = i(function() {
36
+ let { dataSinkId: i } = ue(), S = e(), { t: C } = be(), w = i !== "new" && !!i, { hasPermission: T, isLoading: Ce } = pe(), we = T(r.DATASINK_READ), E = w ? r.DATASINK_UPDATE : r.DATASINK_CREATE, [D, O] = s({
35
37
  name: "",
36
38
  key: "",
37
39
  description: "",
@@ -41,488 +43,495 @@ var T = o(function() {
41
43
  })(),
42
44
  refresh: { type: "manual" },
43
45
  data: "{}"
44
- }), [A, j] = l({}), [M, N] = l(!1), [P, F] = l(!1), [I, L] = l(null), [Se, R] = l(!1), [z, B] = l(!1), [V, H] = l(null), [U, W] = l(null), { loading: Ce, error: G, dataSinks: we, fetchDataSink: K, createDataSink: q, updateDataSink: J, getDataSinkData: Y } = te({ skipFetch: !0 }), X = D ? we.find((e) => e.id === o) : null;
45
- c(() => {
46
- D && o && !X && K(o);
46
+ }), [k, A] = s(() => w ? null : D);
47
+ ye({
48
+ id: "datasink-editor",
49
+ label: C("bigconsole.assistant.unsaved.dataSourceForm", "the data source form"),
50
+ dirty: ce(D, k)
51
+ });
52
+ let [j, M] = s({}), [N, P] = s(!1), [F, I] = s(!1), [L, R] = s(null), [Te, z] = s(!1), [B, V] = s(!1), [H, U] = s(null), [W, G] = s(null), { loading: Ee, error: K, dataSinks: De, fetchDataSink: q, createDataSink: J, updateDataSink: Y, getDataSinkData: X } = te({ skipFetch: !0 }), Z = w ? De.find((e) => e.id === i) : null;
53
+ o(() => {
54
+ w && i && !Z && q(i);
47
55
  }, [
48
- D,
49
- o,
50
- X,
51
- K
56
+ w,
57
+ i,
58
+ Z,
59
+ q
52
60
  ]);
53
- let [Z, Te] = l(!1);
54
- c(() => {
55
- if (X && !Z) {
61
+ let [Q, Oe] = s(!1);
62
+ o(() => {
63
+ if (Z && !Q) {
56
64
  let e = "";
57
- if (X.data) try {
58
- if (typeof X.data == "string") {
59
- let t = JSON.parse(X.data);
65
+ if (Z.data) try {
66
+ if (typeof Z.data == "string") {
67
+ let t = JSON.parse(Z.data);
60
68
  e = JSON.stringify(t, null, 2);
61
- } else e = JSON.stringify(X.data, null, 2);
69
+ } else e = JSON.stringify(Z.data, null, 2);
62
70
  } catch {
63
- e = typeof X.data == "string" ? X.data : "";
71
+ e = typeof Z.data == "string" ? Z.data : "";
64
72
  }
65
- k({
66
- name: X.name || "",
67
- key: X.key || "",
68
- description: X.description || "",
69
- ttl: X.ttl ?? 300,
70
- refresh: X.refresh ? {
71
- type: X.refresh.type === "scheduled" ? "scheduled" : "manual",
72
- schedule: X.refresh.schedule ? {
73
- cron: X.refresh.schedule.cron,
74
- timezone: X.refresh.schedule.timezone
73
+ let t = {
74
+ name: Z.name || "",
75
+ key: Z.key || "",
76
+ description: Z.description || "",
77
+ ttl: Z.ttl ?? 300,
78
+ refresh: Z.refresh ? {
79
+ type: Z.refresh.type === "scheduled" ? "scheduled" : "manual",
80
+ schedule: Z.refresh.schedule ? {
81
+ cron: Z.refresh.schedule.cron,
82
+ timezone: Z.refresh.schedule.timezone
75
83
  } : void 0
76
84
  } : { type: "manual" },
77
85
  data: e
78
- }), N(!0), Te(!0), j({});
86
+ };
87
+ O(t), A(t), P(!0), Oe(!0), M({});
79
88
  }
80
- }, [X, Z]);
81
- let Ee = s((e) => {
89
+ }, [Z, Q]);
90
+ let ke = a((e) => {
82
91
  let t = e.target.value;
83
- k((e) => ({
92
+ O((e) => ({
84
93
  ...e,
85
94
  name: t,
86
- key: M ? e.key : ge(t)
87
- })), j((e) => ({
95
+ key: N ? e.key : xe(t)
96
+ })), M((e) => ({
88
97
  ...e,
89
98
  name: void 0
90
99
  }));
91
- }, [M]), De = s((e) => {
100
+ }, [N]), Ae = a((e) => {
92
101
  let t = e.target.value.toLowerCase().replace(/[^a-z0-9_]/g, "");
93
- k((e) => ({
102
+ O((e) => ({
94
103
  ...e,
95
104
  key: t
96
- })), N(!0), j((e) => ({
105
+ })), P(!0), M((e) => ({
97
106
  ...e,
98
107
  key: void 0
99
108
  }));
100
- }, []), Oe = s((e) => {
101
- k((t) => ({
109
+ }, []), je = a((e) => {
110
+ O((t) => ({
102
111
  ...t,
103
112
  description: e.target.value
104
113
  }));
105
- }, []), Q = s((e) => {
106
- k((t) => ({
114
+ }, []), Me = a((e) => {
115
+ O((t) => ({
107
116
  ...t,
108
117
  ttl: e || 0
109
118
  }));
110
- }, []), ke = s((e) => {
111
- k((t) => ({
119
+ }, []), Ne = a((e) => {
120
+ O((t) => ({
112
121
  ...t,
113
122
  refresh: e
114
123
  }));
115
- }, []), Ae = s((e) => {
116
- k((t) => ({
124
+ }, []), Pe = a((e) => {
125
+ O((t) => ({
117
126
  ...t,
118
127
  data: e.target.value
119
- })), j((e) => ({
128
+ })), M((e) => ({
120
129
  ...e,
121
130
  data: void 0
122
131
  }));
123
- }, []), je = s(() => {
132
+ }, []), Fe = a(() => {
124
133
  try {
125
- let e = JSON.parse(O.data);
126
- k((t) => ({
134
+ let e = JSON.parse(D.data);
135
+ O((t) => ({
127
136
  ...t,
128
137
  data: JSON.stringify(e, null, 2)
129
- })), j((e) => ({
138
+ })), M((e) => ({
130
139
  ...e,
131
140
  data: void 0
132
141
  }));
133
142
  } catch {
134
- j((e) => ({
143
+ M((e) => ({
135
144
  ...e,
136
- data: E("bigconsole.dataSinks.builder.validation.invalidJson", "Invalid JSON format")
145
+ data: C("bigconsole.dataSinks.builder.validation.invalidJson", "Invalid JSON format")
137
146
  }));
138
147
  }
139
- }, [O.data, E]), Me = s(async () => {
140
- O.key && (await ie(O.key), R(!0), re() && ae(E("bigconsole.dataSinks.builder.toolbar.keyCopied", "Key copied")), setTimeout(() => R(!1), 2e3));
141
- }, [O.key, E]), $ = s(() => {
142
- T("/datasinks");
143
- }, [T]), Ne = s(async () => {
144
- if (!(!D || !X)) {
145
- B(!0), W(null);
148
+ }, [D.data, C]), Ie = a(async () => {
149
+ D.key && (await ie(D.key), z(!0), re() && ae(C("bigconsole.dataSinks.builder.toolbar.keyCopied", "Key copied")), setTimeout(() => z(!1), 2e3));
150
+ }, [D.key, C]), $ = a(() => {
151
+ S("/datasinks");
152
+ }, [S]), Le = a(async () => {
153
+ if (!(!w || !Z)) {
154
+ V(!0), G(null);
146
155
  try {
147
- let e = await Y({ key: X.key });
148
- e?.raw ? H(Array.isArray(e.raw) ? e.raw.slice(0, 20) : [e.raw]) : H([]);
156
+ let e = await X({ key: Z.key });
157
+ e?.raw ? U(Array.isArray(e.raw) ? e.raw.slice(0, 20) : [e.raw]) : U([]);
149
158
  } catch (e) {
150
- W(e instanceof Error ? e.message : E("bigconsole.dataSinks.builder.errors.loadDataFailed", "Failed to load data"));
159
+ G(e instanceof Error ? e.message : C("bigconsole.dataSinks.builder.errors.loadDataFailed", "Failed to load data"));
151
160
  } finally {
152
- B(!1);
161
+ V(!1);
153
162
  }
154
163
  }
155
164
  }, [
156
- D,
165
+ w,
166
+ Z,
157
167
  X,
158
- Y,
159
- E
160
- ]), Pe = s(async (e) => {
161
- e.preventDefault(), L(null);
162
- let n = _e(O, E);
168
+ C
169
+ ]), Re = a(async (e) => {
170
+ e.preventDefault(), R(null);
171
+ let n = Se(D, C);
163
172
  if (Object.keys(n).length > 0) {
164
- j(n);
173
+ M(n);
165
174
  return;
166
175
  }
167
- F(!0);
176
+ I(!0);
168
177
  try {
169
178
  let e = {};
170
- if (O.data && O.data.trim()) try {
171
- e = JSON.parse(O.data);
179
+ if (D.data && D.data.trim()) try {
180
+ e = JSON.parse(D.data);
172
181
  } catch {
173
- j((e) => ({
182
+ M((e) => ({
174
183
  ...e,
175
- data: E("bigconsole.dataSinks.builder.validation.invalidJson", "Invalid JSON format")
176
- })), F(!1);
184
+ data: C("bigconsole.dataSinks.builder.validation.invalidJson", "Invalid JSON format")
185
+ })), I(!1);
177
186
  return;
178
187
  }
179
- if (D && X) {
180
- if (!await J({
181
- id: X.id,
182
- version: X.version,
183
- name: O.name,
184
- description: O.description || void 0,
185
- ttl: O.ttl,
188
+ if (w && Z) {
189
+ if (!await Y({
190
+ id: Z.id,
191
+ version: Z.version,
192
+ name: D.name,
193
+ description: D.description || void 0,
194
+ ttl: D.ttl,
186
195
  refresh: {
187
- type: O.refresh.type,
188
- schedule: O.refresh.schedule
196
+ type: D.refresh.type,
197
+ schedule: D.refresh.schedule
189
198
  },
190
199
  data: e
191
- })) throw Error(E("bigconsole.dataSinks.builder.errors.updateFailed", "Failed to update DataSink"));
192
- } else if (!await q({
193
- key: O.key,
194
- name: O.name,
195
- description: O.description || void 0,
196
- ttl: O.ttl,
200
+ })) throw Error(C("bigconsole.dataSinks.builder.errors.updateFailed", "Failed to update DataSink"));
201
+ } else if (!await J({
202
+ key: D.key,
203
+ name: D.name,
204
+ description: D.description || void 0,
205
+ ttl: D.ttl,
197
206
  refresh: {
198
- type: O.refresh.type,
199
- schedule: O.refresh.schedule
207
+ type: D.refresh.type,
208
+ schedule: D.refresh.schedule
200
209
  },
201
210
  data: e
202
- })) throw Error(E("bigconsole.dataSinks.builder.errors.createFailed", "Failed to create DataSink"));
203
- T("/datasinks");
211
+ })) throw Error(C("bigconsole.dataSinks.builder.errors.createFailed", "Failed to create DataSink"));
212
+ A(D), S("/datasinks");
204
213
  } catch (e) {
205
214
  if (t(e)) return;
206
- L(e instanceof Error ? e.message : E("bigconsole.dataSinks.builder.errors.saveFailed", "Failed to save DataSink"));
215
+ R(e instanceof Error ? e.message : C("bigconsole.dataSinks.builder.errors.saveFailed", "Failed to save DataSink"));
207
216
  } finally {
208
- F(!1);
217
+ I(!1);
209
218
  }
210
219
  }, [
211
- O,
212
220
  D,
213
- X,
214
- q,
221
+ w,
222
+ Z,
215
223
  J,
216
- T,
217
- E
218
- ]), Fe = oe(() => {
219
- let e = O.name.trim().length >= 2, t = O.key.trim().length > 0, n = !0;
220
- if (O.data && O.data.trim()) try {
221
- JSON.parse(O.data);
224
+ Y,
225
+ S,
226
+ C
227
+ ]), ze = le(() => {
228
+ let e = D.name.trim().length >= 2, t = D.key.trim().length > 0, n = !0;
229
+ if (D.data && D.data.trim()) try {
230
+ JSON.parse(D.data);
222
231
  } catch {
223
232
  n = !1;
224
233
  }
225
234
  return e && t && n;
226
235
  }, [
227
- O.name,
228
- O.key,
229
- O.data
236
+ D.name,
237
+ D.key,
238
+ D.data
230
239
  ]);
231
- return Ce && D ? /* @__PURE__ */ C("div", {
240
+ return Ee && w ? /* @__PURE__ */ b("div", {
232
241
  className: "flex min-h-[240px] items-center justify-center p-card-padding",
233
- children: /* @__PURE__ */ C(_, { className: "h-icon-lg w-icon-lg animate-spin text-text-secondary" })
234
- }) : G ? /* @__PURE__ */ C("div", {
242
+ children: /* @__PURE__ */ b(m, { className: "h-icon-lg w-icon-lg animate-spin text-text-secondary" })
243
+ }) : K ? /* @__PURE__ */ b("div", {
235
244
  className: "mx-auto w-full max-w-7xl p-card-padding",
236
- children: /* @__PURE__ */ C(n, {
245
+ children: /* @__PURE__ */ b(n, {
237
246
  tone: "danger",
238
247
  headingLevel: 2,
239
- title: E("bigconsole.dataSinks.builder.errors.loadFailed", "Failed to load DataSink"),
240
- description: G.message,
241
- icon: /* @__PURE__ */ C(u, { className: "h-icon-sm w-icon-sm" }),
242
- actions: /* @__PURE__ */ w(v, {
248
+ title: C("bigconsole.dataSinks.builder.errors.loadFailed", "Failed to load DataSink"),
249
+ description: K.message,
250
+ icon: /* @__PURE__ */ b(c, { className: "h-icon-sm w-icon-sm" }),
251
+ actions: /* @__PURE__ */ x(h, {
243
252
  onClick: $,
244
253
  variant: "secondary",
245
254
  size: "sm",
246
- children: [/* @__PURE__ */ C(d, { className: "w-4 h-4 mr-2" }), E("bigconsole.dataSinks.builder.header.backToDataSinks", "Back to DataSinks")]
255
+ children: [/* @__PURE__ */ b(l, { className: "w-4 h-4 mr-2" }), C("bigconsole.dataSinks.builder.header.backToDataSinks", "Back to DataSinks")]
247
256
  })
248
257
  })
249
- }) : D && !ye && !be ? /* @__PURE__ */ C(ce, {
250
- title: E("bigconsole.dataSinks.builder.accessDenied.title", "Access Denied"),
251
- description: E("bigconsole.dataSinks.builder.accessDenied.description", "You don't have permission to view this data sink.")
252
- }) : /* @__PURE__ */ w("div", {
258
+ }) : w && !Ce && !we ? /* @__PURE__ */ b(de, {
259
+ title: C("bigconsole.dataSinks.builder.accessDenied.title", "Access Denied"),
260
+ description: C("bigconsole.dataSinks.builder.accessDenied.description", "You don't have permission to view this data sink.")
261
+ }) : /* @__PURE__ */ x("div", {
253
262
  className: "mx-auto w-full min-w-0 max-w-7xl p-card-padding",
254
263
  children: [
255
- /* @__PURE__ */ w("header", {
264
+ /* @__PURE__ */ x("header", {
256
265
  className: "mb-form-gap",
257
266
  children: [
258
- /* @__PURE__ */ w(v, {
267
+ /* @__PURE__ */ x(h, {
259
268
  onClick: $,
260
269
  variant: "ghost",
261
270
  size: "sm",
262
271
  className: "mb-4",
263
- children: [/* @__PURE__ */ C(d, { className: "w-4 h-4 mr-2" }), E("bigconsole.dataSinks.builder.header.backToDataSinks", "Back to DataSinks")]
272
+ children: [/* @__PURE__ */ b(l, { className: "w-4 h-4 mr-2" }), C("bigconsole.dataSinks.builder.header.backToDataSinks", "Back to DataSinks")]
264
273
  }),
265
- /* @__PURE__ */ C("h1", {
274
+ /* @__PURE__ */ b("h1", {
266
275
  className: "text-2xl font-bold text-text-primary",
267
- children: D ? E("bigconsole.dataSinks.builder.header.editTitle", "Edit DataSink") : E("bigconsole.dataSinks.builder.header.createTitle", "Create DataSink")
276
+ children: w ? C("bigconsole.dataSinks.builder.header.editTitle", "Edit DataSink") : C("bigconsole.dataSinks.builder.header.createTitle", "Create DataSink")
268
277
  }),
269
- /* @__PURE__ */ C("p", {
278
+ /* @__PURE__ */ b("p", {
270
279
  className: "mt-1 text-sm text-text-secondary",
271
- children: D ? E("bigconsole.dataSinks.builder.header.editSubtitle", "Update the DataSink configuration.") : E("bigconsole.dataSinks.builder.header.createSubtitle", "Create a new DataSink to store and cache data. Use the unique key to connect workflows.")
280
+ children: w ? C("bigconsole.dataSinks.builder.header.editSubtitle", "Update the DataSink configuration.") : C("bigconsole.dataSinks.builder.header.createSubtitle", "Create a new DataSink to store and cache data. Use the unique key to connect workflows.")
272
281
  })
273
282
  ]
274
283
  }),
275
- /* @__PURE__ */ C(me, {
284
+ /* @__PURE__ */ b(ve, {
276
285
  className: "mb-section-gap",
277
- children: E("bigconsole.dataSinks.builder.header.purpose", "A data sink is the named, structured store your dashboards read from. Give it a unique key, configure how long data is cached and how it refreshes, then point a workflow at that key to push data in. Get the basics right here and everything downstream connects to it.")
286
+ children: C("bigconsole.dataSinks.builder.header.purpose", "A data sink is the named, structured store your dashboards read from. Give it a unique key, configure how long data is cached and how it refreshes, then point a workflow at that key to push data in. Get the basics right here and everything downstream connects to it.")
278
287
  }),
279
- I && /* @__PURE__ */ C(n, {
288
+ L && /* @__PURE__ */ b(n, {
280
289
  tone: "danger",
281
290
  headingLevel: 2,
282
- title: E("bigconsole.dataSinks.builder.errors.saveFailed", "Failed to save DataSink"),
283
- description: I,
284
- icon: /* @__PURE__ */ C(u, { className: "h-icon-sm w-icon-sm" }),
291
+ title: C("bigconsole.dataSinks.builder.errors.saveFailed", "Failed to save DataSink"),
292
+ description: L,
293
+ icon: /* @__PURE__ */ b(c, { className: "h-icon-sm w-icon-sm" }),
285
294
  className: "mb-section-gap"
286
295
  }),
287
- /* @__PURE__ */ C("form", {
296
+ /* @__PURE__ */ b("form", {
288
297
  "data-tour": "bigconsole-datasink-builder",
289
- onSubmit: Pe,
290
- children: /* @__PURE__ */ w(ee, { children: [
291
- /* @__PURE__ */ C(n, {
298
+ onSubmit: Re,
299
+ children: /* @__PURE__ */ x(ee, { children: [
300
+ /* @__PURE__ */ b(n, {
292
301
  emphasis: "primary",
293
302
  headingLevel: 2,
294
- title: E("bigconsole.dataSinks.builder.basicInfo.title", "Basic Information"),
295
- description: E("bigconsole.dataSinks.builder.basicInfo.subtitle", "Essential details for your DataSink"),
296
- icon: /* @__PURE__ */ C(m, { className: "h-icon-sm w-icon-sm" }),
303
+ title: C("bigconsole.dataSinks.builder.basicInfo.title", "Basic Information"),
304
+ description: C("bigconsole.dataSinks.builder.basicInfo.subtitle", "Essential details for your DataSink"),
305
+ icon: /* @__PURE__ */ b(f, { className: "h-icon-sm w-icon-sm" }),
297
306
  bodyClassName: "grid gap-form-gap md:grid-cols-2",
298
- children: /* @__PURE__ */ w(S, { children: [
299
- /* @__PURE__ */ w("div", {
307
+ children: /* @__PURE__ */ x(y, { children: [
308
+ /* @__PURE__ */ x("div", {
300
309
  className: "space-y-2",
301
310
  children: [
302
- /* @__PURE__ */ w(b, {
311
+ /* @__PURE__ */ x(_, {
303
312
  htmlFor: "name",
304
313
  children: [
305
- E("bigconsole.dataSinks.builder.basicInfo.nameLabel", "Name"),
314
+ C("bigconsole.dataSinks.builder.basicInfo.nameLabel", "Name"),
306
315
  " ",
307
- /* @__PURE__ */ C("span", {
316
+ /* @__PURE__ */ b("span", {
308
317
  className: "text-status-error-text",
309
318
  children: "*"
310
319
  })
311
320
  ]
312
321
  }),
313
- /* @__PURE__ */ C(y, {
322
+ /* @__PURE__ */ b(g, {
314
323
  id: "name",
315
324
  type: "text",
316
- value: O.name,
317
- onChange: Ee,
318
- placeholder: E("bigconsole.dataSinks.builder.basicInfo.namePlaceholder", "e.g., Sales Metrics"),
319
- className: A.name ? "border-status-error-border" : ""
325
+ value: D.name,
326
+ onChange: ke,
327
+ placeholder: C("bigconsole.dataSinks.builder.basicInfo.namePlaceholder", "e.g., Sales Metrics"),
328
+ className: j.name ? "border-status-error-border" : ""
320
329
  }),
321
- A.name && /* @__PURE__ */ C("p", {
330
+ j.name && /* @__PURE__ */ b("p", {
322
331
  className: "text-xs text-status-error-text",
323
- children: A.name
332
+ children: j.name
324
333
  })
325
334
  ]
326
335
  }),
327
- /* @__PURE__ */ w("div", {
336
+ /* @__PURE__ */ x("div", {
328
337
  className: "space-y-2",
329
338
  children: [
330
- /* @__PURE__ */ w(b, {
339
+ /* @__PURE__ */ x(_, {
331
340
  htmlFor: "key",
332
341
  children: [
333
- E("bigconsole.dataSinks.builder.basicInfo.keyLabel", "Unique Key"),
342
+ C("bigconsole.dataSinks.builder.basicInfo.keyLabel", "Unique Key"),
334
343
  " ",
335
- /* @__PURE__ */ C("span", {
344
+ /* @__PURE__ */ b("span", {
336
345
  className: "text-status-error-text",
337
346
  children: "*"
338
347
  })
339
348
  ]
340
349
  }),
341
- /* @__PURE__ */ w("div", {
350
+ /* @__PURE__ */ x("div", {
342
351
  className: "flex gap-2",
343
- children: [/* @__PURE__ */ C(y, {
352
+ children: [/* @__PURE__ */ b(g, {
344
353
  id: "key",
345
354
  type: "text",
346
- value: O.key,
347
- onChange: De,
348
- placeholder: E("bigconsole.dataSinks.builder.basicInfo.keyPlaceholder", "sales_metrics"),
349
- disabled: D,
350
- className: `font-mono flex-1 ${A.key ? "border-status-error-border" : ""}`
351
- }), O.key && /* @__PURE__ */ C(v, {
355
+ value: D.key,
356
+ onChange: Ae,
357
+ placeholder: C("bigconsole.dataSinks.builder.basicInfo.keyPlaceholder", "sales_metrics"),
358
+ disabled: w,
359
+ className: `font-mono flex-1 ${j.key ? "border-status-error-border" : ""}`
360
+ }), D.key && /* @__PURE__ */ b(h, {
352
361
  type: "button",
353
- onClick: Me,
354
- "aria-label": E("bigconsole.dataSinks.builder.basicInfo.copyKey", "Copy unique key"),
362
+ onClick: Ie,
363
+ "aria-label": C("bigconsole.dataSinks.builder.basicInfo.copyKey", "Copy unique key"),
355
364
  variant: "outline",
356
365
  size: "sm",
357
366
  className: "px-3",
358
- children: Se ? /* @__PURE__ */ C(f, { className: "w-4 h-4 text-status-success-text" }) : /* @__PURE__ */ C(p, { className: "w-4 h-4" })
367
+ children: Te ? /* @__PURE__ */ b(u, { className: "w-4 h-4 text-status-success-text" }) : /* @__PURE__ */ b(d, { className: "w-4 h-4" })
359
368
  })]
360
369
  }),
361
- A.key && /* @__PURE__ */ C("p", {
370
+ j.key && /* @__PURE__ */ b("p", {
362
371
  className: "text-xs text-status-error-text",
363
- children: A.key
372
+ children: j.key
364
373
  }),
365
- /* @__PURE__ */ C("p", {
374
+ /* @__PURE__ */ b("p", {
366
375
  className: "text-xs text-text-muted",
367
- children: D ? E("bigconsole.dataSinks.builder.basicInfo.keyHelpEdit", "Key cannot be changed. Use this key in your workflows to push data.") : E("bigconsole.dataSinks.builder.basicInfo.keyHelpCreate", "Auto-generated from name. This key will be used by workflows to push data.")
376
+ children: w ? C("bigconsole.dataSinks.builder.basicInfo.keyHelpEdit", "Key cannot be changed. Use this key in your workflows to push data.") : C("bigconsole.dataSinks.builder.basicInfo.keyHelpCreate", "Auto-generated from name. This key will be used by workflows to push data.")
368
377
  })
369
378
  ]
370
379
  }),
371
- /* @__PURE__ */ w("div", {
380
+ /* @__PURE__ */ x("div", {
372
381
  className: "space-y-2 md:col-span-2",
373
- children: [/* @__PURE__ */ C(b, {
382
+ children: [/* @__PURE__ */ b(_, {
374
383
  htmlFor: "description",
375
- children: E("bigconsole.dataSinks.builder.basicInfo.descriptionLabel", "Description")
376
- }), /* @__PURE__ */ C(x, {
384
+ children: C("bigconsole.dataSinks.builder.basicInfo.descriptionLabel", "Description")
385
+ }), /* @__PURE__ */ b(v, {
377
386
  id: "description",
378
- value: O.description,
379
- onChange: Oe,
380
- placeholder: E("bigconsole.dataSinks.builder.basicInfo.descriptionPlaceholder", "Describe what data this sink stores..."),
387
+ value: D.description,
388
+ onChange: je,
389
+ placeholder: C("bigconsole.dataSinks.builder.basicInfo.descriptionPlaceholder", "Describe what data this sink stores..."),
381
390
  rows: 2,
382
391
  className: "resize-none"
383
392
  })]
384
393
  })
385
394
  ] })
386
395
  }),
387
- /* @__PURE__ */ C(n, {
396
+ /* @__PURE__ */ b(n, {
388
397
  headingLevel: 2,
389
- title: E("bigconsole.dataSinks.builder.config.title", "Configuration"),
390
- description: E("bigconsole.dataSinks.builder.config.subtitle", "Cache and refresh settings"),
391
- icon: /* @__PURE__ */ C(fe, { className: "h-icon-sm w-icon-sm" }),
398
+ title: C("bigconsole.dataSinks.builder.config.title", "Configuration"),
399
+ description: C("bigconsole.dataSinks.builder.config.subtitle", "Cache and refresh settings"),
400
+ icon: /* @__PURE__ */ b(ge, { className: "h-icon-sm w-icon-sm" }),
392
401
  bodyClassName: "grid gap-form-gap md:grid-cols-2",
393
- children: /* @__PURE__ */ w(S, { children: [/* @__PURE__ */ w("div", {
402
+ children: /* @__PURE__ */ x(y, { children: [/* @__PURE__ */ x("div", {
394
403
  className: "space-y-2",
395
404
  children: [
396
- /* @__PURE__ */ C(b, { children: E("bigconsole.dataSinks.builder.config.cacheDurationLabel", "Cache Duration") }),
397
- /* @__PURE__ */ C(i, {
398
- value: O.ttl,
399
- onChange: Q,
405
+ /* @__PURE__ */ b(_, { children: C("bigconsole.dataSinks.builder.config.cacheDurationLabel", "Cache Duration") }),
406
+ /* @__PURE__ */ b(oe, {
407
+ value: D.ttl,
408
+ onChange: Me,
400
409
  hideLabel: !0
401
410
  }),
402
- /* @__PURE__ */ C("p", {
411
+ /* @__PURE__ */ b("p", {
403
412
  className: "text-xs text-text-muted",
404
- children: E("bigconsole.dataSinks.builder.config.cacheDurationHelp", "How long cached data remains valid before requiring refresh.")
413
+ children: C("bigconsole.dataSinks.builder.config.cacheDurationHelp", "How long cached data remains valid before requiring refresh.")
405
414
  })
406
415
  ]
407
- }), /* @__PURE__ */ C(a, {
408
- value: O.refresh,
409
- onChange: ke
416
+ }), /* @__PURE__ */ b(se, {
417
+ value: D.refresh,
418
+ onChange: Ne
410
419
  })] })
411
420
  }),
412
- /* @__PURE__ */ C(n, {
421
+ /* @__PURE__ */ b(n, {
413
422
  headingLevel: 2,
414
- title: E("bigconsole.dataSinks.builder.dataPayload.title", "Data Payload"),
415
- description: D ? E("bigconsole.dataSinks.builder.dataPayload.subtitleEdit", "Edit the JSON data stored in this DataSink") : E("bigconsole.dataSinks.builder.dataPayload.subtitleCreate", "Optional initial data (JSON format)"),
416
- icon: /* @__PURE__ */ C(m, { className: "h-icon-sm w-icon-sm" }),
417
- actions: /* @__PURE__ */ C(v, {
423
+ title: C("bigconsole.dataSinks.builder.dataPayload.title", "Data Payload"),
424
+ description: w ? C("bigconsole.dataSinks.builder.dataPayload.subtitleEdit", "Edit the JSON data stored in this DataSink") : C("bigconsole.dataSinks.builder.dataPayload.subtitleCreate", "Optional initial data (JSON format)"),
425
+ icon: /* @__PURE__ */ b(f, { className: "h-icon-sm w-icon-sm" }),
426
+ actions: /* @__PURE__ */ b(h, {
418
427
  type: "button",
419
- onClick: je,
428
+ onClick: Fe,
420
429
  variant: "outline",
421
430
  size: "sm",
422
- children: E("bigconsole.dataSinks.builder.dataPayload.formatJson", "Format JSON")
431
+ children: C("bigconsole.dataSinks.builder.dataPayload.formatJson", "Format JSON")
423
432
  }),
424
433
  bodyClassName: "space-y-2",
425
- children: /* @__PURE__ */ w(S, { children: [
426
- /* @__PURE__ */ C(x, {
427
- "aria-label": E("bigconsole.dataSinks.builder.dataPayload.title", "Data Payload"),
428
- value: O.data,
429
- onChange: Ae,
430
- placeholder: E("bigconsole.dataSinks.builder.dataPayload.dataPlaceholder", "{\"key\": \"value\"}"),
434
+ children: /* @__PURE__ */ x(y, { children: [
435
+ /* @__PURE__ */ b(v, {
436
+ "aria-label": C("bigconsole.dataSinks.builder.dataPayload.title", "Data Payload"),
437
+ value: D.data,
438
+ onChange: Pe,
439
+ placeholder: C("bigconsole.dataSinks.builder.dataPayload.dataPlaceholder", "{\"key\": \"value\"}"),
431
440
  rows: 10,
432
- className: `resize-y font-mono text-xs ${A.data ? "border-status-error-border" : ""}`
441
+ className: `resize-y font-mono text-xs ${j.data ? "border-status-error-border" : ""}`
433
442
  }),
434
- A.data && /* @__PURE__ */ C("p", {
443
+ j.data && /* @__PURE__ */ b("p", {
435
444
  className: "text-xs text-status-error-text",
436
- children: A.data
445
+ children: j.data
437
446
  }),
438
- /* @__PURE__ */ C("p", {
447
+ /* @__PURE__ */ b("p", {
439
448
  className: "text-xs text-text-muted",
440
- children: E("bigconsole.dataSinks.builder.dataPayload.help", "Enter valid JSON data. This data will be stored and can be accessed by widgets via parsers.")
449
+ children: C("bigconsole.dataSinks.builder.dataPayload.help", "Enter valid JSON data. This data will be stored and can be accessed by widgets via parsers.")
441
450
  })
442
451
  ] })
443
452
  }),
444
- D && X && /* @__PURE__ */ C(n, {
453
+ w && Z && /* @__PURE__ */ b(n, {
445
454
  emphasis: "muted",
446
455
  headingLevel: 2,
447
- title: E("bigconsole.dataSinks.builder.preview.title", "Data Preview"),
448
- description: E("bigconsole.dataSinks.builder.preview.subtitle", "Preview the first 20 records"),
449
- icon: /* @__PURE__ */ C(h, { className: "h-icon-sm w-icon-sm" }),
450
- actions: /* @__PURE__ */ C(v, {
456
+ title: C("bigconsole.dataSinks.builder.preview.title", "Data Preview"),
457
+ description: C("bigconsole.dataSinks.builder.preview.subtitle", "Preview the first 20 records"),
458
+ icon: /* @__PURE__ */ b(p, { className: "h-icon-sm w-icon-sm" }),
459
+ actions: /* @__PURE__ */ b(h, {
451
460
  type: "button",
452
- onClick: Ne,
461
+ onClick: Le,
453
462
  variant: "outline",
454
463
  size: "sm",
455
- disabled: z,
456
- children: z ? /* @__PURE__ */ w(S, { children: [/* @__PURE__ */ C(_, { className: "w-4 h-4 mr-2 animate-spin" }), E("bigconsole.dataSinks.builder.preview.loading", "Loading...")] }) : /* @__PURE__ */ w(S, { children: [/* @__PURE__ */ C(h, { className: "w-4 h-4 mr-2" }), E("bigconsole.dataSinks.builder.preview.showData", "Show Data")] })
464
+ disabled: B,
465
+ children: B ? /* @__PURE__ */ x(y, { children: [/* @__PURE__ */ b(m, { className: "w-4 h-4 mr-2 animate-spin" }), C("bigconsole.dataSinks.builder.preview.loading", "Loading...")] }) : /* @__PURE__ */ x(y, { children: [/* @__PURE__ */ b(p, { className: "w-4 h-4 mr-2" }), C("bigconsole.dataSinks.builder.preview.showData", "Show Data")] })
457
466
  }),
458
- children: U ? /* @__PURE__ */ C(n, {
467
+ children: W ? /* @__PURE__ */ b(n, {
459
468
  tone: "danger",
460
469
  padding: "compact",
461
470
  headingLevel: 3,
462
471
  title: "Could not load the preview",
463
- children: /* @__PURE__ */ C("p", {
472
+ children: /* @__PURE__ */ b("p", {
464
473
  className: "text-sm text-status-error-text",
465
- children: U
474
+ children: W
466
475
  })
467
- }) : V && V.length > 0 ? /* @__PURE__ */ C("pre", {
476
+ }) : H && H.length > 0 ? /* @__PURE__ */ b("pre", {
468
477
  className: "max-h-[300px] min-w-0 overflow-auto rounded-input bg-bg-surface p-3 font-mono text-xs",
469
- children: JSON.stringify(V, null, 2)
470
- }) : V ? /* @__PURE__ */ C(pe, {
478
+ children: JSON.stringify(H, null, 2)
479
+ }) : H ? /* @__PURE__ */ b(_e, {
471
480
  illustration: "empty-generic",
472
- title: E("bigconsole.dataSinks.builder.preview.emptyTitle", "No data available yet"),
473
- description: E("bigconsole.dataSinks.builder.preview.emptyDescription", "Connect a workflow to this sink's key to start pushing data.")
474
- }) : /* @__PURE__ */ C("p", {
481
+ title: C("bigconsole.dataSinks.builder.preview.emptyTitle", "No data available yet"),
482
+ description: C("bigconsole.dataSinks.builder.preview.emptyDescription", "Connect a workflow to this sink's key to start pushing data.")
483
+ }) : /* @__PURE__ */ b("p", {
475
484
  className: "text-sm text-text-secondary",
476
485
  children: "Select \"Show data\" to load the records this sink currently holds."
477
486
  })
478
487
  }),
479
- !D && /* @__PURE__ */ C(n, {
488
+ !w && /* @__PURE__ */ b(n, {
480
489
  tone: "info",
481
490
  emphasis: "muted",
482
491
  headingLevel: 2,
483
- title: E("bigconsole.dataSinks.builder.whatsNext.title", "What's Next?"),
484
- icon: /* @__PURE__ */ C(g, { className: "h-icon-sm w-icon-sm" }),
485
- children: /* @__PURE__ */ w("ol", {
492
+ title: C("bigconsole.dataSinks.builder.whatsNext.title", "What's Next?"),
493
+ icon: /* @__PURE__ */ b(me, { className: "h-icon-sm w-icon-sm" }),
494
+ children: /* @__PURE__ */ x("ol", {
486
495
  className: "list-inside list-decimal space-y-1 text-xs text-text-secondary",
487
496
  children: [
488
- /* @__PURE__ */ C("li", { children: E("bigconsole.dataSinks.builder.whatsNext.step1", "Create this DataSink to get your unique key") }),
489
- /* @__PURE__ */ w("li", { children: [
490
- E("bigconsole.dataSinks.builder.whatsNext.step2Prefix", "Go to"),
497
+ /* @__PURE__ */ b("li", { children: C("bigconsole.dataSinks.builder.whatsNext.step1", "Create this DataSink to get your unique key") }),
498
+ /* @__PURE__ */ x("li", { children: [
499
+ C("bigconsole.dataSinks.builder.whatsNext.step2Prefix", "Go to"),
491
500
  " ",
492
- /* @__PURE__ */ C("strong", { children: E("bigconsole.dataSinks.builder.whatsNext.workflows", "Workflows") }),
501
+ /* @__PURE__ */ b("strong", { children: C("bigconsole.dataSinks.builder.whatsNext.workflows", "Workflows") }),
493
502
  " ",
494
- E("bigconsole.dataSinks.builder.whatsNext.step2Suffix", "and create a FluidGrids workflow")
503
+ C("bigconsole.dataSinks.builder.whatsNext.step2Suffix", "and create a FluidGrids workflow")
495
504
  ] }),
496
- /* @__PURE__ */ C("li", { children: E("bigconsole.dataSinks.builder.whatsNext.step3", "Use the unique key in your workflow to push data to this DataSink") }),
497
- /* @__PURE__ */ w("li", { children: [
498
- E("bigconsole.dataSinks.builder.whatsNext.step4Prefix", "Create"),
505
+ /* @__PURE__ */ b("li", { children: C("bigconsole.dataSinks.builder.whatsNext.step3", "Use the unique key in your workflow to push data to this DataSink") }),
506
+ /* @__PURE__ */ x("li", { children: [
507
+ C("bigconsole.dataSinks.builder.whatsNext.step4Prefix", "Create"),
499
508
  " ",
500
- /* @__PURE__ */ C("strong", { children: E("bigconsole.dataSinks.builder.whatsNext.parsers", "Parsers") }),
509
+ /* @__PURE__ */ b("strong", { children: C("bigconsole.dataSinks.builder.whatsNext.parsers", "Parsers") }),
501
510
  " ",
502
- E("bigconsole.dataSinks.builder.whatsNext.step4Suffix", "to transform the data using JQ or JSONata")
511
+ C("bigconsole.dataSinks.builder.whatsNext.step4Suffix", "to transform the data using JQ or JSONata")
503
512
  ] })
504
513
  ]
505
514
  })
506
515
  }),
507
- /* @__PURE__ */ w(n, {
516
+ /* @__PURE__ */ x(n, {
508
517
  emphasis: "bare",
509
518
  padding: "none",
510
519
  "aria-label": "Save or discard this data sink",
511
520
  className: "border-t border-[var(--color-border-subtle)] pt-form-gap",
512
521
  bodyClassName: "flex flex-wrap items-center justify-end gap-control-gap",
513
- children: [/* @__PURE__ */ C(v, {
522
+ children: [/* @__PURE__ */ b(h, {
514
523
  type: "button",
515
524
  onClick: $,
516
525
  variant: "secondary",
517
- children: E("bigconsole.dataSinks.builder.actions.cancel", "Cancel")
518
- }), /* @__PURE__ */ C(le, {
519
- permission: xe,
526
+ children: C("bigconsole.dataSinks.builder.actions.cancel", "Cancel")
527
+ }), /* @__PURE__ */ b(fe, {
528
+ permission: E,
520
529
  deniedBehavior: "disable",
521
- children: /* @__PURE__ */ C(v, {
530
+ children: /* @__PURE__ */ b(h, {
522
531
  type: "submit",
523
- disabled: !Fe || P,
532
+ disabled: !ze || F,
524
533
  variant: "default",
525
- children: P ? /* @__PURE__ */ w(S, { children: [/* @__PURE__ */ C(_, { className: "w-4 h-4 mr-2 animate-spin" }), E("bigconsole.dataSinks.builder.actions.saving", "Saving...")] }) : /* @__PURE__ */ w(S, { children: [/* @__PURE__ */ C(de, { className: "w-4 h-4 mr-2" }), D ? E("bigconsole.dataSinks.builder.actions.saveChanges", "Save Changes") : E("bigconsole.dataSinks.builder.actions.create", "Create DataSink")] })
534
+ children: F ? /* @__PURE__ */ x(y, { children: [/* @__PURE__ */ b(m, { className: "w-4 h-4 mr-2 animate-spin" }), C("bigconsole.dataSinks.builder.actions.saving", "Saving...")] }) : /* @__PURE__ */ x(y, { children: [/* @__PURE__ */ b(he, { className: "w-4 h-4 mr-2" }), w ? C("bigconsole.dataSinks.builder.actions.saveChanges", "Save Changes") : C("bigconsole.dataSinks.builder.actions.create", "Create DataSink")] })
526
535
  })
527
536
  })]
528
537
  })
@@ -532,6 +541,6 @@ var T = o(function() {
532
541
  });
533
542
  });
534
543
  //#endregion
535
- export { T as DataSinkBuilderPage, T as default };
544
+ export { S as DataSinkBuilderPage, S as default };
536
545
 
537
546
  //# sourceMappingURL=DataSinkBuilderPage.js.map