drizzle-cube 0.6.3 → 0.6.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/adapters/ActivityGridChart.config-Bvi50jl_.cjs +1 -0
- package/dist/adapters/ActivityGridChart.config-BwswifOD.js +2 -0
- package/dist/adapters/AreaChart.config-Cehf1Kjo.cjs +1 -0
- package/dist/adapters/AreaChart.config-DC-gnmli.js +2 -0
- package/dist/adapters/BarChart.config-BY53r96T.cjs +1 -0
- package/dist/adapters/BarChart.config-DJN5Oqmw.js +2 -0
- package/dist/adapters/BoxPlotChart.config-9hLT3yMs.js +2 -0
- package/dist/adapters/BoxPlotChart.config-D9P4PMTf.cjs +1 -0
- package/dist/adapters/BubbleChart.config-CEVSsy7u.js +2 -0
- package/dist/adapters/BubbleChart.config-Cji0z0Tb.cjs +1 -0
- package/dist/adapters/CandlestickChart.config-DPv76FmM.cjs +1 -0
- package/dist/adapters/CandlestickChart.config-tcHTorLu.js +2 -0
- package/dist/adapters/DataTable.config-D4txBrlQ.cjs +1 -0
- package/dist/adapters/DataTable.config-DrObkanI.js +2 -0
- package/dist/adapters/FunnelChart.config-BFYSkibE.js +2 -0
- package/dist/adapters/FunnelChart.config-BTSFeha-.cjs +1 -0
- package/dist/adapters/GaugeChart.config-BFz6NZfT.js +2 -0
- package/dist/adapters/GaugeChart.config-DJKD6oh8.cjs +1 -0
- package/dist/adapters/HeatMapChart.config-C3EZl9Sy.cjs +1 -0
- package/dist/adapters/HeatMapChart.config-jUCb5NAE.js +2 -0
- package/dist/adapters/KpiDelta.config-DhuealNk.js +2 -0
- package/dist/adapters/KpiDelta.config-m6FEIeWo.cjs +1 -0
- package/dist/adapters/KpiNumber.config-Cmd7eHmg.cjs +1 -0
- package/dist/adapters/KpiNumber.config-KQdKrkK-.js +2 -0
- package/dist/adapters/KpiText.config-D_pU4jH3.cjs +1 -0
- package/dist/adapters/KpiText.config-V8SvhllA.js +2 -0
- package/dist/adapters/LineChart.config-BuWM0TJx.js +2 -0
- package/dist/adapters/LineChart.config-CsxJ3f5A.cjs +1 -0
- package/dist/adapters/MarkdownChart.config-CJdjenj7.cjs +1 -0
- package/dist/adapters/MarkdownChart.config-oCWrAuom.js +2 -0
- package/dist/adapters/MeasureProfileChart.config-DBLnhtOk.cjs +1 -0
- package/dist/adapters/MeasureProfileChart.config-DWg0jzxA.js +2 -0
- package/dist/adapters/PieChart.config-D3qI6nbM.cjs +1 -0
- package/dist/adapters/PieChart.config-R2rcul2D.js +2 -0
- package/dist/adapters/RadarChart.config-BlK8QuDi.js +2 -0
- package/dist/adapters/RadarChart.config-fH3ce10I.cjs +1 -0
- package/dist/adapters/RadialBarChart.config-CqCnb27I.js +2 -0
- package/dist/adapters/RadialBarChart.config-DQQHJOCs.cjs +1 -0
- package/dist/adapters/RetentionCombinedChart.config-BFJ8i-kp.js +2 -0
- package/dist/adapters/RetentionCombinedChart.config-B_Wd_YjX.cjs +1 -0
- package/dist/adapters/RetentionHeatmap.config-BLqu9-Ft.js +2 -0
- package/dist/adapters/RetentionHeatmap.config-MvOPw_Dd.cjs +1 -0
- package/dist/adapters/SankeyChart.config-C_4u9Xiq.js +2 -0
- package/dist/adapters/SankeyChart.config-EH6wsjPr.cjs +1 -0
- package/dist/adapters/ScatterChart.config-D-MlQ7mP.js +2 -0
- package/dist/adapters/ScatterChart.config-DmwiEBN-.cjs +1 -0
- package/dist/adapters/SunburstChart.config-BRr_as_L.js +2 -0
- package/dist/adapters/SunburstChart.config-CptDj8e4.cjs +1 -0
- package/dist/adapters/TreeMapChart.config-D5wX2xaT.cjs +1 -0
- package/dist/adapters/TreeMapChart.config-Dyhwpwq3.js +2 -0
- package/dist/adapters/WaterfallChart.config-B_LGJIov.js +2 -0
- package/dist/adapters/WaterfallChart.config-Q4Fv196W.cjs +1 -0
- package/dist/adapters/compiler-D0v5KJhv.cjs +166 -0
- package/dist/adapters/{compiler-LKTN9PTt.js → compiler-ZruQ85ff.js} +247 -238
- package/dist/adapters/core/index.cjs +1 -1
- package/dist/adapters/core/index.js +1 -1
- package/dist/adapters/{core-F1pCQPde.cjs → core-CVqTwOR3.cjs} +1 -1
- package/dist/adapters/{core-Bbchr0ui.js → core-DoSUiMmv.js} +60 -60
- package/dist/adapters/express/index.cjs +2 -2
- package/dist/adapters/express/index.js +80 -75
- package/dist/adapters/fastify/index.cjs +2 -2
- package/dist/adapters/fastify/index.js +63 -58
- package/dist/adapters/{handler-DRZb2ip6.cjs → handler-DyIyrFFp.cjs} +3 -3
- package/dist/adapters/{handler-u8FyzPBT.js → handler-j74EJDdo.js} +28 -28
- package/dist/adapters/hono/index.cjs +2 -2
- package/dist/adapters/hono/index.js +57 -52
- package/dist/adapters/mcp-tools.cjs +1 -1
- package/dist/adapters/mcp-tools.js +2 -2
- package/dist/adapters/mcp-transport-BuU5CrKL.cjs +40 -0
- package/dist/adapters/mcp-transport-l8DhKzR5.js +601 -0
- package/dist/adapters/mcp-transport.d.ts +21 -3
- package/dist/adapters/nextjs/index.cjs +1 -1
- package/dist/adapters/nextjs/index.d.ts +10 -0
- package/dist/adapters/nextjs/index.js +114 -105
- package/dist/{server/openai-CmMzrs1Y.js → adapters/openai-BCSKRcbD.js} +10 -10
- package/dist/{server/openai-DhzGY9R4.js → adapters/openai-BjR3ohaS.js} +1 -1
- package/dist/{server/openai-B4kAJTSD.cjs → adapters/openai-ClVVLjNl.cjs} +2 -2
- package/dist/adapters/{openai-Cdf2wWZA.cjs → openai-CsVXOcJZ.cjs} +1 -1
- package/dist/adapters/utils-CBR-9AMD.cjs +128 -0
- package/dist/adapters/{utils-BPWZsX7k.js → utils-U7gV5wQL.js} +789 -788
- package/dist/adapters/utils.cjs +1 -1
- package/dist/adapters/utils.d.ts +16 -4
- package/dist/adapters/utils.js +1 -1
- package/dist/cjs/adapters/mcp-transport.d.ts +21 -3
- package/dist/cjs/adapters/nextjs/index.d.ts +10 -0
- package/dist/cjs/adapters/utils.d.ts +16 -4
- package/dist/cjs/client/components/AnalysisBuilder/utils/filterUtils.d.ts +4 -10
- package/dist/cjs/client/components/shared/utils.d.ts +2 -1
- package/dist/cjs/client/shared/filters/filterOperations.d.ts +95 -0
- package/dist/cjs/client/shared/filters/index.d.ts +10 -0
- package/dist/cjs/client/shared/filters/operators.d.ts +23 -0
- package/dist/cjs/client/shared/index.d.ts +3 -2
- package/dist/cjs/client/shared/types.d.ts +3 -10
- package/dist/cjs/client/shared/utils.d.ts +1 -59
- package/dist/cjs/client/utils/filterUtils.d.ts +2 -9
- package/dist/cjs/server/executors/sqlite-executor.d.ts +8 -2
- package/dist/cjs/server/logical-plan/logical-plan-builder.d.ts +0 -5
- package/dist/cjs/server/logical-plan/schema-builder.d.ts +19 -0
- package/dist/client/charts.js +13 -13
- package/dist/client/chunks/ConfirmModal-D6eLc9NO.js +3283 -0
- package/dist/client/chunks/ConfirmModal-D6eLc9NO.js.map +1 -0
- package/dist/client/chunks/{DashboardEditModal-CWurUU2B.js → DashboardEditModal-DFQSxR_C.js} +1157 -4011
- package/dist/client/chunks/DashboardEditModal-DFQSxR_C.js.map +1 -0
- package/dist/client/chunks/{RetentionCombinedChart-BgbDhsPz.js → RetentionCombinedChart-DY7wKLs5.js} +3 -3
- package/dist/client/chunks/{RetentionCombinedChart-BgbDhsPz.js.map → RetentionCombinedChart-DY7wKLs5.js.map} +1 -1
- package/dist/client/chunks/{RetentionHeatmap-DjXZaTPq.js → RetentionHeatmap-iNCG-dLd.js} +2 -2
- package/dist/client/chunks/{RetentionHeatmap-DjXZaTPq.js.map → RetentionHeatmap-iNCG-dLd.js.map} +1 -1
- package/dist/client/chunks/{analysis-builder-Uj_Fxv0-.js → analysis-builder-CBZ7lOC-.js} +323 -323
- package/dist/client/chunks/{analysis-builder-Uj_Fxv0-.js.map → analysis-builder-CBZ7lOC-.js.map} +1 -1
- package/dist/client/chunks/{analysis-builder-shared-AdAYIfj_.js → analysis-builder-shared-8alCn-zw.js} +989 -1064
- package/dist/client/chunks/analysis-builder-shared-8alCn-zw.js.map +1 -0
- package/dist/client/chunks/{chart-activity-grid-DX0SJbxs.js → chart-activity-grid-DDqFVWoa.js} +5 -2
- package/dist/client/chunks/{chart-activity-grid-DX0SJbxs.js.map → chart-activity-grid-DDqFVWoa.js.map} +1 -1
- package/dist/client/chunks/{chart-area-of01_62R.js → chart-area-BHxPNsmc.js} +2 -2
- package/dist/client/chunks/{chart-area-of01_62R.js.map → chart-area-BHxPNsmc.js.map} +1 -1
- package/dist/client/chunks/{chart-bar-BqelQE_I.js → chart-bar-DAO3PPcE.js} +3 -3
- package/dist/client/chunks/{chart-bar-BqelQE_I.js.map → chart-bar-DAO3PPcE.js.map} +1 -1
- package/dist/client/chunks/{chart-box-plot-kkBixZ27.js → chart-box-plot-CUpFyQQk.js} +2 -2
- package/dist/client/chunks/{chart-box-plot-kkBixZ27.js.map → chart-box-plot-CUpFyQQk.js.map} +1 -1
- package/dist/client/chunks/{chart-bubble-B2he1--4.js → chart-bubble-DvP_6_n9.js} +2 -2
- package/dist/client/chunks/{chart-bubble-B2he1--4.js.map → chart-bubble-DvP_6_n9.js.map} +1 -1
- package/dist/client/chunks/{chart-candlestick-DZp19Tzh.js → chart-candlestick-Dx8ZCMzl.js} +2 -2
- package/dist/client/chunks/{chart-candlestick-DZp19Tzh.js.map → chart-candlestick-Dx8ZCMzl.js.map} +1 -1
- package/dist/client/chunks/{chart-data-table-D4g5_jfF.js → chart-data-table-BP6DMdom.js} +32 -16
- package/dist/client/chunks/chart-data-table-BP6DMdom.js.map +1 -0
- package/dist/client/chunks/{chart-funnel-CToKSBaL.js → chart-funnel-xeVGBy-p.js} +2 -2
- package/dist/client/chunks/{chart-funnel-CToKSBaL.js.map → chart-funnel-xeVGBy-p.js.map} +1 -1
- package/dist/client/chunks/{chart-gauge-DTVezSk7.js → chart-gauge-DXQ4r3cb.js} +3 -3
- package/dist/client/chunks/{chart-gauge-DTVezSk7.js.map → chart-gauge-DXQ4r3cb.js.map} +1 -1
- package/dist/client/chunks/{chart-heat-map-DTuUl0BR.js → chart-heat-map-Pnk6rhqQ.js} +3 -3
- package/dist/client/chunks/{chart-heat-map-DTuUl0BR.js.map → chart-heat-map-Pnk6rhqQ.js.map} +1 -1
- package/dist/client/chunks/{chart-kpi-delta-BvWOt8-D.js → chart-kpi-delta-nXQnRRBr.js} +3 -3
- package/dist/client/chunks/{chart-kpi-delta-BvWOt8-D.js.map → chart-kpi-delta-nXQnRRBr.js.map} +1 -1
- package/dist/client/chunks/{chart-kpi-number-xgZmMiQY.js → chart-kpi-number-m8UGJfBr.js} +5 -5
- package/dist/client/chunks/{chart-kpi-number-xgZmMiQY.js.map → chart-kpi-number-m8UGJfBr.js.map} +1 -1
- package/dist/client/chunks/{chart-kpi-text-ZO3eFi7t.js → chart-kpi-text-CurpqmaD.js} +7 -4
- package/dist/client/chunks/{chart-kpi-text-ZO3eFi7t.js.map → chart-kpi-text-CurpqmaD.js.map} +1 -1
- package/dist/client/chunks/{chart-line-DKgrQA6c.js → chart-line-sJK-cJc0.js} +3 -3
- package/dist/client/chunks/{chart-line-DKgrQA6c.js.map → chart-line-sJK-cJc0.js.map} +1 -1
- package/dist/client/chunks/{chart-markdown-CV75S_zL.js → chart-markdown-BVrqqygz.js} +1263 -1192
- package/dist/client/chunks/chart-markdown-BVrqqygz.js.map +1 -0
- package/dist/client/chunks/{chart-measure-profile-Ket8fJyf.js → chart-measure-profile-k9_QDQbB.js} +3 -3
- package/dist/client/chunks/{chart-measure-profile-Ket8fJyf.js.map → chart-measure-profile-k9_QDQbB.js.map} +1 -1
- package/dist/client/chunks/{chart-pie-ByieAX5H.js → chart-pie-BDaaYt7a.js} +3 -3
- package/dist/client/chunks/{chart-pie-ByieAX5H.js.map → chart-pie-BDaaYt7a.js.map} +1 -1
- package/dist/client/chunks/{chart-radar-CiSwHWp4.js → chart-radar-Bz07PIVe.js} +3 -3
- package/dist/client/chunks/{chart-radar-CiSwHWp4.js.map → chart-radar-Bz07PIVe.js.map} +1 -1
- package/dist/client/chunks/{chart-radial-bar-BF6Mhl6f.js → chart-radial-bar-DpyxKQMj.js} +3 -3
- package/dist/client/chunks/{chart-radial-bar-BF6Mhl6f.js.map → chart-radial-bar-DpyxKQMj.js.map} +1 -1
- package/dist/client/chunks/{chart-sankey-DjrvKw6K.js → chart-sankey-BAeNbI-p.js} +2 -2
- package/dist/client/chunks/{chart-sankey-DjrvKw6K.js.map → chart-sankey-BAeNbI-p.js.map} +1 -1
- package/dist/client/chunks/{chart-scatter-Dd9WFqnS.js → chart-scatter-CRhGLCcy.js} +3 -3
- package/dist/client/chunks/{chart-scatter-Dd9WFqnS.js.map → chart-scatter-CRhGLCcy.js.map} +1 -1
- package/dist/client/chunks/{chart-sunburst-leGpuDj7.js → chart-sunburst-D3wV5OrK.js} +3 -3
- package/dist/client/chunks/{chart-sunburst-leGpuDj7.js.map → chart-sunburst-D3wV5OrK.js.map} +1 -1
- package/dist/client/chunks/{chart-tree-map-Ceq5sLZA.js → chart-tree-map-iI3ewOKY.js} +3 -3
- package/dist/client/chunks/{chart-tree-map-Ceq5sLZA.js.map → chart-tree-map-iI3ewOKY.js.map} +1 -1
- package/dist/client/chunks/{chart-waterfall-DyvQReN5.js → chart-waterfall-BrrYTZfs.js} +3 -3
- package/dist/client/chunks/{chart-waterfall-DyvQReN5.js.map → chart-waterfall-BrrYTZfs.js.map} +1 -1
- package/dist/client/chunks/{charts-core-DaXSt1Dd.js → charts-core-Cs-UIsQa.js} +2 -2
- package/dist/client/chunks/{charts-core-DaXSt1Dd.js.map → charts-core-Cs-UIsQa.js.map} +1 -1
- package/dist/client/chunks/charts-loader-DAJbAD7a.js +84 -0
- package/dist/client/chunks/{charts-loader-B0DOQMFH.js.map → charts-loader-DAJbAD7a.js.map} +1 -1
- package/dist/client/chunks/core-D7vPfUIe.js.map +1 -1
- package/dist/client/chunks/{dist-zPWyTBdU.js → dist-BwQr11Fz.js} +251 -252
- package/dist/client/chunks/{dist-zPWyTBdU.js.map → dist-BwQr11Fz.js.map} +1 -1
- package/dist/client/chunks/{exceljs.min-CIqBqwTW.js → exceljs.min-Dey-qIFL.js} +16 -16
- package/dist/client/chunks/{exceljs.min-CIqBqwTW.js.map → exceljs.min-Dey-qIFL.js.map} +1 -1
- package/dist/client/chunks/javascript-DFnKaHmQ.js.map +1 -1
- package/dist/client/chunks/retention-ChW9jYdy.js.map +1 -1
- package/dist/client/chunks/{schema-visualization-DJPTktM6.js → schema-visualization-BGT_cNon.js} +12 -12
- package/dist/client/chunks/{schema-visualization-DJPTktM6.js.map → schema-visualization-BGT_cNon.js.map} +1 -1
- package/dist/client/chunks/sql-CmVzGP4w.js.map +1 -1
- package/dist/client/chunks/syntaxHighlighting-Bq2Bj9Xt.js +30 -0
- package/dist/client/chunks/syntaxHighlighting-Bq2Bj9Xt.js.map +1 -0
- package/dist/client/chunks/{useDirtyStateTracking-BY_IIG1n.js → useDebounce-7suCFq9v.js} +250 -653
- package/dist/client/chunks/useDebounce-7suCFq9v.js.map +1 -0
- package/dist/client/chunks/useDirtyStateTracking-D2OiqKoQ.js +66 -0
- package/dist/client/chunks/useDirtyStateTracking-D2OiqKoQ.js.map +1 -0
- package/dist/client/chunks/{useExplainAI-PjMBmj2p.js → useExplainAI-CEf04DPE.js} +14 -14
- package/dist/client/chunks/{useExplainAI-PjMBmj2p.js.map → useExplainAI-CEf04DPE.js.map} +1 -1
- package/dist/client/chunks/useNotebookLayout-Ck3Z3uzg.js.map +1 -1
- package/dist/client/chunks/utils-DjLiJKS_.js +104 -0
- package/dist/client/chunks/utils-DjLiJKS_.js.map +1 -0
- package/dist/client/chunks/{vendor-D4jADu8t.js → vendor-DFAQ4Ucl.js} +5 -3
- package/dist/client/chunks/{vendor-D4jADu8t.js.map → vendor-DFAQ4Ucl.js.map} +1 -1
- package/dist/client/components/AnalysisBuilder/utils/filterUtils.d.ts +4 -10
- package/dist/client/components/shared/utils.d.ts +2 -1
- package/dist/client/components.js +4 -3
- package/dist/client/hooks.js +5 -4
- package/dist/client/icons.js +1 -1
- package/dist/client/index.js +34 -30
- package/dist/client/index.js.map +1 -1
- package/dist/client/providers.js +1 -1
- package/dist/client/schema.js +1 -1
- package/dist/client/shared/filters/filterOperations.d.ts +95 -0
- package/dist/client/shared/filters/index.d.ts +10 -0
- package/dist/client/shared/filters/operators.d.ts +23 -0
- package/dist/client/shared/index.d.ts +3 -2
- package/dist/client/shared/types.d.ts +3 -10
- package/dist/client/shared/utils.d.ts +1 -59
- package/dist/client/styles.css +1 -1
- package/dist/client/utils/filterUtils.d.ts +2 -9
- package/dist/client/utils.js +32 -6
- package/dist/client/utils.js.map +1 -0
- package/dist/client-bundle-stats.html +1 -1
- package/dist/mcp-app/mcp-app.html +145 -50
- package/dist/server/executors/sqlite-executor.d.ts +8 -2
- package/dist/server/index.cjs +34 -34
- package/dist/server/index.js +1557 -1547
- package/dist/server/logical-plan/logical-plan-builder.d.ts +0 -5
- package/dist/server/logical-plan/schema-builder.d.ts +19 -0
- package/dist/{adapters/openai-CmMzrs1Y.js → server/openai-BCSKRcbD.js} +10 -10
- package/dist/{adapters/openai-DhzGY9R4.js → server/openai-BjR3ohaS.js} +1 -1
- package/dist/{adapters/openai-B4kAJTSD.cjs → server/openai-ClVVLjNl.cjs} +2 -2
- package/dist/server/{openai-Cdf2wWZA.cjs → openai-CsVXOcJZ.cjs} +1 -1
- package/package.json +11 -7
- package/dist/adapters/ActivityGridChart.config-BtECymia.cjs +0 -1
- package/dist/adapters/ActivityGridChart.config-CTd5HYjI.js +0 -2
- package/dist/adapters/AreaChart.config-1B8iQnfn.js +0 -2
- package/dist/adapters/AreaChart.config-hnncyQL4.cjs +0 -1
- package/dist/adapters/BarChart.config-C-QCf1rL.cjs +0 -1
- package/dist/adapters/BarChart.config-CFelK1qP.js +0 -2
- package/dist/adapters/BoxPlotChart.config-CD9WEPyF.js +0 -2
- package/dist/adapters/BoxPlotChart.config-DEbLA0BX.cjs +0 -1
- package/dist/adapters/BubbleChart.config-B_M4hzzV.js +0 -2
- package/dist/adapters/BubbleChart.config-dRZZlAke.cjs +0 -1
- package/dist/adapters/CandlestickChart.config-Dsil2Fop.cjs +0 -1
- package/dist/adapters/CandlestickChart.config-fuhyFvob.js +0 -2
- package/dist/adapters/DataTable.config-q2gqBi6t.cjs +0 -1
- package/dist/adapters/DataTable.config-wIQnHX5R.js +0 -2
- package/dist/adapters/FunnelChart.config-Dz710ssx.js +0 -2
- package/dist/adapters/FunnelChart.config-YNP9CeS-.cjs +0 -1
- package/dist/adapters/GaugeChart.config-BG9FcMCn.cjs +0 -1
- package/dist/adapters/GaugeChart.config-CgwniXkd.js +0 -2
- package/dist/adapters/HeatMapChart.config-1zSMXXoN.cjs +0 -1
- package/dist/adapters/HeatMapChart.config-YVEWx6s5.js +0 -2
- package/dist/adapters/KpiDelta.config-BWvYXuFp.cjs +0 -1
- package/dist/adapters/KpiDelta.config-C_dYM64q.js +0 -2
- package/dist/adapters/KpiNumber.config-CXg6toZG.js +0 -2
- package/dist/adapters/KpiNumber.config-CZmV-yU1.cjs +0 -1
- package/dist/adapters/KpiText.config-BY-SJvAF.js +0 -2
- package/dist/adapters/KpiText.config-GSIxy0CE.cjs +0 -1
- package/dist/adapters/LineChart.config-CJtF8SOu.js +0 -2
- package/dist/adapters/LineChart.config-d0y60gw9.cjs +0 -1
- package/dist/adapters/MarkdownChart.config-B6w0spya.cjs +0 -1
- package/dist/adapters/MarkdownChart.config-BuIQcWOn.js +0 -2
- package/dist/adapters/MeasureProfileChart.config-Bo2n5Ae5.cjs +0 -1
- package/dist/adapters/MeasureProfileChart.config-C5d34lsc.js +0 -2
- package/dist/adapters/PieChart.config-CDxfXCIt.cjs +0 -1
- package/dist/adapters/PieChart.config-CuZxQc5m.js +0 -2
- package/dist/adapters/RadarChart.config-DpdVWyh5.cjs +0 -1
- package/dist/adapters/RadarChart.config-KrxwaaGu.js +0 -2
- package/dist/adapters/RadialBarChart.config-DpRZd0FW.js +0 -2
- package/dist/adapters/RadialBarChart.config-faIY4jpE.cjs +0 -1
- package/dist/adapters/RetentionCombinedChart.config-CUnScqnS.cjs +0 -1
- package/dist/adapters/RetentionCombinedChart.config-Dd8FuawP.js +0 -2
- package/dist/adapters/RetentionHeatmap.config-CPd6GeoQ.js +0 -2
- package/dist/adapters/RetentionHeatmap.config-CPlHbLom.cjs +0 -1
- package/dist/adapters/SankeyChart.config-DbIUqi-H.cjs +0 -1
- package/dist/adapters/SankeyChart.config-kzAnW0C7.js +0 -2
- package/dist/adapters/ScatterChart.config-4Okvn27v.js +0 -2
- package/dist/adapters/ScatterChart.config-4f9nNw3e.cjs +0 -1
- package/dist/adapters/SunburstChart.config-BsUQkIM_.js +0 -2
- package/dist/adapters/SunburstChart.config-lvnYkWs7.cjs +0 -1
- package/dist/adapters/TreeMapChart.config-S0qsgAFW.js +0 -2
- package/dist/adapters/TreeMapChart.config-jbwKsTYt.cjs +0 -1
- package/dist/adapters/WaterfallChart.config-CDQ74-pS.cjs +0 -1
- package/dist/adapters/WaterfallChart.config-XdtH-O5g.js +0 -2
- package/dist/adapters/compiler-ChGO4ZLU.cjs +0 -166
- package/dist/adapters/mcp-transport-Bw_zqky2.js +0 -591
- package/dist/adapters/mcp-transport-CNIPoe1i.cjs +0 -40
- package/dist/adapters/utils-_whV4fXL.cjs +0 -128
- package/dist/client/chunks/DashboardEditModal-CWurUU2B.js.map +0 -1
- package/dist/client/chunks/analysis-builder-shared-AdAYIfj_.js.map +0 -1
- package/dist/client/chunks/chart-data-table-D4g5_jfF.js.map +0 -1
- package/dist/client/chunks/chart-markdown-CV75S_zL.js.map +0 -1
- package/dist/client/chunks/charts-loader-B0DOQMFH.js +0 -84
- package/dist/client/chunks/useDirtyStateTracking-BY_IIG1n.js.map +0 -1
- package/dist/client/chunks/utils-Cq-j5E5I.js +0 -155
- package/dist/client/chunks/utils-Cq-j5E5I.js.map +0 -1
package/dist/adapters/utils.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require("./utils-
|
|
1
|
+
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require("./utils-CBR-9AMD.cjs");exports.buildTransformedQuery=e.t,exports.calculateQueryComplexity=e.n,exports.formatCubeResponse=e.r,exports.formatErrorResponse=e.i,exports.formatMetaResponse=e.a,exports.formatSqlResponse=e.o,exports.formatSqlString=e.S,exports.generateRequestId=e.s,exports.getDatabaseType=e.c,exports.handleBatchRequest=e.l,exports.handleDiscover=e.p,exports.handleDryRun=e.u,exports.handleLoad=e.m,exports.handleSuggest=e.d,exports.handleValidate=e.f,exports.normalizeQueryFields=e.h;
|
package/dist/adapters/utils.d.ts
CHANGED
|
@@ -275,10 +275,17 @@ export interface MCPOptions {
|
|
|
275
275
|
/** Base path for MCP endpoints (default: '/mcp') */
|
|
276
276
|
basePath?: string;
|
|
277
277
|
/**
|
|
278
|
-
* Allowed origins for MCP requests (
|
|
279
|
-
*
|
|
280
|
-
*
|
|
281
|
-
*
|
|
278
|
+
* Allowed origins for MCP requests (Origin header validation per MCP 2025-11-25,
|
|
279
|
+
* mitigating DNS rebinding).
|
|
280
|
+
*
|
|
281
|
+
* Default (when omitted): admit loopback origins (localhost / 127.x / [::1]) plus
|
|
282
|
+
* non-browser / server-to-server clients that send no Origin header (e.g. the Claude
|
|
283
|
+
* MCP connector, curl); every other browser Origin is rejected with 403.
|
|
284
|
+
*
|
|
285
|
+
* If a **browser front-end** calls `/mcp`, you MUST list its origin here to allow it,
|
|
286
|
+
* e.g. ['https://app.example.com']. Include the wildcard '*' to allow ALL origins
|
|
287
|
+
* (permissive mode — discouraged; prefer exact origins and/or {@link resourceMetadataUrl}
|
|
288
|
+
* auth as the primary control for public deployments).
|
|
282
289
|
*/
|
|
283
290
|
allowedOrigins?: string[];
|
|
284
291
|
/**
|
|
@@ -315,6 +322,11 @@ export interface MCPOptions {
|
|
|
315
322
|
* When set, MCP endpoints require a Bearer token in the Authorization header.
|
|
316
323
|
* Unauthenticated requests receive 401 with WWW-Authenticate pointing to this URL.
|
|
317
324
|
* Token validation is the responsibility of extractSecurityContext.
|
|
325
|
+
*
|
|
326
|
+
* Strongly recommended for any public deployment: auth is the primary access control
|
|
327
|
+
* for `/mcp`, while {@link allowedOrigins} validation is defense-in-depth against
|
|
328
|
+
* browser-driven (DNS-rebinding) requests. The Claude MCP connector supports the
|
|
329
|
+
* OAuth 2.1 / PRM flow this enables.
|
|
318
330
|
*/
|
|
319
331
|
resourceMetadataUrl?: string;
|
|
320
332
|
/**
|
package/dist/adapters/utils.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { S as e, a as t, c as n, d as r, f as i, h as a, i as o, l as s, m as c, n as l, o as u, p as d, r as f, s as p, t as m, u as h } from "./utils-
|
|
1
|
+
import { S as e, a as t, c as n, d as r, f as i, h as a, i as o, l as s, m as c, n as l, o as u, p as d, r as f, s as p, t as m, u as h } from "./utils-U7gV5wQL.js";
|
|
2
2
|
export { m as buildTransformedQuery, l as calculateQueryComplexity, f as formatCubeResponse, o as formatErrorResponse, t as formatMetaResponse, u as formatSqlResponse, e as formatSqlString, p as generateRequestId, n as getDatabaseType, s as handleBatchRequest, d as handleDiscover, h as handleDryRun, c as handleLoad, r as handleSuggest, i as handleValidate, a as normalizeQueryFields };
|
|
@@ -82,12 +82,16 @@ export declare const MCP_PROTOCOL_VERSION_HEADER = "mcp-protocol-version";
|
|
|
82
82
|
export declare function validateAcceptHeader(accept: string | null | undefined): boolean;
|
|
83
83
|
export interface OriginValidationOptions {
|
|
84
84
|
/**
|
|
85
|
-
* List of allowed origins (e.g., ['http://localhost:3000', 'https://myapp.com'])
|
|
86
|
-
* If not provided,
|
|
85
|
+
* List of allowed origins (e.g., ['http://localhost:3000', 'https://myapp.com']).
|
|
86
|
+
* If not provided, the default policy admits loopback origins (localhost / 127.x /
|
|
87
|
+
* [::1]) plus non-browser clients that send no Origin header; any other browser
|
|
88
|
+
* Origin is rejected. Include the wildcard `'*'` to allow ALL origins (permissive
|
|
89
|
+
* mode — discouraged; prefer listing exact origins or enabling auth).
|
|
87
90
|
*/
|
|
88
91
|
allowedOrigins?: string[];
|
|
89
92
|
/**
|
|
90
|
-
* If true, allows requests without an Origin header (non-browser
|
|
93
|
+
* If true, allows requests without an Origin header (non-browser / server-to-server
|
|
94
|
+
* clients such as the Claude MCP connector, curl, Postman).
|
|
91
95
|
* @default true
|
|
92
96
|
*/
|
|
93
97
|
allowMissingOrigin?: boolean;
|
|
@@ -97,6 +101,11 @@ export interface OriginValidationOptions {
|
|
|
97
101
|
* Servers MUST validate Origin to prevent DNS rebinding attacks.
|
|
98
102
|
* If Origin is present and invalid, MUST respond with 403 Forbidden.
|
|
99
103
|
*
|
|
104
|
+
* Default policy (no `allowedOrigins`): admit loopback origins and requests with no
|
|
105
|
+
* Origin header (non-browser / server-to-server clients); reject every other browser
|
|
106
|
+
* Origin. Configure `allowedOrigins` to expose a browser front-end, or include `'*'`
|
|
107
|
+
* to restore fully-permissive behavior.
|
|
108
|
+
*
|
|
100
109
|
* @returns { valid: true } if allowed, or { valid: false, reason: string } if blocked
|
|
101
110
|
*/
|
|
102
111
|
export declare function validateOriginHeader(origin: string | null | undefined, options?: OriginValidationOptions): {
|
|
@@ -105,6 +114,15 @@ export declare function validateOriginHeader(origin: string | null | undefined,
|
|
|
105
114
|
valid: false;
|
|
106
115
|
reason: string;
|
|
107
116
|
};
|
|
117
|
+
/**
|
|
118
|
+
* Build {@link OriginValidationOptions} from an MCP config, forwarding the
|
|
119
|
+
* configured allowlist (if any) so `validateOriginHeader` applies the same policy
|
|
120
|
+
* for POST, GET, and DELETE `/mcp` across every adapter. When `allowedOrigins` is
|
|
121
|
+
* absent, the loopback-only default policy applies.
|
|
122
|
+
*/
|
|
123
|
+
export declare function originOptionsFromMcp(mcp: {
|
|
124
|
+
allowedOrigins?: string[];
|
|
125
|
+
}): OriginValidationOptions;
|
|
108
126
|
/**
|
|
109
127
|
* Extract a Bearer token from an Authorization header.
|
|
110
128
|
* Returns the token string if present and well-formed, or null otherwise.
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { NextRequest } from 'next/server';
|
|
2
2
|
import { SemanticQuery, SecurityContext, DatabaseExecutor, DrizzleDatabase, Cube, CacheConfig, RLSSetupFn } from '../../server/index.js';
|
|
3
3
|
import { AgentConfig } from '../../server/agent/types.js';
|
|
4
|
+
import { SemanticLayerCompiler } from '../../server/compiler.js';
|
|
4
5
|
import { PostgresJsDatabase } from 'drizzle-orm/postgres-js';
|
|
5
6
|
import { MySql2Database } from 'drizzle-orm/mysql2';
|
|
6
7
|
import { BetterSQLite3Database } from 'drizzle-orm/better-sqlite3';
|
|
@@ -100,6 +101,15 @@ export interface NextAdapterOptions {
|
|
|
100
101
|
* to configure RLS (e.g., set JWT claims and switch Postgres roles), then runs the query.
|
|
101
102
|
*/
|
|
102
103
|
rlsSetup?: RLSSetupFn;
|
|
104
|
+
/**
|
|
105
|
+
* Pre-built semantic layer to reuse across handlers.
|
|
106
|
+
* When provided, the adapter reuses this compiler instead of constructing a
|
|
107
|
+
* new one (and skips cube registration — register cubes on it yourself).
|
|
108
|
+
* `createCubeHandlers` sets this internally so every handler it returns shares
|
|
109
|
+
* one compiler, keeping metadata/result caches consistent. Mirrors the Hono
|
|
110
|
+
* adapter's `semanticLayer` option.
|
|
111
|
+
*/
|
|
112
|
+
semanticLayer?: SemanticLayerCompiler;
|
|
103
113
|
}
|
|
104
114
|
export interface RouteContext {
|
|
105
115
|
params?: Record<string, string | string[]>;
|
|
@@ -275,10 +275,17 @@ export interface MCPOptions {
|
|
|
275
275
|
/** Base path for MCP endpoints (default: '/mcp') */
|
|
276
276
|
basePath?: string;
|
|
277
277
|
/**
|
|
278
|
-
* Allowed origins for MCP requests (
|
|
279
|
-
*
|
|
280
|
-
*
|
|
281
|
-
*
|
|
278
|
+
* Allowed origins for MCP requests (Origin header validation per MCP 2025-11-25,
|
|
279
|
+
* mitigating DNS rebinding).
|
|
280
|
+
*
|
|
281
|
+
* Default (when omitted): admit loopback origins (localhost / 127.x / [::1]) plus
|
|
282
|
+
* non-browser / server-to-server clients that send no Origin header (e.g. the Claude
|
|
283
|
+
* MCP connector, curl); every other browser Origin is rejected with 403.
|
|
284
|
+
*
|
|
285
|
+
* If a **browser front-end** calls `/mcp`, you MUST list its origin here to allow it,
|
|
286
|
+
* e.g. ['https://app.example.com']. Include the wildcard '*' to allow ALL origins
|
|
287
|
+
* (permissive mode — discouraged; prefer exact origins and/or {@link resourceMetadataUrl}
|
|
288
|
+
* auth as the primary control for public deployments).
|
|
282
289
|
*/
|
|
283
290
|
allowedOrigins?: string[];
|
|
284
291
|
/**
|
|
@@ -315,6 +322,11 @@ export interface MCPOptions {
|
|
|
315
322
|
* When set, MCP endpoints require a Bearer token in the Authorization header.
|
|
316
323
|
* Unauthenticated requests receive 401 with WWW-Authenticate pointing to this URL.
|
|
317
324
|
* Token validation is the responsibility of extractSecurityContext.
|
|
325
|
+
*
|
|
326
|
+
* Strongly recommended for any public deployment: auth is the primary access control
|
|
327
|
+
* for `/mcp`, while {@link allowedOrigins} validation is defense-in-depth against
|
|
328
|
+
* browser-driven (DNS-rebinding) requests. The Claude MCP connector supports the
|
|
329
|
+
* OAuth 2.1 / PRM flow this enables.
|
|
318
330
|
*/
|
|
319
331
|
resourceMetadataUrl?: string;
|
|
320
332
|
/**
|
|
@@ -1,19 +1,13 @@
|
|
|
1
1
|
import { Filter } from '../../../types.js';
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
* Recursively searches filters (including nested and/or groups)
|
|
5
|
-
* Handles both UI format ({type: 'and'/'or', filters: [...]}) and simple filters
|
|
6
|
-
*/
|
|
7
|
-
export declare function findDateFilterForField(filters: Filter[], field: string): {
|
|
8
|
-
dateRange: string | string[];
|
|
9
|
-
} | undefined;
|
|
2
|
+
import { findDateFilterForField } from '../../../shared/filters/index.js';
|
|
3
|
+
export { findDateFilterForField };
|
|
10
4
|
/**
|
|
11
5
|
* Build compareDateRange for a time dimension based on its date filter
|
|
12
6
|
* When comparison is enabled, returns [[currentStart, currentEnd], [priorStart, priorEnd]]
|
|
13
7
|
*/
|
|
14
8
|
export declare function buildCompareDateRangeFromFilter(timeDimensionField: string, filters: Filter[]): [string, string][] | undefined;
|
|
15
9
|
/**
|
|
16
|
-
* Remove
|
|
17
|
-
* Returns a new array with the filter removed (immutable)
|
|
10
|
+
* Remove the inDateRange filter for a specific field from a filters array.
|
|
11
|
+
* Returns a new array with the filter removed (immutable).
|
|
18
12
|
*/
|
|
19
13
|
export declare function removeComparisonDateFilter(filters: Filter[], field: string): Filter[];
|
|
@@ -4,7 +4,8 @@ export { getSortDirection, getSortTooltip, getNextSortDirection, } from './query
|
|
|
4
4
|
export type { DatePreset } from './dateRangeUtils.js';
|
|
5
5
|
export { DATE_PRESETS, XTD_OPTIONS, calculateDateRange, formatDateRangeDisplay, detectPresetFromDateRange, } from './dateRangeUtils.js';
|
|
6
6
|
export { formatFilterValueDisplay } from './filterDisplayUtils.js';
|
|
7
|
-
export { isSimpleFilter, isGroupFilter, isAndFilter, isOrFilter, flattenFilters, countFilters, createSimpleFilter, createAndFilter, createOrFilter, cleanupFilters, transformFiltersForServer, transformFiltersFromServer,
|
|
7
|
+
export { isSimpleFilter, isGroupFilter, isAndFilter, isOrFilter, flattenFilters, countFilters, createSimpleFilter, createAndFilter, createOrFilter, cleanupFilters, transformFiltersForServer, transformFiltersFromServer, getAvailableOperators, } from '../../shared/filters/index.js';
|
|
8
|
+
export { hasQueryContent, cleanQuery, cleanQueryForServer, transformQueryForUI, getCubeNameFromField, getFieldType, getFieldTitle, getAllFilterableFields, convertDateRangeTypeToValue, requiresNumberInput, formatDateForCube, } from '../../shared/utils.js';
|
|
8
9
|
/**
|
|
9
10
|
* Check if a field is selected in the current query
|
|
10
11
|
*/
|
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
import { CubeQuery, Filter, SimpleFilter, GroupFilter, CubeMeta } from '../../types.js';
|
|
2
|
+
/**
|
|
3
|
+
* Check if a filter is a simple filter.
|
|
4
|
+
*
|
|
5
|
+
* Discriminates against GroupFilter (which has `type`/`filters`, never
|
|
6
|
+
* `member`/`operator`). `values` is intentionally NOT required: valueless
|
|
7
|
+
* filters such as an `inDateRange` carrying only a `dateRange` are still simple.
|
|
8
|
+
*/
|
|
9
|
+
export declare function isSimpleFilter(filter: Filter): filter is SimpleFilter;
|
|
10
|
+
/**
|
|
11
|
+
* Check if a filter is a group filter
|
|
12
|
+
*/
|
|
13
|
+
export declare function isGroupFilter(filter: Filter): filter is GroupFilter;
|
|
14
|
+
/**
|
|
15
|
+
* Check if a filter is an AND filter
|
|
16
|
+
*/
|
|
17
|
+
export declare function isAndFilter(filter: Filter): filter is GroupFilter;
|
|
18
|
+
/**
|
|
19
|
+
* Check if a filter is an OR filter
|
|
20
|
+
*/
|
|
21
|
+
export declare function isOrFilter(filter: Filter): filter is GroupFilter;
|
|
22
|
+
/**
|
|
23
|
+
* Create a new simple filter
|
|
24
|
+
*/
|
|
25
|
+
export declare function createSimpleFilter(member: string, operator?: string, values?: any[]): SimpleFilter;
|
|
26
|
+
/**
|
|
27
|
+
* Create a new AND filter group
|
|
28
|
+
*/
|
|
29
|
+
export declare function createAndFilter(filters?: Filter[]): GroupFilter;
|
|
30
|
+
/**
|
|
31
|
+
* Create a new OR filter group
|
|
32
|
+
*/
|
|
33
|
+
export declare function createOrFilter(filters?: Filter[]): GroupFilter;
|
|
34
|
+
/**
|
|
35
|
+
* Clean up filters - backward compatible (returns filters unchanged)
|
|
36
|
+
* @deprecated This function is no longer used as we now support filtering on any schema field
|
|
37
|
+
*/
|
|
38
|
+
export declare function cleanupFilters(filters: Filter[], _query?: CubeQuery): Filter[];
|
|
39
|
+
/**
|
|
40
|
+
* Flatten all simple filters from a hierarchical filter structure
|
|
41
|
+
*/
|
|
42
|
+
export declare function flattenFilters(filters: Filter[]): SimpleFilter[];
|
|
43
|
+
/**
|
|
44
|
+
* Count total simple filters in a hierarchical structure
|
|
45
|
+
*/
|
|
46
|
+
export declare function countFilters(filters: Filter[]): number;
|
|
47
|
+
/**
|
|
48
|
+
* Extract all member names from a filter tree (handles nested group filters).
|
|
49
|
+
* Returns names in traversal order, including duplicates; callers that need
|
|
50
|
+
* unique fields should de-duplicate.
|
|
51
|
+
*/
|
|
52
|
+
export declare function extractFilterMembers(filters: Filter[]): string[];
|
|
53
|
+
/**
|
|
54
|
+
* Add a simple filter at a specific path in the filter tree.
|
|
55
|
+
* Path is an array of indices, e.g. [0, 2] means filters[0].filters[2].
|
|
56
|
+
* An empty path adds at the root, wrapping bare filters in an AND group as needed.
|
|
57
|
+
*/
|
|
58
|
+
export declare function addFilterAtPath(filters: Filter[], path: number[], newFilter: SimpleFilter): Filter[];
|
|
59
|
+
/**
|
|
60
|
+
* Remove a top-level filter by index, unwrapping a sole remaining single-filter
|
|
61
|
+
* group back to a bare filter (keeps the tree as shallow as possible).
|
|
62
|
+
*/
|
|
63
|
+
export declare function removeFilterAtIndex(filters: Filter[], index: number): Filter[];
|
|
64
|
+
/**
|
|
65
|
+
* Return a copy of a group with its type toggled between AND and OR
|
|
66
|
+
*/
|
|
67
|
+
export declare function toggleGroupType(group: GroupFilter): GroupFilter;
|
|
68
|
+
/**
|
|
69
|
+
* Find the first inDateRange filter for a given member, searching nested
|
|
70
|
+
* groups. Returns its dateRange (preferring the dateRange property).
|
|
71
|
+
*/
|
|
72
|
+
export declare function findDateFilterForField(filters: Filter[], field: string): {
|
|
73
|
+
dateRange: string | string[];
|
|
74
|
+
} | undefined;
|
|
75
|
+
/**
|
|
76
|
+
* Remove every simple filter matching a member (optionally restricted to an
|
|
77
|
+
* operator) from a filter tree, pruning groups that become empty. Immutable.
|
|
78
|
+
*/
|
|
79
|
+
export declare function removeFilterForMember(filters: Filter[], member: string, operator?: string): Filter[];
|
|
80
|
+
/**
|
|
81
|
+
* Transform filters from the UI GroupFilter format to the legacy server format.
|
|
82
|
+
* Server expects { and: [...] } / { or: [...] } instead of { type, filters }.
|
|
83
|
+
*/
|
|
84
|
+
export declare function transformFiltersForServer(filters: Filter[]): any[];
|
|
85
|
+
/**
|
|
86
|
+
* Transform filters from server/API format to UI format.
|
|
87
|
+
* Converts { and: [...] } / { or: [...] } to { type, filters } GroupFilters.
|
|
88
|
+
*/
|
|
89
|
+
export declare function transformFiltersFromServer(filters: any[]): Filter[];
|
|
90
|
+
/**
|
|
91
|
+
* Check if a filter's field(s) exist in the cube metadata. Helps identify
|
|
92
|
+
* filters that may not apply to a specific portlet's data. Fails open when no
|
|
93
|
+
* metadata is available.
|
|
94
|
+
*/
|
|
95
|
+
export declare function validateFilterForCube(filter: Filter, cubeMeta: CubeMeta | null): boolean;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Filter module — the single home for filter types, operator definitions, and
|
|
3
|
+
* add/remove/update-group manipulation logic. Consumed by both the dashboard
|
|
4
|
+
* filter UI and the analysis-builder filter UI; the two surfaces differ only in
|
|
5
|
+
* their value-source wiring, not in filter semantics.
|
|
6
|
+
*/
|
|
7
|
+
export type { Filter, SimpleFilter, GroupFilter, FilterOperator } from '../../types.js';
|
|
8
|
+
export type { FilterOperatorMeta } from './operators.js';
|
|
9
|
+
export { FILTER_OPERATORS, getAvailableOperators, normalizeFilterFieldType } from './operators.js';
|
|
10
|
+
export { isSimpleFilter, isGroupFilter, isAndFilter, isOrFilter, createSimpleFilter, createAndFilter, createOrFilter, cleanupFilters, flattenFilters, countFilters, extractFilterMembers, addFilterAtPath, removeFilterAtIndex, toggleGroupType, findDateFilterForField, removeFilterForMember, transformFiltersForServer, transformFiltersFromServer, validateFilterForCube } from './filterOperations.js';
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { FilterOperator } from '../../types.js';
|
|
2
|
+
export interface FilterOperatorMeta {
|
|
3
|
+
label: string;
|
|
4
|
+
description: string;
|
|
5
|
+
requiresValues: boolean;
|
|
6
|
+
supportsMultipleValues: boolean;
|
|
7
|
+
valueType: 'string' | 'number' | 'date' | 'boolean' | 'any';
|
|
8
|
+
fieldTypes: string[];
|
|
9
|
+
}
|
|
10
|
+
export declare const FILTER_OPERATORS: Record<FilterOperator, FilterOperatorMeta>;
|
|
11
|
+
/**
|
|
12
|
+
* Normalize a raw field/measure type to the category used by FILTER_OPERATORS.
|
|
13
|
+
* Measure aggregation types collapse to 'number' so the numeric operators apply
|
|
14
|
+
* (without this, e.g. a `countDistinct` measure would expose no operators).
|
|
15
|
+
*/
|
|
16
|
+
export declare function normalizeFilterFieldType(fieldType: string): string;
|
|
17
|
+
/**
|
|
18
|
+
* Get available operators for a field type
|
|
19
|
+
*/
|
|
20
|
+
export declare function getAvailableOperators(fieldType: string): Array<{
|
|
21
|
+
operator: string;
|
|
22
|
+
label: string;
|
|
23
|
+
}>;
|
|
@@ -3,8 +3,9 @@
|
|
|
3
3
|
* Common types, utilities, and components used across QueryBuilder and AnalysisBuilder
|
|
4
4
|
*/
|
|
5
5
|
export type { MetaField, MetaCube, MetaResponse, QueryAnalysis, PrimaryCubeSelectionReason, PrimaryCubeCandidate, PrimaryCubeAnalysis, JoinPathStep, JoinPathAnalysis, PreAggregationAnalysis, QuerySummary, ValidationResult, FilterOperatorMeta, DateRangeType, DateRangeOption, TimeGranularity } from './types.js';
|
|
6
|
-
export {
|
|
7
|
-
export { isSimpleFilter, isGroupFilter, isAndFilter, isOrFilter, flattenFilters, countFilters, createSimpleFilter, createAndFilter, createOrFilter, transformFiltersForServer, transformFiltersFromServer
|
|
6
|
+
export { DATE_RANGE_OPTIONS, TIME_GRANULARITIES } from './types.js';
|
|
7
|
+
export { FILTER_OPERATORS, getAvailableOperators, isSimpleFilter, isGroupFilter, isAndFilter, isOrFilter, flattenFilters, countFilters, createSimpleFilter, createAndFilter, createOrFilter, transformFiltersForServer, transformFiltersFromServer } from './filters/index.js';
|
|
8
|
+
export { hasQueryContent, cleanQuery, cleanQueryForServer, transformQueryForUI, getCubeNameFromField, getFieldType, getFieldTitle, getAllFilterableFields, convertDateRangeTypeToValue, requiresNumberInput, formatDateForCube } from './utils.js';
|
|
8
9
|
export { default as QueryAnalysisPanel } from './components/QueryAnalysisPanel.js';
|
|
9
10
|
export { default as CodeBlock } from './components/CodeBlock.js';
|
|
10
11
|
export { getChartAvailability, getAllChartAvailability, selectBestChartType, getSmartChartDefaults, shouldAutoSwitchChartType, mergeChartConfigWithDefaults } from './chartDefaults.js';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { CubeQuery
|
|
1
|
+
import { CubeQuery } from '../types.js';
|
|
2
2
|
export interface MetaField {
|
|
3
3
|
name: string;
|
|
4
4
|
title: string;
|
|
@@ -162,15 +162,8 @@ export interface ValidationResult {
|
|
|
162
162
|
joinType?: string;
|
|
163
163
|
analysis?: QueryAnalysis;
|
|
164
164
|
}
|
|
165
|
-
export
|
|
166
|
-
|
|
167
|
-
description: string;
|
|
168
|
-
requiresValues: boolean;
|
|
169
|
-
supportsMultipleValues: boolean;
|
|
170
|
-
valueType: 'string' | 'number' | 'date' | 'boolean' | 'any';
|
|
171
|
-
fieldTypes: string[];
|
|
172
|
-
}
|
|
173
|
-
export declare const FILTER_OPERATORS: Record<FilterOperator, FilterOperatorMeta>;
|
|
165
|
+
export type { FilterOperatorMeta } from './filters/operators.js';
|
|
166
|
+
export { FILTER_OPERATORS } from './filters/operators.js';
|
|
174
167
|
export type DateRangeType = 'custom' | 'today' | 'yesterday' | 'this_week' | 'this_month' | 'this_quarter' | 'this_year' | 'last_7_days' | 'last_30_days' | 'last_week' | 'last_month' | 'last_quarter' | 'last_year' | 'last_12_months' | 'last_n_days' | 'last_n_weeks' | 'last_n_months' | 'last_n_quarters' | 'last_n_years';
|
|
175
168
|
export interface DateRangeOption {
|
|
176
169
|
value: DateRangeType;
|
|
@@ -1,58 +1,7 @@
|
|
|
1
|
-
import { CubeQuery
|
|
1
|
+
import { CubeQuery } from '../types.js';
|
|
2
2
|
import { MetaField, MetaResponse } from './types.js';
|
|
3
3
|
import { cleanQuery } from './queryTransforms.js';
|
|
4
4
|
export { cleanQuery };
|
|
5
|
-
/**
|
|
6
|
-
* Check if a filter is a simple filter
|
|
7
|
-
*/
|
|
8
|
-
export declare function isSimpleFilter(filter: Filter): filter is SimpleFilter;
|
|
9
|
-
/**
|
|
10
|
-
* Check if a filter is a group filter
|
|
11
|
-
*/
|
|
12
|
-
export declare function isGroupFilter(filter: Filter): filter is GroupFilter;
|
|
13
|
-
/**
|
|
14
|
-
* Check if a filter is an AND filter
|
|
15
|
-
*/
|
|
16
|
-
export declare function isAndFilter(filter: Filter): filter is GroupFilter;
|
|
17
|
-
/**
|
|
18
|
-
* Check if a filter is an OR filter
|
|
19
|
-
*/
|
|
20
|
-
export declare function isOrFilter(filter: Filter): filter is GroupFilter;
|
|
21
|
-
/**
|
|
22
|
-
* Flatten all simple filters from a hierarchical filter structure
|
|
23
|
-
*/
|
|
24
|
-
export declare function flattenFilters(filters: Filter[]): SimpleFilter[];
|
|
25
|
-
/**
|
|
26
|
-
* Count total filters in hierarchical structure
|
|
27
|
-
*/
|
|
28
|
-
export declare function countFilters(filters: Filter[]): number;
|
|
29
|
-
/**
|
|
30
|
-
* Create a new simple filter
|
|
31
|
-
*/
|
|
32
|
-
export declare function createSimpleFilter(member: string, operator?: string, values?: any[]): SimpleFilter;
|
|
33
|
-
/**
|
|
34
|
-
* Create a new AND filter group
|
|
35
|
-
*/
|
|
36
|
-
export declare function createAndFilter(filters?: Filter[]): GroupFilter;
|
|
37
|
-
/**
|
|
38
|
-
* Create a new OR filter group
|
|
39
|
-
*/
|
|
40
|
-
export declare function createOrFilter(filters?: Filter[]): GroupFilter;
|
|
41
|
-
/**
|
|
42
|
-
* Clean up filters - backward compatible (returns filters unchanged)
|
|
43
|
-
* @deprecated This function is no longer used as we now support filtering on any schema field
|
|
44
|
-
*/
|
|
45
|
-
export declare function cleanupFilters(filters: Filter[], _query?: CubeQuery): Filter[];
|
|
46
|
-
/**
|
|
47
|
-
* Transform filters from new GroupFilter format to legacy server format
|
|
48
|
-
* Server expects { and: [...] } and { or: [...] } instead of { type: 'and', filters: [...] }
|
|
49
|
-
*/
|
|
50
|
-
export declare function transformFiltersForServer(filters: Filter[]): any[];
|
|
51
|
-
/**
|
|
52
|
-
* Transform filters from server/API format to UI format
|
|
53
|
-
* Converts {and: [...]} and {or: [...]} to {type: 'and', filters: [...]} format
|
|
54
|
-
*/
|
|
55
|
-
export declare function transformFiltersFromServer(filters: any[]): Filter[];
|
|
56
5
|
/**
|
|
57
6
|
* Check if query has any content (measures, dimensions, or timeDimensions)
|
|
58
7
|
*/
|
|
@@ -79,13 +28,6 @@ export declare function getFieldType(fieldName: string, schema: MetaResponse): s
|
|
|
79
28
|
* Get field title from schema metadata, falling back to field name
|
|
80
29
|
*/
|
|
81
30
|
export declare function getFieldTitle(fieldName: string, schema: MetaResponse | null): string;
|
|
82
|
-
/**
|
|
83
|
-
* Get available operators for a field type
|
|
84
|
-
*/
|
|
85
|
-
export declare function getAvailableOperators(fieldType: string): Array<{
|
|
86
|
-
operator: string;
|
|
87
|
-
label: string;
|
|
88
|
-
}>;
|
|
89
31
|
/**
|
|
90
32
|
* Get ALL filterable fields from schema
|
|
91
33
|
*/
|
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
import { Filter, DashboardFilter, DashboardFilterMapping, DashboardFilterMappingEntry, CubeMeta, DashboardConfig } from '../types.js';
|
|
2
|
+
import { validateFilterForCube } from '../shared/filters/index.js';
|
|
3
|
+
export { validateFilterForCube };
|
|
2
4
|
/**
|
|
3
5
|
* Normalize a portlet filter mapping to entry objects.
|
|
4
6
|
* Plain string entries (the legacy format) become { filterId } with no override.
|
|
@@ -61,14 +63,6 @@ export declare function mergeDashboardAndPortletFilters(dashboardFilters: Filter
|
|
|
61
63
|
* @deprecated Use mergeDashboardAndPortletFilters(filters, portletFilters, 'client') instead
|
|
62
64
|
*/
|
|
63
65
|
export declare function mergeDashboardAndPortletFiltersClientFormat(dashboardFilters: Filter[], portletFilters: Filter[] | undefined): Filter[] | undefined;
|
|
64
|
-
/**
|
|
65
|
-
* Check if a filter field exists in the cube metadata
|
|
66
|
-
* This helps identify filters that might not apply to a specific portlet's data
|
|
67
|
-
* @param filter - The filter to validate
|
|
68
|
-
* @param cubeMeta - Cube metadata to validate against
|
|
69
|
-
* @returns true if the filter field exists in any cube's measures or dimensions
|
|
70
|
-
*/
|
|
71
|
-
export declare function validateFilterForCube(filter: Filter, cubeMeta: CubeMeta | null): boolean;
|
|
72
66
|
/**
|
|
73
67
|
* Validate that all dashboard filters in a portlet's mapping exist and are valid
|
|
74
68
|
* @param dashboardFilters - All available dashboard filters
|
|
@@ -110,4 +104,3 @@ type TimeDimension = {
|
|
|
110
104
|
* @returns Updated timeDimensions array with date ranges applied
|
|
111
105
|
*/
|
|
112
106
|
export declare function applyUniversalTimeFilters(dashboardFilters: DashboardFilter[] | undefined, filterMapping: DashboardFilterMapping | undefined, portletTimeDimensions: TimeDimension[] | undefined): TimeDimension[] | undefined;
|
|
113
|
-
export {};
|
|
@@ -4,9 +4,15 @@ import { BaseDatabaseExecutor } from './base-executor.js';
|
|
|
4
4
|
export declare class SQLiteExecutor extends BaseDatabaseExecutor {
|
|
5
5
|
execute<T = any[]>(query: SQL | any, numericFields?: string[]): Promise<T>;
|
|
6
6
|
/**
|
|
7
|
-
* Convert numeric string fields to numbers (only for measure fields)
|
|
7
|
+
* Convert numeric string fields to numbers (only for measure fields), in place.
|
|
8
|
+
*
|
|
9
|
+
* Hot path for large result sets: this runs once per returned row. Rather than
|
|
10
|
+
* rebuild a fresh object per row (Object.entries + full-key copy), we mutate
|
|
11
|
+
* the driver-produced row — which we exclusively own — touching only the
|
|
12
|
+
* measure columns. Dimensions/time dimensions keep their original types.
|
|
13
|
+
* When there are no numeric fields, the rows are returned untouched.
|
|
8
14
|
*/
|
|
9
|
-
private
|
|
15
|
+
private convertNumericFieldsInPlace;
|
|
10
16
|
/**
|
|
11
17
|
* Coerce a value to a number if it represents a numeric type
|
|
12
18
|
*/
|
|
@@ -49,10 +49,5 @@ export declare class LogicalPlanBuilder {
|
|
|
49
49
|
private deduplicateColumnRefs;
|
|
50
50
|
private buildQueryNode;
|
|
51
51
|
private buildPreAggregationAnalysis;
|
|
52
|
-
private buildMeasureRefs;
|
|
53
|
-
private buildDimensionRefs;
|
|
54
|
-
private buildTimeDimensionRefs;
|
|
55
52
|
private buildOrderByRefs;
|
|
56
|
-
private toCubeRef;
|
|
57
|
-
private buildCTESchema;
|
|
58
53
|
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { Cube, PhysicalQueryPlan } from '../types/index.js';
|
|
2
|
+
import { SemanticQuery } from '../types/query.js';
|
|
3
|
+
import { CubeRef, MeasureRef, DimensionRef, TimeDimensionRef, LogicalSchema } from './types.js';
|
|
4
|
+
export declare function toCubeRef(cube: Cube): CubeRef;
|
|
5
|
+
export declare function buildMeasureRefs(query: SemanticQuery, cubes: Map<string, Cube>): MeasureRef[];
|
|
6
|
+
export declare function buildDimensionRefs(query: SemanticQuery, cubes: Map<string, Cube>): DimensionRef[];
|
|
7
|
+
export declare function buildTimeDimensionRefs(query: SemanticQuery, cubes: Map<string, Cube>): TimeDimensionRef[];
|
|
8
|
+
/**
|
|
9
|
+
* Compose the full logical schema (measures, dimensions, time dimensions) for a
|
|
10
|
+
* query. This is the primary public interface: `(query, cubes) => LogicalSchema`.
|
|
11
|
+
*/
|
|
12
|
+
export declare function buildLogicalSchema(query: SemanticQuery, cubes: Map<string, Cube>): LogicalSchema;
|
|
13
|
+
/**
|
|
14
|
+
* Derive the measures-only schema for a pre-aggregation CTE. Unlike the
|
|
15
|
+
* query-driven builders above, this intentionally does NOT throw on a missing
|
|
16
|
+
* cube (the cube is guaranteed present by the planner that produced the CTE
|
|
17
|
+
* descriptor) — preserving exact prior behavior keeps generated SQL unchanged.
|
|
18
|
+
*/
|
|
19
|
+
export declare function buildCTESchema(cteInfo: NonNullable<PhysicalQueryPlan['preAggregationCTEs']>[number], cubes: Map<string, Cube>): LogicalSchema;
|
package/dist/client/charts.js
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import { ct as e, dt as t, ft as n, lt as r, mt as i, pt as a, st as o, t as s, ut as c } from "./chunks/chart-data-table-
|
|
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-
|
|
6
|
-
import { i as S } from "./chunks/utils-
|
|
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-
|
|
1
|
+
import { ct as e, dt as t, ft as n, lt as r, mt as i, pt as a, st as o, t as s, ut as c } from "./chunks/chart-data-table-BP6DMdom.js";
|
|
2
|
+
import { d as l, l as u, s as d, u as f } from "./chunks/chart-activity-grid-DDqFVWoa.js";
|
|
3
|
+
import { t as p } from "./chunks/chart-funnel-xeVGBy-p.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-DAJbAD7a.js";
|
|
5
|
+
import { t as x } from "./chunks/chart-area-BHxPNsmc.js";
|
|
6
|
+
import { i as S } from "./chunks/utils-DjLiJKS_.js";
|
|
7
|
+
import { t as C } from "./chunks/chart-bar-DAO3PPcE.js";
|
|
8
|
+
import { t as w } from "./chunks/chart-line-sJK-cJc0.js";
|
|
9
|
+
import { t as T } from "./chunks/chart-pie-BDaaYt7a.js";
|
|
10
|
+
import { t as E } from "./chunks/chart-scatter-CRhGLCcy.js";
|
|
11
|
+
import { t as D } from "./chunks/chart-radar-Bz07PIVe.js";
|
|
12
|
+
import { t as O } from "./chunks/chart-radial-bar-DpyxKQMj.js";
|
|
13
|
+
import { t as k } from "./chunks/chart-tree-map-iI3ewOKY.js";
|
|
14
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, o as clearChartConfigCache, S as formatChartData, g as getAvailableChartTypes, e as getChartConfigAsync, r as getChartConfigSync, v as getUnavailableChartTypes, c as isChartConfigLoaded, h as isChartTypeAvailable, m as isValidChartType, t as loadAllChartConfigs, _ as preloadChart, n as preloadChartConfig, a as preloadChartConfigs, y as preloadCharts, i as useChartConfig };
|