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