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,61 @@
|
|
|
1
|
+
import { StateCreator } from 'zustand';
|
|
2
|
+
import { AnalysisBuilderStore } from '../analysisBuilderStore.js';
|
|
3
|
+
import { FunnelStepState, FunnelBindingKey, FunnelConfig } from '../../types.js';
|
|
4
|
+
import { ServerFunnelQuery } from '../../types/funnel.js';
|
|
5
|
+
/**
|
|
6
|
+
* Funnel slice state
|
|
7
|
+
*/
|
|
8
|
+
export interface FunnelSliceState {
|
|
9
|
+
/** Selected cube for funnel mode (all steps use this cube) */
|
|
10
|
+
funnelCube: string | null;
|
|
11
|
+
/** Dedicated funnel steps (separate from queryStates) */
|
|
12
|
+
funnelSteps: FunnelStepState[];
|
|
13
|
+
/** Index of currently active funnel step */
|
|
14
|
+
activeFunnelStepIndex: number;
|
|
15
|
+
/** Time dimension for funnel temporal ordering */
|
|
16
|
+
funnelTimeDimension: string | null;
|
|
17
|
+
/** Binding key dimension that links funnel steps together */
|
|
18
|
+
funnelBindingKey: FunnelBindingKey | null;
|
|
19
|
+
/** @deprecated Use funnelSteps[].timeToConvert instead - kept for backward compat */
|
|
20
|
+
stepTimeToConvert: (string | null)[];
|
|
21
|
+
}
|
|
22
|
+
/**
|
|
23
|
+
* Funnel slice actions
|
|
24
|
+
*/
|
|
25
|
+
export interface FunnelSliceActions {
|
|
26
|
+
/** Add a new funnel step */
|
|
27
|
+
addFunnelStep: () => void;
|
|
28
|
+
/** Remove a funnel step by index */
|
|
29
|
+
removeFunnelStep: (index: number) => void;
|
|
30
|
+
/** Update a funnel step by index */
|
|
31
|
+
updateFunnelStep: (index: number, updates: Partial<FunnelStepState>) => void;
|
|
32
|
+
/** Set the active funnel step index */
|
|
33
|
+
setActiveFunnelStepIndex: (index: number) => void;
|
|
34
|
+
/** Reorder funnel steps */
|
|
35
|
+
reorderFunnelSteps: (fromIndex: number, toIndex: number) => void;
|
|
36
|
+
/** Set the time dimension for funnel */
|
|
37
|
+
setFunnelTimeDimension: (dimension: string | null) => void;
|
|
38
|
+
/** Set the funnel binding key */
|
|
39
|
+
setFunnelBindingKey: (bindingKey: FunnelBindingKey | null) => void;
|
|
40
|
+
/** Set the funnel cube (clears binding key/time dimension, updates all steps) */
|
|
41
|
+
setFunnelCube: (cube: string | null) => void;
|
|
42
|
+
/** @deprecated No-op - use updateFunnelStep with timeToConvert instead */
|
|
43
|
+
setStepTimeToConvert: (stepIndex: number, duration: string | null) => void;
|
|
44
|
+
/** @deprecated Always returns null - use buildFunnelQueryFromSteps instead */
|
|
45
|
+
buildFunnelConfig: () => FunnelConfig | null;
|
|
46
|
+
/** Build ServerFunnelQuery from dedicated funnelSteps */
|
|
47
|
+
buildFunnelQueryFromSteps: () => ServerFunnelQuery | null;
|
|
48
|
+
/** Check if in funnel mode (analysisType === 'funnel') */
|
|
49
|
+
isFunnelMode: () => boolean;
|
|
50
|
+
/** Check if funnel mode is properly configured and ready for execution */
|
|
51
|
+
isFunnelModeEnabled: () => boolean;
|
|
52
|
+
}
|
|
53
|
+
export type FunnelSlice = FunnelSliceState & FunnelSliceActions;
|
|
54
|
+
export declare const createInitialFunnelState: () => FunnelSliceState;
|
|
55
|
+
/**
|
|
56
|
+
* Create the funnel slice.
|
|
57
|
+
* Uses StateCreator pattern for composability.
|
|
58
|
+
*/
|
|
59
|
+
export declare const createFunnelSlice: StateCreator<AnalysisBuilderStore, [
|
|
60
|
+
], [
|
|
61
|
+
], FunnelSlice>;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Slices Barrel Export
|
|
3
|
+
*
|
|
4
|
+
* Exports all slice types, state creators, and action types for use in
|
|
5
|
+
* the main store composition.
|
|
6
|
+
*/
|
|
7
|
+
export { createCoreSlice, createInitialCoreState, type CoreSlice, type CoreSliceState, type CoreSliceActions, } from './coreSlice.js';
|
|
8
|
+
export { createQuerySlice, createInitialQueryState, type QuerySlice, type QuerySliceState, type QuerySliceActions, } from './querySlice.js';
|
|
9
|
+
export { createFunnelSlice, createInitialFunnelState, type FunnelSlice, type FunnelSliceState, type FunnelSliceActions, } from './funnelSlice.js';
|
|
10
|
+
export { createFlowSlice, createInitialFlowState, type FlowSlice, type FlowSliceState, type FlowSliceActions, } from './flowSlice.js';
|
|
11
|
+
export { createRetentionSlice, createInitialRetentionState, type RetentionSlice, type RetentionSliceActions, } from './retentionSlice.js';
|
|
12
|
+
export type { RetentionSliceState } from '../../types/retention.js';
|
|
13
|
+
export { createUISlice, createInitialUIState, type UISlice, type UISliceState, type UISliceActions, type FieldModalMode, } from './uiSlice.js';
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import { StateCreator } from 'zustand';
|
|
2
|
+
import { AnalysisBuilderStore } from '../analysisBuilderStore.js';
|
|
3
|
+
import { Filter, QueryMergeStrategy, CubeQuery, MultiQueryConfig } from '../../types.js';
|
|
4
|
+
import { AnalysisBuilderState } from '../../components/AnalysisBuilder/types.js';
|
|
5
|
+
/**
|
|
6
|
+
* Query slice state
|
|
7
|
+
*/
|
|
8
|
+
export interface QuerySliceState {
|
|
9
|
+
/** Array of query states (one per tab) */
|
|
10
|
+
queryStates: AnalysisBuilderState[];
|
|
11
|
+
/** Index of the currently active query tab */
|
|
12
|
+
activeQueryIndex: number;
|
|
13
|
+
/** Strategy for merging multi-query results */
|
|
14
|
+
mergeStrategy: QueryMergeStrategy;
|
|
15
|
+
}
|
|
16
|
+
/**
|
|
17
|
+
* Query slice actions
|
|
18
|
+
*/
|
|
19
|
+
export interface QuerySliceActions {
|
|
20
|
+
setQueryStates: (states: AnalysisBuilderState[]) => void;
|
|
21
|
+
updateQueryState: (index: number, updater: (state: AnalysisBuilderState) => AnalysisBuilderState) => void;
|
|
22
|
+
setActiveQueryIndex: (index: number) => void;
|
|
23
|
+
setMergeStrategy: (strategy: QueryMergeStrategy) => void;
|
|
24
|
+
addQuery: () => void;
|
|
25
|
+
removeQuery: (index: number) => void;
|
|
26
|
+
addMetric: (field: string, label?: string) => void;
|
|
27
|
+
removeMetric: (id: string) => void;
|
|
28
|
+
toggleMetric: (fieldName: string) => void;
|
|
29
|
+
reorderMetrics: (fromIndex: number, toIndex: number) => void;
|
|
30
|
+
addBreakdown: (field: string, isTimeDimension: boolean, granularity?: string) => void;
|
|
31
|
+
removeBreakdown: (id: string) => void;
|
|
32
|
+
toggleBreakdown: (fieldName: string, isTimeDimension: boolean, granularity?: string) => void;
|
|
33
|
+
setBreakdownGranularity: (id: string, granularity: string) => void;
|
|
34
|
+
toggleBreakdownComparison: (id: string) => void;
|
|
35
|
+
reorderBreakdowns: (fromIndex: number, toIndex: number) => void;
|
|
36
|
+
setFilters: (filters: Filter[]) => void;
|
|
37
|
+
dropFieldToFilter: (field: string) => void;
|
|
38
|
+
setOrder: (fieldName: string, direction: 'asc' | 'desc' | null) => void;
|
|
39
|
+
setLimit: (limit: number | undefined) => void;
|
|
40
|
+
getCurrentState: () => AnalysisBuilderState;
|
|
41
|
+
getMergeKeys: () => string[] | undefined;
|
|
42
|
+
isMultiQueryMode: () => boolean;
|
|
43
|
+
buildCurrentQuery: () => CubeQuery;
|
|
44
|
+
buildAllQueries: () => CubeQuery[];
|
|
45
|
+
buildMultiQueryConfig: () => MultiQueryConfig | null;
|
|
46
|
+
}
|
|
47
|
+
export type QuerySlice = QuerySliceState & QuerySliceActions;
|
|
48
|
+
export declare const createInitialQueryState: () => QuerySliceState;
|
|
49
|
+
/**
|
|
50
|
+
* Create the query slice.
|
|
51
|
+
* Uses StateCreator pattern for composability.
|
|
52
|
+
*/
|
|
53
|
+
export declare const createQuerySlice: StateCreator<AnalysisBuilderStore, [
|
|
54
|
+
], [
|
|
55
|
+
], QuerySlice>;
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
import { StateCreator } from 'zustand';
|
|
2
|
+
import { AnalysisBuilderStore } from '../analysisBuilderStore.js';
|
|
3
|
+
import { Filter, FunnelBindingKey } from '../../types.js';
|
|
4
|
+
import { ServerRetentionQuery, RetentionSliceState, RetentionGranularity, RetentionType, DateRange, RetentionBreakdownItem } from '../../types/retention.js';
|
|
5
|
+
/**
|
|
6
|
+
* Retention slice actions
|
|
7
|
+
*/
|
|
8
|
+
export interface RetentionSliceActions {
|
|
9
|
+
/** Set the single cube for retention analysis (clears related fields) */
|
|
10
|
+
setRetentionCube: (cube: string | null) => void;
|
|
11
|
+
/** Set the retention binding key */
|
|
12
|
+
setRetentionBindingKey: (key: FunnelBindingKey | null) => void;
|
|
13
|
+
/** Set the single timestamp dimension */
|
|
14
|
+
setRetentionTimeDimension: (dim: string | null) => void;
|
|
15
|
+
/** Set the date range (REQUIRED) */
|
|
16
|
+
setRetentionDateRange: (range: DateRange) => void;
|
|
17
|
+
/** Set all cohort filters at once */
|
|
18
|
+
setRetentionCohortFilters: (filters: Filter[]) => void;
|
|
19
|
+
/** Add a cohort filter */
|
|
20
|
+
addRetentionCohortFilter: (filter: Filter) => void;
|
|
21
|
+
/** Remove a cohort filter by index */
|
|
22
|
+
removeRetentionCohortFilter: (index: number) => void;
|
|
23
|
+
/** Update a cohort filter by index */
|
|
24
|
+
updateRetentionCohortFilter: (index: number, filter: Filter) => void;
|
|
25
|
+
/** Set all activity filters at once */
|
|
26
|
+
setRetentionActivityFilters: (filters: Filter[]) => void;
|
|
27
|
+
/** Add an activity filter */
|
|
28
|
+
addRetentionActivityFilter: (filter: Filter) => void;
|
|
29
|
+
/** Remove an activity filter by index */
|
|
30
|
+
removeRetentionActivityFilter: (index: number) => void;
|
|
31
|
+
/** Update an activity filter by index */
|
|
32
|
+
updateRetentionActivityFilter: (index: number, filter: Filter) => void;
|
|
33
|
+
/** Set all breakdown dimensions */
|
|
34
|
+
setRetentionBreakdowns: (breakdowns: RetentionBreakdownItem[]) => void;
|
|
35
|
+
/** Add a breakdown dimension */
|
|
36
|
+
addRetentionBreakdown: (breakdown: RetentionBreakdownItem) => void;
|
|
37
|
+
/** Remove a breakdown dimension by field */
|
|
38
|
+
removeRetentionBreakdown: (field: string) => void;
|
|
39
|
+
/** Set the view granularity */
|
|
40
|
+
setRetentionViewGranularity: (granularity: RetentionGranularity) => void;
|
|
41
|
+
/** Set the number of periods */
|
|
42
|
+
setRetentionPeriods: (periods: number) => void;
|
|
43
|
+
/** Set the retention type */
|
|
44
|
+
setRetentionType: (type: RetentionType) => void;
|
|
45
|
+
/** Check if in retention mode (analysisType === 'retention') */
|
|
46
|
+
isRetentionMode: () => boolean;
|
|
47
|
+
/** Check if retention mode is properly configured and ready for execution */
|
|
48
|
+
isRetentionModeEnabled: () => boolean;
|
|
49
|
+
/** Build ServerRetentionQuery from retention state */
|
|
50
|
+
buildRetentionQuery: () => ServerRetentionQuery | null;
|
|
51
|
+
/** Get validation errors explaining why retention query cannot be built */
|
|
52
|
+
getRetentionValidation: () => {
|
|
53
|
+
isValid: boolean;
|
|
54
|
+
errors: string[];
|
|
55
|
+
warnings: string[];
|
|
56
|
+
};
|
|
57
|
+
}
|
|
58
|
+
export type RetentionSlice = RetentionSliceState & RetentionSliceActions;
|
|
59
|
+
export declare const createInitialRetentionState: () => RetentionSliceState;
|
|
60
|
+
/**
|
|
61
|
+
* Create the retention slice.
|
|
62
|
+
* Uses StateCreator pattern for composability.
|
|
63
|
+
*/
|
|
64
|
+
export declare const createRetentionSlice: StateCreator<AnalysisBuilderStore, [
|
|
65
|
+
], [
|
|
66
|
+
], RetentionSlice>;
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import { StateCreator } from 'zustand';
|
|
2
|
+
import { AnalysisBuilderStore } from '../analysisBuilderStore.js';
|
|
3
|
+
import { QueryPanelTab, AIState } from '../../components/AnalysisBuilder/types.js';
|
|
4
|
+
/**
|
|
5
|
+
* Field modal mode for field search
|
|
6
|
+
*/
|
|
7
|
+
export type FieldModalMode = 'metrics' | 'breakdown';
|
|
8
|
+
/**
|
|
9
|
+
* UI slice state
|
|
10
|
+
*/
|
|
11
|
+
export interface UISliceState {
|
|
12
|
+
/** Active tab in query panel */
|
|
13
|
+
activeTab: QueryPanelTab;
|
|
14
|
+
/** Active view (table or chart) */
|
|
15
|
+
activeView: 'table' | 'chart';
|
|
16
|
+
/** Display limit for table */
|
|
17
|
+
displayLimit: number;
|
|
18
|
+
/** Whether field search modal is open */
|
|
19
|
+
showFieldModal: boolean;
|
|
20
|
+
/** Current mode for field search modal */
|
|
21
|
+
fieldModalMode: FieldModalMode;
|
|
22
|
+
/** AI panel state */
|
|
23
|
+
aiState: AIState;
|
|
24
|
+
}
|
|
25
|
+
/**
|
|
26
|
+
* UI slice actions
|
|
27
|
+
*/
|
|
28
|
+
export interface UISliceActions {
|
|
29
|
+
setActiveTab: (tab: QueryPanelTab) => void;
|
|
30
|
+
setActiveView: (view: 'table' | 'chart') => void;
|
|
31
|
+
setDisplayLimit: (limit: number) => void;
|
|
32
|
+
openMetricsModal: () => void;
|
|
33
|
+
openBreakdownsModal: () => void;
|
|
34
|
+
closeFieldModal: () => void;
|
|
35
|
+
openAI: () => void;
|
|
36
|
+
closeAI: () => void;
|
|
37
|
+
setAIPrompt: (prompt: string) => void;
|
|
38
|
+
setAIGenerating: (generating: boolean) => void;
|
|
39
|
+
setAIError: (error: string | null) => void;
|
|
40
|
+
setAIHasGeneratedQuery: (hasQuery: boolean) => void;
|
|
41
|
+
saveAIPreviousState: () => void;
|
|
42
|
+
restoreAIPreviousState: () => void;
|
|
43
|
+
}
|
|
44
|
+
export type UISlice = UISliceState & UISliceActions;
|
|
45
|
+
export declare const createInitialUIState: () => UISliceState;
|
|
46
|
+
/**
|
|
47
|
+
* Create the UI slice.
|
|
48
|
+
* Uses StateCreator pattern for composability.
|
|
49
|
+
*/
|
|
50
|
+
export declare const createUISlice: StateCreator<AnalysisBuilderStore, [
|
|
51
|
+
], [
|
|
52
|
+
], UISlice>;
|
|
@@ -0,0 +1,135 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Theme utilities and TypeScript types for drizzle-cube theming system
|
|
3
|
+
*/
|
|
4
|
+
/**
|
|
5
|
+
* Semantic color tokens used throughout drizzle-cube components
|
|
6
|
+
*/
|
|
7
|
+
export interface ThemeColorTokens {
|
|
8
|
+
surface: string;
|
|
9
|
+
surfaceSecondary: string;
|
|
10
|
+
surfaceTertiary: string;
|
|
11
|
+
surfaceHover: string;
|
|
12
|
+
text: string;
|
|
13
|
+
textSecondary: string;
|
|
14
|
+
textMuted: string;
|
|
15
|
+
textDisabled: string;
|
|
16
|
+
border: string;
|
|
17
|
+
borderSecondary: string;
|
|
18
|
+
borderHover: string;
|
|
19
|
+
primary: string;
|
|
20
|
+
primaryHover: string;
|
|
21
|
+
primaryContent: string;
|
|
22
|
+
success: string;
|
|
23
|
+
successBg: string;
|
|
24
|
+
successBorder: string;
|
|
25
|
+
warning: string;
|
|
26
|
+
warningBg: string;
|
|
27
|
+
warningBorder: string;
|
|
28
|
+
error: string;
|
|
29
|
+
errorBg: string;
|
|
30
|
+
errorBorder: string;
|
|
31
|
+
info: string;
|
|
32
|
+
infoBg: string;
|
|
33
|
+
infoBorder: string;
|
|
34
|
+
danger: string;
|
|
35
|
+
dangerHover: string;
|
|
36
|
+
dangerBg: string;
|
|
37
|
+
overlay: string;
|
|
38
|
+
overlayLight: string;
|
|
39
|
+
}
|
|
40
|
+
/**
|
|
41
|
+
* Theme configuration interface
|
|
42
|
+
*/
|
|
43
|
+
export interface ThemeConfig {
|
|
44
|
+
name: string;
|
|
45
|
+
colors: Partial<ThemeColorTokens>;
|
|
46
|
+
}
|
|
47
|
+
/**
|
|
48
|
+
* Get the current value of a theme CSS variable
|
|
49
|
+
*/
|
|
50
|
+
export declare function getThemeVariable(variableName: string): string;
|
|
51
|
+
/**
|
|
52
|
+
* Set a theme CSS variable
|
|
53
|
+
*/
|
|
54
|
+
export declare function setThemeVariable(variableName: string, value: string): void;
|
|
55
|
+
/**
|
|
56
|
+
* Apply a complete theme configuration
|
|
57
|
+
*/
|
|
58
|
+
export declare function applyTheme(theme: ThemeConfig): void;
|
|
59
|
+
/**
|
|
60
|
+
* Reset theme to defaults by removing custom properties
|
|
61
|
+
*/
|
|
62
|
+
export declare function resetTheme(): void;
|
|
63
|
+
/**
|
|
64
|
+
* Theme type definition
|
|
65
|
+
*/
|
|
66
|
+
export type Theme = 'light' | 'dark' | 'neon';
|
|
67
|
+
/**
|
|
68
|
+
* Get the current theme
|
|
69
|
+
*/
|
|
70
|
+
export declare function getTheme(): Theme;
|
|
71
|
+
/**
|
|
72
|
+
* Set the theme
|
|
73
|
+
*/
|
|
74
|
+
export declare function setTheme(theme: Theme): void;
|
|
75
|
+
/**
|
|
76
|
+
* Detect if dark mode is currently active (backwards compatibility)
|
|
77
|
+
* @deprecated Use getTheme() instead
|
|
78
|
+
*/
|
|
79
|
+
export declare function isDarkMode(): boolean;
|
|
80
|
+
/**
|
|
81
|
+
* Watch for theme changes
|
|
82
|
+
*/
|
|
83
|
+
export declare function watchThemeChanges(callback: (theme: Theme) => void): () => void;
|
|
84
|
+
/**
|
|
85
|
+
* Example theme configurations
|
|
86
|
+
*/
|
|
87
|
+
export declare const THEME_PRESETS: {
|
|
88
|
+
readonly light: {
|
|
89
|
+
readonly name: "light";
|
|
90
|
+
readonly colors: {
|
|
91
|
+
readonly surface: "#ffffff";
|
|
92
|
+
readonly surfaceSecondary: "#f9fafb";
|
|
93
|
+
readonly text: "#111827";
|
|
94
|
+
readonly textSecondary: "#374151";
|
|
95
|
+
readonly textMuted: "#6b7280";
|
|
96
|
+
readonly border: "#e5e7eb";
|
|
97
|
+
readonly primary: "#3b82f6";
|
|
98
|
+
readonly primaryHover: "#2563eb";
|
|
99
|
+
};
|
|
100
|
+
};
|
|
101
|
+
readonly dark: {
|
|
102
|
+
readonly name: "dark";
|
|
103
|
+
readonly colors: {
|
|
104
|
+
readonly surface: "#1e293b";
|
|
105
|
+
readonly surfaceSecondary: "#334155";
|
|
106
|
+
readonly text: "#f1f5f9";
|
|
107
|
+
readonly textSecondary: "#e2e8f0";
|
|
108
|
+
readonly textMuted: "#cbd5e1";
|
|
109
|
+
readonly border: "#475569";
|
|
110
|
+
readonly primary: "#60a5fa";
|
|
111
|
+
readonly primaryHover: "#3b82f6";
|
|
112
|
+
};
|
|
113
|
+
};
|
|
114
|
+
readonly neon: {
|
|
115
|
+
readonly name: "neon";
|
|
116
|
+
readonly colors: {
|
|
117
|
+
readonly surface: "#0a0118";
|
|
118
|
+
readonly surfaceSecondary: "#1a0f2e";
|
|
119
|
+
readonly surfaceTertiary: "#2a1f3e";
|
|
120
|
+
readonly text: "#ffffff";
|
|
121
|
+
readonly textSecondary: "#e0e0ff";
|
|
122
|
+
readonly textMuted: "#b0b0d0";
|
|
123
|
+
readonly border: "#ff00ff";
|
|
124
|
+
readonly borderSecondary: "#00ffff";
|
|
125
|
+
readonly primary: "#00ffff";
|
|
126
|
+
readonly primaryHover: "#00cccc";
|
|
127
|
+
readonly primaryContent: "#000000";
|
|
128
|
+
readonly success: "#00ff00";
|
|
129
|
+
readonly warning: "#ffff00";
|
|
130
|
+
readonly error: "#ff0066";
|
|
131
|
+
readonly info: "#00ffff";
|
|
132
|
+
readonly danger: "#ff1493";
|
|
133
|
+
};
|
|
134
|
+
};
|
|
135
|
+
};
|
|
@@ -0,0 +1,185 @@
|
|
|
1
|
+
import { ChartType, ChartAxisConfig, ChartDisplayConfig, CubeQuery, MultiQueryConfig } from '../types.js';
|
|
2
|
+
import { ServerFunnelQuery } from './funnel.js';
|
|
3
|
+
import { ServerFlowQuery } from './flow.js';
|
|
4
|
+
import { ServerRetentionQuery } from './retention.js';
|
|
5
|
+
/**
|
|
6
|
+
* Chart configuration - shared across all analysis types
|
|
7
|
+
*/
|
|
8
|
+
export interface ChartConfig {
|
|
9
|
+
chartType: ChartType;
|
|
10
|
+
chartConfig: ChartAxisConfig;
|
|
11
|
+
displayConfig: ChartDisplayConfig;
|
|
12
|
+
}
|
|
13
|
+
/**
|
|
14
|
+
* Analysis type discriminator
|
|
15
|
+
* Future modes: 'cohort'
|
|
16
|
+
*/
|
|
17
|
+
export type AnalysisType = 'query' | 'funnel' | 'flow' | 'retention';
|
|
18
|
+
/**
|
|
19
|
+
* Base config - common to all analysis types
|
|
20
|
+
*/
|
|
21
|
+
interface AnalysisConfigBase {
|
|
22
|
+
/** Version number for migration support */
|
|
23
|
+
version: 1;
|
|
24
|
+
/** Which analysis mode this config represents */
|
|
25
|
+
analysisType: AnalysisType;
|
|
26
|
+
/** Whether to show table or chart view */
|
|
27
|
+
activeView: 'table' | 'chart';
|
|
28
|
+
/**
|
|
29
|
+
* Per-mode chart configuration map.
|
|
30
|
+
* Each mode owns its own chart settings, allowing users to configure
|
|
31
|
+
* different chart types for query mode vs funnel mode.
|
|
32
|
+
*/
|
|
33
|
+
charts: {
|
|
34
|
+
[K in AnalysisType]?: ChartConfig;
|
|
35
|
+
};
|
|
36
|
+
}
|
|
37
|
+
/**
|
|
38
|
+
* Query mode config - for single queries and multi-query analysis
|
|
39
|
+
*
|
|
40
|
+
* The `query` field is the actual executable query:
|
|
41
|
+
* - Single query: CubeQuery object
|
|
42
|
+
* - Multi-query: MultiQueryConfig with queries array and merge strategy
|
|
43
|
+
*/
|
|
44
|
+
export interface QueryAnalysisConfig extends AnalysisConfigBase {
|
|
45
|
+
analysisType: 'query';
|
|
46
|
+
/**
|
|
47
|
+
* The executable query.
|
|
48
|
+
* - CubeQuery: Single query with measures, dimensions, filters
|
|
49
|
+
* - MultiQueryConfig: Multiple queries with merge strategy
|
|
50
|
+
*/
|
|
51
|
+
query: CubeQuery | MultiQueryConfig;
|
|
52
|
+
}
|
|
53
|
+
/**
|
|
54
|
+
* Funnel mode config - for funnel analysis
|
|
55
|
+
*
|
|
56
|
+
* The `query` field is the ServerFunnelQuery which can be sent
|
|
57
|
+
* directly to the server for execution.
|
|
58
|
+
*/
|
|
59
|
+
export interface FunnelAnalysisConfig extends AnalysisConfigBase {
|
|
60
|
+
analysisType: 'funnel';
|
|
61
|
+
/**
|
|
62
|
+
* Server funnel query - executable as-is.
|
|
63
|
+
* Contains bindingKey, timeDimension, steps[], and options.
|
|
64
|
+
*/
|
|
65
|
+
query: ServerFunnelQuery;
|
|
66
|
+
}
|
|
67
|
+
/**
|
|
68
|
+
* Flow mode config - for bidirectional flow analysis
|
|
69
|
+
*
|
|
70
|
+
* The `query` field is the ServerFlowQuery which can be sent
|
|
71
|
+
* directly to the server for execution.
|
|
72
|
+
*/
|
|
73
|
+
export interface FlowAnalysisConfig extends AnalysisConfigBase {
|
|
74
|
+
analysisType: 'flow';
|
|
75
|
+
/**
|
|
76
|
+
* Server flow query - executable as-is.
|
|
77
|
+
* Contains bindingKey, timeDimension, eventDimension, startingStep, and depth config.
|
|
78
|
+
*/
|
|
79
|
+
query: ServerFlowQuery;
|
|
80
|
+
}
|
|
81
|
+
/**
|
|
82
|
+
* Retention mode config - for cohort-based retention analysis
|
|
83
|
+
*
|
|
84
|
+
* The `query` field is the ServerRetentionQuery which can be sent
|
|
85
|
+
* directly to the server for execution.
|
|
86
|
+
*/
|
|
87
|
+
export interface RetentionAnalysisConfig extends AnalysisConfigBase {
|
|
88
|
+
analysisType: 'retention';
|
|
89
|
+
/**
|
|
90
|
+
* Server retention query - executable as-is.
|
|
91
|
+
* Contains cohortTimeDimension, activityTimeDimension, bindingKey,
|
|
92
|
+
* granularity settings, and period configuration.
|
|
93
|
+
*/
|
|
94
|
+
query: ServerRetentionQuery;
|
|
95
|
+
}
|
|
96
|
+
/**
|
|
97
|
+
* AnalysisConfig - union of all analysis mode configurations
|
|
98
|
+
*/
|
|
99
|
+
export type AnalysisConfig = QueryAnalysisConfig | FunnelAnalysisConfig | FlowAnalysisConfig | RetentionAnalysisConfig;
|
|
100
|
+
/**
|
|
101
|
+
* Check if config is for query mode
|
|
102
|
+
*/
|
|
103
|
+
export declare const isQueryConfig: (c: AnalysisConfig) => c is QueryAnalysisConfig;
|
|
104
|
+
/**
|
|
105
|
+
* Check if config is for funnel mode
|
|
106
|
+
*/
|
|
107
|
+
export declare const isFunnelConfig: (c: AnalysisConfig) => c is FunnelAnalysisConfig;
|
|
108
|
+
/**
|
|
109
|
+
* Check if config is for flow mode
|
|
110
|
+
*/
|
|
111
|
+
export declare const isFlowConfig: (c: AnalysisConfig) => c is FlowAnalysisConfig;
|
|
112
|
+
/**
|
|
113
|
+
* Check if config is for retention mode
|
|
114
|
+
*/
|
|
115
|
+
export declare const isRetentionConfig: (c: AnalysisConfig) => c is RetentionAnalysisConfig;
|
|
116
|
+
/**
|
|
117
|
+
* Check if a query config contains multiple queries
|
|
118
|
+
*/
|
|
119
|
+
export declare const isMultiQuery: (config: QueryAnalysisConfig) => boolean;
|
|
120
|
+
/**
|
|
121
|
+
* Check if a query config contains a single query
|
|
122
|
+
*/
|
|
123
|
+
export declare const isSingleQuery: (config: QueryAnalysisConfig) => boolean;
|
|
124
|
+
/**
|
|
125
|
+
* Type guard to validate if an unknown value is a valid AnalysisConfig
|
|
126
|
+
*/
|
|
127
|
+
export declare const isValidAnalysisConfig: (config: unknown) => config is AnalysisConfig;
|
|
128
|
+
/**
|
|
129
|
+
* Create a default empty query analysis config
|
|
130
|
+
*/
|
|
131
|
+
export declare const createDefaultQueryConfig: () => QueryAnalysisConfig;
|
|
132
|
+
/**
|
|
133
|
+
* Create a default empty funnel analysis config
|
|
134
|
+
*/
|
|
135
|
+
export declare const createDefaultFunnelConfig: () => FunnelAnalysisConfig;
|
|
136
|
+
/**
|
|
137
|
+
* Create a default empty flow analysis config
|
|
138
|
+
*/
|
|
139
|
+
export declare const createDefaultFlowConfig: () => FlowAnalysisConfig;
|
|
140
|
+
/**
|
|
141
|
+
* Create a default empty retention analysis config
|
|
142
|
+
*/
|
|
143
|
+
export declare const createDefaultRetentionConfig: () => RetentionAnalysisConfig;
|
|
144
|
+
/**
|
|
145
|
+
* Create a default config for the given analysis type
|
|
146
|
+
*/
|
|
147
|
+
export declare const createDefaultConfig: (type?: AnalysisType) => AnalysisConfig;
|
|
148
|
+
/**
|
|
149
|
+
* AnalysisWorkspace - Multi-mode persistence format for localStorage
|
|
150
|
+
*
|
|
151
|
+
* Unlike AnalysisConfig (which represents a single analysis mode),
|
|
152
|
+
* AnalysisWorkspace preserves state for ALL modes. This prevents state
|
|
153
|
+
* loss when switching between query, funnel, flow, and retention modes.
|
|
154
|
+
*
|
|
155
|
+
* Usage:
|
|
156
|
+
* - localStorage persistence → AnalysisWorkspace (preserves all modes)
|
|
157
|
+
* - Share URLs → AnalysisConfig (shares one specific analysis)
|
|
158
|
+
* - Dashboard portlets → AnalysisConfig (embeds one specific analysis)
|
|
159
|
+
*/
|
|
160
|
+
export interface AnalysisWorkspace {
|
|
161
|
+
/** Version number for migration support */
|
|
162
|
+
version: 1;
|
|
163
|
+
/** Currently active analysis type */
|
|
164
|
+
activeType: AnalysisType;
|
|
165
|
+
/**
|
|
166
|
+
* Per-mode configurations.
|
|
167
|
+
* Each mode stores its complete AnalysisConfig independently.
|
|
168
|
+
* Charts are duplicated per-mode but merged on load.
|
|
169
|
+
*/
|
|
170
|
+
modes: {
|
|
171
|
+
query?: QueryAnalysisConfig;
|
|
172
|
+
funnel?: FunnelAnalysisConfig;
|
|
173
|
+
flow?: FlowAnalysisConfig;
|
|
174
|
+
retention?: RetentionAnalysisConfig;
|
|
175
|
+
};
|
|
176
|
+
}
|
|
177
|
+
/**
|
|
178
|
+
* Type guard to validate if an unknown value is a valid AnalysisWorkspace
|
|
179
|
+
*/
|
|
180
|
+
export declare const isValidAnalysisWorkspace: (data: unknown) => data is AnalysisWorkspace;
|
|
181
|
+
/**
|
|
182
|
+
* Create a default empty workspace with all modes initialized
|
|
183
|
+
*/
|
|
184
|
+
export declare const createDefaultWorkspace: () => AnalysisWorkspace;
|
|
185
|
+
export {};
|