drizzle-cube 0.9.3 → 0.9.5
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/ActivityGridChart.config-BXelP_3e.cjs +1 -0
- package/dist/adapters/ActivityGridChart.config-BjOOT9bc.js +2 -0
- package/dist/adapters/AreaChart.config-B9PiH7Kt.js +2 -0
- package/dist/adapters/AreaChart.config-Bv39EDi8.cjs +1 -0
- package/dist/adapters/BarChart.config-CU-XGdDO.cjs +1 -0
- package/dist/adapters/BarChart.config-D9OIP1uN.js +2 -0
- package/dist/adapters/BoxPlotChart.config-C3cLagI6.js +2 -0
- package/dist/adapters/BoxPlotChart.config-CMwswa9H.cjs +1 -0
- package/dist/adapters/BubbleChart.config--rvyga9s.js +2 -0
- package/dist/adapters/BubbleChart.config-DOCLeg91.cjs +1 -0
- package/dist/adapters/CandlestickChart.config-B8h__isO.cjs +1 -0
- package/dist/adapters/CandlestickChart.config-DPzi-8B_.js +2 -0
- package/dist/adapters/DataTable.config-Dn2PyQdy.cjs +1 -0
- package/dist/adapters/DataTable.config-wtCGsLPw.js +2 -0
- package/dist/adapters/DotStripChart.config-BFshbpk0.cjs +1 -0
- package/dist/adapters/DotStripChart.config-c-tbauT6.js +2 -0
- package/dist/adapters/FunnelChart.config-CZYDI4k-.js +2 -0
- package/dist/adapters/FunnelChart.config-Dc2pIfJy.cjs +1 -0
- package/dist/adapters/GaugeChart.config-C9LYrKB1.cjs +1 -0
- package/dist/adapters/GaugeChart.config-DD73ueqk.js +2 -0
- package/dist/adapters/HeatMapChart.config-5DgOpgpV.js +2 -0
- package/dist/adapters/HeatMapChart.config-BZgQ255E.cjs +1 -0
- package/dist/adapters/KpiDelta.config-BEB3XqML.cjs +1 -0
- package/dist/adapters/KpiDelta.config-DeRkPIxD.js +2 -0
- package/dist/adapters/KpiNumber.config-CxpTAKzR.cjs +1 -0
- package/dist/adapters/KpiNumber.config-DM1dRQL-.js +2 -0
- package/dist/adapters/KpiText.config-Dt59uikm.js +2 -0
- package/dist/adapters/KpiText.config-Dt_pW6mK.cjs +1 -0
- package/dist/adapters/LineChart.config-YeXia1kV.cjs +1 -0
- package/dist/adapters/LineChart.config-jX2ulNmq.js +2 -0
- package/dist/adapters/MarkdownChart.config-BAXU79ec.js +2 -0
- package/dist/adapters/MarkdownChart.config-BP6_9ET2.cjs +1 -0
- package/dist/adapters/MeasureProfileChart.config-BW2gdPaM.cjs +1 -0
- package/dist/adapters/MeasureProfileChart.config-CSxeKHnS.js +2 -0
- package/dist/adapters/PieChart.config-Ci3ZPY9U.cjs +1 -0
- package/dist/adapters/PieChart.config-DtCSYlvx.js +2 -0
- package/dist/adapters/ProportionBarChart.config-B71wPMKX.js +2 -0
- package/dist/adapters/ProportionBarChart.config-Bihgdn8v.cjs +1 -0
- package/dist/adapters/RadarChart.config-CC8jIJ78.js +2 -0
- package/dist/adapters/RadarChart.config-D7dCuKRM.cjs +1 -0
- package/dist/adapters/RadialBarChart.config-DC2nQk5q.js +2 -0
- package/dist/adapters/RadialBarChart.config-Dumbvnj1.cjs +1 -0
- package/dist/adapters/RecordsTable.config-BRqLDmY3.cjs +1 -0
- package/dist/adapters/RecordsTable.config-D1wlIO1v.js +2 -0
- package/dist/adapters/RetentionCombinedChart.config-DejP7Hcc.cjs +1 -0
- package/dist/adapters/RetentionCombinedChart.config-yDEDWwJt.js +2 -0
- package/dist/adapters/RetentionHeatmap.config-BSqTkHB8.cjs +1 -0
- package/dist/adapters/RetentionHeatmap.config-GRJjblsW.js +2 -0
- package/dist/adapters/SankeyChart.config-9b1eT_2V.js +2 -0
- package/dist/adapters/SankeyChart.config-n8ro9EZU.cjs +1 -0
- package/dist/adapters/ScatterChart.config-BHqhTxPV.cjs +1 -0
- package/dist/adapters/ScatterChart.config-Bub2V8Ge.js +2 -0
- package/dist/adapters/SunburstChart.config-CxG0NFqN.js +2 -0
- package/dist/adapters/SunburstChart.config-PmN9LEb5.cjs +1 -0
- package/dist/adapters/TreeMapChart.config-D2S3rG6P.js +2 -0
- package/dist/adapters/TreeMapChart.config-TC4dciRa.cjs +1 -0
- package/dist/adapters/WaterfallChart.config-BirJq5VE.cjs +1 -0
- package/dist/adapters/WaterfallChart.config-DYMzte7F.js +2 -0
- package/dist/adapters/{compiler-BYm93X_G.cjs → compiler-CJVo3oya.cjs} +1 -1
- package/dist/adapters/{compiler-B4tLaYye.js → compiler-DYAP3l3U.js} +1 -1
- package/dist/adapters/core/index.cjs +1 -1
- package/dist/adapters/core/index.js +1 -1
- package/dist/adapters/{core-CVDf8WNs.js → core-B05onvSN.js} +2 -2
- package/dist/adapters/{core-BQEJzwTJ.cjs → core-BkxueWec.cjs} +1 -1
- package/dist/adapters/express/index.cjs +1 -1
- package/dist/adapters/express/index.js +5 -5
- package/dist/adapters/fastify/index.cjs +1 -1
- package/dist/adapters/fastify/index.js +5 -5
- package/dist/adapters/{handler-MFn_eVcJ.cjs → handler-CP-6A8X3.cjs} +3 -3
- package/dist/adapters/{handler-Ck2X85KS.js → handler-mwSVmP0z.js} +32 -32
- package/dist/adapters/hono/index.cjs +1 -1
- package/dist/adapters/hono/index.js +4 -4
- package/dist/adapters/mcp-app-html-CUL2sMpA.js +5 -0
- package/dist/adapters/mcp-app-html-Ey6aj9WR.cjs +1 -0
- package/dist/adapters/mcp-app-html.cjs +1 -1
- package/dist/adapters/mcp-app-html.js +1 -1
- package/dist/adapters/mcp-tools.cjs +1 -1
- package/dist/adapters/mcp-tools.js +3 -3
- package/dist/adapters/{mcp-transport-yJDy3T6W.js → mcp-transport-BH5avoaA.js} +1 -1
- package/dist/adapters/{mcp-transport-BQxL1h2h.cjs → mcp-transport-DXgZ-xcU.cjs} +1 -1
- package/dist/adapters/nextjs/index.cjs +1 -1
- package/dist/adapters/nextjs/index.js +5 -5
- package/dist/adapters/{openai-FjvP4Mek.cjs → openai-B82IDfp4.cjs} +1 -1
- package/dist/adapters/{openai-DRFOtBUU.js → openai-BKDrN7u0.js} +1 -1
- package/dist/adapters/openai-BaNGQmmK.cjs +19 -0
- package/dist/adapters/openai-CeNMQU8r.js +13405 -0
- package/dist/adapters/{utils-BY3FDOmN.js → utils-dyUxCOWT.js} +17 -1
- package/dist/adapters/{utils-BkdzL4m9.cjs → utils-iMkgJr10.cjs} +1 -1
- package/dist/adapters/utils.cjs +1 -1
- package/dist/adapters/utils.js +1 -1
- package/dist/cjs/client/charts/ChartLoader.d.ts +1 -1
- package/dist/cjs/client/components/AnalysisBuilder/AnalysisAIPanel.d.ts +1 -1
- package/dist/cjs/client/components/AnalysisBuilder/AnalysisAxisDropZone.d.ts +1 -1
- package/dist/cjs/client/components/AnalysisBuilder/AnalysisChartConfigPanel.d.ts +1 -1
- package/dist/cjs/client/components/AnalysisBuilder/AnalysisDisplayConfigPanel.d.ts +1 -1
- package/dist/cjs/client/components/AnalysisBuilder/AnalysisFilterGroup.d.ts +1 -1
- package/dist/cjs/client/components/AnalysisBuilder/AnalysisFilterItem.d.ts +1 -1
- package/dist/cjs/client/components/AnalysisBuilder/AnalysisFilterSection.d.ts +1 -1
- package/dist/cjs/client/components/AnalysisBuilder/AnalysisResultsHeader.d.ts +1 -1
- package/dist/cjs/client/components/AnalysisBuilder/BreakdownComparisonToggle.d.ts +1 -1
- package/dist/cjs/client/components/AnalysisBuilder/BreakdownItemCard.d.ts +1 -1
- package/dist/cjs/client/components/AnalysisBuilder/BreakdownRow.d.ts +1 -1
- package/dist/cjs/client/components/AnalysisBuilder/BreakdownSection.d.ts +1 -1
- package/dist/cjs/client/components/AnalysisBuilder/ColumnFormatsEditor.d.ts +1 -1
- package/dist/cjs/client/components/AnalysisBuilder/DisplayOptionControl.d.ts +1 -1
- package/dist/cjs/client/components/AnalysisBuilder/ExecutionPlanPanel.d.ts +1 -1
- package/dist/cjs/client/components/AnalysisBuilder/ExecutionPlanPanelParts.d.ts +2 -2
- package/dist/cjs/client/components/AnalysisBuilder/FieldDetailPanel.d.ts +1 -1
- package/dist/cjs/client/components/AnalysisBuilder/FieldSearchItem.d.ts +1 -1
- package/dist/cjs/client/components/AnalysisBuilder/FieldSearchModal.d.ts +1 -1
- package/dist/cjs/client/components/AnalysisBuilder/FieldSearchResults.d.ts +1 -1
- package/dist/cjs/client/components/AnalysisBuilder/FilterValueInput.d.ts +1 -1
- package/dist/cjs/client/components/AnalysisBuilder/FlowDepthControls.d.ts +1 -1
- package/dist/cjs/client/components/AnalysisBuilder/FlowModeContent.d.ts +1 -1
- package/dist/cjs/client/components/AnalysisBuilder/FlowVisualizationPicker.d.ts +1 -1
- package/dist/cjs/client/components/AnalysisBuilder/FunnelModeContent.d.ts +1 -1
- package/dist/cjs/client/components/AnalysisBuilder/LegacyBooleanOptions.d.ts +1 -1
- package/dist/cjs/client/components/AnalysisBuilder/LimitSection.d.ts +1 -1
- package/dist/cjs/client/components/AnalysisBuilder/MetricItemCard.d.ts +1 -1
- package/dist/cjs/client/components/AnalysisBuilder/MetricRow.d.ts +1 -1
- package/dist/cjs/client/components/AnalysisBuilder/MetricsSection.d.ts +1 -1
- package/dist/cjs/client/components/AnalysisBuilder/RetentionModeContent.d.ts +1 -1
- package/dist/cjs/client/components/AnalysisBuilder/SectionHeading.d.ts +1 -1
- package/dist/cjs/client/components/AnalysisBuilder/SortToggleButton.d.ts +1 -1
- package/dist/cjs/client/components/AnalysisBuilder/StringArrayInput.d.ts +1 -1
- package/dist/cjs/client/components/AnalysisBuilder/TemplateEditor.d.ts +1 -1
- package/dist/cjs/client/components/AnalyticsDashboard.d.ts +1 -1
- package/dist/cjs/client/components/AnalyticsPage.d.ts +1 -1
- package/dist/cjs/client/components/ChartTypeSelector.d.ts +1 -1
- package/dist/cjs/client/components/ColorPaletteSelector.d.ts +1 -1
- package/dist/cjs/client/components/DashboardFilters/CompactFilterBarParts.d.ts +2 -2
- package/dist/cjs/client/components/DashboardFilters/DashboardFilterConfigModal.d.ts +1 -1
- package/dist/cjs/client/components/DashboardFilters/DashboardFilterConfigModalParts.d.ts +2 -2
- package/dist/cjs/client/components/DashboardFilters/DashboardFilterItem.d.ts +1 -1
- package/dist/cjs/client/components/DashboardFilters/DashboardFilterValueInput.d.ts +1 -1
- package/dist/cjs/client/components/DashboardGrid.d.ts +9 -2
- package/dist/cjs/client/components/DashboardThumbnailPlaceholder.d.ts +1 -1
- package/dist/cjs/client/components/DataBrowser/DataBrowserSidebar.d.ts +1 -1
- package/dist/cjs/client/components/DataBrowser/DataBrowserToolbar.d.ts +1 -1
- package/dist/cjs/client/components/DataBrowser/index.d.ts +1 -1
- package/dist/cjs/client/components/DataHistogram.d.ts +1 -1
- package/dist/cjs/client/components/DebugModal.d.ts +1 -1
- package/dist/cjs/client/components/FloatingEditToolbar.d.ts +7 -1
- package/dist/cjs/client/components/LoadingIndicator.d.ts +1 -1
- package/dist/cjs/client/components/MobileStackedLayout.d.ts +1 -1
- package/dist/cjs/client/components/PortletAnalysisModal.d.ts +1 -1
- package/dist/cjs/client/components/PortletContainer.d.ts +1 -1
- package/dist/cjs/client/components/PortletFilterConfigModal.d.ts +1 -1
- package/dist/cjs/client/components/PortletGroupCard.d.ts +1 -1
- package/dist/cjs/client/components/RowManagedLayout.d.ts +1 -1
- package/dist/cjs/client/components/SchemaVisualization/CubeNode.d.ts +1 -1
- package/dist/cjs/client/components/SchemaVisualization/FieldDetailPanel.d.ts +1 -1
- package/dist/cjs/client/components/SchemaVisualization/RelationshipEdge.d.ts +1 -1
- package/dist/cjs/client/components/SchemaVisualization/SchemaVisualizationLazy.d.ts +1 -1
- package/dist/cjs/client/components/SchemaVisualization/index.d.ts +1 -1
- package/dist/cjs/client/components/SchemaVisualization/xyflowContext.d.ts +1 -1
- package/dist/cjs/client/components/TextPortletModal.d.ts +1 -1
- package/dist/cjs/client/components/analyticsPortlet/PortletChart.d.ts +1 -1
- package/dist/cjs/client/components/analyticsPortlet/PortletChartView.d.ts +1 -1
- package/dist/cjs/client/components/analyticsPortlet/PortletStates.d.ts +6 -6
- package/dist/cjs/client/components/charts/AxisFormatControls.d.ts +2 -2
- package/dist/cjs/client/components/charts/ChartContainer.d.ts +1 -1
- package/dist/cjs/client/components/charts/ChartLegend.d.ts +1 -1
- package/dist/cjs/client/components/charts/FunnelViews.d.ts +3 -3
- package/dist/cjs/client/components/charts/HeatMapCanvas.d.ts +1 -1
- package/dist/cjs/client/components/charts/MissingDependencyFallback.d.ts +1 -1
- package/dist/cjs/client/components/charts/ScatterSeries.d.ts +1 -1
- package/dist/cjs/client/components/charts/ScatterTooltip.d.ts +1 -1
- package/dist/cjs/client/components/charts/TreeMapLegend.d.ts +1 -1
- package/dist/cjs/client/components/charts/chartScaffolding.d.ts +3 -3
- package/dist/cjs/client/components/dashboard/DashboardContext.d.ts +12 -1
- package/dist/cjs/client/components/dashboard/DashboardCoordinator.d.ts +1 -1
- package/dist/cjs/client/components/dashboard/DashboardEditBar.d.ts +4 -1
- package/dist/cjs/client/components/dashboard/DashboardFilterBar.d.ts +1 -1
- package/dist/cjs/client/components/dashboard/DashboardGridSurface.d.ts +1 -1
- package/dist/cjs/client/components/dashboard/DashboardImportExportActions.d.ts +12 -0
- package/dist/cjs/client/components/dashboard/DashboardImportFileInput.d.ts +10 -0
- package/dist/cjs/client/components/dashboard/DashboardImportModals.d.ts +9 -0
- package/dist/cjs/client/components/dashboard/DashboardModals.d.ts +4 -4
- package/dist/cjs/client/components/dashboard/DashboardProvider.d.ts +1 -1
- package/dist/cjs/client/components/dashboard/DashboardToolbar.d.ts +4 -1
- package/dist/cjs/client/components/dashboard/LayoutModeToggle.d.ts +1 -1
- package/dist/cjs/client/components/dashboard/dashboardGridUtils.d.ts +1 -1
- package/dist/cjs/client/components/dashboardPortletCard/FilterFieldChip.d.ts +1 -1
- package/dist/cjs/client/components/shared/filterItem/FilterDateRangeSelector.d.ts +1 -1
- package/dist/cjs/client/components/shared/filterItem/fieldVisuals.d.ts +2 -2
- package/dist/cjs/client/hooks/dashboard/useDashboardController.d.ts +1 -0
- package/dist/cjs/client/hooks/dashboard/useDashboardImportExport.d.ts +57 -0
- package/dist/cjs/client/hooks/useDashboardHook.d.ts +2 -0
- package/dist/cjs/client/icons/types.d.ts +1 -0
- package/dist/cjs/client/index.d.ts +4 -1
- package/dist/cjs/client/providers/CubeApiProvider.d.ts +1 -1
- package/dist/cjs/client/providers/CubeFeaturesProvider.d.ts +1 -1
- package/dist/cjs/client/providers/CubeMetaProvider.d.ts +1 -1
- package/dist/cjs/client/providers/CubeProvider.d.ts +1 -1
- package/dist/cjs/client/providers/I18nProvider.d.ts +1 -1
- package/dist/cjs/client/stores/analysisBuilderStore.d.ts +1 -1
- package/dist/cjs/client/stores/dashboardStore.d.ts +1 -1
- package/dist/cjs/client/stores/dataBrowserStore.d.ts +1 -1
- package/dist/cjs/client/stores/notebookStore.d.ts +1 -1
- package/dist/cjs/client/types.d.ts +26 -0
- package/dist/cjs/client/utils/dashboardExport.d.ts +84 -0
- package/dist/cjs/client/utils/index.d.ts +2 -0
- package/dist/client/charts/ChartLoader.d.ts +1 -1
- package/dist/client/charts.js +12 -12
- package/dist/client/chunks/{DashboardEditModal-B8zIH0ja.js → DashboardEditModal-3_odkGXU.js} +2071 -2010
- package/dist/client/chunks/DashboardEditModal-3_odkGXU.js.map +1 -0
- package/dist/client/chunks/{DotStripChart-BCgHGY0s.js → DotStripChart-BGpjqpNU.js} +3 -3
- package/dist/client/chunks/{DotStripChart-BCgHGY0s.js.map → DotStripChart-BGpjqpNU.js.map} +1 -1
- package/dist/client/chunks/{ProportionBarChart-DzdKxzr4.js → ProportionBarChart-DuC16TT0.js} +3 -3
- package/dist/client/chunks/{ProportionBarChart-DzdKxzr4.js.map → ProportionBarChart-DuC16TT0.js.map} +1 -1
- package/dist/client/chunks/{RecordsTable-kQfZ25Pz.js → RecordsTable-zy4EWyWx.js} +4 -4
- package/dist/client/chunks/{RecordsTable-kQfZ25Pz.js.map → RecordsTable-zy4EWyWx.js.map} +1 -1
- package/dist/client/chunks/{RetentionCombinedChart-CvddCEOk.js → RetentionCombinedChart-BrqSuLXT.js} +3 -3
- package/dist/client/chunks/{RetentionCombinedChart-CvddCEOk.js.map → RetentionCombinedChart-BrqSuLXT.js.map} +1 -1
- package/dist/client/chunks/{RetentionHeatmap-BURt-mfm.js → RetentionHeatmap-DlGScG6X.js} +2 -2
- package/dist/client/chunks/{RetentionHeatmap-BURt-mfm.js.map → RetentionHeatmap-DlGScG6X.js.map} +1 -1
- package/dist/client/chunks/{analysis-builder-C0hzThmQ.js → analysis-builder-UhPaVPsn.js} +9 -9
- package/dist/client/chunks/{analysis-builder-C0hzThmQ.js.map → analysis-builder-UhPaVPsn.js.map} +1 -1
- package/dist/client/chunks/{analysis-builder-shared-CQFcY6vA.js → analysis-builder-shared-DS_eJnM8.js} +185 -184
- package/dist/client/chunks/{analysis-builder-shared-CQFcY6vA.js.map → analysis-builder-shared-DS_eJnM8.js.map} +1 -1
- package/dist/client/chunks/{chart-activity-grid-aIyjUpbJ.js → chart-activity-grid-cJI-MF_M.js} +19 -3
- package/dist/client/chunks/{chart-activity-grid-aIyjUpbJ.js.map → chart-activity-grid-cJI-MF_M.js.map} +1 -1
- package/dist/client/chunks/{chart-area-DCCvp06H.js → chart-area-11vKdaTE.js} +2 -2
- package/dist/client/chunks/{chart-area-DCCvp06H.js.map → chart-area-11vKdaTE.js.map} +1 -1
- package/dist/client/chunks/{chart-bar-C8xQ15Aa.js → chart-bar-ByOYTFZp.js} +3 -3
- package/dist/client/chunks/{chart-bar-C8xQ15Aa.js.map → chart-bar-ByOYTFZp.js.map} +1 -1
- package/dist/client/chunks/{chart-box-plot-DFMjBoL1.js → chart-box-plot-DKTdhdjk.js} +2 -2
- package/dist/client/chunks/{chart-box-plot-DFMjBoL1.js.map → chart-box-plot-DKTdhdjk.js.map} +1 -1
- package/dist/client/chunks/{chart-bubble-CavhSOT8.js → chart-bubble-lCNFaxsr.js} +2 -2
- package/dist/client/chunks/{chart-bubble-CavhSOT8.js.map → chart-bubble-lCNFaxsr.js.map} +1 -1
- package/dist/client/chunks/{chart-candlestick-BlJ6l-0-.js → chart-candlestick-DQJ8byvB.js} +2 -2
- package/dist/client/chunks/{chart-candlestick-BlJ6l-0-.js.map → chart-candlestick-DQJ8byvB.js.map} +1 -1
- package/dist/client/chunks/{chart-data-table-Dfup1JpL.js → chart-data-table-DkkQtuY6.js} +729 -719
- package/dist/client/chunks/chart-data-table-DkkQtuY6.js.map +1 -0
- package/dist/client/chunks/{chart-funnel-DqBD-oth.js → chart-funnel-BtjUJRcf.js} +2 -2
- package/dist/client/chunks/{chart-funnel-DqBD-oth.js.map → chart-funnel-BtjUJRcf.js.map} +1 -1
- package/dist/client/chunks/{chart-gauge-Tr9BRoTo.js → chart-gauge-Da-29BzE.js} +3 -3
- package/dist/client/chunks/{chart-gauge-Tr9BRoTo.js.map → chart-gauge-Da-29BzE.js.map} +1 -1
- package/dist/client/chunks/{chart-heat-map-V200X1EP.js → chart-heat-map-DK0IR2al.js} +3 -3
- package/dist/client/chunks/{chart-heat-map-V200X1EP.js.map → chart-heat-map-DK0IR2al.js.map} +1 -1
- package/dist/client/chunks/{chart-kpi-delta-DuXkAxKV.js → chart-kpi-delta-Cih5Vh_Z.js} +3 -3
- package/dist/client/chunks/{chart-kpi-delta-DuXkAxKV.js.map → chart-kpi-delta-Cih5Vh_Z.js.map} +1 -1
- package/dist/client/chunks/{chart-kpi-number-CzRaT5KF.js → chart-kpi-number-Z5zpxeKR.js} +5 -5
- package/dist/client/chunks/{chart-kpi-number-CzRaT5KF.js.map → chart-kpi-number-Z5zpxeKR.js.map} +1 -1
- package/dist/client/chunks/{chart-kpi-text-DxMl_C7M.js → chart-kpi-text-glMTySe4.js} +3 -3
- package/dist/client/chunks/{chart-kpi-text-DxMl_C7M.js.map → chart-kpi-text-glMTySe4.js.map} +1 -1
- package/dist/client/chunks/{chart-line-rl9q-vom.js → chart-line-D6Xkq1eW.js} +3 -3
- package/dist/client/chunks/{chart-line-rl9q-vom.js.map → chart-line-D6Xkq1eW.js.map} +1 -1
- package/dist/client/chunks/{chart-markdown-DJq7fXKF.js → chart-markdown-BHBjzgfc.js} +1922 -1842
- package/dist/client/chunks/chart-markdown-BHBjzgfc.js.map +1 -0
- package/dist/client/chunks/{chart-measure-profile-BDpkr55p.js → chart-measure-profile-Cl5xQZLF.js} +3 -3
- package/dist/client/chunks/{chart-measure-profile-BDpkr55p.js.map → chart-measure-profile-Cl5xQZLF.js.map} +1 -1
- package/dist/client/chunks/{chart-pie-W4Mk0WFB.js → chart-pie-X3wVYu9v.js} +3 -3
- package/dist/client/chunks/{chart-pie-W4Mk0WFB.js.map → chart-pie-X3wVYu9v.js.map} +1 -1
- package/dist/client/chunks/{chart-radar-BXkMOUVC.js → chart-radar-BExajFiU.js} +3 -3
- package/dist/client/chunks/{chart-radar-BXkMOUVC.js.map → chart-radar-BExajFiU.js.map} +1 -1
- package/dist/client/chunks/{chart-radial-bar-CSw1hCK2.js → chart-radial-bar-CgGmC8WE.js} +3 -3
- package/dist/client/chunks/{chart-radial-bar-CSw1hCK2.js.map → chart-radial-bar-CgGmC8WE.js.map} +1 -1
- package/dist/client/chunks/{chart-sankey-CXG8SeW3.js → chart-sankey-DKj417mA.js} +2 -2
- package/dist/client/chunks/{chart-sankey-CXG8SeW3.js.map → chart-sankey-DKj417mA.js.map} +1 -1
- package/dist/client/chunks/{chart-scatter-BHp1yLvR.js → chart-scatter-DSNgbnEu.js} +3 -3
- package/dist/client/chunks/{chart-scatter-BHp1yLvR.js.map → chart-scatter-DSNgbnEu.js.map} +1 -1
- package/dist/client/chunks/{chart-sunburst-CHgQCRCz.js → chart-sunburst-IUrLGpyo.js} +3 -3
- package/dist/client/chunks/{chart-sunburst-CHgQCRCz.js.map → chart-sunburst-IUrLGpyo.js.map} +1 -1
- package/dist/client/chunks/{chart-tree-map-YBAOj00L.js → chart-tree-map-DS5X1Wiw.js} +3 -3
- package/dist/client/chunks/{chart-tree-map-YBAOj00L.js.map → chart-tree-map-DS5X1Wiw.js.map} +1 -1
- package/dist/client/chunks/{chart-waterfall-CSQ3xvUJ.js → chart-waterfall-C1GZfgHw.js} +3 -3
- package/dist/client/chunks/{chart-waterfall-CSQ3xvUJ.js.map → chart-waterfall-C1GZfgHw.js.map} +1 -1
- package/dist/client/chunks/{charts-core-ghjDtt0_.js → charts-core-DQXx0Xk-.js} +2 -2
- package/dist/client/chunks/{charts-core-ghjDtt0_.js.map → charts-core-DQXx0Xk-.js.map} +1 -1
- package/dist/client/chunks/charts-loader-DuV9kYN8.js +87 -0
- package/dist/client/chunks/{charts-loader-B_ye_C5_.js.map → charts-loader-DuV9kYN8.js.map} +1 -1
- package/dist/client/chunks/dashboardExport-Db3rmUP1.js +622 -0
- package/dist/client/chunks/dashboardExport-Db3rmUP1.js.map +1 -0
- package/dist/client/chunks/{nl-NL-CKdVNqSp.js → nl-NL-gaWTnOGQ.js} +18 -2
- package/dist/client/chunks/{nl-NL-CKdVNqSp.js.map → nl-NL-gaWTnOGQ.js.map} +1 -1
- package/dist/client/chunks/{schema-visualization-txYCG4v5.js → schema-visualization-DIn9gy5O.js} +3 -3
- package/dist/client/chunks/{schema-visualization-txYCG4v5.js.map → schema-visualization-DIn9gy5O.js.map} +1 -1
- package/dist/client/chunks/{useDirtyStateTracking-BUk23Wbh.js → useDirtyStateTracking-giMoYB90.js} +4 -4
- package/dist/client/chunks/{useDirtyStateTracking-BUk23Wbh.js.map → useDirtyStateTracking-giMoYB90.js.map} +1 -1
- package/dist/client/chunks/{useExplainAI-CGLroDBD.js → useExplainAI-CpFZbdn-.js} +4 -4
- package/dist/client/chunks/{useExplainAI-CGLroDBD.js.map → useExplainAI-CpFZbdn-.js.map} +1 -1
- package/dist/client/chunks/utils-CToHkuhU.js.map +1 -1
- package/dist/client/chunks/{vendor-CApRxi77.js → vendor-wyAsikWW.js} +2 -2
- package/dist/client/chunks/vendor-wyAsikWW.js.map +1 -0
- package/dist/client/components/AnalysisBuilder/AnalysisAIPanel.d.ts +1 -1
- package/dist/client/components/AnalysisBuilder/AnalysisAxisDropZone.d.ts +1 -1
- package/dist/client/components/AnalysisBuilder/AnalysisChartConfigPanel.d.ts +1 -1
- package/dist/client/components/AnalysisBuilder/AnalysisDisplayConfigPanel.d.ts +1 -1
- package/dist/client/components/AnalysisBuilder/AnalysisFilterGroup.d.ts +1 -1
- package/dist/client/components/AnalysisBuilder/AnalysisFilterItem.d.ts +1 -1
- package/dist/client/components/AnalysisBuilder/AnalysisFilterSection.d.ts +1 -1
- package/dist/client/components/AnalysisBuilder/AnalysisResultsHeader.d.ts +1 -1
- package/dist/client/components/AnalysisBuilder/BreakdownComparisonToggle.d.ts +1 -1
- package/dist/client/components/AnalysisBuilder/BreakdownItemCard.d.ts +1 -1
- package/dist/client/components/AnalysisBuilder/BreakdownRow.d.ts +1 -1
- package/dist/client/components/AnalysisBuilder/BreakdownSection.d.ts +1 -1
- package/dist/client/components/AnalysisBuilder/ColumnFormatsEditor.d.ts +1 -1
- package/dist/client/components/AnalysisBuilder/DisplayOptionControl.d.ts +1 -1
- package/dist/client/components/AnalysisBuilder/ExecutionPlanPanel.d.ts +1 -1
- package/dist/client/components/AnalysisBuilder/ExecutionPlanPanelParts.d.ts +2 -2
- package/dist/client/components/AnalysisBuilder/FieldDetailPanel.d.ts +1 -1
- package/dist/client/components/AnalysisBuilder/FieldSearchItem.d.ts +1 -1
- package/dist/client/components/AnalysisBuilder/FieldSearchModal.d.ts +1 -1
- package/dist/client/components/AnalysisBuilder/FieldSearchResults.d.ts +1 -1
- package/dist/client/components/AnalysisBuilder/FilterValueInput.d.ts +1 -1
- package/dist/client/components/AnalysisBuilder/FlowDepthControls.d.ts +1 -1
- package/dist/client/components/AnalysisBuilder/FlowModeContent.d.ts +1 -1
- package/dist/client/components/AnalysisBuilder/FlowVisualizationPicker.d.ts +1 -1
- package/dist/client/components/AnalysisBuilder/FunnelModeContent.d.ts +1 -1
- package/dist/client/components/AnalysisBuilder/LegacyBooleanOptions.d.ts +1 -1
- package/dist/client/components/AnalysisBuilder/LimitSection.d.ts +1 -1
- package/dist/client/components/AnalysisBuilder/MetricItemCard.d.ts +1 -1
- package/dist/client/components/AnalysisBuilder/MetricRow.d.ts +1 -1
- package/dist/client/components/AnalysisBuilder/MetricsSection.d.ts +1 -1
- package/dist/client/components/AnalysisBuilder/RetentionModeContent.d.ts +1 -1
- package/dist/client/components/AnalysisBuilder/SectionHeading.d.ts +1 -1
- package/dist/client/components/AnalysisBuilder/SortToggleButton.d.ts +1 -1
- package/dist/client/components/AnalysisBuilder/StringArrayInput.d.ts +1 -1
- package/dist/client/components/AnalysisBuilder/TemplateEditor.d.ts +1 -1
- package/dist/client/components/AnalyticsDashboard.d.ts +1 -1
- package/dist/client/components/AnalyticsPage.d.ts +1 -1
- package/dist/client/components/ChartTypeSelector.d.ts +1 -1
- package/dist/client/components/ColorPaletteSelector.d.ts +1 -1
- package/dist/client/components/DashboardFilters/CompactFilterBarParts.d.ts +2 -2
- package/dist/client/components/DashboardFilters/DashboardFilterConfigModal.d.ts +1 -1
- package/dist/client/components/DashboardFilters/DashboardFilterConfigModalParts.d.ts +2 -2
- package/dist/client/components/DashboardFilters/DashboardFilterItem.d.ts +1 -1
- package/dist/client/components/DashboardFilters/DashboardFilterValueInput.d.ts +1 -1
- package/dist/client/components/DashboardGrid.d.ts +9 -2
- package/dist/client/components/DashboardThumbnailPlaceholder.d.ts +1 -1
- package/dist/client/components/DataBrowser/DataBrowserSidebar.d.ts +1 -1
- package/dist/client/components/DataBrowser/DataBrowserToolbar.d.ts +1 -1
- package/dist/client/components/DataBrowser/index.d.ts +1 -1
- package/dist/client/components/DataHistogram.d.ts +1 -1
- package/dist/client/components/DebugModal.d.ts +1 -1
- package/dist/client/components/FloatingEditToolbar.d.ts +7 -1
- package/dist/client/components/LoadingIndicator.d.ts +1 -1
- package/dist/client/components/MobileStackedLayout.d.ts +1 -1
- package/dist/client/components/PortletAnalysisModal.d.ts +1 -1
- package/dist/client/components/PortletContainer.d.ts +1 -1
- package/dist/client/components/PortletFilterConfigModal.d.ts +1 -1
- package/dist/client/components/PortletGroupCard.d.ts +1 -1
- package/dist/client/components/RowManagedLayout.d.ts +1 -1
- package/dist/client/components/SchemaVisualization/CubeNode.d.ts +1 -1
- package/dist/client/components/SchemaVisualization/FieldDetailPanel.d.ts +1 -1
- package/dist/client/components/SchemaVisualization/RelationshipEdge.d.ts +1 -1
- package/dist/client/components/SchemaVisualization/SchemaVisualizationLazy.d.ts +1 -1
- package/dist/client/components/SchemaVisualization/index.d.ts +1 -1
- package/dist/client/components/SchemaVisualization/xyflowContext.d.ts +1 -1
- package/dist/client/components/TextPortletModal.d.ts +1 -1
- package/dist/client/components/analyticsPortlet/PortletChart.d.ts +1 -1
- package/dist/client/components/analyticsPortlet/PortletChartView.d.ts +1 -1
- package/dist/client/components/analyticsPortlet/PortletStates.d.ts +6 -6
- package/dist/client/components/charts/AxisFormatControls.d.ts +2 -2
- package/dist/client/components/charts/ChartContainer.d.ts +1 -1
- package/dist/client/components/charts/ChartLegend.d.ts +1 -1
- package/dist/client/components/charts/FunnelViews.d.ts +3 -3
- package/dist/client/components/charts/HeatMapCanvas.d.ts +1 -1
- package/dist/client/components/charts/MissingDependencyFallback.d.ts +1 -1
- package/dist/client/components/charts/ScatterSeries.d.ts +1 -1
- package/dist/client/components/charts/ScatterTooltip.d.ts +1 -1
- package/dist/client/components/charts/TreeMapLegend.d.ts +1 -1
- package/dist/client/components/charts/chartScaffolding.d.ts +3 -3
- package/dist/client/components/dashboard/DashboardContext.d.ts +12 -1
- package/dist/client/components/dashboard/DashboardCoordinator.d.ts +1 -1
- package/dist/client/components/dashboard/DashboardEditBar.d.ts +4 -1
- package/dist/client/components/dashboard/DashboardFilterBar.d.ts +1 -1
- package/dist/client/components/dashboard/DashboardGridSurface.d.ts +1 -1
- package/dist/client/components/dashboard/DashboardImportExportActions.d.ts +12 -0
- package/dist/client/components/dashboard/DashboardImportFileInput.d.ts +10 -0
- package/dist/client/components/dashboard/DashboardImportModals.d.ts +9 -0
- package/dist/client/components/dashboard/DashboardModals.d.ts +4 -4
- package/dist/client/components/dashboard/DashboardProvider.d.ts +1 -1
- package/dist/client/components/dashboard/DashboardToolbar.d.ts +4 -1
- package/dist/client/components/dashboard/LayoutModeToggle.d.ts +1 -1
- package/dist/client/components/dashboard/dashboardGridUtils.d.ts +1 -1
- package/dist/client/components/dashboardPortletCard/FilterFieldChip.d.ts +1 -1
- package/dist/client/components/shared/filterItem/FilterDateRangeSelector.d.ts +1 -1
- package/dist/client/components/shared/filterItem/fieldVisuals.d.ts +2 -2
- package/dist/client/components.js +1 -1
- package/dist/client/hooks/dashboard/useDashboardController.d.ts +1 -0
- package/dist/client/hooks/dashboard/useDashboardImportExport.d.ts +57 -0
- package/dist/client/hooks/useDashboardHook.d.ts +2 -0
- package/dist/client/hooks.js +3 -3
- package/dist/client/icons/types.d.ts +1 -0
- package/dist/client/icons.js +1 -1
- package/dist/client/index.d.ts +4 -1
- package/dist/client/index.js +199 -199
- package/dist/client/providers/CubeApiProvider.d.ts +1 -1
- package/dist/client/providers/CubeFeaturesProvider.d.ts +1 -1
- package/dist/client/providers/CubeMetaProvider.d.ts +1 -1
- package/dist/client/providers/CubeProvider.d.ts +1 -1
- package/dist/client/providers/I18nProvider.d.ts +1 -1
- package/dist/client/providers.js +1 -1
- package/dist/client/schema.js +1 -1
- package/dist/client/stores/analysisBuilderStore.d.ts +1 -1
- package/dist/client/stores/dashboardStore.d.ts +1 -1
- package/dist/client/stores/dataBrowserStore.d.ts +1 -1
- package/dist/client/stores/notebookStore.d.ts +1 -1
- package/dist/client/styles.css +1 -1
- package/dist/client/types.d.ts +26 -0
- package/dist/client/utils/dashboardExport.d.ts +84 -0
- package/dist/client/utils/index.d.ts +2 -0
- package/dist/client/utils.js +12 -12
- package/dist/client/utils.js.map +1 -1
- package/dist/client-bundle-stats.html +1 -1
- package/dist/mcp-app/mcp-app.html +146 -146
- package/dist/server/index.cjs +2 -2
- package/dist/server/index.js +18 -2
- package/dist/server/openai-Cxii1K2N.cjs +19 -0
- package/dist/server/{openai-G2EivP-n.cjs → openai-DC2ye24o.cjs} +1 -1
- package/dist/server/{openai-Cap1nBuK.js → openai-Jt2WUOXm.js} +1 -1
- package/dist/server/openai-aLi6lmJs.js +13405 -0
- package/package.json +5 -5
- package/dist/adapters/ActivityGridChart.config-BIHNNXe8.cjs +0 -1
- package/dist/adapters/ActivityGridChart.config-D8brFtkU.js +0 -2
- package/dist/adapters/AreaChart.config-BjBnqhrD.js +0 -2
- package/dist/adapters/AreaChart.config-hCYHwAaC.cjs +0 -1
- package/dist/adapters/BarChart.config-JWskLg7a.js +0 -2
- package/dist/adapters/BarChart.config-ldUoUV-V.cjs +0 -1
- package/dist/adapters/BoxPlotChart.config-DXgi-pWk.js +0 -2
- package/dist/adapters/BoxPlotChart.config-t7CU_SEB.cjs +0 -1
- package/dist/adapters/BubbleChart.config-BqNbgcs4.js +0 -2
- package/dist/adapters/BubbleChart.config-SRbrJWj2.cjs +0 -1
- package/dist/adapters/CandlestickChart.config-CTqj07at.cjs +0 -1
- package/dist/adapters/CandlestickChart.config-D-KaQpN1.js +0 -2
- package/dist/adapters/DataTable.config-4QtzEm2K.js +0 -2
- package/dist/adapters/DataTable.config-C4OZyZKL.cjs +0 -1
- package/dist/adapters/DotStripChart.config-CrwF5K67.cjs +0 -1
- package/dist/adapters/DotStripChart.config-tmdykLsT.js +0 -2
- package/dist/adapters/FunnelChart.config-Dk7bb3KU.cjs +0 -1
- package/dist/adapters/FunnelChart.config-Uah6h6t6.js +0 -2
- package/dist/adapters/GaugeChart.config-BGi82n3v.cjs +0 -1
- package/dist/adapters/GaugeChart.config-DIWl6xVG.js +0 -2
- package/dist/adapters/HeatMapChart.config-C1Wl6SHf.js +0 -2
- package/dist/adapters/HeatMapChart.config-CsA67rfc.cjs +0 -1
- package/dist/adapters/KpiDelta.config-CBo61Kp9.cjs +0 -1
- package/dist/adapters/KpiDelta.config-CgYK9zIF.js +0 -2
- package/dist/adapters/KpiNumber.config-BqQjoY4A.cjs +0 -1
- package/dist/adapters/KpiNumber.config-Dt8kOvIA.js +0 -2
- package/dist/adapters/KpiText.config-BE8HbXQ0.js +0 -2
- package/dist/adapters/KpiText.config-DaSbcfKE.cjs +0 -1
- package/dist/adapters/LineChart.config-CUPtbHNz.cjs +0 -1
- package/dist/adapters/LineChart.config-DHlctcYT.js +0 -2
- package/dist/adapters/MarkdownChart.config-B0T5A7dw.js +0 -2
- package/dist/adapters/MarkdownChart.config-iV60Icd3.cjs +0 -1
- package/dist/adapters/MeasureProfileChart.config-CBCezRPr.cjs +0 -1
- package/dist/adapters/MeasureProfileChart.config-CO9Cc3Ha.js +0 -2
- package/dist/adapters/PieChart.config-D6Ofc2h-.js +0 -2
- package/dist/adapters/PieChart.config-TOCX24yj.cjs +0 -1
- package/dist/adapters/ProportionBarChart.config-BfiCmXI7.js +0 -2
- package/dist/adapters/ProportionBarChart.config-Bh8_aieC.cjs +0 -1
- package/dist/adapters/RadarChart.config-BfWKUYv4.cjs +0 -1
- package/dist/adapters/RadarChart.config-x87UPfQH.js +0 -2
- package/dist/adapters/RadialBarChart.config-BGA-fVmo.js +0 -2
- package/dist/adapters/RadialBarChart.config-Bo3E1IWc.cjs +0 -1
- package/dist/adapters/RecordsTable.config-CKb4xY0c.cjs +0 -1
- package/dist/adapters/RecordsTable.config-KsPOo8YB.js +0 -2
- package/dist/adapters/RetentionCombinedChart.config-DVDQBMW8.js +0 -2
- package/dist/adapters/RetentionCombinedChart.config-DqfOBn6k.cjs +0 -1
- package/dist/adapters/RetentionHeatmap.config-B7NVTM5_.cjs +0 -1
- package/dist/adapters/RetentionHeatmap.config-tnd7N7g-.js +0 -2
- package/dist/adapters/SankeyChart.config-B1K4e0RA.js +0 -2
- package/dist/adapters/SankeyChart.config-I26Q_e5f.cjs +0 -1
- package/dist/adapters/ScatterChart.config-CMta6GGl.cjs +0 -1
- package/dist/adapters/ScatterChart.config-WwER0vgC.js +0 -2
- package/dist/adapters/SunburstChart.config-CBYye6Ez.js +0 -2
- package/dist/adapters/SunburstChart.config-DbC1AZCI.cjs +0 -1
- package/dist/adapters/TreeMapChart.config-EcJf0Dzm.cjs +0 -1
- package/dist/adapters/TreeMapChart.config-wNJWipDf.js +0 -2
- package/dist/adapters/WaterfallChart.config--d2EuVF-.cjs +0 -1
- package/dist/adapters/WaterfallChart.config-CPJLjH4K.js +0 -2
- package/dist/adapters/mcp-app-html-28O1Eww7.js +0 -5
- package/dist/adapters/mcp-app-html-DXdKk-cp.cjs +0 -1
- package/dist/adapters/openai-B7EVH3cl.js +0 -10076
- package/dist/adapters/openai-BkD4iuG8.cjs +0 -19
- package/dist/client/chunks/DashboardEditModal-B8zIH0ja.js.map +0 -1
- package/dist/client/chunks/chart-data-table-Dfup1JpL.js.map +0 -1
- package/dist/client/chunks/chart-markdown-DJq7fXKF.js.map +0 -1
- package/dist/client/chunks/charts-loader-B_ye_C5_.js +0 -87
- package/dist/client/chunks/syntaxHighlighting-Cm43as8i.js +0 -30
- package/dist/client/chunks/syntaxHighlighting-Cm43as8i.js.map +0 -1
- package/dist/client/chunks/vendor-CApRxi77.js.map +0 -1
- package/dist/server/openai-BWGYfr6Z.cjs +0 -19
- package/dist/server/openai-DW5TRMXE.js +0 -10076
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { c as e, l as t } from "./vendor-
|
|
2
|
-
import { A as n, B as r, W as i, ct as a } from "./chart-data-table-
|
|
3
|
-
import { C as o, w as s } from "./useDirtyStateTracking-
|
|
1
|
+
import { c as e, l as t } from "./vendor-wyAsikWW.js";
|
|
2
|
+
import { A as n, B as r, W as i, ct as a } from "./chart-data-table-DkkQtuY6.js";
|
|
3
|
+
import { C as o, w as s } from "./useDirtyStateTracking-giMoYB90.js";
|
|
4
4
|
import { useCallback as c, useMemo as l, useState as u } from "react";
|
|
5
5
|
//#region src/client/hooks/queries/useDryRunQuery.ts
|
|
6
6
|
function d(e) {
|
|
@@ -203,4 +203,4 @@ function C(t = {}) {
|
|
|
203
203
|
//#endregion
|
|
204
204
|
export { m as a, g as i, _ as n, h as o, x as r, C as t };
|
|
205
205
|
|
|
206
|
-
//# sourceMappingURL=useExplainAI-
|
|
206
|
+
//# sourceMappingURL=useExplainAI-CpFZbdn-.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useExplainAI-CGLroDBD.js","names":[],"sources":["../../../src/client/hooks/queries/useDryRunQuery.ts","../../../src/client/hooks/queries/useExplainQuery.ts","../../../src/client/hooks/queries/useExplainAI.ts"],"sourcesContent":["/**\n * useDryRunQuery - TanStack Query hook for dry-run (debug) data\n *\n * Features:\n * - Fetch SQL and analysis data for query debugging\n * - Support for single and multi-query modes\n * - Built-in caching with TanStack Query\n * - Parallel fetching for multiple queries\n *\n * This hook replaces the debug data useEffect in AnalysisBuilder.\n */\n\nimport { useQuery, useQueries } from '@tanstack/react-query'\nimport { useMemo } from 'react'\nimport { useCubeApi } from '../../providers/CubeApiProvider.js'\nimport type { CubeQuery } from '../../types.js'\nimport type { QueryAnalysis } from '../../components/AnalysisBuilder/types.js'\nimport { cleanQueryForServer } from '../../shared/utils.js'\nimport { stableStringify } from '../../shared/queryKey.js'\n\nexport type DryRunMode = 'regular' | 'comparison' | 'funnel' | 'flow' | 'retention'\n\ninterface DryRunResponsePayload {\n sql?: { sql: string; params?: unknown[] }\n analysis?: QueryAnalysis | null\n mode?: DryRunMode\n queryType?: string\n joinType?: string\n cubesUsed?: string[]\n modeMetadata?: unknown\n}\n\n/**\n * Debug data entry for a single query\n */\nexport interface DebugDataEntry {\n /** Generated SQL and parameters */\n sql: { sql: string; params: unknown[] } | null\n /** Query analysis (dimensions, measures, complexity, etc.) */\n analysis: QueryAnalysis | null\n /** Server-reported dry-run mode */\n mode?: DryRunMode | null\n /** Query type label from server */\n queryType?: string | null\n /** Join strategy label from server */\n joinType?: string | null\n /** Referenced cubes from server */\n cubesUsed?: string[]\n /** Mode-specific metadata (replaces funnel/flow/retention split) */\n modeMetadata?: unknown\n /** Whether this entry is loading */\n loading: boolean\n /** Error if fetch failed */\n error: Error | null\n}\n\n/**\n * Create a stable query key for dry-run\n */\nexport function createDryRunQueryKey(\n query: CubeQuery | null\n): readonly unknown[] {\n if (!query) return ['cube', 'dryRun', null] as const\n return ['cube', 'dryRun', stableStringify(query)] as const\n}\n\nexport interface UseDryRunQueryOptions {\n /**\n * Whether to skip the query\n * @default false\n */\n skip?: boolean\n /**\n * Stale time in milliseconds\n * @default 5 * 60 * 1000 (5 minutes)\n */\n staleTime?: number\n}\n\nexport interface UseDryRunQueryResult {\n /** Debug data for the query */\n debugData: DebugDataEntry\n /** Manually refetch */\n refetch: () => void\n}\n\nfunction inferModeFromPayload(payload: DryRunResponsePayload): DryRunMode | null {\n if (payload.mode) return payload.mode\n if (payload.queryType === 'comparisonQuery') return 'comparison'\n if (payload.queryType === 'funnelQuery') return 'funnel'\n if (payload.queryType === 'flowQuery') return 'flow'\n if (payload.queryType === 'retentionQuery') return 'retention'\n if (payload.queryType === 'regularQuery') return 'regular'\n return null\n}\n\nfunction normalizeDryRunResult(payload: DryRunResponsePayload): Omit<DebugDataEntry, 'loading' | 'error'> {\n const mode = inferModeFromPayload(payload)\n return {\n sql: payload.sql ? { sql: payload.sql.sql, params: payload.sql.params || [] } : null,\n analysis: (payload.analysis || null) as QueryAnalysis | null,\n mode,\n queryType: payload.queryType || null,\n joinType: payload.joinType || null,\n cubesUsed: payload.cubesUsed || [],\n modeMetadata: payload.modeMetadata\n }\n}\n\n/**\n * TanStack Query hook for single query dry-run (debug) data\n *\n * Usage:\n * ```tsx\n * const { debugData } = useDryRunQuery(query, { skip: !isValidQuery })\n * ```\n */\nexport function useDryRunQuery(\n query: CubeQuery | null,\n options: UseDryRunQueryOptions = {}\n): UseDryRunQueryResult {\n const { skip = false, staleTime = 5 * 60 * 1000 } = options\n const { cubeApi } = useCubeApi()\n\n // Transform query for server\n const serverQuery = useMemo(() => {\n if (!query) return null\n const modeQuery = query as CubeQuery & { funnel?: unknown; flow?: unknown; retention?: unknown }\n // Preserve specialized mode payloads as-is; cleanQueryForServer strips non-Cube.js keys.\n if (modeQuery.funnel || modeQuery.flow || modeQuery.retention) {\n return query\n }\n return cleanQueryForServer(query)\n }, [query])\n\n const queryResult = useQuery({\n queryKey: createDryRunQueryKey(serverQuery),\n queryFn: async () => {\n if (!serverQuery) throw new Error('No query provided')\n const result = await cubeApi.dryRun(serverQuery)\n return normalizeDryRunResult(result as DryRunResponsePayload)\n },\n enabled: !!serverQuery && !skip,\n staleTime,\n })\n\n const debugData: DebugDataEntry = {\n ...(queryResult.data || {\n sql: null,\n analysis: null,\n mode: null,\n queryType: null,\n joinType: null,\n cubesUsed: [],\n modeMetadata: undefined\n }),\n loading: queryResult.isLoading,\n error: queryResult.error ?? null,\n }\n\n return {\n debugData,\n refetch: () => queryResult.refetch(),\n }\n}\n\nexport interface UseMultiDryRunQueriesOptions {\n /**\n * Whether to skip all queries\n * @default false\n */\n skip?: boolean\n /**\n * Stale time in milliseconds\n * @default 5 * 60 * 1000 (5 minutes)\n */\n staleTime?: number\n}\n\nexport interface UseMultiDryRunQueriesResult {\n /** Debug data for each query */\n debugDataPerQuery: DebugDataEntry[]\n /** Whether any query is loading */\n isLoading: boolean\n /** Manually refetch all */\n refetchAll: () => void\n}\n\n/**\n * TanStack Query hook for multiple query dry-runs (debug) data\n *\n * Fetches debug data for multiple queries in parallel.\n *\n * Usage:\n * ```tsx\n * const { debugDataPerQuery, isLoading } = useMultiDryRunQueries(queries, {\n * skip: !isMultiQueryMode\n * })\n * ```\n */\nexport function useMultiDryRunQueries(\n queries: CubeQuery[],\n options: UseMultiDryRunQueriesOptions = {}\n): UseMultiDryRunQueriesResult {\n const { skip = false, staleTime = 5 * 60 * 1000 } = options\n const { cubeApi } = useCubeApi()\n\n // Transform queries for server\n const serverQueries = useMemo(() => {\n return queries.map((q) => cleanQueryForServer(q))\n }, [queries])\n\n // Use useQueries for parallel fetching\n const queryResults = useQueries({\n queries: serverQueries.map((query) => ({\n queryKey: createDryRunQueryKey(query),\n queryFn: async () => {\n const result = await cubeApi.dryRun(query)\n return normalizeDryRunResult(result as DryRunResponsePayload)\n },\n enabled: !skip,\n staleTime,\n })),\n })\n\n // Transform results to DebugDataEntry array\n const debugDataPerQuery: DebugDataEntry[] = queryResults.map((result) => ({\n ...(result.data || {\n sql: null,\n analysis: null,\n mode: null,\n queryType: null,\n joinType: null,\n cubesUsed: [],\n modeMetadata: undefined\n }),\n loading: result.isLoading,\n error: result.error ?? null,\n }))\n\n // Check if any query is loading\n const isLoading = queryResults.some((r) => r.isLoading)\n\n // Refetch all queries\n const refetchAll = () => {\n queryResults.forEach((r) => r.refetch())\n }\n\n return {\n debugDataPerQuery,\n isLoading,\n refetchAll,\n }\n}\n\n/**\n * Combined hook for single or multi-query dry-run based on mode\n *\n * This is a convenience wrapper that automatically chooses between\n * single and multi-query dry-run based on the number of queries.\n *\n * Usage:\n * ```tsx\n * const { debugDataPerQuery } = useDryRunQueries({\n * queries: isMultiQueryMode ? allQueries : [currentQuery],\n * isMultiQueryMode,\n * skip: !isValidQuery\n * })\n * ```\n */\nexport function useDryRunQueries(options: {\n queries: CubeQuery[]\n isMultiQueryMode: boolean\n skip?: boolean\n staleTime?: number\n}): UseMultiDryRunQueriesResult {\n const { queries, isMultiQueryMode, skip = false, staleTime } = options\n\n // For single query mode, wrap in array for consistent interface\n const queriesToFetch = isMultiQueryMode ? queries : queries.slice(0, 1)\n\n return useMultiDryRunQueries(queriesToFetch, { skip, staleTime })\n}\n\nexport type FunnelDebugDataEntry = DebugDataEntry\n\n/**\n * TanStack Query hook for funnel query dry-run (debug) data\n *\n * Usage:\n * ```tsx\n * const { debugData } = useFunnelDryRunQuery(serverQuery, { skip: !isFunnelMode })\n * ```\n */\nexport function useFunnelDryRunQuery(\n serverQuery: unknown | null,\n options: UseDryRunQueryOptions = {}\n): { debugData: FunnelDebugDataEntry; refetch: () => void } {\n return useDryRunQuery(serverQuery as CubeQuery | null, options)\n}\n\nexport type FlowDebugDataEntry = DebugDataEntry\n\n/**\n * TanStack Query hook for flow query dry-run (debug) data\n *\n * Usage:\n * ```tsx\n * const { debugData } = useFlowDryRunQuery(serverQuery, { skip: !isFlowMode })\n * ```\n */\nexport function useFlowDryRunQuery(\n serverQuery: unknown | null,\n options: UseDryRunQueryOptions = {}\n): { debugData: FlowDebugDataEntry; refetch: () => void } {\n return useDryRunQuery(serverQuery as CubeQuery | null, options)\n}\n\nexport type RetentionDebugDataEntry = DebugDataEntry\n\n/**\n * TanStack Query hook for retention query dry-run (debug) data\n *\n * Usage:\n * ```tsx\n * const { debugData } = useRetentionDryRunQuery(serverQuery, { skip: !isRetentionMode })\n * ```\n */\nexport function useRetentionDryRunQuery(\n serverQuery: unknown | null,\n options: UseDryRunQueryOptions = {}\n): { debugData: RetentionDebugDataEntry; refetch: () => void } {\n return useDryRunQuery(serverQuery as CubeQuery | null, options)\n}\n","/**\n * useExplainQuery - TanStack Query hook for EXPLAIN PLAN execution\n *\n * Features:\n * - Manually triggered (not automatic like useCubeLoadQuery)\n * - Returns normalized execution plan across PostgreSQL, MySQL, and SQLite\n * - Supports EXPLAIN ANALYZE for actual timing data\n * - No caching - always fetches fresh data to reflect schema/index changes\n *\n * Usage:\n * ```tsx\n * const { explainResult, isLoading, error, runExplain } = useExplainQuery(query)\n *\n * // Trigger explain manually\n * <button onClick={() => runExplain({ analyze: true })}>Explain with Timing</button>\n * ```\n */\n\nimport { useQuery } from '@tanstack/react-query'\nimport { useCallback, useMemo, useState } from 'react'\nimport { useCubeApi } from '../../providers/CubeApiProvider.js'\nimport type { CubeQuery, ExplainResult, ExplainOptions } from '../../types.js'\nimport { cleanQueryForServer } from '../../shared/utils.js'\nimport { stableStringify } from '../../shared/queryKey.js'\n\n/**\n * Query type that can be explained - includes standard queries, funnel queries, flow queries, and retention queries\n */\nexport type ExplainableQuery = CubeQuery | { funnel: unknown } | { flow: unknown } | { retention: unknown } | unknown\n\n/**\n * Create a stable query key for explain\n */\nexport function createExplainQueryKey(\n query: ExplainableQuery | null,\n options?: ExplainOptions\n): readonly unknown[] {\n if (!query) return ['cube', 'explain', null, null] as const\n return ['cube', 'explain', stableStringify(query), options?.analyze ?? false] as const\n}\n\nexport interface UseExplainQueryOptions {\n /**\n * Whether to skip the query (prevent execution even when triggered)\n * @default false\n */\n skip?: boolean\n}\n\nexport interface UseExplainQueryResult {\n /** The explain result from the server */\n explainResult: ExplainResult | null\n /** Whether the explain query is loading */\n isLoading: boolean\n /** Whether an explain has been triggered */\n hasRun: boolean\n /** Error if explain failed */\n error: Error | null\n /**\n * Manually trigger the explain query\n * @param options - Optional explain options (e.g., { analyze: true } for actual timing)\n */\n runExplain: (options?: ExplainOptions) => void\n /** Clear the explain result */\n clearExplain: () => void\n}\n\n/**\n * Check if query is a funnel query\n */\nfunction isFunnelQuery(query: unknown): query is { funnel: unknown } {\n if (!query || typeof query !== 'object') return false\n return Object.prototype.hasOwnProperty.call(query, 'funnel')\n}\n\n/**\n * Check if query is a flow query\n */\nfunction isFlowQuery(query: unknown): query is { flow: unknown } {\n if (!query || typeof query !== 'object') return false\n return Object.prototype.hasOwnProperty.call(query, 'flow')\n}\n\n/**\n * Check if query is a retention query\n */\nfunction isRetentionQuery(query: unknown): query is { retention: unknown } {\n if (!query || typeof query !== 'object') return false\n return Object.prototype.hasOwnProperty.call(query, 'retention')\n}\n\n/**\n * TanStack Query hook for EXPLAIN PLAN execution\n *\n * Unlike useDryRunQuery, this hook is manually triggered via `runExplain()`.\n * This is intentional because:\n * 1. EXPLAIN queries have performance overhead\n * 2. EXPLAIN ANALYZE actually executes the query\n * 3. Users should explicitly choose when to run explain\n *\n * Supports standard queries, funnel queries, and flow queries.\n *\n * Usage:\n * ```tsx\n * const { explainResult, isLoading, runExplain } = useExplainQuery(query, { skip: !isValidQuery })\n *\n * // Trigger explain\n * <button onClick={() => runExplain()}>Explain Plan</button>\n *\n * // Trigger explain with timing\n * <button onClick={() => runExplain({ analyze: true })}>Explain with Timing</button>\n * ```\n */\nexport function useExplainQuery(\n query: ExplainableQuery | null,\n options: UseExplainQueryOptions = {}\n): UseExplainQueryResult {\n const { skip = false } = options\n const { cubeApi } = useCubeApi()\n\n // Track whether explain has been triggered and with what options\n const [explainOptions, setExplainOptions] = useState<ExplainOptions | null>(null)\n const [hasTriggered, setHasTriggered] = useState(false)\n\n // Transform query for server\n // For funnel/flow/retention queries, pass them directly without cleaning\n const serverQuery = useMemo(() => {\n if (!query) return null\n // Funnel, flow, and retention queries have their own format, don't clean them\n if (isFunnelQuery(query) || isFlowQuery(query) || isRetentionQuery(query)) {\n return query\n }\n // Standard queries get cleaned\n return cleanQueryForServer(query as CubeQuery)\n }, [query])\n\n // Query is enabled only when:\n // 1. We have a query\n // 2. Skip is false\n // 3. User has triggered the explain\n const queryEnabled = !!serverQuery && !skip && hasTriggered\n\n const queryResult = useQuery({\n queryKey: createExplainQueryKey(serverQuery, explainOptions ?? undefined),\n queryFn: async () => {\n if (!serverQuery) throw new Error('No query provided')\n const result = await cubeApi.explain(serverQuery, explainOptions ?? undefined)\n return result\n },\n enabled: queryEnabled,\n // EXPLAIN queries should never be cached - always fetch fresh data\n // This ensures users see the latest execution plan after schema/index changes\n staleTime: 0,\n gcTime: 0,\n // Don't refetch automatically - this is manually triggered\n refetchOnWindowFocus: false,\n refetchOnReconnect: false,\n refetchOnMount: false,\n })\n\n // Manual trigger function\n const runExplain = useCallback((opts?: ExplainOptions) => {\n if (skip || !serverQuery) return\n setExplainOptions(opts ?? null)\n setHasTriggered(true)\n // If already triggered with same options, refetch\n if (hasTriggered) {\n queryResult.refetch()\n }\n }, [skip, serverQuery, hasTriggered, queryResult])\n\n // Clear function\n const clearExplain = useCallback(() => {\n setHasTriggered(false)\n setExplainOptions(null)\n }, [])\n\n return {\n explainResult: queryResult.data ?? null,\n isLoading: queryResult.isLoading || queryResult.isFetching,\n hasRun: hasTriggered,\n error: queryResult.error ?? null,\n runExplain,\n clearExplain,\n }\n}\n","/**\n * useExplainAI - TanStack Query hook for AI analysis of EXPLAIN plans\n *\n * Features:\n * - Manually triggered via useMutation (not automatic)\n * - Analyzes execution plans and provides actionable recommendations\n * - Returns structured recommendations (indexes, table changes, cube improvements)\n * - No caching - always fetches fresh analysis\n * - Uses the /api/ai/explain/analyze endpoint\n *\n * Usage:\n * ```tsx\n * const { analysis, isAnalyzing, error, analyze, clearAnalysis } = useExplainAI()\n *\n * // After getting an explain result, trigger AI analysis\n * <button onClick={() => analyze(explainResult, query)}>Analyze with AI</button>\n * ```\n */\n\nimport { useMutation, useQueryClient } from '@tanstack/react-query'\nimport { useCallback } from 'react'\nimport type { ExplainResult, AIExplainAnalysis } from '../../types.js'\nimport { useCubeFeatures } from '../../providers/CubeFeaturesProvider.js'\nimport { useCubeApi } from '../../providers/CubeApiProvider.js'\n\nexport interface UseExplainAIOptions {\n /**\n * Custom AI endpoint for explain analysis\n * @default '/api/ai/explain/analyze'\n */\n aiEndpoint?: string\n}\n\nexport interface UseExplainAIResult {\n /** The AI analysis result */\n analysis: AIExplainAnalysis | null\n /** Whether AI analysis is in progress */\n isAnalyzing: boolean\n /** Error if AI analysis failed */\n error: Error | null\n /**\n * Trigger AI analysis of an explain result\n * @param explainResult - The EXPLAIN result to analyze\n * @param query - The original semantic query\n */\n analyze: (explainResult: ExplainResult, query: unknown) => void\n /** Clear the analysis result */\n clearAnalysis: () => void\n}\n\n/**\n * Query key for AI explain analysis\n */\nexport const EXPLAIN_AI_QUERY_KEY = ['cube', 'explain', 'ai'] as const\n\n/**\n * TanStack Query hook for AI analysis of EXPLAIN plans\n *\n * This hook uses useMutation to call the AI endpoint and analyze execution plans,\n * providing actionable recommendations for performance improvement.\n *\n * Recommendations focus on what users CAN control:\n * - Index creation (with CREATE INDEX statements)\n * - Table structure changes\n * - Cube definition improvements (segments, pre-aggregations, joins)\n *\n * Usage:\n * ```tsx\n * const { analysis, isAnalyzing, analyze } = useExplainAI()\n *\n * // After running EXPLAIN\n * if (explainResult) {\n * <button onClick={() => analyze(explainResult, query)}>\n * {isAnalyzing ? 'Analyzing...' : 'Analyze with AI'}\n * </button>\n * }\n *\n * // Display recommendations\n * {analysis?.recommendations.map(rec => (\n * <div key={rec.title}>\n * <h4>{rec.title}</h4>\n * <p>{rec.description}</p>\n * {rec.sql && <pre>{rec.sql}</pre>}\n * {rec.cubeCode && <pre>{rec.cubeCode}</pre>}\n * </div>\n * ))}\n * ```\n */\nexport function useExplainAI(options: UseExplainAIOptions = {}): UseExplainAIResult {\n const { features } = useCubeFeatures()\n const { apiOptions } = useCubeApi()\n const enableAI = features.enableAI ?? true\n const queryClient = useQueryClient()\n\n // AI endpoint - defaults to /api/ai/explain/analyze\n // This is the standard path for AI routes in the dev server\n const aiEndpoint = options.aiEndpoint ?? '/api/ai/explain/analyze'\n\n const mutation = useMutation({\n mutationKey: EXPLAIN_AI_QUERY_KEY,\n mutationFn: async ({ explainResult, query }: { explainResult: ExplainResult; query: unknown }) => {\n // Check if AI is enabled\n if (!enableAI) {\n throw new Error('AI features are disabled')\n }\n\n const response = await fetch(aiEndpoint, {\n method: 'POST',\n headers: {\n 'Content-Type': 'application/json',\n ...apiOptions?.headers,\n },\n credentials: 'include',\n body: JSON.stringify({\n explainResult,\n query,\n }),\n })\n\n if (!response.ok) {\n const errorData = await response.json().catch(() => ({}))\n throw new Error(\n errorData.error ||\n errorData.message ||\n `AI analysis failed: ${response.status} ${response.statusText}`\n )\n }\n\n const result: AIExplainAnalysis = await response.json()\n return result\n },\n // No caching - each mutation is independent\n gcTime: 0,\n })\n\n const analyze = useCallback((explainResult: ExplainResult, query: unknown) => {\n mutation.mutate({ explainResult, query })\n }, [mutation])\n\n const clearAnalysis = useCallback(() => {\n mutation.reset()\n // Also invalidate any cached queries\n queryClient.removeQueries({ queryKey: EXPLAIN_AI_QUERY_KEY })\n }, [mutation, queryClient])\n\n return {\n analysis: mutation.data ?? null,\n isAnalyzing: mutation.isPending,\n error: mutation.error ?? null,\n analyze,\n clearAnalysis,\n }\n}\n"],"mappings":";;;;;AA2DA,SAAgB,EACd,GACoB;CAEpB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,OAAO,EAAY,SAAS;EAC5B;EACA;CACF;AACF;;;ACpIA,IAAa,IAAuB;CAAC;CAAQ;CAAW;AAAI;AAmC5D,SAAgB,EAAa,IAA+B,CAAC,GAAuB;CAClF,IAAM,EAAE,gBAAa,EAAgB,GAC/B,EAAE,kBAAe,EAAW,GAC5B,IAAW,EAAS,YAAY,IAChC,IAAc,EAAe,GAI7B,IAAa,EAAQ,cAAc,2BAEnC,IAAW,EAAY;EAC3B,aAAa;EACb,YAAY,OAAO,EAAE,kBAAe,eAA8D;GAEhG,IAAI,CAAC,GACH,MAAU,MAAM,0BAA0B;GAG5C,IAAM,IAAW,MAAM,MAAM,GAAY;IACvC,QAAQ;IACR,SAAS;KACP,gBAAgB;KAChB,GAAG,GAAY;IACjB;IACA,aAAa;IACb,MAAM,KAAK,UAAU;KACnB;KACA;IACF,CAAC;GACH,CAAC;GAED,IAAI,CAAC,EAAS,IAAI;IAChB,IAAM,IAAY,MAAM,EAAS,KAAK,CAAC,CAAC,aAAa,CAAC,EAAE;IACxD,MAAU,MACR,EAAU,SACR,EAAU,WACV,uBAAuB,EAAS,OAAO,GAAG,EAAS,YACvD;GACF;GAGA,OAAO,MADiC,EAAS,KAAK;EAExD;EAEA,QAAQ;CACV,CAAC,GAEK,IAAU,GAAa,GAA8B,MAAmB;EAC5E,EAAS,OAAO;GAAE;GAAe;EAAM,CAAC;CAC1C,GAAG,CAAC,CAAQ,CAAC,GAEP,IAAgB,QAAkB;EAGtC,AAFA,EAAS,MAAM,GAEf,EAAY,cAAc,EAAE,UAAU,EAAqB,CAAC;CAC9D,GAAG,CAAC,GAAU,CAAW,CAAC;CAE1B,OAAO;EACL,UAAU,EAAS,QAAQ;EAC3B,aAAa,EAAS;EACtB,OAAO,EAAS,SAAS;EACzB;EACA;CACF;AACF"}
|
|
1
|
+
{"version":3,"file":"useExplainAI-CpFZbdn-.js","names":[],"sources":["../../../src/client/hooks/queries/useDryRunQuery.ts","../../../src/client/hooks/queries/useExplainQuery.ts","../../../src/client/hooks/queries/useExplainAI.ts"],"sourcesContent":["/**\n * useDryRunQuery - TanStack Query hook for dry-run (debug) data\n *\n * Features:\n * - Fetch SQL and analysis data for query debugging\n * - Support for single and multi-query modes\n * - Built-in caching with TanStack Query\n * - Parallel fetching for multiple queries\n *\n * This hook replaces the debug data useEffect in AnalysisBuilder.\n */\n\nimport { useQuery, useQueries } from '@tanstack/react-query'\nimport { useMemo } from 'react'\nimport { useCubeApi } from '../../providers/CubeApiProvider.js'\nimport type { CubeQuery } from '../../types.js'\nimport type { QueryAnalysis } from '../../components/AnalysisBuilder/types.js'\nimport { cleanQueryForServer } from '../../shared/utils.js'\nimport { stableStringify } from '../../shared/queryKey.js'\n\nexport type DryRunMode = 'regular' | 'comparison' | 'funnel' | 'flow' | 'retention'\n\ninterface DryRunResponsePayload {\n sql?: { sql: string; params?: unknown[] }\n analysis?: QueryAnalysis | null\n mode?: DryRunMode\n queryType?: string\n joinType?: string\n cubesUsed?: string[]\n modeMetadata?: unknown\n}\n\n/**\n * Debug data entry for a single query\n */\nexport interface DebugDataEntry {\n /** Generated SQL and parameters */\n sql: { sql: string; params: unknown[] } | null\n /** Query analysis (dimensions, measures, complexity, etc.) */\n analysis: QueryAnalysis | null\n /** Server-reported dry-run mode */\n mode?: DryRunMode | null\n /** Query type label from server */\n queryType?: string | null\n /** Join strategy label from server */\n joinType?: string | null\n /** Referenced cubes from server */\n cubesUsed?: string[]\n /** Mode-specific metadata (replaces funnel/flow/retention split) */\n modeMetadata?: unknown\n /** Whether this entry is loading */\n loading: boolean\n /** Error if fetch failed */\n error: Error | null\n}\n\n/**\n * Create a stable query key for dry-run\n */\nexport function createDryRunQueryKey(\n query: CubeQuery | null\n): readonly unknown[] {\n if (!query) return ['cube', 'dryRun', null] as const\n return ['cube', 'dryRun', stableStringify(query)] as const\n}\n\nexport interface UseDryRunQueryOptions {\n /**\n * Whether to skip the query\n * @default false\n */\n skip?: boolean\n /**\n * Stale time in milliseconds\n * @default 5 * 60 * 1000 (5 minutes)\n */\n staleTime?: number\n}\n\nexport interface UseDryRunQueryResult {\n /** Debug data for the query */\n debugData: DebugDataEntry\n /** Manually refetch */\n refetch: () => void\n}\n\nfunction inferModeFromPayload(payload: DryRunResponsePayload): DryRunMode | null {\n if (payload.mode) return payload.mode\n if (payload.queryType === 'comparisonQuery') return 'comparison'\n if (payload.queryType === 'funnelQuery') return 'funnel'\n if (payload.queryType === 'flowQuery') return 'flow'\n if (payload.queryType === 'retentionQuery') return 'retention'\n if (payload.queryType === 'regularQuery') return 'regular'\n return null\n}\n\nfunction normalizeDryRunResult(payload: DryRunResponsePayload): Omit<DebugDataEntry, 'loading' | 'error'> {\n const mode = inferModeFromPayload(payload)\n return {\n sql: payload.sql ? { sql: payload.sql.sql, params: payload.sql.params || [] } : null,\n analysis: (payload.analysis || null) as QueryAnalysis | null,\n mode,\n queryType: payload.queryType || null,\n joinType: payload.joinType || null,\n cubesUsed: payload.cubesUsed || [],\n modeMetadata: payload.modeMetadata\n }\n}\n\n/**\n * TanStack Query hook for single query dry-run (debug) data\n *\n * Usage:\n * ```tsx\n * const { debugData } = useDryRunQuery(query, { skip: !isValidQuery })\n * ```\n */\nexport function useDryRunQuery(\n query: CubeQuery | null,\n options: UseDryRunQueryOptions = {}\n): UseDryRunQueryResult {\n const { skip = false, staleTime = 5 * 60 * 1000 } = options\n const { cubeApi } = useCubeApi()\n\n // Transform query for server\n const serverQuery = useMemo(() => {\n if (!query) return null\n const modeQuery = query as CubeQuery & { funnel?: unknown; flow?: unknown; retention?: unknown }\n // Preserve specialized mode payloads as-is; cleanQueryForServer strips non-Cube.js keys.\n if (modeQuery.funnel || modeQuery.flow || modeQuery.retention) {\n return query\n }\n return cleanQueryForServer(query)\n }, [query])\n\n const queryResult = useQuery({\n queryKey: createDryRunQueryKey(serverQuery),\n queryFn: async () => {\n if (!serverQuery) throw new Error('No query provided')\n const result = await cubeApi.dryRun(serverQuery)\n return normalizeDryRunResult(result as DryRunResponsePayload)\n },\n enabled: !!serverQuery && !skip,\n staleTime,\n })\n\n const debugData: DebugDataEntry = {\n ...(queryResult.data || {\n sql: null,\n analysis: null,\n mode: null,\n queryType: null,\n joinType: null,\n cubesUsed: [],\n modeMetadata: undefined\n }),\n loading: queryResult.isLoading,\n error: queryResult.error ?? null,\n }\n\n return {\n debugData,\n refetch: () => queryResult.refetch(),\n }\n}\n\nexport interface UseMultiDryRunQueriesOptions {\n /**\n * Whether to skip all queries\n * @default false\n */\n skip?: boolean\n /**\n * Stale time in milliseconds\n * @default 5 * 60 * 1000 (5 minutes)\n */\n staleTime?: number\n}\n\nexport interface UseMultiDryRunQueriesResult {\n /** Debug data for each query */\n debugDataPerQuery: DebugDataEntry[]\n /** Whether any query is loading */\n isLoading: boolean\n /** Manually refetch all */\n refetchAll: () => void\n}\n\n/**\n * TanStack Query hook for multiple query dry-runs (debug) data\n *\n * Fetches debug data for multiple queries in parallel.\n *\n * Usage:\n * ```tsx\n * const { debugDataPerQuery, isLoading } = useMultiDryRunQueries(queries, {\n * skip: !isMultiQueryMode\n * })\n * ```\n */\nexport function useMultiDryRunQueries(\n queries: CubeQuery[],\n options: UseMultiDryRunQueriesOptions = {}\n): UseMultiDryRunQueriesResult {\n const { skip = false, staleTime = 5 * 60 * 1000 } = options\n const { cubeApi } = useCubeApi()\n\n // Transform queries for server\n const serverQueries = useMemo(() => {\n return queries.map((q) => cleanQueryForServer(q))\n }, [queries])\n\n // Use useQueries for parallel fetching\n const queryResults = useQueries({\n queries: serverQueries.map((query) => ({\n queryKey: createDryRunQueryKey(query),\n queryFn: async () => {\n const result = await cubeApi.dryRun(query)\n return normalizeDryRunResult(result as DryRunResponsePayload)\n },\n enabled: !skip,\n staleTime,\n })),\n })\n\n // Transform results to DebugDataEntry array\n const debugDataPerQuery: DebugDataEntry[] = queryResults.map((result) => ({\n ...(result.data || {\n sql: null,\n analysis: null,\n mode: null,\n queryType: null,\n joinType: null,\n cubesUsed: [],\n modeMetadata: undefined\n }),\n loading: result.isLoading,\n error: result.error ?? null,\n }))\n\n // Check if any query is loading\n const isLoading = queryResults.some((r) => r.isLoading)\n\n // Refetch all queries\n const refetchAll = () => {\n queryResults.forEach((r) => r.refetch())\n }\n\n return {\n debugDataPerQuery,\n isLoading,\n refetchAll,\n }\n}\n\n/**\n * Combined hook for single or multi-query dry-run based on mode\n *\n * This is a convenience wrapper that automatically chooses between\n * single and multi-query dry-run based on the number of queries.\n *\n * Usage:\n * ```tsx\n * const { debugDataPerQuery } = useDryRunQueries({\n * queries: isMultiQueryMode ? allQueries : [currentQuery],\n * isMultiQueryMode,\n * skip: !isValidQuery\n * })\n * ```\n */\nexport function useDryRunQueries(options: {\n queries: CubeQuery[]\n isMultiQueryMode: boolean\n skip?: boolean\n staleTime?: number\n}): UseMultiDryRunQueriesResult {\n const { queries, isMultiQueryMode, skip = false, staleTime } = options\n\n // For single query mode, wrap in array for consistent interface\n const queriesToFetch = isMultiQueryMode ? queries : queries.slice(0, 1)\n\n return useMultiDryRunQueries(queriesToFetch, { skip, staleTime })\n}\n\nexport type FunnelDebugDataEntry = DebugDataEntry\n\n/**\n * TanStack Query hook for funnel query dry-run (debug) data\n *\n * Usage:\n * ```tsx\n * const { debugData } = useFunnelDryRunQuery(serverQuery, { skip: !isFunnelMode })\n * ```\n */\nexport function useFunnelDryRunQuery(\n serverQuery: unknown | null,\n options: UseDryRunQueryOptions = {}\n): { debugData: FunnelDebugDataEntry; refetch: () => void } {\n return useDryRunQuery(serverQuery as CubeQuery | null, options)\n}\n\nexport type FlowDebugDataEntry = DebugDataEntry\n\n/**\n * TanStack Query hook for flow query dry-run (debug) data\n *\n * Usage:\n * ```tsx\n * const { debugData } = useFlowDryRunQuery(serverQuery, { skip: !isFlowMode })\n * ```\n */\nexport function useFlowDryRunQuery(\n serverQuery: unknown | null,\n options: UseDryRunQueryOptions = {}\n): { debugData: FlowDebugDataEntry; refetch: () => void } {\n return useDryRunQuery(serverQuery as CubeQuery | null, options)\n}\n\nexport type RetentionDebugDataEntry = DebugDataEntry\n\n/**\n * TanStack Query hook for retention query dry-run (debug) data\n *\n * Usage:\n * ```tsx\n * const { debugData } = useRetentionDryRunQuery(serverQuery, { skip: !isRetentionMode })\n * ```\n */\nexport function useRetentionDryRunQuery(\n serverQuery: unknown | null,\n options: UseDryRunQueryOptions = {}\n): { debugData: RetentionDebugDataEntry; refetch: () => void } {\n return useDryRunQuery(serverQuery as CubeQuery | null, options)\n}\n","/**\n * useExplainQuery - TanStack Query hook for EXPLAIN PLAN execution\n *\n * Features:\n * - Manually triggered (not automatic like useCubeLoadQuery)\n * - Returns normalized execution plan across PostgreSQL, MySQL, and SQLite\n * - Supports EXPLAIN ANALYZE for actual timing data\n * - No caching - always fetches fresh data to reflect schema/index changes\n *\n * Usage:\n * ```tsx\n * const { explainResult, isLoading, error, runExplain } = useExplainQuery(query)\n *\n * // Trigger explain manually\n * <button onClick={() => runExplain({ analyze: true })}>Explain with Timing</button>\n * ```\n */\n\nimport { useQuery } from '@tanstack/react-query'\nimport { useCallback, useMemo, useState } from 'react'\nimport { useCubeApi } from '../../providers/CubeApiProvider.js'\nimport type { CubeQuery, ExplainResult, ExplainOptions } from '../../types.js'\nimport { cleanQueryForServer } from '../../shared/utils.js'\nimport { stableStringify } from '../../shared/queryKey.js'\n\n/**\n * Query type that can be explained - includes standard queries, funnel queries, flow queries, and retention queries\n */\nexport type ExplainableQuery = CubeQuery | { funnel: unknown } | { flow: unknown } | { retention: unknown } | unknown\n\n/**\n * Create a stable query key for explain\n */\nexport function createExplainQueryKey(\n query: ExplainableQuery | null,\n options?: ExplainOptions\n): readonly unknown[] {\n if (!query) return ['cube', 'explain', null, null] as const\n return ['cube', 'explain', stableStringify(query), options?.analyze ?? false] as const\n}\n\nexport interface UseExplainQueryOptions {\n /**\n * Whether to skip the query (prevent execution even when triggered)\n * @default false\n */\n skip?: boolean\n}\n\nexport interface UseExplainQueryResult {\n /** The explain result from the server */\n explainResult: ExplainResult | null\n /** Whether the explain query is loading */\n isLoading: boolean\n /** Whether an explain has been triggered */\n hasRun: boolean\n /** Error if explain failed */\n error: Error | null\n /**\n * Manually trigger the explain query\n * @param options - Optional explain options (e.g., { analyze: true } for actual timing)\n */\n runExplain: (options?: ExplainOptions) => void\n /** Clear the explain result */\n clearExplain: () => void\n}\n\n/**\n * Check if query is a funnel query\n */\nfunction isFunnelQuery(query: unknown): query is { funnel: unknown } {\n if (!query || typeof query !== 'object') return false\n return Object.prototype.hasOwnProperty.call(query, 'funnel')\n}\n\n/**\n * Check if query is a flow query\n */\nfunction isFlowQuery(query: unknown): query is { flow: unknown } {\n if (!query || typeof query !== 'object') return false\n return Object.prototype.hasOwnProperty.call(query, 'flow')\n}\n\n/**\n * Check if query is a retention query\n */\nfunction isRetentionQuery(query: unknown): query is { retention: unknown } {\n if (!query || typeof query !== 'object') return false\n return Object.prototype.hasOwnProperty.call(query, 'retention')\n}\n\n/**\n * TanStack Query hook for EXPLAIN PLAN execution\n *\n * Unlike useDryRunQuery, this hook is manually triggered via `runExplain()`.\n * This is intentional because:\n * 1. EXPLAIN queries have performance overhead\n * 2. EXPLAIN ANALYZE actually executes the query\n * 3. Users should explicitly choose when to run explain\n *\n * Supports standard queries, funnel queries, and flow queries.\n *\n * Usage:\n * ```tsx\n * const { explainResult, isLoading, runExplain } = useExplainQuery(query, { skip: !isValidQuery })\n *\n * // Trigger explain\n * <button onClick={() => runExplain()}>Explain Plan</button>\n *\n * // Trigger explain with timing\n * <button onClick={() => runExplain({ analyze: true })}>Explain with Timing</button>\n * ```\n */\nexport function useExplainQuery(\n query: ExplainableQuery | null,\n options: UseExplainQueryOptions = {}\n): UseExplainQueryResult {\n const { skip = false } = options\n const { cubeApi } = useCubeApi()\n\n // Track whether explain has been triggered and with what options\n const [explainOptions, setExplainOptions] = useState<ExplainOptions | null>(null)\n const [hasTriggered, setHasTriggered] = useState(false)\n\n // Transform query for server\n // For funnel/flow/retention queries, pass them directly without cleaning\n const serverQuery = useMemo(() => {\n if (!query) return null\n // Funnel, flow, and retention queries have their own format, don't clean them\n if (isFunnelQuery(query) || isFlowQuery(query) || isRetentionQuery(query)) {\n return query\n }\n // Standard queries get cleaned\n return cleanQueryForServer(query as CubeQuery)\n }, [query])\n\n // Query is enabled only when:\n // 1. We have a query\n // 2. Skip is false\n // 3. User has triggered the explain\n const queryEnabled = !!serverQuery && !skip && hasTriggered\n\n const queryResult = useQuery({\n queryKey: createExplainQueryKey(serverQuery, explainOptions ?? undefined),\n queryFn: async () => {\n if (!serverQuery) throw new Error('No query provided')\n const result = await cubeApi.explain(serverQuery, explainOptions ?? undefined)\n return result\n },\n enabled: queryEnabled,\n // EXPLAIN queries should never be cached - always fetch fresh data\n // This ensures users see the latest execution plan after schema/index changes\n staleTime: 0,\n gcTime: 0,\n // Don't refetch automatically - this is manually triggered\n refetchOnWindowFocus: false,\n refetchOnReconnect: false,\n refetchOnMount: false,\n })\n\n // Manual trigger function\n const runExplain = useCallback((opts?: ExplainOptions) => {\n if (skip || !serverQuery) return\n setExplainOptions(opts ?? null)\n setHasTriggered(true)\n // If already triggered with same options, refetch\n if (hasTriggered) {\n queryResult.refetch()\n }\n }, [skip, serverQuery, hasTriggered, queryResult])\n\n // Clear function\n const clearExplain = useCallback(() => {\n setHasTriggered(false)\n setExplainOptions(null)\n }, [])\n\n return {\n explainResult: queryResult.data ?? null,\n isLoading: queryResult.isLoading || queryResult.isFetching,\n hasRun: hasTriggered,\n error: queryResult.error ?? null,\n runExplain,\n clearExplain,\n }\n}\n","/**\n * useExplainAI - TanStack Query hook for AI analysis of EXPLAIN plans\n *\n * Features:\n * - Manually triggered via useMutation (not automatic)\n * - Analyzes execution plans and provides actionable recommendations\n * - Returns structured recommendations (indexes, table changes, cube improvements)\n * - No caching - always fetches fresh analysis\n * - Uses the /api/ai/explain/analyze endpoint\n *\n * Usage:\n * ```tsx\n * const { analysis, isAnalyzing, error, analyze, clearAnalysis } = useExplainAI()\n *\n * // After getting an explain result, trigger AI analysis\n * <button onClick={() => analyze(explainResult, query)}>Analyze with AI</button>\n * ```\n */\n\nimport { useMutation, useQueryClient } from '@tanstack/react-query'\nimport { useCallback } from 'react'\nimport type { ExplainResult, AIExplainAnalysis } from '../../types.js'\nimport { useCubeFeatures } from '../../providers/CubeFeaturesProvider.js'\nimport { useCubeApi } from '../../providers/CubeApiProvider.js'\n\nexport interface UseExplainAIOptions {\n /**\n * Custom AI endpoint for explain analysis\n * @default '/api/ai/explain/analyze'\n */\n aiEndpoint?: string\n}\n\nexport interface UseExplainAIResult {\n /** The AI analysis result */\n analysis: AIExplainAnalysis | null\n /** Whether AI analysis is in progress */\n isAnalyzing: boolean\n /** Error if AI analysis failed */\n error: Error | null\n /**\n * Trigger AI analysis of an explain result\n * @param explainResult - The EXPLAIN result to analyze\n * @param query - The original semantic query\n */\n analyze: (explainResult: ExplainResult, query: unknown) => void\n /** Clear the analysis result */\n clearAnalysis: () => void\n}\n\n/**\n * Query key for AI explain analysis\n */\nexport const EXPLAIN_AI_QUERY_KEY = ['cube', 'explain', 'ai'] as const\n\n/**\n * TanStack Query hook for AI analysis of EXPLAIN plans\n *\n * This hook uses useMutation to call the AI endpoint and analyze execution plans,\n * providing actionable recommendations for performance improvement.\n *\n * Recommendations focus on what users CAN control:\n * - Index creation (with CREATE INDEX statements)\n * - Table structure changes\n * - Cube definition improvements (segments, pre-aggregations, joins)\n *\n * Usage:\n * ```tsx\n * const { analysis, isAnalyzing, analyze } = useExplainAI()\n *\n * // After running EXPLAIN\n * if (explainResult) {\n * <button onClick={() => analyze(explainResult, query)}>\n * {isAnalyzing ? 'Analyzing...' : 'Analyze with AI'}\n * </button>\n * }\n *\n * // Display recommendations\n * {analysis?.recommendations.map(rec => (\n * <div key={rec.title}>\n * <h4>{rec.title}</h4>\n * <p>{rec.description}</p>\n * {rec.sql && <pre>{rec.sql}</pre>}\n * {rec.cubeCode && <pre>{rec.cubeCode}</pre>}\n * </div>\n * ))}\n * ```\n */\nexport function useExplainAI(options: UseExplainAIOptions = {}): UseExplainAIResult {\n const { features } = useCubeFeatures()\n const { apiOptions } = useCubeApi()\n const enableAI = features.enableAI ?? true\n const queryClient = useQueryClient()\n\n // AI endpoint - defaults to /api/ai/explain/analyze\n // This is the standard path for AI routes in the dev server\n const aiEndpoint = options.aiEndpoint ?? '/api/ai/explain/analyze'\n\n const mutation = useMutation({\n mutationKey: EXPLAIN_AI_QUERY_KEY,\n mutationFn: async ({ explainResult, query }: { explainResult: ExplainResult; query: unknown }) => {\n // Check if AI is enabled\n if (!enableAI) {\n throw new Error('AI features are disabled')\n }\n\n const response = await fetch(aiEndpoint, {\n method: 'POST',\n headers: {\n 'Content-Type': 'application/json',\n ...apiOptions?.headers,\n },\n credentials: 'include',\n body: JSON.stringify({\n explainResult,\n query,\n }),\n })\n\n if (!response.ok) {\n const errorData = await response.json().catch(() => ({}))\n throw new Error(\n errorData.error ||\n errorData.message ||\n `AI analysis failed: ${response.status} ${response.statusText}`\n )\n }\n\n const result: AIExplainAnalysis = await response.json()\n return result\n },\n // No caching - each mutation is independent\n gcTime: 0,\n })\n\n const analyze = useCallback((explainResult: ExplainResult, query: unknown) => {\n mutation.mutate({ explainResult, query })\n }, [mutation])\n\n const clearAnalysis = useCallback(() => {\n mutation.reset()\n // Also invalidate any cached queries\n queryClient.removeQueries({ queryKey: EXPLAIN_AI_QUERY_KEY })\n }, [mutation, queryClient])\n\n return {\n analysis: mutation.data ?? null,\n isAnalyzing: mutation.isPending,\n error: mutation.error ?? null,\n analyze,\n clearAnalysis,\n }\n}\n"],"mappings":";;;;;AA2DA,SAAgB,EACd,GACoB;CAEpB,OADK,IACE;EAAC;EAAQ;EAAU,EAAgB,CAAK;CAAC,IAD7B;EAAC;EAAQ;EAAU;CAAI;AAE5C;AAsBA,SAAS,EAAqB,GAAmD;CAO/E,OANI,EAAQ,OAAa,EAAQ,OAC7B,EAAQ,cAAc,oBAA0B,eAChD,EAAQ,cAAc,gBAAsB,WAC5C,EAAQ,cAAc,cAAoB,SAC1C,EAAQ,cAAc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,cAAc,2BAEnC,IAAW,EAAY;EAC3B,aAAa;EACb,YAAY,OAAO,EAAE,kBAAe,eAA8D;GAEhG,IAAI,CAAC,GACH,MAAU,MAAM,0BAA0B;GAG5C,IAAM,IAAW,MAAM,MAAM,GAAY;IACvC,QAAQ;IACR,SAAS;KACP,gBAAgB;KAChB,GAAG,GAAY;IACjB;IACA,aAAa;IACb,MAAM,KAAK,UAAU;KACnB;KACA;IACF,CAAC;GACH,CAAC;GAED,IAAI,CAAC,EAAS,IAAI;IAChB,IAAM,IAAY,MAAM,EAAS,KAAK,CAAC,CAAC,aAAa,CAAC,EAAE;IACxD,MAAU,MACR,EAAU,SACR,EAAU,WACV,uBAAuB,EAAS,OAAO,GAAG,EAAS,YACvD;GACF;GAGA,OAAO,MADiC,EAAS,KAAK;EAExD;EAEA,QAAQ;CACV,CAAC,GAEK,IAAU,GAAa,GAA8B,MAAmB;EAC5E,EAAS,OAAO;GAAE;GAAe;EAAM,CAAC;CAC1C,GAAG,CAAC,CAAQ,CAAC,GAEP,IAAgB,QAAkB;EAGtC,AAFA,EAAS,MAAM,GAEf,EAAY,cAAc,EAAE,UAAU,EAAqB,CAAC;CAC9D,GAAG,CAAC,GAAU,CAAW,CAAC;CAE1B,OAAO;EACL,UAAU,EAAS,QAAQ;EAC3B,aAAa,EAAS;EACtB,OAAO,EAAS,SAAS;EACzB;EACA;CACF;AACF"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"utils-CToHkuhU.js","names":[],"sources":["../../../src/client/utils/index.ts"],"sourcesContent":["/**\n * Utility functions for drizzle-cube client\n */\n\nimport type { PortletConfig, DashboardConfig } from '../types.js'\n\n// Re-export chart utilities\nexport * from './chartUtils.js'\nexport * from './chartConstants.js'\nexport * from './measureIcons.js'\nexport * from './periodUtils.js'\nexport * from './pivotUtils.js'\nexport * from './syntaxHighlighting.js'\nexport * from './comparisonUtils.js'\n\n// Thumbnail utilities (requires html2canvas peer dependency)\nexport { captureThumbnail, isThumbnailCaptureAvailable } from './thumbnail.js'\n\n// XLSX export utilities (requires exceljs peer dependency)\nexport { exportPortletToXlsx, isExportAvailable } from './exportXlsx.js'\n\n/**\n * Create a dashboard layout from portlet configurations\n */\nexport function createDashboardLayout(portlets: PortletConfig[]): DashboardConfig {\n const layouts = generateResponsiveLayouts(portlets)\n \n return {\n portlets,\n layouts\n }\n}\n\n/**\n * Generate responsive layouts for different breakpoints\n */\nexport function generateResponsiveLayouts(portlets: PortletConfig[]) {\n const gridLayout = portlets.map(portlet => ({\n i: portlet.id,\n x: portlet.x,\n y: portlet.y,\n w: portlet.w,\n h: portlet.h,\n minW: 3,\n minH: 3\n }))\n\n return {\n lg: gridLayout,\n md: gridLayout.map(item => ({ ...item, w: Math.min(item.w, 8) })),\n sm: gridLayout.map(item => ({ ...item, w: Math.min(item.w, 6) })),\n xs: gridLayout.map(item => ({ ...item, w: Math.min(item.w, 4) })),\n xxs: gridLayout.map(item => ({ ...item, w: 2 }))\n }\n}\n\n/**\n * Format chart data for display\n */\nexport function formatChartData(data: any[], options: {\n formatNumbers?: boolean\n precision?: number\n} = {}): any[] {\n const { formatNumbers = true, precision = 2 } = options\n\n if (!formatNumbers) return data\n\n return data.map(row => {\n const formattedRow: any = {}\n \n for (const [key, value] of Object.entries(row)) {\n if (typeof value === 'number') {\n formattedRow[key] = Number(value.toFixed(precision))\n } else {\n formattedRow[key] = value\n }\n }\n \n return formattedRow\n })\n}\n\n/**\n * Generate a unique ID for new portlets\n */\nexport function generatePortletId(): string {\n return `portlet-${Date.now()}-${Math.random().toString(36).substr(2, 9)}`\n}\n\n/**\n * Find the next available position in a grid\n */\nexport function findNextPosition(existingPortlets: PortletConfig[], _w: number = 6, _h: number = 4): { x: number; y: number } {\n if (existingPortlets.length === 0) {\n return { x: 0, y: 0 }\n }\n\n // Find the maximum Y position and height\n const maxY = Math.max(...existingPortlets.map(p => p.y + p.h))\n \n return { x: 0, y: maxY }\n}\n\n/**\n * Validate a cube query JSON string\n */\nexport function validateCubeQuery(queryString: string): { valid: boolean; error?: string; query?: any } {\n try {\n const query = JSON.parse(queryString)\n \n // Basic validation\n if (typeof query !== 'object' || query === null) {\n return { valid: false, error: 'Query must be a JSON object' }\n }\n\n // Check for required fields\n if (!query.measures && !query.dimensions) {\n return { valid: false, error: 'Query must have at least measures or dimensions' }\n }\n\n return { valid: true, query }\n } catch {\n return { valid: false, error: 'Invalid JSON format' }\n }\n}\n\n/**\n * Create a sample portlet configuration\n */\nexport function createSamplePortlet(): Omit<PortletConfig, 'id'> {\n return {\n title: 'Sample Chart',\n query: JSON.stringify({\n measures: ['count'],\n dimensions: ['category']\n }, null, 2),\n chartType: 'bar',\n chartConfig: {\n x: 'category',\n y: ['count']\n },\n displayConfig: {\n showLegend: true,\n showGrid: true,\n showTooltip: true\n },\n w: 6,\n h: 4,\n x: 0,\n y: 0\n }\n}"],"mappings":";
|
|
1
|
+
{"version":3,"file":"utils-CToHkuhU.js","names":[],"sources":["../../../src/client/utils/index.ts"],"sourcesContent":["/**\n * Utility functions for drizzle-cube client\n */\n\nimport type { PortletConfig, DashboardConfig } from '../types.js'\n\n// Re-export chart utilities\nexport * from './chartUtils.js'\nexport * from './chartConstants.js'\nexport * from './measureIcons.js'\nexport * from './periodUtils.js'\nexport * from './pivotUtils.js'\nexport * from './syntaxHighlighting.js'\nexport * from './comparisonUtils.js'\n\n// Thumbnail utilities (requires html2canvas peer dependency)\nexport { captureThumbnail, isThumbnailCaptureAvailable } from './thumbnail.js'\n\n// XLSX export utilities (requires exceljs peer dependency)\nexport { exportPortletToXlsx, isExportAvailable } from './exportXlsx.js'\n\n// Dashboard JSON export / import (no extra dependency)\nexport {\n createDashboardExport,\n serializeDashboardExport,\n parseDashboardExport,\n readDashboardExportFile,\n downloadDashboardExport,\n dashboardExportFilename,\n normalizeDashboardConfigForExport,\n} from './dashboardExport.js'\nexport type {\n DashboardExportFile,\n DashboardImportResult,\n DashboardImportError,\n DashboardImportWarning,\n} from './dashboardExport.js'\n\n/**\n * Create a dashboard layout from portlet configurations\n */\nexport function createDashboardLayout(portlets: PortletConfig[]): DashboardConfig {\n const layouts = generateResponsiveLayouts(portlets)\n \n return {\n portlets,\n layouts\n }\n}\n\n/**\n * Generate responsive layouts for different breakpoints\n */\nexport function generateResponsiveLayouts(portlets: PortletConfig[]) {\n const gridLayout = portlets.map(portlet => ({\n i: portlet.id,\n x: portlet.x,\n y: portlet.y,\n w: portlet.w,\n h: portlet.h,\n minW: 3,\n minH: 3\n }))\n\n return {\n lg: gridLayout,\n md: gridLayout.map(item => ({ ...item, w: Math.min(item.w, 8) })),\n sm: gridLayout.map(item => ({ ...item, w: Math.min(item.w, 6) })),\n xs: gridLayout.map(item => ({ ...item, w: Math.min(item.w, 4) })),\n xxs: gridLayout.map(item => ({ ...item, w: 2 }))\n }\n}\n\n/**\n * Format chart data for display\n */\nexport function formatChartData(data: any[], options: {\n formatNumbers?: boolean\n precision?: number\n} = {}): any[] {\n const { formatNumbers = true, precision = 2 } = options\n\n if (!formatNumbers) return data\n\n return data.map(row => {\n const formattedRow: any = {}\n \n for (const [key, value] of Object.entries(row)) {\n if (typeof value === 'number') {\n formattedRow[key] = Number(value.toFixed(precision))\n } else {\n formattedRow[key] = value\n }\n }\n \n return formattedRow\n })\n}\n\n/**\n * Generate a unique ID for new portlets\n */\nexport function generatePortletId(): string {\n return `portlet-${Date.now()}-${Math.random().toString(36).substr(2, 9)}`\n}\n\n/**\n * Find the next available position in a grid\n */\nexport function findNextPosition(existingPortlets: PortletConfig[], _w: number = 6, _h: number = 4): { x: number; y: number } {\n if (existingPortlets.length === 0) {\n return { x: 0, y: 0 }\n }\n\n // Find the maximum Y position and height\n const maxY = Math.max(...existingPortlets.map(p => p.y + p.h))\n \n return { x: 0, y: maxY }\n}\n\n/**\n * Validate a cube query JSON string\n */\nexport function validateCubeQuery(queryString: string): { valid: boolean; error?: string; query?: any } {\n try {\n const query = JSON.parse(queryString)\n \n // Basic validation\n if (typeof query !== 'object' || query === null) {\n return { valid: false, error: 'Query must be a JSON object' }\n }\n\n // Check for required fields\n if (!query.measures && !query.dimensions) {\n return { valid: false, error: 'Query must have at least measures or dimensions' }\n }\n\n return { valid: true, query }\n } catch {\n return { valid: false, error: 'Invalid JSON format' }\n }\n}\n\n/**\n * Create a sample portlet configuration\n */\nexport function createSamplePortlet(): Omit<PortletConfig, 'id'> {\n return {\n title: 'Sample Chart',\n query: JSON.stringify({\n measures: ['count'],\n dimensions: ['category']\n }, null, 2),\n chartType: 'bar',\n chartConfig: {\n x: 'category',\n y: ['count']\n },\n displayConfig: {\n showLegend: true,\n showGrid: true,\n showTooltip: true\n },\n w: 6,\n h: 4,\n x: 0,\n y: 0\n }\n}"],"mappings":";AAyCA,SAAgB,EAAsB,GAA4C;CAGhF,OAAO;EACL;EACA,SAJc,EAA0B,CAIxC;CACF;AACF;AAKA,SAAgB,EAA0B,GAA2B;CACnE,IAAM,IAAa,EAAS,KAAI,OAAY;EAC1C,GAAG,EAAQ;EACX,GAAG,EAAQ;EACX,GAAG,EAAQ;EACX,GAAG,EAAQ;EACX,GAAG,EAAQ;EACX,MAAM;EACN,MAAM;CACR,EAAE;CAEF,OAAO;EACL,IAAI;EACJ,IAAI,EAAW,KAAI,OAAS;GAAE,GAAG;GAAM,GAAG,KAAK,IAAI,EAAK,GAAG,CAAC;EAAE,EAAE;EAChE,IAAI,EAAW,KAAI,OAAS;GAAE,GAAG;GAAM,GAAG,KAAK,IAAI,EAAK,GAAG,CAAC;EAAE,EAAE;EAChE,IAAI,EAAW,KAAI,OAAS;GAAE,GAAG;GAAM,GAAG,KAAK,IAAI,EAAK,GAAG,CAAC;EAAE,EAAE;EAChE,KAAK,EAAW,KAAI,OAAS;GAAE,GAAG;GAAM,GAAG;EAAE,EAAE;CACjD;AACF;AAKA,SAAgB,EAAgB,GAAa,IAGzC,CAAC,GAAU;CACb,IAAM,EAAE,mBAAgB,IAAM,eAAY,MAAM;CAIhD,OAFK,IAEE,EAAK,KAAI,MAAO;EACrB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ldown-runtime-DArdT4gl.js";
|
|
2
|
-
import { $ as t, G as n, J as r, K as i, Q as a, X as o, Y as s, Z as c, at as l, ct as u, et as d, it as f, nt as p, ot as m, q as h, rt as g, st as _, tt as v } from "./chart-data-table-
|
|
2
|
+
import { $ as t, G as n, J as r, K as i, Q as a, X as o, Y as s, Z as c, at as l, ct as u, et as d, it as f, nt as p, ot as m, q as h, rt as g, st as _, tt as v } from "./chart-data-table-DkkQtuY6.js";
|
|
3
3
|
import * as y from "react";
|
|
4
4
|
import b from "react";
|
|
5
5
|
//#region node_modules/react-intersection-observer/dist/index.mjs
|
|
@@ -889,4 +889,4 @@ var de = /* @__PURE__ */ e(((e, t) => {
|
|
|
889
889
|
//#endregion
|
|
890
890
|
export { oe as a, ae as c, ce as i, ie as l, ue as n, R as o, q as r, I as s, de as t, te as u };
|
|
891
891
|
|
|
892
|
-
//# sourceMappingURL=vendor-
|
|
892
|
+
//# sourceMappingURL=vendor-wyAsikWW.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"vendor-wyAsikWW.js","names":["React2","React","React"],"sources":["../../../node_modules/react-intersection-observer/dist/index.mjs","../../../node_modules/@tanstack/query-core/build/modern/mutationObserver.js","../../../node_modules/@tanstack/query-core/build/modern/queriesObserver.js","../../../node_modules/@tanstack/react-query/build/modern/useQueries.js","../../../node_modules/@tanstack/react-query/build/modern/useMutation.js","../../../node_modules/zustand/esm/vanilla.mjs","../../../node_modules/zustand/esm/react.mjs","../../../node_modules/zustand/esm/middleware.mjs","../../../node_modules/zustand/esm/vanilla/shallow.mjs","../../../node_modules/zustand/esm/react/shallow.mjs","../../../node_modules/lz-string/libs/lz-string.js"],"sourcesContent":["\"use client\";\nvar __defProp = Object.defineProperty;\nvar __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;\nvar __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== \"symbol\" ? key + \"\" : key, value);\n\n// src/InView.tsx\nimport * as React from \"react\";\n\n// src/observe.ts\nvar observerMap = /* @__PURE__ */ new Map();\nvar RootIds = /* @__PURE__ */ new WeakMap();\nvar rootId = 0;\nvar unsupportedValue;\nfunction defaultFallbackInView(inView) {\n unsupportedValue = inView;\n}\nfunction getRootId(root) {\n if (!root) return \"0\";\n if (RootIds.has(root)) return RootIds.get(root);\n rootId += 1;\n RootIds.set(root, rootId.toString());\n return RootIds.get(root);\n}\nfunction optionsToId(options) {\n return Object.keys(options).sort().filter(\n (key) => options[key] !== void 0\n ).map((key) => {\n return `${key}_${key === \"root\" ? getRootId(options.root) : options[key]}`;\n }).toString();\n}\nfunction createObserver(options) {\n const id = optionsToId(options);\n let instance = observerMap.get(id);\n if (!instance) {\n const elements = /* @__PURE__ */ new Map();\n let thresholds;\n const observer = new IntersectionObserver((entries) => {\n entries.forEach((entry) => {\n var _a;\n const inView = entry.isIntersecting && thresholds.some((threshold) => entry.intersectionRatio >= threshold);\n if (options.trackVisibility && typeof entry.isVisible === \"undefined\") {\n entry.isVisible = inView;\n }\n [...(_a = elements.get(entry.target)) != null ? _a : []].forEach((callback) => {\n callback(inView, entry);\n });\n });\n }, options);\n thresholds = observer.thresholds || (Array.isArray(options.threshold) ? options.threshold : [options.threshold || 0]);\n instance = {\n id,\n observer,\n elements\n };\n observerMap.set(id, instance);\n }\n return instance;\n}\nfunction observe(element, callback, options = {}, fallbackInView = unsupportedValue) {\n if (typeof window.IntersectionObserver === \"undefined\" && fallbackInView !== void 0) {\n const bounds = element.getBoundingClientRect();\n callback(fallbackInView, {\n isIntersecting: fallbackInView,\n target: element,\n intersectionRatio: typeof options.threshold === \"number\" ? options.threshold : 0,\n time: 0,\n boundingClientRect: bounds,\n intersectionRect: bounds,\n rootBounds: bounds\n });\n return () => {\n };\n }\n const { id, observer, elements } = createObserver(options);\n const callbacks = elements.get(element) || [];\n if (!elements.has(element)) {\n elements.set(element, callbacks);\n }\n callbacks.push(callback);\n observer.observe(element);\n let unobserved = false;\n return function unobserve() {\n if (unobserved) return;\n unobserved = true;\n callbacks.splice(callbacks.indexOf(callback), 1);\n if (callbacks.length === 0) {\n elements.delete(element);\n observer.unobserve(element);\n }\n if (elements.size === 0) {\n observer.disconnect();\n observerMap.delete(id);\n }\n };\n}\n\n// src/InView.tsx\nfunction isPlainChildren(props) {\n return typeof props.children !== \"function\";\n}\nvar InView = class extends React.Component {\n constructor(props) {\n super(props);\n __publicField(this, \"node\", null);\n __publicField(this, \"_unobserveCb\", null);\n __publicField(this, \"lastInView\");\n __publicField(this, \"handleNode\", (node) => {\n if (this.node) {\n this.unobserve();\n if (!node && !this.props.triggerOnce && !this.props.skip) {\n this.setState({ inView: !!this.props.initialInView, entry: void 0 });\n this.lastInView = this.props.initialInView;\n }\n }\n this.node = node ? node : null;\n this.observeNode();\n });\n __publicField(this, \"handleChange\", (inView, entry) => {\n const previousInView = this.lastInView;\n this.lastInView = inView;\n if (previousInView === void 0 && !inView) {\n return;\n }\n if (inView && this.props.triggerOnce) {\n this.unobserve();\n }\n if (!isPlainChildren(this.props)) {\n this.setState({ inView, entry });\n }\n if (this.props.onChange) {\n this.props.onChange(inView, entry);\n }\n });\n this.state = {\n inView: !!props.initialInView,\n entry: void 0\n };\n this.lastInView = props.initialInView;\n }\n componentDidMount() {\n this.unobserve();\n this.observeNode();\n }\n componentDidUpdate(prevProps) {\n if (prevProps.rootMargin !== this.props.rootMargin || prevProps.scrollMargin !== this.props.scrollMargin || prevProps.root !== this.props.root || prevProps.threshold !== this.props.threshold || prevProps.triggerOnce !== this.props.triggerOnce || prevProps.skip !== this.props.skip || prevProps.trackVisibility !== this.props.trackVisibility || prevProps.delay !== this.props.delay) {\n this.unobserve();\n this.observeNode();\n }\n }\n componentWillUnmount() {\n this.unobserve();\n }\n observeNode() {\n if (!this.node || this.props.skip) return;\n const {\n threshold,\n root,\n rootMargin,\n scrollMargin,\n trackVisibility,\n delay,\n fallbackInView\n } = this.props;\n if (this.lastInView === void 0) {\n this.lastInView = this.props.initialInView;\n }\n this._unobserveCb = observe(\n this.node,\n this.handleChange,\n {\n threshold,\n root,\n rootMargin,\n scrollMargin,\n trackVisibility,\n delay\n },\n fallbackInView\n );\n }\n unobserve() {\n if (this._unobserveCb) {\n this._unobserveCb();\n this._unobserveCb = null;\n }\n }\n render() {\n const { children } = this.props;\n if (typeof children === \"function\") {\n const { inView, entry } = this.state;\n return children({ inView, entry, ref: this.handleNode });\n }\n const {\n as,\n triggerOnce,\n threshold,\n root,\n rootMargin,\n scrollMargin,\n onChange,\n skip,\n trackVisibility,\n delay,\n initialInView,\n fallbackInView,\n ...props\n } = this.props;\n return React.createElement(\n as || \"div\",\n { ref: this.handleNode, ...props },\n children\n );\n }\n};\n\n// src/useInView.tsx\nimport * as React3 from \"react\";\n\n// src/useIntersectionObserverRef.ts\nimport * as React2 from \"react\";\nvar useInsertionEffect = Reflect.get(React2, \"useInsertionEffect\");\nvar useSyncEffect = useInsertionEffect != null ? useInsertionEffect : React2.useEffect;\nfunction supportsRefCleanup(version2) {\n return (version2 == null ? void 0 : version2.startsWith(\"19.\")) || false;\n}\nvar canUseRefCleanup = supportsRefCleanup(React2.version);\nfunction useIntersectionObserverRef(onIntersectionChange, {\n threshold,\n root,\n rootMargin,\n scrollMargin,\n trackVisibility,\n delay,\n fallbackInView,\n skip,\n triggerOnce\n}) {\n const onIntersectionChangeRef = React2.useRef(onIntersectionChange);\n const observerStateRef = React2.useRef({\n node: null,\n stop: void 0,\n owner: null\n });\n if (!useInsertionEffect) {\n onIntersectionChangeRef.current = onIntersectionChange;\n }\n useSyncEffect(() => {\n onIntersectionChangeRef.current = onIntersectionChange;\n }, [onIntersectionChange]);\n return React2.useCallback(\n function setRef(element) {\n const observerState = observerStateRef.current;\n if (!element && observerState.owner !== setRef) {\n return;\n }\n if (element === observerState.node) {\n observerState.owner = setRef;\n return canUseRefCleanup ? observerState.stop : void 0;\n }\n const cleanup = observerState.stop;\n observerState.stop = void 0;\n cleanup == null ? void 0 : cleanup();\n if (!element || skip) {\n observerState.node = null;\n observerState.owner = element ? setRef : null;\n return;\n }\n observerState.node = element;\n observerState.owner = setRef;\n let destroyObserver;\n let previousInView;\n function stopObserving() {\n destroyObserver == null ? void 0 : destroyObserver();\n if (observerState.stop === stopObserving) {\n observerState.node = null;\n observerState.stop = void 0;\n }\n }\n observerState.stop = stopObserving;\n destroyObserver = observe(\n element,\n (inView, entry) => {\n onIntersectionChangeRef.current(\n inView,\n entry,\n previousInView\n );\n previousInView = inView;\n if (triggerOnce && inView) stopObserving();\n },\n {\n threshold,\n root,\n rootMargin,\n scrollMargin,\n trackVisibility,\n delay\n },\n fallbackInView\n );\n if (observerState.stop !== stopObserving) destroyObserver();\n return canUseRefCleanup ? observerState.stop : void 0;\n },\n [\n Array.isArray(threshold) ? threshold.toString() : threshold,\n root,\n rootMargin,\n scrollMargin,\n trackVisibility,\n delay,\n fallbackInView,\n skip,\n triggerOnce\n ]\n );\n}\n\n// src/useInView.tsx\nvar useIsomorphicLayoutEffect = typeof window === \"undefined\" ? React3.useEffect : React3.useLayoutEffect;\nfunction useInView({\n threshold,\n delay,\n trackVisibility,\n rootMargin,\n scrollMargin,\n root,\n triggerOnce,\n skip,\n initialInView,\n fallbackInView,\n onChange\n} = {}) {\n const lastInViewRef = React3.useRef(initialInView);\n const [state, setState] = React3.useState({\n inView: !!initialInView,\n entry: void 0\n });\n const observerRef = useIntersectionObserverRef(\n (inView, entry) => {\n const previousInView = lastInViewRef.current;\n lastInViewRef.current = inView;\n if (previousInView === void 0 && !inView) {\n return;\n }\n setState({ inView, entry });\n onChange == null ? void 0 : onChange(inView, entry);\n },\n {\n threshold,\n root,\n rootMargin,\n scrollMargin,\n trackVisibility,\n delay,\n fallbackInView,\n skip,\n triggerOnce\n }\n );\n const refState = React3.useRef({\n node: null,\n reset: false\n });\n const setRef = React3.useCallback(\n function setRef2(node) {\n if (node) {\n refState.current.node = node;\n refState.current.reset = false;\n } else if (refState.current.node) {\n refState.current.node = null;\n refState.current.reset = true;\n }\n const cleanup = observerRef(node);\n if (!cleanup) return;\n return () => {\n cleanup();\n if (refState.current.node === node) {\n refState.current.node = null;\n refState.current.reset = true;\n }\n };\n },\n [observerRef]\n );\n useIsomorphicLayoutEffect(() => {\n if (!refState.current.reset) return;\n refState.current.reset = false;\n if (triggerOnce || skip) return;\n setState({ inView: !!initialInView, entry: void 0 });\n lastInViewRef.current = initialInView;\n });\n const result = [setRef, state.inView, state.entry];\n result.ref = result[0];\n result.inView = result[1];\n result.entry = result[2];\n return result;\n}\n\n// src/useOnInView.tsx\nvar useOnInView = (onIntersectionChange, {\n threshold,\n root,\n rootMargin,\n scrollMargin,\n trackVisibility,\n delay,\n triggerOnce,\n skip\n} = {}) => {\n return useIntersectionObserverRef(\n (inView, entry, previousInView) => {\n if (previousInView === void 0 && !inView) {\n return;\n }\n onIntersectionChange(inView, entry);\n },\n {\n threshold,\n root,\n rootMargin,\n scrollMargin,\n trackVisibility,\n delay,\n triggerOnce,\n skip\n }\n );\n};\nexport {\n InView,\n defaultFallbackInView,\n observe,\n useInView,\n useOnInView\n};\n//# sourceMappingURL=index.mjs.map","import { hashKey, shallowEqualObjects } from \"./utils.js\";\nimport { Subscribable } from \"./subscribable.js\";\nimport { notifyManager } from \"./notifyManager.js\";\nimport { getDefaultState } from \"./mutation.js\";\n//#region src/mutationObserver.ts\n/**\n* Observes a single mutation and derives a `MutationObserverResult` from it.\n* A framework hook like `useMutation` creates one `MutationObserver` per hook\n* call, keeps it stable across re-renders, calls `setOptions` when the options\n* passed to the hook change, subscribes to it to re-render on updates, and\n* reads `getCurrentResult()` for the value to return. Calling `mutate()`\n* builds a new underlying `Mutation` in the `MutationCache` and executes it.\n*\n* @example\n* ```ts\n* const observer = new MutationObserver(queryClient, {\n* mutationFn: (variables: { title: string }) => addPost(variables),\n* })\n* ```\n*/\nvar MutationObserver = class extends Subscribable {\n\t#client;\n\t#currentResult = void 0;\n\t#currentMutation;\n\t#mutateOptions;\n\tconstructor(client, options) {\n\t\tsuper();\n\t\tthis.#client = client;\n\t\tthis.setOptions(options);\n\t\tthis.bindMethods();\n\t\tthis.#updateResult();\n\t}\n\tbindMethods() {\n\t\tthis.mutate = this.mutate.bind(this);\n\t\tthis.reset = this.reset.bind(this);\n\t}\n\t/**\n\t* Updates the observer's options.\n\t*\n\t* If the new `mutationKey` differs from the previous one (and both were\n\t* defined), the observer is reset, detaching it from the mutation it was\n\t* observing. Otherwise, if the currently observed mutation is still\n\t* `pending`, its options are updated in place as well.\n\t*\n\t* @example\n\t* ```ts\n\t* observer.setOptions({\n\t* mutationFn: (variables: { title: string }) => addPost(variables),\n\t* onSuccess: (data) => console.log(data),\n\t* })\n\t* ```\n\t*/\n\tsetOptions(options) {\n\t\tconst prevOptions = this.options;\n\t\tthis.options = this.#client.defaultMutationOptions(options);\n\t\tif (!shallowEqualObjects(this.options, prevOptions)) this.#client.getMutationCache().notify({\n\t\t\ttype: \"observerOptionsUpdated\",\n\t\t\tmutation: this.#currentMutation,\n\t\t\tobserver: this\n\t\t});\n\t\tif (prevOptions?.mutationKey && this.options.mutationKey && hashKey(prevOptions.mutationKey) !== hashKey(this.options.mutationKey)) this.reset();\n\t\telse if (this.#currentMutation?.state.status === \"pending\") this.#currentMutation.setOptions(this.options);\n\t}\n\tonSubscribe() {\n\t\tif (this.listeners.size === 1 && this.#currentMutation) {\n\t\t\tthis.#currentMutation.addObserver(this);\n\t\t\tthis.#updateResult();\n\t\t}\n\t}\n\tonUnsubscribe() {\n\t\tif (!this.hasListeners()) this.#currentMutation?.removeObserver(this);\n\t}\n\t/** @internal */\n\tonMutationUpdate(action) {\n\t\tthis.#updateResult();\n\t\tthis.#notify(action);\n\t}\n\t/**\n\t* Returns the observer's current result, derived from the observed\n\t* mutation's state (or the default, `idle` state if no mutation has been\n\t* built yet, e.g. before the first `mutate()` call or after `reset()`).\n\t*/\n\tgetCurrentResult() {\n\t\treturn this.#currentResult;\n\t}\n\t/**\n\t* Detaches the observer from the mutation it is currently observing (if\n\t* any) and resets the observed result back to its default, `idle` state.\n\t*\n\t* This does not cancel an in-flight mutation; the mutation itself keeps\n\t* running to completion and its own callbacks still fire, but this\n\t* observer stops reflecting its state and a subsequent `mutate()` call\n\t* will build a brand new mutation.\n\t*\n\t* @example\n\t* ```ts\n\t* observer.reset()\n\t* ```\n\t*\n\t* @see {@link MutationObserver#mutate}\n\t*/\n\treset() {\n\t\tthis.#currentMutation?.removeObserver(this);\n\t\tthis.#currentMutation = void 0;\n\t\tthis.#updateResult();\n\t\tthis.#notify();\n\t}\n\t/**\n\t* Builds a new `Mutation` in the `MutationCache` using the observer's\n\t* current options, detaches this observer from any previously observed\n\t* mutation, attaches it to the new one, and executes it with the given\n\t* variables.\n\t*\n\t* The optional per-call `options` (`onSuccess`/`onError`/`onSettled`) are\n\t* invoked once the mutation settles, in addition to any callbacks defined\n\t* on the observer's own options.\n\t*\n\t* @example\n\t* ```ts\n\t* await observer.mutate(\n\t* { title: 'New post' },\n\t* { onSuccess: (data) => console.log(data) },\n\t* )\n\t* ```\n\t*/\n\tmutate(variables, options) {\n\t\tthis.#mutateOptions = options;\n\t\tthis.#currentMutation?.removeObserver(this);\n\t\tthis.#currentMutation = this.#client.getMutationCache().build(this.#client, this.options);\n\t\tthis.#currentMutation.addObserver(this);\n\t\treturn this.#currentMutation.execute(variables);\n\t}\n\t#updateResult() {\n\t\tconst state = this.#currentMutation?.state ?? getDefaultState();\n\t\tthis.#currentResult = {\n\t\t\t...state,\n\t\t\tisPending: state.status === \"pending\",\n\t\t\tisSuccess: state.status === \"success\",\n\t\t\tisError: state.status === \"error\",\n\t\t\tisIdle: state.status === \"idle\",\n\t\t\tmutate: this.mutate,\n\t\t\treset: this.reset\n\t\t};\n\t}\n\t#notify(action) {\n\t\tnotifyManager.batch(() => {\n\t\t\tif (this.#mutateOptions && this.hasListeners()) {\n\t\t\t\tconst variables = this.#currentResult.variables;\n\t\t\t\tconst onMutateResult = this.#currentResult.context;\n\t\t\t\tconst context = {\n\t\t\t\t\tclient: this.#client,\n\t\t\t\t\tmeta: this.options.meta,\n\t\t\t\t\tmutationKey: this.options.mutationKey\n\t\t\t\t};\n\t\t\t\tif (action?.type === \"success\") {\n\t\t\t\t\ttry {\n\t\t\t\t\t\tthis.#mutateOptions.onSuccess?.(action.data, variables, onMutateResult, context);\n\t\t\t\t\t} catch (e) {\n\t\t\t\t\t\tPromise.reject(e);\n\t\t\t\t\t}\n\t\t\t\t\ttry {\n\t\t\t\t\t\tthis.#mutateOptions.onSettled?.(action.data, null, variables, onMutateResult, context);\n\t\t\t\t\t} catch (e) {\n\t\t\t\t\t\tPromise.reject(e);\n\t\t\t\t\t}\n\t\t\t\t} else if (action?.type === \"error\") {\n\t\t\t\t\ttry {\n\t\t\t\t\t\tthis.#mutateOptions.onError?.(action.error, variables, onMutateResult, context);\n\t\t\t\t\t} catch (e) {\n\t\t\t\t\t\tPromise.reject(e);\n\t\t\t\t\t}\n\t\t\t\t\ttry {\n\t\t\t\t\t\tthis.#mutateOptions.onSettled?.(void 0, action.error, variables, onMutateResult, context);\n\t\t\t\t\t} catch (e) {\n\t\t\t\t\t\tPromise.reject(e);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tthis.listeners.forEach((listener) => {\n\t\t\t\tlistener(this.#currentResult);\n\t\t\t});\n\t\t});\n\t}\n};\n//#endregion\nexport { MutationObserver };\n\n//# sourceMappingURL=mutationObserver.js.map","import { replaceEqualDeep, shallowEqualObjects } from \"./utils.js\";\nimport { Subscribable } from \"./subscribable.js\";\nimport { notifyManager } from \"./notifyManager.js\";\nimport { QueryObserver } from \"./queryObserver.js\";\n//#region src/queriesObserver.ts\nfunction difference(array1, array2) {\n\tconst excludeSet = new Set(array2);\n\treturn array1.filter((x) => !excludeSet.has(x));\n}\n/**\n* A `QueriesObserver` watches an array of queries at once, exposing them as\n* a single array of `QueryObserverResult`s (or, when a `combine` option is\n* given, as a combined value derived from that array). It manages one\n* internal `QueryObserver` per query, and is the primitive that framework\n* adapters (e.g. `useQueries`) build their hooks on top of.\n*\n* @example\n* ```ts\n* const observer = new QueriesObserver(queryClient, [\n* { queryKey: ['post', 1], queryFn: fetchPost },\n* { queryKey: ['post', 2], queryFn: fetchPost },\n* ])\n*\n* const unsubscribe = observer.subscribe((result) => {\n* console.log(result)\n* })\n* ```\n*/\nvar QueriesObserver = class extends Subscribable {\n\t#client;\n\t#result;\n\t#queries;\n\t#options;\n\t#observers;\n\t#combinedResult;\n\t#lastCombine;\n\t#lastResult;\n\t#lastQueryHashes;\n\t#observerMatches = [];\n\tconstructor(client, queries, options) {\n\t\tsuper();\n\t\tthis.#client = client;\n\t\tthis.#options = options;\n\t\tthis.#queries = [];\n\t\tthis.#observers = [];\n\t\tthis.#result = [];\n\t\tthis.setQueries(queries);\n\t}\n\tonSubscribe() {\n\t\tif (this.listeners.size === 1) this.#observers.forEach((observer) => {\n\t\t\tobserver.subscribe((result) => {\n\t\t\t\tthis.#onUpdate(observer, result);\n\t\t\t});\n\t\t});\n\t}\n\tonUnsubscribe() {\n\t\tif (!this.listeners.size) this.destroy();\n\t}\n\t/**\n\t* Stops observing all queries: clears all listeners and destroys every\n\t* underlying `QueryObserver` this observer manages.\n\t*/\n\tdestroy() {\n\t\tthis.listeners = /* @__PURE__ */ new Set();\n\t\tthis.#observers.forEach((observer) => {\n\t\t\tobserver.destroy();\n\t\t});\n\t}\n\t/**\n\t* Replaces the set of queries being observed. Existing `QueryObserver`s\n\t* are reused for queries that match an already-observed query hash;\n\t* observers for queries that are no longer present are destroyed, and new\n\t* observers are created and subscribed to for newly added queries.\n\t*\n\t* @example\n\t* ```ts\n\t* observer.setQueries([\n\t* { queryKey: ['post', 1], queryFn: fetchPost },\n\t* { queryKey: ['post', 3], queryFn: fetchPost },\n\t* ])\n\t* ```\n\t*/\n\tsetQueries(queries, options) {\n\t\tthis.#queries = queries;\n\t\tthis.#options = options;\n\t\tif (process.env.NODE_ENV !== \"production\") {\n\t\t\tconst queryHashes = queries.map((query) => this.#client.defaultQueryOptions(query).queryHash);\n\t\t\tif (new Set(queryHashes).size !== queryHashes.length) console.warn(\"[QueriesObserver]: Duplicate Queries found. This might result in unexpected behavior.\");\n\t\t}\n\t\tnotifyManager.batch(() => {\n\t\t\tconst prevObservers = this.#observers;\n\t\t\tconst newObserverMatches = this.#findMatchingObservers(this.#queries);\n\t\t\tnewObserverMatches.forEach((match) => match.observer.setOptions(match.defaultedQueryOptions));\n\t\t\tconst newObservers = newObserverMatches.map((match) => match.observer);\n\t\t\tconst newResult = newObservers.map((observer) => observer.getCurrentResult());\n\t\t\tconst hasLengthChange = prevObservers.length !== newObservers.length;\n\t\t\tconst hasIndexChange = newObservers.some((observer, index) => observer !== prevObservers[index]);\n\t\t\tconst hasStructuralChange = hasLengthChange || hasIndexChange;\n\t\t\tconst hasResultChange = hasStructuralChange ? true : newResult.some((result, index) => {\n\t\t\t\tconst prev = this.#result[index];\n\t\t\t\treturn !prev || !shallowEqualObjects(result, prev);\n\t\t\t});\n\t\t\tif (!hasStructuralChange && !hasResultChange) return;\n\t\t\tif (hasStructuralChange) {\n\t\t\t\tthis.#observerMatches = newObserverMatches;\n\t\t\t\tthis.#observers = newObservers;\n\t\t\t}\n\t\t\tthis.#result = newResult;\n\t\t\tif (!this.hasListeners()) return;\n\t\t\tif (hasStructuralChange) {\n\t\t\t\tdifference(prevObservers, newObservers).forEach((observer) => {\n\t\t\t\t\tobserver.destroy();\n\t\t\t\t});\n\t\t\t\tdifference(newObservers, prevObservers).forEach((observer) => {\n\t\t\t\t\tobserver.subscribe((result) => {\n\t\t\t\t\t\tthis.#onUpdate(observer, result);\n\t\t\t\t\t});\n\t\t\t\t});\n\t\t\t}\n\t\t\tthis.#notify();\n\t\t});\n\t}\n\t/**\n\t* Returns the most recently computed array of `QueryObserverResult`s, one\n\t* per observed query, in the same order as the queries passed to the\n\t* constructor or `setQueries`.\n\t*\n\t* @example\n\t* ```ts\n\t* const results = observer.getCurrentResult()\n\t* const data = results.map((result) => result.data)\n\t* ```\n\t*/\n\tgetCurrentResult() {\n\t\treturn this.#result;\n\t}\n\t/**\n\t* Returns the underlying `Query` instances currently being observed, in\n\t* the same order as the queries passed to the constructor or `setQueries`.\n\t*/\n\tgetQueries() {\n\t\treturn this.#observers.map((observer) => observer.getCurrentQuery());\n\t}\n\t/**\n\t* Returns the underlying `QueryObserver` instances this observer manages,\n\t* in the same order as the queries passed to the constructor or\n\t* `setQueries`.\n\t*/\n\tgetObservers() {\n\t\treturn this.#observers;\n\t}\n\t/**\n\t* The `QueriesObserver` counterpart of {@link QueryObserver#getOptimisticResult} — computes\n\t* the result for the given (already-defaulted) queries right now, synchronously. Called by\n\t* framework adapters (e.g. `useQueries`) ahead of subscribing, returning a tuple of the raw\n\t* per-query results, a function to compute the combined result from them, and a function to\n\t* wrap the results for property-access tracking.\n\t*/\n\tgetOptimisticResult(queries, combine) {\n\t\tconst matches = this.#findMatchingObservers(queries);\n\t\tconst result = matches.map((match) => match.observer.getOptimisticResult(match.defaultedQueryOptions));\n\t\tconst queryHashes = matches.map((match) => match.defaultedQueryOptions.queryHash);\n\t\treturn [\n\t\t\tresult,\n\t\t\t(r) => {\n\t\t\t\treturn this.#combineResult(r ?? result, combine, queryHashes);\n\t\t\t},\n\t\t\t() => {\n\t\t\t\treturn this.#trackResult(result, matches);\n\t\t\t}\n\t\t];\n\t}\n\t#trackResult(result, matches) {\n\t\tconst trackedProps = /* @__PURE__ */ new Set();\n\t\treturn matches.map((match, index) => {\n\t\t\tconst observerResult = result[index];\n\t\t\treturn !match.defaultedQueryOptions.notifyOnChangeProps ? match.observer.trackResult(observerResult, (accessedProp) => {\n\t\t\t\tif (!trackedProps.has(accessedProp)) {\n\t\t\t\t\ttrackedProps.add(accessedProp);\n\t\t\t\t\tmatches.forEach((m) => {\n\t\t\t\t\t\tm.observer.trackProp(accessedProp);\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t}) : observerResult;\n\t\t});\n\t}\n\t#combineResult(input, combine, queryHashes) {\n\t\tif (combine) {\n\t\t\tconst lastHashes = this.#lastQueryHashes;\n\t\t\tconst queryHashesChanged = queryHashes !== void 0 && lastHashes !== void 0 && (lastHashes.length !== queryHashes.length || queryHashes.some((hash, i) => hash !== lastHashes[i]));\n\t\t\tif (this.#result !== this.#lastResult || queryHashesChanged || combine !== this.#lastCombine) {\n\t\t\t\tthis.#lastCombine = combine;\n\t\t\t\tthis.#lastResult = this.#result;\n\t\t\t\tif (queryHashes !== void 0) this.#lastQueryHashes = queryHashes;\n\t\t\t\tthis.#combinedResult = replaceEqualDeep(this.#combinedResult, combine(input));\n\t\t\t}\n\t\t\treturn this.#combinedResult;\n\t\t}\n\t\treturn input;\n\t}\n\t#shouldSkipCombine() {\n\t\treturn !this.#options?.combine || this.#observers.some((observer, index) => {\n\t\t\treturn observer.options.suspense && this.#result[index]?.data === void 0;\n\t\t});\n\t}\n\t#findMatchingObservers(queries) {\n\t\tconst prevObserversMap = /* @__PURE__ */ new Map();\n\t\tthis.#observers.forEach((observer) => {\n\t\t\tconst key = observer.options.queryHash;\n\t\t\tif (!key) return;\n\t\t\tconst previousObservers = prevObserversMap.get(key);\n\t\t\tif (previousObservers) previousObservers.push(observer);\n\t\t\telse prevObserversMap.set(key, [observer]);\n\t\t});\n\t\tconst observers = [];\n\t\tqueries.forEach((options) => {\n\t\t\tconst defaultedOptions = this.#client.defaultQueryOptions(options);\n\t\t\tconst observer = prevObserversMap.get(defaultedOptions.queryHash)?.shift() ?? new QueryObserver(this.#client, defaultedOptions);\n\t\t\tobservers.push({\n\t\t\t\tdefaultedQueryOptions: defaultedOptions,\n\t\t\t\tobserver\n\t\t\t});\n\t\t});\n\t\treturn observers;\n\t}\n\t#onUpdate(observer, result) {\n\t\tconst index = this.#observers.indexOf(observer);\n\t\tif (index !== -1) {\n\t\t\tthis.#result = this.#result.slice();\n\t\t\tthis.#result[index] = result;\n\t\t\tthis.#notify();\n\t\t}\n\t}\n\t#notify() {\n\t\tif (this.hasListeners()) {\n\t\t\tconst shouldSkipCombine = this.#shouldSkipCombine();\n\t\t\tconst previousResult = this.#combinedResult;\n\t\t\tconst newResult = shouldSkipCombine ? previousResult : this.#combineResult(this.#trackResult(this.#result, this.#observerMatches), this.#options?.combine);\n\t\t\tif (shouldSkipCombine || previousResult !== newResult) notifyManager.batch(() => {\n\t\t\t\tthis.listeners.forEach((listener) => {\n\t\t\t\t\tlistener(this.#result);\n\t\t\t\t});\n\t\t\t});\n\t\t}\n\t}\n};\n//#endregion\nexport { QueriesObserver };\n\n//# sourceMappingURL=queriesObserver.js.map","\"use client\";\nimport { useQueryClient } from \"./QueryClientProvider.js\";\nimport { useIsRestoring } from \"./IsRestoringProvider.js\";\nimport { useQueryErrorResetBoundary } from \"./QueryErrorResetBoundary.js\";\nimport { ensurePreventErrorBoundaryRetry, getHasError, useClearResetErrorBoundary } from \"./errorBoundaryUtils.js\";\nimport { ensureSuspenseTimers, fetchOptimistic, shouldSuspend } from \"./suspense.js\";\nimport * as React from \"react\";\nimport { QueriesObserver, QueryObserver, noop, notifyManager } from \"@tanstack/query-core\";\n//#region src/useQueries.ts\n/**\n* The `useQueries` hook can be used to fetch a variable number of queries.\n*\n* The `queries` key accepts an array with query option objects mostly identical to `useQuery` — the top-level\n* `subscribed` option isn't accepted per query (see `placeholderData` below for another difference). A custom\n* `QueryClient` is supplied once, as `useQueries`' own top-level second argument, rather than per query.\n*\n* Having the same query key more than once in the array of query objects may cause some data to be shared\n* between queries. To avoid this, consider de-duplicating the queries and map the results back to the desired\n* structure.\n*\n* The `combine` option can be used to combine the results of the queries into a single value. The result will\n* be structurally shared to be as referentially stable as possible.\n*\n* @remarks The `combine` function only re-runs if it changed referentially, or if any of the query results\n* changed. An inlined `combine` function, as shown in the example below, therefore runs on every render — wrap\n* it in `useCallback`, or extract it to a stable function reference if it doesn't have any dependencies, to\n* avoid that.\n*\n* Unlike `useQuery`, `useQueries` cannot infer the `data` argument of an _inline_ `select` from its sibling\n* `queryFn`. Because `useQueries` infers the type of the whole `queries` array at once, the `select` parameter\n* of a query object written inline cannot be contextually typed from that same object's `queryFn`, so it falls\n* back to `unknown` — a [known TypeScript limitation](https://github.com/TanStack/query/issues/6556). Annotate\n* the `select` parameter explicitly, or define the query with {@link queryOptions}, which resolves its types in\n* a single object _before_ it reaches `useQueries`, to work around this — see the example below. The same\n* limitation applies to {@link useSuspenseQueries}.\n*\n* `placeholderData` is supported here too, but unlike `useQuery`, it doesn't receive information from\n* previously rendered queries, because the number of queries can differ between renders.\n* @param queryClient - Use this to provide a custom `QueryClient`. Otherwise, the one from the nearest context\n* will be used.\n* @returns The combined result. Without `combine`, this is an array with all the query results, in the same\n* order as the input. When `combine` is provided, this is the value returned by `combine` instead.\n*\n* @example\n* ```tsx\n* import { useQueries } from '@tanstack/react-query'\n*\n* function Posts({ ids }: { ids: Array<number> }) {\n* const postQueries = useQueries({\n* queries: ids.map((id) => ({\n* queryKey: ['post', id],\n* queryFn: () => fetchPost(id),\n* staleTime: Infinity,\n* })),\n* })\n*\n* return (\n* <ul>\n* {postQueries.map((query, index) => {\n* if (query.isPending) return <li key={ids[index]}>Loading...</li>\n* if (query.isError) return <li key={ids[index]}>Error: {query.error.message}</li>\n* return <li key={ids[index]}>{query.data.title}</li>\n* })}\n* </ul>\n* )\n* }\n* ```\n*\n* @example\n* Combining results into a single value:\n* ```tsx\n* import { useQueries } from '@tanstack/react-query'\n*\n* function Posts({ ids }: { ids: Array<number> }) {\n* const { data, isPending, isError } = useQueries({\n* queries: ids.map((id) => ({\n* queryKey: ['post', id],\n* queryFn: () => fetchPost(id),\n* })),\n* combine: (postQueries) => {\n* return {\n* data: postQueries.map((query) => query.data),\n* isPending: postQueries.some((query) => query.isPending),\n* isError: postQueries.some((query) => query.isError),\n* }\n* },\n* })\n*\n* if (isPending) return 'Loading...'\n* if (isError) return 'Error loading posts'\n*\n* return (\n* <ul>\n* {data.map((post) => (\n* <li key={post?.id}>{post?.title}</li>\n* ))}\n* </ul>\n* )\n* }\n* ```\n*\n* @example\n* Typing `select` via {@link queryOptions}. Note that spreading a `queryOptions` result and overriding\n* `select` inline still falls back to `unknown` — wrap the spread in `queryOptions` again so the override is\n* resolved before it reaches `useQueries`:\n* ```tsx\n* import { queryOptions, useQueries } from '@tanstack/react-query'\n*\n* const postOptions = (id: number) =>\n* queryOptions({\n* queryKey: ['post', id],\n* queryFn: () => fetchPost(id),\n* })\n*\n* function PostTitle({ id }: { id: number }) {\n* const [{ data: broken }] = useQueries({\n* queries: [\n* {\n* ...postOptions(id),\n* // ❌ `data` is `unknown` here\n* select: (data) => data.title,\n* },\n* ],\n* })\n*\n* const [{ data: fixed }] = useQueries({\n* queries: [\n* queryOptions({\n* ...postOptions(id),\n* // ✅ `data` is `Post`\n* select: (data) => data.title,\n* }),\n* ],\n* })\n*\n* return <h1>{fixed}</h1>\n* }\n* ```\n*/\nfunction useQueries({ queries, ...options }, queryClient) {\n\tconst client = useQueryClient(queryClient);\n\tconst isRestoring = useIsRestoring();\n\tconst errorResetBoundary = useQueryErrorResetBoundary();\n\tconst subscribed = options.subscribed !== false;\n\tconst defaultedQueries = React.useMemo(() => queries.map((opts) => {\n\t\tconst defaultedOptions = client.defaultQueryOptions(opts);\n\t\tdefaultedOptions._optimisticResults = isRestoring ? \"isRestoring\" : subscribed ? \"optimistic\" : void 0;\n\t\treturn defaultedOptions;\n\t}), [\n\t\tqueries,\n\t\tclient,\n\t\tisRestoring,\n\t\tsubscribed\n\t]);\n\tdefaultedQueries.forEach((queryOptions) => {\n\t\tensureSuspenseTimers(queryOptions);\n\t\tconst query = client.getQueryCache().get(queryOptions.queryHash);\n\t\tensurePreventErrorBoundaryRetry(queryOptions, errorResetBoundary, query);\n\t});\n\tuseClearResetErrorBoundary(errorResetBoundary);\n\tconst [observer] = React.useState(() => new QueriesObserver(client, defaultedQueries, options));\n\tconst [optimisticResult, getCombinedResult, trackResult] = observer.getOptimisticResult(defaultedQueries, options.combine);\n\tconst shouldSubscribe = !isRestoring && subscribed;\n\tReact.useSyncExternalStore(React.useCallback((onStoreChange) => shouldSubscribe ? observer.subscribe(notifyManager.batchCalls(onStoreChange)) : noop, [observer, shouldSubscribe]), () => observer.getCurrentResult(), () => observer.getCurrentResult());\n\tReact.useEffect(() => {\n\t\tobserver.setQueries(defaultedQueries, options);\n\t}, [\n\t\tdefaultedQueries,\n\t\toptions,\n\t\tobserver\n\t]);\n\tconst suspensePromises = optimisticResult.some((result, index) => shouldSuspend(defaultedQueries[index], result)) ? optimisticResult.flatMap((result, index) => {\n\t\tconst opts = defaultedQueries[index];\n\t\tif (opts && shouldSuspend(opts, result)) {\n\t\t\tconst queryObserver = new QueryObserver(client, opts);\n\t\t\treturn fetchOptimistic(opts, queryObserver, errorResetBoundary);\n\t\t}\n\t\treturn [];\n\t}) : [];\n\tif (suspensePromises.length > 0) throw Promise.all(suspensePromises);\n\tconst firstSingleResultWhichShouldThrow = optimisticResult.find((result, index) => {\n\t\tconst query = defaultedQueries[index];\n\t\treturn query && getHasError({\n\t\t\tresult,\n\t\t\terrorResetBoundary,\n\t\t\tthrowOnError: query.throwOnError,\n\t\t\tquery: client.getQueryCache().get(query.queryHash),\n\t\t\tsuspense: query.suspense\n\t\t});\n\t});\n\tif (firstSingleResultWhichShouldThrow) throw firstSingleResultWhichShouldThrow.error;\n\treturn getCombinedResult(trackResult());\n}\n//#endregion\nexport { useQueries };\n\n//# sourceMappingURL=useQueries.js.map","\"use client\";\nimport { useQueryClient } from \"./QueryClientProvider.js\";\nimport * as React from \"react\";\nimport { MutationObserver, noop, notifyManager, shouldThrowError } from \"@tanstack/query-core\";\n//#region src/useMutation.ts\n/**\n* Unlike queries, mutations are typically used to create/update/delete data or perform server side-effects.\n* `useMutation` is the hook for that.\n*\n* @see {@link mutationOptions} to share these options across multiple `useMutation` call sites, or to look\n* the mutation up elsewhere via its `mutationKey` (e.g. with `useMutationState`).\n* @param options - The {@link UseMutationOptions} to use — everything you can pass to `useMutation`.\n* @param queryClient - Use this to use a custom `QueryClient`. Otherwise, the one from the nearest context will\n* be used.\n* @returns `mutate`/`mutateAsync` also accept per-call `onSuccess`/`onError`/`onSettled` callbacks as a second\n* argument, useful for triggering call-site side effects (e.g. navigation) without coupling them to the shared\n* mutation definition. Hook-level callbacks (passed to `options`) fire for every mutation; per-call callbacks\n* fire only for the latest call you've made, and only while the component is still mounted — unmounting before\n* the mutation settles removes the subscription and prevents them from firing.\n*\n* @example\n* ```tsx\n* import { useMutation, useQueryClient } from '@tanstack/react-query'\n*\n* function AddTodo() {\n* const queryClient = useQueryClient()\n*\n* const addMutation = useMutation({\n* mutationFn: addTodo,\n* onSuccess: () => queryClient.invalidateQueries({ queryKey: ['todos'] }),\n* })\n*\n* return (\n* <button\n* onClick={() =>\n* addMutation.mutate('Item', {\n* onError: (error) => console.error('Failed to add item:', error),\n* })\n* }\n* >\n* Add\n* </button>\n* )\n* }\n* ```\n*\n* @example\n* Rendering the mutation's own state, rather than just firing it off:\n* ```tsx\n* import { useMutation, useQueryClient } from '@tanstack/react-query'\n*\n* function AddTodo() {\n* const queryClient = useQueryClient()\n*\n* const addMutation = useMutation({\n* mutationFn: addTodo,\n* onSuccess: () => queryClient.invalidateQueries({ queryKey: ['todos'] }),\n* })\n*\n* return (\n* <div>\n* {addMutation.isPending ? (\n* 'Adding todo...'\n* ) : (\n* <>\n* {addMutation.isError ? (\n* <div>An error occurred: {addMutation.error.message}</div>\n* ) : null}\n* <button onClick={() => addMutation.mutate('Item')}>Add</button>\n* </>\n* )}\n* </div>\n* )\n* }\n* ```\n*\n* @example\n* Optimistic update via `onMutate`, rolling back on `onError`:\n* ```tsx\n* import { useMutation, useQueryClient } from '@tanstack/react-query'\n*\n* function AddTodo() {\n* const queryClient = useQueryClient()\n*\n* const addMutation = useMutation({\n* mutationFn: addTodo,\n* onMutate: async (newTodo) => {\n* await queryClient.cancelQueries({ queryKey: ['todos'] })\n* const previousTodos = queryClient.getQueryData<Array<string>>(['todos'])\n*\n* queryClient.setQueryData<Array<string>>(['todos'], (old) => [\n* ...(old ?? []),\n* newTodo,\n* ])\n*\n* // Passed to `onError` as `onMutateResult` if the mutation fails.\n* return { previousTodos }\n* },\n* onError: (_err, _newTodo, onMutateResult) => {\n* queryClient.setQueryData(['todos'], onMutateResult?.previousTodos)\n* },\n* onSettled: () => {\n* queryClient.invalidateQueries({ queryKey: ['todos'] })\n* },\n* })\n*\n* return (\n* <button onClick={() => addMutation.mutate('Item')}>Add</button>\n* )\n* }\n* ```\n*\n* @example\n* Callbacks passed per call to `mutate` only fire for the last call — `mutateAsync` gives you a\n* promise per call instead, so you can wait for all of them when they succeed:\n* ```tsx\n* import { useMutation, useQueryClient } from '@tanstack/react-query'\n*\n* function AddTodos() {\n* const queryClient = useQueryClient()\n*\n* const addMutation = useMutation({\n* mutationFn: addTodo,\n* onSuccess: () => queryClient.invalidateQueries({ queryKey: ['todos'] }),\n* })\n*\n* async function handleAddAll(todos: Array<string>) {\n* try {\n* await Promise.all(todos.map((todo) => addMutation.mutateAsync(todo)))\n* } catch (error) {\n* console.error('Failed to add todos:', error)\n* }\n* }\n*\n* return (\n* <button onClick={() => handleAddAll(['Todo 1', 'Todo 2', 'Todo 3'])}>\n* Add all\n* </button>\n* )\n* }\n* ```\n*\n* @example\n* If some of the mutations above can fail independently of the others, and you want to know which ones\n* did — rather than losing that information the moment the first one rejects — swap `Promise.all` for\n* `Promise.allSettled`:\n* ```tsx\n* import { useMutation, useQueryClient } from '@tanstack/react-query'\n*\n* function AddTodos() {\n* const queryClient = useQueryClient()\n*\n* const addMutation = useMutation({\n* mutationFn: addTodo,\n* onSuccess: () => queryClient.invalidateQueries({ queryKey: ['todos'] }),\n* })\n*\n* async function handleAddAll(todos: Array<string>) {\n* const addResults = await Promise.allSettled(\n* todos.map((todo) => addMutation.mutateAsync(todo)),\n* )\n*\n* addResults.forEach((addResult, index) => {\n* if (addResult.status === 'rejected') {\n* console.error(`Failed to add \"${todos[index]}\":`, addResult.reason)\n* }\n* })\n* }\n*\n* return (\n* <button onClick={() => handleAddAll(['Todo 1', 'Todo 2', 'Todo 3'])}>\n* Add all\n* </button>\n* )\n* }\n* ```\n*/\nfunction useMutation(options, queryClient) {\n\tconst client = useQueryClient(queryClient);\n\tconst [observer] = React.useState(() => new MutationObserver(client, options));\n\tReact.useEffect(() => {\n\t\tobserver.setOptions(options);\n\t}, [observer, options]);\n\tconst result = React.useSyncExternalStore(React.useCallback((onStoreChange) => observer.subscribe(notifyManager.batchCalls(onStoreChange)), [observer]), () => observer.getCurrentResult(), () => observer.getCurrentResult());\n\tconst mutate = React.useCallback((...args) => {\n\t\tobserver.mutate(args[0], args[1]).catch(noop);\n\t}, [observer]);\n\tif (result.error && shouldThrowError(observer.options.throwOnError, [result.error])) throw result.error;\n\treturn {\n\t\t...result,\n\t\tmutate,\n\t\tmutateAsync: result.mutate\n\t};\n}\n//#endregion\nexport { useMutation };\n\n//# sourceMappingURL=useMutation.js.map","const createStoreImpl = (createState) => {\n let state;\n const listeners = /* @__PURE__ */ new Set();\n const setState = (partial, replace) => {\n const nextState = typeof partial === \"function\" ? partial(state) : partial;\n if (!Object.is(nextState, state)) {\n const previousState = state;\n state = (replace != null ? replace : typeof nextState !== \"object\" || nextState === null) ? nextState : Object.assign({}, state, nextState);\n listeners.forEach((listener) => listener(state, previousState));\n }\n };\n const getState = () => state;\n const getInitialState = () => initialState;\n const subscribe = (listener) => {\n listeners.add(listener);\n return () => listeners.delete(listener);\n };\n const api = { setState, getState, getInitialState, subscribe };\n const initialState = state = createState(setState, getState, api);\n return api;\n};\nconst createStore = ((createState) => createState ? createStoreImpl(createState) : createStoreImpl);\n\nexport { createStore };\n","import React from 'react';\nimport { createStore } from 'zustand/vanilla';\n\nconst identity = (arg) => arg;\nfunction useStore(api, selector = identity) {\n const slice = React.useSyncExternalStore(\n api.subscribe,\n React.useCallback(() => selector(api.getState()), [api, selector]),\n React.useCallback(() => selector(api.getInitialState()), [api, selector])\n );\n React.useDebugValue(slice);\n return slice;\n}\nconst createImpl = (createState) => {\n const api = createStore(createState);\n const useBoundStore = (selector) => useStore(api, selector);\n Object.assign(useBoundStore, api);\n return useBoundStore;\n};\nconst create = ((createState) => createState ? createImpl(createState) : createImpl);\n\nexport { create, useStore };\n","const reduxImpl = (reducer, initial) => (set, _get, api) => {\n api.dispatch = (action) => {\n set((state) => reducer(state, action), false, action);\n return action;\n };\n api.dispatchFromDevtools = true;\n return { dispatch: (...args) => api.dispatch(...args), ...initial };\n};\nconst redux = reduxImpl;\n\nconst shouldDispatchFromDevtools = (api) => !!api.dispatchFromDevtools && typeof api.dispatch === \"function\";\nconst trackedConnections = /* @__PURE__ */ new Map();\nconst getTrackedConnectionState = (name) => {\n const api = trackedConnections.get(name);\n if (!api) return {};\n return Object.fromEntries(\n Object.entries(api.stores).map(([key, api2]) => [key, api2.getState()])\n );\n};\nconst extractConnectionInformation = (store, extensionConnector, options) => {\n if (store === void 0) {\n return {\n type: \"untracked\",\n connection: extensionConnector.connect(options)\n };\n }\n const existingConnection = trackedConnections.get(options.name);\n if (existingConnection) {\n return { type: \"tracked\", store, ...existingConnection };\n }\n const newConnection = {\n connection: extensionConnector.connect(options),\n stores: {}\n };\n trackedConnections.set(options.name, newConnection);\n return { type: \"tracked\", store, ...newConnection };\n};\nconst removeStoreFromTrackedConnections = (name, store) => {\n if (store === void 0) return;\n const connectionInfo = trackedConnections.get(name);\n if (!connectionInfo) return;\n delete connectionInfo.stores[store];\n if (Object.keys(connectionInfo.stores).length === 0) {\n trackedConnections.delete(name);\n }\n};\nconst v8StackLineRe = /^at (?:new |async )?(.+?) \\(/;\nconst geckoStackLineRe = /^([^@]+)@/;\nfunction findCallerName(stack) {\n var _a, _b, _c;\n if (!stack) return void 0;\n const traceLines = stack.split(\"\\n\");\n const apiSetStateLineIndex = traceLines.findIndex(\n (traceLine) => traceLine.includes(\"api.setState\")\n );\n if (apiSetStateLineIndex < 0) return void 0;\n const callerLine = ((_a = traceLines[apiSetStateLineIndex + 1]) == null ? void 0 : _a.trim()) || \"\";\n return ((_b = v8StackLineRe.exec(callerLine)) == null ? void 0 : _b[1]) || ((_c = geckoStackLineRe.exec(callerLine)) == null ? void 0 : _c[1]);\n}\nconst devtoolsImpl = (fn, devtoolsOptions = {}) => (set, get, api) => {\n const { enabled, anonymousActionType, store, ...options } = devtoolsOptions;\n let extensionConnector;\n try {\n extensionConnector = (enabled != null ? enabled : (import.meta.env ? import.meta.env.MODE : void 0) !== \"production\") && window.__REDUX_DEVTOOLS_EXTENSION__;\n } catch (e) {\n }\n if (!extensionConnector) {\n return fn(set, get, api);\n }\n const { connection, ...connectionInformation } = extractConnectionInformation(store, extensionConnector, options);\n let isRecording = true;\n api.setState = ((state, replace, nameOrAction) => {\n const r = set(state, replace);\n if (!isRecording) return r;\n const action = nameOrAction === void 0 ? {\n type: anonymousActionType || findCallerName(new Error().stack) || \"anonymous\"\n } : typeof nameOrAction === \"string\" ? { type: nameOrAction } : nameOrAction;\n if (store === void 0) {\n connection == null ? void 0 : connection.send(action, get());\n return r;\n }\n connection == null ? void 0 : connection.send(\n {\n ...action,\n type: `${store}/${action.type}`\n },\n {\n ...getTrackedConnectionState(options.name),\n [store]: api.getState()\n }\n );\n return r;\n });\n api.devtools = {\n cleanup: () => {\n if (connection && typeof connection.unsubscribe === \"function\") {\n connection.unsubscribe();\n }\n removeStoreFromTrackedConnections(options.name, store);\n }\n };\n const setStateFromDevtools = (...a) => {\n const originalIsRecording = isRecording;\n isRecording = false;\n set(...a);\n isRecording = originalIsRecording;\n };\n const initialState = fn(api.setState, get, api);\n if (connectionInformation.type === \"untracked\") {\n connection == null ? void 0 : connection.init(initialState);\n } else {\n connectionInformation.stores[connectionInformation.store] = api;\n connection == null ? void 0 : connection.init(\n Object.fromEntries(\n Object.entries(connectionInformation.stores).map(([key, store2]) => [\n key,\n key === connectionInformation.store ? initialState : store2.getState()\n ])\n )\n );\n }\n if (shouldDispatchFromDevtools(api)) {\n let didWarnAboutReservedActionType = false;\n const originalDispatch = api.dispatch;\n api.dispatch = (...args) => {\n if ((import.meta.env ? import.meta.env.MODE : void 0) !== \"production\" && args[0].type === \"__setState\" && !didWarnAboutReservedActionType) {\n console.warn(\n '[zustand devtools middleware] \"__setState\" action type is reserved to set state from the devtools. Avoid using it.'\n );\n didWarnAboutReservedActionType = true;\n }\n originalDispatch(...args);\n };\n }\n connection.subscribe((message) => {\n var _a;\n switch (message.type) {\n case \"ACTION\":\n if (typeof message.payload !== \"string\") {\n console.error(\n \"[zustand devtools middleware] Unsupported action format\"\n );\n return;\n }\n return parseJsonThen(\n message.payload,\n (action) => {\n if (action.type === \"__setState\") {\n if (store === void 0) {\n setStateFromDevtools(action.state);\n return;\n }\n if (Object.keys(action.state).length !== 1) {\n console.error(\n `\n [zustand devtools middleware] Unsupported __setState action format.\n When using 'store' option in devtools(), the 'state' should have only one key, which is a value of 'store' that was passed in devtools(),\n and value of this only key should be a state object. Example: { \"type\": \"__setState\", \"state\": { \"abc123Store\": { \"foo\": \"bar\" } } }\n `\n );\n }\n const stateFromDevtools = action.state[store];\n if (stateFromDevtools === void 0 || stateFromDevtools === null) {\n return;\n }\n if (JSON.stringify(api.getState()) !== JSON.stringify(stateFromDevtools)) {\n setStateFromDevtools(stateFromDevtools);\n }\n return;\n }\n if (shouldDispatchFromDevtools(api)) {\n api.dispatch(action);\n }\n }\n );\n case \"DISPATCH\":\n switch (message.payload.type) {\n case \"RESET\":\n setStateFromDevtools(initialState);\n if (store === void 0) {\n return connection == null ? void 0 : connection.init(api.getState());\n }\n return connection == null ? void 0 : connection.init(getTrackedConnectionState(options.name));\n case \"COMMIT\":\n if (store === void 0) {\n connection == null ? void 0 : connection.init(api.getState());\n return;\n }\n return connection == null ? void 0 : connection.init(getTrackedConnectionState(options.name));\n case \"ROLLBACK\":\n return parseJsonThen(message.state, (state) => {\n if (store === void 0) {\n setStateFromDevtools(state);\n connection == null ? void 0 : connection.init(api.getState());\n return;\n }\n setStateFromDevtools(state[store]);\n connection == null ? void 0 : connection.init(getTrackedConnectionState(options.name));\n });\n case \"JUMP_TO_STATE\":\n case \"JUMP_TO_ACTION\":\n return parseJsonThen(message.state, (state) => {\n if (store === void 0) {\n setStateFromDevtools(state);\n return;\n }\n if (JSON.stringify(api.getState()) !== JSON.stringify(state[store])) {\n setStateFromDevtools(state[store]);\n }\n });\n case \"IMPORT_STATE\": {\n const { nextLiftedState } = message.payload;\n const lastComputedState = (_a = nextLiftedState.computedStates.slice(-1)[0]) == null ? void 0 : _a.state;\n if (!lastComputedState) return;\n if (store === void 0) {\n setStateFromDevtools(lastComputedState);\n } else {\n setStateFromDevtools(lastComputedState[store]);\n }\n connection == null ? void 0 : connection.send(\n null,\n // FIXME no-any\n nextLiftedState\n );\n return;\n }\n case \"PAUSE_RECORDING\":\n return isRecording = !isRecording;\n }\n return;\n }\n });\n return initialState;\n};\nconst devtools = devtoolsImpl;\nconst parseJsonThen = (stringified, fn) => {\n let parsed;\n try {\n parsed = JSON.parse(stringified);\n } catch (e) {\n console.error(\n \"[zustand devtools middleware] Could not parse the received json\",\n e\n );\n }\n if (parsed !== void 0) fn(parsed);\n};\n\nconst subscribeWithSelectorImpl = (fn) => (set, get, api) => {\n const origSubscribe = api.subscribe;\n api.subscribe = ((selector, optListener, options) => {\n let listener = selector;\n if (optListener) {\n const equalityFn = (options == null ? void 0 : options.equalityFn) || Object.is;\n let currentSlice = selector(api.getState());\n listener = (state) => {\n const nextSlice = selector(state);\n if (!equalityFn(currentSlice, nextSlice)) {\n const previousSlice = currentSlice;\n optListener(currentSlice = nextSlice, previousSlice);\n }\n };\n if (options == null ? void 0 : options.fireImmediately) {\n optListener(currentSlice, currentSlice);\n }\n }\n return origSubscribe(listener);\n });\n const initialState = fn(set, get, api);\n return initialState;\n};\nconst subscribeWithSelector = subscribeWithSelectorImpl;\n\nfunction combine(initialState, create) {\n return (...args) => Object.assign({}, initialState, create(...args));\n}\n\nfunction createJSONStorage(getStorage, options) {\n let storage;\n try {\n storage = getStorage();\n } catch (e) {\n return;\n }\n const persistStorage = {\n getItem: (name) => {\n var _a;\n const parse = (str2) => {\n if (str2 === null) {\n return null;\n }\n return JSON.parse(str2, options == null ? void 0 : options.reviver);\n };\n const str = (_a = storage.getItem(name)) != null ? _a : null;\n if (str instanceof Promise) {\n return str.then(parse);\n }\n return parse(str);\n },\n setItem: (name, newValue) => storage.setItem(name, JSON.stringify(newValue, options == null ? void 0 : options.replacer)),\n removeItem: (name) => storage.removeItem(name)\n };\n return persistStorage;\n}\nconst toThenable = (fn) => (input) => {\n try {\n const result = fn(input);\n if (result instanceof Promise) {\n return result;\n }\n return {\n then(onFulfilled) {\n return toThenable(onFulfilled)(result);\n },\n catch(_onRejected) {\n return this;\n }\n };\n } catch (e) {\n return {\n then(_onFulfilled) {\n return this;\n },\n catch(onRejected) {\n return toThenable(onRejected)(e);\n }\n };\n }\n};\nconst persistImpl = (config, baseOptions) => (set, get, api) => {\n let options = {\n storage: createJSONStorage(() => window.localStorage),\n partialize: (state) => state,\n version: 0,\n merge: (persistedState, currentState) => ({\n ...currentState,\n ...persistedState\n }),\n ...baseOptions\n };\n let hasHydrated = false;\n let hydrationVersion = 0;\n const hydrationListeners = /* @__PURE__ */ new Set();\n const finishHydrationListeners = /* @__PURE__ */ new Set();\n let storage = options.storage;\n if (!storage) {\n return config(\n (...args) => {\n console.warn(\n `[zustand persist middleware] Unable to update item '${options.name}', the given storage is currently unavailable.`\n );\n set(...args);\n },\n get,\n api\n );\n }\n const setItem = () => {\n const state = options.partialize({ ...get() });\n return storage.setItem(options.name, {\n state,\n version: options.version\n });\n };\n const savedSetState = api.setState;\n api.setState = (state, replace) => {\n savedSetState(state, replace);\n return setItem();\n };\n const configResult = config(\n (...args) => {\n set(...args);\n return setItem();\n },\n get,\n api\n );\n api.getInitialState = () => configResult;\n let stateFromStorage;\n const hydrate = () => {\n var _a, _b;\n if (!storage) return;\n const currentVersion = ++hydrationVersion;\n hasHydrated = false;\n hydrationListeners.forEach((cb) => {\n var _a2;\n return cb((_a2 = get()) != null ? _a2 : configResult);\n });\n const postRehydrationCallback = ((_b = options.onRehydrateStorage) == null ? void 0 : _b.call(options, (_a = get()) != null ? _a : configResult)) || void 0;\n return toThenable(storage.getItem.bind(storage))(options.name).then((deserializedStorageValue) => {\n if (deserializedStorageValue) {\n if (typeof deserializedStorageValue.version === \"number\" && deserializedStorageValue.version !== options.version) {\n if (options.migrate) {\n const migration = options.migrate(\n deserializedStorageValue.state,\n deserializedStorageValue.version\n );\n if (migration instanceof Promise) {\n return migration.then((result) => [true, result]);\n }\n return [true, migration];\n }\n console.error(\n `State loaded from storage couldn't be migrated since no migrate function was provided`\n );\n } else {\n return [false, deserializedStorageValue.state];\n }\n }\n return [false, void 0];\n }).then((migrationResult) => {\n var _a2;\n if (currentVersion !== hydrationVersion) {\n return;\n }\n const [migrated, migratedState] = migrationResult;\n stateFromStorage = options.merge(\n migratedState,\n (_a2 = get()) != null ? _a2 : configResult\n );\n set(stateFromStorage, true);\n if (migrated) {\n return setItem();\n }\n }).then(() => {\n if (currentVersion !== hydrationVersion) {\n return;\n }\n postRehydrationCallback == null ? void 0 : postRehydrationCallback(get(), void 0);\n stateFromStorage = get();\n hasHydrated = true;\n finishHydrationListeners.forEach((cb) => cb(stateFromStorage));\n }).catch((e) => {\n if (currentVersion !== hydrationVersion) {\n return;\n }\n postRehydrationCallback == null ? void 0 : postRehydrationCallback(void 0, e);\n });\n };\n api.persist = {\n setOptions: (newOptions) => {\n options = {\n ...options,\n ...newOptions\n };\n if (newOptions.storage) {\n storage = newOptions.storage;\n }\n },\n clearStorage: () => {\n ++hydrationVersion;\n storage == null ? void 0 : storage.removeItem(options.name);\n },\n getOptions: () => options,\n rehydrate: () => hydrate(),\n hasHydrated: () => hasHydrated,\n onHydrate: (cb) => {\n hydrationListeners.add(cb);\n return () => {\n hydrationListeners.delete(cb);\n };\n },\n onFinishHydration: (cb) => {\n finishHydrationListeners.add(cb);\n return () => {\n finishHydrationListeners.delete(cb);\n };\n }\n };\n if (!options.skipHydration) {\n hydrate();\n }\n return stateFromStorage || configResult;\n};\nconst persist = persistImpl;\n\nfunction ssrSafe(config, isSSR = typeof window === \"undefined\") {\n return (set, get, api) => {\n if (!isSSR) {\n return config(set, get, api);\n }\n const ssrSet = () => {\n throw new Error(\"Cannot set state of Zustand store in SSR\");\n };\n api.setState = ssrSet;\n return config(ssrSet, get, api);\n };\n}\n\nexport { combine, createJSONStorage, devtools, persist, redux, subscribeWithSelector, ssrSafe as unstable_ssrSafe };\n","const isIterable = (obj) => Symbol.iterator in obj;\nconst hasIterableEntries = (value) => (\n // HACK: avoid checking entries type\n \"entries\" in value\n);\nconst compareEntries = (valueA, valueB) => {\n const mapA = valueA instanceof Map ? valueA : new Map(valueA.entries());\n const mapB = valueB instanceof Map ? valueB : new Map(valueB.entries());\n if (mapA.size !== mapB.size) {\n return false;\n }\n for (const [key, value] of mapA) {\n if (!mapB.has(key) || !Object.is(value, mapB.get(key))) {\n return false;\n }\n }\n return true;\n};\nconst compareIterables = (valueA, valueB) => {\n const iteratorA = valueA[Symbol.iterator]();\n const iteratorB = valueB[Symbol.iterator]();\n let nextA = iteratorA.next();\n let nextB = iteratorB.next();\n while (!nextA.done && !nextB.done) {\n if (!Object.is(nextA.value, nextB.value)) {\n return false;\n }\n nextA = iteratorA.next();\n nextB = iteratorB.next();\n }\n return !!nextA.done && !!nextB.done;\n};\nfunction shallow(valueA, valueB) {\n if (Object.is(valueA, valueB)) {\n return true;\n }\n if (typeof valueA !== \"object\" || valueA === null || typeof valueB !== \"object\" || valueB === null) {\n return false;\n }\n if (Object.getPrototypeOf(valueA) !== Object.getPrototypeOf(valueB)) {\n return false;\n }\n if (isIterable(valueA) && isIterable(valueB)) {\n if (hasIterableEntries(valueA) && hasIterableEntries(valueB)) {\n return compareEntries(valueA, valueB);\n }\n return compareIterables(valueA, valueB);\n }\n return compareEntries(\n { entries: () => Object.entries(valueA) },\n { entries: () => Object.entries(valueB) }\n );\n}\n\nexport { shallow };\n","import React from 'react';\nimport { shallow } from 'zustand/vanilla/shallow';\n\nfunction useShallow(selector) {\n const prev = React.useRef(void 0);\n return (state) => {\n const next = selector(state);\n return shallow(prev.current, next) ? prev.current : prev.current = next;\n };\n}\n\nexport { useShallow };\n","// Copyright (c) 2013 Pieroxy <pieroxy@pieroxy.net>\n// This work is free. You can redistribute it and/or modify it\n// under the terms of the WTFPL, Version 2\n// For more information see LICENSE.txt or http://www.wtfpl.net/\n//\n// For more information, the home page:\n// http://pieroxy.net/blog/pages/lz-string/testing.html\n//\n// LZ-based compression algorithm, version 1.4.5\nvar LZString = (function() {\n\n// private property\nvar f = String.fromCharCode;\nvar keyStrBase64 = \"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=\";\nvar keyStrUriSafe = \"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+-$\";\nvar baseReverseDic = {};\n\nfunction getBaseValue(alphabet, character) {\n if (!baseReverseDic[alphabet]) {\n baseReverseDic[alphabet] = {};\n for (var i=0 ; i<alphabet.length ; i++) {\n baseReverseDic[alphabet][alphabet.charAt(i)] = i;\n }\n }\n return baseReverseDic[alphabet][character];\n}\n\nvar LZString = {\n compressToBase64 : function (input) {\n if (input == null) return \"\";\n var res = LZString._compress(input, 6, function(a){return keyStrBase64.charAt(a);});\n switch (res.length % 4) { // To produce valid Base64\n default: // When could this happen ?\n case 0 : return res;\n case 1 : return res+\"===\";\n case 2 : return res+\"==\";\n case 3 : return res+\"=\";\n }\n },\n\n decompressFromBase64 : function (input) {\n if (input == null) return \"\";\n if (input == \"\") return null;\n return LZString._decompress(input.length, 32, function(index) { return getBaseValue(keyStrBase64, input.charAt(index)); });\n },\n\n compressToUTF16 : function (input) {\n if (input == null) return \"\";\n return LZString._compress(input, 15, function(a){return f(a+32);}) + \" \";\n },\n\n decompressFromUTF16: function (compressed) {\n if (compressed == null) return \"\";\n if (compressed == \"\") return null;\n return LZString._decompress(compressed.length, 16384, function(index) { return compressed.charCodeAt(index) - 32; });\n },\n\n //compress into uint8array (UCS-2 big endian format)\n compressToUint8Array: function (uncompressed) {\n var compressed = LZString.compress(uncompressed);\n var buf=new Uint8Array(compressed.length*2); // 2 bytes per character\n\n for (var i=0, TotalLen=compressed.length; i<TotalLen; i++) {\n var current_value = compressed.charCodeAt(i);\n buf[i*2] = current_value >>> 8;\n buf[i*2+1] = current_value % 256;\n }\n return buf;\n },\n\n //decompress from uint8array (UCS-2 big endian format)\n decompressFromUint8Array:function (compressed) {\n if (compressed===null || compressed===undefined){\n return LZString.decompress(compressed);\n } else {\n var buf=new Array(compressed.length/2); // 2 bytes per character\n for (var i=0, TotalLen=buf.length; i<TotalLen; i++) {\n buf[i]=compressed[i*2]*256+compressed[i*2+1];\n }\n\n var result = [];\n buf.forEach(function (c) {\n result.push(f(c));\n });\n return LZString.decompress(result.join(''));\n\n }\n\n },\n\n\n //compress into a string that is already URI encoded\n compressToEncodedURIComponent: function (input) {\n if (input == null) return \"\";\n return LZString._compress(input, 6, function(a){return keyStrUriSafe.charAt(a);});\n },\n\n //decompress from an output of compressToEncodedURIComponent\n decompressFromEncodedURIComponent:function (input) {\n if (input == null) return \"\";\n if (input == \"\") return null;\n input = input.replace(/ /g, \"+\");\n return LZString._decompress(input.length, 32, function(index) { return getBaseValue(keyStrUriSafe, input.charAt(index)); });\n },\n\n compress: function (uncompressed) {\n return LZString._compress(uncompressed, 16, function(a){return f(a);});\n },\n _compress: function (uncompressed, bitsPerChar, getCharFromInt) {\n if (uncompressed == null) return \"\";\n var i, value,\n context_dictionary= {},\n context_dictionaryToCreate= {},\n context_c=\"\",\n context_wc=\"\",\n context_w=\"\",\n context_enlargeIn= 2, // Compensate for the first entry which should not count\n context_dictSize= 3,\n context_numBits= 2,\n context_data=[],\n context_data_val=0,\n context_data_position=0,\n ii;\n\n for (ii = 0; ii < uncompressed.length; ii += 1) {\n context_c = uncompressed.charAt(ii);\n if (!Object.prototype.hasOwnProperty.call(context_dictionary,context_c)) {\n context_dictionary[context_c] = context_dictSize++;\n context_dictionaryToCreate[context_c] = true;\n }\n\n context_wc = context_w + context_c;\n if (Object.prototype.hasOwnProperty.call(context_dictionary,context_wc)) {\n context_w = context_wc;\n } else {\n if (Object.prototype.hasOwnProperty.call(context_dictionaryToCreate,context_w)) {\n if (context_w.charCodeAt(0)<256) {\n for (i=0 ; i<context_numBits ; i++) {\n context_data_val = (context_data_val << 1);\n if (context_data_position == bitsPerChar-1) {\n context_data_position = 0;\n context_data.push(getCharFromInt(context_data_val));\n context_data_val = 0;\n } else {\n context_data_position++;\n }\n }\n value = context_w.charCodeAt(0);\n for (i=0 ; i<8 ; i++) {\n context_data_val = (context_data_val << 1) | (value&1);\n if (context_data_position == bitsPerChar-1) {\n context_data_position = 0;\n context_data.push(getCharFromInt(context_data_val));\n context_data_val = 0;\n } else {\n context_data_position++;\n }\n value = value >> 1;\n }\n } else {\n value = 1;\n for (i=0 ; i<context_numBits ; i++) {\n context_data_val = (context_data_val << 1) | value;\n if (context_data_position ==bitsPerChar-1) {\n context_data_position = 0;\n context_data.push(getCharFromInt(context_data_val));\n context_data_val = 0;\n } else {\n context_data_position++;\n }\n value = 0;\n }\n value = context_w.charCodeAt(0);\n for (i=0 ; i<16 ; i++) {\n context_data_val = (context_data_val << 1) | (value&1);\n if (context_data_position == bitsPerChar-1) {\n context_data_position = 0;\n context_data.push(getCharFromInt(context_data_val));\n context_data_val = 0;\n } else {\n context_data_position++;\n }\n value = value >> 1;\n }\n }\n context_enlargeIn--;\n if (context_enlargeIn == 0) {\n context_enlargeIn = Math.pow(2, context_numBits);\n context_numBits++;\n }\n delete context_dictionaryToCreate[context_w];\n } else {\n value = context_dictionary[context_w];\n for (i=0 ; i<context_numBits ; i++) {\n context_data_val = (context_data_val << 1) | (value&1);\n if (context_data_position == bitsPerChar-1) {\n context_data_position = 0;\n context_data.push(getCharFromInt(context_data_val));\n context_data_val = 0;\n } else {\n context_data_position++;\n }\n value = value >> 1;\n }\n\n\n }\n context_enlargeIn--;\n if (context_enlargeIn == 0) {\n context_enlargeIn = Math.pow(2, context_numBits);\n context_numBits++;\n }\n // Add wc to the dictionary.\n context_dictionary[context_wc] = context_dictSize++;\n context_w = String(context_c);\n }\n }\n\n // Output the code for w.\n if (context_w !== \"\") {\n if (Object.prototype.hasOwnProperty.call(context_dictionaryToCreate,context_w)) {\n if (context_w.charCodeAt(0)<256) {\n for (i=0 ; i<context_numBits ; i++) {\n context_data_val = (context_data_val << 1);\n if (context_data_position == bitsPerChar-1) {\n context_data_position = 0;\n context_data.push(getCharFromInt(context_data_val));\n context_data_val = 0;\n } else {\n context_data_position++;\n }\n }\n value = context_w.charCodeAt(0);\n for (i=0 ; i<8 ; i++) {\n context_data_val = (context_data_val << 1) | (value&1);\n if (context_data_position == bitsPerChar-1) {\n context_data_position = 0;\n context_data.push(getCharFromInt(context_data_val));\n context_data_val = 0;\n } else {\n context_data_position++;\n }\n value = value >> 1;\n }\n } else {\n value = 1;\n for (i=0 ; i<context_numBits ; i++) {\n context_data_val = (context_data_val << 1) | value;\n if (context_data_position == bitsPerChar-1) {\n context_data_position = 0;\n context_data.push(getCharFromInt(context_data_val));\n context_data_val = 0;\n } else {\n context_data_position++;\n }\n value = 0;\n }\n value = context_w.charCodeAt(0);\n for (i=0 ; i<16 ; i++) {\n context_data_val = (context_data_val << 1) | (value&1);\n if (context_data_position == bitsPerChar-1) {\n context_data_position = 0;\n context_data.push(getCharFromInt(context_data_val));\n context_data_val = 0;\n } else {\n context_data_position++;\n }\n value = value >> 1;\n }\n }\n context_enlargeIn--;\n if (context_enlargeIn == 0) {\n context_enlargeIn = Math.pow(2, context_numBits);\n context_numBits++;\n }\n delete context_dictionaryToCreate[context_w];\n } else {\n value = context_dictionary[context_w];\n for (i=0 ; i<context_numBits ; i++) {\n context_data_val = (context_data_val << 1) | (value&1);\n if (context_data_position == bitsPerChar-1) {\n context_data_position = 0;\n context_data.push(getCharFromInt(context_data_val));\n context_data_val = 0;\n } else {\n context_data_position++;\n }\n value = value >> 1;\n }\n\n\n }\n context_enlargeIn--;\n if (context_enlargeIn == 0) {\n context_enlargeIn = Math.pow(2, context_numBits);\n context_numBits++;\n }\n }\n\n // Mark the end of the stream\n value = 2;\n for (i=0 ; i<context_numBits ; i++) {\n context_data_val = (context_data_val << 1) | (value&1);\n if (context_data_position == bitsPerChar-1) {\n context_data_position = 0;\n context_data.push(getCharFromInt(context_data_val));\n context_data_val = 0;\n } else {\n context_data_position++;\n }\n value = value >> 1;\n }\n\n // Flush the last char\n while (true) {\n context_data_val = (context_data_val << 1);\n if (context_data_position == bitsPerChar-1) {\n context_data.push(getCharFromInt(context_data_val));\n break;\n }\n else context_data_position++;\n }\n return context_data.join('');\n },\n\n decompress: function (compressed) {\n if (compressed == null) return \"\";\n if (compressed == \"\") return null;\n return LZString._decompress(compressed.length, 32768, function(index) { return compressed.charCodeAt(index); });\n },\n\n _decompress: function (length, resetValue, getNextValue) {\n var dictionary = [],\n next,\n enlargeIn = 4,\n dictSize = 4,\n numBits = 3,\n entry = \"\",\n result = [],\n i,\n w,\n bits, resb, maxpower, power,\n c,\n data = {val:getNextValue(0), position:resetValue, index:1};\n\n for (i = 0; i < 3; i += 1) {\n dictionary[i] = i;\n }\n\n bits = 0;\n maxpower = Math.pow(2,2);\n power=1;\n while (power!=maxpower) {\n resb = data.val & data.position;\n data.position >>= 1;\n if (data.position == 0) {\n data.position = resetValue;\n data.val = getNextValue(data.index++);\n }\n bits |= (resb>0 ? 1 : 0) * power;\n power <<= 1;\n }\n\n switch (next = bits) {\n case 0:\n bits = 0;\n maxpower = Math.pow(2,8);\n power=1;\n while (power!=maxpower) {\n resb = data.val & data.position;\n data.position >>= 1;\n if (data.position == 0) {\n data.position = resetValue;\n data.val = getNextValue(data.index++);\n }\n bits |= (resb>0 ? 1 : 0) * power;\n power <<= 1;\n }\n c = f(bits);\n break;\n case 1:\n bits = 0;\n maxpower = Math.pow(2,16);\n power=1;\n while (power!=maxpower) {\n resb = data.val & data.position;\n data.position >>= 1;\n if (data.position == 0) {\n data.position = resetValue;\n data.val = getNextValue(data.index++);\n }\n bits |= (resb>0 ? 1 : 0) * power;\n power <<= 1;\n }\n c = f(bits);\n break;\n case 2:\n return \"\";\n }\n dictionary[3] = c;\n w = c;\n result.push(c);\n while (true) {\n if (data.index > length) {\n return \"\";\n }\n\n bits = 0;\n maxpower = Math.pow(2,numBits);\n power=1;\n while (power!=maxpower) {\n resb = data.val & data.position;\n data.position >>= 1;\n if (data.position == 0) {\n data.position = resetValue;\n data.val = getNextValue(data.index++);\n }\n bits |= (resb>0 ? 1 : 0) * power;\n power <<= 1;\n }\n\n switch (c = bits) {\n case 0:\n bits = 0;\n maxpower = Math.pow(2,8);\n power=1;\n while (power!=maxpower) {\n resb = data.val & data.position;\n data.position >>= 1;\n if (data.position == 0) {\n data.position = resetValue;\n data.val = getNextValue(data.index++);\n }\n bits |= (resb>0 ? 1 : 0) * power;\n power <<= 1;\n }\n\n dictionary[dictSize++] = f(bits);\n c = dictSize-1;\n enlargeIn--;\n break;\n case 1:\n bits = 0;\n maxpower = Math.pow(2,16);\n power=1;\n while (power!=maxpower) {\n resb = data.val & data.position;\n data.position >>= 1;\n if (data.position == 0) {\n data.position = resetValue;\n data.val = getNextValue(data.index++);\n }\n bits |= (resb>0 ? 1 : 0) * power;\n power <<= 1;\n }\n dictionary[dictSize++] = f(bits);\n c = dictSize-1;\n enlargeIn--;\n break;\n case 2:\n return result.join('');\n }\n\n if (enlargeIn == 0) {\n enlargeIn = Math.pow(2, numBits);\n numBits++;\n }\n\n if (dictionary[c]) {\n entry = dictionary[c];\n } else {\n if (c === dictSize) {\n entry = w + w.charAt(0);\n } else {\n return null;\n }\n }\n result.push(entry);\n\n // Add w+entry[0] to the dictionary.\n dictionary[dictSize++] = w + entry.charAt(0);\n enlargeIn--;\n\n w = entry;\n\n if (enlargeIn == 0) {\n enlargeIn = Math.pow(2, numBits);\n numBits++;\n }\n\n }\n }\n};\n return LZString;\n})();\n\nif (typeof define === 'function' && define.amd) {\n define(function () { return LZString; });\n} else if( typeof module !== 'undefined' && module != null ) {\n module.exports = LZString\n} else if( typeof angular !== 'undefined' && angular != null ) {\n angular.module('LZString', [])\n .factory('LZString', function () {\n return LZString;\n });\n}\n"],"x_google_ignoreList":[0,1,2,3,4,5,6,7,8,9,10],"mappings":";;;;;AASA,IAAI,oBAA8B,IAAI,IAAI,GACtC,oBAA0B,IAAI,QAAQ,GACtC,IAAS,GACT;AAIJ,SAAS,EAAU,GAAM;CAKvB,OAJK,IACD,EAAQ,IAAI,CAAI,IAAU,EAAQ,IAAI,CAAI,KAC9C,KAAU,GACV,EAAQ,IAAI,GAAM,EAAO,SAAS,CAAC,GAC5B,EAAQ,IAAI,CAAI,KAJL;AAKpB;AACA,SAAS,EAAY,GAAS;CAC5B,OAAO,OAAO,KAAK,CAAO,CAAC,CAAC,KAAK,CAAC,CAAC,QAChC,MAAQ,EAAQ,OAAS,KAAK,CACjC,CAAC,CAAC,KAAK,MACE,GAAG,EAAI,GAAG,MAAQ,SAAS,EAAU,EAAQ,IAAI,IAAI,EAAQ,IACrE,CAAC,CAAC,SAAS;AACd;AACA,SAAS,EAAe,GAAS;CAC/B,IAAM,IAAK,EAAY,CAAO,GAC1B,IAAW,EAAY,IAAI,CAAE;CACjC,IAAI,CAAC,GAAU;EACb,IAAM,oBAA2B,IAAI,IAAI,GACrC,GACE,IAAW,IAAI,sBAAsB,MAAY;GACrD,EAAQ,SAAS,MAAU;IAEzB,IAAM,IAAS,EAAM,kBAAkB,EAAW,MAAM,MAAc,EAAM,qBAAqB,CAAS;IAI1G,AAHI,EAAQ,mBAA0B,EAAM,cAAc,WACxD,EAAM,YAAY,IAEpB,CAAC,GAAS,EAAS,IAAI,EAAM,MAAM,KAAkB,CAAC,CAAC,CAAC,CAAC,SAAS,MAAa;KAC7E,EAAS,GAAQ,CAAK;IACxB,CAAC;GACH,CAAC;EACH,GAAG,CAAO;EAOV,AANA,IAAa,EAAS,eAAe,MAAM,QAAQ,E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W,OAAc,EAAE,CAAI,GAC/B,IAAI,IAAS,GACb;OACA;MACF,KAAK,GACH,OAAO,EAAO,KAAK,EAAE;KACzB;KAOA,IALI,KAAa,MACf,IAAqB,KAAG,GACxB,MAGE,EAAW,IACb,IAAQ,EAAW;UAEnB,IAAI,MAAM,GACR,IAAQ,IAAI,EAAE,OAAO,CAAC;UAEtB,OAAO;KAWX,AARA,EAAO,KAAK,CAAK,GAGjB,EAAW,OAAc,IAAI,EAAM,OAAO,CAAC,GAC3C,KAEA,IAAI,GAEA,KAAa,MACf,IAAqB,KAAG,GACxB;IAGJ;GACF;EACF;EACE,OAAO;CACT,EAAA,CAAG;CAEH,AAAI,OAAO,UAAW,cAAc,OAAO,MACzC,OAAO,WAAY;EAAE,OAAO;CAAU,CAAC,IACvB,MAAW,UAAe,KAAU,OACpD,EAAO,UAAU,IACR,OAAO,UAAY,OAAe,WAAW,QACtD,QAAQ,OAAO,YAAY,CAAC,CAAC,CAAC,CAC7B,QAAQ,YAAY,WAAY;EAC/B,OAAO;CACT,CAAC"}
|
|
@@ -22,4 +22,4 @@ export interface AnalysisAIPanelProps {
|
|
|
22
22
|
/** Callback to cancel and restore previous state */
|
|
23
23
|
onCancel: () => void;
|
|
24
24
|
}
|
|
25
|
-
export default function AnalysisAIPanel({ userPrompt, onPromptChange, isGenerating, error, hasGeneratedQuery, onGenerate, onAccept, onCancel }: AnalysisAIPanelProps): import(
|
|
25
|
+
export default function AnalysisAIPanel({ userPrompt, onPromptChange, isGenerating, error, hasGeneratedQuery, onGenerate, onAccept, onCancel }: AnalysisAIPanelProps): import('react').JSX.Element;
|
|
@@ -25,5 +25,5 @@ interface AnalysisAxisDropZoneProps {
|
|
|
25
25
|
yAxisAssignment?: Record<string, 'left' | 'right'>;
|
|
26
26
|
onYAxisAssignmentChange?: (field: string, axis: 'left' | 'right') => void;
|
|
27
27
|
}
|
|
28
|
-
export default function AnalysisAxisDropZone({ config, fields, onDrop, onRemove, onDragStart, onDragEnd, onDragOver, onReorder, draggedItem, getFieldMeta, yAxisAssignment, onYAxisAssignmentChange }: AnalysisAxisDropZoneProps): import(
|
|
28
|
+
export default function AnalysisAxisDropZone({ config, fields, onDrop, onRemove, onDragStart, onDragEnd, onDragOver, onReorder, draggedItem, getFieldMeta, yAxisAssignment, onYAxisAssignmentChange }: AnalysisAxisDropZoneProps): import('react').JSX.Element;
|
|
29
29
|
export {};
|
|
@@ -22,5 +22,5 @@ interface AnalysisChartConfigPanelProps {
|
|
|
22
22
|
colorPalette?: ColorPalette;
|
|
23
23
|
onDisplayConfigChange?: (config: ChartDisplayConfig) => void;
|
|
24
24
|
}
|
|
25
|
-
export default function AnalysisChartConfigPanel({ chartType, chartConfig, metrics, breakdowns, schema, chartAvailability, onChartTypeChange, onChartConfigChange, displayConfig, colorPalette, onDisplayConfigChange }: AnalysisChartConfigPanelProps): import(
|
|
25
|
+
export default function AnalysisChartConfigPanel({ chartType, chartConfig, metrics, breakdowns, schema, chartAvailability, onChartTypeChange, onChartConfigChange, displayConfig, colorPalette, onDisplayConfigChange }: AnalysisChartConfigPanelProps): import('react').JSX.Element;
|
|
26
26
|
export {};
|
|
@@ -9,5 +9,5 @@ interface AnalysisDisplayConfigPanelProps {
|
|
|
9
9
|
/** Keys to exclude from displayOptionsConfig rendering (e.g., ['content'] when content is managed elsewhere) */
|
|
10
10
|
excludeKeys?: string[];
|
|
11
11
|
}
|
|
12
|
-
export default function AnalysisDisplayConfigPanel({ chartType, displayConfig, colorPalette, chartConfig, onDisplayConfigChange, excludeKeys, }: AnalysisDisplayConfigPanelProps): import(
|
|
12
|
+
export default function AnalysisDisplayConfigPanel({ chartType, displayConfig, colorPalette, chartConfig, onDisplayConfigChange, excludeKeys, }: AnalysisDisplayConfigPanelProps): import('react').JSX.Element;
|
|
13
13
|
export {};
|
|
@@ -16,5 +16,5 @@ interface AnalysisFilterGroupProps {
|
|
|
16
16
|
/** Whether to hide the remove button (for top-level groups) */
|
|
17
17
|
hideRemoveButton?: boolean;
|
|
18
18
|
}
|
|
19
|
-
export default function AnalysisFilterGroup({ group, schema, onUpdate, onRemove, onAddFilter, depth, hideRemoveButton }: AnalysisFilterGroupProps): import(
|
|
19
|
+
export default function AnalysisFilterGroup({ group, schema, onUpdate, onRemove, onAddFilter, depth, hideRemoveButton }: AnalysisFilterGroupProps): import('react').JSX.Element;
|
|
20
20
|
export {};
|
|
@@ -10,5 +10,5 @@ interface AnalysisFilterItemProps {
|
|
|
10
10
|
/** Callback to update this filter */
|
|
11
11
|
onUpdate: (filter: SimpleFilter) => void;
|
|
12
12
|
}
|
|
13
|
-
export default function AnalysisFilterItem({ filter, schema, onRemove, onUpdate }: AnalysisFilterItemProps): import(
|
|
13
|
+
export default function AnalysisFilterItem({ filter, schema, onRemove, onUpdate }: AnalysisFilterItemProps): import('react').JSX.Element;
|
|
14
14
|
export {};
|
|
@@ -12,5 +12,5 @@ interface AnalysisFilterSectionProps {
|
|
|
12
12
|
/** Only allow dimension filters (no measures) - used for funnel step filters */
|
|
13
13
|
dimensionsOnly?: boolean;
|
|
14
14
|
}
|
|
15
|
-
export default function AnalysisFilterSection({ filters, schema, onFiltersChange, onFieldDropped, dimensionsOnly }: AnalysisFilterSectionProps): import(
|
|
15
|
+
export default function AnalysisFilterSection({ filters, schema, onFiltersChange, onFieldDropped, dimensionsOnly }: AnalysisFilterSectionProps): import('react').JSX.Element;
|
|
16
16
|
export {};
|
|
@@ -63,5 +63,5 @@ export interface ResultsHeaderProps {
|
|
|
63
63
|
toolbar: ResultsToolbarActions;
|
|
64
64
|
display: ResultsDisplayFlags;
|
|
65
65
|
}
|
|
66
|
-
export default function ResultsHeader({ summary, toolbar, display }: ResultsHeaderProps): import(
|
|
66
|
+
export default function ResultsHeader({ summary, toolbar, display }: ResultsHeaderProps): import('react').JSX.Element;
|
|
67
67
|
export {};
|
|
@@ -9,5 +9,5 @@ interface BreakdownComparisonToggleProps {
|
|
|
9
9
|
comparisonDisabled?: boolean;
|
|
10
10
|
onComparisonToggle: () => void;
|
|
11
11
|
}
|
|
12
|
-
declare const BreakdownComparisonToggle: import('react').MemoExoticComponent<({ enableComparison, comparisonDisabled, onComparisonToggle }: BreakdownComparisonToggleProps) => import(
|
|
12
|
+
declare const BreakdownComparisonToggle: import('react').MemoExoticComponent<({ enableComparison, comparisonDisabled, onComparisonToggle }: BreakdownComparisonToggleProps) => import('react').JSX.Element>;
|
|
13
13
|
export default BreakdownComparisonToggle;
|
|
@@ -8,5 +8,5 @@ import { BreakdownItemCardProps } from './types.js';
|
|
|
8
8
|
* - Remove button (visible on hover)
|
|
9
9
|
* - Drag handle for reordering
|
|
10
10
|
*/
|
|
11
|
-
declare const BreakdownItemCard: import('react').MemoExoticComponent<({ breakdown, fieldMeta, onRemove, onGranularityChange, onComparisonToggle, comparisonDisabled, sortDirection, sortPriority, onToggleSort, index, isDragging, onDragStart, onDragEnd }: BreakdownItemCardProps) => import(
|
|
11
|
+
declare const BreakdownItemCard: import('react').MemoExoticComponent<({ breakdown, fieldMeta, onRemove, onGranularityChange, onComparisonToggle, comparisonDisabled, sortDirection, sortPriority, onToggleSort, index, isDragging, onDragStart, onDragEnd }: BreakdownItemCardProps) => import('react').JSX.Element>;
|
|
12
12
|
export default BreakdownItemCard;
|
|
@@ -22,5 +22,5 @@ interface BreakdownRowProps {
|
|
|
22
22
|
onDragStart: (e: DragEvent, index: number) => void;
|
|
23
23
|
onDragEnd: () => void;
|
|
24
24
|
}
|
|
25
|
-
declare const BreakdownRow: import('react').MemoExoticComponent<({ breakdown, fieldMeta, sortDirection, sortPriority, index, transform, showGapBefore, isAnyDragging, isDragging, comparisonDisabled, onRemove, onGranularityChange, onComparisonToggle, onOrderChange, onReorder, onItemDragOver, onItemDrop, onDragStart, onDragEnd }: BreakdownRowProps) => import(
|
|
25
|
+
declare const BreakdownRow: import('react').MemoExoticComponent<({ breakdown, fieldMeta, sortDirection, sortPriority, index, transform, showGapBefore, isAnyDragging, isDragging, comparisonDisabled, onRemove, onGranularityChange, onComparisonToggle, onOrderChange, onReorder, onItemDragOver, onItemDrop, onDragStart, onDragEnd }: BreakdownRowProps) => import('react').JSX.Element>;
|
|
26
26
|
export default BreakdownRow;
|
|
@@ -5,5 +5,5 @@ import { BreakdownSectionProps } from './types.js';
|
|
|
5
5
|
* - List of selected breakdowns (using BreakdownItemCard)
|
|
6
6
|
* - Drag/drop reordering support
|
|
7
7
|
*/
|
|
8
|
-
declare const BreakdownSection: import('react').MemoExoticComponent<({ breakdowns, schema, onAdd, onRemove, onGranularityChange, onComparisonToggle, order, onOrderChange, onReorder }: BreakdownSectionProps) => import(
|
|
8
|
+
declare const BreakdownSection: import('react').MemoExoticComponent<({ breakdowns, schema, onAdd, onRemove, onGranularityChange, onComparisonToggle, order, onOrderChange, onReorder }: BreakdownSectionProps) => import('react').JSX.Element>;
|
|
9
9
|
export default BreakdownSection;
|
|
@@ -6,5 +6,5 @@ interface ColumnFormatsEditorProps {
|
|
|
6
6
|
onChange: (value: Record<string, ColumnFormatConfig> | undefined) => void;
|
|
7
7
|
t: (key: string, params?: Record<string, string | number>) => string;
|
|
8
8
|
}
|
|
9
|
-
export default function ColumnFormatsEditor({ value, chartConfig, colorPalette, onChange, t }: ColumnFormatsEditorProps): import(
|
|
9
|
+
export default function ColumnFormatsEditor({ value, chartConfig, colorPalette, onChange, t }: ColumnFormatsEditorProps): import('react').JSX.Element;
|
|
10
10
|
export {};
|
|
@@ -7,5 +7,5 @@ interface DisplayOptionControlProps {
|
|
|
7
7
|
chartConfig?: ChartAxisConfig;
|
|
8
8
|
onDisplayConfigChange: (config: ChartDisplayConfig) => void;
|
|
9
9
|
}
|
|
10
|
-
export default function DisplayOptionControl({ option, displayConfig, colorPalette, chartConfig, onDisplayConfigChange, }: DisplayOptionControlProps): import(
|
|
10
|
+
export default function DisplayOptionControl({ option, displayConfig, colorPalette, chartConfig, onDisplayConfigChange, }: DisplayOptionControlProps): import('react').JSX.Element | null;
|
|
11
11
|
export {};
|
|
@@ -45,5 +45,5 @@ interface ExecutionPlanPanelProps {
|
|
|
45
45
|
/**
|
|
46
46
|
* ExecutionPlanPanel - Displays SQL, EXPLAIN results, and AI analysis
|
|
47
47
|
*/
|
|
48
|
-
export declare const ExecutionPlanPanel: import('react').MemoExoticComponent<({ sql, sqlLoading, sqlError, sqlPlaceholder, explainResult, explainLoading, explainHasRun, explainError, runExplain, aiAnalysis, aiAnalysisLoading, aiAnalysisError, runAIAnalysis, clearAIAnalysis: _clearAIAnalysis, enableAI, query, title, height, }: ExecutionPlanPanelProps) => import(
|
|
48
|
+
export declare const ExecutionPlanPanel: import('react').MemoExoticComponent<({ sql, sqlLoading, sqlError, sqlPlaceholder, explainResult, explainLoading, explainHasRun, explainError, runExplain, aiAnalysis, aiAnalysisLoading, aiAnalysisError, runAIAnalysis, clearAIAnalysis: _clearAIAnalysis, enableAI, query, title, height, }: ExecutionPlanPanelProps) => import('react').JSX.Element>;
|
|
49
49
|
export default ExecutionPlanPanel;
|