@burdenoff/microfe-bigconsole 2026.1012.4 → 2026.1012.5

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