@burdenoff/microfe-bigconsole 2026.804.2 → 2026.805.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.
- package/dist/bigconsole/AdminRoot.js +21 -16
- package/dist/bigconsole/AdminRoot.js.map +1 -1
- package/dist/bigconsole/BigConsoleRoot.js +44 -39
- package/dist/bigconsole/BigConsoleRoot.js.map +1 -1
- package/dist/bigconsole/components/dashboard/DashboardToolbar.js +115 -100
- package/dist/bigconsole/components/dashboard/DashboardToolbar.js.map +1 -1
- package/dist/bigconsole/components/dashboard/PageTabsManager/PageTabsManager.js +100 -98
- package/dist/bigconsole/components/dashboard/PageTabsManager/PageTabsManager.js.map +1 -1
- package/dist/bigconsole/components/dashboard/ShareDialog/EmbedTab.js +164 -161
- package/dist/bigconsole/components/dashboard/ShareDialog/EmbedTab.js.map +1 -1
- package/dist/bigconsole/components/datasink/DataSinkCard.js +20 -20
- package/dist/bigconsole/components/datasink/DataSinkCard.js.map +1 -1
- package/dist/bigconsole/components/datasink/ImportDataGuideDialog.js +216 -49
- package/dist/bigconsole/components/datasink/ImportDataGuideDialog.js.map +1 -1
- package/dist/bigconsole/components/widgets/ActionConfigDialog.js +96 -90
- package/dist/bigconsole/components/widgets/ActionConfigDialog.js.map +1 -1
- package/dist/bigconsole/components/widgets/WidgetMenu.js +87 -76
- package/dist/bigconsole/components/widgets/WidgetMenu.js.map +1 -1
- package/dist/bigconsole/components/widgets/widget-actions/WidgetActions.js +120 -118
- package/dist/bigconsole/components/widgets/widget-actions/WidgetActions.js.map +1 -1
- package/dist/bigconsole/pages/DashboardBuilderPage.js +113 -104
- package/dist/bigconsole/pages/DashboardBuilderPage.js.map +1 -1
- package/dist/bigconsole/pages/DashboardViewPage.js +208 -199
- package/dist/bigconsole/pages/DashboardViewPage.js.map +1 -1
- package/dist/bigconsole/pages/DashboardsPage.js +376 -325
- package/dist/bigconsole/pages/DashboardsPage.js.map +1 -1
- package/dist/bigconsole/pages/DataParsersPage.js +135 -125
- package/dist/bigconsole/pages/DataParsersPage.js.map +1 -1
- package/dist/bigconsole/pages/DataSinkBuilderPage.js +182 -172
- package/dist/bigconsole/pages/DataSinkBuilderPage.js.map +1 -1
- package/dist/bigconsole/pages/DataSinkViewPage.js +233 -198
- package/dist/bigconsole/pages/DataSinkViewPage.js.map +1 -1
- package/dist/bigconsole/pages/DataSinksPage.js +281 -268
- package/dist/bigconsole/pages/DataSinksPage.js.map +1 -1
- package/dist/bigconsole/pages/ParserBuilderPage.js +238 -223
- package/dist/bigconsole/pages/ParserBuilderPage.js.map +1 -1
- package/dist/bigconsole/pages/ParserViewPage.js +162 -144
- package/dist/bigconsole/pages/ParserViewPage.js.map +1 -1
- package/dist/bigconsole/pages/PipelineBuilderPage.js +212 -204
- package/dist/bigconsole/pages/PipelineBuilderPage.js.map +1 -1
- package/dist/bigconsole/pages/PipelineViewPage.js +191 -183
- package/dist/bigconsole/pages/PipelineViewPage.js.map +1 -1
- package/dist/bigconsole/pages/PipelinesPage.js +128 -103
- package/dist/bigconsole/pages/PipelinesPage.js.map +1 -1
- package/dist/bigconsole/pages/WorkflowViewPage.js +238 -217
- package/dist/bigconsole/pages/WorkflowViewPage.js.map +1 -1
- package/dist/bigconsole/pages/WorkflowsPage.js +116 -102
- package/dist/bigconsole/pages/WorkflowsPage.js.map +1 -1
- package/dist/bigconsole/utils/csv.js +91 -0
- package/dist/bigconsole/utils/csv.js.map +1 -0
- package/dist/constants/permissions.js +83 -0
- package/dist/constants/permissions.js.map +1 -0
- package/package.json +2 -2
|
@@ -1,8 +1,10 @@
|
|
|
1
|
-
import
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
1
|
+
import { BIGCONSOLE_PERMISSIONS as e } from "../../../../constants/permissions.js";
|
|
2
|
+
import t, { themeChoiceFromPolicy as n } from "../../../hooks/useDashboardEmbedPolicy.js";
|
|
3
|
+
import { useEffect as r, useMemo as i, useRef as a, useState as o } from "react";
|
|
4
|
+
import { usePermissions as s } from "@burdenoff/fe-libs/shared/providers/shell";
|
|
5
|
+
import { Fragment as c, jsx as l, jsxs as u } from "react/jsx-runtime";
|
|
4
6
|
//#region src/bigconsole/components/dashboard/ShareDialog/EmbedTab.tsx
|
|
5
|
-
var
|
|
7
|
+
var d = [
|
|
6
8
|
{
|
|
7
9
|
value: "light",
|
|
8
10
|
label: "Light"
|
|
@@ -16,7 +18,7 @@ var ee = [
|
|
|
16
18
|
label: "Auto (match viewer)"
|
|
17
19
|
}
|
|
18
20
|
];
|
|
19
|
-
function
|
|
21
|
+
function ee(e, t) {
|
|
20
22
|
return t === "light" ? e : e.replace(/(?<=\s)src="([^"]*)"/, (e, n) => {
|
|
21
23
|
let r = n.indexOf("#"), i = r === -1 ? n : n.slice(0, r), a = r === -1 ? "" : n.slice(r);
|
|
22
24
|
return `src="${i}${i.includes("?") ? "&" : "?"}theme=${t}${a}"`;
|
|
@@ -32,60 +34,60 @@ function te(e) {
|
|
|
32
34
|
return null;
|
|
33
35
|
}
|
|
34
36
|
}
|
|
35
|
-
function
|
|
36
|
-
let { policy:
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
}, [
|
|
40
|
-
!
|
|
41
|
-
}, [
|
|
42
|
-
|
|
37
|
+
function f({ dashboardId: f, colors: p }) {
|
|
38
|
+
let { policy: m, secret: h, loading: g, error: _, fetchPolicy: v, publishToWeb: y, applyPresentation: b, setAllowedOrigins: x, rotateKey: S, unpublish: ne } = t(), { hasPermission: C } = s(), w = C(e.DASHBOARD_MANAGE_EMBED), [T, E] = o(""), [D, O] = o([]), [k, A] = o(!1), [j, M] = o(!1), [N, P] = o("light"), [F, I] = o(!1), [L, R] = o(!0), [re, z] = o(!1), [B, V] = o(null), H = a(null), U = a(null);
|
|
39
|
+
r(() => {
|
|
40
|
+
f && v(f);
|
|
41
|
+
}, [f, v]), r(() => {
|
|
42
|
+
!m || H.current === m.id || (H.current = m.id, P(n(m.presentationTheme)), I(m.showDashboardTitle), R(m.showBrandingFooter));
|
|
43
|
+
}, [m]), r(() => () => {
|
|
44
|
+
U.current && clearTimeout(U.current);
|
|
43
45
|
}, []);
|
|
44
|
-
let
|
|
45
|
-
|
|
46
|
-
let e = te(
|
|
46
|
+
let W = m?.status === "ACTIVE", G = W ? m?.allowedParentOrigins ?? [] : D, K = i(() => h?.iframeSnippet ? ee(h.iframeSnippet, N) : null, [h, N]), q = () => {
|
|
47
|
+
V(null);
|
|
48
|
+
let e = te(T);
|
|
47
49
|
if (!e) {
|
|
48
|
-
|
|
50
|
+
V("Enter a valid https origin, e.g. https://example.com");
|
|
49
51
|
return;
|
|
50
52
|
}
|
|
51
|
-
if (
|
|
52
|
-
|
|
53
|
+
if (G.includes(e)) {
|
|
54
|
+
E("");
|
|
53
55
|
return;
|
|
54
56
|
}
|
|
55
|
-
|
|
56
|
-
},
|
|
57
|
-
|
|
58
|
-
},
|
|
59
|
-
if (
|
|
60
|
-
|
|
57
|
+
W && m ? x(m.id, [...G, e]) : O((t) => [...t, e]), E("");
|
|
58
|
+
}, J = (e) => {
|
|
59
|
+
W && m ? x(m.id, G.filter((t) => t !== e)) : O((t) => t.filter((t) => t !== e));
|
|
60
|
+
}, Y = async () => {
|
|
61
|
+
if (V(null), D.length === 0) {
|
|
62
|
+
V("Add at least one allowed website domain before publishing.");
|
|
61
63
|
return;
|
|
62
64
|
}
|
|
63
|
-
if (!
|
|
64
|
-
|
|
65
|
+
if (!k) {
|
|
66
|
+
V("Please confirm this dashboard is safe to be public.");
|
|
65
67
|
return;
|
|
66
68
|
}
|
|
67
|
-
await
|
|
68
|
-
theme:
|
|
69
|
-
showTitle:
|
|
70
|
-
showBranding:
|
|
69
|
+
await y(f, D, !0, {
|
|
70
|
+
theme: N,
|
|
71
|
+
showTitle: F,
|
|
72
|
+
showBranding: L
|
|
71
73
|
});
|
|
72
|
-
},
|
|
73
|
-
|
|
74
|
-
theme:
|
|
75
|
-
showTitle:
|
|
76
|
-
showBranding:
|
|
77
|
-
}) && (
|
|
78
|
-
},
|
|
74
|
+
}, ie = async () => {
|
|
75
|
+
m && (V(null), await b(m.id, {
|
|
76
|
+
theme: N,
|
|
77
|
+
showTitle: F,
|
|
78
|
+
showBranding: L
|
|
79
|
+
}) && (z(!0), U.current && clearTimeout(U.current), U.current = setTimeout(() => z(!1), 1500)));
|
|
80
|
+
}, X = async (e) => {
|
|
79
81
|
try {
|
|
80
|
-
await navigator.clipboard.writeText(e),
|
|
82
|
+
await navigator.clipboard.writeText(e), M(!0), setTimeout(() => M(!1), 1500);
|
|
81
83
|
} catch {
|
|
82
|
-
|
|
84
|
+
V("Could not copy — select and copy manually.");
|
|
83
85
|
}
|
|
84
|
-
},
|
|
86
|
+
}, ae = {
|
|
85
87
|
padding: "8px 14px",
|
|
86
88
|
borderRadius: "8px",
|
|
87
89
|
border: "none",
|
|
88
|
-
background:
|
|
90
|
+
background: p.actionPrimaryBg,
|
|
89
91
|
color: "#fff",
|
|
90
92
|
fontSize: "13px",
|
|
91
93
|
fontWeight: 600,
|
|
@@ -93,25 +95,25 @@ function u({ dashboardId: u, colors: d }) {
|
|
|
93
95
|
}, Z = {
|
|
94
96
|
padding: "8px 14px",
|
|
95
97
|
borderRadius: "8px",
|
|
96
|
-
border: `1px solid ${
|
|
98
|
+
border: `1px solid ${p.borderDefault}`,
|
|
97
99
|
background: "transparent",
|
|
98
|
-
color:
|
|
100
|
+
color: p.textPrimary,
|
|
99
101
|
fontSize: "13px",
|
|
100
102
|
cursor: "pointer"
|
|
101
|
-
},
|
|
103
|
+
}, oe = {
|
|
102
104
|
flex: 1,
|
|
103
105
|
padding: "8px 10px",
|
|
104
106
|
borderRadius: "8px",
|
|
105
|
-
border: `1px solid ${
|
|
106
|
-
background:
|
|
107
|
-
color:
|
|
107
|
+
border: `1px solid ${p.borderDefault}`,
|
|
108
|
+
background: p.bgSecondary,
|
|
109
|
+
color: p.textPrimary,
|
|
108
110
|
fontSize: "13px"
|
|
109
|
-
},
|
|
111
|
+
}, se = {
|
|
110
112
|
padding: "4px 8px",
|
|
111
113
|
borderRadius: "6px",
|
|
112
|
-
border: `1px solid ${
|
|
113
|
-
background:
|
|
114
|
-
color:
|
|
114
|
+
border: `1px solid ${p.borderDefault}`,
|
|
115
|
+
background: p.bgSecondary,
|
|
116
|
+
color: p.textPrimary,
|
|
115
117
|
fontSize: "12px",
|
|
116
118
|
cursor: "pointer"
|
|
117
119
|
}, Q = {
|
|
@@ -119,164 +121,165 @@ function u({ dashboardId: u, colors: d }) {
|
|
|
119
121
|
gap: "8px",
|
|
120
122
|
alignItems: "flex-start",
|
|
121
123
|
fontSize: "12px",
|
|
122
|
-
color:
|
|
123
|
-
}, $ = /* @__PURE__ */
|
|
124
|
+
color: p.textSecondary
|
|
125
|
+
}, $ = /* @__PURE__ */ u("div", {
|
|
124
126
|
style: {
|
|
125
127
|
display: "flex",
|
|
126
128
|
flexDirection: "column",
|
|
127
129
|
gap: "10px"
|
|
128
130
|
},
|
|
129
131
|
children: [
|
|
130
|
-
/* @__PURE__ */
|
|
132
|
+
/* @__PURE__ */ u("label", {
|
|
131
133
|
style: {
|
|
132
134
|
display: "flex",
|
|
133
135
|
alignItems: "center",
|
|
134
136
|
justifyContent: "space-between",
|
|
135
137
|
gap: "8px"
|
|
136
138
|
},
|
|
137
|
-
children: [/* @__PURE__ */
|
|
139
|
+
children: [/* @__PURE__ */ l("span", {
|
|
138
140
|
style: {
|
|
139
141
|
fontSize: "12px",
|
|
140
|
-
color:
|
|
142
|
+
color: p.textSecondary
|
|
141
143
|
},
|
|
142
144
|
children: "Theme"
|
|
143
|
-
}), /* @__PURE__ */
|
|
144
|
-
value:
|
|
145
|
+
}), /* @__PURE__ */ l("select", {
|
|
146
|
+
value: N,
|
|
145
147
|
onChange: (e) => {
|
|
146
148
|
let t = e.target.value;
|
|
147
|
-
(t === "light" || t === "dark" || t === "auto") &&
|
|
149
|
+
(t === "light" || t === "dark" || t === "auto") && P(t);
|
|
148
150
|
},
|
|
149
|
-
style:
|
|
150
|
-
children:
|
|
151
|
+
style: se,
|
|
152
|
+
children: d.map((e) => /* @__PURE__ */ l("option", {
|
|
151
153
|
value: e.value,
|
|
152
154
|
children: e.label
|
|
153
155
|
}, e.value))
|
|
154
156
|
})]
|
|
155
157
|
}),
|
|
156
|
-
/* @__PURE__ */
|
|
158
|
+
/* @__PURE__ */ u("label", {
|
|
157
159
|
style: Q,
|
|
158
|
-
children: [/* @__PURE__ */
|
|
160
|
+
children: [/* @__PURE__ */ l("input", {
|
|
159
161
|
type: "checkbox",
|
|
160
|
-
checked:
|
|
161
|
-
onChange: (e) =>
|
|
162
|
-
}), /* @__PURE__ */
|
|
162
|
+
checked: F,
|
|
163
|
+
onChange: (e) => I(e.target.checked)
|
|
164
|
+
}), /* @__PURE__ */ l("span", { children: "Show the dashboard title as a header" })]
|
|
163
165
|
}),
|
|
164
|
-
/* @__PURE__ */
|
|
166
|
+
/* @__PURE__ */ u("label", {
|
|
165
167
|
style: Q,
|
|
166
|
-
children: [/* @__PURE__ */
|
|
168
|
+
children: [/* @__PURE__ */ l("input", {
|
|
167
169
|
type: "checkbox",
|
|
168
|
-
checked:
|
|
169
|
-
onChange: (e) =>
|
|
170
|
-
}), /* @__PURE__ */
|
|
170
|
+
checked: L,
|
|
171
|
+
onChange: (e) => R(e.target.checked)
|
|
172
|
+
}), /* @__PURE__ */ l("span", { children: "Show a subtle “Powered by BigConsole” footer" })]
|
|
171
173
|
})
|
|
172
174
|
]
|
|
173
175
|
});
|
|
174
|
-
return /* @__PURE__ */
|
|
176
|
+
return /* @__PURE__ */ u("div", {
|
|
175
177
|
style: { padding: "20px 24px" },
|
|
176
178
|
children: [
|
|
177
|
-
/* @__PURE__ */
|
|
179
|
+
/* @__PURE__ */ u("div", {
|
|
178
180
|
style: {
|
|
179
181
|
display: "flex",
|
|
180
182
|
alignItems: "center",
|
|
181
183
|
justifyContent: "space-between",
|
|
182
184
|
padding: "12px 14px",
|
|
183
185
|
borderRadius: "10px",
|
|
184
|
-
background:
|
|
186
|
+
background: p.bgSecondary,
|
|
185
187
|
marginBottom: "16px"
|
|
186
188
|
},
|
|
187
|
-
children: [/* @__PURE__ */
|
|
189
|
+
children: [/* @__PURE__ */ u("div", { children: [/* @__PURE__ */ l("div", {
|
|
188
190
|
style: {
|
|
189
191
|
fontSize: "14px",
|
|
190
192
|
fontWeight: 600,
|
|
191
|
-
color:
|
|
193
|
+
color: p.textPrimary
|
|
192
194
|
},
|
|
193
195
|
children: "Publish to the web"
|
|
194
|
-
}), /* @__PURE__ */
|
|
196
|
+
}), /* @__PURE__ */ l("div", {
|
|
195
197
|
style: {
|
|
196
198
|
fontSize: "12px",
|
|
197
|
-
color:
|
|
199
|
+
color: p.textSecondary,
|
|
198
200
|
marginTop: "2px"
|
|
199
201
|
},
|
|
200
|
-
children:
|
|
201
|
-
})] }), /* @__PURE__ */
|
|
202
|
+
children: W ? "This dashboard is live. Anyone with the link on an allowed website sees its live data." : "Embed this dashboard on your website. Viewers see live data — no login required."
|
|
203
|
+
})] }), /* @__PURE__ */ l("span", {
|
|
202
204
|
style: {
|
|
203
205
|
fontSize: "11px",
|
|
204
206
|
fontWeight: 700,
|
|
205
207
|
padding: "3px 8px",
|
|
206
208
|
borderRadius: "999px",
|
|
207
209
|
color: "#fff",
|
|
208
|
-
background:
|
|
210
|
+
background: W ? p.statusSuccessBg : p.textTertiary
|
|
209
211
|
},
|
|
210
|
-
children:
|
|
212
|
+
children: W ? "PUBLISHED" : "PRIVATE"
|
|
211
213
|
})]
|
|
212
214
|
}),
|
|
213
|
-
/* @__PURE__ */
|
|
215
|
+
/* @__PURE__ */ u("div", {
|
|
214
216
|
style: { marginBottom: "16px" },
|
|
215
217
|
children: [
|
|
216
|
-
/* @__PURE__ */
|
|
218
|
+
/* @__PURE__ */ l("div", {
|
|
217
219
|
style: {
|
|
218
220
|
fontSize: "12px",
|
|
219
221
|
fontWeight: 600,
|
|
220
|
-
color:
|
|
222
|
+
color: p.textSecondary,
|
|
221
223
|
marginBottom: "6px"
|
|
222
224
|
},
|
|
223
225
|
children: "Allowed website domains"
|
|
224
226
|
}),
|
|
225
|
-
/* @__PURE__ */
|
|
227
|
+
/* @__PURE__ */ u("div", {
|
|
226
228
|
style: {
|
|
227
229
|
display: "flex",
|
|
228
230
|
gap: "8px",
|
|
229
231
|
marginBottom: "8px"
|
|
230
232
|
},
|
|
231
|
-
children: [/* @__PURE__ */
|
|
232
|
-
style:
|
|
233
|
+
children: [/* @__PURE__ */ l("input", {
|
|
234
|
+
style: oe,
|
|
233
235
|
placeholder: "https://yoursite.com",
|
|
234
|
-
value:
|
|
235
|
-
onChange: (e) =>
|
|
236
|
+
value: T,
|
|
237
|
+
onChange: (e) => E(e.target.value),
|
|
236
238
|
onKeyDown: (e) => {
|
|
237
|
-
e.key === "Enter" &&
|
|
239
|
+
e.key === "Enter" && q();
|
|
238
240
|
}
|
|
239
|
-
}), /* @__PURE__ */
|
|
241
|
+
}), /* @__PURE__ */ l("button", {
|
|
240
242
|
style: Z,
|
|
241
|
-
onClick:
|
|
243
|
+
onClick: q,
|
|
242
244
|
type: "button",
|
|
245
|
+
disabled: !w,
|
|
243
246
|
children: "Add"
|
|
244
247
|
})]
|
|
245
248
|
}),
|
|
246
|
-
|
|
249
|
+
G.length === 0 ? /* @__PURE__ */ l("div", {
|
|
247
250
|
style: {
|
|
248
251
|
fontSize: "12px",
|
|
249
|
-
color:
|
|
252
|
+
color: p.textTertiary
|
|
250
253
|
},
|
|
251
254
|
children: "No domains yet. Only listed https domains may frame this dashboard."
|
|
252
|
-
}) : /* @__PURE__ */
|
|
255
|
+
}) : /* @__PURE__ */ l("div", {
|
|
253
256
|
style: {
|
|
254
257
|
display: "flex",
|
|
255
258
|
flexDirection: "column",
|
|
256
259
|
gap: "6px"
|
|
257
260
|
},
|
|
258
|
-
children:
|
|
261
|
+
children: G.map((e) => /* @__PURE__ */ u("div", {
|
|
259
262
|
style: {
|
|
260
263
|
display: "flex",
|
|
261
264
|
alignItems: "center",
|
|
262
265
|
justifyContent: "space-between",
|
|
263
266
|
padding: "6px 10px",
|
|
264
267
|
borderRadius: "8px",
|
|
265
|
-
background:
|
|
268
|
+
background: p.bgTertiary
|
|
266
269
|
},
|
|
267
|
-
children: [/* @__PURE__ */
|
|
270
|
+
children: [/* @__PURE__ */ l("span", {
|
|
268
271
|
style: {
|
|
269
272
|
fontSize: "13px",
|
|
270
|
-
color:
|
|
273
|
+
color: p.textPrimary
|
|
271
274
|
},
|
|
272
275
|
children: e
|
|
273
|
-
}), /* @__PURE__ */
|
|
276
|
+
}), w && /* @__PURE__ */ l("button", {
|
|
274
277
|
style: {
|
|
275
278
|
...Z,
|
|
276
279
|
padding: "2px 8px",
|
|
277
|
-
color:
|
|
280
|
+
color: p.statusErrorText
|
|
278
281
|
},
|
|
279
|
-
onClick: () =>
|
|
282
|
+
onClick: () => J(e),
|
|
280
283
|
type: "button",
|
|
281
284
|
children: "Remove"
|
|
282
285
|
})]
|
|
@@ -284,184 +287,184 @@ function u({ dashboardId: u, colors: d }) {
|
|
|
284
287
|
})
|
|
285
288
|
]
|
|
286
289
|
}),
|
|
287
|
-
!
|
|
290
|
+
!W && /* @__PURE__ */ u("div", {
|
|
288
291
|
style: { marginBottom: "16px" },
|
|
289
|
-
children: [/* @__PURE__ */
|
|
292
|
+
children: [/* @__PURE__ */ l("div", {
|
|
290
293
|
style: {
|
|
291
294
|
fontSize: "12px",
|
|
292
295
|
fontWeight: 600,
|
|
293
|
-
color:
|
|
296
|
+
color: p.textSecondary,
|
|
294
297
|
marginBottom: "8px"
|
|
295
298
|
},
|
|
296
299
|
children: "Presentation"
|
|
297
300
|
}), $]
|
|
298
301
|
}),
|
|
299
|
-
!
|
|
302
|
+
!W && /* @__PURE__ */ u("div", {
|
|
300
303
|
style: { marginBottom: "8px" },
|
|
301
|
-
children: [/* @__PURE__ */
|
|
304
|
+
children: [/* @__PURE__ */ u("label", {
|
|
302
305
|
style: {
|
|
303
306
|
display: "flex",
|
|
304
307
|
gap: "8px",
|
|
305
308
|
alignItems: "flex-start",
|
|
306
309
|
marginBottom: "12px"
|
|
307
310
|
},
|
|
308
|
-
children: [/* @__PURE__ */
|
|
311
|
+
children: [/* @__PURE__ */ l("input", {
|
|
309
312
|
type: "checkbox",
|
|
310
|
-
checked:
|
|
311
|
-
onChange: (e) =>
|
|
312
|
-
}), /* @__PURE__ */
|
|
313
|
+
checked: k,
|
|
314
|
+
onChange: (e) => A(e.target.checked)
|
|
315
|
+
}), /* @__PURE__ */ l("span", {
|
|
313
316
|
style: {
|
|
314
317
|
fontSize: "12px",
|
|
315
|
-
color:
|
|
318
|
+
color: p.textSecondary
|
|
316
319
|
},
|
|
317
320
|
children: "I understand this makes the dashboard's live data visible to anyone with the link, and I confirm it is safe to be public."
|
|
318
321
|
})]
|
|
319
|
-
}), /* @__PURE__ */
|
|
320
|
-
style:
|
|
321
|
-
onClick:
|
|
322
|
-
disabled:
|
|
322
|
+
}), /* @__PURE__ */ l("button", {
|
|
323
|
+
style: ae,
|
|
324
|
+
onClick: Y,
|
|
325
|
+
disabled: g || !w,
|
|
323
326
|
type: "button",
|
|
324
|
-
children:
|
|
327
|
+
children: g ? "Publishing…" : "Publish to web"
|
|
325
328
|
})]
|
|
326
329
|
}),
|
|
327
|
-
|
|
328
|
-
|
|
330
|
+
W && /* @__PURE__ */ u(c, { children: [
|
|
331
|
+
K ? /* @__PURE__ */ u("div", {
|
|
329
332
|
style: { marginBottom: "16px" },
|
|
330
333
|
children: [
|
|
331
|
-
/* @__PURE__ */
|
|
334
|
+
/* @__PURE__ */ l("div", {
|
|
332
335
|
style: { marginBottom: "6px" },
|
|
333
|
-
children: /* @__PURE__ */
|
|
336
|
+
children: /* @__PURE__ */ l("span", {
|
|
334
337
|
style: {
|
|
335
338
|
fontSize: "12px",
|
|
336
339
|
fontWeight: 600,
|
|
337
|
-
color:
|
|
340
|
+
color: p.textSecondary
|
|
338
341
|
},
|
|
339
342
|
children: "Embed snippet"
|
|
340
343
|
})
|
|
341
344
|
}),
|
|
342
|
-
/* @__PURE__ */
|
|
345
|
+
/* @__PURE__ */ l("textarea", {
|
|
343
346
|
readOnly: !0,
|
|
344
|
-
value:
|
|
347
|
+
value: K,
|
|
345
348
|
style: {
|
|
346
349
|
width: "100%",
|
|
347
350
|
minHeight: "96px",
|
|
348
351
|
padding: "10px",
|
|
349
352
|
borderRadius: "8px",
|
|
350
|
-
border: `1px solid ${
|
|
351
|
-
background:
|
|
352
|
-
color:
|
|
353
|
+
border: `1px solid ${p.borderDefault}`,
|
|
354
|
+
background: p.bgSecondary,
|
|
355
|
+
color: p.textPrimary,
|
|
353
356
|
fontFamily: "monospace",
|
|
354
357
|
fontSize: "12px",
|
|
355
358
|
resize: "vertical"
|
|
356
359
|
}
|
|
357
360
|
}),
|
|
358
|
-
/* @__PURE__ */
|
|
361
|
+
/* @__PURE__ */ l("button", {
|
|
359
362
|
style: {
|
|
360
363
|
...Z,
|
|
361
364
|
marginTop: "8px"
|
|
362
365
|
},
|
|
363
|
-
onClick: () =>
|
|
366
|
+
onClick: () => X(K),
|
|
364
367
|
type: "button",
|
|
365
|
-
children:
|
|
368
|
+
children: j ? "Copied ✓" : "Copy snippet"
|
|
366
369
|
})
|
|
367
370
|
]
|
|
368
|
-
}) : /* @__PURE__ */
|
|
371
|
+
}) : /* @__PURE__ */ u("div", {
|
|
369
372
|
style: {
|
|
370
373
|
fontSize: "12px",
|
|
371
|
-
color:
|
|
372
|
-
background:
|
|
374
|
+
color: p.textSecondary,
|
|
375
|
+
background: p.bgSecondary,
|
|
373
376
|
borderRadius: "8px",
|
|
374
377
|
padding: "10px 12px",
|
|
375
378
|
marginBottom: "16px"
|
|
376
379
|
},
|
|
377
380
|
children: [
|
|
378
381
|
"The embed link is already active. For security the snippet (which contains the secret key) is only shown once at publish time — use ",
|
|
379
|
-
/* @__PURE__ */
|
|
382
|
+
/* @__PURE__ */ l("strong", { children: "Rotate link" }),
|
|
380
383
|
" to generate a fresh snippet."
|
|
381
384
|
]
|
|
382
385
|
}),
|
|
383
|
-
/* @__PURE__ */
|
|
386
|
+
/* @__PURE__ */ u("div", {
|
|
384
387
|
style: { marginBottom: "16px" },
|
|
385
388
|
children: [
|
|
386
|
-
/* @__PURE__ */
|
|
389
|
+
/* @__PURE__ */ l("div", {
|
|
387
390
|
style: {
|
|
388
391
|
fontSize: "12px",
|
|
389
392
|
fontWeight: 600,
|
|
390
|
-
color:
|
|
393
|
+
color: p.textSecondary,
|
|
391
394
|
marginBottom: "8px"
|
|
392
395
|
},
|
|
393
396
|
children: "Presentation"
|
|
394
397
|
}),
|
|
395
398
|
$,
|
|
396
|
-
/* @__PURE__ */
|
|
399
|
+
/* @__PURE__ */ u("div", {
|
|
397
400
|
style: {
|
|
398
401
|
display: "flex",
|
|
399
402
|
alignItems: "center",
|
|
400
403
|
gap: "10px",
|
|
401
404
|
marginTop: "10px"
|
|
402
405
|
},
|
|
403
|
-
children: [/* @__PURE__ */
|
|
406
|
+
children: [/* @__PURE__ */ l("button", {
|
|
404
407
|
style: Z,
|
|
405
|
-
onClick:
|
|
406
|
-
disabled:
|
|
408
|
+
onClick: ie,
|
|
409
|
+
disabled: g || !w,
|
|
407
410
|
type: "button",
|
|
408
|
-
children:
|
|
409
|
-
}),
|
|
411
|
+
children: g ? "Applying…" : "Apply changes"
|
|
412
|
+
}), re && /* @__PURE__ */ l("span", {
|
|
410
413
|
style: {
|
|
411
414
|
fontSize: "12px",
|
|
412
|
-
color:
|
|
415
|
+
color: p.textTertiary
|
|
413
416
|
},
|
|
414
417
|
children: "Updated ✓"
|
|
415
418
|
})]
|
|
416
419
|
}),
|
|
417
|
-
/* @__PURE__ */
|
|
420
|
+
/* @__PURE__ */ l("div", {
|
|
418
421
|
style: {
|
|
419
422
|
fontSize: "11px",
|
|
420
|
-
color:
|
|
423
|
+
color: p.textTertiary,
|
|
421
424
|
marginTop: "6px"
|
|
422
425
|
},
|
|
423
426
|
children: "Changes apply to live embeds within a few seconds — no re-publish needed, and the embed link stays the same."
|
|
424
427
|
})
|
|
425
428
|
]
|
|
426
429
|
}),
|
|
427
|
-
/* @__PURE__ */
|
|
430
|
+
w && /* @__PURE__ */ u("div", {
|
|
428
431
|
style: {
|
|
429
432
|
display: "flex",
|
|
430
433
|
gap: "8px"
|
|
431
434
|
},
|
|
432
|
-
children: [/* @__PURE__ */
|
|
435
|
+
children: [/* @__PURE__ */ l("button", {
|
|
433
436
|
style: Z,
|
|
434
|
-
onClick: () =>
|
|
435
|
-
disabled:
|
|
437
|
+
onClick: () => m && S(m.id),
|
|
438
|
+
disabled: g,
|
|
436
439
|
type: "button",
|
|
437
440
|
children: "Rotate link"
|
|
438
|
-
}), /* @__PURE__ */
|
|
441
|
+
}), /* @__PURE__ */ l("button", {
|
|
439
442
|
style: {
|
|
440
443
|
...Z,
|
|
441
|
-
color:
|
|
442
|
-
borderColor:
|
|
444
|
+
color: p.statusErrorText,
|
|
445
|
+
borderColor: p.statusErrorText
|
|
443
446
|
},
|
|
444
447
|
onClick: () => {
|
|
445
|
-
|
|
448
|
+
m && window.confirm("Unpublish this dashboard? The embed will stop working immediately for anyone using the link.") && ne(m.id);
|
|
446
449
|
},
|
|
447
|
-
disabled:
|
|
450
|
+
disabled: g,
|
|
448
451
|
type: "button",
|
|
449
452
|
children: "Unpublish"
|
|
450
453
|
})]
|
|
451
454
|
})
|
|
452
455
|
] }),
|
|
453
|
-
(
|
|
456
|
+
(B || _) && /* @__PURE__ */ l("div", {
|
|
454
457
|
style: {
|
|
455
458
|
marginTop: "12px",
|
|
456
459
|
fontSize: "12px",
|
|
457
|
-
color:
|
|
460
|
+
color: p.statusErrorText
|
|
458
461
|
},
|
|
459
|
-
children:
|
|
462
|
+
children: B ?? _?.message
|
|
460
463
|
})
|
|
461
464
|
]
|
|
462
465
|
});
|
|
463
466
|
}
|
|
464
467
|
//#endregion
|
|
465
|
-
export {
|
|
468
|
+
export { f as default };
|
|
466
469
|
|
|
467
470
|
//# sourceMappingURL=EmbedTab.js.map
|