@burdenoff/microfe-bigconsole 2026.1119.5 → 2026.1119.7
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/components/ask/AskYourData.d.ts +5 -0
- package/dist/bigconsole/components/ask/AskYourData.js +330 -0
- package/dist/bigconsole/components/ask/askAnswer.d.ts +12 -0
- package/dist/bigconsole/components/ask/askAnswer.js +30 -0
- package/dist/bigconsole/components/explore/CreateQueryWidget.d.ts +4 -2
- package/dist/bigconsole/components/explore/CreateQueryWidget.js +118 -102
- package/dist/bigconsole/components/settings/WidgetCatalogSection.d.ts +3 -0
- package/dist/bigconsole/components/settings/WidgetCatalogSection.js +207 -0
- package/dist/bigconsole/constants/backendErrors.js +2 -0
- package/dist/bigconsole/hooks/useWidgetTypeCatalog.d.ts +14 -0
- package/dist/bigconsole/hooks/useWidgetTypeCatalog.js +79 -0
- package/dist/bigconsole/pages/InsightsPage.js +507 -505
- package/dist/bigconsole/pages/SettingsPage.js +198 -196
- package/dist/bigconsole/utils/quota.js +2 -1
- package/dist/bigconsole/utils/widgetCatalog.d.ts +42 -0
- package/dist/bigconsole/utils/widgetCatalog.js +15 -0
- package/dist/constants/permissions.d.ts +2 -1
- package/dist/constants/permissions.js +1 -0
- package/dist/generated/wspace-operations.d.ts +113 -0
- package/dist/generated/wspace-operations.js +876 -156
- package/dist/generated/wspace-types.d.ts +88 -0
- package/package.json +1 -1
|
@@ -1,52 +1,53 @@
|
|
|
1
1
|
import { useBigConsole as e } from "../context/BigConsoleContext.js";
|
|
2
|
+
import { WidgetCatalogSection as t } from "../components/settings/WidgetCatalogSection.js";
|
|
2
3
|
import "../context/index.js";
|
|
3
|
-
import { bigConsoleSettingsScope as
|
|
4
|
-
import { useBigConsoleSettingsSync as
|
|
5
|
-
import { isDirty as
|
|
6
|
-
import { memo as
|
|
7
|
-
import { RotateCcw as
|
|
8
|
-
import { AuroraBackground as
|
|
9
|
-
import { useUnsavedChanges as
|
|
10
|
-
import { useI18n as
|
|
11
|
-
import { jsx as
|
|
4
|
+
import { bigConsoleSettingsScope as n, loadBigConsoleSettings as r } from "../hooks/useBigConsoleSettings.js";
|
|
5
|
+
import { useBigConsoleSettingsSync as i } from "../hooks/useBigConsoleSettingsSync.js";
|
|
6
|
+
import { isDirty as a } from "../utils/formDirty.js";
|
|
7
|
+
import { memo as o, useCallback as s, useEffect as c, useState as l } from "react";
|
|
8
|
+
import { RotateCcw as u, Save as d, Settings as f } from "lucide-react";
|
|
9
|
+
import { AuroraBackground as p, EmphasisPanel as m, GradientText as h, PagePurpose as g } from "@burdenoff/fe-libs/ui";
|
|
10
|
+
import { useUnsavedChanges as _ } from "@burdenoff/fe-libs/shared/hooks";
|
|
11
|
+
import { useI18n as v } from "@burdenoff/fe-libs/shared/providers/shell/I18nProvider";
|
|
12
|
+
import { jsx as y, jsxs as b } from "react/jsx-runtime";
|
|
12
13
|
// src/bigconsole/pages/SettingsPage.tsx
|
|
13
|
-
var
|
|
14
|
-
let { currentUser:
|
|
15
|
-
return /* @__PURE__ */
|
|
16
|
-
}),
|
|
17
|
-
let { t } =
|
|
18
|
-
|
|
14
|
+
var x = o(function() {
|
|
15
|
+
let { currentUser: t, workspaceId: r, settingsExtension: i } = e();
|
|
16
|
+
return /* @__PURE__ */ y(S, { extension: i }, n(t?.id, r));
|
|
17
|
+
}), S = function({ extension: e }) {
|
|
18
|
+
let { t: n } = v(), o = i(), [x, S] = l(r), [C, w] = l(!1), [T, E] = l(!1), [D, O] = l(!1), [k, A] = l(x), j = a(x, k), M = o.loaded || o.loadError, N = o.settings, [P, F] = l(N);
|
|
19
|
+
a(N, P) && (F(N), j || (S(N), A(N))), _({
|
|
19
20
|
id: "bigconsole-settings",
|
|
20
|
-
label:
|
|
21
|
-
dirty:
|
|
22
|
-
}),
|
|
23
|
-
if (
|
|
24
|
-
let e = setTimeout(() =>
|
|
21
|
+
label: n("bigconsole.assistant.unsaved.settingsPage", "the settings page"),
|
|
22
|
+
dirty: j
|
|
23
|
+
}), c(() => {
|
|
24
|
+
if (C) {
|
|
25
|
+
let e = setTimeout(() => w(!1), 2e3);
|
|
25
26
|
return () => clearTimeout(e);
|
|
26
27
|
}
|
|
27
|
-
}, [
|
|
28
|
-
let
|
|
29
|
-
|
|
28
|
+
}, [C]);
|
|
29
|
+
let I = s((e, t) => {
|
|
30
|
+
S((n) => ({
|
|
30
31
|
...n,
|
|
31
32
|
[e]: t
|
|
32
33
|
}));
|
|
33
|
-
}, []), { save:
|
|
34
|
-
|
|
35
|
-
}, []),
|
|
36
|
-
let e =
|
|
37
|
-
|
|
34
|
+
}, []), { save: L, reset: R } = o, z = s((e, t) => {
|
|
35
|
+
O(!1), w(t !== null), E(t === null), t && (A(t), F(t), S((n) => a(n, e) ? n : t));
|
|
36
|
+
}, []), B = s(async () => {
|
|
37
|
+
let e = x;
|
|
38
|
+
O(!0), E(!1), z(e, await L(e));
|
|
38
39
|
}, [
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
]),
|
|
43
|
-
let e =
|
|
44
|
-
|
|
40
|
+
z,
|
|
41
|
+
L,
|
|
42
|
+
x
|
|
43
|
+
]), V = s(async () => {
|
|
44
|
+
let e = x;
|
|
45
|
+
O(!0), E(!1), z(e, await R());
|
|
45
46
|
}, [
|
|
47
|
+
z,
|
|
46
48
|
R,
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
]), V = {
|
|
49
|
+
x
|
|
50
|
+
]), H = {
|
|
50
51
|
width: "100%",
|
|
51
52
|
padding: "8px 12px",
|
|
52
53
|
borderRadius: "var(--radius-button)",
|
|
@@ -54,17 +55,17 @@ var b = a(function() {
|
|
|
54
55
|
backgroundColor: "var(--color-bg-canvas)",
|
|
55
56
|
color: "var(--color-text-primary)",
|
|
56
57
|
fontSize: "var(--font-size-body-sm)"
|
|
57
|
-
},
|
|
58
|
+
}, U = {
|
|
58
59
|
display: "block",
|
|
59
60
|
fontSize: "var(--font-size-body-sm)",
|
|
60
61
|
fontWeight: "var(--font-weight-medium)",
|
|
61
62
|
color: "var(--color-text-primary)",
|
|
62
63
|
marginBottom: 4
|
|
63
|
-
},
|
|
64
|
+
}, W = {
|
|
64
65
|
fontSize: "var(--font-size-body-sm)",
|
|
65
66
|
color: "var(--color-text-muted)",
|
|
66
67
|
marginTop: 4
|
|
67
|
-
},
|
|
68
|
+
}, G = {
|
|
68
69
|
backgroundColor: "var(--color-bg-surface)",
|
|
69
70
|
border: "1px solid var(--color-border-seam)",
|
|
70
71
|
borderRadius: "var(--radius-card)",
|
|
@@ -72,19 +73,19 @@ var b = a(function() {
|
|
|
72
73
|
marginBottom: "var(--space-sectionGap)",
|
|
73
74
|
boxShadow: "var(--shadow-pop)"
|
|
74
75
|
};
|
|
75
|
-
return /* @__PURE__ */
|
|
76
|
+
return /* @__PURE__ */ y("div", {
|
|
76
77
|
style: {
|
|
77
78
|
minHeight: "100vh",
|
|
78
79
|
backgroundColor: "var(--color-bg-canvas)"
|
|
79
80
|
},
|
|
80
|
-
children: /* @__PURE__ */
|
|
81
|
+
children: /* @__PURE__ */ b("div", {
|
|
81
82
|
style: {
|
|
82
83
|
padding: "var(--space-pagePadding)",
|
|
83
84
|
maxWidth: 1440,
|
|
84
85
|
margin: "0 auto"
|
|
85
86
|
},
|
|
86
87
|
children: [
|
|
87
|
-
/* @__PURE__ */
|
|
88
|
+
/* @__PURE__ */ b("div", {
|
|
88
89
|
className: "relative overflow-hidden rounded-card border border-border-seam bg-gloss-card p-6",
|
|
89
90
|
style: {
|
|
90
91
|
display: "flex",
|
|
@@ -95,40 +96,40 @@ var b = a(function() {
|
|
|
95
96
|
gap: "var(--space-formGap)"
|
|
96
97
|
},
|
|
97
98
|
children: [
|
|
98
|
-
/* @__PURE__ */
|
|
99
|
-
/* @__PURE__ */
|
|
99
|
+
/* @__PURE__ */ y(p, { intensity: "subtle" }),
|
|
100
|
+
/* @__PURE__ */ b("div", { children: [/* @__PURE__ */ b("div", {
|
|
100
101
|
style: {
|
|
101
102
|
display: "flex",
|
|
102
103
|
alignItems: "center",
|
|
103
104
|
gap: "var(--space-iconGap)"
|
|
104
105
|
},
|
|
105
|
-
children: [/* @__PURE__ */
|
|
106
|
+
children: [/* @__PURE__ */ y(f, {
|
|
106
107
|
size: 24,
|
|
107
108
|
style: { color: "var(--color-text-primary)" }
|
|
108
|
-
}), /* @__PURE__ */
|
|
109
|
+
}), /* @__PURE__ */ y("h1", {
|
|
109
110
|
style: {
|
|
110
111
|
fontSize: "var(--font-size-heading-h4)",
|
|
111
112
|
fontWeight: "var(--font-weight-bold)",
|
|
112
113
|
color: "var(--color-text-primary)"
|
|
113
114
|
},
|
|
114
|
-
children: /* @__PURE__ */
|
|
115
|
+
children: /* @__PURE__ */ y(h, { children: n("bigconsole.settings.header.title", "Settings") })
|
|
115
116
|
})]
|
|
116
|
-
}), /* @__PURE__ */
|
|
117
|
+
}), /* @__PURE__ */ y("p", {
|
|
117
118
|
style: {
|
|
118
119
|
fontSize: "var(--font-size-body-md)",
|
|
119
120
|
color: "var(--color-text-secondary)",
|
|
120
121
|
marginTop: 4
|
|
121
122
|
},
|
|
122
|
-
children:
|
|
123
|
+
children: n("bigconsole.settings.header.subtitle", "Configure BigConsole preferences")
|
|
123
124
|
})] }),
|
|
124
|
-
/* @__PURE__ */
|
|
125
|
+
/* @__PURE__ */ b("div", {
|
|
125
126
|
style: {
|
|
126
127
|
display: "flex",
|
|
127
128
|
gap: 8
|
|
128
129
|
},
|
|
129
|
-
children: [/* @__PURE__ */
|
|
130
|
-
onClick: () => void
|
|
131
|
-
disabled:
|
|
130
|
+
children: [/* @__PURE__ */ b("button", {
|
|
131
|
+
onClick: () => void V(),
|
|
132
|
+
disabled: D || !M,
|
|
132
133
|
style: {
|
|
133
134
|
display: "flex",
|
|
134
135
|
alignItems: "center",
|
|
@@ -142,21 +143,21 @@ var b = a(function() {
|
|
|
142
143
|
cursor: "pointer"
|
|
143
144
|
},
|
|
144
145
|
children: [
|
|
145
|
-
/* @__PURE__ */
|
|
146
|
+
/* @__PURE__ */ y(u, { size: 14 }),
|
|
146
147
|
" ",
|
|
147
|
-
|
|
148
|
+
n("bigconsole.settings.actions.reset", "Reset")
|
|
148
149
|
]
|
|
149
|
-
}), /* @__PURE__ */
|
|
150
|
-
onClick: () => void
|
|
151
|
-
disabled:
|
|
152
|
-
"aria-busy":
|
|
150
|
+
}), /* @__PURE__ */ b("button", {
|
|
151
|
+
onClick: () => void B(),
|
|
152
|
+
disabled: D || !M,
|
|
153
|
+
"aria-busy": D,
|
|
153
154
|
style: {
|
|
154
155
|
display: "flex",
|
|
155
156
|
alignItems: "center",
|
|
156
157
|
gap: 6,
|
|
157
158
|
padding: "8px 16px",
|
|
158
159
|
borderRadius: "var(--radius-button)",
|
|
159
|
-
backgroundColor:
|
|
160
|
+
backgroundColor: C ? "var(--color-status-success-bg)" : "var(--color-action-primary-bg)",
|
|
160
161
|
color: "var(--color-action-primary-text)",
|
|
161
162
|
fontWeight: "var(--font-weight-medium)",
|
|
162
163
|
fontSize: "var(--font-size-body-sm)",
|
|
@@ -165,334 +166,334 @@ var b = a(function() {
|
|
|
165
166
|
transition: "background-color 200ms"
|
|
166
167
|
},
|
|
167
168
|
children: [
|
|
168
|
-
/* @__PURE__ */
|
|
169
|
+
/* @__PURE__ */ y(d, { size: 14 }),
|
|
169
170
|
" ",
|
|
170
|
-
|
|
171
|
+
D ? n("bigconsole.settings.actions.saving", "Saving…") : C ? n("bigconsole.settings.actions.savedToAccount", "Saved") : n("bigconsole.settings.actions.saveToAccount", "Save")
|
|
171
172
|
]
|
|
172
173
|
})]
|
|
173
174
|
})
|
|
174
175
|
]
|
|
175
176
|
}),
|
|
176
|
-
|
|
177
|
+
T && /* @__PURE__ */ y("p", {
|
|
177
178
|
role: "alert",
|
|
178
179
|
className: "mb-form-gap text-status-error-text",
|
|
179
|
-
children:
|
|
180
|
+
children: n("bigconsole.settings.actions.saveFailed", "Your preferences could not be saved. Check your connection and try again.")
|
|
180
181
|
}),
|
|
181
|
-
|
|
182
|
+
o.loadError && /* @__PURE__ */ y("p", {
|
|
182
183
|
role: "status",
|
|
183
184
|
className: "mb-form-gap text-text-muted",
|
|
184
|
-
children:
|
|
185
|
+
children: n("bigconsole.settings.loadFailed", "Your saved preferences could not be loaded. The values shown are the last ones this browser used.")
|
|
185
186
|
}),
|
|
186
|
-
/* @__PURE__ */
|
|
187
|
+
/* @__PURE__ */ y(g, {
|
|
187
188
|
className: "mb-[var(--space-sectionGap)]",
|
|
188
|
-
children:
|
|
189
|
+
children: n("bigconsole.settings.accountDefaultsPurpose", "These defaults apply when you add dashboard pages, widgets and data sinks, and display preferences update existing widgets. They are saved to your account for this workspace, so they follow you on every device and browser. They do not change existing page layouts, widget refresh schedules or data sink cache settings, and are not shared with your team.")
|
|
189
190
|
}),
|
|
190
|
-
/* @__PURE__ */
|
|
191
|
-
disabled: !
|
|
192
|
-
"aria-busy": !
|
|
191
|
+
/* @__PURE__ */ b("fieldset", {
|
|
192
|
+
disabled: !M,
|
|
193
|
+
"aria-busy": !M,
|
|
193
194
|
className: "m-0 min-w-0 border-0 p-0",
|
|
194
195
|
children: [
|
|
195
|
-
/* @__PURE__ */
|
|
196
|
+
/* @__PURE__ */ b(m, {
|
|
196
197
|
className: "mb-[var(--space-sectionGap)] p-[var(--space-cardPadding)]",
|
|
197
|
-
children: [/* @__PURE__ */
|
|
198
|
+
children: [/* @__PURE__ */ y("h2", {
|
|
198
199
|
style: {
|
|
199
200
|
fontSize: "var(--font-size-body-md)",
|
|
200
201
|
fontWeight: "var(--font-weight-semibold)",
|
|
201
202
|
color: "var(--color-text-primary)",
|
|
202
203
|
marginBottom: 16
|
|
203
204
|
},
|
|
204
|
-
children:
|
|
205
|
-
}), /* @__PURE__ */
|
|
205
|
+
children: n("bigconsole.settings.dashboardDefaults.title", "Dashboard Defaults")
|
|
206
|
+
}), /* @__PURE__ */ b("div", {
|
|
206
207
|
className: "grid gap-form-gap md:grid-cols-3",
|
|
207
208
|
children: [
|
|
208
|
-
/* @__PURE__ */
|
|
209
|
-
/* @__PURE__ */
|
|
209
|
+
/* @__PURE__ */ b("div", { children: [
|
|
210
|
+
/* @__PURE__ */ y("label", {
|
|
210
211
|
htmlFor: "grid-cols",
|
|
211
|
-
style:
|
|
212
|
-
children:
|
|
212
|
+
style: U,
|
|
213
|
+
children: n("bigconsole.settings.dashboardDefaults.gridColumns.label", "Grid Columns")
|
|
213
214
|
}),
|
|
214
|
-
/* @__PURE__ */
|
|
215
|
+
/* @__PURE__ */ y("input", {
|
|
215
216
|
id: "grid-cols",
|
|
216
217
|
type: "number",
|
|
217
218
|
min: 4,
|
|
218
219
|
max: 24,
|
|
219
|
-
value:
|
|
220
|
-
onChange: (e) =>
|
|
221
|
-
style:
|
|
220
|
+
value: x.defaultGridColumns,
|
|
221
|
+
onChange: (e) => I("defaultGridColumns", Math.min(24, Math.max(4, Number(e.target.value) || 12))),
|
|
222
|
+
style: H
|
|
222
223
|
}),
|
|
223
|
-
/* @__PURE__ */
|
|
224
|
-
style:
|
|
225
|
-
children:
|
|
224
|
+
/* @__PURE__ */ y("p", {
|
|
225
|
+
style: W,
|
|
226
|
+
children: n("bigconsole.settings.dashboardDefaults.gridColumns.help", "Number of columns in the dashboard grid (4-24)")
|
|
226
227
|
})
|
|
227
228
|
] }),
|
|
228
|
-
/* @__PURE__ */
|
|
229
|
-
/* @__PURE__ */
|
|
229
|
+
/* @__PURE__ */ b("div", { children: [
|
|
230
|
+
/* @__PURE__ */ y("label", {
|
|
230
231
|
htmlFor: "widget-height",
|
|
231
|
-
style:
|
|
232
|
-
children:
|
|
232
|
+
style: U,
|
|
233
|
+
children: n("bigconsole.settings.dashboardDefaults.widgetHeight.label", "Default Widget Height")
|
|
233
234
|
}),
|
|
234
|
-
/* @__PURE__ */
|
|
235
|
+
/* @__PURE__ */ y("input", {
|
|
235
236
|
id: "widget-height",
|
|
236
237
|
type: "number",
|
|
237
238
|
min: 2,
|
|
238
239
|
max: 12,
|
|
239
|
-
value:
|
|
240
|
-
onChange: (e) =>
|
|
241
|
-
style:
|
|
240
|
+
value: x.defaultWidgetHeight,
|
|
241
|
+
onChange: (e) => I("defaultWidgetHeight", Math.min(12, Math.max(2, Number(e.target.value) || 4))),
|
|
242
|
+
style: H
|
|
242
243
|
}),
|
|
243
|
-
/* @__PURE__ */
|
|
244
|
-
style:
|
|
245
|
-
children:
|
|
244
|
+
/* @__PURE__ */ y("p", {
|
|
245
|
+
style: W,
|
|
246
|
+
children: n("bigconsole.settings.dashboardDefaults.widgetHeight.help", "Default height units for new widgets (2-12)")
|
|
246
247
|
})
|
|
247
248
|
] }),
|
|
248
|
-
/* @__PURE__ */
|
|
249
|
-
/* @__PURE__ */
|
|
249
|
+
/* @__PURE__ */ b("div", { children: [
|
|
250
|
+
/* @__PURE__ */ y("label", {
|
|
250
251
|
htmlFor: "refresh-interval",
|
|
251
|
-
style:
|
|
252
|
-
children:
|
|
252
|
+
style: U,
|
|
253
|
+
children: n("bigconsole.settings.dashboardDefaults.refreshInterval.label", "Auto-Refresh Interval (seconds)")
|
|
253
254
|
}),
|
|
254
|
-
/* @__PURE__ */
|
|
255
|
+
/* @__PURE__ */ b("select", {
|
|
255
256
|
id: "refresh-interval",
|
|
256
|
-
value:
|
|
257
|
-
onChange: (e) =>
|
|
258
|
-
style:
|
|
257
|
+
value: x.defaultRefreshInterval,
|
|
258
|
+
onChange: (e) => I("defaultRefreshInterval", parseInt(e.target.value)),
|
|
259
|
+
style: H,
|
|
259
260
|
children: [
|
|
260
|
-
/* @__PURE__ */
|
|
261
|
+
/* @__PURE__ */ y("option", {
|
|
261
262
|
value: 0,
|
|
262
|
-
children:
|
|
263
|
+
children: n("bigconsole.settings.dashboardDefaults.refreshInterval.disabled", "Disabled")
|
|
263
264
|
}),
|
|
264
|
-
/* @__PURE__ */
|
|
265
|
+
/* @__PURE__ */ y("option", {
|
|
265
266
|
value: 10,
|
|
266
|
-
children:
|
|
267
|
+
children: n("bigconsole.settings.dashboardDefaults.refreshInterval.seconds10", "10 seconds")
|
|
267
268
|
}),
|
|
268
|
-
/* @__PURE__ */
|
|
269
|
+
/* @__PURE__ */ y("option", {
|
|
269
270
|
value: 30,
|
|
270
|
-
children:
|
|
271
|
+
children: n("bigconsole.settings.dashboardDefaults.refreshInterval.seconds30", "30 seconds")
|
|
271
272
|
}),
|
|
272
|
-
/* @__PURE__ */
|
|
273
|
+
/* @__PURE__ */ y("option", {
|
|
273
274
|
value: 60,
|
|
274
|
-
children:
|
|
275
|
+
children: n("bigconsole.settings.dashboardDefaults.refreshInterval.minute1", "1 minute")
|
|
275
276
|
}),
|
|
276
|
-
/* @__PURE__ */
|
|
277
|
+
/* @__PURE__ */ y("option", {
|
|
277
278
|
value: 300,
|
|
278
|
-
children:
|
|
279
|
+
children: n("bigconsole.settings.dashboardDefaults.refreshInterval.minutes5", "5 minutes")
|
|
279
280
|
}),
|
|
280
|
-
/* @__PURE__ */
|
|
281
|
+
/* @__PURE__ */ y("option", {
|
|
281
282
|
value: 600,
|
|
282
|
-
children:
|
|
283
|
+
children: n("bigconsole.settings.dashboardDefaults.refreshInterval.minutes10", "10 minutes")
|
|
283
284
|
})
|
|
284
285
|
]
|
|
285
286
|
}),
|
|
286
|
-
/* @__PURE__ */
|
|
287
|
-
style:
|
|
288
|
-
children:
|
|
287
|
+
/* @__PURE__ */ y("p", {
|
|
288
|
+
style: W,
|
|
289
|
+
children: n("bigconsole.settings.dashboardDefaults.refreshInterval.help", "How often widgets refresh their data automatically")
|
|
289
290
|
})
|
|
290
291
|
] })
|
|
291
292
|
]
|
|
292
293
|
})]
|
|
293
294
|
}),
|
|
294
|
-
/* @__PURE__ */
|
|
295
|
-
style:
|
|
296
|
-
children: [/* @__PURE__ */
|
|
295
|
+
/* @__PURE__ */ b("div", {
|
|
296
|
+
style: G,
|
|
297
|
+
children: [/* @__PURE__ */ y("h2", {
|
|
297
298
|
style: {
|
|
298
299
|
fontSize: "var(--font-size-body-md)",
|
|
299
300
|
fontWeight: "var(--font-weight-semibold)",
|
|
300
301
|
color: "var(--color-text-primary)",
|
|
301
302
|
marginBottom: 16
|
|
302
303
|
},
|
|
303
|
-
children:
|
|
304
|
-
}), /* @__PURE__ */
|
|
304
|
+
children: n("bigconsole.settings.cache.title", "Cache")
|
|
305
|
+
}), /* @__PURE__ */ b("div", {
|
|
305
306
|
className: "grid gap-form-gap md:grid-cols-2",
|
|
306
|
-
children: [/* @__PURE__ */
|
|
307
|
+
children: [/* @__PURE__ */ b("div", {
|
|
307
308
|
style: {
|
|
308
309
|
display: "flex",
|
|
309
310
|
alignItems: "center",
|
|
310
311
|
justifyContent: "space-between"
|
|
311
312
|
},
|
|
312
|
-
children: [/* @__PURE__ */
|
|
313
|
-
style: H,
|
|
314
|
-
children: t("bigconsole.settings.cache.enable.label", "Enable Cache")
|
|
315
|
-
}), /* @__PURE__ */ v("p", {
|
|
313
|
+
children: [/* @__PURE__ */ b("div", { children: [/* @__PURE__ */ y("label", {
|
|
316
314
|
style: U,
|
|
317
|
-
children:
|
|
318
|
-
})
|
|
319
|
-
|
|
315
|
+
children: n("bigconsole.settings.cache.enable.label", "Enable Cache")
|
|
316
|
+
}), /* @__PURE__ */ y("p", {
|
|
317
|
+
style: W,
|
|
318
|
+
children: n("bigconsole.settings.cache.newSinkHelp", "Enable caching by default for new data sinks")
|
|
319
|
+
})] }), /* @__PURE__ */ y("button", {
|
|
320
|
+
onClick: () => I("cacheEnabled", !x.cacheEnabled),
|
|
320
321
|
role: "switch",
|
|
321
|
-
"aria-checked":
|
|
322
|
-
"aria-label":
|
|
322
|
+
"aria-checked": x.cacheEnabled,
|
|
323
|
+
"aria-label": n("bigconsole.settings.cache.enable.label", "Enable Cache"),
|
|
323
324
|
style: {
|
|
324
325
|
width: 44,
|
|
325
326
|
flexShrink: 0,
|
|
326
327
|
height: 24,
|
|
327
328
|
borderRadius: 12,
|
|
328
|
-
backgroundColor:
|
|
329
|
+
backgroundColor: x.cacheEnabled ? "var(--color-action-primary-bg)" : "var(--color-bg-sunken)",
|
|
329
330
|
border: "none",
|
|
330
331
|
cursor: "pointer",
|
|
331
332
|
position: "relative",
|
|
332
333
|
transition: "background-color 200ms"
|
|
333
334
|
},
|
|
334
|
-
children: /* @__PURE__ */
|
|
335
|
+
children: /* @__PURE__ */ y("div", { style: {
|
|
335
336
|
width: 18,
|
|
336
337
|
height: 18,
|
|
337
338
|
borderRadius: "50%",
|
|
338
339
|
backgroundColor: "var(--color-action-primary-text)",
|
|
339
340
|
position: "absolute",
|
|
340
341
|
top: 3,
|
|
341
|
-
left:
|
|
342
|
+
left: x.cacheEnabled ? 23 : 3,
|
|
342
343
|
transition: "left 200ms"
|
|
343
344
|
} })
|
|
344
345
|
})]
|
|
345
|
-
}),
|
|
346
|
-
/* @__PURE__ */
|
|
346
|
+
}), x.cacheEnabled && /* @__PURE__ */ b("div", { children: [
|
|
347
|
+
/* @__PURE__ */ y("label", {
|
|
347
348
|
htmlFor: "cache-ttl",
|
|
348
|
-
style:
|
|
349
|
-
children:
|
|
349
|
+
style: U,
|
|
350
|
+
children: n("bigconsole.settings.cache.ttl.label", "Cache TTL (seconds)")
|
|
350
351
|
}),
|
|
351
|
-
/* @__PURE__ */
|
|
352
|
+
/* @__PURE__ */ y("input", {
|
|
352
353
|
id: "cache-ttl",
|
|
353
354
|
type: "number",
|
|
354
355
|
min: 30,
|
|
355
356
|
max: 3600,
|
|
356
|
-
value:
|
|
357
|
-
onChange: (e) =>
|
|
358
|
-
style:
|
|
357
|
+
value: x.cacheTTLSeconds,
|
|
358
|
+
onChange: (e) => I("cacheTTLSeconds", Math.min(3600, Math.max(30, Number(e.target.value) || 300))),
|
|
359
|
+
style: H
|
|
359
360
|
}),
|
|
360
|
-
/* @__PURE__ */
|
|
361
|
-
style:
|
|
362
|
-
children:
|
|
361
|
+
/* @__PURE__ */ y("p", {
|
|
362
|
+
style: W,
|
|
363
|
+
children: n("bigconsole.settings.cache.ttl.help", "How long cached data is considered fresh (30-3600)")
|
|
363
364
|
})
|
|
364
365
|
] })]
|
|
365
366
|
})]
|
|
366
367
|
}),
|
|
367
|
-
/* @__PURE__ */
|
|
368
|
-
style:
|
|
369
|
-
children: [/* @__PURE__ */
|
|
368
|
+
/* @__PURE__ */ b("div", {
|
|
369
|
+
style: G,
|
|
370
|
+
children: [/* @__PURE__ */ y("h2", {
|
|
370
371
|
style: {
|
|
371
372
|
fontSize: "var(--font-size-body-md)",
|
|
372
373
|
fontWeight: "var(--font-weight-semibold)",
|
|
373
374
|
color: "var(--color-text-primary)",
|
|
374
375
|
marginBottom: 16
|
|
375
376
|
},
|
|
376
|
-
children:
|
|
377
|
-
}), /* @__PURE__ */
|
|
377
|
+
children: n("bigconsole.settings.display.title", "Display")
|
|
378
|
+
}), /* @__PURE__ */ b("div", {
|
|
378
379
|
className: "grid gap-form-gap md:grid-cols-3",
|
|
379
380
|
children: [
|
|
380
|
-
/* @__PURE__ */
|
|
381
|
+
/* @__PURE__ */ b("div", {
|
|
381
382
|
style: {
|
|
382
383
|
display: "flex",
|
|
383
384
|
alignItems: "center",
|
|
384
385
|
justifyContent: "space-between"
|
|
385
386
|
},
|
|
386
|
-
children: [/* @__PURE__ */
|
|
387
|
-
style: H,
|
|
388
|
-
children: t("bigconsole.settings.display.widgetBorders.label", "Show Widget Borders")
|
|
389
|
-
}), /* @__PURE__ */ v("p", {
|
|
387
|
+
children: [/* @__PURE__ */ b("div", { children: [/* @__PURE__ */ y("label", {
|
|
390
388
|
style: U,
|
|
391
|
-
children:
|
|
392
|
-
})
|
|
393
|
-
|
|
389
|
+
children: n("bigconsole.settings.display.widgetBorders.label", "Show Widget Borders")
|
|
390
|
+
}), /* @__PURE__ */ y("p", {
|
|
391
|
+
style: W,
|
|
392
|
+
children: n("bigconsole.settings.display.widgetBorders.help", "Display borders around widgets in dashboards")
|
|
393
|
+
})] }), /* @__PURE__ */ y("button", {
|
|
394
|
+
onClick: () => I("showWidgetBorders", !x.showWidgetBorders),
|
|
394
395
|
role: "switch",
|
|
395
|
-
"aria-checked":
|
|
396
|
-
"aria-label":
|
|
396
|
+
"aria-checked": x.showWidgetBorders,
|
|
397
|
+
"aria-label": n("bigconsole.settings.display.widgetBorders.label", "Show Widget Borders"),
|
|
397
398
|
style: {
|
|
398
399
|
width: 44,
|
|
399
400
|
flexShrink: 0,
|
|
400
401
|
height: 24,
|
|
401
402
|
borderRadius: 12,
|
|
402
|
-
backgroundColor:
|
|
403
|
+
backgroundColor: x.showWidgetBorders ? "var(--color-action-primary-bg)" : "var(--color-bg-sunken)",
|
|
403
404
|
border: "none",
|
|
404
405
|
cursor: "pointer",
|
|
405
406
|
position: "relative",
|
|
406
407
|
transition: "background-color 200ms"
|
|
407
408
|
},
|
|
408
|
-
children: /* @__PURE__ */
|
|
409
|
+
children: /* @__PURE__ */ y("div", { style: {
|
|
409
410
|
width: 18,
|
|
410
411
|
height: 18,
|
|
411
412
|
borderRadius: "50%",
|
|
412
413
|
backgroundColor: "var(--color-action-primary-text)",
|
|
413
414
|
position: "absolute",
|
|
414
415
|
top: 3,
|
|
415
|
-
left:
|
|
416
|
+
left: x.showWidgetBorders ? 23 : 3,
|
|
416
417
|
transition: "left 200ms"
|
|
417
418
|
} })
|
|
418
419
|
})]
|
|
419
420
|
}),
|
|
420
|
-
/* @__PURE__ */
|
|
421
|
+
/* @__PURE__ */ b("div", {
|
|
421
422
|
style: {
|
|
422
423
|
display: "flex",
|
|
423
424
|
alignItems: "center",
|
|
424
425
|
justifyContent: "space-between"
|
|
425
426
|
},
|
|
426
|
-
children: [/* @__PURE__ */
|
|
427
|
-
style: H,
|
|
428
|
-
children: t("bigconsole.settings.display.compactMode.label", "Compact Mode")
|
|
429
|
-
}), /* @__PURE__ */ v("p", {
|
|
427
|
+
children: [/* @__PURE__ */ b("div", { children: [/* @__PURE__ */ y("label", {
|
|
430
428
|
style: U,
|
|
431
|
-
children:
|
|
432
|
-
})
|
|
433
|
-
|
|
429
|
+
children: n("bigconsole.settings.display.compactMode.label", "Compact Mode")
|
|
430
|
+
}), /* @__PURE__ */ y("p", {
|
|
431
|
+
style: W,
|
|
432
|
+
children: n("bigconsole.settings.display.compactMode.help", "Reduce padding and spacing for more content")
|
|
433
|
+
})] }), /* @__PURE__ */ y("button", {
|
|
434
|
+
onClick: () => I("compactMode", !x.compactMode),
|
|
434
435
|
role: "switch",
|
|
435
|
-
"aria-checked":
|
|
436
|
-
"aria-label":
|
|
436
|
+
"aria-checked": x.compactMode,
|
|
437
|
+
"aria-label": n("bigconsole.settings.display.compactMode.label", "Compact Mode"),
|
|
437
438
|
style: {
|
|
438
439
|
width: 44,
|
|
439
440
|
flexShrink: 0,
|
|
440
441
|
height: 24,
|
|
441
442
|
borderRadius: 12,
|
|
442
|
-
backgroundColor:
|
|
443
|
+
backgroundColor: x.compactMode ? "var(--color-action-primary-bg)" : "var(--color-bg-sunken)",
|
|
443
444
|
border: "none",
|
|
444
445
|
cursor: "pointer",
|
|
445
446
|
position: "relative",
|
|
446
447
|
transition: "background-color 200ms"
|
|
447
448
|
},
|
|
448
|
-
children: /* @__PURE__ */
|
|
449
|
+
children: /* @__PURE__ */ y("div", { style: {
|
|
449
450
|
width: 18,
|
|
450
451
|
height: 18,
|
|
451
452
|
borderRadius: "50%",
|
|
452
453
|
backgroundColor: "var(--color-action-primary-text)",
|
|
453
454
|
position: "absolute",
|
|
454
455
|
top: 3,
|
|
455
|
-
left:
|
|
456
|
+
left: x.compactMode ? 23 : 3,
|
|
456
457
|
transition: "left 200ms"
|
|
457
458
|
} })
|
|
458
459
|
})]
|
|
459
460
|
}),
|
|
460
|
-
/* @__PURE__ */
|
|
461
|
+
/* @__PURE__ */ b("div", {
|
|
461
462
|
style: {
|
|
462
463
|
display: "flex",
|
|
463
464
|
alignItems: "center",
|
|
464
465
|
justifyContent: "space-between"
|
|
465
466
|
},
|
|
466
|
-
children: [/* @__PURE__ */
|
|
467
|
-
style: H,
|
|
468
|
-
children: t("bigconsole.settings.display.animations.label", "Animations")
|
|
469
|
-
}), /* @__PURE__ */ v("p", {
|
|
467
|
+
children: [/* @__PURE__ */ b("div", { children: [/* @__PURE__ */ y("label", {
|
|
470
468
|
style: U,
|
|
471
|
-
children:
|
|
472
|
-
})
|
|
473
|
-
|
|
469
|
+
children: n("bigconsole.settings.display.animations.label", "Animations")
|
|
470
|
+
}), /* @__PURE__ */ y("p", {
|
|
471
|
+
style: W,
|
|
472
|
+
children: n("bigconsole.settings.display.animations.help", "Enable transition animations and effects")
|
|
473
|
+
})] }), /* @__PURE__ */ y("button", {
|
|
474
|
+
onClick: () => I("animationsEnabled", !x.animationsEnabled),
|
|
474
475
|
role: "switch",
|
|
475
|
-
"aria-checked":
|
|
476
|
-
"aria-label":
|
|
476
|
+
"aria-checked": x.animationsEnabled,
|
|
477
|
+
"aria-label": n("bigconsole.settings.display.animations.label", "Animations"),
|
|
477
478
|
style: {
|
|
478
479
|
width: 44,
|
|
479
480
|
flexShrink: 0,
|
|
480
481
|
height: 24,
|
|
481
482
|
borderRadius: 12,
|
|
482
|
-
backgroundColor:
|
|
483
|
+
backgroundColor: x.animationsEnabled ? "var(--color-action-primary-bg)" : "var(--color-bg-sunken)",
|
|
483
484
|
border: "none",
|
|
484
485
|
cursor: "pointer",
|
|
485
486
|
position: "relative",
|
|
486
487
|
transition: "background-color 200ms"
|
|
487
488
|
},
|
|
488
|
-
children: /* @__PURE__ */
|
|
489
|
+
children: /* @__PURE__ */ y("div", { style: {
|
|
489
490
|
width: 18,
|
|
490
491
|
height: 18,
|
|
491
492
|
borderRadius: "50%",
|
|
492
493
|
backgroundColor: "var(--color-action-primary-text)",
|
|
493
494
|
position: "absolute",
|
|
494
495
|
top: 3,
|
|
495
|
-
left:
|
|
496
|
+
left: x.animationsEnabled ? 23 : 3,
|
|
496
497
|
transition: "left 200ms"
|
|
497
498
|
} })
|
|
498
499
|
})]
|
|
@@ -502,7 +503,8 @@ var b = a(function() {
|
|
|
502
503
|
})
|
|
503
504
|
]
|
|
504
505
|
}),
|
|
505
|
-
|
|
506
|
+
/* @__PURE__ */ y(t, {}),
|
|
507
|
+
e ? /* @__PURE__ */ y("div", {
|
|
506
508
|
"data-testid": "bigconsole-settings-extension",
|
|
507
509
|
children: e
|
|
508
510
|
}) : null
|
|
@@ -510,4 +512,4 @@ var b = a(function() {
|
|
|
510
512
|
})
|
|
511
513
|
});
|
|
512
514
|
};
|
|
513
|
-
export {
|
|
515
|
+
export { x as SettingsPage, x as default };
|