drizzle-cube 0.12.1 → 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-D_0Wmhej.js → core-CD6SqK5q.js} +66 -58
- package/dist/adapters/{compiler-DqaN3YtE.js → cors-headers-DYYDrG7S.js} +129 -110
- package/dist/adapters/{compiler-DEvbReTk.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-HVRtFpEZ.js → handler-B_vsFWWm.js} +32 -32
- package/dist/adapters/{handler-XmEDxQUt.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-B8cN4YvW.cjs → mcp-transport-7zszPPXk.cjs} +1 -1
- package/dist/adapters/{mcp-transport-DhFjuVsC.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-BdF9UwVL.js → openai-Bdnnw3Ok.js} +1 -1
- package/dist/adapters/{openai-BuGJh2CT.cjs → openai-CE52anhW.cjs} +1 -1
- package/dist/adapters/{openai-D_3NG0fv.js → openai-DA9yrRkA.js} +1 -1
- package/dist/adapters/{openai-knSlM5V3.cjs → openai-JLaT_FPt.cjs} +1 -1
- package/dist/adapters/{utils-CS4TBdT1.js → utils-BtiRfbcX.js} +29 -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/AnalyticsDashboard.d.ts +1 -1
- package/dist/cjs/client/components/DashboardFilterPanel.d.ts +3 -2
- package/dist/cjs/client/components/DashboardFilters/CompactFilterBar.d.ts +3 -1
- package/dist/cjs/client/components/DashboardFilters/CompactFilterBarParts.d.ts +4 -0
- package/dist/cjs/client/components/DashboardFilters/DatePresetChips.d.ts +1 -0
- package/dist/cjs/client/components/DashboardFilters/FilterChip.d.ts +2 -0
- package/dist/cjs/client/components/DashboardFilters/FilterValuePopover.d.ts +1 -1
- package/dist/cjs/client/components/DashboardFilters/useCompactFilterBar.d.ts +3 -2
- package/dist/cjs/client/components/DashboardGrid.d.ts +8 -1
- 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 +27 -6
- package/dist/cjs/client/components/dashboard/DashboardCoordinator.d.ts +1 -1
- 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 +28 -6
- package/dist/cjs/client/hooks/queries/useFlowQuery.d.ts +6 -3
- package/dist/cjs/client/hooks/queries/useMultiCubeLoadQuery.d.ts +15 -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/useDashboardFilters.d.ts +7 -0
- 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/shared/pendingChanges.d.ts +12 -0
- 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 +77 -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-BnuKUeO4.js → DashboardEditModal-F2fGr29d.js} +3716 -3237
- package/dist/client/chunks/DashboardEditModal-F2fGr29d.js.map +1 -0
- package/dist/client/chunks/{DotStripChart-Cx9sKTGQ.js → DotStripChart-CQaJwo8K.js} +3 -3
- package/dist/client/chunks/{DotStripChart-Cx9sKTGQ.js.map → DotStripChart-CQaJwo8K.js.map} +1 -1
- package/dist/client/chunks/{ProportionBarChart-DpbPIrvi.js → ProportionBarChart-DiA5ZGeg.js} +3 -3
- package/dist/client/chunks/{ProportionBarChart-DpbPIrvi.js.map → ProportionBarChart-DiA5ZGeg.js.map} +1 -1
- package/dist/client/chunks/{RecordsTable-BOuaKB4P.js → RecordsTable-Bgqo-LjT.js} +166 -166
- package/dist/client/chunks/RecordsTable-Bgqo-LjT.js.map +1 -0
- package/dist/client/chunks/{RetentionCombinedChart-ZmHsRUvi.js → RetentionCombinedChart-BtMRtwlb.js} +3 -3
- package/dist/client/chunks/{RetentionCombinedChart-ZmHsRUvi.js.map → RetentionCombinedChart-BtMRtwlb.js.map} +1 -1
- package/dist/client/chunks/{RetentionHeatmap-D0JuLo7z.js → RetentionHeatmap-ChTa35gp.js} +2 -2
- package/dist/client/chunks/{RetentionHeatmap-D0JuLo7z.js.map → RetentionHeatmap-ChTa35gp.js.map} +1 -1
- package/dist/client/chunks/{analysis-builder-BOixrevS.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-jP6CddjM.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-DsNm6fyo.js → chart-activity-grid-DeDPSs12.js} +28 -2
- package/dist/client/chunks/{chart-activity-grid-DsNm6fyo.js.map → chart-activity-grid-DeDPSs12.js.map} +1 -1
- package/dist/client/chunks/{chart-area-a_KELq6t.js → chart-area-WyrVYze7.js} +2 -2
- package/dist/client/chunks/{chart-area-a_KELq6t.js.map → chart-area-WyrVYze7.js.map} +1 -1
- package/dist/client/chunks/{chart-bar-WVxq1S5Z.js → chart-bar-wGHC1Hfo.js} +3 -3
- package/dist/client/chunks/{chart-bar-WVxq1S5Z.js.map → chart-bar-wGHC1Hfo.js.map} +1 -1
- package/dist/client/chunks/{chart-box-plot-LQVRkeTO.js → chart-box-plot-CW5GZHM9.js} +2 -2
- package/dist/client/chunks/{chart-box-plot-LQVRkeTO.js.map → chart-box-plot-CW5GZHM9.js.map} +1 -1
- package/dist/client/chunks/{chart-bubble-CylNA0iN.js → chart-bubble-CKkVi7L2.js} +2 -2
- package/dist/client/chunks/{chart-bubble-CylNA0iN.js.map → chart-bubble-CKkVi7L2.js.map} +1 -1
- package/dist/client/chunks/{chart-candlestick-D8iqjo3k.js → chart-candlestick-BPFeay7t.js} +2 -2
- package/dist/client/chunks/{chart-candlestick-D8iqjo3k.js.map → chart-candlestick-BPFeay7t.js.map} +1 -1
- package/dist/client/chunks/{chart-data-table-OT0wqqH1.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-D1LrMOYp.js → chart-funnel-BtUexI1t.js} +2 -2
- package/dist/client/chunks/{chart-funnel-D1LrMOYp.js.map → chart-funnel-BtUexI1t.js.map} +1 -1
- package/dist/client/chunks/{chart-gauge-DhxMq9zr.js → chart-gauge-BSrfZFsW.js} +3 -3
- package/dist/client/chunks/{chart-gauge-DhxMq9zr.js.map → chart-gauge-BSrfZFsW.js.map} +1 -1
- package/dist/client/chunks/{chart-heat-map-BEs4Oltn.js → chart-heat-map-DtMtuFnw.js} +3 -3
- package/dist/client/chunks/{chart-heat-map-BEs4Oltn.js.map → chart-heat-map-DtMtuFnw.js.map} +1 -1
- package/dist/client/chunks/{chart-kpi-delta-7qRGTeBe.js → chart-kpi-delta-B0BkN_Q6.js} +3 -3
- package/dist/client/chunks/{chart-kpi-delta-7qRGTeBe.js.map → chart-kpi-delta-B0BkN_Q6.js.map} +1 -1
- package/dist/client/chunks/{chart-kpi-number-DU1Rh4qF.js → chart-kpi-number-zlBkLesi.js} +5 -5
- package/dist/client/chunks/{chart-kpi-number-DU1Rh4qF.js.map → chart-kpi-number-zlBkLesi.js.map} +1 -1
- package/dist/client/chunks/{chart-kpi-text-FzAamcUq.js → chart-kpi-text-BXXfkhz_.js} +3 -3
- package/dist/client/chunks/{chart-kpi-text-FzAamcUq.js.map → chart-kpi-text-BXXfkhz_.js.map} +1 -1
- package/dist/client/chunks/{chart-line-RHy9KjtO.js → chart-line-D_yFQDze.js} +3 -3
- package/dist/client/chunks/{chart-line-RHy9KjtO.js.map → chart-line-D_yFQDze.js.map} +1 -1
- package/dist/client/chunks/{chart-markdown-C_Of-_ge.js → chart-markdown-DaBTpRgf.js} +2 -2
- package/dist/client/chunks/{chart-markdown-C_Of-_ge.js.map → chart-markdown-DaBTpRgf.js.map} +1 -1
- package/dist/client/chunks/{chart-measure-profile-B_5nRlFw.js → chart-measure-profile-DOHIm-QY.js} +3 -3
- package/dist/client/chunks/{chart-measure-profile-B_5nRlFw.js.map → chart-measure-profile-DOHIm-QY.js.map} +1 -1
- package/dist/client/chunks/{chart-pie-BndFTpDb.js → chart-pie-DLrT81CL.js} +3 -3
- package/dist/client/chunks/{chart-pie-BndFTpDb.js.map → chart-pie-DLrT81CL.js.map} +1 -1
- package/dist/client/chunks/{chart-radar-CEl8JqEM.js → chart-radar-CcXG6k6o.js} +3 -3
- package/dist/client/chunks/{chart-radar-CEl8JqEM.js.map → chart-radar-CcXG6k6o.js.map} +1 -1
- package/dist/client/chunks/{chart-radial-bar-BoVduM6q.js → chart-radial-bar-DYn5FLrG.js} +3 -3
- package/dist/client/chunks/{chart-radial-bar-BoVduM6q.js.map → chart-radial-bar-DYn5FLrG.js.map} +1 -1
- package/dist/client/chunks/{chart-sankey-OrhsKWge.js → chart-sankey-CWkctg-k.js} +2 -2
- package/dist/client/chunks/{chart-sankey-OrhsKWge.js.map → chart-sankey-CWkctg-k.js.map} +1 -1
- package/dist/client/chunks/{chart-scatter-Sl-hTrDW.js → chart-scatter-CCGL2IEP.js} +3 -3
- package/dist/client/chunks/{chart-scatter-Sl-hTrDW.js.map → chart-scatter-CCGL2IEP.js.map} +1 -1
- package/dist/client/chunks/{chart-sunburst-ShjUy6Zz.js → chart-sunburst-9sgiHFSO.js} +3 -3
- package/dist/client/chunks/{chart-sunburst-ShjUy6Zz.js.map → chart-sunburst-9sgiHFSO.js.map} +1 -1
- package/dist/client/chunks/{chart-tree-map-DoxyxdD2.js → chart-tree-map-DOWeXCn_.js} +3 -3
- package/dist/client/chunks/{chart-tree-map-DoxyxdD2.js.map → chart-tree-map-DOWeXCn_.js.map} +1 -1
- package/dist/client/chunks/{chart-waterfall-DWLPBbXk.js → chart-waterfall-BS7x0dW-.js} +3 -3
- package/dist/client/chunks/{chart-waterfall-DWLPBbXk.js.map → chart-waterfall-BS7x0dW-.js.map} +1 -1
- package/dist/client/chunks/{charts-core-DbyNKYNK.js → charts-core-DM-Eav_9.js} +2 -2
- package/dist/client/chunks/{charts-core-DbyNKYNK.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-DEIGUdUM.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-Dwf-Sv3i.js → nl-NL-CKfZudeP.js} +27 -1
- package/dist/client/chunks/{nl-NL-Dwf-Sv3i.js.map → nl-NL-CKfZudeP.js.map} +1 -1
- package/dist/client/chunks/{schema-visualization-D8Ak7GUd.js → schema-visualization-BO70spCF.js} +3 -3
- package/dist/client/chunks/{schema-visualization-D8Ak7GUd.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-C73X4MkX.js → useExplainAI-BrjlR24K.js} +25 -25
- package/dist/client/chunks/{useExplainAI-C73X4MkX.js.map → useExplainAI-BrjlR24K.js.map} +1 -1
- package/dist/client/chunks/{vendor-C_TrpV9I.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/AnalyticsDashboard.d.ts +1 -1
- package/dist/client/components/DashboardFilterPanel.d.ts +3 -2
- package/dist/client/components/DashboardFilters/CompactFilterBar.d.ts +3 -1
- package/dist/client/components/DashboardFilters/CompactFilterBarParts.d.ts +4 -0
- package/dist/client/components/DashboardFilters/DatePresetChips.d.ts +1 -0
- package/dist/client/components/DashboardFilters/FilterChip.d.ts +2 -0
- package/dist/client/components/DashboardFilters/FilterValuePopover.d.ts +1 -1
- package/dist/client/components/DashboardFilters/useCompactFilterBar.d.ts +3 -2
- package/dist/client/components/DashboardGrid.d.ts +8 -1
- 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 +27 -6
- package/dist/client/components/dashboard/DashboardCoordinator.d.ts +1 -1
- 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 +28 -6
- package/dist/client/hooks/queries/useFlowQuery.d.ts +6 -3
- package/dist/client/hooks/queries/useMultiCubeLoadQuery.d.ts +15 -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/useDashboardFilters.d.ts +7 -0
- 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/shared/pendingChanges.d.ts +12 -0
- package/dist/client/stores/dashboardStore.d.ts +13 -0
- package/dist/client/types/funnel.d.ts +10 -4
- package/dist/client/types.d.ts +77 -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 +1263 -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-CPDtUaxW.cjs +0 -1
- package/dist/adapters/ActivityGridChart.config-DiFh1YnV.js +0 -1
- package/dist/adapters/AreaChart.config-BpqqAE80.cjs +0 -1
- package/dist/adapters/AreaChart.config-PtWbm6zf.js +0 -1
- package/dist/adapters/BarChart.config-BuI-bR2P.cjs +0 -1
- package/dist/adapters/BarChart.config-Df-PAP4z.js +0 -1
- package/dist/adapters/BoxPlotChart.config-BRKdy7Ns.js +0 -1
- package/dist/adapters/BoxPlotChart.config-Cp1-j_Ox.cjs +0 -1
- package/dist/adapters/BubbleChart.config-B_K6qEb3.js +0 -1
- package/dist/adapters/BubbleChart.config-DOU4NXqA.cjs +0 -1
- package/dist/adapters/CandlestickChart.config-C-ugFQ7P.js +0 -1
- package/dist/adapters/CandlestickChart.config-CqOWXejK.cjs +0 -1
- package/dist/adapters/DataTable.config-CBqfRrWN.cjs +0 -1
- package/dist/adapters/DataTable.config-tKzdYgrH.js +0 -1
- package/dist/adapters/DotStripChart.config-C7ErrLsf.js +0 -1
- package/dist/adapters/DotStripChart.config-CijSEksh.cjs +0 -1
- package/dist/adapters/FunnelChart.config-CyKO54ax.js +0 -1
- package/dist/adapters/FunnelChart.config-Sfav7sbv.cjs +0 -1
- package/dist/adapters/GaugeChart.config-BFbwYtsw.cjs +0 -1
- package/dist/adapters/GaugeChart.config-D7F3h4pU.js +0 -1
- package/dist/adapters/HeatMapChart.config-BiAmCffs.js +0 -1
- package/dist/adapters/HeatMapChart.config-DSXPzRKX.cjs +0 -1
- package/dist/adapters/KpiDelta.config-bCgUDnXB.cjs +0 -1
- package/dist/adapters/KpiDelta.config-xqLHGIV4.js +0 -1
- package/dist/adapters/KpiNumber.config-BDS_Bbit.cjs +0 -1
- package/dist/adapters/KpiNumber.config-CkJrVos4.js +0 -1
- package/dist/adapters/KpiText.config-BYg0b_F-.cjs +0 -1
- package/dist/adapters/KpiText.config-MDL0Ryfm.js +0 -1
- package/dist/adapters/LineChart.config-CkutnuLC.js +0 -1
- package/dist/adapters/LineChart.config-DHaH4EGn.cjs +0 -1
- package/dist/adapters/MarkdownChart.config-BLMG3J1J.cjs +0 -1
- package/dist/adapters/MarkdownChart.config-D6I1ssv4.js +0 -1
- package/dist/adapters/MeasureProfileChart.config-BqUMPDvt.cjs +0 -1
- package/dist/adapters/MeasureProfileChart.config-Do3M_Ysz.js +0 -1
- package/dist/adapters/PieChart.config-BbTDULWi.cjs +0 -1
- package/dist/adapters/PieChart.config-DQOY9v4X.js +0 -1
- package/dist/adapters/ProportionBarChart.config-BIEsty_Q.cjs +0 -1
- package/dist/adapters/ProportionBarChart.config-DdIXVNEC.js +0 -1
- package/dist/adapters/RadarChart.config-Kzg1gdEV.cjs +0 -1
- package/dist/adapters/RadarChart.config-uDhtdEst.js +0 -1
- package/dist/adapters/RadialBarChart.config-DA6a3VHY.cjs +0 -1
- package/dist/adapters/RadialBarChart.config-SgiiAoQe.js +0 -1
- package/dist/adapters/RecordsTable.config-B4PKTt98.js +0 -1
- package/dist/adapters/RecordsTable.config-o3BpbfZh.cjs +0 -1
- package/dist/adapters/RetentionCombinedChart.config-Di74WX5H.cjs +0 -1
- package/dist/adapters/RetentionCombinedChart.config-DsxKAoop.js +0 -1
- package/dist/adapters/RetentionHeatmap.config-DYQ0KjYo.js +0 -1
- package/dist/adapters/RetentionHeatmap.config-GapsTJoA.cjs +0 -1
- package/dist/adapters/SankeyChart.config-Bm_zLd32.cjs +0 -1
- package/dist/adapters/SankeyChart.config-MI4En5Kt.js +0 -1
- package/dist/adapters/ScatterChart.config-DgnPt-Sc.js +0 -1
- package/dist/adapters/ScatterChart.config-yC-WNnvU.cjs +0 -1
- package/dist/adapters/SunburstChart.config-C7RtFfC-.cjs +0 -1
- package/dist/adapters/SunburstChart.config-DKiYK73Z.js +0 -1
- package/dist/adapters/TreeMapChart.config-B2Y1OEQX.js +0 -1
- package/dist/adapters/TreeMapChart.config-bKilQLfd.cjs +0 -1
- package/dist/adapters/WaterfallChart.config-Kk7bCWf1.cjs +0 -1
- package/dist/adapters/WaterfallChart.config-ydLPycYF.js +0 -1
- package/dist/adapters/core-D-wZ8ceW.cjs +0 -1
- package/dist/adapters/mcp-app-html-Cm6V045a.cjs +0 -1
- package/dist/adapters/mcp-app-html-wZEFmwLE.js +0 -5
- package/dist/adapters/utils-DfLEeAJB.cjs +0 -141
- package/dist/client/chunks/DashboardEditModal-BnuKUeO4.js.map +0 -1
- package/dist/client/chunks/RecordsTable-BOuaKB4P.js.map +0 -1
- package/dist/client/chunks/analysis-builder-BOixrevS.js.map +0 -1
- package/dist/client/chunks/analysis-builder-shared-jP6CddjM.js.map +0 -1
- package/dist/client/chunks/chart-data-table-OT0wqqH1.js.map +0 -1
- package/dist/client/chunks/charts-loader-DEIGUdUM.js +0 -87
- package/dist/client/chunks/dashboardExport-Cy5OOMpb.js.map +0 -1
- package/dist/client/chunks/useDirtyStateTracking-vL8pFTP4.js +0 -1148
- package/dist/client/chunks/useDirtyStateTracking-vL8pFTP4.js.map +0 -1
- package/dist/client/chunks/vendor-C_TrpV9I.js.map +0 -1
package/dist/adapters/utils.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require("./utils-
|
|
1
|
+
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require("./utils-OLv25-nn.cjs");exports.buildTransformedQuery=e.t,exports.calculateQueryComplexity=e.n,exports.formatCubeResponse=e.r,exports.formatErrorResponse=e.i,exports.formatMetaResponse=e.a,exports.formatSqlResponse=e.o,exports.formatSqlString=e.x,exports.generateRequestId=e.s,exports.getDatabaseType=e.c,exports.handleBatchRequest=e.l,exports.handleDiscover=e.p,exports.handleDryRun=e.u,exports.handleLoad=e.m,exports.handleSuggest=e.d,exports.handleValidate=e.f,exports.normalizeQueryFields=e.h;
|
package/dist/adapters/utils.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { SemanticLayerCompiler, SemanticQuery, SecurityContext, QuerySuggestion, AIValidationResult, QueryValidationIssue } from '../server/index.js';
|
|
1
|
+
import { SemanticLayerCompiler, SemanticQuery, SecurityContext, QuerySuggestion, AIValidationResult, QueryValidationIssue, ExecutionOptions } from '../server/index.js';
|
|
2
2
|
import { normalizeQueryFields } from '../server/query-handlers.js';
|
|
3
3
|
import { MCPPromptResolver, MCPResourceResolver, MCPInstructionsResolver } from './mcp-transport.js';
|
|
4
4
|
export { handleDiscover, handleLoad } from '../server/query-handlers.js';
|
|
@@ -184,15 +184,10 @@ export declare function formatErrorResponse(error: string | Error, status?: numb
|
|
|
184
184
|
status: number;
|
|
185
185
|
};
|
|
186
186
|
/**
|
|
187
|
-
* Options for batch request handling
|
|
187
|
+
* Options for batch request handling: the result-cache execution options
|
|
188
|
+
* (`skipCache`, `maxAgeMs`), applied to every query in the batch.
|
|
188
189
|
*/
|
|
189
|
-
export
|
|
190
|
-
/**
|
|
191
|
-
* Whether to bypass server-side cache for all queries in the batch
|
|
192
|
-
* When true, all queries will be executed fresh without cache
|
|
193
|
-
*/
|
|
194
|
-
skipCache?: boolean;
|
|
195
|
-
}
|
|
190
|
+
export type BatchRequestOptions = Pick<ExecutionOptions, 'skipCache' | 'maxAgeMs'>;
|
|
196
191
|
/**
|
|
197
192
|
* Handle batch query requests - wrapper around existing single query execution
|
|
198
193
|
* Executes multiple queries in parallel and returns partial success results
|
|
@@ -200,7 +195,7 @@ export interface BatchRequestOptions {
|
|
|
200
195
|
* @param queries - Array of semantic queries to execute
|
|
201
196
|
* @param securityContext - Security context (extracted once, shared across all queries)
|
|
202
197
|
* @param semanticLayer - Semantic layer compiler instance
|
|
203
|
-
* @param options - Optional batch request options (
|
|
198
|
+
* @param options - Optional batch request options (skipCache, maxAgeMs)
|
|
204
199
|
* @returns Array of results matching input query order (successful or error results)
|
|
205
200
|
*/
|
|
206
201
|
export declare function handleBatchRequest(queries: SemanticQuery[], securityContext: SecurityContext, semanticLayer: SemanticLayerCompiler, options?: BatchRequestOptions): Promise<{
|
package/dist/adapters/utils.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export { t as buildTransformedQuery, n as calculateQueryComplexity, r as formatCubeResponse, i as formatErrorResponse, a as formatMetaResponse, o as formatSqlResponse, x as formatSqlString, s as generateRequestId, c as getDatabaseType, l as handleBatchRequest, p as handleDiscover, u as handleDryRun, m as handleLoad, d as handleSuggest, f as handleValidate, h as normalizeQueryFields } from "./utils-
|
|
1
|
+
export { t as buildTransformedQuery, n as calculateQueryComplexity, r as formatCubeResponse, i as formatErrorResponse, a as formatMetaResponse, o as formatSqlResponse, x as formatSqlString, s as generateRequestId, c as getDatabaseType, l as handleBatchRequest, p as handleDiscover, u as handleDryRun, m as handleLoad, d as handleSuggest, f as handleValidate, h as normalizeQueryFields } from "./utils-BtiRfbcX.js";
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { ExecutionOptions } from '../../server/index.js';
|
|
2
|
+
import { HeaderReader } from './security-context.js';
|
|
3
|
+
/** Read the request cache headers into the result-cache execution options. */
|
|
4
|
+
export declare function readCacheOptions(readHeader: HeaderReader): Pick<ExecutionOptions, 'skipCache' | 'maxAgeMs'>;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Request headers the drizzle-cube client sends, which a cross-origin
|
|
3
|
+
* deployment's CORS preflight must allow. Adapters add them to a configured
|
|
4
|
+
* `allowHeaders` list so the integrator does not have to list them:
|
|
5
|
+
*
|
|
6
|
+
* - `X-DC-Locale` — the viewer's locale (see `locale.ts`)
|
|
7
|
+
* - `X-Cache-Max-Age` — the oldest cached result accepted (interval refresh
|
|
8
|
+
* sends one on every tick)
|
|
9
|
+
* - `X-Cache-Control` — `no-cache` on a cache bust
|
|
10
|
+
*/
|
|
11
|
+
/** Client request headers, in the casing added to an allow list. */
|
|
12
|
+
export declare const CLIENT_REQUEST_HEADERS: readonly ["X-DC-Locale", "X-Cache-Max-Age", "X-Cache-Control"];
|
|
13
|
+
/**
|
|
14
|
+
* Add each of `required` to an allow list (array or comma-separated string)
|
|
15
|
+
* unless it is already there, compared case-insensitively.
|
|
16
|
+
*/
|
|
17
|
+
export declare function ensureAllowedHeaders(allowHeaders: string[] | string | undefined, required: readonly string[]): string[];
|
|
18
|
+
/** Add every client request header to a CORS allow list. */
|
|
19
|
+
export declare function ensureClientRequestHeaders(allowHeaders?: string[] | string): string[];
|
|
@@ -4,5 +4,4 @@ export declare const DEFAULT_LOCALE = "en-GB";
|
|
|
4
4
|
type HeaderValue = string | string[] | null | undefined;
|
|
5
5
|
export declare function resolveRequestLocale(getHeader: (name: string) => HeaderValue): string | undefined;
|
|
6
6
|
export declare function withLocaleInSecurityContext(securityContext: SecurityContext, requestLocale?: string): SecurityContext;
|
|
7
|
-
export declare function ensureLocaleHeader(allowHeaders?: string[] | string): string[];
|
|
8
7
|
export {};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { SemanticLayerCompiler, SemanticQuery, SecurityContext, QuerySuggestion, AIValidationResult, QueryValidationIssue } from '../server/index.js';
|
|
1
|
+
import { SemanticLayerCompiler, SemanticQuery, SecurityContext, QuerySuggestion, AIValidationResult, QueryValidationIssue, ExecutionOptions } from '../server/index.js';
|
|
2
2
|
import { normalizeQueryFields } from '../server/query-handlers.js';
|
|
3
3
|
import { MCPPromptResolver, MCPResourceResolver, MCPInstructionsResolver } from './mcp-transport.js';
|
|
4
4
|
export { handleDiscover, handleLoad } from '../server/query-handlers.js';
|
|
@@ -184,15 +184,10 @@ export declare function formatErrorResponse(error: string | Error, status?: numb
|
|
|
184
184
|
status: number;
|
|
185
185
|
};
|
|
186
186
|
/**
|
|
187
|
-
* Options for batch request handling
|
|
187
|
+
* Options for batch request handling: the result-cache execution options
|
|
188
|
+
* (`skipCache`, `maxAgeMs`), applied to every query in the batch.
|
|
188
189
|
*/
|
|
189
|
-
export
|
|
190
|
-
/**
|
|
191
|
-
* Whether to bypass server-side cache for all queries in the batch
|
|
192
|
-
* When true, all queries will be executed fresh without cache
|
|
193
|
-
*/
|
|
194
|
-
skipCache?: boolean;
|
|
195
|
-
}
|
|
190
|
+
export type BatchRequestOptions = Pick<ExecutionOptions, 'skipCache' | 'maxAgeMs'>;
|
|
196
191
|
/**
|
|
197
192
|
* Handle batch query requests - wrapper around existing single query execution
|
|
198
193
|
* Executes multiple queries in parallel and returns partial success results
|
|
@@ -200,7 +195,7 @@ export interface BatchRequestOptions {
|
|
|
200
195
|
* @param queries - Array of semantic queries to execute
|
|
201
196
|
* @param securityContext - Security context (extracted once, shared across all queries)
|
|
202
197
|
* @param semanticLayer - Semantic layer compiler instance
|
|
203
|
-
* @param options - Optional batch request options (
|
|
198
|
+
* @param options - Optional batch request options (skipCache, maxAgeMs)
|
|
204
199
|
* @returns Array of results matching input query order (successful or error results)
|
|
205
200
|
*/
|
|
206
201
|
export declare function handleBatchRequest(queries: SemanticQuery[], securityContext: SecurityContext, semanticLayer: SemanticLayerCompiler, options?: BatchRequestOptions): Promise<{
|
|
@@ -90,11 +90,11 @@ export declare function loadAllChartConfigs(): Promise<ChartConfigRegistry>;
|
|
|
90
90
|
export declare function clearChartConfigCache(): void;
|
|
91
91
|
/**
|
|
92
92
|
* Register a custom chart config directly into the cache.
|
|
93
|
-
* Used by the chart plugin system.
|
|
93
|
+
* Used by the chart plugin system. Mounted `useChartConfig` hooks update.
|
|
94
94
|
*/
|
|
95
95
|
export declare function registerConfigToCache(type: string, config: ChartTypeConfig): void;
|
|
96
96
|
/**
|
|
97
97
|
* Remove a custom chart config from the cache.
|
|
98
|
-
* Used by the chart plugin system.
|
|
98
|
+
* Used by the chart plugin system. Mounted `useChartConfig` hooks update.
|
|
99
99
|
*/
|
|
100
100
|
export declare function unregisterConfigFromCache(type: string): void;
|
|
@@ -1,22 +1,33 @@
|
|
|
1
1
|
import { CubeQuery, CubeResultSet } from '../types.js';
|
|
2
|
+
/** Options for one registered query. */
|
|
3
|
+
export interface BatchRegisterOptions {
|
|
4
|
+
/** Oldest cached server result accepted, in seconds. 0 skips the cache read. */
|
|
5
|
+
maxAgeSeconds?: number;
|
|
6
|
+
}
|
|
7
|
+
/** Executes one batch. `options` is passed only when the batch has a max-age. */
|
|
8
|
+
export type BatchExecutor = (queries: CubeQuery[], options?: BatchRegisterOptions) => Promise<CubeResultSet[]>;
|
|
2
9
|
/**
|
|
3
10
|
* BatchCoordinator collects queries triggered in the same render cycle
|
|
4
11
|
* and sends them as a single batch request to minimize network overhead.
|
|
5
12
|
*
|
|
6
|
-
* Uses a configurable delay (default
|
|
13
|
+
* Uses a configurable delay (default 50ms) to batch queries from lazy-loaded
|
|
7
14
|
* portlets that become visible during the same scroll action.
|
|
15
|
+
*
|
|
16
|
+
* The pending queue is keyed by max-age: a batch carries one `x-cache-max-age`
|
|
17
|
+
* header, so queries with different max-ages flush as separate batch calls
|
|
18
|
+
* (and still batch among themselves). A cache bust is the max-age 0 queue.
|
|
8
19
|
*/
|
|
9
20
|
export declare class BatchCoordinator {
|
|
10
|
-
private
|
|
21
|
+
private queues;
|
|
11
22
|
private flushScheduled;
|
|
12
23
|
private batchExecutor;
|
|
13
24
|
private delayMs;
|
|
14
|
-
constructor(batchExecutor:
|
|
25
|
+
constructor(batchExecutor: BatchExecutor, delayMs?: number);
|
|
15
26
|
/**
|
|
16
27
|
* Register a query to be batched. Returns a promise that resolves
|
|
17
28
|
* when the batch is executed and this specific query's result is available.
|
|
18
29
|
*/
|
|
19
|
-
register(query: CubeQuery): Promise<CubeResultSet>;
|
|
30
|
+
register(query: CubeQuery, options?: BatchRegisterOptions): Promise<CubeResultSet>;
|
|
20
31
|
/**
|
|
21
32
|
* Schedule a flush after a short delay to collect multiple queries.
|
|
22
33
|
* The delay allows queries from lazy-loaded portlets that become visible
|
|
@@ -24,11 +35,15 @@ export declare class BatchCoordinator {
|
|
|
24
35
|
*/
|
|
25
36
|
private scheduleFlush;
|
|
26
37
|
/**
|
|
27
|
-
*
|
|
38
|
+
* Send every pending queue as its own batch call.
|
|
28
39
|
*/
|
|
29
40
|
private flush;
|
|
30
41
|
/**
|
|
31
|
-
*
|
|
42
|
+
* Execute one queue as a batch and resolve individual promises
|
|
43
|
+
*/
|
|
44
|
+
private flushQueue;
|
|
45
|
+
/**
|
|
46
|
+
* Get current queue size across all max-ages (useful for debugging)
|
|
32
47
|
*/
|
|
33
48
|
getQueueSize(): number;
|
|
34
49
|
/**
|
|
@@ -1,4 +1,14 @@
|
|
|
1
1
|
import { CubeQuery, CubeApiOptions, CubeResultSet, CubeValidationIssue, ExplainResult, ExplainOptions } from '../types.js';
|
|
2
|
+
import { MaxAgeOptions } from './maxAge.js';
|
|
3
|
+
/**
|
|
4
|
+
* Called with each result of a subscription, or with the error of a load that
|
|
5
|
+
* failed (Cube.js `subscribe` callback shape).
|
|
6
|
+
*/
|
|
7
|
+
export type CubeSubscribeCallback = (error: Error | null, resultSet: CubeResultSet | null) => void;
|
|
8
|
+
/** A live subscription. `unsubscribe` stops it; no callback follows. */
|
|
9
|
+
export interface CubeSubscription {
|
|
10
|
+
unsubscribe: () => void;
|
|
11
|
+
}
|
|
2
12
|
/**
|
|
3
13
|
* A failed query, carrying the server's structured validation detail when it
|
|
4
14
|
* sent any. A caller can then react to one dead member — dropping a column for
|
|
@@ -13,10 +23,27 @@ export declare class CubeClient {
|
|
|
13
23
|
private apiUrl;
|
|
14
24
|
private headers;
|
|
15
25
|
private credentials;
|
|
26
|
+
private subscribeIntervalSeconds;
|
|
16
27
|
constructor(token?: string, options?: CubeApiOptions);
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
28
|
+
/**
|
|
29
|
+
* Load one query. `maxAgeSeconds` sends `x-cache-max-age`, so the server
|
|
30
|
+
* answers from its cache only when the cached result is at most that old;
|
|
31
|
+
* `bustCache: true` is max-age 0.
|
|
32
|
+
*/
|
|
33
|
+
load(query: CubeQuery, options?: MaxAgeOptions): Promise<CubeResultSet>;
|
|
34
|
+
/**
|
|
35
|
+
* Keep a query current (Cube.js `subscribe`). The callback receives the
|
|
36
|
+
* initial load, then a result every 10 seconds (or `minSubscribeIntervalSeconds`
|
|
37
|
+
* when larger), each fetched with max-age equal to the interval, lowered to
|
|
38
|
+
* just under the age of the last delivered rows: a tick never gets those
|
|
39
|
+
* rows back, and subscribers in one security context share any newer
|
|
40
|
+
* result. A failed
|
|
41
|
+
* load calls back with the error and the subscription keeps going.
|
|
42
|
+
* `options` apply to the initial load only.
|
|
43
|
+
*
|
|
44
|
+
* `unsubscribe` stops the refetches and drops any result still in flight.
|
|
45
|
+
*/
|
|
46
|
+
subscribe(query: CubeQuery, options: MaxAgeOptions | null | undefined, callback: CubeSubscribeCallback): CubeSubscription;
|
|
20
47
|
meta(): Promise<any>;
|
|
21
48
|
sql(query: CubeQuery): Promise<any>;
|
|
22
49
|
dryRun(query: CubeQuery): Promise<any>;
|
|
@@ -28,12 +55,11 @@ export declare class CubeClient {
|
|
|
28
55
|
explain(query: CubeQuery | unknown, options?: ExplainOptions): Promise<ExplainResult>;
|
|
29
56
|
/**
|
|
30
57
|
* Execute multiple queries in a single batch request
|
|
31
|
-
* Used by BatchCoordinator to optimize network requests
|
|
32
|
-
*
|
|
58
|
+
* Used by BatchCoordinator to optimize network requests.
|
|
59
|
+
* `maxAgeSeconds` applies to every query in the batch; `bustCache: true` is
|
|
60
|
+
* max-age 0.
|
|
33
61
|
*/
|
|
34
|
-
batchLoad(queries: CubeQuery[], options?:
|
|
35
|
-
bustCache?: boolean;
|
|
36
|
-
}): Promise<CubeResultSet[]>;
|
|
62
|
+
batchLoad(queries: CubeQuery[], options?: MaxAgeOptions): Promise<CubeResultSet[]>;
|
|
37
63
|
}
|
|
38
64
|
/**
|
|
39
65
|
* Factory function to create a cube client
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Max-age: how old a cached server result a request accepts.
|
|
3
|
+
*
|
|
4
|
+
* One freshness mechanism serves the refresh button, a cache bust and interval
|
|
5
|
+
* refresh. `maxAgeSeconds: 30` lets the server answer from a result cached in
|
|
6
|
+
* the last 30 seconds; `maxAgeSeconds: 0` (or `bustCache: true`) skips the
|
|
7
|
+
* cache read. With no max-age the server applies its own cache TTL.
|
|
8
|
+
*/
|
|
9
|
+
/** Options accepted by every load/refetch that reaches the server. */
|
|
10
|
+
export interface MaxAgeOptions {
|
|
11
|
+
/** Oldest cached result, in seconds, the server may return. 0 skips the cache read. */
|
|
12
|
+
maxAgeSeconds?: number;
|
|
13
|
+
/** Shorthand for `maxAgeSeconds: 0` (shift+click on refresh). */
|
|
14
|
+
bustCache?: boolean;
|
|
15
|
+
/**
|
|
16
|
+
* Accept only rows computed after the ones the hook shows: the max-age is
|
|
17
|
+
* lowered to just under their age. Interval refresh ticks send it, so a tick
|
|
18
|
+
* never gets back the rows it already shows, however long the query took.
|
|
19
|
+
*/
|
|
20
|
+
newerThanShown?: boolean;
|
|
21
|
+
}
|
|
22
|
+
/**
|
|
23
|
+
* Resolve options to one max-age in whole seconds, or undefined for "server
|
|
24
|
+
* default". `bustCache` wins over any `maxAgeSeconds`. Negative and non-finite
|
|
25
|
+
* values are ignored, as the server ignores them.
|
|
26
|
+
*/
|
|
27
|
+
export declare function resolveMaxAgeSeconds(options?: MaxAgeOptions): number | undefined;
|
|
28
|
+
/**
|
|
29
|
+
* Request headers for a max-age. Max-age 0 also sends `X-Cache-Control:
|
|
30
|
+
* no-cache` so a server that predates `x-cache-max-age` still bypasses its
|
|
31
|
+
* cache.
|
|
32
|
+
*/
|
|
33
|
+
export declare function maxAgeHeaders(maxAgeSeconds: number | undefined): Record<string, string>;
|
|
34
|
+
/**
|
|
35
|
+
* Keep the stricter of two max-ages; `bustCache` resolves to max-age 0. Returns
|
|
36
|
+
* `current` itself (same identity) unless `incoming` resolves to a stricter one.
|
|
37
|
+
*/
|
|
38
|
+
export declare function retainStricterMaxAge(current?: MaxAgeOptions, incoming?: MaxAgeOptions): MaxAgeOptions | undefined;
|
|
39
|
+
/**
|
|
40
|
+
* Resolve `newerThanShown` against the age of the rows shown: a max-age in
|
|
41
|
+
* whole seconds strictly under that age, so the server, which serves an entry
|
|
42
|
+
* no older than the max-age, rejects the entry those rows came from but still
|
|
43
|
+
* serves a newer one another viewer stored. With no rows shown the options
|
|
44
|
+
* apply as they are.
|
|
45
|
+
*/
|
|
46
|
+
export declare function capToShownRows(options: MaxAgeOptions | undefined, shownAgeMs: number | undefined): MaxAgeOptions | undefined;
|
|
47
|
+
/** A refetch's max-age, tracked per hook until a fetch with it succeeds. */
|
|
48
|
+
export interface RefetchMaxAgeTracker {
|
|
49
|
+
/**
|
|
50
|
+
* Retain the stricter resolved max-age; an absent or invalid max-age adds
|
|
51
|
+
* nothing. `shownAgeMs`, the age of the rows the hook shows, resolves
|
|
52
|
+
* `newerThanShown`. Does not fetch. Returns whether the pending max-age
|
|
53
|
+
* became stricter, which is when a fetch already in flight no longer
|
|
54
|
+
* satisfies it.
|
|
55
|
+
*/
|
|
56
|
+
recordMaxAge: (options?: MaxAgeOptions, shownAgeMs?: number) => boolean;
|
|
57
|
+
/** Whether a max-age is waiting for a successful fetch, including while one is in flight. */
|
|
58
|
+
hasPendingMaxAge: () => boolean;
|
|
59
|
+
/**
|
|
60
|
+
* Run one fetch attempt with the pending max-age. Success clears it unless a
|
|
61
|
+
* stricter one was recorded meanwhile; failure keeps it for the retry.
|
|
62
|
+
*/
|
|
63
|
+
runFetch: <T>(fetch: (options?: MaxAgeOptions) => Promise<T>) => Promise<T>;
|
|
64
|
+
}
|
|
65
|
+
/**
|
|
66
|
+
* Per-hook tracker for a refetch's max-age.
|
|
67
|
+
*
|
|
68
|
+
* A TanStack query function takes no per-call arguments, so a query hook's
|
|
69
|
+
* refetch records its max-age here and then refetches through the hook's own
|
|
70
|
+
* observer, which runs this hook's query function (even while the query is
|
|
71
|
+
* disabled). Going through `queryClient.invalidateQueries` instead would run
|
|
72
|
+
* the query function of whichever observer of the query rendered last, such
|
|
73
|
+
* as a dashboard card's expand modal.
|
|
74
|
+
*
|
|
75
|
+
* A skipped hook (an off-screen portlet) only records the max-age; its query
|
|
76
|
+
* function picks it up when the hook is enabled and fetches. The max-age stays
|
|
77
|
+
* pending through retries and clears when a fetch with it succeeds. It is held
|
|
78
|
+
* as an object so a success clears only the max-age it fetched with, by identity.
|
|
79
|
+
*
|
|
80
|
+
* A refetch passes `cancelRefetch` only when its max-age is stricter than the
|
|
81
|
+
* pending one. Otherwise it joins the fetch in flight, so interval ticks that
|
|
82
|
+
* outpace a slow query do not cancel it on every tick.
|
|
83
|
+
*/
|
|
84
|
+
export declare function createRefetchMaxAgeTracker(): RefetchMaxAgeTracker;
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Subscription scheduling: when a subscribed query refetches.
|
|
3
|
+
*
|
|
4
|
+
* A subscription (`useCubeQuery(query, { subscribe: true })` or
|
|
5
|
+
* `CubeClient.subscribe`) keeps a query current. In Phase 0 it refetches on a
|
|
6
|
+
* fixed interval with max-age equal to that interval and `newerThanShown`, so
|
|
7
|
+
* a tick never gets back the rows the subscriber already has, and subscribers
|
|
8
|
+
* in one security context share any newer result.
|
|
9
|
+
*
|
|
10
|
+
* This module is the one place both subscribers ask "when do I refetch?".
|
|
11
|
+
* Swapping the interval for change detection (refresh keys) replaces
|
|
12
|
+
* `scheduleSubscription` and leaves the hook and client APIs alone.
|
|
13
|
+
*/
|
|
14
|
+
/** Cube.js's default refresh cadence for a subscription, in seconds. */
|
|
15
|
+
export declare const SUBSCRIBE_INTERVAL_SECONDS = 10;
|
|
16
|
+
/**
|
|
17
|
+
* A subscription's refetch interval in whole seconds: the default 10, raised
|
|
18
|
+
* to `minIntervalSeconds` when that is larger.
|
|
19
|
+
*/
|
|
20
|
+
export declare function resolveSubscribeIntervalSeconds(minIntervalSeconds?: number): number;
|
|
21
|
+
/** What a subscription does when it should refetch. */
|
|
22
|
+
export type SubscriptionRefetch = (options: {
|
|
23
|
+
maxAgeSeconds: number;
|
|
24
|
+
newerThanShown: true;
|
|
25
|
+
}) => void;
|
|
26
|
+
/**
|
|
27
|
+
* Call `refetch` whenever the subscribed query may have new data. Returns a
|
|
28
|
+
* function that stops it.
|
|
29
|
+
*/
|
|
30
|
+
export declare function scheduleSubscription(intervalSeconds: number, refetch: SubscriptionRefetch): () => void;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { AnalyticsDashboardProps } from '../types.js';
|
|
2
|
-
export default function AnalyticsDashboard({ config, editable, dashboardFilters: propDashboardFilters, loadingComponent, onConfigChange, onSave, onSaveThumbnail, onDirtyStateChange, dashboardMeta, onDashboardMetaChange, onPortletExpand }: AnalyticsDashboardProps): import('react').JSX.Element;
|
|
2
|
+
export default function AnalyticsDashboard({ config, editable, dashboardFilters: propDashboardFilters, onDashboardFiltersChange: onPropFiltersChange, loadingComponent, onConfigChange, onSave, onSaveThumbnail, onDirtyStateChange, dashboardMeta, onDashboardMetaChange, onPortletExpand }: AnalyticsDashboardProps): import('react').JSX.Element;
|
|
@@ -2,11 +2,12 @@ import { default as React } from 'react';
|
|
|
2
2
|
import { DashboardFilter, CubeMeta, DashboardConfig } from '../types.js';
|
|
3
3
|
interface DashboardFilterPanelProps {
|
|
4
4
|
dashboardFilters: DashboardFilter[];
|
|
5
|
+
readOnlyFilterIds?: string[];
|
|
5
6
|
editable: boolean;
|
|
6
7
|
schema: CubeMeta | null;
|
|
7
8
|
dashboardConfig: DashboardConfig;
|
|
8
|
-
onDashboardFiltersChange: (filters: DashboardFilter[]) => void;
|
|
9
|
-
|
|
9
|
+
onDashboardFiltersChange: (filters: DashboardFilter[], changedFilterId: string) => void;
|
|
10
|
+
onFilterDefinitionsChange: (filters: DashboardFilter[]) => void | Promise<void>;
|
|
10
11
|
selectedFilterId?: string | null;
|
|
11
12
|
onFilterSelect?: (filterId: string) => void;
|
|
12
13
|
isEditMode?: boolean;
|
|
@@ -2,9 +2,11 @@ import { default as React } from 'react';
|
|
|
2
2
|
import { DashboardFilter, CubeMeta } from '../../types.js';
|
|
3
3
|
interface CompactFilterBarProps {
|
|
4
4
|
dashboardFilters: DashboardFilter[];
|
|
5
|
+
readOnlyFilterIds?: string[];
|
|
5
6
|
schema: CubeMeta | null;
|
|
6
7
|
isEditMode: boolean;
|
|
7
|
-
|
|
8
|
+
allowDateFilterCreation?: boolean;
|
|
9
|
+
onDashboardFiltersChange: (filters: DashboardFilter[], changedFilterId: string) => void;
|
|
8
10
|
onAddFilter?: () => void;
|
|
9
11
|
onEditFilter?: (filterId: string) => void;
|
|
10
12
|
onRemoveFilter?: (filterId: string) => void;
|
|
@@ -3,6 +3,10 @@ import { DashboardFilter, CubeMeta } from '../../types.js';
|
|
|
3
3
|
export interface CompactFilterBarViewProps {
|
|
4
4
|
schema: CubeMeta | null;
|
|
5
5
|
isEditMode: boolean;
|
|
6
|
+
showDateControls: boolean;
|
|
7
|
+
dateReadOnly: boolean;
|
|
8
|
+
readOnlyFilterIds: string[];
|
|
9
|
+
readOnlyDescriptionId: string;
|
|
6
10
|
onAddFilter?: () => void;
|
|
7
11
|
onEditFilter?: (filterId: string) => void;
|
|
8
12
|
onRemoveFilter?: (filterId: string) => void;
|
|
@@ -3,6 +3,7 @@ interface DatePresetChipsProps {
|
|
|
3
3
|
activePreset: string | null;
|
|
4
4
|
onPresetSelect: (presetValue: string) => void;
|
|
5
5
|
disabled?: boolean;
|
|
6
|
+
disabledDescriptionId?: string;
|
|
6
7
|
}
|
|
7
8
|
declare const DatePresetChips: React.FC<DatePresetChipsProps>;
|
|
8
9
|
export default DatePresetChips;
|
|
@@ -3,7 +3,7 @@ import { SimpleFilter, CubeMeta } from '../../types.js';
|
|
|
3
3
|
interface FilterValuePopoverProps {
|
|
4
4
|
filter: SimpleFilter;
|
|
5
5
|
schema: CubeMeta | null;
|
|
6
|
-
onValuesChange: (values:
|
|
6
|
+
onValuesChange: (values: SimpleFilter['values']) => void;
|
|
7
7
|
onClose: () => void;
|
|
8
8
|
anchorRef: React.RefObject<HTMLElement | null>;
|
|
9
9
|
}
|
|
@@ -4,8 +4,9 @@ import { DashboardFilter } from '../../types.js';
|
|
|
4
4
|
* filter when present, otherwise the first simple `inDateRange` filter.
|
|
5
5
|
*/
|
|
6
6
|
export declare function findDateControlFilter(filters: DashboardFilter[]): DashboardFilter | undefined;
|
|
7
|
-
export declare function useCompactFilterBar(dashboardFilters: DashboardFilter[], onDashboardFiltersChange: (filters: DashboardFilter[]) => void): {
|
|
8
|
-
|
|
7
|
+
export declare function useCompactFilterBar(dashboardFilters: DashboardFilter[], onDashboardFiltersChange: (filters: DashboardFilter[], changedFilterId: string) => void, allowDateFilterCreation?: boolean): {
|
|
8
|
+
dateControlFilter: DashboardFilter | undefined;
|
|
9
|
+
showDateControls: boolean;
|
|
9
10
|
showCustomDropdown: boolean;
|
|
10
11
|
setShowCustomDropdown: import('react').Dispatch<import('react').SetStateAction<boolean>>;
|
|
11
12
|
showXTDDropdown: boolean;
|
|
@@ -4,6 +4,7 @@ import { DashboardConfig, DashboardFilter, CubeMeta, DashboardLayoutMode, Dashbo
|
|
|
4
4
|
interface DashboardGridProps {
|
|
5
5
|
config: DashboardConfig;
|
|
6
6
|
editable?: boolean;
|
|
7
|
+
readOnlyFilterIds?: string[];
|
|
7
8
|
dashboardFilters?: DashboardFilter[];
|
|
8
9
|
loadingComponent?: ReactNode;
|
|
9
10
|
onConfigChange?: (config: DashboardConfig) => void;
|
|
@@ -13,7 +14,13 @@ interface DashboardGridProps {
|
|
|
13
14
|
onSaveThumbnail?: (thumbnailData: string) => Promise<string | void>;
|
|
14
15
|
colorPalette?: ColorPalette;
|
|
15
16
|
schema?: CubeMeta | null;
|
|
16
|
-
|
|
17
|
+
/**
|
|
18
|
+
* Receives viewer value changes from the view-mode filter bar, with the ID of the
|
|
19
|
+
* filter the viewer changed. Filter definition edits in edit mode go to
|
|
20
|
+
* onConfigChange and then onSave, and the edit-mode list reads config.filters,
|
|
21
|
+
* not dashboardFilters.
|
|
22
|
+
*/
|
|
23
|
+
onDashboardFiltersChange?: (filters: DashboardFilter[], changedFilterId: string) => void;
|
|
17
24
|
dashboardModes?: DashboardLayoutMode[];
|
|
18
25
|
/** When true, no toolbar is rendered (neither the top edit bar nor the floating toolbar) */
|
|
19
26
|
hideToolbar?: boolean;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { default as React } from 'react';
|
|
2
2
|
import { DashboardPortletCardProps } from './dashboardPortletCard/propsEqual.js';
|
|
3
|
-
declare const DashboardPortletCard: React.MemoExoticComponent<({ portlet, editable, layoutMode, dashboardFilters, configEagerLoad, loadingComponent, colorPalette, containerProps, headerProps, variant, setPortletRef, setPortletComponentRef, callbacks, icons, onPortletExpand }: DashboardPortletCardProps) => React.JSX.Element>;
|
|
3
|
+
declare const DashboardPortletCard: React.MemoExoticComponent<({ portlet, editable, layoutMode, dashboardFilters, configEagerLoad, dashboardRefresh, loadingComponent, colorPalette, containerProps, headerProps, variant, setPortletRef, setPortletComponentRef, callbacks, icons, onPortletExpand }: DashboardPortletCardProps) => React.JSX.Element>;
|
|
4
4
|
export default DashboardPortletCard;
|
|
@@ -31,6 +31,10 @@ interface FloatingEditToolbarProps {
|
|
|
31
31
|
onExportDashboard?: () => void;
|
|
32
32
|
/** Import a dashboard JSON file, replacing this one; button hidden when absent, edit mode only */
|
|
33
33
|
onImportDashboard?: () => void;
|
|
34
|
+
/** Whether dashboard interval refresh is paused */
|
|
35
|
+
isRefreshPaused?: boolean;
|
|
36
|
+
/** Pause or resume dashboard interval refresh; button hidden when absent */
|
|
37
|
+
onToggleRefreshPause?: () => void;
|
|
34
38
|
}
|
|
35
|
-
export default function FloatingEditToolbar({ isEditBarVisible, position, isEditMode, canEdit, onEditModeToggle, layoutMode, onLayoutModeChange, allowedModes, canChangeLayoutMode, currentPalette, onPaletteChange, onAddPortlet, onAddText, onExportDashboard, onImportDashboard }: FloatingEditToolbarProps): React.ReactPortal | null;
|
|
39
|
+
export default function FloatingEditToolbar({ isEditBarVisible, position, isEditMode, canEdit, onEditModeToggle, layoutMode, onLayoutModeChange, allowedModes, canChangeLayoutMode, currentPalette, onPaletteChange, onAddPortlet, onAddText, onExportDashboard, onImportDashboard, isRefreshPaused, onToggleRefreshPause }: FloatingEditToolbarProps): React.ReactPortal | null;
|
|
36
40
|
export {};
|
|
@@ -1,14 +1,20 @@
|
|
|
1
|
-
import { DashboardFilter, DashboardConfig } from '../types.js';
|
|
1
|
+
import { AnalyticsPortletRef, DashboardFilter, DashboardConfig } from '../types.js';
|
|
2
2
|
import { ColorPalette } from '../utils/colorPalettes.js';
|
|
3
3
|
interface MobileStackedLayoutProps {
|
|
4
4
|
config: DashboardConfig;
|
|
5
5
|
colorPalette?: ColorPalette;
|
|
6
6
|
dashboardFilters?: DashboardFilter[];
|
|
7
7
|
onPortletRefresh?: (portletId: string) => void;
|
|
8
|
+
/**
|
|
9
|
+
* Registers each chart with the dashboard, so its refresh action (the
|
|
10
|
+
* refresh button and interval ticks) reaches mobile charts. When set, the
|
|
11
|
+
* refresh button leaves refreshing to `onPortletRefresh`.
|
|
12
|
+
*/
|
|
13
|
+
setPortletComponentRef?: (portletId: string, element: AnalyticsPortletRef | null) => void;
|
|
8
14
|
}
|
|
9
15
|
/**
|
|
10
16
|
* Mobile-optimized stacked layout for dashboard portlets
|
|
11
17
|
* Renders portlets in a single column, sorted by grid position
|
|
12
18
|
*/
|
|
13
|
-
export default function MobileStackedLayout({ config, colorPalette, dashboardFilters, onPortletRefresh }: MobileStackedLayoutProps): import('react').JSX.Element;
|
|
19
|
+
export default function MobileStackedLayout({ config, colorPalette, dashboardFilters, onPortletRefresh, setPortletComponentRef }: MobileStackedLayoutProps): import('react').JSX.Element;
|
|
14
20
|
export {};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { PortletConfig, ColorPalette, DashboardFilter } from '../types.js';
|
|
1
|
+
import { PortletConfig, DashboardRefreshConfig, ColorPalette, DashboardFilter } from '../types.js';
|
|
2
2
|
interface PortletAnalysisModalProps {
|
|
3
3
|
isOpen: boolean;
|
|
4
4
|
onClose: () => void;
|
|
@@ -11,6 +11,8 @@ interface PortletAnalysisModalProps {
|
|
|
11
11
|
colorPalette?: ColorPalette;
|
|
12
12
|
/** @deprecated Dashboard filters are no longer merged into the editor - they are applied at execution time */
|
|
13
13
|
dashboardFilters?: DashboardFilter[];
|
|
14
|
+
/** Dashboard refresh default, so the refresh settings show what the portlet inherits */
|
|
15
|
+
dashboardRefresh?: DashboardRefreshConfig;
|
|
14
16
|
}
|
|
15
17
|
/**
|
|
16
18
|
* PortletAnalysisModal - A modal wrapper around AnalysisBuilder for portlet editing
|
|
@@ -23,5 +25,5 @@ interface PortletAnalysisModalProps {
|
|
|
23
25
|
* - Title input in header
|
|
24
26
|
* - Initial data support (no re-fetch when editing)
|
|
25
27
|
*/
|
|
26
|
-
export default function PortletAnalysisModal({ isOpen, onClose, onSave, portlet, initialData, title: modalTitle, submitText, colorPalette }: PortletAnalysisModalProps): import('react').JSX.Element;
|
|
28
|
+
export default function PortletAnalysisModal({ isOpen, onClose, onSave, portlet, initialData, title: modalTitle, submitText, colorPalette, dashboardRefresh }: PortletAnalysisModalProps): import('react').JSX.Element;
|
|
27
29
|
export {};
|
|
@@ -16,9 +16,11 @@ export interface UsePortletDeadMembersResult {
|
|
|
16
16
|
*
|
|
17
17
|
* A single unknown *filter* member makes the whole error unrecoverable, even
|
|
18
18
|
* alongside prunable ones: re-running without the dead columns would still
|
|
19
|
-
* carry the dead filter.
|
|
19
|
+
* carry the dead filter. An unknown time dimension that carries a date range in
|
|
20
|
+
* `query` is a filter in the same way: `withoutMembers` removes its complete
|
|
21
|
+
* entry, and the date predicate with it.
|
|
20
22
|
*/
|
|
21
|
-
export declare function prunableMembers(error: unknown): string[] | null;
|
|
23
|
+
export declare function prunableMembers(error: unknown, query: CubeQuery): string[] | null;
|
|
22
24
|
/** Remove members from everything that projects or orders by them. */
|
|
23
25
|
export declare function withoutMembers(query: CubeQuery, members: string[]): CubeQuery;
|
|
24
26
|
export declare function usePortletDeadMembers({ queryObject, error }: UsePortletDeadMembersParams): UsePortletDeadMembersResult;
|
|
@@ -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;
|