@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
|
@@ -25,16 +25,14 @@ import { DataBindingSection as de } from "../builder/inspector/DataBindingSectio
|
|
|
25
25
|
import fe from "../builder/inspector/LayoutSection.js";
|
|
26
26
|
import "../builder/inspector/index.js";
|
|
27
27
|
import { DEFAULT_GRID_CONFIG as pe } from "../../utils/widgetPositioning.js";
|
|
28
|
-
import {
|
|
29
|
-
import {
|
|
30
|
-
import {
|
|
31
|
-
import {
|
|
32
|
-
import {
|
|
33
|
-
import {
|
|
34
|
-
import { jsx as S, jsxs as C } from "react/jsx-runtime";
|
|
35
|
-
import { toast as Ue } from "sonner";
|
|
28
|
+
import { memo as d, useCallback as f, useEffect as p, useMemo as m, useRef as me, useState as h } from "react";
|
|
29
|
+
import { Check as g, ChevronDown as he, ChevronUp as ge, ExternalLink as _e, Info as ve, Pencil as ye, Plus as be, Trash2 as xe, X as Se } from "lucide-react";
|
|
30
|
+
import { Button as _, Card as Ce, CardContent as we, Input as v, Label as y, Select as Te, SelectContent as Ee, SelectItem as b, SelectTrigger as De, SelectValue as Oe, Sheet as ke, SheetContent as Ae, SheetDescription as je, SheetHeader as Me, SheetTitle as Ne, Spinner as Pe, Tabs as Fe, TabsContent as x, TabsList as Ie, TabsTrigger as S, Textarea as C } from "@burdenoff/fe-libs/ui";
|
|
31
|
+
import { jsx as w, jsxs as T } from "react/jsx-runtime";
|
|
32
|
+
import { useI18n as Le } from "@burdenoff/fe-libs/shared/providers/shell/I18nProvider";
|
|
33
|
+
import { toast as Re } from "sonner";
|
|
36
34
|
//#region src/bigconsole/components/widgets/PropertiesPanel.tsx
|
|
37
|
-
var
|
|
35
|
+
var ze = [
|
|
38
36
|
{
|
|
39
37
|
value: "BIGCONSOLE",
|
|
40
38
|
labelKey: "bigconsole.widget.properties.renderer.bigconsole.label",
|
|
@@ -63,7 +61,7 @@ var We = [
|
|
|
63
61
|
descriptionKey: "bigconsole.widget.properties.renderer.custom.description",
|
|
64
62
|
description: "Custom React component"
|
|
65
63
|
}
|
|
66
|
-
],
|
|
64
|
+
], Be = [
|
|
67
65
|
{
|
|
68
66
|
value: "DATASINK",
|
|
69
67
|
labelKey: "bigconsole.widget.properties.dataSourceType.datasink.label",
|
|
@@ -107,23 +105,23 @@ var We = [
|
|
|
107
105
|
description: "Manually enter sample JSON data"
|
|
108
106
|
}
|
|
109
107
|
];
|
|
110
|
-
function
|
|
108
|
+
function Ve(e) {
|
|
111
109
|
return `widget:${e.toLowerCase().replace(/\s+/g, "_")}:clicked`;
|
|
112
110
|
}
|
|
113
|
-
var
|
|
111
|
+
var He = {
|
|
114
112
|
PRIMARY: "bg-action-primary-bg",
|
|
115
113
|
SECONDARY: "bg-[var(--color-text-muted)]",
|
|
116
114
|
SUCCESS: "bg-status-success-bg",
|
|
117
115
|
WARNING: "bg-status-warning-bg",
|
|
118
116
|
DANGER: "bg-status-error-bg"
|
|
119
|
-
},
|
|
117
|
+
}, Ue = "bg-[var(--color-text-muted)]", E = {
|
|
120
118
|
fontWeight: "var(--font-weight-semibold)",
|
|
121
119
|
fontSize: "var(--font-size-body-sm)",
|
|
122
120
|
padding: "6px 10px",
|
|
123
121
|
minHeight: "var(--size-controlHeight-md)",
|
|
124
122
|
flexShrink: 0
|
|
125
123
|
};
|
|
126
|
-
function
|
|
124
|
+
function We(e) {
|
|
127
125
|
if (!e) return {};
|
|
128
126
|
let t = Array.isArray(e) ? e[0] : e;
|
|
129
127
|
if (!t || typeof t != "object") return {};
|
|
@@ -167,8 +165,8 @@ function Ye(e) {
|
|
|
167
165
|
xAxisField: a
|
|
168
166
|
};
|
|
169
167
|
}
|
|
170
|
-
var
|
|
171
|
-
let { t: r } =
|
|
168
|
+
var Ge = d(function({ widget: e, onSave: t }) {
|
|
169
|
+
let { t: r } = Le(), [i, a] = h(""), [o, s] = h(null), c = me(!1);
|
|
172
170
|
p(() => {
|
|
173
171
|
try {
|
|
174
172
|
a(e.template && typeof e.template == "object" ? JSON.stringify(e.template, null, 2) : ""), s(null), c.current = !0;
|
|
@@ -193,21 +191,21 @@ var Xe = d(function({ widget: e, onSave: t }) {
|
|
|
193
191
|
s(e.message);
|
|
194
192
|
}
|
|
195
193
|
}, [i, t]);
|
|
196
|
-
return /* @__PURE__ */
|
|
194
|
+
return /* @__PURE__ */ T(n, {
|
|
197
195
|
emphasis: "muted",
|
|
198
196
|
padding: "compact",
|
|
199
197
|
headingLevel: 4,
|
|
200
198
|
title: r("bigconsole.widget.properties.template.label", "Template (JSON)"),
|
|
201
199
|
description: `The ${e.renderer} payload this widget renders.`,
|
|
202
200
|
tone: o ? "danger" : "neutral",
|
|
203
|
-
meta: o ? /* @__PURE__ */
|
|
201
|
+
meta: o ? /* @__PURE__ */ w("span", {
|
|
204
202
|
className: "text-xs font-medium text-[var(--color-status-error-text)]",
|
|
205
203
|
children: r("bigconsole.widget.properties.template.invalidJson", "Invalid JSON")
|
|
206
204
|
}) : void 0,
|
|
207
205
|
className: "mt-form-gap",
|
|
208
206
|
"data-testid": "widget-inspector-template",
|
|
209
207
|
children: [
|
|
210
|
-
/* @__PURE__ */
|
|
208
|
+
/* @__PURE__ */ w(C, {
|
|
211
209
|
value: i,
|
|
212
210
|
onChange: l,
|
|
213
211
|
spellCheck: !1,
|
|
@@ -220,7 +218,7 @@ var Xe = d(function({ widget: e, onSave: t }) {
|
|
|
220
218
|
resize: "vertical"
|
|
221
219
|
}
|
|
222
220
|
}),
|
|
223
|
-
o && /* @__PURE__ */
|
|
221
|
+
o && /* @__PURE__ */ w("p", {
|
|
224
222
|
style: {
|
|
225
223
|
fontSize: "var(--font-size-body-sm)",
|
|
226
224
|
color: "var(--color-status-error-text)",
|
|
@@ -231,9 +229,9 @@ var Xe = d(function({ widget: e, onSave: t }) {
|
|
|
231
229
|
},
|
|
232
230
|
children: o
|
|
233
231
|
}),
|
|
234
|
-
/* @__PURE__ */
|
|
232
|
+
/* @__PURE__ */ T("div", {
|
|
235
233
|
className: "mt-control-gap flex flex-wrap items-center gap-control-gap",
|
|
236
|
-
children: [/* @__PURE__ */
|
|
234
|
+
children: [/* @__PURE__ */ w(_, {
|
|
237
235
|
variant: "outline",
|
|
238
236
|
size: "sm",
|
|
239
237
|
onClick: ee,
|
|
@@ -243,7 +241,7 @@ var Xe = d(function({ widget: e, onSave: t }) {
|
|
|
243
241
|
fontWeight: "var(--font-weight-semibold)"
|
|
244
242
|
},
|
|
245
243
|
children: r("bigconsole.widget.properties.template.format", "Format")
|
|
246
|
-
}), !o && i.trim() !== "" && /* @__PURE__ */
|
|
244
|
+
}), !o && i.trim() !== "" && /* @__PURE__ */ T("span", {
|
|
247
245
|
style: {
|
|
248
246
|
fontSize: "var(--font-size-body-sm)",
|
|
249
247
|
color: "var(--color-status-success-text)",
|
|
@@ -251,20 +249,20 @@ var Xe = d(function({ widget: e, onSave: t }) {
|
|
|
251
249
|
alignItems: "center",
|
|
252
250
|
gap: "4px"
|
|
253
251
|
},
|
|
254
|
-
children: [/* @__PURE__ */
|
|
252
|
+
children: [/* @__PURE__ */ w(g, { style: {
|
|
255
253
|
width: "12px",
|
|
256
254
|
height: "12px"
|
|
257
255
|
} }), r("bigconsole.widget.properties.template.validJson", "Valid JSON")]
|
|
258
256
|
})]
|
|
259
257
|
}),
|
|
260
|
-
/* @__PURE__ */
|
|
258
|
+
/* @__PURE__ */ T("div", {
|
|
261
259
|
className: "mt-control-gap flex flex-wrap items-center justify-between gap-x-4 gap-y-1 border-t border-[var(--color-border-subtle)] pt-control-gap text-xs text-text-muted",
|
|
262
260
|
children: [
|
|
263
|
-
/* @__PURE__ */
|
|
261
|
+
/* @__PURE__ */ w("span", {
|
|
264
262
|
className: "font-medium",
|
|
265
263
|
children: r("bigconsole.widget.properties.template.ctrlSToSave", "Ctrl+S to save")
|
|
266
264
|
}),
|
|
267
|
-
e.renderer === "ADAPTIVE_CARD" && /* @__PURE__ */
|
|
265
|
+
e.renderer === "ADAPTIVE_CARD" && /* @__PURE__ */ T("a", {
|
|
268
266
|
href: "https://adaptivecards.io/designer/",
|
|
269
267
|
target: "_blank",
|
|
270
268
|
rel: "noopener noreferrer",
|
|
@@ -277,12 +275,12 @@ var Xe = d(function({ widget: e, onSave: t }) {
|
|
|
277
275
|
fontWeight: "var(--font-weight-medium)",
|
|
278
276
|
textDecoration: "none"
|
|
279
277
|
},
|
|
280
|
-
children: [r("bigconsole.widget.properties.template.designer", "Designer"), /* @__PURE__ */
|
|
278
|
+
children: [r("bigconsole.widget.properties.template.designer", "Designer"), /* @__PURE__ */ w(_e, { style: {
|
|
281
279
|
height: "var(--size-icon-sm)",
|
|
282
280
|
width: "var(--size-icon-sm)"
|
|
283
281
|
} })]
|
|
284
282
|
}),
|
|
285
|
-
e.renderer === "BLOCKKIT" && /* @__PURE__ */
|
|
283
|
+
e.renderer === "BLOCKKIT" && /* @__PURE__ */ T("a", {
|
|
286
284
|
href: "https://app.slack.com/block-kit-builder",
|
|
287
285
|
target: "_blank",
|
|
288
286
|
rel: "noopener noreferrer",
|
|
@@ -295,7 +293,7 @@ var Xe = d(function({ widget: e, onSave: t }) {
|
|
|
295
293
|
fontWeight: "var(--font-weight-medium)",
|
|
296
294
|
textDecoration: "none"
|
|
297
295
|
},
|
|
298
|
-
children: [r("bigconsole.widget.properties.template.blockKitBuilder", "Block Kit Builder"), /* @__PURE__ */
|
|
296
|
+
children: [r("bigconsole.widget.properties.template.blockKitBuilder", "Block Kit Builder"), /* @__PURE__ */ w(_e, { style: {
|
|
299
297
|
height: "var(--size-icon-sm)",
|
|
300
298
|
width: "var(--size-icon-sm)"
|
|
301
299
|
} })]
|
|
@@ -305,7 +303,7 @@ var Xe = d(function({ widget: e, onSave: t }) {
|
|
|
305
303
|
]
|
|
306
304
|
});
|
|
307
305
|
});
|
|
308
|
-
function
|
|
306
|
+
function Ke(e) {
|
|
309
307
|
let t = e, n = u({
|
|
310
308
|
dataSinkId: t.dataSinkId,
|
|
311
309
|
parserId: t.parserId,
|
|
@@ -333,309 +331,305 @@ function Ze(e) {
|
|
|
333
331
|
} : void 0
|
|
334
332
|
};
|
|
335
333
|
}
|
|
336
|
-
var
|
|
337
|
-
let { t:
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
})
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
width: F.position?.width ?? F.positionWidth ?? 4,
|
|
347
|
-
height: F.position?.height ?? F.positionHeight ?? 4
|
|
348
|
-
} : null, at = f((e) => {
|
|
349
|
-
N && nt(N, e);
|
|
350
|
-
}, [N, nt]), ot = _e(null), st = _e({}), ct = _e(0), I = f(() => {
|
|
351
|
-
ct.current += 1, j(!0);
|
|
334
|
+
var D = d(function({ isOpen: d, onClose: _e }) {
|
|
335
|
+
let { t: D } = Le(), [qe, Je] = h("general"), [O, k] = h("idle"), [A, j] = h(null), [M, N] = h(!1), P = e((e) => e.selectedWidgetId), Ye = e((e) => e.widgets), F = e((e) => e.updateWidget), Xe = e((e) => e.updateWidgetPosition), Ze = t(), I = P ? Ye.get(P) : void 0, Qe = I ? {
|
|
336
|
+
x: I.position?.x ?? I.positionX ?? 0,
|
|
337
|
+
y: I.position?.y ?? I.positionY ?? 0,
|
|
338
|
+
width: I.position?.width ?? I.positionWidth ?? 4,
|
|
339
|
+
height: I.position?.height ?? I.positionHeight ?? 4
|
|
340
|
+
} : null, $e = f((e) => {
|
|
341
|
+
P && Xe(P, e);
|
|
342
|
+
}, [P, Xe]), et = me(null), tt = me({}), nt = me(0), L = f(() => {
|
|
343
|
+
nt.current += 1, N(!0);
|
|
352
344
|
}, []);
|
|
353
345
|
p(() => {
|
|
354
|
-
if (!
|
|
355
|
-
|
|
346
|
+
if (!P) {
|
|
347
|
+
et.current = null, j(null), N(!1), k("idle");
|
|
356
348
|
return;
|
|
357
349
|
}
|
|
358
|
-
let e =
|
|
359
|
-
if (
|
|
360
|
-
if (
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
} else k(null), M(null), j(!1), D("idle");
|
|
350
|
+
let e = et.current !== P;
|
|
351
|
+
if (et.current = P, I) {
|
|
352
|
+
if (M && !e) return;
|
|
353
|
+
j(Ke(I)), tt.current = I.config || {}, N(!1), k("idle");
|
|
354
|
+
} else j(null), N(!1), k("idle");
|
|
364
355
|
}, [
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
356
|
+
P,
|
|
357
|
+
I,
|
|
358
|
+
M
|
|
368
359
|
]);
|
|
369
|
-
let { updateWidget:
|
|
370
|
-
consoleId:
|
|
360
|
+
let { updateWidget: rt } = a(I?.pageId, I?.dashboardId, { skipFetch: !0 }), { createDrilldown: it, updateDrilldown: at, deleteDrilldown: ot } = o(), { dataSinks: R } = l({ skipFetch: !1 }), [st, z] = h(null), { executeParser: ct, fetchParser: lt } = ee({
|
|
361
|
+
consoleId: I?.dashboardId,
|
|
371
362
|
skipFetch: !0
|
|
372
|
-
}), [
|
|
363
|
+
}), [B, ut] = h(null), [dt, ft] = h(!1), pt = A?.parserId;
|
|
373
364
|
p(() => {
|
|
374
365
|
let e = !1;
|
|
375
|
-
if (
|
|
376
|
-
|
|
366
|
+
if (ut(null), !d || !pt) {
|
|
367
|
+
ft(!1);
|
|
377
368
|
return;
|
|
378
369
|
}
|
|
379
|
-
return
|
|
380
|
-
e || (
|
|
370
|
+
return ft(!0), lt(pt).then((t) => {
|
|
371
|
+
e || (ut(t), ft(!1));
|
|
381
372
|
}), () => {
|
|
382
373
|
e = !0;
|
|
383
374
|
};
|
|
384
375
|
}, [
|
|
385
376
|
d,
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
377
|
+
pt,
|
|
378
|
+
P,
|
|
379
|
+
lt
|
|
389
380
|
]);
|
|
390
|
-
let [
|
|
381
|
+
let [mt, ht] = h(!1), [gt, V] = h(void 0), [_t, H] = h(!1), [vt, U] = h(null);
|
|
391
382
|
p(() => {
|
|
392
|
-
|
|
393
|
-
}, [
|
|
394
|
-
let { actions:
|
|
395
|
-
widgetId:
|
|
396
|
-
skipFetch: !
|
|
397
|
-
}),
|
|
398
|
-
let n =
|
|
399
|
-
return e.find((e) => e.widgetId ===
|
|
400
|
-
}, [
|
|
401
|
-
if (!
|
|
402
|
-
let n =
|
|
403
|
-
return !r &&
|
|
383
|
+
V(void 0), H(!1), U(null), ht(!1);
|
|
384
|
+
}, [P]);
|
|
385
|
+
let { actions: W, loading: yt, createAction: bt, updateAction: xt, deleteAction: St, reorderActions: G } = s(P || void 0), { webhooks: Ct, loading: wt, createWebhook: Tt, updateWebhook: Et, deleteWebhook: K, refetch: Dt } = c({
|
|
386
|
+
widgetId: P || void 0,
|
|
387
|
+
skipFetch: !P
|
|
388
|
+
}), q = f((e, t) => {
|
|
389
|
+
let n = Ve(t);
|
|
390
|
+
return e.find((e) => e.widgetId === P && e.eventPattern === n) ?? null;
|
|
391
|
+
}, [P]), J = f((e) => q(Ct, e), [q, Ct]), Ot = f(async (e, t) => {
|
|
392
|
+
if (!P || t === void 0) return !0;
|
|
393
|
+
let n = Ve(e), r = J(e);
|
|
394
|
+
return !r && wt && (r = q((await Dt())?.data?.listEventWebhookMappings ?? [], e)), t && t.url ? r ? await Et({
|
|
404
395
|
id: r.id,
|
|
405
396
|
eventPattern: n,
|
|
406
397
|
webhookUrl: t.url,
|
|
407
398
|
method: t.method,
|
|
408
399
|
isActive: !0
|
|
409
|
-
}) !== null : await
|
|
410
|
-
widgetId:
|
|
400
|
+
}) !== null : await Tt({
|
|
401
|
+
widgetId: P,
|
|
411
402
|
eventPattern: n,
|
|
412
403
|
webhookUrl: t.url,
|
|
413
404
|
method: t.method
|
|
414
|
-
}) !== null : t === null && r ?
|
|
405
|
+
}) !== null : t === null && r ? K(r.id) : !0;
|
|
415
406
|
}, [
|
|
416
|
-
|
|
407
|
+
P,
|
|
408
|
+
J,
|
|
409
|
+
wt,
|
|
410
|
+
Dt,
|
|
417
411
|
q,
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
K
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
]), [Ft, J] = m(!1), [It, Y] = m(void 0), [Lt, Rt] = m(!1), [zt, X] = m(void 0), [Bt, Z] = m(null), Vt = ge(() => {
|
|
425
|
-
if (!It) return null;
|
|
426
|
-
let e = q(It.name);
|
|
412
|
+
Tt,
|
|
413
|
+
Et,
|
|
414
|
+
K
|
|
415
|
+
]), [kt, At] = h(!1), [jt, Y] = h(void 0), [Mt, Nt] = h(!1), [Pt, X] = h(void 0), [Ft, Z] = h(null), It = m(() => {
|
|
416
|
+
if (!jt) return null;
|
|
417
|
+
let e = J(jt.name);
|
|
427
418
|
return e ? {
|
|
428
419
|
url: e.webhookUrl,
|
|
429
420
|
method: e.method
|
|
430
421
|
} : null;
|
|
431
|
-
}, [
|
|
422
|
+
}, [jt, J]), Lt = Pt === void 0 ? It : Pt, Rt = m(() => {
|
|
432
423
|
let e = /* @__PURE__ */ new Map();
|
|
433
|
-
for (let t of
|
|
434
|
-
let n =
|
|
424
|
+
for (let t of W) {
|
|
425
|
+
let n = J(t.name);
|
|
435
426
|
n && e.set(t.name, n);
|
|
436
427
|
}
|
|
437
428
|
return e;
|
|
438
|
-
}, [
|
|
439
|
-
X(void 0), Z(null), Y(void 0),
|
|
440
|
-
}, []),
|
|
441
|
-
X(void 0), Z(null), Y(e),
|
|
442
|
-
}, []),
|
|
443
|
-
if (
|
|
444
|
-
|
|
429
|
+
}, [W, J]), zt = f(() => {
|
|
430
|
+
X(void 0), Z(null), Y(void 0), At(!0);
|
|
431
|
+
}, []), Bt = f((e) => {
|
|
432
|
+
X(void 0), Z(null), Y(e), At(!0);
|
|
433
|
+
}, []), Vt = f(async (e, t) => {
|
|
434
|
+
if (P) {
|
|
435
|
+
Nt(!0), Z(null);
|
|
445
436
|
try {
|
|
446
437
|
let n = "id" in e && !!e.id, r = null;
|
|
447
|
-
if (r = n ? await
|
|
448
|
-
let e = [...
|
|
438
|
+
if (r = n ? await xt(e) : await bt(e), r) {
|
|
439
|
+
let e = [...W];
|
|
449
440
|
if (n) {
|
|
450
441
|
let t = e.findIndex((e) => e.id === r?.id);
|
|
451
442
|
t >= 0 && (e[t] = r);
|
|
452
443
|
} else e.push(r);
|
|
453
|
-
if (P
|
|
454
|
-
X(t), Z(t ?
|
|
444
|
+
if (F(P, { actions: e.sort((e, t) => e.order - t.order) }), !await Ot(r.name, t)) {
|
|
445
|
+
X(t), Z(t ? D("bigconsole.widget.properties.action.webhookSaveFailed", "The button was saved, but its webhook could not be saved. Check the URL and try again.") : D("bigconsole.widget.properties.action.webhookRemoveFailed", "The button was saved, but its old webhook could not be removed. Try again.")), Y(r);
|
|
455
446
|
return;
|
|
456
447
|
}
|
|
457
|
-
X(void 0), Z(null),
|
|
448
|
+
X(void 0), Z(null), At(!1), Y(void 0);
|
|
458
449
|
}
|
|
459
450
|
} catch (e) {
|
|
460
|
-
console.warn("Failed to save widget action:", e), Z(e instanceof Error ? e.message :
|
|
451
|
+
console.warn("Failed to save widget action:", e), Z(e instanceof Error ? e.message : D("bigconsole.widget.properties.action.saveFailed", "Could not save the button. Please try again."));
|
|
461
452
|
} finally {
|
|
462
|
-
|
|
453
|
+
Nt(!1);
|
|
463
454
|
}
|
|
464
455
|
}
|
|
465
456
|
}, [
|
|
466
|
-
N,
|
|
467
|
-
U,
|
|
468
|
-
Et,
|
|
469
|
-
Dt,
|
|
470
457
|
P,
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
|
|
458
|
+
W,
|
|
459
|
+
bt,
|
|
460
|
+
xt,
|
|
461
|
+
F,
|
|
462
|
+
Ot,
|
|
463
|
+
D
|
|
464
|
+
]), Ht = f(async (e) => {
|
|
465
|
+
if (P && window.confirm(D("bigconsole.widget.properties.action.deleteConfirm", "Are you sure you want to delete this action?"))) {
|
|
466
|
+
let t = W.find((t) => t.id === e);
|
|
467
|
+
if (await St(e) && (F(P, { actions: W.filter((t) => t.id !== e) }), t)) {
|
|
468
|
+
let e = J(t.name);
|
|
469
|
+
e && await K(e.id);
|
|
479
470
|
}
|
|
480
471
|
}
|
|
481
472
|
}, [
|
|
482
|
-
N,
|
|
483
|
-
U,
|
|
484
|
-
Ot,
|
|
485
473
|
P,
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
|
|
474
|
+
W,
|
|
475
|
+
St,
|
|
476
|
+
F,
|
|
477
|
+
J,
|
|
478
|
+
K,
|
|
479
|
+
D
|
|
480
|
+
]), Ut = f(async (e) => {
|
|
481
|
+
if (!P || e === 0) return;
|
|
482
|
+
let t = [...W].sort((e, t) => e.order - t.order), n = t.map((e) => e.id);
|
|
483
|
+
[n[e - 1], n[e]] = [n[e], n[e - 1]], await G(n) && F(P, { actions: t.map((e, t) => ({
|
|
493
484
|
...e,
|
|
494
485
|
order: n.indexOf(e.id)
|
|
495
486
|
})).sort((e, t) => e.order - t.order) });
|
|
496
487
|
}, [
|
|
497
|
-
|
|
498
|
-
U,
|
|
488
|
+
P,
|
|
499
489
|
W,
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
|
|
490
|
+
G,
|
|
491
|
+
F
|
|
492
|
+
]), Wt = f(async (e) => {
|
|
493
|
+
if (!P) return;
|
|
494
|
+
let t = [...W].sort((e, t) => e.order - t.order);
|
|
504
495
|
if (e === t.length - 1) return;
|
|
505
496
|
let n = t.map((e) => e.id);
|
|
506
|
-
[n[e], n[e + 1]] = [n[e + 1], n[e]], await
|
|
497
|
+
[n[e], n[e + 1]] = [n[e + 1], n[e]], await G(n) && F(P, { actions: t.map((e, t) => ({
|
|
507
498
|
...e,
|
|
508
499
|
order: n.indexOf(e.id)
|
|
509
500
|
})).sort((e, t) => e.order - t.order) });
|
|
510
501
|
}, [
|
|
511
|
-
|
|
512
|
-
U,
|
|
502
|
+
P,
|
|
513
503
|
W,
|
|
514
|
-
|
|
504
|
+
G,
|
|
505
|
+
F
|
|
515
506
|
]);
|
|
516
507
|
p(() => {
|
|
517
|
-
|
|
508
|
+
P && W.length >= 0 && !yt && F(P, { actions: W });
|
|
518
509
|
}, [
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
|
|
510
|
+
P,
|
|
511
|
+
W,
|
|
512
|
+
yt,
|
|
513
|
+
F
|
|
523
514
|
]);
|
|
524
515
|
let Q = f((e, t) => {
|
|
525
|
-
|
|
516
|
+
j((n) => n && {
|
|
526
517
|
...n,
|
|
527
518
|
[e]: t
|
|
528
|
-
}),
|
|
529
|
-
}, [
|
|
530
|
-
|
|
519
|
+
}), L();
|
|
520
|
+
}, [L]), $ = f((e) => {
|
|
521
|
+
j((t) => t && {
|
|
531
522
|
...t,
|
|
532
523
|
config: e
|
|
533
|
-
}),
|
|
534
|
-
}, [
|
|
524
|
+
}), L();
|
|
525
|
+
}, [L]);
|
|
535
526
|
p(() => {
|
|
536
|
-
if (!
|
|
537
|
-
|
|
527
|
+
if (!A) {
|
|
528
|
+
z(null);
|
|
538
529
|
return;
|
|
539
530
|
}
|
|
540
|
-
if (
|
|
541
|
-
R
|
|
531
|
+
if (A.dataSinkId) {
|
|
532
|
+
z(R.find((e) => e.id === A.dataSinkId)?.key ?? null);
|
|
542
533
|
return;
|
|
543
534
|
}
|
|
544
535
|
let e = u({
|
|
545
|
-
parserId:
|
|
546
|
-
config:
|
|
547
|
-
}), t =
|
|
548
|
-
|
|
536
|
+
parserId: A.parserId,
|
|
537
|
+
config: A.config
|
|
538
|
+
}), t = B?.id === A.parserId ? B : null, n = e.source.kind === "DATASINK" && !e.source.ref && t ? R.find((e) => e.key === t.inputSinkKey) : void 0;
|
|
539
|
+
z(n?.key ?? null), n && j((e) => e && e.parserId === t?.id && !e.dataSinkId ? {
|
|
540
|
+
...e,
|
|
541
|
+
dataSinkId: n.id
|
|
542
|
+
} : e);
|
|
549
543
|
}, [
|
|
550
|
-
|
|
551
|
-
|
|
552
|
-
|
|
544
|
+
A,
|
|
545
|
+
R,
|
|
546
|
+
B
|
|
553
547
|
]);
|
|
554
|
-
let
|
|
555
|
-
if (
|
|
556
|
-
let t =
|
|
557
|
-
t && (Q("dataSinkId", t.id),
|
|
548
|
+
let Gt = f((e) => {
|
|
549
|
+
if (V(void 0), H(!1), U(null), z(e), e) {
|
|
550
|
+
let t = R.find((t) => t.key === e);
|
|
551
|
+
t && (Q("dataSinkId", t.id), j((t) => t && {
|
|
558
552
|
...t,
|
|
559
553
|
config: {
|
|
560
554
|
...t.config,
|
|
561
555
|
dataSinkKey: e
|
|
562
556
|
}
|
|
563
|
-
}),
|
|
564
|
-
} else Q("dataSinkId", void 0),
|
|
557
|
+
}), L());
|
|
558
|
+
} else Q("dataSinkId", void 0), j((e) => e && {
|
|
565
559
|
...e,
|
|
566
560
|
config: {
|
|
567
561
|
...e.config,
|
|
568
562
|
dataSinkKey: void 0
|
|
569
563
|
},
|
|
570
564
|
parserId: void 0
|
|
571
|
-
}),
|
|
565
|
+
}), L();
|
|
572
566
|
}, [
|
|
573
|
-
|
|
567
|
+
R,
|
|
574
568
|
Q,
|
|
575
|
-
|
|
576
|
-
]),
|
|
577
|
-
if (Q("parserId", e || void 0),
|
|
578
|
-
|
|
569
|
+
L
|
|
570
|
+
]), Kt = f(async (e) => {
|
|
571
|
+
if (Q("parserId", e || void 0), V(void 0), H(!1), U(null), e && I) {
|
|
572
|
+
ht(!0);
|
|
579
573
|
try {
|
|
580
|
-
let t = await
|
|
574
|
+
let t = await ct(e);
|
|
581
575
|
if (t?.success) {
|
|
582
|
-
|
|
583
|
-
let e =
|
|
584
|
-
(e.labelField || e.valueField) && (
|
|
576
|
+
V(t.output), H(!0);
|
|
577
|
+
let e = We(t.output);
|
|
578
|
+
(e.labelField || e.valueField) && (j((t) => {
|
|
585
579
|
if (!t) return t;
|
|
586
580
|
let n = t.config || {}, r = { ...n };
|
|
587
581
|
return e.labelField && !n.labelField && (r.labelField = e.labelField), e.valueField && !n.valueField && (r.valueField = e.valueField), e.xAxisField && !n.xAxisField && (r.xAxisField = e.xAxisField), {
|
|
588
582
|
...t,
|
|
589
583
|
config: r
|
|
590
584
|
};
|
|
591
|
-
}),
|
|
592
|
-
} else
|
|
585
|
+
}), L());
|
|
586
|
+
} else H(!0), U(t?.error || D("bigconsole.widget.properties.parser.previewFailed", "The parser could not produce a preview."));
|
|
593
587
|
} catch (e) {
|
|
594
|
-
|
|
588
|
+
H(!0), U(e instanceof Error ? e.message : D("bigconsole.widget.properties.parser.previewFailed", "The parser could not produce a preview.")), console.warn("Failed to auto-detect parser fields:", e);
|
|
595
589
|
} finally {
|
|
596
|
-
|
|
590
|
+
ht(!1);
|
|
597
591
|
}
|
|
598
592
|
}
|
|
599
593
|
}, [
|
|
600
594
|
Q,
|
|
601
|
-
|
|
602
|
-
F,
|
|
595
|
+
ct,
|
|
603
596
|
I,
|
|
604
|
-
|
|
605
|
-
|
|
606
|
-
|
|
607
|
-
|
|
608
|
-
|
|
597
|
+
L,
|
|
598
|
+
D
|
|
599
|
+
]), qt = f(async () => {
|
|
600
|
+
if (!I || !A) return;
|
|
601
|
+
let t = nt.current;
|
|
602
|
+
k("saving");
|
|
609
603
|
try {
|
|
610
604
|
let n = {
|
|
611
|
-
...
|
|
612
|
-
description:
|
|
613
|
-
}, r = ne(e.getState().widgets.get(
|
|
614
|
-
dataSinkId:
|
|
615
|
-
parserId:
|
|
605
|
+
...I.metadata || {},
|
|
606
|
+
description: A.description || ""
|
|
607
|
+
}, r = ne(e.getState().widgets.get(I.id)?.config ?? {}, tt.current, A.config), i = re(u({
|
|
608
|
+
dataSinkId: A.dataSinkId,
|
|
609
|
+
parserId: A.parserId,
|
|
616
610
|
config: {
|
|
617
611
|
...r,
|
|
618
612
|
binding: void 0
|
|
619
613
|
}
|
|
620
|
-
}), r), a = await
|
|
621
|
-
id:
|
|
622
|
-
title:
|
|
623
|
-
renderer:
|
|
624
|
-
template:
|
|
614
|
+
}), r), a = await rt({
|
|
615
|
+
id: I.id,
|
|
616
|
+
title: A.title,
|
|
617
|
+
renderer: A.renderer,
|
|
618
|
+
template: A.template,
|
|
625
619
|
config: i.config,
|
|
626
|
-
refreshInterval:
|
|
620
|
+
refreshInterval: A.refreshInterval,
|
|
627
621
|
dataSinkId: i.dataSinkId,
|
|
628
|
-
datasetId:
|
|
622
|
+
datasetId: A.datasetId,
|
|
629
623
|
parserId: i.parserId,
|
|
630
|
-
parserRules:
|
|
624
|
+
parserRules: A.parserRules,
|
|
631
625
|
metadata: n
|
|
632
|
-
}), o =
|
|
626
|
+
}), o = I.drilldown, s = null, c = I.drilldown?.id;
|
|
633
627
|
try {
|
|
634
|
-
if (
|
|
635
|
-
let { enabled: e, targetDashboardId: t, targetPageId: n, navigationMode: r, parameterMapping: i, passGlobalFilters: a, maxDepth: s } =
|
|
636
|
-
if (c && !e) await
|
|
628
|
+
if (A.drilldownConfig) {
|
|
629
|
+
let { enabled: e, targetDashboardId: t, targetPageId: n, navigationMode: r, parameterMapping: i, passGlobalFilters: a, maxDepth: s } = A.drilldownConfig;
|
|
630
|
+
if (c && !e) await ot(c), o = void 0;
|
|
637
631
|
else if (c) {
|
|
638
|
-
let l = await
|
|
632
|
+
let l = await at({
|
|
639
633
|
id: c,
|
|
640
634
|
targetDashboardId: t,
|
|
641
635
|
targetPageId: n,
|
|
@@ -647,8 +641,8 @@ var T = d(function({ isOpen: d, onClose: be }) {
|
|
|
647
641
|
});
|
|
648
642
|
l && (o = l);
|
|
649
643
|
} else if (e && t) {
|
|
650
|
-
let e = await
|
|
651
|
-
sourceWidgetId:
|
|
644
|
+
let e = await it({
|
|
645
|
+
sourceWidgetId: I.id,
|
|
652
646
|
targetDashboardId: t,
|
|
653
647
|
targetPageId: n,
|
|
654
648
|
parameterMapping: i || {},
|
|
@@ -663,61 +657,59 @@ var T = d(function({ isOpen: d, onClose: be }) {
|
|
|
663
657
|
s = e instanceof Error ? e : Error(String(e));
|
|
664
658
|
}
|
|
665
659
|
if (a) {
|
|
666
|
-
if (
|
|
667
|
-
title:
|
|
668
|
-
description:
|
|
669
|
-
renderer:
|
|
670
|
-
template:
|
|
660
|
+
if (F(I.id, {
|
|
661
|
+
title: A.title,
|
|
662
|
+
description: A.description,
|
|
663
|
+
renderer: A.renderer,
|
|
664
|
+
template: A.template,
|
|
671
665
|
config: i.config,
|
|
672
|
-
refreshInterval:
|
|
666
|
+
refreshInterval: A.refreshInterval,
|
|
673
667
|
dataSinkId: i.dataSinkId,
|
|
674
|
-
datasetId:
|
|
668
|
+
datasetId: A.datasetId,
|
|
675
669
|
parserId: i.parserId,
|
|
676
|
-
parserRules:
|
|
670
|
+
parserRules: A.parserRules,
|
|
677
671
|
drilldown: o,
|
|
678
672
|
updatedAt: (/* @__PURE__ */ new Date()).toISOString()
|
|
679
673
|
}), s) {
|
|
680
|
-
|
|
674
|
+
k("error"), Re.error(D("bigconsole.widget.drilldown.saveFailed", "Drilldown not saved"), { description: s.message });
|
|
681
675
|
return;
|
|
682
676
|
}
|
|
683
|
-
|
|
684
|
-
} else
|
|
677
|
+
k("saved"), nt.current === t && N(!1), setTimeout(() => k("idle"), 2e3);
|
|
678
|
+
} else k("error");
|
|
685
679
|
} catch {
|
|
686
|
-
|
|
680
|
+
k("error");
|
|
687
681
|
}
|
|
688
682
|
}, [
|
|
683
|
+
I,
|
|
684
|
+
A,
|
|
685
|
+
rt,
|
|
689
686
|
F,
|
|
690
|
-
|
|
691
|
-
|
|
692
|
-
|
|
693
|
-
|
|
694
|
-
|
|
695
|
-
|
|
696
|
-
|
|
697
|
-
]), $t = f(() => {
|
|
698
|
-
if (!F) return;
|
|
699
|
-
let e = Ze(F);
|
|
700
|
-
k(e), M(e), st.current = F.config || {}, j(!1), D("idle");
|
|
701
|
-
}, [F]), en = f((e) => {
|
|
687
|
+
it,
|
|
688
|
+
at,
|
|
689
|
+
ot,
|
|
690
|
+
D
|
|
691
|
+
]), Jt = f(() => {
|
|
692
|
+
I && (j(Ke(I)), tt.current = I.config || {}, N(!1), k("idle"));
|
|
693
|
+
}, [I]), Yt = f((e) => {
|
|
702
694
|
$(e);
|
|
703
|
-
}, [$]),
|
|
704
|
-
|
|
695
|
+
}, [$]), Xt = f((e) => {
|
|
696
|
+
j((t) => t && {
|
|
705
697
|
...t,
|
|
706
698
|
drilldownConfig: e
|
|
707
|
-
}),
|
|
708
|
-
}, [
|
|
699
|
+
}), L();
|
|
700
|
+
}, [L]), Zt = I ? i(I.type) : null, Qt = m(() => ze.map((e) => ({
|
|
709
701
|
value: e.value,
|
|
710
|
-
label:
|
|
711
|
-
description:
|
|
712
|
-
})), [
|
|
702
|
+
label: D(e.labelKey, e.label),
|
|
703
|
+
description: D(e.descriptionKey, e.description)
|
|
704
|
+
})), [D]), $t = m(() => Be.map((e) => ({
|
|
713
705
|
value: e.value,
|
|
714
|
-
label:
|
|
715
|
-
})), [
|
|
716
|
-
return /* @__PURE__ */
|
|
706
|
+
label: D(e.labelKey, e.label)
|
|
707
|
+
})), [D]);
|
|
708
|
+
return /* @__PURE__ */ w(ke, {
|
|
717
709
|
open: d,
|
|
718
|
-
onOpenChange: (e) => !e &&
|
|
710
|
+
onOpenChange: (e) => !e && _e(),
|
|
719
711
|
modal: !1,
|
|
720
|
-
children: /* @__PURE__ */
|
|
712
|
+
children: /* @__PURE__ */ T(Ae, {
|
|
721
713
|
style: {
|
|
722
714
|
width: "min(420px, 100vw)",
|
|
723
715
|
maxWidth: "100vw",
|
|
@@ -728,20 +720,20 @@ var T = d(function({ isOpen: d, onClose: be }) {
|
|
|
728
720
|
overflow: "hidden"
|
|
729
721
|
},
|
|
730
722
|
children: [
|
|
731
|
-
/* @__PURE__ */
|
|
723
|
+
/* @__PURE__ */ w(Me, {
|
|
732
724
|
style: {
|
|
733
725
|
padding: "var(--space-cardPadding)",
|
|
734
726
|
borderBottom: "1px solid var(--color-border-subtle)",
|
|
735
727
|
backgroundColor: "var(--color-bg-surface)",
|
|
736
728
|
flexShrink: 0
|
|
737
729
|
},
|
|
738
|
-
children: /* @__PURE__ */
|
|
730
|
+
children: /* @__PURE__ */ T("div", {
|
|
739
731
|
style: {
|
|
740
732
|
display: "flex",
|
|
741
733
|
alignItems: "center",
|
|
742
734
|
gap: "var(--space-controlGap)"
|
|
743
735
|
},
|
|
744
|
-
children: [/* @__PURE__ */
|
|
736
|
+
children: [/* @__PURE__ */ w("div", {
|
|
745
737
|
style: {
|
|
746
738
|
display: "flex",
|
|
747
739
|
height: "var(--size-controlHeight-lg)",
|
|
@@ -753,62 +745,62 @@ var T = d(function({ isOpen: d, onClose: be }) {
|
|
|
753
745
|
boxShadow: "var(--shadow-elevation-2)",
|
|
754
746
|
flexShrink: 0
|
|
755
747
|
},
|
|
756
|
-
children: /* @__PURE__ */
|
|
748
|
+
children: /* @__PURE__ */ w(ve, { style: {
|
|
757
749
|
height: "var(--size-icon-md)",
|
|
758
750
|
width: "var(--size-icon-md)",
|
|
759
751
|
color: "var(--color-action-primary-text)"
|
|
760
752
|
} })
|
|
761
|
-
}), /* @__PURE__ */
|
|
753
|
+
}), /* @__PURE__ */ T("div", {
|
|
762
754
|
style: {
|
|
763
755
|
flex: 1,
|
|
764
756
|
minWidth: 0
|
|
765
757
|
},
|
|
766
|
-
children: [/* @__PURE__ */
|
|
758
|
+
children: [/* @__PURE__ */ T("div", {
|
|
767
759
|
style: {
|
|
768
760
|
display: "flex",
|
|
769
761
|
alignItems: "center",
|
|
770
762
|
gap: "var(--space-iconGap)"
|
|
771
763
|
},
|
|
772
764
|
children: [
|
|
773
|
-
/* @__PURE__ */
|
|
765
|
+
/* @__PURE__ */ w(Ne, {
|
|
774
766
|
style: {
|
|
775
767
|
fontSize: "var(--font-size-body-md)",
|
|
776
768
|
fontWeight: "var(--font-weight-bold)",
|
|
777
769
|
color: "var(--color-text-primary)",
|
|
778
770
|
margin: 0
|
|
779
771
|
},
|
|
780
|
-
children:
|
|
772
|
+
children: I ? D("bigconsole.widget.properties.header.widgetProperties", "Widget Properties") : D("bigconsole.widget.properties.header.properties", "Properties")
|
|
781
773
|
}),
|
|
782
|
-
|
|
774
|
+
O === "saving" && /* @__PURE__ */ w(Pe, { style: {
|
|
783
775
|
height: "var(--size-icon-sm)",
|
|
784
776
|
width: "var(--size-icon-sm)"
|
|
785
777
|
} }),
|
|
786
|
-
|
|
778
|
+
O === "saved" && /* @__PURE__ */ w(g, { style: {
|
|
787
779
|
height: "var(--size-icon-sm)",
|
|
788
780
|
width: "var(--size-icon-sm)",
|
|
789
781
|
color: "var(--color-status-success-bg)"
|
|
790
782
|
} }),
|
|
791
|
-
|
|
783
|
+
O === "error" && /* @__PURE__ */ w(Se, { style: {
|
|
792
784
|
height: "var(--size-icon-sm)",
|
|
793
785
|
width: "var(--size-icon-sm)",
|
|
794
786
|
color: "var(--color-status-error-bg)"
|
|
795
787
|
} })
|
|
796
788
|
]
|
|
797
|
-
}),
|
|
789
|
+
}), Zt && /* @__PURE__ */ w(je, {
|
|
798
790
|
style: {
|
|
799
791
|
fontSize: "var(--font-size-body-sm)",
|
|
800
792
|
color: "var(--color-text-secondary)",
|
|
801
793
|
margin: "var(--space-controlGap) 0 0 0",
|
|
802
794
|
fontWeight: "var(--font-weight-medium)"
|
|
803
795
|
},
|
|
804
|
-
children:
|
|
796
|
+
children: Zt.name
|
|
805
797
|
})]
|
|
806
798
|
})]
|
|
807
799
|
})
|
|
808
800
|
}),
|
|
809
|
-
|
|
810
|
-
value:
|
|
811
|
-
onValueChange: (e) =>
|
|
801
|
+
I ? /* @__PURE__ */ T(Fe, {
|
|
802
|
+
value: qe,
|
|
803
|
+
onValueChange: (e) => Je(e),
|
|
812
804
|
style: {
|
|
813
805
|
flex: 1,
|
|
814
806
|
display: "flex",
|
|
@@ -816,7 +808,7 @@ var T = d(function({ isOpen: d, onClose: be }) {
|
|
|
816
808
|
minHeight: 0,
|
|
817
809
|
overflow: "hidden"
|
|
818
810
|
},
|
|
819
|
-
children: [/* @__PURE__ */
|
|
811
|
+
children: [/* @__PURE__ */ T(Ie, {
|
|
820
812
|
style: {
|
|
821
813
|
width: "100%",
|
|
822
814
|
display: "flex",
|
|
@@ -832,28 +824,28 @@ var T = d(function({ isOpen: d, onClose: be }) {
|
|
|
832
824
|
gap: "2px"
|
|
833
825
|
},
|
|
834
826
|
children: [
|
|
835
|
-
/* @__PURE__ */ S
|
|
827
|
+
/* @__PURE__ */ w(S, {
|
|
836
828
|
value: "general",
|
|
837
|
-
style:
|
|
838
|
-
children:
|
|
829
|
+
style: E,
|
|
830
|
+
children: D("bigconsole.widget.properties.tab.general", "General")
|
|
839
831
|
}),
|
|
840
|
-
/* @__PURE__ */ S
|
|
832
|
+
/* @__PURE__ */ w(S, {
|
|
841
833
|
value: "data",
|
|
842
|
-
style:
|
|
843
|
-
children:
|
|
834
|
+
style: E,
|
|
835
|
+
children: D("bigconsole.widget.properties.tab.data", "Data")
|
|
844
836
|
}),
|
|
845
|
-
/* @__PURE__ */ S
|
|
837
|
+
/* @__PURE__ */ w(S, {
|
|
846
838
|
value: "advanced",
|
|
847
|
-
style:
|
|
848
|
-
children:
|
|
839
|
+
style: E,
|
|
840
|
+
children: D("bigconsole.widget.properties.tab.advanced", "Advanced")
|
|
849
841
|
}),
|
|
850
|
-
/* @__PURE__ */ S
|
|
842
|
+
/* @__PURE__ */ w(S, {
|
|
851
843
|
value: "appearance",
|
|
852
|
-
style:
|
|
853
|
-
children:
|
|
844
|
+
style: E,
|
|
845
|
+
children: D("bigconsole.widget.properties.tab.style", "Style")
|
|
854
846
|
})
|
|
855
847
|
]
|
|
856
|
-
}), /* @__PURE__ */
|
|
848
|
+
}), /* @__PURE__ */ T("div", {
|
|
857
849
|
style: {
|
|
858
850
|
flex: 1,
|
|
859
851
|
overflow: "auto",
|
|
@@ -861,96 +853,96 @@ var T = d(function({ isOpen: d, onClose: be }) {
|
|
|
861
853
|
minHeight: 0
|
|
862
854
|
},
|
|
863
855
|
children: [
|
|
864
|
-
/* @__PURE__ */
|
|
856
|
+
/* @__PURE__ */ w(x, {
|
|
865
857
|
value: "general",
|
|
866
858
|
className: "mt-0",
|
|
867
|
-
children:
|
|
868
|
-
/* @__PURE__ */
|
|
869
|
-
title:
|
|
870
|
-
description:
|
|
871
|
-
refreshInterval:
|
|
859
|
+
children: A && /* @__PURE__ */ T(r, { children: [
|
|
860
|
+
/* @__PURE__ */ w(ue, {
|
|
861
|
+
title: A.title,
|
|
862
|
+
description: A.description,
|
|
863
|
+
refreshInterval: A.refreshInterval,
|
|
872
864
|
onTitleChange: (e) => Q("title", e),
|
|
873
865
|
onDescriptionChange: (e) => Q("description", e),
|
|
874
866
|
onRefreshIntervalChange: (e) => Q("refreshInterval", e)
|
|
875
867
|
}),
|
|
876
|
-
/* @__PURE__ */
|
|
877
|
-
title:
|
|
878
|
-
description:
|
|
868
|
+
/* @__PURE__ */ w(n, {
|
|
869
|
+
title: D("bigconsole.widget.properties.actions.heading", "Buttons"),
|
|
870
|
+
description: D("bigconsole.widget.properties.actions.subheading", "Configure buttons on this widget"),
|
|
879
871
|
headingLevel: 3,
|
|
880
|
-
meta:
|
|
872
|
+
meta: W.length > 0 ? /* @__PURE__ */ w("span", {
|
|
881
873
|
className: "rounded-pill bg-bg-sunken px-2 py-0.5 text-xs font-medium text-text-secondary",
|
|
882
|
-
children:
|
|
874
|
+
children: W.length
|
|
883
875
|
}) : void 0,
|
|
884
|
-
actions: /* @__PURE__ */
|
|
876
|
+
actions: /* @__PURE__ */ T(_, {
|
|
885
877
|
size: "sm",
|
|
886
|
-
onClick:
|
|
887
|
-
children: [/* @__PURE__ */
|
|
878
|
+
onClick: zt,
|
|
879
|
+
children: [/* @__PURE__ */ w(be, { className: "size-4" }), D("bigconsole.widget.properties.actions.add", "Add button")]
|
|
888
880
|
}),
|
|
889
881
|
"data-testid": "widget-inspector-actions",
|
|
890
|
-
children:
|
|
882
|
+
children: yt ? /* @__PURE__ */ w("div", {
|
|
891
883
|
className: "flex justify-center py-8",
|
|
892
|
-
children: /* @__PURE__ */
|
|
893
|
-
}) :
|
|
884
|
+
children: /* @__PURE__ */ w(Pe, { className: "size-6" })
|
|
885
|
+
}) : W.length === 0 ? /* @__PURE__ */ w("p", {
|
|
894
886
|
className: "text-sm text-text-secondary",
|
|
895
|
-
children:
|
|
896
|
-
}) : /* @__PURE__ */
|
|
887
|
+
children: D("bigconsole.widget.properties.actions.empty", "No buttons yet — add one to let viewers take an action.")
|
|
888
|
+
}) : /* @__PURE__ */ w("div", {
|
|
897
889
|
className: "space-y-2",
|
|
898
|
-
children: [...
|
|
890
|
+
children: [...W].sort((e, t) => e.order - t.order).map((e, t) => /* @__PURE__ */ w(Ce, {
|
|
899
891
|
className: e.disabled ? "opacity-60" : "",
|
|
900
|
-
children: /* @__PURE__ */
|
|
892
|
+
children: /* @__PURE__ */ T(we, {
|
|
901
893
|
className: "p-3 flex items-center gap-2",
|
|
902
894
|
children: [
|
|
903
|
-
/* @__PURE__ */
|
|
895
|
+
/* @__PURE__ */ T("div", {
|
|
904
896
|
className: "flex flex-col gap-0.5",
|
|
905
|
-
children: [/* @__PURE__ */
|
|
897
|
+
children: [/* @__PURE__ */ w(_, {
|
|
906
898
|
variant: "ghost",
|
|
907
899
|
size: "icon-sm",
|
|
908
|
-
onClick: () =>
|
|
900
|
+
onClick: () => Ut(t),
|
|
909
901
|
disabled: t === 0,
|
|
910
902
|
className: "h-5 w-5",
|
|
911
|
-
children: /* @__PURE__ */
|
|
912
|
-
}), /* @__PURE__ */
|
|
903
|
+
children: /* @__PURE__ */ w(ge, { className: "size-3" })
|
|
904
|
+
}), /* @__PURE__ */ w(_, {
|
|
913
905
|
variant: "ghost",
|
|
914
906
|
size: "icon-sm",
|
|
915
|
-
onClick: () =>
|
|
916
|
-
disabled: t ===
|
|
907
|
+
onClick: () => Wt(t),
|
|
908
|
+
disabled: t === W.length - 1,
|
|
917
909
|
className: "h-5 w-5",
|
|
918
|
-
children: /* @__PURE__ */
|
|
910
|
+
children: /* @__PURE__ */ w(he, { className: "size-3" })
|
|
919
911
|
})]
|
|
920
912
|
}),
|
|
921
|
-
/* @__PURE__ */
|
|
913
|
+
/* @__PURE__ */ T("div", {
|
|
922
914
|
className: "flex-1 min-w-0",
|
|
923
|
-
children: [/* @__PURE__ */
|
|
915
|
+
children: [/* @__PURE__ */ T("div", {
|
|
924
916
|
className: "flex items-center gap-2",
|
|
925
|
-
children: [/* @__PURE__ */
|
|
917
|
+
children: [/* @__PURE__ */ w("span", {
|
|
926
918
|
"aria-hidden": "true",
|
|
927
|
-
className: `size-2 shrink-0 rounded-full ${
|
|
928
|
-
}), /* @__PURE__ */
|
|
919
|
+
className: `size-2 shrink-0 rounded-full ${He[e.style] || Ue}`
|
|
920
|
+
}), /* @__PURE__ */ w("span", {
|
|
929
921
|
className: "text-sm font-medium truncate",
|
|
930
922
|
children: e.label
|
|
931
923
|
})]
|
|
932
|
-
}), /* @__PURE__ */
|
|
924
|
+
}), /* @__PURE__ */ w("p", {
|
|
933
925
|
className: "text-xs text-text-secondary truncate",
|
|
934
|
-
children:
|
|
935
|
-
method:
|
|
936
|
-
url:
|
|
937
|
-
}) :
|
|
926
|
+
children: Rt.has(e.name) ? D("bigconsole.widget.properties.actions.webhookSummary", "→ {{method}} {{url}}", {
|
|
927
|
+
method: Rt.get(e.name)?.method ?? "",
|
|
928
|
+
url: Rt.get(e.name)?.webhookUrl ?? ""
|
|
929
|
+
}) : D("bigconsole.widget.properties.actions.emitsEvent", "Emits an event")
|
|
938
930
|
})]
|
|
939
931
|
}),
|
|
940
|
-
/* @__PURE__ */
|
|
932
|
+
/* @__PURE__ */ T("div", {
|
|
941
933
|
className: "flex shrink-0 gap-1",
|
|
942
|
-
children: [/* @__PURE__ */
|
|
934
|
+
children: [/* @__PURE__ */ w(_, {
|
|
943
935
|
variant: "ghost",
|
|
944
936
|
size: "icon-sm",
|
|
945
937
|
"aria-label": `Edit ${e.label}`,
|
|
946
|
-
onClick: () =>
|
|
947
|
-
children: /* @__PURE__ */
|
|
948
|
-
}), /* @__PURE__ */
|
|
938
|
+
onClick: () => Bt(e),
|
|
939
|
+
children: /* @__PURE__ */ w(ye, { className: "size-4" })
|
|
940
|
+
}), /* @__PURE__ */ w(_, {
|
|
949
941
|
variant: "ghost",
|
|
950
942
|
size: "icon-sm",
|
|
951
943
|
"aria-label": `Delete ${e.label}`,
|
|
952
|
-
onClick: () =>
|
|
953
|
-
children: /* @__PURE__ */
|
|
944
|
+
onClick: () => Ht(e.id),
|
|
945
|
+
children: /* @__PURE__ */ w(xe, { className: "size-4" })
|
|
954
946
|
})]
|
|
955
947
|
})
|
|
956
948
|
]
|
|
@@ -958,73 +950,73 @@ var T = d(function({ isOpen: d, onClose: be }) {
|
|
|
958
950
|
}, e.id))
|
|
959
951
|
})
|
|
960
952
|
}),
|
|
961
|
-
|
|
962
|
-
position:
|
|
953
|
+
Ze && Qe && /* @__PURE__ */ w(fe, {
|
|
954
|
+
position: Qe,
|
|
963
955
|
columns: pe.cols,
|
|
964
|
-
onChange:
|
|
956
|
+
onChange: $e
|
|
965
957
|
})
|
|
966
958
|
] })
|
|
967
959
|
}),
|
|
968
|
-
/* @__PURE__ */
|
|
960
|
+
/* @__PURE__ */ w(x, {
|
|
969
961
|
value: "data",
|
|
970
962
|
className: "mt-0",
|
|
971
|
-
children:
|
|
963
|
+
children: A && /* @__PURE__ */ T(r, { children: [(() => {
|
|
972
964
|
let e = u({
|
|
973
|
-
dataSinkId:
|
|
974
|
-
parserId:
|
|
965
|
+
dataSinkId: A.dataSinkId,
|
|
966
|
+
parserId: A.parserId,
|
|
975
967
|
config: {
|
|
976
|
-
...
|
|
968
|
+
...A.config,
|
|
977
969
|
binding: void 0
|
|
978
970
|
}
|
|
979
971
|
}), t = te({
|
|
980
972
|
binding: e,
|
|
981
|
-
loading:
|
|
982
|
-
error:
|
|
983
|
-
preview:
|
|
984
|
-
previewComplete:
|
|
973
|
+
loading: mt || dt,
|
|
974
|
+
error: vt,
|
|
975
|
+
preview: gt,
|
|
976
|
+
previewComplete: _t
|
|
985
977
|
});
|
|
986
|
-
return /* @__PURE__ */
|
|
987
|
-
consoleId:
|
|
978
|
+
return /* @__PURE__ */ w(de, {
|
|
979
|
+
consoleId: I?.dashboardId || "",
|
|
988
980
|
binding: e,
|
|
989
|
-
resolvedParser:
|
|
990
|
-
dataSinkKey:
|
|
991
|
-
dataPath: typeof
|
|
981
|
+
resolvedParser: B ?? void 0,
|
|
982
|
+
dataSinkKey: st,
|
|
983
|
+
dataPath: typeof A.config.dataPath == "string" ? A.config.dataPath : void 0,
|
|
992
984
|
status: t.status,
|
|
993
|
-
resolving:
|
|
985
|
+
resolving: dt,
|
|
994
986
|
missingFields: t.missingFields,
|
|
995
|
-
preview:
|
|
996
|
-
error:
|
|
997
|
-
onDataSinkChange:
|
|
998
|
-
onParserChange:
|
|
987
|
+
preview: gt,
|
|
988
|
+
error: vt,
|
|
989
|
+
onDataSinkChange: Gt,
|
|
990
|
+
onParserChange: Kt,
|
|
999
991
|
onDataPathChange: (e) => $({
|
|
1000
|
-
...
|
|
992
|
+
...A.config,
|
|
1001
993
|
dataPath: e
|
|
1002
994
|
})
|
|
1003
995
|
});
|
|
1004
|
-
})(), /* @__PURE__ */
|
|
996
|
+
})(), /* @__PURE__ */ w(n, {
|
|
1005
997
|
emphasis: "muted",
|
|
1006
|
-
title:
|
|
998
|
+
title: D("bigconsole.widget.properties.data.alternativeSources", "Alternative Data Sources"),
|
|
1007
999
|
description: "Skip the DataSink pipeline and fetch straight from an API, a GraphQL endpoint or sample JSON.",
|
|
1008
1000
|
headingLevel: 3,
|
|
1009
1001
|
"data-testid": "widget-inspector-alt-sources",
|
|
1010
|
-
children: /* @__PURE__ */
|
|
1002
|
+
children: /* @__PURE__ */ T("div", {
|
|
1011
1003
|
className: "flex flex-col gap-form-gap",
|
|
1012
1004
|
children: [
|
|
1013
|
-
/* @__PURE__ */
|
|
1005
|
+
/* @__PURE__ */ T("div", {
|
|
1014
1006
|
className: "space-y-2",
|
|
1015
|
-
children: [/* @__PURE__ */
|
|
1016
|
-
value:
|
|
1007
|
+
children: [/* @__PURE__ */ w(y, { children: D("bigconsole.widget.properties.data.sourceTypeLabel", "Data Source Type") }), /* @__PURE__ */ T(Te, {
|
|
1008
|
+
value: A.config?.dataSourceType || "",
|
|
1017
1009
|
onValueChange: (e) => $({
|
|
1018
|
-
...
|
|
1010
|
+
...A.config,
|
|
1019
1011
|
dataSourceType: e || void 0
|
|
1020
1012
|
}),
|
|
1021
|
-
children: [/* @__PURE__ */
|
|
1013
|
+
children: [/* @__PURE__ */ w(De, {
|
|
1022
1014
|
style: {
|
|
1023
1015
|
height: "var(--size-controlHeight-md)",
|
|
1024
1016
|
fontSize: "var(--font-size-body-sm)"
|
|
1025
1017
|
},
|
|
1026
|
-
children: /* @__PURE__ */
|
|
1027
|
-
}), /* @__PURE__ */
|
|
1018
|
+
children: /* @__PURE__ */ w(Oe, { placeholder: D("bigconsole.widget.properties.data.selectTypePlaceholder", "Select type...") })
|
|
1019
|
+
}), /* @__PURE__ */ w(Ee, {
|
|
1028
1020
|
position: "popper",
|
|
1029
1021
|
side: "bottom",
|
|
1030
1022
|
sideOffset: 4,
|
|
@@ -1037,56 +1029,56 @@ var T = d(function({ isOpen: d, onClose: be }) {
|
|
|
1037
1029
|
boxShadow: "var(--shadow-elevation-3)",
|
|
1038
1030
|
borderRadius: "var(--radius-button)"
|
|
1039
1031
|
},
|
|
1040
|
-
children:
|
|
1032
|
+
children: $t.map((e) => /* @__PURE__ */ w(b, {
|
|
1041
1033
|
value: e.value,
|
|
1042
1034
|
children: e.label
|
|
1043
1035
|
}, e.value))
|
|
1044
1036
|
})]
|
|
1045
1037
|
})]
|
|
1046
1038
|
}),
|
|
1047
|
-
|
|
1039
|
+
A.config?.dataSourceType === "REST_API" && /* @__PURE__ */ T("div", {
|
|
1048
1040
|
className: "space-y-3",
|
|
1049
1041
|
children: [
|
|
1050
|
-
/* @__PURE__ */
|
|
1042
|
+
/* @__PURE__ */ T("div", {
|
|
1051
1043
|
className: "space-y-2",
|
|
1052
|
-
children: [/* @__PURE__ */
|
|
1053
|
-
value:
|
|
1044
|
+
children: [/* @__PURE__ */ w(y, { children: D("bigconsole.widget.properties.rest.endpointUrlLabel", "Endpoint URL *") }), /* @__PURE__ */ w(v, {
|
|
1045
|
+
value: A.config?.endpointUrl || "",
|
|
1054
1046
|
onChange: (e) => $({
|
|
1055
|
-
...
|
|
1047
|
+
...A.config,
|
|
1056
1048
|
endpointUrl: e.target.value || void 0
|
|
1057
1049
|
}),
|
|
1058
1050
|
placeholder: "https://api.example.com/data"
|
|
1059
1051
|
})]
|
|
1060
1052
|
}),
|
|
1061
|
-
/* @__PURE__ */
|
|
1053
|
+
/* @__PURE__ */ T("div", {
|
|
1062
1054
|
className: "space-y-2",
|
|
1063
|
-
children: [/* @__PURE__ */
|
|
1064
|
-
value:
|
|
1055
|
+
children: [/* @__PURE__ */ w(y, { children: D("bigconsole.widget.properties.rest.httpMethodLabel", "HTTP Method") }), /* @__PURE__ */ T(Te, {
|
|
1056
|
+
value: A.config?.httpMethod || "GET",
|
|
1065
1057
|
onValueChange: (e) => $({
|
|
1066
|
-
...
|
|
1058
|
+
...A.config,
|
|
1067
1059
|
httpMethod: e
|
|
1068
1060
|
}),
|
|
1069
|
-
children: [/* @__PURE__ */
|
|
1061
|
+
children: [/* @__PURE__ */ w(De, {
|
|
1070
1062
|
style: { height: "var(--size-controlHeight-md)" },
|
|
1071
|
-
children: /* @__PURE__ */
|
|
1072
|
-
}), /* @__PURE__ */
|
|
1063
|
+
children: /* @__PURE__ */ w(Oe, {})
|
|
1064
|
+
}), /* @__PURE__ */ T(Ee, {
|
|
1073
1065
|
position: "popper",
|
|
1074
1066
|
side: "bottom",
|
|
1075
1067
|
sideOffset: 4,
|
|
1076
1068
|
children: [
|
|
1077
|
-
/* @__PURE__ */
|
|
1069
|
+
/* @__PURE__ */ w(b, {
|
|
1078
1070
|
value: "GET",
|
|
1079
1071
|
children: "GET"
|
|
1080
1072
|
}),
|
|
1081
|
-
/* @__PURE__ */
|
|
1073
|
+
/* @__PURE__ */ w(b, {
|
|
1082
1074
|
value: "POST",
|
|
1083
1075
|
children: "POST"
|
|
1084
1076
|
}),
|
|
1085
|
-
/* @__PURE__ */
|
|
1077
|
+
/* @__PURE__ */ w(b, {
|
|
1086
1078
|
value: "PUT",
|
|
1087
1079
|
children: "PUT"
|
|
1088
1080
|
}),
|
|
1089
|
-
/* @__PURE__ */
|
|
1081
|
+
/* @__PURE__ */ w(b, {
|
|
1090
1082
|
value: "DELETE",
|
|
1091
1083
|
children: "DELETE"
|
|
1092
1084
|
})
|
|
@@ -1094,12 +1086,12 @@ var T = d(function({ isOpen: d, onClose: be }) {
|
|
|
1094
1086
|
})]
|
|
1095
1087
|
})]
|
|
1096
1088
|
}),
|
|
1097
|
-
/* @__PURE__ */
|
|
1089
|
+
/* @__PURE__ */ T("div", {
|
|
1098
1090
|
className: "space-y-2",
|
|
1099
|
-
children: [/* @__PURE__ */
|
|
1100
|
-
value:
|
|
1091
|
+
children: [/* @__PURE__ */ w(y, { children: D("bigconsole.widget.properties.rest.headersLabel", "Headers (JSON)") }), /* @__PURE__ */ w(C, {
|
|
1092
|
+
value: A.config?.headers || "",
|
|
1101
1093
|
onChange: (e) => $({
|
|
1102
|
-
...
|
|
1094
|
+
...A.config,
|
|
1103
1095
|
headers: e.target.value || void 0
|
|
1104
1096
|
}),
|
|
1105
1097
|
rows: 3,
|
|
@@ -1107,60 +1099,60 @@ var T = d(function({ isOpen: d, onClose: be }) {
|
|
|
1107
1099
|
className: "font-mono text-xs"
|
|
1108
1100
|
})]
|
|
1109
1101
|
}),
|
|
1110
|
-
/* @__PURE__ */
|
|
1102
|
+
/* @__PURE__ */ T("div", {
|
|
1111
1103
|
className: "space-y-2",
|
|
1112
|
-
children: [/* @__PURE__ */
|
|
1113
|
-
value:
|
|
1104
|
+
children: [/* @__PURE__ */ w(y, { children: D("bigconsole.widget.properties.rest.authenticationLabel", "Authentication") }), /* @__PURE__ */ T(Te, {
|
|
1105
|
+
value: A.config?.authType || "none",
|
|
1114
1106
|
onValueChange: (e) => $({
|
|
1115
|
-
...
|
|
1107
|
+
...A.config,
|
|
1116
1108
|
authType: e
|
|
1117
1109
|
}),
|
|
1118
|
-
children: [/* @__PURE__ */
|
|
1110
|
+
children: [/* @__PURE__ */ w(De, {
|
|
1119
1111
|
style: { height: "var(--size-controlHeight-md)" },
|
|
1120
|
-
children: /* @__PURE__ */
|
|
1121
|
-
}), /* @__PURE__ */
|
|
1112
|
+
children: /* @__PURE__ */ w(Oe, {})
|
|
1113
|
+
}), /* @__PURE__ */ T(Ee, {
|
|
1122
1114
|
position: "popper",
|
|
1123
1115
|
side: "bottom",
|
|
1124
1116
|
sideOffset: 4,
|
|
1125
1117
|
children: [
|
|
1126
|
-
/* @__PURE__ */
|
|
1118
|
+
/* @__PURE__ */ w(b, {
|
|
1127
1119
|
value: "none",
|
|
1128
|
-
children:
|
|
1120
|
+
children: D("bigconsole.widget.properties.rest.authNone", "None")
|
|
1129
1121
|
}),
|
|
1130
|
-
/* @__PURE__ */
|
|
1122
|
+
/* @__PURE__ */ w(b, {
|
|
1131
1123
|
value: "api_key",
|
|
1132
|
-
children:
|
|
1124
|
+
children: D("bigconsole.widget.properties.rest.authApiKey", "API Key")
|
|
1133
1125
|
}),
|
|
1134
|
-
/* @__PURE__ */
|
|
1126
|
+
/* @__PURE__ */ w(b, {
|
|
1135
1127
|
value: "bearer",
|
|
1136
|
-
children:
|
|
1128
|
+
children: D("bigconsole.widget.properties.rest.authBearer", "Bearer Token")
|
|
1137
1129
|
}),
|
|
1138
|
-
/* @__PURE__ */
|
|
1130
|
+
/* @__PURE__ */ w(b, {
|
|
1139
1131
|
value: "basic",
|
|
1140
|
-
children:
|
|
1132
|
+
children: D("bigconsole.widget.properties.rest.authBasic", "Basic Auth")
|
|
1141
1133
|
})
|
|
1142
1134
|
]
|
|
1143
1135
|
})]
|
|
1144
1136
|
})]
|
|
1145
1137
|
}),
|
|
1146
|
-
!!(
|
|
1138
|
+
!!(A.config?.authType && A.config.authType !== "none") && /* @__PURE__ */ T("div", {
|
|
1147
1139
|
className: "space-y-2",
|
|
1148
|
-
children: [/* @__PURE__ */
|
|
1140
|
+
children: [/* @__PURE__ */ w(y, { children: String(A.config.authType) === "basic" ? D("bigconsole.widget.properties.rest.credentialsLabel", "Credentials (user:pass)") : D("bigconsole.widget.properties.rest.tokenKeyLabel", "Token/Key") }), /* @__PURE__ */ w(v, {
|
|
1149
1141
|
type: "password",
|
|
1150
|
-
value:
|
|
1142
|
+
value: A.config?.authValue || "",
|
|
1151
1143
|
onChange: (e) => $({
|
|
1152
|
-
...
|
|
1144
|
+
...A.config,
|
|
1153
1145
|
authValue: e.target.value || void 0
|
|
1154
1146
|
}),
|
|
1155
|
-
placeholder:
|
|
1147
|
+
placeholder: A.config.authType === "basic" ? D("bigconsole.widget.properties.rest.credentialsPlaceholder", "username:password") : D("bigconsole.widget.properties.rest.tokenKeyPlaceholder", "Enter token or API key")
|
|
1156
1148
|
})]
|
|
1157
1149
|
}),
|
|
1158
|
-
(
|
|
1150
|
+
(A.config?.httpMethod === "POST" || A.config?.httpMethod === "PUT") && /* @__PURE__ */ T("div", {
|
|
1159
1151
|
className: "space-y-2",
|
|
1160
|
-
children: [/* @__PURE__ */
|
|
1161
|
-
value:
|
|
1152
|
+
children: [/* @__PURE__ */ w(y, { children: D("bigconsole.widget.properties.rest.requestBodyLabel", "Request Body (JSON)") }), /* @__PURE__ */ w(C, {
|
|
1153
|
+
value: A.config?.requestBody || "",
|
|
1162
1154
|
onChange: (e) => $({
|
|
1163
|
-
...
|
|
1155
|
+
...A.config,
|
|
1164
1156
|
requestBody: e.target.value || void 0
|
|
1165
1157
|
}),
|
|
1166
1158
|
rows: 4,
|
|
@@ -1168,46 +1160,46 @@ var T = d(function({ isOpen: d, onClose: be }) {
|
|
|
1168
1160
|
className: "font-mono text-xs"
|
|
1169
1161
|
})]
|
|
1170
1162
|
}),
|
|
1171
|
-
/* @__PURE__ */
|
|
1163
|
+
/* @__PURE__ */ T("div", {
|
|
1172
1164
|
className: "space-y-2",
|
|
1173
1165
|
children: [
|
|
1174
|
-
/* @__PURE__ */
|
|
1175
|
-
/* @__PURE__ */
|
|
1176
|
-
value:
|
|
1166
|
+
/* @__PURE__ */ w(y, { children: D("bigconsole.widget.properties.dataPath.label", "Data Path (optional)") }),
|
|
1167
|
+
/* @__PURE__ */ w(v, {
|
|
1168
|
+
value: A.config?.dataPath || "",
|
|
1177
1169
|
onChange: (e) => $({
|
|
1178
|
-
...
|
|
1170
|
+
...A.config,
|
|
1179
1171
|
dataPath: e.target.value || void 0
|
|
1180
1172
|
}),
|
|
1181
1173
|
placeholder: "$.data.items or .data.items"
|
|
1182
1174
|
}),
|
|
1183
|
-
/* @__PURE__ */
|
|
1175
|
+
/* @__PURE__ */ w("p", {
|
|
1184
1176
|
className: "text-xs text-text-secondary",
|
|
1185
|
-
children:
|
|
1177
|
+
children: D("bigconsole.widget.properties.dataPath.restHelp", "JSONPath or dot notation to extract data from response")
|
|
1186
1178
|
})
|
|
1187
1179
|
]
|
|
1188
1180
|
})
|
|
1189
1181
|
]
|
|
1190
1182
|
}),
|
|
1191
|
-
|
|
1183
|
+
A.config?.dataSourceType === "GRAPHQL" && /* @__PURE__ */ T("div", {
|
|
1192
1184
|
className: "space-y-3",
|
|
1193
1185
|
children: [
|
|
1194
|
-
/* @__PURE__ */
|
|
1186
|
+
/* @__PURE__ */ T("div", {
|
|
1195
1187
|
className: "space-y-2",
|
|
1196
|
-
children: [/* @__PURE__ */
|
|
1197
|
-
value:
|
|
1188
|
+
children: [/* @__PURE__ */ w(y, { children: D("bigconsole.widget.properties.graphql.endpointLabel", "GraphQL Endpoint *") }), /* @__PURE__ */ w(v, {
|
|
1189
|
+
value: A.config?.graphqlEndpoint || "",
|
|
1198
1190
|
onChange: (e) => $({
|
|
1199
|
-
...
|
|
1191
|
+
...A.config,
|
|
1200
1192
|
graphqlEndpoint: e.target.value || void 0
|
|
1201
1193
|
}),
|
|
1202
1194
|
placeholder: "https://api.example.com/graphql"
|
|
1203
1195
|
})]
|
|
1204
1196
|
}),
|
|
1205
|
-
/* @__PURE__ */
|
|
1197
|
+
/* @__PURE__ */ T("div", {
|
|
1206
1198
|
className: "space-y-2",
|
|
1207
|
-
children: [/* @__PURE__ */
|
|
1208
|
-
value:
|
|
1199
|
+
children: [/* @__PURE__ */ w(y, { children: D("bigconsole.widget.properties.graphql.queryLabel", "Query *") }), /* @__PURE__ */ w(C, {
|
|
1200
|
+
value: A.config?.graphqlQuery || "",
|
|
1209
1201
|
onChange: (e) => $({
|
|
1210
|
-
...
|
|
1202
|
+
...A.config,
|
|
1211
1203
|
graphqlQuery: e.target.value || void 0
|
|
1212
1204
|
}),
|
|
1213
1205
|
rows: 6,
|
|
@@ -1215,12 +1207,12 @@ var T = d(function({ isOpen: d, onClose: be }) {
|
|
|
1215
1207
|
className: "font-mono text-xs"
|
|
1216
1208
|
})]
|
|
1217
1209
|
}),
|
|
1218
|
-
/* @__PURE__ */
|
|
1210
|
+
/* @__PURE__ */ T("div", {
|
|
1219
1211
|
className: "space-y-2",
|
|
1220
|
-
children: [/* @__PURE__ */
|
|
1221
|
-
value:
|
|
1212
|
+
children: [/* @__PURE__ */ w(y, { children: D("bigconsole.widget.properties.graphql.variablesLabel", "Variables (JSON, optional)") }), /* @__PURE__ */ w(C, {
|
|
1213
|
+
value: A.config?.graphqlVariables || "",
|
|
1222
1214
|
onChange: (e) => $({
|
|
1223
|
-
...
|
|
1215
|
+
...A.config,
|
|
1224
1216
|
graphqlVariables: e.target.value || void 0
|
|
1225
1217
|
}),
|
|
1226
1218
|
rows: 3,
|
|
@@ -1228,12 +1220,12 @@ var T = d(function({ isOpen: d, onClose: be }) {
|
|
|
1228
1220
|
className: "font-mono text-xs"
|
|
1229
1221
|
})]
|
|
1230
1222
|
}),
|
|
1231
|
-
/* @__PURE__ */
|
|
1223
|
+
/* @__PURE__ */ T("div", {
|
|
1232
1224
|
className: "space-y-2",
|
|
1233
|
-
children: [/* @__PURE__ */
|
|
1234
|
-
value:
|
|
1225
|
+
children: [/* @__PURE__ */ w(y, { children: D("bigconsole.widget.properties.graphql.headersLabel", "Headers (JSON, optional)") }), /* @__PURE__ */ w(C, {
|
|
1226
|
+
value: A.config?.headers || "",
|
|
1235
1227
|
onChange: (e) => $({
|
|
1236
|
-
...
|
|
1228
|
+
...A.config,
|
|
1237
1229
|
headers: e.target.value || void 0
|
|
1238
1230
|
}),
|
|
1239
1231
|
rows: 2,
|
|
@@ -1241,32 +1233,32 @@ var T = d(function({ isOpen: d, onClose: be }) {
|
|
|
1241
1233
|
className: "font-mono text-xs"
|
|
1242
1234
|
})]
|
|
1243
1235
|
}),
|
|
1244
|
-
/* @__PURE__ */
|
|
1236
|
+
/* @__PURE__ */ T("div", {
|
|
1245
1237
|
className: "space-y-2",
|
|
1246
1238
|
children: [
|
|
1247
|
-
/* @__PURE__ */
|
|
1248
|
-
/* @__PURE__ */
|
|
1249
|
-
value:
|
|
1239
|
+
/* @__PURE__ */ w(y, { children: D("bigconsole.widget.properties.dataPath.label", "Data Path (optional)") }),
|
|
1240
|
+
/* @__PURE__ */ w(v, {
|
|
1241
|
+
value: A.config?.dataPath || "",
|
|
1250
1242
|
onChange: (e) => $({
|
|
1251
|
-
...
|
|
1243
|
+
...A.config,
|
|
1252
1244
|
dataPath: e.target.value || void 0
|
|
1253
1245
|
}),
|
|
1254
1246
|
placeholder: ".data.items"
|
|
1255
1247
|
}),
|
|
1256
|
-
/* @__PURE__ */
|
|
1248
|
+
/* @__PURE__ */ w("p", {
|
|
1257
1249
|
className: "text-xs text-text-secondary",
|
|
1258
|
-
children:
|
|
1250
|
+
children: D("bigconsole.widget.properties.dataPath.graphqlHelp", "Path to extract data from GraphQL response")
|
|
1259
1251
|
})
|
|
1260
1252
|
]
|
|
1261
1253
|
})
|
|
1262
1254
|
]
|
|
1263
1255
|
}),
|
|
1264
|
-
|
|
1256
|
+
A.config?.dataSourceType === "MOCK" && /* @__PURE__ */ T("div", {
|
|
1265
1257
|
className: "space-y-2",
|
|
1266
|
-
children: [/* @__PURE__ */
|
|
1267
|
-
value:
|
|
1258
|
+
children: [/* @__PURE__ */ w(y, { children: D("bigconsole.widget.properties.mock.sampleDataLabel", "Sample Data (JSON)") }), /* @__PURE__ */ w(C, {
|
|
1259
|
+
value: A.config?.mockData || "",
|
|
1268
1260
|
onChange: (e) => $({
|
|
1269
|
-
...
|
|
1261
|
+
...A.config,
|
|
1270
1262
|
mockData: e.target.value || void 0
|
|
1271
1263
|
}),
|
|
1272
1264
|
rows: 5,
|
|
@@ -1278,86 +1270,86 @@ var T = d(function({ isOpen: d, onClose: be }) {
|
|
|
1278
1270
|
})
|
|
1279
1271
|
})] })
|
|
1280
1272
|
}),
|
|
1281
|
-
/* @__PURE__ */
|
|
1273
|
+
/* @__PURE__ */ w(x, {
|
|
1282
1274
|
value: "advanced",
|
|
1283
1275
|
className: "mt-0",
|
|
1284
|
-
children: /* @__PURE__ */
|
|
1285
|
-
|
|
1286
|
-
renderer:
|
|
1287
|
-
rendererOptions:
|
|
1276
|
+
children: /* @__PURE__ */ T(r, { children: [
|
|
1277
|
+
A && /* @__PURE__ */ w(ce, {
|
|
1278
|
+
renderer: A.renderer,
|
|
1279
|
+
rendererOptions: Qt,
|
|
1288
1280
|
onRendererChange: (e) => {
|
|
1289
1281
|
Q("renderer", e), e === "BIGCONSOLE" && Q("template", void 0);
|
|
1290
1282
|
},
|
|
1291
|
-
templateEditor:
|
|
1283
|
+
templateEditor: A.renderer === "BIGCONSOLE" ? void 0 : /* @__PURE__ */ w(Ge, {
|
|
1292
1284
|
widget: {
|
|
1293
|
-
...
|
|
1294
|
-
template:
|
|
1295
|
-
renderer:
|
|
1285
|
+
...I,
|
|
1286
|
+
template: A.template,
|
|
1287
|
+
renderer: A.renderer
|
|
1296
1288
|
},
|
|
1297
1289
|
onSave: (e) => Q("template", e)
|
|
1298
1290
|
})
|
|
1299
1291
|
}),
|
|
1300
|
-
/* @__PURE__ */
|
|
1301
|
-
title:
|
|
1292
|
+
/* @__PURE__ */ w(n, {
|
|
1293
|
+
title: D("bigconsole.widget.properties.section.drilldown", "Drilldown"),
|
|
1302
1294
|
description: "Where a click on this widget's data takes the viewer.",
|
|
1303
1295
|
headingLevel: 3,
|
|
1304
1296
|
"data-testid": "widget-inspector-drilldown",
|
|
1305
|
-
children: /* @__PURE__ */
|
|
1306
|
-
widget:
|
|
1307
|
-
onChange:
|
|
1297
|
+
children: /* @__PURE__ */ w(se, {
|
|
1298
|
+
widget: I,
|
|
1299
|
+
onChange: Xt
|
|
1308
1300
|
})
|
|
1309
1301
|
}),
|
|
1310
|
-
/* @__PURE__ */
|
|
1311
|
-
title:
|
|
1302
|
+
/* @__PURE__ */ w(n, {
|
|
1303
|
+
title: D("bigconsole.widget.properties.section.webhooks", "Webhooks"),
|
|
1312
1304
|
description: "HTTP endpoints called when this widget emits an event.",
|
|
1313
1305
|
headingLevel: 3,
|
|
1314
1306
|
"data-testid": "widget-inspector-webhooks",
|
|
1315
|
-
children: /* @__PURE__ */
|
|
1316
|
-
dashboardId:
|
|
1317
|
-
widgetId:
|
|
1307
|
+
children: /* @__PURE__ */ w(ae, {
|
|
1308
|
+
dashboardId: I.dashboardId,
|
|
1309
|
+
widgetId: I.id
|
|
1318
1310
|
})
|
|
1319
1311
|
}),
|
|
1320
|
-
/* @__PURE__ */
|
|
1312
|
+
/* @__PURE__ */ w(n, {
|
|
1321
1313
|
emphasis: "muted",
|
|
1322
|
-
title:
|
|
1314
|
+
title: D("bigconsole.widget.properties.section.events", "Events"),
|
|
1323
1315
|
description: "Recent deliveries for this widget, newest first. Supporting detail — nothing here changes the widget.",
|
|
1324
1316
|
headingLevel: 3,
|
|
1325
1317
|
"data-testid": "widget-inspector-events",
|
|
1326
|
-
children: /* @__PURE__ */
|
|
1327
|
-
dashboardId:
|
|
1328
|
-
widgetId:
|
|
1318
|
+
children: /* @__PURE__ */ w(oe, {
|
|
1319
|
+
dashboardId: I.dashboardId,
|
|
1320
|
+
widgetId: I.id,
|
|
1329
1321
|
maxHeight: "min(50vh, 360px)"
|
|
1330
1322
|
})
|
|
1331
1323
|
})
|
|
1332
1324
|
] })
|
|
1333
1325
|
}),
|
|
1334
|
-
/* @__PURE__ */
|
|
1326
|
+
/* @__PURE__ */ w(x, {
|
|
1335
1327
|
value: "appearance",
|
|
1336
1328
|
className: "mt-0",
|
|
1337
|
-
children:
|
|
1338
|
-
widgetType:
|
|
1339
|
-
config:
|
|
1340
|
-
onChange:
|
|
1329
|
+
children: A && /* @__PURE__ */ w(le, {
|
|
1330
|
+
widgetType: I.type,
|
|
1331
|
+
config: A.config || {},
|
|
1332
|
+
onChange: Yt
|
|
1341
1333
|
})
|
|
1342
1334
|
})
|
|
1343
1335
|
]
|
|
1344
1336
|
})]
|
|
1345
|
-
}) : /* @__PURE__ */
|
|
1337
|
+
}) : /* @__PURE__ */ w("div", {
|
|
1346
1338
|
className: "flex min-h-0 flex-1 items-center justify-center p-card-padding",
|
|
1347
|
-
children: /* @__PURE__ */
|
|
1339
|
+
children: /* @__PURE__ */ w(n, {
|
|
1348
1340
|
tone: "info",
|
|
1349
|
-
title:
|
|
1341
|
+
title: D("bigconsole.widget.properties.emptyState", "Select a widget to edit"),
|
|
1350
1342
|
headingLevel: 3,
|
|
1351
|
-
icon: /* @__PURE__ */
|
|
1343
|
+
icon: /* @__PURE__ */ w(ve, { className: "h-icon-md w-icon-md" }),
|
|
1352
1344
|
className: "w-full max-w-sm",
|
|
1353
1345
|
"data-testid": "widget-inspector-empty",
|
|
1354
|
-
children: /* @__PURE__ */
|
|
1346
|
+
children: /* @__PURE__ */ w("p", {
|
|
1355
1347
|
className: "text-sm text-text-secondary",
|
|
1356
1348
|
children: "Pick a widget on the canvas and its identity, data binding, actions and style options appear here."
|
|
1357
1349
|
})
|
|
1358
1350
|
})
|
|
1359
1351
|
}),
|
|
1360
|
-
|
|
1352
|
+
I && /* @__PURE__ */ T("div", {
|
|
1361
1353
|
style: {
|
|
1362
1354
|
padding: "var(--space-cardPadding)",
|
|
1363
1355
|
borderTop: "1px solid var(--color-border-subtle)",
|
|
@@ -1365,94 +1357,94 @@ var T = d(function({ isOpen: d, onClose: be }) {
|
|
|
1365
1357
|
flexShrink: 0
|
|
1366
1358
|
},
|
|
1367
1359
|
children: [
|
|
1368
|
-
|
|
1360
|
+
M && /* @__PURE__ */ w(n, {
|
|
1369
1361
|
tone: "warning",
|
|
1370
1362
|
padding: "compact",
|
|
1371
|
-
title:
|
|
1363
|
+
title: D("bigconsole.widget.properties.footer.unsavedChanges", "You have unsaved changes"),
|
|
1372
1364
|
headingLevel: 3,
|
|
1373
1365
|
className: "mb-control-gap",
|
|
1374
1366
|
"data-testid": "widget-inspector-save-unsaved"
|
|
1375
1367
|
}),
|
|
1376
|
-
|
|
1368
|
+
O === "saved" && !M && /* @__PURE__ */ w(n, {
|
|
1377
1369
|
tone: "success",
|
|
1378
1370
|
padding: "compact",
|
|
1379
|
-
title:
|
|
1371
|
+
title: D("bigconsole.widget.properties.footer.allSaved", "All changes saved"),
|
|
1380
1372
|
headingLevel: 3,
|
|
1381
|
-
icon: /* @__PURE__ */
|
|
1373
|
+
icon: /* @__PURE__ */ w(g, { className: "h-icon-sm w-icon-sm" }),
|
|
1382
1374
|
className: "mb-control-gap",
|
|
1383
1375
|
"data-testid": "widget-inspector-save-saved"
|
|
1384
1376
|
}),
|
|
1385
|
-
|
|
1377
|
+
O === "error" && /* @__PURE__ */ w(n, {
|
|
1386
1378
|
tone: "danger",
|
|
1387
1379
|
padding: "compact",
|
|
1388
|
-
title:
|
|
1380
|
+
title: D("bigconsole.widget.properties.footer.saveFailed", "Failed to save changes"),
|
|
1389
1381
|
headingLevel: 3,
|
|
1390
|
-
icon: /* @__PURE__ */
|
|
1382
|
+
icon: /* @__PURE__ */ w(Se, { className: "h-icon-sm w-icon-sm" }),
|
|
1391
1383
|
className: "mb-control-gap",
|
|
1392
1384
|
"data-testid": "widget-inspector-save-error"
|
|
1393
1385
|
}),
|
|
1394
|
-
/* @__PURE__ */
|
|
1386
|
+
/* @__PURE__ */ T("div", {
|
|
1395
1387
|
className: "flex flex-wrap gap-control-gap",
|
|
1396
|
-
children: [/* @__PURE__ */
|
|
1397
|
-
onClick:
|
|
1398
|
-
disabled:
|
|
1388
|
+
children: [/* @__PURE__ */ w(_, {
|
|
1389
|
+
onClick: qt,
|
|
1390
|
+
disabled: O === "saving" || !M,
|
|
1399
1391
|
style: {
|
|
1400
1392
|
flex: 1,
|
|
1401
1393
|
height: "var(--size-controlHeight-md)",
|
|
1402
|
-
backgroundColor:
|
|
1403
|
-
opacity:
|
|
1394
|
+
backgroundColor: M ? "var(--color-action-primary-bg)" : void 0,
|
|
1395
|
+
opacity: M ? 1 : .5
|
|
1404
1396
|
},
|
|
1405
|
-
children:
|
|
1397
|
+
children: O === "saving" ? /* @__PURE__ */ T("span", {
|
|
1406
1398
|
style: {
|
|
1407
1399
|
display: "flex",
|
|
1408
1400
|
alignItems: "center",
|
|
1409
1401
|
gap: "var(--space-iconGap)"
|
|
1410
1402
|
},
|
|
1411
|
-
children: [/* @__PURE__ */
|
|
1403
|
+
children: [/* @__PURE__ */ w(Pe, { style: {
|
|
1412
1404
|
width: "var(--size-icon-sm)",
|
|
1413
1405
|
height: "var(--size-icon-sm)"
|
|
1414
|
-
} }),
|
|
1415
|
-
}) : /* @__PURE__ */
|
|
1406
|
+
} }), D("bigconsole.widget.properties.footer.saving", "Saving...")]
|
|
1407
|
+
}) : /* @__PURE__ */ T("span", {
|
|
1416
1408
|
style: {
|
|
1417
1409
|
display: "flex",
|
|
1418
1410
|
alignItems: "center",
|
|
1419
1411
|
gap: "var(--space-iconGap)"
|
|
1420
1412
|
},
|
|
1421
|
-
children: [/* @__PURE__ */
|
|
1413
|
+
children: [/* @__PURE__ */ w(g, { style: {
|
|
1422
1414
|
width: "var(--size-icon-sm)",
|
|
1423
1415
|
height: "var(--size-icon-sm)"
|
|
1424
|
-
} }),
|
|
1416
|
+
} }), D("bigconsole.widget.properties.footer.saveChanges", "Save Changes")]
|
|
1425
1417
|
})
|
|
1426
|
-
}), /* @__PURE__ */
|
|
1418
|
+
}), /* @__PURE__ */ T(_, {
|
|
1427
1419
|
variant: "outline",
|
|
1428
|
-
onClick:
|
|
1429
|
-
disabled:
|
|
1420
|
+
onClick: Jt,
|
|
1421
|
+
disabled: O === "saving" || !M,
|
|
1430
1422
|
style: {
|
|
1431
1423
|
height: "var(--size-controlHeight-md)",
|
|
1432
|
-
opacity:
|
|
1424
|
+
opacity: M ? 1 : .5
|
|
1433
1425
|
},
|
|
1434
|
-
children: [/* @__PURE__ */
|
|
1426
|
+
children: [/* @__PURE__ */ w(Se, { style: {
|
|
1435
1427
|
width: "var(--size-icon-sm)",
|
|
1436
1428
|
height: "var(--size-icon-sm)"
|
|
1437
|
-
} }),
|
|
1429
|
+
} }), D("bigconsole.widget.properties.footer.discard", "Discard")]
|
|
1438
1430
|
})]
|
|
1439
1431
|
})
|
|
1440
1432
|
]
|
|
1441
1433
|
}),
|
|
1442
|
-
/* @__PURE__ */
|
|
1443
|
-
isOpen:
|
|
1444
|
-
action:
|
|
1445
|
-
initialWebhook:
|
|
1446
|
-
isLoading:
|
|
1447
|
-
saveError:
|
|
1434
|
+
/* @__PURE__ */ w(ie, {
|
|
1435
|
+
isOpen: kt,
|
|
1436
|
+
action: jt,
|
|
1437
|
+
initialWebhook: Lt,
|
|
1438
|
+
isLoading: Mt,
|
|
1439
|
+
saveError: Ft,
|
|
1448
1440
|
onClose: () => {
|
|
1449
|
-
|
|
1441
|
+
At(!1), Y(void 0), X(void 0), Z(null);
|
|
1450
1442
|
},
|
|
1451
|
-
onSave:
|
|
1443
|
+
onSave: Vt
|
|
1452
1444
|
})
|
|
1453
1445
|
]
|
|
1454
1446
|
})
|
|
1455
1447
|
});
|
|
1456
1448
|
});
|
|
1457
1449
|
//#endregion
|
|
1458
|
-
export {
|
|
1450
|
+
export { D as default };
|