@burdenoff/microfe-bigconsole 2026.624.2 → 2026.625.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 +93 -93
- 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
|
@@ -2,189 +2,189 @@ import e from "../../hooks/useImportParser.js";
|
|
|
2
2
|
import "../../hooks/index.js";
|
|
3
3
|
import { memo as t, useCallback as n, useEffect as r, useRef as i, useState as a } from "react";
|
|
4
4
|
import { ArrowLeft as o, Check as s, FileJson as c, Info as l, RefreshCw as u, Upload as d, XCircle as f } from "lucide-react";
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
5
|
+
import { Badge as ee, Button as p, Card as m, CardContent as h, Dialog as g, DialogContent as _, DialogDescription as v, DialogFooter as y, DialogHeader as b, DialogTitle as x, Input as S, Label as C, Spinner as te } from "@burdenoff/fe-libs/ui";
|
|
6
|
+
import { Fragment as w, jsx as T, jsxs as E } from "react/jsx-runtime";
|
|
7
7
|
//#region src/bigconsole/components/parser/ImportParserDialog.tsx
|
|
8
|
-
var
|
|
9
|
-
let [
|
|
8
|
+
var D = t(function({ isOpen: t, onClose: D, consoleId: O, onSuccess: k }) {
|
|
9
|
+
let [A, j] = a("select"), [, M] = a(null), [N, P] = a(null), [F, I] = a(""), [L, R] = a(""), [z, B] = a(""), V = i(null), { loading: H, error: U, validationResult: W, importResult: G, validateImport: K, importParser: q, extractParserId: J, clearState: Y } = e();
|
|
10
10
|
r(() => {
|
|
11
|
-
t && (
|
|
12
|
-
}, [t,
|
|
13
|
-
let
|
|
11
|
+
t && (j("select"), M(null), P(null), I(""), R(""), B(""), Y());
|
|
12
|
+
}, [t, Y]);
|
|
13
|
+
let X = n(async (e) => {
|
|
14
14
|
let t = e.target.files?.[0];
|
|
15
15
|
if (!t) return;
|
|
16
16
|
if (!t.name.endsWith(".json")) {
|
|
17
17
|
alert("Please select a JSON file");
|
|
18
18
|
return;
|
|
19
19
|
}
|
|
20
|
-
|
|
20
|
+
M(t);
|
|
21
21
|
let n = new FileReader();
|
|
22
22
|
n.onload = async (e) => {
|
|
23
23
|
let t = e.target?.result;
|
|
24
|
-
|
|
25
|
-
let n =
|
|
26
|
-
n.isValid && n.parserInfo ? (
|
|
24
|
+
P(t);
|
|
25
|
+
let n = K(t);
|
|
26
|
+
n.isValid && n.parserInfo ? (j("preview"), I(n.parserInfo.name || ""), R(n.parserInfo.inputSinkKey || ""), B(n.parserInfo.outputKey || "")) : j("preview");
|
|
27
27
|
}, n.onerror = () => {
|
|
28
28
|
alert("Failed to read file");
|
|
29
29
|
}, n.readAsText(t);
|
|
30
|
-
}, [
|
|
30
|
+
}, [K]), Z = n((e) => {
|
|
31
31
|
e.preventDefault();
|
|
32
32
|
let t = e.dataTransfer.files?.[0];
|
|
33
33
|
if (t) {
|
|
34
34
|
let e = new DataTransfer();
|
|
35
|
-
e.items.add(t),
|
|
35
|
+
e.items.add(t), V.current && (V.current.files = e.files, V.current.dispatchEvent(new Event("change", { bubbles: !0 })));
|
|
36
36
|
}
|
|
37
37
|
}, []), ne = n(async () => {
|
|
38
|
-
if (!
|
|
39
|
-
|
|
40
|
-
let e = await
|
|
41
|
-
consoleId:
|
|
42
|
-
name:
|
|
43
|
-
inputSinkKey:
|
|
44
|
-
outputKey:
|
|
38
|
+
if (!N) return;
|
|
39
|
+
j("importing");
|
|
40
|
+
let e = await q(N, {
|
|
41
|
+
consoleId: O,
|
|
42
|
+
name: F.trim() || void 0,
|
|
43
|
+
inputSinkKey: L.trim() || void 0,
|
|
44
|
+
outputKey: z.trim() || void 0
|
|
45
45
|
});
|
|
46
|
-
e?.success && e.parser ? (
|
|
46
|
+
e?.success && e.parser ? (j("complete"), k?.(e.parser.id, e.parser.name, e.originalUpdated ?? !1)) : j("preview");
|
|
47
47
|
}, [
|
|
48
|
+
N,
|
|
49
|
+
O,
|
|
48
50
|
F,
|
|
49
|
-
A,
|
|
50
51
|
L,
|
|
51
52
|
z,
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
return /* @__PURE__ */ m(b, {
|
|
53
|
+
q,
|
|
54
|
+
k
|
|
55
|
+
]), Q = !H && A !== "importing", $ = N ? J(N) : null;
|
|
56
|
+
return /* @__PURE__ */ T(g, {
|
|
57
57
|
open: t,
|
|
58
|
-
onOpenChange: (e) => !e && Q &&
|
|
59
|
-
children: /* @__PURE__ */
|
|
58
|
+
onOpenChange: (e) => !e && Q && D(),
|
|
59
|
+
children: /* @__PURE__ */ E(_, {
|
|
60
60
|
className: "sm:max-w-lg max-h-[85vh] flex flex-col",
|
|
61
61
|
children: [
|
|
62
|
-
/* @__PURE__ */
|
|
62
|
+
/* @__PURE__ */ E(b, { children: [/* @__PURE__ */ E("div", {
|
|
63
63
|
className: "flex items-center gap-3",
|
|
64
|
-
children: [/* @__PURE__ */
|
|
64
|
+
children: [/* @__PURE__ */ T("div", {
|
|
65
65
|
className: "flex size-10 items-center justify-center rounded-lg bg-action-primary-bg/10",
|
|
66
|
-
children: /* @__PURE__ */
|
|
67
|
-
}), /* @__PURE__ */
|
|
68
|
-
}), /* @__PURE__ */
|
|
69
|
-
/* @__PURE__ */
|
|
66
|
+
children: /* @__PURE__ */ T(d, { className: "size-5 text-primary" })
|
|
67
|
+
}), /* @__PURE__ */ T(x, { children: "Import Parser" })]
|
|
68
|
+
}), /* @__PURE__ */ T(v, { children: "Upload a Parser export file to restore it into this workspace." })] }),
|
|
69
|
+
/* @__PURE__ */ E("div", {
|
|
70
70
|
className: "flex-1 overflow-y-auto py-4 space-y-4",
|
|
71
71
|
children: [
|
|
72
|
-
|
|
72
|
+
A === "select" && /* @__PURE__ */ E("div", {
|
|
73
73
|
onDragOver: (e) => e.preventDefault(),
|
|
74
|
-
onDrop:
|
|
74
|
+
onDrop: Z,
|
|
75
75
|
className: "border-2 border-dashed rounded-lg p-8 text-center hover:border-primary transition-colors",
|
|
76
76
|
children: [
|
|
77
|
-
/* @__PURE__ */
|
|
78
|
-
/* @__PURE__ */
|
|
77
|
+
/* @__PURE__ */ T(c, { className: "size-12 mx-auto text-text-secondary mb-4" }),
|
|
78
|
+
/* @__PURE__ */ T("p", {
|
|
79
79
|
className: "text-sm mb-2",
|
|
80
80
|
children: "Drag and drop a parser export file here"
|
|
81
81
|
}),
|
|
82
|
-
/* @__PURE__ */
|
|
82
|
+
/* @__PURE__ */ T("p", {
|
|
83
83
|
className: "text-xs text-text-secondary mb-4",
|
|
84
84
|
children: "or"
|
|
85
85
|
}),
|
|
86
|
-
/* @__PURE__ */
|
|
87
|
-
ref:
|
|
86
|
+
/* @__PURE__ */ T("input", {
|
|
87
|
+
ref: V,
|
|
88
88
|
type: "file",
|
|
89
89
|
accept: ".json",
|
|
90
|
-
onChange:
|
|
90
|
+
onChange: X,
|
|
91
91
|
className: "hidden"
|
|
92
92
|
}),
|
|
93
|
-
/* @__PURE__ */
|
|
94
|
-
onClick: () =>
|
|
95
|
-
disabled:
|
|
93
|
+
/* @__PURE__ */ T(p, {
|
|
94
|
+
onClick: () => V.current?.click(),
|
|
95
|
+
disabled: H,
|
|
96
96
|
children: "Browse Files"
|
|
97
97
|
}),
|
|
98
|
-
/* @__PURE__ */
|
|
98
|
+
/* @__PURE__ */ T("p", {
|
|
99
99
|
className: "text-xs text-text-secondary mt-4",
|
|
100
100
|
children: "Only .json files exported from BigConsole are supported"
|
|
101
101
|
})
|
|
102
102
|
]
|
|
103
103
|
}),
|
|
104
|
-
(
|
|
105
|
-
|
|
104
|
+
(A === "preview" || A === "importing") && W && /* @__PURE__ */ E(w, { children: [
|
|
105
|
+
W.parserInfo && /* @__PURE__ */ T(m, { children: /* @__PURE__ */ E(h, {
|
|
106
106
|
className: "p-4 space-y-2",
|
|
107
107
|
children: [
|
|
108
|
-
/* @__PURE__ */
|
|
108
|
+
/* @__PURE__ */ E("div", {
|
|
109
109
|
className: "flex items-center justify-between",
|
|
110
|
-
children: [/* @__PURE__ */
|
|
110
|
+
children: [/* @__PURE__ */ T("span", {
|
|
111
111
|
className: "text-sm text-text-secondary",
|
|
112
112
|
children: "Parser"
|
|
113
|
-
}), /* @__PURE__ */
|
|
113
|
+
}), /* @__PURE__ */ T("span", {
|
|
114
114
|
className: "text-sm font-medium",
|
|
115
|
-
children:
|
|
115
|
+
children: W.parserInfo.name
|
|
116
116
|
})]
|
|
117
117
|
}),
|
|
118
|
-
/* @__PURE__ */
|
|
118
|
+
/* @__PURE__ */ E("div", {
|
|
119
119
|
className: "flex items-center justify-between",
|
|
120
|
-
children: [/* @__PURE__ */
|
|
120
|
+
children: [/* @__PURE__ */ T("span", {
|
|
121
121
|
className: "text-sm text-text-secondary",
|
|
122
122
|
children: "Type"
|
|
123
|
-
}), /* @__PURE__ */
|
|
123
|
+
}), /* @__PURE__ */ T(ee, {
|
|
124
124
|
variant: "secondary",
|
|
125
|
-
children:
|
|
125
|
+
children: W.parserInfo.type
|
|
126
126
|
})]
|
|
127
127
|
}),
|
|
128
|
-
/* @__PURE__ */
|
|
128
|
+
/* @__PURE__ */ E("div", {
|
|
129
129
|
className: "flex items-center justify-between",
|
|
130
|
-
children: [/* @__PURE__ */
|
|
130
|
+
children: [/* @__PURE__ */ T("span", {
|
|
131
131
|
className: "text-sm text-text-secondary",
|
|
132
132
|
children: "Input Sink"
|
|
133
|
-
}), /* @__PURE__ */
|
|
133
|
+
}), /* @__PURE__ */ T("span", {
|
|
134
134
|
className: "text-xs font-mono",
|
|
135
|
-
children:
|
|
135
|
+
children: W.parserInfo.inputSinkKey
|
|
136
136
|
})]
|
|
137
137
|
}),
|
|
138
|
-
/* @__PURE__ */
|
|
138
|
+
/* @__PURE__ */ E("div", {
|
|
139
139
|
className: "flex items-center justify-between",
|
|
140
|
-
children: [/* @__PURE__ */
|
|
140
|
+
children: [/* @__PURE__ */ T("span", {
|
|
141
141
|
className: "text-sm text-text-secondary",
|
|
142
142
|
children: "Output Key"
|
|
143
|
-
}), /* @__PURE__ */
|
|
143
|
+
}), /* @__PURE__ */ T("span", {
|
|
144
144
|
className: "text-xs font-mono",
|
|
145
|
-
children:
|
|
145
|
+
children: W.parserInfo.outputKey
|
|
146
146
|
})]
|
|
147
147
|
}),
|
|
148
|
-
|
|
148
|
+
W.parserInfo.exportedFrom && /* @__PURE__ */ E("div", {
|
|
149
149
|
className: "flex items-center justify-between",
|
|
150
|
-
children: [/* @__PURE__ */
|
|
150
|
+
children: [/* @__PURE__ */ T("span", {
|
|
151
151
|
className: "text-sm text-text-secondary",
|
|
152
152
|
children: "Source ID"
|
|
153
|
-
}), /* @__PURE__ */
|
|
153
|
+
}), /* @__PURE__ */ T("span", {
|
|
154
154
|
className: "text-xs text-text-secondary font-mono truncate max-w-[180px]",
|
|
155
|
-
children:
|
|
155
|
+
children: W.parserInfo.exportedFrom
|
|
156
156
|
})]
|
|
157
157
|
}),
|
|
158
|
-
/* @__PURE__ */
|
|
158
|
+
/* @__PURE__ */ E("div", {
|
|
159
159
|
className: "flex items-center justify-between",
|
|
160
|
-
children: [/* @__PURE__ */
|
|
160
|
+
children: [/* @__PURE__ */ T("span", {
|
|
161
161
|
className: "text-sm text-text-secondary",
|
|
162
162
|
children: "Schema Version"
|
|
163
|
-
}), /* @__PURE__ */
|
|
163
|
+
}), /* @__PURE__ */ T("span", {
|
|
164
164
|
className: "text-xs text-text-secondary",
|
|
165
|
-
children:
|
|
165
|
+
children: W.parserInfo.schemaVersion
|
|
166
166
|
})]
|
|
167
167
|
})
|
|
168
168
|
]
|
|
169
169
|
}) }),
|
|
170
|
-
|
|
170
|
+
W.errors.length > 0 && /* @__PURE__ */ T(m, {
|
|
171
171
|
className: "border-status-error-border/50 bg-status-error-bg/5",
|
|
172
|
-
children: /* @__PURE__ */ h
|
|
172
|
+
children: /* @__PURE__ */ E(h, {
|
|
173
173
|
className: "p-3",
|
|
174
|
-
children: [/* @__PURE__ */
|
|
174
|
+
children: [/* @__PURE__ */ E("div", {
|
|
175
175
|
className: "flex items-center gap-2 mb-2",
|
|
176
|
-
children: [/* @__PURE__ */
|
|
176
|
+
children: [/* @__PURE__ */ T(f, { className: "size-4 text-status-error-text" }), /* @__PURE__ */ E("span", {
|
|
177
177
|
className: "text-sm font-medium text-status-error-text",
|
|
178
178
|
children: [
|
|
179
179
|
"Errors (",
|
|
180
|
-
|
|
180
|
+
W.errors.length,
|
|
181
181
|
")"
|
|
182
182
|
]
|
|
183
183
|
})]
|
|
184
|
-
}), /* @__PURE__ */
|
|
184
|
+
}), /* @__PURE__ */ T("ul", {
|
|
185
185
|
className: "text-xs text-status-error-text space-y-1",
|
|
186
|
-
children:
|
|
187
|
-
/* @__PURE__ */
|
|
186
|
+
children: W.errors.map((e, t) => /* @__PURE__ */ E("li", { children: [
|
|
187
|
+
/* @__PURE__ */ E("span", {
|
|
188
188
|
className: "font-mono",
|
|
189
189
|
children: [
|
|
190
190
|
"[",
|
|
@@ -198,102 +198,102 @@ var k = t(function({ isOpen: t, onClose: k, consoleId: A, onSuccess: j }) {
|
|
|
198
198
|
})]
|
|
199
199
|
})
|
|
200
200
|
}),
|
|
201
|
-
|
|
201
|
+
W.isValid && /* @__PURE__ */ E("div", {
|
|
202
202
|
className: "space-y-4",
|
|
203
203
|
children: [
|
|
204
|
-
/* @__PURE__ */
|
|
204
|
+
/* @__PURE__ */ T("p", {
|
|
205
205
|
className: "text-sm font-medium",
|
|
206
206
|
children: "Import Options"
|
|
207
207
|
}),
|
|
208
|
-
/* @__PURE__ */ m
|
|
208
|
+
/* @__PURE__ */ T(m, {
|
|
209
209
|
className: "border-blue-500/50 bg-blue-500/5",
|
|
210
|
-
children: /* @__PURE__ */
|
|
210
|
+
children: /* @__PURE__ */ T(h, {
|
|
211
211
|
className: "p-3",
|
|
212
|
-
children: /* @__PURE__ */
|
|
212
|
+
children: /* @__PURE__ */ E("div", {
|
|
213
213
|
className: "flex items-start gap-2",
|
|
214
|
-
children: [/* @__PURE__ */
|
|
214
|
+
children: [/* @__PURE__ */ T(l, { className: "size-4 text-blue-600 mt-0.5 shrink-0" }), /* @__PURE__ */ T("div", {
|
|
215
215
|
className: "text-xs text-blue-700 dark:text-blue-400",
|
|
216
|
-
children: $ ? /* @__PURE__ */
|
|
217
|
-
/* @__PURE__ */
|
|
216
|
+
children: $ ? /* @__PURE__ */ E(w, { children: [
|
|
217
|
+
/* @__PURE__ */ T("p", {
|
|
218
218
|
className: "font-medium mb-1",
|
|
219
219
|
children: "Import will check for existing parser"
|
|
220
220
|
}),
|
|
221
|
-
/* @__PURE__ */
|
|
221
|
+
/* @__PURE__ */ E("p", { children: [
|
|
222
222
|
"If the original parser (ID:",
|
|
223
223
|
" ",
|
|
224
|
-
/* @__PURE__ */
|
|
224
|
+
/* @__PURE__ */ E("code", {
|
|
225
225
|
className: "font-mono bg-blue-200/50 px-1 rounded",
|
|
226
226
|
children: [$.slice(0, 8), "..."]
|
|
227
227
|
}),
|
|
228
228
|
") exists:"
|
|
229
229
|
] }),
|
|
230
|
-
/* @__PURE__ */
|
|
230
|
+
/* @__PURE__ */ E("ul", {
|
|
231
231
|
className: "list-disc list-inside mt-1 space-y-0.5",
|
|
232
|
-
children: [/* @__PURE__ */
|
|
232
|
+
children: [/* @__PURE__ */ T("li", { children: "With changes → Update the existing parser" }), /* @__PURE__ */ T("li", { children: "No changes → Show \"already exists\" message" })]
|
|
233
233
|
}),
|
|
234
|
-
/* @__PURE__ */
|
|
234
|
+
/* @__PURE__ */ T("p", {
|
|
235
235
|
className: "mt-1",
|
|
236
236
|
children: "If original doesn't exist → Create a new parser"
|
|
237
237
|
})
|
|
238
|
-
] }) : /* @__PURE__ */
|
|
238
|
+
] }) : /* @__PURE__ */ E(w, { children: [/* @__PURE__ */ T("p", {
|
|
239
239
|
className: "font-medium mb-1",
|
|
240
240
|
children: "A new parser will be created"
|
|
241
|
-
}), /* @__PURE__ */
|
|
241
|
+
}), /* @__PURE__ */ T("p", { children: "Import as a new parser with the specified configuration." })] })
|
|
242
242
|
})]
|
|
243
243
|
})
|
|
244
244
|
})
|
|
245
245
|
}),
|
|
246
|
-
/* @__PURE__ */
|
|
246
|
+
/* @__PURE__ */ E("div", {
|
|
247
247
|
className: "space-y-2",
|
|
248
|
-
children: [/* @__PURE__ */
|
|
248
|
+
children: [/* @__PURE__ */ T(C, {
|
|
249
249
|
htmlFor: "import-name",
|
|
250
250
|
children: "Parser Name"
|
|
251
|
-
}), /* @__PURE__ */
|
|
251
|
+
}), /* @__PURE__ */ T(S, {
|
|
252
252
|
id: "import-name",
|
|
253
253
|
type: "text",
|
|
254
|
-
value:
|
|
255
|
-
onChange: (e) =>
|
|
256
|
-
placeholder:
|
|
257
|
-
disabled:
|
|
254
|
+
value: F,
|
|
255
|
+
onChange: (e) => I(e.target.value),
|
|
256
|
+
placeholder: W.parserInfo?.name || "Parser name",
|
|
257
|
+
disabled: A === "importing"
|
|
258
258
|
})]
|
|
259
259
|
}),
|
|
260
|
-
/* @__PURE__ */
|
|
260
|
+
/* @__PURE__ */ E("div", {
|
|
261
261
|
className: "space-y-2",
|
|
262
262
|
children: [
|
|
263
|
-
/* @__PURE__ */
|
|
263
|
+
/* @__PURE__ */ T(C, {
|
|
264
264
|
htmlFor: "import-input-sink",
|
|
265
265
|
children: "Input Sink Key"
|
|
266
266
|
}),
|
|
267
|
-
/* @__PURE__ */
|
|
267
|
+
/* @__PURE__ */ T(S, {
|
|
268
268
|
id: "import-input-sink",
|
|
269
269
|
type: "text",
|
|
270
|
-
value:
|
|
271
|
-
onChange: (e) =>
|
|
272
|
-
placeholder:
|
|
273
|
-
disabled:
|
|
270
|
+
value: L,
|
|
271
|
+
onChange: (e) => R(e.target.value),
|
|
272
|
+
placeholder: W.parserInfo?.inputSinkKey || "Input sink key",
|
|
273
|
+
disabled: A === "importing"
|
|
274
274
|
}),
|
|
275
|
-
/* @__PURE__ */
|
|
275
|
+
/* @__PURE__ */ T("p", {
|
|
276
276
|
className: "text-xs text-text-secondary",
|
|
277
277
|
children: "The DataSink key to read input data from."
|
|
278
278
|
})
|
|
279
279
|
]
|
|
280
280
|
}),
|
|
281
|
-
/* @__PURE__ */
|
|
281
|
+
/* @__PURE__ */ E("div", {
|
|
282
282
|
className: "space-y-2",
|
|
283
283
|
children: [
|
|
284
|
-
/* @__PURE__ */
|
|
284
|
+
/* @__PURE__ */ T(C, {
|
|
285
285
|
htmlFor: "import-output-key",
|
|
286
286
|
children: "Output Key"
|
|
287
287
|
}),
|
|
288
|
-
/* @__PURE__ */
|
|
288
|
+
/* @__PURE__ */ T(S, {
|
|
289
289
|
id: "import-output-key",
|
|
290
290
|
type: "text",
|
|
291
|
-
value:
|
|
292
|
-
onChange: (e) =>
|
|
293
|
-
placeholder:
|
|
294
|
-
disabled:
|
|
291
|
+
value: z,
|
|
292
|
+
onChange: (e) => B(e.target.value),
|
|
293
|
+
placeholder: W.parserInfo?.outputKey || "Output key",
|
|
294
|
+
disabled: A === "importing"
|
|
295
295
|
}),
|
|
296
|
-
/* @__PURE__ */
|
|
296
|
+
/* @__PURE__ */ T("p", {
|
|
297
297
|
className: "text-xs text-text-secondary",
|
|
298
298
|
children: "The key to store parsed output data under."
|
|
299
299
|
})
|
|
@@ -302,116 +302,116 @@ var k = t(function({ isOpen: t, onClose: k, consoleId: A, onSuccess: j }) {
|
|
|
302
302
|
]
|
|
303
303
|
})
|
|
304
304
|
] }),
|
|
305
|
-
|
|
305
|
+
A === "complete" && G?.success && /* @__PURE__ */ E("div", {
|
|
306
306
|
className: "text-center py-6",
|
|
307
307
|
children: [
|
|
308
|
-
|
|
309
|
-
/* @__PURE__ */
|
|
308
|
+
G.alreadyExists && /* @__PURE__ */ E(w, { children: [
|
|
309
|
+
/* @__PURE__ */ T("div", {
|
|
310
310
|
className: "size-16 mx-auto mb-4 rounded-full bg-blue-100 dark:bg-blue-900/30 flex items-center justify-center",
|
|
311
|
-
children: /* @__PURE__ */
|
|
311
|
+
children: /* @__PURE__ */ T(l, { className: "size-8 text-blue-600" })
|
|
312
312
|
}),
|
|
313
|
-
/* @__PURE__ */
|
|
313
|
+
/* @__PURE__ */ T("h3", {
|
|
314
314
|
className: "text-lg font-medium mb-2",
|
|
315
315
|
children: "Parser Already Exists"
|
|
316
316
|
}),
|
|
317
|
-
/* @__PURE__ */
|
|
317
|
+
/* @__PURE__ */ E("p", {
|
|
318
318
|
className: "text-sm text-text-secondary mb-4",
|
|
319
319
|
children: [
|
|
320
320
|
"Parser \"",
|
|
321
|
-
|
|
321
|
+
G.parser?.name,
|
|
322
322
|
"\" already exists with the same data. No changes were made."
|
|
323
323
|
]
|
|
324
324
|
})
|
|
325
325
|
] }),
|
|
326
|
-
|
|
327
|
-
/* @__PURE__ */
|
|
326
|
+
G.originalUpdated && !G.alreadyExists && /* @__PURE__ */ E(w, { children: [
|
|
327
|
+
/* @__PURE__ */ T("div", {
|
|
328
328
|
className: "size-16 mx-auto mb-4 rounded-full bg-green-100 dark:bg-green-900/30 flex items-center justify-center",
|
|
329
|
-
children: /* @__PURE__ */
|
|
329
|
+
children: /* @__PURE__ */ T(u, { className: "size-8 text-green-600" })
|
|
330
330
|
}),
|
|
331
|
-
/* @__PURE__ */
|
|
331
|
+
/* @__PURE__ */ T("h3", {
|
|
332
332
|
className: "text-lg font-medium mb-2",
|
|
333
333
|
children: "Parser Updated!"
|
|
334
334
|
}),
|
|
335
|
-
/* @__PURE__ */
|
|
335
|
+
/* @__PURE__ */ E("p", {
|
|
336
336
|
className: "text-sm text-text-secondary mb-4",
|
|
337
337
|
children: [
|
|
338
338
|
"Parser \"",
|
|
339
|
-
|
|
339
|
+
G.parser?.name,
|
|
340
340
|
"\" has been updated with the imported data."
|
|
341
341
|
]
|
|
342
342
|
})
|
|
343
343
|
] }),
|
|
344
|
-
!
|
|
345
|
-
/* @__PURE__ */
|
|
344
|
+
!G.originalUpdated && !G.alreadyExists && /* @__PURE__ */ E(w, { children: [
|
|
345
|
+
/* @__PURE__ */ T("div", {
|
|
346
346
|
className: "size-16 mx-auto mb-4 rounded-full bg-green-100 dark:bg-green-900/30 flex items-center justify-center",
|
|
347
|
-
children: /* @__PURE__ */
|
|
347
|
+
children: /* @__PURE__ */ T(s, { className: "size-8 text-green-600" })
|
|
348
348
|
}),
|
|
349
|
-
/* @__PURE__ */
|
|
349
|
+
/* @__PURE__ */ T("h3", {
|
|
350
350
|
className: "text-lg font-medium mb-2",
|
|
351
351
|
children: "Import Successful!"
|
|
352
352
|
}),
|
|
353
|
-
/* @__PURE__ */
|
|
353
|
+
/* @__PURE__ */ E("p", {
|
|
354
354
|
className: "text-sm text-text-secondary mb-4",
|
|
355
355
|
children: [
|
|
356
356
|
"Parser \"",
|
|
357
|
-
|
|
357
|
+
G.parser?.name,
|
|
358
358
|
"\" has been created."
|
|
359
359
|
]
|
|
360
360
|
})
|
|
361
361
|
] })
|
|
362
362
|
]
|
|
363
363
|
}),
|
|
364
|
-
|
|
364
|
+
U && /* @__PURE__ */ T(m, {
|
|
365
365
|
className: "border-status-error-border/50 bg-status-error-bg/5",
|
|
366
|
-
children: /* @__PURE__ */
|
|
366
|
+
children: /* @__PURE__ */ T(h, {
|
|
367
367
|
className: "p-3",
|
|
368
|
-
children: /* @__PURE__ */
|
|
368
|
+
children: /* @__PURE__ */ T("p", {
|
|
369
369
|
className: "text-sm text-status-error-text",
|
|
370
|
-
children:
|
|
370
|
+
children: U.message
|
|
371
371
|
})
|
|
372
372
|
})
|
|
373
373
|
}),
|
|
374
|
-
|
|
374
|
+
G && !G.success && G.errorMessage && /* @__PURE__ */ T(m, {
|
|
375
375
|
className: "border-status-error-border/50 bg-status-error-bg/5",
|
|
376
|
-
children: /* @__PURE__ */
|
|
376
|
+
children: /* @__PURE__ */ T(h, {
|
|
377
377
|
className: "p-3",
|
|
378
|
-
children: /* @__PURE__ */
|
|
378
|
+
children: /* @__PURE__ */ T("p", {
|
|
379
379
|
className: "text-sm text-status-error-text",
|
|
380
|
-
children:
|
|
380
|
+
children: G.errorMessage
|
|
381
381
|
})
|
|
382
382
|
})
|
|
383
383
|
})
|
|
384
384
|
]
|
|
385
385
|
}),
|
|
386
|
-
/* @__PURE__ */
|
|
386
|
+
/* @__PURE__ */ E(y, {
|
|
387
387
|
className: "flex-row justify-between sm:justify-between",
|
|
388
|
-
children: [/* @__PURE__ */
|
|
388
|
+
children: [/* @__PURE__ */ T("div", { children: A === "preview" && /* @__PURE__ */ E(p, {
|
|
389
389
|
variant: "ghost",
|
|
390
390
|
onClick: () => {
|
|
391
|
-
|
|
391
|
+
j("select"), M(null), P(null), Y();
|
|
392
392
|
},
|
|
393
|
-
disabled:
|
|
394
|
-
children: [/* @__PURE__ */
|
|
395
|
-
}) }), /* @__PURE__ */
|
|
393
|
+
disabled: H,
|
|
394
|
+
children: [/* @__PURE__ */ T(o, { className: "size-4" }), "Back"]
|
|
395
|
+
}) }), /* @__PURE__ */ E("div", {
|
|
396
396
|
className: "flex items-center gap-2",
|
|
397
397
|
children: [
|
|
398
|
-
|
|
398
|
+
A !== "complete" && /* @__PURE__ */ T(p, {
|
|
399
399
|
variant: "outline",
|
|
400
|
-
onClick:
|
|
400
|
+
onClick: D,
|
|
401
401
|
disabled: !Q,
|
|
402
402
|
children: "Cancel"
|
|
403
403
|
}),
|
|
404
|
-
|
|
404
|
+
A === "preview" && W?.isValid && /* @__PURE__ */ E(p, {
|
|
405
405
|
onClick: ne,
|
|
406
|
-
disabled:
|
|
407
|
-
children: [/* @__PURE__ */
|
|
406
|
+
disabled: H,
|
|
407
|
+
children: [/* @__PURE__ */ T(d, { className: "size-4" }), "Import Parser"]
|
|
408
408
|
}),
|
|
409
|
-
|
|
409
|
+
A === "importing" && /* @__PURE__ */ E("div", {
|
|
410
410
|
className: "flex items-center gap-2 text-sm text-text-secondary",
|
|
411
|
-
children: [/* @__PURE__ */
|
|
411
|
+
children: [/* @__PURE__ */ T(te, { className: "size-4" }), "Importing..."]
|
|
412
412
|
}),
|
|
413
|
-
|
|
414
|
-
onClick:
|
|
413
|
+
A === "complete" && /* @__PURE__ */ T(p, {
|
|
414
|
+
onClick: D,
|
|
415
415
|
children: "Done"
|
|
416
416
|
})
|
|
417
417
|
]
|
|
@@ -422,6 +422,6 @@ var k = t(function({ isOpen: t, onClose: k, consoleId: A, onSuccess: j }) {
|
|
|
422
422
|
});
|
|
423
423
|
});
|
|
424
424
|
//#endregion
|
|
425
|
-
export {
|
|
425
|
+
export { D as default };
|
|
426
426
|
|
|
427
427
|
//# sourceMappingURL=ImportParserDialog.js.map
|