@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,401 +1,406 @@
|
|
|
1
|
-
import e from "
|
|
2
|
-
import
|
|
1
|
+
import { Section as e, SectionStack as t } from "../common/Section.js";
|
|
2
|
+
import "../common/index.js";
|
|
3
|
+
import n from "../../hooks/useBigConsoleAnalytics.js";
|
|
4
|
+
import r from "../../hooks/useImportDataSink.js";
|
|
3
5
|
import "../../hooks/index.js";
|
|
4
|
-
import { memo as
|
|
5
|
-
import { ArrowLeft as
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
6
|
+
import { memo as i, useCallback as a, useEffect as o, useRef as s, useState as c } from "react";
|
|
7
|
+
import { ArrowLeft as l, Check as ee, FileJson as u, Info as d, RefreshCw as te, Upload as f, XCircle as p } from "lucide-react";
|
|
8
|
+
import { useI18n as m } from "@burdenoff/fe-libs/shared/providers/shell/I18nProvider";
|
|
9
|
+
import { Badge as h, Button as g, Dialog as _, DialogContent as v, DialogDescription as y, DialogFooter as b, DialogHeader as ne, DialogTitle as re, Input as x, Label as S, Spinner as C } from "@burdenoff/fe-libs/ui";
|
|
10
|
+
import { Fragment as w, jsx as T, jsxs as E } from "react/jsx-runtime";
|
|
8
11
|
//#region src/bigconsole/components/datasink/ImportDataSinkDialog.tsx
|
|
9
|
-
var
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
},
|
|
14
|
-
|
|
12
|
+
var D = [
|
|
13
|
+
{
|
|
14
|
+
id: "select",
|
|
15
|
+
label: "Choose file"
|
|
16
|
+
},
|
|
17
|
+
{
|
|
18
|
+
id: "preview",
|
|
19
|
+
label: "Review"
|
|
20
|
+
},
|
|
21
|
+
{
|
|
22
|
+
id: "complete",
|
|
23
|
+
label: "Done"
|
|
24
|
+
}
|
|
25
|
+
];
|
|
26
|
+
function O(e) {
|
|
27
|
+
return e === "select" ? 0 : e === "complete" ? 2 : 1;
|
|
28
|
+
}
|
|
29
|
+
var k = i(function({ isOpen: i, onClose: k, onSuccess: A }) {
|
|
30
|
+
let { t: j } = m(), [M, N] = c("select"), [, P] = c(null), [F, I] = c(null), [L, R] = c(""), [z, B] = c(""), V = s(null), { loading: H, error: U, validationResult: W, importResult: G, validateImport: K, importDataSink: q, extractDataSinkId: J, clearState: Y } = r(), X = n();
|
|
31
|
+
o(() => {
|
|
32
|
+
i && (N("select"), P(null), I(null), R(""), B(""), Y());
|
|
33
|
+
}, [i, Y]);
|
|
34
|
+
let ie = a(async (e) => {
|
|
15
35
|
let t = e.target.files?.[0];
|
|
16
36
|
if (!t) return;
|
|
17
37
|
if (!t.name.endsWith(".json")) {
|
|
18
|
-
alert("Please select a JSON file");
|
|
38
|
+
alert(j("bigconsole.dataSinks.import.selectJsonFile", "Please select a JSON file"));
|
|
19
39
|
return;
|
|
20
40
|
}
|
|
21
|
-
|
|
41
|
+
P(t);
|
|
22
42
|
let n = new FileReader();
|
|
23
43
|
n.onload = async (e) => {
|
|
24
44
|
let t = e.target?.result;
|
|
25
|
-
|
|
26
|
-
let n =
|
|
27
|
-
n.isValid && n.dataSinkInfo ? (
|
|
45
|
+
I(t);
|
|
46
|
+
let n = K(t);
|
|
47
|
+
n.isValid && n.dataSinkInfo ? (N("preview"), R(n.dataSinkInfo.name || ""), B(n.dataSinkInfo.key || "")) : N("preview");
|
|
28
48
|
}, n.onerror = () => {
|
|
29
|
-
alert("Failed to read file");
|
|
49
|
+
alert(j("bigconsole.dataSinks.import.readFileError", "Failed to read file"));
|
|
30
50
|
}, n.readAsText(t);
|
|
31
|
-
}, [
|
|
51
|
+
}, [K, j]), ae = a((e) => {
|
|
32
52
|
e.preventDefault();
|
|
33
53
|
let t = e.dataTransfer.files?.[0];
|
|
34
54
|
if (t) {
|
|
35
55
|
let e = new DataTransfer();
|
|
36
|
-
e.items.add(t),
|
|
56
|
+
e.items.add(t), V.current && (V.current.files = e.files, V.current.dispatchEvent(new Event("change", { bubbles: !0 })));
|
|
37
57
|
}
|
|
38
|
-
}, []),
|
|
39
|
-
if (!
|
|
40
|
-
|
|
58
|
+
}, []), oe = a(async () => {
|
|
59
|
+
if (!F) return;
|
|
60
|
+
N("importing");
|
|
41
61
|
let e = {
|
|
42
|
-
name:
|
|
43
|
-
key:
|
|
62
|
+
name: L.trim() || void 0,
|
|
63
|
+
key: z.trim() || void 0
|
|
44
64
|
};
|
|
45
|
-
|
|
46
|
-
let t = await
|
|
47
|
-
t?.success && t.dataSink ? (
|
|
65
|
+
X("bigconsole.data_sink.import_clicked", { source: "import" });
|
|
66
|
+
let t = await q(F, e);
|
|
67
|
+
t?.success && t.dataSink ? (N("complete"), X("bigconsole.data_sink.imported", {
|
|
48
68
|
dataSinkId: t.dataSink.id,
|
|
49
69
|
source: "import",
|
|
50
70
|
originalUpdated: t.originalUpdated ?? !1
|
|
51
|
-
}),
|
|
71
|
+
}), A?.(t.dataSink.id, t.dataSink.name, t.originalUpdated ?? !1)) : N("preview");
|
|
52
72
|
}, [
|
|
53
|
-
|
|
54
|
-
N,
|
|
55
|
-
G,
|
|
56
|
-
L,
|
|
73
|
+
X,
|
|
57
74
|
F,
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
75
|
+
q,
|
|
76
|
+
z,
|
|
77
|
+
L,
|
|
78
|
+
A
|
|
79
|
+
]), Z = !H && M !== "importing", Q = F ? J(F) : null, $ = O(M);
|
|
80
|
+
return /* @__PURE__ */ T(_, {
|
|
81
|
+
open: i,
|
|
82
|
+
onOpenChange: (e) => !e && Z && k(),
|
|
83
|
+
children: /* @__PURE__ */ E(v, {
|
|
84
|
+
className: "flex max-h-[85vh] flex-col sm:max-w-lg",
|
|
65
85
|
children: [
|
|
66
|
-
/* @__PURE__ */
|
|
86
|
+
/* @__PURE__ */ E(ne, { children: [/* @__PURE__ */ E("div", {
|
|
67
87
|
className: "flex items-center gap-3",
|
|
68
|
-
children: [/* @__PURE__ */
|
|
69
|
-
className: "flex size-10 items-center justify-center rounded-
|
|
70
|
-
children: /* @__PURE__ */
|
|
71
|
-
}), /* @__PURE__ */
|
|
72
|
-
}), /* @__PURE__ */
|
|
73
|
-
/* @__PURE__ */
|
|
74
|
-
className: "flex-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
88
|
+
children: [/* @__PURE__ */ T("div", {
|
|
89
|
+
className: "flex size-10 items-center justify-center rounded-card bg-bg-accentSubtle",
|
|
90
|
+
children: /* @__PURE__ */ T(f, { className: "size-5 text-text-link" })
|
|
91
|
+
}), /* @__PURE__ */ T(re, { children: j("bigconsole.dataSinks.import.title", "Import DataSink") })]
|
|
92
|
+
}), /* @__PURE__ */ T(y, { children: j("bigconsole.dataSinks.import.description", "Upload a DataSink export file to restore it into this workspace.") })] }),
|
|
93
|
+
/* @__PURE__ */ T("ol", {
|
|
94
|
+
className: "flex flex-wrap items-center gap-x-icon-gap gap-y-1 text-xs",
|
|
95
|
+
"aria-label": "Import progress",
|
|
96
|
+
children: D.map((e, t) => /* @__PURE__ */ E("li", {
|
|
97
|
+
"aria-current": t === $ ? "step" : void 0,
|
|
98
|
+
className: `flex items-center gap-icon-gap ${t === $ ? "font-semibold text-text-primary" : "text-text-muted"}`,
|
|
99
|
+
children: [
|
|
100
|
+
/* @__PURE__ */ T("span", {
|
|
101
|
+
className: `inline-flex size-5 items-center justify-center rounded-pill text-[10px] ${t <= $ ? "bg-action-primary-bg text-action-primary-text" : "bg-bg-sunken"}`,
|
|
102
|
+
children: t + 1
|
|
103
|
+
}),
|
|
104
|
+
e.label,
|
|
105
|
+
t < D.length - 1 && /* @__PURE__ */ T("span", {
|
|
106
|
+
"aria-hidden": "true",
|
|
107
|
+
className: "text-text-muted",
|
|
108
|
+
children: "›"
|
|
109
|
+
})
|
|
110
|
+
]
|
|
111
|
+
}, e.id))
|
|
112
|
+
}),
|
|
113
|
+
/* @__PURE__ */ T("div", {
|
|
114
|
+
className: "min-w-0 flex-1 overflow-y-auto py-4",
|
|
115
|
+
children: /* @__PURE__ */ E(t, { children: [
|
|
116
|
+
M === "select" && /* @__PURE__ */ T(e, {
|
|
117
|
+
title: "Choose an export file",
|
|
118
|
+
description: j("bigconsole.dataSinks.import.supportedFilesHint", "Only .json files exported from BigConsole are supported"),
|
|
119
|
+
headingLevel: 3,
|
|
120
|
+
bodyClassName: "mt-form-gap",
|
|
121
|
+
children: /* @__PURE__ */ E("div", {
|
|
122
|
+
onDragOver: (e) => e.preventDefault(),
|
|
123
|
+
onDrop: ae,
|
|
124
|
+
className: "rounded-card border-2 border-dashed border-[var(--color-border-default)] p-8 text-center hover:border-[var(--color-action-primary-bg)] motion-safe:transition-colors",
|
|
125
|
+
children: [
|
|
126
|
+
/* @__PURE__ */ T(u, { className: "mx-auto mb-4 size-12 text-text-secondary" }),
|
|
127
|
+
/* @__PURE__ */ T("p", {
|
|
128
|
+
className: "mb-2 text-sm",
|
|
129
|
+
children: j("bigconsole.dataSinks.import.dropzoneText", "Drag and drop a DataSink export file here")
|
|
130
|
+
}),
|
|
131
|
+
/* @__PURE__ */ T("p", {
|
|
132
|
+
className: "mb-4 text-xs text-text-secondary",
|
|
133
|
+
children: j("bigconsole.dataSinks.import.or", "or")
|
|
134
|
+
}),
|
|
135
|
+
/* @__PURE__ */ T("input", {
|
|
136
|
+
ref: V,
|
|
137
|
+
type: "file",
|
|
138
|
+
accept: ".json",
|
|
139
|
+
onChange: ie,
|
|
140
|
+
className: "hidden"
|
|
141
|
+
}),
|
|
142
|
+
/* @__PURE__ */ T(g, {
|
|
143
|
+
onClick: () => V.current?.click(),
|
|
144
|
+
disabled: H,
|
|
145
|
+
children: j("bigconsole.dataSinks.import.browseFiles", "Browse Files")
|
|
146
|
+
})
|
|
147
|
+
]
|
|
148
|
+
})
|
|
107
149
|
}),
|
|
108
|
-
(
|
|
109
|
-
|
|
110
|
-
|
|
150
|
+
(M === "preview" || M === "importing") && W && /* @__PURE__ */ E(w, { children: [
|
|
151
|
+
W.dataSinkInfo && /* @__PURE__ */ E(e, {
|
|
152
|
+
emphasis: "muted",
|
|
153
|
+
padding: "compact",
|
|
154
|
+
headingLevel: 3,
|
|
155
|
+
title: "File contents",
|
|
156
|
+
description: "What this export file describes.",
|
|
157
|
+
bodyClassName: "space-y-2",
|
|
111
158
|
children: [
|
|
112
|
-
/* @__PURE__ */
|
|
113
|
-
className: "flex items-center justify-between",
|
|
114
|
-
children: [/* @__PURE__ */
|
|
159
|
+
/* @__PURE__ */ E("div", {
|
|
160
|
+
className: "flex items-center justify-between gap-icon-gap",
|
|
161
|
+
children: [/* @__PURE__ */ T("span", {
|
|
115
162
|
className: "text-sm text-text-secondary",
|
|
116
|
-
children: "Name"
|
|
117
|
-
}), /* @__PURE__ */
|
|
118
|
-
className: "text-sm font-medium",
|
|
119
|
-
children:
|
|
163
|
+
children: j("bigconsole.dataSinks.import.nameLabel", "Name")
|
|
164
|
+
}), /* @__PURE__ */ T("span", {
|
|
165
|
+
className: "min-w-0 truncate text-sm font-medium",
|
|
166
|
+
children: W.dataSinkInfo.name || j("bigconsole.dataSinks.import.unnamed", "Unnamed")
|
|
120
167
|
})]
|
|
121
168
|
}),
|
|
122
|
-
/* @__PURE__ */
|
|
123
|
-
className: "flex items-center justify-between",
|
|
124
|
-
children: [/* @__PURE__ */
|
|
169
|
+
/* @__PURE__ */ E("div", {
|
|
170
|
+
className: "flex items-center justify-between gap-icon-gap",
|
|
171
|
+
children: [/* @__PURE__ */ T("span", {
|
|
125
172
|
className: "text-sm text-text-secondary",
|
|
126
|
-
children: "Key"
|
|
127
|
-
}), /* @__PURE__ */
|
|
128
|
-
className: "
|
|
129
|
-
children:
|
|
173
|
+
children: j("bigconsole.dataSinks.import.keyLabel", "Key")
|
|
174
|
+
}), /* @__PURE__ */ T("span", {
|
|
175
|
+
className: "min-w-0 truncate font-mono text-xs",
|
|
176
|
+
children: W.dataSinkInfo.key
|
|
130
177
|
})]
|
|
131
178
|
}),
|
|
132
|
-
/* @__PURE__ */
|
|
133
|
-
className: "flex items-center justify-between",
|
|
134
|
-
children: [/* @__PURE__ */
|
|
179
|
+
/* @__PURE__ */ E("div", {
|
|
180
|
+
className: "flex items-center justify-between gap-icon-gap",
|
|
181
|
+
children: [/* @__PURE__ */ T("span", {
|
|
135
182
|
className: "text-sm text-text-secondary",
|
|
136
|
-
children: "Status"
|
|
137
|
-
}), /* @__PURE__ */
|
|
183
|
+
children: j("bigconsole.dataSinks.import.statusLabel", "Status")
|
|
184
|
+
}), /* @__PURE__ */ T(h, {
|
|
138
185
|
variant: "secondary",
|
|
139
|
-
children:
|
|
186
|
+
children: W.dataSinkInfo.status
|
|
140
187
|
})]
|
|
141
188
|
}),
|
|
142
|
-
/* @__PURE__ */
|
|
143
|
-
className: "flex items-center justify-between",
|
|
144
|
-
children: [/* @__PURE__ */
|
|
189
|
+
/* @__PURE__ */ E("div", {
|
|
190
|
+
className: "flex items-center justify-between gap-icon-gap",
|
|
191
|
+
children: [/* @__PURE__ */ T("span", {
|
|
145
192
|
className: "text-sm text-text-secondary",
|
|
146
|
-
children: "Setup State"
|
|
147
|
-
}), /* @__PURE__ */
|
|
193
|
+
children: j("bigconsole.dataSinks.import.setupStateLabel", "Setup State")
|
|
194
|
+
}), /* @__PURE__ */ T(h, {
|
|
148
195
|
variant: "outline",
|
|
149
|
-
children:
|
|
196
|
+
children: W.dataSinkInfo.setupState
|
|
150
197
|
})]
|
|
151
198
|
}),
|
|
152
|
-
|
|
153
|
-
className: "flex items-center justify-between",
|
|
154
|
-
children: [/* @__PURE__ */
|
|
199
|
+
W.dataSinkInfo.exportedFrom && /* @__PURE__ */ E("div", {
|
|
200
|
+
className: "flex items-center justify-between gap-icon-gap",
|
|
201
|
+
children: [/* @__PURE__ */ T("span", {
|
|
155
202
|
className: "text-sm text-text-secondary",
|
|
156
|
-
children: "Source ID"
|
|
157
|
-
}), /* @__PURE__ */
|
|
158
|
-
className: "
|
|
159
|
-
children:
|
|
203
|
+
children: j("bigconsole.dataSinks.import.sourceIdLabel", "Source ID")
|
|
204
|
+
}), /* @__PURE__ */ T("span", {
|
|
205
|
+
className: "min-w-0 max-w-[180px] truncate font-mono text-xs text-text-secondary",
|
|
206
|
+
children: W.dataSinkInfo.exportedFrom
|
|
160
207
|
})]
|
|
161
208
|
}),
|
|
162
|
-
/* @__PURE__ */
|
|
163
|
-
className: "flex items-center justify-between",
|
|
164
|
-
children: [/* @__PURE__ */
|
|
209
|
+
/* @__PURE__ */ E("div", {
|
|
210
|
+
className: "flex items-center justify-between gap-icon-gap",
|
|
211
|
+
children: [/* @__PURE__ */ T("span", {
|
|
165
212
|
className: "text-sm text-text-secondary",
|
|
166
|
-
children: "Schema Version"
|
|
167
|
-
}), /* @__PURE__ */
|
|
213
|
+
children: j("bigconsole.dataSinks.import.schemaVersionLabel", "Schema Version")
|
|
214
|
+
}), /* @__PURE__ */ T("span", {
|
|
168
215
|
className: "text-xs text-text-secondary",
|
|
169
|
-
children:
|
|
216
|
+
children: W.dataSinkInfo.schemaVersion
|
|
170
217
|
})]
|
|
171
218
|
})
|
|
172
219
|
]
|
|
173
|
-
})
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
220
|
+
}),
|
|
221
|
+
W.errors.length > 0 && /* @__PURE__ */ T(e, {
|
|
222
|
+
tone: "danger",
|
|
223
|
+
padding: "compact",
|
|
224
|
+
headingLevel: 3,
|
|
225
|
+
title: j("bigconsole.dataSinks.import.errorsHeading", "Errors ({{count}})", { count: W.errors.length }),
|
|
226
|
+
icon: /* @__PURE__ */ T(p, { className: "size-4" }),
|
|
227
|
+
children: /* @__PURE__ */ T("ul", {
|
|
228
|
+
className: "space-y-1 text-xs text-status-error-text",
|
|
229
|
+
children: W.errors.map((e, t) => /* @__PURE__ */ E("li", { children: [
|
|
230
|
+
/* @__PURE__ */ E("span", {
|
|
231
|
+
className: "font-mono",
|
|
182
232
|
children: [
|
|
183
|
-
"
|
|
184
|
-
|
|
185
|
-
"
|
|
233
|
+
"[",
|
|
234
|
+
e.code,
|
|
235
|
+
"]"
|
|
186
236
|
]
|
|
187
|
-
})
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
/* @__PURE__ */ D("span", {
|
|
192
|
-
className: "font-mono",
|
|
193
|
-
children: [
|
|
194
|
-
"[",
|
|
195
|
-
e.code,
|
|
196
|
-
"]"
|
|
197
|
-
]
|
|
198
|
-
}),
|
|
199
|
-
" ",
|
|
200
|
-
e.message
|
|
201
|
-
] }, t))
|
|
202
|
-
})]
|
|
237
|
+
}),
|
|
238
|
+
" ",
|
|
239
|
+
e.message
|
|
240
|
+
] }, t))
|
|
203
241
|
})
|
|
204
242
|
}),
|
|
205
|
-
|
|
206
|
-
|
|
243
|
+
W.isValid && /* @__PURE__ */ E(e, {
|
|
244
|
+
title: j("bigconsole.dataSinks.import.optionsHeading", "Import Options"),
|
|
245
|
+
description: "Rename the sink or give it a different key before importing.",
|
|
246
|
+
headingLevel: 3,
|
|
247
|
+
bodyClassName: "space-y-form-gap",
|
|
207
248
|
children: [
|
|
208
|
-
/* @__PURE__ */
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
className: "
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
children: [/* @__PURE__ */ E("li", { children: "With changes → Update the existing DataSink" }), /* @__PURE__ */ E("li", { children: "No changes → Show \"already exists\" message" })]
|
|
237
|
-
}),
|
|
238
|
-
/* @__PURE__ */ E("p", {
|
|
239
|
-
className: "mt-1",
|
|
240
|
-
children: "If original doesn't exist → Create a new DataSink"
|
|
241
|
-
})
|
|
242
|
-
] }) : /* @__PURE__ */ D(T, { children: [/* @__PURE__ */ E("p", {
|
|
243
|
-
className: "font-medium mb-1",
|
|
244
|
-
children: "A new DataSink will be created"
|
|
245
|
-
}), /* @__PURE__ */ E("p", { children: "Import as a new DataSink with the specified configuration." })] })
|
|
246
|
-
})]
|
|
247
|
-
})
|
|
249
|
+
/* @__PURE__ */ T(e, {
|
|
250
|
+
tone: "info",
|
|
251
|
+
emphasis: "muted",
|
|
252
|
+
padding: "compact",
|
|
253
|
+
headingLevel: 4,
|
|
254
|
+
icon: /* @__PURE__ */ T(d, { className: "size-4" }),
|
|
255
|
+
title: Q ? j("bigconsole.dataSinks.import.checkExistingHeading", "Import will check for existing DataSink") : j("bigconsole.dataSinks.import.newWillBeCreatedHeading", "A new DataSink will be created"),
|
|
256
|
+
children: /* @__PURE__ */ T("div", {
|
|
257
|
+
className: "text-xs text-[var(--color-status-info-text)]",
|
|
258
|
+
children: Q ? /* @__PURE__ */ E(w, { children: [
|
|
259
|
+
/* @__PURE__ */ E("p", { children: [
|
|
260
|
+
j("bigconsole.dataSinks.import.ifOriginalExistsPrefix", "If the original DataSink (ID:"),
|
|
261
|
+
" ",
|
|
262
|
+
/* @__PURE__ */ E("code", {
|
|
263
|
+
className: "rounded-input bg-bg-surface px-1 font-mono",
|
|
264
|
+
children: [Q.slice(0, 8), "..."]
|
|
265
|
+
}),
|
|
266
|
+
j("bigconsole.dataSinks.import.ifOriginalExistsSuffix", ") exists:")
|
|
267
|
+
] }),
|
|
268
|
+
/* @__PURE__ */ E("ul", {
|
|
269
|
+
className: "mt-1 list-inside list-disc space-y-0.5",
|
|
270
|
+
children: [/* @__PURE__ */ T("li", { children: j("bigconsole.dataSinks.import.withChangesUpdate", "With changes → Update the existing DataSink") }), /* @__PURE__ */ T("li", { children: j("bigconsole.dataSinks.import.noChangesMessage", "No changes → Show \"already exists\" message") })]
|
|
271
|
+
}),
|
|
272
|
+
/* @__PURE__ */ T("p", {
|
|
273
|
+
className: "mt-1",
|
|
274
|
+
children: j("bigconsole.dataSinks.import.ifNotExistsCreate", "If original doesn't exist → Create a new DataSink")
|
|
275
|
+
})
|
|
276
|
+
] }) : /* @__PURE__ */ T("p", { children: j("bigconsole.dataSinks.import.newWillBeCreatedBody", "Import as a new DataSink with the specified configuration.") })
|
|
248
277
|
})
|
|
249
278
|
}),
|
|
250
|
-
/* @__PURE__ */
|
|
279
|
+
/* @__PURE__ */ E("div", {
|
|
251
280
|
className: "space-y-2",
|
|
252
|
-
children: [/* @__PURE__ */
|
|
281
|
+
children: [/* @__PURE__ */ T(S, {
|
|
253
282
|
htmlFor: "import-name",
|
|
254
|
-
children: "DataSink Name"
|
|
255
|
-
}), /* @__PURE__ */
|
|
283
|
+
children: j("bigconsole.dataSinks.import.nameFieldLabel", "DataSink Name")
|
|
284
|
+
}), /* @__PURE__ */ T(x, {
|
|
256
285
|
id: "import-name",
|
|
257
286
|
type: "text",
|
|
258
|
-
value:
|
|
259
|
-
onChange: (e) =>
|
|
260
|
-
placeholder:
|
|
261
|
-
disabled:
|
|
287
|
+
value: L,
|
|
288
|
+
onChange: (e) => R(e.target.value),
|
|
289
|
+
placeholder: W.dataSinkInfo?.name || j("bigconsole.dataSinks.import.namePlaceholder", "DataSink name"),
|
|
290
|
+
disabled: M === "importing"
|
|
262
291
|
})]
|
|
263
292
|
}),
|
|
264
|
-
/* @__PURE__ */
|
|
293
|
+
/* @__PURE__ */ E("div", {
|
|
265
294
|
className: "space-y-2",
|
|
266
295
|
children: [
|
|
267
|
-
/* @__PURE__ */
|
|
296
|
+
/* @__PURE__ */ T(S, {
|
|
268
297
|
htmlFor: "import-key",
|
|
269
|
-
children: "DataSink Key"
|
|
298
|
+
children: j("bigconsole.dataSinks.import.keyFieldLabel", "DataSink Key")
|
|
270
299
|
}),
|
|
271
|
-
/* @__PURE__ */
|
|
300
|
+
/* @__PURE__ */ T(x, {
|
|
272
301
|
id: "import-key",
|
|
273
302
|
type: "text",
|
|
274
|
-
value:
|
|
275
|
-
onChange: (e) =>
|
|
276
|
-
placeholder:
|
|
277
|
-
disabled:
|
|
303
|
+
value: z,
|
|
304
|
+
onChange: (e) => B(e.target.value),
|
|
305
|
+
placeholder: W.dataSinkInfo?.key || j("bigconsole.dataSinks.import.keyPlaceholder", "datasink-key"),
|
|
306
|
+
disabled: M === "importing"
|
|
278
307
|
}),
|
|
279
|
-
/* @__PURE__ */
|
|
308
|
+
/* @__PURE__ */ T("p", {
|
|
280
309
|
className: "text-xs text-text-secondary",
|
|
281
|
-
children: "Use a unique key to avoid conflicts with existing DataSinks."
|
|
310
|
+
children: j("bigconsole.dataSinks.import.keyHelp", "Use a unique key to avoid conflicts with existing DataSinks.")
|
|
282
311
|
})
|
|
283
312
|
]
|
|
284
313
|
})
|
|
285
314
|
]
|
|
286
315
|
})
|
|
287
316
|
] }),
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
}),
|
|
318
|
-
/* @__PURE__ */ D("p", {
|
|
319
|
-
className: "text-sm text-text-secondary mb-4",
|
|
320
|
-
children: [
|
|
321
|
-
"DataSink \"",
|
|
322
|
-
U.dataSink?.name || U.dataSink?.key,
|
|
323
|
-
"\" has been updated with the imported data."
|
|
324
|
-
]
|
|
325
|
-
})
|
|
326
|
-
] }),
|
|
327
|
-
!U.originalUpdated && !U.alreadyExists && /* @__PURE__ */ D(T, { children: [
|
|
328
|
-
/* @__PURE__ */ E("div", {
|
|
329
|
-
className: "size-16 mx-auto mb-4 rounded-full bg-green-100 dark:bg-green-900/30 flex items-center justify-center",
|
|
330
|
-
children: /* @__PURE__ */ E(c, { className: "size-8 text-green-600" })
|
|
331
|
-
}),
|
|
332
|
-
/* @__PURE__ */ E("h3", {
|
|
333
|
-
className: "text-lg font-medium mb-2",
|
|
334
|
-
children: "Import Successful!"
|
|
335
|
-
}),
|
|
336
|
-
/* @__PURE__ */ D("p", {
|
|
337
|
-
className: "text-sm text-text-secondary mb-4",
|
|
338
|
-
children: [
|
|
339
|
-
"DataSink \"",
|
|
340
|
-
U.dataSink?.name || U.dataSink?.key,
|
|
341
|
-
"\" has been created."
|
|
342
|
-
]
|
|
343
|
-
})
|
|
344
|
-
] })
|
|
345
|
-
]
|
|
346
|
-
}),
|
|
347
|
-
V && /* @__PURE__ */ E(g, {
|
|
348
|
-
className: "border-status-error-border/50 bg-status-error-bg/5",
|
|
349
|
-
children: /* @__PURE__ */ E(_, {
|
|
350
|
-
className: "p-3",
|
|
351
|
-
children: /* @__PURE__ */ E("p", {
|
|
352
|
-
className: "text-sm text-status-error-text",
|
|
353
|
-
children: V.message
|
|
317
|
+
M === "complete" && G?.success && /* @__PURE__ */ E(w, { children: [
|
|
318
|
+
G.alreadyExists && /* @__PURE__ */ T(e, {
|
|
319
|
+
tone: "info",
|
|
320
|
+
headingLevel: 3,
|
|
321
|
+
title: j("bigconsole.dataSinks.import.alreadyExistsTitle", "DataSink Already Exists"),
|
|
322
|
+
icon: /* @__PURE__ */ T(d, { className: "h-icon-sm w-icon-sm" }),
|
|
323
|
+
children: /* @__PURE__ */ T("p", {
|
|
324
|
+
className: "text-sm text-text-secondary",
|
|
325
|
+
children: j("bigconsole.dataSinks.import.alreadyExistsBody", "DataSink \"{{name}}\" already exists with the same data. No changes were made.", { name: G.dataSink?.name || G.dataSink?.key || "" })
|
|
326
|
+
})
|
|
327
|
+
}),
|
|
328
|
+
G.originalUpdated && !G.alreadyExists && /* @__PURE__ */ T(e, {
|
|
329
|
+
tone: "success",
|
|
330
|
+
headingLevel: 3,
|
|
331
|
+
title: j("bigconsole.dataSinks.import.updatedTitle", "DataSink Updated!"),
|
|
332
|
+
icon: /* @__PURE__ */ T(te, { className: "h-icon-sm w-icon-sm" }),
|
|
333
|
+
children: /* @__PURE__ */ T("p", {
|
|
334
|
+
className: "text-sm text-text-secondary",
|
|
335
|
+
children: j("bigconsole.dataSinks.import.updatedBody", "DataSink \"{{name}}\" has been updated with the imported data.", { name: G.dataSink?.name || G.dataSink?.key || "" })
|
|
336
|
+
})
|
|
337
|
+
}),
|
|
338
|
+
!G.originalUpdated && !G.alreadyExists && /* @__PURE__ */ T(e, {
|
|
339
|
+
tone: "success",
|
|
340
|
+
headingLevel: 3,
|
|
341
|
+
title: j("bigconsole.dataSinks.import.successTitle", "Import Successful!"),
|
|
342
|
+
icon: /* @__PURE__ */ T(ee, { className: "h-icon-sm w-icon-sm" }),
|
|
343
|
+
children: /* @__PURE__ */ T("p", {
|
|
344
|
+
className: "text-sm text-text-secondary",
|
|
345
|
+
children: j("bigconsole.dataSinks.import.successBody", "DataSink \"{{name}}\" has been created.", { name: G.dataSink?.name || G.dataSink?.key || "" })
|
|
354
346
|
})
|
|
355
347
|
})
|
|
348
|
+
] }),
|
|
349
|
+
U && /* @__PURE__ */ T(e, {
|
|
350
|
+
tone: "danger",
|
|
351
|
+
padding: "compact",
|
|
352
|
+
headingLevel: 3,
|
|
353
|
+
title: "Import failed",
|
|
354
|
+
children: /* @__PURE__ */ T("p", {
|
|
355
|
+
className: "text-sm text-status-error-text",
|
|
356
|
+
children: U.message
|
|
357
|
+
})
|
|
356
358
|
}),
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
359
|
+
G && !G.success && G.errorMessage && /* @__PURE__ */ T(e, {
|
|
360
|
+
tone: "danger",
|
|
361
|
+
padding: "compact",
|
|
362
|
+
headingLevel: 3,
|
|
363
|
+
title: "Import failed",
|
|
364
|
+
children: /* @__PURE__ */ T("p", {
|
|
365
|
+
className: "text-sm text-status-error-text",
|
|
366
|
+
children: G.errorMessage
|
|
365
367
|
})
|
|
366
368
|
})
|
|
367
|
-
]
|
|
369
|
+
] })
|
|
368
370
|
}),
|
|
369
|
-
/* @__PURE__ */
|
|
370
|
-
className: "flex-
|
|
371
|
-
children: [
|
|
371
|
+
/* @__PURE__ */ E(b, {
|
|
372
|
+
className: "flex flex-col-reverse gap-control-gap sm:flex-row sm:justify-between",
|
|
373
|
+
children: [M === "preview" ? /* @__PURE__ */ E(g, {
|
|
372
374
|
variant: "ghost",
|
|
373
375
|
onClick: () => {
|
|
374
|
-
|
|
376
|
+
N("select"), P(null), I(null), Y();
|
|
375
377
|
},
|
|
376
|
-
disabled:
|
|
377
|
-
children: [/* @__PURE__ */
|
|
378
|
-
})
|
|
379
|
-
|
|
378
|
+
disabled: H,
|
|
379
|
+
children: [/* @__PURE__ */ T(l, { className: "size-4" }), j("bigconsole.dataSinks.import.back", "Back")]
|
|
380
|
+
}) : /* @__PURE__ */ T("span", {
|
|
381
|
+
"aria-hidden": "true",
|
|
382
|
+
className: "hidden sm:block"
|
|
383
|
+
}), /* @__PURE__ */ E("div", {
|
|
384
|
+
className: "flex flex-wrap items-center gap-2",
|
|
380
385
|
children: [
|
|
381
|
-
|
|
386
|
+
M !== "complete" && /* @__PURE__ */ T(g, {
|
|
382
387
|
variant: "outline",
|
|
383
|
-
onClick:
|
|
384
|
-
disabled: !
|
|
385
|
-
children: "Cancel"
|
|
388
|
+
onClick: k,
|
|
389
|
+
disabled: !Z,
|
|
390
|
+
children: j("bigconsole.dataSinks.import.cancel", "Cancel")
|
|
386
391
|
}),
|
|
387
|
-
|
|
388
|
-
onClick:
|
|
389
|
-
disabled:
|
|
390
|
-
children: [/* @__PURE__ */
|
|
392
|
+
M === "preview" && W?.isValid && /* @__PURE__ */ E(g, {
|
|
393
|
+
onClick: oe,
|
|
394
|
+
disabled: H,
|
|
395
|
+
children: [/* @__PURE__ */ T(f, { className: "size-4" }), j("bigconsole.dataSinks.import.importButton", "Import DataSink")]
|
|
391
396
|
}),
|
|
392
|
-
|
|
397
|
+
M === "importing" && /* @__PURE__ */ E("div", {
|
|
393
398
|
className: "flex items-center gap-2 text-sm text-text-secondary",
|
|
394
|
-
children: [/* @__PURE__ */
|
|
399
|
+
children: [/* @__PURE__ */ T(C, { className: "size-4" }), j("bigconsole.dataSinks.import.importing", "Importing...")]
|
|
395
400
|
}),
|
|
396
|
-
|
|
397
|
-
onClick:
|
|
398
|
-
children: "Done"
|
|
401
|
+
M === "complete" && /* @__PURE__ */ T(g, {
|
|
402
|
+
onClick: k,
|
|
403
|
+
children: j("bigconsole.dataSinks.import.done", "Done")
|
|
399
404
|
})
|
|
400
405
|
]
|
|
401
406
|
})]
|
|
@@ -405,6 +410,6 @@ var O = n(function({ isOpen: n, onClose: O, onSuccess: k }) {
|
|
|
405
410
|
});
|
|
406
411
|
});
|
|
407
412
|
//#endregion
|
|
408
|
-
export {
|
|
413
|
+
export { k as default };
|
|
409
414
|
|
|
410
415
|
//# sourceMappingURL=ImportDataSinkDialog.js.map
|