drizzle-cube 0.5.8 → 0.6.0
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/README.md +2 -0
- package/dist/adapters/adapters/hono/agent-handler.d.ts +9 -0
- package/dist/adapters/adapters/hono/mcp-handler.d.ts +37 -0
- package/dist/adapters/adapters/mcp-tools-handlers.d.ts +18 -0
- package/dist/adapters/adapters/nextjs/mcp-handler.d.ts +36 -0
- package/dist/adapters/adapters/utils.d.ts +6 -81
- package/dist/adapters/express/index.cjs +1 -1
- package/dist/adapters/express/index.js +50 -50
- package/dist/adapters/fastify/index.cjs +1 -1
- package/dist/adapters/fastify/index.js +78 -78
- package/dist/adapters/google-BOnRIN1w.cjs +2 -0
- package/dist/adapters/{google-CFYljAOF.js → google-CvKM9yVM.js} +83 -71
- package/dist/adapters/{handler-Cx8QYLk6.js → handler-CfgE0JSL.js} +499 -576
- package/dist/adapters/handler-Cn0dOctE.cjs +25 -0
- package/dist/adapters/hono/index.cjs +2 -2
- package/dist/adapters/hono/index.js +205 -175
- package/dist/adapters/locale-DDvZDFVn.js +8114 -0
- package/dist/adapters/locale-ZLUUNUxr.cjs +166 -0
- package/dist/adapters/mcp-tools.cjs +1 -1
- package/dist/adapters/mcp-tools.js +49 -38
- package/dist/adapters/mcp-transport-Chiaj4ll.cjs +40 -0
- package/dist/adapters/mcp-transport-H96VG3WY.js +591 -0
- package/dist/adapters/nextjs/index.cjs +1 -1
- package/dist/adapters/nextjs/index.js +190 -197
- package/dist/adapters/{openai-BZdAA7Ji.js → openai-cDlFSTk6.js} +60 -58
- package/dist/adapters/openai-vXvLni8v.cjs +1 -0
- package/dist/adapters/{utils-D9JPLmfl.js → utils-BPWZsX7k.js} +1271 -1218
- package/dist/adapters/utils-_whV4fXL.cjs +128 -0
- package/dist/adapters/utils.cjs +1 -1
- package/dist/adapters/utils.js +2 -2
- package/dist/client/charts/ChartLoader.d.ts +2 -16
- package/dist/client/charts/chartComponentRegistry.d.ts +46 -0
- package/dist/client/charts/chartConfigHelpers.d.ts +38 -0
- package/dist/client/charts.js +14 -13
- package/dist/client/chunks/{DashboardEditModal-CjCIAT-J.js → DashboardEditModal-okVfH8ZK.js} +5296 -4544
- package/dist/client/chunks/DashboardEditModal-okVfH8ZK.js.map +1 -0
- package/dist/client/chunks/{RetentionCombinedChart-BPkfcTa8.js → RetentionCombinedChart-BgbDhsPz.js} +10 -10
- package/dist/client/chunks/{RetentionCombinedChart-BPkfcTa8.js.map → RetentionCombinedChart-BgbDhsPz.js.map} +1 -1
- package/dist/client/chunks/{RetentionHeatmap-DGzLzr7h.js → RetentionHeatmap-DjXZaTPq.js} +5 -5
- package/dist/client/chunks/{RetentionHeatmap-DGzLzr7h.js.map → RetentionHeatmap-DjXZaTPq.js.map} +1 -1
- package/dist/client/chunks/analysis-builder-DB88FojM.js +5674 -0
- package/dist/client/chunks/analysis-builder-DB88FojM.js.map +1 -0
- package/dist/client/chunks/{analysis-builder-shared-CYVwSPqt.js → analysis-builder-shared-BVK4TYfR.js} +1578 -1292
- package/dist/client/chunks/analysis-builder-shared-BVK4TYfR.js.map +1 -0
- package/dist/client/chunks/{chart-activity-grid-DmruKPab.js → chart-activity-grid-DX0SJbxs.js} +635 -492
- package/dist/client/chunks/chart-activity-grid-DX0SJbxs.js.map +1 -0
- package/dist/client/chunks/chart-area-of01_62R.js +775 -0
- package/dist/client/chunks/chart-area-of01_62R.js.map +1 -0
- package/dist/client/chunks/chart-bar-BqelQE_I.js +194 -0
- package/dist/client/chunks/chart-bar-BqelQE_I.js.map +1 -0
- package/dist/client/chunks/{chart-box-plot-DYKfyOI8.js → chart-box-plot-kkBixZ27.js} +2 -2
- package/dist/client/chunks/{chart-box-plot-DYKfyOI8.js.map → chart-box-plot-kkBixZ27.js.map} +1 -1
- package/dist/client/chunks/chart-bubble-B2he1--4.js +221 -0
- package/dist/client/chunks/chart-bubble-B2he1--4.js.map +1 -0
- package/dist/client/chunks/{chart-candlestick-Dwc92Mrj.js → chart-candlestick-DZp19Tzh.js} +2 -2
- package/dist/client/chunks/{chart-candlestick-Dwc92Mrj.js.map → chart-candlestick-DZp19Tzh.js.map} +1 -1
- package/dist/client/chunks/chart-config-area-BNigHUy8.js +124 -0
- package/dist/client/chunks/chart-config-area-BNigHUy8.js.map +1 -0
- package/dist/client/chunks/chart-config-bar-DSO_LRTx.js +54 -0
- package/dist/client/chunks/chart-config-bar-DSO_LRTx.js.map +1 -0
- package/dist/client/chunks/{chart-config-box-plot-DJ-dWWXA.js → chart-config-box-plot-oW8axV2q.js} +5 -10
- package/dist/client/chunks/chart-config-box-plot-oW8axV2q.js.map +1 -0
- package/dist/client/chunks/{chart-config-gauge-DSwC04l0.js → chart-config-gauge-Dq-_H9UN.js} +5 -7
- package/dist/client/chunks/chart-config-gauge-Dq-_H9UN.js.map +1 -0
- package/dist/client/chunks/{chart-config-kpi-delta-D6BIkHL3.js → chart-config-kpi-delta-DSQbvqu_.js} +5 -10
- package/dist/client/chunks/chart-config-kpi-delta-DSQbvqu_.js.map +1 -0
- package/dist/client/chunks/{chart-config-kpi-number-Bx-V9a62.js → chart-config-kpi-number-EFSWY1We.js} +5 -7
- package/dist/client/chunks/chart-config-kpi-number-EFSWY1We.js.map +1 -0
- package/dist/client/chunks/{chart-config-kpi-text-CcqC1u-8.js → chart-config-kpi-text-KM3V5X2u.js} +5 -7
- package/dist/client/chunks/chart-config-kpi-text-KM3V5X2u.js.map +1 -0
- package/dist/client/chunks/{chart-config-line-Db3jDsWc.js → chart-config-line-D6jG8PCH.js} +9 -36
- package/dist/client/chunks/chart-config-line-D6jG8PCH.js.map +1 -0
- package/dist/client/chunks/{chart-config-pie-DD4SmRTF.js → chart-config-pie-BhzW-fdn.js} +6 -16
- package/dist/client/chunks/chart-config-pie-BhzW-fdn.js.map +1 -0
- package/dist/client/chunks/{chart-config-radar-CC2XAaGr.js → chart-config-radar-D7REP1q_.js} +6 -16
- package/dist/client/chunks/chart-config-radar-D7REP1q_.js.map +1 -0
- package/dist/client/chunks/{chart-config-radial-bar-DmxKx1R0.js → chart-config-radial-bar-Byx6qOPU.js} +6 -16
- package/dist/client/chunks/chart-config-radial-bar-Byx6qOPU.js.map +1 -0
- package/dist/client/chunks/{chart-config-tree-map-BI-oQStO.js → chart-config-tree-map-DVrvf3yQ.js} +6 -16
- package/dist/client/chunks/chart-config-tree-map-DVrvf3yQ.js.map +1 -0
- package/dist/client/chunks/{chart-config-waterfall-DSnyixbI.js → chart-config-waterfall-DmFeQdIk.js} +5 -10
- package/dist/client/chunks/chart-config-waterfall-DmFeQdIk.js.map +1 -0
- package/dist/client/chunks/{chart-data-table-BO4sXsim.js → chart-data-table-CKauQXme.js} +1046 -1121
- package/dist/client/chunks/chart-data-table-CKauQXme.js.map +1 -0
- package/dist/client/chunks/{chart-funnel-DnWRsmnS.js → chart-funnel-CToKSBaL.js} +184 -222
- package/dist/client/chunks/chart-funnel-CToKSBaL.js.map +1 -0
- package/dist/client/chunks/chart-gauge-DTVezSk7.js +403 -0
- package/dist/client/chunks/chart-gauge-DTVezSk7.js.map +1 -0
- package/dist/client/chunks/chart-heat-map-DTuUl0BR.js +236 -0
- package/dist/client/chunks/chart-heat-map-DTuUl0BR.js.map +1 -0
- package/dist/client/chunks/chart-kpi-delta-Dn-jjO-2.js +408 -0
- package/dist/client/chunks/chart-kpi-delta-Dn-jjO-2.js.map +1 -0
- package/dist/client/chunks/chart-kpi-number-P_WBiO5S.js +244 -0
- package/dist/client/chunks/chart-kpi-number-P_WBiO5S.js.map +1 -0
- package/dist/client/chunks/chart-kpi-text-C-Y4eb5H.js +185 -0
- package/dist/client/chunks/chart-kpi-text-C-Y4eb5H.js.map +1 -0
- package/dist/client/chunks/chart-line-DKgrQA6c.js +101 -0
- package/dist/client/chunks/chart-line-DKgrQA6c.js.map +1 -0
- package/dist/client/chunks/{chart-markdown-dgUetjyM.js → chart-markdown-CV75S_zL.js} +2 -2
- package/dist/client/chunks/{chart-markdown-dgUetjyM.js.map → chart-markdown-CV75S_zL.js.map} +1 -1
- package/dist/client/chunks/{chart-measure-profile-ClfpLs4q.js → chart-measure-profile-Ket8fJyf.js} +7 -7
- package/dist/client/chunks/{chart-measure-profile-ClfpLs4q.js.map → chart-measure-profile-Ket8fJyf.js.map} +1 -1
- package/dist/client/chunks/chart-pie-ByieAX5H.js +119 -0
- package/dist/client/chunks/chart-pie-ByieAX5H.js.map +1 -0
- package/dist/client/chunks/chart-radar-CiSwHWp4.js +138 -0
- package/dist/client/chunks/chart-radar-CiSwHWp4.js.map +1 -0
- package/dist/client/chunks/chart-radial-bar-BF6Mhl6f.js +122 -0
- package/dist/client/chunks/chart-radial-bar-BF6Mhl6f.js.map +1 -0
- package/dist/client/chunks/{chart-sankey-M3XpO_ah.js → chart-sankey-DjrvKw6K.js} +36 -39
- package/dist/client/chunks/{chart-sankey-M3XpO_ah.js.map → chart-sankey-DjrvKw6K.js.map} +1 -1
- package/dist/client/chunks/chart-scatter-Dd9WFqnS.js +258 -0
- package/dist/client/chunks/chart-scatter-Dd9WFqnS.js.map +1 -0
- package/dist/client/chunks/{chart-sunburst-A_u6lqlS.js → chart-sunburst-leGpuDj7.js} +3 -3
- package/dist/client/chunks/{chart-sunburst-A_u6lqlS.js.map → chart-sunburst-leGpuDj7.js.map} +1 -1
- package/dist/client/chunks/chart-tree-map-Ceq5sLZA.js +323 -0
- package/dist/client/chunks/chart-tree-map-Ceq5sLZA.js.map +1 -0
- package/dist/client/chunks/{chart-waterfall-BuhMoagf.js → chart-waterfall-DyvQReN5.js} +7 -7
- package/dist/client/chunks/{chart-waterfall-BuhMoagf.js.map → chart-waterfall-DyvQReN5.js.map} +1 -1
- package/dist/client/chunks/{charts-core-jRtb0S2M.js → charts-core-DaXSt1Dd.js} +2 -2
- package/dist/client/chunks/{charts-core-jRtb0S2M.js.map → charts-core-DaXSt1Dd.js.map} +1 -1
- package/dist/client/chunks/charts-loader-DdTeCeNo.js +84 -0
- package/dist/client/chunks/charts-loader-DdTeCeNo.js.map +1 -0
- package/dist/client/chunks/{nl-NL-CpVs7ox3.js → nl-NL-2zTAWTej.js} +2 -1
- package/dist/client/chunks/{nl-NL-CpVs7ox3.js.map → nl-NL-2zTAWTej.js.map} +1 -1
- package/dist/client/chunks/retention-ChW9jYdy.js.map +1 -1
- package/dist/client/chunks/{schema-visualization-DE09kQE3.js → schema-visualization-Cb_E9_Gd.js} +12 -12
- package/dist/client/chunks/{schema-visualization-DE09kQE3.js.map → schema-visualization-Cb_E9_Gd.js.map} +1 -1
- package/dist/client/chunks/{useDirtyStateTracking-CoeQbprt.js → useDirtyStateTracking-MbpxH_v6.js} +95 -84
- package/dist/client/chunks/useDirtyStateTracking-MbpxH_v6.js.map +1 -0
- package/dist/client/chunks/{useExplainAI-DlnXWdmz.js → useExplainAI-evnZkjCY.js} +14 -14
- package/dist/client/chunks/{useExplainAI-DlnXWdmz.js.map → useExplainAI-evnZkjCY.js.map} +1 -1
- package/dist/client/chunks/{utils-CTKNaXS8.js → utils-3P6z1vz5.js} +2 -2
- package/dist/client/chunks/{utils-CTKNaXS8.js.map → utils-3P6z1vz5.js.map} +1 -1
- package/dist/client/chunks/{vendor-CPIYyeuD.js → vendor-DSpR0IW6.js} +43 -43
- package/dist/client/chunks/{vendor-CPIYyeuD.js.map → vendor-DSpR0IW6.js.map} +1 -1
- package/dist/client/components/AgenticNotebook/agentChatParts.d.ts +34 -0
- package/dist/client/components/AgenticNotebook/chatMessageParts.d.ts +39 -0
- package/dist/client/components/AgenticNotebook/useAgentChatController.d.ts +25 -0
- package/dist/client/components/AgenticNotebook/useNotebookAutosave.d.ts +12 -0
- package/dist/client/components/AnalysisBuilder/AnalysisQueryPanelParts.d.ts +64 -0
- package/dist/client/components/AnalysisBuilder/AnalysisResultsHeader.d.ts +67 -0
- package/dist/client/components/AnalysisBuilder/BreakdownComparisonToggle.d.ts +13 -0
- package/dist/client/components/AnalysisBuilder/BreakdownRow.d.ts +26 -0
- package/dist/client/components/AnalysisBuilder/DisplayOptionControl.d.ts +10 -0
- package/dist/client/components/AnalysisBuilder/ExecutionPlanPanelParts.d.ts +22 -0
- package/dist/client/components/AnalysisBuilder/FieldSearchResults.d.ts +16 -0
- package/dist/client/components/AnalysisBuilder/FilterValueInput.d.ts +63 -0
- package/dist/client/components/AnalysisBuilder/FlowDepthControls.d.ts +10 -0
- package/dist/client/components/AnalysisBuilder/FlowVisualizationPicker.d.ts +7 -0
- package/dist/client/components/AnalysisBuilder/LegacyBooleanOptions.d.ts +8 -0
- package/dist/client/components/AnalysisBuilder/MetricRow.d.ts +23 -0
- package/dist/client/components/AnalysisBuilder/SortToggleButton.d.ts +13 -0
- package/dist/client/components/AnalysisBuilder/StringArrayInput.d.ts +17 -0
- package/dist/client/components/AnalysisBuilder/filterConfigModalUtils.d.ts +30 -0
- package/dist/client/components/AnalysisBuilder/hooks/useAnalysisBuilderImperativeHandle.d.ts +13 -0
- package/dist/client/components/AnalysisBuilder/hooks/useDragReorder.d.ts +25 -0
- package/dist/client/components/AnalysisBuilder/hooks/useFieldSearchKeyboard.d.ts +11 -0
- package/dist/client/components/AnalysisBuilder/utils/axisConfigUtils.d.ts +23 -0
- package/dist/client/components/AnalysisBuilder/utils/executionPlanMarkdown.d.ts +8 -0
- package/dist/client/components/AnalysisBuilder/utils/fieldUtils.d.ts +5 -0
- package/dist/client/components/AnalysisBuilder/utils/resultsPanelDerive.d.ts +68 -0
- package/dist/client/components/AnalysisBuilder/utils/shareStateUtils.d.ts +68 -0
- package/dist/client/components/AnalysisBuilder/utils/sortUtils.d.ts +7 -0
- package/dist/client/components/DashboardFilters/CompactFilterBarParts.d.ts +26 -0
- package/dist/client/components/DashboardFilters/DashboardFilterConfigModalParts.d.ts +27 -0
- package/dist/client/components/DashboardFilters/DashboardFilterValueInput.d.ts +39 -0
- package/dist/client/components/DashboardFilters/dashboardFilterConfigModalUtils.d.ts +21 -0
- package/dist/client/components/DashboardFilters/useCompactFilterBar.d.ts +19 -0
- package/dist/client/components/DashboardFilters/useDashboardFilterConfigModal.d.ts +69 -0
- package/dist/client/components/DashboardFilters/useDateRangeState.d.ts +19 -0
- package/dist/client/components/DashboardFilters/useFilterDropdowns.d.ts +21 -0
- package/dist/client/components/DashboardFilters/useFilterValueFetch.d.ts +23 -0
- package/dist/client/components/DashboardPortletCard.d.ts +2 -57
- package/dist/client/components/analyticsPortlet/PortletChart.d.ts +31 -0
- package/dist/client/components/analyticsPortlet/PortletChartView.d.ts +35 -0
- package/dist/client/components/analyticsPortlet/PortletStates.d.ts +65 -0
- package/dist/client/components/analyticsPortlet/parsePortletQuery.d.ts +22 -0
- package/dist/client/components/analyticsPortlet/portletRenderState.d.ts +31 -0
- package/dist/client/components/analyticsPortlet/usePortletDebugData.d.ts +37 -0
- package/dist/client/components/analyticsPortlet/usePortletDrillState.d.ts +17 -0
- package/dist/client/components/analyticsPortlet/usePortletQueryResults.d.ts +37 -0
- package/dist/client/components/charts/ActivityGridChart.helpers.d.ts +33 -0
- package/dist/client/components/charts/ActivityGridChart.render.d.ts +31 -0
- package/dist/client/components/charts/AxisFormatControls.d.ts +3 -1
- package/dist/client/components/charts/BarChart.helpers.d.ts +23 -0
- package/dist/client/components/charts/BarSeries.d.ts +29 -0
- package/dist/client/components/charts/BubbleChart.helpers.d.ts +43 -0
- package/dist/client/components/charts/BubbleChart.render.d.ts +21 -0
- package/dist/client/components/charts/ChartStates.d.ts +38 -0
- package/dist/client/components/charts/FunnelChart.helpers.d.ts +25 -0
- package/dist/client/components/charts/FunnelViews.d.ts +16 -0
- package/dist/client/components/charts/HeatMapCanvas.d.ts +25 -0
- package/dist/client/components/charts/HeatMapChart.helpers.d.ts +64 -0
- package/dist/client/components/charts/KpiDelta.helpers.d.ts +20 -0
- package/dist/client/components/charts/KpiNumber.helpers.d.ts +30 -0
- package/dist/client/components/charts/KpiStates.d.ts +19 -0
- package/dist/client/components/charts/ScatterChart.helpers.d.ts +43 -0
- package/dist/client/components/charts/ScatterSeries.d.ts +17 -0
- package/dist/client/components/charts/ScatterTooltip.d.ts +21 -0
- package/dist/client/components/charts/TreeMapChart.helpers.d.ts +37 -0
- package/dist/client/components/charts/TreeMapContent.d.ts +24 -0
- package/dist/client/components/charts/TreeMapLegend.d.ts +13 -0
- package/dist/client/components/charts/cartesianChartHelpers.d.ts +126 -0
- package/dist/client/components/charts/chartAxisResolution.d.ts +32 -0
- package/dist/client/components/charts/chartScaffolding.d.ts +77 -0
- package/dist/client/components/charts/gaugeChartHelpers.d.ts +36 -0
- package/dist/client/components/charts/kpiTextHelpers.d.ts +46 -0
- package/dist/client/components/charts/radarChartHelpers.d.ts +14 -0
- package/dist/client/components/charts/radialBarChartHelpers.d.ts +22 -0
- package/dist/client/components/charts/useChartDimensions.d.ts +20 -0
- package/dist/client/components/charts/useKpiDimensions.d.ts +30 -0
- package/dist/client/components/dashboard/DashboardEditBar.d.ts +5 -0
- package/dist/client/components/dashboard/LayoutModeToggle.d.ts +10 -0
- package/dist/client/components/dashboardPortletCard/FilterFieldChip.d.ts +12 -0
- package/dist/client/components/dashboardPortletCard/PortletCardHeader.d.ts +43 -0
- package/dist/client/components/dashboardPortletCard/cardStyles.d.ts +33 -0
- package/dist/client/components/dashboardPortletCard/filterField.d.ts +12 -0
- package/dist/client/components/dashboardPortletCard/propsEqual.d.ts +55 -0
- package/dist/client/components/dashboardPortletCard/usePortletCardActions.d.ts +16 -0
- package/dist/client/components/portletAnalysisModal/saveValidation.d.ts +8 -0
- package/dist/client/components/shared/dateRangeUtils.d.ts +40 -0
- package/dist/client/components/shared/filterDisplayUtils.d.ts +10 -0
- package/dist/client/components/shared/filterItem/FilterDateRangeSelector.d.ts +17 -0
- package/dist/client/components/shared/filterItem/FilterFieldDropdown.d.ts +16 -0
- package/dist/client/components/shared/filterItem/dateRangeSync.d.ts +14 -0
- package/dist/client/components/shared/filterItem/fieldVisuals.d.ts +5 -0
- package/dist/client/components/shared/filterValueSelector/FilterValueInputs.d.ts +55 -0
- package/dist/client/components/shared/filterValueSelector/useFilterValueSelectorState.d.ts +25 -0
- package/dist/client/components/shared/queryFieldUtils.d.ts +21 -0
- package/dist/client/components/shared/utils.d.ts +4 -43
- package/dist/client/components.js +3 -3
- package/dist/client/hooks/agentChatStream.d.ts +39 -0
- package/dist/client/hooks/analysisQueryExecutionModes.d.ts +133 -0
- package/dist/client/hooks/drillNavigation.d.ts +25 -0
- package/dist/client/hooks.js +3 -3
- package/dist/client/icons.js +2 -2
- package/dist/client/index.js +816 -669
- 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/chartConfigBuilders.d.ts +18 -0
- package/dist/client/shared/components/QueryAnalysisPanel.sections.d.ts +41 -0
- package/dist/client/shared/queryTransforms.d.ts +20 -0
- package/dist/client/shared/utils.d.ts +2 -4
- package/dist/client/stores/optionsToAnalysisConfig.d.ts +17 -0
- package/dist/client/styles.css +1 -1
- package/dist/client/utils/axisValueFormatting.d.ts +32 -0
- package/dist/client/utils/timeValueFormatting.d.ts +32 -0
- package/dist/client/utils.js +6 -6
- package/dist/client-bundle-stats.html +1 -1
- package/dist/mcp-app/mcp-app.html +55 -55
- package/dist/server/google-BOnRIN1w.cjs +2 -0
- package/dist/server/{google-CFYljAOF.js → google-CvKM9yVM.js} +83 -71
- package/dist/server/index.cjs +179 -211
- package/dist/server/index.js +6330 -6458
- package/dist/server/{openai-BZdAA7Ji.js → openai-cDlFSTk6.js} +60 -58
- package/dist/server/openai-vXvLni8v.cjs +1 -0
- package/dist/server/server/adapters/base-adapter.d.ts +80 -35
- package/dist/server/server/adapters/databend-adapter.d.ts +8 -59
- package/dist/server/server/adapters/duckdb-adapter.d.ts +5 -59
- package/dist/server/server/adapters/mysql-adapter.d.ts +13 -70
- package/dist/server/server/adapters/postgres-adapter.d.ts +1 -65
- package/dist/server/server/adapters/snowflake-adapter.d.ts +5 -68
- package/dist/server/server/adapters/sqlite-adapter.d.ts +12 -32
- package/dist/server/server/adapters/window-function-builder.d.ts +11 -0
- package/dist/server/server/agent/chart-validation.d.ts +0 -5
- package/dist/server/server/agent/handler-steps.d.ts +37 -0
- package/dist/server/server/ai/discovery-helpers.d.ts +29 -0
- package/dist/server/server/ai/discovery.d.ts +4 -0
- package/dist/server/server/ai/suggestion-helpers.d.ts +33 -0
- package/dist/server/server/ai/suggestion.d.ts +0 -3
- package/dist/server/server/ai/validation-helpers.d.ts +21 -0
- package/dist/server/server/ai/validation.d.ts +0 -3
- package/dist/server/server/builders/analysis-utils.d.ts +106 -0
- package/dist/server/server/builders/cte-builder.d.ts +46 -0
- package/dist/server/server/builders/date-time-builder.d.ts +5 -0
- package/dist/server/server/builders/date-time-helpers.d.ts +34 -0
- package/dist/server/server/builders/filter-builder.d.ts +2 -0
- package/dist/server/server/builders/filter-operators.d.ts +23 -0
- package/dist/server/server/builders/flow-query-builder.d.ts +46 -19
- package/dist/server/server/builders/funnel-query-builder.d.ts +16 -5
- package/dist/server/server/builders/group-by-builder.d.ts +11 -0
- package/dist/server/server/builders/measure-builder.d.ts +43 -0
- package/dist/server/server/builders/retention-query-builder.d.ts +12 -14
- package/dist/server/server/cache-utils.d.ts +25 -5
- package/dist/server/server/compiler-metadata.d.ts +11 -0
- package/dist/server/server/compiler.d.ts +8 -14
- package/dist/server/server/cube-utils.d.ts +29 -4
- package/dist/server/server/execution/annotation-builder.d.ts +12 -0
- package/dist/server/server/execution/filter-cache-preloader.d.ts +19 -0
- package/dist/server/server/execution/mode-router.d.ts +25 -0
- package/dist/server/server/execution/query-result-cache.d.ts +21 -0
- package/dist/server/server/execution/result-post-processor.d.ts +10 -0
- package/dist/server/server/executor.d.ts +33 -30
- package/dist/server/server/executors/explain-utils.d.ts +28 -0
- package/dist/server/server/explain/explain-tree.d.ts +20 -0
- package/dist/server/server/filter-cache.d.ts +2 -2
- package/dist/server/server/gap-filler.d.ts +6 -0
- package/dist/server/server/index.d.ts +3 -1
- package/dist/server/server/logical-plan/cte-planner-helpers.d.ts +37 -0
- package/dist/server/server/logical-plan/cte-planner.d.ts +104 -0
- package/dist/server/server/logical-plan/filter-propagation.d.ts +44 -0
- package/dist/server/server/logical-plan/index.d.ts +6 -1
- package/dist/server/server/logical-plan/join-planner.d.ts +27 -0
- package/dist/server/server/logical-plan/logical-planner.d.ts +7 -200
- package/dist/server/server/logical-plan/optimiser.d.ts +3 -1
- package/dist/server/server/logical-plan/plan-analysis-reporter.d.ts +59 -0
- package/dist/server/server/logical-plan/planner-utils.d.ts +20 -0
- package/dist/server/server/logical-plan/types.d.ts +17 -9
- package/dist/server/server/measure-classification.d.ts +40 -0
- package/dist/server/server/physical-plan/drizzle-plan-builder.d.ts +21 -21
- package/dist/server/server/physical-plan/drizzle-sql-builder.d.ts +11 -0
- package/dist/server/server/physical-plan/processors/index.d.ts +2 -0
- package/dist/server/server/physical-plan/processors/keys-dedup-processor.d.ts +13 -0
- package/dist/server/server/physical-plan/processors/multi-fact-processor.d.ts +13 -0
- package/dist/server/server/physical-plan/processors/shared.d.ts +5 -0
- package/dist/server/server/query-handlers.d.ts +79 -0
- package/dist/server/server/query-modes.d.ts +28 -0
- package/dist/server/server/query-validator.d.ts +9 -0
- package/dist/server/server/resolvers/calculated-measure-resolver.d.ts +5 -0
- package/dist/server/server/resolvers/join-path-resolver.d.ts +6 -0
- package/dist/server/server/sql-format.d.ts +11 -0
- package/dist/server/server/types/cube.d.ts +18 -4
- package/dist/server/server/types/flow.d.ts +6 -5
- package/dist/server/server/types/index.d.ts +1 -1
- package/dist/server/server/types/validation.d.ts +14 -0
- package/package.json +11 -4
- package/dist/adapters/google-DUlXeeDA.cjs +0 -2
- package/dist/adapters/handler-CzbCuS6_.cjs +0 -25
- package/dist/adapters/locale-BPB7flIG.js +0 -8249
- package/dist/adapters/locale-tIMrNcCr.cjs +0 -198
- package/dist/adapters/mcp-transport-C2QzXm6h.cjs +0 -40
- package/dist/adapters/mcp-transport-D0B3S1tB.js +0 -579
- package/dist/adapters/openai-D_U4V0kT.cjs +0 -1
- package/dist/adapters/utils-KV37IBIv.cjs +0 -128
- package/dist/client/chunks/DashboardEditModal-CjCIAT-J.js.map +0 -1
- package/dist/client/chunks/analysis-builder-MuMIzoRq.js +0 -5367
- package/dist/client/chunks/analysis-builder-MuMIzoRq.js.map +0 -1
- package/dist/client/chunks/analysis-builder-shared-CYVwSPqt.js.map +0 -1
- package/dist/client/chunks/chart-activity-grid-DmruKPab.js.map +0 -1
- package/dist/client/chunks/chart-area-DHCPM4Em.js +0 -450
- package/dist/client/chunks/chart-area-DHCPM4Em.js.map +0 -1
- package/dist/client/chunks/chart-bar-KddciGDv.js +0 -271
- package/dist/client/chunks/chart-bar-KddciGDv.js.map +0 -1
- package/dist/client/chunks/chart-bubble-CfqiB538.js +0 -273
- package/dist/client/chunks/chart-bubble-CfqiB538.js.map +0 -1
- package/dist/client/chunks/chart-config-area-Bq_UsW3x.js +0 -101
- package/dist/client/chunks/chart-config-area-Bq_UsW3x.js.map +0 -1
- package/dist/client/chunks/chart-config-bar-_JEGZnAu.js +0 -95
- package/dist/client/chunks/chart-config-bar-_JEGZnAu.js.map +0 -1
- package/dist/client/chunks/chart-config-box-plot-DJ-dWWXA.js.map +0 -1
- package/dist/client/chunks/chart-config-gauge-DSwC04l0.js.map +0 -1
- package/dist/client/chunks/chart-config-kpi-delta-D6BIkHL3.js.map +0 -1
- package/dist/client/chunks/chart-config-kpi-number-Bx-V9a62.js.map +0 -1
- package/dist/client/chunks/chart-config-kpi-text-CcqC1u-8.js.map +0 -1
- package/dist/client/chunks/chart-config-line-Db3jDsWc.js.map +0 -1
- package/dist/client/chunks/chart-config-pie-DD4SmRTF.js.map +0 -1
- package/dist/client/chunks/chart-config-radar-CC2XAaGr.js.map +0 -1
- package/dist/client/chunks/chart-config-radial-bar-DmxKx1R0.js.map +0 -1
- package/dist/client/chunks/chart-config-tree-map-BI-oQStO.js.map +0 -1
- package/dist/client/chunks/chart-config-waterfall-DSnyixbI.js.map +0 -1
- package/dist/client/chunks/chart-data-table-BO4sXsim.js.map +0 -1
- package/dist/client/chunks/chart-funnel-DnWRsmnS.js.map +0 -1
- package/dist/client/chunks/chart-gauge-CgMeqeGb.js +0 -424
- package/dist/client/chunks/chart-gauge-CgMeqeGb.js.map +0 -1
- package/dist/client/chunks/chart-heat-map-DcGm9SWK.js +0 -231
- package/dist/client/chunks/chart-heat-map-DcGm9SWK.js.map +0 -1
- package/dist/client/chunks/chart-kpi-delta-C2wKPqCb.js +0 -343
- package/dist/client/chunks/chart-kpi-delta-C2wKPqCb.js.map +0 -1
- package/dist/client/chunks/chart-kpi-number-gWYF44ol.js +0 -322
- package/dist/client/chunks/chart-kpi-number-gWYF44ol.js.map +0 -1
- package/dist/client/chunks/chart-kpi-text-DIYtJtk4.js +0 -149
- package/dist/client/chunks/chart-kpi-text-DIYtJtk4.js.map +0 -1
- package/dist/client/chunks/chart-line-9BEGN5Ti.js +0 -433
- package/dist/client/chunks/chart-line-9BEGN5Ti.js.map +0 -1
- package/dist/client/chunks/chart-pie-BjAIhyOi.js +0 -172
- package/dist/client/chunks/chart-pie-BjAIhyOi.js.map +0 -1
- package/dist/client/chunks/chart-radar-Dgkcl2bN.js +0 -154
- package/dist/client/chunks/chart-radar-Dgkcl2bN.js.map +0 -1
- package/dist/client/chunks/chart-radial-bar-DdWJjAhK.js +0 -148
- package/dist/client/chunks/chart-radial-bar-DdWJjAhK.js.map +0 -1
- package/dist/client/chunks/chart-scatter-DaHYP_OL.js +0 -255
- package/dist/client/chunks/chart-scatter-DaHYP_OL.js.map +0 -1
- package/dist/client/chunks/chart-tree-map-uiwUU4nb.js +0 -298
- package/dist/client/chunks/chart-tree-map-uiwUU4nb.js.map +0 -1
- package/dist/client/chunks/useDirtyStateTracking-CoeQbprt.js.map +0 -1
- package/dist/server/google-DUlXeeDA.cjs +0 -2
- package/dist/server/openai-D_U4V0kT.cjs +0 -1
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { GridCell, GridMapping } from './ActivityGridChart.helpers';
|
|
2
|
+
import { ColorPalette } from '../../types';
|
|
3
|
+
import { ChartDataPointClickEvent } from '../../types/drill';
|
|
4
|
+
export interface ActivityGridSafeConfig {
|
|
5
|
+
showTooltip: boolean;
|
|
6
|
+
showLabels: boolean;
|
|
7
|
+
fitToWidth: boolean;
|
|
8
|
+
}
|
|
9
|
+
export interface ActivityGridRenderContext {
|
|
10
|
+
svgEl: SVGSVGElement;
|
|
11
|
+
gridData: GridCell[];
|
|
12
|
+
gridMapping: GridMapping;
|
|
13
|
+
granularity: string;
|
|
14
|
+
dimensions: {
|
|
15
|
+
width: number;
|
|
16
|
+
height: number;
|
|
17
|
+
};
|
|
18
|
+
safeDisplayConfig: ActivityGridSafeConfig;
|
|
19
|
+
colorPalette?: ColorPalette;
|
|
20
|
+
isDark: boolean;
|
|
21
|
+
valueField: string;
|
|
22
|
+
dateField: string;
|
|
23
|
+
getFieldLabel: (field: string) => string;
|
|
24
|
+
drillEnabled?: boolean;
|
|
25
|
+
onDataPointClick?: (event: ChartDataPointClickEvent) => void;
|
|
26
|
+
}
|
|
27
|
+
/**
|
|
28
|
+
* Render the activity grid into the given SVG element. Returns a cleanup
|
|
29
|
+
* function removing the tooltip, or undefined when there is nothing to draw.
|
|
30
|
+
*/
|
|
31
|
+
export declare function renderActivityGrid(ctx: ActivityGridRenderContext): (() => void) | undefined;
|
|
@@ -29,7 +29,9 @@ interface MultiAxisFormatControlsProps {
|
|
|
29
29
|
};
|
|
30
30
|
}
|
|
31
31
|
/**
|
|
32
|
-
* Container component for multiple axis format controls
|
|
32
|
+
* Container component for multiple axis format controls. Each configured axis
|
|
33
|
+
* renders an `AxisFormatControls`; the per-axis entries are data-driven so the
|
|
34
|
+
* three branches collapse into a single map.
|
|
33
35
|
*/
|
|
34
36
|
export declare function MultiAxisFormatControls({ displayConfig, onChange, showAxes }: MultiAxisFormatControlsProps): import("react").JSX.Element;
|
|
35
37
|
export default AxisFormatControls;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { ChartDisplayConfig } from '../../types';
|
|
2
|
+
export interface StackMode {
|
|
3
|
+
shouldStack: boolean;
|
|
4
|
+
isPercentStack: boolean;
|
|
5
|
+
}
|
|
6
|
+
/** Derive stacking flags from `stackType` (new) or `stacked` (legacy). */
|
|
7
|
+
export declare function resolveStackMode(displayConfig: ChartDisplayConfig | undefined): StackMode;
|
|
8
|
+
/**
|
|
9
|
+
* Filter out rows where every series value is null, returning the kept rows and
|
|
10
|
+
* the number skipped (used to render the "N hidden" footer note).
|
|
11
|
+
*/
|
|
12
|
+
export declare function filterEmptyRows(transformedData: Record<string, any>[], seriesKeys: string[]): {
|
|
13
|
+
chartData: Record<string, any>[];
|
|
14
|
+
skippedCount: number;
|
|
15
|
+
};
|
|
16
|
+
export interface BarColoringMode {
|
|
17
|
+
/** Single series with mixed positive/negative values → green/red bars. */
|
|
18
|
+
usePositiveNegativeColoring: boolean;
|
|
19
|
+
/** Single measure, no series dimension, multiple categories → colour per category. */
|
|
20
|
+
useColorByCategory: boolean;
|
|
21
|
+
}
|
|
22
|
+
/** Decide which special per-bar colouring mode (if any) applies. */
|
|
23
|
+
export declare function resolveBarColoringMode(seriesKeys: string[], chartData: Record<string, any>[], seriesFieldsLength: number): BarColoringMode;
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
import { ColorPalette } from '../../types';
|
|
3
|
+
import { ChartDataPointClickEvent } from '../../types/drill';
|
|
4
|
+
interface BarSeriesProps {
|
|
5
|
+
seriesKey: string;
|
|
6
|
+
index: number;
|
|
7
|
+
/** Original field name backing this series key (for axis assignment + drill). */
|
|
8
|
+
originalField: string | undefined;
|
|
9
|
+
axisId: 'left' | 'right';
|
|
10
|
+
stackId: string | undefined;
|
|
11
|
+
chartData: Record<string, any>[];
|
|
12
|
+
enhancedChartData: Record<string, any>[];
|
|
13
|
+
colorPalette?: ColorPalette;
|
|
14
|
+
hoveredLegend: string | null;
|
|
15
|
+
usePositiveNegativeColoring: boolean;
|
|
16
|
+
useColorByCategory: boolean;
|
|
17
|
+
drillEnabled?: boolean;
|
|
18
|
+
onDataPointClick?: (event: ChartDataPointClickEvent) => void;
|
|
19
|
+
}
|
|
20
|
+
/**
|
|
21
|
+
* Single `<Bar>` for a series key.
|
|
22
|
+
*
|
|
23
|
+
* Encapsulates the per-bar colouring modes (positive/negative, colour-by-category)
|
|
24
|
+
* and the drill click handler that were previously inlined in BarChart's render.
|
|
25
|
+
* Returned as a fragment-bearing component so it can be used directly inside the
|
|
26
|
+
* Recharts `<ComposedChart>` children list. Behaviour is identical to the original.
|
|
27
|
+
*/
|
|
28
|
+
export declare function BarSeries({ seriesKey, index, originalField, axisId, stackId, chartData, enhancedChartData, colorPalette, hoveredLegend, usePositiveNegativeColoring, useColorByCategory, drillEnabled, onDataPointClick }: BarSeriesProps): React.JSX.Element;
|
|
29
|
+
export {};
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import { AxisFormatConfig, ChartAxisConfig, ChartDisplayConfig, CubeQuery } from '../../types';
|
|
2
|
+
export interface BubbleData {
|
|
3
|
+
x: number;
|
|
4
|
+
xLabel?: string;
|
|
5
|
+
y: number;
|
|
6
|
+
size: number;
|
|
7
|
+
color?: string | number;
|
|
8
|
+
label: string;
|
|
9
|
+
series?: string;
|
|
10
|
+
}
|
|
11
|
+
export interface BubbleDisplayOptions {
|
|
12
|
+
showLegend: boolean;
|
|
13
|
+
showGrid: boolean;
|
|
14
|
+
showTooltip: boolean;
|
|
15
|
+
minBubbleSize: number;
|
|
16
|
+
maxBubbleSize: number;
|
|
17
|
+
bubbleOpacity: number;
|
|
18
|
+
xAxisFormat?: AxisFormatConfig;
|
|
19
|
+
leftYAxisFormat?: AxisFormatConfig;
|
|
20
|
+
}
|
|
21
|
+
/** Resolve bubble display options with defaults from the display config. */
|
|
22
|
+
export declare function resolveBubbleDisplayOptions(displayConfig: ChartDisplayConfig | undefined): BubbleDisplayOptions;
|
|
23
|
+
export interface BubbleFields {
|
|
24
|
+
xAxisField: string;
|
|
25
|
+
yAxisField: string;
|
|
26
|
+
seriesField: string;
|
|
27
|
+
sizeFieldName: string;
|
|
28
|
+
colorFieldName?: string;
|
|
29
|
+
}
|
|
30
|
+
/** Resolve the bubble chart field names; returns null when required fields missing. */
|
|
31
|
+
export declare function resolveBubbleFields(chartConfig: ChartAxisConfig | undefined): BubbleFields | null;
|
|
32
|
+
/**
|
|
33
|
+
* Transform query rows into bubble data, filtering out points with invalid
|
|
34
|
+
* x/y coordinates or non-positive size. Mirrors the original inline map+filter.
|
|
35
|
+
*/
|
|
36
|
+
export declare function transformBubbleData(data: Record<string, any>[], fields: BubbleFields, queryObject: CubeQuery | undefined): BubbleData[];
|
|
37
|
+
/** Read a CSS custom property from the document root with a fallback. */
|
|
38
|
+
export declare function getThemeColor(varName: string, fallback: string): string;
|
|
39
|
+
/** Resolve text + grid colours for the current theme. */
|
|
40
|
+
export declare function resolveThemeColors(isDark: boolean): {
|
|
41
|
+
textColor: string;
|
|
42
|
+
gridColor: string;
|
|
43
|
+
};
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { BubbleData, BubbleDisplayOptions, BubbleFields } from './BubbleChart.helpers';
|
|
2
|
+
import { ColorPalette, CubeQuery } from '../../types';
|
|
3
|
+
export interface BubbleRenderContext {
|
|
4
|
+
svgEl: SVGSVGElement;
|
|
5
|
+
bubbleData: BubbleData[];
|
|
6
|
+
fields: BubbleFields;
|
|
7
|
+
options: BubbleDisplayOptions;
|
|
8
|
+
dimensions: {
|
|
9
|
+
width: number;
|
|
10
|
+
height: number;
|
|
11
|
+
};
|
|
12
|
+
queryObject: CubeQuery | undefined;
|
|
13
|
+
colorPalette?: ColorPalette;
|
|
14
|
+
isDark: boolean;
|
|
15
|
+
getFieldLabel: (field: string) => string;
|
|
16
|
+
}
|
|
17
|
+
/**
|
|
18
|
+
* Render the bubble chart into the given SVG element. Returns a cleanup function
|
|
19
|
+
* that removes the floating tooltip. Returns undefined when there is nothing to draw.
|
|
20
|
+
*/
|
|
21
|
+
export declare function renderBubbleChart(ctx: BubbleRenderContext): (() => void) | undefined;
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
/**
|
|
3
|
+
* Shared guard/state components for chart rendering.
|
|
4
|
+
*
|
|
5
|
+
* Cartesian charts (bar, line, area, pie, …) all duplicated the same
|
|
6
|
+
* centred flex blocks for their empty / config-error / render-error states,
|
|
7
|
+
* differing only in the hint text. These components own the duplicated wrapper
|
|
8
|
+
* JSX; each chart supplies its own already-resolved `hint` (a translation key
|
|
9
|
+
* resolved via `t()`, or a literal string) so per-chart messaging is preserved.
|
|
10
|
+
*/
|
|
11
|
+
interface ChartStateProps {
|
|
12
|
+
height?: string | number;
|
|
13
|
+
/** Already-resolved hint text (caller resolves its own i18n key) */
|
|
14
|
+
hint?: React.ReactNode;
|
|
15
|
+
}
|
|
16
|
+
/**
|
|
17
|
+
* Empty / no-data state (muted styling). `titleKey` defaults to the generic
|
|
18
|
+
* "No data available" heading but can be overridden (e.g. for the post-transform
|
|
19
|
+
* "No valid data" state).
|
|
20
|
+
*/
|
|
21
|
+
export declare function ChartEmptyState({ height, hint, titleKey }: ChartStateProps & {
|
|
22
|
+
titleKey?: string;
|
|
23
|
+
}): React.JSX.Element;
|
|
24
|
+
/**
|
|
25
|
+
* Invalid-configuration state (warning styling). Title is always
|
|
26
|
+
* "Configuration Error"; the chart supplies a hint describing what is missing.
|
|
27
|
+
*/
|
|
28
|
+
export declare function ChartConfigError({ height, hint }: ChartStateProps): React.JSX.Element;
|
|
29
|
+
/**
|
|
30
|
+
* Render-error state (error styling), used in chart `catch` blocks.
|
|
31
|
+
*/
|
|
32
|
+
export declare function ChartRenderError({ height, chartType, error }: {
|
|
33
|
+
height?: string | number;
|
|
34
|
+
/** Display name used in the "{chartType} Error" heading */
|
|
35
|
+
chartType: string;
|
|
36
|
+
error: unknown;
|
|
37
|
+
}): React.JSX.Element;
|
|
38
|
+
export {};
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { ChartDisplayConfig } from '../../types';
|
|
2
|
+
import { FunnelChartData } from '../../types/funnel';
|
|
3
|
+
/** Check if data is already in funnel data format. */
|
|
4
|
+
export declare function isFunnelData(data: unknown[]): data is FunnelChartData[];
|
|
5
|
+
/**
|
|
6
|
+
* Render time metrics based on config options - returns array of lines for
|
|
7
|
+
* vertical stacking.
|
|
8
|
+
*/
|
|
9
|
+
export declare function getTimeMetricsLines(step: FunnelChartData, showAvg: boolean, showMedian: boolean, showP90: boolean): string[];
|
|
10
|
+
/** Coerce arbitrary query rows into FunnelChartData by probing field names. */
|
|
11
|
+
export declare function toFunnelData(data: unknown[]): FunnelChartData[];
|
|
12
|
+
export interface FunnelDisplayOptions {
|
|
13
|
+
customStepLabels?: string[];
|
|
14
|
+
isVertical: boolean;
|
|
15
|
+
funnelStyle: NonNullable<ChartDisplayConfig['funnelStyle']>;
|
|
16
|
+
showConversion: boolean;
|
|
17
|
+
showAvgTime: boolean;
|
|
18
|
+
showMedianTime: boolean;
|
|
19
|
+
showP90Time: boolean;
|
|
20
|
+
hideSummaryFooter: boolean;
|
|
21
|
+
}
|
|
22
|
+
/** Resolve every funnel display option (with backward-compat for time metrics). */
|
|
23
|
+
export declare function resolveFunnelDisplayOptions(displayConfig: ChartDisplayConfig | undefined): FunnelDisplayOptions;
|
|
24
|
+
/** Color for a funnel step (cyclic over the palette or the default funnel gradient). */
|
|
25
|
+
export declare function getStepColor(index: number, colorPalette: string[]): string;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { FunnelChartData } from '../../types/funnel';
|
|
2
|
+
import { FunnelDisplayOptions } from './FunnelChart.helpers';
|
|
3
|
+
interface FunnelViewProps {
|
|
4
|
+
funnelData: FunnelChartData[];
|
|
5
|
+
firstStepValue: number;
|
|
6
|
+
paletteColors: string[];
|
|
7
|
+
options: FunnelDisplayOptions;
|
|
8
|
+
height: string | number;
|
|
9
|
+
}
|
|
10
|
+
/** Recharts trapezoid funnel style. */
|
|
11
|
+
export declare function FunnelShapeView({ funnelData, firstStepValue, paletteColors, options, height }: FunnelViewProps): import("react").JSX.Element;
|
|
12
|
+
/** Vertical bars (steps laid out horizontally, bars grow bottom-to-top). */
|
|
13
|
+
export declare function FunnelVerticalView({ funnelData, firstStepValue, paletteColors, options, height }: FunnelViewProps): import("react").JSX.Element;
|
|
14
|
+
/** Horizontal bars (default - steps stacked vertically, bars grow left-to-right). */
|
|
15
|
+
export declare function FunnelHorizontalView({ funnelData, firstStepValue, paletteColors, options, height }: FunnelViewProps): import("react").JSX.Element;
|
|
16
|
+
export {};
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { HeatMapDisplayOptions } from './HeatMapChart.helpers';
|
|
2
|
+
interface HeatMapDatum {
|
|
3
|
+
x: string;
|
|
4
|
+
y: number | null;
|
|
5
|
+
}
|
|
6
|
+
interface HeatMapSerie {
|
|
7
|
+
id: string;
|
|
8
|
+
data: HeatMapDatum[];
|
|
9
|
+
}
|
|
10
|
+
interface HeatMapCanvasProps {
|
|
11
|
+
data: HeatMapSerie[];
|
|
12
|
+
truncated: boolean;
|
|
13
|
+
colors: string[];
|
|
14
|
+
options: HeatMapDisplayOptions;
|
|
15
|
+
xAxisField: string;
|
|
16
|
+
yAxisField: string;
|
|
17
|
+
valueField: string;
|
|
18
|
+
}
|
|
19
|
+
/**
|
|
20
|
+
* The nivo `<ResponsiveHeatMap>` for HeatMapChart, with all axis/legend/colour
|
|
21
|
+
* config resolved from helpers. Extracted so the chart component stays a thin
|
|
22
|
+
* orchestrator. Behaviour matches the original inline JSX.
|
|
23
|
+
*/
|
|
24
|
+
export declare function HeatMapCanvas({ data, truncated, colors, options, xAxisField, yAxisField, valueField, }: HeatMapCanvasProps): import("react").JSX.Element;
|
|
25
|
+
export {};
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
import { AxisFormatConfig, ChartDisplayConfig } from '../../types';
|
|
2
|
+
/**
|
|
3
|
+
* Maximum dimensions for heatmap to prevent browser lockup. 50x50 = 2500 cells.
|
|
4
|
+
*/
|
|
5
|
+
export declare const MAX_HEATMAP_ROWS = 50;
|
|
6
|
+
export declare const MAX_HEATMAP_COLS = 50;
|
|
7
|
+
/** Parse color string (hex or rgb) to RGB values. */
|
|
8
|
+
export declare function parseColor(color: string): {
|
|
9
|
+
r: number;
|
|
10
|
+
g: number;
|
|
11
|
+
b: number;
|
|
12
|
+
} | null;
|
|
13
|
+
/** Relative luminance of a color (0 black .. 1 white) per WCAG. */
|
|
14
|
+
export declare function getLuminance(color: string): number;
|
|
15
|
+
/** Contrasting text color (white or dark) based on a background color. */
|
|
16
|
+
export declare function getContrastingTextColor(bgColor: string): string;
|
|
17
|
+
interface HeatMapDatum {
|
|
18
|
+
x: string;
|
|
19
|
+
y: number | null;
|
|
20
|
+
}
|
|
21
|
+
interface HeatMapSerie {
|
|
22
|
+
id: string;
|
|
23
|
+
data: HeatMapDatum[];
|
|
24
|
+
}
|
|
25
|
+
export interface HeatMapTransformResult {
|
|
26
|
+
data: HeatMapSerie[];
|
|
27
|
+
truncated: boolean;
|
|
28
|
+
originalRows: number;
|
|
29
|
+
originalCols: number;
|
|
30
|
+
}
|
|
31
|
+
/**
|
|
32
|
+
* Transform drizzle-cube flat query results to nivo heatmap format.
|
|
33
|
+
*
|
|
34
|
+
* Groups rows by the Y dimension, sorts X chronologically when possible, and
|
|
35
|
+
* truncates to MAX_HEATMAP_ROWS x MAX_HEATMAP_COLS to prevent browser lockup.
|
|
36
|
+
*/
|
|
37
|
+
export declare function transformToHeatMapFormat(data: Record<string, unknown>[], xAxisField: string | undefined, yAxisField: string | undefined, valueField: string | undefined, xGranularity?: string, yGranularity?: string): HeatMapTransformResult;
|
|
38
|
+
/** Coerce an axis config value (string | array | undefined) to a single field. */
|
|
39
|
+
export declare function firstField(value: string | string[] | undefined): string | undefined;
|
|
40
|
+
export interface HeatMapDisplayOptions {
|
|
41
|
+
showLabels: boolean;
|
|
42
|
+
cellShape: 'rect' | 'circle';
|
|
43
|
+
showLegend: boolean;
|
|
44
|
+
xAxisFormat?: AxisFormatConfig;
|
|
45
|
+
yAxisFormat?: AxisFormatConfig;
|
|
46
|
+
valueFormat?: AxisFormatConfig;
|
|
47
|
+
}
|
|
48
|
+
/** Resolve heatmap display options from the (loosely-typed) display config. */
|
|
49
|
+
export declare function resolveHeatMapDisplayOptions(displayConfig: ChartDisplayConfig | undefined): HeatMapDisplayOptions;
|
|
50
|
+
/** Build an axis `format` fn that applies the given axis format config (or none). */
|
|
51
|
+
export declare function makeAxisFormatter(format: AxisFormatConfig | undefined): ((v: string | number) => string) | undefined;
|
|
52
|
+
/** Resolve the heatmap value formatter (custom format or nivo default). */
|
|
53
|
+
export declare function makeValueFormatter(valueFormat: AxisFormatConfig | undefined): ((v: number) => string) | string;
|
|
54
|
+
/** Sequential colours config for nivo; falls back to a built-in scheme. */
|
|
55
|
+
export declare function resolveHeatMapColors(colors: string[]): {
|
|
56
|
+
type: 'sequential';
|
|
57
|
+
colors: [string, string];
|
|
58
|
+
} | {
|
|
59
|
+
type: 'sequential';
|
|
60
|
+
scheme: 'greens';
|
|
61
|
+
};
|
|
62
|
+
/** Default sequential blue gradient when no palette gradient is supplied. */
|
|
63
|
+
export declare const DEFAULT_HEATMAP_COLORS: string[];
|
|
64
|
+
export {};
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { ChartAxisConfig } from '../../types';
|
|
2
|
+
/** Coerce a config axis value (string | array | undefined) to a field list. */
|
|
3
|
+
export declare function toFieldList(axis: ChartAxisConfig['yAxis']): string[];
|
|
4
|
+
/** Sort rows ascending by the dimension field (stable when absent). */
|
|
5
|
+
export declare function sortByDimension<T extends Record<string, any>>(data: T[], dimensionField: string | undefined): T[];
|
|
6
|
+
/** Extract finite numeric values for a field. */
|
|
7
|
+
export declare function extractNumericValues(rows: Record<string, any>[], valueField: string): number[];
|
|
8
|
+
export interface DeltaStats {
|
|
9
|
+
lastValue: number;
|
|
10
|
+
absoluteChange: number;
|
|
11
|
+
percentageChange: number;
|
|
12
|
+
isPositiveChange: boolean;
|
|
13
|
+
}
|
|
14
|
+
/** Compute last value + delta vs the previous value. Requires >= 2 values. */
|
|
15
|
+
export declare function computeDelta(values: number[]): DeltaStats;
|
|
16
|
+
/**
|
|
17
|
+
* Resolve a palette colour by index, falling back to a default. Used for both
|
|
18
|
+
* the positive and negative delta colours.
|
|
19
|
+
*/
|
|
20
|
+
export declare function resolvePaletteColor(colorIndex: number | undefined, colors: string[] | undefined, fallback: string): string;
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { ChartAxisConfig, ChartDisplayConfig } from '../../types';
|
|
2
|
+
/** Extract the value field list from chart config (string | array | undefined). */
|
|
3
|
+
export declare function getKpiValueFields(yAxis: ChartAxisConfig['yAxis']): string[];
|
|
4
|
+
/** Sort rows ascending by the time-dimension field (stable when absent). */
|
|
5
|
+
export declare function sortKpiData<T extends Record<string, any>>(data: T[] | undefined, timeDimensionField: string | undefined): T[];
|
|
6
|
+
/**
|
|
7
|
+
* Extract numeric values for the configured field, falling back to the first
|
|
8
|
+
* numeric field on each row when the configured field is absent.
|
|
9
|
+
*/
|
|
10
|
+
export declare function extractKpiValues(dataToUse: Record<string, any>[], valueField: string): number[];
|
|
11
|
+
/** Compute avg/min/max over a numeric series (0s when empty). */
|
|
12
|
+
export declare function computeKpiStats(values: number[]): {
|
|
13
|
+
avg: number;
|
|
14
|
+
min: number;
|
|
15
|
+
max: number;
|
|
16
|
+
};
|
|
17
|
+
/**
|
|
18
|
+
* Format a numeric KPI value with thousands/millions/billions suffixes,
|
|
19
|
+
* honouring a custom `formatValue`, `decimals` and `prefix` from displayConfig.
|
|
20
|
+
*/
|
|
21
|
+
export declare function formatKpiNumber(value: number | null | undefined, displayConfig: ChartDisplayConfig): string;
|
|
22
|
+
/**
|
|
23
|
+
* Resolve the label to display for a KPI field: prefer the resolved field label,
|
|
24
|
+
* but fall back to the raw field name when the label looks empty/too short.
|
|
25
|
+
*/
|
|
26
|
+
export declare function resolveDisplayLabel(label: string | undefined, fieldName: string): string;
|
|
27
|
+
/** Resolve the main value colour from the palette / displayConfig overrides. */
|
|
28
|
+
export declare function resolveValueColor(valueColorIndex: number | undefined, colors: string[] | undefined): string;
|
|
29
|
+
/** Resolve the variance colour (green/red based on sign), with palette overrides. */
|
|
30
|
+
export declare function resolveVarianceColor(variance: number | null, positiveColorIndex: number | undefined, negativeColorIndex: number | undefined, colors: string[] | undefined): string;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
type KpiStateVariant = 'muted' | 'danger' | 'warning';
|
|
3
|
+
/** Resolve the shared `height`/`minHeight` style used by every KPI card state. */
|
|
4
|
+
export declare function kpiHeightStyle(height: string | number): React.CSSProperties;
|
|
5
|
+
/**
|
|
6
|
+
* Centred KPI state card (no-data / config-error / insufficient-data).
|
|
7
|
+
*
|
|
8
|
+
* Owns the duplicated centred flex wrapper shared by KpiNumber and KpiDelta.
|
|
9
|
+
* Callers supply already-resolved title/hint text (i18n resolved at the call
|
|
10
|
+
* site) plus an optional colour variant and extra children.
|
|
11
|
+
*/
|
|
12
|
+
export declare function KpiCenteredState({ height, title, hint, variant, children }: {
|
|
13
|
+
height: string | number;
|
|
14
|
+
title: React.ReactNode;
|
|
15
|
+
hint?: React.ReactNode;
|
|
16
|
+
variant?: KpiStateVariant;
|
|
17
|
+
children?: React.ReactNode;
|
|
18
|
+
}): React.JSX.Element;
|
|
19
|
+
export {};
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import { CHART_MARGINS } from '../../utils/chartConstants';
|
|
2
|
+
import { AxisFormatConfig, ChartAxisConfig, ChartDisplayConfig, CubeQuery } from '../../types';
|
|
3
|
+
export interface ScatterRenderState {
|
|
4
|
+
showLegend: boolean;
|
|
5
|
+
showGrid: boolean;
|
|
6
|
+
showTooltip: boolean;
|
|
7
|
+
/** Whether to render one Scatter per series group vs a single series. */
|
|
8
|
+
hasSeries: boolean;
|
|
9
|
+
xAxisFormat?: AxisFormatConfig;
|
|
10
|
+
/** For scatter charts the y-axis uses the left-axis format config. */
|
|
11
|
+
yAxisFormat?: AxisFormatConfig;
|
|
12
|
+
chartMargins: typeof CHART_MARGINS;
|
|
13
|
+
}
|
|
14
|
+
/**
|
|
15
|
+
* Resolve all render-time display flags, axis formats and margins for the
|
|
16
|
+
* scatter chart from the display config and the transformed series keys.
|
|
17
|
+
*/
|
|
18
|
+
export declare function resolveScatterRenderState(displayConfig: ChartDisplayConfig | undefined, seriesKeys: string[]): ScatterRenderState;
|
|
19
|
+
export interface ScatterAxisFields {
|
|
20
|
+
xAxisField: string;
|
|
21
|
+
yAxisField: string;
|
|
22
|
+
seriesFields: string[];
|
|
23
|
+
/** Set when the config is invalid (no usable axis fields). */
|
|
24
|
+
errorCode?: 'axisInvalid' | 'axisFields';
|
|
25
|
+
}
|
|
26
|
+
/** Resolve x/y/series fields supporting both the new and legacy config shapes. */
|
|
27
|
+
export declare function resolveScatterAxisFields(chartConfig: ChartAxisConfig | undefined): ScatterAxisFields;
|
|
28
|
+
export interface ScatterPoint {
|
|
29
|
+
x: number;
|
|
30
|
+
y: number;
|
|
31
|
+
name: string;
|
|
32
|
+
timeValues: Record<string, string>;
|
|
33
|
+
originalItem: Record<string, any>;
|
|
34
|
+
}
|
|
35
|
+
export interface ScatterTransform {
|
|
36
|
+
scatterData: ScatterPoint[];
|
|
37
|
+
seriesGroups: Record<string, ScatterPoint[]>;
|
|
38
|
+
}
|
|
39
|
+
/**
|
|
40
|
+
* Transform rows into scatter points, grouping by series when configured.
|
|
41
|
+
* Null x/y coordinates are filtered out. Mirrors the original two-branch logic.
|
|
42
|
+
*/
|
|
43
|
+
export declare function transformScatterData(data: Record<string, any>[], xAxisField: string, yAxisField: string, seriesFields: string[], timeDimensionFields: string[], queryObject: CubeQuery | undefined): ScatterTransform;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { ColorPalette } from '../../types';
|
|
2
|
+
import { ScatterPoint } from './ScatterChart.helpers';
|
|
3
|
+
interface ScatterSeriesProps {
|
|
4
|
+
hasSeries: boolean;
|
|
5
|
+
seriesKeys: string[];
|
|
6
|
+
seriesGroups: Record<string, ScatterPoint[]>;
|
|
7
|
+
scatterData: ScatterPoint[];
|
|
8
|
+
colorPalette?: ColorPalette;
|
|
9
|
+
hoveredLegend: string | null;
|
|
10
|
+
}
|
|
11
|
+
/**
|
|
12
|
+
* Renders the `<Scatter>` series for ScatterChart — one per series group when
|
|
13
|
+
* `hasSeries`, otherwise a single series. Returned as a fragment so it composes
|
|
14
|
+
* inside the Recharts chart children. Behaviour matches the original inline JSX.
|
|
15
|
+
*/
|
|
16
|
+
export declare function ScatterSeries({ hasSeries, seriesKeys, seriesGroups, scatterData, colorPalette, hoveredLegend }: ScatterSeriesProps): import("react").JSX.Element;
|
|
17
|
+
export {};
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { AxisFormatConfig } from '../../types';
|
|
2
|
+
import { ScatterPoint } from './ScatterChart.helpers';
|
|
3
|
+
interface ScatterTooltipProps {
|
|
4
|
+
active?: boolean;
|
|
5
|
+
payload?: Array<{
|
|
6
|
+
payload?: ScatterPoint;
|
|
7
|
+
}>;
|
|
8
|
+
xAxisField: string;
|
|
9
|
+
yAxisField: string;
|
|
10
|
+
xAxisFormat?: AxisFormatConfig;
|
|
11
|
+
yAxisFormat?: AxisFormatConfig;
|
|
12
|
+
getFieldLabel: (field: string) => string;
|
|
13
|
+
}
|
|
14
|
+
/**
|
|
15
|
+
* Custom Recharts tooltip content for ScatterChart.
|
|
16
|
+
*
|
|
17
|
+
* Extracted from the inline `content` render prop to keep the chart body lean.
|
|
18
|
+
* Renders the point name, any time-dimension values, and the formatted x/y.
|
|
19
|
+
*/
|
|
20
|
+
export declare function ScatterTooltip({ active, payload, xAxisField, yAxisField, xAxisFormat, yAxisFormat, getFieldLabel }: ScatterTooltipProps): import("react").JSX.Element | null;
|
|
21
|
+
export {};
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { AxisFormatConfig, ChartAxisConfig, ColorPalette, CubeQuery } from '../../types';
|
|
2
|
+
export interface TreemapDatum {
|
|
3
|
+
name: string;
|
|
4
|
+
size: number;
|
|
5
|
+
fill?: string;
|
|
6
|
+
series?: string;
|
|
7
|
+
[key: string]: unknown;
|
|
8
|
+
}
|
|
9
|
+
export interface TreemapBuildResult {
|
|
10
|
+
treemapData: TreemapDatum[];
|
|
11
|
+
isNumericSeries: boolean;
|
|
12
|
+
seriesField?: string;
|
|
13
|
+
}
|
|
14
|
+
/**
|
|
15
|
+
* Build treemap data (config or auto-detect), then drop non-positive sizes.
|
|
16
|
+
* Returns `null` when the legacy path can't find a usable size field.
|
|
17
|
+
*/
|
|
18
|
+
export declare function buildTreemapData(data: Record<string, any>[], chartConfig: ChartAxisConfig | undefined, queryObject: CubeQuery | undefined, colorPalette: ColorPalette | undefined): TreemapBuildResult | null;
|
|
19
|
+
/** Min/max of the (numeric) series field across the raw rows. */
|
|
20
|
+
export declare function seriesMinMax(data: Record<string, any>[], seriesField: string): {
|
|
21
|
+
min: number;
|
|
22
|
+
max: number;
|
|
23
|
+
};
|
|
24
|
+
/** Format a numeric value with the optional axis format (or `.toFixed(2)`). */
|
|
25
|
+
export declare function formatSeriesValue(value: number, format: AxisFormatConfig | undefined): string;
|
|
26
|
+
export interface LegendEntry {
|
|
27
|
+
value: string;
|
|
28
|
+
type: 'rect';
|
|
29
|
+
color: string;
|
|
30
|
+
}
|
|
31
|
+
/**
|
|
32
|
+
* Build the legend entries for the treemap: a gradient ramp for numeric series,
|
|
33
|
+
* or discrete swatches for categorical series. Empty when not applicable.
|
|
34
|
+
*/
|
|
35
|
+
export declare function buildTreemapLegend(data: Record<string, any>[], treemapData: TreemapDatum[], showLegend: boolean, seriesField: string | undefined, isNumericSeries: boolean, leftYAxisFormat: AxisFormatConfig | undefined): LegendEntry[];
|
|
36
|
+
/** Adjust the outer container height to make room for a legend, if present. */
|
|
37
|
+
export declare function adjustHeightForLegend(height: string | number, hasLegend: boolean): string | number;
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
import { AxisFormatConfig, ChartAxisConfig, ColorPalette, CubeQuery } from '../../types';
|
|
3
|
+
import { ChartDataPointClickEvent } from '../../types/drill';
|
|
4
|
+
import { TreemapDatum } from './TreeMapChart.helpers';
|
|
5
|
+
interface TreeMapContentOptions {
|
|
6
|
+
treemapData: TreemapDatum[];
|
|
7
|
+
colorPalette?: ColorPalette;
|
|
8
|
+
hoveredIndex: number | null;
|
|
9
|
+
setHoveredIndex: (index: number | null) => void;
|
|
10
|
+
leftYAxisFormat?: AxisFormatConfig;
|
|
11
|
+
drillEnabled?: boolean;
|
|
12
|
+
onDataPointClick?: (event: ChartDataPointClickEvent) => void;
|
|
13
|
+
queryObject?: CubeQuery;
|
|
14
|
+
chartConfig?: ChartAxisConfig;
|
|
15
|
+
}
|
|
16
|
+
/**
|
|
17
|
+
* Build the Recharts `content` renderer for treemap cells.
|
|
18
|
+
*
|
|
19
|
+
* Encapsulates the per-cell rect + foreignObject overlay, hover state and drill
|
|
20
|
+
* click handler that previously lived inline in TreeMapChart (the highest-
|
|
21
|
+
* complexity hot spots). Behaviour is identical to the original.
|
|
22
|
+
*/
|
|
23
|
+
export declare function makeTreeMapContent({ treemapData, colorPalette, hoveredIndex, setHoveredIndex, leftYAxisFormat, drillEnabled, onDataPointClick, queryObject, chartConfig, }: TreeMapContentOptions): (props: any) => React.JSX.Element | null;
|
|
24
|
+
export {};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { AxisFormatConfig } from '../../types';
|
|
2
|
+
import { LegendEntry } from './TreeMapChart.helpers';
|
|
3
|
+
interface TreeMapLegendProps {
|
|
4
|
+
isNumericSeries: boolean;
|
|
5
|
+
seriesField?: string;
|
|
6
|
+
seriesLabel: string;
|
|
7
|
+
legendPayload: LegendEntry[];
|
|
8
|
+
data: Record<string, any>[];
|
|
9
|
+
leftYAxisFormat?: AxisFormatConfig;
|
|
10
|
+
}
|
|
11
|
+
/** Treemap legend wrapper — gradient for numeric series, swatches otherwise. */
|
|
12
|
+
export declare function TreeMapLegend({ isNumericSeries, seriesField, seriesLabel, legendPayload, data, leftYAxisFormat, }: TreeMapLegendProps): import("react").JSX.Element;
|
|
13
|
+
export {};
|