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,292 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
import { StoreApi } from 'zustand';
|
|
3
|
+
import { LayoutItem } from 'react-grid-layout';
|
|
4
|
+
import { PortletConfig, RowLayout, ChartType, ChartAxisConfig, ChartDisplayConfig, CubeQuery } from '../types.js';
|
|
5
|
+
import { FlowChartData } from '../types/flow.js';
|
|
6
|
+
import { RetentionChartData } from '../types/retention.js';
|
|
7
|
+
/**
|
|
8
|
+
* Debug data entry for a portlet (used by chart inspector)
|
|
9
|
+
*/
|
|
10
|
+
export interface PortletDebugDataEntry {
|
|
11
|
+
chartConfig: ChartAxisConfig;
|
|
12
|
+
displayConfig: ChartDisplayConfig;
|
|
13
|
+
queryObject: CubeQuery | null;
|
|
14
|
+
data: unknown[] | FlowChartData | RetentionChartData;
|
|
15
|
+
chartType: ChartType;
|
|
16
|
+
cacheInfo?: {
|
|
17
|
+
hit: boolean;
|
|
18
|
+
cachedAt: string;
|
|
19
|
+
ttlMs: number;
|
|
20
|
+
ttlRemainingMs: number;
|
|
21
|
+
} | null;
|
|
22
|
+
}
|
|
23
|
+
/**
|
|
24
|
+
* @deprecated Use PortletDebugDataEntry instead. Kept for backward compatibility.
|
|
25
|
+
*/
|
|
26
|
+
export type DebugDataEntry = PortletDebugDataEntry;
|
|
27
|
+
/**
|
|
28
|
+
* Drag state for row-based layout
|
|
29
|
+
*/
|
|
30
|
+
export interface DragState {
|
|
31
|
+
rowIndex: number;
|
|
32
|
+
colIndex: number;
|
|
33
|
+
portletId: string;
|
|
34
|
+
}
|
|
35
|
+
/**
|
|
36
|
+
* Complete store state interface
|
|
37
|
+
*/
|
|
38
|
+
export interface DashboardStoreState {
|
|
39
|
+
/** Whether dashboard is in edit mode */
|
|
40
|
+
isEditMode: boolean;
|
|
41
|
+
/** Currently selected filter ID for filter-assignment mode */
|
|
42
|
+
selectedFilterId: string | null;
|
|
43
|
+
/** Whether portlet edit modal is open */
|
|
44
|
+
isPortletModalOpen: boolean;
|
|
45
|
+
/** Portlet being edited (null = adding new) */
|
|
46
|
+
editingPortlet: PortletConfig | null;
|
|
47
|
+
/** Whether filter config modal is open */
|
|
48
|
+
isFilterConfigModalOpen: boolean;
|
|
49
|
+
/** Portlet for filter configuration */
|
|
50
|
+
filterConfigPortlet: PortletConfig | null;
|
|
51
|
+
/** Portlet ID pending delete confirmation (null = no confirmation active) */
|
|
52
|
+
deleteConfirmPortletId: string | null;
|
|
53
|
+
/** Whether text portlet modal is open */
|
|
54
|
+
isTextModalOpen: boolean;
|
|
55
|
+
/** Portlet being edited in text modal (null = adding new) */
|
|
56
|
+
editingTextPortlet: PortletConfig | null;
|
|
57
|
+
/** Draft row layout during drag operations (rows mode) */
|
|
58
|
+
draftRows: RowLayout[] | null;
|
|
59
|
+
/** Whether a portlet is currently being dragged */
|
|
60
|
+
isDraggingPortlet: boolean;
|
|
61
|
+
/** Last known layout for change detection */
|
|
62
|
+
lastKnownLayout: LayoutItem[];
|
|
63
|
+
/** Whether component has been initialized (prevents saves during load) */
|
|
64
|
+
isInitialized: boolean;
|
|
65
|
+
/** Current drag state for row-based layout */
|
|
66
|
+
dragState: DragState | null;
|
|
67
|
+
/** Debug data keyed by portlet ID (for chart inspector) */
|
|
68
|
+
debugData: Record<string, DebugDataEntry>;
|
|
69
|
+
/** Whether the dashboard has been modified and needs a new thumbnail */
|
|
70
|
+
thumbnailDirty: boolean;
|
|
71
|
+
}
|
|
72
|
+
/**
|
|
73
|
+
* Store actions interface
|
|
74
|
+
*/
|
|
75
|
+
export interface DashboardStoreActions {
|
|
76
|
+
/** Set edit mode */
|
|
77
|
+
setEditMode: (isEdit: boolean) => void;
|
|
78
|
+
/** Toggle edit mode */
|
|
79
|
+
toggleEditMode: () => void;
|
|
80
|
+
/** Set selected filter ID for filter selection mode */
|
|
81
|
+
setSelectedFilterId: (filterId: string | null) => void;
|
|
82
|
+
/** Exit filter selection mode */
|
|
83
|
+
exitFilterSelectionMode: () => void;
|
|
84
|
+
/** Open portlet modal (optionally with a portlet to edit) */
|
|
85
|
+
openPortletModal: (portlet?: PortletConfig | null) => void;
|
|
86
|
+
/** Close portlet modal */
|
|
87
|
+
closePortletModal: () => void;
|
|
88
|
+
/** Open filter config modal for a portlet */
|
|
89
|
+
openFilterConfigModal: (portlet: PortletConfig) => void;
|
|
90
|
+
/** Close filter config modal */
|
|
91
|
+
closeFilterConfigModal: () => void;
|
|
92
|
+
/** Open text portlet modal (optionally with a portlet to edit) */
|
|
93
|
+
openTextModal: (portlet?: PortletConfig | null) => void;
|
|
94
|
+
/** Close text portlet modal */
|
|
95
|
+
closeTextModal: () => void;
|
|
96
|
+
/** Open delete confirmation for a portlet */
|
|
97
|
+
openDeleteConfirm: (portletId: string) => void;
|
|
98
|
+
/** Close delete confirmation */
|
|
99
|
+
closeDeleteConfirm: () => void;
|
|
100
|
+
/** Set draft rows during drag operations */
|
|
101
|
+
setDraftRows: (rows: RowLayout[] | null) => void;
|
|
102
|
+
/** Set whether a portlet is being dragged */
|
|
103
|
+
setIsDraggingPortlet: (isDragging: boolean) => void;
|
|
104
|
+
/** Set last known layout for change detection */
|
|
105
|
+
setLastKnownLayout: (layout: LayoutItem[]) => void;
|
|
106
|
+
/** Set whether component is initialized */
|
|
107
|
+
setIsInitialized: (initialized: boolean) => void;
|
|
108
|
+
/** Set drag state */
|
|
109
|
+
setDragState: (state: DragState | null) => void;
|
|
110
|
+
/** Clear drag state */
|
|
111
|
+
clearDragState: () => void;
|
|
112
|
+
/** Set debug data for a portlet */
|
|
113
|
+
setDebugData: (portletId: string, data: DebugDataEntry) => void;
|
|
114
|
+
/** Clear debug data for a portlet (or all if no portletId) */
|
|
115
|
+
clearDebugData: (portletId?: string) => void;
|
|
116
|
+
/** Set thumbnail dirty state (needs new capture) */
|
|
117
|
+
setThumbnailDirty: (dirty: boolean) => void;
|
|
118
|
+
/** Reset store to initial state */
|
|
119
|
+
reset: () => void;
|
|
120
|
+
}
|
|
121
|
+
/**
|
|
122
|
+
* Combined store type
|
|
123
|
+
*/
|
|
124
|
+
export type DashboardStore = DashboardStoreState & DashboardStoreActions;
|
|
125
|
+
/**
|
|
126
|
+
* Options for creating a store instance
|
|
127
|
+
*/
|
|
128
|
+
export interface CreateDashboardStoreOptions {
|
|
129
|
+
/** Initial edit mode state */
|
|
130
|
+
initialEditMode?: boolean;
|
|
131
|
+
}
|
|
132
|
+
/**
|
|
133
|
+
* Create a new dashboard store instance
|
|
134
|
+
*/
|
|
135
|
+
export declare function createDashboardStore(options?: CreateDashboardStoreOptions): Omit<Omit<StoreApi<DashboardStore>, "setState" | "devtools"> & {
|
|
136
|
+
setState(partial: DashboardStore | Partial<DashboardStore> | ((state: DashboardStore) => DashboardStore | Partial<DashboardStore>), replace?: false | undefined, action?: (string | {
|
|
137
|
+
[x: string]: unknown;
|
|
138
|
+
[x: number]: unknown;
|
|
139
|
+
[x: symbol]: unknown;
|
|
140
|
+
type: string;
|
|
141
|
+
}) | undefined): void;
|
|
142
|
+
setState(state: DashboardStore | ((state: DashboardStore) => DashboardStore), replace: true, action?: (string | {
|
|
143
|
+
[x: string]: unknown;
|
|
144
|
+
[x: number]: unknown;
|
|
145
|
+
[x: symbol]: unknown;
|
|
146
|
+
type: string;
|
|
147
|
+
}) | undefined): void;
|
|
148
|
+
devtools: {
|
|
149
|
+
cleanup: () => void;
|
|
150
|
+
};
|
|
151
|
+
}, "subscribe"> & {
|
|
152
|
+
subscribe: {
|
|
153
|
+
(listener: (selectedState: DashboardStore, previousSelectedState: DashboardStore) => void): () => void;
|
|
154
|
+
<U>(selector: (state: DashboardStore) => U, listener: (selectedState: U, previousSelectedState: U) => void, options?: {
|
|
155
|
+
equalityFn?: ((a: U, b: U) => boolean) | undefined;
|
|
156
|
+
fireImmediately?: boolean;
|
|
157
|
+
} | undefined): () => void;
|
|
158
|
+
};
|
|
159
|
+
};
|
|
160
|
+
/**
|
|
161
|
+
* Provider props
|
|
162
|
+
*/
|
|
163
|
+
export interface DashboardStoreProviderProps {
|
|
164
|
+
children: ReactNode;
|
|
165
|
+
/** Initial edit mode state */
|
|
166
|
+
initialEditMode?: boolean;
|
|
167
|
+
}
|
|
168
|
+
/**
|
|
169
|
+
* Provider component that creates a store instance per Dashboard
|
|
170
|
+
*/
|
|
171
|
+
export declare function DashboardStoreProvider({ children, initialEditMode, }: DashboardStoreProviderProps): import("react").JSX.Element;
|
|
172
|
+
/**
|
|
173
|
+
* Hook to access the store from context
|
|
174
|
+
* @throws Error if used outside of provider
|
|
175
|
+
*/
|
|
176
|
+
export declare function useDashboardStore<T>(selector: (state: DashboardStore) => T): T;
|
|
177
|
+
/**
|
|
178
|
+
* Hook to get the raw store API (for actions that need direct access)
|
|
179
|
+
*/
|
|
180
|
+
export declare function useDashboardStoreApi(): StoreApi<DashboardStore>;
|
|
181
|
+
/**
|
|
182
|
+
* Optional hook that returns null if used outside provider (for optional store access)
|
|
183
|
+
* Uses a fallback store to ensure useStore is always called (React hooks rules compliance)
|
|
184
|
+
*/
|
|
185
|
+
export declare function useDashboardStoreOptional<T>(selector: (state: DashboardStore) => T): T | null;
|
|
186
|
+
/**
|
|
187
|
+
* Select edit mode state
|
|
188
|
+
*/
|
|
189
|
+
export declare const selectEditModeState: (state: DashboardStore) => {
|
|
190
|
+
isEditMode: boolean;
|
|
191
|
+
selectedFilterId: string | null;
|
|
192
|
+
};
|
|
193
|
+
/**
|
|
194
|
+
* Select modal state
|
|
195
|
+
*/
|
|
196
|
+
export declare const selectModalState: (state: DashboardStore) => {
|
|
197
|
+
isPortletModalOpen: boolean;
|
|
198
|
+
editingPortlet: PortletConfig | null;
|
|
199
|
+
isFilterConfigModalOpen: boolean;
|
|
200
|
+
filterConfigPortlet: PortletConfig | null;
|
|
201
|
+
isTextModalOpen: boolean;
|
|
202
|
+
editingTextPortlet: PortletConfig | null;
|
|
203
|
+
};
|
|
204
|
+
/**
|
|
205
|
+
* Select layout state
|
|
206
|
+
*/
|
|
207
|
+
export declare const selectLayoutState: (state: DashboardStore) => {
|
|
208
|
+
draftRows: RowLayout[] | null;
|
|
209
|
+
isDraggingPortlet: boolean;
|
|
210
|
+
lastKnownLayout: LayoutItem[];
|
|
211
|
+
isInitialized: boolean;
|
|
212
|
+
dragState: DragState | null;
|
|
213
|
+
};
|
|
214
|
+
/**
|
|
215
|
+
* Select debug data
|
|
216
|
+
*/
|
|
217
|
+
export declare const selectDebugData: (state: DashboardStore) => Record<string, PortletDebugDataEntry>;
|
|
218
|
+
/**
|
|
219
|
+
* Select debug data for a specific portlet
|
|
220
|
+
*/
|
|
221
|
+
export declare const selectPortletDebugData: (portletId: string) => (state: DashboardStore) => PortletDebugDataEntry;
|
|
222
|
+
/**
|
|
223
|
+
* Select all edit mode actions
|
|
224
|
+
*/
|
|
225
|
+
export declare const selectEditModeActions: (state: DashboardStore) => {
|
|
226
|
+
setEditMode: (isEdit: boolean) => void;
|
|
227
|
+
toggleEditMode: () => void;
|
|
228
|
+
setSelectedFilterId: (filterId: string | null) => void;
|
|
229
|
+
exitFilterSelectionMode: () => void;
|
|
230
|
+
};
|
|
231
|
+
/**
|
|
232
|
+
* Select all modal actions
|
|
233
|
+
*/
|
|
234
|
+
export declare const selectModalActions: (state: DashboardStore) => {
|
|
235
|
+
openPortletModal: (portlet?: PortletConfig | null) => void;
|
|
236
|
+
closePortletModal: () => void;
|
|
237
|
+
openTextModal: (portlet?: PortletConfig | null) => void;
|
|
238
|
+
closeTextModal: () => void;
|
|
239
|
+
openFilterConfigModal: (portlet: PortletConfig) => void;
|
|
240
|
+
closeFilterConfigModal: () => void;
|
|
241
|
+
openDeleteConfirm: (portletId: string) => void;
|
|
242
|
+
closeDeleteConfirm: () => void;
|
|
243
|
+
};
|
|
244
|
+
/**
|
|
245
|
+
* Select all layout actions
|
|
246
|
+
*/
|
|
247
|
+
export declare const selectLayoutActions: (state: DashboardStore) => {
|
|
248
|
+
setDraftRows: (rows: RowLayout[] | null) => void;
|
|
249
|
+
setIsDraggingPortlet: (isDragging: boolean) => void;
|
|
250
|
+
setLastKnownLayout: (layout: LayoutItem[]) => void;
|
|
251
|
+
setIsInitialized: (initialized: boolean) => void;
|
|
252
|
+
setDragState: (state: DragState | null) => void;
|
|
253
|
+
clearDragState: () => void;
|
|
254
|
+
};
|
|
255
|
+
/**
|
|
256
|
+
* Select all debug data actions
|
|
257
|
+
*/
|
|
258
|
+
export declare const selectDebugDataActions: (state: DashboardStore) => {
|
|
259
|
+
setDebugData: (portletId: string, data: DebugDataEntry) => void;
|
|
260
|
+
clearDebugData: (portletId?: string) => void;
|
|
261
|
+
};
|
|
262
|
+
/**
|
|
263
|
+
* Select thumbnail dirty state
|
|
264
|
+
*/
|
|
265
|
+
export declare const selectThumbnailDirty: (state: DashboardStore) => boolean;
|
|
266
|
+
/**
|
|
267
|
+
* Select all actions
|
|
268
|
+
*/
|
|
269
|
+
export declare const selectAllActions: (state: DashboardStore) => {
|
|
270
|
+
setEditMode: (isEdit: boolean) => void;
|
|
271
|
+
toggleEditMode: () => void;
|
|
272
|
+
setSelectedFilterId: (filterId: string | null) => void;
|
|
273
|
+
exitFilterSelectionMode: () => void;
|
|
274
|
+
openPortletModal: (portlet?: PortletConfig | null) => void;
|
|
275
|
+
closePortletModal: () => void;
|
|
276
|
+
openTextModal: (portlet?: PortletConfig | null) => void;
|
|
277
|
+
closeTextModal: () => void;
|
|
278
|
+
openFilterConfigModal: (portlet: PortletConfig) => void;
|
|
279
|
+
closeFilterConfigModal: () => void;
|
|
280
|
+
openDeleteConfirm: (portletId: string) => void;
|
|
281
|
+
closeDeleteConfirm: () => void;
|
|
282
|
+
setDraftRows: (rows: RowLayout[] | null) => void;
|
|
283
|
+
setIsDraggingPortlet: (isDragging: boolean) => void;
|
|
284
|
+
setLastKnownLayout: (layout: LayoutItem[]) => void;
|
|
285
|
+
setIsInitialized: (initialized: boolean) => void;
|
|
286
|
+
setDragState: (state: DragState | null) => void;
|
|
287
|
+
clearDragState: () => void;
|
|
288
|
+
setDebugData: (portletId: string, data: DebugDataEntry) => void;
|
|
289
|
+
clearDebugData: (portletId?: string) => void;
|
|
290
|
+
setThumbnailDirty: (dirty: boolean) => void;
|
|
291
|
+
reset: () => void;
|
|
292
|
+
};
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
import { Filter } from '../types.js';
|
|
3
|
+
export interface DataBrowserStore {
|
|
4
|
+
selectedCube: string | null;
|
|
5
|
+
visibleColumns: string[];
|
|
6
|
+
sortColumn: string | null;
|
|
7
|
+
sortDirection: 'asc' | 'desc';
|
|
8
|
+
page: number;
|
|
9
|
+
pageSize: number;
|
|
10
|
+
filters: Filter[];
|
|
11
|
+
showFilterBar: boolean;
|
|
12
|
+
showColumnPicker: boolean;
|
|
13
|
+
columnWidths: Record<string, number>;
|
|
14
|
+
selectCube: (cubeName: string, allDimensions: string[]) => void;
|
|
15
|
+
setVisibleColumns: (columns: string[]) => void;
|
|
16
|
+
toggleColumn: (column: string) => void;
|
|
17
|
+
setSort: (column: string) => void;
|
|
18
|
+
clearSort: () => void;
|
|
19
|
+
setPage: (page: number) => void;
|
|
20
|
+
setPageSize: (size: number) => void;
|
|
21
|
+
setFilters: (filters: Filter[]) => void;
|
|
22
|
+
toggleFilterBar: () => void;
|
|
23
|
+
setShowColumnPicker: (show: boolean) => void;
|
|
24
|
+
setColumnWidth: (column: string, width: number) => void;
|
|
25
|
+
setColumnWidths: (widths: Record<string, number>) => void;
|
|
26
|
+
}
|
|
27
|
+
export interface DataBrowserStoreProviderProps {
|
|
28
|
+
children: ReactNode;
|
|
29
|
+
defaultPageSize?: number;
|
|
30
|
+
defaultCube?: string;
|
|
31
|
+
defaultColumns?: string[];
|
|
32
|
+
}
|
|
33
|
+
export declare function DataBrowserStoreProvider({ children, defaultPageSize, defaultCube, defaultColumns, }: DataBrowserStoreProviderProps): import("react").JSX.Element;
|
|
34
|
+
export declare function useDataBrowserStore<T>(selector: (state: DataBrowserStore) => T): T;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Zustand Stores - Barrel Export
|
|
3
|
+
*
|
|
4
|
+
* Centralized state management stores for the drizzle-cube client.
|
|
5
|
+
*
|
|
6
|
+
* ARCHITECTURE: Instance-based stores
|
|
7
|
+
* - Each AnalysisBuilder/Dashboard gets its own Zustand store instance via Context
|
|
8
|
+
* - Use `*StoreProvider` to wrap components that need store access
|
|
9
|
+
* - Use `use*Store` hook to access state (must be inside provider)
|
|
10
|
+
*/
|
|
11
|
+
export { AnalysisBuilderStoreProvider, useAnalysisBuilderStore, useAnalysisBuilderStoreApi, createAnalysisBuilderStore, selectCurrentState, selectMetrics, selectBreakdowns, selectFilters, selectChartConfig, selectUIState, selectMultiQueryState, type AnalysisBuilderStore, type AnalysisBuilderStoreState, type AnalysisBuilderStoreActions, type FieldModalMode, type CreateStoreOptions, type AnalysisBuilderStoreProviderProps, type InitialFunnelState, type InitialFlowState, } from './analysisBuilderStore.js';
|
|
12
|
+
export { DashboardStoreProvider, useDashboardStore, useDashboardStoreApi, useDashboardStoreOptional, createDashboardStore, selectEditModeState, selectModalState, selectLayoutState, selectDebugData, selectPortletDebugData, selectEditModeActions, selectModalActions, selectLayoutActions, selectDebugDataActions, selectAllActions, type DashboardStore, type DashboardStoreState, type DashboardStoreActions, type PortletDebugDataEntry, type DebugDataEntry as DashboardDebugDataEntry, // Alias to avoid conflict with hooks/queries
|
|
13
|
+
type DragState, type CreateDashboardStoreOptions, type DashboardStoreProviderProps, } from './dashboardStore.js';
|
|
@@ -0,0 +1,157 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
import { StoreApi } from 'zustand';
|
|
3
|
+
import { ChartType, ChartAxisConfig, ChartDisplayConfig } from '../types.js';
|
|
4
|
+
/**
|
|
5
|
+
* A portlet block in the notebook
|
|
6
|
+
*/
|
|
7
|
+
export interface PortletBlock {
|
|
8
|
+
id: string;
|
|
9
|
+
type: 'portlet';
|
|
10
|
+
title: string;
|
|
11
|
+
query: string;
|
|
12
|
+
chartType: ChartType;
|
|
13
|
+
chartConfig?: ChartAxisConfig;
|
|
14
|
+
displayConfig?: ChartDisplayConfig;
|
|
15
|
+
}
|
|
16
|
+
/**
|
|
17
|
+
* A markdown text block in the notebook
|
|
18
|
+
*/
|
|
19
|
+
export interface MarkdownBlock {
|
|
20
|
+
id: string;
|
|
21
|
+
type: 'markdown';
|
|
22
|
+
title?: string;
|
|
23
|
+
content: string;
|
|
24
|
+
}
|
|
25
|
+
/**
|
|
26
|
+
* A block in the notebook canvas
|
|
27
|
+
*/
|
|
28
|
+
export type NotebookBlock = PortletBlock | MarkdownBlock;
|
|
29
|
+
/**
|
|
30
|
+
* A tool call record for display in chat messages
|
|
31
|
+
*/
|
|
32
|
+
export interface ToolCallRecord {
|
|
33
|
+
id: string;
|
|
34
|
+
name: string;
|
|
35
|
+
input?: unknown;
|
|
36
|
+
result?: unknown;
|
|
37
|
+
status: 'running' | 'complete' | 'error';
|
|
38
|
+
}
|
|
39
|
+
/**
|
|
40
|
+
* A chat message
|
|
41
|
+
*/
|
|
42
|
+
export interface ChatMessage {
|
|
43
|
+
id: string;
|
|
44
|
+
role: 'user' | 'assistant';
|
|
45
|
+
content: string;
|
|
46
|
+
error?: string;
|
|
47
|
+
toolCalls?: ToolCallRecord[];
|
|
48
|
+
timestamp: number;
|
|
49
|
+
}
|
|
50
|
+
/**
|
|
51
|
+
* Serializable notebook config for save/load
|
|
52
|
+
*/
|
|
53
|
+
export interface NotebookConfig {
|
|
54
|
+
blocks: NotebookBlock[];
|
|
55
|
+
messages: ChatMessage[];
|
|
56
|
+
}
|
|
57
|
+
export interface NotebookStoreState {
|
|
58
|
+
/** Ordered array of notebook blocks */
|
|
59
|
+
blocks: NotebookBlock[];
|
|
60
|
+
/** Chat message history */
|
|
61
|
+
messages: ChatMessage[];
|
|
62
|
+
/** Whether the agent is currently streaming a response */
|
|
63
|
+
isStreaming: boolean;
|
|
64
|
+
/** Agent SDK session ID for multi-turn conversations */
|
|
65
|
+
sessionId: string | null;
|
|
66
|
+
/** Chat input value */
|
|
67
|
+
inputValue: string;
|
|
68
|
+
}
|
|
69
|
+
export interface NotebookStoreActions {
|
|
70
|
+
addBlock: (block: NotebookBlock) => void;
|
|
71
|
+
removeBlock: (id: string) => void;
|
|
72
|
+
moveBlock: (id: string, direction: 'up' | 'down') => void;
|
|
73
|
+
updateBlock: (id: string, updates: Partial<Omit<PortletBlock, 'id' | 'type'>>) => void;
|
|
74
|
+
addMessage: (message: ChatMessage) => void;
|
|
75
|
+
appendToLastAssistantMessage: (text: string) => void;
|
|
76
|
+
setLastAssistantError: (error: string) => void;
|
|
77
|
+
addToolCallToLastAssistant: (toolCall: ToolCallRecord) => void;
|
|
78
|
+
updateLastToolCall: (update: Partial<ToolCallRecord>) => void;
|
|
79
|
+
setIsStreaming: (streaming: boolean) => void;
|
|
80
|
+
setSessionId: (id: string | null) => void;
|
|
81
|
+
setInputValue: (value: string) => void;
|
|
82
|
+
save: () => NotebookConfig;
|
|
83
|
+
load: (config: NotebookConfig) => void;
|
|
84
|
+
reset: () => void;
|
|
85
|
+
}
|
|
86
|
+
/**
|
|
87
|
+
* Combined store type
|
|
88
|
+
*/
|
|
89
|
+
export type NotebookStore = NotebookStoreState & NotebookStoreActions;
|
|
90
|
+
/**
|
|
91
|
+
* Create a new notebook store instance
|
|
92
|
+
*/
|
|
93
|
+
export declare function createNotebookStore(): Omit<Omit<StoreApi<NotebookStore>, "setState" | "devtools"> & {
|
|
94
|
+
setState(partial: NotebookStore | Partial<NotebookStore> | ((state: NotebookStore) => NotebookStore | Partial<NotebookStore>), replace?: false | undefined, action?: (string | {
|
|
95
|
+
[x: string]: unknown;
|
|
96
|
+
[x: number]: unknown;
|
|
97
|
+
[x: symbol]: unknown;
|
|
98
|
+
type: string;
|
|
99
|
+
}) | undefined): void;
|
|
100
|
+
setState(state: NotebookStore | ((state: NotebookStore) => NotebookStore), replace: true, action?: (string | {
|
|
101
|
+
[x: string]: unknown;
|
|
102
|
+
[x: number]: unknown;
|
|
103
|
+
[x: symbol]: unknown;
|
|
104
|
+
type: string;
|
|
105
|
+
}) | undefined): void;
|
|
106
|
+
devtools: {
|
|
107
|
+
cleanup: () => void;
|
|
108
|
+
};
|
|
109
|
+
}, "subscribe"> & {
|
|
110
|
+
subscribe: {
|
|
111
|
+
(listener: (selectedState: NotebookStore, previousSelectedState: NotebookStore) => void): () => void;
|
|
112
|
+
<U>(selector: (state: NotebookStore) => U, listener: (selectedState: U, previousSelectedState: U) => void, options?: {
|
|
113
|
+
equalityFn?: ((a: U, b: U) => boolean) | undefined;
|
|
114
|
+
fireImmediately?: boolean;
|
|
115
|
+
} | undefined): () => void;
|
|
116
|
+
};
|
|
117
|
+
};
|
|
118
|
+
export interface NotebookStoreProviderProps {
|
|
119
|
+
children: ReactNode;
|
|
120
|
+
/** Initial config to load */
|
|
121
|
+
initialConfig?: NotebookConfig;
|
|
122
|
+
}
|
|
123
|
+
/**
|
|
124
|
+
* Provider component that creates a store instance per AgenticNotebook
|
|
125
|
+
*/
|
|
126
|
+
export declare function NotebookStoreProvider({ children, initialConfig, }: NotebookStoreProviderProps): import("react").JSX.Element;
|
|
127
|
+
/**
|
|
128
|
+
* Hook to access the notebook store from context
|
|
129
|
+
* @throws Error if used outside of provider
|
|
130
|
+
*/
|
|
131
|
+
export declare function useNotebookStore<T>(selector: (state: NotebookStore) => T): T;
|
|
132
|
+
export declare const selectBlocks: (state: NotebookStore) => NotebookBlock[];
|
|
133
|
+
export declare const selectMessages: (state: NotebookStore) => ChatMessage[];
|
|
134
|
+
export declare const selectIsStreaming: (state: NotebookStore) => boolean;
|
|
135
|
+
export declare const selectSessionId: (state: NotebookStore) => string | null;
|
|
136
|
+
export declare const selectInputValue: (state: NotebookStore) => string;
|
|
137
|
+
export declare const selectChatState: (state: NotebookStore) => {
|
|
138
|
+
messages: ChatMessage[];
|
|
139
|
+
isStreaming: boolean;
|
|
140
|
+
inputValue: string;
|
|
141
|
+
};
|
|
142
|
+
export declare const selectChatActions: (state: NotebookStore) => {
|
|
143
|
+
addMessage: (message: ChatMessage) => void;
|
|
144
|
+
appendToLastAssistantMessage: (text: string) => void;
|
|
145
|
+
setLastAssistantError: (error: string) => void;
|
|
146
|
+
addToolCallToLastAssistant: (toolCall: ToolCallRecord) => void;
|
|
147
|
+
updateLastToolCall: (update: Partial<ToolCallRecord>) => void;
|
|
148
|
+
setIsStreaming: (streaming: boolean) => void;
|
|
149
|
+
setInputValue: (value: string) => void;
|
|
150
|
+
setSessionId: (id: string | null) => void;
|
|
151
|
+
};
|
|
152
|
+
export declare const selectBlockActions: (state: NotebookStore) => {
|
|
153
|
+
addBlock: (block: NotebookBlock) => void;
|
|
154
|
+
removeBlock: (id: string) => void;
|
|
155
|
+
moveBlock: (id: string, direction: "up" | "down") => void;
|
|
156
|
+
updateBlock: (id: string, updates: Partial<Omit<PortletBlock, "id" | "type">>) => void;
|
|
157
|
+
};
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { CubeQuery, MultiQueryConfig } from '../types.js';
|
|
2
|
+
import { AnalysisBuilderState } from '../components/AnalysisBuilder/types.js';
|
|
3
|
+
import { AnalysisConfig } from '../types/analysisConfig.js';
|
|
4
|
+
import { CreateStoreOptions } from './analysisBuilderStore.js';
|
|
5
|
+
/**
|
|
6
|
+
* Convert CubeQuery to AnalysisBuilderState
|
|
7
|
+
*/
|
|
8
|
+
export declare function queryToState(query: CubeQuery): AnalysisBuilderState;
|
|
9
|
+
/**
|
|
10
|
+
* Check if config is MultiQueryConfig
|
|
11
|
+
*/
|
|
12
|
+
export declare function isMultiQueryConfig(config: CubeQuery | MultiQueryConfig): config is MultiQueryConfig;
|
|
13
|
+
/**
|
|
14
|
+
* Convert store creation options to AnalysisConfig.
|
|
15
|
+
* Returns null if no meaningful options are provided (use defaults).
|
|
16
|
+
*/
|
|
17
|
+
export declare function optionsToAnalysisConfig(options: CreateStoreOptions): AnalysisConfig | null;
|
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
import { StateCreator } from 'zustand';
|
|
2
|
+
import { AnalysisBuilderStore } from '../analysisBuilderStore.js';
|
|
3
|
+
import { AnalysisConfig, AnalysisType, ChartConfig, AnalysisWorkspace } from '../../types/analysisConfig.js';
|
|
4
|
+
import { ChartType, ChartAxisConfig, ChartDisplayConfig } from '../../types.js';
|
|
5
|
+
/**
|
|
6
|
+
* Core slice state
|
|
7
|
+
*/
|
|
8
|
+
export interface CoreSliceState {
|
|
9
|
+
/** Current analysis mode */
|
|
10
|
+
analysisType: AnalysisType;
|
|
11
|
+
/**
|
|
12
|
+
* Per-mode chart configuration map.
|
|
13
|
+
* Each mode owns its own chart settings.
|
|
14
|
+
* Phase 4: This is now the source of truth for all chart configuration.
|
|
15
|
+
*/
|
|
16
|
+
charts: {
|
|
17
|
+
[K in AnalysisType]?: ChartConfig;
|
|
18
|
+
};
|
|
19
|
+
/**
|
|
20
|
+
* Per-mode active view (table or chart) map.
|
|
21
|
+
* Each mode owns its own view preference.
|
|
22
|
+
* This preserves view preference when switching between modes.
|
|
23
|
+
*/
|
|
24
|
+
activeViews: {
|
|
25
|
+
[K in AnalysisType]?: 'table' | 'chart';
|
|
26
|
+
};
|
|
27
|
+
/** Whether user manually selected a chart type */
|
|
28
|
+
userManuallySelectedChart: boolean;
|
|
29
|
+
/** Color palette name */
|
|
30
|
+
localPaletteName: string;
|
|
31
|
+
}
|
|
32
|
+
/**
|
|
33
|
+
* Core slice actions
|
|
34
|
+
*/
|
|
35
|
+
export interface CoreSliceActions {
|
|
36
|
+
/** Set the analysis type (switches between Query/Funnel modes) */
|
|
37
|
+
setAnalysisType: (type: AnalysisType) => void;
|
|
38
|
+
/** Set chart type for current mode */
|
|
39
|
+
setChartType: (type: ChartType) => void;
|
|
40
|
+
/** Set chart type with manual selection flag */
|
|
41
|
+
setChartTypeManual: (type: ChartType) => void;
|
|
42
|
+
/** Set chart config for current mode */
|
|
43
|
+
setChartConfig: (config: ChartAxisConfig) => void;
|
|
44
|
+
/** Set display config for current mode */
|
|
45
|
+
setDisplayConfig: (config: ChartDisplayConfig) => void;
|
|
46
|
+
/** Set color palette name */
|
|
47
|
+
setLocalPaletteName: (name: string) => void;
|
|
48
|
+
/** Set user manually selected chart flag */
|
|
49
|
+
setUserManuallySelectedChart: (value: boolean) => void;
|
|
50
|
+
/**
|
|
51
|
+
* @deprecated Use setChartType() instead - works for any mode via charts map.
|
|
52
|
+
* This setter is kept for backward compatibility but will be removed in a future version.
|
|
53
|
+
*/
|
|
54
|
+
setFunnelChartType: (type: ChartType) => void;
|
|
55
|
+
/**
|
|
56
|
+
* @deprecated Use setChartConfig() instead - works for any mode via charts map.
|
|
57
|
+
* This setter is kept for backward compatibility but will be removed in a future version.
|
|
58
|
+
*/
|
|
59
|
+
setFunnelChartConfig: (config: ChartAxisConfig) => void;
|
|
60
|
+
/**
|
|
61
|
+
* @deprecated Use setDisplayConfig() instead - works for any mode via charts map.
|
|
62
|
+
* This setter is kept for backward compatibility but will be removed in a future version.
|
|
63
|
+
*/
|
|
64
|
+
setFunnelDisplayConfig: (config: ChartDisplayConfig) => void;
|
|
65
|
+
/**
|
|
66
|
+
* Save current state to AnalysisConfig format.
|
|
67
|
+
* Delegates to the appropriate adapter based on analysisType.
|
|
68
|
+
* Use for share URLs and portlets (single-mode).
|
|
69
|
+
*/
|
|
70
|
+
save: () => AnalysisConfig;
|
|
71
|
+
/**
|
|
72
|
+
* Load state from AnalysisConfig.
|
|
73
|
+
* Delegates to the appropriate adapter based on config.analysisType.
|
|
74
|
+
* Use for share URLs and portlets (single-mode).
|
|
75
|
+
*/
|
|
76
|
+
load: (config: AnalysisConfig) => void;
|
|
77
|
+
/**
|
|
78
|
+
* Save ALL modes to AnalysisWorkspace format.
|
|
79
|
+
* Used for localStorage persistence to preserve state across mode switches.
|
|
80
|
+
*/
|
|
81
|
+
saveWorkspace: () => AnalysisWorkspace;
|
|
82
|
+
/**
|
|
83
|
+
* Load ALL modes from AnalysisWorkspace.
|
|
84
|
+
* Used for localStorage persistence to restore state for all modes.
|
|
85
|
+
*/
|
|
86
|
+
loadWorkspace: (workspace: AnalysisWorkspace) => void;
|
|
87
|
+
}
|
|
88
|
+
export type CoreSlice = CoreSliceState & CoreSliceActions;
|
|
89
|
+
export declare const createInitialCoreState: () => CoreSliceState;
|
|
90
|
+
/**
|
|
91
|
+
* Create the core slice.
|
|
92
|
+
* Uses StateCreator pattern for composability with other slices.
|
|
93
|
+
*/
|
|
94
|
+
export declare const createCoreSlice: StateCreator<AnalysisBuilderStore, [
|
|
95
|
+
], [
|
|
96
|
+
], CoreSlice>;
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
import { StateCreator } from 'zustand';
|
|
2
|
+
import { AnalysisBuilderStore } from '../analysisBuilderStore.js';
|
|
3
|
+
import { Filter, FunnelBindingKey } from '../../types.js';
|
|
4
|
+
import { ServerFlowQuery, FlowStartingStep } from '../../types/flow.js';
|
|
5
|
+
/**
|
|
6
|
+
* Flow slice state
|
|
7
|
+
*/
|
|
8
|
+
export interface FlowSliceState {
|
|
9
|
+
/** Selected cube for flow mode (must be an eventStream cube) */
|
|
10
|
+
flowCube: string | null;
|
|
11
|
+
/** Binding key that links events to entities */
|
|
12
|
+
flowBindingKey: FunnelBindingKey | null;
|
|
13
|
+
/** Time dimension for event ordering */
|
|
14
|
+
flowTimeDimension: string | null;
|
|
15
|
+
/** Starting step configuration (anchor point for exploration) */
|
|
16
|
+
startingStep: FlowStartingStep;
|
|
17
|
+
/** Number of steps to explore before starting step (0-5) */
|
|
18
|
+
stepsBefore: number;
|
|
19
|
+
/** Number of steps to explore after starting step (0-5) */
|
|
20
|
+
stepsAfter: number;
|
|
21
|
+
/** Event dimension that categorizes events (node labels) */
|
|
22
|
+
eventDimension: string | null;
|
|
23
|
+
/** Join strategy for flow execution */
|
|
24
|
+
joinStrategy: 'auto' | 'lateral' | 'window';
|
|
25
|
+
}
|
|
26
|
+
/**
|
|
27
|
+
* Flow slice actions
|
|
28
|
+
*/
|
|
29
|
+
export interface FlowSliceActions {
|
|
30
|
+
/** Set the flow cube (clears binding key/time dimension) */
|
|
31
|
+
setFlowCube: (cube: string | null) => void;
|
|
32
|
+
/** Set the flow binding key */
|
|
33
|
+
setFlowBindingKey: (key: FunnelBindingKey | null) => void;
|
|
34
|
+
/** Set the flow time dimension */
|
|
35
|
+
setFlowTimeDimension: (dim: string | null) => void;
|
|
36
|
+
/** Set the event dimension */
|
|
37
|
+
setEventDimension: (dim: string | null) => void;
|
|
38
|
+
/** Set the starting step name */
|
|
39
|
+
setStartingStepName: (name: string) => void;
|
|
40
|
+
/** Set all starting step filters at once */
|
|
41
|
+
setStartingStepFilters: (filters: Filter[]) => void;
|
|
42
|
+
/** Add a filter to the starting step */
|
|
43
|
+
addStartingStepFilter: (filter: Filter) => void;
|
|
44
|
+
/** Remove a filter from the starting step by index */
|
|
45
|
+
removeStartingStepFilter: (index: number) => void;
|
|
46
|
+
/** Update a filter in the starting step by index */
|
|
47
|
+
updateStartingStepFilter: (index: number, filter: Filter) => void;
|
|
48
|
+
/** Set the number of steps to explore before starting step */
|
|
49
|
+
setStepsBefore: (count: number) => void;
|
|
50
|
+
/** Set the number of steps to explore after starting step */
|
|
51
|
+
setStepsAfter: (count: number) => void;
|
|
52
|
+
/** Set the join strategy */
|
|
53
|
+
setJoinStrategy: (strategy: 'auto' | 'lateral' | 'window') => void;
|
|
54
|
+
/** Check if in flow mode (analysisType === 'flow') */
|
|
55
|
+
isFlowMode: () => boolean;
|
|
56
|
+
/** Check if flow mode is properly configured and ready for execution */
|
|
57
|
+
isFlowModeEnabled: () => boolean;
|
|
58
|
+
/** Build ServerFlowQuery from flow state */
|
|
59
|
+
buildFlowQuery: () => ServerFlowQuery | null;
|
|
60
|
+
}
|
|
61
|
+
export type FlowSlice = FlowSliceState & FlowSliceActions;
|
|
62
|
+
export declare const createInitialFlowState: () => FlowSliceState;
|
|
63
|
+
/**
|
|
64
|
+
* Create the flow slice.
|
|
65
|
+
* Uses StateCreator pattern for composability.
|
|
66
|
+
*/
|
|
67
|
+
export declare const createFlowSlice: StateCreator<AnalysisBuilderStore, [
|
|
68
|
+
], [
|
|
69
|
+
], FlowSlice>;
|