drizzle-cube 0.6.1 → 0.6.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/adapters/express/index.cjs +1 -1
- package/dist/adapters/express/index.js +1 -1
- package/dist/adapters/fastify/index.cjs +1 -1
- package/dist/adapters/fastify/index.js +1 -1
- package/dist/adapters/{handler-CfgE0JSL.js → handler-CtaSua-i.js} +1 -1
- package/dist/adapters/{handler-Cn0dOctE.cjs → handler-OwxSBJH8.cjs} +1 -1
- package/dist/adapters/hono/index.cjs +1 -1
- package/dist/adapters/hono/index.js +1 -1
- package/dist/adapters/nextjs/index.cjs +1 -1
- package/dist/adapters/nextjs/index.js +1 -1
- package/dist/{server/openai-B5jEiqiB.js → adapters/openai-CmVRIbUg.js} +18 -2
- package/dist/adapters/{openai-cDlFSTk6.js → openai-CtXqeznO.js} +1 -1
- package/dist/{server/openai-D0musiYP.cjs → adapters/openai-D-6l1Y8h.cjs} +3 -3
- package/dist/adapters/{openai-vXvLni8v.cjs → openai-DTSTMiXL.cjs} +1 -1
- package/dist/cjs/adapters/express/index.d.ts +114 -0
- package/dist/cjs/adapters/fastify/index.d.ts +113 -0
- package/dist/cjs/adapters/hono/agent-handler.d.ts +9 -0
- package/dist/cjs/adapters/hono/index.d.ts +120 -0
- package/dist/cjs/adapters/hono/mcp-handler.d.ts +37 -0
- package/dist/cjs/adapters/locale.d.ts +8 -0
- package/dist/cjs/adapters/mcp-tools-handlers.d.ts +18 -0
- package/dist/cjs/adapters/mcp-tools.d.ts +134 -0
- package/dist/cjs/adapters/mcp-transport.d.ts +158 -0
- package/dist/cjs/adapters/nextjs/index.d.ts +196 -0
- package/dist/cjs/adapters/nextjs/mcp-handler.d.ts +36 -0
- package/dist/cjs/adapters/types.d.ts +41 -0
- package/dist/cjs/adapters/utils.d.ts +354 -0
- package/dist/cjs/client/adapters/adapterRegistry.d.ts +44 -0
- package/dist/cjs/client/adapters/flowModeAdapter.d.ts +3 -0
- package/dist/cjs/client/adapters/funnelModeAdapter.d.ts +19 -0
- package/dist/cjs/client/adapters/index.d.ts +29 -0
- package/dist/cjs/client/adapters/modeAdapter.d.ts +117 -0
- package/dist/cjs/client/adapters/queryModeAdapter.d.ts +16 -0
- package/dist/cjs/client/adapters/retentionModeAdapter.d.ts +3 -0
- package/dist/cjs/client/charts/ChartLoader.d.ts +69 -0
- package/dist/cjs/client/charts/chartComponentRegistry.d.ts +46 -0
- package/dist/cjs/client/charts/chartConfigHelpers.d.ts +38 -0
- package/dist/cjs/client/charts/chartConfigRegistry.d.ts +15 -0
- package/dist/cjs/client/charts/chartConfigs.d.ts +142 -0
- package/dist/cjs/client/charts/chartPlugin.d.ts +74 -0
- package/dist/cjs/client/charts/lazyChartConfigRegistry.d.ts +100 -0
- package/dist/cjs/client/charts.d.ts +17 -0
- package/dist/cjs/client/client/BatchCoordinator.d.ts +38 -0
- package/dist/cjs/client/client/CubeClient.d.ts +32 -0
- package/dist/cjs/client/components/AIAssistant/constants.d.ts +11 -0
- package/dist/cjs/client/components/AIAssistant/index.d.ts +10 -0
- package/dist/cjs/client/components/AIAssistant/types.d.ts +49 -0
- package/dist/cjs/client/components/AIAssistant/utils.d.ts +17 -0
- package/dist/cjs/client/components/AgenticNotebook/AgentChatPanel.d.ts +27 -0
- package/dist/cjs/client/components/AgenticNotebook/ChatInput.d.ts +14 -0
- package/dist/cjs/client/components/AgenticNotebook/ChatMessage.d.ts +9 -0
- package/dist/cjs/client/components/AgenticNotebook/NotebookCanvas.d.ts +6 -0
- package/dist/cjs/client/components/AgenticNotebook/NotebookMarkdownBlock.d.ts +12 -0
- package/dist/cjs/client/components/AgenticNotebook/NotebookPortletBlock.d.ts +15 -0
- package/dist/cjs/client/components/AgenticNotebook/agentChatParts.d.ts +34 -0
- package/dist/cjs/client/components/AgenticNotebook/chatMessageParts.d.ts +39 -0
- package/dist/cjs/client/components/AgenticNotebook/index.d.ts +56 -0
- package/dist/cjs/client/components/AgenticNotebook/useAgentChatController.d.ts +25 -0
- package/dist/cjs/client/components/AgenticNotebook/useNotebookAutosave.d.ts +12 -0
- package/dist/cjs/client/components/AnalysisBuilder/AnalysisAIPanel.d.ts +25 -0
- package/dist/cjs/client/components/AnalysisBuilder/AnalysisAxisDropZone.d.ts +29 -0
- package/dist/cjs/client/components/AnalysisBuilder/AnalysisChartConfigPanel.d.ts +18 -0
- package/dist/cjs/client/components/AnalysisBuilder/AnalysisDisplayConfigPanel.d.ts +11 -0
- package/dist/cjs/client/components/AnalysisBuilder/AnalysisFilterGroup.d.ts +20 -0
- package/dist/cjs/client/components/AnalysisBuilder/AnalysisFilterItem.d.ts +14 -0
- package/dist/cjs/client/components/AnalysisBuilder/AnalysisFilterSection.d.ts +16 -0
- package/dist/cjs/client/components/AnalysisBuilder/AnalysisModeErrorBoundary.d.ts +27 -0
- package/dist/cjs/client/components/AnalysisBuilder/AnalysisQueryPanel.d.ts +12 -0
- package/dist/cjs/client/components/AnalysisBuilder/AnalysisQueryPanelParts.d.ts +64 -0
- package/dist/cjs/client/components/AnalysisBuilder/AnalysisResultsHeader.d.ts +67 -0
- package/dist/cjs/client/components/AnalysisBuilder/AnalysisResultsPanel.d.ts +14 -0
- package/dist/cjs/client/components/AnalysisBuilder/AnalysisTypeSelector.d.ts +17 -0
- package/dist/cjs/client/components/AnalysisBuilder/BreakdownComparisonToggle.d.ts +13 -0
- package/dist/cjs/client/components/AnalysisBuilder/BreakdownItemCard.d.ts +12 -0
- package/dist/cjs/client/components/AnalysisBuilder/BreakdownRow.d.ts +26 -0
- package/dist/cjs/client/components/AnalysisBuilder/BreakdownSection.d.ts +9 -0
- package/dist/cjs/client/components/AnalysisBuilder/DisplayOptionControl.d.ts +10 -0
- package/dist/cjs/client/components/AnalysisBuilder/ExecutionPlanPanel.d.ts +49 -0
- package/dist/cjs/client/components/AnalysisBuilder/ExecutionPlanPanelParts.d.ts +22 -0
- package/dist/cjs/client/components/AnalysisBuilder/ExplainAIPanel.d.ts +16 -0
- package/dist/cjs/client/components/AnalysisBuilder/FieldDetailPanel.d.ts +4 -0
- package/dist/cjs/client/components/AnalysisBuilder/FieldSearchItem.d.ts +6 -0
- package/dist/cjs/client/components/AnalysisBuilder/FieldSearchModal.d.ts +2 -0
- package/dist/cjs/client/components/AnalysisBuilder/FieldSearchResults.d.ts +16 -0
- package/dist/cjs/client/components/AnalysisBuilder/FilterConfigModal.d.ts +17 -0
- package/dist/cjs/client/components/AnalysisBuilder/FilterValueInput.d.ts +63 -0
- package/dist/cjs/client/components/AnalysisBuilder/FlowConfigPanel.d.ts +28 -0
- package/dist/cjs/client/components/AnalysisBuilder/FlowDepthControls.d.ts +10 -0
- package/dist/cjs/client/components/AnalysisBuilder/FlowModeContent.d.ts +57 -0
- package/dist/cjs/client/components/AnalysisBuilder/FlowVisualizationPicker.d.ts +7 -0
- package/dist/cjs/client/components/AnalysisBuilder/FunnelBindingKeySelector.d.ts +21 -0
- package/dist/cjs/client/components/AnalysisBuilder/FunnelConfigPanel.d.ts +24 -0
- package/dist/cjs/client/components/AnalysisBuilder/FunnelModeContent.d.ts +48 -0
- package/dist/cjs/client/components/AnalysisBuilder/FunnelStepCard.d.ts +25 -0
- package/dist/cjs/client/components/AnalysisBuilder/FunnelStepList.d.ts +26 -0
- package/dist/cjs/client/components/AnalysisBuilder/LegacyBooleanOptions.d.ts +8 -0
- package/dist/cjs/client/components/AnalysisBuilder/LimitSection.d.ts +14 -0
- package/dist/cjs/client/components/AnalysisBuilder/MetricItemCard.d.ts +11 -0
- package/dist/cjs/client/components/AnalysisBuilder/MetricRow.d.ts +23 -0
- package/dist/cjs/client/components/AnalysisBuilder/MetricsSection.d.ts +9 -0
- package/dist/cjs/client/components/AnalysisBuilder/RetentionConfigPanel.d.ts +36 -0
- package/dist/cjs/client/components/AnalysisBuilder/RetentionModeContent.d.ts +71 -0
- package/dist/cjs/client/components/AnalysisBuilder/SectionHeading.d.ts +12 -0
- package/dist/cjs/client/components/AnalysisBuilder/SortToggleButton.d.ts +13 -0
- package/dist/cjs/client/components/AnalysisBuilder/StringArrayInput.d.ts +17 -0
- package/dist/cjs/client/components/AnalysisBuilder/filterConfigModalUtils.d.ts +30 -0
- package/dist/cjs/client/components/AnalysisBuilder/hooks/useAnalysisBuilderImperativeHandle.d.ts +13 -0
- package/dist/cjs/client/components/AnalysisBuilder/hooks/useDragReorder.d.ts +25 -0
- package/dist/cjs/client/components/AnalysisBuilder/hooks/useFieldSearchKeyboard.d.ts +11 -0
- package/dist/cjs/client/components/AnalysisBuilder/index.d.ts +9 -0
- package/dist/cjs/client/components/AnalysisBuilder/types.d.ts +851 -0
- package/dist/cjs/client/components/AnalysisBuilder/utils/axisConfigUtils.d.ts +23 -0
- package/dist/cjs/client/components/AnalysisBuilder/utils/executionPlanMarkdown.d.ts +8 -0
- package/dist/cjs/client/components/AnalysisBuilder/utils/fieldUtils.d.ts +69 -0
- package/dist/cjs/client/components/AnalysisBuilder/utils/filterUtils.d.ts +19 -0
- package/dist/cjs/client/components/AnalysisBuilder/utils/idUtils.d.ts +11 -0
- package/dist/cjs/client/components/AnalysisBuilder/utils/index.d.ts +11 -0
- package/dist/cjs/client/components/AnalysisBuilder/utils/queryUtils.d.ts +11 -0
- package/dist/cjs/client/components/AnalysisBuilder/utils/recentFieldsUtils.d.ts +14 -0
- package/dist/cjs/client/components/AnalysisBuilder/utils/resultsPanelDerive.d.ts +68 -0
- package/dist/cjs/client/components/AnalysisBuilder/utils/shareStateUtils.d.ts +68 -0
- package/dist/cjs/client/components/AnalysisBuilder/utils/sortUtils.d.ts +7 -0
- package/dist/cjs/client/components/AnalysisBuilder/utils/storageUtils.d.ts +44 -0
- package/dist/cjs/client/components/AnalysisBuilderLazy.d.ts +4 -0
- package/dist/cjs/client/components/AnalyticsDashboard.d.ts +2 -0
- package/dist/cjs/client/components/AnalyticsPage.d.ts +1 -0
- package/dist/cjs/client/components/AnalyticsPortlet.d.ts +10 -0
- package/dist/cjs/client/components/ChartErrorBoundary.d.ts +21 -0
- package/dist/cjs/client/components/ChartTypeSelector.d.ts +15 -0
- package/dist/cjs/client/components/ColorPaletteSelector.d.ts +11 -0
- package/dist/cjs/client/components/ConfirmModal.d.ts +30 -0
- package/dist/cjs/client/components/DashboardEditModal.d.ts +15 -0
- package/dist/cjs/client/components/DashboardFilterPanel.d.ts +15 -0
- package/dist/cjs/client/components/DashboardFilters/CompactFilterBar.d.ts +13 -0
- package/dist/cjs/client/components/DashboardFilters/CompactFilterBarParts.d.ts +26 -0
- package/dist/cjs/client/components/DashboardFilters/CustomDateDropdown.d.ts +10 -0
- package/dist/cjs/client/components/DashboardFilters/DashboardFilterConfigModal.d.ts +20 -0
- package/dist/cjs/client/components/DashboardFilters/DashboardFilterConfigModalParts.d.ts +27 -0
- package/dist/cjs/client/components/DashboardFilters/DashboardFilterItem.d.ts +14 -0
- package/dist/cjs/client/components/DashboardFilters/DashboardFilterValueInput.d.ts +39 -0
- package/dist/cjs/client/components/DashboardFilters/DatePresetChips.d.ts +8 -0
- package/dist/cjs/client/components/DashboardFilters/EditModeFilterList.d.ts +13 -0
- package/dist/cjs/client/components/DashboardFilters/FilterChip.d.ts +12 -0
- package/dist/cjs/client/components/DashboardFilters/FilterEditModal.d.ts +15 -0
- package/dist/cjs/client/components/DashboardFilters/FilterValuePopover.d.ts +11 -0
- package/dist/cjs/client/components/DashboardFilters/ReadOnlyFilterList.d.ts +13 -0
- package/dist/cjs/client/components/DashboardFilters/XTDDropdown.d.ts +10 -0
- package/dist/cjs/client/components/DashboardFilters/dashboardFilterConfigModalUtils.d.ts +21 -0
- package/dist/cjs/client/components/DashboardFilters/useCompactFilterBar.d.ts +19 -0
- package/dist/cjs/client/components/DashboardFilters/useDashboardFilterConfigModal.d.ts +69 -0
- package/dist/cjs/client/components/DashboardFilters/useDateRangeState.d.ts +19 -0
- package/dist/cjs/client/components/DashboardFilters/useFilterDropdowns.d.ts +21 -0
- package/dist/cjs/client/components/DashboardFilters/useFilterValueFetch.d.ts +23 -0
- package/dist/cjs/client/components/DashboardGrid.d.ts +22 -0
- package/dist/cjs/client/components/DashboardPortletCard.d.ts +4 -0
- package/dist/cjs/client/components/DashboardThumbnailPlaceholder.d.ts +13 -0
- package/dist/cjs/client/components/DataBrowser/DataBrowserSidebar.d.ts +16 -0
- package/dist/cjs/client/components/DataBrowser/DataBrowserTable.d.ts +16 -0
- package/dist/cjs/client/components/DataBrowser/DataBrowserToolbar.d.ts +22 -0
- package/dist/cjs/client/components/DataBrowser/index.d.ts +28 -0
- package/dist/cjs/client/components/DataHistogram.d.ts +27 -0
- package/dist/cjs/client/components/DebugModal.d.ts +17 -0
- package/dist/cjs/client/components/DrillBreadcrumb.d.ts +7 -0
- package/dist/cjs/client/components/DrillMenu.d.ts +8 -0
- package/dist/cjs/client/components/FloatingEditToolbar.d.ts +30 -0
- package/dist/cjs/client/components/LoadingIndicator.d.ts +16 -0
- package/dist/cjs/client/components/MobileStackedLayout.d.ts +14 -0
- package/dist/cjs/client/components/Modal.d.ts +16 -0
- package/dist/cjs/client/components/PortletAnalysisModal.d.ts +27 -0
- package/dist/cjs/client/components/PortletContainer.d.ts +10 -0
- package/dist/cjs/client/components/PortletFilterConfigModal.d.ts +13 -0
- package/dist/cjs/client/components/RowManagedLayout.d.ts +19 -0
- package/dist/cjs/client/components/ScaledGridWrapper.d.ts +12 -0
- package/dist/cjs/client/components/SchemaVisualization/CubeNode.d.ts +25 -0
- package/dist/cjs/client/components/SchemaVisualization/FieldDetailPanel.d.ts +15 -0
- package/dist/cjs/client/components/SchemaVisualization/RelationshipEdge.d.ts +13 -0
- package/dist/cjs/client/components/SchemaVisualization/SchemaVisualizationLazy.d.ts +3 -0
- package/dist/cjs/client/components/SchemaVisualization/index.d.ts +10 -0
- package/dist/cjs/client/components/SchemaVisualization/useERDLayout.d.ts +39 -0
- package/dist/cjs/client/components/SchemaVisualization/xyflowContext.d.ts +11 -0
- package/dist/cjs/client/components/TextPortletModal.d.ts +12 -0
- package/dist/cjs/client/components/analyticsPortlet/PortletChart.d.ts +31 -0
- package/dist/cjs/client/components/analyticsPortlet/PortletChartView.d.ts +35 -0
- package/dist/cjs/client/components/analyticsPortlet/PortletStates.d.ts +65 -0
- package/dist/cjs/client/components/analyticsPortlet/parsePortletQuery.d.ts +22 -0
- package/dist/cjs/client/components/analyticsPortlet/portletRenderState.d.ts +31 -0
- package/dist/cjs/client/components/analyticsPortlet/usePortletDebugData.d.ts +37 -0
- package/dist/cjs/client/components/analyticsPortlet/usePortletDrillState.d.ts +17 -0
- package/dist/cjs/client/components/analyticsPortlet/usePortletQueryResults.d.ts +37 -0
- package/dist/cjs/client/components/charts/ActivityGridChart.config.d.ts +5 -0
- package/dist/cjs/client/components/charts/ActivityGridChart.d.ts +4 -0
- package/dist/cjs/client/components/charts/ActivityGridChart.helpers.d.ts +33 -0
- package/dist/cjs/client/components/charts/ActivityGridChart.render.d.ts +31 -0
- package/dist/cjs/client/components/charts/AngledXAxisTick.d.ts +19 -0
- package/dist/cjs/client/components/charts/AreaChart.config.d.ts +5 -0
- package/dist/cjs/client/components/charts/AreaChart.d.ts +4 -0
- package/dist/cjs/client/components/charts/AxisFormatControls.d.ts +37 -0
- package/dist/cjs/client/components/charts/BarChart.config.d.ts +5 -0
- package/dist/cjs/client/components/charts/BarChart.d.ts +4 -0
- package/dist/cjs/client/components/charts/BarChart.helpers.d.ts +23 -0
- package/dist/cjs/client/components/charts/BarSeries.d.ts +29 -0
- package/dist/cjs/client/components/charts/BoxPlotChart.config.d.ts +5 -0
- package/dist/cjs/client/components/charts/BoxPlotChart.d.ts +4 -0
- package/dist/cjs/client/components/charts/BubbleChart.config.d.ts +5 -0
- package/dist/cjs/client/components/charts/BubbleChart.d.ts +4 -0
- package/dist/cjs/client/components/charts/BubbleChart.helpers.d.ts +43 -0
- package/dist/cjs/client/components/charts/BubbleChart.render.d.ts +21 -0
- package/dist/cjs/client/components/charts/CandlestickChart.config.d.ts +5 -0
- package/dist/cjs/client/components/charts/CandlestickChart.d.ts +4 -0
- package/dist/cjs/client/components/charts/ChartContainer.d.ts +7 -0
- package/dist/cjs/client/components/charts/ChartLegend.d.ts +7 -0
- package/dist/cjs/client/components/charts/ChartStates.d.ts +38 -0
- package/dist/cjs/client/components/charts/ChartTooltip.d.ts +7 -0
- package/dist/cjs/client/components/charts/DataTable.config.d.ts +5 -0
- package/dist/cjs/client/components/charts/DataTable.d.ts +4 -0
- package/dist/cjs/client/components/charts/FunnelChart.config.d.ts +9 -0
- package/dist/cjs/client/components/charts/FunnelChart.d.ts +11 -0
- package/dist/cjs/client/components/charts/FunnelChart.helpers.d.ts +25 -0
- package/dist/cjs/client/components/charts/FunnelViews.d.ts +16 -0
- package/dist/cjs/client/components/charts/GaugeChart.config.d.ts +5 -0
- package/dist/cjs/client/components/charts/GaugeChart.d.ts +4 -0
- package/dist/cjs/client/components/charts/HeatMapCanvas.d.ts +25 -0
- package/dist/cjs/client/components/charts/HeatMapChart.config.d.ts +8 -0
- package/dist/cjs/client/components/charts/HeatMapChart.d.ts +10 -0
- package/dist/cjs/client/components/charts/HeatMapChart.helpers.d.ts +64 -0
- package/dist/cjs/client/components/charts/KpiDelta.config.d.ts +5 -0
- package/dist/cjs/client/components/charts/KpiDelta.d.ts +4 -0
- package/dist/cjs/client/components/charts/KpiDelta.helpers.d.ts +20 -0
- package/dist/cjs/client/components/charts/KpiNumber.config.d.ts +5 -0
- package/dist/cjs/client/components/charts/KpiNumber.d.ts +4 -0
- package/dist/cjs/client/components/charts/KpiNumber.helpers.d.ts +30 -0
- package/dist/cjs/client/components/charts/KpiStates.d.ts +19 -0
- package/dist/cjs/client/components/charts/KpiText.config.d.ts +5 -0
- package/dist/cjs/client/components/charts/KpiText.d.ts +4 -0
- package/dist/cjs/client/components/charts/LineChart.config.d.ts +5 -0
- package/dist/cjs/client/components/charts/LineChart.d.ts +4 -0
- package/dist/cjs/client/components/charts/MarkdownChart.config.d.ts +5 -0
- package/dist/cjs/client/components/charts/MarkdownChart.d.ts +4 -0
- package/dist/cjs/client/components/charts/MeasureProfileChart.config.d.ts +5 -0
- package/dist/cjs/client/components/charts/MeasureProfileChart.d.ts +4 -0
- package/dist/cjs/client/components/charts/MissingDependencyFallback.d.ts +12 -0
- package/dist/cjs/client/components/charts/PieChart.config.d.ts +5 -0
- package/dist/cjs/client/components/charts/PieChart.d.ts +4 -0
- package/dist/cjs/client/components/charts/RadarChart.config.d.ts +5 -0
- package/dist/cjs/client/components/charts/RadarChart.d.ts +4 -0
- package/dist/cjs/client/components/charts/RadialBarChart.config.d.ts +5 -0
- package/dist/cjs/client/components/charts/RadialBarChart.d.ts +4 -0
- package/dist/cjs/client/components/charts/RetentionCombinedChart.config.d.ts +2 -0
- package/dist/cjs/client/components/charts/RetentionCombinedChart.d.ts +14 -0
- package/dist/cjs/client/components/charts/RetentionHeatmap.config.d.ts +2 -0
- package/dist/cjs/client/components/charts/RetentionHeatmap.d.ts +7 -0
- package/dist/cjs/client/components/charts/SankeyChart.config.d.ts +9 -0
- package/dist/cjs/client/components/charts/SankeyChart.d.ts +10 -0
- package/dist/cjs/client/components/charts/ScatterChart.config.d.ts +5 -0
- package/dist/cjs/client/components/charts/ScatterChart.d.ts +4 -0
- package/dist/cjs/client/components/charts/ScatterChart.helpers.d.ts +43 -0
- package/dist/cjs/client/components/charts/ScatterSeries.d.ts +17 -0
- package/dist/cjs/client/components/charts/ScatterTooltip.d.ts +21 -0
- package/dist/cjs/client/components/charts/SunburstChart.config.d.ts +9 -0
- package/dist/cjs/client/components/charts/SunburstChart.d.ts +10 -0
- package/dist/cjs/client/components/charts/TreeMapChart.config.d.ts +5 -0
- package/dist/cjs/client/components/charts/TreeMapChart.d.ts +4 -0
- package/dist/cjs/client/components/charts/TreeMapChart.helpers.d.ts +37 -0
- package/dist/cjs/client/components/charts/TreeMapContent.d.ts +24 -0
- package/dist/cjs/client/components/charts/TreeMapLegend.d.ts +13 -0
- package/dist/cjs/client/components/charts/WaterfallChart.config.d.ts +5 -0
- package/dist/cjs/client/components/charts/WaterfallChart.d.ts +4 -0
- package/dist/cjs/client/components/charts/cartesianChartHelpers.d.ts +126 -0
- package/dist/cjs/client/components/charts/chartAxisResolution.d.ts +32 -0
- package/dist/cjs/client/components/charts/chartScaffolding.d.ts +77 -0
- package/dist/cjs/client/components/charts/gaugeChartHelpers.d.ts +36 -0
- package/dist/cjs/client/components/charts/index.d.ts +25 -0
- package/dist/cjs/client/components/charts/kpiTextHelpers.d.ts +46 -0
- package/dist/cjs/client/components/charts/radarChartHelpers.d.ts +14 -0
- package/dist/cjs/client/components/charts/radialBarChartHelpers.d.ts +22 -0
- package/dist/cjs/client/components/charts/useChartDimensions.d.ts +20 -0
- package/dist/cjs/client/components/charts/useKpiDimensions.d.ts +30 -0
- package/dist/cjs/client/components/dashboard/DashboardContext.d.ts +113 -0
- package/dist/cjs/client/components/dashboard/DashboardCoordinator.d.ts +2 -0
- package/dist/cjs/client/components/dashboard/DashboardEditBar.d.ts +5 -0
- package/dist/cjs/client/components/dashboard/DashboardFilterBar.d.ts +8 -0
- package/dist/cjs/client/components/dashboard/DashboardGridSurface.d.ts +8 -0
- package/dist/cjs/client/components/dashboard/DashboardModals.d.ts +8 -0
- package/dist/cjs/client/components/dashboard/DashboardProvider.d.ts +2 -0
- package/dist/cjs/client/components/dashboard/DashboardToolbar.d.ts +11 -0
- package/dist/cjs/client/components/dashboard/LayoutModeToggle.d.ts +10 -0
- package/dist/cjs/client/components/dashboard/dashboardGridUtils.d.ts +17 -0
- package/dist/cjs/client/components/dashboard/index.d.ts +13 -0
- package/dist/cjs/client/components/dashboardPortletCard/FilterFieldChip.d.ts +12 -0
- package/dist/cjs/client/components/dashboardPortletCard/PortletCardHeader.d.ts +43 -0
- package/dist/cjs/client/components/dashboardPortletCard/cardStyles.d.ts +33 -0
- package/dist/cjs/client/components/dashboardPortletCard/filterField.d.ts +12 -0
- package/dist/cjs/client/components/dashboardPortletCard/propsEqual.d.ts +55 -0
- package/dist/cjs/client/components/dashboardPortletCard/usePortletCardActions.d.ts +16 -0
- package/dist/cjs/client/components/portletAnalysisModal/saveValidation.d.ts +8 -0
- package/dist/cjs/client/components/shared/DateRangeFilter.d.ts +4 -0
- package/dist/cjs/client/components/shared/DateRangeSelector.d.ts +13 -0
- package/dist/cjs/client/components/shared/FilterBuilder.d.ts +4 -0
- package/dist/cjs/client/components/shared/FilterGroup.d.ts +4 -0
- package/dist/cjs/client/components/shared/FilterItem.d.ts +4 -0
- package/dist/cjs/client/components/shared/FilterValueSelector.d.ts +4 -0
- package/dist/cjs/client/components/shared/dateRangeUtils.d.ts +40 -0
- package/dist/cjs/client/components/shared/filterDisplayUtils.d.ts +10 -0
- package/dist/cjs/client/components/shared/filterItem/FilterDateRangeSelector.d.ts +17 -0
- package/dist/cjs/client/components/shared/filterItem/FilterFieldDropdown.d.ts +16 -0
- package/dist/cjs/client/components/shared/filterItem/dateRangeSync.d.ts +14 -0
- package/dist/cjs/client/components/shared/filterItem/fieldVisuals.d.ts +5 -0
- package/dist/cjs/client/components/shared/filterValueSelector/FilterValueInputs.d.ts +55 -0
- package/dist/cjs/client/components/shared/filterValueSelector/useFilterValueSelectorState.d.ts +25 -0
- package/dist/cjs/client/components/shared/queryFieldUtils.d.ts +21 -0
- package/dist/cjs/client/components/shared/types.d.ts +60 -0
- package/dist/cjs/client/components/shared/utils.d.ts +71 -0
- package/dist/cjs/client/components.d.ts +17 -0
- package/dist/cjs/client/hooks/agentChatStream.d.ts +39 -0
- package/dist/cjs/client/hooks/analysisQueryExecutionModes.d.ts +133 -0
- package/dist/cjs/client/hooks/dashboard/layoutUtils.d.ts +7 -0
- package/dist/cjs/client/hooks/dashboard/useDashboardController.d.ts +53 -0
- package/dist/cjs/client/hooks/dashboard/useGridLayoutEngine.d.ts +10 -0
- package/dist/cjs/client/hooks/dashboard/useRowLayoutEngine.d.ts +18 -0
- package/dist/cjs/client/hooks/drillNavigation.d.ts +25 -0
- package/dist/cjs/client/hooks/queries/index.d.ts +20 -0
- package/dist/cjs/client/hooks/queries/useCubeLoadQuery.d.ts +85 -0
- package/dist/cjs/client/hooks/queries/useCubeMetaQuery.d.ts +51 -0
- package/dist/cjs/client/hooks/queries/useDryRunQuery.d.ts +153 -0
- package/dist/cjs/client/hooks/queries/useExplainAI.d.ts +62 -0
- package/dist/cjs/client/hooks/queries/useExplainQuery.d.ts +62 -0
- package/dist/cjs/client/hooks/queries/useFlowQuery.d.ts +72 -0
- package/dist/cjs/client/hooks/queries/useFunnelQuery.d.ts +20 -0
- package/dist/cjs/client/hooks/queries/useMultiCubeLoadQuery.d.ts +70 -0
- package/dist/cjs/client/hooks/queries/useRetentionQuery.d.ts +67 -0
- package/dist/cjs/client/hooks/useAgentChat.d.ts +60 -0
- package/dist/cjs/client/hooks/useAnalysisAI.d.ts +56 -0
- package/dist/cjs/client/hooks/useAnalysisBuilderHook.d.ts +245 -0
- package/dist/cjs/client/hooks/useAnalysisChartDefaults.d.ts +35 -0
- package/dist/cjs/client/hooks/useAnalysisCombinedFields.d.ts +18 -0
- package/dist/cjs/client/hooks/useAnalysisInitialization.d.ts +25 -0
- package/dist/cjs/client/hooks/useAnalysisQueryBuilder.d.ts +32 -0
- package/dist/cjs/client/hooks/useAnalysisQueryExecution.d.ts +144 -0
- package/dist/cjs/client/hooks/useAnalysisShare.d.ts +18 -0
- package/dist/cjs/client/hooks/useAnalysisUIState.d.ts +24 -0
- package/dist/cjs/client/hooks/useCubeFieldLabel.d.ts +16 -0
- package/dist/cjs/client/hooks/useDashboardHook.d.ts +123 -0
- package/dist/cjs/client/hooks/useDataBrowser.d.ts +67 -0
- package/dist/cjs/client/hooks/useDebounce.d.ts +12 -0
- package/dist/cjs/client/hooks/useDebounceQuery.d.ts +48 -0
- package/dist/cjs/client/hooks/useDirtyStateTracking.d.ts +37 -0
- package/dist/cjs/client/hooks/useDragAutoScroll.d.ts +18 -0
- package/dist/cjs/client/hooks/useDrillInteraction.d.ts +9 -0
- package/dist/cjs/client/hooks/useElementVisibility.d.ts +30 -0
- package/dist/cjs/client/hooks/useFilterValues.d.ts +19 -0
- package/dist/cjs/client/hooks/useNotebookLayout.d.ts +8 -0
- package/dist/cjs/client/hooks/useResponsiveDashboard.d.ts +16 -0
- package/dist/cjs/client/hooks/useScrollDetection.d.ts +29 -0
- package/dist/cjs/client/hooks/useTheme.d.ts +11 -0
- package/dist/cjs/client/hooks/useTranslation.d.ts +21 -0
- package/dist/cjs/client/hooks.d.ts +17 -0
- package/dist/cjs/client/icons/customIcons.d.ts +22 -0
- package/dist/cjs/client/icons/defaultIcons.d.ts +5 -0
- package/dist/cjs/client/icons/index.d.ts +22 -0
- package/dist/cjs/client/icons/registry.d.ts +64 -0
- package/dist/cjs/client/icons/types.d.ts +129 -0
- package/dist/cjs/client/icons.d.ts +2 -0
- package/dist/cjs/client/index.d.ts +76 -0
- package/dist/cjs/client/providers/CubeApiProvider.d.ts +24 -0
- package/dist/cjs/client/providers/CubeFeaturesProvider.d.ts +19 -0
- package/dist/cjs/client/providers/CubeMetaContext.d.ts +11 -0
- package/dist/cjs/client/providers/CubeMetaProvider.d.ts +6 -0
- package/dist/cjs/client/providers/CubeProvider.d.ts +70 -0
- package/dist/cjs/client/providers/I18nProvider.d.ts +18 -0
- package/dist/cjs/client/providers/ScrollContainerContext.d.ts +19 -0
- package/dist/cjs/client/providers.d.ts +10 -0
- package/dist/cjs/client/schema.d.ts +13 -0
- package/dist/cjs/client/shared/chartConfigBuilders.d.ts +18 -0
- package/dist/cjs/client/shared/chartDefaults.d.ts +59 -0
- package/dist/cjs/client/shared/components/CodeBlock.d.ts +13 -0
- package/dist/cjs/client/shared/components/QueryAnalysisPanel.d.ts +7 -0
- package/dist/cjs/client/shared/components/QueryAnalysisPanel.sections.d.ts +41 -0
- package/dist/cjs/client/shared/index.d.ts +11 -0
- package/dist/cjs/client/shared/queryKey.d.ts +1 -0
- package/dist/cjs/client/shared/queryTransforms.d.ts +20 -0
- package/dist/cjs/client/shared/types.d.ts +184 -0
- package/dist/cjs/client/shared/utils.d.ts +104 -0
- package/dist/cjs/client/stores/analysisBuilderStore.d.ts +578 -0
- package/dist/cjs/client/stores/dashboardStore.d.ts +292 -0
- package/dist/cjs/client/stores/dataBrowserStore.d.ts +34 -0
- package/dist/cjs/client/stores/index.d.ts +13 -0
- package/dist/cjs/client/stores/notebookStore.d.ts +157 -0
- package/dist/cjs/client/stores/optionsToAnalysisConfig.d.ts +17 -0
- package/dist/cjs/client/stores/slices/coreSlice.d.ts +96 -0
- package/dist/cjs/client/stores/slices/flowSlice.d.ts +69 -0
- package/dist/cjs/client/stores/slices/funnelSlice.d.ts +61 -0
- package/dist/cjs/client/stores/slices/index.d.ts +13 -0
- package/dist/cjs/client/stores/slices/querySlice.d.ts +55 -0
- package/dist/cjs/client/stores/slices/retentionSlice.d.ts +66 -0
- package/dist/cjs/client/stores/slices/uiSlice.d.ts +52 -0
- package/dist/cjs/client/theme/index.d.ts +135 -0
- package/dist/cjs/client/types/analysisConfig.d.ts +185 -0
- package/dist/cjs/client/types/drill.d.ts +240 -0
- package/dist/cjs/client/types/flow.d.ts +191 -0
- package/dist/cjs/client/types/funnel.d.ts +288 -0
- package/dist/cjs/client/types/retention.d.ts +301 -0
- package/dist/cjs/client/types.d.ts +600 -0
- package/dist/cjs/client/utils/axisValueFormatting.d.ts +32 -0
- package/dist/cjs/client/utils/chartConstants.d.ts +16 -0
- package/dist/cjs/client/utils/chartUtils.d.ts +35 -0
- package/dist/cjs/client/utils/colorPalettes.d.ts +35 -0
- package/dist/cjs/client/utils/comparisonUtils.d.ts +96 -0
- package/dist/cjs/client/utils/configMigration.d.ts +85 -0
- package/dist/cjs/client/utils/drillQueryBuilder.d.ts +41 -0
- package/dist/cjs/client/utils/exportXlsx.d.ts +20 -0
- package/dist/cjs/client/utils/filterUtils.d.ts +113 -0
- package/dist/cjs/client/utils/funnelExecution.d.ts +211 -0
- package/dist/cjs/client/utils/funnelValidation.d.ts +46 -0
- package/dist/cjs/client/utils/index.d.ts +94 -0
- package/dist/cjs/client/utils/joinReachability.d.ts +27 -0
- package/dist/cjs/client/utils/measureIcons.d.ts +11 -0
- package/dist/cjs/client/utils/multiQueryUtils.d.ts +86 -0
- package/dist/cjs/client/utils/multiQueryValidation.d.ts +69 -0
- package/dist/cjs/client/utils/periodUtils.d.ts +40 -0
- package/dist/cjs/client/utils/pivotUtils.d.ts +87 -0
- package/dist/cjs/client/utils/shareUtils.d.ts +61 -0
- package/dist/cjs/client/utils/syntaxHighlighting.d.ts +36 -0
- package/dist/cjs/client/utils/targetUtils.d.ts +36 -0
- package/dist/cjs/client/utils/thumbnail.d.ts +36 -0
- package/dist/cjs/client/utils/timeValueFormatting.d.ts +32 -0
- package/dist/cjs/client/utils.d.ts +8 -0
- package/dist/cjs/package.json +3 -0
- package/dist/cjs/server/adapters/base-adapter.d.ts +332 -0
- package/dist/cjs/server/adapters/databend-adapter.d.ts +63 -0
- package/dist/cjs/server/adapters/duckdb-adapter.d.ts +68 -0
- package/dist/cjs/server/adapters/mysql-adapter.d.ts +65 -0
- package/dist/cjs/server/adapters/postgres-adapter.d.ts +55 -0
- package/dist/cjs/server/adapters/singlestore-adapter.d.ts +4 -0
- package/dist/cjs/server/adapters/snowflake-adapter.d.ts +53 -0
- package/dist/cjs/server/adapters/sqlite-adapter.d.ts +120 -0
- package/dist/cjs/server/adapters/window-function-builder.d.ts +11 -0
- package/dist/cjs/server/agent/chart-validation.d.ts +22 -0
- package/dist/cjs/server/agent/handler-steps.d.ts +37 -0
- package/dist/cjs/server/agent/handler.d.ts +25 -0
- package/dist/cjs/server/agent/index.d.ts +11 -0
- package/dist/cjs/server/agent/providers/anthropic.d.ts +24 -0
- package/dist/cjs/server/agent/providers/factory.d.ts +12 -0
- package/dist/cjs/server/agent/providers/google.d.ts +23 -0
- package/dist/cjs/server/agent/providers/index.d.ts +6 -0
- package/dist/cjs/server/agent/providers/openai.d.ts +26 -0
- package/dist/cjs/server/agent/providers/types.d.ts +95 -0
- package/dist/cjs/server/agent/system-prompt.d.ts +5 -0
- package/dist/cjs/server/agent/tools.d.ts +28 -0
- package/dist/cjs/server/agent/types.d.ts +192 -0
- package/dist/cjs/server/ai/discovery-helpers.d.ts +29 -0
- package/dist/cjs/server/ai/discovery.d.ts +66 -0
- package/dist/cjs/server/ai/index.d.ts +10 -0
- package/dist/cjs/server/ai/mcp-prompts.d.ts +83 -0
- package/dist/cjs/server/ai/query-schema.d.ts +258 -0
- package/dist/cjs/server/ai/schemas.d.ts +63 -0
- package/dist/cjs/server/ai/suggestion-helpers.d.ts +33 -0
- package/dist/cjs/server/ai/suggestion.d.ts +16 -0
- package/dist/cjs/server/ai/validation-helpers.d.ts +21 -0
- package/dist/cjs/server/ai/validation.d.ts +31 -0
- package/dist/cjs/server/builders/analysis-utils.d.ts +106 -0
- package/dist/cjs/server/builders/comparison-query-builder.d.ts +70 -0
- package/dist/cjs/server/builders/cte-builder.d.ts +108 -0
- package/dist/cjs/server/builders/date-time-builder.d.ts +34 -0
- package/dist/cjs/server/builders/date-time-helpers.d.ts +34 -0
- package/dist/cjs/server/builders/filter-builder.d.ts +25 -0
- package/dist/cjs/server/builders/filter-operators.d.ts +23 -0
- package/dist/cjs/server/builders/flow-query-builder.d.ts +136 -0
- package/dist/cjs/server/builders/funnel-query-builder.d.ts +145 -0
- package/dist/cjs/server/builders/group-by-builder.d.ts +38 -0
- package/dist/cjs/server/builders/index.d.ts +13 -0
- package/dist/cjs/server/builders/measure-builder.d.ts +185 -0
- package/dist/cjs/server/builders/retention-query-builder.d.ts +98 -0
- package/dist/cjs/server/cache-providers/index.d.ts +5 -0
- package/dist/cjs/server/cache-providers/memory.d.ts +105 -0
- package/dist/cjs/server/cache-utils.d.ts +85 -0
- package/dist/cjs/server/compiler-metadata.d.ts +11 -0
- package/dist/cjs/server/compiler.d.ts +212 -0
- package/dist/cjs/server/cube-utils.d.ts +158 -0
- package/dist/cjs/server/database-utils.d.ts +18 -0
- package/dist/cjs/server/execution/annotation-builder.d.ts +12 -0
- package/dist/cjs/server/execution/filter-cache-preloader.d.ts +19 -0
- package/dist/cjs/server/execution/mode-router.d.ts +25 -0
- package/dist/cjs/server/execution/query-result-cache.d.ts +21 -0
- package/dist/cjs/server/execution/result-post-processor.d.ts +10 -0
- package/dist/cjs/server/executor.d.ts +186 -0
- package/dist/cjs/server/executors/base-executor.d.ts +16 -0
- package/dist/cjs/server/executors/databend-executor.d.ts +33 -0
- package/dist/cjs/server/executors/duckdb-executor.d.ts +33 -0
- package/dist/cjs/server/executors/explain-utils.d.ts +28 -0
- package/dist/cjs/server/executors/index.d.ts +21 -0
- package/dist/cjs/server/executors/mysql-executor.d.ts +27 -0
- package/dist/cjs/server/executors/postgres-executor.d.ts +27 -0
- package/dist/cjs/server/executors/singlestore-executor.d.ts +9 -0
- package/dist/cjs/server/executors/snowflake-executor.d.ts +33 -0
- package/dist/cjs/server/executors/sqlite-executor.d.ts +28 -0
- package/dist/cjs/server/explain/databend-parser.d.ts +16 -0
- package/dist/cjs/server/explain/duckdb-parser.d.ts +28 -0
- package/dist/cjs/server/explain/explain-tree.d.ts +20 -0
- package/dist/cjs/server/explain/index.d.ts +9 -0
- package/dist/cjs/server/explain/mysql-parser.d.ts +38 -0
- package/dist/cjs/server/explain/postgres-parser.d.ts +18 -0
- package/dist/cjs/server/explain/snowflake-parser.d.ts +17 -0
- package/dist/cjs/server/explain/sqlite-parser.d.ts +23 -0
- package/dist/cjs/server/filter-cache.d.ts +73 -0
- package/dist/cjs/server/gap-filler.d.ts +48 -0
- package/dist/cjs/server/index.d.ts +38 -0
- package/dist/cjs/server/logical-plan/cte-planner-helpers.d.ts +37 -0
- package/dist/cjs/server/logical-plan/cte-planner.d.ts +104 -0
- package/dist/cjs/server/logical-plan/filter-propagation.d.ts +44 -0
- package/dist/cjs/server/logical-plan/index.d.ts +19 -0
- package/dist/cjs/server/logical-plan/join-planner.d.ts +27 -0
- package/dist/cjs/server/logical-plan/logical-plan-builder.d.ts +58 -0
- package/dist/cjs/server/logical-plan/logical-planner.d.ts +39 -0
- package/dist/cjs/server/logical-plan/optimiser.d.ts +34 -0
- package/dist/cjs/server/logical-plan/plan-analysis-reporter.d.ts +59 -0
- package/dist/cjs/server/logical-plan/planner-utils.d.ts +20 -0
- package/dist/cjs/server/logical-plan/types.d.ts +199 -0
- package/dist/cjs/server/measure-classification.d.ts +40 -0
- package/dist/cjs/server/physical-plan/drizzle-plan-builder.d.ts +50 -0
- package/dist/cjs/server/physical-plan/drizzle-sql-builder.d.ts +118 -0
- package/dist/cjs/server/physical-plan/index.d.ts +2 -0
- package/dist/cjs/server/physical-plan/processors/cte-processor.d.ts +6 -0
- package/dist/cjs/server/physical-plan/processors/index.d.ts +8 -0
- package/dist/cjs/server/physical-plan/processors/joins-processor.d.ts +6 -0
- package/dist/cjs/server/physical-plan/processors/keys-dedup-processor.d.ts +13 -0
- package/dist/cjs/server/physical-plan/processors/multi-fact-processor.d.ts +13 -0
- package/dist/cjs/server/physical-plan/processors/predicates-processor.d.ts +6 -0
- package/dist/cjs/server/physical-plan/processors/selection-processor.d.ts +6 -0
- package/dist/cjs/server/physical-plan/processors/shared.d.ts +38 -0
- package/dist/cjs/server/physical-plan/processors/window-processor.d.ts +6 -0
- package/dist/cjs/server/prompts/explain-analysis-prompt.d.ts +47 -0
- package/dist/cjs/server/prompts/index.d.ts +27 -0
- package/dist/cjs/server/prompts/single-step-prompt.d.ts +31 -0
- package/dist/cjs/server/prompts/step0-validation-prompt.d.ts +39 -0
- package/dist/cjs/server/prompts/step1-shape-prompt.d.ts +29 -0
- package/dist/cjs/server/prompts/step2-complete-prompt.d.ts +19 -0
- package/dist/cjs/server/prompts/types.d.ts +37 -0
- package/dist/cjs/server/query-handlers.d.ts +79 -0
- package/dist/cjs/server/query-modes.d.ts +28 -0
- package/dist/cjs/server/query-validator.d.ts +9 -0
- package/dist/cjs/server/resolvers/calculated-measure-resolver.d.ts +98 -0
- package/dist/cjs/server/resolvers/index.d.ts +6 -0
- package/dist/cjs/server/resolvers/join-path-resolver.d.ts +158 -0
- package/dist/cjs/server/sql-format.d.ts +11 -0
- package/dist/cjs/server/template-substitution.d.ts +57 -0
- package/dist/cjs/server/types/analysis.d.ts +189 -0
- package/dist/cjs/server/types/cache.d.ts +132 -0
- package/dist/cjs/server/types/core.d.ts +164 -0
- package/dist/cjs/server/types/cube.d.ts +544 -0
- package/dist/cjs/server/types/executor.d.ts +156 -0
- package/dist/cjs/server/types/flow.d.ts +144 -0
- package/dist/cjs/server/types/funnel.d.ts +118 -0
- package/dist/cjs/server/types/index.d.ts +11 -0
- package/dist/cjs/server/types/metadata.d.ts +113 -0
- package/dist/cjs/server/types/query.d.ts +153 -0
- package/dist/cjs/server/types/retention.d.ts +141 -0
- package/dist/cjs/server/types/utils.d.ts +11 -0
- package/dist/cjs/server/types/validation.d.ts +14 -0
- package/dist/server/index.cjs +1 -1
- package/dist/server/index.js +1 -1
- package/dist/{adapters/openai-B5jEiqiB.js → server/openai-CmVRIbUg.js} +18 -2
- package/dist/server/{openai-cDlFSTk6.js → openai-CtXqeznO.js} +1 -1
- package/dist/{adapters/openai-D0musiYP.cjs → server/openai-D-6l1Y8h.cjs} +3 -3
- package/dist/server/{openai-vXvLni8v.cjs → openai-DTSTMiXL.cjs} +1 -1
- package/package.json +75 -29
|
@@ -0,0 +1,245 @@
|
|
|
1
|
+
import { ColorPalette } from '../utils/colorPalettes.js';
|
|
2
|
+
import { CubeQuery, MultiQueryConfig, ChartType, ChartAxisConfig, ChartDisplayConfig, Filter, QueryMergeStrategy, FunnelBindingKey, AnalysisType, FunnelStepState } from '../types.js';
|
|
3
|
+
import { AnalysisBuilderState, MetricItem, BreakdownItem, ExecutionStatus, QueryPanelTab } from '../components/AnalysisBuilder/types.js';
|
|
4
|
+
import { ChartAvailabilityMap } from '../shared/chartDefaults.js';
|
|
5
|
+
import { DebugDataEntry } from './queries/index.js';
|
|
6
|
+
import { MultiQueryValidationResult } from '../utils/multiQueryValidation.js';
|
|
7
|
+
import { MetaField } from '../shared/types.js';
|
|
8
|
+
import { ValidationResult } from '../adapters/modeAdapter.js';
|
|
9
|
+
export interface UseAnalysisBuilderOptions {
|
|
10
|
+
/** External color palette (overrides local) */
|
|
11
|
+
externalColorPalette?: string[] | ColorPalette;
|
|
12
|
+
/** Initial data (skip first fetch) */
|
|
13
|
+
initialData?: unknown[];
|
|
14
|
+
/** Callback when query changes */
|
|
15
|
+
onQueryChange?: (query: CubeQuery) => void;
|
|
16
|
+
/** Callback when chart config changes */
|
|
17
|
+
onChartConfigChange?: (config: {
|
|
18
|
+
chartType: ChartType;
|
|
19
|
+
chartConfig: ChartAxisConfig;
|
|
20
|
+
displayConfig: ChartDisplayConfig;
|
|
21
|
+
}) => void;
|
|
22
|
+
}
|
|
23
|
+
export interface UseAnalysisBuilderResult {
|
|
24
|
+
queryState: AnalysisBuilderState;
|
|
25
|
+
queryStates: AnalysisBuilderState[];
|
|
26
|
+
activeQueryIndex: number;
|
|
27
|
+
mergeStrategy: QueryMergeStrategy;
|
|
28
|
+
isMultiQueryMode: boolean;
|
|
29
|
+
mergeKeys: string[] | undefined;
|
|
30
|
+
currentQuery: CubeQuery;
|
|
31
|
+
allQueries: CubeQuery[];
|
|
32
|
+
multiQueryConfig: MultiQueryConfig | null;
|
|
33
|
+
multiQueryValidation: MultiQueryValidationResult | null;
|
|
34
|
+
funnelBindingKey: FunnelBindingKey | null;
|
|
35
|
+
/** Whether funnel mode is properly configured and ready for execution */
|
|
36
|
+
isFunnelModeEnabled: boolean;
|
|
37
|
+
/** Current analysis type (query, multi, funnel) */
|
|
38
|
+
analysisType: AnalysisType;
|
|
39
|
+
/** Selected cube for funnel mode (all steps use this cube) */
|
|
40
|
+
funnelCube: string | null;
|
|
41
|
+
/** Dedicated funnel steps (when analysisType === 'funnel') */
|
|
42
|
+
funnelSteps: FunnelStepState[];
|
|
43
|
+
/** Index of currently active funnel step */
|
|
44
|
+
activeFunnelStepIndex: number;
|
|
45
|
+
/** Time dimension for funnel temporal ordering */
|
|
46
|
+
funnelTimeDimension: string | null;
|
|
47
|
+
/** Chart type for funnel mode (separate from query mode) */
|
|
48
|
+
funnelChartType: ChartType;
|
|
49
|
+
/** Chart config for funnel mode (separate from query mode) */
|
|
50
|
+
funnelChartConfig: ChartAxisConfig;
|
|
51
|
+
/** Display config for funnel mode (separate from query mode) */
|
|
52
|
+
funnelDisplayConfig: ChartDisplayConfig;
|
|
53
|
+
/** Selected cube for flow mode */
|
|
54
|
+
flowCube: string | null;
|
|
55
|
+
/** Binding key for flow mode (entity linking) */
|
|
56
|
+
flowBindingKey: FunnelBindingKey | null;
|
|
57
|
+
/** Time dimension for flow mode (event ordering) */
|
|
58
|
+
flowTimeDimension: string | null;
|
|
59
|
+
/** Event dimension for flow mode (node labels in Sankey) */
|
|
60
|
+
eventDimension: string | null;
|
|
61
|
+
/** Starting step configuration */
|
|
62
|
+
startingStep: import('../types/flow.js').FlowStartingStep;
|
|
63
|
+
/** Number of steps to explore before starting step */
|
|
64
|
+
stepsBefore: number;
|
|
65
|
+
/** Number of steps to explore after starting step */
|
|
66
|
+
stepsAfter: number;
|
|
67
|
+
/** Join strategy for flow execution */
|
|
68
|
+
joinStrategy: 'auto' | 'lateral' | 'window';
|
|
69
|
+
/** Display config for flow mode */
|
|
70
|
+
flowDisplayConfig: ChartDisplayConfig;
|
|
71
|
+
/** Single cube for retention analysis */
|
|
72
|
+
retentionCube: string | null;
|
|
73
|
+
/** Binding key for retention mode */
|
|
74
|
+
retentionBindingKey: import('../types/funnel.js').FunnelBindingKey | null;
|
|
75
|
+
/** Single timestamp dimension for retention mode */
|
|
76
|
+
retentionTimeDimension: string | null;
|
|
77
|
+
/** Date range for cohort analysis (REQUIRED) */
|
|
78
|
+
retentionDateRange: import('../types/retention.js').DateRange;
|
|
79
|
+
/** Cohort filters for retention mode */
|
|
80
|
+
retentionCohortFilters: import('../types.js').Filter[];
|
|
81
|
+
/** Activity filters for retention mode */
|
|
82
|
+
retentionActivityFilters: import('../types.js').Filter[];
|
|
83
|
+
/** Optional breakdown dimensions for segmenting the cohort */
|
|
84
|
+
retentionBreakdowns: import('../types/retention.js').RetentionBreakdownItem[];
|
|
85
|
+
/** Granularity for viewing retention periods (day/week/month) */
|
|
86
|
+
retentionViewGranularity: import('../types/retention.js').RetentionGranularity;
|
|
87
|
+
/** Number of periods for retention mode */
|
|
88
|
+
retentionPeriods: number;
|
|
89
|
+
/** Retention calculation type */
|
|
90
|
+
retentionType: import('../types/retention.js').RetentionType;
|
|
91
|
+
/** Display config for retention mode */
|
|
92
|
+
retentionDisplayConfig: ChartDisplayConfig | undefined;
|
|
93
|
+
executionStatus: ExecutionStatus;
|
|
94
|
+
executionResults: unknown[] | null;
|
|
95
|
+
perQueryResults: (unknown[] | null)[] | null;
|
|
96
|
+
isLoading: boolean;
|
|
97
|
+
isFetching: boolean;
|
|
98
|
+
error: Error | null;
|
|
99
|
+
isValidQuery: boolean;
|
|
100
|
+
debugDataPerQuery: DebugDataEntry[];
|
|
101
|
+
/**
|
|
102
|
+
* Whether the current query config differs from the last executed query.
|
|
103
|
+
* Used for manual refresh mode to show "needs refresh" indicator.
|
|
104
|
+
*/
|
|
105
|
+
needsRefresh: boolean;
|
|
106
|
+
/**
|
|
107
|
+
* Query warnings from the server (e.g., fan-out without dimensions).
|
|
108
|
+
* Displayed as a banner above results.
|
|
109
|
+
*/
|
|
110
|
+
warnings: import('../shared/types.js').QueryWarning[] | undefined;
|
|
111
|
+
/** In funnel mode, the actually executed queries with binding key dimension and IN filters */
|
|
112
|
+
funnelExecutedQueries: CubeQuery[] | null;
|
|
113
|
+
/** In funnel mode, the actual server query { funnel: {...} } sent to the API */
|
|
114
|
+
funnelServerQuery: unknown | null;
|
|
115
|
+
/** In funnel mode, unified debug data (SQL, analysis, mode metadata) */
|
|
116
|
+
funnelDebugData: DebugDataEntry | null;
|
|
117
|
+
/** In flow mode, the actual server query { flow: {...} } sent to the API */
|
|
118
|
+
flowServerQuery: unknown | null;
|
|
119
|
+
/** In flow mode, unified debug data (SQL, analysis, mode metadata) */
|
|
120
|
+
flowDebugData: DebugDataEntry | null;
|
|
121
|
+
/** In retention mode, the actual server query { retention: {...} } sent to the API */
|
|
122
|
+
retentionServerQuery: unknown | null;
|
|
123
|
+
/** In retention mode, unified debug data (SQL, analysis, mode metadata) */
|
|
124
|
+
retentionDebugData: DebugDataEntry | null;
|
|
125
|
+
/** In retention mode, the chart data (cohort × period matrix) */
|
|
126
|
+
retentionChartData: import('../types/retention.js').RetentionChartData | null;
|
|
127
|
+
/** In retention mode, validation result (errors explaining why query cannot be built) */
|
|
128
|
+
retentionValidation: {
|
|
129
|
+
isValid: boolean;
|
|
130
|
+
errors: string[];
|
|
131
|
+
warnings: string[];
|
|
132
|
+
} | null;
|
|
133
|
+
chartType: ChartType;
|
|
134
|
+
chartConfig: ChartAxisConfig;
|
|
135
|
+
displayConfig: ChartDisplayConfig;
|
|
136
|
+
colorPalette: ColorPalette;
|
|
137
|
+
localPaletteName: string;
|
|
138
|
+
chartAvailability: ChartAvailabilityMap;
|
|
139
|
+
combinedMetrics: MetricItem[];
|
|
140
|
+
combinedBreakdowns: BreakdownItem[];
|
|
141
|
+
effectiveBreakdowns: BreakdownItem[];
|
|
142
|
+
activeTab: QueryPanelTab;
|
|
143
|
+
activeView: 'table' | 'chart';
|
|
144
|
+
displayLimit: number;
|
|
145
|
+
showFieldModal: boolean;
|
|
146
|
+
fieldModalMode: 'metrics' | 'breakdown';
|
|
147
|
+
activeTableIndex: number;
|
|
148
|
+
userManuallySelectedChart: boolean;
|
|
149
|
+
aiState: {
|
|
150
|
+
isOpen: boolean;
|
|
151
|
+
userPrompt: string;
|
|
152
|
+
isGenerating: boolean;
|
|
153
|
+
error: string | null;
|
|
154
|
+
hasGeneratedQuery: boolean;
|
|
155
|
+
};
|
|
156
|
+
shareButtonState: 'idle' | 'copied' | 'copied-no-chart';
|
|
157
|
+
canShare: boolean;
|
|
158
|
+
/** Validation result from the adapter for the current analysis type */
|
|
159
|
+
adapterValidation: ValidationResult;
|
|
160
|
+
actions: {
|
|
161
|
+
setActiveQueryIndex: (index: number) => void;
|
|
162
|
+
setMergeStrategy: (strategy: QueryMergeStrategy) => void;
|
|
163
|
+
openMetricsModal: () => void;
|
|
164
|
+
addMetric: (field: string, label?: string) => void;
|
|
165
|
+
removeMetric: (id: string) => void;
|
|
166
|
+
toggleMetric: (fieldName: string) => void;
|
|
167
|
+
reorderMetrics: (fromIndex: number, toIndex: number) => void;
|
|
168
|
+
openBreakdownsModal: () => void;
|
|
169
|
+
addBreakdown: (field: string, isTimeDimension: boolean, granularity?: string) => void;
|
|
170
|
+
removeBreakdown: (id: string) => void;
|
|
171
|
+
toggleBreakdown: (fieldName: string, isTimeDimension: boolean, granularity?: string) => void;
|
|
172
|
+
setBreakdownGranularity: (id: string, granularity: string) => void;
|
|
173
|
+
toggleBreakdownComparison: (id: string) => void;
|
|
174
|
+
reorderBreakdowns: (fromIndex: number, toIndex: number) => void;
|
|
175
|
+
setFilters: (filters: Filter[]) => void;
|
|
176
|
+
dropFieldToFilter: (field: string) => void;
|
|
177
|
+
setOrder: (fieldName: string, direction: 'asc' | 'desc' | null) => void;
|
|
178
|
+
setLimit: (limit: number | undefined) => void;
|
|
179
|
+
addQuery: () => void;
|
|
180
|
+
removeQuery: (index: number) => void;
|
|
181
|
+
setFunnelBindingKey: (bindingKey: FunnelBindingKey | null) => void;
|
|
182
|
+
setAnalysisType: (type: AnalysisType) => void;
|
|
183
|
+
setFunnelCube: (cube: string | null) => void;
|
|
184
|
+
addFunnelStep: () => void;
|
|
185
|
+
removeFunnelStep: (index: number) => void;
|
|
186
|
+
updateFunnelStep: (index: number, updates: Partial<FunnelStepState>) => void;
|
|
187
|
+
setActiveFunnelStepIndex: (index: number) => void;
|
|
188
|
+
reorderFunnelSteps: (fromIndex: number, toIndex: number) => void;
|
|
189
|
+
setFunnelTimeDimension: (dimension: string | null) => void;
|
|
190
|
+
setFunnelDisplayConfig: (config: ChartDisplayConfig) => void;
|
|
191
|
+
setFlowCube: (cube: string | null) => void;
|
|
192
|
+
setFlowBindingKey: (key: FunnelBindingKey | null) => void;
|
|
193
|
+
setFlowTimeDimension: (dim: string | null) => void;
|
|
194
|
+
setEventDimension: (dim: string | null) => void;
|
|
195
|
+
setStartingStepName: (name: string) => void;
|
|
196
|
+
setStartingStepFilters: (filters: Filter[]) => void;
|
|
197
|
+
setStepsBefore: (count: number) => void;
|
|
198
|
+
setStepsAfter: (count: number) => void;
|
|
199
|
+
setJoinStrategy: (strategy: 'auto' | 'lateral' | 'window') => void;
|
|
200
|
+
setFlowDisplayConfig: (config: ChartDisplayConfig) => void;
|
|
201
|
+
setRetentionCube: (cube: string | null) => void;
|
|
202
|
+
setRetentionBindingKey: (key: import('../types/funnel.js').FunnelBindingKey | null) => void;
|
|
203
|
+
setRetentionTimeDimension: (dim: string | null) => void;
|
|
204
|
+
setRetentionDateRange: (range: import('../types/retention.js').DateRange) => void;
|
|
205
|
+
setRetentionCohortFilters: (filters: import('../types.js').Filter[]) => void;
|
|
206
|
+
setRetentionActivityFilters: (filters: import('../types.js').Filter[]) => void;
|
|
207
|
+
setRetentionBreakdowns: (breakdowns: import('../types/retention.js').RetentionBreakdownItem[]) => void;
|
|
208
|
+
addRetentionBreakdown: (breakdown: import('../types/retention.js').RetentionBreakdownItem) => void;
|
|
209
|
+
removeRetentionBreakdown: (field: string) => void;
|
|
210
|
+
setRetentionViewGranularity: (granularity: import('../types/retention.js').RetentionGranularity) => void;
|
|
211
|
+
setRetentionPeriods: (periods: number) => void;
|
|
212
|
+
setRetentionType: (type: import('../types/retention.js').RetentionType) => void;
|
|
213
|
+
setRetentionDisplayConfig: (config: ChartDisplayConfig) => void;
|
|
214
|
+
setChartType: (type: ChartType) => void;
|
|
215
|
+
setChartConfig: (config: ChartAxisConfig) => void;
|
|
216
|
+
setDisplayConfig: (config: ChartDisplayConfig) => void;
|
|
217
|
+
setLocalPaletteName: (name: string) => void;
|
|
218
|
+
setActiveTab: (tab: QueryPanelTab) => void;
|
|
219
|
+
setActiveView: (view: 'table' | 'chart') => void;
|
|
220
|
+
setDisplayLimit: (limit: number) => void;
|
|
221
|
+
closeFieldModal: () => void;
|
|
222
|
+
setActiveTableIndex: (index: number) => void;
|
|
223
|
+
openAI: () => void;
|
|
224
|
+
closeAI: () => void;
|
|
225
|
+
setAIPrompt: (prompt: string) => void;
|
|
226
|
+
generateAI: () => Promise<void>;
|
|
227
|
+
acceptAI: () => void;
|
|
228
|
+
cancelAI: () => void;
|
|
229
|
+
share: () => Promise<void>;
|
|
230
|
+
clearQuery: () => void;
|
|
231
|
+
clearCurrentMode: () => void;
|
|
232
|
+
refetch: (options?: {
|
|
233
|
+
bustCache?: boolean;
|
|
234
|
+
}) => void;
|
|
235
|
+
handleFieldSelected: (field: MetaField, fieldType: 'measure' | 'dimension' | 'timeDimension', cubeName: string, keepOpen?: boolean) => void;
|
|
236
|
+
};
|
|
237
|
+
getQueryConfig: () => CubeQuery | MultiQueryConfig | import('../types/funnel.js').ServerFunnelQuery;
|
|
238
|
+
getChartConfig: () => {
|
|
239
|
+
chartType: ChartType;
|
|
240
|
+
chartConfig: ChartAxisConfig;
|
|
241
|
+
displayConfig: ChartDisplayConfig;
|
|
242
|
+
};
|
|
243
|
+
getAnalysisType: () => AnalysisType;
|
|
244
|
+
}
|
|
245
|
+
export declare function useAnalysisBuilder(options?: UseAnalysisBuilderOptions): UseAnalysisBuilderResult;
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { ColorPalette } from '../utils/colorPalettes.js';
|
|
2
|
+
import { ChartType, ChartAxisConfig, ChartDisplayConfig } from '../types.js';
|
|
3
|
+
import { MetricItem, BreakdownItem } from '../components/AnalysisBuilder/types.js';
|
|
4
|
+
import { ChartAvailabilityMap } from '../shared/chartDefaults.js';
|
|
5
|
+
export interface UseAnalysisChartDefaultsOptions {
|
|
6
|
+
/** External color palette (overrides local) */
|
|
7
|
+
externalColorPalette?: string[] | ColorPalette;
|
|
8
|
+
/** Combined metrics from all queries */
|
|
9
|
+
combinedMetrics: MetricItem[];
|
|
10
|
+
/** Combined breakdowns from all queries */
|
|
11
|
+
combinedBreakdowns: BreakdownItem[];
|
|
12
|
+
/** Whether query has been debounced (triggers smart defaults) */
|
|
13
|
+
hasDebounced: boolean;
|
|
14
|
+
}
|
|
15
|
+
export interface UseAnalysisChartDefaultsResult {
|
|
16
|
+
/** Current chart type */
|
|
17
|
+
chartType: ChartType;
|
|
18
|
+
/** Chart axis configuration */
|
|
19
|
+
chartConfig: ChartAxisConfig;
|
|
20
|
+
/** Chart display configuration */
|
|
21
|
+
displayConfig: ChartDisplayConfig;
|
|
22
|
+
/** Effective color palette */
|
|
23
|
+
colorPalette: ColorPalette;
|
|
24
|
+
/** Local palette name (when not using external) */
|
|
25
|
+
localPaletteName: string;
|
|
26
|
+
/** Chart availability map */
|
|
27
|
+
chartAvailability: ChartAvailabilityMap;
|
|
28
|
+
/** User manually selected chart */
|
|
29
|
+
userManuallySelectedChart: boolean;
|
|
30
|
+
setChartType: (type: ChartType) => void;
|
|
31
|
+
setChartConfig: (config: ChartAxisConfig) => void;
|
|
32
|
+
setDisplayConfig: (config: ChartDisplayConfig) => void;
|
|
33
|
+
setLocalPaletteName: (name: string) => void;
|
|
34
|
+
}
|
|
35
|
+
export declare function useAnalysisChartDefaults(options: UseAnalysisChartDefaultsOptions): UseAnalysisChartDefaultsResult;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { AnalysisBuilderState, MetricItem, BreakdownItem } from '../components/AnalysisBuilder/types.js';
|
|
2
|
+
import { QueryMergeStrategy } from '../types.js';
|
|
3
|
+
export interface UseAnalysisCombinedFieldsOptions {
|
|
4
|
+
queryState: AnalysisBuilderState;
|
|
5
|
+
queryStates: AnalysisBuilderState[];
|
|
6
|
+
isMultiQueryMode: boolean;
|
|
7
|
+
mergeStrategy: QueryMergeStrategy;
|
|
8
|
+
activeQueryIndex: number;
|
|
9
|
+
}
|
|
10
|
+
export interface UseAnalysisCombinedFieldsResult {
|
|
11
|
+
/** Combined metrics from all queries (for chart config) */
|
|
12
|
+
combinedMetrics: MetricItem[];
|
|
13
|
+
/** Combined breakdowns from all queries (for chart config) */
|
|
14
|
+
combinedBreakdowns: BreakdownItem[];
|
|
15
|
+
/** Effective breakdowns for display (Q1's in merge mode, otherwise current query's) */
|
|
16
|
+
effectiveBreakdowns: BreakdownItem[];
|
|
17
|
+
}
|
|
18
|
+
export declare function useAnalysisCombinedFields(options: UseAnalysisCombinedFieldsOptions): UseAnalysisCombinedFieldsResult;
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { CubeQuery, ChartType, ChartAxisConfig, ChartDisplayConfig } from '../types.js';
|
|
2
|
+
export interface UseAnalysisInitializationOptions {
|
|
3
|
+
/** Current query */
|
|
4
|
+
currentQuery: CubeQuery;
|
|
5
|
+
/** Whether query is valid */
|
|
6
|
+
isValidQuery: boolean;
|
|
7
|
+
/** Chart type */
|
|
8
|
+
chartType: ChartType;
|
|
9
|
+
/** Chart config */
|
|
10
|
+
chartConfig: ChartAxisConfig;
|
|
11
|
+
/** Display config */
|
|
12
|
+
displayConfig: ChartDisplayConfig;
|
|
13
|
+
/** Callback when query changes */
|
|
14
|
+
onQueryChange?: (query: CubeQuery) => void;
|
|
15
|
+
/** Callback when chart config changes */
|
|
16
|
+
onChartConfigChange?: (config: {
|
|
17
|
+
chartType: ChartType;
|
|
18
|
+
chartConfig: ChartAxisConfig;
|
|
19
|
+
displayConfig: ChartDisplayConfig;
|
|
20
|
+
}) => void;
|
|
21
|
+
}
|
|
22
|
+
/**
|
|
23
|
+
* Handles initialization effects - no return value (side-effect only hook)
|
|
24
|
+
*/
|
|
25
|
+
export declare function useAnalysisInitialization(options: UseAnalysisInitializationOptions): void;
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { MultiQueryValidationResult } from '../utils/multiQueryValidation.js';
|
|
2
|
+
import { CubeQuery, MultiQueryConfig, QueryMergeStrategy } from '../types.js';
|
|
3
|
+
import { AnalysisBuilderState } from '../components/AnalysisBuilder/types.js';
|
|
4
|
+
export interface UseAnalysisQueryBuilderResult {
|
|
5
|
+
/** Current query state (active query) */
|
|
6
|
+
queryState: AnalysisBuilderState;
|
|
7
|
+
/** All query states (for multi-query mode) */
|
|
8
|
+
queryStates: AnalysisBuilderState[];
|
|
9
|
+
/** Active query index */
|
|
10
|
+
activeQueryIndex: number;
|
|
11
|
+
/** Merge strategy for multi-query */
|
|
12
|
+
mergeStrategy: QueryMergeStrategy;
|
|
13
|
+
/** Whether in multi-query mode */
|
|
14
|
+
isMultiQueryMode: boolean;
|
|
15
|
+
/** Merge keys (computed from Q1 breakdowns) */
|
|
16
|
+
mergeKeys: string[] | undefined;
|
|
17
|
+
/** Current query as CubeQuery */
|
|
18
|
+
currentQuery: CubeQuery;
|
|
19
|
+
/** All queries as CubeQuery[] */
|
|
20
|
+
allQueries: CubeQuery[];
|
|
21
|
+
/** MultiQueryConfig (if in multi-query mode) */
|
|
22
|
+
multiQueryConfig: MultiQueryConfig | null;
|
|
23
|
+
/** Multi-query validation result */
|
|
24
|
+
multiQueryValidation: MultiQueryValidationResult | null;
|
|
25
|
+
/** Whether current query is valid */
|
|
26
|
+
isValidQuery: boolean | undefined;
|
|
27
|
+
setActiveQueryIndex: (index: number) => void;
|
|
28
|
+
setMergeStrategy: (strategy: QueryMergeStrategy) => void;
|
|
29
|
+
addQuery: () => void;
|
|
30
|
+
removeQuery: (index: number) => void;
|
|
31
|
+
}
|
|
32
|
+
export declare function useAnalysisQueryBuilder(): UseAnalysisQueryBuilderResult;
|
|
@@ -0,0 +1,144 @@
|
|
|
1
|
+
import { DebugDataEntry } from './queries/index.js';
|
|
2
|
+
import { CubeQuery, MultiQueryConfig, FunnelBindingKey, QueryMergeStrategy, AnalysisType } from '../types.js';
|
|
3
|
+
import { ExecutionStatus } from '../components/AnalysisBuilder/types.js';
|
|
4
|
+
import { ServerFunnelQuery } from '../types/funnel.js';
|
|
5
|
+
import { ServerFlowQuery, FlowChartData } from '../types/flow.js';
|
|
6
|
+
import { ServerRetentionQuery, RetentionChartData } from '../types/retention.js';
|
|
7
|
+
export interface UseAnalysisQueryExecutionOptions {
|
|
8
|
+
/** Current query (for single-query mode) */
|
|
9
|
+
currentQuery: CubeQuery;
|
|
10
|
+
/** All queries (for dry-run and multi-query) */
|
|
11
|
+
allQueries: CubeQuery[];
|
|
12
|
+
/** Multi-query config (null if single-query mode) */
|
|
13
|
+
multiQueryConfig: MultiQueryConfig | null;
|
|
14
|
+
/** Whether in multi-query mode */
|
|
15
|
+
isMultiQueryMode: boolean;
|
|
16
|
+
/** Whether current query is valid */
|
|
17
|
+
isValidQuery: boolean;
|
|
18
|
+
/** Initial data (skip first fetch) */
|
|
19
|
+
initialData?: unknown[];
|
|
20
|
+
/** Merge strategy (for detecting funnel mode - legacy) */
|
|
21
|
+
mergeStrategy?: QueryMergeStrategy;
|
|
22
|
+
/** Funnel binding key (required for funnel mode) */
|
|
23
|
+
funnelBindingKey?: FunnelBindingKey | null;
|
|
24
|
+
/**
|
|
25
|
+
* Whether funnel mode is properly configured (from store).
|
|
26
|
+
* This includes filter-only step validation that isMultiQueryMode doesn't provide.
|
|
27
|
+
* @deprecated Use analysisType === 'funnel' instead
|
|
28
|
+
*/
|
|
29
|
+
isFunnelModeEnabled?: boolean;
|
|
30
|
+
/**
|
|
31
|
+
* Analysis type for explicit mode routing.
|
|
32
|
+
* When provided, takes precedence over legacy mode detection.
|
|
33
|
+
*/
|
|
34
|
+
analysisType?: AnalysisType;
|
|
35
|
+
/**
|
|
36
|
+
* Pre-built server funnel query from store's buildFunnelQueryFromSteps().
|
|
37
|
+
* Used when analysisType === 'funnel' with the new dedicated funnel state.
|
|
38
|
+
*/
|
|
39
|
+
serverFunnelQuery?: ServerFunnelQuery | null;
|
|
40
|
+
/**
|
|
41
|
+
* Pre-built server flow query from store's buildFlowQuery().
|
|
42
|
+
* Used when analysisType === 'flow' with the new dedicated flow state.
|
|
43
|
+
*/
|
|
44
|
+
serverFlowQuery?: ServerFlowQuery | null;
|
|
45
|
+
/**
|
|
46
|
+
* Pre-built server retention query from store's buildRetentionQuery().
|
|
47
|
+
* Used when analysisType === 'retention' with the new dedicated retention state.
|
|
48
|
+
*/
|
|
49
|
+
serverRetentionQuery?: ServerRetentionQuery | null;
|
|
50
|
+
/**
|
|
51
|
+
* Validation result for retention mode from store's getRetentionValidation().
|
|
52
|
+
* Used to display specific errors in the debug panel.
|
|
53
|
+
*/
|
|
54
|
+
retentionValidation?: {
|
|
55
|
+
isValid: boolean;
|
|
56
|
+
errors: string[];
|
|
57
|
+
warnings: string[];
|
|
58
|
+
} | null;
|
|
59
|
+
}
|
|
60
|
+
export interface UseAnalysisQueryExecutionResult {
|
|
61
|
+
/** Query execution status */
|
|
62
|
+
executionStatus: ExecutionStatus;
|
|
63
|
+
/** Query results (merged for multi-query) */
|
|
64
|
+
executionResults: unknown[] | null;
|
|
65
|
+
/** Per-query results (for table view in multi-query mode) */
|
|
66
|
+
perQueryResults: (unknown[] | null)[] | null;
|
|
67
|
+
/** Whether query is loading */
|
|
68
|
+
isLoading: boolean;
|
|
69
|
+
/** Whether query is fetching (includes refetch) */
|
|
70
|
+
isFetching: boolean;
|
|
71
|
+
/** Query error */
|
|
72
|
+
error: Error | null;
|
|
73
|
+
/** Debug data per query (for non-funnel modes) */
|
|
74
|
+
debugDataPerQuery: DebugDataEntry[];
|
|
75
|
+
/** Whether query has been debounced (for smart defaults trigger) */
|
|
76
|
+
hasDebounced: boolean;
|
|
77
|
+
/** Refetch function. Pass { bustCache: true } to bypass client and server caches. */
|
|
78
|
+
refetch: (options?: {
|
|
79
|
+
bustCache?: boolean;
|
|
80
|
+
}) => void;
|
|
81
|
+
/**
|
|
82
|
+
* In funnel mode, these are the actually executed queries with:
|
|
83
|
+
* - Binding key dimension auto-added
|
|
84
|
+
* - IN filter applied for steps 2+
|
|
85
|
+
* Use these for debug display instead of the original queries.
|
|
86
|
+
* @deprecated Server-side funnel uses a unified query. Use funnelServerQuery instead.
|
|
87
|
+
*/
|
|
88
|
+
funnelExecutedQueries: CubeQuery[] | null;
|
|
89
|
+
/**
|
|
90
|
+
* The actual server funnel query { funnel: {...} }
|
|
91
|
+
* This is the unified query sent to the server (not per-step queries).
|
|
92
|
+
*/
|
|
93
|
+
funnelServerQuery: ServerFunnelQuery | null;
|
|
94
|
+
/**
|
|
95
|
+
* Debug data specifically for funnel mode
|
|
96
|
+
* Contains unified dry-run SQL and mode metadata.
|
|
97
|
+
*/
|
|
98
|
+
funnelDebugData: DebugDataEntry | null;
|
|
99
|
+
/**
|
|
100
|
+
* The server flow query being executed (when analysisType === 'flow')
|
|
101
|
+
*/
|
|
102
|
+
flowServerQuery: ServerFlowQuery | null;
|
|
103
|
+
/**
|
|
104
|
+
* Flow chart data (nodes and links for Sankey visualization)
|
|
105
|
+
*/
|
|
106
|
+
flowChartData: FlowChartData | null;
|
|
107
|
+
/**
|
|
108
|
+
* Debug data specifically for flow mode
|
|
109
|
+
* Contains unified dry-run SQL and mode metadata.
|
|
110
|
+
*/
|
|
111
|
+
flowDebugData: DebugDataEntry | null;
|
|
112
|
+
/**
|
|
113
|
+
* The server retention query being executed (when analysisType === 'retention')
|
|
114
|
+
*/
|
|
115
|
+
retentionServerQuery: ServerRetentionQuery | null;
|
|
116
|
+
/**
|
|
117
|
+
* Retention chart data (cohort × period matrix)
|
|
118
|
+
*/
|
|
119
|
+
retentionChartData: RetentionChartData | null;
|
|
120
|
+
/**
|
|
121
|
+
* Debug data specifically for retention mode
|
|
122
|
+
* Contains unified dry-run SQL and mode metadata.
|
|
123
|
+
*/
|
|
124
|
+
retentionDebugData: DebugDataEntry | null;
|
|
125
|
+
/**
|
|
126
|
+
* Retention validation result (errors explaining why query cannot be built)
|
|
127
|
+
*/
|
|
128
|
+
retentionValidation: {
|
|
129
|
+
isValid: boolean;
|
|
130
|
+
errors: string[];
|
|
131
|
+
warnings: string[];
|
|
132
|
+
} | null;
|
|
133
|
+
/**
|
|
134
|
+
* Whether the current query config differs from the last executed query.
|
|
135
|
+
* Used for manual refresh mode to show "needs refresh" indicator.
|
|
136
|
+
*/
|
|
137
|
+
needsRefresh: boolean;
|
|
138
|
+
/**
|
|
139
|
+
* Query warnings from the server (e.g., fan-out without dimensions).
|
|
140
|
+
* Displayed as a banner above results.
|
|
141
|
+
*/
|
|
142
|
+
warnings: import('../shared/types.js').QueryWarning[] | undefined;
|
|
143
|
+
}
|
|
144
|
+
export declare function useAnalysisQueryExecution(options: UseAnalysisQueryExecutionOptions): UseAnalysisQueryExecutionResult;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { AnalysisConfig } from '../types/analysisConfig.js';
|
|
2
|
+
interface UseAnalysisShareOptions {
|
|
3
|
+
/** Whether the current query is valid */
|
|
4
|
+
isValidQuery: boolean;
|
|
5
|
+
/**
|
|
6
|
+
* Getter for the AnalysisConfig (from store.save())
|
|
7
|
+
* This is the new Phase 3 API - returns complete AnalysisConfig
|
|
8
|
+
*/
|
|
9
|
+
getAnalysisConfig: () => AnalysisConfig;
|
|
10
|
+
}
|
|
11
|
+
interface UseAnalysisShareResult {
|
|
12
|
+
/** Current share button state */
|
|
13
|
+
shareButtonState: 'idle' | 'copied' | 'copied-no-chart';
|
|
14
|
+
/** Handle share button click */
|
|
15
|
+
handleShare: () => Promise<void>;
|
|
16
|
+
}
|
|
17
|
+
export declare function useAnalysisShare({ isValidQuery, getAnalysisConfig, }: UseAnalysisShareOptions): UseAnalysisShareResult;
|
|
18
|
+
export {};
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { FieldModalMode } from '../stores/analysisBuilderStore.js';
|
|
2
|
+
import { QueryPanelTab } from '../components/AnalysisBuilder/types.js';
|
|
3
|
+
export interface UseAnalysisUIStateResult {
|
|
4
|
+
/** Active tab in query panel */
|
|
5
|
+
activeTab: QueryPanelTab;
|
|
6
|
+
/** Active view (table or chart) */
|
|
7
|
+
activeView: 'table' | 'chart';
|
|
8
|
+
/** Display limit for table */
|
|
9
|
+
displayLimit: number;
|
|
10
|
+
/** Whether field modal is open */
|
|
11
|
+
showFieldModal: boolean;
|
|
12
|
+
/** Field modal mode */
|
|
13
|
+
fieldModalMode: FieldModalMode;
|
|
14
|
+
/** Active table index for multi-query */
|
|
15
|
+
activeTableIndex: number;
|
|
16
|
+
/** User manually selected chart */
|
|
17
|
+
userManuallySelectedChart: boolean;
|
|
18
|
+
setActiveTab: (tab: QueryPanelTab) => void;
|
|
19
|
+
setActiveView: (view: 'table' | 'chart') => void;
|
|
20
|
+
setDisplayLimit: (limit: number) => void;
|
|
21
|
+
closeFieldModal: () => void;
|
|
22
|
+
setActiveTableIndex: (index: number) => void;
|
|
23
|
+
}
|
|
24
|
+
export declare function useAnalysisUIState(): UseAnalysisUIStateResult;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Optimized hook that only subscribes to field label functionality
|
|
3
|
+
* from CubeMeta context. This prevents re-renders when unrelated
|
|
4
|
+
* contexts (CubeApi, Features) change.
|
|
5
|
+
*
|
|
6
|
+
* Use this instead of useCubeContext() when you only need getFieldLabel.
|
|
7
|
+
*/
|
|
8
|
+
/**
|
|
9
|
+
* Returns a stable reference to the getFieldLabel function.
|
|
10
|
+
* Components using this hook will only re-render when the field label
|
|
11
|
+
* mapping actually changes, not when unrelated API or feature contexts update.
|
|
12
|
+
*
|
|
13
|
+
* @returns Function to get human-readable label for a field name
|
|
14
|
+
* @throws Error if used outside CubeProvider
|
|
15
|
+
*/
|
|
16
|
+
export declare function useCubeFieldLabel(): (fieldName: string) => string;
|