@burdenoff/microfe-bigconsole 2026.1119.3 → 2026.1119.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (31) hide show
  1. package/dist/bigconsole/components/dashboard/PublishToStoreDialog.js +126 -80
  2. package/dist/bigconsole/components/parser/ParserSelector.js +150 -145
  3. package/dist/bigconsole/customWidget/CustomWidgetBuilderSheet.js +50 -49
  4. package/dist/bigconsole/customWidget/CustomWidgetProposalPanel.js +223 -201
  5. package/dist/bigconsole/customWidget/index.d.ts +2 -1
  6. package/dist/bigconsole/customWidget/index.js +1 -0
  7. package/dist/bigconsole/customWidget/proposalContract.d.ts +55 -1
  8. package/dist/bigconsole/customWidget/proposalContract.js +37 -14
  9. package/dist/bigconsole/customWidget/proposalPreviewData.d.ts +18 -0
  10. package/dist/bigconsole/customWidget/proposalPreviewData.js +70 -0
  11. package/dist/bigconsole/customWidget/proposalSource.d.ts +10 -0
  12. package/dist/bigconsole/customWidget/proposalSource.js +197 -51
  13. package/dist/bigconsole/graphql/storeTemplates.d.ts +1 -1
  14. package/dist/bigconsole/graphql/storeTemplates.js +5 -5
  15. package/dist/bigconsole/hooks/useParserOperations.js +80 -74
  16. package/dist/bigconsole/hooks/usePublishOwnerOptions.d.ts +10 -0
  17. package/dist/bigconsole/hooks/usePublishOwnerOptions.js +48 -0
  18. package/dist/bigconsole/hooks/useStoreDashboardTemplates.d.ts +8 -0
  19. package/dist/bigconsole/hooks/useStoreDashboardTemplates.js +3 -1
  20. package/dist/bigconsole/pages/ParserBuilderPage.js +540 -518
  21. package/dist/bigconsole/store/parserScope.d.ts +24 -0
  22. package/dist/bigconsole/store/parserScope.js +17 -0
  23. package/dist/bigconsole/store/parserStore.d.ts +3 -0
  24. package/dist/bigconsole/store/parserStore.js +70 -68
  25. package/dist/bigconsole/utils/publishOwner.d.ts +100 -0
  26. package/dist/bigconsole/utils/publishOwner.js +71 -0
  27. package/dist/generated/global-operations.d.ts +19 -0
  28. package/dist/generated/global-operations.js +80 -1
  29. package/dist/generated/wspace-operations.d.ts +10 -0
  30. package/dist/generated/wspace-operations.js +180 -110
  31. package/package.json +1 -1
@@ -1,36 +1,40 @@
1
- import { useAppNavigate as e } from "../contexts/NavigationContext.js";
2
1
  import "../contexts/index.js";
3
- import { Section as t, SectionStack as n } from "../components/common/Section.js";
4
- import { isDirty as ee, shouldReseedForm as te } from "../utils/formDirty.js";
5
- import { expressionGateAllows as ne, expressionGateState as re, isEditAttemptKey as ie, parserTestSignature as ae } from "../utils/parserTestGate.js";
6
- import oe from "../hooks/useParserOperations.js";
7
- import se from "../hooks/useDataSinkOperations.js";
8
- import ce from "../hooks/useDashboardOperations.js";
9
- import { CacheTTLSelector as le } from "../components/datasink/CacheTTLSelector.js";
10
- import { ExpressionEditor as ue } from "../components/parser/ExpressionEditor.js";
2
+ import { isDirty as e, shouldReseedForm as t } from "../utils/formDirty.js";
3
+ import { useAppNavigate as n } from "../contexts/NavigationContext.js";
4
+ import { expressionGateAllows as ee, expressionGateState as te, isEditAttemptKey as ne, parserTestSignature as re } from "../utils/parserTestGate.js";
5
+ import ie from "../hooks/useParserOperations.js";
6
+ import { Section as r, SectionStack as ae } from "../components/common/Section.js";
7
+ import { useParserStore as oe } from "../store/parserStore.js";
8
+ import "../store/parserScope.js";
9
+ import { GetParserScopeDashboardDocument as se } from "../../generated/wspace-operations.js";
10
+ import ce from "../hooks/useDataSinkOperations.js";
11
+ import le from "../hooks/useDashboardOperations.js";
12
+ import { CacheTTLSelector as ue } from "../components/datasink/CacheTTLSelector.js";
13
+ import { ExpressionEditor as de } from "../components/parser/ExpressionEditor.js";
11
14
  import "../components/common/index.js";
12
- import { BIGCONSOLE_PERMISSIONS as r } from "../../constants/permissions.js";
13
- import { memo as i, useCallback as a, useEffect as o, useMemo as s, useRef as de, useState as c } from "react";
14
- import { useParams as fe } from "react-router";
15
- import { AccessDenied as pe, PermissionButton as me } from "@burdenoff/fe-libs/shared/components";
16
- import { usePermissions as he } from "@burdenoff/fe-libs/shared/providers/shell";
17
- import { AlertCircle as l, ArrowLeft as ge, CheckCircle2 as _e, ChevronDown as ve, ChevronRight as ye, Code as be, Download as xe, Eye as Se, FileCode2 as Ce, LayoutDashboard as we, Loader2 as u, Play as Te, Save as Ee, Settings as De, Timer as Oe, X as ke } from "lucide-react";
18
- import { Button as d, PagePurpose as Ae, Stepper as je } from "@burdenoff/fe-libs/ui";
19
- import { useUnsavedChanges as Me } from "@burdenoff/fe-libs/shared/hooks";
20
- import { useI18n as Ne } from "@burdenoff/fe-libs/shared/providers/shell/I18nProvider";
21
- import { Fragment as f, jsx as p, jsxs as m } from "react/jsx-runtime";
15
+ import { BIGCONSOLE_PERMISSIONS as i } from "../../constants/permissions.js";
16
+ import { memo as a, useCallback as o, useEffect as s, useMemo as c, useRef as fe, useState as l } from "react";
17
+ import { useParams as pe } from "react-router";
18
+ import { AccessDenied as me, PermissionButton as he } from "@burdenoff/fe-libs/shared/components";
19
+ import { usePermissions as ge } from "@burdenoff/fe-libs/shared/providers/shell";
20
+ import { AlertCircle as u, ArrowLeft as _e, CheckCircle2 as ve, ChevronDown as ye, ChevronRight as be, Code as xe, Download as Se, Eye as Ce, FileCode2 as we, LayoutDashboard as Te, Loader2 as d, Play as Ee, Save as De, Settings as Oe, Timer as ke, X as Ae } from "lucide-react";
21
+ import { Button as f, PagePurpose as je, Stepper as Me } from "@burdenoff/fe-libs/ui";
22
+ import { useUnsavedChanges as Ne } from "@burdenoff/fe-libs/shared/hooks";
23
+ import { useI18n as Pe } from "@burdenoff/fe-libs/shared/providers/shell/I18nProvider";
24
+ import { useQuery as Fe } from "@apollo/client/react";
25
+ import { Fragment as p, jsx as m, jsxs as h } from "react/jsx-runtime";
22
26
  // src/bigconsole/pages/ParserBuilderPage.tsx
23
- var h = "w-full min-w-0 min-h-[44px] 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";
24
- function g(e = !1, t = "") {
25
- return `${h} ${e ? "border-status-error-border" : "border-[var(--color-border-default)]"} ${t}`.trim();
27
+ var g = "w-full min-w-0 min-h-[44px] 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";
28
+ function _(e = !1, t = "") {
29
+ return `${g} ${e ? "border-status-error-border" : "border-[var(--color-border-default)]"} ${t}`.trim();
26
30
  }
27
- var _ = "block text-sm font-medium text-text-primary mb-2", v = "text-xs text-text-muted mt-1.5", Pe = "text-xs text-status-error-text mt-1.5", Fe = 1e3, Ie = "220px", y = 25, Le = "default", Re = [
31
+ var v = "block text-sm font-medium text-text-primary mb-2", y = "text-xs text-text-muted mt-1.5", Ie = "text-xs text-status-error-text mt-1.5", Le = 1e3, Re = "220px", b = 25, ze = "default", Be = [
28
32
  "details",
29
33
  "source",
30
34
  "expression",
31
35
  "review"
32
36
  ];
33
- function ze(e) {
37
+ function Ve(e) {
34
38
  return [
35
39
  {
36
40
  key: "details",
@@ -54,14 +58,14 @@ function ze(e) {
54
58
  }
55
59
  ];
56
60
  }
57
- function Be(e) {
61
+ function He(e) {
58
62
  return e.toLowerCase().replace(/[^a-z0-9]+/g, "_").replace(/^_+|_+$/g, "").substring(0, 64);
59
63
  }
60
- function Ve(e, t) {
64
+ function Ue(e, t) {
61
65
  let n = {};
62
66
  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;
63
67
  }
64
- function He(e) {
68
+ function We(e) {
65
69
  return {
66
70
  jq: {
67
71
  name: e("bigconsole.parsers.builder.parserType.jq.name", "JQ"),
@@ -77,8 +81,11 @@ function He(e) {
77
81
  }
78
82
  };
79
83
  }
80
- var b = i(function() {
81
- let { parserId: i, consoleId: h } = fe(), b = e(), { t: x } = Ne(), Ue = s(() => ze(x), [x]), We = s(() => He(x), [x]), S = Ue.length, [C, w] = c(0), [T, Ge] = c(Le), Ke = h || T || Le, E = i !== "new" && !!i, { hasPermission: qe, isLoading: Je } = he(), Ye = qe(r.PARSER_READ), Xe = qe(E ? r.PARSER_UPDATE : r.PARSER_CREATE), Ze = E ? r.PARSER_UPDATE : r.PARSER_CREATE, Qe = qe(r.PARSER_TEST), D = !h, [O, k] = c({
84
+ var x = a(function() {
85
+ let { parserId: a, consoleId: g } = pe(), x = n(), { t: S } = Pe(), Ge = c(() => Ve(S), [S]), Ke = c(() => We(S), [S]), C = Ge.length, [w, T] = l(0), [E, qe] = l(ze), Je = g || E || ze, D = a !== "new" && !!a, { hasPermission: Ye, isLoading: Xe } = ge(), Ze = Ye(i.PARSER_READ), Qe = Ye(D ? i.PARSER_UPDATE : i.PARSER_CREATE), $e = D ? i.PARSER_UPDATE : i.PARSER_CREATE, et = Ye(i.PARSER_TEST), O = !g, tt = g && g !== "default" ? g : null, { data: nt } = Fe(se, {
86
+ variables: { id: tt ?? "" },
87
+ skip: !tt
88
+ }), k = nt?.getDashboard?.name ?? null, [A, j] = l({
82
89
  name: "",
83
90
  outputKey: "",
84
91
  description: "",
@@ -86,36 +93,36 @@ var b = i(function() {
86
93
  expression: "",
87
94
  inputSinkKey: "",
88
95
  ttl: 900
89
- }), [A, $e] = c(() => E ? null : O);
90
- Me({
96
+ }), [M, rt] = l(() => D ? null : A);
97
+ Ne({
91
98
  id: "parser-editor",
92
- label: x("bigconsole.assistant.unsaved.parserEditor", "the parser editor"),
93
- dirty: ee(O, A)
99
+ label: S("bigconsole.assistant.unsaved.parserEditor", "the parser editor"),
100
+ dirty: e(A, M)
94
101
  });
95
- let [j, M] = c({}), [et, tt] = c(!1), [nt, rt] = c(!1), [it, at] = c(null), [ot, N] = c("{\n \"data\": [\n {\"name\": \"Item 1\", \"count\": 10},\n {\"name\": \"Item 2\", \"count\": 20}\n ]\n}"), [st, P] = c(""), [ct, F] = c(null), [I, L] = c(null), [R, lt] = c(!1), [z, B] = c(null), [ut, dt] = c(null), [ft, pt] = c(null), [mt, V] = c(!1), [H, ht] = c(!1), [U, gt] = c(null), [_t, vt] = c(!1), W = de(O.inputSinkKey);
96
- o(() => {
97
- W.current = O.inputSinkKey;
98
- }, [O.inputSinkKey]);
99
- let [G, yt] = c(!1), [bt, xt] = c(null), [St, Ct] = c(!1), [wt, K] = c(null), [q, Tt] = c(null), { loading: Et, error: Dt, parsers: Ot, fetchParser: kt, createParser: At, updateParser: jt, testParserExpression: Mt } = oe({
100
- consoleId: Ke || "",
102
+ let [N, P] = l({}), [it, at] = l(!1), [ot, st] = l(!1), [ct, lt] = l(null), [ut, F] = l("{\n \"data\": [\n {\"name\": \"Item 1\", \"count\": 10},\n {\"name\": \"Item 2\", \"count\": 20}\n ]\n}"), [dt, I] = l(""), [ft, L] = l(null), [R, z] = l(null), [pt, mt] = l(!1), [B, V] = l(null), [ht, gt] = l(null), [_t, vt] = l(null), [yt, H] = l(!1), [U, bt] = l(!1), [W, xt] = l(null), [St, Ct] = l(!1), G = fe(A.inputSinkKey);
103
+ s(() => {
104
+ G.current = A.inputSinkKey;
105
+ }, [A.inputSinkKey]);
106
+ let [K, wt] = l(!1), [Tt, Et] = l(null), [Dt, Ot] = l(!1), [kt, q] = l(null), [J, At] = l(null), { loading: jt, error: Mt, fetchParser: Nt, createParser: Pt, updateParser: Ft, testParserExpression: It } = ie({
107
+ consoleId: Je || "",
101
108
  skipFetch: !0
102
- }), { dataSinks: J, fetchDataSinks: Nt, getDataSinkData: Pt } = se({ skipFetch: !0 }), { dashboards: Ft, fetchDashboards: It, loading: Lt } = ce(), Y = E ? Ot.find((e) => e.id === i) : null;
103
- o(() => {
104
- Nt(), E && i && kt(i), D && It();
109
+ }), { dataSinks: Lt, fetchDataSinks: Rt, getDataSinkData: zt } = ce({ skipFetch: !0 }), { dashboards: Bt, fetchDashboards: Vt, loading: Ht } = le(), Y = oe((e) => D && a ? e.parsers.get(a) : void 0) ?? null;
110
+ s(() => {
111
+ Rt(), D && a && Nt(a), O && Vt();
105
112
  }, [
106
- E,
107
- i,
108
- kt,
109
- Nt,
110
113
  D,
111
- It
114
+ a,
115
+ Nt,
116
+ Rt,
117
+ O,
118
+ Vt
112
119
  ]);
113
- let Rt = de(null), zt = de(O), Bt = de(A);
114
- o(() => {
115
- zt.current = O, Bt.current = A;
116
- }, [O, A]), o(() => {
117
- if (Y && te(Rt.current, Y.id, zt.current, Bt.current)) {
118
- Rt.current = Y.id;
120
+ let Ut = fe(null), Wt = fe(A), Gt = fe(M);
121
+ s(() => {
122
+ Wt.current = A, Gt.current = M;
123
+ }, [A, M]), s(() => {
124
+ if (Y && t(Ut.current, Y.id, Wt.current, Gt.current)) {
125
+ Ut.current = Y.id;
119
126
  let e = {
120
127
  name: Y.name || "",
121
128
  outputKey: Y.outputKey || "",
@@ -125,530 +132,545 @@ var b = i(function() {
125
132
  inputSinkKey: Y.inputSinkKey || "",
126
133
  ttl: Y.ttl ?? null
127
134
  };
128
- k(e), $e(e), tt(!0), dt(e.expression.trim() ? ae(e.type, e.expression) : null), Y.consoleId && Ge(Y.consoleId);
135
+ j(e), rt(e), at(!0), gt(e.expression.trim() ? re(e.type, e.expression) : null), Y.consoleId && qe(Y.consoleId);
129
136
  }
130
137
  }, [Y]);
131
- let X = s(() => J.find((e) => e.key === O.inputSinkKey)?.name || O.inputSinkKey, [J, O.inputSinkKey]), Vt = a((e) => {
138
+ let X = c(() => Lt.find((e) => e.key === A.inputSinkKey)?.name || A.inputSinkKey, [Lt, A.inputSinkKey]), Kt = o((e) => {
132
139
  let t = e.target.value;
133
- k((e) => ({
140
+ j((e) => ({
134
141
  ...e,
135
142
  name: t,
136
- outputKey: et ? e.outputKey : Be(t)
137
- })), M((e) => ({
143
+ outputKey: it ? e.outputKey : He(t)
144
+ })), P((e) => ({
138
145
  ...e,
139
146
  name: void 0
140
147
  }));
141
- }, [et]), Ht = a((e) => {
148
+ }, [it]), qt = o((e) => {
142
149
  let t = e.target.value.toLowerCase().replace(/[^a-z0-9_]/g, "");
143
- k((e) => ({
150
+ j((e) => ({
144
151
  ...e,
145
152
  outputKey: t
146
- })), tt(!0), M((e) => ({
153
+ })), at(!0), P((e) => ({
147
154
  ...e,
148
155
  outputKey: void 0
149
156
  }));
150
- }, []), Ut = a((e) => {
151
- k((t) => ({
157
+ }, []), Jt = o((e) => {
158
+ j((t) => ({
152
159
  ...t,
153
160
  description: e.target.value
154
161
  }));
155
- }, []), Wt = a((e) => {
156
- k((t) => ({
162
+ }, []), Yt = o((e) => {
163
+ j((t) => ({
157
164
  ...t,
158
165
  type: e
159
- })), P(""), L(null), F(null), pt(null);
160
- }, []), Gt = a((e) => {
161
- k((t) => ({
166
+ })), I(""), z(null), L(null), vt(null);
167
+ }, []), Xt = o((e) => {
168
+ j((t) => ({
162
169
  ...t,
163
170
  expression: e
164
- })), M((e) => ({
171
+ })), P((e) => ({
165
172
  ...e,
166
173
  expression: void 0
167
174
  }));
168
- }, []), Kt = a((e) => {
169
- k((t) => ({
175
+ }, []), Zt = o((e) => {
176
+ j((t) => ({
170
177
  ...t,
171
178
  inputSinkKey: e.target.value
172
- })), M((e) => ({
179
+ })), P((e) => ({
173
180
  ...e,
174
181
  inputSinkKey: void 0
175
- })), yt(!1), xt(null), Tt(null), K(null), H && (N(""), ht(!1), V(!1)), gt(null), P(""), L(null), B(null), F(null);
176
- }, [H]), qt = a((e) => {
177
- k((t) => ({
182
+ })), wt(!1), Et(null), At(null), q(null), U && (F(""), bt(!1), H(!1)), xt(null), I(""), z(null), V(null), L(null);
183
+ }, [U]), Qt = o((e) => {
184
+ j((t) => ({
178
185
  ...t,
179
186
  ttl: e
180
- })), M((e) => ({
187
+ })), P((e) => ({
181
188
  ...e,
182
189
  ttl: void 0
183
190
  }));
184
- }, []), Jt = a((e) => {
185
- Ge(e.target.value);
186
- }, []), Yt = a((e) => {
187
- N(e);
188
- }, []), Xt = a((e) => {
189
- H && ie(e) && V(!0);
190
- }, [H]), Zt = a(() => {
191
- H && V(!0);
192
- }, [H]), Qt = a(async () => {
193
- let e = O.inputSinkKey;
191
+ }, []), $t = o((e) => {
192
+ qe(e.target.value);
193
+ }, []), en = o((e) => {
194
+ F(e);
195
+ }, []), tn = o((e) => {
196
+ U && ne(e) && H(!0);
197
+ }, [U]), nn = o(() => {
198
+ U && H(!0);
199
+ }, [U]), rn = o(async () => {
200
+ let e = A.inputSinkKey;
194
201
  if (e) {
195
- vt(!0);
202
+ Ct(!0);
196
203
  try {
197
- let t = await Pt({ key: e }, { limit: y });
198
- if (W.current !== e) return;
199
- t?.raw !== void 0 && t?.raw !== null ? (N(JSON.stringify(t.raw, null, 2)), ht(!0), V(!1), gt({
204
+ let t = await zt({ key: e }, { limit: b });
205
+ if (G.current !== e) return;
206
+ t?.raw !== void 0 && t?.raw !== null ? (F(JSON.stringify(t.raw, null, 2)), bt(!0), H(!1), xt({
200
207
  total: t.totalCount ?? null,
201
208
  hasMore: t.hasMore ?? null,
202
209
  sinkName: X
203
- }), P(""), L(null), B(null), F(null)) : L(x("bigconsole.parsers.builder.errors.loadSampleFailed", "Could not load a sample from the selected DataSink."));
210
+ }), I(""), z(null), V(null), L(null)) : z(S("bigconsole.parsers.builder.errors.loadSampleFailed", "Could not load a sample from the selected DataSink."));
204
211
  } catch (t) {
205
- if (W.current !== e) return;
206
- L(t instanceof Error ? t.message : x("bigconsole.parsers.builder.errors.loadSampleDataFailed", "Failed to load sample data"));
212
+ if (G.current !== e) return;
213
+ z(t instanceof Error ? t.message : S("bigconsole.parsers.builder.errors.loadSampleDataFailed", "Failed to load sample data"));
207
214
  } finally {
208
- vt(!1);
215
+ Ct(!1);
209
216
  }
210
217
  }
211
218
  }, [
212
- O.inputSinkKey,
213
- Pt,
219
+ A.inputSinkKey,
220
+ zt,
214
221
  X,
215
- x
216
- ]), $t = a(() => {
217
- N(""), ht(!1), V(!1), gt(null), B(null), P(""), L(null), F(null);
218
- }, []), en = a(async () => {
219
- if (G) {
220
- yt(!1);
222
+ S
223
+ ]), an = o(() => {
224
+ F(""), bt(!1), H(!1), xt(null), V(null), I(""), z(null), L(null);
225
+ }, []), on = o(async () => {
226
+ if (K) {
227
+ wt(!1);
221
228
  return;
222
229
  }
223
- if (!O.inputSinkKey) {
224
- K(x("bigconsole.parsers.builder.errors.selectSourceFirst", "Please select a source DataSink first"));
230
+ if (!A.inputSinkKey) {
231
+ q(S("bigconsole.parsers.builder.errors.selectSourceFirst", "Please select a source DataSink first"));
225
232
  return;
226
233
  }
227
- yt(!0), Ct(!0), K(null);
228
- let e = O.inputSinkKey;
234
+ wt(!0), Ot(!0), q(null);
235
+ let e = A.inputSinkKey;
229
236
  try {
230
- let t = await Pt({ key: e }, { limit: y });
231
- if (W.current !== e) return;
232
- t?.raw !== void 0 && t?.raw !== null ? (xt(t.raw), Tt({
237
+ let t = await zt({ key: e }, { limit: b });
238
+ if (G.current !== e) return;
239
+ t?.raw !== void 0 && t?.raw !== null ? (Et(t.raw), At({
233
240
  total: t.totalCount ?? null,
234
241
  hasMore: t.hasMore ?? null,
235
242
  sinkName: X
236
- })) : K(x("bigconsole.parsers.builder.errors.noDataInSink", "No data available in selected DataSink"));
243
+ })) : q(S("bigconsole.parsers.builder.errors.noDataInSink", "No data available in selected DataSink"));
237
244
  } catch (t) {
238
- if (W.current !== e) return;
239
- K(t instanceof Error ? t.message : x("bigconsole.parsers.builder.errors.loadDataFailed", "Failed to load data"));
245
+ if (G.current !== e) return;
246
+ q(t instanceof Error ? t.message : S("bigconsole.parsers.builder.errors.loadDataFailed", "Failed to load data"));
240
247
  } finally {
241
- Ct(!1);
248
+ Ot(!1);
242
249
  }
243
250
  }, [
244
- G,
245
- O.inputSinkKey,
246
- Pt,
251
+ K,
252
+ A.inputSinkKey,
253
+ zt,
247
254
  X,
248
- x
249
- ]), tn = a(async () => {
250
- if (F(null), !O.expression.trim()) {
251
- L(x("bigconsole.parsers.builder.validation.expressionRequired", "Expression is required"));
255
+ S
256
+ ]), sn = o(async () => {
257
+ if (L(null), !A.expression.trim()) {
258
+ z(S("bigconsole.parsers.builder.validation.expressionRequired", "Expression is required"));
252
259
  return;
253
260
  }
254
261
  let e;
255
- if (H) e = {
256
- type: O.type,
257
- expression: O.expression,
258
- dataSinkKey: O.inputSinkKey,
259
- sampleLimit: y
262
+ if (U) e = {
263
+ type: A.type,
264
+ expression: A.expression,
265
+ dataSinkKey: A.inputSinkKey,
266
+ sampleLimit: b
260
267
  };
261
268
  else {
262
269
  let t;
263
270
  try {
264
- t = JSON.parse(ot);
271
+ t = JSON.parse(ut);
265
272
  } catch {
266
- L(x("bigconsole.parsers.builder.errors.invalidInputJson", "Input JSON is not valid JSON"));
273
+ z(S("bigconsole.parsers.builder.errors.invalidInputJson", "Input JSON is not valid JSON"));
267
274
  return;
268
275
  }
269
276
  e = {
270
- type: O.type,
271
- expression: O.expression,
277
+ type: A.type,
278
+ expression: A.expression,
272
279
  sampleData: t
273
280
  };
274
281
  }
275
- let t = ae(O.type, O.expression);
276
- lt(!0), L(null), P(""), B(null), dt(null), pt(t);
282
+ let t = re(A.type, A.expression);
283
+ mt(!0), z(null), I(""), V(null), gt(null), vt(t);
277
284
  try {
278
- let n = await Mt(e);
279
- n ? (F(n.executionTimeMs), n.success ? (P(JSON.stringify(n.output, null, 2)), dt(t), n.sampled && B({
285
+ let n = await It(e);
286
+ n ? (L(n.executionTimeMs), n.success ? (I(JSON.stringify(n.output, null, 2)), gt(t), n.sampled && V({
280
287
  sampledRows: n.sampledRows ?? null,
281
288
  totalRows: n.totalRows ?? null
282
- })) : L(n.error || x("bigconsole.parsers.builder.errors.testFailed", "Test failed"))) : L(x("bigconsole.parsers.builder.errors.testRequestFailed", "Test request failed — please try again."));
289
+ })) : z(n.error || S("bigconsole.parsers.builder.errors.testFailed", "Test failed"))) : z(S("bigconsole.parsers.builder.errors.testRequestFailed", "Test request failed — please try again."));
283
290
  } catch (e) {
284
- L(e instanceof Error ? e.message : x("bigconsole.parsers.builder.errors.testFailed", "Test failed"));
291
+ z(e instanceof Error ? e.message : S("bigconsole.parsers.builder.errors.testFailed", "Test failed"));
285
292
  } finally {
286
- lt(!1);
293
+ mt(!1);
287
294
  }
288
295
  }, [
289
- O.type,
290
- O.expression,
291
- O.inputSinkKey,
292
- ot,
293
- H,
294
- Mt,
295
- x
296
- ]), Z = a(() => {
297
- b(h ? `/dashboards/${h}/parsers` : "/parsers");
298
- }, [b, h]), nn = re({
299
- type: O.type,
300
- expression: O.expression,
301
- passedSignature: ut,
302
- canTest: Qe
303
- }), Q = ne(nn), rn = ft !== null && ft !== ae(O.type, O.expression), an = a(async () => {
304
- at(null);
305
- let e = Ve(O, x);
306
- if (Object.keys(e).length > 0) M(e), e.name || e.outputKey ? w(0) : e.inputSinkKey ? w(1) : e.expression && w(2);
307
- else if (!Q) w(2);
296
+ A.type,
297
+ A.expression,
298
+ A.inputSinkKey,
299
+ ut,
300
+ U,
301
+ It,
302
+ S
303
+ ]), Z = o(() => {
304
+ x(g ? `/dashboards/${g}/parsers` : "/parsers");
305
+ }, [x, g]), cn = te({
306
+ type: A.type,
307
+ expression: A.expression,
308
+ passedSignature: ht,
309
+ canTest: et
310
+ }), Q = ee(cn), ln = _t !== null && _t !== re(A.type, A.expression), un = o(async () => {
311
+ lt(null);
312
+ let e = Ue(A, S);
313
+ if (Object.keys(e).length > 0) P(e), e.name || e.outputKey ? T(0) : e.inputSinkKey ? T(1) : e.expression && T(2);
314
+ else if (!Q) T(2);
308
315
  else {
309
- rt(!0);
316
+ st(!0);
310
317
  try {
311
- if (E && Y) {
312
- if (!await jt(Y.id, {
313
- name: O.name,
314
- description: O.description || void 0,
315
- expression: O.expression,
316
- inputSinkKey: O.inputSinkKey,
317
- outputKey: O.outputKey,
318
- ttl: O.ttl
319
- }, Y.version)) throw Error(x("bigconsole.parsers.builder.errors.updateFailed", "Failed to update parser"));
320
- } else if (!await At({
321
- consoleId: Ke || "",
322
- name: O.name,
323
- type: O.type,
324
- expression: O.expression,
325
- inputSinkKey: O.inputSinkKey,
326
- outputKey: O.outputKey,
327
- description: O.description || void 0,
328
- ttl: O.ttl ?? void 0
329
- })) throw Error(x("bigconsole.parsers.builder.errors.createFailed", "Failed to create parser"));
330
- $e(O), Z();
318
+ if (D && Y) {
319
+ if (!await Ft(Y.id, {
320
+ name: A.name,
321
+ description: A.description || void 0,
322
+ expression: A.expression,
323
+ inputSinkKey: A.inputSinkKey,
324
+ outputKey: A.outputKey,
325
+ ttl: A.ttl
326
+ }, Y.version)) throw Error(S("bigconsole.parsers.builder.errors.updateFailed", "Failed to update parser"));
327
+ } else if (!await Pt({
328
+ consoleId: Je || "",
329
+ name: A.name,
330
+ type: A.type,
331
+ expression: A.expression,
332
+ inputSinkKey: A.inputSinkKey,
333
+ outputKey: A.outputKey,
334
+ description: A.description || void 0,
335
+ ttl: A.ttl ?? void 0
336
+ })) throw Error(S("bigconsole.parsers.builder.errors.createFailed", "Failed to create parser"));
337
+ rt(A), Z();
331
338
  } catch (e) {
332
- at(e instanceof Error ? e.message : x("bigconsole.parsers.builder.errors.saveFailed", "Failed to save parser"));
339
+ lt(e instanceof Error ? e.message : S("bigconsole.parsers.builder.errors.saveFailed", "Failed to save parser"));
333
340
  } finally {
334
- rt(!1);
341
+ st(!1);
335
342
  }
336
343
  }
337
344
  }, [
338
- O,
345
+ A,
339
346
  Q,
340
- E,
347
+ D,
341
348
  Y,
342
- At,
343
- jt,
344
- Ke,
349
+ Pt,
350
+ Ft,
351
+ Je,
345
352
  Z,
346
- x
347
- ]), on = s(() => O.name.trim().length >= 2 && O.expression.trim().length > 0 && Q && O.inputSinkKey.trim().length > 0 && O.outputKey.trim().length > 0 && /^[a-z0-9_]+$/.test(O.outputKey), [
348
- O.name,
349
- O.expression,
353
+ S
354
+ ]), dn = c(() => A.name.trim().length >= 2 && A.expression.trim().length > 0 && Q && A.inputSinkKey.trim().length > 0 && A.outputKey.trim().length > 0 && /^[a-z0-9_]+$/.test(A.outputKey), [
355
+ A.name,
356
+ A.expression,
350
357
  Q,
351
- O.inputSinkKey,
352
- O.outputKey
353
- ]), $ = a((e) => {
354
- switch (Re[e]) {
355
- case "details": return O.name.trim().length >= 2 && O.outputKey.trim().length > 0 && /^[a-z0-9_]+$/.test(O.outputKey);
356
- case "source": return O.inputSinkKey.trim().length > 0;
358
+ A.inputSinkKey,
359
+ A.outputKey
360
+ ]), $ = o((e) => {
361
+ switch (Be[e]) {
362
+ case "details": return A.name.trim().length >= 2 && A.outputKey.trim().length > 0 && /^[a-z0-9_]+$/.test(A.outputKey);
363
+ case "source": return A.inputSinkKey.trim().length > 0;
357
364
  case "expression": return Q;
358
365
  default: return !0;
359
366
  }
360
367
  }, [
361
- O.name,
362
- O.outputKey,
363
- O.inputSinkKey,
368
+ A.name,
369
+ A.outputKey,
370
+ A.inputSinkKey,
364
371
  Q
365
- ]), sn = a((e) => {
366
- let t = Math.max(0, Math.min(e, S - 1));
367
- if (t > C) {
368
- for (let e = C; e < t; e++) if (!$(e)) return;
372
+ ]), fn = o((e) => {
373
+ let t = Math.max(0, Math.min(e, C - 1));
374
+ if (t > w) {
375
+ for (let e = w; e < t; e++) if (!$(e)) return;
369
376
  }
370
- w(t);
377
+ T(t);
371
378
  }, [
372
- C,
379
+ w,
373
380
  $,
374
- S
375
- ]), cn = a(() => {
376
- $(C) && w(Math.min(C + 1, S - 1));
381
+ C
382
+ ]), pn = o(() => {
383
+ $(w) && T(Math.min(w + 1, C - 1));
377
384
  }, [
378
- C,
385
+ w,
379
386
  $,
380
- S
381
- ]), ln = a(() => {
382
- w((e) => Math.max(e - 1, 0));
387
+ C
388
+ ]), mn = o(() => {
389
+ T((e) => Math.max(e - 1, 0));
383
390
  }, []);
384
- if (Et && E || Je) return /* @__PURE__ */ p("div", {
391
+ if (jt && D || Xe) return /* @__PURE__ */ m("div", {
385
392
  className: "flex items-center justify-center min-h-[400px]",
386
- children: /* @__PURE__ */ p(u, { className: "w-8 h-8 text-text-secondary animate-spin" })
393
+ children: /* @__PURE__ */ m(d, { className: "w-8 h-8 text-text-secondary animate-spin" })
387
394
  });
388
- if (E && !Ye) return /* @__PURE__ */ p(pe, {
389
- title: x("bigconsole.parsers.builder.accessDenied.title", "Access Denied"),
390
- description: x("bigconsole.parsers.builder.accessDenied.description", "You don't have permission to view this parser.")
395
+ if (D && !Ze) return /* @__PURE__ */ m(me, {
396
+ title: S("bigconsole.parsers.builder.accessDenied.title", "Access Denied"),
397
+ description: S("bigconsole.parsers.builder.accessDenied.description", "You don't have permission to view this parser.")
391
398
  });
392
- if (Dt) return /* @__PURE__ */ p("div", {
399
+ if (Mt) return /* @__PURE__ */ m("div", {
393
400
  className: "p-card-padding",
394
- children: /* @__PURE__ */ p(t, {
401
+ children: /* @__PURE__ */ m(r, {
395
402
  tone: "danger",
396
403
  headingLevel: 2,
397
- title: x("bigconsole.parsers.builder.errors.loadParserFailed", "Failed to load Parser"),
404
+ title: S("bigconsole.parsers.builder.errors.loadParserFailed", "Failed to load Parser"),
398
405
  description: "The parser could not be fetched, so the form cannot be filled in.",
399
- icon: /* @__PURE__ */ p(l, { className: "h-icon-md w-icon-md text-[var(--color-status-error-text)]" }),
400
- actions: /* @__PURE__ */ m(d, {
406
+ icon: /* @__PURE__ */ m(u, { className: "h-icon-md w-icon-md text-[var(--color-status-error-text)]" }),
407
+ actions: /* @__PURE__ */ h(f, {
401
408
  onClick: Z,
402
409
  variant: "secondary",
403
410
  size: "sm",
404
- children: [/* @__PURE__ */ p(ge, { className: "w-4 h-4 mr-2" }), x("bigconsole.parsers.builder.header.backToParsers", "Back to Parsers")]
411
+ children: [/* @__PURE__ */ m(_e, { className: "w-4 h-4 mr-2" }), S("bigconsole.parsers.builder.header.backToParsers", "Back to Parsers")]
405
412
  }),
406
413
  "data-testid": "parser-builder-load-error",
407
- children: /* @__PURE__ */ p("p", {
414
+ children: /* @__PURE__ */ m("p", {
408
415
  className: "font-mono text-xs break-words text-text-secondary",
409
- children: Dt.message
416
+ children: Mt.message
410
417
  })
411
418
  })
412
419
  });
413
- let un = We[O.type], dn = C === S - 1, fn = /* @__PURE__ */ p("span", {
420
+ let hn = Ke[A.type], gn = w === C - 1, _n = /* @__PURE__ */ m("span", {
414
421
  className: "text-xs font-medium text-text-muted",
415
- children: x("bigconsole.parsers.builder.header.stepCounter", "Step {{current}} of {{total}}", {
416
- current: C + 1,
417
- total: S
422
+ children: S("bigconsole.parsers.builder.header.stepCounter", "Step {{current}} of {{total}}", {
423
+ current: w + 1,
424
+ total: C
418
425
  })
419
426
  });
420
- return /* @__PURE__ */ p("div", {
427
+ return /* @__PURE__ */ m("div", {
421
428
  "data-tour": "bigconsole-parser-builder",
422
429
  className: "min-h-screen bg-bg-canvas",
423
- children: /* @__PURE__ */ p("div", {
430
+ children: /* @__PURE__ */ m("div", {
424
431
  className: "max-w-4xl mx-auto p-card-padding pb-10",
425
- children: /* @__PURE__ */ m(n, { children: [
426
- /* @__PURE__ */ m("div", {
432
+ children: /* @__PURE__ */ h(ae, { children: [
433
+ /* @__PURE__ */ h("div", {
427
434
  className: "border-b border-[var(--color-border-subtle)] pb-form-gap",
428
435
  children: [
429
- /* @__PURE__ */ m(d, {
436
+ /* @__PURE__ */ h(f, {
430
437
  onClick: Z,
431
438
  variant: "ghost",
432
439
  size: "sm",
433
440
  className: "mb-4",
434
- children: [/* @__PURE__ */ p(ge, { className: "w-4 h-4 mr-2" }), x("bigconsole.parsers.builder.header.backToParsers", "Back to Parsers")]
441
+ children: [/* @__PURE__ */ m(_e, { className: "w-4 h-4 mr-2" }), S("bigconsole.parsers.builder.header.backToParsers", "Back to Parsers")]
435
442
  }),
436
- /* @__PURE__ */ p("h1", {
443
+ /* @__PURE__ */ m("h1", {
437
444
  className: "text-2xl font-bold text-text-primary sm:text-3xl",
438
- children: E ? x("bigconsole.parsers.builder.header.editTitle", "Edit Parser") : x("bigconsole.parsers.builder.header.createTitle", "Create Parser")
445
+ children: D ? S("bigconsole.parsers.builder.header.editTitle", "Edit Parser") : S("bigconsole.parsers.builder.header.createTitle", "Create Parser")
439
446
  }),
440
- /* @__PURE__ */ p("p", {
447
+ /* @__PURE__ */ m("p", {
441
448
  className: "text-sm text-text-secondary mt-1",
442
- children: x("bigconsole.parsers.builder.header.subtitle", "Transform data using JQ or JSONata expressions.")
449
+ children: S("bigconsole.parsers.builder.header.subtitle", "Transform data using JQ or JSONata expressions.")
443
450
  })
444
451
  ]
445
452
  }),
446
- /* @__PURE__ */ p(Ae, {
453
+ /* @__PURE__ */ m(je, {
447
454
  className: "max-w-[80ch]",
448
- 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.")
455
+ children: S("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.")
449
456
  }),
450
- /* @__PURE__ */ p("div", {
457
+ /* @__PURE__ */ m("div", {
451
458
  className: "min-w-0 overflow-x-auto",
452
- children: /* @__PURE__ */ p(je, {
453
- steps: Ue,
454
- active: C,
455
- onStepClick: sn
459
+ children: /* @__PURE__ */ m(Me, {
460
+ steps: Ge,
461
+ active: w,
462
+ onStepClick: fn
456
463
  })
457
464
  }),
458
- it && /* @__PURE__ */ p(t, {
465
+ tt && /* @__PURE__ */ m(r, {
466
+ tone: "info",
467
+ padding: "compact",
468
+ headingLevel: 2,
469
+ title: D ? k ? S("bigconsole.parsers.builder.scopeBanner.editTitleNamed", "This parser is only available in dashboard \"{{name}}\"", { name: k }) : S("bigconsole.parsers.builder.scopeBanner.editTitle", "This parser is only available in this dashboard") : k ? S("bigconsole.parsers.builder.scopeBanner.titleNamed", "This parser will only be available in dashboard \"{{name}}\"", { name: k }) : S("bigconsole.parsers.builder.scopeBanner.title", "This parser will only be available in this dashboard"),
470
+ icon: /* @__PURE__ */ m(Te, {
471
+ "aria-hidden": "true",
472
+ className: "h-icon-sm w-icon-sm"
473
+ }),
474
+ "data-testid": "parser-scope-banner",
475
+ children: /* @__PURE__ */ m("p", {
476
+ className: "m-0 text-sm text-text-secondary",
477
+ children: S("bigconsole.parsers.builder.scopeBanner.description", "Other dashboards cannot use it, and the scope cannot be changed after creation. To reuse a parser everywhere, create it from Data → Parsers with the Global scope.")
478
+ })
479
+ }),
480
+ ct && /* @__PURE__ */ m(r, {
459
481
  tone: "danger",
460
482
  headingLevel: 2,
461
- title: x("bigconsole.parsers.builder.errors.saveParserFailed", "Failed to save Parser"),
462
- icon: /* @__PURE__ */ p(l, { className: "h-icon-sm w-icon-sm text-[var(--color-status-error-text)]" }),
483
+ title: S("bigconsole.parsers.builder.errors.saveParserFailed", "Failed to save Parser"),
484
+ icon: /* @__PURE__ */ m(u, { className: "h-icon-sm w-icon-sm text-[var(--color-status-error-text)]" }),
463
485
  "data-testid": "parser-submit-error",
464
- children: /* @__PURE__ */ p("p", {
486
+ children: /* @__PURE__ */ m("p", {
465
487
  className: "font-mono text-xs break-words text-text-secondary",
466
- children: it
488
+ children: ct
467
489
  })
468
490
  }),
469
- /* @__PURE__ */ m("form", {
491
+ /* @__PURE__ */ h("form", {
470
492
  className: "flex flex-col gap-section-gap",
471
493
  onSubmit: (e) => {
472
- e.preventDefault(), dn && an();
494
+ e.preventDefault(), gn && un();
473
495
  },
474
496
  children: [
475
- C === 0 && /* @__PURE__ */ m(t, {
497
+ w === 0 && /* @__PURE__ */ h(r, {
476
498
  emphasis: "primary",
477
499
  headingLevel: 2,
478
500
  title: "Basic information",
479
501
  description: "Essential details for your parser.",
480
- icon: /* @__PURE__ */ p(Ce, { className: "h-icon-sm w-icon-sm" }),
481
- meta: fn,
502
+ icon: /* @__PURE__ */ m(we, { className: "h-icon-sm w-icon-sm" }),
503
+ meta: _n,
482
504
  bodyClassName: "space-y-5",
483
505
  "data-testid": "parser-basic-information",
484
506
  children: [
485
- /* @__PURE__ */ m("div", {
507
+ /* @__PURE__ */ h("div", {
486
508
  className: "grid gap-5 sm:grid-cols-2",
487
- children: [/* @__PURE__ */ m("div", { children: [
488
- /* @__PURE__ */ m("label", {
509
+ children: [/* @__PURE__ */ h("div", { children: [
510
+ /* @__PURE__ */ h("label", {
489
511
  htmlFor: "name",
490
- className: _,
512
+ className: v,
491
513
  children: [
492
- x("bigconsole.parsers.builder.fields.name.label", "Name"),
514
+ S("bigconsole.parsers.builder.fields.name.label", "Name"),
493
515
  " ",
494
- /* @__PURE__ */ p("span", {
516
+ /* @__PURE__ */ m("span", {
495
517
  className: "text-status-error-text",
496
518
  children: "*"
497
519
  })
498
520
  ]
499
521
  }),
500
- /* @__PURE__ */ p("input", {
522
+ /* @__PURE__ */ m("input", {
501
523
  id: "name",
502
524
  type: "text",
503
- value: O.name,
504
- onChange: Vt,
505
- placeholder: x("bigconsole.parsers.builder.fields.name.placeholder", "e.g., User Analytics Parser"),
506
- "aria-invalid": !!j.name,
507
- "aria-describedby": j.name ? "name-error" : void 0,
508
- className: g(!!j.name)
525
+ value: A.name,
526
+ onChange: Kt,
527
+ placeholder: S("bigconsole.parsers.builder.fields.name.placeholder", "e.g., User Analytics Parser"),
528
+ "aria-invalid": !!N.name,
529
+ "aria-describedby": N.name ? "name-error" : void 0,
530
+ className: _(!!N.name)
509
531
  }),
510
- j.name && /* @__PURE__ */ p("p", {
532
+ N.name && /* @__PURE__ */ m("p", {
511
533
  id: "name-error",
512
- className: Pe,
513
- children: j.name
534
+ className: Ie,
535
+ children: N.name
514
536
  })
515
- ] }), /* @__PURE__ */ m("div", { children: [
516
- /* @__PURE__ */ m("label", {
537
+ ] }), /* @__PURE__ */ h("div", { children: [
538
+ /* @__PURE__ */ h("label", {
517
539
  htmlFor: "outputKey",
518
- className: _,
540
+ className: v,
519
541
  children: [
520
- x("bigconsole.parsers.builder.fields.outputKey.label", "Output Key"),
542
+ S("bigconsole.parsers.builder.fields.outputKey.label", "Output Key"),
521
543
  " ",
522
- /* @__PURE__ */ p("span", {
544
+ /* @__PURE__ */ m("span", {
523
545
  className: "text-status-error-text",
524
546
  children: "*"
525
547
  })
526
548
  ]
527
549
  }),
528
- /* @__PURE__ */ p("input", {
550
+ /* @__PURE__ */ m("input", {
529
551
  id: "outputKey",
530
552
  type: "text",
531
- value: O.outputKey,
532
- onChange: Ht,
553
+ value: A.outputKey,
554
+ onChange: qt,
533
555
  placeholder: "user_analytics_parser",
534
- disabled: E,
535
- "aria-invalid": !!j.outputKey,
536
- "aria-describedby": [j.outputKey ? "outputKey-error" : "", E ? "" : "outputKey-hint"].filter(Boolean).join(" ") || void 0,
537
- className: g(!!j.outputKey, "font-mono")
556
+ disabled: D,
557
+ "aria-invalid": !!N.outputKey,
558
+ "aria-describedby": [N.outputKey ? "outputKey-error" : "", D ? "" : "outputKey-hint"].filter(Boolean).join(" ") || void 0,
559
+ className: _(!!N.outputKey, "font-mono")
538
560
  }),
539
- j.outputKey && /* @__PURE__ */ p("p", {
561
+ N.outputKey && /* @__PURE__ */ m("p", {
540
562
  id: "outputKey-error",
541
- className: Pe,
542
- children: j.outputKey
563
+ className: Ie,
564
+ children: N.outputKey
543
565
  }),
544
- !E && /* @__PURE__ */ p("p", {
566
+ !D && /* @__PURE__ */ m("p", {
545
567
  id: "outputKey-hint",
546
- className: v,
547
- children: x("bigconsole.parsers.builder.fields.outputKey.helper", "Auto-generated from name. Customize if needed.")
568
+ className: y,
569
+ children: S("bigconsole.parsers.builder.fields.outputKey.helper", "Auto-generated from name. Customize if needed.")
548
570
  })
549
571
  ] })]
550
572
  }),
551
- /* @__PURE__ */ m("div", { children: [
552
- /* @__PURE__ */ p("label", {
573
+ /* @__PURE__ */ h("div", { children: [
574
+ /* @__PURE__ */ m("label", {
553
575
  htmlFor: "description",
554
- className: _,
555
- children: x("bigconsole.parsers.builder.fields.description.label", "Description")
576
+ className: v,
577
+ children: S("bigconsole.parsers.builder.fields.description.label", "Description")
556
578
  }),
557
- /* @__PURE__ */ p("textarea", {
579
+ /* @__PURE__ */ m("textarea", {
558
580
  id: "description",
559
- value: O.description,
560
- onChange: Ut,
561
- placeholder: x("bigconsole.parsers.builder.fields.description.placeholder", "Describe what this parser does..."),
581
+ value: A.description,
582
+ onChange: Jt,
583
+ placeholder: S("bigconsole.parsers.builder.fields.description.placeholder", "Describe what this parser does..."),
562
584
  rows: 3,
563
- maxLength: Fe,
585
+ maxLength: Le,
564
586
  "aria-describedby": "description-count",
565
- className: g(!1, "resize-y")
587
+ className: _(!1, "resize-y")
566
588
  }),
567
- /* @__PURE__ */ p("p", {
589
+ /* @__PURE__ */ m("p", {
568
590
  id: "description-count",
569
- className: `${v} text-right tabular-nums`,
570
- children: x("bigconsole.parsers.builder.fields.description.characterCount", "{{current}} / {{max}} characters", {
571
- current: O.description.length,
572
- max: Fe
591
+ className: `${y} text-right tabular-nums`,
592
+ children: S("bigconsole.parsers.builder.fields.description.characterCount", "{{current}} / {{max}} characters", {
593
+ current: A.description.length,
594
+ max: Le
573
595
  })
574
596
  })
575
597
  ] }),
576
- D && /* @__PURE__ */ m("div", { children: [
577
- /* @__PURE__ */ m("label", {
598
+ O && /* @__PURE__ */ h("div", { children: [
599
+ /* @__PURE__ */ h("label", {
578
600
  htmlFor: "dashboard",
579
- className: `${_} flex items-center gap-2`,
580
- children: [/* @__PURE__ */ p(we, {
601
+ className: `${v} flex items-center gap-2`,
602
+ children: [/* @__PURE__ */ m(Te, {
581
603
  "aria-hidden": "true",
582
604
  className: "w-4 h-4"
583
- }), x("bigconsole.parsers.builder.fields.dashboard.label", "Dashboard Scope")]
605
+ }), S("bigconsole.parsers.builder.fields.dashboard.label", "Dashboard Scope")]
584
606
  }),
585
- /* @__PURE__ */ m("select", {
607
+ /* @__PURE__ */ h("select", {
586
608
  id: "dashboard",
587
- value: T,
588
- onChange: Jt,
589
- disabled: Lt || E,
590
- className: g(),
591
- children: [/* @__PURE__ */ p("option", {
609
+ value: E,
610
+ onChange: $t,
611
+ disabled: Ht || D,
612
+ className: _(),
613
+ children: [/* @__PURE__ */ m("option", {
592
614
  value: "default",
593
- children: x("bigconsole.parsers.builder.fields.dashboard.globalOption", "Global (available everywhere)")
594
- }), Ft.map((e) => /* @__PURE__ */ p("option", {
615
+ children: S("bigconsole.parsers.builder.fields.dashboard.globalOption", "Global (available everywhere)")
616
+ }), Bt.map((e) => /* @__PURE__ */ m("option", {
595
617
  value: e.id,
596
618
  children: e.name
597
619
  }, e.id))]
598
620
  }),
599
- /* @__PURE__ */ p("p", {
600
- className: v,
601
- children: E ? x("bigconsole.parsers.builder.fields.dashboard.helperLocked", "Dashboard scope cannot be changed after creation.") : T === "default" ? x("bigconsole.parsers.builder.fields.dashboard.helperGlobal", "Global parsers are available across all dashboards.") : x("bigconsole.parsers.builder.fields.dashboard.helperScoped", "This parser will only be available in the selected dashboard.")
621
+ /* @__PURE__ */ m("p", {
622
+ className: y,
623
+ children: D ? S("bigconsole.parsers.builder.fields.dashboard.helperLocked", "Dashboard scope cannot be changed after creation.") : E === "default" ? S("bigconsole.parsers.builder.fields.dashboard.helperGlobal", "Global parsers are available across all dashboards.") : S("bigconsole.parsers.builder.fields.dashboard.helperScoped", "This parser will only be available in the selected dashboard.")
602
624
  })
603
625
  ] })
604
626
  ]
605
627
  }),
606
- C === 1 && /* @__PURE__ */ m(t, {
628
+ w === 1 && /* @__PURE__ */ h(r, {
607
629
  emphasis: "primary",
608
630
  headingLevel: 2,
609
631
  title: "Parser configuration",
610
632
  description: "Pick the language and point it at a source.",
611
- icon: /* @__PURE__ */ p(be, { className: "h-icon-sm w-icon-sm" }),
612
- meta: fn,
633
+ icon: /* @__PURE__ */ m(xe, { className: "h-icon-sm w-icon-sm" }),
634
+ meta: _n,
613
635
  bodyClassName: "space-y-5",
614
636
  "data-testid": "parser-configuration",
615
- children: [/* @__PURE__ */ m("fieldset", {
637
+ children: [/* @__PURE__ */ h("fieldset", {
616
638
  className: "min-w-0 border-0 p-0 m-0",
617
- children: [/* @__PURE__ */ m("legend", {
639
+ children: [/* @__PURE__ */ h("legend", {
618
640
  className: "mb-3 text-sm font-medium text-text-primary",
619
641
  children: [
620
- x("bigconsole.parsers.builder.fields.parserType.label", "Parser Type"),
642
+ S("bigconsole.parsers.builder.fields.parserType.label", "Parser Type"),
621
643
  " ",
622
- /* @__PURE__ */ p("span", {
644
+ /* @__PURE__ */ m("span", {
623
645
  className: "text-status-error-text",
624
646
  children: "*"
625
647
  })
626
648
  ]
627
- }), /* @__PURE__ */ p("div", {
649
+ }), /* @__PURE__ */ m("div", {
628
650
  className: "space-y-2",
629
- children: Object.keys(We).map((e) => {
630
- let t = We[e];
631
- return /* @__PURE__ */ m("label", {
651
+ children: Object.keys(Ke).map((e) => {
652
+ let t = Ke[e];
653
+ return /* @__PURE__ */ h("label", {
632
654
  className: `
633
655
  flex items-start gap-3 p-3
634
656
  rounded-md border
635
657
  cursor-pointer
636
658
  motion-safe:transition-colors
637
- ${O.type === e ? "border-action-primary-bg bg-action-primary-bg/5" : "border-transparent bg-bg-sunken hover:border-[var(--color-border-subtle)]"}
659
+ ${A.type === e ? "border-action-primary-bg bg-action-primary-bg/5" : "border-transparent bg-bg-sunken hover:border-[var(--color-border-subtle)]"}
638
660
  `,
639
- children: [/* @__PURE__ */ p("input", {
661
+ children: [/* @__PURE__ */ m("input", {
640
662
  type: "radio",
641
663
  name: "parserType",
642
664
  value: e,
643
- checked: O.type === e,
644
- onChange: () => Wt(e),
665
+ checked: A.type === e,
666
+ onChange: () => Yt(e),
645
667
  className: "mt-1 w-4 h-4 text-action-primary-bg"
646
- }), /* @__PURE__ */ m("span", {
668
+ }), /* @__PURE__ */ h("span", {
647
669
  className: "min-w-0",
648
- children: [/* @__PURE__ */ p("span", {
670
+ children: [/* @__PURE__ */ m("span", {
649
671
  className: "block text-sm font-medium text-text-primary",
650
672
  children: t.name
651
- }), /* @__PURE__ */ p("span", {
673
+ }), /* @__PURE__ */ m("span", {
652
674
  className: "mt-0.5 block text-xs text-text-secondary",
653
675
  children: t.description
654
676
  })]
@@ -656,60 +678,60 @@ var b = i(function() {
656
678
  }, e);
657
679
  })
658
680
  })]
659
- }), /* @__PURE__ */ m("div", { children: [
660
- /* @__PURE__ */ m("label", {
681
+ }), /* @__PURE__ */ h("div", { children: [
682
+ /* @__PURE__ */ h("label", {
661
683
  htmlFor: "inputSinkKey",
662
- className: _,
684
+ className: v,
663
685
  children: [
664
- x("bigconsole.parsers.builder.fields.sourceDataSink.label", "Source DataSink"),
686
+ S("bigconsole.parsers.builder.fields.sourceDataSink.label", "Source DataSink"),
665
687
  " ",
666
- /* @__PURE__ */ p("span", {
688
+ /* @__PURE__ */ m("span", {
667
689
  className: "text-status-error-text",
668
690
  children: "*"
669
691
  })
670
692
  ]
671
693
  }),
672
- /* @__PURE__ */ m("select", {
694
+ /* @__PURE__ */ h("select", {
673
695
  id: "inputSinkKey",
674
- value: O.inputSinkKey,
675
- onChange: Kt,
676
- "aria-invalid": !!j.inputSinkKey,
677
- "aria-describedby": j.inputSinkKey ? "inputSinkKey-error" : void 0,
678
- className: g(!!j.inputSinkKey),
679
- children: [/* @__PURE__ */ p("option", {
696
+ value: A.inputSinkKey,
697
+ onChange: Zt,
698
+ "aria-invalid": !!N.inputSinkKey,
699
+ "aria-describedby": N.inputSinkKey ? "inputSinkKey-error" : void 0,
700
+ className: _(!!N.inputSinkKey),
701
+ children: [/* @__PURE__ */ m("option", {
680
702
  value: "",
681
- children: x("bigconsole.parsers.builder.fields.sourceDataSink.placeholder", "Select a DataSink...")
682
- }), J.map((e) => /* @__PURE__ */ p("option", {
703
+ children: S("bigconsole.parsers.builder.fields.sourceDataSink.placeholder", "Select a DataSink...")
704
+ }), Lt.map((e) => /* @__PURE__ */ m("option", {
683
705
  value: e.key,
684
706
  children: e.name || e.key
685
707
  }, e.id))]
686
708
  }),
687
- j.inputSinkKey && /* @__PURE__ */ p("p", {
709
+ N.inputSinkKey && /* @__PURE__ */ m("p", {
688
710
  id: "inputSinkKey-error",
689
- className: Pe,
690
- children: j.inputSinkKey
711
+ className: Ie,
712
+ children: N.inputSinkKey
691
713
  }),
692
- J.length === 0 ? /* @__PURE__ */ p("p", {
693
- className: v,
694
- children: x("bigconsole.parsers.builder.fields.sourceDataSink.emptyState", "No DataSinks yet — create one first, then return here to build a parser for it.")
695
- }) : /* @__PURE__ */ p("p", {
696
- className: v,
714
+ Lt.length === 0 ? /* @__PURE__ */ m("p", {
715
+ className: y,
716
+ children: S("bigconsole.parsers.builder.fields.sourceDataSink.emptyState", "No DataSinks yet — create one first, then return here to build a parser for it.")
717
+ }) : /* @__PURE__ */ m("p", {
718
+ className: y,
697
719
  children: "Select the data source for this parser to transform."
698
720
  }),
699
- O.inputSinkKey && /* @__PURE__ */ m("div", {
721
+ A.inputSinkKey && /* @__PURE__ */ h("div", {
700
722
  className: "mt-3",
701
- children: [/* @__PURE__ */ m("button", {
723
+ children: [/* @__PURE__ */ h("button", {
702
724
  type: "button",
703
- onClick: en,
704
- "aria-expanded": G,
725
+ onClick: on,
726
+ "aria-expanded": K,
705
727
  "aria-controls": "parser-data-preview",
706
728
  className: "inline-flex min-h-[44px] 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",
707
729
  children: [
708
- p(G ? ve : ye, { className: "w-4 h-4" }),
709
- /* @__PURE__ */ p(Se, { className: "w-4 h-4" }),
710
- x("bigconsole.parsers.builder.dataPreview.toggle", "Show Data Preview")
730
+ m(K ? ye : be, { className: "w-4 h-4" }),
731
+ /* @__PURE__ */ m(Ce, { className: "w-4 h-4" }),
732
+ S("bigconsole.parsers.builder.dataPreview.toggle", "Show Data Preview")
711
733
  ]
712
- }), G && /* @__PURE__ */ p(t, {
734
+ }), K && /* @__PURE__ */ m(r, {
713
735
  id: "parser-data-preview",
714
736
  emphasis: "muted",
715
737
  padding: "compact",
@@ -718,324 +740,324 @@ var b = i(function() {
718
740
  description: "A slice of the payload stored on the selected DataSink.",
719
741
  className: "mt-3",
720
742
  "data-testid": "parser-data-preview",
721
- children: St ? /* @__PURE__ */ m("div", {
743
+ children: Dt ? /* @__PURE__ */ h("div", {
722
744
  className: "flex items-center justify-center p-4",
723
- children: [/* @__PURE__ */ p(u, { className: "w-5 h-5 text-text-secondary animate-spin" }), /* @__PURE__ */ p("span", {
745
+ children: [/* @__PURE__ */ m(d, { className: "w-5 h-5 text-text-secondary animate-spin" }), /* @__PURE__ */ m("span", {
724
746
  className: "ml-2 text-sm text-text-secondary",
725
- children: x("bigconsole.parsers.builder.dataPreview.loading", "Loading sample…")
747
+ children: S("bigconsole.parsers.builder.dataPreview.loading", "Loading sample…")
726
748
  })]
727
- }) : wt ? /* @__PURE__ */ p("p", {
749
+ }) : kt ? /* @__PURE__ */ m("p", {
728
750
  className: "text-sm text-status-error-text",
729
- children: wt
730
- }) : bt ? /* @__PURE__ */ m(f, { children: [/* @__PURE__ */ p("pre", {
751
+ children: kt
752
+ }) : Tt ? /* @__PURE__ */ h(p, { children: [/* @__PURE__ */ m("pre", {
731
753
  className: "max-h-48 min-w-0 overflow-auto rounded-md bg-bg-canvas p-3 font-mono text-xs text-text-primary",
732
- children: JSON.stringify(bt, null, 2)
733
- }), q && /* @__PURE__ */ m("p", {
734
- className: v,
754
+ children: JSON.stringify(Tt, null, 2)
755
+ }), J && /* @__PURE__ */ h("p", {
756
+ className: y,
735
757
  children: [
736
- x("bigconsole.parsers.builder.dataPreview.previewingSample", "Previewing a sample"),
737
- q.total == null ? "" : x("bigconsole.parsers.builder.dataPreview.rowRange", " (first {{shown}} of {{total}} rows)", {
738
- shown: Math.min(y, q.total),
739
- total: q.total
758
+ S("bigconsole.parsers.builder.dataPreview.previewingSample", "Previewing a sample"),
759
+ J.total == null ? "" : S("bigconsole.parsers.builder.dataPreview.rowRange", " (first {{shown}} of {{total}} rows)", {
760
+ shown: Math.min(b, J.total),
761
+ total: J.total
740
762
  }),
741
763
  " · ",
742
- q.sinkName
764
+ J.sinkName
743
765
  ]
744
- })] }) : /* @__PURE__ */ p("p", {
766
+ })] }) : /* @__PURE__ */ m("p", {
745
767
  className: "text-center text-sm text-text-secondary",
746
- children: x("bigconsole.parsers.builder.dataPreview.noData", "No data available")
768
+ children: S("bigconsole.parsers.builder.dataPreview.noData", "No data available")
747
769
  })
748
770
  })]
749
771
  })
750
772
  ] })]
751
773
  }),
752
- C === 2 && /* @__PURE__ */ m(t, {
774
+ w === 2 && /* @__PURE__ */ h(r, {
753
775
  emphasis: "primary",
754
776
  headingLevel: 2,
755
777
  title: "Test expression",
756
778
  description: "Write the expression, then run it against sample data before you save.",
757
- icon: /* @__PURE__ */ p(Te, { className: "h-icon-sm w-icon-sm" }),
758
- meta: fn,
779
+ icon: /* @__PURE__ */ m(Ee, { className: "h-icon-sm w-icon-sm" }),
780
+ meta: _n,
759
781
  bodyClassName: "space-y-5",
760
782
  "data-testid": "parser-test-expression",
761
783
  children: [
762
- /* @__PURE__ */ m("div", { children: [
763
- /* @__PURE__ */ m("p", {
784
+ /* @__PURE__ */ h("div", { children: [
785
+ /* @__PURE__ */ h("p", {
764
786
  id: "expression-label",
765
- className: _,
787
+ className: v,
766
788
  children: [
767
- x("bigconsole.parsers.builder.fields.expression.label", "Expression"),
789
+ S("bigconsole.parsers.builder.fields.expression.label", "Expression"),
768
790
  " ",
769
- /* @__PURE__ */ p("span", {
791
+ /* @__PURE__ */ m("span", {
770
792
  className: "text-status-error-text",
771
793
  children: "*"
772
794
  })
773
795
  ]
774
796
  }),
775
- /* @__PURE__ */ p("div", {
797
+ /* @__PURE__ */ m("div", {
776
798
  role: "group",
777
799
  "aria-labelledby": "expression-label",
778
800
  "aria-describedby": "expression-hint",
779
- children: /* @__PURE__ */ p(ue, {
780
- value: O.expression,
781
- type: O.type,
782
- onChange: Gt,
783
- height: Ie,
784
- error: j.expression ?? null
801
+ children: /* @__PURE__ */ m(de, {
802
+ value: A.expression,
803
+ type: A.type,
804
+ onChange: Xt,
805
+ height: Re,
806
+ error: N.expression ?? null
785
807
  })
786
808
  }),
787
- /* @__PURE__ */ p("p", {
809
+ /* @__PURE__ */ m("p", {
788
810
  id: "expression-hint",
789
- className: v,
790
- children: x("bigconsole.parsers.builder.fields.expression.example", "Example: {{example}}", { example: un.example })
811
+ className: y,
812
+ children: S("bigconsole.parsers.builder.fields.expression.example", "Example: {{example}}", { example: hn.example })
791
813
  })
792
814
  ] }),
793
- /* @__PURE__ */ m("div", { children: [
794
- /* @__PURE__ */ m("div", {
815
+ /* @__PURE__ */ h("div", { children: [
816
+ /* @__PURE__ */ h("div", {
795
817
  className: "mb-2 flex flex-wrap items-center justify-between gap-control-gap",
796
- children: [/* @__PURE__ */ m("p", {
818
+ children: [/* @__PURE__ */ h("p", {
797
819
  id: "test-input-label",
798
- className: `${_} mb-0 flex flex-wrap items-center gap-2`,
799
- children: [x("bigconsole.parsers.builder.test.inputJsonLabel", "Input JSON"), /* @__PURE__ */ p("span", {
800
- className: `rounded border px-2 py-0.5 text-[10px] font-semibold uppercase tracking-wide ${H ? "text-action-primary-bg bg-action-primary-bg/10 border-action-primary-bg/30" : "text-text-secondary bg-bg-sunken border-[var(--color-border-subtle)]"}`,
801
- children: H ? x("bigconsole.parsers.builder.test.referenceMode", "Reference mode") : x("bigconsole.parsers.builder.test.sampleMode", "Sample mode")
820
+ className: `${v} mb-0 flex flex-wrap items-center gap-2`,
821
+ children: [S("bigconsole.parsers.builder.test.inputJsonLabel", "Input JSON"), /* @__PURE__ */ m("span", {
822
+ className: `rounded border px-2 py-0.5 text-[10px] font-semibold uppercase tracking-wide ${U ? "text-action-primary-bg bg-action-primary-bg/10 border-action-primary-bg/30" : "text-text-secondary bg-bg-sunken border-[var(--color-border-subtle)]"}`,
823
+ children: U ? S("bigconsole.parsers.builder.test.referenceMode", "Reference mode") : S("bigconsole.parsers.builder.test.sampleMode", "Sample mode")
802
824
  })]
803
- }), /* @__PURE__ */ m("div", {
825
+ }), /* @__PURE__ */ h("div", {
804
826
  className: "flex flex-wrap items-center gap-2",
805
- children: [O.inputSinkKey && !H && /* @__PURE__ */ m("button", {
827
+ children: [A.inputSinkKey && !U && /* @__PURE__ */ h("button", {
806
828
  type: "button",
807
- onClick: Qt,
808
- disabled: _t,
829
+ onClick: rn,
830
+ disabled: St,
809
831
  className: "inline-flex min-h-[44px] 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",
810
- children: [_t ? /* @__PURE__ */ p(u, { className: "w-3.5 h-3.5 animate-spin" }) : /* @__PURE__ */ p(xe, { className: "w-3.5 h-3.5" }), x("bigconsole.parsers.builder.actions.loadSample", "Load Sample")]
811
- }), H && /* @__PURE__ */ m("button", {
832
+ children: [St ? /* @__PURE__ */ m(d, { className: "w-3.5 h-3.5 animate-spin" }) : /* @__PURE__ */ m(Se, { className: "w-3.5 h-3.5" }), S("bigconsole.parsers.builder.actions.loadSample", "Load Sample")]
833
+ }), U && /* @__PURE__ */ h("button", {
812
834
  type: "button",
813
- onClick: $t,
835
+ onClick: an,
814
836
  className: "inline-flex min-h-[44px] 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",
815
- children: [/* @__PURE__ */ p(ke, { className: "w-3.5 h-3.5" }), x("bigconsole.parsers.builder.actions.clear", "Clear")]
837
+ children: [/* @__PURE__ */ m(Ae, { className: "w-3.5 h-3.5" }), S("bigconsole.parsers.builder.actions.clear", "Clear")]
816
838
  })]
817
839
  })]
818
840
  }),
819
- /* @__PURE__ */ p("div", {
841
+ /* @__PURE__ */ m("div", {
820
842
  role: "group",
821
843
  "aria-labelledby": "test-input-label",
822
844
  "aria-describedby": "test-input-hint",
823
- onKeyDownCapture: Xt,
824
- onPasteCapture: Zt,
825
- className: H ? "opacity-80" : void 0,
826
- children: /* @__PURE__ */ p(ue, {
827
- value: ot,
845
+ onKeyDownCapture: tn,
846
+ onPasteCapture: nn,
847
+ className: U ? "opacity-80" : void 0,
848
+ children: /* @__PURE__ */ m(de, {
849
+ value: ut,
828
850
  language: "json",
829
- onChange: Yt,
830
- readOnly: H,
831
- height: Ie
851
+ onChange: en,
852
+ readOnly: U,
853
+ height: Re
832
854
  })
833
855
  }),
834
- H && mt && /* @__PURE__ */ m("p", {
856
+ U && yt && /* @__PURE__ */ h("p", {
835
857
  role: "status",
836
858
  "data-testid": "parser-test-input-locked-notice",
837
859
  className: "mt-2 flex items-start gap-1.5 rounded-md border border-[var(--color-status-warning-border)] bg-[var(--color-status-warning-bgSubtle)] px-2.5 py-1.5 text-xs text-[var(--color-status-warning-text)]",
838
- children: [/* @__PURE__ */ p(l, {
860
+ children: [/* @__PURE__ */ m(u, {
839
861
  className: "mt-0.5 h-3.5 w-3.5 shrink-0",
840
862
  "aria-hidden": "true"
841
- }), x("bigconsole.parsers.builder.test.lockedNotice", "This sample is read-only in Reference mode — tests run against the source sink. Press Clear to type your own test input.")]
863
+ }), S("bigconsole.parsers.builder.test.lockedNotice", "This sample is read-only in Reference mode — tests run against the source sink. Press Clear to type your own test input.")]
842
864
  }),
843
- H && U ? /* @__PURE__ */ m("p", {
865
+ U && W ? /* @__PURE__ */ h("p", {
844
866
  id: "test-input-hint",
845
- className: v,
867
+ className: y,
846
868
  children: [
847
- x("bigconsole.parsers.builder.test.loadedSample", "Loaded a small sample"),
848
- U.total == null ? "" : x("bigconsole.parsers.builder.dataPreview.rowRange", " (first {{shown}} of {{total}} rows)", {
849
- shown: Math.min(y, U.total),
850
- total: U.total
869
+ S("bigconsole.parsers.builder.test.loadedSample", "Loaded a small sample"),
870
+ W.total == null ? "" : S("bigconsole.parsers.builder.dataPreview.rowRange", " (first {{shown}} of {{total}} rows)", {
871
+ shown: Math.min(b, W.total),
872
+ total: W.total
851
873
  }),
852
874
  " ",
853
- x("bigconsole.parsers.builder.test.loadedSampleFrom", "from {{sinkName}} · locked — press Clear to edit.", { sinkName: U.sinkName })
875
+ S("bigconsole.parsers.builder.test.loadedSampleFrom", "from {{sinkName}} · locked — press Clear to edit.", { sinkName: W.sinkName })
854
876
  ]
855
- }) : /* @__PURE__ */ p("p", {
877
+ }) : /* @__PURE__ */ m("p", {
856
878
  id: "test-input-hint",
857
- className: v,
858
- children: x("bigconsole.parsers.builder.test.inputHelper", "Type sample JSON to test against it, or Load a sample from the source.")
879
+ className: y,
880
+ children: S("bigconsole.parsers.builder.test.inputHelper", "Type sample JSON to test against it, or Load a sample from the source.")
859
881
  })
860
882
  ] }),
861
- /* @__PURE__ */ m("div", {
883
+ /* @__PURE__ */ h("div", {
862
884
  className: "flex items-center gap-3",
863
- children: [/* @__PURE__ */ p("div", {
885
+ children: [/* @__PURE__ */ m("div", {
864
886
  className: "min-w-0 flex-1",
865
- children: /* @__PURE__ */ p(me, {
866
- permission: r.PARSER_TEST,
887
+ children: /* @__PURE__ */ m(he, {
888
+ permission: i.PARSER_TEST,
867
889
  deniedBehavior: "disable",
868
- children: /* @__PURE__ */ p(d, {
890
+ children: /* @__PURE__ */ m(f, {
869
891
  type: "button",
870
- onClick: tn,
871
- disabled: R || !O.expression.trim(),
892
+ onClick: sn,
893
+ disabled: pt || !A.expression.trim(),
872
894
  variant: "default",
873
895
  className: "w-full min-h-[44px]",
874
- children: R ? /* @__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(Te, { className: "w-4 h-4 mr-2" }), x("bigconsole.parsers.builder.actions.runTest", "Run Test")] })
896
+ children: pt ? /* @__PURE__ */ h(p, { children: [/* @__PURE__ */ m(d, { className: "w-4 h-4 mr-2 animate-spin" }), S("bigconsole.parsers.builder.actions.testing", "Testing...")] }) : /* @__PURE__ */ h(p, { children: [/* @__PURE__ */ m(Ee, { className: "w-4 h-4 mr-2" }), S("bigconsole.parsers.builder.actions.runTest", "Run Test")] })
875
897
  })
876
898
  })
877
- }), ct !== null && !R && /* @__PURE__ */ m("span", {
899
+ }), ft !== null && !pt && /* @__PURE__ */ h("span", {
878
900
  className: "inline-flex items-center gap-1.5 whitespace-nowrap text-xs text-text-muted tabular-nums",
879
901
  "data-testid": "parser-test-duration",
880
- children: [/* @__PURE__ */ p(Oe, {
902
+ children: [/* @__PURE__ */ m(ke, {
881
903
  className: "w-3.5 h-3.5",
882
904
  "aria-hidden": "true"
883
- }), x("bigconsole.parsers.testPanel.executedIn", "Executed in {{ms}}ms", { ms: ct })]
905
+ }), S("bigconsole.parsers.testPanel.executedIn", "Executed in {{ms}}ms", { ms: ft })]
884
906
  })]
885
907
  }),
886
- nn === "untested" && !R && /* @__PURE__ */ p("p", {
887
- className: v,
908
+ cn === "untested" && !pt && /* @__PURE__ */ m("p", {
909
+ className: y,
888
910
  role: "status",
889
911
  "data-testid": "parser-test-gate",
890
- children: I && !rn ? x("bigconsole.parsers.builder.test.gateFailed", "The test failed. Fix the expression and run the test again to continue.") : x("bigconsole.parsers.builder.test.gateUntested", "Run a passing test of this expression to continue.")
912
+ children: R && !ln ? S("bigconsole.parsers.builder.test.gateFailed", "The test failed. Fix the expression and run the test again to continue.") : S("bigconsole.parsers.builder.test.gateUntested", "Run a passing test of this expression to continue.")
891
913
  }),
892
- nn === "untestable" && /* @__PURE__ */ m("p", {
914
+ cn === "untestable" && /* @__PURE__ */ h("p", {
893
915
  role: "status",
894
916
  "data-testid": "parser-test-gate",
895
917
  className: "flex items-start gap-1.5 rounded-md border border-[var(--color-status-warning-border)] bg-[var(--color-status-warning-bgSubtle)] px-2.5 py-1.5 text-xs text-[var(--color-status-warning-text)]",
896
- children: [/* @__PURE__ */ p(l, {
918
+ children: [/* @__PURE__ */ m(u, {
897
919
  className: "mt-0.5 h-3.5 w-3.5 shrink-0",
898
920
  "aria-hidden": "true"
899
- }), x("bigconsole.parsers.builder.test.gateUntestable", "You don’t have permission to run tests, so this expression has not been tested. Ask someone who can to test it before dashboards rely on it.")]
921
+ }), S("bigconsole.parsers.builder.test.gateUntestable", "You don’t have permission to run tests, so this expression has not been tested. Ask someone who can to test it before dashboards rely on it.")]
900
922
  }),
901
- (st || I) && /* @__PURE__ */ m(t, {
923
+ (dt || R) && /* @__PURE__ */ h(r, {
902
924
  emphasis: "muted",
903
925
  padding: "compact",
904
926
  headingLevel: 3,
905
- tone: I ? "danger" : "success",
906
- title: I ? x("bigconsole.parsers.builder.test.errorOutputLabel", "Error Output") : x("bigconsole.parsers.builder.test.outputLabel", "Output"),
907
- meta: I ? /* @__PURE__ */ m("span", {
927
+ tone: R ? "danger" : "success",
928
+ title: R ? S("bigconsole.parsers.builder.test.errorOutputLabel", "Error Output") : S("bigconsole.parsers.builder.test.outputLabel", "Output"),
929
+ meta: R ? /* @__PURE__ */ h("span", {
908
930
  className: "inline-flex items-center gap-1 text-xs text-[var(--color-status-error-text)]",
909
931
  children: [
910
- /* @__PURE__ */ p(l, { className: "w-3 h-3" }),
932
+ /* @__PURE__ */ m(u, { className: "w-3 h-3" }),
911
933
  " ",
912
- x("bigconsole.parsers.builder.test.failed", "Failed")
934
+ S("bigconsole.parsers.builder.test.failed", "Failed")
913
935
  ]
914
- }) : /* @__PURE__ */ m("span", {
936
+ }) : /* @__PURE__ */ h("span", {
915
937
  className: "inline-flex items-center gap-1 text-xs text-status-success-text",
916
938
  children: [
917
- /* @__PURE__ */ p(_e, { className: "w-3 h-3" }),
939
+ /* @__PURE__ */ m(ve, { className: "w-3 h-3" }),
918
940
  " ",
919
- x("bigconsole.parsers.builder.test.passed", "Passed")
941
+ S("bigconsole.parsers.builder.test.passed", "Passed")
920
942
  ]
921
943
  }),
922
944
  "data-testid": "parser-test-output",
923
945
  children: [
924
- rn && /* @__PURE__ */ p("p", {
925
- className: `${v} mb-2`,
946
+ ln && /* @__PURE__ */ m("p", {
947
+ className: `${y} mb-2`,
926
948
  "data-testid": "parser-test-output-stale",
927
- children: x("bigconsole.parsers.builder.test.staleResult", "This result is from an earlier version of the expression. Run the test again.")
949
+ children: S("bigconsole.parsers.builder.test.staleResult", "This result is from an earlier version of the expression. Run the test again.")
928
950
  }),
929
- I ? /* @__PURE__ */ p("pre", {
951
+ R ? /* @__PURE__ */ m("pre", {
930
952
  className: "max-h-[150px] min-w-0 overflow-auto whitespace-pre-wrap break-words rounded-md bg-bg-canvas px-3 py-2.5 font-mono text-xs leading-relaxed text-text-primary",
931
- children: I
932
- }) : /* @__PURE__ */ p(ue, {
933
- value: st,
953
+ children: R
954
+ }) : /* @__PURE__ */ m(de, {
955
+ value: dt,
934
956
  language: "json",
935
957
  readOnly: !0,
936
- height: Ie
958
+ height: Re
937
959
  }),
938
- z && !I && /* @__PURE__ */ m("p", {
939
- className: v,
960
+ B && !R && /* @__PURE__ */ h("p", {
961
+ className: y,
940
962
  children: [
941
- x("bigconsole.parsers.builder.test.testedSample", "Tested a sample"),
942
- z.sampledRows != null && z.totalRows != null ? x("bigconsole.parsers.builder.dataPreview.rowRange", " (first {{shown}} of {{total}} rows)", {
943
- shown: z.sampledRows,
944
- total: z.totalRows
963
+ S("bigconsole.parsers.builder.test.testedSample", "Tested a sample"),
964
+ B.sampledRows != null && B.totalRows != null ? S("bigconsole.parsers.builder.dataPreview.rowRange", " (first {{shown}} of {{total}} rows)", {
965
+ shown: B.sampledRows,
966
+ total: B.totalRows
945
967
  }) : "",
946
- x("bigconsole.parsers.builder.test.testedSampleNote", " — a saved parser runs over the full source, so results may differ.")
968
+ S("bigconsole.parsers.builder.test.testedSampleNote", " — a saved parser runs over the full source, so results may differ.")
947
969
  ]
948
970
  })
949
971
  ]
950
972
  }),
951
- !st && !I && /* @__PURE__ */ p(t, {
973
+ !dt && !R && /* @__PURE__ */ m(r, {
952
974
  emphasis: "muted",
953
975
  padding: "compact",
954
976
  headingLevel: 3,
955
977
  title: "No run yet",
956
978
  "data-testid": "parser-test-empty",
957
- children: /* @__PURE__ */ m("p", {
979
+ children: /* @__PURE__ */ h("p", {
958
980
  className: "text-xs leading-relaxed text-text-secondary",
959
981
  children: [
960
- /* @__PURE__ */ p("strong", { children: x("bigconsole.parsers.builder.test.tipLabel", "Tip:") }),
982
+ /* @__PURE__ */ m("strong", { children: S("bigconsole.parsers.builder.test.tipLabel", "Tip:") }),
961
983
  " ",
962
- x("bigconsole.parsers.builder.test.tipBody", "write your expression and click “Run Test” to see the transformation.")
984
+ S("bigconsole.parsers.builder.test.tipBody", "write your expression and click “Run Test” to see the transformation.")
963
985
  ]
964
986
  })
965
987
  })
966
988
  ]
967
989
  }),
968
- C === 3 && /* @__PURE__ */ m(f, { children: [/* @__PURE__ */ p(t, {
990
+ w === 3 && /* @__PURE__ */ h(p, { children: [/* @__PURE__ */ m(r, {
969
991
  emphasis: "primary",
970
992
  headingLevel: 2,
971
- title: x("bigconsole.parsers.builder.review.cacheDurationLabel", "Cache Duration"),
972
- description: x("bigconsole.parsers.builder.review.cacheDurationHelper", "How long should data be cached before refreshing?"),
973
- icon: /* @__PURE__ */ p(De, { className: "h-icon-sm w-icon-sm" }),
974
- meta: fn,
993
+ title: S("bigconsole.parsers.builder.review.cacheDurationLabel", "Cache Duration"),
994
+ description: S("bigconsole.parsers.builder.review.cacheDurationHelper", "How long should data be cached before refreshing?"),
995
+ icon: /* @__PURE__ */ m(Oe, { className: "h-icon-sm w-icon-sm" }),
996
+ meta: _n,
975
997
  "data-testid": "parser-advanced-settings",
976
- children: /* @__PURE__ */ p(le, {
977
- value: O.ttl,
978
- onChange: qt,
979
- error: j.ttl,
998
+ children: /* @__PURE__ */ m(ue, {
999
+ value: A.ttl,
1000
+ onChange: Qt,
1001
+ error: N.ttl,
980
1002
  hideLabel: !0
981
1003
  })
982
- }), /* @__PURE__ */ p(t, {
1004
+ }), /* @__PURE__ */ m(r, {
983
1005
  emphasis: "muted",
984
1006
  headingLevel: 2,
985
- title: x("bigconsole.parsers.builder.review.label", "Review"),
1007
+ title: S("bigconsole.parsers.builder.review.label", "Review"),
986
1008
  description: "Check these details before you save.",
987
1009
  "data-testid": "parser-review",
988
- children: /* @__PURE__ */ p("div", {
1010
+ children: /* @__PURE__ */ m("div", {
989
1011
  className: "overflow-hidden rounded-lg border border-[var(--color-border-subtle)]",
990
1012
  children: [
991
- [x("bigconsole.parsers.builder.review.name", "Name"), O.name || "—"],
992
- [x("bigconsole.parsers.builder.review.outputKey", "Output Key"), O.outputKey || "—"],
993
- [x("bigconsole.parsers.builder.review.scope", "Scope"), D ? T === "default" ? x("bigconsole.parsers.builder.review.scopeGlobal", "Global") : Ft.find((e) => e.id === T)?.name || T : x("bigconsole.parsers.builder.review.scopeDashboard", "Dashboard")],
994
- [x("bigconsole.parsers.builder.review.type", "Type"), We[O.type].name],
995
- [x("bigconsole.parsers.builder.review.source", "Source"), X || "—"]
996
- ].map(([e, t]) => /* @__PURE__ */ m("div", {
1013
+ [S("bigconsole.parsers.builder.review.name", "Name"), A.name || "—"],
1014
+ [S("bigconsole.parsers.builder.review.outputKey", "Output Key"), A.outputKey || "—"],
1015
+ [S("bigconsole.parsers.builder.review.scope", "Scope"), O ? E === "default" ? S("bigconsole.parsers.builder.review.scopeGlobal", "Global") : Bt.find((e) => e.id === E)?.name || E : k ?? S("bigconsole.parsers.builder.review.scopeDashboard", "Dashboard")],
1016
+ [S("bigconsole.parsers.builder.review.type", "Type"), Ke[A.type].name],
1017
+ [S("bigconsole.parsers.builder.review.source", "Source"), X || "—"]
1018
+ ].map(([e, t]) => /* @__PURE__ */ h("div", {
997
1019
  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",
998
- children: [/* @__PURE__ */ p("span", {
1020
+ children: [/* @__PURE__ */ m("span", {
999
1021
  className: "text-text-secondary",
1000
1022
  children: e
1001
- }), /* @__PURE__ */ p("span", {
1023
+ }), /* @__PURE__ */ m("span", {
1002
1024
  className: "min-w-0 break-words text-right font-medium text-text-primary",
1003
1025
  children: t
1004
1026
  })]
1005
1027
  }, e))
1006
1028
  })
1007
1029
  })] }),
1008
- /* @__PURE__ */ m("div", {
1030
+ /* @__PURE__ */ h("div", {
1009
1031
  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",
1010
- children: [C === 0 ? /* @__PURE__ */ p(d, {
1032
+ children: [w === 0 ? /* @__PURE__ */ m(f, {
1011
1033
  type: "button",
1012
1034
  onClick: Z,
1013
1035
  variant: "secondary",
1014
1036
  className: "w-full sm:w-auto",
1015
- children: x("bigconsole.parsers.builder.actions.cancel", "Cancel")
1016
- }) : /* @__PURE__ */ m(d, {
1037
+ children: S("bigconsole.parsers.builder.actions.cancel", "Cancel")
1038
+ }) : /* @__PURE__ */ h(f, {
1017
1039
  type: "button",
1018
- onClick: ln,
1040
+ onClick: mn,
1019
1041
  variant: "secondary",
1020
1042
  className: "w-full sm:w-auto",
1021
- children: [/* @__PURE__ */ p(ge, { className: "w-4 h-4 mr-2" }), x("bigconsole.parsers.builder.actions.back", "Back")]
1022
- }), dn ? /* @__PURE__ */ p(me, {
1023
- permission: Ze,
1043
+ children: [/* @__PURE__ */ m(_e, { className: "w-4 h-4 mr-2" }), S("bigconsole.parsers.builder.actions.back", "Back")]
1044
+ }), gn ? /* @__PURE__ */ m(he, {
1045
+ permission: $e,
1024
1046
  deniedBehavior: "disable",
1025
- children: /* @__PURE__ */ p(d, {
1047
+ children: /* @__PURE__ */ m(f, {
1026
1048
  type: "submit",
1027
- disabled: !on || nt || !Xe,
1049
+ disabled: !dn || ot || !Qe,
1028
1050
  variant: "default",
1029
1051
  className: "w-full sm:w-auto",
1030
- children: nt ? /* @__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(Ee, { className: "w-4 h-4 mr-2" }), E ? x("bigconsole.parsers.builder.actions.saveChanges", "Save Changes") : x("bigconsole.parsers.builder.actions.createParser", "Create Parser")] })
1052
+ children: ot ? /* @__PURE__ */ h(p, { children: [/* @__PURE__ */ m(d, { className: "w-4 h-4 mr-2 animate-spin" }), S("bigconsole.parsers.builder.actions.saving", "Saving...")] }) : /* @__PURE__ */ h(p, { children: [/* @__PURE__ */ m(De, { className: "w-4 h-4 mr-2" }), D ? S("bigconsole.parsers.builder.actions.saveChanges", "Save Changes") : S("bigconsole.parsers.builder.actions.createParser", "Create Parser")] })
1031
1053
  })
1032
- }) : /* @__PURE__ */ m(d, {
1054
+ }) : /* @__PURE__ */ h(f, {
1033
1055
  type: "button",
1034
- onClick: cn,
1035
- disabled: !$(C),
1056
+ onClick: pn,
1057
+ disabled: !$(w),
1036
1058
  variant: "default",
1037
1059
  className: "w-full sm:w-auto",
1038
- children: [x("bigconsole.parsers.builder.actions.next", "Next"), /* @__PURE__ */ p(ye, { className: "w-4 h-4 ml-2" })]
1060
+ children: [S("bigconsole.parsers.builder.actions.next", "Next"), /* @__PURE__ */ m(be, { className: "w-4 h-4 ml-2" })]
1039
1061
  })]
1040
1062
  })
1041
1063
  ]
@@ -1044,4 +1066,4 @@ var b = i(function() {
1044
1066
  })
1045
1067
  });
1046
1068
  });
1047
- export { b as ParserBuilderPage, b as default };
1069
+ export { x as ParserBuilderPage, x as default };