@burdenoff/microfe-bigconsole 2026.1012.4 → 2026.1012.6

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 (130) 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/AiPreviewContent.js +0 -1
  50. package/dist/bigconsole/components/preview/AiPreviewMiniPanel.js +77 -76
  51. package/dist/bigconsole/components/preview/AiPreviewPanel.js +96 -95
  52. package/dist/bigconsole/components/widgets/ActionConfigDialog.js +4 -4
  53. package/dist/bigconsole/components/widgets/DrilldownConfigPanel.js +93 -93
  54. package/dist/bigconsole/components/widgets/PropertiesPanel.js +507 -499
  55. package/dist/bigconsole/components/widgets/advanced/AdvancedWidgetConfig.js +14 -14
  56. package/dist/bigconsole/components/widgets/advanced/AdvancedWidgets.js +68 -67
  57. package/dist/bigconsole/components/widgets/advanced/boxPlotDescription.d.ts +7 -0
  58. package/dist/bigconsole/components/widgets/advanced/boxPlotDescription.js +12 -0
  59. package/dist/bigconsole/components/widgets/calendar/CalendarWidget.js +4 -4
  60. package/dist/bigconsole/components/widgets/chart/ChartConfig.js +48 -48
  61. package/dist/bigconsole/components/widgets/comments/WidgetComments.js +46 -46
  62. package/dist/bigconsole/components/widgets/event-logs/EventLogViewer.js +61 -61
  63. package/dist/bigconsole/components/widgets/form/FormWidget.js +36 -36
  64. package/dist/bigconsole/components/widgets/gauge/GaugeConfig.js +42 -42
  65. package/dist/bigconsole/components/widgets/heatmap/HeatmapConfig.js +25 -25
  66. package/dist/bigconsole/components/widgets/kanban/KanbanWidget.js +4 -4
  67. package/dist/bigconsole/components/widgets/list/ListConfig.js +30 -30
  68. package/dist/bigconsole/components/widgets/metric-card/MetricCardConfig.js +38 -38
  69. package/dist/bigconsole/components/widgets/metric-card/SparklineChart.js +9 -9
  70. package/dist/bigconsole/components/widgets/metric-card/TrendIndicator.js +9 -9
  71. package/dist/bigconsole/components/widgets/pivot-table/PivotTableWidget.js +49 -49
  72. package/dist/bigconsole/components/widgets/progress/ProgressConfig.js +39 -39
  73. package/dist/bigconsole/components/widgets/table/TableConfig.js +73 -73
  74. package/dist/bigconsole/components/widgets/webhook-config/WebhookConfigPanel.js +64 -64
  75. package/dist/bigconsole/components/workflow/WorkflowOpenGuard.js +15 -15
  76. package/dist/bigconsole/components/workflow/WorkflowSinkLinkForm.js +15 -15
  77. package/dist/bigconsole/constants/backendErrors.js +94 -0
  78. package/dist/bigconsole/customWidget/CustomWidgetBuilderSheet.js +10 -10
  79. package/dist/bigconsole/customWidget/CustomWidgetProposalPanel.js +67 -67
  80. package/dist/bigconsole/hooks/useDashboardLayoutBaseline.d.ts +14 -0
  81. package/dist/bigconsole/hooks/useDashboardLayoutBaseline.js +32 -0
  82. package/dist/bigconsole/hooks/useDataSinkAlerts.d.ts +23 -0
  83. package/dist/bigconsole/hooks/useDataSinkAlerts.js +138 -113
  84. package/dist/bigconsole/hooks/useDrilldown.js +3 -3
  85. package/dist/bigconsole/hooks/useGlobalFilters.js +3 -3
  86. package/dist/bigconsole/pages/AdminPage.js +130 -130
  87. package/dist/bigconsole/pages/DashboardBuilderPage.js +72 -60
  88. package/dist/bigconsole/pages/DashboardViewPage.js +244 -221
  89. package/dist/bigconsole/pages/DashboardsPage.js +269 -221
  90. package/dist/bigconsole/pages/DataParsersPage.js +180 -157
  91. package/dist/bigconsole/pages/DataSinkAlertsPage.js +62 -55
  92. package/dist/bigconsole/pages/DataSinkBuilderPage.js +252 -234
  93. package/dist/bigconsole/pages/DataSinkViewPage.js +1 -1
  94. package/dist/bigconsole/pages/DataSinksPage.js +335 -299
  95. package/dist/bigconsole/pages/DataSourcesPage.js +5 -5
  96. package/dist/bigconsole/pages/InsightsPage.js +279 -265
  97. package/dist/bigconsole/pages/OverviewPage.js +47 -47
  98. package/dist/bigconsole/pages/ParserBuilderPage.js +229 -213
  99. package/dist/bigconsole/pages/ParserViewPage.js +97 -97
  100. package/dist/bigconsole/pages/PipelineBuilderPage.js +256 -214
  101. package/dist/bigconsole/pages/PipelineViewPage.js +146 -146
  102. package/dist/bigconsole/pages/PipelinesPage.js +107 -88
  103. package/dist/bigconsole/pages/SettingsPage.js +179 -173
  104. package/dist/bigconsole/pages/WidgetDemoPage.js +42 -42
  105. package/dist/bigconsole/pages/WorkflowViewPage.js +1 -1
  106. package/dist/bigconsole/pages/WorkflowsPage.js +141 -141
  107. package/dist/bigconsole/providers/BigConsoleQuotaProvider.js +12 -12
  108. package/dist/bigconsole/renderers/adapters/AdaptiveCardRenderer.js +34 -34
  109. package/dist/bigconsole/renderers/adapters/BlockKitRenderer.js +69 -69
  110. package/dist/bigconsole/renderers/adapters/CustomRenderer.js +46 -46
  111. package/dist/bigconsole/store/widgetStore.d.ts +12 -0
  112. package/dist/bigconsole/store/widgetStore.js +3 -1
  113. package/dist/bigconsole/utils/backendError.d.ts +18 -0
  114. package/dist/bigconsole/utils/backendError.js +42 -0
  115. package/dist/bigconsole/utils/dashboardList.d.ts +28 -0
  116. package/dist/bigconsole/utils/dashboardList.js +15 -0
  117. package/dist/bigconsole/utils/dataSinkList.d.ts +15 -0
  118. package/dist/bigconsole/utils/dataSinkList.js +15 -0
  119. package/dist/bigconsole/utils/formDirty.d.ts +82 -0
  120. package/dist/bigconsole/utils/formDirty.js +21 -0
  121. package/dist/bigconsole/utils/insightsDraft.d.ts +29 -0
  122. package/dist/bigconsole/utils/insightsDraft.js +8 -0
  123. package/dist/bigconsole/utils/layoutBaseline.d.ts +130 -0
  124. package/dist/bigconsole/utils/layoutBaseline.js +96 -0
  125. package/dist/bigconsole/utils/listSort.d.ts +80 -0
  126. package/dist/bigconsole/utils/listSort.js +85 -0
  127. package/dist/bigconsole/utils/widgetFormDirty.d.ts +16 -0
  128. package/dist/bigconsole/utils/widgetFormDirty.js +13 -0
  129. package/dist/bigconsole/workflowOpen.js +15 -14
  130. package/package.json +3 -3
@@ -6,27 +6,29 @@ import ee from "../hooks/useDashboardOperations.js";
6
6
  import te from "../hooks/useDataSinkOperations.js";
7
7
  import ne from "../hooks/useParserOperations.js";
8
8
  import { BIGCONSOLE_PERMISSIONS as r } from "../../constants/permissions.js";
9
- import re from "../components/datasink/CacheTTLSelector.js";
10
- import { memo as i, useCallback as a, useEffect as o, useMemo as s, useRef as ie, useState as c } from "react";
11
- import { useParams as ae } from "react-router";
12
- import { AccessDenied as oe, PermissionButton as se } from "@burdenoff/fe-libs/shared/components";
13
- import { usePermissions as ce } from "@burdenoff/fe-libs/shared/providers/shell";
14
- import { AlertCircle as l, ArrowLeft as le, CheckCircle2 as ue, ChevronDown as de, ChevronRight as fe, Code as pe, Download as me, Eye as he, FileCode2 as ge, LayoutDashboard as _e, Loader2 as u, Play as ve, Save as ye, Settings as be, X as xe } from "lucide-react";
15
- import { Button as d, PagePurpose as Se, Stepper as Ce } from "@burdenoff/fe-libs/ui";
9
+ import { isDirty as re, shouldReseedForm as ie } from "../utils/formDirty.js";
10
+ import ae from "../components/datasink/CacheTTLSelector.js";
11
+ import { memo as i, useCallback as a, useEffect as o, useMemo as s, useRef as c, useState as l } from "react";
12
+ import { useParams as oe } from "react-router";
13
+ import { AccessDenied as se, PermissionButton as ce } from "@burdenoff/fe-libs/shared/components";
14
+ import { usePermissions as le } from "@burdenoff/fe-libs/shared/providers/shell";
15
+ import { AlertCircle as ue, ArrowLeft as de, CheckCircle2 as fe, ChevronDown as pe, ChevronRight as me, Code as he, Download as ge, Eye as _e, FileCode2 as ve, LayoutDashboard as ye, Loader2 as u, Play as be, Save as xe, Settings as Se, X as Ce } from "lucide-react";
16
+ import { Button as d, PagePurpose as we, Stepper as Te } from "@burdenoff/fe-libs/ui";
17
+ import { useUnsavedChanges as Ee } from "@burdenoff/fe-libs/shared/hooks";
18
+ import { useI18n as De } from "@burdenoff/fe-libs/shared/providers/shell/I18nProvider";
16
19
  import { Fragment as f, jsx as p, jsxs as m } from "react/jsx-runtime";
17
- import { useI18n as we } from "@burdenoff/fe-libs/shared/providers/shell/I18nProvider";
18
20
  //#region src/bigconsole/pages/ParserBuilderPage.tsx
19
21
  var h = "w-full min-w-0 min-h-control-md rounded-md border bg-bg-surface px-3 py-2.5 text-sm text-text-primary placeholder:text-text-muted focus:outline-none focus:ring-2 focus:ring-action-primary-bg motion-safe:transition-colors disabled:bg-bg-sunken disabled:cursor-not-allowed disabled:opacity-60";
20
22
  function g(e = !1, t = "") {
21
23
  return `${h} ${e ? "border-status-error-border" : "border-[var(--color-border-default)]"} ${t}`.trim();
22
24
  }
23
- var _ = "block text-sm font-medium text-text-primary mb-2", v = "text-xs text-text-muted mt-1.5", y = 25, Te = "default", Ee = [
25
+ var _ = "block text-sm font-medium text-text-primary mb-2", v = "text-xs text-text-muted mt-1.5", y = 25, Oe = "default", ke = [
24
26
  "details",
25
27
  "source",
26
28
  "expression",
27
29
  "review"
28
30
  ];
29
- function De(e) {
31
+ function Ae(e) {
30
32
  return [
31
33
  {
32
34
  key: "details",
@@ -50,14 +52,14 @@ function De(e) {
50
52
  }
51
53
  ];
52
54
  }
53
- function Oe(e) {
55
+ function je(e) {
54
56
  return e.toLowerCase().replace(/[^a-z0-9]+/g, "_").replace(/^_+|_+$/g, "").substring(0, 64);
55
57
  }
56
- function ke(e, t) {
58
+ function Me(e, t) {
57
59
  let n = {};
58
60
  return e.name.trim() ? e.name.length < 2 && (n.name = t("bigconsole.parsers.builder.validation.nameMinLength", "Name must be at least 2 characters")) : n.name = t("bigconsole.parsers.builder.validation.nameRequired", "Name is required"), e.outputKey.trim() ? /^[a-z0-9_]+$/.test(e.outputKey) || (n.outputKey = t("bigconsole.parsers.builder.validation.outputKeyInvalid", "Output key can only contain lowercase letters, numbers, and underscores")) : n.outputKey = t("bigconsole.parsers.builder.validation.outputKeyRequired", "Output key is required"), e.expression.trim() || (n.expression = t("bigconsole.parsers.builder.validation.expressionRequired", "Expression is required")), e.inputSinkKey.trim() || (n.inputSinkKey = t("bigconsole.parsers.builder.validation.inputSinkRequired", "Source DataSink is required")), e.ttl != null && e.ttl > 0 && (e.ttl < 30 || e.ttl > 86400) && (n.ttl = t("bigconsole.parsers.builder.validation.cacheDurationRange", "Cache duration must be between 30 and 86400 seconds")), n;
59
61
  }
60
- function Ae(e) {
62
+ function Ne(e) {
61
63
  return {
62
64
  jq: {
63
65
  name: e("bigconsole.parsers.builder.parserType.jq.name", "JQ"),
@@ -74,7 +76,7 @@ function Ae(e) {
74
76
  };
75
77
  }
76
78
  var b = i(function() {
77
- let { parserId: i, consoleId: h } = ae(), b = e(), { t: x } = we(), je = s(() => De(x), [x]), S = s(() => Ae(x), [x]), C = je.length, [w, T] = c(0), [E, Me] = c(Te), Ne = h || E || Te, D = i !== "new" && !!i, { hasPermission: Pe, isLoading: Fe } = ce(), Ie = Pe(r.PARSER_READ), Le = Pe(D ? r.PARSER_UPDATE : r.PARSER_CREATE), Re = D ? r.PARSER_UPDATE : r.PARSER_CREATE, O = !h, [k, A] = c({
79
+ let { parserId: i, consoleId: h } = oe(), b = e(), { t: x } = De(), Pe = s(() => Ae(x), [x]), S = s(() => Ne(x), [x]), C = Pe.length, [w, T] = l(0), [E, Fe] = l(Oe), Ie = h || E || Oe, D = i !== "new" && !!i, { hasPermission: Le, isLoading: Re } = le(), ze = Le(r.PARSER_READ), Be = Le(D ? r.PARSER_UPDATE : r.PARSER_CREATE), Ve = D ? r.PARSER_UPDATE : r.PARSER_CREATE, O = !h, [k, A] = l({
78
80
  name: "",
79
81
  outputKey: "",
80
82
  description: "",
@@ -82,149 +84,163 @@ var b = i(function() {
82
84
  expression: "",
83
85
  inputSinkKey: "",
84
86
  ttl: 900
85
- }), [j, M] = c({}), [ze, Be] = c(!1), [Ve, He] = c(!1), [Ue, We] = c(null), [N, P] = c("{\n \"data\": [\n {\"name\": \"Item 1\", \"count\": 10},\n {\"name\": \"Item 2\", \"count\": 20}\n ]\n}"), [F, I] = c(""), [L, R] = c(null), [Ge, Ke] = c(!1), [z, B] = c(null), [V, H] = c(!1), [U, qe] = c(null), [Je, Ye] = c(!1), W = ie(k.inputSinkKey);
87
+ }), [j, He] = l(() => D ? null : k);
88
+ Ee({
89
+ id: "parser-editor",
90
+ label: x("bigconsole.assistant.unsaved.parserEditor", "the parser editor"),
91
+ dirty: re(k, j)
92
+ });
93
+ let [M, N] = l({}), [Ue, We] = l(!1), [Ge, Ke] = l(!1), [qe, Je] = l(null), [P, F] = l("{\n \"data\": [\n {\"name\": \"Item 1\", \"count\": 10},\n {\"name\": \"Item 2\", \"count\": 20}\n ]\n}"), [Ye, I] = l(""), [L, R] = l(null), [Xe, Ze] = l(!1), [z, B] = l(null), [V, Qe] = l(!1), [H, $e] = l(null), [et, tt] = l(!1), U = c(k.inputSinkKey);
86
94
  o(() => {
87
- W.current = k.inputSinkKey;
95
+ U.current = k.inputSinkKey;
88
96
  }, [k.inputSinkKey]);
89
- let [G, Xe] = c(!1), [Ze, Qe] = c(null), [$e, et] = c(!1), [tt, K] = c(null), [q, nt] = c(null), { loading: rt, error: it, parsers: at, fetchParser: ot, createParser: st, updateParser: ct, testParserExpression: lt } = ne({
90
- consoleId: Ne || "",
97
+ let [W, nt] = l(!1), [rt, it] = l(null), [at, ot] = l(!1), [st, G] = l(null), [K, ct] = l(null), { loading: lt, error: ut, parsers: dt, fetchParser: ft, createParser: pt, updateParser: mt, testParserExpression: ht } = ne({
98
+ consoleId: Ie || "",
91
99
  skipFetch: !0
92
- }), { dataSinks: J, fetchDataSinks: ut, getDataSinkData: Y } = te({ skipFetch: !0 }), { dashboards: dt, fetchDashboards: ft, loading: pt } = ee(), X = D ? at.find((e) => e.id === i) : null;
100
+ }), { dataSinks: q, fetchDataSinks: gt, getDataSinkData: J } = te({ skipFetch: !0 }), { dashboards: _t, fetchDashboards: vt, loading: yt } = ee(), Y = D ? dt.find((e) => e.id === i) : null;
93
101
  o(() => {
94
- ut(), D && i && ot(i), O && ft();
102
+ gt(), D && i && ft(i), O && vt();
95
103
  }, [
96
104
  D,
97
105
  i,
98
- ot,
99
- ut,
106
+ ft,
107
+ gt,
100
108
  O,
101
- ft
102
- ]), o(() => {
103
- X && (A({
104
- name: X.name || "",
105
- outputKey: X.outputKey || "",
106
- description: X.description || "",
107
- type: X.type,
108
- expression: X.expression || "",
109
- inputSinkKey: X.inputSinkKey || "",
110
- ttl: X.ttl ?? null
111
- }), Be(!0), X.consoleId && Me(X.consoleId));
112
- }, [X]);
113
- let Z = s(() => J.find((e) => e.key === k.inputSinkKey)?.name || k.inputSinkKey, [J, k.inputSinkKey]), mt = a((e) => {
109
+ vt
110
+ ]);
111
+ let bt = c(null), xt = c(k), St = c(j);
112
+ o(() => {
113
+ xt.current = k, St.current = j;
114
+ }, [k, j]), o(() => {
115
+ if (Y && ie(bt.current, Y.id, xt.current, St.current)) {
116
+ bt.current = Y.id;
117
+ let e = {
118
+ name: Y.name || "",
119
+ outputKey: Y.outputKey || "",
120
+ description: Y.description || "",
121
+ type: Y.type,
122
+ expression: Y.expression || "",
123
+ inputSinkKey: Y.inputSinkKey || "",
124
+ ttl: Y.ttl ?? null
125
+ };
126
+ A(e), He(e), We(!0), Y.consoleId && Fe(Y.consoleId);
127
+ }
128
+ }, [Y]);
129
+ let X = s(() => q.find((e) => e.key === k.inputSinkKey)?.name || k.inputSinkKey, [q, k.inputSinkKey]), Ct = a((e) => {
114
130
  let t = e.target.value;
115
131
  A((e) => ({
116
132
  ...e,
117
133
  name: t,
118
- outputKey: ze ? e.outputKey : Oe(t)
119
- })), M((e) => ({
134
+ outputKey: Ue ? e.outputKey : je(t)
135
+ })), N((e) => ({
120
136
  ...e,
121
137
  name: void 0
122
138
  }));
123
- }, [ze]), ht = a((e) => {
139
+ }, [Ue]), wt = a((e) => {
124
140
  let t = e.target.value.toLowerCase().replace(/[^a-z0-9_]/g, "");
125
141
  A((e) => ({
126
142
  ...e,
127
143
  outputKey: t
128
- })), Be(!0), M((e) => ({
144
+ })), We(!0), N((e) => ({
129
145
  ...e,
130
146
  outputKey: void 0
131
147
  }));
132
- }, []), gt = a((e) => {
148
+ }, []), Tt = a((e) => {
133
149
  A((t) => ({
134
150
  ...t,
135
151
  description: e.target.value
136
152
  }));
137
- }, []), _t = a((e) => {
153
+ }, []), Et = a((e) => {
138
154
  A((t) => ({
139
155
  ...t,
140
156
  type: e
141
157
  })), I(""), R(null);
142
- }, []), vt = a((e) => {
158
+ }, []), Dt = a((e) => {
143
159
  A((t) => ({
144
160
  ...t,
145
161
  expression: e.target.value
146
- })), M((e) => ({
162
+ })), N((e) => ({
147
163
  ...e,
148
164
  expression: void 0
149
165
  }));
150
- }, []), yt = a((e) => {
166
+ }, []), Ot = a((e) => {
151
167
  A((t) => ({
152
168
  ...t,
153
169
  inputSinkKey: e.target.value
154
- })), M((e) => ({
170
+ })), N((e) => ({
155
171
  ...e,
156
172
  inputSinkKey: void 0
157
- })), Xe(!1), Qe(null), nt(null), K(null), V && (P(""), H(!1)), qe(null), I(""), R(null), B(null);
158
- }, [V]), bt = a((e) => {
173
+ })), nt(!1), it(null), ct(null), G(null), V && (F(""), Qe(!1)), $e(null), I(""), R(null), B(null);
174
+ }, [V]), kt = a((e) => {
159
175
  A((t) => ({
160
176
  ...t,
161
177
  ttl: e
162
- })), M((e) => ({
178
+ })), N((e) => ({
163
179
  ...e,
164
180
  ttl: void 0
165
181
  }));
166
- }, []), xt = a((e) => {
167
- Me(e.target.value);
168
- }, []), St = a((e) => {
169
- P(e.target.value);
170
- }, []), Ct = a(async () => {
182
+ }, []), At = a((e) => {
183
+ Fe(e.target.value);
184
+ }, []), jt = a((e) => {
185
+ F(e.target.value);
186
+ }, []), Mt = a(async () => {
171
187
  let e = k.inputSinkKey;
172
188
  if (e) {
173
- Ye(!0);
189
+ tt(!0);
174
190
  try {
175
- let t = await Y({ key: e }, { limit: y });
176
- if (W.current !== e) return;
177
- t?.raw !== void 0 && t?.raw !== null ? (P(JSON.stringify(t.raw, null, 2)), H(!0), qe({
191
+ let t = await J({ key: e }, { limit: y });
192
+ if (U.current !== e) return;
193
+ t?.raw !== void 0 && t?.raw !== null ? (F(JSON.stringify(t.raw, null, 2)), Qe(!0), $e({
178
194
  total: t.totalCount ?? null,
179
195
  hasMore: t.hasMore ?? null,
180
- sinkName: Z
196
+ sinkName: X
181
197
  }), I(""), R(null), B(null)) : R(x("bigconsole.parsers.builder.errors.loadSampleFailed", "Could not load a sample from the selected DataSink."));
182
198
  } catch (t) {
183
- if (W.current !== e) return;
199
+ if (U.current !== e) return;
184
200
  R(t instanceof Error ? t.message : x("bigconsole.parsers.builder.errors.loadSampleDataFailed", "Failed to load sample data"));
185
201
  } finally {
186
- Ye(!1);
202
+ tt(!1);
187
203
  }
188
204
  }
189
205
  }, [
190
206
  k.inputSinkKey,
191
- Y,
192
- Z,
207
+ J,
208
+ X,
193
209
  x
194
- ]), wt = a(() => {
195
- P(""), H(!1), qe(null), B(null), I(""), R(null);
196
- }, []), Tt = a(async () => {
197
- if (G) {
198
- Xe(!1);
210
+ ]), Nt = a(() => {
211
+ F(""), Qe(!1), $e(null), B(null), I(""), R(null);
212
+ }, []), Pt = a(async () => {
213
+ if (W) {
214
+ nt(!1);
199
215
  return;
200
216
  }
201
217
  if (!k.inputSinkKey) {
202
- K(x("bigconsole.parsers.builder.errors.selectSourceFirst", "Please select a source DataSink first"));
218
+ G(x("bigconsole.parsers.builder.errors.selectSourceFirst", "Please select a source DataSink first"));
203
219
  return;
204
220
  }
205
- Xe(!0), et(!0), K(null);
221
+ nt(!0), ot(!0), G(null);
206
222
  let e = k.inputSinkKey;
207
223
  try {
208
- let t = await Y({ key: e }, { limit: y });
209
- if (W.current !== e) return;
210
- t?.raw !== void 0 && t?.raw !== null ? (Qe(t.raw), nt({
224
+ let t = await J({ key: e }, { limit: y });
225
+ if (U.current !== e) return;
226
+ t?.raw !== void 0 && t?.raw !== null ? (it(t.raw), ct({
211
227
  total: t.totalCount ?? null,
212
228
  hasMore: t.hasMore ?? null,
213
- sinkName: Z
214
- })) : K(x("bigconsole.parsers.builder.errors.noDataInSink", "No data available in selected DataSink"));
229
+ sinkName: X
230
+ })) : G(x("bigconsole.parsers.builder.errors.noDataInSink", "No data available in selected DataSink"));
215
231
  } catch (t) {
216
- if (W.current !== e) return;
217
- K(t instanceof Error ? t.message : x("bigconsole.parsers.builder.errors.loadDataFailed", "Failed to load data"));
232
+ if (U.current !== e) return;
233
+ G(t instanceof Error ? t.message : x("bigconsole.parsers.builder.errors.loadDataFailed", "Failed to load data"));
218
234
  } finally {
219
- et(!1);
235
+ ot(!1);
220
236
  }
221
237
  }, [
222
- G,
238
+ W,
223
239
  k.inputSinkKey,
224
- Y,
225
- Z,
240
+ J,
241
+ X,
226
242
  x
227
- ]), Et = a(async () => {
243
+ ]), Ft = a(async () => {
228
244
  if (!k.expression.trim()) {
229
245
  R(x("bigconsole.parsers.builder.validation.expressionRequired", "Expression is required"));
230
246
  return;
@@ -239,7 +255,7 @@ var b = i(function() {
239
255
  else {
240
256
  let t;
241
257
  try {
242
- t = JSON.parse(N);
258
+ t = JSON.parse(P);
243
259
  } catch {
244
260
  R(x("bigconsole.parsers.builder.errors.invalidInputJson", "Input JSON is not valid JSON"));
245
261
  return;
@@ -250,9 +266,9 @@ var b = i(function() {
250
266
  sampleData: t
251
267
  };
252
268
  }
253
- Ke(!0), R(null), I(""), B(null);
269
+ Ze(!0), R(null), I(""), B(null);
254
270
  try {
255
- let t = await lt(e);
271
+ let t = await ht(e);
256
272
  t ? t.success ? (I(JSON.stringify(t.output, null, 2)), t.sampled && B({
257
273
  sampledRows: t.sampledRows ?? null,
258
274
  totalRows: t.totalRows ?? null
@@ -260,38 +276,38 @@ var b = i(function() {
260
276
  } catch (e) {
261
277
  R(e instanceof Error ? e.message : x("bigconsole.parsers.builder.errors.testFailed", "Test failed"));
262
278
  } finally {
263
- Ke(!1);
279
+ Ze(!1);
264
280
  }
265
281
  }, [
266
282
  k.type,
267
283
  k.expression,
268
284
  k.inputSinkKey,
269
- N,
285
+ P,
270
286
  V,
271
- lt,
287
+ ht,
272
288
  x
273
- ]), Q = a(() => {
289
+ ]), Z = a(() => {
274
290
  b(h ? `/dashboards/${h}/parsers` : "/parsers");
275
- }, [b, h]), Dt = a(async () => {
276
- We(null);
277
- let e = ke(k, x);
291
+ }, [b, h]), It = a(async () => {
292
+ Je(null);
293
+ let e = Me(k, x);
278
294
  if (Object.keys(e).length > 0) {
279
- M(e), e.name || e.outputKey ? T(0) : e.inputSinkKey ? T(1) : e.expression && T(2);
295
+ N(e), e.name || e.outputKey ? T(0) : e.inputSinkKey ? T(1) : e.expression && T(2);
280
296
  return;
281
297
  }
282
- He(!0);
298
+ Ke(!0);
283
299
  try {
284
- if (D && X) {
285
- if (!await ct(X.id, {
300
+ if (D && Y) {
301
+ if (!await mt(Y.id, {
286
302
  name: k.name,
287
303
  description: k.description || void 0,
288
304
  expression: k.expression,
289
305
  inputSinkKey: k.inputSinkKey,
290
306
  outputKey: k.outputKey,
291
307
  ttl: k.ttl
292
- }, X.version)) throw Error(x("bigconsole.parsers.builder.errors.updateFailed", "Failed to update parser"));
293
- } else if (!await st({
294
- consoleId: Ne || "",
308
+ }, Y.version)) throw Error(x("bigconsole.parsers.builder.errors.updateFailed", "Failed to update parser"));
309
+ } else if (!await pt({
310
+ consoleId: Ie || "",
295
311
  name: k.name,
296
312
  type: k.type,
297
313
  expression: k.expression,
@@ -300,28 +316,28 @@ var b = i(function() {
300
316
  description: k.description || void 0,
301
317
  ttl: k.ttl ?? void 0
302
318
  })) throw Error(x("bigconsole.parsers.builder.errors.createFailed", "Failed to create parser"));
303
- Q();
319
+ He(k), Z();
304
320
  } catch (e) {
305
- We(e instanceof Error ? e.message : x("bigconsole.parsers.builder.errors.saveFailed", "Failed to save parser"));
321
+ Je(e instanceof Error ? e.message : x("bigconsole.parsers.builder.errors.saveFailed", "Failed to save parser"));
306
322
  } finally {
307
- He(!1);
323
+ Ke(!1);
308
324
  }
309
325
  }, [
310
326
  k,
311
327
  D,
312
- X,
313
- st,
314
- ct,
315
- Ne,
316
- Q,
328
+ Y,
329
+ pt,
330
+ mt,
331
+ Ie,
332
+ Z,
317
333
  x
318
- ]), Ot = s(() => k.name.trim().length >= 2 && k.expression.trim().length > 0 && k.inputSinkKey.trim().length > 0 && k.outputKey.trim().length > 0 && /^[a-z0-9_]+$/.test(k.outputKey), [
334
+ ]), Lt = s(() => k.name.trim().length >= 2 && k.expression.trim().length > 0 && k.inputSinkKey.trim().length > 0 && k.outputKey.trim().length > 0 && /^[a-z0-9_]+$/.test(k.outputKey), [
319
335
  k.name,
320
336
  k.expression,
321
337
  k.inputSinkKey,
322
338
  k.outputKey
323
- ]), kt = a((e) => {
324
- switch (Ee[e]) {
339
+ ]), Q = a((e) => {
340
+ switch (ke[e]) {
325
341
  case "details": return k.name.trim().length >= 2 && k.outputKey.trim().length > 0 && /^[a-z0-9_]+$/.test(k.outputKey);
326
342
  case "source": return k.inputSinkKey.trim().length > 0;
327
343
  case "expression": return k.expression.trim().length > 0;
@@ -332,51 +348,51 @@ var b = i(function() {
332
348
  k.outputKey,
333
349
  k.inputSinkKey,
334
350
  k.expression
335
- ]), At = a((e) => {
351
+ ]), Rt = a((e) => {
336
352
  let t = Math.max(0, Math.min(e, C - 1));
337
353
  if (t > w) {
338
- for (let e = w; e < t; e++) if (!kt(e)) return;
354
+ for (let e = w; e < t; e++) if (!Q(e)) return;
339
355
  }
340
356
  T(t);
341
357
  }, [
342
358
  w,
343
- kt,
359
+ Q,
344
360
  C
345
- ]), jt = a(() => {
361
+ ]), zt = a(() => {
346
362
  T((e) => Math.min(e + 1, C - 1));
347
- }, [C]), Mt = a(() => {
363
+ }, [C]), Bt = a(() => {
348
364
  T((e) => Math.max(e - 1, 0));
349
365
  }, []);
350
- if (rt && D || Fe) return /* @__PURE__ */ p("div", {
366
+ if (lt && D || Re) return /* @__PURE__ */ p("div", {
351
367
  className: "flex items-center justify-center min-h-[400px]",
352
368
  children: /* @__PURE__ */ p(u, { className: "w-8 h-8 text-text-secondary animate-spin" })
353
369
  });
354
- if (D && !Ie) return /* @__PURE__ */ p(oe, {
370
+ if (D && !ze) return /* @__PURE__ */ p(se, {
355
371
  title: x("bigconsole.parsers.builder.accessDenied.title", "Access Denied"),
356
372
  description: x("bigconsole.parsers.builder.accessDenied.description", "You don't have permission to view this parser.")
357
373
  });
358
- if (it) return /* @__PURE__ */ p("div", {
374
+ if (ut) return /* @__PURE__ */ p("div", {
359
375
  className: "p-card-padding",
360
376
  children: /* @__PURE__ */ p(t, {
361
377
  tone: "danger",
362
378
  headingLevel: 2,
363
379
  title: x("bigconsole.parsers.builder.errors.loadParserFailed", "Failed to load Parser"),
364
380
  description: "The parser could not be fetched, so the form cannot be filled in.",
365
- icon: /* @__PURE__ */ p(l, { className: "h-icon-md w-icon-md text-[var(--color-status-error-text)]" }),
381
+ icon: /* @__PURE__ */ p(ue, { className: "h-icon-md w-icon-md text-[var(--color-status-error-text)]" }),
366
382
  actions: /* @__PURE__ */ m(d, {
367
- onClick: Q,
383
+ onClick: Z,
368
384
  variant: "secondary",
369
385
  size: "sm",
370
- children: [/* @__PURE__ */ p(le, { className: "w-4 h-4 mr-2" }), x("bigconsole.parsers.builder.header.backToParsers", "Back to Parsers")]
386
+ children: [/* @__PURE__ */ p(de, { className: "w-4 h-4 mr-2" }), x("bigconsole.parsers.builder.header.backToParsers", "Back to Parsers")]
371
387
  }),
372
388
  "data-testid": "parser-builder-load-error",
373
389
  children: /* @__PURE__ */ p("p", {
374
390
  className: "font-mono text-xs break-words text-text-secondary",
375
- children: it.message
391
+ children: ut.message
376
392
  })
377
393
  })
378
394
  });
379
- let Nt = S[k.type], Pt = w === C - 1, $ = /* @__PURE__ */ p("span", {
395
+ let Vt = S[k.type], Ht = w === C - 1, $ = /* @__PURE__ */ p("span", {
380
396
  className: "text-xs font-medium text-text-muted",
381
397
  children: x("bigconsole.parsers.builder.header.stepCounter", "Step {{current}} of {{total}}", {
382
398
  current: w + 1,
@@ -393,11 +409,11 @@ var b = i(function() {
393
409
  className: "border-b border-[var(--color-border-subtle)] pb-form-gap",
394
410
  children: [
395
411
  /* @__PURE__ */ m(d, {
396
- onClick: Q,
412
+ onClick: Z,
397
413
  variant: "ghost",
398
414
  size: "sm",
399
415
  className: "mb-4",
400
- children: [/* @__PURE__ */ p(le, { className: "w-4 h-4 mr-2" }), x("bigconsole.parsers.builder.header.backToParsers", "Back to Parsers")]
416
+ children: [/* @__PURE__ */ p(de, { className: "w-4 h-4 mr-2" }), x("bigconsole.parsers.builder.header.backToParsers", "Back to Parsers")]
401
417
  }),
402
418
  /* @__PURE__ */ p("h1", {
403
419
  className: "text-2xl font-bold text-text-primary sm:text-3xl",
@@ -409,33 +425,33 @@ var b = i(function() {
409
425
  })
410
426
  ]
411
427
  }),
412
- /* @__PURE__ */ p(Se, {
428
+ /* @__PURE__ */ p(we, {
413
429
  className: "max-w-[80ch]",
414
430
  children: x("bigconsole.parsers.builder.header.purpose", "A parser maps raw input into structured fields using a JQ or JSONata expression. Write the expression, run it against a sample to confirm the output, and save it once it produces the shape you need — then reuse it across pipelines to normalise any source.")
415
431
  }),
416
432
  /* @__PURE__ */ p("div", {
417
433
  className: "min-w-0 overflow-x-auto",
418
- children: /* @__PURE__ */ p(Ce, {
419
- steps: je,
434
+ children: /* @__PURE__ */ p(Te, {
435
+ steps: Pe,
420
436
  active: w,
421
- onStepClick: At
437
+ onStepClick: Rt
422
438
  })
423
439
  }),
424
- Ue && /* @__PURE__ */ p(t, {
440
+ qe && /* @__PURE__ */ p(t, {
425
441
  tone: "danger",
426
442
  headingLevel: 2,
427
443
  title: x("bigconsole.parsers.builder.errors.saveParserFailed", "Failed to save Parser"),
428
- icon: /* @__PURE__ */ p(l, { className: "h-icon-sm w-icon-sm text-[var(--color-status-error-text)]" }),
444
+ icon: /* @__PURE__ */ p(ue, { className: "h-icon-sm w-icon-sm text-[var(--color-status-error-text)]" }),
429
445
  "data-testid": "parser-submit-error",
430
446
  children: /* @__PURE__ */ p("p", {
431
447
  className: "font-mono text-xs break-words text-text-secondary",
432
- children: Ue
448
+ children: qe
433
449
  })
434
450
  }),
435
451
  /* @__PURE__ */ m("form", {
436
452
  className: "flex flex-col gap-section-gap",
437
453
  onSubmit: (e) => {
438
- e.preventDefault(), Pt && Dt();
454
+ e.preventDefault(), Ht && It();
439
455
  },
440
456
  children: [
441
457
  w === 0 && /* @__PURE__ */ m(t, {
@@ -443,7 +459,7 @@ var b = i(function() {
443
459
  headingLevel: 2,
444
460
  title: "Basic information",
445
461
  description: "Essential details for your parser.",
446
- icon: /* @__PURE__ */ p(ge, { className: "h-icon-sm w-icon-sm" }),
462
+ icon: /* @__PURE__ */ p(ve, { className: "h-icon-sm w-icon-sm" }),
447
463
  meta: $,
448
464
  bodyClassName: "space-y-5",
449
465
  "data-testid": "parser-basic-information",
@@ -467,13 +483,13 @@ var b = i(function() {
467
483
  id: "name",
468
484
  type: "text",
469
485
  value: k.name,
470
- onChange: mt,
486
+ onChange: Ct,
471
487
  placeholder: x("bigconsole.parsers.builder.fields.name.placeholder", "e.g., User Analytics Parser"),
472
- className: g(!!j.name)
488
+ className: g(!!M.name)
473
489
  }),
474
- j.name && /* @__PURE__ */ p("p", {
490
+ M.name && /* @__PURE__ */ p("p", {
475
491
  className: "text-xs text-status-error-text mt-1.5",
476
- children: j.name
492
+ children: M.name
477
493
  })
478
494
  ] }), /* @__PURE__ */ m("div", { children: [
479
495
  /* @__PURE__ */ m("label", {
@@ -492,14 +508,14 @@ var b = i(function() {
492
508
  id: "outputKey",
493
509
  type: "text",
494
510
  value: k.outputKey,
495
- onChange: ht,
511
+ onChange: wt,
496
512
  placeholder: "user_analytics_parser",
497
513
  disabled: D,
498
- className: g(!!j.outputKey, "font-mono")
514
+ className: g(!!M.outputKey, "font-mono")
499
515
  }),
500
- j.outputKey && /* @__PURE__ */ p("p", {
516
+ M.outputKey && /* @__PURE__ */ p("p", {
501
517
  className: "text-xs text-status-error-text mt-1.5",
502
- children: j.outputKey
518
+ children: M.outputKey
503
519
  }),
504
520
  !D && /* @__PURE__ */ p("p", {
505
521
  className: v,
@@ -514,7 +530,7 @@ var b = i(function() {
514
530
  }), /* @__PURE__ */ p("textarea", {
515
531
  id: "description",
516
532
  value: k.description,
517
- onChange: gt,
533
+ onChange: Tt,
518
534
  placeholder: x("bigconsole.parsers.builder.fields.description.placeholder", "Describe what this parser does..."),
519
535
  rows: 3,
520
536
  className: g(!1, "resize-y")
@@ -523,7 +539,7 @@ var b = i(function() {
523
539
  /* @__PURE__ */ m("label", {
524
540
  htmlFor: "dashboard",
525
541
  className: `${_} flex items-center gap-2`,
526
- children: [/* @__PURE__ */ p(_e, {
542
+ children: [/* @__PURE__ */ p(ye, {
527
543
  "aria-hidden": "true",
528
544
  className: "w-4 h-4"
529
545
  }), x("bigconsole.parsers.builder.fields.dashboard.label", "Dashboard Scope")]
@@ -531,13 +547,13 @@ var b = i(function() {
531
547
  /* @__PURE__ */ m("select", {
532
548
  id: "dashboard",
533
549
  value: E,
534
- onChange: xt,
535
- disabled: pt || D,
550
+ onChange: At,
551
+ disabled: yt || D,
536
552
  className: g(),
537
553
  children: [/* @__PURE__ */ p("option", {
538
554
  value: "default",
539
555
  children: x("bigconsole.parsers.builder.fields.dashboard.globalOption", "Global (available everywhere)")
540
- }), dt.map((e) => /* @__PURE__ */ p("option", {
556
+ }), _t.map((e) => /* @__PURE__ */ p("option", {
541
557
  value: e.id,
542
558
  children: e.name
543
559
  }, e.id))]
@@ -554,7 +570,7 @@ var b = i(function() {
554
570
  headingLevel: 2,
555
571
  title: "Parser configuration",
556
572
  description: "Pick the language and point it at a source.",
557
- icon: /* @__PURE__ */ p(pe, { className: "h-icon-sm w-icon-sm" }),
573
+ icon: /* @__PURE__ */ p(he, { className: "h-icon-sm w-icon-sm" }),
558
574
  meta: $,
559
575
  bodyClassName: "space-y-5",
560
576
  "data-testid": "parser-configuration",
@@ -587,7 +603,7 @@ var b = i(function() {
587
603
  name: "parserType",
588
604
  value: e,
589
605
  checked: k.type === e,
590
- onChange: () => _t(e),
606
+ onChange: () => Et(e),
591
607
  className: "mt-1 w-4 h-4 text-action-primary-bg"
592
608
  }), /* @__PURE__ */ m("span", {
593
609
  className: "min-w-0",
@@ -618,21 +634,21 @@ var b = i(function() {
618
634
  /* @__PURE__ */ m("select", {
619
635
  id: "inputSinkKey",
620
636
  value: k.inputSinkKey,
621
- onChange: yt,
622
- className: g(!!j.inputSinkKey),
637
+ onChange: Ot,
638
+ className: g(!!M.inputSinkKey),
623
639
  children: [/* @__PURE__ */ p("option", {
624
640
  value: "",
625
641
  children: x("bigconsole.parsers.builder.fields.sourceDataSink.placeholder", "Select a DataSink...")
626
- }), J.map((e) => /* @__PURE__ */ p("option", {
642
+ }), q.map((e) => /* @__PURE__ */ p("option", {
627
643
  value: e.key,
628
644
  children: e.name || e.key
629
645
  }, e.id))]
630
646
  }),
631
- j.inputSinkKey && /* @__PURE__ */ p("p", {
647
+ M.inputSinkKey && /* @__PURE__ */ p("p", {
632
648
  className: "text-xs text-status-error-text mt-1.5",
633
- children: j.inputSinkKey
649
+ children: M.inputSinkKey
634
650
  }),
635
- J.length === 0 ? /* @__PURE__ */ p("p", {
651
+ q.length === 0 ? /* @__PURE__ */ p("p", {
636
652
  className: v,
637
653
  children: x("bigconsole.parsers.builder.fields.sourceDataSink.emptyState", "No DataSinks yet — create one first, then return here to build a parser for it.")
638
654
  }) : /* @__PURE__ */ p("p", {
@@ -643,16 +659,16 @@ var b = i(function() {
643
659
  className: "mt-3",
644
660
  children: [/* @__PURE__ */ m("button", {
645
661
  type: "button",
646
- onClick: Tt,
647
- "aria-expanded": G,
662
+ onClick: Pt,
663
+ "aria-expanded": W,
648
664
  "aria-controls": "parser-data-preview",
649
665
  className: "inline-flex min-h-control-md items-center gap-2 rounded-md text-sm text-action-primary-bg hover:text-action-primary-bgHover motion-safe:transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-bg-surface",
650
666
  children: [
651
- p(G ? de : fe, { className: "w-4 h-4" }),
652
- /* @__PURE__ */ p(he, { className: "w-4 h-4" }),
667
+ p(W ? pe : me, { className: "w-4 h-4" }),
668
+ /* @__PURE__ */ p(_e, { className: "w-4 h-4" }),
653
669
  x("bigconsole.parsers.builder.dataPreview.toggle", "Show Data Preview")
654
670
  ]
655
- }), G && /* @__PURE__ */ p(t, {
671
+ }), W && /* @__PURE__ */ p(t, {
656
672
  id: "parser-data-preview",
657
673
  emphasis: "muted",
658
674
  padding: "compact",
@@ -661,28 +677,28 @@ var b = i(function() {
661
677
  description: "A slice of the payload stored on the selected DataSink.",
662
678
  className: "mt-3",
663
679
  "data-testid": "parser-data-preview",
664
- children: $e ? /* @__PURE__ */ m("div", {
680
+ children: at ? /* @__PURE__ */ m("div", {
665
681
  className: "flex items-center justify-center p-4",
666
682
  children: [/* @__PURE__ */ p(u, { className: "w-5 h-5 text-text-secondary animate-spin" }), /* @__PURE__ */ p("span", {
667
683
  className: "ml-2 text-sm text-text-secondary",
668
684
  children: x("bigconsole.parsers.builder.dataPreview.loading", "Loading sample…")
669
685
  })]
670
- }) : tt ? /* @__PURE__ */ p("p", {
686
+ }) : st ? /* @__PURE__ */ p("p", {
671
687
  className: "text-sm text-status-error-text",
672
- children: tt
673
- }) : Ze ? /* @__PURE__ */ m(f, { children: [/* @__PURE__ */ p("pre", {
688
+ children: st
689
+ }) : rt ? /* @__PURE__ */ m(f, { children: [/* @__PURE__ */ p("pre", {
674
690
  className: "max-h-48 min-w-0 overflow-auto rounded-md bg-bg-canvas p-3 font-mono text-xs text-text-primary",
675
- children: JSON.stringify(Ze, null, 2)
676
- }), q && /* @__PURE__ */ m("p", {
691
+ children: JSON.stringify(rt, null, 2)
692
+ }), K && /* @__PURE__ */ m("p", {
677
693
  className: v,
678
694
  children: [
679
695
  x("bigconsole.parsers.builder.dataPreview.previewingSample", "Previewing a sample"),
680
- q.total == null ? "" : x("bigconsole.parsers.builder.dataPreview.rowRange", " (first {{shown}} of {{total}} rows)", {
681
- shown: Math.min(y, q.total),
682
- total: q.total
696
+ K.total == null ? "" : x("bigconsole.parsers.builder.dataPreview.rowRange", " (first {{shown}} of {{total}} rows)", {
697
+ shown: Math.min(y, K.total),
698
+ total: K.total
683
699
  }),
684
700
  " · ",
685
- q.sinkName
701
+ K.sinkName
686
702
  ]
687
703
  })] }) : /* @__PURE__ */ p("p", {
688
704
  className: "text-center text-sm text-text-secondary",
@@ -697,7 +713,7 @@ var b = i(function() {
697
713
  headingLevel: 2,
698
714
  title: "Test expression",
699
715
  description: "Write the expression, then run it against sample data before you save.",
700
- icon: /* @__PURE__ */ p(ve, { className: "h-icon-sm w-icon-sm" }),
716
+ icon: /* @__PURE__ */ p(be, { className: "h-icon-sm w-icon-sm" }),
701
717
  meta: $,
702
718
  bodyClassName: "space-y-5",
703
719
  "data-testid": "parser-test-expression",
@@ -718,18 +734,18 @@ var b = i(function() {
718
734
  /* @__PURE__ */ p("textarea", {
719
735
  id: "expression",
720
736
  value: k.expression,
721
- onChange: vt,
722
- placeholder: Nt.placeholder,
737
+ onChange: Dt,
738
+ placeholder: Vt.placeholder,
723
739
  rows: 8,
724
- className: g(!!j.expression, "font-mono resize-y min-h-[12rem]")
740
+ className: g(!!M.expression, "font-mono resize-y min-h-[12rem]")
725
741
  }),
726
- j.expression && /* @__PURE__ */ p("p", {
742
+ M.expression && /* @__PURE__ */ p("p", {
727
743
  className: "text-xs text-status-error-text mt-1.5",
728
- children: j.expression
744
+ children: M.expression
729
745
  }),
730
746
  /* @__PURE__ */ p("p", {
731
747
  className: v,
732
- children: x("bigconsole.parsers.builder.fields.expression.example", "Example: {{example}}", { example: Nt.example })
748
+ children: x("bigconsole.parsers.builder.fields.expression.example", "Example: {{example}}", { example: Vt.example })
733
749
  })
734
750
  ] }),
735
751
  /* @__PURE__ */ m("div", { children: [
@@ -746,56 +762,56 @@ var b = i(function() {
746
762
  className: "flex flex-wrap items-center gap-2",
747
763
  children: [k.inputSinkKey && !V && /* @__PURE__ */ m("button", {
748
764
  type: "button",
749
- onClick: Ct,
750
- disabled: Je,
765
+ onClick: Mt,
766
+ disabled: et,
751
767
  className: "inline-flex items-center gap-1.5 whitespace-nowrap rounded-md border border-action-primary-bg px-2.5 py-1.5 text-xs font-semibold text-action-primary-bg hover:bg-action-primary-bg/10 motion-safe:transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-bg-surface disabled:opacity-50 disabled:cursor-not-allowed",
752
- children: [Je ? /* @__PURE__ */ p(u, { className: "w-3.5 h-3.5 animate-spin" }) : /* @__PURE__ */ p(me, { className: "w-3.5 h-3.5" }), x("bigconsole.parsers.builder.actions.loadSample", "Load Sample")]
768
+ children: [et ? /* @__PURE__ */ p(u, { className: "w-3.5 h-3.5 animate-spin" }) : /* @__PURE__ */ p(ge, { className: "w-3.5 h-3.5" }), x("bigconsole.parsers.builder.actions.loadSample", "Load Sample")]
753
769
  }), V && /* @__PURE__ */ m("button", {
754
770
  type: "button",
755
- onClick: wt,
771
+ onClick: Nt,
756
772
  className: "inline-flex items-center gap-1.5 whitespace-nowrap rounded-md border border-[var(--color-border-default)] px-2.5 py-1.5 text-xs font-semibold text-text-primary hover:bg-bg-sunken motion-safe:transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-bg-surface",
757
- children: [/* @__PURE__ */ p(xe, { className: "w-3.5 h-3.5" }), x("bigconsole.parsers.builder.actions.clear", "Clear")]
773
+ children: [/* @__PURE__ */ p(Ce, { className: "w-3.5 h-3.5" }), x("bigconsole.parsers.builder.actions.clear", "Clear")]
758
774
  })]
759
775
  })]
760
776
  }),
761
777
  /* @__PURE__ */ p("textarea", {
762
778
  id: "test-input",
763
- value: N,
764
- onChange: St,
779
+ value: P,
780
+ onChange: jt,
765
781
  readOnly: V,
766
782
  placeholder: x("bigconsole.parsers.builder.test.inputPlaceholder", "Type sample JSON to test against it — or Load a sample from the source…"),
767
783
  rows: 8,
768
784
  className: g(!1, `font-mono leading-relaxed resize-y ${V ? "bg-bg-sunken opacity-80 cursor-not-allowed" : ""}`)
769
785
  }),
770
- V && U ? /* @__PURE__ */ m("p", {
786
+ V && H ? /* @__PURE__ */ m("p", {
771
787
  className: v,
772
788
  children: [
773
789
  x("bigconsole.parsers.builder.test.loadedSample", "Loaded a small sample"),
774
- U.total == null ? "" : x("bigconsole.parsers.builder.dataPreview.rowRange", " (first {{shown}} of {{total}} rows)", {
775
- shown: Math.min(y, U.total),
776
- total: U.total
790
+ H.total == null ? "" : x("bigconsole.parsers.builder.dataPreview.rowRange", " (first {{shown}} of {{total}} rows)", {
791
+ shown: Math.min(y, H.total),
792
+ total: H.total
777
793
  }),
778
794
  " ",
779
- x("bigconsole.parsers.builder.test.loadedSampleFrom", "from {{sinkName}} · locked — press Clear to edit.", { sinkName: U.sinkName })
795
+ x("bigconsole.parsers.builder.test.loadedSampleFrom", "from {{sinkName}} · locked — press Clear to edit.", { sinkName: H.sinkName })
780
796
  ]
781
797
  }) : /* @__PURE__ */ p("p", {
782
798
  className: v,
783
799
  children: x("bigconsole.parsers.builder.test.inputHelper", "Type sample JSON to test against it, or Load a sample from the source.")
784
800
  })
785
801
  ] }),
786
- /* @__PURE__ */ p(se, {
802
+ /* @__PURE__ */ p(ce, {
787
803
  permission: r.PARSER_TEST,
788
804
  deniedBehavior: "disable",
789
805
  children: /* @__PURE__ */ p(d, {
790
806
  type: "button",
791
- onClick: Et,
792
- disabled: Ge || !k.expression.trim(),
807
+ onClick: Ft,
808
+ disabled: Xe || !k.expression.trim(),
793
809
  variant: "default",
794
810
  className: "w-full",
795
- children: Ge ? /* @__PURE__ */ m(f, { children: [/* @__PURE__ */ p(u, { className: "w-4 h-4 mr-2 animate-spin" }), x("bigconsole.parsers.builder.actions.testing", "Testing...")] }) : /* @__PURE__ */ m(f, { children: [/* @__PURE__ */ p(ve, { className: "w-4 h-4 mr-2" }), x("bigconsole.parsers.builder.actions.runTest", "Run Test")] })
811
+ children: Xe ? /* @__PURE__ */ m(f, { children: [/* @__PURE__ */ p(u, { className: "w-4 h-4 mr-2 animate-spin" }), x("bigconsole.parsers.builder.actions.testing", "Testing...")] }) : /* @__PURE__ */ m(f, { children: [/* @__PURE__ */ p(be, { className: "w-4 h-4 mr-2" }), x("bigconsole.parsers.builder.actions.runTest", "Run Test")] })
796
812
  })
797
813
  }),
798
- (F || L) && /* @__PURE__ */ m(t, {
814
+ (Ye || L) && /* @__PURE__ */ m(t, {
799
815
  emphasis: "muted",
800
816
  padding: "compact",
801
817
  headingLevel: 3,
@@ -804,14 +820,14 @@ var b = i(function() {
804
820
  meta: L ? /* @__PURE__ */ m("span", {
805
821
  className: "inline-flex items-center gap-1 text-xs text-[var(--color-status-error-text)]",
806
822
  children: [
807
- /* @__PURE__ */ p(l, { className: "w-3 h-3" }),
823
+ /* @__PURE__ */ p(ue, { className: "w-3 h-3" }),
808
824
  " ",
809
825
  x("bigconsole.parsers.builder.test.failed", "Failed")
810
826
  ]
811
827
  }) : /* @__PURE__ */ m("span", {
812
828
  className: "inline-flex items-center gap-1 text-xs text-status-success-text",
813
829
  children: [
814
- /* @__PURE__ */ p(ue, { className: "w-3 h-3" }),
830
+ /* @__PURE__ */ p(fe, { className: "w-3 h-3" }),
815
831
  " ",
816
832
  x("bigconsole.parsers.builder.test.passed", "Passed")
817
833
  ]
@@ -819,7 +835,7 @@ var b = i(function() {
819
835
  "data-testid": "parser-test-output",
820
836
  children: [/* @__PURE__ */ p("pre", {
821
837
  className: "max-h-[150px] min-w-0 overflow-auto rounded-md bg-bg-canvas px-3 py-2.5 font-mono text-xs leading-relaxed text-text-primary",
822
- children: L || F
838
+ children: L || Ye
823
839
  }), z && !L && /* @__PURE__ */ m("p", {
824
840
  className: v,
825
841
  children: [
@@ -832,7 +848,7 @@ var b = i(function() {
832
848
  ]
833
849
  })]
834
850
  }),
835
- !F && !L && /* @__PURE__ */ p(t, {
851
+ !Ye && !L && /* @__PURE__ */ p(t, {
836
852
  emphasis: "muted",
837
853
  padding: "compact",
838
854
  headingLevel: 3,
@@ -854,13 +870,13 @@ var b = i(function() {
854
870
  headingLevel: 2,
855
871
  title: x("bigconsole.parsers.builder.review.cacheDurationLabel", "Cache Duration"),
856
872
  description: x("bigconsole.parsers.builder.review.cacheDurationHelper", "How long should data be cached before refreshing?"),
857
- icon: /* @__PURE__ */ p(be, { className: "h-icon-sm w-icon-sm" }),
873
+ icon: /* @__PURE__ */ p(Se, { className: "h-icon-sm w-icon-sm" }),
858
874
  meta: $,
859
875
  "data-testid": "parser-advanced-settings",
860
- children: /* @__PURE__ */ p(re, {
876
+ children: /* @__PURE__ */ p(ae, {
861
877
  value: k.ttl,
862
- onChange: bt,
863
- error: j.ttl,
878
+ onChange: kt,
879
+ error: M.ttl,
864
880
  hideLabel: !0
865
881
  })
866
882
  }), /* @__PURE__ */ p(t, {
@@ -874,9 +890,9 @@ var b = i(function() {
874
890
  children: [
875
891
  [x("bigconsole.parsers.builder.review.name", "Name"), k.name || "—"],
876
892
  [x("bigconsole.parsers.builder.review.outputKey", "Output Key"), k.outputKey || "—"],
877
- [x("bigconsole.parsers.builder.review.scope", "Scope"), O ? E === "default" ? x("bigconsole.parsers.builder.review.scopeGlobal", "Global") : dt.find((e) => e.id === E)?.name || E : x("bigconsole.parsers.builder.review.scopeDashboard", "Dashboard")],
893
+ [x("bigconsole.parsers.builder.review.scope", "Scope"), O ? E === "default" ? x("bigconsole.parsers.builder.review.scopeGlobal", "Global") : _t.find((e) => e.id === E)?.name || E : x("bigconsole.parsers.builder.review.scopeDashboard", "Dashboard")],
878
894
  [x("bigconsole.parsers.builder.review.type", "Type"), S[k.type].name],
879
- [x("bigconsole.parsers.builder.review.source", "Source"), Z || "—"]
895
+ [x("bigconsole.parsers.builder.review.source", "Source"), X || "—"]
880
896
  ].map(([e, t]) => /* @__PURE__ */ m("div", {
881
897
  className: "flex flex-wrap items-center justify-between gap-3 border-b border-[var(--color-border-subtle)] px-4 py-2.5 text-sm last:border-b-0",
882
898
  children: [/* @__PURE__ */ p("span", {
@@ -893,33 +909,33 @@ var b = i(function() {
893
909
  className: "sticky bottom-0 z-10 flex flex-col-reverse gap-control-gap border-t border-[var(--color-border-subtle)] bg-bg-canvas py-form-gap sm:flex-row sm:items-center sm:justify-between",
894
910
  children: [w === 0 ? /* @__PURE__ */ p(d, {
895
911
  type: "button",
896
- onClick: Q,
912
+ onClick: Z,
897
913
  variant: "secondary",
898
914
  className: "w-full sm:w-auto",
899
915
  children: x("bigconsole.parsers.builder.actions.cancel", "Cancel")
900
916
  }) : /* @__PURE__ */ m(d, {
901
917
  type: "button",
902
- onClick: Mt,
918
+ onClick: Bt,
903
919
  variant: "secondary",
904
920
  className: "w-full sm:w-auto",
905
- children: [/* @__PURE__ */ p(le, { className: "w-4 h-4 mr-2" }), x("bigconsole.parsers.builder.actions.back", "Back")]
906
- }), Pt ? /* @__PURE__ */ p(se, {
907
- permission: Re,
921
+ children: [/* @__PURE__ */ p(de, { className: "w-4 h-4 mr-2" }), x("bigconsole.parsers.builder.actions.back", "Back")]
922
+ }), Ht ? /* @__PURE__ */ p(ce, {
923
+ permission: Ve,
908
924
  deniedBehavior: "disable",
909
925
  children: /* @__PURE__ */ p(d, {
910
926
  type: "submit",
911
- disabled: !Ot || Ve || !Le,
927
+ disabled: !Lt || Ge || !Be,
912
928
  variant: "default",
913
929
  className: "w-full sm:w-auto",
914
- children: Ve ? /* @__PURE__ */ m(f, { children: [/* @__PURE__ */ p(u, { className: "w-4 h-4 mr-2 animate-spin" }), x("bigconsole.parsers.builder.actions.saving", "Saving...")] }) : /* @__PURE__ */ m(f, { children: [/* @__PURE__ */ p(ye, { className: "w-4 h-4 mr-2" }), D ? x("bigconsole.parsers.builder.actions.saveChanges", "Save Changes") : x("bigconsole.parsers.builder.actions.createParser", "Create Parser")] })
930
+ children: Ge ? /* @__PURE__ */ m(f, { children: [/* @__PURE__ */ p(u, { className: "w-4 h-4 mr-2 animate-spin" }), x("bigconsole.parsers.builder.actions.saving", "Saving...")] }) : /* @__PURE__ */ m(f, { children: [/* @__PURE__ */ p(xe, { className: "w-4 h-4 mr-2" }), D ? x("bigconsole.parsers.builder.actions.saveChanges", "Save Changes") : x("bigconsole.parsers.builder.actions.createParser", "Create Parser")] })
915
931
  })
916
932
  }) : /* @__PURE__ */ m(d, {
917
933
  type: "button",
918
- onClick: jt,
919
- disabled: !kt(w),
934
+ onClick: zt,
935
+ disabled: !Q(w),
920
936
  variant: "default",
921
937
  className: "w-full sm:w-auto",
922
- children: [x("bigconsole.parsers.builder.actions.next", "Next"), /* @__PURE__ */ p(fe, { className: "w-4 h-4 ml-2" })]
938
+ children: [x("bigconsole.parsers.builder.actions.next", "Next"), /* @__PURE__ */ p(me, { className: "w-4 h-4 ml-2" })]
923
939
  })]
924
940
  })
925
941
  ]