drizzle-cube 0.7.1 → 0.8.1
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-DXUUgx0N.cjs +1 -0
- package/dist/adapters/ActivityGridChart.config-Dyozu3VW.js +2 -0
- package/dist/adapters/AreaChart.config-Di5odBXp.cjs +1 -0
- package/dist/adapters/AreaChart.config-KEaXP_4K.js +2 -0
- package/dist/adapters/BarChart.config-B-hBHykR.cjs +1 -0
- package/dist/adapters/BarChart.config-C5sqbn0A.js +2 -0
- package/dist/adapters/BoxPlotChart.config-B1R4Br7L.js +2 -0
- package/dist/adapters/BoxPlotChart.config-C82Fhd3c.cjs +1 -0
- package/dist/adapters/BubbleChart.config-CoBxmmfp.js +2 -0
- package/dist/adapters/BubbleChart.config-DfOnNjL-.cjs +1 -0
- package/dist/adapters/CandlestickChart.config-C5ggV_3j.cjs +1 -0
- package/dist/adapters/CandlestickChart.config-ZaJpWVuL.js +2 -0
- package/dist/adapters/DataTable.config-Cx2_ACdY.cjs +1 -0
- package/dist/adapters/DataTable.config-DkAgD-iz.js +2 -0
- package/dist/adapters/FunnelChart.config-CvzcECUB.js +2 -0
- package/dist/adapters/FunnelChart.config-DVH7IFnb.cjs +1 -0
- package/dist/adapters/GaugeChart.config-Csx8rt8o.cjs +1 -0
- package/dist/adapters/GaugeChart.config-DEmrNgMa.js +2 -0
- package/dist/adapters/HeatMapChart.config-BfD_dpP7.js +2 -0
- package/dist/adapters/HeatMapChart.config-D_jlyPJL.cjs +1 -0
- package/dist/adapters/KpiDelta.config-CVBdUL_n.cjs +1 -0
- package/dist/adapters/KpiDelta.config-D4dCXOxl.js +2 -0
- package/dist/adapters/KpiNumber.config-BK5pgIKz.cjs +1 -0
- package/dist/adapters/KpiNumber.config-D6XqjZrm.js +2 -0
- package/dist/adapters/KpiText.config-ChphMwG5.js +2 -0
- package/dist/adapters/KpiText.config-fO1wc6FH.cjs +1 -0
- package/dist/adapters/LineChart.config-CXJrgz1s.js +2 -0
- package/dist/adapters/LineChart.config-Cg_h-SiJ.cjs +1 -0
- package/dist/adapters/MarkdownChart.config-ByPjX-4O.cjs +1 -0
- package/dist/adapters/MarkdownChart.config-Df2yY9AT.js +2 -0
- package/dist/adapters/MeasureProfileChart.config-BBWGIteF.cjs +1 -0
- package/dist/adapters/MeasureProfileChart.config-C9OFbN9Z.js +2 -0
- package/dist/adapters/PieChart.config-C6jJj6xm.js +2 -0
- package/dist/adapters/PieChart.config-CmCw_8eN.cjs +1 -0
- package/dist/adapters/ProportionBarChart.config-B9NEyFEe.js +2 -0
- package/dist/adapters/ProportionBarChart.config-C3GAVPWn.cjs +1 -0
- package/dist/adapters/RadarChart.config-5AMwEqUJ.cjs +1 -0
- package/dist/adapters/RadarChart.config-Ct_b7IM5.js +2 -0
- package/dist/adapters/RadialBarChart.config-Bp-Sl0cm.js +2 -0
- package/dist/adapters/RadialBarChart.config-D14yoexI.cjs +1 -0
- package/dist/adapters/RecordsTable.config-D2-qmG06.cjs +1 -0
- package/dist/adapters/RecordsTable.config-DIwoqZCU.js +2 -0
- package/dist/adapters/RetentionCombinedChart.config-BWHipi5M.cjs +1 -0
- package/dist/adapters/RetentionCombinedChart.config-D40UgTcl.js +2 -0
- package/dist/adapters/RetentionHeatmap.config-GlnSLrjn.js +2 -0
- package/dist/adapters/RetentionHeatmap.config-MlhZf26c.cjs +1 -0
- package/dist/adapters/SankeyChart.config-Bf1_NHiv.js +2 -0
- package/dist/adapters/SankeyChart.config-BoYf6BFE.cjs +1 -0
- package/dist/adapters/ScatterChart.config-CV2rdGJp.js +2 -0
- package/dist/adapters/ScatterChart.config-DywduGF3.cjs +1 -0
- package/dist/adapters/SunburstChart.config-CrqiE1UZ.js +2 -0
- package/dist/adapters/SunburstChart.config-D5tbF_GJ.cjs +1 -0
- package/dist/adapters/TreeMapChart.config-BJ8HnZU0.cjs +1 -0
- package/dist/adapters/TreeMapChart.config-DxgIqIIj.js +2 -0
- package/dist/adapters/WaterfallChart.config-Cns8fLFu.js +2 -0
- package/dist/adapters/WaterfallChart.config-D_kdL9SN.cjs +1 -0
- package/dist/adapters/compiler-BxZHh0UD.cjs +166 -0
- package/dist/adapters/{compiler-DiYxWAKg.js → compiler-CBGD_4Et.js} +1389 -1923
- package/dist/adapters/core/http-port.d.ts +34 -7
- package/dist/adapters/core/index.cjs +1 -1
- package/dist/adapters/core/index.d.ts +1 -0
- package/dist/adapters/core/index.js +2 -2
- package/dist/adapters/core/rest-handlers.d.ts +1 -1
- package/dist/adapters/core-CIGuwGuI.cjs +1 -0
- package/dist/adapters/{core-BOPRmxPc.js → core-DAAnqPyN.js} +81 -65
- package/dist/adapters/express/index.cjs +2 -2
- package/dist/adapters/express/index.d.ts +11 -2
- package/dist/adapters/express/index.js +14 -14
- package/dist/adapters/fastify/index.cjs +2 -2
- package/dist/adapters/fastify/index.d.ts +11 -2
- package/dist/adapters/fastify/index.js +29 -29
- package/dist/{server/google-eKAc20al.js → adapters/google-DRY7jnOh.js} +46 -28
- package/dist/adapters/{google-BhvizbFR.cjs → google-PsZzwedr.cjs} +2 -2
- package/dist/adapters/handler-BcYTw6zB.cjs +25 -0
- package/dist/adapters/{handler-DGud-C-w.js → handler-eA0VJDHj.js} +363 -266
- package/dist/adapters/hono/index.cjs +1 -1
- package/dist/adapters/hono/index.js +9 -9
- package/dist/adapters/mcp-tools-handlers.d.ts +10 -3
- package/dist/adapters/mcp-tools.cjs +1 -1
- package/dist/adapters/mcp-tools.js +18 -20
- package/dist/adapters/mcp-transport-BpG44Fvn.js +730 -0
- package/dist/adapters/mcp-transport-CDxZXpc-.cjs +42 -0
- package/dist/adapters/mcp-transport.d.ts +13 -2
- package/dist/adapters/nextjs/index.cjs +1 -1
- package/dist/adapters/nextjs/index.d.ts +5 -2
- package/dist/adapters/nextjs/index.js +32 -32
- package/dist/adapters/{openai-Crp3X_zg.js → openai-BZ48ioYp.js} +1 -1
- package/dist/adapters/{openai-CmdN7Sj1.cjs → openai-Bw1j-OiP.cjs} +1 -1
- package/dist/adapters/{openai-Dwt9bxOE.cjs → openai-CLjyL5_J.cjs} +2 -2
- package/dist/adapters/{openai-CGJM6Qun.js → openai-CYYjUG_3.js} +4 -4
- package/dist/adapters/{utils-DboNUT3A.js → utils-BagURNRb.js} +1963 -1135
- package/dist/adapters/utils-BiKIg2tk.cjs +128 -0
- package/dist/adapters/utils.cjs +1 -1
- package/dist/adapters/utils.d.ts +19 -5
- package/dist/adapters/utils.js +1 -1
- package/dist/cjs/adapters/core/http-port.d.ts +34 -7
- package/dist/cjs/adapters/core/index.d.ts +1 -0
- package/dist/cjs/adapters/core/rest-handlers.d.ts +1 -1
- package/dist/cjs/adapters/express/index.d.ts +11 -2
- package/dist/cjs/adapters/fastify/index.d.ts +11 -2
- package/dist/cjs/adapters/mcp-tools-handlers.d.ts +10 -3
- package/dist/cjs/adapters/mcp-transport.d.ts +13 -2
- package/dist/cjs/adapters/nextjs/index.d.ts +5 -2
- package/dist/cjs/adapters/utils.d.ts +19 -5
- package/dist/cjs/client/charts/chartConfigRegistry.d.ts +7 -0
- package/dist/cjs/client/charts/chartConfigs.d.ts +17 -1
- package/dist/cjs/client/client/CubeClient.d.ts +11 -1
- package/dist/cjs/client/components/AnalysisBuilder/AnalysisDisplayConfigPanel.d.ts +4 -2
- package/dist/cjs/client/components/AnalysisBuilder/ColumnFormatsEditor.d.ts +10 -0
- package/dist/cjs/client/components/AnalysisBuilder/DisplayOptionControl.d.ts +3 -2
- package/dist/cjs/client/components/AnalysisBuilder/utils/queryUtils.d.ts +7 -1
- package/dist/cjs/client/components/analyticsPortlet/PortletChart.d.ts +2 -1
- package/dist/cjs/client/components/analyticsPortlet/PortletChartView.d.ts +4 -1
- package/dist/cjs/client/components/analyticsPortlet/usePortletDeadMembers.d.ts +24 -0
- package/dist/cjs/client/components/analyticsPortlet/usePortletPagination.d.ts +21 -0
- package/dist/cjs/client/components/charts/RecordsTable.config.d.ts +10 -0
- package/dist/cjs/client/components/charts/RecordsTable.d.ts +4 -0
- package/dist/cjs/client/components/charts/recordsTableHooks.d.ts +68 -0
- package/dist/cjs/client/icons/types.d.ts +1 -0
- package/dist/cjs/client/index.d.ts +2 -2
- package/dist/cjs/client/types.d.ts +92 -1
- package/dist/cjs/client/utils/recordsTableUtils.d.ts +71 -0
- package/dist/cjs/client/utils/rowLinkUtils.d.ts +35 -0
- package/dist/cjs/server/adapters/base-adapter.d.ts +46 -0
- package/dist/cjs/server/adapters/databend-adapter.d.ts +5 -0
- package/dist/cjs/server/adapters/duckdb-adapter.d.ts +5 -0
- package/dist/cjs/server/adapters/mysql-adapter.d.ts +14 -0
- package/dist/cjs/server/adapters/postgres-adapter.d.ts +15 -0
- package/dist/cjs/server/adapters/snowflake-adapter.d.ts +6 -0
- package/dist/cjs/server/adapters/sqlite-adapter.d.ts +21 -0
- package/dist/cjs/server/agent/chart-validation.d.ts +1 -1
- package/dist/cjs/server/ai/chart-schema.d.ts +117 -0
- package/dist/cjs/server/ai/discovery-helpers.d.ts +14 -0
- package/dist/cjs/server/ai/discovery.d.ts +6 -0
- package/dist/cjs/server/ai/query-schema.d.ts +1 -1
- package/dist/cjs/server/attribute-dimensions.d.ts +102 -0
- package/dist/cjs/server/builders/group-by-builder.d.ts +15 -0
- package/dist/cjs/server/cache-utils.d.ts +5 -1
- package/dist/cjs/server/compiler-metadata.d.ts +24 -3
- package/dist/cjs/server/compiler.d.ts +159 -13
- package/dist/cjs/server/execution/query-result-cache.d.ts +1 -1
- package/dist/cjs/server/executor.d.ts +15 -0
- package/dist/cjs/server/index.d.ts +13 -3
- package/dist/cjs/server/query-handlers.d.ts +2 -1
- package/dist/cjs/server/query-validator.d.ts +36 -4
- package/dist/cjs/server/types/core.d.ts +13 -0
- package/dist/cjs/server/types/cube.d.ts +39 -2
- package/dist/cjs/server/types/query.d.ts +8 -0
- package/dist/cli/index.cjs +130 -52
- package/dist/client/charts/chartConfigRegistry.d.ts +7 -0
- package/dist/client/charts/chartConfigs.d.ts +17 -1
- package/dist/client/charts.js +13 -13
- package/dist/client/chunks/{DashboardEditModal-BOfLdTgV.js → DashboardEditModal-_ZDMwaGX.js} +1653 -1188
- package/dist/client/chunks/DashboardEditModal-_ZDMwaGX.js.map +1 -0
- package/dist/client/chunks/{ProportionBarChart-DwoXU5VP.js → ProportionBarChart-qfpAWhIg.js} +3 -3
- package/dist/client/chunks/{ProportionBarChart-DwoXU5VP.js.map → ProportionBarChart-qfpAWhIg.js.map} +1 -1
- package/dist/client/chunks/RecordsTable-KmJy94xN.js +556 -0
- package/dist/client/chunks/RecordsTable-KmJy94xN.js.map +1 -0
- package/dist/client/chunks/{RetentionCombinedChart-BqlSV7yF.js → RetentionCombinedChart-C7X6aj97.js} +3 -3
- package/dist/client/chunks/{RetentionCombinedChart-BqlSV7yF.js.map → RetentionCombinedChart-C7X6aj97.js.map} +1 -1
- package/dist/client/chunks/{RetentionHeatmap-VdVkBg8Q.js → RetentionHeatmap-PpRpiqR_.js} +2 -2
- package/dist/client/chunks/{RetentionHeatmap-VdVkBg8Q.js.map → RetentionHeatmap-PpRpiqR_.js.map} +1 -1
- package/dist/client/chunks/{analysis-builder-DXw60SEs.js → analysis-builder-DaqyOjLX.js} +169 -168
- package/dist/client/chunks/{analysis-builder-DXw60SEs.js.map → analysis-builder-DaqyOjLX.js.map} +1 -1
- package/dist/client/chunks/{analysis-builder-shared-CEvHIlmk.js → analysis-builder-shared-ow9KAHDP.js} +965 -954
- package/dist/client/chunks/analysis-builder-shared-ow9KAHDP.js.map +1 -0
- package/dist/client/chunks/{chart-activity-grid-4jfS8khG.js → chart-activity-grid-DO82rrbW.js} +140 -84
- package/dist/client/chunks/chart-activity-grid-DO82rrbW.js.map +1 -0
- package/dist/client/chunks/{chart-area-Dol6s9no.js → chart-area-9SBeG0GM.js} +21 -21
- package/dist/client/chunks/{chart-area-Dol6s9no.js.map → chart-area-9SBeG0GM.js.map} +1 -1
- package/dist/client/chunks/{chart-bar-5_niozi2.js → chart-bar-tfgmLK2D.js} +5 -5
- package/dist/client/chunks/{chart-bar-5_niozi2.js.map → chart-bar-tfgmLK2D.js.map} +1 -1
- package/dist/client/chunks/{chart-box-plot-Dhp-VwhD.js → chart-box-plot-BuYW6j6g.js} +2 -2
- package/dist/client/chunks/{chart-box-plot-Dhp-VwhD.js.map → chart-box-plot-BuYW6j6g.js.map} +1 -1
- package/dist/client/chunks/{chart-bubble-BM2BAMSo.js → chart-bubble-BNmonWqW.js} +2 -2
- package/dist/client/chunks/{chart-bubble-BM2BAMSo.js.map → chart-bubble-BNmonWqW.js.map} +1 -1
- package/dist/client/chunks/{chart-candlestick-BNwLIBfm.js → chart-candlestick-BYeWNkKl.js} +2 -2
- package/dist/client/chunks/{chart-candlestick-BNwLIBfm.js.map → chart-candlestick-BYeWNkKl.js.map} +1 -1
- package/dist/client/chunks/{chart-data-table-DoDHQRe7.js → chart-data-table-C_oHiK6N.js} +1094 -1029
- package/dist/client/chunks/chart-data-table-C_oHiK6N.js.map +1 -0
- package/dist/client/chunks/{chart-funnel-Cd7da_sa.js → chart-funnel-B_CWC3cL.js} +2 -2
- package/dist/client/chunks/{chart-funnel-Cd7da_sa.js.map → chart-funnel-B_CWC3cL.js.map} +1 -1
- package/dist/client/chunks/{chart-gauge-DOpul-Oz.js → chart-gauge-D7VxwPnx.js} +3 -3
- package/dist/client/chunks/{chart-gauge-DOpul-Oz.js.map → chart-gauge-D7VxwPnx.js.map} +1 -1
- package/dist/client/chunks/{chart-heat-map-CeKbK655.js → chart-heat-map-q7Vf_dog.js} +3 -3
- package/dist/client/chunks/{chart-heat-map-CeKbK655.js.map → chart-heat-map-q7Vf_dog.js.map} +1 -1
- package/dist/client/chunks/{chart-kpi-delta-Dq8qUOOT.js → chart-kpi-delta-PEuA3iGs.js} +3 -3
- package/dist/client/chunks/{chart-kpi-delta-Dq8qUOOT.js.map → chart-kpi-delta-PEuA3iGs.js.map} +1 -1
- package/dist/client/chunks/{chart-kpi-number-DgiqTi9g.js → chart-kpi-number-DlxrO6Pq.js} +5 -5
- package/dist/client/chunks/{chart-kpi-number-DgiqTi9g.js.map → chart-kpi-number-DlxrO6Pq.js.map} +1 -1
- package/dist/client/chunks/{chart-kpi-text-CsZMVEnM.js → chart-kpi-text-Cx6cJu2s.js} +3 -3
- package/dist/client/chunks/{chart-kpi-text-CsZMVEnM.js.map → chart-kpi-text-Cx6cJu2s.js.map} +1 -1
- package/dist/client/chunks/{chart-line-DlwOB7C7.js → chart-line-pDe25JzB.js} +3 -3
- package/dist/client/chunks/{chart-line-DlwOB7C7.js.map → chart-line-pDe25JzB.js.map} +1 -1
- package/dist/client/chunks/{chart-markdown-DPE34SjC.js → chart-markdown-CRY15yp0.js} +2 -2
- package/dist/client/chunks/{chart-markdown-DPE34SjC.js.map → chart-markdown-CRY15yp0.js.map} +1 -1
- package/dist/client/chunks/{chart-measure-profile-BpTz1fce.js → chart-measure-profile-DyQ-vvuC.js} +3 -3
- package/dist/client/chunks/{chart-measure-profile-BpTz1fce.js.map → chart-measure-profile-DyQ-vvuC.js.map} +1 -1
- package/dist/client/chunks/{chart-pie-FGw66XAH.js → chart-pie-ZrnBycy1.js} +15 -15
- package/dist/client/chunks/{chart-pie-FGw66XAH.js.map → chart-pie-ZrnBycy1.js.map} +1 -1
- package/dist/client/chunks/{chart-radar-D-eRDoiA.js → chart-radar-BXbnYMUJ.js} +13 -13
- package/dist/client/chunks/{chart-radar-D-eRDoiA.js.map → chart-radar-BXbnYMUJ.js.map} +1 -1
- package/dist/client/chunks/{chart-radial-bar-DgtkNTs3.js → chart-radial-bar-CYxH3ryh.js} +3 -3
- package/dist/client/chunks/{chart-radial-bar-DgtkNTs3.js.map → chart-radial-bar-CYxH3ryh.js.map} +1 -1
- package/dist/client/chunks/{chart-sankey-D0hhb_EQ.js → chart-sankey-C9R_TDDh.js} +2 -2
- package/dist/client/chunks/{chart-sankey-D0hhb_EQ.js.map → chart-sankey-C9R_TDDh.js.map} +1 -1
- package/dist/client/chunks/{chart-scatter-D9EcAiMQ.js → chart-scatter-DrwRkzzl.js} +3 -3
- package/dist/client/chunks/{chart-scatter-D9EcAiMQ.js.map → chart-scatter-DrwRkzzl.js.map} +1 -1
- package/dist/client/chunks/{chart-sunburst-DCYmJ5DU.js → chart-sunburst-Bs1yqIPp.js} +3 -3
- package/dist/client/chunks/{chart-sunburst-DCYmJ5DU.js.map → chart-sunburst-Bs1yqIPp.js.map} +1 -1
- package/dist/client/chunks/{chart-tree-map-D_ACSSiB.js → chart-tree-map-BNjHhhVq.js} +3 -3
- package/dist/client/chunks/{chart-tree-map-D_ACSSiB.js.map → chart-tree-map-BNjHhhVq.js.map} +1 -1
- package/dist/client/chunks/{chart-waterfall-CVUVNa1R.js → chart-waterfall-CyoC0uLT.js} +3 -3
- package/dist/client/chunks/{chart-waterfall-CVUVNa1R.js.map → chart-waterfall-CyoC0uLT.js.map} +1 -1
- package/dist/client/chunks/charts-core-DCQ7od_L.js +190 -0
- package/dist/client/chunks/charts-core-DCQ7od_L.js.map +1 -0
- package/dist/client/chunks/charts-loader-Bya_zDIA.js +86 -0
- package/dist/client/chunks/charts-loader-Bya_zDIA.js.map +1 -0
- package/dist/client/chunks/{en-US-BE6VoG0o.js → en-US-HP6FHuNy.js} +3 -1
- package/dist/client/chunks/{en-US-BE6VoG0o.js.map → en-US-HP6FHuNy.js.map} +1 -1
- package/dist/client/chunks/{exceljs.min-DWC_b8G9.js → exceljs.min-CiByP8VQ.js} +2 -3
- package/dist/client/chunks/{exceljs.min-DWC_b8G9.js.map → exceljs.min-CiByP8VQ.js.map} +1 -1
- package/dist/client/chunks/{nl-NL-DFLVORiD.js → nl-NL-CEdoCz6Q.js} +54 -1
- package/dist/client/chunks/nl-NL-CEdoCz6Q.js.map +1 -0
- package/dist/client/chunks/{schema-visualization-C6g_LCiA.js → schema-visualization-DfXxFBIY.js} +3 -3
- package/dist/client/chunks/{schema-visualization-C6g_LCiA.js.map → schema-visualization-DfXxFBIY.js.map} +1 -1
- package/dist/client/chunks/{useDirtyStateTracking-ZfChDEd3.js → useDirtyStateTracking-BFJHiiVK.js} +15 -15
- package/dist/client/chunks/{useDirtyStateTracking-ZfChDEd3.js.map → useDirtyStateTracking-BFJHiiVK.js.map} +1 -1
- package/dist/client/chunks/{useExplainAI-im9e1rVb.js → useExplainAI-_C4WQE5I.js} +16 -16
- package/dist/client/chunks/{useExplainAI-im9e1rVb.js.map → useExplainAI-_C4WQE5I.js.map} +1 -1
- package/dist/client/chunks/{vendor-Qa1s8oSX.js → vendor-Gb3lH0cc.js} +49 -49
- package/dist/client/chunks/vendor-Gb3lH0cc.js.map +1 -0
- package/dist/client/client/CubeClient.d.ts +11 -1
- package/dist/client/components/AnalysisBuilder/AnalysisDisplayConfigPanel.d.ts +4 -2
- package/dist/client/components/AnalysisBuilder/ColumnFormatsEditor.d.ts +10 -0
- package/dist/client/components/AnalysisBuilder/DisplayOptionControl.d.ts +3 -2
- package/dist/client/components/AnalysisBuilder/utils/queryUtils.d.ts +7 -1
- package/dist/client/components/analyticsPortlet/PortletChart.d.ts +2 -1
- package/dist/client/components/analyticsPortlet/PortletChartView.d.ts +4 -1
- package/dist/client/components/analyticsPortlet/usePortletDeadMembers.d.ts +24 -0
- package/dist/client/components/analyticsPortlet/usePortletPagination.d.ts +21 -0
- package/dist/client/components/charts/RecordsTable.config.d.ts +10 -0
- package/dist/client/components/charts/RecordsTable.d.ts +4 -0
- package/dist/client/components/charts/recordsTableHooks.d.ts +68 -0
- package/dist/client/components.js +1 -1
- package/dist/client/hooks.js +3 -3
- package/dist/client/icons/types.d.ts +1 -0
- package/dist/client/icons.js +2 -2
- package/dist/client/index.d.ts +2 -2
- package/dist/client/index.js +213 -213
- package/dist/client/providers.js +1 -1
- package/dist/client/schema.js +1 -1
- package/dist/client/styles.css +1 -1
- package/dist/client/types.d.ts +92 -1
- package/dist/client/utils/recordsTableUtils.d.ts +71 -0
- package/dist/client/utils/rowLinkUtils.d.ts +35 -0
- package/dist/client/utils.js +14 -14
- package/dist/client-bundle-stats.html +1 -1
- package/dist/mcp-app/mcp-app.html +109 -109
- package/dist/server/adapters/base-adapter.d.ts +46 -0
- package/dist/server/adapters/databend-adapter.d.ts +5 -0
- package/dist/server/adapters/duckdb-adapter.d.ts +5 -0
- package/dist/server/adapters/mysql-adapter.d.ts +14 -0
- package/dist/server/adapters/postgres-adapter.d.ts +15 -0
- package/dist/server/adapters/snowflake-adapter.d.ts +6 -0
- package/dist/server/adapters/sqlite-adapter.d.ts +21 -0
- package/dist/server/agent/chart-validation.d.ts +1 -1
- package/dist/server/ai/chart-schema.d.ts +117 -0
- package/dist/server/ai/discovery-helpers.d.ts +14 -0
- package/dist/server/ai/discovery.d.ts +6 -0
- package/dist/server/ai/query-schema.d.ts +1 -1
- package/dist/server/attribute-dimensions.d.ts +102 -0
- package/dist/server/builders/group-by-builder.d.ts +15 -0
- package/dist/server/cache-utils.d.ts +5 -1
- package/dist/server/compiler-metadata.d.ts +24 -3
- package/dist/server/compiler.d.ts +159 -13
- package/dist/server/execution/query-result-cache.d.ts +1 -1
- package/dist/server/executor.d.ts +15 -0
- package/dist/{adapters/google-eKAc20al.js → server/google-DRY7jnOh.js} +46 -28
- package/dist/server/{google-BhvizbFR.cjs → google-PsZzwedr.cjs} +2 -2
- package/dist/server/index.cjs +42 -38
- package/dist/server/index.d.ts +13 -3
- package/dist/server/index.js +2079 -1573
- package/dist/server/{openai-Czk1BdHa.js → openai-6uUf7h-5.js} +1 -1
- package/dist/server/{openai-DBwI1OSu.cjs → openai-BBe1XbZd.cjs} +1 -1
- package/dist/server/{openai-Cu4TXXjl.cjs → openai-BmADmD1e.cjs} +1 -1
- package/dist/server/{openai-CUf4vc3Q.js → openai-C1gLuR-0.js} +1 -1
- package/dist/server/query-handlers.d.ts +2 -1
- package/dist/server/query-validator.d.ts +36 -4
- package/dist/server/types/core.d.ts +13 -0
- package/dist/server/types/cube.d.ts +39 -2
- package/dist/server/types/query.d.ts +8 -0
- package/package.json +2 -2
- package/dist/adapters/ActivityGridChart.config-D6hhj345.cjs +0 -1
- package/dist/adapters/ActivityGridChart.config-QZKs_NYg.js +0 -2
- package/dist/adapters/AreaChart.config-B5XM6G22.js +0 -2
- package/dist/adapters/AreaChart.config-NP34BH5y.cjs +0 -1
- package/dist/adapters/BarChart.config-Bqlmr81N.js +0 -2
- package/dist/adapters/BarChart.config-C3bw-cAP.cjs +0 -1
- package/dist/adapters/BoxPlotChart.config-BOAvoj6x.cjs +0 -1
- package/dist/adapters/BoxPlotChart.config-CTXiycYY.js +0 -2
- package/dist/adapters/BubbleChart.config-CGFIkl4H.cjs +0 -1
- package/dist/adapters/BubbleChart.config-Njxx4Eq1.js +0 -2
- package/dist/adapters/CandlestickChart.config-BZ_yWaSo.cjs +0 -1
- package/dist/adapters/CandlestickChart.config-D4Svhmef.js +0 -2
- package/dist/adapters/DataTable.config-B-bT9puT.js +0 -2
- package/dist/adapters/DataTable.config-BHtt1cPM.cjs +0 -1
- package/dist/adapters/FunnelChart.config-C1e07O7B.cjs +0 -1
- package/dist/adapters/FunnelChart.config-CVEy0tV9.js +0 -2
- package/dist/adapters/GaugeChart.config-5PLNlQlu.js +0 -2
- package/dist/adapters/GaugeChart.config-Cdv6knjZ.cjs +0 -1
- package/dist/adapters/HeatMapChart.config-MGTfYpWJ.js +0 -2
- package/dist/adapters/HeatMapChart.config-jfBEi1ZI.cjs +0 -1
- package/dist/adapters/KpiDelta.config-D2IUsEYz.cjs +0 -1
- package/dist/adapters/KpiDelta.config-DT_MmAHw.js +0 -2
- package/dist/adapters/KpiNumber.config-ChgbKmx8.cjs +0 -1
- package/dist/adapters/KpiNumber.config-CvZ_FhyL.js +0 -2
- package/dist/adapters/KpiText.config-Bgkw8gr2.js +0 -2
- package/dist/adapters/KpiText.config-Bz9orqt6.cjs +0 -1
- package/dist/adapters/LineChart.config-BVew35dI.cjs +0 -1
- package/dist/adapters/LineChart.config-DSCCKXNg.js +0 -2
- package/dist/adapters/MarkdownChart.config-Bu6XUuhI.js +0 -2
- package/dist/adapters/MarkdownChart.config-E4aSVTf3.cjs +0 -1
- package/dist/adapters/MeasureProfileChart.config-BF249hc_.cjs +0 -1
- package/dist/adapters/MeasureProfileChart.config-lERVe38G.js +0 -2
- package/dist/adapters/PieChart.config-7Ujwp8R5.cjs +0 -1
- package/dist/adapters/PieChart.config-jQl2HIcA.js +0 -2
- package/dist/adapters/ProportionBarChart.config-o0w_Pnlt.js +0 -2
- package/dist/adapters/ProportionBarChart.config-phNohhhY.cjs +0 -1
- package/dist/adapters/RadarChart.config-BmrYBd9x.js +0 -2
- package/dist/adapters/RadarChart.config-Dlt3UflG.cjs +0 -1
- package/dist/adapters/RadialBarChart.config-CeEm8xRb.cjs +0 -1
- package/dist/adapters/RadialBarChart.config-Dishh6bC.js +0 -2
- package/dist/adapters/RetentionCombinedChart.config-BaD4ev85.cjs +0 -1
- package/dist/adapters/RetentionCombinedChart.config-m2FjBUi9.js +0 -2
- package/dist/adapters/RetentionHeatmap.config-DiMplGdk.js +0 -2
- package/dist/adapters/RetentionHeatmap.config-Dp6oYwQZ.cjs +0 -1
- package/dist/adapters/SankeyChart.config-C4Y6qzCS.cjs +0 -1
- package/dist/adapters/SankeyChart.config-CJHqgjQ1.js +0 -2
- package/dist/adapters/ScatterChart.config-C0QqvDrN.cjs +0 -1
- package/dist/adapters/ScatterChart.config-DywOsWPW.js +0 -2
- package/dist/adapters/SunburstChart.config-DE8RxpDR.cjs +0 -1
- package/dist/adapters/SunburstChart.config-DohowrO3.js +0 -2
- package/dist/adapters/TreeMapChart.config-D2gXz-zC.cjs +0 -1
- package/dist/adapters/TreeMapChart.config-HMlI29GG.js +0 -2
- package/dist/adapters/WaterfallChart.config-BO2WV2VB.js +0 -2
- package/dist/adapters/WaterfallChart.config-CzwGiheB.cjs +0 -1
- package/dist/adapters/compiler-BNjqYdmc.cjs +0 -166
- package/dist/adapters/core-CzFfrJzu.cjs +0 -1
- package/dist/adapters/handler-m6WgA9xu.cjs +0 -25
- package/dist/adapters/mcp-transport-B0b27YUB.cjs +0 -40
- package/dist/adapters/mcp-transport-BXyA4dTk.js +0 -603
- package/dist/adapters/utils-BoOeig94.cjs +0 -128
- package/dist/client/chunks/DashboardEditModal-BOfLdTgV.js.map +0 -1
- package/dist/client/chunks/analysis-builder-shared-CEvHIlmk.js.map +0 -1
- package/dist/client/chunks/chart-activity-grid-4jfS8khG.js.map +0 -1
- package/dist/client/chunks/chart-data-table-DoDHQRe7.js.map +0 -1
- package/dist/client/chunks/charts-core-BPD_hLaL.js +0 -215
- package/dist/client/chunks/charts-core-BPD_hLaL.js.map +0 -1
- package/dist/client/chunks/charts-loader-CwMcOfwT.js +0 -85
- package/dist/client/chunks/charts-loader-CwMcOfwT.js.map +0 -1
- package/dist/client/chunks/nl-NL-DFLVORiD.js.map +0 -1
- package/dist/client/chunks/vendor-Qa1s8oSX.js.map +0 -1
|
@@ -1,9 +1,41 @@
|
|
|
1
1
|
import { SemanticQuery, Cube } from './types/index.js';
|
|
2
2
|
/**
|
|
3
|
-
*
|
|
4
|
-
*
|
|
3
|
+
* A member the query references that no cube provides, reported alongside the
|
|
4
|
+
* human-readable errors.
|
|
5
|
+
*
|
|
6
|
+
* The joined error string cannot be split back apart reliably — the per-field
|
|
7
|
+
* "did you mean" hints contain the same separator — so a caller that wants to
|
|
8
|
+
* react to a *specific* missing member (a dashboard dropping a column for a
|
|
9
|
+
* deleted attribute, say) needs this rather than the prose. `source` is the
|
|
10
|
+
* part that matters: dropping a projected member narrows what is displayed,
|
|
11
|
+
* whereas dropping a filter would widen the result set, so the two cannot be
|
|
12
|
+
* treated alike.
|
|
13
|
+
*/
|
|
14
|
+
export interface QueryValidationIssue {
|
|
15
|
+
source: 'measure' | 'dimension' | 'timeDimension' | 'filter';
|
|
16
|
+
/** The full `Cube.field` reference as the query wrote it. */
|
|
17
|
+
member: string;
|
|
18
|
+
message: string;
|
|
19
|
+
}
|
|
20
|
+
/**
|
|
21
|
+
* Thrown when a query fails validation during execution.
|
|
22
|
+
*
|
|
23
|
+
* Carries the structured issues alongside the joined message so a caller can
|
|
24
|
+
* react to a specific unknown member — the batch endpoint, which validates
|
|
25
|
+
* inside execution rather than ahead of it, would otherwise only have prose.
|
|
5
26
|
*/
|
|
6
|
-
export declare
|
|
27
|
+
export declare class QueryValidationError extends Error {
|
|
28
|
+
readonly issues: QueryValidationIssue[];
|
|
29
|
+
constructor(message: string, issues: QueryValidationIssue[]);
|
|
30
|
+
}
|
|
31
|
+
export interface QueryValidationResult {
|
|
7
32
|
isValid: boolean;
|
|
8
33
|
errors: string[];
|
|
9
|
-
}
|
|
34
|
+
/** Unknown members, when any — see {@link QueryValidationIssue}. */
|
|
35
|
+
issues: QueryValidationIssue[];
|
|
36
|
+
}
|
|
37
|
+
/**
|
|
38
|
+
* Validate a query against a cubes map
|
|
39
|
+
* Standalone function that can be used by both compiler and executor
|
|
40
|
+
*/
|
|
41
|
+
export declare function validateQueryAgainstCubes(cubes: Map<string, Cube>, query: SemanticQuery): QueryValidationResult;
|
|
@@ -57,6 +57,11 @@ export interface QueryResult {
|
|
|
57
57
|
};
|
|
58
58
|
/** Warnings about potential query issues (e.g., fan-out without dimensions) */
|
|
59
59
|
warnings?: QueryWarning[];
|
|
60
|
+
/**
|
|
61
|
+
* Total rows the query would return with no limit/offset, present only when
|
|
62
|
+
* the query asked for it with `total: true`.
|
|
63
|
+
*/
|
|
64
|
+
total?: number;
|
|
60
65
|
}
|
|
61
66
|
/**
|
|
62
67
|
* Period comparison metadata for compareDateRange queries
|
|
@@ -85,6 +90,14 @@ export interface SqlResult {
|
|
|
85
90
|
export interface ExecutionOptions {
|
|
86
91
|
/** Skip the cache lookup (but still cache the result for future requests) */
|
|
87
92
|
skipCache?: boolean;
|
|
93
|
+
/**
|
|
94
|
+
* Identifies the cube definitions that produced the result, as
|
|
95
|
+
* `setId:baseGeneration.setGeneration`. Appended unconditionally to the query
|
|
96
|
+
* cache key so results can never be shared between tenants whose cube sets
|
|
97
|
+
* differ, nor survive a re-registration that changed a definition.
|
|
98
|
+
* Set by SemanticLayerCompiler; callers do not supply it.
|
|
99
|
+
*/
|
|
100
|
+
cubeSetKey?: string;
|
|
88
101
|
}
|
|
89
102
|
/**
|
|
90
103
|
* Core database interface that supports all Drizzle instances
|
|
@@ -64,6 +64,19 @@ export interface QueryContext {
|
|
|
64
64
|
* without aggregation wrappers. Set from SemanticQuery.ungrouped.
|
|
65
65
|
*/
|
|
66
66
|
ungrouped?: boolean;
|
|
67
|
+
/**
|
|
68
|
+
* Cast an expression to a type, in this engine's dialect (`::decimal` on
|
|
69
|
+
* Postgres, `CAST(... AS DECIMAL)` elsewhere). Strict: unparseable input
|
|
70
|
+
* fails the query on Postgres and silently yields `0` on MySQL/SQLite.
|
|
71
|
+
*/
|
|
72
|
+
cast: (fieldExpr: AnyColumn | SQL, targetType: 'timestamp' | 'decimal' | 'integer') => SQL;
|
|
73
|
+
/**
|
|
74
|
+
* Cast an expression to a type, yielding NULL rather than failing when the
|
|
75
|
+
* input cannot be parsed. Use this over {@link QueryContext.cast} whenever
|
|
76
|
+
* the source column is free text — one dirty value should leave a row with a
|
|
77
|
+
* NULL cell, not fail the whole query.
|
|
78
|
+
*/
|
|
79
|
+
tryCast: (fieldExpr: AnyColumn | SQL, targetType: 'timestamp' | 'decimal' | 'integer') => SQL;
|
|
67
80
|
}
|
|
68
81
|
/**
|
|
69
82
|
* Multi-cube query context for cross-cube operations
|
|
@@ -147,7 +160,25 @@ export interface Dimension {
|
|
|
147
160
|
sql: AnyColumn | SQL | ((ctx: QueryContext) => AnyColumn | SQL);
|
|
148
161
|
/** Whether this is a primary key */
|
|
149
162
|
primaryKey?: boolean;
|
|
150
|
-
/**
|
|
163
|
+
/**
|
|
164
|
+
* The column this dimension's SQL correlates on, for dimensions built from a
|
|
165
|
+
* correlated subquery (see `buildAttributeDimensions`).
|
|
166
|
+
*
|
|
167
|
+
* A correlated subquery in the SELECT list is only legal under GROUP BY when
|
|
168
|
+
* the column it correlates on is itself grouped: Postgres otherwise rejects
|
|
169
|
+
* the query with "subquery uses ungrouped column … from outer query", and
|
|
170
|
+
* MySQL does the same under `only_full_group_by`. The planner cannot see
|
|
171
|
+
* inside an opaque `sql` function, so a dimension that needs this declares it
|
|
172
|
+
* and the GROUP BY builder adds the key.
|
|
173
|
+
*/
|
|
174
|
+
correlatesOn?: AnyColumn;
|
|
175
|
+
/**
|
|
176
|
+
* Whether to include this dimension in generated cube metadata (`/meta`,
|
|
177
|
+
* the client field picker, AI prompts). Defaults to `true` (shown) when
|
|
178
|
+
* omitted. Setting `shown: false` hides the dimension from metadata/UI
|
|
179
|
+
* only — it remains fully usable in queries and filters, matching Cube.js
|
|
180
|
+
* semantics for `shown: false`.
|
|
181
|
+
*/
|
|
151
182
|
shown?: boolean;
|
|
152
183
|
/** Display format */
|
|
153
184
|
format?: string;
|
|
@@ -182,7 +213,13 @@ export interface Measure {
|
|
|
182
213
|
sql?: AnyColumn | SQL | ((ctx: QueryContext) => AnyColumn | SQL);
|
|
183
214
|
/** Display format */
|
|
184
215
|
format?: string;
|
|
185
|
-
/**
|
|
216
|
+
/**
|
|
217
|
+
* Whether to include this measure in generated cube metadata (`/meta`,
|
|
218
|
+
* the client field picker, AI prompts). Defaults to `true` (shown) when
|
|
219
|
+
* omitted. Setting `shown: false` hides the measure from metadata/UI
|
|
220
|
+
* only — it remains fully usable in queries and filters, matching Cube.js
|
|
221
|
+
* semantics for `shown: false`.
|
|
222
|
+
*/
|
|
186
223
|
shown?: boolean;
|
|
187
224
|
/** Filters applied to this measure */
|
|
188
225
|
filters?: Array<(ctx: QueryContext) => SQL>;
|
|
@@ -32,6 +32,14 @@ export interface SemanticQuery {
|
|
|
32
32
|
* - Incompatible with compareDateRange and fillMissingDates
|
|
33
33
|
*/
|
|
34
34
|
ungrouped?: boolean;
|
|
35
|
+
/**
|
|
36
|
+
* Return the number of rows the query would produce with no `limit` or
|
|
37
|
+
* `offset` applied, as `QueryResult.total`. Matches Cube's `total`.
|
|
38
|
+
*
|
|
39
|
+
* Costs a second round trip: the same plan is rebuilt without pagination and
|
|
40
|
+
* counted, wrapped so a grouped query counts groups rather than base rows.
|
|
41
|
+
*/
|
|
42
|
+
total?: boolean;
|
|
35
43
|
/**
|
|
36
44
|
* Funnel analysis configuration for query-time funnel definition.
|
|
37
45
|
* When specified, the query executes as a funnel analysis instead of
|
package/dist/cli/index.cjs
CHANGED
|
@@ -32,38 +32,139 @@ node_path = __toESM(node_path, 1);
|
|
|
32
32
|
*
|
|
33
33
|
* Provides scaffolding for custom chart plugins.
|
|
34
34
|
*/
|
|
35
|
+
/**
|
|
36
|
+
* Built-in charts the CLI can scaffold from, keyed by chart type.
|
|
37
|
+
*
|
|
38
|
+
* Deliberately the CLI's own table rather than something derived from
|
|
39
|
+
* `chartRegistry`: the CLI ships as a standalone CJS bundle (`build:cli`) and
|
|
40
|
+
* importing the registry at runtime would pull the whole chart-config graph —
|
|
41
|
+
* and its i18n keys, which this plain-text listing would then have to resolve —
|
|
42
|
+
* into it. The `BuiltInChartType` import is type-only, so the bundle stays clean
|
|
43
|
+
* while the record stays **exhaustive**: adding a chart type fails
|
|
44
|
+
* `npm run typecheck` here until it is either given an entry or explicitly
|
|
45
|
+
* marked `null`, which is the decision this table exists to force.
|
|
46
|
+
*
|
|
47
|
+
* `null` means "not offered as a scaffolding starting point"; give it a
|
|
48
|
+
* `ScaffoldableChart` to enable it.
|
|
49
|
+
*/
|
|
35
50
|
var BUILT_IN_CHARTS = {
|
|
36
|
-
bar:
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
51
|
+
bar: {
|
|
52
|
+
file: "BarChart",
|
|
53
|
+
description: "Bar chart — compare values across categories"
|
|
54
|
+
},
|
|
55
|
+
line: {
|
|
56
|
+
file: "LineChart",
|
|
57
|
+
description: "Line chart — show trends over time"
|
|
58
|
+
},
|
|
59
|
+
area: {
|
|
60
|
+
file: "AreaChart",
|
|
61
|
+
description: "Area chart — line chart with filled areas"
|
|
62
|
+
},
|
|
63
|
+
pie: {
|
|
64
|
+
file: "PieChart",
|
|
65
|
+
description: "Pie chart — show proportions of a whole"
|
|
66
|
+
},
|
|
67
|
+
scatter: {
|
|
68
|
+
file: "ScatterChart",
|
|
69
|
+
description: "Scatter chart — show relationships between two measures"
|
|
70
|
+
},
|
|
71
|
+
bubble: {
|
|
72
|
+
file: "BubbleChart",
|
|
73
|
+
description: "Bubble chart — scatter with size dimension"
|
|
74
|
+
},
|
|
75
|
+
radar: {
|
|
76
|
+
file: "RadarChart",
|
|
77
|
+
description: "Radar chart — multi-axis comparison"
|
|
78
|
+
},
|
|
79
|
+
radialBar: {
|
|
80
|
+
file: "RadialBarChart",
|
|
81
|
+
description: "Radial bar chart — circular bar chart"
|
|
82
|
+
},
|
|
83
|
+
treemap: {
|
|
84
|
+
file: "TreeMapChart",
|
|
85
|
+
description: "Treemap — hierarchical data as nested rectangles"
|
|
86
|
+
},
|
|
87
|
+
table: {
|
|
88
|
+
file: "DataTable",
|
|
89
|
+
description: "Data table — sortable tabular display"
|
|
90
|
+
},
|
|
91
|
+
recordsTable: {
|
|
92
|
+
file: "RecordsTable",
|
|
93
|
+
description: "Records table — record listing with per-column formats and links"
|
|
94
|
+
},
|
|
95
|
+
activityGrid: {
|
|
96
|
+
file: "ActivityGridChart",
|
|
97
|
+
description: "Activity grid — GitHub-style contribution calendar"
|
|
98
|
+
},
|
|
99
|
+
kpiNumber: {
|
|
100
|
+
file: "KpiNumber",
|
|
101
|
+
description: "KPI number — single metric display"
|
|
102
|
+
},
|
|
103
|
+
kpiDelta: {
|
|
104
|
+
file: "KpiDelta",
|
|
105
|
+
description: "KPI delta — metric with change indicator"
|
|
106
|
+
},
|
|
107
|
+
kpiText: {
|
|
108
|
+
file: "KpiText",
|
|
109
|
+
description: "KPI text — text-based metric"
|
|
110
|
+
},
|
|
111
|
+
funnel: {
|
|
112
|
+
file: "FunnelChart",
|
|
113
|
+
description: "Funnel chart — conversion funnel visualization"
|
|
114
|
+
},
|
|
115
|
+
sankey: {
|
|
116
|
+
file: "SankeyChart",
|
|
117
|
+
description: "Sankey diagram — flow visualization"
|
|
118
|
+
},
|
|
119
|
+
sunburst: {
|
|
120
|
+
file: "SunburstChart",
|
|
121
|
+
description: "Sunburst chart — hierarchical pie chart"
|
|
122
|
+
},
|
|
123
|
+
heatmap: {
|
|
124
|
+
file: "HeatMapChart",
|
|
125
|
+
description: "Heatmap — color-coded matrix"
|
|
126
|
+
},
|
|
127
|
+
boxPlot: {
|
|
128
|
+
file: "BoxPlotChart",
|
|
129
|
+
description: "Box plot — statistical distribution"
|
|
130
|
+
},
|
|
131
|
+
waterfall: {
|
|
132
|
+
file: "WaterfallChart",
|
|
133
|
+
description: "Waterfall chart — cumulative values"
|
|
134
|
+
},
|
|
135
|
+
candlestick: {
|
|
136
|
+
file: "CandlestickChart",
|
|
137
|
+
description: "Candlestick chart — financial OHLC data"
|
|
138
|
+
},
|
|
139
|
+
gauge: {
|
|
140
|
+
file: "GaugeChart",
|
|
141
|
+
description: "Gauge — meter-style value display"
|
|
142
|
+
},
|
|
143
|
+
measureProfile: {
|
|
144
|
+
file: "MeasureProfileChart",
|
|
145
|
+
description: "Measure profile — detailed measure analysis"
|
|
146
|
+
},
|
|
147
|
+
markdown: null,
|
|
148
|
+
retentionHeatmap: null,
|
|
149
|
+
retentionCombined: null,
|
|
150
|
+
proportionBar: null
|
|
59
151
|
};
|
|
152
|
+
/** Resolve a `--from` argument (an arbitrary string) to a scaffoldable chart. */
|
|
153
|
+
function lookupScaffold(chartType) {
|
|
154
|
+
return scaffoldableCharts().find(([type]) => type === chartType)?.[1] ?? null;
|
|
155
|
+
}
|
|
156
|
+
/** The subset that `charts list` / `charts init --from` actually offer. */
|
|
157
|
+
function scaffoldableCharts() {
|
|
158
|
+
return Object.entries(BUILT_IN_CHARTS).filter((entry) => entry[1] !== null);
|
|
159
|
+
}
|
|
60
160
|
/**
|
|
61
161
|
* drizzle-cube charts list
|
|
62
162
|
*/
|
|
63
163
|
function chartsList() {
|
|
64
164
|
console.log("\nAvailable built-in chart types:\n");
|
|
65
|
-
const
|
|
66
|
-
|
|
165
|
+
const charts = scaffoldableCharts();
|
|
166
|
+
const maxLen = Math.max(...charts.map(([type]) => type.length));
|
|
167
|
+
for (const [type, chart] of charts) console.log(` ${type.padEnd(maxLen + 2)} ${chart.description}`);
|
|
67
168
|
console.log(`\nUse --from <type> with 'charts init' to copy a built-in as starting point.`);
|
|
68
169
|
console.log(`Example: npx drizzle-cube charts init --from bar\n`);
|
|
69
170
|
}
|
|
@@ -93,7 +194,7 @@ function chartsInit() {
|
|
|
93
194
|
const fromBuiltIn = values.from;
|
|
94
195
|
const customName = values.name;
|
|
95
196
|
if (fromBuiltIn) {
|
|
96
|
-
if (!
|
|
197
|
+
if (!lookupScaffold(fromBuiltIn)) {
|
|
97
198
|
console.error(`\nUnknown chart type: "${fromBuiltIn}"`);
|
|
98
199
|
console.error(`Run 'npx drizzle-cube charts list' to see available types.\n`);
|
|
99
200
|
process.exit(1);
|
|
@@ -144,36 +245,13 @@ Generating a template based on the ${chartType} chart instead.
|
|
|
144
245
|
scaffoldExample(outputDir, name);
|
|
145
246
|
return;
|
|
146
247
|
}
|
|
147
|
-
const
|
|
148
|
-
|
|
149
|
-
line: "LineChart",
|
|
150
|
-
area: "AreaChart",
|
|
151
|
-
pie: "PieChart",
|
|
152
|
-
scatter: "ScatterChart",
|
|
153
|
-
bubble: "BubbleChart",
|
|
154
|
-
radar: "RadarChart",
|
|
155
|
-
radialBar: "RadialBarChart",
|
|
156
|
-
treemap: "TreeMapChart",
|
|
157
|
-
table: "DataTable",
|
|
158
|
-
activityGrid: "ActivityGridChart",
|
|
159
|
-
kpiNumber: "KpiNumber",
|
|
160
|
-
kpiDelta: "KpiDelta",
|
|
161
|
-
kpiText: "KpiText",
|
|
162
|
-
funnel: "FunnelChart",
|
|
163
|
-
sankey: "SankeyChart",
|
|
164
|
-
sunburst: "SunburstChart",
|
|
165
|
-
heatmap: "HeatMapChart",
|
|
166
|
-
boxPlot: "BoxPlotChart",
|
|
167
|
-
waterfall: "WaterfallChart",
|
|
168
|
-
candlestick: "CandlestickChart",
|
|
169
|
-
gauge: "GaugeChart",
|
|
170
|
-
measureProfile: "MeasureProfileChart"
|
|
171
|
-
}[chartType];
|
|
172
|
-
if (!fileName) {
|
|
248
|
+
const scaffold = lookupScaffold(chartType);
|
|
249
|
+
if (!scaffold) {
|
|
173
250
|
console.error(`No file mapping for chart type: ${chartType}`);
|
|
174
251
|
scaffoldExample(outputDir, name);
|
|
175
252
|
return;
|
|
176
253
|
}
|
|
254
|
+
const fileName = scaffold.file;
|
|
177
255
|
const componentSource = node_path.default.join(sourceDir, `${fileName}.tsx`);
|
|
178
256
|
const configSource = node_path.default.join(sourceDir, `${fileName}.config.ts`);
|
|
179
257
|
ensureDir(outputDir);
|
|
@@ -7,6 +7,13 @@ import { ChartTypeConfig, ChartConfigRegistry } from './chartConfigs.js';
|
|
|
7
7
|
* stay here in full because the server agent reads them synchronously.
|
|
8
8
|
*/
|
|
9
9
|
export declare const chartConfigRegistry: ChartConfigRegistry;
|
|
10
|
+
/**
|
|
11
|
+
* Whether a chart lists records rather than aggregates, and so needs an
|
|
12
|
+
* `ungrouped` query.
|
|
13
|
+
*
|
|
14
|
+
* Reads the eager registry so the query builders need no chart-type switch.
|
|
15
|
+
*/
|
|
16
|
+
export declare function isRecordGrainChart(chartType: string): boolean;
|
|
10
17
|
/**
|
|
11
18
|
* Register a custom chart config into the registry.
|
|
12
19
|
* Used by the chart plugin system.
|
|
@@ -18,6 +18,13 @@ export interface AxisDropZoneConfig {
|
|
|
18
18
|
emptyText?: string;
|
|
19
19
|
/** Enable L/R axis toggle for items in this drop zone (for dual Y-axis support) */
|
|
20
20
|
enableDualAxis?: boolean;
|
|
21
|
+
/**
|
|
22
|
+
* Keep this zone out of automatic chart-config inference (the agent's
|
|
23
|
+
* `inferChartConfig`). For zones whose meaning is subtractive or opt-in — the
|
|
24
|
+
* records table's hidden columns being the case in point — filling them from
|
|
25
|
+
* the query changes what renders rather than completing a partial config.
|
|
26
|
+
*/
|
|
27
|
+
excludeFromInference?: boolean;
|
|
21
28
|
}
|
|
22
29
|
/**
|
|
23
30
|
* Configuration for a single display option
|
|
@@ -28,7 +35,7 @@ export interface DisplayOptionConfig {
|
|
|
28
35
|
/** Display label for the option */
|
|
29
36
|
label: string;
|
|
30
37
|
/** Type of input control to render */
|
|
31
|
-
type: 'boolean' | 'string' | 'number' | 'select' | 'color' | 'paletteColor' | 'axisFormat' | 'stringArray' | 'buttonGroup' | 'thresholdBands';
|
|
38
|
+
type: 'boolean' | 'string' | 'number' | 'select' | 'color' | 'paletteColor' | 'axisFormat' | 'stringArray' | 'buttonGroup' | 'thresholdBands' | 'columnFormats' | 'rowLink';
|
|
32
39
|
/** Default value for the option */
|
|
33
40
|
defaultValue?: any;
|
|
34
41
|
/** Placeholder text for string/number inputs */
|
|
@@ -125,6 +132,15 @@ export interface ChartTypeConfig {
|
|
|
125
132
|
* Omit to mean "always available".
|
|
126
133
|
*/
|
|
127
134
|
isAvailable?: (ctx: ChartAvailabilityContext) => ChartAvailability;
|
|
135
|
+
/**
|
|
136
|
+
* This chart lists individual records rather than aggregates, so the query
|
|
137
|
+
* built for it must be `ungrouped`.
|
|
138
|
+
*
|
|
139
|
+
* Declared here rather than switched on a chart type inside the query
|
|
140
|
+
* builders, and read from the eager registry so those stay data-driven — and
|
|
141
|
+
* so a custom chart can opt in through the same flag.
|
|
142
|
+
*/
|
|
143
|
+
recordGrain?: boolean;
|
|
128
144
|
}
|
|
129
145
|
/**
|
|
130
146
|
* Registry of all chart type configurations
|
package/dist/client/charts.js
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { d as l, l as u, s as d, u as f } from "./chunks/chart-activity-grid-
|
|
3
|
-
import { t as p } from "./chunks/chart-funnel-
|
|
4
|
-
import { a as m, i as h, n as g, o as _, r as v, s as y, t as b } from "./chunks/charts-loader-
|
|
5
|
-
import { t as x } from "./chunks/chart-area-
|
|
1
|
+
import { dt as e, ft as t, gt as n, ht as r, lt as i, mt as a, pt as o, t as s, ut as c } from "./chunks/chart-data-table-C_oHiK6N.js";
|
|
2
|
+
import { d as l, l as u, s as d, u as f } from "./chunks/chart-activity-grid-DO82rrbW.js";
|
|
3
|
+
import { t as p } from "./chunks/chart-funnel-B_CWC3cL.js";
|
|
4
|
+
import { a as m, i as h, n as g, o as _, r as v, s as y, t as b } from "./chunks/charts-loader-Bya_zDIA.js";
|
|
5
|
+
import { t as x } from "./chunks/chart-area-9SBeG0GM.js";
|
|
6
6
|
import { i as S } from "./chunks/utils-CToHkuhU.js";
|
|
7
|
-
import { t as C } from "./chunks/chart-bar-
|
|
8
|
-
import { t as w } from "./chunks/chart-line-
|
|
9
|
-
import { t as T } from "./chunks/chart-pie-
|
|
10
|
-
import { t as E } from "./chunks/chart-scatter-
|
|
11
|
-
import { t as D } from "./chunks/chart-radar-
|
|
12
|
-
import { t as O } from "./chunks/chart-radial-bar-
|
|
13
|
-
import { t as k } from "./chunks/chart-tree-map-
|
|
14
|
-
export { d as CHART_COLORS, u as CHART_MARGINS, s as DataTable, p as FunnelChart, b as LazyChart, f as NEGATIVE_COLOR, l as POSITIVE_COLOR, x as RechartsAreaChart, C as RechartsBarChart, w as RechartsLineChart, T as RechartsPieChart, D as RechartsRadarChart, O as RechartsRadialBarChart, E as RechartsScatterChart, k as RechartsTreeMapChart,
|
|
7
|
+
import { t as C } from "./chunks/chart-bar-tfgmLK2D.js";
|
|
8
|
+
import { t as w } from "./chunks/chart-line-pDe25JzB.js";
|
|
9
|
+
import { t as T } from "./chunks/chart-pie-ZrnBycy1.js";
|
|
10
|
+
import { t as E } from "./chunks/chart-scatter-DrwRkzzl.js";
|
|
11
|
+
import { t as D } from "./chunks/chart-radar-BXbnYMUJ.js";
|
|
12
|
+
import { t as O } from "./chunks/chart-radial-bar-CYxH3ryh.js";
|
|
13
|
+
import { t as k } from "./chunks/chart-tree-map-BNjHhhVq.js";
|
|
14
|
+
export { d as CHART_COLORS, u as CHART_MARGINS, s as DataTable, p as FunnelChart, b as LazyChart, f as NEGATIVE_COLOR, l as POSITIVE_COLOR, x as RechartsAreaChart, C as RechartsBarChart, w as RechartsLineChart, T as RechartsPieChart, D as RechartsRadarChart, O as RechartsRadialBarChart, E as RechartsScatterChart, k as RechartsTreeMapChart, i as clearChartConfigCache, S as formatChartData, g as getAvailableChartTypes, c as getChartConfigAsync, e as getChartConfigSync, v as getUnavailableChartTypes, t as isChartConfigLoaded, h as isChartTypeAvailable, m as isValidChartType, o as loadAllChartConfigs, _ as preloadChart, a as preloadChartConfig, r as preloadChartConfigs, y as preloadCharts, n as useChartConfig };
|