@burdenoff/microfe-bigconsole 2026.1118.9 → 2026.1119.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.
Files changed (46) hide show
  1. package/dist/bigconsole/asof/AsOfBanner.d.ts +3 -0
  2. package/dist/bigconsole/asof/AsOfBanner.js +38 -0
  3. package/dist/bigconsole/asof/AsOfControl.d.ts +4 -0
  4. package/dist/bigconsole/asof/AsOfControl.js +96 -0
  5. package/dist/bigconsole/asof/AsOfProvider.d.ts +24 -0
  6. package/dist/bigconsole/asof/AsOfProvider.js +76 -0
  7. package/dist/bigconsole/asof/asOfMessage.d.ts +12 -0
  8. package/dist/bigconsole/asof/asOfMessage.js +12 -0
  9. package/dist/bigconsole/asof/asOfParam.d.ts +48 -0
  10. package/dist/bigconsole/asof/asOfParam.js +34 -0
  11. package/dist/bigconsole/asof/index.d.ts +7 -0
  12. package/dist/bigconsole/asof/index.js +6 -0
  13. package/dist/bigconsole/components/dashboard/BoardMigrationReport.d.ts +7 -0
  14. package/dist/bigconsole/components/dashboard/BoardMigrationReport.js +136 -0
  15. package/dist/bigconsole/components/dashboard/DashboardCanvas.js +142 -138
  16. package/dist/bigconsole/components/dashboard/DashboardToolbar.js +97 -92
  17. package/dist/bigconsole/components/dashboard/ImportFromToolDialog.d.ts +8 -0
  18. package/dist/bigconsole/components/dashboard/ImportFromToolDialog.js +464 -0
  19. package/dist/bigconsole/components/dashboard/ShareDialog/ShareDialog.js +78 -74
  20. package/dist/bigconsole/components/dashboard/index.d.ts +2 -0
  21. package/dist/bigconsole/components/dashboard/index.js +2 -0
  22. package/dist/bigconsole/components/widgets/WidgetMenu.js +98 -96
  23. package/dist/bigconsole/components/widgets/WidgetWrapper.js +345 -306
  24. package/dist/bigconsole/constants/backendErrors.js +1 -0
  25. package/dist/bigconsole/hooks/index.d.ts +1 -0
  26. package/dist/bigconsole/hooks/index.js +14 -13
  27. package/dist/bigconsole/hooks/useBoardMigrationPreview.d.ts +22 -0
  28. package/dist/bigconsole/hooks/useBoardMigrationPreview.js +62 -0
  29. package/dist/bigconsole/hooks/useFilterFieldValues.js +52 -22
  30. package/dist/bigconsole/hooks/useWidgetData.d.ts +7 -0
  31. package/dist/bigconsole/hooks/useWidgetData.js +53 -43
  32. package/dist/bigconsole/pages/DashboardViewPage.d.ts +7 -1
  33. package/dist/bigconsole/pages/DashboardViewPage.js +300 -278
  34. package/dist/bigconsole/pages/DashboardsPage.js +396 -376
  35. package/dist/bigconsole/pages/index.d.ts +1 -1
  36. package/dist/bigconsole/types/index.d.ts +13 -0
  37. package/dist/bigconsole/utils/backendError.js +46 -24
  38. package/dist/bigconsole/utils/boardMigration.d.ts +53 -0
  39. package/dist/bigconsole/utils/boardMigration.js +92 -0
  40. package/dist/bigconsole/utils/widgetDisplayData.d.ts +6 -0
  41. package/dist/bigconsole/utils/widgetDisplayData.js +4 -0
  42. package/dist/generated/wspace-operations.d.ts +116 -0
  43. package/dist/generated/wspace-operations.js +793 -183
  44. package/dist/generated/wspace-types.d.ts +78 -0
  45. package/dist/generated/wspace-types.js +12 -10
  46. package/package.json +1 -1
@@ -0,0 +1,464 @@
1
+ import "../common/index.js";
2
+ import { useBigConsole as e } from "../../context/BigConsoleContext.js";
3
+ import "../../context/index.js";
4
+ import "../../hooks/index.js";
5
+ import { Section as t } from "../common/Section.js";
6
+ import n from "../../hooks/useBigConsoleAnalytics.js";
7
+ import { resolveBackendErrorMessage as r } from "../../utils/backendError.js";
8
+ import i from "../../hooks/useImportDashboard.js";
9
+ import a from "../../hooks/useBoardMigrationPreview.js";
10
+ import { MIGRATION_SOURCES as ee, buildTableauBoard as te, canImportWithoutAcknowledging as ne, gatherPowerBiBoard as re, isPbirFile as ie, normalizeSourceUrl as ae, parseBoardJson as oe } from "../../utils/boardMigration.js";
11
+ import { reportBigConsoleQuotaError as se } from "../../utils/quota.js";
12
+ import { BoardMigrationReport as ce } from "./BoardMigrationReport.js";
13
+ import { memo as o, useCallback as s, useLayoutEffect as le, useRef as c, useState as l } from "react";
14
+ import { AlertTriangle as ue, ArrowLeft as de, ArrowRightLeft as fe, Check as pe, FileJson as u, FolderOpen as me, XCircle as he } from "lucide-react";
15
+ import { Button as d, Checkbox as ge, Dialog as _e, DialogContent as ve, DialogDescription as ye, DialogFooter as be, DialogHeader as xe, DialogTitle as Se, Input as f, Label as p, Spinner as m, Textarea as Ce } from "@burdenoff/fe-libs/ui";
16
+ import { useI18n as we } from "@burdenoff/fe-libs/shared/providers/shell/I18nProvider";
17
+ import { Fragment as h, jsx as g, jsxs as _ } from "react/jsx-runtime";
18
+ // src/bigconsole/components/dashboard/ImportFromToolDialog.tsx
19
+ var v = o(function({ isOpen: o, onClose: v, onSuccess: y }) {
20
+ let { t: b } = we(), { currentUser: Te, workspaceId: Ee } = e(), De = `${Te?.id ?? ""}|${Ee ?? ""}`, x = c(0), S = c(null), C = c(null), w = c(null), [T, E] = l("source"), [D, O] = l("METABASE"), [k, A] = l(null), [j, M] = l(""), [N, P] = l(""), [F, I] = l(null), [L, R] = l(""), [z, B] = l(!1), { loading: V, error: Oe, preview: H, previewBoard: U, clearPreview: W } = a(), { loading: ke, error: Ae, importResult: G, importDashboard: K, clearState: q } = i(), J = n();
21
+ le(() => (x.current++, W(), q(), o && (E("source"), O("METABASE"), A(null), M(""), P(""), I(null), R(""), B(!1)), () => {
22
+ x.current++;
23
+ }), [
24
+ o,
25
+ De,
26
+ W,
27
+ q
28
+ ]);
29
+ let Y = s((e) => e === "empty" ? b("bigconsole.dashboards.importFromTool.errorEmpty", "Paste the board JSON or choose a file.") : e === "not-json" ? b("bigconsole.dashboards.importFromTool.errorNotJson", "That is not valid JSON.") : b("bigconsole.dashboards.importFromTool.errorNotObject", "Expected one dashboard as a JSON object, not a list."), [b]), je = s((e) => {
30
+ let t = e.target.files?.[0];
31
+ if (!t) return;
32
+ let n = ++x.current;
33
+ if (I(null), !t.name.toLowerCase().endsWith(".json")) {
34
+ I(b("bigconsole.dashboards.import.selectJsonFile", "Please select a JSON file"));
35
+ return;
36
+ }
37
+ let r = new FileReader();
38
+ r.onload = (e) => {
39
+ if (x.current !== n) return;
40
+ let t = e.target?.result;
41
+ typeof t == "string" ? M(t) : I(b("bigconsole.dashboards.import.failedToReadFile", "Failed to read file"));
42
+ }, r.onerror = () => {
43
+ x.current === n && I(b("bigconsole.dashboards.import.failedToReadFile", "Failed to read file"));
44
+ }, r.readAsText(t);
45
+ }, [b]), Me = s((e) => {
46
+ x.current++, O(e), A(null), I(null);
47
+ }, []), Ne = s(async (e) => {
48
+ let t = e.target.files?.[0];
49
+ if (e.target.value = "", !t) return;
50
+ let n = ++x.current;
51
+ if (I(null), !t.name.toLowerCase().endsWith(".twb")) I(b("bigconsole.dashboards.importFromTool.errorNotTwb", "Choose a .twb workbook. A packaged .twbx must be unzipped first."));
52
+ else try {
53
+ let e = await t.text();
54
+ x.current === n && A({
55
+ label: t.name,
56
+ board: te(t.name, e)
57
+ });
58
+ } catch {
59
+ x.current === n && I(b("bigconsole.dashboards.import.failedToReadFile", "Failed to read file"));
60
+ }
61
+ }, [b]), Pe = s(async (e) => {
62
+ let t = Array.from(e.target.files ?? []);
63
+ e.target.value = "";
64
+ let n = ++x.current;
65
+ I(null);
66
+ try {
67
+ let e = t.filter((e) => ie(e.webkitRelativePath || e.name)), r = await Promise.all(e.map(async (e) => ({
68
+ path: e.webkitRelativePath || e.name,
69
+ text: await e.text()
70
+ })));
71
+ if (x.current !== n) return;
72
+ let i = re(r);
73
+ if (!i.ok) {
74
+ I(i.problem === "no-pages" ? b("bigconsole.dashboards.importFromTool.errorNoPbir", "No Power BI pages found. Choose the .Report folder of a report saved in PBIR format.") : Y("not-json"));
75
+ return;
76
+ }
77
+ let a = typeof i.board.name == "string" ? i.board.name : "Power BI report";
78
+ A({
79
+ label: a,
80
+ board: i.board
81
+ });
82
+ } catch {
83
+ x.current === n && I(b("bigconsole.dashboards.import.failedToReadFile", "Failed to read file"));
84
+ }
85
+ }, [Y, b]), Fe = s(async () => {
86
+ let e;
87
+ if (D === "METABASE") {
88
+ let t = oe(j);
89
+ if (!t.ok) {
90
+ I(Y(t.problem));
91
+ return;
92
+ }
93
+ e = t.value;
94
+ } else if (k) e = k.board;
95
+ else {
96
+ I(D === "TABLEAU" ? b("bigconsole.dashboards.importFromTool.errorNoWorkbook", "Choose a .twb workbook.") : b("bigconsole.dashboards.importFromTool.errorNoFolder", "Choose the report folder."));
97
+ return;
98
+ }
99
+ I(null);
100
+ let t = x.current, n = await U({
101
+ source: D,
102
+ board: e,
103
+ sourceUrl: ae(N)
104
+ });
105
+ x.current === t && n && (R(n.report.sourceName), B(!1), E("report"));
106
+ }, [
107
+ j,
108
+ Y,
109
+ k,
110
+ U,
111
+ D,
112
+ N,
113
+ b
114
+ ]), Ie = s(async () => {
115
+ if (!H) return;
116
+ let e = x.current;
117
+ E("importing"), J("bigconsole.dashboard.import_clicked", { source: "import" });
118
+ try {
119
+ let t = await K(H.definition, {
120
+ name: L.trim() || void 0,
121
+ visibility: "PRIVATE",
122
+ skipWarnings: z
123
+ });
124
+ if (x.current !== e) return;
125
+ t?.success && t.dashboard ? (E("complete"), J("bigconsole.dashboard.imported", {
126
+ dashboardId: t.dashboard.id,
127
+ source: "import",
128
+ originalUpdated: !1
129
+ }), y?.(t.dashboard.id, t.dashboard.name)) : E("report");
130
+ } catch (t) {
131
+ if (x.current !== e) return;
132
+ if (se(t, "project")) {
133
+ v();
134
+ return;
135
+ }
136
+ E("report");
137
+ }
138
+ }, [
139
+ z,
140
+ J,
141
+ K,
142
+ L,
143
+ v,
144
+ y,
145
+ H
146
+ ]), X = V || ke || T === "importing", Z = !X, Q = H?.validation, Le = Q ? Q.isValid && !ne(Q) : !1, Re = !!Q?.isValid && (!Le || z), $ = Oe ?? Ae, ze = D === "METABASE" ? j.trim() !== "" : k !== null, Be = {
147
+ METABASE: "Metabase",
148
+ TABLEAU: "Tableau",
149
+ POWER_BI: "Power BI"
150
+ }, Ve = {
151
+ METABASE: b("bigconsole.dashboards.importFromTool.sourceHint", "Use the JSON that Metabase returns for one dashboard (GET /api/dashboard/{id}), or run \"bigconsole migrate metabase\" to fetch it."),
152
+ TABLEAU: b("bigconsole.dashboards.importFromTool.sourceHintTableau", "Choose a .twb workbook. Each dashboard becomes a page. A packaged .twbx must be unzipped first."),
153
+ POWER_BI: b("bigconsole.dashboards.importFromTool.sourceHintPowerBi", "Choose the .Report folder of a report saved as a Power BI project in PBIR format. Only the page and visual files are read.")
154
+ };
155
+ return /* @__PURE__ */ g(_e, {
156
+ open: o,
157
+ onOpenChange: (e) => !e && Z && v(),
158
+ children: /* @__PURE__ */ _(ve, {
159
+ className: "sm:max-w-2xl flex max-h-[calc(100dvh-3rem)] flex-col overflow-hidden",
160
+ children: [
161
+ /* @__PURE__ */ _(xe, {
162
+ className: "shrink-0",
163
+ children: [/* @__PURE__ */ _("div", {
164
+ className: "flex items-center gap-3",
165
+ children: [/* @__PURE__ */ g("div", {
166
+ className: "flex size-10 items-center justify-center rounded-lg bg-action-primary-bg/10",
167
+ children: /* @__PURE__ */ g(fe, { className: "size-5 text-primary" })
168
+ }), /* @__PURE__ */ g(Se, { children: b("bigconsole.dashboards.importFromTool.title", "Import from another tool") })]
169
+ }), /* @__PURE__ */ g(ye, { children: b("bigconsole.dashboards.importFromTool.description", "Bring a dashboard from Metabase, Tableau or Power BI into BigConsole. You see what carries over before anything is created.") })]
170
+ }),
171
+ /* @__PURE__ */ _("div", {
172
+ className: "min-h-0 flex-1 space-y-4 overflow-y-auto py-4",
173
+ children: [
174
+ T === "source" && /* @__PURE__ */ _("div", {
175
+ className: "space-y-4",
176
+ "data-testid": "import-from-tool-source",
177
+ children: [
178
+ /* @__PURE__ */ _("div", {
179
+ className: "space-y-2",
180
+ children: [
181
+ /* @__PURE__ */ g(p, { children: b("bigconsole.dashboards.importFromTool.sourceLabel", "Source") }),
182
+ /* @__PURE__ */ g("div", {
183
+ className: "flex flex-wrap gap-2",
184
+ role: "radiogroup",
185
+ "aria-label": "Source",
186
+ children: ee.map((e) => /* @__PURE__ */ g(d, {
187
+ type: "button",
188
+ role: "radio",
189
+ "aria-checked": D === e,
190
+ variant: D === e ? "default" : "outline",
191
+ size: "sm",
192
+ disabled: X,
193
+ onClick: () => Me(e),
194
+ "data-testid": `import-from-tool-source-${e}`,
195
+ children: Be[e]
196
+ }, e))
197
+ }),
198
+ /* @__PURE__ */ g("p", {
199
+ className: "text-xs text-text-secondary",
200
+ children: Ve[D]
201
+ })
202
+ ]
203
+ }),
204
+ D === "METABASE" && /* @__PURE__ */ _("div", {
205
+ className: "space-y-2",
206
+ children: [
207
+ /* @__PURE__ */ g(p, {
208
+ htmlFor: "import-from-tool-json",
209
+ children: b("bigconsole.dashboards.importFromTool.jsonLabel", "Dashboard JSON")
210
+ }),
211
+ /* @__PURE__ */ g(Ce, {
212
+ id: "import-from-tool-json",
213
+ value: j,
214
+ onChange: (e) => M(e.target.value),
215
+ rows: 8,
216
+ className: "font-mono text-xs",
217
+ placeholder: "{ \"name\": \"Sales overview\", \"dashcards\": [ ... ] }",
218
+ disabled: X
219
+ }),
220
+ /* @__PURE__ */ _("div", {
221
+ className: "flex items-center gap-2",
222
+ children: [/* @__PURE__ */ g("input", {
223
+ ref: S,
224
+ id: "import-from-tool-file",
225
+ type: "file",
226
+ accept: ".json,application/json",
227
+ onChange: je,
228
+ className: "hidden"
229
+ }), /* @__PURE__ */ _(d, {
230
+ type: "button",
231
+ variant: "outline",
232
+ size: "sm",
233
+ onClick: () => S.current?.click(),
234
+ children: [/* @__PURE__ */ g(u, { className: "mr-2 size-4" }), b("bigconsole.dashboards.importFromTool.chooseFile", "Choose a .json file")]
235
+ })]
236
+ })
237
+ ]
238
+ }),
239
+ D === "TABLEAU" && /* @__PURE__ */ _("div", {
240
+ className: "space-y-2",
241
+ children: [
242
+ /* @__PURE__ */ g("input", {
243
+ ref: C,
244
+ id: "import-from-tool-twb",
245
+ "data-testid": "import-from-tool-twb",
246
+ type: "file",
247
+ accept: ".twb",
248
+ onChange: (e) => void Ne(e),
249
+ className: "hidden"
250
+ }),
251
+ /* @__PURE__ */ _(d, {
252
+ type: "button",
253
+ variant: "outline",
254
+ size: "sm",
255
+ disabled: X,
256
+ onClick: () => C.current?.click(),
257
+ children: [/* @__PURE__ */ g(u, { className: "mr-2 size-4" }), b("bigconsole.dashboards.importFromTool.chooseWorkbook", "Choose a .twb workbook")]
258
+ }),
259
+ k && /* @__PURE__ */ g("p", {
260
+ className: "text-sm font-medium",
261
+ children: k.label
262
+ })
263
+ ]
264
+ }),
265
+ D === "POWER_BI" && /* @__PURE__ */ _("div", {
266
+ className: "space-y-2",
267
+ children: [
268
+ /* @__PURE__ */ g("input", {
269
+ ref: w,
270
+ id: "import-from-tool-folder",
271
+ "data-testid": "import-from-tool-folder",
272
+ type: "file",
273
+ webkitdirectory: "",
274
+ multiple: !0,
275
+ onChange: (e) => void Pe(e),
276
+ className: "hidden"
277
+ }),
278
+ /* @__PURE__ */ _(d, {
279
+ type: "button",
280
+ variant: "outline",
281
+ size: "sm",
282
+ disabled: X,
283
+ onClick: () => w.current?.click(),
284
+ children: [/* @__PURE__ */ g(me, { className: "mr-2 size-4" }), b("bigconsole.dashboards.importFromTool.chooseFolder", "Choose the report folder")]
285
+ }),
286
+ k && /* @__PURE__ */ g("p", {
287
+ className: "text-sm font-medium",
288
+ children: k.label
289
+ })
290
+ ]
291
+ }),
292
+ /* @__PURE__ */ _("div", {
293
+ className: "space-y-2",
294
+ children: [
295
+ /* @__PURE__ */ g(p, {
296
+ htmlFor: "import-from-tool-url",
297
+ children: b("bigconsole.dashboards.importFromTool.urlLabel", "Dashboard link (optional)")
298
+ }),
299
+ /* @__PURE__ */ g(f, {
300
+ id: "import-from-tool-url",
301
+ type: "url",
302
+ value: N,
303
+ onChange: (e) => P(e.target.value),
304
+ placeholder: "https://",
305
+ disabled: X
306
+ }),
307
+ /* @__PURE__ */ g("p", {
308
+ className: "text-xs text-text-secondary",
309
+ children: b("bigconsole.dashboards.importFromTool.urlHint", "Kept as a link back to the original. Credentials and the query string are removed.")
310
+ })
311
+ ]
312
+ })
313
+ ]
314
+ }),
315
+ (T === "report" || T === "importing") && H && /* @__PURE__ */ _(h, { children: [
316
+ /* @__PURE__ */ g(ce, { report: H.report }),
317
+ Q && Q.errors.length > 0 && /* @__PURE__ */ g(t, {
318
+ headingLevel: 3,
319
+ tone: "danger",
320
+ padding: "compact",
321
+ icon: /* @__PURE__ */ g(he, { className: "size-4" }),
322
+ title: b("bigconsole.dashboards.import.errorsCount", "Errors ({{count}})", { count: Q.errors.length }),
323
+ "data-testid": "import-from-tool-errors",
324
+ children: /* @__PURE__ */ g("ul", {
325
+ className: "space-y-1 text-xs text-status-error-text",
326
+ children: Q.errors.map((e) => /* @__PURE__ */ _("li", { children: [
327
+ /* @__PURE__ */ _("span", {
328
+ className: "font-mono",
329
+ children: [
330
+ "[",
331
+ e.code,
332
+ "]"
333
+ ]
334
+ }),
335
+ " ",
336
+ e.message
337
+ ] }, `${e.code}-${e.message}`))
338
+ })
339
+ }),
340
+ Q && Q.warnings.length > 0 && /* @__PURE__ */ g(t, {
341
+ headingLevel: 3,
342
+ tone: "warning",
343
+ padding: "compact",
344
+ icon: /* @__PURE__ */ g(ue, { className: "size-4" }),
345
+ title: b("bigconsole.dashboards.import.warningsCount", "Warnings ({{count}})", { count: Q.warnings.length }),
346
+ "data-testid": "import-from-tool-warnings",
347
+ children: /* @__PURE__ */ g("ul", {
348
+ className: "space-y-1 text-xs",
349
+ children: Q.warnings.map((e) => /* @__PURE__ */ _("li", {
350
+ className: "break-words",
351
+ children: [
352
+ /* @__PURE__ */ _("span", {
353
+ className: "font-mono",
354
+ children: [
355
+ "[",
356
+ e.code,
357
+ "]"
358
+ ]
359
+ }),
360
+ " ",
361
+ e.message
362
+ ]
363
+ }, `${e.code}-${e.message}`))
364
+ })
365
+ }),
366
+ Q?.isValid && /* @__PURE__ */ _("div", {
367
+ className: "space-y-4",
368
+ children: [/* @__PURE__ */ _("div", {
369
+ className: "space-y-2",
370
+ children: [
371
+ /* @__PURE__ */ g(p, {
372
+ htmlFor: "import-from-tool-name",
373
+ children: b("bigconsole.dashboards.import.dashboardNameLabel", "Dashboard Name")
374
+ }),
375
+ /* @__PURE__ */ g(f, {
376
+ id: "import-from-tool-name",
377
+ type: "text",
378
+ value: L,
379
+ onChange: (e) => R(e.target.value),
380
+ disabled: X
381
+ }),
382
+ /* @__PURE__ */ g("p", {
383
+ className: "text-xs text-text-secondary",
384
+ children: b("bigconsole.dashboards.importFromTool.privateHint", "The new dashboard is private until you share it.")
385
+ })
386
+ ]
387
+ }), Le && /* @__PURE__ */ _("div", {
388
+ className: "flex items-start space-x-3",
389
+ children: [/* @__PURE__ */ g(ge, {
390
+ id: "import-from-tool-acknowledge",
391
+ checked: z,
392
+ onCheckedChange: (e) => B(e === !0),
393
+ disabled: X
394
+ }), /* @__PURE__ */ g(p, {
395
+ htmlFor: "import-from-tool-acknowledge",
396
+ className: "cursor-pointer",
397
+ children: b("bigconsole.dashboards.import.acknowledgeWarnings", "Acknowledge warnings and proceed")
398
+ })]
399
+ })]
400
+ })
401
+ ] }),
402
+ T === "complete" && /* @__PURE__ */ g(t, {
403
+ headingLevel: 3,
404
+ tone: "success",
405
+ padding: "compact",
406
+ icon: /* @__PURE__ */ g(pe, { className: "size-4" }),
407
+ title: b("bigconsole.dashboards.importFromTool.doneTitle", "Dashboard created"),
408
+ description: b("bigconsole.dashboards.importFromTool.doneBody", "Open it and connect each widget to a data sink to see data."),
409
+ "data-testid": "import-from-tool-complete"
410
+ }),
411
+ F && /* @__PURE__ */ g("p", {
412
+ className: "text-sm text-status-error-text",
413
+ role: "alert",
414
+ "data-testid": "import-from-tool-input-error",
415
+ children: F
416
+ }),
417
+ $ && /* @__PURE__ */ g("p", {
418
+ className: "break-words text-sm text-status-error-text",
419
+ role: "alert",
420
+ "data-testid": "import-from-tool-error",
421
+ children: r(b, $)
422
+ }),
423
+ !$ && G && !G.success && G.errorMessage && /* @__PURE__ */ g("p", {
424
+ className: "break-words text-sm text-status-error-text",
425
+ role: "alert",
426
+ "data-testid": "import-from-tool-import-failed",
427
+ children: G.errorMessage
428
+ })
429
+ ]
430
+ }),
431
+ /* @__PURE__ */ _(be, {
432
+ className: "shrink-0",
433
+ children: [
434
+ T === "source" && /* @__PURE__ */ _(h, { children: [/* @__PURE__ */ g(d, {
435
+ variant: "outline",
436
+ onClick: v,
437
+ disabled: !Z,
438
+ children: b("bigconsole.dashboards.import.cancel", "Cancel")
439
+ }), /* @__PURE__ */ _(d, {
440
+ onClick: Fe,
441
+ disabled: X || !ze,
442
+ children: [V ? /* @__PURE__ */ g(m, { className: "mr-2 size-4" }) : null, b("bigconsole.dashboards.importFromTool.preview", "Preview conversion")]
443
+ })] }),
444
+ (T === "report" || T === "importing") && /* @__PURE__ */ _(h, { children: [/* @__PURE__ */ _(d, {
445
+ variant: "outline",
446
+ onClick: () => E("source"),
447
+ disabled: X,
448
+ children: [/* @__PURE__ */ g(de, { className: "mr-2 size-4" }), b("bigconsole.dashboards.importFromTool.back", "Back")]
449
+ }), /* @__PURE__ */ _(d, {
450
+ onClick: Ie,
451
+ disabled: X || !Re,
452
+ children: [T === "importing" ? /* @__PURE__ */ g(m, { className: "mr-2 size-4" }) : null, b("bigconsole.dashboards.importFromTool.import", "Import dashboard")]
453
+ })] }),
454
+ T === "complete" && /* @__PURE__ */ g(d, {
455
+ onClick: v,
456
+ children: b("bigconsole.dashboards.import.done", "Done")
457
+ })
458
+ ]
459
+ })
460
+ ]
461
+ })
462
+ });
463
+ });
464
+ export { v as ImportFromToolDialog, v as default };