@burdenoff/microfe-bigconsole 2026.612.1 → 2026.612.2

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.
@@ -6,41 +6,52 @@ import n from "../components/dashboard/CreateDashboardDialog.js";
6
6
  import r from "../components/dashboard/ImportDashboardDialog.js";
7
7
  import { isNative as i, nativeConfirm as a, nativeImpact as o, nativeNotify as s } from "../../utils/nativeBridge.js";
8
8
  import { memo as c, useCallback as l, useState as u } from "react";
9
- import { Calendar as d, Copy as f, FileText as p, FolderOpen as m, Layers as h, LayoutDashboard as g, Pencil as _, Plus as v, Search as y, Trash2 as b, Upload as x } from "lucide-react";
10
- import { useI18n as ee } from "@burdenoff/fe-libs/shared/providers/shell/I18nProvider";
11
- import { jsx as S, jsxs as C } from "react/jsx-runtime";
12
- import { Badge as w, Button as T, Card as E, CardContent as D, Input as O, Spinner as k } from "@burdenoff/fe-libs/ui";
9
+ import { Calendar as d, Copy as f, FileText as p, FolderOpen as ee, Layers as m, LayoutDashboard as h, LayoutGrid as te, List as ne, Pencil as g, Plus as _, Search as v, Trash2 as y, Upload as b } from "lucide-react";
10
+ import { useI18n as re } from "@burdenoff/fe-libs/shared/providers/shell/I18nProvider";
11
+ import { jsx as x, jsxs as S } from "react/jsx-runtime";
12
+ import { Badge as C, Button as w, Card as T, CardContent as E, Input as ie, Spinner as ae } from "@burdenoff/fe-libs/ui";
13
13
  //#region src/bigconsole/pages/DashboardsPage.tsx
14
- var A = c(function() {
15
- let c = e(), { t: A } = ee(), j = l((e, t) => {
16
- let n = A(e);
14
+ var D = "bf-bigconsole-dashboards-view", O = c(function() {
15
+ let c = e(), { t: O } = re(), k = l((e, t) => {
16
+ let n = O(e);
17
17
  return n === e ? t : n;
18
- }, [A]), [M, N] = u(""), [P, F] = u(!1), [I, L] = u(!1), [R, z] = u(!1), { loading: B, error: V, dashboards: H, createDashboard: U, deleteDashboard: W, cloneDashboard: G, refetch: K } = t(), q = H.filter((e) => e.name.toLowerCase().includes(M.toLowerCase()) || e.description?.toLowerCase().includes(M.toLowerCase())), J = l(() => {
19
- F(!0);
20
- }, []), Y = l(() => {
21
- I || F(!1);
22
- }, [I]), X = l(async (e) => {
23
- L(!0);
18
+ }, [O]), [A, oe] = u(""), [se, j] = u(!1), [M, N] = u(!1), [ce, P] = u(!1), [F, le] = u(() => {
24
19
  try {
25
- let t = await U({
20
+ return window.localStorage.getItem(D) === "list" ? "list" : "grid";
21
+ } catch {
22
+ return "grid";
23
+ }
24
+ }), I = l((e) => {
25
+ le(e);
26
+ try {
27
+ window.localStorage.setItem(D, e);
28
+ } catch {}
29
+ }, []), { loading: L, error: R, dashboards: z, createDashboard: B, deleteDashboard: V, cloneDashboard: H, refetch: U } = t(), W = z.filter((e) => e.name.toLowerCase().includes(A.toLowerCase()) || e.description?.toLowerCase().includes(A.toLowerCase())), G = l(() => {
30
+ j(!0);
31
+ }, []), ue = l(() => {
32
+ M || j(!1);
33
+ }, [M]), de = l(async (e) => {
34
+ N(!0);
35
+ try {
36
+ let t = await B({
26
37
  name: e.name,
27
38
  description: e.description,
28
39
  category: e.category,
29
40
  tags: e.tags
30
41
  });
31
- t && (F(!1), c(`/dashboards/${t.id}/builder`));
42
+ t && (j(!1), c(`/dashboards/${t.id}/builder`));
32
43
  } catch (e) {
33
44
  throw console.error("Failed to create dashboard:", e), i() && s("error"), e;
34
45
  } finally {
35
- L(!1);
46
+ N(!1);
36
47
  }
37
- }, [U, c]), Z = l((e) => {
48
+ }, [B, c]), K = l((e) => {
38
49
  c(`/dashboards/${e}`);
39
- }, [c]), Q = l((e, t) => {
50
+ }, [c]), q = l((e, t) => {
40
51
  t.stopPropagation(), c(`/dashboards/${e}/builder`);
41
- }, [c]), te = l(async (e, t) => {
52
+ }, [c]), J = l(async (e, t) => {
42
53
  t.stopPropagation();
43
- let n = j("bigconsole.dashboards.confirmDelete", "Are you sure you want to delete this dashboard?"), r = await a({
54
+ let n = k("bigconsole.dashboards.confirmDelete", "Are you sure you want to delete this dashboard?"), r = await a({
44
55
  title: "Delete dashboard?",
45
56
  message: n,
46
57
  okButtonTitle: "Delete",
@@ -49,90 +60,90 @@ var A = c(function() {
49
60
  if (r === null ? window.confirm(n) : r) {
50
61
  o("medium");
51
62
  try {
52
- await W(e), i() && s("success");
63
+ await V(e), i() && s("success");
53
64
  } catch (e) {
54
65
  throw i() && s("error"), e;
55
66
  }
56
67
  }
57
- }, [W, j]), ne = l(async (e, t, n) => {
68
+ }, [V, k]), Y = l(async (e, t, n) => {
58
69
  n.stopPropagation();
59
- let r = j("bigconsole.dashboards.clone.defaultSuffix", `${t} (Copy)`), a = window.prompt(j("bigconsole.dashboards.clone.namePrompt", "Name for the cloned dashboard:"), r);
70
+ let r = k("bigconsole.dashboards.clone.defaultSuffix", `${t} (Copy)`), a = window.prompt(k("bigconsole.dashboards.clone.namePrompt", "Name for the cloned dashboard:"), r);
60
71
  if (!(!a || !a.trim())) {
61
72
  o("medium");
62
73
  try {
63
- let t = await G(e, a.trim());
74
+ let t = await H(e, a.trim());
64
75
  t && (i() && s("success"), c(`/dashboards/${t.id}`));
65
76
  } catch (e) {
66
77
  throw i() && s("error"), e;
67
78
  }
68
79
  }
69
80
  }, [
70
- G,
81
+ H,
71
82
  c,
72
- j
73
- ]), $ = l(() => {
74
- z(!0);
75
- }, []), re = l(() => {
76
- z(!1);
77
- }, []), ie = l((e, t) => {
78
- K();
79
- }, [K]), ae = (e) => {
83
+ k
84
+ ]), X = l(() => {
85
+ P(!0);
86
+ }, []), fe = l(() => {
87
+ P(!1);
88
+ }, []), pe = l((e, t) => {
89
+ U();
90
+ }, [U]), Z = (e) => {
80
91
  let t = new Date(e), n = /* @__PURE__ */ new Date(), r = n.getTime() - t.getTime(), i = Math.floor(r / 6e4), a = Math.floor(r / 36e5), o = Math.floor(r / 864e5);
81
- return i < 1 ? j("bigconsole.dashboards.time.justNow", "Just now") : i < 60 ? `${i}${j("bigconsole.dashboards.time.minutesAgoSuffix", "m ago")}` : a < 24 ? `${a}${j("bigconsole.dashboards.time.hoursAgoSuffix", "h ago")}` : o < 7 ? `${o}${j("bigconsole.dashboards.time.daysAgoSuffix", "d ago")}` : new Intl.DateTimeFormat("en-US", {
92
+ return i < 1 ? k("bigconsole.dashboards.time.justNow", "Just now") : i < 60 ? `${i}${k("bigconsole.dashboards.time.minutesAgoSuffix", "m ago")}` : a < 24 ? `${a}${k("bigconsole.dashboards.time.hoursAgoSuffix", "h ago")}` : o < 7 ? `${o}${k("bigconsole.dashboards.time.daysAgoSuffix", "d ago")}` : new Intl.DateTimeFormat("en-US", {
82
93
  month: "short",
83
94
  day: "numeric",
84
95
  year: t.getFullYear() === n.getFullYear() ? void 0 : "numeric"
85
96
  }).format(t);
86
- }, oe = (e) => e.widgetCount ?? 0, se = (e) => e.pages?.length || 0;
87
- return V ? /* @__PURE__ */ S("div", {
97
+ }, Q = (e) => e.widgetCount ?? 0, $ = (e) => e.pages?.length || 0;
98
+ return R ? /* @__PURE__ */ x("div", {
88
99
  style: { padding: "var(--space-pagePadding)" },
89
- children: /* @__PURE__ */ S(E, {
100
+ children: /* @__PURE__ */ x(T, {
90
101
  style: {
91
102
  borderColor: "var(--color-status-error-border)",
92
103
  backgroundColor: "var(--color-status-error-bgSubtle)"
93
104
  },
94
- children: /* @__PURE__ */ C(D, {
105
+ children: /* @__PURE__ */ S(E, {
95
106
  style: { padding: "var(--space-pagePadding)" },
96
107
  children: [
97
- /* @__PURE__ */ S("h3", {
108
+ /* @__PURE__ */ x("h3", {
98
109
  style: {
99
110
  fontSize: "var(--font-size-body-sm)",
100
111
  fontWeight: "var(--font-weight-medium)",
101
112
  color: "var(--color-status-error-text)"
102
113
  },
103
- children: j("bigconsole.dashboards.error.title", "Error loading dashboards")
114
+ children: k("bigconsole.dashboards.error.title", "Error loading dashboards")
104
115
  }),
105
- /* @__PURE__ */ S("p", {
116
+ /* @__PURE__ */ x("p", {
106
117
  style: {
107
118
  fontSize: "var(--font-size-body-sm)",
108
119
  color: "var(--color-text-secondary)",
109
120
  marginTop: "var(--space-controlGap)"
110
121
  },
111
- children: V.message
122
+ children: R.message
112
123
  }),
113
- /* @__PURE__ */ S(T, {
124
+ /* @__PURE__ */ x(w, {
114
125
  size: "sm",
115
- onClick: () => K(),
126
+ onClick: () => U(),
116
127
  style: { marginTop: "var(--space-formGap)" },
117
- children: j("bigconsole.dashboards.error.retry", "Retry")
128
+ children: k("bigconsole.dashboards.error.retry", "Retry")
118
129
  })
119
130
  ]
120
131
  })
121
132
  })
122
- }) : /* @__PURE__ */ C("div", {
133
+ }) : /* @__PURE__ */ S("div", {
123
134
  style: {
124
135
  minHeight: "100vh",
125
136
  backgroundColor: "var(--color-bg-canvas)"
126
137
  },
127
138
  children: [
128
- /* @__PURE__ */ S("div", {
139
+ /* @__PURE__ */ x("div", {
129
140
  style: {
130
141
  borderBottom: "1px solid var(--color-border)",
131
142
  backgroundColor: "var(--color-bg-surface)"
132
143
  },
133
- children: /* @__PURE__ */ S("div", {
144
+ children: /* @__PURE__ */ x("div", {
134
145
  style: { padding: "var(--space-pagePadding)" },
135
- children: /* @__PURE__ */ C("div", {
146
+ children: /* @__PURE__ */ S("div", {
136
147
  style: {
137
148
  display: "flex",
138
149
  alignItems: "center",
@@ -140,14 +151,14 @@ var A = c(function() {
140
151
  flexWrap: "wrap",
141
152
  gap: "var(--space-formGap)"
142
153
  },
143
- children: [/* @__PURE__ */ C("div", {
154
+ children: [/* @__PURE__ */ S("div", {
144
155
  style: {
145
156
  display: "flex",
146
157
  alignItems: "center",
147
158
  gap: "var(--space-formGap)",
148
159
  minWidth: 0
149
160
  },
150
- children: [/* @__PURE__ */ S("div", {
161
+ children: [/* @__PURE__ */ x("div", {
151
162
  style: {
152
163
  display: "flex",
153
164
  height: "var(--size-controlHeight-lg)",
@@ -157,65 +168,74 @@ var A = c(function() {
157
168
  borderRadius: "var(--radius-card)",
158
169
  backgroundColor: "var(--color-action-primary-bg)"
159
170
  },
160
- children: /* @__PURE__ */ S(g, { style: {
171
+ children: /* @__PURE__ */ x(h, { style: {
161
172
  height: "var(--size-icon-lg)",
162
173
  width: "var(--size-icon-lg)",
163
174
  color: "var(--color-action-primary-text)"
164
175
  } })
165
- }), /* @__PURE__ */ C("div", { children: [/* @__PURE__ */ S("h1", {
176
+ }), /* @__PURE__ */ S("div", { children: [/* @__PURE__ */ x("h1", {
166
177
  style: {
167
178
  fontSize: "var(--font-size-heading-h4)",
168
179
  fontWeight: "var(--font-weight-bold)",
169
180
  margin: 0,
170
181
  color: "var(--color-text-primary)"
171
182
  },
172
- children: j("bigconsole.dashboards.title", "Dashboards")
173
- }), /* @__PURE__ */ S("p", {
183
+ children: k("bigconsole.dashboards.title", "Dashboards")
184
+ }), /* @__PURE__ */ x("p", {
174
185
  style: {
175
186
  fontSize: "var(--font-size-body-sm)",
176
187
  color: "var(--color-text-secondary)",
177
188
  margin: 0
178
189
  },
179
- children: j("bigconsole.dashboards.subtitle", "Create and manage your analytics dashboards")
190
+ children: k("bigconsole.dashboards.subtitle", "Create and manage your analytics dashboards")
180
191
  })] })]
181
- }), /* @__PURE__ */ C("div", {
192
+ }), /* @__PURE__ */ S("div", {
182
193
  style: {
183
194
  display: "flex",
184
195
  alignItems: "center",
185
196
  gap: "var(--space-controlGap)",
186
197
  flexWrap: "wrap"
187
198
  },
188
- children: [/* @__PURE__ */ C(T, {
199
+ children: [/* @__PURE__ */ S(w, {
189
200
  variant: "outline",
190
- onClick: $,
191
- children: [/* @__PURE__ */ S(x, { style: {
201
+ onClick: X,
202
+ children: [/* @__PURE__ */ x(b, { style: {
192
203
  marginRight: "var(--space-iconGap)",
193
204
  height: "var(--size-icon-sm)",
194
205
  width: "var(--size-icon-sm)"
195
- } }), j("bigconsole.dashboards.actions.import", "Import")]
196
- }), /* @__PURE__ */ C(T, {
197
- onClick: J,
198
- children: [/* @__PURE__ */ S(v, { style: {
206
+ } }), k("bigconsole.dashboards.actions.import", "Import")]
207
+ }), /* @__PURE__ */ S(w, {
208
+ onClick: G,
209
+ children: [/* @__PURE__ */ x(_, { style: {
199
210
  marginRight: "var(--space-iconGap)",
200
211
  height: "var(--size-icon-sm)",
201
212
  width: "var(--size-icon-sm)"
202
- } }), j("bigconsole.dashboards.actions.create", "Create Dashboard")]
213
+ } }), k("bigconsole.dashboards.actions.create", "Create Dashboard")]
203
214
  })]
204
215
  })]
205
216
  })
206
217
  })
207
218
  }),
208
- /* @__PURE__ */ C("div", {
219
+ /* @__PURE__ */ S("div", {
209
220
  style: { padding: "var(--space-pagePadding)" },
210
221
  children: [
211
222
  /* @__PURE__ */ S("div", {
212
- style: { marginBottom: "var(--space-sectionGap)" },
213
- children: /* @__PURE__ */ C("div", {
223
+ style: {
224
+ marginBottom: "var(--space-sectionGap)",
225
+ display: "flex",
226
+ alignItems: "center",
227
+ justifyContent: "space-between",
228
+ flexWrap: "wrap",
229
+ gap: "var(--space-formGap)"
230
+ },
231
+ children: [/* @__PURE__ */ S("div", {
214
232
  style: {
215
233
  position: "relative",
234
+ flex: 1,
235
+ minWidth: 0,
216
236
  maxWidth: "400px"
217
237
  },
218
- children: [/* @__PURE__ */ S(y, { style: {
238
+ children: [/* @__PURE__ */ x(v, { style: {
219
239
  position: "absolute",
220
240
  left: "var(--space-controlGap)",
221
241
  top: "50%",
@@ -223,64 +243,108 @@ var A = c(function() {
223
243
  height: "var(--size-icon-sm)",
224
244
  width: "var(--size-icon-sm)",
225
245
  color: "var(--color-text-muted)"
226
- } }), /* @__PURE__ */ S(O, {
246
+ } }), /* @__PURE__ */ x(ie, {
227
247
  type: "text",
228
- placeholder: j("bigconsole.dashboards.search.placeholder", "Search dashboards..."),
229
- value: M,
230
- onChange: (e) => N(e.target.value),
248
+ placeholder: k("bigconsole.dashboards.search.placeholder", "Search dashboards..."),
249
+ value: A,
250
+ onChange: (e) => oe(e.target.value),
231
251
  style: {
232
252
  paddingLeft: "var(--size-controlHeight-md)",
233
253
  height: "var(--size-controlHeight-md)"
234
254
  }
235
255
  })]
236
- })
256
+ }), /* @__PURE__ */ S("div", {
257
+ style: {
258
+ display: "flex",
259
+ alignItems: "center",
260
+ gap: "var(--space-iconGap)",
261
+ padding: "var(--space-iconGap)",
262
+ borderRadius: "var(--radius-button)",
263
+ backgroundColor: "var(--color-bg-sunken)"
264
+ },
265
+ children: [/* @__PURE__ */ x(w, {
266
+ variant: F === "grid" ? "default" : "ghost",
267
+ size: "sm",
268
+ onClick: () => I("grid"),
269
+ "aria-label": k("bigconsole.dashboards.view.grid", "Grid view"),
270
+ "aria-pressed": F === "grid",
271
+ title: k("bigconsole.dashboards.view.grid", "Grid view"),
272
+ style: {
273
+ height: "var(--size-controlHeight-sm)",
274
+ width: "var(--size-controlHeight-sm)",
275
+ padding: 0,
276
+ borderRadius: "var(--radius-button)"
277
+ },
278
+ children: /* @__PURE__ */ x(te, { style: {
279
+ height: "var(--size-icon-sm)",
280
+ width: "var(--size-icon-sm)"
281
+ } })
282
+ }), /* @__PURE__ */ x(w, {
283
+ variant: F === "list" ? "default" : "ghost",
284
+ size: "sm",
285
+ onClick: () => I("list"),
286
+ "aria-label": k("bigconsole.dashboards.view.list", "List view"),
287
+ "aria-pressed": F === "list",
288
+ title: k("bigconsole.dashboards.view.list", "List view"),
289
+ style: {
290
+ height: "var(--size-controlHeight-sm)",
291
+ width: "var(--size-controlHeight-sm)",
292
+ padding: 0,
293
+ borderRadius: "var(--radius-button)"
294
+ },
295
+ children: /* @__PURE__ */ x(ne, { style: {
296
+ height: "var(--size-icon-sm)",
297
+ width: "var(--size-icon-sm)"
298
+ } })
299
+ })]
300
+ })]
237
301
  }),
238
- B && H.length === 0 && /* @__PURE__ */ S("div", {
302
+ L && z.length === 0 && /* @__PURE__ */ x("div", {
239
303
  style: {
240
304
  display: "flex",
241
305
  alignItems: "center",
242
306
  justifyContent: "center",
243
307
  padding: "80px 0"
244
308
  },
245
- children: /* @__PURE__ */ C("div", {
309
+ children: /* @__PURE__ */ S("div", {
246
310
  style: { textAlign: "center" },
247
- children: [/* @__PURE__ */ S(k, { style: {
311
+ children: [/* @__PURE__ */ x(ae, { style: {
248
312
  height: "var(--size-icon-xl)",
249
313
  width: "var(--size-icon-xl)",
250
314
  margin: "0 auto var(--space-formGap)"
251
- } }), /* @__PURE__ */ S("p", {
315
+ } }), /* @__PURE__ */ x("p", {
252
316
  style: {
253
317
  fontSize: "var(--font-size-body-sm)",
254
318
  color: "var(--color-text-muted)"
255
319
  },
256
- children: j("bigconsole.dashboards.loading", "Loading dashboards...")
320
+ children: k("bigconsole.dashboards.loading", "Loading dashboards...")
257
321
  })]
258
322
  })
259
323
  }),
260
- !B && q.length > 0 && /* @__PURE__ */ S("div", {
324
+ !L && F === "grid" && W.length > 0 && /* @__PURE__ */ x("div", {
261
325
  style: {
262
326
  display: "grid",
263
327
  gridTemplateColumns: "repeat(auto-fill, minmax(min(320px, 100%), 1fr))",
264
328
  gap: "var(--space-formGap)"
265
329
  },
266
- children: q.map((e) => /* @__PURE__ */ S(E, {
267
- onClick: () => Z(e.id),
330
+ children: W.map((e) => /* @__PURE__ */ x(T, {
331
+ onClick: () => K(e.id),
268
332
  style: {
269
333
  cursor: "pointer",
270
334
  transition: "all 0.2s ease"
271
335
  },
272
336
  className: "hover:shadow-md hover:border-primary/50",
273
- children: /* @__PURE__ */ C(D, {
337
+ children: /* @__PURE__ */ S(E, {
274
338
  style: { padding: "var(--space-cardPadding)" },
275
339
  children: [
276
- /* @__PURE__ */ C("div", {
340
+ /* @__PURE__ */ S("div", {
277
341
  style: {
278
342
  display: "flex",
279
343
  alignItems: "center",
280
344
  gap: "var(--space-controlGap)",
281
345
  marginBottom: "var(--space-formGap)"
282
346
  },
283
- children: [/* @__PURE__ */ S("div", {
347
+ children: [/* @__PURE__ */ x("div", {
284
348
  style: {
285
349
  display: "flex",
286
350
  height: "var(--size-controlHeight-lg)",
@@ -291,17 +355,17 @@ var A = c(function() {
291
355
  borderRadius: "var(--radius-button)",
292
356
  backgroundColor: "var(--color-action-primary-bg)"
293
357
  },
294
- children: /* @__PURE__ */ S(g, { style: {
358
+ children: /* @__PURE__ */ x(h, { style: {
295
359
  height: "var(--size-icon-md)",
296
360
  width: "var(--size-icon-md)",
297
361
  color: "var(--color-action-primary-text)"
298
362
  } })
299
- }), /* @__PURE__ */ C("div", {
363
+ }), /* @__PURE__ */ S("div", {
300
364
  style: {
301
365
  flex: 1,
302
366
  minWidth: 0
303
367
  },
304
- children: [/* @__PURE__ */ S("h3", {
368
+ children: [/* @__PURE__ */ x("h3", {
305
369
  style: {
306
370
  fontWeight: "var(--font-weight-bold)",
307
371
  fontSize: "var(--font-size-body-md)",
@@ -312,7 +376,7 @@ var A = c(function() {
312
376
  whiteSpace: "nowrap"
313
377
  },
314
378
  children: e.name
315
- }), e.category && /* @__PURE__ */ S(w, {
379
+ }), e.category && /* @__PURE__ */ x(C, {
316
380
  variant: "secondary",
317
381
  style: {
318
382
  marginTop: "var(--space-controlGap)",
@@ -324,7 +388,7 @@ var A = c(function() {
324
388
  })]
325
389
  })]
326
390
  }),
327
- /* @__PURE__ */ S("p", {
391
+ /* @__PURE__ */ x("p", {
328
392
  style: {
329
393
  fontSize: "var(--font-size-body-sm)",
330
394
  lineHeight: "var(--font-lineHeight-normal)",
@@ -336,9 +400,9 @@ var A = c(function() {
336
400
  WebkitBoxOrient: "vertical",
337
401
  overflow: "hidden"
338
402
  },
339
- children: e.description || j("bigconsole.dashboards.card.noDescription", "No description provided")
403
+ children: e.description || k("bigconsole.dashboards.card.noDescription", "No description provided")
340
404
  }),
341
- /* @__PURE__ */ C("div", {
405
+ /* @__PURE__ */ S("div", {
342
406
  style: {
343
407
  display: "flex",
344
408
  alignItems: "center",
@@ -349,72 +413,72 @@ var A = c(function() {
349
413
  borderRadius: "var(--radius-button)"
350
414
  },
351
415
  children: [
352
- /* @__PURE__ */ C("div", {
416
+ /* @__PURE__ */ S("div", {
353
417
  style: {
354
418
  display: "flex",
355
419
  alignItems: "center",
356
420
  gap: "var(--space-iconGap)"
357
421
  },
358
422
  children: [
359
- /* @__PURE__ */ S(h, { style: {
423
+ /* @__PURE__ */ x(m, { style: {
360
424
  height: "var(--size-icon-sm)",
361
425
  width: "var(--size-icon-sm)",
362
426
  color: "var(--color-action-primary-bg)"
363
427
  } }),
364
- /* @__PURE__ */ S("span", {
428
+ /* @__PURE__ */ x("span", {
365
429
  style: {
366
430
  fontSize: "var(--font-size-body-sm)",
367
431
  fontWeight: "var(--font-weight-semibold)",
368
432
  color: "var(--color-text-primary)"
369
433
  },
370
- children: se(e)
434
+ children: $(e)
371
435
  }),
372
- /* @__PURE__ */ S("span", {
436
+ /* @__PURE__ */ x("span", {
373
437
  style: {
374
438
  fontSize: "var(--font-size-body-sm)",
375
439
  color: "var(--color-text-muted)"
376
440
  },
377
- children: j("bigconsole.dashboards.card.pages", "pages")
441
+ children: k("bigconsole.dashboards.card.pages", "pages")
378
442
  })
379
443
  ]
380
444
  }),
381
- /* @__PURE__ */ S("div", { style: {
445
+ /* @__PURE__ */ x("div", { style: {
382
446
  width: "1px",
383
447
  height: "var(--size-icon-sm)",
384
448
  backgroundColor: "var(--color-border)"
385
449
  } }),
386
- /* @__PURE__ */ C("div", {
450
+ /* @__PURE__ */ S("div", {
387
451
  style: {
388
452
  display: "flex",
389
453
  alignItems: "center",
390
454
  gap: "var(--space-iconGap)"
391
455
  },
392
456
  children: [
393
- /* @__PURE__ */ S(p, { style: {
457
+ /* @__PURE__ */ x(p, { style: {
394
458
  height: "var(--size-icon-sm)",
395
459
  width: "var(--size-icon-sm)",
396
460
  color: "var(--color-action-primary-bg)"
397
461
  } }),
398
- /* @__PURE__ */ S("span", {
462
+ /* @__PURE__ */ x("span", {
399
463
  style: {
400
464
  fontSize: "var(--font-size-body-sm)",
401
465
  fontWeight: "var(--font-weight-semibold)",
402
466
  color: "var(--color-text-primary)"
403
467
  },
404
- children: oe(e)
468
+ children: Q(e)
405
469
  }),
406
- /* @__PURE__ */ S("span", {
470
+ /* @__PURE__ */ x("span", {
407
471
  style: {
408
472
  fontSize: "var(--font-size-body-sm)",
409
473
  color: "var(--color-text-muted)"
410
474
  },
411
- children: j("bigconsole.dashboards.card.widgets", "widgets")
475
+ children: k("bigconsole.dashboards.card.widgets", "widgets")
412
476
  })
413
477
  ]
414
478
  })
415
479
  ]
416
480
  }),
417
- /* @__PURE__ */ C("div", {
481
+ /* @__PURE__ */ S("div", {
418
482
  style: {
419
483
  display: "flex",
420
484
  alignItems: "center",
@@ -422,67 +486,67 @@ var A = c(function() {
422
486
  paddingTop: "var(--space-controlGap)",
423
487
  borderTop: "1px solid var(--color-border)"
424
488
  },
425
- children: [/* @__PURE__ */ C("div", {
489
+ children: [/* @__PURE__ */ S("div", {
426
490
  style: {
427
491
  display: "flex",
428
492
  alignItems: "center",
429
493
  gap: "var(--space-iconGap)"
430
494
  },
431
- children: [/* @__PURE__ */ S(d, { style: {
495
+ children: [/* @__PURE__ */ x(d, { style: {
432
496
  height: "var(--size-icon-sm)",
433
497
  width: "var(--size-icon-sm)",
434
498
  color: "var(--color-text-muted)"
435
- } }), /* @__PURE__ */ S("span", {
499
+ } }), /* @__PURE__ */ x("span", {
436
500
  style: {
437
501
  fontSize: "var(--font-size-body-sm)",
438
502
  fontWeight: "var(--font-weight-medium)",
439
503
  color: "var(--color-text-muted)"
440
504
  },
441
- children: ae(e.updatedAt)
505
+ children: Z(e.updatedAt)
442
506
  })]
443
- }), /* @__PURE__ */ C("div", {
507
+ }), /* @__PURE__ */ S("div", {
444
508
  style: {
445
509
  display: "flex",
446
510
  alignItems: "center",
447
511
  gap: "var(--space-controlGap)"
448
512
  },
449
513
  children: [
450
- /* @__PURE__ */ S(T, {
514
+ /* @__PURE__ */ x(w, {
451
515
  variant: "ghost",
452
516
  size: "sm",
453
- onClick: (t) => Q(e.id, t),
517
+ onClick: (t) => q(e.id, t),
454
518
  style: {
455
519
  height: "var(--size-controlHeight-sm)",
456
520
  width: "var(--size-controlHeight-sm)",
457
521
  padding: 0,
458
522
  borderRadius: "var(--radius-button)"
459
523
  },
460
- title: j("bigconsole.dashboards.actions.editTitle", "Edit Dashboard"),
461
- children: /* @__PURE__ */ S(_, { style: {
524
+ title: k("bigconsole.dashboards.actions.editTitle", "Edit Dashboard"),
525
+ children: /* @__PURE__ */ x(g, { style: {
462
526
  height: "var(--size-icon-sm)",
463
527
  width: "var(--size-icon-sm)"
464
528
  } })
465
529
  }),
466
- /* @__PURE__ */ S(T, {
530
+ /* @__PURE__ */ x(w, {
467
531
  variant: "ghost",
468
532
  size: "sm",
469
- onClick: (t) => ne(e.id, e.name, t),
533
+ onClick: (t) => Y(e.id, e.name, t),
470
534
  style: {
471
535
  height: "var(--size-controlHeight-sm)",
472
536
  width: "var(--size-controlHeight-sm)",
473
537
  padding: 0,
474
538
  borderRadius: "var(--radius-button)"
475
539
  },
476
- title: j("bigconsole.dashboards.actions.cloneTitle", "Clone Dashboard"),
477
- children: /* @__PURE__ */ S(f, { style: {
540
+ title: k("bigconsole.dashboards.actions.cloneTitle", "Clone Dashboard"),
541
+ children: /* @__PURE__ */ x(f, { style: {
478
542
  height: "var(--size-icon-sm)",
479
543
  width: "var(--size-icon-sm)"
480
544
  } })
481
545
  }),
482
- /* @__PURE__ */ S(T, {
546
+ /* @__PURE__ */ x(w, {
483
547
  variant: "ghost",
484
548
  size: "sm",
485
- onClick: (t) => te(e.id, t),
549
+ onClick: (t) => J(e.id, t),
486
550
  style: {
487
551
  height: "var(--size-controlHeight-sm)",
488
552
  width: "var(--size-controlHeight-sm)",
@@ -490,8 +554,8 @@ var A = c(function() {
490
554
  borderRadius: "var(--radius-button)"
491
555
  },
492
556
  className: "hover:text-destructive hover:bg-destructive/10",
493
- title: j("bigconsole.dashboards.actions.deleteTitle", "Delete Dashboard"),
494
- children: /* @__PURE__ */ S(b, { style: {
557
+ title: k("bigconsole.dashboards.actions.deleteTitle", "Delete Dashboard"),
558
+ children: /* @__PURE__ */ x(y, { style: {
495
559
  height: "var(--size-icon-sm)",
496
560
  width: "var(--size-icon-sm)"
497
561
  } })
@@ -503,9 +567,245 @@ var A = c(function() {
503
567
  })
504
568
  }, e.id))
505
569
  }),
506
- !B && q.length === 0 && /* @__PURE__ */ S(E, {
570
+ !L && F === "list" && W.length > 0 && /* @__PURE__ */ x("div", {
571
+ style: {
572
+ display: "flex",
573
+ flexDirection: "column",
574
+ gap: "var(--space-controlGap)"
575
+ },
576
+ children: W.map((e) => /* @__PURE__ */ x(T, {
577
+ onClick: () => K(e.id),
578
+ style: {
579
+ cursor: "pointer",
580
+ transition: "all 0.2s ease"
581
+ },
582
+ className: "hover:shadow-md hover:border-primary/50",
583
+ children: /* @__PURE__ */ x(E, {
584
+ style: { padding: "var(--space-cardPadding)" },
585
+ children: /* @__PURE__ */ S("div", {
586
+ style: {
587
+ display: "flex",
588
+ alignItems: "center",
589
+ gap: "var(--space-formGap)",
590
+ flexWrap: "wrap"
591
+ },
592
+ children: [
593
+ /* @__PURE__ */ x("div", {
594
+ style: {
595
+ display: "flex",
596
+ height: "var(--size-controlHeight-lg)",
597
+ width: "var(--size-controlHeight-lg)",
598
+ flexShrink: 0,
599
+ alignItems: "center",
600
+ justifyContent: "center",
601
+ borderRadius: "var(--radius-button)",
602
+ backgroundColor: "var(--color-action-primary-bg)"
603
+ },
604
+ children: /* @__PURE__ */ x(h, { style: {
605
+ height: "var(--size-icon-md)",
606
+ width: "var(--size-icon-md)",
607
+ color: "var(--color-action-primary-text)"
608
+ } })
609
+ }),
610
+ /* @__PURE__ */ S("div", {
611
+ style: {
612
+ flex: 1,
613
+ minWidth: "180px"
614
+ },
615
+ children: [/* @__PURE__ */ S("div", {
616
+ style: {
617
+ display: "flex",
618
+ alignItems: "center",
619
+ gap: "var(--space-controlGap)",
620
+ flexWrap: "wrap"
621
+ },
622
+ children: [/* @__PURE__ */ x("h3", {
623
+ style: {
624
+ fontWeight: "var(--font-weight-bold)",
625
+ fontSize: "var(--font-size-body-md)",
626
+ margin: 0,
627
+ color: "var(--color-text-primary)",
628
+ overflow: "hidden",
629
+ textOverflow: "ellipsis",
630
+ whiteSpace: "nowrap",
631
+ maxWidth: "100%"
632
+ },
633
+ children: e.name
634
+ }), e.category && /* @__PURE__ */ x(C, {
635
+ variant: "secondary",
636
+ style: {
637
+ fontSize: "10px",
638
+ fontWeight: "var(--font-weight-semibold)",
639
+ textTransform: "uppercase"
640
+ },
641
+ children: e.category
642
+ })]
643
+ }), /* @__PURE__ */ x("p", {
644
+ style: {
645
+ fontSize: "var(--font-size-body-sm)",
646
+ lineHeight: "var(--font-lineHeight-normal)",
647
+ color: "var(--color-text-secondary)",
648
+ margin: "var(--space-controlGap) 0 0 0",
649
+ overflow: "hidden",
650
+ textOverflow: "ellipsis",
651
+ whiteSpace: "nowrap"
652
+ },
653
+ children: e.description || k("bigconsole.dashboards.card.noDescription", "No description provided")
654
+ })]
655
+ }),
656
+ /* @__PURE__ */ S("div", {
657
+ style: {
658
+ display: "flex",
659
+ alignItems: "center",
660
+ gap: "var(--space-formGap)",
661
+ flexWrap: "wrap"
662
+ },
663
+ children: [
664
+ /* @__PURE__ */ S("div", {
665
+ style: {
666
+ display: "flex",
667
+ alignItems: "center",
668
+ gap: "var(--space-iconGap)"
669
+ },
670
+ children: [
671
+ /* @__PURE__ */ x(m, { style: {
672
+ height: "var(--size-icon-sm)",
673
+ width: "var(--size-icon-sm)",
674
+ color: "var(--color-action-primary-bg)"
675
+ } }),
676
+ /* @__PURE__ */ x("span", {
677
+ style: {
678
+ fontSize: "var(--font-size-body-sm)",
679
+ fontWeight: "var(--font-weight-semibold)",
680
+ color: "var(--color-text-primary)"
681
+ },
682
+ children: $(e)
683
+ }),
684
+ /* @__PURE__ */ x("span", {
685
+ style: {
686
+ fontSize: "var(--font-size-body-sm)",
687
+ color: "var(--color-text-muted)"
688
+ },
689
+ children: k("bigconsole.dashboards.card.pages", "pages")
690
+ })
691
+ ]
692
+ }),
693
+ /* @__PURE__ */ S("div", {
694
+ style: {
695
+ display: "flex",
696
+ alignItems: "center",
697
+ gap: "var(--space-iconGap)"
698
+ },
699
+ children: [
700
+ /* @__PURE__ */ x(p, { style: {
701
+ height: "var(--size-icon-sm)",
702
+ width: "var(--size-icon-sm)",
703
+ color: "var(--color-action-primary-bg)"
704
+ } }),
705
+ /* @__PURE__ */ x("span", {
706
+ style: {
707
+ fontSize: "var(--font-size-body-sm)",
708
+ fontWeight: "var(--font-weight-semibold)",
709
+ color: "var(--color-text-primary)"
710
+ },
711
+ children: Q(e)
712
+ }),
713
+ /* @__PURE__ */ x("span", {
714
+ style: {
715
+ fontSize: "var(--font-size-body-sm)",
716
+ color: "var(--color-text-muted)"
717
+ },
718
+ children: k("bigconsole.dashboards.card.widgets", "widgets")
719
+ })
720
+ ]
721
+ }),
722
+ /* @__PURE__ */ S("div", {
723
+ style: {
724
+ display: "flex",
725
+ alignItems: "center",
726
+ gap: "var(--space-iconGap)"
727
+ },
728
+ children: [/* @__PURE__ */ x(d, { style: {
729
+ height: "var(--size-icon-sm)",
730
+ width: "var(--size-icon-sm)",
731
+ color: "var(--color-text-muted)"
732
+ } }), /* @__PURE__ */ x("span", {
733
+ style: {
734
+ fontSize: "var(--font-size-body-sm)",
735
+ fontWeight: "var(--font-weight-medium)",
736
+ color: "var(--color-text-muted)"
737
+ },
738
+ children: Z(e.updatedAt)
739
+ })]
740
+ })
741
+ ]
742
+ }),
743
+ /* @__PURE__ */ S("div", {
744
+ style: {
745
+ display: "flex",
746
+ alignItems: "center",
747
+ gap: "var(--space-controlGap)"
748
+ },
749
+ children: [
750
+ /* @__PURE__ */ x(w, {
751
+ variant: "ghost",
752
+ size: "sm",
753
+ onClick: (t) => q(e.id, t),
754
+ style: {
755
+ height: "var(--size-controlHeight-sm)",
756
+ width: "var(--size-controlHeight-sm)",
757
+ padding: 0,
758
+ borderRadius: "var(--radius-button)"
759
+ },
760
+ title: k("bigconsole.dashboards.actions.editTitle", "Edit Dashboard"),
761
+ children: /* @__PURE__ */ x(g, { style: {
762
+ height: "var(--size-icon-sm)",
763
+ width: "var(--size-icon-sm)"
764
+ } })
765
+ }),
766
+ /* @__PURE__ */ x(w, {
767
+ variant: "ghost",
768
+ size: "sm",
769
+ onClick: (t) => Y(e.id, e.name, t),
770
+ style: {
771
+ height: "var(--size-controlHeight-sm)",
772
+ width: "var(--size-controlHeight-sm)",
773
+ padding: 0,
774
+ borderRadius: "var(--radius-button)"
775
+ },
776
+ title: k("bigconsole.dashboards.actions.cloneTitle", "Clone Dashboard"),
777
+ children: /* @__PURE__ */ x(f, { style: {
778
+ height: "var(--size-icon-sm)",
779
+ width: "var(--size-icon-sm)"
780
+ } })
781
+ }),
782
+ /* @__PURE__ */ x(w, {
783
+ variant: "ghost",
784
+ size: "sm",
785
+ onClick: (t) => J(e.id, t),
786
+ style: {
787
+ height: "var(--size-controlHeight-sm)",
788
+ width: "var(--size-controlHeight-sm)",
789
+ padding: 0,
790
+ borderRadius: "var(--radius-button)"
791
+ },
792
+ className: "hover:text-destructive hover:bg-destructive/10",
793
+ title: k("bigconsole.dashboards.actions.deleteTitle", "Delete Dashboard"),
794
+ children: /* @__PURE__ */ x(y, { style: {
795
+ height: "var(--size-icon-sm)",
796
+ width: "var(--size-icon-sm)"
797
+ } })
798
+ })
799
+ ]
800
+ })
801
+ ]
802
+ })
803
+ })
804
+ }, e.id))
805
+ }),
806
+ !L && W.length === 0 && /* @__PURE__ */ x(T, {
507
807
  className: "border-dashed",
508
- children: /* @__PURE__ */ C(D, {
808
+ children: /* @__PURE__ */ S(E, {
509
809
  style: {
510
810
  display: "flex",
511
811
  flexDirection: "column",
@@ -514,7 +814,7 @@ var A = c(function() {
514
814
  padding: "64px var(--space-pagePadding)"
515
815
  },
516
816
  children: [
517
- /* @__PURE__ */ S("div", {
817
+ /* @__PURE__ */ x("div", {
518
818
  style: {
519
819
  display: "flex",
520
820
  height: "80px",
@@ -525,21 +825,21 @@ var A = c(function() {
525
825
  backgroundColor: "var(--color-bg-sunken)",
526
826
  marginBottom: "var(--space-sectionGap)"
527
827
  },
528
- children: /* @__PURE__ */ S(m, { style: {
828
+ children: /* @__PURE__ */ x(ee, { style: {
529
829
  height: "var(--size-icon-xl)",
530
830
  width: "var(--size-icon-xl)",
531
831
  color: "var(--color-text-muted)"
532
832
  } })
533
833
  }),
534
- /* @__PURE__ */ S("h3", {
834
+ /* @__PURE__ */ x("h3", {
535
835
  style: {
536
836
  fontSize: "var(--font-size-heading-h4)",
537
837
  fontWeight: "var(--font-weight-semibold)",
538
838
  marginBottom: "var(--space-controlGap)"
539
839
  },
540
- children: M ? j("bigconsole.dashboards.empty.filteredTitle", "No dashboards found") : j("bigconsole.dashboards.empty.title", "No dashboards yet")
840
+ children: A ? k("bigconsole.dashboards.empty.filteredTitle", "No dashboards found") : k("bigconsole.dashboards.empty.title", "No dashboards yet")
541
841
  }),
542
- /* @__PURE__ */ S("p", {
842
+ /* @__PURE__ */ x("p", {
543
843
  style: {
544
844
  fontSize: "var(--font-size-body-sm)",
545
845
  color: "var(--color-text-muted)",
@@ -547,30 +847,30 @@ var A = c(function() {
547
847
  textAlign: "center",
548
848
  maxWidth: "360px"
549
849
  },
550
- children: M ? j("bigconsole.dashboards.empty.filteredDescription", "Try adjusting your search terms") : j("bigconsole.dashboards.empty.description", "Get started by creating your first dashboard to visualize your data")
850
+ children: A ? k("bigconsole.dashboards.empty.filteredDescription", "Try adjusting your search terms") : k("bigconsole.dashboards.empty.description", "Get started by creating your first dashboard to visualize your data")
551
851
  }),
552
- !M && /* @__PURE__ */ C("div", {
852
+ !A && /* @__PURE__ */ S("div", {
553
853
  style: {
554
854
  display: "flex",
555
855
  gap: "var(--space-controlGap)",
556
856
  flexWrap: "wrap",
557
857
  justifyContent: "center"
558
858
  },
559
- children: [/* @__PURE__ */ C(T, {
859
+ children: [/* @__PURE__ */ S(w, {
560
860
  variant: "outline",
561
- onClick: $,
562
- children: [/* @__PURE__ */ S(x, { style: {
861
+ onClick: X,
862
+ children: [/* @__PURE__ */ x(b, { style: {
563
863
  marginRight: "var(--space-iconGap)",
564
864
  height: "var(--size-icon-sm)",
565
865
  width: "var(--size-icon-sm)"
566
- } }), j("bigconsole.dashboards.actions.importDashboard", "Import Dashboard")]
567
- }), /* @__PURE__ */ C(T, {
568
- onClick: J,
569
- children: [/* @__PURE__ */ S(v, { style: {
866
+ } }), k("bigconsole.dashboards.actions.importDashboard", "Import Dashboard")]
867
+ }), /* @__PURE__ */ S(w, {
868
+ onClick: G,
869
+ children: [/* @__PURE__ */ x(_, { style: {
570
870
  marginRight: "var(--space-iconGap)",
571
871
  height: "var(--size-icon-sm)",
572
872
  width: "var(--size-icon-sm)"
573
- } }), j("bigconsole.dashboards.actions.create", "Create Dashboard")]
873
+ } }), k("bigconsole.dashboards.actions.create", "Create Dashboard")]
574
874
  })]
575
875
  })
576
876
  ]
@@ -578,21 +878,21 @@ var A = c(function() {
578
878
  })
579
879
  ]
580
880
  }),
581
- /* @__PURE__ */ S(n, {
582
- isOpen: P,
583
- isCreating: I,
584
- onClose: Y,
585
- onCreate: X
881
+ /* @__PURE__ */ x(n, {
882
+ isOpen: se,
883
+ isCreating: M,
884
+ onClose: ue,
885
+ onCreate: de
586
886
  }),
587
- /* @__PURE__ */ S(r, {
588
- isOpen: R,
589
- onClose: re,
590
- onSuccess: ie
887
+ /* @__PURE__ */ x(r, {
888
+ isOpen: ce,
889
+ onClose: fe,
890
+ onSuccess: pe
591
891
  })
592
892
  ]
593
893
  });
594
894
  });
595
895
  //#endregion
596
- export { A as DashboardsPage, A as default };
896
+ export { O as DashboardsPage, O as default };
597
897
 
598
898
  //# sourceMappingURL=DashboardsPage.js.map