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