@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.
- package/dist/bigconsole/BigConsoleRoutes.js +175 -118
- package/dist/bigconsole/BigConsoleRoutes.js.map +1 -1
- package/dist/bigconsole/assistant/assistantApi.js +215 -0
- package/dist/bigconsole/assistant/assistantApi.js.map +1 -0
- package/dist/bigconsole/assistant/createSandboxAssistantTransport.js +119 -0
- package/dist/bigconsole/assistant/createSandboxAssistantTransport.js.map +1 -0
- package/dist/bigconsole/assistant/index.js +2 -0
- package/dist/bigconsole/assistant/pageContext.js +51 -0
- package/dist/bigconsole/assistant/pageContext.js.map +1 -0
- package/dist/bigconsole/components/dashboard/CreateDashboardDialog.js +48 -48
- package/dist/bigconsole/components/dashboard/DashboardToolbar.js +52 -52
- package/dist/bigconsole/components/dashboard/DrilldownBreadcrumb.js.map +1 -1
- package/dist/bigconsole/components/dashboard/ExportDashboardDialog.js +33 -33
- package/dist/bigconsole/components/dashboard/ImportDashboardDialog.js +179 -179
- package/dist/bigconsole/components/dashboard/ImportDashboardDialog.js.map +1 -1
- package/dist/bigconsole/components/dashboard/WidgetPalette.js +38 -38
- package/dist/bigconsole/components/datasink/DataSinkTableViewer.js +32 -32
- package/dist/bigconsole/components/datasink/ExportDataSinkDialog.js +31 -31
- package/dist/bigconsole/components/datasink/ImportDataSinkDialog.js +98 -98
- package/dist/bigconsole/components/datasink/ImportDataSinkDialog.js.map +1 -1
- package/dist/bigconsole/components/parser/ExportParserDialog.js +31 -31
- package/dist/bigconsole/components/parser/ImportParserDialog.js +162 -162
- package/dist/bigconsole/components/parser/ImportParserDialog.js.map +1 -1
- package/dist/bigconsole/components/widgets/ActionConfigDialog.js +79 -79
- package/dist/bigconsole/components/widgets/ActionConfigDialog.js.map +1 -1
- package/dist/bigconsole/components/widgets/DrilldownConfigPanel.js.map +1 -1
- package/dist/bigconsole/components/widgets/PropertiesPanel.js +307 -307
- package/dist/bigconsole/components/widgets/PropertiesPanel.js.map +1 -1
- package/dist/bigconsole/components/widgets/WidgetConfigDialog.js +222 -222
- package/dist/bigconsole/components/widgets/WidgetConfigDialog.js.map +1 -1
- package/dist/bigconsole/components/widgets/WidgetTypeSelector.js +23 -23
- package/dist/bigconsole/index.js +3 -0
- package/dist/bigconsole/pages/DashboardBuilderPage.js +74 -74
- package/dist/bigconsole/pages/DashboardBuilderPage.js.map +1 -1
- package/dist/bigconsole/pages/DashboardViewPage.js +168 -189
- package/dist/bigconsole/pages/DashboardViewPage.js.map +1 -1
- package/dist/bigconsole/pages/DashboardsPage.js +266 -310
- package/dist/bigconsole/pages/DashboardsPage.js.map +1 -1
- package/dist/bigconsole/pages/DataParsersPage.js +148 -194
- package/dist/bigconsole/pages/DataParsersPage.js.map +1 -1
- package/dist/bigconsole/pages/DataSinkBuilderPage.js +252 -246
- package/dist/bigconsole/pages/DataSinkBuilderPage.js.map +1 -1
- package/dist/bigconsole/pages/DataSinkViewPage.js +256 -231
- package/dist/bigconsole/pages/DataSinkViewPage.js.map +1 -1
- package/dist/bigconsole/pages/DataSinksPage.js +173 -219
- package/dist/bigconsole/pages/DataSinksPage.js.map +1 -1
- package/dist/bigconsole/pages/HomePage.js +125 -141
- package/dist/bigconsole/pages/HomePage.js.map +1 -1
- package/dist/bigconsole/pages/InsightsPage.js +159 -184
- package/dist/bigconsole/pages/InsightsPage.js.map +1 -1
- package/dist/bigconsole/pages/ParserBuilderPage.js +401 -393
- package/dist/bigconsole/pages/ParserBuilderPage.js.map +1 -1
- package/dist/bigconsole/pages/ParserViewPage.js +220 -201
- package/dist/bigconsole/pages/ParserViewPage.js.map +1 -1
- package/dist/bigconsole/pages/PipelineBuilderPage.js +212 -206
- package/dist/bigconsole/pages/PipelineBuilderPage.js.map +1 -1
- package/dist/bigconsole/pages/PipelineViewPage.js +204 -181
- package/dist/bigconsole/pages/PipelineViewPage.js.map +1 -1
- package/dist/bigconsole/pages/PipelinesPage.js +107 -150
- package/dist/bigconsole/pages/PipelinesPage.js.map +1 -1
- package/dist/bigconsole/pages/SettingsPage.js +184 -171
- package/dist/bigconsole/pages/SettingsPage.js.map +1 -1
- package/dist/bigconsole/pages/WidgetDemoPage.js +69 -81
- package/dist/bigconsole/pages/WidgetDemoPage.js.map +1 -1
- package/dist/bigconsole/pages/WorkflowViewPage.js +230 -216
- package/dist/bigconsole/pages/WorkflowViewPage.js.map +1 -1
- package/dist/bigconsole/pages/WorkflowsPage.js +106 -149
- package/dist/bigconsole/pages/WorkflowsPage.js.map +1 -1
- package/dist/generated/wspace-operations.js +87 -36
- package/dist/generated/wspace-operations.js.map +1 -1
- package/dist/index.js +3 -1
- 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 {
|
|
11
|
-
import {
|
|
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
|
|
13
|
+
function _e(e) {
|
|
14
14
|
return e.toLowerCase().replace(/[^a-z0-9]+/g, "_").replace(/^_+|_+$/g, "").substring(0, 64);
|
|
15
15
|
}
|
|
16
|
-
function
|
|
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
|
-
},
|
|
34
|
-
let { parserId: n, consoleId:
|
|
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
|
-
}), [
|
|
43
|
-
consoleId:
|
|
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:
|
|
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
|
-
|
|
47
|
+
De(), w && n && X(n), T && ke();
|
|
48
48
|
}, [
|
|
49
|
-
|
|
49
|
+
w,
|
|
50
50
|
n,
|
|
51
51
|
X,
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
52
|
+
De,
|
|
53
|
+
T,
|
|
54
|
+
ke
|
|
55
55
|
]), i(() => {
|
|
56
|
-
|
|
57
|
-
name:
|
|
58
|
-
outputKey:
|
|
59
|
-
description:
|
|
60
|
-
type:
|
|
61
|
-
expression:
|
|
62
|
-
inputSinkKey:
|
|
63
|
-
ttl:
|
|
64
|
-
}),
|
|
65
|
-
}, [
|
|
66
|
-
let
|
|
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
|
-
|
|
68
|
+
D((e) => ({
|
|
69
69
|
...e,
|
|
70
70
|
name: t,
|
|
71
|
-
outputKey:
|
|
72
|
-
})),
|
|
71
|
+
outputKey: A ? e.outputKey : _e(t)
|
|
72
|
+
})), k((e) => ({
|
|
73
73
|
...e,
|
|
74
74
|
name: void 0
|
|
75
75
|
}));
|
|
76
|
-
}, [
|
|
76
|
+
}, [A]), Me = r((e) => {
|
|
77
77
|
let t = e.target.value.toLowerCase().replace(/[^a-z0-9_]/g, "");
|
|
78
|
-
|
|
78
|
+
D((e) => ({
|
|
79
79
|
...e,
|
|
80
80
|
outputKey: t
|
|
81
|
-
})),
|
|
81
|
+
})), j(!0), k((e) => ({
|
|
82
82
|
...e,
|
|
83
83
|
outputKey: void 0
|
|
84
84
|
}));
|
|
85
|
-
}, []),
|
|
86
|
-
|
|
85
|
+
}, []), Ne = r((e) => {
|
|
86
|
+
D((t) => ({
|
|
87
87
|
...t,
|
|
88
88
|
description: e.target.value
|
|
89
89
|
}));
|
|
90
|
-
}, []),
|
|
91
|
-
|
|
90
|
+
}, []), Pe = r((e) => {
|
|
91
|
+
D((t) => ({
|
|
92
92
|
...t,
|
|
93
93
|
type: e
|
|
94
|
-
})),
|
|
95
|
-
}, []),
|
|
96
|
-
|
|
94
|
+
})), z(""), V(null);
|
|
95
|
+
}, []), Fe = r((e) => {
|
|
96
|
+
D((t) => ({
|
|
97
97
|
...t,
|
|
98
98
|
expression: e.target.value
|
|
99
|
-
})),
|
|
99
|
+
})), k((e) => ({
|
|
100
100
|
...e,
|
|
101
101
|
expression: void 0
|
|
102
102
|
}));
|
|
103
|
-
}, []),
|
|
104
|
-
|
|
103
|
+
}, []), Ie = r((e) => {
|
|
104
|
+
D((t) => ({
|
|
105
105
|
...t,
|
|
106
106
|
inputSinkKey: e.target.value
|
|
107
|
-
})),
|
|
107
|
+
})), k((e) => ({
|
|
108
108
|
...e,
|
|
109
109
|
inputSinkKey: void 0
|
|
110
110
|
}));
|
|
111
|
-
}, []),
|
|
112
|
-
|
|
111
|
+
}, []), Le = r((e) => {
|
|
112
|
+
D((t) => ({
|
|
113
113
|
...t,
|
|
114
114
|
ttl: e
|
|
115
|
-
})),
|
|
115
|
+
})), k((e) => ({
|
|
116
116
|
...e,
|
|
117
117
|
ttl: void 0
|
|
118
118
|
}));
|
|
119
|
-
}, []),
|
|
120
|
-
|
|
121
|
-
}, []),
|
|
122
|
-
if (
|
|
123
|
-
let e = await
|
|
124
|
-
e?.raw &&
|
|
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
|
-
}, [
|
|
127
|
-
if (
|
|
128
|
-
|
|
126
|
+
}, [E.inputSinkKey, Q]), Be = r(async () => {
|
|
127
|
+
if (W) {
|
|
128
|
+
G(!1);
|
|
129
129
|
return;
|
|
130
130
|
}
|
|
131
|
-
if (!
|
|
132
|
-
|
|
131
|
+
if (!E.inputSinkKey) {
|
|
132
|
+
Y("Please select a source DataSink first");
|
|
133
133
|
return;
|
|
134
134
|
}
|
|
135
|
-
|
|
135
|
+
G(!0), q(!0), Y(null);
|
|
136
136
|
try {
|
|
137
|
-
let e = await
|
|
138
|
-
e?.raw ?
|
|
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
|
-
|
|
140
|
+
Y(e instanceof Error ? e.message : "Failed to load data");
|
|
141
141
|
} finally {
|
|
142
|
-
|
|
142
|
+
q(!1);
|
|
143
143
|
}
|
|
144
144
|
}, [
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
]),
|
|
149
|
-
if (!
|
|
150
|
-
|
|
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
|
-
|
|
153
|
+
U(!0), V(null), z("");
|
|
154
154
|
try {
|
|
155
|
-
let e = await
|
|
156
|
-
type:
|
|
157
|
-
expression:
|
|
158
|
-
sampleData: JSON.parse(
|
|
155
|
+
let e = await Te({
|
|
156
|
+
type: E.type,
|
|
157
|
+
expression: E.expression,
|
|
158
|
+
sampleData: JSON.parse(I)
|
|
159
159
|
});
|
|
160
|
-
e && (e.success ?
|
|
160
|
+
e && (e.success ? z(JSON.stringify(e.output, null, 2)) : V(e.error || "Test failed"));
|
|
161
161
|
} catch (e) {
|
|
162
|
-
|
|
162
|
+
V(e instanceof Error ? e.message : "Test failed");
|
|
163
163
|
} finally {
|
|
164
|
-
|
|
164
|
+
U(!1);
|
|
165
165
|
}
|
|
166
166
|
}, [
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
]),
|
|
172
|
-
y
|
|
173
|
-
}, [
|
|
174
|
-
e.preventDefault(),
|
|
175
|
-
let 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
|
-
|
|
177
|
+
k(t);
|
|
178
178
|
return;
|
|
179
179
|
}
|
|
180
|
-
|
|
180
|
+
N(!0);
|
|
181
181
|
try {
|
|
182
|
-
if (
|
|
183
|
-
if (!await
|
|
184
|
-
name:
|
|
185
|
-
description:
|
|
186
|
-
expression:
|
|
187
|
-
inputSinkKey:
|
|
188
|
-
outputKey:
|
|
189
|
-
ttl:
|
|
190
|
-
},
|
|
191
|
-
} else if (!await
|
|
192
|
-
consoleId:
|
|
193
|
-
name:
|
|
194
|
-
type:
|
|
195
|
-
expression:
|
|
196
|
-
inputSinkKey:
|
|
197
|
-
outputKey:
|
|
198
|
-
description:
|
|
199
|
-
ttl:
|
|
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
|
|
201
|
+
b(y ? `/dashboards/${y}/parsers` : "/parsers");
|
|
202
202
|
} catch (e) {
|
|
203
|
-
|
|
203
|
+
F(e instanceof Error ? e.message : "Failed to save parser");
|
|
204
204
|
} finally {
|
|
205
|
-
|
|
205
|
+
N(!1);
|
|
206
206
|
}
|
|
207
207
|
}, [
|
|
208
|
-
|
|
208
|
+
E,
|
|
209
|
+
w,
|
|
210
|
+
$,
|
|
211
|
+
Z,
|
|
212
|
+
we,
|
|
213
|
+
b,
|
|
209
214
|
C,
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
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 (
|
|
222
|
+
if (xe && w) return /* @__PURE__ */ h("div", {
|
|
223
223
|
className: "flex items-center justify-center min-h-[400px]",
|
|
224
|
-
children: /* @__PURE__ */
|
|
224
|
+
children: /* @__PURE__ */ h(s, { className: "w-8 h-8 text-text-secondary animate-spin" })
|
|
225
225
|
});
|
|
226
|
-
if (
|
|
226
|
+
if (Se) return /* @__PURE__ */ h("div", {
|
|
227
227
|
className: "flex items-center justify-center min-h-[400px] p-card-padding",
|
|
228
|
-
children: /* @__PURE__ */
|
|
228
|
+
children: /* @__PURE__ */ g("div", {
|
|
229
229
|
className: "text-center",
|
|
230
230
|
children: [
|
|
231
|
-
/* @__PURE__ */
|
|
232
|
-
/* @__PURE__ */
|
|
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__ */
|
|
236
|
+
/* @__PURE__ */ h("p", {
|
|
237
237
|
className: "text-text-tertiary text-body-xs",
|
|
238
|
-
children:
|
|
238
|
+
children: Se.message
|
|
239
239
|
})
|
|
240
240
|
]
|
|
241
241
|
})
|
|
242
242
|
});
|
|
243
|
-
let
|
|
244
|
-
return /* @__PURE__ */
|
|
243
|
+
let Ge = _[E.type];
|
|
244
|
+
return /* @__PURE__ */ h("div", {
|
|
245
245
|
className: "min-h-screen bg-bg-canvas",
|
|
246
|
-
children: /* @__PURE__ */
|
|
246
|
+
children: /* @__PURE__ */ g("div", {
|
|
247
247
|
className: "max-w-7xl mx-auto p-card-padding",
|
|
248
248
|
children: [
|
|
249
|
-
/* @__PURE__ */
|
|
249
|
+
/* @__PURE__ */ g("div", {
|
|
250
250
|
className: "mb-spacing-lg",
|
|
251
251
|
children: [
|
|
252
|
-
/* @__PURE__ */
|
|
253
|
-
onClick:
|
|
252
|
+
/* @__PURE__ */ g(l, {
|
|
253
|
+
onClick: He,
|
|
254
254
|
variant: "ghost",
|
|
255
255
|
size: "sm",
|
|
256
256
|
className: "mb-spacing-md",
|
|
257
|
-
children: [/* @__PURE__ */
|
|
257
|
+
children: [/* @__PURE__ */ h(ae, { className: "w-4 h-4 mr-2" }), "Back to Parsers"]
|
|
258
258
|
}),
|
|
259
|
-
/* @__PURE__ */
|
|
259
|
+
/* @__PURE__ */ h("h1", {
|
|
260
260
|
className: "text-heading-h1 font-bold text-text-primary",
|
|
261
|
-
children:
|
|
261
|
+
children: w ? "Edit Parser" : "Create Parser"
|
|
262
262
|
}),
|
|
263
|
-
/* @__PURE__ */
|
|
263
|
+
/* @__PURE__ */ h("p", {
|
|
264
264
|
className: "text-body-sm text-text-secondary mt-spacing-xs",
|
|
265
|
-
children:
|
|
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
|
-
|
|
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__ */
|
|
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__ */
|
|
278
|
+
}), /* @__PURE__ */ h("p", {
|
|
275
279
|
className: "text-xs text-state-error/80 mt-1",
|
|
276
|
-
children:
|
|
280
|
+
children: P
|
|
277
281
|
})] })]
|
|
278
282
|
}),
|
|
279
|
-
/* @__PURE__ */
|
|
280
|
-
onSubmit:
|
|
281
|
-
children: [/* @__PURE__ */
|
|
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__ */
|
|
288
|
+
/* @__PURE__ */ h("div", {
|
|
285
289
|
className: "space-y-6",
|
|
286
|
-
children: /* @__PURE__ */
|
|
290
|
+
children: /* @__PURE__ */ g(u, { children: [/* @__PURE__ */ h(f, {
|
|
287
291
|
className: "pb-4",
|
|
288
|
-
children: /* @__PURE__ */
|
|
292
|
+
children: /* @__PURE__ */ g("div", {
|
|
289
293
|
className: "flex items-center gap-3",
|
|
290
|
-
children: [/* @__PURE__ */
|
|
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__ */
|
|
293
|
-
}), /* @__PURE__ */
|
|
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__ */
|
|
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
|
|
305
|
+
}), /* @__PURE__ */ g(d, {
|
|
302
306
|
className: "space-y-5",
|
|
303
307
|
children: [
|
|
304
|
-
/* @__PURE__ */
|
|
305
|
-
/* @__PURE__ */
|
|
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__ */
|
|
312
|
+
children: ["Name ", /* @__PURE__ */ h("span", {
|
|
309
313
|
className: "text-state-error",
|
|
310
314
|
children: "*"
|
|
311
315
|
})]
|
|
312
316
|
}),
|
|
313
|
-
/* @__PURE__ */
|
|
317
|
+
/* @__PURE__ */ h("input", {
|
|
314
318
|
id: "name",
|
|
315
319
|
type: "text",
|
|
316
|
-
value:
|
|
317
|
-
onChange:
|
|
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 ${
|
|
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
|
-
|
|
334
|
+
O.name && /* @__PURE__ */ h("p", {
|
|
331
335
|
className: "text-xs text-state-error mt-1.5",
|
|
332
|
-
children:
|
|
336
|
+
children: O.name
|
|
333
337
|
})
|
|
334
338
|
] }),
|
|
335
|
-
/* @__PURE__ */
|
|
336
|
-
/* @__PURE__ */
|
|
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__ */
|
|
343
|
+
children: ["Output Key ", /* @__PURE__ */ h("span", {
|
|
340
344
|
className: "text-state-error",
|
|
341
345
|
children: "*"
|
|
342
346
|
})]
|
|
343
347
|
}),
|
|
344
|
-
/* @__PURE__ */
|
|
348
|
+
/* @__PURE__ */ h("input", {
|
|
345
349
|
id: "outputKey",
|
|
346
350
|
type: "text",
|
|
347
|
-
value:
|
|
348
|
-
onChange:
|
|
351
|
+
value: E.outputKey,
|
|
352
|
+
onChange: Me,
|
|
349
353
|
placeholder: "user_analytics_parser",
|
|
350
|
-
disabled:
|
|
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 ${
|
|
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
|
-
|
|
367
|
+
O.outputKey && /* @__PURE__ */ h("p", {
|
|
364
368
|
className: "text-xs text-state-error mt-1.5",
|
|
365
|
-
children:
|
|
369
|
+
children: O.outputKey
|
|
366
370
|
}),
|
|
367
|
-
!
|
|
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__ */
|
|
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__ */
|
|
380
|
+
}), /* @__PURE__ */ h("textarea", {
|
|
377
381
|
id: "description",
|
|
378
|
-
value:
|
|
379
|
-
onChange:
|
|
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
|
-
|
|
385
|
-
/* @__PURE__ */
|
|
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__ */
|
|
392
|
+
children: /* @__PURE__ */ g("div", {
|
|
389
393
|
className: "flex items-center gap-2",
|
|
390
|
-
children: [/* @__PURE__ */
|
|
394
|
+
children: [/* @__PURE__ */ h(fe, { className: "w-4 h-4" }), "Dashboard Scope"]
|
|
391
395
|
})
|
|
392
396
|
}),
|
|
393
|
-
/* @__PURE__ */
|
|
397
|
+
/* @__PURE__ */ g("select", {
|
|
394
398
|
id: "dashboard",
|
|
395
|
-
value:
|
|
396
|
-
onChange:
|
|
397
|
-
disabled:
|
|
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__ */
|
|
403
|
+
children: [/* @__PURE__ */ h("option", {
|
|
400
404
|
value: "default",
|
|
401
405
|
children: "Global (available everywhere)"
|
|
402
|
-
}),
|
|
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__ */
|
|
411
|
+
/* @__PURE__ */ h("p", {
|
|
408
412
|
className: "text-xs text-text-tertiary mt-1.5",
|
|
409
|
-
children:
|
|
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__ */
|
|
419
|
+
/* @__PURE__ */ h("div", {
|
|
416
420
|
className: "space-y-6",
|
|
417
|
-
children: /* @__PURE__ */
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
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
|
-
${
|
|
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
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
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 ${
|
|
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
|
-
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
|
|
511
|
-
|
|
512
|
-
|
|
513
|
-
|
|
514
|
-
|
|
515
|
-
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
|
|
536
|
-
|
|
537
|
-
|
|
538
|
-
|
|
539
|
-
|
|
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
|
-
})
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
|
|
545
|
-
|
|
546
|
-
|
|
547
|
-
|
|
548
|
-
|
|
549
|
-
|
|
550
|
-
|
|
551
|
-
|
|
552
|
-
|
|
553
|
-
|
|
554
|
-
|
|
555
|
-
|
|
556
|
-
|
|
557
|
-
|
|
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 ${
|
|
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
|
-
|
|
579
|
-
|
|
580
|
-
|
|
581
|
-
|
|
582
|
-
|
|
583
|
-
|
|
584
|
-
|
|
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__ */
|
|
598
|
+
/* @__PURE__ */ g("div", {
|
|
591
599
|
className: "space-y-6",
|
|
592
|
-
children: [/* @__PURE__ */
|
|
600
|
+
children: [/* @__PURE__ */ g(u, { children: [/* @__PURE__ */ h(f, {
|
|
593
601
|
className: "pb-4",
|
|
594
|
-
children: /* @__PURE__ */
|
|
602
|
+
children: /* @__PURE__ */ g("div", {
|
|
595
603
|
className: "flex items-center gap-3",
|
|
596
|
-
children: [/* @__PURE__ */
|
|
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__ */
|
|
599
|
-
}), /* @__PURE__ */
|
|
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__ */
|
|
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
|
|
615
|
+
}), /* @__PURE__ */ g(d, {
|
|
608
616
|
className: "space-y-5",
|
|
609
617
|
children: [
|
|
610
|
-
/* @__PURE__ */
|
|
611
|
-
/* @__PURE__ */
|
|
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__ */
|
|
616
|
-
value:
|
|
617
|
-
onChange: (e) =>
|
|
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__ */
|
|
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__ */
|
|
635
|
+
/* @__PURE__ */ h(l, {
|
|
628
636
|
type: "button",
|
|
629
|
-
onClick:
|
|
630
|
-
disabled:
|
|
637
|
+
onClick: Ve,
|
|
638
|
+
disabled: H || !E.expression.trim(),
|
|
631
639
|
variant: "default",
|
|
632
640
|
className: "w-full",
|
|
633
|
-
children:
|
|
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
|
-
(
|
|
643
|
+
(R || B) && /* @__PURE__ */ g("div", {
|
|
636
644
|
className: "pt-4 border-t border-border-default",
|
|
637
|
-
children: [/* @__PURE__ */
|
|
645
|
+
children: [/* @__PURE__ */ g("div", {
|
|
638
646
|
className: "flex items-center justify-between mb-2",
|
|
639
|
-
children: [/* @__PURE__ */
|
|
647
|
+
children: [/* @__PURE__ */ h("label", {
|
|
640
648
|
className: "block text-sm font-medium text-text-primary",
|
|
641
|
-
children:
|
|
642
|
-
}),
|
|
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__ */
|
|
645
|
-
}) : /* @__PURE__ */
|
|
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__ */
|
|
655
|
+
children: [/* @__PURE__ */ h(oe, { className: "w-3 h-3" }), " Passed"]
|
|
648
656
|
})]
|
|
649
|
-
}), /* @__PURE__ */
|
|
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
|
-
${
|
|
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:
|
|
667
|
+
children: B || R
|
|
660
668
|
})]
|
|
661
669
|
}),
|
|
662
|
-
!
|
|
670
|
+
!R && !B && /* @__PURE__ */ h("div", {
|
|
663
671
|
className: "p-3 bg-bg-sunken rounded-md border border-border-default",
|
|
664
|
-
children: /* @__PURE__ */
|
|
672
|
+
children: /* @__PURE__ */ g("p", {
|
|
665
673
|
className: "text-xs text-text-secondary leading-relaxed",
|
|
666
|
-
children: [/* @__PURE__ */
|
|
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__ */
|
|
678
|
+
})] }), /* @__PURE__ */ g(u, { children: [/* @__PURE__ */ h(f, {
|
|
671
679
|
className: "pb-4",
|
|
672
|
-
children: /* @__PURE__ */
|
|
680
|
+
children: /* @__PURE__ */ g("div", {
|
|
673
681
|
className: "flex items-center gap-3",
|
|
674
|
-
children: [/* @__PURE__ */
|
|
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__ */
|
|
677
|
-
}), /* @__PURE__ */
|
|
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__ */
|
|
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__ */
|
|
693
|
+
}), /* @__PURE__ */ h(d, {
|
|
686
694
|
className: "space-y-5",
|
|
687
|
-
children: /* @__PURE__ */
|
|
688
|
-
/* @__PURE__ */
|
|
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__ */
|
|
693
|
-
value:
|
|
694
|
-
onChange:
|
|
695
|
-
error:
|
|
700
|
+
/* @__PURE__ */ h(ne, {
|
|
701
|
+
value: E.ttl,
|
|
702
|
+
onChange: Le,
|
|
703
|
+
error: O.ttl
|
|
696
704
|
}),
|
|
697
|
-
/* @__PURE__ */
|
|
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__ */
|
|
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__ */
|
|
715
|
+
children: [/* @__PURE__ */ h(l, {
|
|
708
716
|
type: "button",
|
|
709
|
-
onClick:
|
|
717
|
+
onClick: He,
|
|
710
718
|
variant: "secondary",
|
|
711
719
|
children: "Cancel"
|
|
712
|
-
}), /* @__PURE__ */
|
|
720
|
+
}), /* @__PURE__ */ h(l, {
|
|
713
721
|
type: "submit",
|
|
714
|
-
disabled: !
|
|
722
|
+
disabled: !We || M,
|
|
715
723
|
variant: "default",
|
|
716
|
-
children:
|
|
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 {
|
|
733
|
+
export { y as ParserBuilderPage, y as default };
|
|
726
734
|
|
|
727
735
|
//# sourceMappingURL=ParserBuilderPage.js.map
|