@burdenoff/microfe-bigconsole 2026.1011.10 → 2026.1012.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +19 -0
- package/dist/bigconsole/BigConsoleRoot.js +88 -82
- package/dist/bigconsole/BigConsoleRoutes.js +163 -136
- package/dist/bigconsole/assistant/assistantProduct.js +1 -4
- package/dist/bigconsole/assistant/pageContext.d.ts +0 -14
- package/dist/bigconsole/assistant/pageContext.js +1 -6
- package/dist/bigconsole/assistant/recordAdapters.js +26 -27
- package/dist/bigconsole/components/builder/inspector/DataBindingSection.js +31 -31
- package/dist/bigconsole/components/common/index.d.ts +0 -1
- package/dist/bigconsole/components/common/index.js +0 -1
- package/dist/bigconsole/components/dashboard/CreateDashboardDialog.js +44 -44
- package/dist/bigconsole/components/dashboard/DashboardCanvas.js +36 -36
- package/dist/bigconsole/components/dashboard/DashboardToolbar.js +59 -59
- package/dist/bigconsole/components/dashboard/DrilldownBreadcrumb.js +58 -57
- package/dist/bigconsole/components/dashboard/GlobalFiltersBar/FilterChip.js +30 -30
- package/dist/bigconsole/components/dashboard/GlobalFiltersBar/FilterEditor.js +41 -41
- package/dist/bigconsole/components/dashboard/GlobalFiltersBar/FilterPresetSelector.js +34 -34
- package/dist/bigconsole/components/dashboard/GlobalFiltersBar/GlobalFiltersBar.js +34 -34
- package/dist/bigconsole/components/dashboard/ImportDashboardDialog.js +110 -110
- package/dist/bigconsole/components/dashboard/PublishToStoreDialog.js +21 -21
- package/dist/bigconsole/components/dashboard/SavedViewsDropdown/SavedViewsDropdown.js +46 -46
- package/dist/bigconsole/components/dashboard/ShareDialog/EmbedTab.js +164 -173
- package/dist/bigconsole/components/dashboard/ShareDialog/ShareDialog.js +101 -101
- package/dist/bigconsole/components/dashboard/TemplateInstallOptions.js +31 -31
- package/dist/bigconsole/components/dashboard/TemplateLayoutPreview.js +15 -15
- package/dist/bigconsole/components/dashboard/TemplatePicker/TemplatePicker.js +1 -1
- package/dist/bigconsole/components/dashboard/WidgetPalette.js +165 -163
- package/dist/bigconsole/components/datasink/AlertExecutionHistory.js +37 -37
- package/dist/bigconsole/components/datasink/AlertRuleEditor.js +66 -66
- package/dist/bigconsole/components/datasink/CacheTTLSelector.js +35 -35
- package/dist/bigconsole/components/datasink/DataSinkCard.js +50 -51
- package/dist/bigconsole/components/datasink/DataSinkDeleteDialog.js +18 -18
- package/dist/bigconsole/components/datasink/DataSinkRefreshDialog.js +20 -20
- package/dist/bigconsole/components/datasink/ImportDataGuideDialog.js +47 -47
- package/dist/bigconsole/components/datasink/ImportDataSinkDialog.js +91 -91
- package/dist/bigconsole/components/datasink/RefreshTypeSelector.js +35 -35
- package/dist/bigconsole/components/parser/DataSinkSelector.js +40 -40
- package/dist/bigconsole/components/parser/ImportParserDialog.js +120 -120
- package/dist/bigconsole/components/parser/ParserSelector.js +51 -51
- package/dist/bigconsole/components/pipeline/PipelineScopePicker.js +10 -10
- package/dist/bigconsole/components/preview/AiPreviewMiniPanel.js +76 -77
- package/dist/bigconsole/components/preview/AiPreviewPanel.js +95 -96
- package/dist/bigconsole/components/widgets/ActionConfigDialog.js +4 -4
- package/dist/bigconsole/components/widgets/DrilldownConfigPanel.js +93 -93
- package/dist/bigconsole/components/widgets/PropertiesPanel.js +499 -507
- package/dist/bigconsole/components/widgets/WidgetRegistry.js +0 -1
- package/dist/bigconsole/components/widgets/calendar/CalendarWidget.js +4 -4
- package/dist/bigconsole/components/widgets/chart/ChartConfig.js +48 -48
- package/dist/bigconsole/components/widgets/comments/WidgetComments.js +46 -46
- package/dist/bigconsole/components/widgets/custom/CustomWidget.js +73 -131
- package/dist/bigconsole/components/widgets/event-logs/EventLogViewer.js +61 -61
- package/dist/bigconsole/components/widgets/form/FormWidget.js +36 -36
- package/dist/bigconsole/components/widgets/gauge/GaugeConfig.js +42 -42
- package/dist/bigconsole/components/widgets/heatmap/HeatmapConfig.js +25 -25
- package/dist/bigconsole/components/widgets/iframe-widget/IframeWidget.d.ts +28 -9
- package/dist/bigconsole/components/widgets/iframe-widget/IframeWidget.js +115 -42
- package/dist/bigconsole/components/widgets/iframe-widget/framePolicy.d.ts +20 -0
- package/dist/bigconsole/components/widgets/iframe-widget/framePolicy.js +10 -0
- package/dist/bigconsole/components/widgets/iframe-widget/index.d.ts +2 -1
- package/dist/bigconsole/components/widgets/iframe-widget/index.js +3 -2
- package/dist/bigconsole/components/widgets/kanban/KanbanWidget.js +4 -4
- package/dist/bigconsole/components/widgets/list/ListConfig.js +30 -30
- package/dist/bigconsole/components/widgets/metric-card/MetricCardConfig.js +38 -38
- package/dist/bigconsole/components/widgets/metric-card/SparklineChart.js +9 -9
- package/dist/bigconsole/components/widgets/metric-card/TrendIndicator.js +9 -9
- package/dist/bigconsole/components/widgets/pivot-table/PivotTableWidget.js +49 -49
- package/dist/bigconsole/components/widgets/progress/ProgressConfig.js +39 -39
- package/dist/bigconsole/components/widgets/table/TableConfig.js +73 -73
- package/dist/bigconsole/components/widgets/text-widget/TextWidget.js +110 -27
- package/dist/bigconsole/components/widgets/text-widget/textData.d.ts +6 -0
- package/dist/bigconsole/components/widgets/text-widget/textData.js +17 -14
- package/dist/bigconsole/components/widgets/webhook-config/WebhookConfigPanel.js +64 -64
- package/dist/bigconsole/components/workflow/WorkflowOpenGuard.js +15 -15
- package/dist/bigconsole/components/workflow/WorkflowSinkLinkForm.js +15 -15
- package/dist/bigconsole/context/BigConsoleContext.d.ts +10 -0
- package/dist/bigconsole/context/BigConsoleContext.js +47 -30
- package/dist/bigconsole/context/index.d.ts +1 -1
- package/dist/bigconsole/customWidget/CustomWidgetBuilderSheet.js +58 -49
- package/dist/bigconsole/customWidget/CustomWidgetProposalPanel.js +74 -72
- package/dist/bigconsole/customWidget/proposalPreview.d.ts +5 -0
- package/dist/bigconsole/customWidget/proposalPreview.js +31 -0
- package/dist/bigconsole/hooks/useDataSinkAlerts.d.ts +0 -23
- package/dist/bigconsole/hooks/useDataSinkAlerts.js +113 -138
- package/dist/bigconsole/hooks/useDataSinkOperations.d.ts +7 -0
- package/dist/bigconsole/hooks/useDataSinkOperations.js +109 -98
- package/dist/bigconsole/hooks/useDataSinkSubscription.js +0 -1
- package/dist/bigconsole/hooks/useDrilldown.js +68 -67
- package/dist/bigconsole/hooks/useExportDataSink.js +1 -1
- package/dist/bigconsole/hooks/useGlobalFilters.js +3 -3
- package/dist/bigconsole/hooks/useImportDataSink.js +102 -90
- package/dist/bigconsole/pages/AdminPage.js +130 -130
- package/dist/bigconsole/pages/DashboardBuilderPage.js +60 -72
- package/dist/bigconsole/pages/DashboardViewPage.js +235 -258
- package/dist/bigconsole/pages/DashboardsPage.js +221 -269
- package/dist/bigconsole/pages/DataParsersPage.js +157 -180
- package/dist/bigconsole/pages/DataSinkAlertsPage.js +55 -62
- package/dist/bigconsole/pages/DataSinkBuilderPage.js +318 -295
- package/dist/bigconsole/pages/DataSinkViewPage.js +256 -255
- package/dist/bigconsole/pages/DataSinksPage.js +216 -251
- package/dist/bigconsole/pages/DataSourcesPage.js +5 -5
- package/dist/bigconsole/pages/InsightsPage.js +265 -279
- package/dist/bigconsole/pages/OverviewPage.js +47 -47
- package/dist/bigconsole/pages/ParserBuilderPage.js +213 -229
- package/dist/bigconsole/pages/ParserViewPage.js +97 -97
- package/dist/bigconsole/pages/PipelineBuilderPage.js +214 -256
- package/dist/bigconsole/pages/PipelineViewPage.js +146 -146
- package/dist/bigconsole/pages/PipelinesPage.js +88 -107
- package/dist/bigconsole/pages/SettingsPage.js +173 -179
- package/dist/bigconsole/pages/WidgetDemoPage.js +42 -42
- package/dist/bigconsole/pages/WorkflowViewPage.js +1 -1
- package/dist/bigconsole/pages/WorkflowsPage.js +141 -141
- package/dist/bigconsole/providers/BigConsoleQuotaProvider.js +12 -12
- package/dist/bigconsole/renderers/adapters/AdaptiveCardRenderer.js +235 -122
- package/dist/bigconsole/renderers/adapters/BlockKitRenderer.d.ts +6 -1
- package/dist/bigconsole/renderers/adapters/BlockKitRenderer.js +151 -151
- package/dist/bigconsole/renderers/adapters/CustomRenderer.js +46 -46
- package/dist/bigconsole/renderers/adapters/adaptiveCardContent.d.ts +29 -0
- package/dist/bigconsole/renderers/adapters/adaptiveCardContent.js +51 -0
- package/dist/bigconsole/store/widgetStore.d.ts +0 -12
- package/dist/bigconsole/store/widgetStore.js +1 -3
- package/dist/bigconsole/types/index.d.ts +17 -2
- package/dist/bigconsole/utils/backendError.d.ts +0 -18
- package/dist/bigconsole/utils/dataSinkPayload.d.ts +48 -0
- package/dist/bigconsole/utils/dataSinkPayload.js +38 -0
- package/dist/bigconsole/utils/index.d.ts +2 -0
- package/dist/bigconsole/utils/safeUrl.d.ts +79 -0
- package/dist/bigconsole/utils/safeUrl.js +93 -0
- package/dist/bigconsole/utils/sanitizeHtml.d.ts +16 -0
- package/dist/bigconsole/utils/sanitizeHtml.js +67 -0
- package/dist/bigconsole/workflowOpen.js +14 -15
- package/dist/generated/wspace-operations.d.ts +138 -8
- package/dist/generated/wspace-operations.js +281 -240
- package/dist/node_modules/dompurify/dist/purify.es.js +800 -0
- package/package.json +9 -5
- package/dist/bigconsole/assistant/displayCopy.d.ts +0 -32
- package/dist/bigconsole/assistant/pageControls.d.ts +0 -81
- package/dist/bigconsole/assistant/pageControls.js +0 -169
- package/dist/bigconsole/assistant/previewControl.d.ts +0 -16
- package/dist/bigconsole/assistant/previewControl.js +0 -10
- package/dist/bigconsole/assistant/usePreviewControl.d.ts +0 -2
- package/dist/bigconsole/assistant/usePreviewControl.js +0 -20
- package/dist/bigconsole/components/common/SortBySelect.d.ts +0 -11
- package/dist/bigconsole/components/common/SortBySelect.js +0 -29
- package/dist/bigconsole/constants/backendErrors.js +0 -94
- package/dist/bigconsole/hooks/useDashboardLayoutBaseline.d.ts +0 -14
- package/dist/bigconsole/hooks/useDashboardLayoutBaseline.js +0 -32
- package/dist/bigconsole/utils/backendError.js +0 -42
- package/dist/bigconsole/utils/dashboardList.d.ts +0 -28
- package/dist/bigconsole/utils/dashboardList.js +0 -15
- package/dist/bigconsole/utils/dataSinkList.d.ts +0 -15
- package/dist/bigconsole/utils/dataSinkList.js +0 -15
- package/dist/bigconsole/utils/formDirty.d.ts +0 -82
- package/dist/bigconsole/utils/formDirty.js +0 -21
- package/dist/bigconsole/utils/insightsDraft.d.ts +0 -29
- package/dist/bigconsole/utils/insightsDraft.js +0 -8
- package/dist/bigconsole/utils/layoutBaseline.d.ts +0 -130
- package/dist/bigconsole/utils/layoutBaseline.js +0 -96
- package/dist/bigconsole/utils/listSort.d.ts +0 -80
- package/dist/bigconsole/utils/listSort.js +0 -85
- package/dist/bigconsole/utils/widgetFormDirty.d.ts +0 -16
- package/dist/bigconsole/utils/widgetFormDirty.js +0 -13
|
@@ -3,109 +3,109 @@ import "../common/index.js";
|
|
|
3
3
|
import t from "../../hooks/useImportParser.js";
|
|
4
4
|
import "../../hooks/index.js";
|
|
5
5
|
import { memo as n, useCallback as r, useEffect as i, useRef as a, useState as o } from "react";
|
|
6
|
-
import { ArrowLeft as s, Check as c, FileJson as
|
|
7
|
-
import { Badge as p, Button as m, Input as h, Label as g, ResponsiveDialog as _, ResponsiveDialogContent as
|
|
8
|
-
import { useI18n as C } from "@burdenoff/fe-libs/shared/providers/shell/I18nProvider";
|
|
6
|
+
import { ArrowLeft as s, Check as c, FileJson as l, Info as u, RefreshCw as ee, Upload as d, XCircle as f } from "lucide-react";
|
|
7
|
+
import { Badge as p, Button as m, Input as h, Label as g, ResponsiveDialog as _, ResponsiveDialogContent as v, ResponsiveDialogDescription as y, ResponsiveDialogFooter as b, ResponsiveDialogHeader as x, ResponsiveDialogTitle as S, Spinner as C } from "@burdenoff/fe-libs/ui";
|
|
9
8
|
import { Fragment as w, jsx as T, jsxs as E } from "react/jsx-runtime";
|
|
9
|
+
import { useI18n as D } from "@burdenoff/fe-libs/shared/providers/shell/I18nProvider";
|
|
10
10
|
//#region src/bigconsole/components/parser/ImportParserDialog.tsx
|
|
11
|
-
var
|
|
12
|
-
let { t:
|
|
11
|
+
var O = "flex flex-wrap items-center justify-between gap-x-2 gap-y-0.5", k = n(function({ isOpen: n, onClose: k, consoleId: A, onSuccess: j }) {
|
|
12
|
+
let { t: M } = D(), [N, P] = o("select"), [, F] = o(null), [I, L] = o(null), [R, z] = o(""), [B, V] = o(""), [H, U] = o(""), W = a(null), { loading: G, error: K, validationResult: q, importResult: J, validateImport: Y, importParser: X, extractParserId: te, clearState: Z } = t();
|
|
13
13
|
i(() => {
|
|
14
|
-
n && (
|
|
14
|
+
n && (P("select"), F(null), L(null), z(""), V(""), U(""), Z());
|
|
15
15
|
}, [n, Z]);
|
|
16
16
|
let ne = r(async (e) => {
|
|
17
17
|
let t = e.target.files?.[0];
|
|
18
18
|
if (!t) return;
|
|
19
19
|
if (!t.name.endsWith(".json")) {
|
|
20
|
-
alert(
|
|
20
|
+
alert(M("bigconsole.parsers.import.selectJsonFile", "Please select a JSON file"));
|
|
21
21
|
return;
|
|
22
22
|
}
|
|
23
|
-
|
|
23
|
+
F(t);
|
|
24
24
|
let n = new FileReader();
|
|
25
25
|
n.onload = async (e) => {
|
|
26
26
|
let t = e.target?.result;
|
|
27
|
-
|
|
28
|
-
let n =
|
|
29
|
-
n.isValid && n.parserInfo ? (
|
|
27
|
+
L(t);
|
|
28
|
+
let n = Y(t);
|
|
29
|
+
n.isValid && n.parserInfo ? (P("preview"), z(n.parserInfo.name || ""), V(n.parserInfo.inputSinkKey || ""), U(n.parserInfo.outputKey || "")) : P("preview");
|
|
30
30
|
}, n.onerror = () => {
|
|
31
|
-
alert(
|
|
31
|
+
alert(M("bigconsole.parsers.import.readFileFailed", "Failed to read file"));
|
|
32
32
|
}, n.readAsText(t);
|
|
33
|
-
}, [
|
|
33
|
+
}, [Y, M]), re = r((e) => {
|
|
34
34
|
e.preventDefault();
|
|
35
35
|
let t = e.dataTransfer.files?.[0];
|
|
36
36
|
if (t) {
|
|
37
37
|
let e = new DataTransfer();
|
|
38
|
-
e.items.add(t),
|
|
38
|
+
e.items.add(t), W.current && (W.current.files = e.files, W.current.dispatchEvent(new Event("change", { bubbles: !0 })));
|
|
39
39
|
}
|
|
40
40
|
}, []), ie = r(async () => {
|
|
41
|
-
if (!
|
|
42
|
-
|
|
43
|
-
let e = await
|
|
44
|
-
consoleId:
|
|
45
|
-
name:
|
|
46
|
-
inputSinkKey:
|
|
47
|
-
outputKey:
|
|
41
|
+
if (!I) return;
|
|
42
|
+
P("importing");
|
|
43
|
+
let e = await X(I, {
|
|
44
|
+
consoleId: A,
|
|
45
|
+
name: R.trim() || void 0,
|
|
46
|
+
inputSinkKey: B.trim() || void 0,
|
|
47
|
+
outputKey: H.trim() || void 0
|
|
48
48
|
});
|
|
49
|
-
e?.success && e.parser ? (
|
|
49
|
+
e?.success && e.parser ? (P("complete"), j?.(e.parser.id, e.parser.name, e.originalUpdated ?? !1)) : P("preview");
|
|
50
50
|
}, [
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
]), Q = !
|
|
51
|
+
I,
|
|
52
|
+
A,
|
|
53
|
+
R,
|
|
54
|
+
B,
|
|
55
|
+
H,
|
|
56
|
+
X,
|
|
57
|
+
j
|
|
58
|
+
]), Q = !G && N !== "importing", $ = I ? te(I) : null;
|
|
59
59
|
return /* @__PURE__ */ T(_, {
|
|
60
60
|
open: n,
|
|
61
|
-
onOpenChange: (e) => !e && Q &&
|
|
62
|
-
children: /* @__PURE__ */ E(
|
|
61
|
+
onOpenChange: (e) => !e && Q && k(),
|
|
62
|
+
children: /* @__PURE__ */ E(v, {
|
|
63
63
|
className: "sm:max-w-lg max-h-[85vh] flex flex-col",
|
|
64
64
|
children: [
|
|
65
|
-
/* @__PURE__ */ E(
|
|
65
|
+
/* @__PURE__ */ E(x, { children: [/* @__PURE__ */ E("div", {
|
|
66
66
|
className: "flex items-center gap-3",
|
|
67
67
|
children: [/* @__PURE__ */ T("div", {
|
|
68
68
|
className: "flex size-10 shrink-0 items-center justify-center rounded-lg bg-action-primary-bg/10",
|
|
69
69
|
children: /* @__PURE__ */ T(d, { className: "size-5 text-action-primary-bg" })
|
|
70
|
-
}), /* @__PURE__ */ T(
|
|
71
|
-
}), /* @__PURE__ */ T(
|
|
70
|
+
}), /* @__PURE__ */ T(S, { children: M("bigconsole.parsers.import.title", "Import Parser") })]
|
|
71
|
+
}), /* @__PURE__ */ T(y, { children: M("bigconsole.parsers.import.description", "Upload a Parser export file to restore it into this workspace.") })] }),
|
|
72
72
|
/* @__PURE__ */ E("div", {
|
|
73
73
|
className: "flex-1 overflow-y-auto py-4 space-y-4",
|
|
74
74
|
children: [
|
|
75
|
-
|
|
75
|
+
N === "select" && /* @__PURE__ */ E("div", {
|
|
76
76
|
onDragOver: (e) => e.preventDefault(),
|
|
77
77
|
onDrop: re,
|
|
78
78
|
className: "rounded-card border-2 border-dashed border-[var(--color-border-subtle)] bg-bg-sunken p-6 text-center hover:border-action-primary-bg motion-safe:transition-colors sm:p-8",
|
|
79
79
|
children: [
|
|
80
|
-
/* @__PURE__ */ T(
|
|
80
|
+
/* @__PURE__ */ T(l, { className: "size-12 mx-auto text-text-secondary mb-4" }),
|
|
81
81
|
/* @__PURE__ */ T("p", {
|
|
82
82
|
className: "text-sm mb-2",
|
|
83
|
-
children:
|
|
83
|
+
children: M("bigconsole.parsers.import.dropzoneTitle", "Drag and drop a parser export file here")
|
|
84
84
|
}),
|
|
85
85
|
/* @__PURE__ */ T("p", {
|
|
86
86
|
className: "text-xs text-text-secondary mb-4",
|
|
87
|
-
children:
|
|
87
|
+
children: M("bigconsole.parsers.import.or", "or")
|
|
88
88
|
}),
|
|
89
89
|
/* @__PURE__ */ T("input", {
|
|
90
|
-
ref:
|
|
90
|
+
ref: W,
|
|
91
91
|
type: "file",
|
|
92
92
|
accept: ".json",
|
|
93
93
|
onChange: ne,
|
|
94
94
|
className: "hidden"
|
|
95
95
|
}),
|
|
96
96
|
/* @__PURE__ */ T(m, {
|
|
97
|
-
onClick: () =>
|
|
98
|
-
disabled:
|
|
99
|
-
children:
|
|
97
|
+
onClick: () => W.current?.click(),
|
|
98
|
+
disabled: G,
|
|
99
|
+
children: M("bigconsole.parsers.import.browseFiles", "Browse Files")
|
|
100
100
|
}),
|
|
101
101
|
/* @__PURE__ */ T("p", {
|
|
102
102
|
className: "text-xs text-text-secondary mt-4",
|
|
103
|
-
children:
|
|
103
|
+
children: M("bigconsole.parsers.import.supportedHint", "Only .json files exported from BigConsole are supported")
|
|
104
104
|
})
|
|
105
105
|
]
|
|
106
106
|
}),
|
|
107
|
-
(
|
|
108
|
-
|
|
107
|
+
(N === "preview" || N === "importing") && q && /* @__PURE__ */ E(w, { children: [
|
|
108
|
+
q.parserInfo && /* @__PURE__ */ E(e, {
|
|
109
109
|
emphasis: "muted",
|
|
110
110
|
padding: "compact",
|
|
111
111
|
headingLevel: 3,
|
|
@@ -114,77 +114,77 @@ var D = "flex flex-wrap items-center justify-between gap-x-2 gap-y-0.5", O = n(f
|
|
|
114
114
|
"data-testid": "import-parser-summary",
|
|
115
115
|
children: [
|
|
116
116
|
/* @__PURE__ */ E("div", {
|
|
117
|
-
className:
|
|
117
|
+
className: O,
|
|
118
118
|
children: [/* @__PURE__ */ T("span", {
|
|
119
119
|
className: "text-sm text-text-secondary",
|
|
120
|
-
children:
|
|
120
|
+
children: M("bigconsole.parsers.import.fieldParser", "Parser")
|
|
121
121
|
}), /* @__PURE__ */ T("span", {
|
|
122
122
|
className: "min-w-0 break-words text-sm font-medium text-text-primary",
|
|
123
|
-
children:
|
|
123
|
+
children: q.parserInfo.name
|
|
124
124
|
})]
|
|
125
125
|
}),
|
|
126
126
|
/* @__PURE__ */ E("div", {
|
|
127
|
-
className:
|
|
127
|
+
className: O,
|
|
128
128
|
children: [/* @__PURE__ */ T("span", {
|
|
129
129
|
className: "text-sm text-text-secondary",
|
|
130
|
-
children:
|
|
130
|
+
children: M("bigconsole.parsers.import.fieldType", "Type")
|
|
131
131
|
}), /* @__PURE__ */ T(p, {
|
|
132
132
|
variant: "secondary",
|
|
133
|
-
children:
|
|
133
|
+
children: q.parserInfo.type
|
|
134
134
|
})]
|
|
135
135
|
}),
|
|
136
136
|
/* @__PURE__ */ E("div", {
|
|
137
|
-
className:
|
|
137
|
+
className: O,
|
|
138
138
|
children: [/* @__PURE__ */ T("span", {
|
|
139
139
|
className: "text-sm text-text-secondary",
|
|
140
|
-
children:
|
|
140
|
+
children: M("bigconsole.parsers.import.fieldInputSink", "Input Sink")
|
|
141
141
|
}), /* @__PURE__ */ T("span", {
|
|
142
142
|
className: "min-w-0 break-all font-mono text-xs text-text-primary",
|
|
143
|
-
children:
|
|
143
|
+
children: q.parserInfo.inputSinkKey
|
|
144
144
|
})]
|
|
145
145
|
}),
|
|
146
146
|
/* @__PURE__ */ E("div", {
|
|
147
|
-
className:
|
|
147
|
+
className: O,
|
|
148
148
|
children: [/* @__PURE__ */ T("span", {
|
|
149
149
|
className: "text-sm text-text-secondary",
|
|
150
|
-
children:
|
|
150
|
+
children: M("bigconsole.parsers.import.fieldOutputKey", "Output Key")
|
|
151
151
|
}), /* @__PURE__ */ T("span", {
|
|
152
152
|
className: "min-w-0 break-all font-mono text-xs text-text-primary",
|
|
153
|
-
children:
|
|
153
|
+
children: q.parserInfo.outputKey
|
|
154
154
|
})]
|
|
155
155
|
}),
|
|
156
|
-
|
|
157
|
-
className:
|
|
156
|
+
q.parserInfo.exportedFrom && /* @__PURE__ */ E("div", {
|
|
157
|
+
className: O,
|
|
158
158
|
children: [/* @__PURE__ */ T("span", {
|
|
159
159
|
className: "text-sm text-text-secondary",
|
|
160
|
-
children:
|
|
160
|
+
children: M("bigconsole.parsers.import.fieldSourceId", "Source ID")
|
|
161
161
|
}), /* @__PURE__ */ T("span", {
|
|
162
162
|
className: "min-w-0 max-w-full truncate font-mono text-xs text-text-secondary sm:max-w-[180px]",
|
|
163
|
-
children:
|
|
163
|
+
children: q.parserInfo.exportedFrom
|
|
164
164
|
})]
|
|
165
165
|
}),
|
|
166
166
|
/* @__PURE__ */ E("div", {
|
|
167
|
-
className:
|
|
167
|
+
className: O,
|
|
168
168
|
children: [/* @__PURE__ */ T("span", {
|
|
169
169
|
className: "text-sm text-text-secondary",
|
|
170
|
-
children:
|
|
170
|
+
children: M("bigconsole.parsers.import.fieldSchemaVersion", "Schema Version")
|
|
171
171
|
}), /* @__PURE__ */ T("span", {
|
|
172
172
|
className: "text-xs text-text-secondary",
|
|
173
|
-
children:
|
|
173
|
+
children: q.parserInfo.schemaVersion
|
|
174
174
|
})]
|
|
175
175
|
})
|
|
176
176
|
]
|
|
177
177
|
}),
|
|
178
|
-
|
|
178
|
+
q.errors.length > 0 && /* @__PURE__ */ T(e, {
|
|
179
179
|
tone: "danger",
|
|
180
180
|
padding: "compact",
|
|
181
181
|
headingLevel: 3,
|
|
182
|
-
title:
|
|
182
|
+
title: M("bigconsole.parsers.import.errorsCount", "Errors ({{count}})", { count: q.errors.length }),
|
|
183
183
|
icon: /* @__PURE__ */ T(f, { className: "size-4 text-[var(--color-status-error-text)]" }),
|
|
184
184
|
"data-testid": "import-validation-errors",
|
|
185
185
|
children: /* @__PURE__ */ T("ul", {
|
|
186
186
|
className: "space-y-1 text-xs text-status-error-text",
|
|
187
|
-
children:
|
|
187
|
+
children: q.errors.map((e, t) => /* @__PURE__ */ E("li", {
|
|
188
188
|
className: "break-words",
|
|
189
189
|
children: [
|
|
190
190
|
/* @__PURE__ */ E("span", {
|
|
@@ -201,9 +201,9 @@ var D = "flex flex-wrap items-center justify-between gap-x-2 gap-y-0.5", O = n(f
|
|
|
201
201
|
}, t))
|
|
202
202
|
})
|
|
203
203
|
}),
|
|
204
|
-
|
|
204
|
+
q.isValid && /* @__PURE__ */ E(e, {
|
|
205
205
|
headingLevel: 3,
|
|
206
|
-
title:
|
|
206
|
+
title: M("bigconsole.parsers.import.optionsHeading", "Import Options"),
|
|
207
207
|
description: "Override the imported names before creating the parser.",
|
|
208
208
|
bodyClassName: "space-y-4",
|
|
209
209
|
"data-testid": "import-parser-options",
|
|
@@ -212,43 +212,43 @@ var D = "flex flex-wrap items-center justify-between gap-x-2 gap-y-0.5", O = n(f
|
|
|
212
212
|
tone: "info",
|
|
213
213
|
padding: "compact",
|
|
214
214
|
headingLevel: 4,
|
|
215
|
-
title: $ ?
|
|
216
|
-
icon: /* @__PURE__ */ T(
|
|
215
|
+
title: $ ? M("bigconsole.parsers.import.checkExistingTitle", "Import will check for existing parser") : M("bigconsole.parsers.import.newParserTitle", "A new parser will be created"),
|
|
216
|
+
icon: /* @__PURE__ */ T(u, { className: "size-4 text-[var(--color-status-info-text)]" }),
|
|
217
217
|
children: /* @__PURE__ */ T("div", {
|
|
218
218
|
className: "text-xs text-text-secondary",
|
|
219
219
|
children: $ ? /* @__PURE__ */ E(w, { children: [
|
|
220
220
|
/* @__PURE__ */ E("p", { children: [
|
|
221
|
-
|
|
221
|
+
M("bigconsole.parsers.import.ifOriginalExistsPrefix", "If the original parser (ID:"),
|
|
222
222
|
" ",
|
|
223
223
|
/* @__PURE__ */ E("code", {
|
|
224
224
|
className: "rounded bg-bg-sunken px-1 font-mono",
|
|
225
225
|
children: [$.slice(0, 8), "..."]
|
|
226
226
|
}),
|
|
227
|
-
|
|
227
|
+
M("bigconsole.parsers.import.ifOriginalExistsSuffix", ") exists:")
|
|
228
228
|
] }),
|
|
229
229
|
/* @__PURE__ */ E("ul", {
|
|
230
230
|
className: "list-disc list-inside mt-1 space-y-0.5",
|
|
231
|
-
children: [/* @__PURE__ */ T("li", { children:
|
|
231
|
+
children: [/* @__PURE__ */ T("li", { children: M("bigconsole.parsers.import.withChanges", "With changes → Update the existing parser") }), /* @__PURE__ */ T("li", { children: M("bigconsole.parsers.import.noChanges", "No changes → Show \"already exists\" message") })]
|
|
232
232
|
}),
|
|
233
233
|
/* @__PURE__ */ T("p", {
|
|
234
234
|
className: "mt-1",
|
|
235
|
-
children:
|
|
235
|
+
children: M("bigconsole.parsers.import.ifOriginalMissing", "If original doesn't exist → Create a new parser")
|
|
236
236
|
})
|
|
237
|
-
] }) : /* @__PURE__ */ T("p", { children:
|
|
237
|
+
] }) : /* @__PURE__ */ T("p", { children: M("bigconsole.parsers.import.newParserBody", "Import as a new parser with the specified configuration.") })
|
|
238
238
|
})
|
|
239
239
|
}),
|
|
240
240
|
/* @__PURE__ */ E("div", {
|
|
241
241
|
className: "space-y-2",
|
|
242
242
|
children: [/* @__PURE__ */ T(g, {
|
|
243
243
|
htmlFor: "import-name",
|
|
244
|
-
children:
|
|
244
|
+
children: M("bigconsole.parsers.import.parserNameLabel", "Parser Name")
|
|
245
245
|
}), /* @__PURE__ */ T(h, {
|
|
246
246
|
id: "import-name",
|
|
247
247
|
type: "text",
|
|
248
|
-
value:
|
|
249
|
-
onChange: (e) =>
|
|
250
|
-
placeholder:
|
|
251
|
-
disabled:
|
|
248
|
+
value: R,
|
|
249
|
+
onChange: (e) => z(e.target.value),
|
|
250
|
+
placeholder: q.parserInfo?.name || M("bigconsole.parsers.import.parserNamePlaceholder", "Parser name"),
|
|
251
|
+
disabled: N === "importing"
|
|
252
252
|
})]
|
|
253
253
|
}),
|
|
254
254
|
/* @__PURE__ */ E("div", {
|
|
@@ -256,19 +256,19 @@ var D = "flex flex-wrap items-center justify-between gap-x-2 gap-y-0.5", O = n(f
|
|
|
256
256
|
children: [
|
|
257
257
|
/* @__PURE__ */ T(g, {
|
|
258
258
|
htmlFor: "import-input-sink",
|
|
259
|
-
children:
|
|
259
|
+
children: M("bigconsole.parsers.import.inputSinkKeyLabel", "Input Sink Key")
|
|
260
260
|
}),
|
|
261
261
|
/* @__PURE__ */ T(h, {
|
|
262
262
|
id: "import-input-sink",
|
|
263
263
|
type: "text",
|
|
264
|
-
value:
|
|
265
|
-
onChange: (e) =>
|
|
266
|
-
placeholder:
|
|
267
|
-
disabled:
|
|
264
|
+
value: B,
|
|
265
|
+
onChange: (e) => V(e.target.value),
|
|
266
|
+
placeholder: q.parserInfo?.inputSinkKey || M("bigconsole.parsers.import.inputSinkKeyPlaceholder", "Input sink key"),
|
|
267
|
+
disabled: N === "importing"
|
|
268
268
|
}),
|
|
269
269
|
/* @__PURE__ */ T("p", {
|
|
270
270
|
className: "text-xs text-text-secondary",
|
|
271
|
-
children:
|
|
271
|
+
children: M("bigconsole.parsers.import.inputSinkKeyHelp", "The DataSink key to read input data from.")
|
|
272
272
|
})
|
|
273
273
|
]
|
|
274
274
|
}),
|
|
@@ -277,34 +277,34 @@ var D = "flex flex-wrap items-center justify-between gap-x-2 gap-y-0.5", O = n(f
|
|
|
277
277
|
children: [
|
|
278
278
|
/* @__PURE__ */ T(g, {
|
|
279
279
|
htmlFor: "import-output-key",
|
|
280
|
-
children:
|
|
280
|
+
children: M("bigconsole.parsers.import.outputKeyLabel", "Output Key")
|
|
281
281
|
}),
|
|
282
282
|
/* @__PURE__ */ T(h, {
|
|
283
283
|
id: "import-output-key",
|
|
284
284
|
type: "text",
|
|
285
|
-
value:
|
|
286
|
-
onChange: (e) =>
|
|
287
|
-
placeholder:
|
|
288
|
-
disabled:
|
|
285
|
+
value: H,
|
|
286
|
+
onChange: (e) => U(e.target.value),
|
|
287
|
+
placeholder: q.parserInfo?.outputKey || M("bigconsole.parsers.import.outputKeyPlaceholder", "Output key"),
|
|
288
|
+
disabled: N === "importing"
|
|
289
289
|
}),
|
|
290
290
|
/* @__PURE__ */ T("p", {
|
|
291
291
|
className: "text-xs text-text-secondary",
|
|
292
|
-
children:
|
|
292
|
+
children: M("bigconsole.parsers.import.outputKeyHelp", "The key to store parsed output data under.")
|
|
293
293
|
})
|
|
294
294
|
]
|
|
295
295
|
})
|
|
296
296
|
]
|
|
297
297
|
})
|
|
298
298
|
] }),
|
|
299
|
-
|
|
300
|
-
tone:
|
|
299
|
+
N === "complete" && J?.success && /* @__PURE__ */ T(e, {
|
|
300
|
+
tone: J.alreadyExists ? "info" : "success",
|
|
301
301
|
headingLevel: 3,
|
|
302
|
-
title:
|
|
303
|
-
icon:
|
|
304
|
-
description:
|
|
302
|
+
title: J.alreadyExists ? M("bigconsole.parsers.import.alreadyExistsTitle", "Parser Already Exists") : J.originalUpdated ? M("bigconsole.parsers.import.updatedTitle", "Parser Updated!") : M("bigconsole.parsers.import.createdTitle", "Import Successful!"),
|
|
303
|
+
icon: J.alreadyExists ? /* @__PURE__ */ T(u, { className: "size-5 text-[var(--color-status-info-text)]" }) : J.originalUpdated ? /* @__PURE__ */ T(ee, { className: "size-5 text-[var(--color-status-success-text)]" }) : /* @__PURE__ */ T(c, { className: "size-5 text-[var(--color-status-success-text)]" }),
|
|
304
|
+
description: J.alreadyExists ? M("bigconsole.parsers.import.alreadyExistsBody", "Parser \"{{name}}\" already exists with the same data. No changes were made.", { name: J.parser?.name ?? "" }) : J.originalUpdated ? M("bigconsole.parsers.import.updatedBody", "Parser \"{{name}}\" has been updated with the imported data.", { name: J.parser?.name ?? "" }) : M("bigconsole.parsers.import.createdBody", "Parser \"{{name}}\" has been created.", { name: J.parser?.name ?? "" }),
|
|
305
305
|
"data-testid": "import-parser-outcome"
|
|
306
306
|
}),
|
|
307
|
-
|
|
307
|
+
K && /* @__PURE__ */ T(e, {
|
|
308
308
|
tone: "danger",
|
|
309
309
|
padding: "compact",
|
|
310
310
|
headingLevel: 3,
|
|
@@ -312,10 +312,10 @@ var D = "flex flex-wrap items-center justify-between gap-x-2 gap-y-0.5", O = n(f
|
|
|
312
312
|
"data-testid": "import-parser-error",
|
|
313
313
|
children: /* @__PURE__ */ T("p", {
|
|
314
314
|
className: "break-words text-sm text-status-error-text",
|
|
315
|
-
children:
|
|
315
|
+
children: K.message
|
|
316
316
|
})
|
|
317
317
|
}),
|
|
318
|
-
|
|
318
|
+
J && !J.success && J.errorMessage && /* @__PURE__ */ T(e, {
|
|
319
319
|
tone: "danger",
|
|
320
320
|
padding: "compact",
|
|
321
321
|
headingLevel: 3,
|
|
@@ -323,41 +323,41 @@ var D = "flex flex-wrap items-center justify-between gap-x-2 gap-y-0.5", O = n(f
|
|
|
323
323
|
"data-testid": "import-parser-result-error",
|
|
324
324
|
children: /* @__PURE__ */ T("p", {
|
|
325
325
|
className: "break-words text-sm text-status-error-text",
|
|
326
|
-
children:
|
|
326
|
+
children: J.errorMessage
|
|
327
327
|
})
|
|
328
328
|
})
|
|
329
329
|
]
|
|
330
330
|
}),
|
|
331
|
-
/* @__PURE__ */ E(
|
|
331
|
+
/* @__PURE__ */ E(b, {
|
|
332
332
|
className: "flex flex-col-reverse gap-2 sm:flex-row sm:justify-between",
|
|
333
|
-
children: [/* @__PURE__ */ T("div", { children:
|
|
333
|
+
children: [/* @__PURE__ */ T("div", { children: N === "preview" && /* @__PURE__ */ E(m, {
|
|
334
334
|
variant: "ghost",
|
|
335
335
|
onClick: () => {
|
|
336
|
-
|
|
336
|
+
P("select"), F(null), L(null), Z();
|
|
337
337
|
},
|
|
338
|
-
disabled:
|
|
339
|
-
children: [/* @__PURE__ */ T(s, { className: "size-4" }),
|
|
338
|
+
disabled: G,
|
|
339
|
+
children: [/* @__PURE__ */ T(s, { className: "size-4" }), M("bigconsole.parsers.import.back", "Back")]
|
|
340
340
|
}) }), /* @__PURE__ */ E("div", {
|
|
341
341
|
className: "flex flex-wrap items-center gap-2",
|
|
342
342
|
children: [
|
|
343
|
-
|
|
343
|
+
N !== "complete" && /* @__PURE__ */ T(m, {
|
|
344
344
|
variant: "outline",
|
|
345
|
-
onClick:
|
|
345
|
+
onClick: k,
|
|
346
346
|
disabled: !Q,
|
|
347
|
-
children:
|
|
347
|
+
children: M("bigconsole.parsers.import.cancel", "Cancel")
|
|
348
348
|
}),
|
|
349
|
-
|
|
349
|
+
N === "preview" && q?.isValid && /* @__PURE__ */ E(m, {
|
|
350
350
|
onClick: ie,
|
|
351
|
-
disabled:
|
|
352
|
-
children: [/* @__PURE__ */ T(d, { className: "size-4" }),
|
|
351
|
+
disabled: G,
|
|
352
|
+
children: [/* @__PURE__ */ T(d, { className: "size-4" }), M("bigconsole.parsers.import.importButton", "Import Parser")]
|
|
353
353
|
}),
|
|
354
|
-
|
|
354
|
+
N === "importing" && /* @__PURE__ */ E("div", {
|
|
355
355
|
className: "flex items-center gap-2 text-sm text-text-secondary",
|
|
356
|
-
children: [/* @__PURE__ */ T(
|
|
356
|
+
children: [/* @__PURE__ */ T(C, { className: "size-4" }), M("bigconsole.parsers.import.importing", "Importing...")]
|
|
357
357
|
}),
|
|
358
|
-
|
|
359
|
-
onClick:
|
|
360
|
-
children:
|
|
358
|
+
N === "complete" && /* @__PURE__ */ T(m, {
|
|
359
|
+
onClick: k,
|
|
360
|
+
children: M("bigconsole.parsers.import.done", "Done")
|
|
361
361
|
})
|
|
362
362
|
]
|
|
363
363
|
})]
|
|
@@ -367,4 +367,4 @@ var D = "flex flex-wrap items-center justify-between gap-x-2 gap-y-0.5", O = n(f
|
|
|
367
367
|
});
|
|
368
368
|
});
|
|
369
369
|
//#endregion
|
|
370
|
-
export {
|
|
370
|
+
export { k as default };
|