@burdenoff/microfe-bigconsole 2026.1011.10 → 2026.1012.1
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/README.md +19 -0
- package/dist/bigconsole/BigConsoleRoot.js +88 -82
- package/dist/bigconsole/BigConsoleRoutes.js +163 -136
- package/dist/bigconsole/assistant/assistantProduct.js +1 -4
- package/dist/bigconsole/assistant/pageContext.d.ts +0 -14
- package/dist/bigconsole/assistant/pageContext.js +1 -6
- package/dist/bigconsole/assistant/recordAdapters.js +26 -27
- package/dist/bigconsole/components/builder/inspector/DataBindingSection.js +31 -31
- package/dist/bigconsole/components/common/index.d.ts +0 -1
- package/dist/bigconsole/components/common/index.js +0 -1
- package/dist/bigconsole/components/dashboard/CreateDashboardDialog.js +44 -44
- package/dist/bigconsole/components/dashboard/DashboardCanvas.js +36 -36
- package/dist/bigconsole/components/dashboard/DashboardToolbar.js +59 -59
- package/dist/bigconsole/components/dashboard/DrilldownBreadcrumb.js +58 -57
- package/dist/bigconsole/components/dashboard/GlobalFiltersBar/FilterChip.js +30 -30
- package/dist/bigconsole/components/dashboard/GlobalFiltersBar/FilterEditor.js +41 -41
- package/dist/bigconsole/components/dashboard/GlobalFiltersBar/FilterPresetSelector.js +34 -34
- package/dist/bigconsole/components/dashboard/GlobalFiltersBar/GlobalFiltersBar.js +34 -34
- package/dist/bigconsole/components/dashboard/ImportDashboardDialog.js +110 -110
- package/dist/bigconsole/components/dashboard/PublishToStoreDialog.js +21 -21
- package/dist/bigconsole/components/dashboard/SavedViewsDropdown/SavedViewsDropdown.js +46 -46
- package/dist/bigconsole/components/dashboard/ShareDialog/EmbedTab.js +164 -173
- package/dist/bigconsole/components/dashboard/ShareDialog/ShareDialog.js +101 -101
- package/dist/bigconsole/components/dashboard/TemplateInstallOptions.js +31 -31
- package/dist/bigconsole/components/dashboard/TemplateLayoutPreview.js +15 -15
- package/dist/bigconsole/components/dashboard/TemplatePicker/TemplatePicker.js +1 -1
- package/dist/bigconsole/components/dashboard/WidgetPalette.js +165 -163
- package/dist/bigconsole/components/datasink/AlertExecutionHistory.js +37 -37
- package/dist/bigconsole/components/datasink/AlertRuleEditor.js +66 -66
- package/dist/bigconsole/components/datasink/CacheTTLSelector.js +35 -35
- package/dist/bigconsole/components/datasink/DataSinkCard.js +50 -51
- package/dist/bigconsole/components/datasink/DataSinkDeleteDialog.js +18 -18
- package/dist/bigconsole/components/datasink/DataSinkRefreshDialog.js +20 -20
- package/dist/bigconsole/components/datasink/ImportDataGuideDialog.js +47 -47
- package/dist/bigconsole/components/datasink/ImportDataSinkDialog.js +91 -91
- package/dist/bigconsole/components/datasink/RefreshTypeSelector.js +35 -35
- package/dist/bigconsole/components/parser/DataSinkSelector.js +40 -40
- package/dist/bigconsole/components/parser/ImportParserDialog.js +120 -120
- package/dist/bigconsole/components/parser/ParserSelector.js +51 -51
- package/dist/bigconsole/components/pipeline/PipelineScopePicker.js +10 -10
- package/dist/bigconsole/components/preview/AiPreviewMiniPanel.js +76 -77
- package/dist/bigconsole/components/preview/AiPreviewPanel.js +95 -96
- package/dist/bigconsole/components/widgets/ActionConfigDialog.js +4 -4
- package/dist/bigconsole/components/widgets/DrilldownConfigPanel.js +93 -93
- package/dist/bigconsole/components/widgets/PropertiesPanel.js +499 -507
- package/dist/bigconsole/components/widgets/WidgetRegistry.js +0 -1
- package/dist/bigconsole/components/widgets/calendar/CalendarWidget.js +4 -4
- package/dist/bigconsole/components/widgets/chart/ChartConfig.js +48 -48
- package/dist/bigconsole/components/widgets/comments/WidgetComments.js +46 -46
- package/dist/bigconsole/components/widgets/custom/CustomWidget.js +73 -131
- package/dist/bigconsole/components/widgets/event-logs/EventLogViewer.js +61 -61
- package/dist/bigconsole/components/widgets/form/FormWidget.js +36 -36
- package/dist/bigconsole/components/widgets/gauge/GaugeConfig.js +42 -42
- package/dist/bigconsole/components/widgets/heatmap/HeatmapConfig.js +25 -25
- package/dist/bigconsole/components/widgets/iframe-widget/IframeWidget.d.ts +28 -9
- package/dist/bigconsole/components/widgets/iframe-widget/IframeWidget.js +115 -42
- package/dist/bigconsole/components/widgets/iframe-widget/framePolicy.d.ts +20 -0
- package/dist/bigconsole/components/widgets/iframe-widget/framePolicy.js +10 -0
- package/dist/bigconsole/components/widgets/iframe-widget/index.d.ts +2 -1
- package/dist/bigconsole/components/widgets/iframe-widget/index.js +3 -2
- package/dist/bigconsole/components/widgets/kanban/KanbanWidget.js +4 -4
- package/dist/bigconsole/components/widgets/list/ListConfig.js +30 -30
- package/dist/bigconsole/components/widgets/metric-card/MetricCardConfig.js +38 -38
- package/dist/bigconsole/components/widgets/metric-card/SparklineChart.js +9 -9
- package/dist/bigconsole/components/widgets/metric-card/TrendIndicator.js +9 -9
- package/dist/bigconsole/components/widgets/pivot-table/PivotTableWidget.js +49 -49
- package/dist/bigconsole/components/widgets/progress/ProgressConfig.js +39 -39
- package/dist/bigconsole/components/widgets/table/TableConfig.js +73 -73
- package/dist/bigconsole/components/widgets/text-widget/TextWidget.js +110 -27
- package/dist/bigconsole/components/widgets/text-widget/textData.d.ts +6 -0
- package/dist/bigconsole/components/widgets/text-widget/textData.js +17 -14
- package/dist/bigconsole/components/widgets/webhook-config/WebhookConfigPanel.js +64 -64
- package/dist/bigconsole/components/workflow/WorkflowOpenGuard.js +15 -15
- package/dist/bigconsole/components/workflow/WorkflowSinkLinkForm.js +15 -15
- package/dist/bigconsole/context/BigConsoleContext.d.ts +10 -0
- package/dist/bigconsole/context/BigConsoleContext.js +47 -30
- package/dist/bigconsole/context/index.d.ts +1 -1
- package/dist/bigconsole/customWidget/CustomWidgetBuilderSheet.js +58 -49
- package/dist/bigconsole/customWidget/CustomWidgetProposalPanel.js +74 -72
- package/dist/bigconsole/customWidget/proposalPreview.d.ts +5 -0
- package/dist/bigconsole/customWidget/proposalPreview.js +31 -0
- package/dist/bigconsole/hooks/useDataSinkAlerts.d.ts +0 -23
- package/dist/bigconsole/hooks/useDataSinkAlerts.js +113 -138
- package/dist/bigconsole/hooks/useDataSinkOperations.d.ts +7 -0
- package/dist/bigconsole/hooks/useDataSinkOperations.js +109 -98
- package/dist/bigconsole/hooks/useDataSinkSubscription.js +0 -1
- package/dist/bigconsole/hooks/useDrilldown.js +68 -67
- package/dist/bigconsole/hooks/useExportDataSink.js +1 -1
- package/dist/bigconsole/hooks/useGlobalFilters.js +3 -3
- package/dist/bigconsole/hooks/useImportDataSink.js +102 -90
- package/dist/bigconsole/pages/AdminPage.js +130 -130
- package/dist/bigconsole/pages/DashboardBuilderPage.js +60 -72
- package/dist/bigconsole/pages/DashboardViewPage.js +235 -258
- package/dist/bigconsole/pages/DashboardsPage.js +221 -269
- package/dist/bigconsole/pages/DataParsersPage.js +157 -180
- package/dist/bigconsole/pages/DataSinkAlertsPage.js +55 -62
- package/dist/bigconsole/pages/DataSinkBuilderPage.js +318 -295
- package/dist/bigconsole/pages/DataSinkViewPage.js +256 -255
- package/dist/bigconsole/pages/DataSinksPage.js +216 -251
- package/dist/bigconsole/pages/DataSourcesPage.js +5 -5
- package/dist/bigconsole/pages/InsightsPage.js +265 -279
- package/dist/bigconsole/pages/OverviewPage.js +47 -47
- package/dist/bigconsole/pages/ParserBuilderPage.js +213 -229
- package/dist/bigconsole/pages/ParserViewPage.js +97 -97
- package/dist/bigconsole/pages/PipelineBuilderPage.js +214 -256
- package/dist/bigconsole/pages/PipelineViewPage.js +146 -146
- package/dist/bigconsole/pages/PipelinesPage.js +88 -107
- package/dist/bigconsole/pages/SettingsPage.js +173 -179
- package/dist/bigconsole/pages/WidgetDemoPage.js +42 -42
- package/dist/bigconsole/pages/WorkflowViewPage.js +1 -1
- package/dist/bigconsole/pages/WorkflowsPage.js +141 -141
- package/dist/bigconsole/providers/BigConsoleQuotaProvider.js +12 -12
- package/dist/bigconsole/renderers/adapters/AdaptiveCardRenderer.js +235 -122
- package/dist/bigconsole/renderers/adapters/BlockKitRenderer.d.ts +6 -1
- package/dist/bigconsole/renderers/adapters/BlockKitRenderer.js +151 -151
- package/dist/bigconsole/renderers/adapters/CustomRenderer.js +46 -46
- package/dist/bigconsole/renderers/adapters/adaptiveCardContent.d.ts +29 -0
- package/dist/bigconsole/renderers/adapters/adaptiveCardContent.js +51 -0
- package/dist/bigconsole/store/widgetStore.d.ts +0 -12
- package/dist/bigconsole/store/widgetStore.js +1 -3
- package/dist/bigconsole/types/index.d.ts +17 -2
- package/dist/bigconsole/utils/backendError.d.ts +0 -18
- package/dist/bigconsole/utils/dataSinkPayload.d.ts +48 -0
- package/dist/bigconsole/utils/dataSinkPayload.js +38 -0
- package/dist/bigconsole/utils/index.d.ts +2 -0
- package/dist/bigconsole/utils/safeUrl.d.ts +79 -0
- package/dist/bigconsole/utils/safeUrl.js +93 -0
- package/dist/bigconsole/utils/sanitizeHtml.d.ts +16 -0
- package/dist/bigconsole/utils/sanitizeHtml.js +67 -0
- package/dist/bigconsole/workflowOpen.js +14 -15
- package/dist/generated/wspace-operations.d.ts +138 -8
- package/dist/generated/wspace-operations.js +281 -240
- package/dist/node_modules/dompurify/dist/purify.es.js +800 -0
- package/package.json +9 -5
- package/dist/bigconsole/assistant/displayCopy.d.ts +0 -32
- package/dist/bigconsole/assistant/pageControls.d.ts +0 -81
- package/dist/bigconsole/assistant/pageControls.js +0 -169
- package/dist/bigconsole/assistant/previewControl.d.ts +0 -16
- package/dist/bigconsole/assistant/previewControl.js +0 -10
- package/dist/bigconsole/assistant/usePreviewControl.d.ts +0 -2
- package/dist/bigconsole/assistant/usePreviewControl.js +0 -20
- package/dist/bigconsole/components/common/SortBySelect.d.ts +0 -11
- package/dist/bigconsole/components/common/SortBySelect.js +0 -29
- package/dist/bigconsole/constants/backendErrors.js +0 -94
- package/dist/bigconsole/hooks/useDashboardLayoutBaseline.d.ts +0 -14
- package/dist/bigconsole/hooks/useDashboardLayoutBaseline.js +0 -32
- package/dist/bigconsole/utils/backendError.js +0 -42
- package/dist/bigconsole/utils/dashboardList.d.ts +0 -28
- package/dist/bigconsole/utils/dashboardList.js +0 -15
- package/dist/bigconsole/utils/dataSinkList.d.ts +0 -15
- package/dist/bigconsole/utils/dataSinkList.js +0 -15
- package/dist/bigconsole/utils/formDirty.d.ts +0 -82
- package/dist/bigconsole/utils/formDirty.js +0 -21
- package/dist/bigconsole/utils/insightsDraft.d.ts +0 -29
- package/dist/bigconsole/utils/insightsDraft.js +0 -8
- package/dist/bigconsole/utils/layoutBaseline.d.ts +0 -130
- package/dist/bigconsole/utils/layoutBaseline.js +0 -96
- package/dist/bigconsole/utils/listSort.d.ts +0 -80
- package/dist/bigconsole/utils/listSort.js +0 -85
- package/dist/bigconsole/utils/widgetFormDirty.d.ts +0 -16
- package/dist/bigconsole/utils/widgetFormDirty.js +0 -13
|
@@ -1,83 +1,74 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import { Fragment as
|
|
1
|
+
import { normalizeHttpsOrigin as e } from "../../../utils/safeUrl.js";
|
|
2
|
+
import { BIGCONSOLE_PERMISSIONS as t } from "../../../../constants/permissions.js";
|
|
3
|
+
import n, { themeChoiceFromPolicy as r } from "../../../hooks/useDashboardEmbedPolicy.js";
|
|
4
|
+
import { useEffect as i, useMemo as a, useRef as o, useState as s } from "react";
|
|
5
|
+
import { usePermissions as c } from "@burdenoff/fe-libs/shared/providers/shell";
|
|
6
|
+
import { Fragment as l, jsx as u, jsxs as d } from "react/jsx-runtime";
|
|
7
|
+
import { useI18n as ee } from "@burdenoff/fe-libs/shared/providers/shell/I18nProvider";
|
|
7
8
|
//#region src/bigconsole/components/dashboard/ShareDialog/EmbedTab.tsx
|
|
8
|
-
var
|
|
9
|
+
var te = [
|
|
9
10
|
"light",
|
|
10
11
|
"dark",
|
|
11
12
|
"auto"
|
|
12
13
|
];
|
|
13
|
-
function
|
|
14
|
+
function f(e, t) {
|
|
14
15
|
return t === "light" ? e : e.replace(/(?<=\s)src="([^"]*)"/, (e, n) => {
|
|
15
16
|
let r = n.indexOf("#"), i = r === -1 ? n : n.slice(0, r), a = r === -1 ? "" : n.slice(r);
|
|
16
17
|
return `src="${i}${i.includes("?") ? "&" : "?"}theme=${t}${a}"`;
|
|
17
18
|
});
|
|
18
19
|
}
|
|
19
|
-
function
|
|
20
|
-
let t =
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
}
|
|
26
|
-
return null;
|
|
27
|
-
}
|
|
28
|
-
}
|
|
29
|
-
function f({ dashboardId: f, colors: p }) {
|
|
30
|
-
let { t: m } = s(), { policy: h, secret: g, loading: _, error: v, fetchPolicy: y, publishToWeb: b, applyPresentation: x, setAllowedOrigins: S, rotateKey: C, unpublish: w } = t(), { hasPermission: T } = ee(), E = T(e.DASHBOARD_MANAGE_EMBED), [D, O] = o(""), [k, A] = o([]), [j, M] = o(!1), [N, P] = o(!1), [F, I] = o("light"), [L, R] = o(!1), [z, B] = o(!1), [V, H] = o(null), U = a(null), W = a(null);
|
|
31
|
-
r(() => {
|
|
32
|
-
f && y(f);
|
|
33
|
-
}, [f, y]), r(() => {
|
|
34
|
-
!h || U.current === h.id || (U.current = h.id, I(n(h.presentationTheme)), R(h.showDashboardTitle));
|
|
35
|
-
}, [h]), r(() => () => {
|
|
20
|
+
function p({ dashboardId: p, colors: m }) {
|
|
21
|
+
let { t: h } = ee(), { policy: g, secret: _, loading: v, error: y, fetchPolicy: b, publishToWeb: x, applyPresentation: S, setAllowedOrigins: C, rotateKey: w, unpublish: T } = n(), { hasPermission: E } = c(), D = E(t.DASHBOARD_MANAGE_EMBED), [O, k] = s(""), [A, j] = s([]), [M, N] = s(!1), [P, F] = s(!1), [I, L] = s("light"), [R, z] = s(!1), [ne, B] = s(!1), [V, H] = s(null), U = o(null), W = o(null);
|
|
22
|
+
i(() => {
|
|
23
|
+
p && b(p);
|
|
24
|
+
}, [p, b]), i(() => {
|
|
25
|
+
!g || U.current === g.id || (U.current = g.id, L(r(g.presentationTheme)), z(g.showDashboardTitle));
|
|
26
|
+
}, [g]), i(() => () => {
|
|
36
27
|
W.current && clearTimeout(W.current);
|
|
37
28
|
}, []);
|
|
38
|
-
let G =
|
|
29
|
+
let G = g?.status === "ACTIVE", K = G ? g?.allowedParentOrigins ?? [] : A, q = a(() => _?.iframeSnippet ? f(_.iframeSnippet, I) : null, [_, I]), J = () => {
|
|
39
30
|
H(null);
|
|
40
|
-
let
|
|
41
|
-
if (!
|
|
42
|
-
H(
|
|
31
|
+
let t = e(O);
|
|
32
|
+
if (!t) {
|
|
33
|
+
H(h("bigconsole.dashboards.embed.error.invalidOrigin", "Enter a valid https origin, e.g. https://example.com"));
|
|
43
34
|
return;
|
|
44
35
|
}
|
|
45
|
-
if (K.includes(
|
|
46
|
-
|
|
36
|
+
if (K.includes(t)) {
|
|
37
|
+
k("");
|
|
47
38
|
return;
|
|
48
39
|
}
|
|
49
|
-
G &&
|
|
40
|
+
G && g ? C(g.id, [...K, t]) : j((e) => [...e, t]), k("");
|
|
50
41
|
}, Y = (e) => {
|
|
51
|
-
G &&
|
|
42
|
+
G && g ? C(g.id, K.filter((t) => t !== e)) : j((t) => t.filter((t) => t !== e));
|
|
52
43
|
}, X = async () => {
|
|
53
|
-
if (H(null),
|
|
54
|
-
H(
|
|
44
|
+
if (H(null), A.length === 0) {
|
|
45
|
+
H(h("bigconsole.dashboards.embed.error.noDomains", "Add at least one allowed website domain before publishing."));
|
|
55
46
|
return;
|
|
56
47
|
}
|
|
57
|
-
if (!
|
|
58
|
-
H(
|
|
48
|
+
if (!M) {
|
|
49
|
+
H(h("bigconsole.dashboards.embed.error.notAttested", "Please confirm this dashboard is safe to be public."));
|
|
59
50
|
return;
|
|
60
51
|
}
|
|
61
|
-
await
|
|
62
|
-
theme:
|
|
63
|
-
showTitle:
|
|
52
|
+
await x(p, A, !0, {
|
|
53
|
+
theme: I,
|
|
54
|
+
showTitle: R
|
|
64
55
|
});
|
|
65
56
|
}, re = async () => {
|
|
66
|
-
|
|
67
|
-
theme:
|
|
68
|
-
showTitle:
|
|
57
|
+
g && (H(null), await S(g.id, {
|
|
58
|
+
theme: I,
|
|
59
|
+
showTitle: R
|
|
69
60
|
}) && (B(!0), W.current && clearTimeout(W.current), W.current = setTimeout(() => B(!1), 1500)));
|
|
70
|
-
},
|
|
61
|
+
}, Z = async (e) => {
|
|
71
62
|
try {
|
|
72
|
-
await navigator.clipboard.writeText(e),
|
|
63
|
+
await navigator.clipboard.writeText(e), F(!0), setTimeout(() => F(!1), 1500);
|
|
73
64
|
} catch {
|
|
74
|
-
H(
|
|
65
|
+
H(h("bigconsole.dashboards.embed.error.copyFailed", "Could not copy — select and copy manually."));
|
|
75
66
|
}
|
|
76
|
-
},
|
|
67
|
+
}, ie = {
|
|
77
68
|
padding: "8px 14px",
|
|
78
69
|
borderRadius: "8px",
|
|
79
70
|
border: "none",
|
|
80
|
-
background:
|
|
71
|
+
background: m.actionPrimaryBg,
|
|
81
72
|
color: "#fff",
|
|
82
73
|
fontSize: "13px",
|
|
83
74
|
fontWeight: 600,
|
|
@@ -85,25 +76,25 @@ function f({ dashboardId: f, colors: p }) {
|
|
|
85
76
|
}, Q = {
|
|
86
77
|
padding: "8px 14px",
|
|
87
78
|
borderRadius: "8px",
|
|
88
|
-
border: `1px solid ${
|
|
79
|
+
border: `1px solid ${m.borderDefault}`,
|
|
89
80
|
background: "transparent",
|
|
90
|
-
color:
|
|
81
|
+
color: m.textPrimary,
|
|
91
82
|
fontSize: "13px",
|
|
92
83
|
cursor: "pointer"
|
|
93
84
|
}, ae = {
|
|
94
85
|
flex: 1,
|
|
95
86
|
padding: "8px 10px",
|
|
96
87
|
borderRadius: "8px",
|
|
97
|
-
border: `1px solid ${
|
|
98
|
-
background:
|
|
99
|
-
color:
|
|
88
|
+
border: `1px solid ${m.borderDefault}`,
|
|
89
|
+
background: m.bgSecondary,
|
|
90
|
+
color: m.textPrimary,
|
|
100
91
|
fontSize: "13px"
|
|
101
92
|
}, oe = {
|
|
102
93
|
padding: "4px 8px",
|
|
103
94
|
borderRadius: "6px",
|
|
104
|
-
border: `1px solid ${
|
|
105
|
-
background:
|
|
106
|
-
color:
|
|
95
|
+
border: `1px solid ${m.borderDefault}`,
|
|
96
|
+
background: m.bgSecondary,
|
|
97
|
+
color: m.textPrimary,
|
|
107
98
|
fontSize: "12px",
|
|
108
99
|
cursor: "pointer"
|
|
109
100
|
}, se = {
|
|
@@ -111,230 +102,230 @@ function f({ dashboardId: f, colors: p }) {
|
|
|
111
102
|
gap: "8px",
|
|
112
103
|
alignItems: "flex-start",
|
|
113
104
|
fontSize: "12px",
|
|
114
|
-
color:
|
|
115
|
-
}, ce =
|
|
105
|
+
color: m.textSecondary
|
|
106
|
+
}, ce = a(() => te.map((e) => ({
|
|
116
107
|
value: e,
|
|
117
|
-
label: e === "light" ?
|
|
118
|
-
})), [
|
|
108
|
+
label: e === "light" ? h("bigconsole.dashboards.embed.theme.option.light", "Light") : e === "dark" ? h("bigconsole.dashboards.embed.theme.option.dark", "Dark") : h("bigconsole.dashboards.embed.theme.option.auto", "Auto (match viewer)")
|
|
109
|
+
})), [h]), $ = /* @__PURE__ */ d("div", {
|
|
119
110
|
style: {
|
|
120
111
|
display: "flex",
|
|
121
112
|
flexDirection: "column",
|
|
122
113
|
gap: "10px"
|
|
123
114
|
},
|
|
124
115
|
children: [
|
|
125
|
-
/* @__PURE__ */
|
|
116
|
+
/* @__PURE__ */ d("label", {
|
|
126
117
|
style: {
|
|
127
118
|
display: "flex",
|
|
128
119
|
alignItems: "center",
|
|
129
120
|
justifyContent: "space-between",
|
|
130
121
|
gap: "8px"
|
|
131
122
|
},
|
|
132
|
-
children: [/* @__PURE__ */
|
|
123
|
+
children: [/* @__PURE__ */ u("span", {
|
|
133
124
|
style: {
|
|
134
125
|
fontSize: "12px",
|
|
135
|
-
color:
|
|
126
|
+
color: m.textSecondary
|
|
136
127
|
},
|
|
137
|
-
children:
|
|
138
|
-
}), /* @__PURE__ */
|
|
139
|
-
value:
|
|
128
|
+
children: h("bigconsole.dashboards.embed.theme.label", "Theme")
|
|
129
|
+
}), /* @__PURE__ */ u("select", {
|
|
130
|
+
value: I,
|
|
140
131
|
onChange: (e) => {
|
|
141
132
|
let t = e.target.value;
|
|
142
|
-
(t === "light" || t === "dark" || t === "auto") &&
|
|
133
|
+
(t === "light" || t === "dark" || t === "auto") && L(t);
|
|
143
134
|
},
|
|
144
135
|
style: oe,
|
|
145
|
-
children: ce.map((e) => /* @__PURE__ */
|
|
136
|
+
children: ce.map((e) => /* @__PURE__ */ u("option", {
|
|
146
137
|
value: e.value,
|
|
147
138
|
children: e.label
|
|
148
139
|
}, e.value))
|
|
149
140
|
})]
|
|
150
141
|
}),
|
|
151
|
-
/* @__PURE__ */
|
|
142
|
+
/* @__PURE__ */ d("label", {
|
|
152
143
|
style: se,
|
|
153
|
-
children: [/* @__PURE__ */
|
|
144
|
+
children: [/* @__PURE__ */ u("input", {
|
|
154
145
|
type: "checkbox",
|
|
155
|
-
checked:
|
|
156
|
-
onChange: (e) =>
|
|
157
|
-
}), /* @__PURE__ */
|
|
146
|
+
checked: R,
|
|
147
|
+
onChange: (e) => z(e.target.checked)
|
|
148
|
+
}), /* @__PURE__ */ u("span", { children: h("bigconsole.dashboards.embed.presentation.showTitle", "Show the dashboard title as a header") })]
|
|
158
149
|
}),
|
|
159
|
-
/* @__PURE__ */
|
|
150
|
+
/* @__PURE__ */ u("div", {
|
|
160
151
|
style: {
|
|
161
152
|
fontSize: "11px",
|
|
162
|
-
color:
|
|
153
|
+
color: m.textTertiary
|
|
163
154
|
},
|
|
164
|
-
children:
|
|
155
|
+
children: h("bigconsole.dashboards.embed.presentation.brandingNote", "Embeds always carry a “Powered by BigConsole” footer.")
|
|
165
156
|
})
|
|
166
157
|
]
|
|
167
158
|
});
|
|
168
|
-
return /* @__PURE__ */
|
|
159
|
+
return /* @__PURE__ */ d("div", {
|
|
169
160
|
style: { padding: "20px 24px" },
|
|
170
161
|
children: [
|
|
171
|
-
/* @__PURE__ */
|
|
162
|
+
/* @__PURE__ */ d("div", {
|
|
172
163
|
style: {
|
|
173
164
|
display: "flex",
|
|
174
165
|
alignItems: "center",
|
|
175
166
|
justifyContent: "space-between",
|
|
176
167
|
padding: "12px 14px",
|
|
177
168
|
borderRadius: "10px",
|
|
178
|
-
background:
|
|
169
|
+
background: m.bgSecondary,
|
|
179
170
|
marginBottom: "16px"
|
|
180
171
|
},
|
|
181
|
-
children: [/* @__PURE__ */
|
|
172
|
+
children: [/* @__PURE__ */ d("div", { children: [/* @__PURE__ */ u("div", {
|
|
182
173
|
style: {
|
|
183
174
|
fontSize: "14px",
|
|
184
175
|
fontWeight: 600,
|
|
185
|
-
color:
|
|
176
|
+
color: m.textPrimary
|
|
186
177
|
},
|
|
187
|
-
children:
|
|
188
|
-
}), /* @__PURE__ */
|
|
178
|
+
children: h("bigconsole.dashboards.embed.heading", "Publish to the web")
|
|
179
|
+
}), /* @__PURE__ */ u("div", {
|
|
189
180
|
style: {
|
|
190
181
|
fontSize: "12px",
|
|
191
|
-
color:
|
|
182
|
+
color: m.textSecondary,
|
|
192
183
|
marginTop: "2px"
|
|
193
184
|
},
|
|
194
|
-
children: G ?
|
|
195
|
-
})] }), /* @__PURE__ */
|
|
185
|
+
children: G ? h("bigconsole.dashboards.embed.status.liveDescription", "This dashboard is live. Anyone with the link on an allowed website sees its live data.") : h("bigconsole.dashboards.embed.status.privateDescription", "Embed this dashboard on your website. Viewers see live data — no login required.")
|
|
186
|
+
})] }), /* @__PURE__ */ u("span", {
|
|
196
187
|
style: {
|
|
197
188
|
fontSize: "11px",
|
|
198
189
|
fontWeight: 700,
|
|
199
190
|
padding: "3px 8px",
|
|
200
191
|
borderRadius: "999px",
|
|
201
192
|
color: "#fff",
|
|
202
|
-
background: G ?
|
|
193
|
+
background: G ? m.statusSuccessBg : m.textTertiary
|
|
203
194
|
},
|
|
204
|
-
children: G ?
|
|
195
|
+
children: G ? h("bigconsole.dashboards.embed.badge.published", "PUBLISHED") : h("bigconsole.dashboards.embed.badge.private", "PRIVATE")
|
|
205
196
|
})]
|
|
206
197
|
}),
|
|
207
|
-
/* @__PURE__ */
|
|
198
|
+
/* @__PURE__ */ d("div", {
|
|
208
199
|
style: { marginBottom: "16px" },
|
|
209
200
|
children: [
|
|
210
|
-
/* @__PURE__ */
|
|
201
|
+
/* @__PURE__ */ u("div", {
|
|
211
202
|
style: {
|
|
212
203
|
fontSize: "12px",
|
|
213
204
|
fontWeight: 600,
|
|
214
|
-
color:
|
|
205
|
+
color: m.textSecondary,
|
|
215
206
|
marginBottom: "6px"
|
|
216
207
|
},
|
|
217
|
-
children:
|
|
208
|
+
children: h("bigconsole.dashboards.embed.domains.label", "Allowed website domains")
|
|
218
209
|
}),
|
|
219
|
-
/* @__PURE__ */
|
|
210
|
+
/* @__PURE__ */ d("div", {
|
|
220
211
|
style: {
|
|
221
212
|
display: "flex",
|
|
222
213
|
gap: "8px",
|
|
223
214
|
marginBottom: "8px"
|
|
224
215
|
},
|
|
225
|
-
children: [/* @__PURE__ */
|
|
216
|
+
children: [/* @__PURE__ */ u("input", {
|
|
226
217
|
style: ae,
|
|
227
|
-
placeholder:
|
|
228
|
-
value:
|
|
229
|
-
onChange: (e) =>
|
|
218
|
+
placeholder: h("bigconsole.dashboards.embed.domains.placeholder", "https://yoursite.com"),
|
|
219
|
+
value: O,
|
|
220
|
+
onChange: (e) => k(e.target.value),
|
|
230
221
|
onKeyDown: (e) => {
|
|
231
222
|
e.key === "Enter" && J();
|
|
232
223
|
}
|
|
233
|
-
}), /* @__PURE__ */
|
|
224
|
+
}), /* @__PURE__ */ u("button", {
|
|
234
225
|
style: Q,
|
|
235
226
|
onClick: J,
|
|
236
227
|
type: "button",
|
|
237
|
-
disabled: !
|
|
238
|
-
children:
|
|
228
|
+
disabled: !D,
|
|
229
|
+
children: h("bigconsole.dashboards.embed.domains.add", "Add")
|
|
239
230
|
})]
|
|
240
231
|
}),
|
|
241
|
-
K.length === 0 ? /* @__PURE__ */
|
|
232
|
+
K.length === 0 ? /* @__PURE__ */ u("div", {
|
|
242
233
|
style: {
|
|
243
234
|
fontSize: "12px",
|
|
244
|
-
color:
|
|
235
|
+
color: m.textTertiary
|
|
245
236
|
},
|
|
246
|
-
children:
|
|
247
|
-
}) : /* @__PURE__ */
|
|
237
|
+
children: h("bigconsole.dashboards.embed.domains.empty", "No domains yet. Only listed https domains may frame this dashboard.")
|
|
238
|
+
}) : /* @__PURE__ */ u("div", {
|
|
248
239
|
style: {
|
|
249
240
|
display: "flex",
|
|
250
241
|
flexDirection: "column",
|
|
251
242
|
gap: "6px"
|
|
252
243
|
},
|
|
253
|
-
children: K.map((e) => /* @__PURE__ */
|
|
244
|
+
children: K.map((e) => /* @__PURE__ */ d("div", {
|
|
254
245
|
style: {
|
|
255
246
|
display: "flex",
|
|
256
247
|
alignItems: "center",
|
|
257
248
|
justifyContent: "space-between",
|
|
258
249
|
padding: "6px 10px",
|
|
259
250
|
borderRadius: "8px",
|
|
260
|
-
background:
|
|
251
|
+
background: m.bgTertiary
|
|
261
252
|
},
|
|
262
|
-
children: [/* @__PURE__ */
|
|
253
|
+
children: [/* @__PURE__ */ u("span", {
|
|
263
254
|
style: {
|
|
264
255
|
fontSize: "13px",
|
|
265
|
-
color:
|
|
256
|
+
color: m.textPrimary
|
|
266
257
|
},
|
|
267
258
|
children: e
|
|
268
|
-
}),
|
|
259
|
+
}), D && /* @__PURE__ */ u("button", {
|
|
269
260
|
style: {
|
|
270
261
|
...Q,
|
|
271
262
|
padding: "2px 8px",
|
|
272
|
-
color:
|
|
263
|
+
color: m.statusErrorText
|
|
273
264
|
},
|
|
274
265
|
onClick: () => Y(e),
|
|
275
266
|
type: "button",
|
|
276
|
-
children:
|
|
267
|
+
children: h("bigconsole.dashboards.embed.domains.remove", "Remove")
|
|
277
268
|
})]
|
|
278
269
|
}, e))
|
|
279
270
|
})
|
|
280
271
|
]
|
|
281
272
|
}),
|
|
282
|
-
!G && /* @__PURE__ */
|
|
273
|
+
!G && /* @__PURE__ */ d("div", {
|
|
283
274
|
style: { marginBottom: "16px" },
|
|
284
|
-
children: [/* @__PURE__ */
|
|
275
|
+
children: [/* @__PURE__ */ u("div", {
|
|
285
276
|
style: {
|
|
286
277
|
fontSize: "12px",
|
|
287
278
|
fontWeight: 600,
|
|
288
|
-
color:
|
|
279
|
+
color: m.textSecondary,
|
|
289
280
|
marginBottom: "8px"
|
|
290
281
|
},
|
|
291
|
-
children:
|
|
282
|
+
children: h("bigconsole.dashboards.embed.presentation.heading", "Presentation")
|
|
292
283
|
}), $]
|
|
293
284
|
}),
|
|
294
|
-
!G && /* @__PURE__ */
|
|
285
|
+
!G && /* @__PURE__ */ d("div", {
|
|
295
286
|
style: { marginBottom: "8px" },
|
|
296
|
-
children: [/* @__PURE__ */
|
|
287
|
+
children: [/* @__PURE__ */ d("label", {
|
|
297
288
|
style: {
|
|
298
289
|
display: "flex",
|
|
299
290
|
gap: "8px",
|
|
300
291
|
alignItems: "flex-start",
|
|
301
292
|
marginBottom: "12px"
|
|
302
293
|
},
|
|
303
|
-
children: [/* @__PURE__ */
|
|
294
|
+
children: [/* @__PURE__ */ u("input", {
|
|
304
295
|
type: "checkbox",
|
|
305
|
-
checked:
|
|
306
|
-
onChange: (e) =>
|
|
307
|
-
}), /* @__PURE__ */
|
|
296
|
+
checked: M,
|
|
297
|
+
onChange: (e) => N(e.target.checked)
|
|
298
|
+
}), /* @__PURE__ */ u("span", {
|
|
308
299
|
style: {
|
|
309
300
|
fontSize: "12px",
|
|
310
|
-
color:
|
|
301
|
+
color: m.textSecondary
|
|
311
302
|
},
|
|
312
|
-
children:
|
|
303
|
+
children: h("bigconsole.dashboards.embed.attestation", "I understand this makes the dashboard’s live data visible to anyone with the link, and I confirm it is safe to be public.")
|
|
313
304
|
})]
|
|
314
|
-
}), /* @__PURE__ */
|
|
315
|
-
style:
|
|
305
|
+
}), /* @__PURE__ */ u("button", {
|
|
306
|
+
style: ie,
|
|
316
307
|
onClick: X,
|
|
317
|
-
disabled:
|
|
308
|
+
disabled: v || !D,
|
|
318
309
|
type: "button",
|
|
319
|
-
children:
|
|
310
|
+
children: v ? h("bigconsole.dashboards.embed.publishing", "Publishing…") : h("bigconsole.dashboards.embed.publish", "Publish to web")
|
|
320
311
|
})]
|
|
321
312
|
}),
|
|
322
|
-
G && /* @__PURE__ */
|
|
323
|
-
q ? /* @__PURE__ */
|
|
313
|
+
G && /* @__PURE__ */ d(l, { children: [
|
|
314
|
+
q ? /* @__PURE__ */ d("div", {
|
|
324
315
|
style: { marginBottom: "16px" },
|
|
325
316
|
children: [
|
|
326
|
-
/* @__PURE__ */
|
|
317
|
+
/* @__PURE__ */ u("div", {
|
|
327
318
|
style: { marginBottom: "6px" },
|
|
328
|
-
children: /* @__PURE__ */
|
|
319
|
+
children: /* @__PURE__ */ u("span", {
|
|
329
320
|
style: {
|
|
330
321
|
fontSize: "12px",
|
|
331
322
|
fontWeight: 600,
|
|
332
|
-
color:
|
|
323
|
+
color: m.textSecondary
|
|
333
324
|
},
|
|
334
|
-
children:
|
|
325
|
+
children: h("bigconsole.dashboards.embed.snippet.label", "Embed snippet")
|
|
335
326
|
})
|
|
336
327
|
}),
|
|
337
|
-
/* @__PURE__ */
|
|
328
|
+
/* @__PURE__ */ u("textarea", {
|
|
338
329
|
readOnly: !0,
|
|
339
330
|
value: q,
|
|
340
331
|
style: {
|
|
@@ -342,115 +333,115 @@ function f({ dashboardId: f, colors: p }) {
|
|
|
342
333
|
minHeight: "96px",
|
|
343
334
|
padding: "10px",
|
|
344
335
|
borderRadius: "8px",
|
|
345
|
-
border: `1px solid ${
|
|
346
|
-
background:
|
|
347
|
-
color:
|
|
336
|
+
border: `1px solid ${m.borderDefault}`,
|
|
337
|
+
background: m.bgSecondary,
|
|
338
|
+
color: m.textPrimary,
|
|
348
339
|
fontFamily: "monospace",
|
|
349
340
|
fontSize: "12px",
|
|
350
341
|
resize: "vertical"
|
|
351
342
|
}
|
|
352
343
|
}),
|
|
353
|
-
/* @__PURE__ */
|
|
344
|
+
/* @__PURE__ */ u("button", {
|
|
354
345
|
style: {
|
|
355
346
|
...Q,
|
|
356
347
|
marginTop: "8px"
|
|
357
348
|
},
|
|
358
|
-
onClick: () =>
|
|
349
|
+
onClick: () => Z(q),
|
|
359
350
|
type: "button",
|
|
360
|
-
children:
|
|
351
|
+
children: P ? h("bigconsole.dashboards.embed.snippet.copied", "Copied ✓") : h("bigconsole.dashboards.embed.snippet.copy", "Copy snippet")
|
|
361
352
|
})
|
|
362
353
|
]
|
|
363
|
-
}) : /* @__PURE__ */
|
|
354
|
+
}) : /* @__PURE__ */ u("div", {
|
|
364
355
|
style: {
|
|
365
356
|
fontSize: "12px",
|
|
366
|
-
color:
|
|
367
|
-
background:
|
|
357
|
+
color: m.textSecondary,
|
|
358
|
+
background: m.bgSecondary,
|
|
368
359
|
borderRadius: "8px",
|
|
369
360
|
padding: "10px 12px",
|
|
370
361
|
marginBottom: "16px"
|
|
371
362
|
},
|
|
372
|
-
children:
|
|
363
|
+
children: h("bigconsole.dashboards.embed.snippet.alreadyActive", "The embed link is already active. For security the snippet (which contains the secret key) is only shown once at publish time — use {{rotateLabel}} to generate a fresh snippet.", { rotateLabel: h("bigconsole.dashboards.embed.rotate", "Rotate link") })
|
|
373
364
|
}),
|
|
374
|
-
/* @__PURE__ */
|
|
365
|
+
/* @__PURE__ */ d("div", {
|
|
375
366
|
style: { marginBottom: "16px" },
|
|
376
367
|
children: [
|
|
377
|
-
/* @__PURE__ */
|
|
368
|
+
/* @__PURE__ */ u("div", {
|
|
378
369
|
style: {
|
|
379
370
|
fontSize: "12px",
|
|
380
371
|
fontWeight: 600,
|
|
381
|
-
color:
|
|
372
|
+
color: m.textSecondary,
|
|
382
373
|
marginBottom: "8px"
|
|
383
374
|
},
|
|
384
|
-
children:
|
|
375
|
+
children: h("bigconsole.dashboards.embed.presentation.heading", "Presentation")
|
|
385
376
|
}),
|
|
386
377
|
$,
|
|
387
|
-
/* @__PURE__ */
|
|
378
|
+
/* @__PURE__ */ d("div", {
|
|
388
379
|
style: {
|
|
389
380
|
display: "flex",
|
|
390
381
|
alignItems: "center",
|
|
391
382
|
gap: "10px",
|
|
392
383
|
marginTop: "10px"
|
|
393
384
|
},
|
|
394
|
-
children: [/* @__PURE__ */
|
|
385
|
+
children: [/* @__PURE__ */ u("button", {
|
|
395
386
|
style: Q,
|
|
396
387
|
onClick: re,
|
|
397
|
-
disabled:
|
|
388
|
+
disabled: v || !D,
|
|
398
389
|
type: "button",
|
|
399
|
-
children:
|
|
400
|
-
}),
|
|
390
|
+
children: v ? h("bigconsole.dashboards.embed.applying", "Applying…") : h("bigconsole.dashboards.embed.apply", "Apply changes")
|
|
391
|
+
}), ne && /* @__PURE__ */ u("span", {
|
|
401
392
|
style: {
|
|
402
393
|
fontSize: "12px",
|
|
403
|
-
color:
|
|
394
|
+
color: m.textTertiary
|
|
404
395
|
},
|
|
405
|
-
children:
|
|
396
|
+
children: h("bigconsole.dashboards.embed.updated", "Updated ✓")
|
|
406
397
|
})]
|
|
407
398
|
}),
|
|
408
|
-
/* @__PURE__ */
|
|
399
|
+
/* @__PURE__ */ u("div", {
|
|
409
400
|
style: {
|
|
410
401
|
fontSize: "11px",
|
|
411
|
-
color:
|
|
402
|
+
color: m.textTertiary,
|
|
412
403
|
marginTop: "6px"
|
|
413
404
|
},
|
|
414
|
-
children:
|
|
405
|
+
children: h("bigconsole.dashboards.embed.presentation.applyHelp", "Changes apply to live embeds within a few seconds — no re-publish needed, and the embed link stays the same.")
|
|
415
406
|
})
|
|
416
407
|
]
|
|
417
408
|
}),
|
|
418
|
-
|
|
409
|
+
D && /* @__PURE__ */ d("div", {
|
|
419
410
|
style: {
|
|
420
411
|
display: "flex",
|
|
421
412
|
gap: "8px"
|
|
422
413
|
},
|
|
423
|
-
children: [/* @__PURE__ */
|
|
414
|
+
children: [/* @__PURE__ */ u("button", {
|
|
424
415
|
style: Q,
|
|
425
|
-
onClick: () =>
|
|
426
|
-
disabled:
|
|
416
|
+
onClick: () => g && w(g.id),
|
|
417
|
+
disabled: v,
|
|
427
418
|
type: "button",
|
|
428
|
-
children:
|
|
429
|
-
}), /* @__PURE__ */
|
|
419
|
+
children: h("bigconsole.dashboards.embed.rotate", "Rotate link")
|
|
420
|
+
}), /* @__PURE__ */ u("button", {
|
|
430
421
|
style: {
|
|
431
422
|
...Q,
|
|
432
|
-
color:
|
|
433
|
-
borderColor:
|
|
423
|
+
color: m.statusErrorText,
|
|
424
|
+
borderColor: m.statusErrorText
|
|
434
425
|
},
|
|
435
426
|
onClick: () => {
|
|
436
|
-
|
|
427
|
+
g && window.confirm(h("bigconsole.dashboards.embed.unpublishConfirm", "Unpublish this dashboard? The embed will stop working immediately for anyone using the link.")) && T(g.id);
|
|
437
428
|
},
|
|
438
|
-
disabled:
|
|
429
|
+
disabled: v,
|
|
439
430
|
type: "button",
|
|
440
|
-
children:
|
|
431
|
+
children: h("bigconsole.dashboards.embed.unpublish", "Unpublish")
|
|
441
432
|
})]
|
|
442
433
|
})
|
|
443
434
|
] }),
|
|
444
|
-
(V ||
|
|
435
|
+
(V || y) && /* @__PURE__ */ u("div", {
|
|
445
436
|
style: {
|
|
446
437
|
marginTop: "12px",
|
|
447
438
|
fontSize: "12px",
|
|
448
|
-
color:
|
|
439
|
+
color: m.statusErrorText
|
|
449
440
|
},
|
|
450
|
-
children: V ??
|
|
441
|
+
children: V ?? y?.message
|
|
451
442
|
})
|
|
452
443
|
]
|
|
453
444
|
});
|
|
454
445
|
}
|
|
455
446
|
//#endregion
|
|
456
|
-
export {
|
|
447
|
+
export { p as default };
|