@burdenoff/microfe-bigconsole 2026.716.2 → 2026.716.4

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 (32) hide show
  1. package/dist/bigconsole/BigConsoleRoot.js +100 -90
  2. package/dist/bigconsole/BigConsoleRoot.js.map +1 -1
  3. package/dist/bigconsole/assistant/assistantRunStore.js +3 -1
  4. package/dist/bigconsole/assistant/assistantRunStore.js.map +1 -1
  5. package/dist/bigconsole/assistant/index.js +2 -1
  6. package/dist/bigconsole/components/dashboard/ImportDashboardDialog.js +70 -60
  7. package/dist/bigconsole/components/dashboard/ImportDashboardDialog.js.map +1 -1
  8. package/dist/bigconsole/components/dashboard/SavedViewsDropdown/SavedViewsDropdown.js +187 -175
  9. package/dist/bigconsole/components/dashboard/SavedViewsDropdown/SavedViewsDropdown.js.map +1 -1
  10. package/dist/bigconsole/components/preview/AiPreviewMiniPanel.js +133 -0
  11. package/dist/bigconsole/components/preview/AiPreviewMiniPanel.js.map +1 -0
  12. package/dist/bigconsole/components/preview/AiPreviewPanel.js +88 -136
  13. package/dist/bigconsole/components/preview/AiPreviewPanel.js.map +1 -1
  14. package/dist/bigconsole/components/preview/previewShared.js +61 -0
  15. package/dist/bigconsole/components/preview/previewShared.js.map +1 -0
  16. package/dist/bigconsole/hooks/useDashboardOperations.js +72 -67
  17. package/dist/bigconsole/hooks/useDashboardOperations.js.map +1 -1
  18. package/dist/bigconsole/hooks/useDashboardTemplates.js +108 -105
  19. package/dist/bigconsole/hooks/useDashboardTemplates.js.map +1 -1
  20. package/dist/bigconsole/hooks/useDashboardViews.js +77 -74
  21. package/dist/bigconsole/hooks/useDashboardViews.js.map +1 -1
  22. package/dist/bigconsole/hooks/useImportDashboard.js +68 -64
  23. package/dist/bigconsole/hooks/useImportDashboard.js.map +1 -1
  24. package/dist/bigconsole/pages/DashboardsPage.js +240 -234
  25. package/dist/bigconsole/pages/DashboardsPage.js.map +1 -1
  26. package/dist/bigconsole/pages/InsightsPage.js +161 -143
  27. package/dist/bigconsole/pages/InsightsPage.js.map +1 -1
  28. package/dist/bigconsole/providers/BigConsoleQuotaProvider.js +70 -0
  29. package/dist/bigconsole/providers/BigConsoleQuotaProvider.js.map +1 -0
  30. package/dist/bigconsole/utils/quota.js +86 -0
  31. package/dist/bigconsole/utils/quota.js.map +1 -0
  32. package/package.json +2 -2
@@ -1,13 +1,14 @@
1
- import e from "../../../hooks/useDashboardViews.js";
1
+ import { reportBigConsoleQuotaError as e } from "../../../utils/quota.js";
2
+ import t from "../../../hooks/useDashboardViews.js";
2
3
  import "../../../hooks/index.js";
3
- import { SEMANTIC_COLORS as t } from "../../../utils/semanticTokens.js";
4
- import { useCallback as n, useEffect as r, useRef as i, useState as a } from "react";
5
- import { Fragment as o, jsx as s, jsxs as c } from "react/jsx-runtime";
6
- import { createPortal as l } from "react-dom";
4
+ import { SEMANTIC_COLORS as n } from "../../../utils/semanticTokens.js";
5
+ import { useCallback as r, useEffect as i, useRef as a, useState as o } from "react";
6
+ import { Fragment as s, jsx as c, jsxs as l } from "react/jsx-runtime";
7
+ import { createPortal as u } from "react-dom";
7
8
  //#region src/bigconsole/components/dashboard/SavedViewsDropdown/SavedViewsDropdown.tsx
8
- function u() {
9
- let [e, t] = a(!1);
10
- return r(() => {
9
+ function d() {
10
+ let [e, t] = o(!1);
11
+ return i(() => {
11
12
  let e = () => {
12
13
  t(document.documentElement.classList.contains("dark"));
13
14
  };
@@ -19,104 +20,115 @@ function u() {
19
20
  }), () => n.disconnect();
20
21
  }, []), e ? "#1f2937" : "#ffffff";
21
22
  }
22
- function d({ dashboardId: d, currentFilters: f, currentLayout: p, onViewLoad: m, className: h = "" }) {
23
- let { views: g, currentView: _, loading: v, fetchViews: y, saveCurrentView: b, loadView: x, updateView: S, deleteView: C, setAsDefault: w, clearCurrentView: T } = e(), [E, D] = a(!1), [O, k] = a(!1), [A, j] = a(""), [M, N] = a(""), [P, F] = a(!1), [I, L] = a({
23
+ function f({ dashboardId: f, currentFilters: p, currentLayout: m, onViewLoad: h, className: g = "" }) {
24
+ let { views: _, currentView: v, loading: y, fetchViews: b, saveCurrentView: x, loadView: S, updateView: C, deleteView: w, setAsDefault: T, clearCurrentView: E } = t(), [D, O] = o(!1), [k, A] = o(!1), [j, M] = o(""), [N, P] = o(""), [F, I] = o(!1), [L, R] = o({
24
25
  top: 0,
25
26
  left: 0
26
- }), R = i(null), z = i(null), B = u();
27
- r(() => {
28
- d && y(d);
29
- }, [d, y]), r(() => {
30
- if (E && R.current) {
31
- let e = R.current.getBoundingClientRect(), t = e.left;
32
- t + 280 > window.innerWidth - 16 && (t = e.right - 280), t = Math.max(16, t), L({
27
+ }), z = a(null), B = a(null), V = d();
28
+ i(() => {
29
+ f && b(f);
30
+ }, [f, b]), i(() => {
31
+ if (D && z.current) {
32
+ let e = z.current.getBoundingClientRect(), t = e.left;
33
+ t + 280 > window.innerWidth - 16 && (t = e.right - 280), t = Math.max(16, t), R({
33
34
  top: e.bottom + 4,
34
35
  left: t
35
36
  });
36
37
  }
37
- }, [E]), r(() => {
38
+ }, [D]), i(() => {
38
39
  function e(e) {
39
40
  let t = e.target;
40
- R.current && !R.current.contains(t) && z.current && !z.current.contains(t) && D(!1);
41
+ z.current && !z.current.contains(t) && B.current && !B.current.contains(t) && O(!1);
41
42
  }
42
- if (E) return document.addEventListener("mousedown", e), () => document.removeEventListener("mousedown", e);
43
- }, [E]);
44
- let V = n((e) => {
45
- let t = g.find((t) => t.id === e);
46
- t && (x(e), m && m(t)), D(!1);
43
+ if (D) return document.addEventListener("mousedown", e), () => document.removeEventListener("mousedown", e);
44
+ }, [D]);
45
+ let H = r((e) => {
46
+ let t = _.find((t) => t.id === e);
47
+ t && (S(e), h && h(t)), O(!1);
47
48
  }, [
48
- g,
49
- x,
50
- m
51
- ]), H = n(async () => {
52
- A.trim() && (await b({
53
- dashboardId: d,
54
- name: A.trim(),
55
- description: M.trim() || void 0,
56
- filters: f,
57
- layout: p,
58
- isDefault: P
59
- }), j(""), N(""), F(!1), k(!1));
49
+ _,
50
+ S,
51
+ h
52
+ ]), U = r(async () => {
53
+ if (j.trim()) {
54
+ try {
55
+ await x({
56
+ dashboardId: f,
57
+ name: j.trim(),
58
+ description: N.trim() || void 0,
59
+ filters: p,
60
+ layout: m,
61
+ isDefault: F
62
+ });
63
+ } catch (t) {
64
+ if (e(t, "session")) {
65
+ A(!1), O(!1);
66
+ return;
67
+ }
68
+ throw t;
69
+ }
70
+ M(""), P(""), I(!1), A(!1);
71
+ }
60
72
  }, [
61
- d,
62
- A,
63
- M,
64
73
  f,
74
+ j,
75
+ N,
65
76
  p,
66
- P,
67
- b
68
- ]), U = n(async () => {
69
- _ && await S({
70
- id: _.id,
71
- filters: f,
72
- layout: p
77
+ m,
78
+ F,
79
+ x
80
+ ]), W = r(async () => {
81
+ v && await C({
82
+ id: v.id,
83
+ filters: p,
84
+ layout: m
73
85
  });
74
86
  }, [
75
- _,
76
- f,
87
+ v,
77
88
  p,
78
- S
79
- ]), W = n(async (e, t) => {
80
- t.stopPropagation(), window.confirm("Are you sure you want to delete this view?") && await C(e);
81
- }, [C]), G = n(async (e, t) => {
82
- t.stopPropagation(), await w(e);
83
- }, [w]), K = n(() => {
84
- T(), D(!1);
85
- }, [T]), q = E ? l(/* @__PURE__ */ c("div", {
86
- ref: z,
89
+ m,
90
+ C
91
+ ]), G = r(async (e, t) => {
92
+ t.stopPropagation(), window.confirm("Are you sure you want to delete this view?") && await w(e);
93
+ }, [w]), K = r(async (e, t) => {
94
+ t.stopPropagation(), await T(e);
95
+ }, [T]), q = r(() => {
96
+ E(), O(!1);
97
+ }, [E]), J = D ? u(/* @__PURE__ */ l("div", {
98
+ ref: B,
87
99
  style: {
88
100
  position: "fixed",
89
- top: I.top,
90
- left: Math.max(16, I.left),
101
+ top: L.top,
102
+ left: Math.max(16, L.left),
91
103
  minWidth: "280px",
92
- backgroundColor: B,
93
- border: `1px solid ${t.borderDefault}`,
104
+ backgroundColor: V,
105
+ border: `1px solid ${n.borderDefault}`,
94
106
  borderRadius: "8px",
95
107
  boxShadow: "0 8px 24px rgba(0,0,0,0.15), 0 4px 8px rgba(0,0,0,0.1)",
96
108
  zIndex: 99998,
97
109
  overflow: "hidden"
98
110
  },
99
111
  children: [
100
- /* @__PURE__ */ c("div", {
112
+ /* @__PURE__ */ l("div", {
101
113
  style: {
102
114
  padding: "12px 16px",
103
- borderBottom: `1px solid ${t.borderDefault}`,
115
+ borderBottom: `1px solid ${n.borderDefault}`,
104
116
  display: "flex",
105
117
  alignItems: "center",
106
118
  justifyContent: "space-between"
107
119
  },
108
- children: [/* @__PURE__ */ s("span", {
120
+ children: [/* @__PURE__ */ c("span", {
109
121
  style: {
110
122
  fontSize: "13px",
111
123
  fontWeight: 600,
112
- color: t.textPrimary
124
+ color: n.textPrimary
113
125
  },
114
126
  children: "Saved Views"
115
- }), /* @__PURE__ */ s("button", {
116
- onClick: () => k(!0),
127
+ }), /* @__PURE__ */ c("button", {
128
+ onClick: () => A(!0),
117
129
  style: {
118
130
  padding: "4px 10px",
119
- backgroundColor: t.actionPrimaryBg,
131
+ backgroundColor: n.actionPrimaryBg,
120
132
  color: "white",
121
133
  border: "none",
122
134
  borderRadius: "4px",
@@ -126,85 +138,85 @@ function d({ dashboardId: d, currentFilters: f, currentLayout: p, onViewLoad: m,
126
138
  children: "+ Save Current"
127
139
  })]
128
140
  }),
129
- /* @__PURE__ */ s("div", {
141
+ /* @__PURE__ */ c("div", {
130
142
  style: {
131
143
  maxHeight: "300px",
132
144
  overflowY: "auto"
133
145
  },
134
- children: v && g.length === 0 ? /* @__PURE__ */ s("div", {
146
+ children: y && _.length === 0 ? /* @__PURE__ */ c("div", {
135
147
  style: {
136
148
  padding: "16px",
137
- color: t.textSecondary,
149
+ color: n.textSecondary,
138
150
  fontSize: "13px"
139
151
  },
140
152
  children: "Loading views..."
141
- }) : g.length === 0 ? /* @__PURE__ */ s("div", {
153
+ }) : _.length === 0 ? /* @__PURE__ */ c("div", {
142
154
  style: {
143
155
  padding: "16px",
144
- color: t.textSecondary,
156
+ color: n.textSecondary,
145
157
  fontSize: "13px"
146
158
  },
147
159
  children: "No saved views yet. Save your current view to get started."
148
- }) : /* @__PURE__ */ c(o, { children: [/* @__PURE__ */ s("button", {
149
- onClick: K,
160
+ }) : /* @__PURE__ */ l(s, { children: [/* @__PURE__ */ c("button", {
161
+ onClick: q,
150
162
  style: {
151
163
  display: "flex",
152
164
  alignItems: "center",
153
165
  width: "100%",
154
166
  padding: "10px 16px",
155
- backgroundColor: _ ? t.bgPrimary : t.bgSecondary,
167
+ backgroundColor: v ? n.bgPrimary : n.bgSecondary,
156
168
  border: "none",
157
169
  cursor: "pointer",
158
170
  textAlign: "left",
159
- borderBottom: `1px solid ${t.borderDefault}`
171
+ borderBottom: `1px solid ${n.borderDefault}`
160
172
  },
161
- children: /* @__PURE__ */ c("div", { children: [/* @__PURE__ */ s("div", {
173
+ children: /* @__PURE__ */ l("div", { children: [/* @__PURE__ */ c("div", {
162
174
  style: {
163
175
  fontSize: "13px",
164
176
  fontWeight: 500,
165
- color: t.textPrimary
177
+ color: n.textPrimary
166
178
  },
167
179
  children: "Default View"
168
- }), /* @__PURE__ */ s("div", {
180
+ }), /* @__PURE__ */ c("div", {
169
181
  style: {
170
182
  fontSize: "11px",
171
- color: t.textSecondary
183
+ color: n.textSecondary
172
184
  },
173
185
  children: "Reset to original dashboard state"
174
186
  })] })
175
- }), g.map((e) => /* @__PURE__ */ c("div", {
176
- onClick: () => V(e.id),
187
+ }), _.map((e) => /* @__PURE__ */ l("div", {
188
+ onClick: () => H(e.id),
177
189
  style: {
178
190
  display: "flex",
179
191
  alignItems: "center",
180
192
  justifyContent: "space-between",
181
193
  padding: "10px 16px",
182
- backgroundColor: _?.id === e.id ? t.bgSecondary : t.bgPrimary,
194
+ backgroundColor: v?.id === e.id ? n.bgSecondary : n.bgPrimary,
183
195
  cursor: "pointer",
184
- borderBottom: `1px solid ${t.borderDefault}`
196
+ borderBottom: `1px solid ${n.borderDefault}`
185
197
  },
186
- children: [/* @__PURE__ */ c("div", {
198
+ children: [/* @__PURE__ */ l("div", {
187
199
  style: { flex: 1 },
188
200
  children: [
189
- /* @__PURE__ */ c("div", {
201
+ /* @__PURE__ */ l("div", {
190
202
  style: {
191
203
  display: "flex",
192
204
  alignItems: "center",
193
205
  gap: "6px"
194
206
  },
195
- children: [/* @__PURE__ */ s("span", {
207
+ children: [/* @__PURE__ */ c("span", {
196
208
  style: {
197
209
  fontSize: "13px",
198
210
  fontWeight: 500,
199
- color: t.textPrimary
211
+ color: n.textPrimary
200
212
  },
201
213
  children: e.name
202
- }), e.isDefault && /* @__PURE__ */ s("span", {
214
+ }), e.isDefault && /* @__PURE__ */ c("span", {
203
215
  style: {
204
216
  fontSize: "9px",
205
217
  padding: "2px 4px",
206
- backgroundColor: t.actionPrimaryBgSubtle,
207
- color: t.actionPrimaryBg,
218
+ backgroundColor: n.actionPrimaryBgSubtle,
219
+ color: n.actionPrimaryBg,
208
220
  borderRadius: "4px",
209
221
  textTransform: "uppercase",
210
222
  fontWeight: 600
@@ -212,50 +224,50 @@ function d({ dashboardId: d, currentFilters: f, currentLayout: p, onViewLoad: m,
212
224
  children: "Default"
213
225
  })]
214
226
  }),
215
- e.description && /* @__PURE__ */ s("div", {
227
+ e.description && /* @__PURE__ */ c("div", {
216
228
  style: {
217
229
  fontSize: "11px",
218
- color: t.textSecondary,
230
+ color: n.textSecondary,
219
231
  marginTop: "2px"
220
232
  },
221
233
  children: e.description
222
234
  }),
223
- /* @__PURE__ */ s("div", {
235
+ /* @__PURE__ */ c("div", {
224
236
  style: {
225
237
  fontSize: "10px",
226
- color: t.textSecondary,
238
+ color: n.textSecondary,
227
239
  marginTop: "2px"
228
240
  },
229
241
  children: new Date(e.updatedAt).toLocaleDateString()
230
242
  })
231
243
  ]
232
- }), /* @__PURE__ */ c("div", {
244
+ }), /* @__PURE__ */ l("div", {
233
245
  style: {
234
246
  display: "flex",
235
247
  alignItems: "center",
236
248
  gap: "4px"
237
249
  },
238
- children: [!e.isDefault && /* @__PURE__ */ s("button", {
239
- onClick: (t) => G(e.id, t),
250
+ children: [!e.isDefault && /* @__PURE__ */ c("button", {
251
+ onClick: (t) => K(e.id, t),
240
252
  title: "Set as default",
241
253
  style: {
242
254
  padding: "4px 6px",
243
255
  backgroundColor: "transparent",
244
256
  border: "none",
245
257
  cursor: "pointer",
246
- color: t.textSecondary,
258
+ color: n.textSecondary,
247
259
  fontSize: "11px"
248
260
  },
249
261
  children: "Set Default"
250
- }), /* @__PURE__ */ s("button", {
251
- onClick: (t) => W(e.id, t),
262
+ }), /* @__PURE__ */ c("button", {
263
+ onClick: (t) => G(e.id, t),
252
264
  title: "Delete view",
253
265
  style: {
254
266
  padding: "4px 6px",
255
267
  backgroundColor: "transparent",
256
268
  border: "none",
257
269
  cursor: "pointer",
258
- color: t.statusErrorText,
270
+ color: n.statusErrorText,
259
271
  fontSize: "11px"
260
272
  },
261
273
  children: "Delete"
@@ -263,33 +275,33 @@ function d({ dashboardId: d, currentFilters: f, currentLayout: p, onViewLoad: m,
263
275
  })]
264
276
  }, e.id))] })
265
277
  }),
266
- _ && /* @__PURE__ */ s("div", {
278
+ v && /* @__PURE__ */ c("div", {
267
279
  style: {
268
280
  padding: "12px 16px",
269
- borderTop: `1px solid ${t.borderDefault}`,
270
- backgroundColor: t.bgSecondary
281
+ borderTop: `1px solid ${n.borderDefault}`,
282
+ backgroundColor: n.bgSecondary
271
283
  },
272
- children: /* @__PURE__ */ c("button", {
273
- onClick: U,
284
+ children: /* @__PURE__ */ l("button", {
285
+ onClick: W,
274
286
  style: {
275
287
  width: "100%",
276
288
  padding: "8px",
277
- backgroundColor: t.bgPrimary,
278
- border: `1px solid ${t.borderDefault}`,
289
+ backgroundColor: n.bgPrimary,
290
+ border: `1px solid ${n.borderDefault}`,
279
291
  borderRadius: "4px",
280
292
  cursor: "pointer",
281
293
  fontSize: "12px",
282
- color: t.textPrimary
294
+ color: n.textPrimary
283
295
  },
284
296
  children: [
285
297
  "Update \"",
286
- _.name,
298
+ v.name,
287
299
  "\" with current state"
288
300
  ]
289
301
  })
290
302
  })
291
303
  ]
292
- }), document.body) : null, J = O ? l(/* @__PURE__ */ s("div", {
304
+ }), document.body) : null, Y = k ? u(/* @__PURE__ */ c("div", {
293
305
  style: {
294
306
  position: "fixed",
295
307
  top: 0,
@@ -303,147 +315,147 @@ function d({ dashboardId: d, currentFilters: f, currentLayout: p, onViewLoad: m,
303
315
  zIndex: 99999,
304
316
  isolation: "isolate"
305
317
  },
306
- onClick: () => k(!1),
307
- children: /* @__PURE__ */ c("div", {
318
+ onClick: () => A(!1),
319
+ children: /* @__PURE__ */ l("div", {
308
320
  style: {
309
321
  width: "400px",
310
- backgroundColor: B,
322
+ backgroundColor: V,
311
323
  borderRadius: "8px",
312
324
  boxShadow: "0 4px 24px rgba(0, 0, 0, 0.3)",
313
325
  overflow: "hidden",
314
326
  position: "relative",
315
327
  zIndex: 1e5,
316
- color: t.textPrimary
328
+ color: n.textPrimary
317
329
  },
318
330
  onClick: (e) => e.stopPropagation(),
319
331
  children: [
320
- /* @__PURE__ */ s("div", {
332
+ /* @__PURE__ */ c("div", {
321
333
  style: {
322
334
  padding: "16px 20px",
323
- borderBottom: `1px solid ${t.borderDefault}`
335
+ borderBottom: `1px solid ${n.borderDefault}`
324
336
  },
325
- children: /* @__PURE__ */ s("h3", {
337
+ children: /* @__PURE__ */ c("h3", {
326
338
  style: {
327
339
  margin: 0,
328
340
  fontSize: "16px",
329
341
  fontWeight: 600,
330
- color: t.textPrimary
342
+ color: n.textPrimary
331
343
  },
332
344
  children: "Save Current View"
333
345
  })
334
346
  }),
335
- /* @__PURE__ */ c("div", {
347
+ /* @__PURE__ */ l("div", {
336
348
  style: { padding: "20px" },
337
349
  children: [
338
- /* @__PURE__ */ c("div", {
350
+ /* @__PURE__ */ l("div", {
339
351
  style: { marginBottom: "16px" },
340
- children: [/* @__PURE__ */ s("label", {
352
+ children: [/* @__PURE__ */ c("label", {
341
353
  style: {
342
354
  display: "block",
343
355
  marginBottom: "6px",
344
356
  fontSize: "13px",
345
357
  fontWeight: 500,
346
- color: t.textPrimary
358
+ color: n.textPrimary
347
359
  },
348
360
  children: "View Name *"
349
- }), /* @__PURE__ */ s("input", {
361
+ }), /* @__PURE__ */ c("input", {
350
362
  type: "text",
351
- value: A,
352
- onChange: (e) => j(e.target.value),
363
+ value: j,
364
+ onChange: (e) => M(e.target.value),
353
365
  placeholder: "e.g., Q4 Analysis, Sales Overview",
354
366
  style: {
355
367
  width: "100%",
356
368
  padding: "10px 12px",
357
- border: `1px solid ${t.borderDefault}`,
369
+ border: `1px solid ${n.borderDefault}`,
358
370
  borderRadius: "6px",
359
371
  fontSize: "14px",
360
- backgroundColor: t.bgPrimary,
361
- color: t.textPrimary,
372
+ backgroundColor: n.bgPrimary,
373
+ color: n.textPrimary,
362
374
  boxSizing: "border-box"
363
375
  }
364
376
  })]
365
377
  }),
366
- /* @__PURE__ */ c("div", {
378
+ /* @__PURE__ */ l("div", {
367
379
  style: { marginBottom: "16px" },
368
- children: [/* @__PURE__ */ s("label", {
380
+ children: [/* @__PURE__ */ c("label", {
369
381
  style: {
370
382
  display: "block",
371
383
  marginBottom: "6px",
372
384
  fontSize: "13px",
373
385
  fontWeight: 500,
374
- color: t.textPrimary
386
+ color: n.textPrimary
375
387
  },
376
388
  children: "Description"
377
- }), /* @__PURE__ */ s("textarea", {
378
- value: M,
379
- onChange: (e) => N(e.target.value),
389
+ }), /* @__PURE__ */ c("textarea", {
390
+ value: N,
391
+ onChange: (e) => P(e.target.value),
380
392
  placeholder: "Optional description...",
381
393
  rows: 2,
382
394
  style: {
383
395
  width: "100%",
384
396
  padding: "10px 12px",
385
- border: `1px solid ${t.borderDefault}`,
397
+ border: `1px solid ${n.borderDefault}`,
386
398
  borderRadius: "6px",
387
399
  fontSize: "14px",
388
400
  resize: "vertical",
389
- backgroundColor: t.bgPrimary,
390
- color: t.textPrimary,
401
+ backgroundColor: n.bgPrimary,
402
+ color: n.textPrimary,
391
403
  boxSizing: "border-box"
392
404
  }
393
405
  })]
394
406
  }),
395
- /* @__PURE__ */ c("label", {
407
+ /* @__PURE__ */ l("label", {
396
408
  style: {
397
409
  display: "flex",
398
410
  alignItems: "center",
399
411
  gap: "8px",
400
412
  cursor: "pointer"
401
413
  },
402
- children: [/* @__PURE__ */ s("input", {
414
+ children: [/* @__PURE__ */ c("input", {
403
415
  type: "checkbox",
404
- checked: P,
405
- onChange: (e) => F(e.target.checked)
406
- }), /* @__PURE__ */ s("span", {
416
+ checked: F,
417
+ onChange: (e) => I(e.target.checked)
418
+ }), /* @__PURE__ */ c("span", {
407
419
  style: {
408
420
  fontSize: "13px",
409
- color: t.textPrimary
421
+ color: n.textPrimary
410
422
  },
411
423
  children: "Set as default view"
412
424
  })]
413
425
  })
414
426
  ]
415
427
  }),
416
- /* @__PURE__ */ c("div", {
428
+ /* @__PURE__ */ l("div", {
417
429
  style: {
418
430
  padding: "16px 20px",
419
- borderTop: `1px solid ${t.borderDefault}`,
431
+ borderTop: `1px solid ${n.borderDefault}`,
420
432
  display: "flex",
421
433
  justifyContent: "flex-end",
422
434
  gap: "12px",
423
- backgroundColor: t.bgSecondary
435
+ backgroundColor: n.bgSecondary
424
436
  },
425
- children: [/* @__PURE__ */ s("button", {
426
- onClick: () => k(!1),
437
+ children: [/* @__PURE__ */ c("button", {
438
+ onClick: () => A(!1),
427
439
  style: {
428
440
  padding: "10px 20px",
429
- backgroundColor: t.bgPrimary,
430
- border: `1px solid ${t.borderDefault}`,
441
+ backgroundColor: n.bgPrimary,
442
+ border: `1px solid ${n.borderDefault}`,
431
443
  borderRadius: "6px",
432
444
  cursor: "pointer",
433
445
  fontSize: "14px",
434
- color: t.textPrimary
446
+ color: n.textPrimary
435
447
  },
436
448
  children: "Cancel"
437
- }), /* @__PURE__ */ s("button", {
438
- onClick: H,
439
- disabled: !A.trim(),
449
+ }), /* @__PURE__ */ c("button", {
450
+ onClick: U,
451
+ disabled: !j.trim(),
440
452
  style: {
441
453
  padding: "10px 20px",
442
- backgroundColor: A.trim() ? t.actionPrimaryBg : t.bgSecondary,
443
- color: A.trim() ? "white" : t.textSecondary,
454
+ backgroundColor: j.trim() ? n.actionPrimaryBg : n.bgSecondary,
455
+ color: j.trim() ? "white" : n.textSecondary,
444
456
  border: "none",
445
457
  borderRadius: "6px",
446
- cursor: A.trim() ? "pointer" : "not-allowed",
458
+ cursor: j.trim() ? "pointer" : "not-allowed",
447
459
  fontSize: "14px",
448
460
  fontWeight: 500
449
461
  },
@@ -453,42 +465,42 @@ function d({ dashboardId: d, currentFilters: f, currentLayout: p, onViewLoad: m,
453
465
  ]
454
466
  })
455
467
  }), document.body) : null;
456
- return /* @__PURE__ */ c("div", {
457
- className: h,
468
+ return /* @__PURE__ */ l("div", {
469
+ className: g,
458
470
  style: {
459
471
  position: "relative",
460
472
  display: "inline-block"
461
473
  },
462
474
  children: [
463
- /* @__PURE__ */ c("button", {
464
- ref: R,
465
- onClick: () => D(!E),
475
+ /* @__PURE__ */ l("button", {
476
+ ref: z,
477
+ onClick: () => O(!D),
466
478
  style: {
467
479
  display: "flex",
468
480
  alignItems: "center",
469
481
  gap: "6px",
470
482
  padding: "6px 12px",
471
- backgroundColor: _ ? t.actionPrimaryBgSubtle : t.bgSecondary,
472
- border: `1px solid ${_ ? t.actionPrimaryBg : t.borderDefault}`,
483
+ backgroundColor: v ? n.actionPrimaryBgSubtle : n.bgSecondary,
484
+ border: `1px solid ${v ? n.actionPrimaryBg : n.borderDefault}`,
473
485
  borderRadius: "6px",
474
486
  cursor: "pointer",
475
487
  fontSize: "13px",
476
- color: _ ? t.actionPrimaryBg : t.textPrimary
488
+ color: v ? n.actionPrimaryBg : n.textPrimary
477
489
  },
478
- children: [/* @__PURE__ */ s("span", {
490
+ children: [/* @__PURE__ */ c("span", {
479
491
  style: { fontWeight: 500 },
480
- children: _ ? _.name : "Views"
481
- }), /* @__PURE__ */ s("span", {
492
+ children: v ? v.name : "Views"
493
+ }), /* @__PURE__ */ c("span", {
482
494
  style: { fontSize: "10px" },
483
- children: E ? "▲" : "▼"
495
+ children: D ? "▲" : "▼"
484
496
  })]
485
497
  }),
486
- q,
487
- J
498
+ J,
499
+ Y
488
500
  ]
489
501
  });
490
502
  }
491
503
  //#endregion
492
- export { d as default };
504
+ export { f as default };
493
505
 
494
506
  //# sourceMappingURL=SavedViewsDropdown.js.map