@burdenoff/microfe-bigconsole 2026.716.2 → 2026.716.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/bigconsole/BigConsoleRoot.js +100 -90
- package/dist/bigconsole/BigConsoleRoot.js.map +1 -1
- package/dist/bigconsole/components/dashboard/ImportDashboardDialog.js +70 -60
- package/dist/bigconsole/components/dashboard/ImportDashboardDialog.js.map +1 -1
- package/dist/bigconsole/components/dashboard/SavedViewsDropdown/SavedViewsDropdown.js +187 -175
- package/dist/bigconsole/components/dashboard/SavedViewsDropdown/SavedViewsDropdown.js.map +1 -1
- package/dist/bigconsole/hooks/useDashboardOperations.js +72 -67
- package/dist/bigconsole/hooks/useDashboardOperations.js.map +1 -1
- package/dist/bigconsole/hooks/useDashboardTemplates.js +108 -105
- package/dist/bigconsole/hooks/useDashboardTemplates.js.map +1 -1
- package/dist/bigconsole/hooks/useDashboardViews.js +77 -74
- package/dist/bigconsole/hooks/useDashboardViews.js.map +1 -1
- package/dist/bigconsole/hooks/useImportDashboard.js +68 -64
- package/dist/bigconsole/hooks/useImportDashboard.js.map +1 -1
- package/dist/bigconsole/pages/DashboardsPage.js +240 -234
- package/dist/bigconsole/pages/DashboardsPage.js.map +1 -1
- package/dist/bigconsole/pages/InsightsPage.js +161 -143
- package/dist/bigconsole/pages/InsightsPage.js.map +1 -1
- package/dist/bigconsole/providers/BigConsoleQuotaProvider.js +70 -0
- package/dist/bigconsole/providers/BigConsoleQuotaProvider.js.map +1 -0
- package/dist/bigconsole/utils/quota.js +86 -0
- package/dist/bigconsole/utils/quota.js.map +1 -0
- package/package.json +2 -2
|
@@ -1,13 +1,14 @@
|
|
|
1
|
-
import e from "../../../
|
|
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
|
|
4
|
-
import { useCallback as
|
|
5
|
-
import { Fragment as
|
|
6
|
-
import { createPortal as
|
|
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
|
|
9
|
-
let [e, t] =
|
|
10
|
-
return
|
|
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
|
|
23
|
-
let { views:
|
|
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
|
-
}),
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
}, [
|
|
30
|
-
if (
|
|
31
|
-
let e =
|
|
32
|
-
t + 280 > window.innerWidth - 16 && (t = e.right - 280), t = Math.max(16, t),
|
|
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
|
-
}, [
|
|
38
|
+
}, [D]), i(() => {
|
|
38
39
|
function e(e) {
|
|
39
40
|
let t = e.target;
|
|
40
|
-
|
|
41
|
+
z.current && !z.current.contains(t) && B.current && !B.current.contains(t) && O(!1);
|
|
41
42
|
}
|
|
42
|
-
if (
|
|
43
|
-
}, [
|
|
44
|
-
let
|
|
45
|
-
let t =
|
|
46
|
-
t && (
|
|
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
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
]),
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
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
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
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
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
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:
|
|
90
|
-
left: Math.max(16,
|
|
101
|
+
top: L.top,
|
|
102
|
+
left: Math.max(16, L.left),
|
|
91
103
|
minWidth: "280px",
|
|
92
|
-
backgroundColor:
|
|
93
|
-
border: `1px solid ${
|
|
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__ */
|
|
112
|
+
/* @__PURE__ */ l("div", {
|
|
101
113
|
style: {
|
|
102
114
|
padding: "12px 16px",
|
|
103
|
-
borderBottom: `1px solid ${
|
|
115
|
+
borderBottom: `1px solid ${n.borderDefault}`,
|
|
104
116
|
display: "flex",
|
|
105
117
|
alignItems: "center",
|
|
106
118
|
justifyContent: "space-between"
|
|
107
119
|
},
|
|
108
|
-
children: [/* @__PURE__ */
|
|
120
|
+
children: [/* @__PURE__ */ c("span", {
|
|
109
121
|
style: {
|
|
110
122
|
fontSize: "13px",
|
|
111
123
|
fontWeight: 600,
|
|
112
|
-
color:
|
|
124
|
+
color: n.textPrimary
|
|
113
125
|
},
|
|
114
126
|
children: "Saved Views"
|
|
115
|
-
}), /* @__PURE__ */
|
|
116
|
-
onClick: () =>
|
|
127
|
+
}), /* @__PURE__ */ c("button", {
|
|
128
|
+
onClick: () => A(!0),
|
|
117
129
|
style: {
|
|
118
130
|
padding: "4px 10px",
|
|
119
|
-
backgroundColor:
|
|
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__ */
|
|
141
|
+
/* @__PURE__ */ c("div", {
|
|
130
142
|
style: {
|
|
131
143
|
maxHeight: "300px",
|
|
132
144
|
overflowY: "auto"
|
|
133
145
|
},
|
|
134
|
-
children:
|
|
146
|
+
children: y && _.length === 0 ? /* @__PURE__ */ c("div", {
|
|
135
147
|
style: {
|
|
136
148
|
padding: "16px",
|
|
137
|
-
color:
|
|
149
|
+
color: n.textSecondary,
|
|
138
150
|
fontSize: "13px"
|
|
139
151
|
},
|
|
140
152
|
children: "Loading views..."
|
|
141
|
-
}) :
|
|
153
|
+
}) : _.length === 0 ? /* @__PURE__ */ c("div", {
|
|
142
154
|
style: {
|
|
143
155
|
padding: "16px",
|
|
144
|
-
color:
|
|
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__ */
|
|
149
|
-
onClick:
|
|
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:
|
|
167
|
+
backgroundColor: v ? n.bgPrimary : n.bgSecondary,
|
|
156
168
|
border: "none",
|
|
157
169
|
cursor: "pointer",
|
|
158
170
|
textAlign: "left",
|
|
159
|
-
borderBottom: `1px solid ${
|
|
171
|
+
borderBottom: `1px solid ${n.borderDefault}`
|
|
160
172
|
},
|
|
161
|
-
children: /* @__PURE__ */
|
|
173
|
+
children: /* @__PURE__ */ l("div", { children: [/* @__PURE__ */ c("div", {
|
|
162
174
|
style: {
|
|
163
175
|
fontSize: "13px",
|
|
164
176
|
fontWeight: 500,
|
|
165
|
-
color:
|
|
177
|
+
color: n.textPrimary
|
|
166
178
|
},
|
|
167
179
|
children: "Default View"
|
|
168
|
-
}), /* @__PURE__ */
|
|
180
|
+
}), /* @__PURE__ */ c("div", {
|
|
169
181
|
style: {
|
|
170
182
|
fontSize: "11px",
|
|
171
|
-
color:
|
|
183
|
+
color: n.textSecondary
|
|
172
184
|
},
|
|
173
185
|
children: "Reset to original dashboard state"
|
|
174
186
|
})] })
|
|
175
|
-
}),
|
|
176
|
-
onClick: () =>
|
|
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:
|
|
194
|
+
backgroundColor: v?.id === e.id ? n.bgSecondary : n.bgPrimary,
|
|
183
195
|
cursor: "pointer",
|
|
184
|
-
borderBottom: `1px solid ${
|
|
196
|
+
borderBottom: `1px solid ${n.borderDefault}`
|
|
185
197
|
},
|
|
186
|
-
children: [/* @__PURE__ */
|
|
198
|
+
children: [/* @__PURE__ */ l("div", {
|
|
187
199
|
style: { flex: 1 },
|
|
188
200
|
children: [
|
|
189
|
-
/* @__PURE__ */
|
|
201
|
+
/* @__PURE__ */ l("div", {
|
|
190
202
|
style: {
|
|
191
203
|
display: "flex",
|
|
192
204
|
alignItems: "center",
|
|
193
205
|
gap: "6px"
|
|
194
206
|
},
|
|
195
|
-
children: [/* @__PURE__ */
|
|
207
|
+
children: [/* @__PURE__ */ c("span", {
|
|
196
208
|
style: {
|
|
197
209
|
fontSize: "13px",
|
|
198
210
|
fontWeight: 500,
|
|
199
|
-
color:
|
|
211
|
+
color: n.textPrimary
|
|
200
212
|
},
|
|
201
213
|
children: e.name
|
|
202
|
-
}), e.isDefault && /* @__PURE__ */
|
|
214
|
+
}), e.isDefault && /* @__PURE__ */ c("span", {
|
|
203
215
|
style: {
|
|
204
216
|
fontSize: "9px",
|
|
205
217
|
padding: "2px 4px",
|
|
206
|
-
backgroundColor:
|
|
207
|
-
color:
|
|
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__ */
|
|
227
|
+
e.description && /* @__PURE__ */ c("div", {
|
|
216
228
|
style: {
|
|
217
229
|
fontSize: "11px",
|
|
218
|
-
color:
|
|
230
|
+
color: n.textSecondary,
|
|
219
231
|
marginTop: "2px"
|
|
220
232
|
},
|
|
221
233
|
children: e.description
|
|
222
234
|
}),
|
|
223
|
-
/* @__PURE__ */
|
|
235
|
+
/* @__PURE__ */ c("div", {
|
|
224
236
|
style: {
|
|
225
237
|
fontSize: "10px",
|
|
226
|
-
color:
|
|
238
|
+
color: n.textSecondary,
|
|
227
239
|
marginTop: "2px"
|
|
228
240
|
},
|
|
229
241
|
children: new Date(e.updatedAt).toLocaleDateString()
|
|
230
242
|
})
|
|
231
243
|
]
|
|
232
|
-
}), /* @__PURE__ */
|
|
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__ */
|
|
239
|
-
onClick: (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:
|
|
258
|
+
color: n.textSecondary,
|
|
247
259
|
fontSize: "11px"
|
|
248
260
|
},
|
|
249
261
|
children: "Set Default"
|
|
250
|
-
}), /* @__PURE__ */
|
|
251
|
-
onClick: (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:
|
|
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
|
-
|
|
278
|
+
v && /* @__PURE__ */ c("div", {
|
|
267
279
|
style: {
|
|
268
280
|
padding: "12px 16px",
|
|
269
|
-
borderTop: `1px solid ${
|
|
270
|
-
backgroundColor:
|
|
281
|
+
borderTop: `1px solid ${n.borderDefault}`,
|
|
282
|
+
backgroundColor: n.bgSecondary
|
|
271
283
|
},
|
|
272
|
-
children: /* @__PURE__ */
|
|
273
|
-
onClick:
|
|
284
|
+
children: /* @__PURE__ */ l("button", {
|
|
285
|
+
onClick: W,
|
|
274
286
|
style: {
|
|
275
287
|
width: "100%",
|
|
276
288
|
padding: "8px",
|
|
277
|
-
backgroundColor:
|
|
278
|
-
border: `1px solid ${
|
|
289
|
+
backgroundColor: n.bgPrimary,
|
|
290
|
+
border: `1px solid ${n.borderDefault}`,
|
|
279
291
|
borderRadius: "4px",
|
|
280
292
|
cursor: "pointer",
|
|
281
293
|
fontSize: "12px",
|
|
282
|
-
color:
|
|
294
|
+
color: n.textPrimary
|
|
283
295
|
},
|
|
284
296
|
children: [
|
|
285
297
|
"Update \"",
|
|
286
|
-
|
|
298
|
+
v.name,
|
|
287
299
|
"\" with current state"
|
|
288
300
|
]
|
|
289
301
|
})
|
|
290
302
|
})
|
|
291
303
|
]
|
|
292
|
-
}), document.body) : null,
|
|
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: () =>
|
|
307
|
-
children: /* @__PURE__ */
|
|
318
|
+
onClick: () => A(!1),
|
|
319
|
+
children: /* @__PURE__ */ l("div", {
|
|
308
320
|
style: {
|
|
309
321
|
width: "400px",
|
|
310
|
-
backgroundColor:
|
|
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:
|
|
328
|
+
color: n.textPrimary
|
|
317
329
|
},
|
|
318
330
|
onClick: (e) => e.stopPropagation(),
|
|
319
331
|
children: [
|
|
320
|
-
/* @__PURE__ */
|
|
332
|
+
/* @__PURE__ */ c("div", {
|
|
321
333
|
style: {
|
|
322
334
|
padding: "16px 20px",
|
|
323
|
-
borderBottom: `1px solid ${
|
|
335
|
+
borderBottom: `1px solid ${n.borderDefault}`
|
|
324
336
|
},
|
|
325
|
-
children: /* @__PURE__ */
|
|
337
|
+
children: /* @__PURE__ */ c("h3", {
|
|
326
338
|
style: {
|
|
327
339
|
margin: 0,
|
|
328
340
|
fontSize: "16px",
|
|
329
341
|
fontWeight: 600,
|
|
330
|
-
color:
|
|
342
|
+
color: n.textPrimary
|
|
331
343
|
},
|
|
332
344
|
children: "Save Current View"
|
|
333
345
|
})
|
|
334
346
|
}),
|
|
335
|
-
/* @__PURE__ */
|
|
347
|
+
/* @__PURE__ */ l("div", {
|
|
336
348
|
style: { padding: "20px" },
|
|
337
349
|
children: [
|
|
338
|
-
/* @__PURE__ */
|
|
350
|
+
/* @__PURE__ */ l("div", {
|
|
339
351
|
style: { marginBottom: "16px" },
|
|
340
|
-
children: [/* @__PURE__ */
|
|
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:
|
|
358
|
+
color: n.textPrimary
|
|
347
359
|
},
|
|
348
360
|
children: "View Name *"
|
|
349
|
-
}), /* @__PURE__ */
|
|
361
|
+
}), /* @__PURE__ */ c("input", {
|
|
350
362
|
type: "text",
|
|
351
|
-
value:
|
|
352
|
-
onChange: (e) =>
|
|
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 ${
|
|
369
|
+
border: `1px solid ${n.borderDefault}`,
|
|
358
370
|
borderRadius: "6px",
|
|
359
371
|
fontSize: "14px",
|
|
360
|
-
backgroundColor:
|
|
361
|
-
color:
|
|
372
|
+
backgroundColor: n.bgPrimary,
|
|
373
|
+
color: n.textPrimary,
|
|
362
374
|
boxSizing: "border-box"
|
|
363
375
|
}
|
|
364
376
|
})]
|
|
365
377
|
}),
|
|
366
|
-
/* @__PURE__ */
|
|
378
|
+
/* @__PURE__ */ l("div", {
|
|
367
379
|
style: { marginBottom: "16px" },
|
|
368
|
-
children: [/* @__PURE__ */
|
|
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:
|
|
386
|
+
color: n.textPrimary
|
|
375
387
|
},
|
|
376
388
|
children: "Description"
|
|
377
|
-
}), /* @__PURE__ */
|
|
378
|
-
value:
|
|
379
|
-
onChange: (e) =>
|
|
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 ${
|
|
397
|
+
border: `1px solid ${n.borderDefault}`,
|
|
386
398
|
borderRadius: "6px",
|
|
387
399
|
fontSize: "14px",
|
|
388
400
|
resize: "vertical",
|
|
389
|
-
backgroundColor:
|
|
390
|
-
color:
|
|
401
|
+
backgroundColor: n.bgPrimary,
|
|
402
|
+
color: n.textPrimary,
|
|
391
403
|
boxSizing: "border-box"
|
|
392
404
|
}
|
|
393
405
|
})]
|
|
394
406
|
}),
|
|
395
|
-
/* @__PURE__ */
|
|
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__ */
|
|
414
|
+
children: [/* @__PURE__ */ c("input", {
|
|
403
415
|
type: "checkbox",
|
|
404
|
-
checked:
|
|
405
|
-
onChange: (e) =>
|
|
406
|
-
}), /* @__PURE__ */
|
|
416
|
+
checked: F,
|
|
417
|
+
onChange: (e) => I(e.target.checked)
|
|
418
|
+
}), /* @__PURE__ */ c("span", {
|
|
407
419
|
style: {
|
|
408
420
|
fontSize: "13px",
|
|
409
|
-
color:
|
|
421
|
+
color: n.textPrimary
|
|
410
422
|
},
|
|
411
423
|
children: "Set as default view"
|
|
412
424
|
})]
|
|
413
425
|
})
|
|
414
426
|
]
|
|
415
427
|
}),
|
|
416
|
-
/* @__PURE__ */
|
|
428
|
+
/* @__PURE__ */ l("div", {
|
|
417
429
|
style: {
|
|
418
430
|
padding: "16px 20px",
|
|
419
|
-
borderTop: `1px solid ${
|
|
431
|
+
borderTop: `1px solid ${n.borderDefault}`,
|
|
420
432
|
display: "flex",
|
|
421
433
|
justifyContent: "flex-end",
|
|
422
434
|
gap: "12px",
|
|
423
|
-
backgroundColor:
|
|
435
|
+
backgroundColor: n.bgSecondary
|
|
424
436
|
},
|
|
425
|
-
children: [/* @__PURE__ */
|
|
426
|
-
onClick: () =>
|
|
437
|
+
children: [/* @__PURE__ */ c("button", {
|
|
438
|
+
onClick: () => A(!1),
|
|
427
439
|
style: {
|
|
428
440
|
padding: "10px 20px",
|
|
429
|
-
backgroundColor:
|
|
430
|
-
border: `1px solid ${
|
|
441
|
+
backgroundColor: n.bgPrimary,
|
|
442
|
+
border: `1px solid ${n.borderDefault}`,
|
|
431
443
|
borderRadius: "6px",
|
|
432
444
|
cursor: "pointer",
|
|
433
445
|
fontSize: "14px",
|
|
434
|
-
color:
|
|
446
|
+
color: n.textPrimary
|
|
435
447
|
},
|
|
436
448
|
children: "Cancel"
|
|
437
|
-
}), /* @__PURE__ */
|
|
438
|
-
onClick:
|
|
439
|
-
disabled: !
|
|
449
|
+
}), /* @__PURE__ */ c("button", {
|
|
450
|
+
onClick: U,
|
|
451
|
+
disabled: !j.trim(),
|
|
440
452
|
style: {
|
|
441
453
|
padding: "10px 20px",
|
|
442
|
-
backgroundColor:
|
|
443
|
-
color:
|
|
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:
|
|
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__ */
|
|
457
|
-
className:
|
|
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__ */
|
|
464
|
-
ref:
|
|
465
|
-
onClick: () =>
|
|
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:
|
|
472
|
-
border: `1px solid ${
|
|
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:
|
|
488
|
+
color: v ? n.actionPrimaryBg : n.textPrimary
|
|
477
489
|
},
|
|
478
|
-
children: [/* @__PURE__ */
|
|
490
|
+
children: [/* @__PURE__ */ c("span", {
|
|
479
491
|
style: { fontWeight: 500 },
|
|
480
|
-
children:
|
|
481
|
-
}), /* @__PURE__ */
|
|
492
|
+
children: v ? v.name : "Views"
|
|
493
|
+
}), /* @__PURE__ */ c("span", {
|
|
482
494
|
style: { fontSize: "10px" },
|
|
483
|
-
children:
|
|
495
|
+
children: D ? "▲" : "▼"
|
|
484
496
|
})]
|
|
485
497
|
}),
|
|
486
|
-
|
|
487
|
-
|
|
498
|
+
J,
|
|
499
|
+
Y
|
|
488
500
|
]
|
|
489
501
|
});
|
|
490
502
|
}
|
|
491
503
|
//#endregion
|
|
492
|
-
export {
|
|
504
|
+
export { f as default };
|
|
493
505
|
|
|
494
506
|
//# sourceMappingURL=SavedViewsDropdown.js.map
|