drizzle-cube 0.12.2 → 0.12.3
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-D14_z5sv.js +1 -0
- package/dist/adapters/ActivityGridChart.config-ufhph9uT.cjs +1 -0
- package/dist/adapters/AreaChart.config-0WZQMQva.js +1 -0
- package/dist/adapters/AreaChart.config-D13ltksm.cjs +1 -0
- package/dist/adapters/BarChart.config-CKW_EixK.cjs +1 -0
- package/dist/adapters/BarChart.config-Dap2k5h9.js +1 -0
- package/dist/adapters/BoxPlotChart.config-BL9GycIS.js +1 -0
- package/dist/adapters/BoxPlotChart.config-D8ijk7P0.cjs +1 -0
- package/dist/adapters/BubbleChart.config-B5mdZpOU.js +1 -0
- package/dist/adapters/BubbleChart.config-D_F6Q5z3.cjs +1 -0
- package/dist/adapters/CandlestickChart.config-DWebnARH.cjs +1 -0
- package/dist/adapters/CandlestickChart.config-U_bjkKnh.js +1 -0
- package/dist/adapters/DataTable.config-CgONV9qM.cjs +1 -0
- package/dist/adapters/DataTable.config-Cuagfjxg.js +1 -0
- package/dist/adapters/DotStripChart.config-B5lxjWSO.js +1 -0
- package/dist/adapters/DotStripChart.config-fD9Mc6W1.cjs +1 -0
- package/dist/adapters/FunnelChart.config-BaE_hLT-.js +1 -0
- package/dist/adapters/FunnelChart.config-Cx7W7-R0.cjs +1 -0
- package/dist/adapters/GaugeChart.config-CgKuBQVo.cjs +1 -0
- package/dist/adapters/GaugeChart.config-ilNlLLj6.js +1 -0
- package/dist/adapters/HeatMapChart.config-Bbk6aa8K.js +1 -0
- package/dist/adapters/HeatMapChart.config-CURg_iiu.cjs +1 -0
- package/dist/adapters/KpiDelta.config-CuZ2C_6t.js +1 -0
- package/dist/adapters/KpiDelta.config-DRy870xF.cjs +1 -0
- package/dist/adapters/KpiNumber.config-BWowvaBG.cjs +1 -0
- package/dist/adapters/KpiNumber.config-h9VspPBo.js +1 -0
- package/dist/adapters/KpiText.config-CXouHoxx.js +1 -0
- package/dist/adapters/KpiText.config-dSbcOdVW.cjs +1 -0
- package/dist/adapters/LineChart.config-BrcTc3dO.cjs +1 -0
- package/dist/adapters/LineChart.config-DOZctkmK.js +1 -0
- package/dist/adapters/MarkdownChart.config-BduAIK5N.js +1 -0
- package/dist/adapters/MarkdownChart.config-CFnH92Fg.cjs +1 -0
- package/dist/adapters/MeasureProfileChart.config-BgdtMIbZ.js +1 -0
- package/dist/adapters/MeasureProfileChart.config-CUahwnse.cjs +1 -0
- package/dist/adapters/PieChart.config-Bwf8meCN.js +1 -0
- package/dist/adapters/PieChart.config-ClfJ6LyA.cjs +1 -0
- package/dist/adapters/ProportionBarChart.config-CKyen5fP.cjs +1 -0
- package/dist/adapters/ProportionBarChart.config-D7RADfKH.js +1 -0
- package/dist/adapters/RadarChart.config-CBR7pNrt.js +1 -0
- package/dist/adapters/RadarChart.config-DSLRklgx.cjs +1 -0
- package/dist/adapters/RadialBarChart.config-BTGjY6JD.js +1 -0
- package/dist/adapters/RadialBarChart.config-CPbimqdg.cjs +1 -0
- package/dist/adapters/RecordsTable.config-B1Z_3JTJ.js +1 -0
- package/dist/adapters/RecordsTable.config-C6QhLcZk.cjs +1 -0
- package/dist/adapters/RetentionCombinedChart.config-BkSezvSb.js +1 -0
- package/dist/adapters/RetentionCombinedChart.config-R1Eq-xRI.cjs +1 -0
- package/dist/adapters/RetentionHeatmap.config-BlUhtL5W.js +1 -0
- package/dist/adapters/RetentionHeatmap.config-DCIsToqo.cjs +1 -0
- package/dist/adapters/SankeyChart.config-Bt0F2A6e.js +1 -0
- package/dist/adapters/SankeyChart.config-_Z5ZrziF.cjs +1 -0
- package/dist/adapters/ScatterChart.config-BW0_kSo8.cjs +1 -0
- package/dist/adapters/ScatterChart.config-DCaM-v68.js +1 -0
- package/dist/adapters/SunburstChart.config-B8Q9pbbo.js +1 -0
- package/dist/adapters/SunburstChart.config-mhQZB6uc.cjs +1 -0
- package/dist/adapters/TreeMapChart.config-Ch--bdyv.js +1 -0
- package/dist/adapters/TreeMapChart.config-DaNlt1aC.cjs +1 -0
- package/dist/adapters/WaterfallChart.config-CR49XWjE.cjs +1 -0
- package/dist/adapters/WaterfallChart.config-qHaD0m4H.js +1 -0
- package/dist/adapters/core/cache-options.d.ts +4 -0
- package/dist/adapters/core/index.cjs +1 -1
- package/dist/adapters/core/index.js +1 -1
- package/dist/adapters/core-3nDM2f7O.cjs +1 -0
- package/dist/adapters/{core-pxHAXRX7.js → core-CD6SqK5q.js} +66 -58
- package/dist/adapters/{compiler-DEL18KHw.js → cors-headers-DYYDrG7S.js} +129 -110
- package/dist/adapters/{compiler-Cs1gQ8Tc.cjs → cors-headers-DxkPVNnZ.cjs} +4 -4
- package/dist/adapters/cors-headers.d.ts +19 -0
- package/dist/adapters/express/index.cjs +1 -1
- package/dist/adapters/express/index.js +13 -13
- package/dist/adapters/fastify/index.cjs +1 -1
- package/dist/adapters/fastify/index.js +13 -13
- package/dist/adapters/{handler-zbRXe0T7.js → handler-B_vsFWWm.js} +32 -32
- package/dist/adapters/{handler-BIntJx7r.cjs → handler-DSOaXFuV.cjs} +3 -3
- package/dist/adapters/hono/index.cjs +1 -1
- package/dist/adapters/hono/index.js +12 -12
- package/dist/adapters/locale.d.ts +0 -1
- package/dist/adapters/mcp-app-html-DkiIh0rL.cjs +1 -0
- package/dist/adapters/mcp-app-html-DwnysAEL.js +5 -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-D0sMYZAv.cjs → mcp-transport-7zszPPXk.cjs} +1 -1
- package/dist/adapters/{mcp-transport-Dt0OJUTC.js → mcp-transport-DVI1lCNM.js} +1 -1
- package/dist/adapters/nextjs/index.cjs +1 -1
- package/dist/adapters/nextjs/index.js +20 -20
- package/dist/adapters/{openai-D-GSoFRS.js → openai-Bdnnw3Ok.js} +1 -1
- package/dist/adapters/{openai-fP9uuybp.cjs → openai-CE52anhW.cjs} +1 -1
- package/dist/adapters/{openai-yZ3KkIqz.js → openai-DA9yrRkA.js} +1 -1
- package/dist/adapters/{openai-BVi0RiSA.cjs → openai-JLaT_FPt.cjs} +1 -1
- package/dist/adapters/{utils-BTZoHYi5.js → utils-BtiRfbcX.js} +28 -2
- package/dist/adapters/utils-OLv25-nn.cjs +141 -0
- package/dist/adapters/utils.cjs +1 -1
- package/dist/adapters/utils.d.ts +5 -10
- package/dist/adapters/utils.js +1 -1
- package/dist/cjs/adapters/core/cache-options.d.ts +4 -0
- package/dist/cjs/adapters/cors-headers.d.ts +19 -0
- package/dist/cjs/adapters/locale.d.ts +0 -1
- package/dist/cjs/adapters/utils.d.ts +5 -10
- package/dist/cjs/client/charts/lazyChartConfigRegistry.d.ts +2 -2
- package/dist/cjs/client/client/BatchCoordinator.d.ts +21 -6
- package/dist/cjs/client/client/CubeClient.d.ts +34 -8
- package/dist/cjs/client/client/maxAge.d.ts +84 -0
- package/dist/cjs/client/client/subscription.d.ts +30 -0
- package/dist/cjs/client/components/DashboardPortletCard.d.ts +1 -1
- package/dist/cjs/client/components/FloatingEditToolbar.d.ts +5 -1
- package/dist/cjs/client/components/MobileStackedLayout.d.ts +8 -2
- package/dist/cjs/client/components/PortletAnalysisModal.d.ts +4 -2
- package/dist/cjs/client/components/analyticsPortlet/usePortletDeadMembers.d.ts +4 -2
- package/dist/cjs/client/components/analyticsPortlet/usePortletQueryResults.d.ts +15 -5
- package/dist/cjs/client/components/analyticsPortlet/usePortletVisibility.d.ts +23 -0
- package/dist/cjs/client/components/dashboard/DashboardContext.d.ts +16 -3
- package/dist/cjs/client/components/dashboard/DashboardEditBar.d.ts +1 -1
- package/dist/cjs/client/components/dashboard/DashboardRefreshSelector.d.ts +12 -0
- package/dist/cjs/client/components/dashboard/DashboardToolbar.d.ts +2 -1
- package/dist/cjs/client/components/dashboard/RefreshPauseToggle.d.ts +8 -0
- package/dist/cjs/client/components/dashboardPortletCard/DataFreshnessIndicator.d.ts +19 -0
- package/dist/cjs/client/components/dashboardPortletCard/PortletCardHeader.d.ts +13 -3
- package/dist/cjs/client/components/dashboardPortletCard/PortletFloatingActions.d.ts +2 -3
- package/dist/cjs/client/components/dashboardPortletCard/propsEqual.d.ts +7 -4
- package/dist/cjs/client/components/portletAnalysisModal/RefreshSettings.d.ts +24 -0
- package/dist/cjs/client/hooks/dashboard/useDashboardController.d.ts +6 -10
- package/dist/cjs/client/hooks/dashboard/useDashboardRefreshTimer.d.ts +28 -0
- package/dist/cjs/client/hooks/queries/useCubeLoadQuery.d.ts +26 -6
- package/dist/cjs/client/hooks/queries/useFlowQuery.d.ts +6 -3
- package/dist/cjs/client/hooks/queries/useMultiCubeLoadQuery.d.ts +13 -4
- package/dist/cjs/client/hooks/queries/useRetentionQuery.d.ts +7 -4
- package/dist/cjs/client/hooks/queries/useShownRowsAge.d.ts +10 -0
- package/dist/cjs/client/hooks/useAnalysisBuilderHook.d.ts +2 -3
- package/dist/cjs/client/hooks/useAnalysisEffects.d.ts +2 -0
- package/dist/cjs/client/hooks/useAnalysisQuery.d.ts +2 -3
- package/dist/cjs/client/hooks/useDashboardHook.d.ts +7 -10
- package/dist/cjs/client/icons/types.d.ts +2 -0
- package/dist/cjs/client/index.d.ts +3 -1
- package/dist/cjs/client/shared/chartDefaults.d.ts +5 -3
- package/dist/cjs/client/stores/dashboardStore.d.ts +13 -0
- package/dist/cjs/client/types/funnel.d.ts +10 -4
- package/dist/cjs/client/types.d.ts +68 -3
- package/dist/cjs/client/utils/freshness.d.ts +37 -0
- package/dist/cjs/client/utils/multiQueryUtils.d.ts +23 -0
- package/dist/cjs/server/compiler.d.ts +2 -0
- package/dist/cjs/server/execution/query-result-cache.d.ts +8 -2
- package/dist/cjs/server/executor.d.ts +1 -0
- package/dist/cjs/server/physical-plan/processors/shared.d.ts +2 -0
- package/dist/cjs/server/types/core.d.ts +12 -1
- package/dist/cjs/server/types/cube.d.ts +7 -0
- package/dist/client/charts/lazyChartConfigRegistry.d.ts +2 -2
- package/dist/client/charts.js +13 -13
- package/dist/client/chunks/{DashboardEditModal-C7Nj2XvQ.js → DashboardEditModal-F2fGr29d.js} +2572 -2196
- package/dist/client/chunks/DashboardEditModal-F2fGr29d.js.map +1 -0
- package/dist/client/chunks/{DotStripChart-QEz91ja9.js → DotStripChart-CQaJwo8K.js} +3 -3
- package/dist/client/chunks/{DotStripChart-QEz91ja9.js.map → DotStripChart-CQaJwo8K.js.map} +1 -1
- package/dist/client/chunks/{ProportionBarChart-pb8nuT0D.js → ProportionBarChart-DiA5ZGeg.js} +3 -3
- package/dist/client/chunks/{ProportionBarChart-pb8nuT0D.js.map → ProportionBarChart-DiA5ZGeg.js.map} +1 -1
- package/dist/client/chunks/{RecordsTable-D8Lirq-E.js → RecordsTable-Bgqo-LjT.js} +166 -166
- package/dist/client/chunks/RecordsTable-Bgqo-LjT.js.map +1 -0
- package/dist/client/chunks/{RetentionCombinedChart-B9onTBMq.js → RetentionCombinedChart-BtMRtwlb.js} +3 -3
- package/dist/client/chunks/{RetentionCombinedChart-B9onTBMq.js.map → RetentionCombinedChart-BtMRtwlb.js.map} +1 -1
- package/dist/client/chunks/{RetentionHeatmap-WN_NOsvA.js → RetentionHeatmap-ChTa35gp.js} +2 -2
- package/dist/client/chunks/{RetentionHeatmap-WN_NOsvA.js.map → RetentionHeatmap-ChTa35gp.js.map} +1 -1
- package/dist/client/chunks/{analysis-builder-CmnW9_92.js → analysis-builder-CnmkTZm2.js} +831 -845
- package/dist/client/chunks/analysis-builder-CnmkTZm2.js.map +1 -0
- package/dist/client/chunks/{analysis-builder-shared-W_lbhFRa.js → analysis-builder-shared-BsjxOL7r.js} +809 -803
- package/dist/client/chunks/analysis-builder-shared-BsjxOL7r.js.map +1 -0
- package/dist/client/chunks/{chart-activity-grid-CJXF0zeZ.js → chart-activity-grid-DeDPSs12.js} +27 -2
- package/dist/client/chunks/{chart-activity-grid-CJXF0zeZ.js.map → chart-activity-grid-DeDPSs12.js.map} +1 -1
- package/dist/client/chunks/{chart-area-DbcIg5Ql.js → chart-area-WyrVYze7.js} +2 -2
- package/dist/client/chunks/{chart-area-DbcIg5Ql.js.map → chart-area-WyrVYze7.js.map} +1 -1
- package/dist/client/chunks/{chart-bar-E_qVO7I9.js → chart-bar-wGHC1Hfo.js} +3 -3
- package/dist/client/chunks/{chart-bar-E_qVO7I9.js.map → chart-bar-wGHC1Hfo.js.map} +1 -1
- package/dist/client/chunks/{chart-box-plot-CIwQZh9I.js → chart-box-plot-CW5GZHM9.js} +2 -2
- package/dist/client/chunks/{chart-box-plot-CIwQZh9I.js.map → chart-box-plot-CW5GZHM9.js.map} +1 -1
- package/dist/client/chunks/{chart-bubble-BrMToSQW.js → chart-bubble-CKkVi7L2.js} +2 -2
- package/dist/client/chunks/{chart-bubble-BrMToSQW.js.map → chart-bubble-CKkVi7L2.js.map} +1 -1
- package/dist/client/chunks/{chart-candlestick-C9FBo9mf.js → chart-candlestick-BPFeay7t.js} +2 -2
- package/dist/client/chunks/{chart-candlestick-C9FBo9mf.js.map → chart-candlestick-BPFeay7t.js.map} +1 -1
- package/dist/client/chunks/{chart-data-table-vxJ9eDbC.js → chart-data-table-uJG1V-be.js} +1133 -854
- package/dist/client/chunks/chart-data-table-uJG1V-be.js.map +1 -0
- package/dist/client/chunks/{chart-funnel-D11lxZ5_.js → chart-funnel-BtUexI1t.js} +2 -2
- package/dist/client/chunks/{chart-funnel-D11lxZ5_.js.map → chart-funnel-BtUexI1t.js.map} +1 -1
- package/dist/client/chunks/{chart-gauge-BQcgvynO.js → chart-gauge-BSrfZFsW.js} +3 -3
- package/dist/client/chunks/{chart-gauge-BQcgvynO.js.map → chart-gauge-BSrfZFsW.js.map} +1 -1
- package/dist/client/chunks/{chart-heat-map-J2j5MNLJ.js → chart-heat-map-DtMtuFnw.js} +3 -3
- package/dist/client/chunks/{chart-heat-map-J2j5MNLJ.js.map → chart-heat-map-DtMtuFnw.js.map} +1 -1
- package/dist/client/chunks/{chart-kpi-delta-BKEJT7mj.js → chart-kpi-delta-B0BkN_Q6.js} +3 -3
- package/dist/client/chunks/{chart-kpi-delta-BKEJT7mj.js.map → chart-kpi-delta-B0BkN_Q6.js.map} +1 -1
- package/dist/client/chunks/{chart-kpi-number-DCBXjFI-.js → chart-kpi-number-zlBkLesi.js} +5 -5
- package/dist/client/chunks/{chart-kpi-number-DCBXjFI-.js.map → chart-kpi-number-zlBkLesi.js.map} +1 -1
- package/dist/client/chunks/{chart-kpi-text-D_qFY84K.js → chart-kpi-text-BXXfkhz_.js} +3 -3
- package/dist/client/chunks/{chart-kpi-text-D_qFY84K.js.map → chart-kpi-text-BXXfkhz_.js.map} +1 -1
- package/dist/client/chunks/{chart-line-CS2ixl5U.js → chart-line-D_yFQDze.js} +3 -3
- package/dist/client/chunks/{chart-line-CS2ixl5U.js.map → chart-line-D_yFQDze.js.map} +1 -1
- package/dist/client/chunks/{chart-markdown-DKMZqwwH.js → chart-markdown-DaBTpRgf.js} +2 -2
- package/dist/client/chunks/{chart-markdown-DKMZqwwH.js.map → chart-markdown-DaBTpRgf.js.map} +1 -1
- package/dist/client/chunks/{chart-measure-profile-Cu-JZfYt.js → chart-measure-profile-DOHIm-QY.js} +3 -3
- package/dist/client/chunks/{chart-measure-profile-Cu-JZfYt.js.map → chart-measure-profile-DOHIm-QY.js.map} +1 -1
- package/dist/client/chunks/{chart-pie-CNRjmYs5.js → chart-pie-DLrT81CL.js} +3 -3
- package/dist/client/chunks/{chart-pie-CNRjmYs5.js.map → chart-pie-DLrT81CL.js.map} +1 -1
- package/dist/client/chunks/{chart-radar-BZbwDAIY.js → chart-radar-CcXG6k6o.js} +3 -3
- package/dist/client/chunks/{chart-radar-BZbwDAIY.js.map → chart-radar-CcXG6k6o.js.map} +1 -1
- package/dist/client/chunks/{chart-radial-bar-Dvd2DAnu.js → chart-radial-bar-DYn5FLrG.js} +3 -3
- package/dist/client/chunks/{chart-radial-bar-Dvd2DAnu.js.map → chart-radial-bar-DYn5FLrG.js.map} +1 -1
- package/dist/client/chunks/{chart-sankey-CxR3tqnR.js → chart-sankey-CWkctg-k.js} +2 -2
- package/dist/client/chunks/{chart-sankey-CxR3tqnR.js.map → chart-sankey-CWkctg-k.js.map} +1 -1
- package/dist/client/chunks/{chart-scatter-BqFOCOhW.js → chart-scatter-CCGL2IEP.js} +3 -3
- package/dist/client/chunks/{chart-scatter-BqFOCOhW.js.map → chart-scatter-CCGL2IEP.js.map} +1 -1
- package/dist/client/chunks/{chart-sunburst-C6wdt55m.js → chart-sunburst-9sgiHFSO.js} +3 -3
- package/dist/client/chunks/{chart-sunburst-C6wdt55m.js.map → chart-sunburst-9sgiHFSO.js.map} +1 -1
- package/dist/client/chunks/{chart-tree-map-DE8-SZzY.js → chart-tree-map-DOWeXCn_.js} +3 -3
- package/dist/client/chunks/{chart-tree-map-DE8-SZzY.js.map → chart-tree-map-DOWeXCn_.js.map} +1 -1
- package/dist/client/chunks/{chart-waterfall-DdIFbm8I.js → chart-waterfall-BS7x0dW-.js} +3 -3
- package/dist/client/chunks/{chart-waterfall-DdIFbm8I.js.map → chart-waterfall-BS7x0dW-.js.map} +1 -1
- package/dist/client/chunks/{charts-core-0qGDP3Zh.js → charts-core-DM-Eav_9.js} +2 -2
- package/dist/client/chunks/{charts-core-0qGDP3Zh.js.map → charts-core-DM-Eav_9.js.map} +1 -1
- package/dist/client/chunks/charts-loader-3N-LqjLk.js +87 -0
- package/dist/client/chunks/{charts-loader-CwTTQh7e.js.map → charts-loader-3N-LqjLk.js.map} +1 -1
- package/dist/client/chunks/{dashboardExport-Cy5OOMpb.js → dashboardExport-ZiT4DcDZ.js} +143 -121
- package/dist/client/chunks/dashboardExport-ZiT4DcDZ.js.map +1 -0
- package/dist/client/chunks/{gapFilling-DKBRHcQL.js → gapFilling-C-A4o8Cl.js} +2 -1
- package/dist/client/chunks/{gapFilling-DKBRHcQL.js.map → gapFilling-C-A4o8Cl.js.map} +1 -1
- package/dist/client/chunks/{nl-NL-Fi9_nOz7.js → nl-NL-CKfZudeP.js} +26 -1
- package/dist/client/chunks/{nl-NL-Fi9_nOz7.js.map → nl-NL-CKfZudeP.js.map} +1 -1
- package/dist/client/chunks/{schema-visualization-CcYQAUCS.js → schema-visualization-BO70spCF.js} +3 -3
- package/dist/client/chunks/{schema-visualization-CcYQAUCS.js.map → schema-visualization-BO70spCF.js.map} +1 -1
- package/dist/client/chunks/useDirtyStateTracking-OVW-JnrF.js +1086 -0
- package/dist/client/chunks/useDirtyStateTracking-OVW-JnrF.js.map +1 -0
- package/dist/client/chunks/{useExplainAI-2W12PFz_.js → useExplainAI-BrjlR24K.js} +25 -25
- package/dist/client/chunks/{useExplainAI-2W12PFz_.js.map → useExplainAI-BrjlR24K.js.map} +1 -1
- package/dist/client/chunks/{vendor-Bz0lKciG.js → vendor-Das3qwov.js} +188 -188
- package/dist/client/chunks/vendor-Das3qwov.js.map +1 -0
- package/dist/client/client/BatchCoordinator.d.ts +21 -6
- package/dist/client/client/CubeClient.d.ts +34 -8
- package/dist/client/client/maxAge.d.ts +84 -0
- package/dist/client/client/subscription.d.ts +30 -0
- package/dist/client/components/DashboardPortletCard.d.ts +1 -1
- package/dist/client/components/FloatingEditToolbar.d.ts +5 -1
- package/dist/client/components/MobileStackedLayout.d.ts +8 -2
- package/dist/client/components/PortletAnalysisModal.d.ts +4 -2
- package/dist/client/components/analyticsPortlet/usePortletDeadMembers.d.ts +4 -2
- package/dist/client/components/analyticsPortlet/usePortletQueryResults.d.ts +15 -5
- package/dist/client/components/analyticsPortlet/usePortletVisibility.d.ts +23 -0
- package/dist/client/components/dashboard/DashboardContext.d.ts +16 -3
- package/dist/client/components/dashboard/DashboardEditBar.d.ts +1 -1
- package/dist/client/components/dashboard/DashboardRefreshSelector.d.ts +12 -0
- package/dist/client/components/dashboard/DashboardToolbar.d.ts +2 -1
- package/dist/client/components/dashboard/RefreshPauseToggle.d.ts +8 -0
- package/dist/client/components/dashboardPortletCard/DataFreshnessIndicator.d.ts +19 -0
- package/dist/client/components/dashboardPortletCard/PortletCardHeader.d.ts +13 -3
- package/dist/client/components/dashboardPortletCard/PortletFloatingActions.d.ts +2 -3
- package/dist/client/components/dashboardPortletCard/propsEqual.d.ts +7 -4
- package/dist/client/components/portletAnalysisModal/RefreshSettings.d.ts +24 -0
- package/dist/client/components.js +1 -1
- package/dist/client/hooks/dashboard/useDashboardController.d.ts +6 -10
- package/dist/client/hooks/dashboard/useDashboardRefreshTimer.d.ts +28 -0
- package/dist/client/hooks/queries/useCubeLoadQuery.d.ts +26 -6
- package/dist/client/hooks/queries/useFlowQuery.d.ts +6 -3
- package/dist/client/hooks/queries/useMultiCubeLoadQuery.d.ts +13 -4
- package/dist/client/hooks/queries/useRetentionQuery.d.ts +7 -4
- package/dist/client/hooks/queries/useShownRowsAge.d.ts +10 -0
- package/dist/client/hooks/useAnalysisBuilderHook.d.ts +2 -3
- package/dist/client/hooks/useAnalysisEffects.d.ts +2 -0
- package/dist/client/hooks/useAnalysisQuery.d.ts +2 -3
- package/dist/client/hooks/useDashboardHook.d.ts +7 -10
- package/dist/client/hooks.js +4 -4
- package/dist/client/icons/types.d.ts +2 -0
- package/dist/client/icons.js +1 -1
- package/dist/client/index.d.ts +3 -1
- package/dist/client/index.js +265 -265
- package/dist/client/index.js.map +1 -1
- package/dist/client/providers.js +3 -3
- package/dist/client/schema.js +1 -1
- package/dist/client/shared/chartDefaults.d.ts +5 -3
- package/dist/client/stores/dashboardStore.d.ts +13 -0
- package/dist/client/types/funnel.d.ts +10 -4
- package/dist/client/types.d.ts +68 -3
- package/dist/client/utils/freshness.d.ts +37 -0
- package/dist/client/utils/multiQueryUtils.d.ts +23 -0
- package/dist/client/utils.js +6 -6
- package/dist/client-bundle-stats.html +1 -1
- package/dist/mcp-app/mcp-app.html +100 -100
- package/dist/server/compiler.d.ts +2 -0
- package/dist/server/execution/query-result-cache.d.ts +8 -2
- package/dist/server/executor.d.ts +1 -0
- package/dist/server/index.cjs +42 -42
- package/dist/server/index.js +1262 -1229
- package/dist/server/physical-plan/processors/shared.d.ts +2 -0
- package/dist/server/types/core.d.ts +12 -1
- package/dist/server/types/cube.d.ts +7 -0
- package/package.json +1 -1
- package/dist/adapters/ActivityGridChart.config-D39xezZk.cjs +0 -1
- package/dist/adapters/ActivityGridChart.config-Dda_6s0U.js +0 -1
- package/dist/adapters/AreaChart.config-C2jCU8Un.js +0 -1
- package/dist/adapters/AreaChart.config-OUEFGX8L.cjs +0 -1
- package/dist/adapters/BarChart.config-D98PTSf1.cjs +0 -1
- package/dist/adapters/BarChart.config-EU-BNwwQ.js +0 -1
- package/dist/adapters/BoxPlotChart.config-C31U6Xwc.cjs +0 -1
- package/dist/adapters/BoxPlotChart.config-CZ9PdgAR.js +0 -1
- package/dist/adapters/BubbleChart.config-bdvOX_OM.js +0 -1
- package/dist/adapters/BubbleChart.config-o1gkn-oi.cjs +0 -1
- package/dist/adapters/CandlestickChart.config-BJ2zddnS.cjs +0 -1
- package/dist/adapters/CandlestickChart.config-DVoQffTz.js +0 -1
- package/dist/adapters/DataTable.config-4jfKTU-P.cjs +0 -1
- package/dist/adapters/DataTable.config-CYymkiCj.js +0 -1
- package/dist/adapters/DotStripChart.config-CdEToyMR.js +0 -1
- package/dist/adapters/DotStripChart.config-CeGKfd2Y.cjs +0 -1
- package/dist/adapters/FunnelChart.config-C9xr0lB7.cjs +0 -1
- package/dist/adapters/FunnelChart.config-DgLsAd6X.js +0 -1
- package/dist/adapters/GaugeChart.config-Crpx_mOJ.cjs +0 -1
- package/dist/adapters/GaugeChart.config-DMGLtrtP.js +0 -1
- package/dist/adapters/HeatMapChart.config-Bag4iUrV.js +0 -1
- package/dist/adapters/HeatMapChart.config-DYlOsCXv.cjs +0 -1
- package/dist/adapters/KpiDelta.config-CpBbqTSe.js +0 -1
- package/dist/adapters/KpiDelta.config-Dz04ftLJ.cjs +0 -1
- package/dist/adapters/KpiNumber.config-B7hJ_9KD.js +0 -1
- package/dist/adapters/KpiNumber.config-B90sa19m.cjs +0 -1
- package/dist/adapters/KpiText.config-BkFneytA.cjs +0 -1
- package/dist/adapters/KpiText.config-De251rp3.js +0 -1
- package/dist/adapters/LineChart.config-BqhSrY3Y.cjs +0 -1
- package/dist/adapters/LineChart.config-So9LmBca.js +0 -1
- package/dist/adapters/MarkdownChart.config-Bb68uUv7.cjs +0 -1
- package/dist/adapters/MarkdownChart.config-CPrdMTKk.js +0 -1
- package/dist/adapters/MeasureProfileChart.config-D8ys_JcL.cjs +0 -1
- package/dist/adapters/MeasureProfileChart.config-DmtZaq33.js +0 -1
- package/dist/adapters/PieChart.config-DSCsXFyT.cjs +0 -1
- package/dist/adapters/PieChart.config-GnJP21n4.js +0 -1
- package/dist/adapters/ProportionBarChart.config-BpMvnSL2.js +0 -1
- package/dist/adapters/ProportionBarChart.config-L2KzFFNd.cjs +0 -1
- package/dist/adapters/RadarChart.config-BuoeQHzU.js +0 -1
- package/dist/adapters/RadarChart.config-s00FMtiV.cjs +0 -1
- package/dist/adapters/RadialBarChart.config-Csaj03QZ.cjs +0 -1
- package/dist/adapters/RadialBarChart.config-Cx5SaB02.js +0 -1
- package/dist/adapters/RecordsTable.config-Daba7GEf.cjs +0 -1
- package/dist/adapters/RecordsTable.config-DaeLGs-c.js +0 -1
- package/dist/adapters/RetentionCombinedChart.config-BC1bizXY.cjs +0 -1
- package/dist/adapters/RetentionCombinedChart.config-eOTeHUd-.js +0 -1
- package/dist/adapters/RetentionHeatmap.config-BW0tarnm.cjs +0 -1
- package/dist/adapters/RetentionHeatmap.config-C_ObG7BL.js +0 -1
- package/dist/adapters/SankeyChart.config-BvtX99Ub.js +0 -1
- package/dist/adapters/SankeyChart.config-D1vkom4z.cjs +0 -1
- package/dist/adapters/ScatterChart.config-OF3pLDki.cjs +0 -1
- package/dist/adapters/ScatterChart.config-gmIhEs9x.js +0 -1
- package/dist/adapters/SunburstChart.config-DVF_YC7z.cjs +0 -1
- package/dist/adapters/SunburstChart.config-IeVU95wF.js +0 -1
- package/dist/adapters/TreeMapChart.config-CZbNvSfx.js +0 -1
- package/dist/adapters/TreeMapChart.config-CzjOynvQ.cjs +0 -1
- package/dist/adapters/WaterfallChart.config-BCKwwg8W.cjs +0 -1
- package/dist/adapters/WaterfallChart.config-BQ-qNCQD.js +0 -1
- package/dist/adapters/core-Bpzlbfe4.cjs +0 -1
- package/dist/adapters/mcp-app-html-DjXsoT66.js +0 -5
- package/dist/adapters/mcp-app-html-s0EguZzT.cjs +0 -1
- package/dist/adapters/utils-DY4WUdbt.cjs +0 -141
- package/dist/client/chunks/DashboardEditModal-C7Nj2XvQ.js.map +0 -1
- package/dist/client/chunks/RecordsTable-D8Lirq-E.js.map +0 -1
- package/dist/client/chunks/analysis-builder-CmnW9_92.js.map +0 -1
- package/dist/client/chunks/analysis-builder-shared-W_lbhFRa.js.map +0 -1
- package/dist/client/chunks/chart-data-table-vxJ9eDbC.js.map +0 -1
- package/dist/client/chunks/charts-loader-CwTTQh7e.js +0 -87
- package/dist/client/chunks/dashboardExport-Cy5OOMpb.js.map +0 -1
- package/dist/client/chunks/useDirtyStateTracking-C_pCRhRu.js +0 -1150
- package/dist/client/chunks/useDirtyStateTracking-C_pCRhRu.js.map +0 -1
- package/dist/client/chunks/vendor-Bz0lKciG.js.map +0 -1
|
@@ -1,10 +1,8 @@
|
|
|
1
1
|
import { useCubeLoadQuery, useFunnelQuery, useFlowQuery, useRetentionQuery } from '../../hooks/queries/index.js';
|
|
2
|
+
import { MaxAgeOptions } from '../../client/maxAge.js';
|
|
2
3
|
import { ChartDisplayConfig, CubeQuery, MultiQueryConfig, ServerFunnelQuery } from '../../types.js';
|
|
3
4
|
import { FlowChartData, ServerFlowQuery } from '../../types/flow.js';
|
|
4
5
|
import { RetentionChartData, ServerRetentionQuery } from '../../types/retention.js';
|
|
5
|
-
interface RefreshOptions {
|
|
6
|
-
bustCache?: boolean;
|
|
7
|
-
}
|
|
8
6
|
export interface UsePortletQueryResultsParams {
|
|
9
7
|
activeQuery: CubeQuery | null;
|
|
10
8
|
multiQueryConfig: MultiQueryConfig | null;
|
|
@@ -17,7 +15,18 @@ export interface UsePortletQueryResultsParams {
|
|
|
17
15
|
isRetentionMode: boolean;
|
|
18
16
|
shouldSkipQuery: boolean;
|
|
19
17
|
eagerLoad: boolean;
|
|
18
|
+
/**
|
|
19
|
+
* Near the viewport now or before. Until then the hooks are disabled, not
|
|
20
|
+
* skipped: they keep their query key, so a refresh made before the first
|
|
21
|
+
* view applies to the first fetch.
|
|
22
|
+
*/
|
|
20
23
|
isVisible: boolean;
|
|
24
|
+
/**
|
|
25
|
+
* Disable the hooks while the portlet is scrolled away (an interval-refreshed
|
|
26
|
+
* portlet): they keep their data, a refresh only marks them stale, and they
|
|
27
|
+
* fetch what is stale when the portlet is back.
|
|
28
|
+
*/
|
|
29
|
+
isScrolledAway?: boolean;
|
|
21
30
|
/** Chart display config — its `fillMissingDates` drives client-side gap filling */
|
|
22
31
|
displayConfig?: ChartDisplayConfig;
|
|
23
32
|
}
|
|
@@ -32,8 +41,9 @@ export interface PortletQueryResults {
|
|
|
32
41
|
funnelCacheInfo: ReturnType<typeof useFunnelQuery>['cacheInfo'];
|
|
33
42
|
flowCacheInfo: ReturnType<typeof useFlowQuery>['cacheInfo'];
|
|
34
43
|
retentionCacheInfo: ReturnType<typeof useRetentionQuery>['cacheInfo'];
|
|
35
|
-
|
|
44
|
+
/** When the active mode's rows were computed on the server (oldest result for multi-query) */
|
|
45
|
+
computedAt: string | undefined;
|
|
46
|
+
refresh: (options?: MaxAgeOptions) => void;
|
|
36
47
|
retry: () => void;
|
|
37
48
|
}
|
|
38
49
|
export declare function usePortletQueryResults(params: UsePortletQueryResultsParams): PortletQueryResults;
|
|
39
|
-
export {};
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Portlet visibility for lazy loading and refresh.
|
|
3
|
+
*
|
|
4
|
+
* A portlet loads the first time it comes near the viewport and keeps its
|
|
5
|
+
* data after it scrolls away. Before the first view its queries are disabled
|
|
6
|
+
* (not skipped), so a refresh made then applies to the first fetch. An
|
|
7
|
+
* interval-refreshed portlet's queries are also disabled while it is
|
|
8
|
+
* scrolled away: TanStack keeps their data, a refresh only records its
|
|
9
|
+
* max-age and marks the query stale, and scrolling back refetches whatever is
|
|
10
|
+
* stale with the max-age it recorded.
|
|
11
|
+
*
|
|
12
|
+
* Only an interval-refreshed portlet keeps observing after its first view;
|
|
13
|
+
* any other stops, as there is nothing to hold while it is scrolled away.
|
|
14
|
+
*/
|
|
15
|
+
export interface PortletVisibility {
|
|
16
|
+
/** Attach to the portlet's root element */
|
|
17
|
+
inViewRef: (node?: Element | null) => void;
|
|
18
|
+
/** Whether the portlet's queries exist (in view now or before, or eager) */
|
|
19
|
+
isVisible: boolean;
|
|
20
|
+
/** Whether an interval-refreshed portlet scrolled away after being in view; its queries are disabled */
|
|
21
|
+
isScrolledAway: boolean;
|
|
22
|
+
}
|
|
23
|
+
export declare function usePortletVisibility(eagerLoad: boolean, hasIntervalRefresh: boolean): PortletVisibility;
|
|
@@ -5,6 +5,7 @@ import { DashboardDisplayMode } from '../../hooks/useResponsiveDashboard.js';
|
|
|
5
5
|
import { DashboardImportExportState } from '../../hooks/dashboard/useDashboardImportExport.js';
|
|
6
6
|
import { ColorPalette } from '../../utils/colorPalettes.js';
|
|
7
7
|
import { DashboardConfig, PortletConfig, DashboardFilter, DashboardFilterMapping, CubeMeta, DashboardLayoutMode, DashboardGridSettings, RowLayout, PortletGroup, FeaturesConfig, DashboardMeta, PortletExpandPayload } from '../../types.js';
|
|
8
|
+
import { MaxAgeOptions } from '../../client/maxAge.js';
|
|
8
9
|
/**
|
|
9
10
|
* Props accepted by DashboardProvider (the public composable entry point).
|
|
10
11
|
* Mirrors the former DashboardGridProps plus `hideToolbar` and `children`.
|
|
@@ -99,6 +100,8 @@ export interface DashboardContextValue {
|
|
|
99
100
|
features: FeaturesConfig;
|
|
100
101
|
/** Dashboard JSON export/import flow (features.dashboardImportExport); `enabled` is false when the feature is off */
|
|
101
102
|
importExport: DashboardImportExportState;
|
|
103
|
+
/** Interval refresh (features.refresh): whether any portlet refreshes, and the dashboard-level pause */
|
|
104
|
+
refresh: DashboardRefreshState;
|
|
102
105
|
editBarRef: MutableRefObject<HTMLDivElement | null>;
|
|
103
106
|
gridContentRef: MutableRefObject<HTMLDivElement | null>;
|
|
104
107
|
gridSettings: DashboardGridSettings;
|
|
@@ -113,9 +116,11 @@ export interface DashboardContextValue {
|
|
|
113
116
|
handleSelectAllForFilter: (filterId: string) => Promise<void>;
|
|
114
117
|
handleSaveFilterConfig: (mapping: DashboardFilterMapping) => Promise<void>;
|
|
115
118
|
handlePortletSave: (portletData: PortletConfig | Omit<PortletConfig, 'id' | 'x' | 'y'>) => Promise<void>;
|
|
116
|
-
handlePortletRefresh: (portletId: string, options?:
|
|
117
|
-
|
|
118
|
-
|
|
119
|
+
handlePortletRefresh: (portletId: string, options?: MaxAgeOptions) => void;
|
|
120
|
+
/** Registers a chart so handlePortletRefresh reaches it (used by the mobile layout) */
|
|
121
|
+
handleSetPortletComponentRef: (portletId: string, element: {
|
|
122
|
+
refresh: (options?: MaxAgeOptions) => void;
|
|
123
|
+
} | null) => void;
|
|
119
124
|
handleLayoutChange: (layout: Layout) => void;
|
|
120
125
|
handleDragStop: (layout: Layout, oldItem: LayoutItem | null, newItem: LayoutItem | null, placeholder: LayoutItem | null, e: Event, element: HTMLElement | null) => void;
|
|
121
126
|
handleResizeStop: (layout: Layout, oldItem: LayoutItem | null, newItem: LayoutItem | null, placeholder: LayoutItem | null, e: Event, element: HTMLElement | null) => void;
|
|
@@ -126,6 +131,14 @@ export interface DashboardContextValue {
|
|
|
126
131
|
handleRowDrop: (rowIndex: number, insertIndex: number | null) => void;
|
|
127
132
|
handleNewRowDrop: (insertIndex: number) => void;
|
|
128
133
|
}
|
|
134
|
+
/** Dashboard-level interval refresh state published to the toolbar. */
|
|
135
|
+
export interface DashboardRefreshState {
|
|
136
|
+
/** Whether any portlet has an effective refresh interval */
|
|
137
|
+
hasRefresh: boolean;
|
|
138
|
+
/** Whether the viewer paused refresh for the whole dashboard */
|
|
139
|
+
isPaused: boolean;
|
|
140
|
+
togglePaused: () => void;
|
|
141
|
+
}
|
|
129
142
|
declare const DashboardContext: import('react').Context<DashboardContextValue | null>;
|
|
130
143
|
/**
|
|
131
144
|
* Access the dashboard context published by DashboardProvider.
|
|
@@ -3,6 +3,6 @@
|
|
|
3
3
|
* DashboardContext; rendered only when the top toolbar variant is active.
|
|
4
4
|
*
|
|
5
5
|
* On a read-only dashboard (`editable` false) the editing controls are left out
|
|
6
|
-
* and the bar carries only the export action.
|
|
6
|
+
* and the bar carries only the export action and the refresh pause toggle.
|
|
7
7
|
*/
|
|
8
8
|
export default function DashboardEditBar(): import('react').JSX.Element;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { DashboardRefreshConfig } from '../../types.js';
|
|
2
|
+
/**
|
|
3
|
+
* The intervals to offer: presets at or above the minimum, plus the current
|
|
4
|
+
* interval when it is not one of them.
|
|
5
|
+
*/
|
|
6
|
+
export declare function refreshIntervalOptions(currentSeconds: number | undefined, minIntervalSeconds: number): number[];
|
|
7
|
+
export default function DashboardRefreshSelector({ refresh, minIntervalSeconds, onChange }: {
|
|
8
|
+
refresh: DashboardRefreshConfig | undefined;
|
|
9
|
+
minIntervalSeconds: number;
|
|
10
|
+
/** The new dashboard refresh config; undefined turns the default off */
|
|
11
|
+
onChange: (refresh: DashboardRefreshConfig | undefined) => void;
|
|
12
|
+
}): import('react').JSX.Element;
|
|
@@ -9,6 +9,7 @@
|
|
|
9
9
|
* a host can either omit this component or pass `hideToolbar` to suppress it.
|
|
10
10
|
*
|
|
11
11
|
* A read-only dashboard (`editable` false) normally has no toolbar at all. When the
|
|
12
|
-
* dashboard export feature is on
|
|
12
|
+
* dashboard export feature is on, or a portlet refreshes on an interval, it still
|
|
13
|
+
* gets one, reduced to the Export button and the refresh pause toggle.
|
|
13
14
|
*/
|
|
14
15
|
export default function DashboardToolbar(): import('react').JSX.Element | null;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Toolbar toggle that pauses and resumes interval refresh for the whole
|
|
3
|
+
* dashboard. Rendered only when some portlet refreshes on an interval.
|
|
4
|
+
*/
|
|
5
|
+
export default function RefreshPauseToggle({ isPaused, onToggle }: {
|
|
6
|
+
isPaused: boolean;
|
|
7
|
+
onToggle: () => void;
|
|
8
|
+
}): import('react').JSX.Element;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Freshness of a portlet's data, shown in its header: a status dot and the age
|
|
3
|
+
* of computed-at (when the rows were computed on the server, earlier than
|
|
4
|
+
* receipt for a cached result). The dot pulses while fetching, and the dot and
|
|
5
|
+
* age turn the warning color when computed-at is older than two refresh
|
|
6
|
+
* intervals. Paused shows on the card's pause/play button, not here. The
|
|
7
|
+
* tooltip spells out computed-at and the stale or paused state.
|
|
8
|
+
*/
|
|
9
|
+
export interface DataFreshnessIndicatorProps {
|
|
10
|
+
/** When the rows were computed (ISO string) */
|
|
11
|
+
computedAt?: string;
|
|
12
|
+
/** Whether a fetch is in flight */
|
|
13
|
+
isFetching: boolean;
|
|
14
|
+
/** The portlet's effective refresh interval, when it refreshes on one */
|
|
15
|
+
intervalSeconds?: number;
|
|
16
|
+
/** Whether the viewer paused this portlet's refresh (portlet or dashboard) */
|
|
17
|
+
isPaused: boolean;
|
|
18
|
+
}
|
|
19
|
+
export default function DataFreshnessIndicator({ computedAt, isFetching, intervalSeconds, isPaused }: DataFreshnessIndicatorProps): import('react').JSX.Element | null;
|
|
@@ -2,6 +2,8 @@ import { default as React, CSSProperties } from 'react';
|
|
|
2
2
|
import { PortletConfig } from '../../types.js';
|
|
3
3
|
import { PortletDebugDataEntry } from '../../stores/dashboardStore.js';
|
|
4
4
|
import { CardIcons } from './EditActionButtons.js';
|
|
5
|
+
import { DataFreshnessIndicatorProps } from './DataFreshnessIndicator.js';
|
|
6
|
+
import { MaxAgeOptions } from '../../client/maxAge.js';
|
|
5
7
|
interface PortletCardHeaderProps {
|
|
6
8
|
portlet: PortletConfig;
|
|
7
9
|
className: string;
|
|
@@ -20,9 +22,17 @@ interface PortletCardHeaderProps {
|
|
|
20
22
|
/** Labels of mapped dashboard date filters that cannot narrow this portlet */
|
|
21
23
|
unreachableDateFilterLabels?: string[];
|
|
22
24
|
icons: CardIcons;
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
25
|
+
/** Whether the portlet is fetching; the refresh icon spins meanwhile */
|
|
26
|
+
isFetching?: boolean;
|
|
27
|
+
/** Freshness indicator state; when absent (refresh feature off) the cache icon shows instead */
|
|
28
|
+
freshness?: DataFreshnessIndicatorProps;
|
|
29
|
+
/** Per-portlet refresh pause toggle; shown when the portlet refreshes on an interval */
|
|
30
|
+
refreshPause?: {
|
|
31
|
+
isPaused: boolean;
|
|
32
|
+
isDashboardPaused: boolean;
|
|
33
|
+
onToggle: () => void;
|
|
34
|
+
};
|
|
35
|
+
onRefresh: (options?: MaxAgeOptions) => void;
|
|
26
36
|
onHoverRefreshChange: (hovering: boolean) => void;
|
|
27
37
|
onCopyToClipboard: (event: React.MouseEvent | React.TouchEvent) => void;
|
|
28
38
|
onExportXlsx: (event: React.MouseEvent | React.TouchEvent) => void;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { default as React } from 'react';
|
|
2
2
|
import { PortletConfig } from '../../types.js';
|
|
3
3
|
import { CardIcons } from './EditActionButtons.js';
|
|
4
|
+
import { MaxAgeOptions } from '../../client/maxAge.js';
|
|
4
5
|
interface PortletFloatingActionsProps {
|
|
5
6
|
portlet: PortletConfig;
|
|
6
7
|
icons: CardIcons;
|
|
@@ -10,9 +11,7 @@ interface PortletFloatingActionsProps {
|
|
|
10
11
|
copySuccess: boolean;
|
|
11
12
|
xlsExportAvailable: boolean;
|
|
12
13
|
exportInProgress: boolean;
|
|
13
|
-
onRefresh: (options?:
|
|
14
|
-
bustCache?: boolean;
|
|
15
|
-
}) => void;
|
|
14
|
+
onRefresh: (options?: MaxAgeOptions) => void;
|
|
16
15
|
onCopyToClipboard: (event: React.MouseEvent | React.TouchEvent) => void;
|
|
17
16
|
onExportXlsx: (event: React.MouseEvent | React.TouchEvent) => void;
|
|
18
17
|
onOpenFilterConfig: () => void;
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import { HTMLAttributes, ReactNode, ComponentType, CSSProperties } from 'react';
|
|
2
|
-
import { AnalyticsPortletRef, ChartType, DashboardFilter, DashboardLayoutMode, PortletConfig, PortletExpandPayload } from '../../types.js';
|
|
2
|
+
import { AnalyticsPortletRef, ChartType, DashboardFilter, DashboardLayoutMode, DashboardRefreshConfig, PortletConfig, PortletExpandPayload } from '../../types.js';
|
|
3
3
|
import { PortletCardVariant } from './cardStyles.js';
|
|
4
4
|
import { ColorPalette } from '../../utils/colorPalettes.js';
|
|
5
|
+
import { MaxAgeOptions } from '../../client/maxAge.js';
|
|
5
6
|
export interface DashboardPortletCardProps {
|
|
6
7
|
portlet: PortletConfig;
|
|
7
8
|
editable: boolean;
|
|
@@ -9,6 +10,8 @@ export interface DashboardPortletCardProps {
|
|
|
9
10
|
variant?: PortletCardVariant;
|
|
10
11
|
dashboardFilters?: DashboardFilter[];
|
|
11
12
|
configEagerLoad?: boolean;
|
|
13
|
+
/** Dashboard default refresh, overridden by `portlet.refresh` */
|
|
14
|
+
dashboardRefresh?: DashboardRefreshConfig;
|
|
12
15
|
loadingComponent?: ReactNode;
|
|
13
16
|
colorPalette?: ColorPalette;
|
|
14
17
|
containerProps?: HTMLAttributes<HTMLDivElement>;
|
|
@@ -17,13 +20,13 @@ export interface DashboardPortletCardProps {
|
|
|
17
20
|
setPortletComponentRef: (portletId: string, element: AnalyticsPortletRef | null) => void;
|
|
18
21
|
callbacks: {
|
|
19
22
|
onToggleFilter: (portletId: string, filterId: string) => void;
|
|
20
|
-
onRefresh: (portletId: string, options?:
|
|
21
|
-
bustCache?: boolean;
|
|
22
|
-
}) => void;
|
|
23
|
+
onRefresh: (portletId: string, options?: MaxAgeOptions) => void;
|
|
23
24
|
onDuplicate: (portletId: string) => void;
|
|
24
25
|
onEdit: (portlet: PortletConfig) => void;
|
|
25
26
|
onDelete: (portletId: string) => void;
|
|
26
27
|
onOpenFilterConfig: (portlet: PortletConfig) => void;
|
|
28
|
+
/** Pause or resume this portlet's interval refresh */
|
|
29
|
+
onToggleRefreshPaused?: (portletId: string) => void;
|
|
27
30
|
};
|
|
28
31
|
icons: {
|
|
29
32
|
RefreshIcon: ComponentType<{
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { PortletRefreshConfig } from '../../types.js';
|
|
2
|
+
/**
|
|
3
|
+
* Form state for the section: the interval as typed, plus the hidden-tab flag.
|
|
4
|
+
* An undefined flag inherits the dashboard default; a boolean is an explicit
|
|
5
|
+
* portlet override, false included.
|
|
6
|
+
*/
|
|
7
|
+
export interface RefreshSettingsValue {
|
|
8
|
+
intervalText: string;
|
|
9
|
+
pauseWhenHidden?: boolean;
|
|
10
|
+
}
|
|
11
|
+
export declare function toRefreshSettingsValue(refresh: PortletRefreshConfig | undefined): RefreshSettingsValue;
|
|
12
|
+
/**
|
|
13
|
+
* The portlet `refresh` config for the form state, or undefined when neither
|
|
14
|
+
* field overrides the dashboard default. An empty or invalid interval inherits
|
|
15
|
+
* the dashboard's; a valid one is floored by `minIntervalSeconds`.
|
|
16
|
+
*/
|
|
17
|
+
export declare function fromRefreshSettingsValue(value: RefreshSettingsValue, minIntervalSeconds: number): PortletRefreshConfig | undefined;
|
|
18
|
+
export default function RefreshSettings({ value, minIntervalSeconds, inheritedPauseWhenHidden, onChange }: {
|
|
19
|
+
value: RefreshSettingsValue;
|
|
20
|
+
minIntervalSeconds: number;
|
|
21
|
+
/** The dashboard default, shown while the portlet has no override of its own */
|
|
22
|
+
inheritedPauseWhenHidden?: boolean;
|
|
23
|
+
onChange: (value: RefreshSettingsValue) => void;
|
|
24
|
+
}): import('react').JSX.Element;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { O as e, T as t, Z as n, a as r, g as i, h as a, i as o, k as s, m as c, n as l, r as u, s as d, t as f } from "./chunks/DashboardEditModal-
|
|
1
|
+
import { O as e, T as t, Z as n, a as r, g as i, h as a, i as o, k as s, m as c, n as l, r as u, s as d, t as f } from "./chunks/DashboardEditModal-F2fGr29d.js";
|
|
2
2
|
import { a as p, n as m, o as h, r as g, s as _, t as v } from "./chunks/utils-CToHkuhU.js";
|
|
3
3
|
export { d as AnalysisDisplayConfigPanel, u as AnalyticsDashboard, n as AnalyticsPortlet, f as DashboardEditModal, i as DashboardFilterBar, o as DashboardGrid, a as DashboardGridSurface, r as DashboardModals, e as DashboardProvider, t as DashboardToolbar, c as Modal, l as PortletContainer, v as createDashboardLayout, m as createSamplePortlet, g as findNextPosition, p as generatePortletId, h as generateResponsiveLayouts, s as useDashboardContext, _ as validateCubeQuery };
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import { MutableRefObject, RefObject } from 'react';
|
|
2
2
|
import { StoreApi } from 'zustand';
|
|
3
|
-
import { DashboardConfig, DashboardFilterMapping, DashboardGridSettings, DashboardLayoutMode, PortletConfig, PortletGroup, RowLayout, ThumbnailFeatureConfig } from '../../types.js';
|
|
3
|
+
import { DashboardConfig, DashboardRefreshConfig, DashboardFilterMapping, DashboardGridSettings, DashboardLayoutMode, PortletConfig, PortletGroup, RowLayout, ThumbnailFeatureConfig } from '../../types.js';
|
|
4
4
|
import { DashboardStore, DashboardStoreActions } from '../../stores/dashboardStore.js';
|
|
5
5
|
import { LayoutUpdate } from './useRowLayoutEngine.js';
|
|
6
6
|
import { SnapEdge } from './groupUtils.js';
|
|
7
|
+
import { MaxAgeOptions } from '../../client/maxAge.js';
|
|
7
8
|
interface UseDashboardControllerOptions {
|
|
8
9
|
allowedModes: DashboardLayoutMode[];
|
|
9
10
|
canChangeLayoutMode: boolean;
|
|
@@ -23,13 +24,9 @@ interface UseDashboardControllerOptions {
|
|
|
23
24
|
updateLayout: (next: LayoutUpdate, save?: boolean) => Promise<void>;
|
|
24
25
|
updateRowLayout: (rows: RowLayout[], save?: boolean, portletsOverride?: PortletConfig[]) => Promise<void>;
|
|
25
26
|
portletComponentRefs?: MutableRefObject<Record<string, {
|
|
26
|
-
refresh: (options?:
|
|
27
|
-
bustCache?: boolean;
|
|
28
|
-
}) => void;
|
|
27
|
+
refresh: (options?: MaxAgeOptions) => void;
|
|
29
28
|
} | null>>;
|
|
30
|
-
onPortletRefresh?: (portletId: string, options?:
|
|
31
|
-
bustCache?: boolean;
|
|
32
|
-
}) => void;
|
|
29
|
+
onPortletRefresh?: (portletId: string, options?: MaxAgeOptions) => void;
|
|
33
30
|
}
|
|
34
31
|
export declare function useDashboardController({ allowedModes, canChangeLayoutMode, isResponsiveEditable, layoutMode, resolvedRows, resolvedGroups, gridSettings, thumbnailConfig, dashboardRef, storeApi, storeActions, configRef, onConfigChangeRef, onSaveRef, onSaveThumbnailRef, updateLayout, updateRowLayout, portletComponentRefs, onPortletRefresh, }: UseDashboardControllerOptions): {
|
|
35
32
|
enterEditMode: () => void;
|
|
@@ -46,13 +43,12 @@ export declare function useDashboardController({ allowedModes, canChangeLayoutMo
|
|
|
46
43
|
deletePortlet: (portletId: string) => Promise<void>;
|
|
47
44
|
confirmDelete: () => Promise<void>;
|
|
48
45
|
duplicatePortlet: (portletId: string) => Promise<string | undefined>;
|
|
49
|
-
refreshPortlet: (portletId: string, options?:
|
|
50
|
-
bustCache?: boolean;
|
|
51
|
-
}) => void;
|
|
46
|
+
refreshPortlet: (portletId: string, options?: MaxAgeOptions) => void;
|
|
52
47
|
toggleFilterForPortlet: (portletId: string, filterId: string) => Promise<void>;
|
|
53
48
|
selectAllForFilter: (filterId: string) => Promise<void>;
|
|
54
49
|
saveFilterConfig: (mapping: DashboardFilterMapping) => Promise<void>;
|
|
55
50
|
handlePaletteChange: (paletteName: string) => Promise<void>;
|
|
51
|
+
handleRefreshDefaultChange: (refresh: DashboardRefreshConfig | undefined) => Promise<void>;
|
|
56
52
|
importConfig: (config: DashboardConfig) => Promise<void>;
|
|
57
53
|
snapPortletIntoGroup: (movedPortletId: string, targetPortletId: string, edge: SnapEdge) => Promise<void>;
|
|
58
54
|
ungroupGroup: (groupId: string) => Promise<void>;
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { DashboardRefreshConfig, FeaturesConfig, PortletConfig } from '../../types.js';
|
|
2
|
+
import { MaxAgeOptions } from '../../client/maxAge.js';
|
|
3
|
+
/** One portlet in an interval group. */
|
|
4
|
+
export interface RefreshGroupMember {
|
|
5
|
+
portletId: string;
|
|
6
|
+
pauseWhenHidden: boolean;
|
|
7
|
+
}
|
|
8
|
+
/**
|
|
9
|
+
* Portlets keyed by effective refresh interval (seconds). Portlets with no
|
|
10
|
+
* effective refresh are left out.
|
|
11
|
+
*/
|
|
12
|
+
export declare function groupPortletsByRefreshInterval(portlets: PortletConfig[], dashboardRefresh: DashboardRefreshConfig | undefined, features: FeaturesConfig): Map<number, RefreshGroupMember[]>;
|
|
13
|
+
export interface UseDashboardRefreshTimerParams {
|
|
14
|
+
portlets: PortletConfig[];
|
|
15
|
+
dashboardRefresh?: DashboardRefreshConfig;
|
|
16
|
+
features: FeaturesConfig;
|
|
17
|
+
/** Stop every timer (edit mode or dashboard-level pause) */
|
|
18
|
+
stopped: boolean;
|
|
19
|
+
/** Portlets the viewer paused; their ticks are skipped */
|
|
20
|
+
pausedPortletIds: string[];
|
|
21
|
+
/** The refresh button's action */
|
|
22
|
+
refreshPortlet: (portletId: string, options: MaxAgeOptions) => void;
|
|
23
|
+
}
|
|
24
|
+
export interface DashboardRefreshTimerState {
|
|
25
|
+
/** Whether any portlet on the dashboard has an effective refresh interval */
|
|
26
|
+
hasRefresh: boolean;
|
|
27
|
+
}
|
|
28
|
+
export declare function useDashboardRefreshTimer({ portlets, dashboardRefresh, features, stopped, pausedPortletIds, refreshPortlet }: UseDashboardRefreshTimerParams): DashboardRefreshTimerState;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { CubeQuery, CubeResultSet } from '../../types.js';
|
|
2
2
|
import { QueryWarning } from '../../shared/types.js';
|
|
3
3
|
import { ChartGapFillOptions } from '../../utils/gapFilling.js';
|
|
4
|
+
import { MaxAgeOptions } from '../../client/maxAge.js';
|
|
4
5
|
/**
|
|
5
6
|
* Create a stable query key from a CubeQuery
|
|
6
7
|
* The key includes all query parameters to ensure proper caching
|
|
@@ -12,6 +13,13 @@ export interface UseCubeLoadQueryOptions {
|
|
|
12
13
|
* @default false
|
|
13
14
|
*/
|
|
14
15
|
skip?: boolean;
|
|
16
|
+
/**
|
|
17
|
+
* Whether the query may fetch. Unlike `skip`, false keeps the query key and
|
|
18
|
+
* its data; a refetch while disabled marks the query stale, and it fetches
|
|
19
|
+
* once enabled again.
|
|
20
|
+
* @default true
|
|
21
|
+
*/
|
|
22
|
+
enabled?: boolean;
|
|
15
23
|
/**
|
|
16
24
|
* Debounce delay in milliseconds
|
|
17
25
|
* @default 300
|
|
@@ -38,12 +46,21 @@ export interface UseCubeLoadQueryOptions {
|
|
|
38
46
|
* are gap-filled per `ChartGapFillOptions`. Omit for raw rows.
|
|
39
47
|
*/
|
|
40
48
|
gapFill?: ChartGapFillOptions;
|
|
49
|
+
/**
|
|
50
|
+
* Keep the query current (Cube.js `subscribe`): every 10 seconds, raised to
|
|
51
|
+
* `features.refresh.minIntervalSeconds` when that is larger, refetch with
|
|
52
|
+
* max-age equal to the interval, lowered to just under the age of the rows
|
|
53
|
+
* shown so a tick never gets them back. Works with `features.refresh` off. Stops while the query is skipped or
|
|
54
|
+
* disabled, and in `manualRefresh` mode.
|
|
55
|
+
* @default false
|
|
56
|
+
*/
|
|
57
|
+
subscribe?: boolean;
|
|
41
58
|
}
|
|
42
|
-
/**
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
59
|
+
/**
|
|
60
|
+
* Options for the refetch function. `maxAgeSeconds` is the oldest cached
|
|
61
|
+
* server result accepted; `bustCache: true` is max-age 0.
|
|
62
|
+
*/
|
|
63
|
+
export type RefetchOptions = MaxAgeOptions;
|
|
47
64
|
export interface UseCubeLoadQueryResult {
|
|
48
65
|
/** The result set from the query */
|
|
49
66
|
resultSet: CubeResultSet | null;
|
|
@@ -63,7 +80,10 @@ export interface UseCubeLoadQueryResult {
|
|
|
63
80
|
debouncedQuery: CubeQuery | null;
|
|
64
81
|
/** Whether the current query is valid */
|
|
65
82
|
isValidQuery: boolean;
|
|
66
|
-
/**
|
|
83
|
+
/**
|
|
84
|
+
* Manually refetch the data. Pass `{ maxAgeSeconds }` to accept a cached
|
|
85
|
+
* server result at most that old, or `{ bustCache: true }` to bypass caches.
|
|
86
|
+
*/
|
|
67
87
|
refetch: (options?: RefetchOptions) => void;
|
|
68
88
|
/** Clear the query cache */
|
|
69
89
|
clearCache: () => void;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { MaxAgeOptions } from '../../client/maxAge.js';
|
|
1
2
|
import { ServerFlowQuery, FlowChartData } from '../../types/flow.js';
|
|
2
3
|
/**
|
|
3
4
|
* Options for useFlowQuery hook
|
|
@@ -5,6 +6,8 @@ import { ServerFlowQuery, FlowChartData } from '../../types/flow.js';
|
|
|
5
6
|
export interface UseFlowQueryOptions {
|
|
6
7
|
/** Skip query execution */
|
|
7
8
|
skip?: boolean;
|
|
9
|
+
/** Whether the query may fetch; unlike `skip`, false keeps the key and data (default: true) */
|
|
10
|
+
enabled?: boolean;
|
|
8
11
|
/** Debounce delay in milliseconds */
|
|
9
12
|
debounceMs?: number;
|
|
10
13
|
/** Callback when query completes successfully */
|
|
@@ -27,6 +30,8 @@ export interface UseFlowQueryResult {
|
|
|
27
30
|
ttlMs: number;
|
|
28
31
|
ttlRemainingMs: number;
|
|
29
32
|
} | null;
|
|
33
|
+
/** When the rows were computed on the server (cache time on a hit, else response time) */
|
|
34
|
+
computedAt?: string | null;
|
|
30
35
|
/** Is initial load in progress */
|
|
31
36
|
isLoading: boolean;
|
|
32
37
|
/** Is refetch in progress */
|
|
@@ -38,9 +43,7 @@ export interface UseFlowQueryResult {
|
|
|
38
43
|
/** Error if query failed */
|
|
39
44
|
error: Error | null;
|
|
40
45
|
/** Refetch the query. Pass { bustCache: true } to bypass client and server caches. */
|
|
41
|
-
refetch: (options?:
|
|
42
|
-
bustCache?: boolean;
|
|
43
|
-
}) => void;
|
|
46
|
+
refetch: (options?: MaxAgeOptions) => void;
|
|
44
47
|
/** Reset the query cache */
|
|
45
48
|
reset: () => void;
|
|
46
49
|
/** The server query being executed */
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { MultiQueryConfig, CubeResultSet } from '../../types.js';
|
|
2
2
|
import { ChartGapFillOptions } from '../../utils/gapFilling.js';
|
|
3
|
+
import { MaxAgeOptions } from '../../client/maxAge.js';
|
|
3
4
|
/**
|
|
4
5
|
* Create a stable query key for multi-query
|
|
5
6
|
*/
|
|
@@ -10,6 +11,13 @@ export interface UseMultiCubeLoadQueryOptions {
|
|
|
10
11
|
* @default false
|
|
11
12
|
*/
|
|
12
13
|
skip?: boolean;
|
|
14
|
+
/**
|
|
15
|
+
* Whether the query may fetch. Unlike `skip`, false keeps the query key and
|
|
16
|
+
* its data; a refetch while disabled marks the query stale, and it fetches
|
|
17
|
+
* once enabled again.
|
|
18
|
+
* @default true
|
|
19
|
+
*/
|
|
20
|
+
enabled?: boolean;
|
|
13
21
|
/**
|
|
14
22
|
* Debounce delay in milliseconds
|
|
15
23
|
* @default 300
|
|
@@ -60,10 +68,11 @@ export interface UseMultiCubeLoadQueryResult {
|
|
|
60
68
|
debouncedConfig: MultiQueryConfig | null;
|
|
61
69
|
/** Whether the current config is valid */
|
|
62
70
|
isValidConfig: boolean;
|
|
63
|
-
/**
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
71
|
+
/**
|
|
72
|
+
* Manually refetch the data. Pass `{ maxAgeSeconds }` to accept cached server
|
|
73
|
+
* results at most that old, or `{ bustCache: true }` to bypass caches.
|
|
74
|
+
*/
|
|
75
|
+
refetch: (options?: MaxAgeOptions) => void;
|
|
67
76
|
}
|
|
68
77
|
/**
|
|
69
78
|
* TanStack Query hook for loading multi-cube data with debouncing
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { MaxAgeOptions } from '../../client/maxAge.js';
|
|
1
2
|
import { ServerRetentionQuery, RetentionChartData, RetentionResultRow } from '../../types/retention.js';
|
|
2
3
|
/**
|
|
3
4
|
* Options for retention query hook
|
|
@@ -5,6 +6,8 @@ import { ServerRetentionQuery, RetentionChartData, RetentionResultRow } from '..
|
|
|
5
6
|
export interface UseRetentionQueryOptions {
|
|
6
7
|
/** Skip execution */
|
|
7
8
|
skip?: boolean;
|
|
9
|
+
/** Whether the query may fetch; unlike `skip`, false keeps the key and data (default: true) */
|
|
10
|
+
enabled?: boolean;
|
|
8
11
|
/** Debounce delay in milliseconds */
|
|
9
12
|
debounceMs?: number;
|
|
10
13
|
/** Callback when query completes */
|
|
@@ -39,12 +42,12 @@ export interface UseRetentionQueryResult {
|
|
|
39
42
|
ttlMs: number;
|
|
40
43
|
ttlRemainingMs: number;
|
|
41
44
|
} | null;
|
|
45
|
+
/** When the rows were computed on the server (cache time on a hit, else response time) */
|
|
46
|
+
computedAt?: string | null;
|
|
42
47
|
/** Execute the query (for manual refresh mode) */
|
|
43
|
-
execute: (options?:
|
|
44
|
-
bustCache?: boolean;
|
|
45
|
-
}) => Promise<RetentionChartData | null>;
|
|
48
|
+
execute: (options?: MaxAgeOptions) => Promise<RetentionChartData | null>;
|
|
46
49
|
/** Refetch the query */
|
|
47
|
-
refetch: () => void;
|
|
50
|
+
refetch: (options?: MaxAgeOptions) => void;
|
|
48
51
|
/**
|
|
49
52
|
* Whether the query needs to be refreshed (manual refresh mode only).
|
|
50
53
|
* True when the current query config differs from the last executed query.
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The age of the rows a query hook shows, read when a refetch records a
|
|
3
|
+
* `newerThanShown` max-age.
|
|
4
|
+
*/
|
|
5
|
+
/**
|
|
6
|
+
* A stable getter for the age of the shown rows. Stable, so refetch callbacks
|
|
7
|
+
* (and the subscription timer that depends on them) do not change with every
|
|
8
|
+
* result.
|
|
9
|
+
*/
|
|
10
|
+
export declare function useShownRowsAge(servedAgeMs: number | undefined, receivedAtMs: number): () => number | undefined;
|
|
@@ -6,6 +6,7 @@ import { DebugDataEntry } from './queries/index.js';
|
|
|
6
6
|
import { MultiQueryValidationResult } from '../utils/multiQueryValidation.js';
|
|
7
7
|
import { MetaField } from '../shared/types.js';
|
|
8
8
|
import { ValidationResult } from '../adapters/modeAdapter.js';
|
|
9
|
+
import { MaxAgeOptions } from '../client/maxAge.js';
|
|
9
10
|
export interface UseAnalysisBuilderOptions {
|
|
10
11
|
/** External color palette (overrides local) */
|
|
11
12
|
externalColorPalette?: string[] | ColorPalette;
|
|
@@ -229,9 +230,7 @@ export interface UseAnalysisBuilderResult {
|
|
|
229
230
|
share: () => Promise<void>;
|
|
230
231
|
clearQuery: () => void;
|
|
231
232
|
clearCurrentMode: () => void;
|
|
232
|
-
refetch: (options?:
|
|
233
|
-
bustCache?: boolean;
|
|
234
|
-
}) => void;
|
|
233
|
+
refetch: (options?: MaxAgeOptions) => void;
|
|
235
234
|
handleFieldSelected: (field: MetaField, fieldType: 'measure' | 'dimension' | 'timeDimension', cubeName: string, keepOpen?: boolean) => void;
|
|
236
235
|
};
|
|
237
236
|
getQueryConfig: () => CubeQuery | MultiQueryConfig | import('../types/funnel.js').ServerFunnelQuery;
|
|
@@ -9,6 +9,8 @@ export interface UseAnalysisEffectsOptions {
|
|
|
9
9
|
query: UseAnalysisQueryResult;
|
|
10
10
|
/** AI endpoint URL */
|
|
11
11
|
aiEndpoint?: string;
|
|
12
|
+
/** Chart types the host hid (`features.hiddenChartTypes`); the auto-switch never picks them */
|
|
13
|
+
hiddenChartTypes?: ChartType[];
|
|
12
14
|
/** Callback when query changes */
|
|
13
15
|
onQueryChange?: (query: CubeQuery) => void;
|
|
14
16
|
/** Callback when chart config changes */
|
|
@@ -4,6 +4,7 @@ import { ExecutionStatus } from '../components/AnalysisBuilder/types.js';
|
|
|
4
4
|
import { ServerFunnelQuery } from '../types/funnel.js';
|
|
5
5
|
import { ServerFlowQuery, FlowChartData } from '../types/flow.js';
|
|
6
6
|
import { ServerRetentionQuery, RetentionChartData } from '../types/retention.js';
|
|
7
|
+
import { MaxAgeOptions } from '../client/maxAge.js';
|
|
7
8
|
export interface UseAnalysisQueryOptions {
|
|
8
9
|
/** Current query (for single-query mode) */
|
|
9
10
|
currentQuery: CubeQuery;
|
|
@@ -80,9 +81,7 @@ export interface UseAnalysisQueryResult {
|
|
|
80
81
|
/** Whether query has been debounced (for smart defaults trigger) */
|
|
81
82
|
hasDebounced: boolean;
|
|
82
83
|
/** Refetch function. Pass { bustCache: true } to bypass client and server caches. */
|
|
83
|
-
refetch: (options?:
|
|
84
|
-
bustCache?: boolean;
|
|
85
|
-
}) => void;
|
|
84
|
+
refetch: (options?: MaxAgeOptions) => void;
|
|
86
85
|
/**
|
|
87
86
|
* In funnel mode, these are the actually executed queries with:
|
|
88
87
|
* - Binding key dimension auto-added
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import { default as React } from 'react';
|
|
2
2
|
import { PortletDebugDataEntry } from '../stores/dashboardStore.js';
|
|
3
3
|
import { LayoutItem } from 'react-grid-layout';
|
|
4
|
-
import { DashboardConfig, PortletConfig, RowLayout, PortletGroup, DashboardFilter, DashboardFilterMapping, DashboardGridSettings, DashboardLayoutMode } from '../types.js';
|
|
4
|
+
import { DashboardConfig, DashboardRefreshConfig, PortletConfig, RowLayout, PortletGroup, DashboardFilter, DashboardFilterMapping, DashboardGridSettings, DashboardLayoutMode } from '../types.js';
|
|
5
5
|
import { SnapEdge } from './dashboard/groupUtils.js';
|
|
6
6
|
import { LayoutUpdate } from './dashboard/useRowLayoutEngine.js';
|
|
7
|
+
import { MaxAgeOptions } from '../client/maxAge.js';
|
|
7
8
|
export interface UseDashboardOptions {
|
|
8
9
|
/** Dashboard configuration */
|
|
9
10
|
config: DashboardConfig;
|
|
@@ -27,14 +28,10 @@ export interface UseDashboardOptions {
|
|
|
27
28
|
gridWidth?: number;
|
|
28
29
|
/** Portlet component refs for refresh functionality */
|
|
29
30
|
portletComponentRefs?: React.MutableRefObject<Record<string, {
|
|
30
|
-
refresh: (options?:
|
|
31
|
-
bustCache?: boolean;
|
|
32
|
-
}) => void;
|
|
31
|
+
refresh: (options?: MaxAgeOptions) => void;
|
|
33
32
|
} | null>>;
|
|
34
33
|
/** Portlet refresh handler (external) */
|
|
35
|
-
onPortletRefresh?: (portletId: string, options?:
|
|
36
|
-
bustCache?: boolean;
|
|
37
|
-
}) => void;
|
|
34
|
+
onPortletRefresh?: (portletId: string, options?: MaxAgeOptions) => void;
|
|
38
35
|
/** Ref to the dashboard container element for thumbnail capture */
|
|
39
36
|
dashboardRef?: React.RefObject<HTMLElement | null>;
|
|
40
37
|
}
|
|
@@ -115,13 +112,13 @@ export interface UseDashboardActions {
|
|
|
115
112
|
savePortlet: (portletData: PortletConfig | Omit<PortletConfig, 'id' | 'x' | 'y'>) => Promise<string | null>;
|
|
116
113
|
deletePortlet: (portletId: string) => Promise<void>;
|
|
117
114
|
duplicatePortlet: (portletId: string) => Promise<string | undefined>;
|
|
118
|
-
refreshPortlet: (portletId: string, options?:
|
|
119
|
-
bustCache?: boolean;
|
|
120
|
-
}) => void;
|
|
115
|
+
refreshPortlet: (portletId: string, options?: MaxAgeOptions) => void;
|
|
121
116
|
toggleFilterForPortlet: (portletId: string, filterId: string) => Promise<void>;
|
|
122
117
|
selectAllForFilter: (filterId: string) => Promise<void>;
|
|
123
118
|
saveFilterConfig: (mapping: DashboardFilterMapping) => Promise<void>;
|
|
124
119
|
handlePaletteChange: (paletteName: string) => Promise<void>;
|
|
120
|
+
/** Set the dashboard default refresh (features.refresh); undefined removes it */
|
|
121
|
+
handleRefreshDefaultChange: (refresh: DashboardRefreshConfig | undefined) => Promise<void>;
|
|
125
122
|
/** Replace the entire config (dashboard import); saves like any other edit */
|
|
126
123
|
importConfig: (config: DashboardConfig) => Promise<void>;
|
|
127
124
|
snapPortletIntoGroup: (movedPortletId: string, targetPortletId: string, edge: SnapEdge) => Promise<void>;
|