@burdenoff/microfe-bigconsole 2026.1030.4 → 2026.1031.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +5 -0
- package/dist/bigconsole/BigConsoleRoot.js +6 -4
- package/dist/bigconsole/assistant/assistantApi.js +1 -1
- package/dist/bigconsole/assistant/assistantProduct.js +70 -70
- package/dist/bigconsole/assistant/assistantRunPersistence.js +1 -1
- package/dist/bigconsole/assistant/assistantRuntime.js +1 -1
- package/dist/bigconsole/assistant/attachmentExtract.js +1 -1
- package/dist/bigconsole/assistant/conversationHistoryApi.js +1 -1
- package/dist/bigconsole/assistant/createSandboxAssistantTransport.js +5 -4
- package/dist/bigconsole/assistant/pageContext.js +1 -1
- package/dist/bigconsole/assistant/pageControls.js +1 -1
- package/dist/bigconsole/assistant/previewController.js +1 -1
- package/dist/bigconsole/assistant/recordAdapters.js +1 -1
- package/dist/bigconsole/components/DrilldownDashboardRenderer.js +2 -2
- package/dist/bigconsole/components/DrilldownModal.js +1 -1
- package/dist/bigconsole/components/builder/WidgetInspector.js +1 -1
- package/dist/bigconsole/components/builder/index.js +5 -4
- package/dist/bigconsole/components/builder/inspector/AppearanceSection.js +7 -7
- package/dist/bigconsole/components/builder/inspector/DataBindingSection.js +2 -2
- package/dist/bigconsole/components/builder/inspector/LayoutSection.js +1 -1
- package/dist/bigconsole/components/builder/inspector/index.js +6 -5
- package/dist/bigconsole/components/common/index.js +4 -3
- package/dist/bigconsole/components/dashboard/CreateDashboardDialog.js +3 -3
- package/dist/bigconsole/components/dashboard/DashboardCanvas.js +9 -9
- package/dist/bigconsole/components/dashboard/DashboardGrid.js +2 -2
- package/dist/bigconsole/components/dashboard/DashboardStatusPill.js +1 -1
- package/dist/bigconsole/components/dashboard/DashboardToolbar.js +2 -2
- package/dist/bigconsole/components/dashboard/DrilldownBreadcrumb.js +4 -3
- package/dist/bigconsole/components/dashboard/ExportDashboardDialog.js +1 -1
- package/dist/bigconsole/components/dashboard/GlobalFiltersBar/FilterChip.js +1 -1
- package/dist/bigconsole/components/dashboard/GlobalFiltersBar/FilterEditor.js +1 -1
- package/dist/bigconsole/components/dashboard/GlobalFiltersBar/FilterPresetSelector.js +1 -1
- package/dist/bigconsole/components/dashboard/GlobalFiltersBar/GlobalFiltersBar.js +4 -4
- package/dist/bigconsole/components/dashboard/GlobalFiltersBar/index.js +2 -1
- package/dist/bigconsole/components/dashboard/ImportDashboardDialog.js +1 -1
- package/dist/bigconsole/components/dashboard/LiveBoardBanner.js +1 -1
- package/dist/bigconsole/components/dashboard/LiveCanvasToggle.js +1 -1
- package/dist/bigconsole/components/dashboard/PageTabsManager/PageTabsManager.js +1 -1
- package/dist/bigconsole/components/dashboard/PageTabsManager/index.js +2 -1
- package/dist/bigconsole/components/dashboard/PublishToStoreDialog.js +1 -1
- package/dist/bigconsole/components/dashboard/QuotaLimitNotice.js +1 -1
- package/dist/bigconsole/components/dashboard/SavedViewsDropdown/SavedViewsDropdown.js +1 -1
- package/dist/bigconsole/components/dashboard/SavedViewsDropdown/index.js +2 -1
- package/dist/bigconsole/components/dashboard/ShareDialog/EmbedTab.js +152 -152
- package/dist/bigconsole/components/dashboard/ShareDialog/ShareDialog.js +2 -2
- package/dist/bigconsole/components/dashboard/ShareDialog/index.js +2 -1
- package/dist/bigconsole/components/dashboard/StoreTemplatePicker.js +1 -1
- package/dist/bigconsole/components/dashboard/TemplateSetupBanner.js +1 -1
- package/dist/bigconsole/components/dashboard/WidgetPalette.js +2 -2
- package/dist/bigconsole/components/dashboard/index.js +6 -5
- package/dist/bigconsole/components/datasink/CacheTTLSelector.js +2 -2
- package/dist/bigconsole/components/datasink/DataSinkCard.js +2 -2
- package/dist/bigconsole/components/datasink/DataSinkDataViewer.js +1 -1
- package/dist/bigconsole/components/datasink/DataSinkDeleteDialog.js +1 -1
- package/dist/bigconsole/components/datasink/DataSinkRefreshDialog.js +1 -1
- package/dist/bigconsole/components/datasink/DataSinkStatusBadge.js +1 -1
- package/dist/bigconsole/components/datasink/DataSinkTableViewer.js +1 -1
- package/dist/bigconsole/components/datasink/ExportDataSinkDialog.js +1 -1
- package/dist/bigconsole/components/datasink/ImportDataGuideDialog.js +1 -1
- package/dist/bigconsole/components/datasink/ImportDataSinkDialog.js +1 -1
- package/dist/bigconsole/components/datasink/LinkedParsersPanel.js +1 -1
- package/dist/bigconsole/components/datasink/LinkedWorkflowsPanel.js +1 -1
- package/dist/bigconsole/components/datasink/RefreshTypeSelector.js +1 -1
- package/dist/bigconsole/components/datasink/SetupStateBadge.js +1 -1
- package/dist/bigconsole/components/datasink/WorkflowStatusPanel.js +1 -1
- package/dist/bigconsole/components/embed/widgets/CalendarEmbed.js +1 -1
- package/dist/bigconsole/components/embed/widgets/ChartEmbed.js +9 -9
- package/dist/bigconsole/components/embed/widgets/FormEmbed.js +2 -2
- package/dist/bigconsole/components/embed/widgets/GaugeEmbed.js +1 -1
- package/dist/bigconsole/components/embed/widgets/HeatmapEmbed.js +1 -1
- package/dist/bigconsole/components/embed/widgets/KanbanEmbed.js +2 -2
- package/dist/bigconsole/components/embed/widgets/ProgressEmbed.js +1 -1
- package/dist/bigconsole/components/embed/widgets/RetentionEmbed.js +1 -1
- package/dist/bigconsole/components/embed/widgets/TimelineEmbed.js +1 -1
- package/dist/bigconsole/components/overview/DashboardGuide.js +1 -1
- package/dist/bigconsole/components/overview/DataHealthCard.js +2 -2
- package/dist/bigconsole/components/overview/OverviewQuickActions.js +1 -1
- package/dist/bigconsole/components/overview/OverviewStatCard.js +1 -1
- package/dist/bigconsole/components/overview/RecentDashboardsPanel.js +2 -2
- package/dist/bigconsole/components/overview/index.js +9 -8
- package/dist/bigconsole/components/overview/overviewModel.js +1 -1
- package/dist/bigconsole/components/parser/DataSinkSelector.js +2 -2
- package/dist/bigconsole/components/parser/ExportParserDialog.js +1 -1
- package/dist/bigconsole/components/parser/ExpressionEditor.js +1 -1
- package/dist/bigconsole/components/parser/ImportParserDialog.js +10 -10
- package/dist/bigconsole/components/parser/ParserCard.js +3 -3
- package/dist/bigconsole/components/parser/ParserSelector.js +3 -3
- package/dist/bigconsole/components/parser/ParserStatusBadge.js +1 -1
- package/dist/bigconsole/components/parser/ParserTypeBadge.js +1 -1
- package/dist/bigconsole/components/pipeline/PipelineCard.js +2 -2
- package/dist/bigconsole/components/pipeline/PipelineDeleteDialog.js +1 -1
- package/dist/bigconsole/components/pipeline/PipelineStatusBadge.js +1 -1
- package/dist/bigconsole/components/preview/AiPreviewContent.js +3 -3
- package/dist/bigconsole/components/preview/confirmedPreviewWidgets.js +10 -12
- package/dist/bigconsole/components/widgets/ActionConfigDialog.js +314 -314
- package/dist/bigconsole/components/widgets/DrilldownConfigPanel.js +3 -2
- package/dist/bigconsole/components/widgets/PropertiesPanel.js +37 -22
- package/dist/bigconsole/components/widgets/WidgetErrorBoundary.js +1 -1
- package/dist/bigconsole/components/widgets/WidgetHeader.js +2 -2
- package/dist/bigconsole/components/widgets/WidgetMenu.js +1 -1
- package/dist/bigconsole/components/widgets/WidgetRegistry.js +1 -1
- package/dist/bigconsole/components/widgets/WidgetWrapper.js +16 -16
- package/dist/bigconsole/components/widgets/adaptive-card/AdaptiveCardWidget.js +1 -1
- package/dist/bigconsole/components/widgets/adaptive-card/index.js +1 -1
- package/dist/bigconsole/components/widgets/advanced/AdvancedWidgets.js +1 -1
- package/dist/bigconsole/components/widgets/calendar/CalendarView.js +1 -1
- package/dist/bigconsole/components/widgets/calendar/CalendarWidget.js +9 -9
- package/dist/bigconsole/components/widgets/calendar/index.js +1 -1
- package/dist/bigconsole/components/widgets/chart/ChartConfig.js +1 -1
- package/dist/bigconsole/components/widgets/chart/ChartLegend.js +1 -1
- package/dist/bigconsole/components/widgets/chart/ChartTooltip.js +1 -1
- package/dist/bigconsole/components/widgets/chart/ChartWidget.js +10 -10
- package/dist/bigconsole/components/widgets/chart/charts/AreaChart.js +2 -2
- package/dist/bigconsole/components/widgets/chart/charts/BarChart.js +2 -2
- package/dist/bigconsole/components/widgets/chart/charts/ComboChart.js +2 -2
- package/dist/bigconsole/components/widgets/chart/charts/FunnelChart.js +2 -2
- package/dist/bigconsole/components/widgets/chart/charts/LineChart.js +2 -2
- package/dist/bigconsole/components/widgets/chart/charts/PieChart.js +2 -2
- package/dist/bigconsole/components/widgets/chart/charts/ScatterChart.js +2 -2
- package/dist/bigconsole/components/widgets/chart/charts/WaterfallChart.js +1 -1
- package/dist/bigconsole/components/widgets/chart/charts/index.js +6 -5
- package/dist/bigconsole/components/widgets/chart/charts/numericSeries.js +4 -2
- package/dist/bigconsole/components/widgets/chart/index.js +9 -9
- package/dist/bigconsole/components/widgets/comments/WidgetComments.js +1 -1
- package/dist/bigconsole/components/widgets/custom/CustomWidget.js +1 -1
- package/dist/bigconsole/components/widgets/custom/index.js +1 -1
- package/dist/bigconsole/components/widgets/event-logs/EventLogViewer.js +1 -1
- package/dist/bigconsole/components/widgets/event-logs/index.js +2 -1
- package/dist/bigconsole/components/widgets/form/FormWidget.js +2 -2
- package/dist/bigconsole/components/widgets/form/index.js +1 -1
- package/dist/bigconsole/components/widgets/funnel/index.js +1 -1
- package/dist/bigconsole/components/widgets/gauge/CircularGauge.js +1 -1
- package/dist/bigconsole/components/widgets/gauge/GaugeConfig.js +1 -1
- package/dist/bigconsole/components/widgets/gauge/GaugeWidget.js +3 -3
- package/dist/bigconsole/components/widgets/gauge/LinearGauge.js +1 -1
- package/dist/bigconsole/components/widgets/gauge/index.js +4 -4
- package/dist/bigconsole/components/widgets/heatmap/HeatmapConfig.js +1 -1
- package/dist/bigconsole/components/widgets/heatmap/HeatmapWidget.js +1 -1
- package/dist/bigconsole/components/widgets/heatmap/index.js +2 -2
- package/dist/bigconsole/components/widgets/iframe-widget/IframeWidget.js +1 -1
- package/dist/bigconsole/components/widgets/iframe-widget/index.js +1 -1
- package/dist/bigconsole/components/widgets/index.js +2 -1
- package/dist/bigconsole/components/widgets/kanban/KanbanView.js +1 -1
- package/dist/bigconsole/components/widgets/kanban/KanbanWidget.js +2 -2
- package/dist/bigconsole/components/widgets/kanban/index.js +1 -1
- package/dist/bigconsole/components/widgets/kpi/KPIWidget.js +1 -1
- package/dist/bigconsole/components/widgets/kpi-comparison/KPIComparisonWidget.js +3 -3
- package/dist/bigconsole/components/widgets/kpi-comparison/index.js +1 -1
- package/dist/bigconsole/components/widgets/list/ListConfig.js +1 -1
- package/dist/bigconsole/components/widgets/list/ListItem.js +1 -1
- package/dist/bigconsole/components/widgets/list/ListWidget.js +2 -2
- package/dist/bigconsole/components/widgets/list/index.js +3 -3
- package/dist/bigconsole/components/widgets/map-widget/MapWidget.js +1 -1
- package/dist/bigconsole/components/widgets/map-widget/index.js +1 -1
- package/dist/bigconsole/components/widgets/metric-card/ComparisonBadge.js +2 -2
- package/dist/bigconsole/components/widgets/metric-card/MetricCardConfig.js +1 -1
- package/dist/bigconsole/components/widgets/metric-card/MetricCardWidget.js +4 -4
- package/dist/bigconsole/components/widgets/metric-card/SparklineChart.js +1 -1
- package/dist/bigconsole/components/widgets/metric-card/TrendIndicator.js +1 -1
- package/dist/bigconsole/components/widgets/metric-card/index.js +5 -5
- package/dist/bigconsole/components/widgets/pivot-table/PivotTableWidget.js +3 -3
- package/dist/bigconsole/components/widgets/pivot-table/index.js +1 -1
- package/dist/bigconsole/components/widgets/progress/ProgressBar.js +1 -1
- package/dist/bigconsole/components/widgets/progress/ProgressConfig.js +6 -4
- package/dist/bigconsole/components/widgets/progress/ProgressWidget.js +2 -2
- package/dist/bigconsole/components/widgets/progress/index.js +3 -3
- package/dist/bigconsole/components/widgets/retention/RetentionWidget.js +1 -1
- package/dist/bigconsole/components/widgets/retention/index.js +1 -1
- package/dist/bigconsole/components/widgets/states/EmptyState.js +1 -1
- package/dist/bigconsole/components/widgets/states/ErrorState.js +1 -1
- package/dist/bigconsole/components/widgets/states/LoadingState.js +1 -1
- package/dist/bigconsole/components/widgets/table/TableCell.js +2 -2
- package/dist/bigconsole/components/widgets/table/TableConfig.js +12 -8
- package/dist/bigconsole/components/widgets/table/TableHeader.js +1 -1
- package/dist/bigconsole/components/widgets/table/TablePagination.js +1 -1
- package/dist/bigconsole/components/widgets/table/TableWidget.js +12 -10
- package/dist/bigconsole/components/widgets/table/index.js +5 -5
- package/dist/bigconsole/components/widgets/text-widget/TextWidget.js +1 -1
- package/dist/bigconsole/components/widgets/text-widget/index.js +1 -1
- package/dist/bigconsole/components/widgets/text-widget/textData.js +2 -2
- package/dist/bigconsole/components/widgets/timeline/TimelineWidget.js +1 -1
- package/dist/bigconsole/components/widgets/timeline/index.js +1 -1
- package/dist/bigconsole/components/widgets/utils/conditionalFormat.js +1 -1
- package/dist/bigconsole/components/widgets/webhook-config/WebhookConfigPanel.js +1 -1
- package/dist/bigconsole/components/widgets/webhook-config/index.js +2 -1
- package/dist/bigconsole/components/widgets/widget-actions/WidgetActions.js +1 -1
- package/dist/bigconsole/components/widgets/widget-actions/index.js +2 -1
- package/dist/bigconsole/components/workflow/WorkflowCard.js +2 -2
- package/dist/bigconsole/components/workflow/WorkflowDeleteDialog.js +1 -1
- package/dist/bigconsole/components/workflow/WorkflowStatusBadge.js +1 -1
- package/dist/bigconsole/context/BigConsoleContext.js +2 -1
- package/dist/bigconsole/context/index.js +2 -1
- package/dist/bigconsole/contexts/CrossFilterContext.js +1 -1
- package/dist/bigconsole/contexts/NavigationContext.js +2 -1
- package/dist/bigconsole/contexts/index.js +3 -2
- package/dist/bigconsole/customWidget/CustomWidgetBuilderSheet.js +2 -2
- package/dist/bigconsole/customWidget/CustomWidgetProposalPanel.js +6 -5
- package/dist/bigconsole/customWidget/index.js +2 -1
- package/dist/bigconsole/customWidget/proposalContract.js +1 -1
- package/dist/bigconsole/graphql/storeTemplates.js +5 -5
- package/dist/bigconsole/graphql/widgetCapabilities.js +1 -1
- package/dist/bigconsole/hooks/index.js +24 -23
- package/dist/bigconsole/hooks/useActivePage.js +1 -1
- package/dist/bigconsole/hooks/useAutoRefresh.js +1 -1
- package/dist/bigconsole/hooks/useBigConsoleAnalytics.js +1 -1
- package/dist/bigconsole/hooks/useCrossFilter.js +1 -1
- package/dist/bigconsole/hooks/useDashboardEmbedPolicy.js +1 -1
- package/dist/bigconsole/hooks/useDashboardImageExport.js +1 -1
- package/dist/bigconsole/hooks/useDashboardOperations.js +14 -6
- package/dist/bigconsole/hooks/useDashboardSharing.js +15 -8
- package/dist/bigconsole/hooks/useDashboardViews.js +15 -8
- package/dist/bigconsole/hooks/useDataSinkAlerts.js +11 -8
- package/dist/bigconsole/hooks/useDataSinkOperations.js +19 -10
- package/dist/bigconsole/hooks/useDataSinkSubscription.js +1 -1
- package/dist/bigconsole/hooks/useDrilldown.js +2 -2
- package/dist/bigconsole/hooks/useDrilldownOperations.js +1 -1
- package/dist/bigconsole/hooks/useEventLogs.js +1 -1
- package/dist/bigconsole/hooks/useEventWebhooks.js +1 -1
- package/dist/bigconsole/hooks/useExportDashboard.js +7 -3
- package/dist/bigconsole/hooks/useExportDataSink.js +5 -3
- package/dist/bigconsole/hooks/useExportParser.js +5 -3
- package/dist/bigconsole/hooks/useFilterPresets.js +1 -1
- package/dist/bigconsole/hooks/useFilterUrlSync.js +1 -1
- package/dist/bigconsole/hooks/useGlobalFilters.js +11 -6
- package/dist/bigconsole/hooks/useImportDashboard.js +4 -2
- package/dist/bigconsole/hooks/useImportDataSink.js +3 -2
- package/dist/bigconsole/hooks/useImportParser.js +3 -2
- package/dist/bigconsole/hooks/useInstalledWidgets.js +1 -1
- package/dist/bigconsole/hooks/useModalFocusTrap.js +1 -1
- package/dist/bigconsole/hooks/usePageOperations.js +9 -5
- package/dist/bigconsole/hooks/useParserOperations.js +15 -8
- package/dist/bigconsole/hooks/usePipelineOperations.js +25 -13
- package/dist/bigconsole/hooks/useStoreDashboardTemplates.js +1 -1
- package/dist/bigconsole/hooks/useWidgetActions.js +1 -1
- package/dist/bigconsole/hooks/useWidgetCatalog.js +5 -5
- package/dist/bigconsole/hooks/useWidgetComments.js +1 -1
- package/dist/bigconsole/hooks/useWidgetConfigPersist.js +1 -1
- package/dist/bigconsole/hooks/useWidgetData.js +1 -1
- package/dist/bigconsole/hooks/useWidgetEvents.js +1 -1
- package/dist/bigconsole/hooks/useWidgetExport.js +1 -1
- package/dist/bigconsole/hooks/useWidgetOperations.js +28 -16
- package/dist/bigconsole/hooks/useWorkflowOperations.js +19 -10
- package/dist/bigconsole/index.js +9 -8
- package/dist/bigconsole/pages/DashboardBuilderPage.js +44 -35
- package/dist/bigconsole/pages/DashboardViewPage.js +23 -16
- package/dist/bigconsole/pages/DashboardsPage.js +4 -4
- package/dist/bigconsole/pages/DataParsersPage.js +2 -2
- package/dist/bigconsole/pages/DataSinkBuilderPage.js +12 -7
- package/dist/bigconsole/pages/DataSinkViewPage.js +8 -8
- package/dist/bigconsole/pages/DataSinksPage.js +6 -6
- package/dist/bigconsole/pages/OverviewPage.js +5 -5
- package/dist/bigconsole/pages/ParserBuilderPage.js +5 -5
- package/dist/bigconsole/pages/ParserViewPage.js +4 -4
- package/dist/bigconsole/pages/PipelineBuilderPage.js +1 -1
- package/dist/bigconsole/pages/PipelineViewPage.js +7 -3
- package/dist/bigconsole/pages/PipelinesPage.js +2 -2
- package/dist/bigconsole/pages/WidgetDemoPage.js +1 -1
- package/dist/bigconsole/pages/WorkflowViewPage.js +7 -14
- package/dist/bigconsole/pages/WorkflowsPage.js +3 -3
- package/dist/bigconsole/renderers/adapters/AdaptiveCardRenderer.js +4 -4
- package/dist/bigconsole/renderers/adapters/BigConsoleRenderer.js +1 -1
- package/dist/bigconsole/renderers/adapters/BlockKitRenderer.js +1 -1
- package/dist/bigconsole/renderers/adapters/CustomRenderer.js +13 -12
- package/dist/bigconsole/renderers/factory/WidgetRendererFactory.js +1 -1
- package/dist/bigconsole/renderers/registry/RendererRegistry.js +5 -5
- package/dist/bigconsole/store/drilldownStore.js +1 -1
- package/dist/bigconsole/store/index.js +4 -3
- package/dist/bigconsole/store/parserStore.js +1 -1
- package/dist/bigconsole/store/pipelineStore.js +1 -1
- package/dist/bigconsole/utils/advancedWidgetCapabilities.js +1 -1
- package/dist/bigconsole/utils/backendError.js +21 -22
- package/dist/bigconsole/utils/createDialogParam.js +2 -2
- package/dist/bigconsole/utils/csv.js +34 -36
- package/dist/bigconsole/utils/dataSinkPayload.js +12 -14
- package/dist/bigconsole/utils/drilldownParams.js +1 -1
- package/dist/bigconsole/utils/formDirty.js +3 -3
- package/dist/bigconsole/utils/layoutBaseline.js +1 -1
- package/dist/bigconsole/utils/quota.js +4 -4
- package/dist/bigconsole/utils/safeUrl.js +35 -33
- package/dist/bigconsole/utils/sanitizeHtml.js +2 -2
- package/dist/bigconsole/utils/templateGalleryFilter.js +2 -2
- package/dist/bigconsole/utils/widgetBinding.js +2 -2
- package/dist/bigconsole/utils/widgetDisplayData.js +1 -1
- package/dist/bigconsole/utils/widgetTypeMapping.js +3 -3
- package/dist/bigconsole/workflowOpen.js +2 -2
- package/dist/index.js +1 -1
- package/dist/node_modules/@e965/xlsx/xlsx.js +19 -19
- package/dist/node_modules/dompurify/dist/purify.es.js +454 -361
- package/dist/node_modules/pdfjs-dist/build/pdf.js +16 -16
- package/dist/shared/hooks/useTr.js +1 -1
- package/package.json +14 -12
|
@@ -2,20 +2,20 @@ import { Section as e } from "../common/Section.js";
|
|
|
2
2
|
import "../common/index.js";
|
|
3
3
|
import { BIGCONSOLE_PERMISSIONS as t } from "../../../constants/permissions.js";
|
|
4
4
|
import { serializeActionConfig as ee, slugifyActionName as n, validateActionConfig as te } from "./actionConfig.js";
|
|
5
|
-
import { memo as r, useCallback as i, useEffect as
|
|
6
|
-
import { PermissionButton as
|
|
7
|
-
import { ChevronDown as
|
|
8
|
-
import { Button as
|
|
9
|
-
import { useI18n as
|
|
10
|
-
import { Fragment as
|
|
5
|
+
import { memo as r, useCallback as i, useEffect as a, useId as o, useMemo as ne, useRef as s, useState as c } from "react";
|
|
6
|
+
import { PermissionButton as re } from "@burdenoff/fe-libs/shared/components";
|
|
7
|
+
import { ChevronDown as ie, ChevronRight as ae } from "lucide-react";
|
|
8
|
+
import { Button as oe, Checkbox as l, Input as u, ResponsiveDialog as se, ResponsiveDialogContent as ce, ResponsiveDialogDescription as le, ResponsiveDialogFooter as ue, ResponsiveDialogHeader as de, ResponsiveDialogTitle as fe, Select as d, SelectContent as f, SelectItem as p, SelectTrigger as m, SelectValue as h, Spinner as pe, Textarea as me } from "@burdenoff/fe-libs/ui";
|
|
9
|
+
import { useI18n as he } from "@burdenoff/fe-libs/shared/providers/shell/I18nProvider";
|
|
10
|
+
import { Fragment as ge, jsx as g, jsxs as _ } from "react/jsx-runtime";
|
|
11
11
|
//#region src/bigconsole/components/widgets/ActionConfigDialog.tsx
|
|
12
|
-
var
|
|
12
|
+
var _e = [
|
|
13
13
|
"POST",
|
|
14
14
|
"GET",
|
|
15
15
|
"PUT",
|
|
16
16
|
"PATCH",
|
|
17
17
|
"DELETE"
|
|
18
|
-
],
|
|
18
|
+
], ve = [
|
|
19
19
|
{
|
|
20
20
|
value: "PRIMARY",
|
|
21
21
|
color: "var(--color-action-primary-bg)"
|
|
@@ -44,7 +44,7 @@ var Se = [
|
|
|
44
44
|
value: "LINK",
|
|
45
45
|
color: "transparent"
|
|
46
46
|
}
|
|
47
|
-
],
|
|
47
|
+
], ye = [
|
|
48
48
|
"",
|
|
49
49
|
"refresh",
|
|
50
50
|
"download",
|
|
@@ -59,142 +59,142 @@ var Se = [
|
|
|
59
59
|
"settings",
|
|
60
60
|
"filter",
|
|
61
61
|
"search"
|
|
62
|
-
],
|
|
62
|
+
], v = {
|
|
63
63
|
display: "block",
|
|
64
64
|
fontSize: "var(--font-size-body-sm)",
|
|
65
65
|
fontWeight: "var(--font-weight-medium)",
|
|
66
66
|
color: "var(--color-text-primary)",
|
|
67
67
|
marginBottom: "var(--space-controlGap)"
|
|
68
|
-
},
|
|
68
|
+
}, be = {
|
|
69
69
|
margin: "0 0 var(--space-controlGap) 0",
|
|
70
70
|
fontSize: "var(--font-size-body-sm)",
|
|
71
71
|
fontWeight: "var(--font-weight-bold)",
|
|
72
72
|
letterSpacing: "0.06em",
|
|
73
73
|
textTransform: "uppercase",
|
|
74
74
|
color: "var(--color-text-secondary)"
|
|
75
|
-
},
|
|
75
|
+
}, y = {
|
|
76
76
|
fontSize: "var(--font-size-body-sm)",
|
|
77
77
|
color: "var(--color-text-muted)",
|
|
78
78
|
marginTop: "var(--space-controlGap)"
|
|
79
|
-
},
|
|
79
|
+
}, b = {
|
|
80
80
|
zIndex: 9999,
|
|
81
81
|
backgroundColor: "var(--color-overlay-popoverBg, var(--color-bg-surface))",
|
|
82
82
|
border: "1px solid var(--color-border-subtle)",
|
|
83
83
|
boxShadow: "var(--shadow-elevation-3)",
|
|
84
84
|
borderRadius: "var(--radius-button)"
|
|
85
|
-
},
|
|
86
|
-
let { t:
|
|
85
|
+
}, x = r(function({ isOpen: r, action: x, initialWebhook: S, isLoading: C = !1, saveError: xe, onClose: Se, onSave: Ce }) {
|
|
86
|
+
let { t: w } = he(), T = !!x, E = s(null), we = s(null), Te = s(null), D = o(), O = s(""), k = s(!1), [A, j] = c(""), [M, N] = c(""), [P, F] = c(!1), [I, Ee] = c("PRIMARY"), [L, R] = c(""), [z, B] = c("WEBHOOK"), [V, H] = c(""), [U, W] = c("POST"), [De, Oe] = c(!1), [ke, Ae] = c(!1), [je, Me] = c(!1), [G, Ne] = c(!1), [Pe, K] = c(() => w("bigconsole.widget.actions.confirm.defaultTitle", "Confirm Action")), [q, J] = c(() => w("bigconsole.widget.actions.confirm.defaultMessage", "Are you sure you want to proceed?")), [Fe, Y] = c(() => w("bigconsole.widget.actions.confirm.defaultConfirmLabel", "Confirm")), [Ie, X] = c(() => w("bigconsole.widget.actions.confirm.defaultCancelLabel", "Cancel")), [Z, Q] = c(null), Le = ne(() => {
|
|
87
87
|
let e = {
|
|
88
|
-
PRIMARY:
|
|
89
|
-
SECONDARY:
|
|
90
|
-
SUCCESS:
|
|
91
|
-
WARNING:
|
|
92
|
-
DANGER:
|
|
93
|
-
GHOST:
|
|
94
|
-
LINK:
|
|
88
|
+
PRIMARY: w("bigconsole.widget.actions.style.primary", "Primary"),
|
|
89
|
+
SECONDARY: w("bigconsole.widget.actions.style.secondary", "Secondary"),
|
|
90
|
+
SUCCESS: w("bigconsole.widget.actions.style.success", "Success"),
|
|
91
|
+
WARNING: w("bigconsole.widget.actions.style.warning", "Warning"),
|
|
92
|
+
DANGER: w("bigconsole.widget.actions.style.danger", "Danger"),
|
|
93
|
+
GHOST: w("bigconsole.widget.actions.style.ghost", "Ghost"),
|
|
94
|
+
LINK: w("bigconsole.widget.actions.style.link", "Link")
|
|
95
95
|
};
|
|
96
|
-
return
|
|
96
|
+
return ve.map((t) => ({
|
|
97
97
|
value: t.value,
|
|
98
98
|
label: e[t.value],
|
|
99
99
|
color: t.color
|
|
100
100
|
}));
|
|
101
|
-
}, [
|
|
101
|
+
}, [w]), Re = ne(() => {
|
|
102
102
|
let e = {
|
|
103
|
-
"":
|
|
104
|
-
refresh:
|
|
105
|
-
download:
|
|
106
|
-
upload:
|
|
107
|
-
trash:
|
|
108
|
-
edit:
|
|
109
|
-
plus:
|
|
110
|
-
check:
|
|
111
|
-
eye:
|
|
112
|
-
copy:
|
|
113
|
-
share:
|
|
114
|
-
settings:
|
|
115
|
-
filter:
|
|
116
|
-
search:
|
|
103
|
+
"": w("bigconsole.widget.actions.icon.none", "No icon"),
|
|
104
|
+
refresh: w("bigconsole.widget.actions.icon.refresh", "Refresh"),
|
|
105
|
+
download: w("bigconsole.widget.actions.icon.download", "Download"),
|
|
106
|
+
upload: w("bigconsole.widget.actions.icon.upload", "Upload"),
|
|
107
|
+
trash: w("bigconsole.widget.actions.icon.trash", "Trash"),
|
|
108
|
+
edit: w("bigconsole.widget.actions.icon.edit", "Edit"),
|
|
109
|
+
plus: w("bigconsole.widget.actions.icon.plus", "Plus"),
|
|
110
|
+
check: w("bigconsole.widget.actions.icon.check", "Check"),
|
|
111
|
+
eye: w("bigconsole.widget.actions.icon.eye", "View"),
|
|
112
|
+
copy: w("bigconsole.widget.actions.icon.copy", "Copy"),
|
|
113
|
+
share: w("bigconsole.widget.actions.icon.share", "Share"),
|
|
114
|
+
settings: w("bigconsole.widget.actions.icon.settings", "Settings"),
|
|
115
|
+
filter: w("bigconsole.widget.actions.icon.filter", "Filter"),
|
|
116
|
+
search: w("bigconsole.widget.actions.icon.search", "Search")
|
|
117
117
|
};
|
|
118
|
-
return
|
|
118
|
+
return ye.map((t) => ({
|
|
119
119
|
value: t,
|
|
120
120
|
label: e[t]
|
|
121
121
|
}));
|
|
122
|
-
}, [
|
|
123
|
-
|
|
122
|
+
}, [w]);
|
|
123
|
+
a(() => {
|
|
124
124
|
if (!r) return;
|
|
125
|
-
|
|
126
|
-
let e = requestAnimationFrame(() => requestAnimationFrame(() =>
|
|
125
|
+
k.current = !1, O.current = `button_${crypto.randomUUID().replace(/-/g, "").slice(0, 12)}`, H(""), W("POST"), x ? (j(x.label), N(x.name), F(!1), Ee(x.style), R(x.icon || ""), Oe(x.disabled), Ae(x.hidden), B("EMIT"), Ne(!!x.confirmation), x.confirmation ? (K(x.confirmation.title), J(x.confirmation.message), Y(x.confirmation.confirmLabel || w("bigconsole.widget.actions.confirm.defaultConfirmLabel", "Confirm")), X(x.confirmation.cancelLabel || w("bigconsole.widget.actions.confirm.defaultCancelLabel", "Cancel"))) : (K(w("bigconsole.widget.actions.confirm.defaultTitle", "Confirm Action")), J(w("bigconsole.widget.actions.confirm.defaultMessage", "Are you sure you want to proceed?")), Y(w("bigconsole.widget.actions.confirm.defaultConfirmLabel", "Confirm")), X(w("bigconsole.widget.actions.confirm.defaultCancelLabel", "Cancel")))) : (j(""), N(""), F(!1), Ee("PRIMARY"), R(""), B("WEBHOOK"), Oe(!1), Ae(!1), Ne(!1), K(w("bigconsole.widget.actions.confirm.defaultTitle", "Confirm Action")), J(w("bigconsole.widget.actions.confirm.defaultMessage", "Are you sure you want to proceed?")), Y(w("bigconsole.widget.actions.confirm.defaultConfirmLabel", "Confirm")), X(w("bigconsole.widget.actions.confirm.defaultCancelLabel", "Cancel"))), Me(!1), Q(null);
|
|
126
|
+
let e = requestAnimationFrame(() => requestAnimationFrame(() => E.current?.focus()));
|
|
127
127
|
return () => cancelAnimationFrame(e);
|
|
128
128
|
}, [
|
|
129
129
|
r,
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
]),
|
|
133
|
-
!r || !
|
|
134
|
-
}, [r,
|
|
135
|
-
let
|
|
136
|
-
|
|
130
|
+
x,
|
|
131
|
+
w
|
|
132
|
+
]), a(() => {
|
|
133
|
+
!r || !S || k.current || (B("WEBHOOK"), H(S.url), W(S.method));
|
|
134
|
+
}, [r, S]);
|
|
135
|
+
let ze = i((e) => {
|
|
136
|
+
j(e), !P && !T && N(n(e) || O.current), Z && Q(null);
|
|
137
137
|
}, [
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
]),
|
|
138
|
+
P,
|
|
139
|
+
Z,
|
|
140
|
+
T
|
|
141
|
+
]), Be = i((e) => {
|
|
142
142
|
e.preventDefault();
|
|
143
|
-
let t = {
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
disabled:
|
|
158
|
-
hidden:
|
|
159
|
-
},
|
|
160
|
-
if (
|
|
161
|
-
|
|
162
|
-
let e =
|
|
143
|
+
let t = T && x ? x.name : n(P ? M : A) || n(A) || O.current, r = G ? {
|
|
144
|
+
title: Pe.trim() || w("bigconsole.widget.actions.confirm.defaultTitle", "Confirm Action"),
|
|
145
|
+
message: q.trim() || w("bigconsole.widget.actions.confirm.fallbackMessage", "Are you sure?"),
|
|
146
|
+
confirmLabel: Fe.trim() || w("bigconsole.widget.actions.confirm.defaultConfirmLabel", "Confirm"),
|
|
147
|
+
cancelLabel: Ie.trim() || w("bigconsole.widget.actions.confirm.defaultCancelLabel", "Cancel")
|
|
148
|
+
} : void 0, i = {
|
|
149
|
+
label: A,
|
|
150
|
+
name: t,
|
|
151
|
+
outcome: z,
|
|
152
|
+
url: V,
|
|
153
|
+
method: U,
|
|
154
|
+
style: I,
|
|
155
|
+
icon: L,
|
|
156
|
+
confirmation: r ?? null,
|
|
157
|
+
disabled: De,
|
|
158
|
+
hidden: ke
|
|
159
|
+
}, a = te(i);
|
|
160
|
+
if (Q(a), a) {
|
|
161
|
+
a.field === "name" && Me(!0);
|
|
162
|
+
let e = a.field === "url" ? we : a.field === "label" ? E : Te;
|
|
163
163
|
requestAnimationFrame(() => e.current?.focus());
|
|
164
164
|
return;
|
|
165
165
|
}
|
|
166
|
-
let
|
|
167
|
-
|
|
166
|
+
let o = ee(i, x);
|
|
167
|
+
Ce(o.data, o.webhook);
|
|
168
168
|
}, [
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
k,
|
|
169
|
+
A,
|
|
170
|
+
M,
|
|
172
171
|
P,
|
|
172
|
+
z,
|
|
173
|
+
V,
|
|
174
|
+
U,
|
|
173
175
|
I,
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
H,
|
|
179
|
-
K,
|
|
180
|
-
Ne,
|
|
176
|
+
L,
|
|
177
|
+
De,
|
|
178
|
+
ke,
|
|
179
|
+
G,
|
|
181
180
|
Pe,
|
|
182
|
-
|
|
181
|
+
q,
|
|
183
182
|
Fe,
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
183
|
+
Ie,
|
|
184
|
+
T,
|
|
185
|
+
x,
|
|
186
|
+
Ce,
|
|
187
|
+
w
|
|
188
|
+
]), Ve = (e) => Le.find((t) => t.value === e)?.color || "var(--color-action-primary-bg)", He = Z?.field === "url" ? Z.reason === "required" ? w("bigconsole.widget.actions.validation.urlRequired", "Enter the URL to call when the button is clicked") : w("bigconsole.widget.actions.validation.urlScheme", "Enter a complete URL starting with http:// or https://") : Z?.field === "label" ? w("bigconsole.widget.actions.validation.labelRequired", "Button label is required") : Z ? w("bigconsole.widget.actions.validation.labelLettersOrNumbers", "Enter an event name using letters or numbers") : null, $ = (e) => Z?.field === e ? /* @__PURE__ */ g("p", {
|
|
189
|
+
id: `${D}-${e}-error`,
|
|
190
190
|
role: "alert",
|
|
191
191
|
className: "mt-1 text-sm text-[var(--color-status-error-text)]",
|
|
192
|
-
children:
|
|
192
|
+
children: He
|
|
193
193
|
}) : null;
|
|
194
|
-
return /* @__PURE__ */
|
|
194
|
+
return /* @__PURE__ */ g(se, {
|
|
195
195
|
open: r,
|
|
196
|
-
onOpenChange: (e) => !e && !
|
|
197
|
-
children: /* @__PURE__ */
|
|
196
|
+
onOpenChange: (e) => !e && !C && Se(),
|
|
197
|
+
children: /* @__PURE__ */ _(ce, {
|
|
198
198
|
"data-testid": "action-config-dialog",
|
|
199
199
|
showHandle: !1,
|
|
200
200
|
style: {
|
|
@@ -208,346 +208,346 @@ var Se = [
|
|
|
208
208
|
flexDirection: "column"
|
|
209
209
|
},
|
|
210
210
|
onEscapeKeyDown: (e) => {
|
|
211
|
-
|
|
211
|
+
C && e.preventDefault();
|
|
212
212
|
},
|
|
213
|
-
children: [/* @__PURE__ */
|
|
213
|
+
children: [/* @__PURE__ */ _(de, {
|
|
214
214
|
className: "p-4 pr-12 text-left",
|
|
215
|
-
children: [/* @__PURE__ */
|
|
216
|
-
}), /* @__PURE__ */
|
|
217
|
-
onSubmit:
|
|
215
|
+
children: [/* @__PURE__ */ g(fe, { children: T ? w("bigconsole.widget.actions.header.editTitle", "Edit Button") : w("bigconsole.widget.actions.header.addTitle", "Add Button") }), /* @__PURE__ */ g(le, { children: T ? w("bigconsole.widget.actions.header.editDescription", "Update the button and what it does") : w("bigconsole.widget.actions.header.addDescription", "Add a button that sends this widget’s data to an API.") })]
|
|
216
|
+
}), /* @__PURE__ */ _("form", {
|
|
217
|
+
onSubmit: Be,
|
|
218
218
|
noValidate: !0,
|
|
219
219
|
className: "flex min-h-0 flex-col",
|
|
220
220
|
style: { maxHeight: "calc(100dvh - 8rem)" },
|
|
221
|
-
children: [/* @__PURE__ */
|
|
221
|
+
children: [/* @__PURE__ */ _("div", {
|
|
222
222
|
className: "min-h-0 overflow-y-auto px-4 pb-4",
|
|
223
223
|
children: [
|
|
224
|
-
|
|
224
|
+
xe && /* @__PURE__ */ g(e, {
|
|
225
225
|
tone: "danger",
|
|
226
226
|
padding: "compact",
|
|
227
227
|
headingLevel: 3,
|
|
228
|
-
title:
|
|
228
|
+
title: w("bigconsole.widget.actions.validation.saveFailed", "This button could not be saved"),
|
|
229
229
|
className: "mb-4",
|
|
230
|
-
children: /* @__PURE__ */
|
|
230
|
+
children: /* @__PURE__ */ g("p", {
|
|
231
231
|
role: "alert",
|
|
232
232
|
className: "break-words text-sm",
|
|
233
|
-
children:
|
|
233
|
+
children: xe
|
|
234
234
|
})
|
|
235
235
|
}),
|
|
236
|
-
/* @__PURE__ */
|
|
236
|
+
/* @__PURE__ */ _("div", {
|
|
237
237
|
className: "mb-4",
|
|
238
238
|
children: [
|
|
239
|
-
/* @__PURE__ */
|
|
240
|
-
htmlFor: `${
|
|
241
|
-
style:
|
|
242
|
-
children: [
|
|
239
|
+
/* @__PURE__ */ _("label", {
|
|
240
|
+
htmlFor: `${D}-label`,
|
|
241
|
+
style: v,
|
|
242
|
+
children: [w("bigconsole.widget.actions.field.buttonLabel", "Button label"), " *"]
|
|
243
243
|
}),
|
|
244
|
-
/* @__PURE__ */
|
|
245
|
-
id: `${
|
|
246
|
-
ref:
|
|
247
|
-
value:
|
|
248
|
-
onChange: (e) =>
|
|
249
|
-
placeholder:
|
|
250
|
-
disabled:
|
|
244
|
+
/* @__PURE__ */ g(u, {
|
|
245
|
+
id: `${D}-label`,
|
|
246
|
+
ref: E,
|
|
247
|
+
value: A,
|
|
248
|
+
onChange: (e) => ze(e.target.value),
|
|
249
|
+
placeholder: w("bigconsole.widget.actions.field.buttonLabelPlaceholder", "e.g., Refresh Data, Export CSV"),
|
|
250
|
+
disabled: C,
|
|
251
251
|
"aria-required": !0,
|
|
252
|
-
"aria-invalid":
|
|
253
|
-
"aria-describedby":
|
|
252
|
+
"aria-invalid": Z?.field === "label",
|
|
253
|
+
"aria-describedby": Z?.field === "label" ? `${D}-label-error` : void 0
|
|
254
254
|
}),
|
|
255
|
-
|
|
255
|
+
$("label")
|
|
256
256
|
]
|
|
257
257
|
}),
|
|
258
|
-
/* @__PURE__ */
|
|
258
|
+
/* @__PURE__ */ _("div", {
|
|
259
259
|
className: "mb-4",
|
|
260
|
-
children: [/* @__PURE__ */
|
|
261
|
-
style:
|
|
262
|
-
children:
|
|
263
|
-
}), /* @__PURE__ */
|
|
260
|
+
children: [/* @__PURE__ */ g("p", {
|
|
261
|
+
style: v,
|
|
262
|
+
children: w("bigconsole.widget.actions.field.whenClicked", "When clicked")
|
|
263
|
+
}), /* @__PURE__ */ g("p", {
|
|
264
264
|
className: "text-sm text-text-secondary",
|
|
265
265
|
"data-testid": "action-outcome-summary",
|
|
266
|
-
children:
|
|
266
|
+
children: z === "WEBHOOK" ? w("bigconsole.widget.actions.outcome.webhook.label", "Send data to an API") : w("bigconsole.widget.actions.outcome.emit.label", "Emit a custom event")
|
|
267
267
|
})]
|
|
268
268
|
}),
|
|
269
|
-
|
|
269
|
+
z === "WEBHOOK" && /* @__PURE__ */ _("div", {
|
|
270
270
|
className: "mb-4",
|
|
271
271
|
children: [
|
|
272
|
-
/* @__PURE__ */
|
|
273
|
-
htmlFor: `${
|
|
274
|
-
style:
|
|
275
|
-
children: [
|
|
272
|
+
/* @__PURE__ */ _("label", {
|
|
273
|
+
htmlFor: `${D}-url`,
|
|
274
|
+
style: v,
|
|
275
|
+
children: [w("bigconsole.widget.actions.webhook.urlLabel", "Destination URL"), " *"]
|
|
276
276
|
}),
|
|
277
|
-
/* @__PURE__ */
|
|
278
|
-
id: `${
|
|
279
|
-
ref:
|
|
277
|
+
/* @__PURE__ */ g(u, {
|
|
278
|
+
id: `${D}-url`,
|
|
279
|
+
ref: we,
|
|
280
280
|
type: "url",
|
|
281
|
-
value:
|
|
281
|
+
value: V,
|
|
282
282
|
onChange: (e) => {
|
|
283
|
-
|
|
283
|
+
k.current = !0, H(e.target.value), Z?.field === "url" && Q(null);
|
|
284
284
|
},
|
|
285
|
-
placeholder:
|
|
286
|
-
disabled:
|
|
285
|
+
placeholder: w("bigconsole.widget.actions.webhook.urlPlaceholder", "https://your-service.com/hook"),
|
|
286
|
+
disabled: C,
|
|
287
287
|
"aria-required": !0,
|
|
288
|
-
"aria-invalid":
|
|
289
|
-
"aria-describedby":
|
|
288
|
+
"aria-invalid": Z?.field === "url",
|
|
289
|
+
"aria-describedby": Z?.field === "url" ? `${D}-url-error` : `${D}-url-hint`
|
|
290
290
|
}),
|
|
291
|
-
|
|
292
|
-
/* @__PURE__ */
|
|
293
|
-
id: `${
|
|
294
|
-
style:
|
|
295
|
-
children:
|
|
291
|
+
$("url"),
|
|
292
|
+
/* @__PURE__ */ g("p", {
|
|
293
|
+
id: `${D}-url-hint`,
|
|
294
|
+
style: y,
|
|
295
|
+
children: w("bigconsole.widget.actions.webhook.payloadHint", "The widget's current data is sent as the request payload.")
|
|
296
296
|
})
|
|
297
297
|
]
|
|
298
298
|
}),
|
|
299
|
-
/* @__PURE__ */
|
|
299
|
+
/* @__PURE__ */ _("button", {
|
|
300
300
|
type: "button",
|
|
301
|
-
onClick: () =>
|
|
302
|
-
"aria-expanded":
|
|
303
|
-
"aria-controls": `${
|
|
301
|
+
onClick: () => Me((e) => !e),
|
|
302
|
+
"aria-expanded": je,
|
|
303
|
+
"aria-controls": `${D}-options`,
|
|
304
304
|
className: "flex min-h-10 items-center gap-2 text-sm font-medium",
|
|
305
|
-
disabled:
|
|
306
|
-
children: [
|
|
305
|
+
disabled: C,
|
|
306
|
+
children: [g(je ? ie : ae, { className: "size-4" }), w("bigconsole.widget.actions.advanced.toggle", "More options")]
|
|
307
307
|
}),
|
|
308
|
-
/* @__PURE__ */
|
|
309
|
-
id: `${
|
|
310
|
-
hidden: !
|
|
308
|
+
/* @__PURE__ */ _("div", {
|
|
309
|
+
id: `${D}-options`,
|
|
310
|
+
hidden: !je,
|
|
311
311
|
className: "space-y-4 border-t border-border-subtle pt-4",
|
|
312
312
|
children: [
|
|
313
|
-
/* @__PURE__ */
|
|
314
|
-
/* @__PURE__ */
|
|
315
|
-
style:
|
|
316
|
-
children:
|
|
313
|
+
/* @__PURE__ */ _("div", { children: [
|
|
314
|
+
/* @__PURE__ */ g("h3", {
|
|
315
|
+
style: be,
|
|
316
|
+
children: w("bigconsole.widget.actions.options.appearance", "Appearance")
|
|
317
317
|
}),
|
|
318
|
-
/* @__PURE__ */
|
|
318
|
+
/* @__PURE__ */ _("div", {
|
|
319
319
|
className: "grid grid-cols-2 gap-3",
|
|
320
|
-
children: [/* @__PURE__ */
|
|
321
|
-
id: `${
|
|
322
|
-
htmlFor: `${
|
|
323
|
-
style:
|
|
324
|
-
children:
|
|
325
|
-
}), /* @__PURE__ */
|
|
326
|
-
value:
|
|
320
|
+
children: [/* @__PURE__ */ _("div", { children: [/* @__PURE__ */ g("label", {
|
|
321
|
+
id: `${D}-style-label`,
|
|
322
|
+
htmlFor: `${D}-style`,
|
|
323
|
+
style: v,
|
|
324
|
+
children: w("bigconsole.widget.actions.field.style", "Style")
|
|
325
|
+
}), /* @__PURE__ */ _(d, {
|
|
326
|
+
value: I,
|
|
327
327
|
onValueChange: (e) => {
|
|
328
|
-
let t =
|
|
329
|
-
t &&
|
|
328
|
+
let t = Le.find((t) => t.value === e);
|
|
329
|
+
t && Ee(t.value);
|
|
330
330
|
},
|
|
331
|
-
disabled:
|
|
332
|
-
children: [/* @__PURE__ */
|
|
333
|
-
id: `${
|
|
334
|
-
"aria-labelledby": `${
|
|
335
|
-
children: /* @__PURE__ */
|
|
336
|
-
}), /* @__PURE__ */
|
|
337
|
-
style:
|
|
338
|
-
children:
|
|
331
|
+
disabled: C,
|
|
332
|
+
children: [/* @__PURE__ */ g(m, {
|
|
333
|
+
id: `${D}-style`,
|
|
334
|
+
"aria-labelledby": `${D}-style-label`,
|
|
335
|
+
children: /* @__PURE__ */ g(h, {})
|
|
336
|
+
}), /* @__PURE__ */ g(f, {
|
|
337
|
+
style: b,
|
|
338
|
+
children: Le.map((e) => /* @__PURE__ */ g(p, {
|
|
339
339
|
value: e.value,
|
|
340
340
|
children: e.label
|
|
341
341
|
}, e.value))
|
|
342
342
|
})]
|
|
343
|
-
})] }), /* @__PURE__ */
|
|
344
|
-
id: `${
|
|
345
|
-
htmlFor: `${
|
|
346
|
-
style:
|
|
347
|
-
children:
|
|
348
|
-
}), /* @__PURE__ */
|
|
349
|
-
value:
|
|
350
|
-
onValueChange: (e) =>
|
|
351
|
-
disabled:
|
|
352
|
-
children: [/* @__PURE__ */
|
|
353
|
-
id: `${
|
|
354
|
-
"aria-labelledby": `${
|
|
355
|
-
children: /* @__PURE__ */
|
|
356
|
-
}), /* @__PURE__ */
|
|
343
|
+
})] }), /* @__PURE__ */ _("div", { children: [/* @__PURE__ */ g("label", {
|
|
344
|
+
id: `${D}-icon-label`,
|
|
345
|
+
htmlFor: `${D}-icon`,
|
|
346
|
+
style: v,
|
|
347
|
+
children: w("bigconsole.widget.actions.field.icon", "Icon")
|
|
348
|
+
}), /* @__PURE__ */ _(d, {
|
|
349
|
+
value: L || "none",
|
|
350
|
+
onValueChange: (e) => R(e === "none" ? "" : e),
|
|
351
|
+
disabled: C,
|
|
352
|
+
children: [/* @__PURE__ */ g(m, {
|
|
353
|
+
id: `${D}-icon`,
|
|
354
|
+
"aria-labelledby": `${D}-icon-label`,
|
|
355
|
+
children: /* @__PURE__ */ g(h, {})
|
|
356
|
+
}), /* @__PURE__ */ g(f, {
|
|
357
357
|
style: {
|
|
358
|
-
...
|
|
358
|
+
...b,
|
|
359
359
|
maxHeight: "200px"
|
|
360
360
|
},
|
|
361
|
-
children:
|
|
361
|
+
children: Re.map((e) => /* @__PURE__ */ g(p, {
|
|
362
362
|
value: e.value || "none",
|
|
363
363
|
children: e.label
|
|
364
364
|
}, e.value || "none"))
|
|
365
365
|
})]
|
|
366
366
|
})] })]
|
|
367
367
|
}),
|
|
368
|
-
/* @__PURE__ */
|
|
368
|
+
/* @__PURE__ */ _("div", {
|
|
369
369
|
className: "mt-3 flex items-center gap-2 rounded-button bg-bg-sunken p-2",
|
|
370
|
-
children: [/* @__PURE__ */
|
|
370
|
+
children: [/* @__PURE__ */ g("span", {
|
|
371
371
|
className: "text-sm text-text-muted",
|
|
372
|
-
children:
|
|
373
|
-
}), /* @__PURE__ */
|
|
372
|
+
children: w("bigconsole.widget.actions.preview.label", "Preview:")
|
|
373
|
+
}), /* @__PURE__ */ g("span", {
|
|
374
374
|
className: "rounded-button px-3 py-1 text-sm",
|
|
375
375
|
style: {
|
|
376
|
-
backgroundColor:
|
|
376
|
+
backgroundColor: Ve(I),
|
|
377
377
|
color: "var(--color-action-primary-text)"
|
|
378
378
|
},
|
|
379
|
-
children:
|
|
379
|
+
children: A || w("bigconsole.widget.actions.preview.buttonFallback", "Button")
|
|
380
380
|
})]
|
|
381
381
|
})
|
|
382
382
|
] }),
|
|
383
|
-
|
|
384
|
-
id: `${
|
|
385
|
-
htmlFor: `${
|
|
386
|
-
style:
|
|
387
|
-
children:
|
|
388
|
-
}), /* @__PURE__ */
|
|
389
|
-
value:
|
|
383
|
+
z === "WEBHOOK" && /* @__PURE__ */ _("div", { children: [/* @__PURE__ */ g("label", {
|
|
384
|
+
id: `${D}-method-label`,
|
|
385
|
+
htmlFor: `${D}-method`,
|
|
386
|
+
style: v,
|
|
387
|
+
children: w("bigconsole.widget.actions.webhook.methodLabel", "Request method")
|
|
388
|
+
}), /* @__PURE__ */ _(d, {
|
|
389
|
+
value: U,
|
|
390
390
|
onValueChange: (e) => {
|
|
391
|
-
let t =
|
|
392
|
-
t && (
|
|
391
|
+
let t = _e.find((t) => t === e);
|
|
392
|
+
t && (k.current = !0, W(t));
|
|
393
393
|
},
|
|
394
|
-
disabled:
|
|
395
|
-
children: [/* @__PURE__ */
|
|
396
|
-
id: `${
|
|
397
|
-
"aria-labelledby": `${
|
|
398
|
-
children: /* @__PURE__ */
|
|
399
|
-
}), /* @__PURE__ */
|
|
400
|
-
style:
|
|
401
|
-
children:
|
|
394
|
+
disabled: C,
|
|
395
|
+
children: [/* @__PURE__ */ g(m, {
|
|
396
|
+
id: `${D}-method`,
|
|
397
|
+
"aria-labelledby": `${D}-method-label`,
|
|
398
|
+
children: /* @__PURE__ */ g(h, {})
|
|
399
|
+
}), /* @__PURE__ */ g(f, {
|
|
400
|
+
style: b,
|
|
401
|
+
children: _e.map((e) => /* @__PURE__ */ g(p, {
|
|
402
402
|
value: e,
|
|
403
403
|
children: e
|
|
404
404
|
}, e))
|
|
405
405
|
})]
|
|
406
406
|
})] }),
|
|
407
|
-
/* @__PURE__ */
|
|
407
|
+
/* @__PURE__ */ _("div", { children: [/* @__PURE__ */ _("label", {
|
|
408
408
|
className: "flex items-center gap-2 text-sm",
|
|
409
|
-
children: [/* @__PURE__ */
|
|
410
|
-
checked:
|
|
411
|
-
onCheckedChange: (e) =>
|
|
412
|
-
disabled:
|
|
413
|
-
}),
|
|
414
|
-
}),
|
|
409
|
+
children: [/* @__PURE__ */ g(l, {
|
|
410
|
+
checked: G,
|
|
411
|
+
onCheckedChange: (e) => Ne(e === !0),
|
|
412
|
+
disabled: C
|
|
413
|
+
}), w("bigconsole.widget.actions.confirm.toggleLabel", "Ask for confirmation first")]
|
|
414
|
+
}), G && /* @__PURE__ */ _("div", {
|
|
415
415
|
className: "mt-3 space-y-3",
|
|
416
416
|
children: [
|
|
417
|
-
/* @__PURE__ */
|
|
418
|
-
htmlFor: `${
|
|
419
|
-
style:
|
|
420
|
-
children:
|
|
417
|
+
/* @__PURE__ */ g("label", {
|
|
418
|
+
htmlFor: `${D}-message`,
|
|
419
|
+
style: v,
|
|
420
|
+
children: w("bigconsole.widget.actions.confirm.messageLabel", "Message")
|
|
421
421
|
}),
|
|
422
|
-
/* @__PURE__ */
|
|
423
|
-
id: `${
|
|
424
|
-
value:
|
|
422
|
+
/* @__PURE__ */ g(me, {
|
|
423
|
+
id: `${D}-message`,
|
|
424
|
+
value: q,
|
|
425
425
|
onChange: (e) => J(e.target.value),
|
|
426
426
|
rows: 2,
|
|
427
|
-
disabled:
|
|
427
|
+
disabled: C
|
|
428
428
|
}),
|
|
429
|
-
/* @__PURE__ */
|
|
429
|
+
/* @__PURE__ */ _("details", { children: [/* @__PURE__ */ g("summary", {
|
|
430
430
|
className: "cursor-pointer text-sm text-text-secondary",
|
|
431
|
-
children:
|
|
432
|
-
}), /* @__PURE__ */
|
|
431
|
+
children: w("bigconsole.widget.actions.confirm.customize", "Customize confirmation labels")
|
|
432
|
+
}), /* @__PURE__ */ _("div", {
|
|
433
433
|
className: "mt-3 space-y-3",
|
|
434
434
|
children: [
|
|
435
|
-
/* @__PURE__ */
|
|
436
|
-
htmlFor: `${
|
|
437
|
-
style:
|
|
438
|
-
children:
|
|
439
|
-
}), /* @__PURE__ */
|
|
440
|
-
id: `${
|
|
441
|
-
value:
|
|
442
|
-
onChange: (e) =>
|
|
443
|
-
disabled:
|
|
435
|
+
/* @__PURE__ */ _("div", { children: [/* @__PURE__ */ g("label", {
|
|
436
|
+
htmlFor: `${D}-confirm-title`,
|
|
437
|
+
style: v,
|
|
438
|
+
children: w("bigconsole.widget.actions.confirm.dialogTitleLabel", "Dialog Title")
|
|
439
|
+
}), /* @__PURE__ */ g(u, {
|
|
440
|
+
id: `${D}-confirm-title`,
|
|
441
|
+
value: Pe,
|
|
442
|
+
onChange: (e) => K(e.target.value),
|
|
443
|
+
disabled: C
|
|
444
444
|
})] }),
|
|
445
|
-
/* @__PURE__ */
|
|
446
|
-
htmlFor: `${
|
|
447
|
-
style:
|
|
448
|
-
children:
|
|
449
|
-
}), /* @__PURE__ */
|
|
450
|
-
id: `${
|
|
451
|
-
value: Y,
|
|
452
|
-
onChange: (e) => X(e.target.value),
|
|
453
|
-
disabled: v
|
|
454
|
-
})] }),
|
|
455
|
-
/* @__PURE__ */ f("div", { children: [/* @__PURE__ */ d("label", {
|
|
456
|
-
htmlFor: `${S}-cancel-label`,
|
|
457
|
-
style: p,
|
|
458
|
-
children: y("bigconsole.widget.actions.confirm.cancelButtonLabel", "Cancel Button")
|
|
459
|
-
}), /* @__PURE__ */ d(c, {
|
|
460
|
-
id: `${S}-cancel-label`,
|
|
445
|
+
/* @__PURE__ */ _("div", { children: [/* @__PURE__ */ g("label", {
|
|
446
|
+
htmlFor: `${D}-confirm-label`,
|
|
447
|
+
style: v,
|
|
448
|
+
children: w("bigconsole.widget.actions.confirm.confirmButtonLabel", "Confirm Button")
|
|
449
|
+
}), /* @__PURE__ */ g(u, {
|
|
450
|
+
id: `${D}-confirm-label`,
|
|
461
451
|
value: Fe,
|
|
462
|
-
onChange: (e) =>
|
|
463
|
-
disabled:
|
|
452
|
+
onChange: (e) => Y(e.target.value),
|
|
453
|
+
disabled: C
|
|
454
|
+
})] }),
|
|
455
|
+
/* @__PURE__ */ _("div", { children: [/* @__PURE__ */ g("label", {
|
|
456
|
+
htmlFor: `${D}-cancel-label`,
|
|
457
|
+
style: v,
|
|
458
|
+
children: w("bigconsole.widget.actions.confirm.cancelButtonLabel", "Cancel Button")
|
|
459
|
+
}), /* @__PURE__ */ g(u, {
|
|
460
|
+
id: `${D}-cancel-label`,
|
|
461
|
+
value: Ie,
|
|
462
|
+
onChange: (e) => X(e.target.value),
|
|
463
|
+
disabled: C
|
|
464
464
|
})] })
|
|
465
465
|
]
|
|
466
466
|
})] })
|
|
467
467
|
]
|
|
468
468
|
})] }),
|
|
469
|
-
/* @__PURE__ */
|
|
470
|
-
/* @__PURE__ */
|
|
469
|
+
/* @__PURE__ */ _("div", { children: [
|
|
470
|
+
/* @__PURE__ */ _("label", {
|
|
471
471
|
className: "flex items-center gap-2 text-sm",
|
|
472
|
-
children: [/* @__PURE__ */
|
|
473
|
-
checked:
|
|
472
|
+
children: [/* @__PURE__ */ g(l, {
|
|
473
|
+
checked: z === "EMIT",
|
|
474
474
|
onCheckedChange: (e) => {
|
|
475
|
-
|
|
475
|
+
k.current = !0, B(e === !0 ? "EMIT" : "WEBHOOK"), Q(null);
|
|
476
476
|
},
|
|
477
|
-
disabled:
|
|
478
|
-
}),
|
|
477
|
+
disabled: C
|
|
478
|
+
}), w("bigconsole.widget.actions.options.customEvent", "Use a custom event instead of calling an API")]
|
|
479
479
|
}),
|
|
480
|
-
/* @__PURE__ */
|
|
481
|
-
style:
|
|
482
|
-
children:
|
|
480
|
+
/* @__PURE__ */ g("p", {
|
|
481
|
+
style: y,
|
|
482
|
+
children: w("bigconsole.widget.actions.outcome.emit.hint", "For integrations configured in Webhooks / Events.")
|
|
483
483
|
}),
|
|
484
|
-
/* @__PURE__ */
|
|
484
|
+
/* @__PURE__ */ _("div", {
|
|
485
485
|
className: "mt-3",
|
|
486
486
|
children: [
|
|
487
|
-
/* @__PURE__ */
|
|
488
|
-
htmlFor: `${
|
|
489
|
-
style:
|
|
490
|
-
children:
|
|
487
|
+
/* @__PURE__ */ g("label", {
|
|
488
|
+
htmlFor: `${D}-name`,
|
|
489
|
+
style: v,
|
|
490
|
+
children: w("bigconsole.widget.actions.advanced.eventNameLabel", "Event name (id)")
|
|
491
491
|
}),
|
|
492
|
-
/* @__PURE__ */
|
|
493
|
-
id: `${
|
|
494
|
-
ref:
|
|
495
|
-
value:
|
|
492
|
+
/* @__PURE__ */ g(u, {
|
|
493
|
+
id: `${D}-name`,
|
|
494
|
+
ref: Te,
|
|
495
|
+
value: T && x ? x.name : M,
|
|
496
496
|
onChange: (e) => {
|
|
497
|
-
|
|
497
|
+
N(e.target.value), F(!0), Z?.field === "name" && Q(null);
|
|
498
498
|
},
|
|
499
|
-
disabled:
|
|
500
|
-
"aria-invalid":
|
|
501
|
-
"aria-describedby":
|
|
499
|
+
disabled: C || T,
|
|
500
|
+
"aria-invalid": Z?.field === "name",
|
|
501
|
+
"aria-describedby": Z?.field === "name" ? `${D}-name-error` : void 0
|
|
502
502
|
}),
|
|
503
|
-
|
|
504
|
-
/* @__PURE__ */
|
|
505
|
-
style:
|
|
506
|
-
children: /* @__PURE__ */
|
|
503
|
+
$("name"),
|
|
504
|
+
/* @__PURE__ */ g("p", {
|
|
505
|
+
style: y,
|
|
506
|
+
children: /* @__PURE__ */ _("code", { children: [
|
|
507
507
|
"widget:",
|
|
508
|
-
|
|
508
|
+
T && x ? x.name : n(M || A) || "<name>",
|
|
509
509
|
":clicked"
|
|
510
510
|
] })
|
|
511
511
|
})
|
|
512
512
|
]
|
|
513
513
|
})
|
|
514
514
|
] }),
|
|
515
|
-
/* @__PURE__ */
|
|
515
|
+
/* @__PURE__ */ _("div", {
|
|
516
516
|
className: "flex flex-wrap gap-4 text-sm",
|
|
517
|
-
children: [/* @__PURE__ */
|
|
517
|
+
children: [/* @__PURE__ */ _("label", {
|
|
518
518
|
className: "flex items-center gap-2",
|
|
519
|
-
children: [/* @__PURE__ */
|
|
520
|
-
checked:
|
|
521
|
-
onCheckedChange: (e) =>
|
|
522
|
-
disabled:
|
|
523
|
-
}),
|
|
524
|
-
}), /* @__PURE__ */
|
|
519
|
+
children: [/* @__PURE__ */ g(l, {
|
|
520
|
+
checked: De,
|
|
521
|
+
onCheckedChange: (e) => Oe(e === !0),
|
|
522
|
+
disabled: C
|
|
523
|
+
}), w("bigconsole.widget.actions.advanced.disabled", "Disabled")]
|
|
524
|
+
}), /* @__PURE__ */ _("label", {
|
|
525
525
|
className: "flex items-center gap-2",
|
|
526
|
-
children: [/* @__PURE__ */
|
|
527
|
-
checked:
|
|
528
|
-
onCheckedChange: (e) =>
|
|
529
|
-
disabled:
|
|
530
|
-
}),
|
|
526
|
+
children: [/* @__PURE__ */ g(l, {
|
|
527
|
+
checked: ke,
|
|
528
|
+
onCheckedChange: (e) => Ae(e === !0),
|
|
529
|
+
disabled: C
|
|
530
|
+
}), w("bigconsole.widget.actions.advanced.hidden", "Hidden")]
|
|
531
531
|
})]
|
|
532
532
|
})
|
|
533
533
|
]
|
|
534
534
|
})
|
|
535
535
|
]
|
|
536
|
-
}), /* @__PURE__ */
|
|
536
|
+
}), /* @__PURE__ */ _(ue, {
|
|
537
537
|
className: "shrink-0 border-t border-border-subtle bg-bg-sunken p-4",
|
|
538
|
-
children: [/* @__PURE__ */
|
|
538
|
+
children: [/* @__PURE__ */ g(oe, {
|
|
539
539
|
type: "button",
|
|
540
540
|
variant: "outline",
|
|
541
|
-
onClick:
|
|
542
|
-
disabled:
|
|
543
|
-
children:
|
|
544
|
-
}), /* @__PURE__ */
|
|
545
|
-
permission:
|
|
541
|
+
onClick: Se,
|
|
542
|
+
disabled: C,
|
|
543
|
+
children: w("bigconsole.widget.actions.footer.cancel", "Cancel")
|
|
544
|
+
}), /* @__PURE__ */ g(re, {
|
|
545
|
+
permission: T ? t.WIDGET_ACTION_UPDATE : t.WIDGET_ACTION_CREATE,
|
|
546
546
|
deniedBehavior: "disable",
|
|
547
|
-
children: /* @__PURE__ */
|
|
547
|
+
children: /* @__PURE__ */ g(oe, {
|
|
548
548
|
type: "submit",
|
|
549
|
-
disabled:
|
|
550
|
-
children:
|
|
549
|
+
disabled: C,
|
|
550
|
+
children: C ? /* @__PURE__ */ _(ge, { children: [/* @__PURE__ */ g(pe, { className: "size-4" }), w("bigconsole.widget.actions.footer.saving", "Saving...")] }) : T ? w("bigconsole.widget.actions.footer.updateButton", "Update Button") : w("bigconsole.widget.actions.footer.addButton", "Add Button")
|
|
551
551
|
})
|
|
552
552
|
})]
|
|
553
553
|
})]
|
|
@@ -556,4 +556,4 @@ var Se = [
|
|
|
556
556
|
});
|
|
557
557
|
});
|
|
558
558
|
//#endregion
|
|
559
|
-
export {
|
|
559
|
+
export { x as ActionConfigDialog, x as default };
|