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