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