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