@burdenoff/microfe-bigconsole 2026.624.2 → 2026.626.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 (72) hide show
  1. package/dist/bigconsole/BigConsoleRoutes.js +175 -118
  2. package/dist/bigconsole/BigConsoleRoutes.js.map +1 -1
  3. package/dist/bigconsole/assistant/assistantApi.js +215 -0
  4. package/dist/bigconsole/assistant/assistantApi.js.map +1 -0
  5. package/dist/bigconsole/assistant/createSandboxAssistantTransport.js +119 -0
  6. package/dist/bigconsole/assistant/createSandboxAssistantTransport.js.map +1 -0
  7. package/dist/bigconsole/assistant/index.js +2 -0
  8. package/dist/bigconsole/assistant/pageContext.js +51 -0
  9. package/dist/bigconsole/assistant/pageContext.js.map +1 -0
  10. package/dist/bigconsole/components/dashboard/CreateDashboardDialog.js +48 -48
  11. package/dist/bigconsole/components/dashboard/DashboardToolbar.js +52 -52
  12. package/dist/bigconsole/components/dashboard/DrilldownBreadcrumb.js.map +1 -1
  13. package/dist/bigconsole/components/dashboard/ExportDashboardDialog.js +33 -33
  14. package/dist/bigconsole/components/dashboard/ImportDashboardDialog.js +179 -179
  15. package/dist/bigconsole/components/dashboard/ImportDashboardDialog.js.map +1 -1
  16. package/dist/bigconsole/components/dashboard/WidgetPalette.js +38 -38
  17. package/dist/bigconsole/components/datasink/DataSinkTableViewer.js +32 -32
  18. package/dist/bigconsole/components/datasink/ExportDataSinkDialog.js +31 -31
  19. package/dist/bigconsole/components/datasink/ImportDataSinkDialog.js +98 -98
  20. package/dist/bigconsole/components/datasink/ImportDataSinkDialog.js.map +1 -1
  21. package/dist/bigconsole/components/parser/ExportParserDialog.js +31 -31
  22. package/dist/bigconsole/components/parser/ImportParserDialog.js +162 -162
  23. package/dist/bigconsole/components/parser/ImportParserDialog.js.map +1 -1
  24. package/dist/bigconsole/components/widgets/ActionConfigDialog.js +79 -79
  25. package/dist/bigconsole/components/widgets/ActionConfigDialog.js.map +1 -1
  26. package/dist/bigconsole/components/widgets/DrilldownConfigPanel.js.map +1 -1
  27. package/dist/bigconsole/components/widgets/PropertiesPanel.js +307 -307
  28. package/dist/bigconsole/components/widgets/PropertiesPanel.js.map +1 -1
  29. package/dist/bigconsole/components/widgets/WidgetConfigDialog.js +222 -222
  30. package/dist/bigconsole/components/widgets/WidgetConfigDialog.js.map +1 -1
  31. package/dist/bigconsole/components/widgets/WidgetTypeSelector.js +23 -23
  32. package/dist/bigconsole/index.js +3 -0
  33. package/dist/bigconsole/pages/DashboardBuilderPage.js +74 -74
  34. package/dist/bigconsole/pages/DashboardBuilderPage.js.map +1 -1
  35. package/dist/bigconsole/pages/DashboardViewPage.js +168 -189
  36. package/dist/bigconsole/pages/DashboardViewPage.js.map +1 -1
  37. package/dist/bigconsole/pages/DashboardsPage.js +266 -310
  38. package/dist/bigconsole/pages/DashboardsPage.js.map +1 -1
  39. package/dist/bigconsole/pages/DataParsersPage.js +148 -194
  40. package/dist/bigconsole/pages/DataParsersPage.js.map +1 -1
  41. package/dist/bigconsole/pages/DataSinkBuilderPage.js +252 -246
  42. package/dist/bigconsole/pages/DataSinkBuilderPage.js.map +1 -1
  43. package/dist/bigconsole/pages/DataSinkViewPage.js +256 -231
  44. package/dist/bigconsole/pages/DataSinkViewPage.js.map +1 -1
  45. package/dist/bigconsole/pages/DataSinksPage.js +173 -219
  46. package/dist/bigconsole/pages/DataSinksPage.js.map +1 -1
  47. package/dist/bigconsole/pages/HomePage.js +125 -141
  48. package/dist/bigconsole/pages/HomePage.js.map +1 -1
  49. package/dist/bigconsole/pages/InsightsPage.js +159 -184
  50. package/dist/bigconsole/pages/InsightsPage.js.map +1 -1
  51. package/dist/bigconsole/pages/ParserBuilderPage.js +401 -393
  52. package/dist/bigconsole/pages/ParserBuilderPage.js.map +1 -1
  53. package/dist/bigconsole/pages/ParserViewPage.js +220 -201
  54. package/dist/bigconsole/pages/ParserViewPage.js.map +1 -1
  55. package/dist/bigconsole/pages/PipelineBuilderPage.js +212 -206
  56. package/dist/bigconsole/pages/PipelineBuilderPage.js.map +1 -1
  57. package/dist/bigconsole/pages/PipelineViewPage.js +204 -181
  58. package/dist/bigconsole/pages/PipelineViewPage.js.map +1 -1
  59. package/dist/bigconsole/pages/PipelinesPage.js +107 -150
  60. package/dist/bigconsole/pages/PipelinesPage.js.map +1 -1
  61. package/dist/bigconsole/pages/SettingsPage.js +184 -171
  62. package/dist/bigconsole/pages/SettingsPage.js.map +1 -1
  63. package/dist/bigconsole/pages/WidgetDemoPage.js +69 -81
  64. package/dist/bigconsole/pages/WidgetDemoPage.js.map +1 -1
  65. package/dist/bigconsole/pages/WorkflowViewPage.js +230 -216
  66. package/dist/bigconsole/pages/WorkflowViewPage.js.map +1 -1
  67. package/dist/bigconsole/pages/WorkflowsPage.js +106 -149
  68. package/dist/bigconsole/pages/WorkflowsPage.js.map +1 -1
  69. package/dist/generated/wspace-operations.js +87 -36
  70. package/dist/generated/wspace-operations.js.map +1 -1
  71. package/dist/index.js +3 -1
  72. package/package.json +6 -2
@@ -7,13 +7,13 @@ import ne from "../components/datasink/CacheTTLSelector.js";
7
7
  import { memo as n, useCallback as r, useEffect as i, useMemo as re, useState as a } from "react";
8
8
  import { useParams as ie } from "react-router-dom";
9
9
  import { AlertCircle as o, ArrowLeft as ae, CheckCircle2 as oe, ChevronDown as se, ChevronRight as ce, Code as le, Eye as ue, FileCode2 as de, LayoutDashboard as fe, Loader2 as s, Play as c, Save as pe, Settings as me } from "lucide-react";
10
- import { Fragment as l, jsx as u, jsxs as d } from "react/jsx-runtime";
11
- import { Button as f, Card as p, CardContent as m, CardHeader as h, CardTitle as g } from "@burdenoff/fe-libs/ui";
10
+ import { Button as l, Card as u, CardContent as d, CardHeader as f, CardTitle as p, GlassCard as he, PagePurpose as ge } from "@burdenoff/fe-libs/ui";
11
+ import { Fragment as m, jsx as h, jsxs as g } from "react/jsx-runtime";
12
12
  //#region src/bigconsole/pages/ParserBuilderPage.tsx
13
- function he(e) {
13
+ function _e(e) {
14
14
  return e.toLowerCase().replace(/[^a-z0-9]+/g, "_").replace(/^_+|_+$/g, "").substring(0, 64);
15
15
  }
16
- function ge(e) {
16
+ function ve(e) {
17
17
  let t = {};
18
18
  return e.name.trim() ? e.name.length < 2 && (t.name = "Name must be at least 2 characters") : t.name = "Name is required", e.outputKey.trim() ? /^[a-z0-9_]+$/.test(e.outputKey) || (t.outputKey = "Output key can only contain lowercase letters, numbers, and underscores") : t.outputKey = "Output key is required", e.expression.trim() || (t.expression = "Expression is required"), e.inputSinkKey.trim() || (t.inputSinkKey = "Source DataSink is required"), e.ttl != null && e.ttl > 0 && (e.ttl < 30 || e.ttl > 86400) && (t.ttl = "Cache duration must be between 30 and 86400 seconds"), t;
19
19
  }
@@ -30,8 +30,8 @@ var _ = {
30
30
  placeholder: "$sum(data[*].value)",
31
31
  example: "$sum(data.values) - Calculate sum of values"
32
32
  }
33
- }, _e = "default", v = n(function() {
34
- let { parserId: n, consoleId: v } = ie(), y = e(), [b, x] = a(_e), S = v || b || _e, C = n !== "new" && !!n, w = !v, [T, E] = a({
33
+ }, v = "default", y = n(function() {
34
+ let { parserId: n, consoleId: y } = ie(), b = e(), [x, S] = a(v), C = y || x || v, w = n !== "new" && !!n, T = !y, [E, D] = a({
35
35
  name: "",
36
36
  outputKey: "",
37
37
  description: "",
@@ -39,320 +39,324 @@ var _ = {
39
39
  expression: "",
40
40
  inputSinkKey: "",
41
41
  ttl: 900
42
- }), [D, O] = a({}), [k, A] = a(!1), [j, M] = a(!1), [N, P] = a(null), [F, I] = a("{\n \"data\": [\n {\"name\": \"Item 1\", \"count\": 10},\n {\"name\": \"Item 2\", \"count\": 20}\n ]\n}"), [L, R] = a(""), [z, B] = a(null), [V, H] = a(!1), [U, W] = a(!1), [G, ve] = a(null), [ye, K] = a(!1), [q, J] = a(null), { loading: be, error: Y, parsers: xe, fetchParser: X, createParser: Se, updateParser: Ce, testParserExpression: we } = te({
43
- consoleId: S || "",
42
+ }), [O, k] = a({}), [A, j] = a(!1), [M, N] = a(!1), [P, F] = a(null), [I, L] = a("{\n \"data\": [\n {\"name\": \"Item 1\", \"count\": 10},\n {\"name\": \"Item 2\", \"count\": 20}\n ]\n}"), [R, z] = a(""), [B, V] = a(null), [H, U] = a(!1), [W, G] = a(!1), [K, ye] = a(null), [be, q] = a(!1), [J, Y] = a(null), { loading: xe, error: Se, parsers: Ce, fetchParser: X, createParser: Z, updateParser: we, testParserExpression: Te } = te({
43
+ consoleId: C || "",
44
44
  skipFetch: !0
45
- }), { dataSinks: Te, fetchDataSinks: Ee, getDataSinkData: Z } = ee({ skipFetch: !0 }), { dashboards: De, fetchDashboards: Oe, loading: ke } = t(), Q = C ? xe.find((e) => e.id === n) : null;
45
+ }), { dataSinks: Ee, fetchDataSinks: De, getDataSinkData: Q } = ee({ skipFetch: !0 }), { dashboards: Oe, fetchDashboards: ke, loading: Ae } = t(), $ = w ? Ce.find((e) => e.id === n) : null;
46
46
  i(() => {
47
- Ee(), C && n && X(n), w && Oe();
47
+ De(), w && n && X(n), T && ke();
48
48
  }, [
49
- C,
49
+ w,
50
50
  n,
51
51
  X,
52
- Ee,
53
- w,
54
- Oe
52
+ De,
53
+ T,
54
+ ke
55
55
  ]), i(() => {
56
- Q && (E({
57
- name: Q.name || "",
58
- outputKey: Q.outputKey || "",
59
- description: Q.description || "",
60
- type: Q.type,
61
- expression: Q.expression || "",
62
- inputSinkKey: Q.inputSinkKey || "",
63
- ttl: Q.ttl ?? null
64
- }), A(!0), Q.consoleId && x(Q.consoleId));
65
- }, [Q]);
66
- let Ae = r((e) => {
56
+ $ && (D({
57
+ name: $.name || "",
58
+ outputKey: $.outputKey || "",
59
+ description: $.description || "",
60
+ type: $.type,
61
+ expression: $.expression || "",
62
+ inputSinkKey: $.inputSinkKey || "",
63
+ ttl: $.ttl ?? null
64
+ }), j(!0), $.consoleId && S($.consoleId));
65
+ }, [$]);
66
+ let je = r((e) => {
67
67
  let t = e.target.value;
68
- E((e) => ({
68
+ D((e) => ({
69
69
  ...e,
70
70
  name: t,
71
- outputKey: k ? e.outputKey : he(t)
72
- })), O((e) => ({
71
+ outputKey: A ? e.outputKey : _e(t)
72
+ })), k((e) => ({
73
73
  ...e,
74
74
  name: void 0
75
75
  }));
76
- }, [k]), je = r((e) => {
76
+ }, [A]), Me = r((e) => {
77
77
  let t = e.target.value.toLowerCase().replace(/[^a-z0-9_]/g, "");
78
- E((e) => ({
78
+ D((e) => ({
79
79
  ...e,
80
80
  outputKey: t
81
- })), A(!0), O((e) => ({
81
+ })), j(!0), k((e) => ({
82
82
  ...e,
83
83
  outputKey: void 0
84
84
  }));
85
- }, []), Me = r((e) => {
86
- E((t) => ({
85
+ }, []), Ne = r((e) => {
86
+ D((t) => ({
87
87
  ...t,
88
88
  description: e.target.value
89
89
  }));
90
- }, []), Ne = r((e) => {
91
- E((t) => ({
90
+ }, []), Pe = r((e) => {
91
+ D((t) => ({
92
92
  ...t,
93
93
  type: e
94
- })), R(""), B(null);
95
- }, []), Pe = r((e) => {
96
- E((t) => ({
94
+ })), z(""), V(null);
95
+ }, []), Fe = r((e) => {
96
+ D((t) => ({
97
97
  ...t,
98
98
  expression: e.target.value
99
- })), O((e) => ({
99
+ })), k((e) => ({
100
100
  ...e,
101
101
  expression: void 0
102
102
  }));
103
- }, []), Fe = r((e) => {
104
- E((t) => ({
103
+ }, []), Ie = r((e) => {
104
+ D((t) => ({
105
105
  ...t,
106
106
  inputSinkKey: e.target.value
107
- })), O((e) => ({
107
+ })), k((e) => ({
108
108
  ...e,
109
109
  inputSinkKey: void 0
110
110
  }));
111
- }, []), Ie = r((e) => {
112
- E((t) => ({
111
+ }, []), Le = r((e) => {
112
+ D((t) => ({
113
113
  ...t,
114
114
  ttl: e
115
- })), O((e) => ({
115
+ })), k((e) => ({
116
116
  ...e,
117
117
  ttl: void 0
118
118
  }));
119
- }, []), Le = r((e) => {
120
- x(e.target.value);
121
- }, []), Re = r(async () => {
122
- if (T.inputSinkKey) try {
123
- let e = await Z({ key: T.inputSinkKey });
124
- e?.raw && I(JSON.stringify(e.raw, null, 2));
119
+ }, []), Re = r((e) => {
120
+ S(e.target.value);
121
+ }, []), ze = r(async () => {
122
+ if (E.inputSinkKey) try {
123
+ let e = await Q({ key: E.inputSinkKey });
124
+ e?.raw && L(JSON.stringify(e.raw, null, 2));
125
125
  } catch {}
126
- }, [T.inputSinkKey, Z]), ze = r(async () => {
127
- if (U) {
128
- W(!1);
126
+ }, [E.inputSinkKey, Q]), Be = r(async () => {
127
+ if (W) {
128
+ G(!1);
129
129
  return;
130
130
  }
131
- if (!T.inputSinkKey) {
132
- J("Please select a source DataSink first");
131
+ if (!E.inputSinkKey) {
132
+ Y("Please select a source DataSink first");
133
133
  return;
134
134
  }
135
- W(!0), K(!0), J(null);
135
+ G(!0), q(!0), Y(null);
136
136
  try {
137
- let e = await Z({ key: T.inputSinkKey });
138
- e?.raw ? ve(e.raw) : J("No data available in selected DataSink");
137
+ let e = await Q({ key: E.inputSinkKey });
138
+ e?.raw ? ye(e.raw) : Y("No data available in selected DataSink");
139
139
  } catch (e) {
140
- J(e instanceof Error ? e.message : "Failed to load data");
140
+ Y(e instanceof Error ? e.message : "Failed to load data");
141
141
  } finally {
142
- K(!1);
142
+ q(!1);
143
143
  }
144
144
  }, [
145
- U,
146
- T.inputSinkKey,
147
- Z
148
- ]), Be = r(async () => {
149
- if (!T.expression.trim()) {
150
- B("Expression is required");
145
+ W,
146
+ E.inputSinkKey,
147
+ Q
148
+ ]), Ve = r(async () => {
149
+ if (!E.expression.trim()) {
150
+ V("Expression is required");
151
151
  return;
152
152
  }
153
- H(!0), B(null), R("");
153
+ U(!0), V(null), z("");
154
154
  try {
155
- let e = await we({
156
- type: T.type,
157
- expression: T.expression,
158
- sampleData: JSON.parse(F)
155
+ let e = await Te({
156
+ type: E.type,
157
+ expression: E.expression,
158
+ sampleData: JSON.parse(I)
159
159
  });
160
- e && (e.success ? R(JSON.stringify(e.output, null, 2)) : B(e.error || "Test failed"));
160
+ e && (e.success ? z(JSON.stringify(e.output, null, 2)) : V(e.error || "Test failed"));
161
161
  } catch (e) {
162
- B(e instanceof Error ? e.message : "Test failed");
162
+ V(e instanceof Error ? e.message : "Test failed");
163
163
  } finally {
164
- H(!1);
164
+ U(!1);
165
165
  }
166
166
  }, [
167
- T.type,
168
- T.expression,
169
- F,
170
- we
171
- ]), Ve = r(() => {
172
- y(v ? `/dashboards/${v}/parsers` : "/parsers");
173
- }, [y, v]), He = r(async (e) => {
174
- e.preventDefault(), P(null);
175
- let t = ge(T);
167
+ E.type,
168
+ E.expression,
169
+ I,
170
+ Te
171
+ ]), He = r(() => {
172
+ b(y ? `/dashboards/${y}/parsers` : "/parsers");
173
+ }, [b, y]), Ue = r(async (e) => {
174
+ e.preventDefault(), F(null);
175
+ let t = ve(E);
176
176
  if (Object.keys(t).length > 0) {
177
- O(t);
177
+ k(t);
178
178
  return;
179
179
  }
180
- M(!0);
180
+ N(!0);
181
181
  try {
182
- if (C && Q) {
183
- if (!await Ce(Q.id, {
184
- name: T.name,
185
- description: T.description || void 0,
186
- expression: T.expression,
187
- inputSinkKey: T.inputSinkKey,
188
- outputKey: T.outputKey,
189
- ttl: T.ttl
190
- }, Q.version)) throw Error("Failed to update parser");
191
- } else if (!await Se({
192
- consoleId: S || "",
193
- name: T.name,
194
- type: T.type,
195
- expression: T.expression,
196
- inputSinkKey: T.inputSinkKey,
197
- outputKey: T.outputKey,
198
- description: T.description || void 0,
199
- ttl: T.ttl || void 0
182
+ if (w && $) {
183
+ if (!await we($.id, {
184
+ name: E.name,
185
+ description: E.description || void 0,
186
+ expression: E.expression,
187
+ inputSinkKey: E.inputSinkKey,
188
+ outputKey: E.outputKey,
189
+ ttl: E.ttl
190
+ }, $.version)) throw Error("Failed to update parser");
191
+ } else if (!await Z({
192
+ consoleId: C || "",
193
+ name: E.name,
194
+ type: E.type,
195
+ expression: E.expression,
196
+ inputSinkKey: E.inputSinkKey,
197
+ outputKey: E.outputKey,
198
+ description: E.description || void 0,
199
+ ttl: E.ttl || void 0
200
200
  })) throw Error("Failed to create parser");
201
- y(v ? `/dashboards/${v}/parsers` : "/parsers");
201
+ b(y ? `/dashboards/${y}/parsers` : "/parsers");
202
202
  } catch (e) {
203
- P(e instanceof Error ? e.message : "Failed to save parser");
203
+ F(e instanceof Error ? e.message : "Failed to save parser");
204
204
  } finally {
205
- M(!1);
205
+ N(!1);
206
206
  }
207
207
  }, [
208
- T,
208
+ E,
209
+ w,
210
+ $,
211
+ Z,
212
+ we,
213
+ b,
209
214
  C,
210
- Q,
211
- Se,
212
- Ce,
213
- y,
214
- S,
215
- v
216
- ]), Ue = re(() => T.name.trim().length >= 2 && T.expression.trim().length > 0 && T.inputSinkKey.trim().length > 0 && T.outputKey.trim().length > 0, [
217
- T.name,
218
- T.expression,
219
- T.inputSinkKey,
220
- T.outputKey
215
+ y
216
+ ]), We = re(() => E.name.trim().length >= 2 && E.expression.trim().length > 0 && E.inputSinkKey.trim().length > 0 && E.outputKey.trim().length > 0, [
217
+ E.name,
218
+ E.expression,
219
+ E.inputSinkKey,
220
+ E.outputKey
221
221
  ]);
222
- if (be && C) return /* @__PURE__ */ u("div", {
222
+ if (xe && w) return /* @__PURE__ */ h("div", {
223
223
  className: "flex items-center justify-center min-h-[400px]",
224
- children: /* @__PURE__ */ u(s, { className: "w-8 h-8 text-text-secondary animate-spin" })
224
+ children: /* @__PURE__ */ h(s, { className: "w-8 h-8 text-text-secondary animate-spin" })
225
225
  });
226
- if (Y) return /* @__PURE__ */ u("div", {
226
+ if (Se) return /* @__PURE__ */ h("div", {
227
227
  className: "flex items-center justify-center min-h-[400px] p-card-padding",
228
- children: /* @__PURE__ */ d("div", {
228
+ children: /* @__PURE__ */ g("div", {
229
229
  className: "text-center",
230
230
  children: [
231
- /* @__PURE__ */ u(o, { className: "w-12 h-12 text-state-error mx-auto mb-spacing-md" }),
232
- /* @__PURE__ */ u("p", {
231
+ /* @__PURE__ */ h(o, { className: "w-12 h-12 text-state-error mx-auto mb-spacing-md" }),
232
+ /* @__PURE__ */ h("p", {
233
233
  className: "text-state-error text-body-sm font-medium mb-spacing-sm",
234
234
  children: "Failed to load Parser"
235
235
  }),
236
- /* @__PURE__ */ u("p", {
236
+ /* @__PURE__ */ h("p", {
237
237
  className: "text-text-tertiary text-body-xs",
238
- children: Y.message
238
+ children: Se.message
239
239
  })
240
240
  ]
241
241
  })
242
242
  });
243
- let $ = _[T.type];
244
- return /* @__PURE__ */ u("div", {
243
+ let Ge = _[E.type];
244
+ return /* @__PURE__ */ h("div", {
245
245
  className: "min-h-screen bg-bg-canvas",
246
- children: /* @__PURE__ */ d("div", {
246
+ children: /* @__PURE__ */ g("div", {
247
247
  className: "max-w-7xl mx-auto p-card-padding",
248
248
  children: [
249
- /* @__PURE__ */ d("div", {
249
+ /* @__PURE__ */ g("div", {
250
250
  className: "mb-spacing-lg",
251
251
  children: [
252
- /* @__PURE__ */ d(f, {
253
- onClick: Ve,
252
+ /* @__PURE__ */ g(l, {
253
+ onClick: He,
254
254
  variant: "ghost",
255
255
  size: "sm",
256
256
  className: "mb-spacing-md",
257
- children: [/* @__PURE__ */ u(ae, { className: "w-4 h-4 mr-2" }), "Back to Parsers"]
257
+ children: [/* @__PURE__ */ h(ae, { className: "w-4 h-4 mr-2" }), "Back to Parsers"]
258
258
  }),
259
- /* @__PURE__ */ u("h1", {
259
+ /* @__PURE__ */ h("h1", {
260
260
  className: "text-heading-h1 font-bold text-text-primary",
261
- children: C ? "Edit Parser" : "Create Parser"
261
+ children: w ? "Edit Parser" : "Create Parser"
262
262
  }),
263
- /* @__PURE__ */ u("p", {
263
+ /* @__PURE__ */ h("p", {
264
264
  className: "text-body-sm text-text-secondary mt-spacing-xs",
265
- children: C ? "Update the parser configuration and test your changes." : "Transform data using JQ or JSONata expressions."
265
+ children: w ? "Update the parser configuration and test your changes." : "Transform data using JQ or JSONata expressions."
266
266
  })
267
267
  ]
268
268
  }),
269
- N && /* @__PURE__ */ d("div", {
269
+ /* @__PURE__ */ h(ge, {
270
+ className: "mb-spacing-lg",
271
+ children: "A parser maps raw input into structured fields using a JQ or JSONata expression. Write the expression here, 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."
272
+ }),
273
+ P && /* @__PURE__ */ g("div", {
270
274
  className: "mb-spacing-lg p-4 bg-state-error/10 border border-state-error/30 rounded-lg flex items-start gap-3",
271
- children: [/* @__PURE__ */ u(o, { className: "w-5 h-5 text-state-error flex-shrink-0 mt-0.5" }), /* @__PURE__ */ d("div", { children: [/* @__PURE__ */ u("p", {
275
+ children: [/* @__PURE__ */ h(o, { className: "w-5 h-5 text-state-error flex-shrink-0 mt-0.5" }), /* @__PURE__ */ g("div", { children: [/* @__PURE__ */ h("p", {
272
276
  className: "text-sm font-medium text-state-error",
273
277
  children: "Failed to save Parser"
274
- }), /* @__PURE__ */ u("p", {
278
+ }), /* @__PURE__ */ h("p", {
275
279
  className: "text-xs text-state-error/80 mt-1",
276
- children: N
280
+ children: P
277
281
  })] })]
278
282
  }),
279
- /* @__PURE__ */ d("form", {
280
- onSubmit: He,
281
- children: [/* @__PURE__ */ d("div", {
283
+ /* @__PURE__ */ g("form", {
284
+ onSubmit: Ue,
285
+ children: [/* @__PURE__ */ g("div", {
282
286
  className: "grid gap-6 lg:grid-cols-3",
283
287
  children: [
284
- /* @__PURE__ */ u("div", {
288
+ /* @__PURE__ */ h("div", {
285
289
  className: "space-y-6",
286
- children: /* @__PURE__ */ d(p, { children: [/* @__PURE__ */ u(h, {
290
+ children: /* @__PURE__ */ g(u, { children: [/* @__PURE__ */ h(f, {
287
291
  className: "pb-4",
288
- children: /* @__PURE__ */ d("div", {
292
+ children: /* @__PURE__ */ g("div", {
289
293
  className: "flex items-center gap-3",
290
- children: [/* @__PURE__ */ u("div", {
294
+ children: [/* @__PURE__ */ h("div", {
291
295
  className: "w-8 h-8 rounded-full bg-action-primary-bg/10 flex items-center justify-center",
292
- children: /* @__PURE__ */ u(de, { className: "w-4 h-4 text-action-primary-bg" })
293
- }), /* @__PURE__ */ d("div", { children: [/* @__PURE__ */ u(g, {
296
+ children: /* @__PURE__ */ h(de, { className: "w-4 h-4 text-action-primary-bg" })
297
+ }), /* @__PURE__ */ g("div", { children: [/* @__PURE__ */ h(p, {
294
298
  className: "text-base",
295
299
  children: "Basic Information"
296
- }), /* @__PURE__ */ u("p", {
300
+ }), /* @__PURE__ */ h("p", {
297
301
  className: "text-xs text-text-secondary mt-0.5",
298
302
  children: "Essential details for your parser"
299
303
  })] })]
300
304
  })
301
- }), /* @__PURE__ */ d(m, {
305
+ }), /* @__PURE__ */ g(d, {
302
306
  className: "space-y-5",
303
307
  children: [
304
- /* @__PURE__ */ d("div", { children: [
305
- /* @__PURE__ */ d("label", {
308
+ /* @__PURE__ */ g("div", { children: [
309
+ /* @__PURE__ */ g("label", {
306
310
  htmlFor: "name",
307
311
  className: "block text-sm font-medium text-text-primary mb-2",
308
- children: ["Name ", /* @__PURE__ */ u("span", {
312
+ children: ["Name ", /* @__PURE__ */ h("span", {
309
313
  className: "text-state-error",
310
314
  children: "*"
311
315
  })]
312
316
  }),
313
- /* @__PURE__ */ u("input", {
317
+ /* @__PURE__ */ h("input", {
314
318
  id: "name",
315
319
  type: "text",
316
- value: T.name,
317
- onChange: Ae,
320
+ value: E.name,
321
+ onChange: je,
318
322
  placeholder: "e.g., User Analytics Parser",
319
323
  className: `
320
324
  w-full px-3 py-2.5
321
325
  text-sm text-text-primary
322
326
  bg-bg-surface
323
- border ${D.name ? "border-state-error" : "border-border-default"}
327
+ border ${O.name ? "border-state-error" : "border-border-default"}
324
328
  rounded-md
325
329
  placeholder:text-text-tertiary
326
330
  focus:outline-none focus:ring-2 focus:ring-action-primary-bg
327
331
  transition-all
328
332
  `
329
333
  }),
330
- D.name && /* @__PURE__ */ u("p", {
334
+ O.name && /* @__PURE__ */ h("p", {
331
335
  className: "text-xs text-state-error mt-1.5",
332
- children: D.name
336
+ children: O.name
333
337
  })
334
338
  ] }),
335
- /* @__PURE__ */ d("div", { children: [
336
- /* @__PURE__ */ d("label", {
339
+ /* @__PURE__ */ g("div", { children: [
340
+ /* @__PURE__ */ g("label", {
337
341
  htmlFor: "outputKey",
338
342
  className: "block text-sm font-medium text-text-primary mb-2",
339
- children: ["Output Key ", /* @__PURE__ */ u("span", {
343
+ children: ["Output Key ", /* @__PURE__ */ h("span", {
340
344
  className: "text-state-error",
341
345
  children: "*"
342
346
  })]
343
347
  }),
344
- /* @__PURE__ */ u("input", {
348
+ /* @__PURE__ */ h("input", {
345
349
  id: "outputKey",
346
350
  type: "text",
347
- value: T.outputKey,
348
- onChange: je,
351
+ value: E.outputKey,
352
+ onChange: Me,
349
353
  placeholder: "user_analytics_parser",
350
- disabled: C,
354
+ disabled: w,
351
355
  className: `
352
356
  w-full px-3 py-2.5
353
357
  text-sm text-text-primary font-mono
354
358
  bg-bg-surface
355
- border ${D.outputKey ? "border-state-error" : "border-border-default"}
359
+ border ${O.outputKey ? "border-state-error" : "border-border-default"}
356
360
  rounded-md
357
361
  placeholder:text-text-tertiary
358
362
  focus:outline-none focus:ring-2 focus:ring-action-primary-bg
@@ -360,341 +364,345 @@ var _ = {
360
364
  transition-all
361
365
  `
362
366
  }),
363
- D.outputKey && /* @__PURE__ */ u("p", {
367
+ O.outputKey && /* @__PURE__ */ h("p", {
364
368
  className: "text-xs text-state-error mt-1.5",
365
- children: D.outputKey
369
+ children: O.outputKey
366
370
  }),
367
- !C && /* @__PURE__ */ u("p", {
371
+ !w && /* @__PURE__ */ h("p", {
368
372
  className: "text-xs text-text-tertiary mt-1.5",
369
373
  children: "Auto-generated from name. Customize if needed."
370
374
  })
371
375
  ] }),
372
- /* @__PURE__ */ d("div", { children: [/* @__PURE__ */ u("label", {
376
+ /* @__PURE__ */ g("div", { children: [/* @__PURE__ */ h("label", {
373
377
  htmlFor: "description",
374
378
  className: "block text-sm font-medium text-text-primary mb-2",
375
379
  children: "Description"
376
- }), /* @__PURE__ */ u("textarea", {
380
+ }), /* @__PURE__ */ h("textarea", {
377
381
  id: "description",
378
- value: T.description,
379
- onChange: Me,
382
+ value: E.description,
383
+ onChange: Ne,
380
384
  placeholder: "Describe what this parser does...",
381
385
  rows: 3,
382
386
  className: "\n w-full px-3 py-2.5\n text-sm text-text-primary\n bg-bg-surface\n border border-border-default\n rounded-md\n placeholder:text-text-tertiary\n focus:outline-none focus:ring-2 focus:ring-action-primary-bg\n resize-none\n transition-all\n "
383
387
  })] }),
384
- w && /* @__PURE__ */ d("div", { children: [
385
- /* @__PURE__ */ u("label", {
388
+ T && /* @__PURE__ */ g("div", { children: [
389
+ /* @__PURE__ */ h("label", {
386
390
  htmlFor: "dashboard",
387
391
  className: "block text-sm font-medium text-text-primary mb-2",
388
- children: /* @__PURE__ */ d("div", {
392
+ children: /* @__PURE__ */ g("div", {
389
393
  className: "flex items-center gap-2",
390
- children: [/* @__PURE__ */ u(fe, { className: "w-4 h-4" }), "Dashboard Scope"]
394
+ children: [/* @__PURE__ */ h(fe, { className: "w-4 h-4" }), "Dashboard Scope"]
391
395
  })
392
396
  }),
393
- /* @__PURE__ */ d("select", {
397
+ /* @__PURE__ */ g("select", {
394
398
  id: "dashboard",
395
- value: b,
396
- onChange: Le,
397
- disabled: ke || C,
399
+ value: x,
400
+ onChange: Re,
401
+ disabled: Ae || w,
398
402
  className: "\n w-full px-3 py-2.5\n text-sm text-text-primary\n bg-bg-surface\n border border-border-default\n rounded-md\n focus:outline-none focus:ring-2 focus:ring-action-primary-bg\n disabled:bg-bg-sunken disabled:cursor-not-allowed disabled:opacity-60\n transition-all\n ",
399
- children: [/* @__PURE__ */ u("option", {
403
+ children: [/* @__PURE__ */ h("option", {
400
404
  value: "default",
401
405
  children: "Global (available everywhere)"
402
- }), De.map((e) => /* @__PURE__ */ u("option", {
406
+ }), Oe.map((e) => /* @__PURE__ */ h("option", {
403
407
  value: e.id,
404
408
  children: e.name
405
409
  }, e.id))]
406
410
  }),
407
- /* @__PURE__ */ u("p", {
411
+ /* @__PURE__ */ h("p", {
408
412
  className: "text-xs text-text-tertiary mt-1.5",
409
- children: C ? "Dashboard scope cannot be changed after creation." : b === "default" ? "Global parsers are available across all dashboards." : "This parser will only be available in the selected dashboard."
413
+ children: w ? "Dashboard scope cannot be changed after creation." : x === "default" ? "Global parsers are available across all dashboards." : "This parser will only be available in the selected dashboard."
410
414
  })
411
415
  ] })
412
416
  ]
413
417
  })] })
414
418
  }),
415
- /* @__PURE__ */ u("div", {
419
+ /* @__PURE__ */ h("div", {
416
420
  className: "space-y-6",
417
- children: /* @__PURE__ */ d(p, { children: [/* @__PURE__ */ u(h, {
418
- className: "pb-4",
419
- children: /* @__PURE__ */ d("div", {
420
- className: "flex items-center gap-3",
421
- children: [/* @__PURE__ */ u("div", {
422
- className: "w-8 h-8 rounded-full bg-action-primary-bg/10 flex items-center justify-center",
423
- children: /* @__PURE__ */ u(le, { className: "w-4 h-4 text-action-primary-bg" })
424
- }), /* @__PURE__ */ d("div", { children: [/* @__PURE__ */ u(g, {
425
- className: "text-base",
426
- children: "Parser Configuration"
427
- }), /* @__PURE__ */ u("p", {
428
- className: "text-xs text-text-secondary mt-0.5",
429
- children: "Configure parser type and data source"
430
- })] })]
431
- })
432
- }), /* @__PURE__ */ d(m, {
433
- className: "space-y-5",
434
- children: [
435
- /* @__PURE__ */ d("div", { children: [/* @__PURE__ */ d("label", {
436
- className: "block text-sm font-medium text-text-primary mb-3",
437
- children: ["Parser Type ", /* @__PURE__ */ u("span", {
438
- className: "text-state-error",
439
- children: "*"
440
- })]
441
- }), /* @__PURE__ */ u("div", {
442
- className: "space-y-2",
443
- children: Object.keys(_).map((e) => {
444
- let t = _[e];
445
- return /* @__PURE__ */ d("label", {
446
- className: `
421
+ children: /* @__PURE__ */ g(he, {
422
+ treatment: "glass",
423
+ glow: !0,
424
+ children: [/* @__PURE__ */ h(f, {
425
+ className: "pb-4",
426
+ children: /* @__PURE__ */ g("div", {
427
+ className: "flex items-center gap-3",
428
+ children: [/* @__PURE__ */ h("div", {
429
+ className: "w-8 h-8 rounded-full bg-action-primary-bg/10 flex items-center justify-center",
430
+ children: /* @__PURE__ */ h(le, { className: "w-4 h-4 text-action-primary-bg" })
431
+ }), /* @__PURE__ */ g("div", { children: [/* @__PURE__ */ h(p, {
432
+ className: "text-base",
433
+ children: "Parser Configuration"
434
+ }), /* @__PURE__ */ h("p", {
435
+ className: "text-xs text-text-secondary mt-0.5",
436
+ children: "Configure parser type and data source"
437
+ })] })]
438
+ })
439
+ }), /* @__PURE__ */ g(d, {
440
+ className: "space-y-5",
441
+ children: [
442
+ /* @__PURE__ */ g("div", { children: [/* @__PURE__ */ g("label", {
443
+ className: "block text-sm font-medium text-text-primary mb-3",
444
+ children: ["Parser Type ", /* @__PURE__ */ h("span", {
445
+ className: "text-state-error",
446
+ children: "*"
447
+ })]
448
+ }), /* @__PURE__ */ h("div", {
449
+ className: "space-y-2",
450
+ children: Object.keys(_).map((e) => {
451
+ let t = _[e];
452
+ return /* @__PURE__ */ g("label", {
453
+ className: `
447
454
  flex items-start gap-3 p-3
448
455
  border rounded-md
449
456
  cursor-pointer
450
- ${T.type === e ? "border-action-primary-bg bg-action-primary-bg/5" : "border-border-default hover:bg-bg-sunken"}
457
+ ${E.type === e ? "border-action-primary-bg bg-action-primary-bg/5" : "border-border-default hover:bg-bg-sunken"}
451
458
  transition-colors
452
459
  `,
453
- children: [/* @__PURE__ */ u("input", {
454
- type: "radio",
455
- name: "parserType",
456
- value: e,
457
- checked: T.type === e,
458
- onChange: () => Ne(e),
459
- className: "mt-1 w-4 h-4 text-action-primary-bg"
460
- }), /* @__PURE__ */ d("div", { children: [/* @__PURE__ */ u("span", {
461
- className: "text-sm font-medium text-text-primary",
462
- children: t.name
463
- }), /* @__PURE__ */ u("p", {
464
- className: "text-xs text-text-secondary mt-0.5",
465
- children: t.description
466
- })] })]
467
- }, e);
468
- })
469
- })] }),
470
- /* @__PURE__ */ d("div", { children: [
471
- /* @__PURE__ */ d("label", {
472
- htmlFor: "inputSinkKey",
473
- className: "block text-sm font-medium text-text-primary mb-2",
474
- children: ["Source DataSink ", /* @__PURE__ */ u("span", {
475
- className: "text-state-error",
476
- children: "*"
477
- })]
478
- }),
479
- /* @__PURE__ */ d("div", {
480
- className: "flex gap-2",
481
- children: [/* @__PURE__ */ d("select", {
482
- id: "inputSinkKey",
483
- value: T.inputSinkKey,
484
- onChange: Fe,
485
- className: `
460
+ children: [/* @__PURE__ */ h("input", {
461
+ type: "radio",
462
+ name: "parserType",
463
+ value: e,
464
+ checked: E.type === e,
465
+ onChange: () => Pe(e),
466
+ className: "mt-1 w-4 h-4 text-action-primary-bg"
467
+ }), /* @__PURE__ */ g("div", { children: [/* @__PURE__ */ h("span", {
468
+ className: "text-sm font-medium text-text-primary",
469
+ children: t.name
470
+ }), /* @__PURE__ */ h("p", {
471
+ className: "text-xs text-text-secondary mt-0.5",
472
+ children: t.description
473
+ })] })]
474
+ }, e);
475
+ })
476
+ })] }),
477
+ /* @__PURE__ */ g("div", { children: [
478
+ /* @__PURE__ */ g("label", {
479
+ htmlFor: "inputSinkKey",
480
+ className: "block text-sm font-medium text-text-primary mb-2",
481
+ children: ["Source DataSink ", /* @__PURE__ */ h("span", {
482
+ className: "text-state-error",
483
+ children: "*"
484
+ })]
485
+ }),
486
+ /* @__PURE__ */ g("div", {
487
+ className: "flex gap-2",
488
+ children: [/* @__PURE__ */ g("select", {
489
+ id: "inputSinkKey",
490
+ value: E.inputSinkKey,
491
+ onChange: Ie,
492
+ className: `
486
493
  flex-1 px-3 py-2.5
487
494
  text-sm text-text-primary
488
495
  bg-bg-surface
489
- border ${D.inputSinkKey ? "border-state-error" : "border-border-default"}
496
+ border ${O.inputSinkKey ? "border-state-error" : "border-border-default"}
490
497
  rounded-md
491
498
  focus:outline-none focus:ring-2 focus:ring-action-primary-bg
492
499
  transition-all
493
500
  `,
494
- children: [/* @__PURE__ */ u("option", {
495
- value: "",
496
- children: "Select a DataSink..."
497
- }), Te.map((e) => /* @__PURE__ */ u("option", {
498
- value: e.key,
499
- children: e.name || e.key
500
- }, e.id))]
501
- }), T.inputSinkKey && /* @__PURE__ */ u("button", {
502
- type: "button",
503
- onClick: Re,
504
- className: "px-3 py-2.5 text-sm font-medium text-action-primary-bg border border-action-primary-bg rounded-md hover:bg-action-primary-bg/10 transition-colors whitespace-nowrap",
505
- children: "Load Sample"
506
- })]
507
- }),
508
- D.inputSinkKey && /* @__PURE__ */ u("p", {
509
- className: "text-xs text-state-error mt-1.5",
510
- children: D.inputSinkKey
511
- }),
512
- /* @__PURE__ */ u("p", {
513
- className: "text-xs text-text-tertiary mt-1.5",
514
- children: "Select the data source for this parser to transform."
515
- }),
516
- T.inputSinkKey && /* @__PURE__ */ d("div", {
517
- className: "mt-3",
518
- children: [/* @__PURE__ */ d("button", {
519
- type: "button",
520
- onClick: ze,
521
- className: "inline-flex items-center gap-2 text-sm text-action-primary-bg hover:text-action-primary-bgHover transition-colors",
522
- children: [
523
- u(U ? se : ce, { className: "w-4 h-4" }),
524
- /* @__PURE__ */ u(ue, { className: "w-4 h-4" }),
525
- "Show Data Preview"
526
- ]
527
- }), U && /* @__PURE__ */ u("div", {
528
- className: "mt-3 border border-border-default rounded-md overflow-hidden",
529
- children: ye ? /* @__PURE__ */ d("div", {
530
- className: "p-4 flex items-center justify-center",
531
- children: [/* @__PURE__ */ u(s, { className: "w-5 h-5 text-text-secondary animate-spin" }), /* @__PURE__ */ u("span", {
532
- className: "ml-2 text-sm text-text-secondary",
533
- children: "Loading data..."
534
- })]
535
- }) : q ? /* @__PURE__ */ u("div", {
536
- className: "p-4 bg-state-error/5",
537
- children: /* @__PURE__ */ u("p", {
538
- className: "text-sm text-state-error",
539
- children: q
501
+ children: [/* @__PURE__ */ h("option", {
502
+ value: "",
503
+ children: "Select a DataSink..."
504
+ }), Ee.map((e) => /* @__PURE__ */ h("option", {
505
+ value: e.key,
506
+ children: e.name || e.key
507
+ }, e.id))]
508
+ }), E.inputSinkKey && /* @__PURE__ */ h("button", {
509
+ type: "button",
510
+ onClick: ze,
511
+ className: "px-3 py-2.5 text-sm font-medium text-action-primary-bg border border-action-primary-bg rounded-md hover:bg-action-primary-bg/10 transition-colors whitespace-nowrap",
512
+ children: "Load Sample"
513
+ })]
514
+ }),
515
+ O.inputSinkKey && /* @__PURE__ */ h("p", {
516
+ className: "text-xs text-state-error mt-1.5",
517
+ children: O.inputSinkKey
518
+ }),
519
+ /* @__PURE__ */ h("p", {
520
+ className: "text-xs text-text-tertiary mt-1.5",
521
+ children: "Select the data source for this parser to transform."
522
+ }),
523
+ E.inputSinkKey && /* @__PURE__ */ g("div", {
524
+ className: "mt-3",
525
+ children: [/* @__PURE__ */ g("button", {
526
+ type: "button",
527
+ onClick: Be,
528
+ className: "inline-flex items-center gap-2 text-sm text-action-primary-bg hover:text-action-primary-bgHover transition-colors",
529
+ children: [
530
+ h(W ? se : ce, { className: "w-4 h-4" }),
531
+ /* @__PURE__ */ h(ue, { className: "w-4 h-4" }),
532
+ "Show Data Preview"
533
+ ]
534
+ }), W && /* @__PURE__ */ h("div", {
535
+ className: "mt-3 border border-border-default rounded-md overflow-hidden",
536
+ children: be ? /* @__PURE__ */ g("div", {
537
+ className: "p-4 flex items-center justify-center",
538
+ children: [/* @__PURE__ */ h(s, { className: "w-5 h-5 text-text-secondary animate-spin" }), /* @__PURE__ */ h("span", {
539
+ className: "ml-2 text-sm text-text-secondary",
540
+ children: "Loading data..."
541
+ })]
542
+ }) : J ? /* @__PURE__ */ h("div", {
543
+ className: "p-4 bg-state-error/5",
544
+ children: /* @__PURE__ */ h("p", {
545
+ className: "text-sm text-state-error",
546
+ children: J
547
+ })
548
+ }) : K ? /* @__PURE__ */ h("pre", {
549
+ className: "p-3 text-xs font-mono bg-bg-sunken text-text-primary overflow-auto max-h-48",
550
+ children: JSON.stringify(K, null, 2)
551
+ }) : /* @__PURE__ */ h("div", {
552
+ className: "p-4 text-sm text-text-secondary text-center",
553
+ children: "No data available"
540
554
  })
541
- }) : G ? /* @__PURE__ */ u("pre", {
542
- className: "p-3 text-xs font-mono bg-bg-sunken text-text-primary overflow-auto max-h-48",
543
- children: JSON.stringify(G, null, 2)
544
- }) : /* @__PURE__ */ u("div", {
545
- className: "p-4 text-sm text-text-secondary text-center",
546
- children: "No data available"
547
- })
548
- })]
549
- })
550
- ] }),
551
- /* @__PURE__ */ d("div", { children: [
552
- /* @__PURE__ */ d("label", {
553
- htmlFor: "expression",
554
- className: "block text-sm font-medium text-text-primary mb-2",
555
- children: ["Expression ", /* @__PURE__ */ u("span", {
556
- className: "text-state-error",
557
- children: "*"
558
- })]
559
- }),
560
- /* @__PURE__ */ u("textarea", {
561
- id: "expression",
562
- value: T.expression,
563
- onChange: Pe,
564
- placeholder: $.placeholder,
565
- rows: 8,
566
- className: `
555
+ })]
556
+ })
557
+ ] }),
558
+ /* @__PURE__ */ g("div", { children: [
559
+ /* @__PURE__ */ g("label", {
560
+ htmlFor: "expression",
561
+ className: "block text-sm font-medium text-text-primary mb-2",
562
+ children: ["Expression ", /* @__PURE__ */ h("span", {
563
+ className: "text-state-error",
564
+ children: "*"
565
+ })]
566
+ }),
567
+ /* @__PURE__ */ h("textarea", {
568
+ id: "expression",
569
+ value: E.expression,
570
+ onChange: Fe,
571
+ placeholder: Ge.placeholder,
572
+ rows: 8,
573
+ className: `
567
574
  w-full px-3 py-2.5
568
575
  text-sm text-text-primary font-mono
569
576
  bg-bg-surface
570
- border ${D.expression ? "border-state-error" : "border-border-default"}
577
+ border ${O.expression ? "border-state-error" : "border-border-default"}
571
578
  rounded-md
572
579
  placeholder:text-text-tertiary
573
580
  focus:outline-none focus:ring-2 focus:ring-action-primary-bg
574
581
  resize-none
575
582
  transition-all
576
583
  `
577
- }),
578
- D.expression && /* @__PURE__ */ u("p", {
579
- className: "text-xs text-state-error mt-1.5",
580
- children: D.expression
581
- }),
582
- /* @__PURE__ */ d("p", {
583
- className: "text-xs text-text-tertiary mt-1.5",
584
- children: ["Example: ", $.example]
585
- })
586
- ] })
587
- ]
588
- })] })
584
+ }),
585
+ O.expression && /* @__PURE__ */ h("p", {
586
+ className: "text-xs text-state-error mt-1.5",
587
+ children: O.expression
588
+ }),
589
+ /* @__PURE__ */ g("p", {
590
+ className: "text-xs text-text-tertiary mt-1.5",
591
+ children: ["Example: ", Ge.example]
592
+ })
593
+ ] })
594
+ ]
595
+ })]
596
+ })
589
597
  }),
590
- /* @__PURE__ */ d("div", {
598
+ /* @__PURE__ */ g("div", {
591
599
  className: "space-y-6",
592
- children: [/* @__PURE__ */ d(p, { children: [/* @__PURE__ */ u(h, {
600
+ children: [/* @__PURE__ */ g(u, { children: [/* @__PURE__ */ h(f, {
593
601
  className: "pb-4",
594
- children: /* @__PURE__ */ d("div", {
602
+ children: /* @__PURE__ */ g("div", {
595
603
  className: "flex items-center gap-3",
596
- children: [/* @__PURE__ */ u("div", {
604
+ children: [/* @__PURE__ */ h("div", {
597
605
  className: "w-8 h-8 rounded-full bg-action-primary-bg/10 flex items-center justify-center",
598
- children: /* @__PURE__ */ u(c, { className: "w-4 h-4 text-action-primary-bg" })
599
- }), /* @__PURE__ */ d("div", { children: [/* @__PURE__ */ u(g, {
606
+ children: /* @__PURE__ */ h(c, { className: "w-4 h-4 text-action-primary-bg" })
607
+ }), /* @__PURE__ */ g("div", { children: [/* @__PURE__ */ h(p, {
600
608
  className: "text-base",
601
609
  children: "Test Expression"
602
- }), /* @__PURE__ */ u("p", {
610
+ }), /* @__PURE__ */ h("p", {
603
611
  className: "text-xs text-text-secondary mt-0.5",
604
612
  children: "Test your parser with sample data"
605
613
  })] })]
606
614
  })
607
- }), /* @__PURE__ */ d(m, {
615
+ }), /* @__PURE__ */ g(d, {
608
616
  className: "space-y-5",
609
617
  children: [
610
- /* @__PURE__ */ d("div", { children: [
611
- /* @__PURE__ */ u("label", {
618
+ /* @__PURE__ */ g("div", { children: [
619
+ /* @__PURE__ */ h("label", {
612
620
  className: "block text-sm font-medium text-text-primary mb-2",
613
621
  children: "Input JSON"
614
622
  }),
615
- /* @__PURE__ */ u("textarea", {
616
- value: F,
617
- onChange: (e) => I(e.target.value),
623
+ /* @__PURE__ */ h("textarea", {
624
+ value: I,
625
+ onChange: (e) => L(e.target.value),
618
626
  placeholder: "{\"data\": [{\"name\": \"test\", \"value\": 123}]}",
619
627
  rows: 6,
620
628
  className: "\n w-full px-3 py-2.5\n text-xs text-text-primary font-mono leading-relaxed\n bg-bg-surface\n border border-border-default\n rounded-md\n placeholder:text-text-tertiary\n focus:outline-none focus:ring-2 focus:ring-action-primary-bg\n resize-none\n transition-all\n "
621
629
  }),
622
- /* @__PURE__ */ u("p", {
630
+ /* @__PURE__ */ h("p", {
623
631
  className: "text-xs text-text-tertiary mt-1.5",
624
632
  children: "Paste test data or load from a DataSink above."
625
633
  })
626
634
  ] }),
627
- /* @__PURE__ */ u(f, {
635
+ /* @__PURE__ */ h(l, {
628
636
  type: "button",
629
- onClick: Be,
630
- disabled: V || !T.expression.trim(),
637
+ onClick: Ve,
638
+ disabled: H || !E.expression.trim(),
631
639
  variant: "default",
632
640
  className: "w-full",
633
- children: V ? /* @__PURE__ */ d(l, { children: [/* @__PURE__ */ u(s, { className: "w-4 h-4 mr-2 animate-spin" }), "Testing..."] }) : /* @__PURE__ */ d(l, { children: [/* @__PURE__ */ u(c, { className: "w-4 h-4 mr-2" }), "Run Test"] })
641
+ children: H ? /* @__PURE__ */ g(m, { children: [/* @__PURE__ */ h(s, { className: "w-4 h-4 mr-2 animate-spin" }), "Testing..."] }) : /* @__PURE__ */ g(m, { children: [/* @__PURE__ */ h(c, { className: "w-4 h-4 mr-2" }), "Run Test"] })
634
642
  }),
635
- (L || z) && /* @__PURE__ */ d("div", {
643
+ (R || B) && /* @__PURE__ */ g("div", {
636
644
  className: "pt-4 border-t border-border-default",
637
- children: [/* @__PURE__ */ d("div", {
645
+ children: [/* @__PURE__ */ g("div", {
638
646
  className: "flex items-center justify-between mb-2",
639
- children: [/* @__PURE__ */ u("label", {
647
+ children: [/* @__PURE__ */ h("label", {
640
648
  className: "block text-sm font-medium text-text-primary",
641
- children: z ? "Error Output" : "Success Output"
642
- }), z ? /* @__PURE__ */ d("span", {
649
+ children: B ? "Error Output" : "Success Output"
650
+ }), B ? /* @__PURE__ */ g("span", {
643
651
  className: "text-xs px-2 py-1 bg-state-error/10 text-state-error rounded flex items-center gap-1",
644
- children: [/* @__PURE__ */ u(o, { className: "w-3 h-3" }), " Failed"]
645
- }) : /* @__PURE__ */ d("span", {
652
+ children: [/* @__PURE__ */ h(o, { className: "w-3 h-3" }), " Failed"]
653
+ }) : /* @__PURE__ */ g("span", {
646
654
  className: "text-xs px-2 py-1 bg-state-success/10 text-state-success rounded flex items-center gap-1",
647
- children: [/* @__PURE__ */ u(oe, { className: "w-3 h-3" }), " Passed"]
655
+ children: [/* @__PURE__ */ h(oe, { className: "w-3 h-3" }), " Passed"]
648
656
  })]
649
- }), /* @__PURE__ */ u("pre", {
657
+ }), /* @__PURE__ */ h("pre", {
650
658
  className: `
651
659
  w-full px-3 py-2.5
652
660
  text-xs font-mono leading-relaxed
653
- ${z ? "bg-state-error/5 text-state-error border-state-error/30" : "bg-state-success/5 text-text-primary border-state-success/30"}
661
+ ${B ? "bg-state-error/5 text-state-error border-state-error/30" : "bg-state-success/5 text-text-primary border-state-success/30"}
654
662
  border
655
663
  rounded-md
656
664
  overflow-auto
657
665
  max-h-[150px]
658
666
  `,
659
- children: z || L
667
+ children: B || R
660
668
  })]
661
669
  }),
662
- !L && !z && /* @__PURE__ */ u("div", {
670
+ !R && !B && /* @__PURE__ */ h("div", {
663
671
  className: "p-3 bg-bg-sunken rounded-md border border-border-default",
664
- children: /* @__PURE__ */ d("p", {
672
+ children: /* @__PURE__ */ g("p", {
665
673
  className: "text-xs text-text-secondary leading-relaxed",
666
- children: [/* @__PURE__ */ u("strong", { children: "Tip:" }), " Write your expression and click “Run Test” to see the transformation in real-time."]
674
+ children: [/* @__PURE__ */ h("strong", { children: "Tip:" }), " Write your expression and click “Run Test” to see the transformation in real-time."]
667
675
  })
668
676
  })
669
677
  ]
670
- })] }), /* @__PURE__ */ d(p, { children: [/* @__PURE__ */ u(h, {
678
+ })] }), /* @__PURE__ */ g(u, { children: [/* @__PURE__ */ h(f, {
671
679
  className: "pb-4",
672
- children: /* @__PURE__ */ d("div", {
680
+ children: /* @__PURE__ */ g("div", {
673
681
  className: "flex items-center gap-3",
674
- children: [/* @__PURE__ */ u("div", {
682
+ children: [/* @__PURE__ */ h("div", {
675
683
  className: "w-8 h-8 rounded-full bg-action-primary-bg/10 flex items-center justify-center",
676
- children: /* @__PURE__ */ u(me, { className: "w-4 h-4 text-action-primary-bg" })
677
- }), /* @__PURE__ */ d("div", { children: [/* @__PURE__ */ u(g, {
684
+ children: /* @__PURE__ */ h(me, { className: "w-4 h-4 text-action-primary-bg" })
685
+ }), /* @__PURE__ */ g("div", { children: [/* @__PURE__ */ h(p, {
678
686
  className: "text-base",
679
687
  children: "Advanced Settings"
680
- }), /* @__PURE__ */ u("p", {
688
+ }), /* @__PURE__ */ h("p", {
681
689
  className: "text-xs text-text-secondary mt-0.5",
682
690
  children: "Cache configuration"
683
691
  })] })]
684
692
  })
685
- }), /* @__PURE__ */ u(m, {
693
+ }), /* @__PURE__ */ h(d, {
686
694
  className: "space-y-5",
687
- children: /* @__PURE__ */ d("div", { children: [
688
- /* @__PURE__ */ u("label", {
695
+ children: /* @__PURE__ */ g("div", { children: [
696
+ /* @__PURE__ */ h("label", {
689
697
  className: "block text-sm font-medium text-text-primary mb-3",
690
698
  children: "Cache Duration"
691
699
  }),
692
- /* @__PURE__ */ u(ne, {
693
- value: T.ttl,
694
- onChange: Ie,
695
- error: D.ttl
700
+ /* @__PURE__ */ h(ne, {
701
+ value: E.ttl,
702
+ onChange: Le,
703
+ error: O.ttl
696
704
  }),
697
- /* @__PURE__ */ u("p", {
705
+ /* @__PURE__ */ h("p", {
698
706
  className: "text-xs text-text-tertiary mt-2",
699
707
  children: "Select a preset or enter a custom duration (30-86400 seconds)."
700
708
  })
@@ -702,18 +710,18 @@ var _ = {
702
710
  })] })]
703
711
  })
704
712
  ]
705
- }), /* @__PURE__ */ d("div", {
713
+ }), /* @__PURE__ */ g("div", {
706
714
  className: "flex items-center justify-end gap-spacing-md pt-spacing-lg mt-spacing-lg border-t border-border-default",
707
- children: [/* @__PURE__ */ u(f, {
715
+ children: [/* @__PURE__ */ h(l, {
708
716
  type: "button",
709
- onClick: Ve,
717
+ onClick: He,
710
718
  variant: "secondary",
711
719
  children: "Cancel"
712
- }), /* @__PURE__ */ u(f, {
720
+ }), /* @__PURE__ */ h(l, {
713
721
  type: "submit",
714
- disabled: !Ue || j,
722
+ disabled: !We || M,
715
723
  variant: "default",
716
- children: j ? /* @__PURE__ */ d(l, { children: [/* @__PURE__ */ u(s, { className: "w-4 h-4 mr-2 animate-spin" }), "Saving..."] }) : /* @__PURE__ */ d(l, { children: [/* @__PURE__ */ u(pe, { className: "w-4 h-4 mr-2" }), C ? "Save Changes" : "Create Parser"] })
724
+ children: M ? /* @__PURE__ */ g(m, { children: [/* @__PURE__ */ h(s, { className: "w-4 h-4 mr-2 animate-spin" }), "Saving..."] }) : /* @__PURE__ */ g(m, { children: [/* @__PURE__ */ h(pe, { className: "w-4 h-4 mr-2" }), w ? "Save Changes" : "Create Parser"] })
717
725
  })]
718
726
  })]
719
727
  })
@@ -722,6 +730,6 @@ var _ = {
722
730
  });
723
731
  });
724
732
  //#endregion
725
- export { v as ParserBuilderPage, v as default };
733
+ export { y as ParserBuilderPage, y as default };
726
734
 
727
735
  //# sourceMappingURL=ParserBuilderPage.js.map