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