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