@burdenoff/microfe-bigconsole 2026.1011.10 → 2026.1012.1

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