drizzle-cube 0.15.4 → 0.15.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-CRStoJN7.js +1 -0
- package/dist/adapters/ActivityGridChart.config-UVIbGrZs.cjs +1 -0
- package/dist/adapters/AreaChart.config-C-64XzvV.cjs +1 -0
- package/dist/adapters/AreaChart.config-OSenKEDa.js +1 -0
- package/dist/adapters/BarChart.config-B3l-2o-5.cjs +1 -0
- package/dist/adapters/BarChart.config-BL-JqfNl.js +1 -0
- package/dist/adapters/BoxPlotChart.config-En2W9sCn.js +1 -0
- package/dist/adapters/BoxPlotChart.config-HT7Vqh3S.cjs +1 -0
- package/dist/adapters/BubbleChart.config-CdrtTNRu.cjs +1 -0
- package/dist/adapters/BubbleChart.config-DCyaRccE.js +1 -0
- package/dist/adapters/CandlestickChart.config-BI2Wti1n.cjs +1 -0
- package/dist/adapters/CandlestickChart.config-DkJ3DZBF.js +1 -0
- package/dist/adapters/DataTable.config-BWGLaGBR.js +1 -0
- package/dist/adapters/DataTable.config-D98yguXz.cjs +1 -0
- package/dist/adapters/DotStripChart.config-BZ4QHLwz.cjs +1 -0
- package/dist/adapters/DotStripChart.config-JPHZAfHq.js +1 -0
- package/dist/adapters/FunnelChart.config-D3WQSq3V.cjs +1 -0
- package/dist/adapters/FunnelChart.config-F0r0WayB.js +1 -0
- package/dist/adapters/GaugeChart.config-CEHrHMfs.cjs +1 -0
- package/dist/adapters/GaugeChart.config-DXdvqUYH.js +1 -0
- package/dist/adapters/HeatMapChart.config-BxKS-o0A.cjs +1 -0
- package/dist/adapters/HeatMapChart.config-D4Q45Omu.js +1 -0
- package/dist/adapters/KpiDelta.config-BBGRf802.js +1 -0
- package/dist/adapters/KpiDelta.config-CpILJrIk.cjs +1 -0
- package/dist/adapters/KpiNumber.config-CbirqFHq.cjs +1 -0
- package/dist/adapters/KpiNumber.config-DctOJjE-.js +1 -0
- package/dist/adapters/KpiText.config-BE67uez4.js +1 -0
- package/dist/adapters/KpiText.config-ChDZbNLQ.cjs +1 -0
- package/dist/adapters/LineChart.config-77h_gmww.js +1 -0
- package/dist/adapters/LineChart.config-V03h_sF5.cjs +1 -0
- package/dist/adapters/MarkdownChart.config-uiOrmHo7.cjs +1 -0
- package/dist/adapters/MarkdownChart.config-zHL8n3e_.js +1 -0
- package/dist/adapters/MeasureProfileChart.config-D-uRVi5J.cjs +1 -0
- package/dist/adapters/MeasureProfileChart.config-YFdPWnN0.js +1 -0
- package/dist/adapters/PieChart.config-DKJVsbZm.cjs +1 -0
- package/dist/adapters/PieChart.config-tDcrCy6I.js +1 -0
- package/dist/adapters/ProportionBarChart.config-Bd780fV1.cjs +1 -0
- package/dist/adapters/ProportionBarChart.config-BpUzsBL5.js +1 -0
- package/dist/adapters/RadarChart.config-DgscyxZj.js +1 -0
- package/dist/adapters/RadarChart.config-Dhz9TUf1.cjs +1 -0
- package/dist/adapters/RadialBarChart.config-CstfMNyO.js +1 -0
- package/dist/adapters/RadialBarChart.config-DU0g9Sqd.cjs +1 -0
- package/dist/adapters/RecordsTable.config-xWF_FwIf.js +1 -0
- package/dist/adapters/RecordsTable.config-yk1-fb7H.cjs +1 -0
- package/dist/adapters/RetentionCombinedChart.config-BPFKAI0l.js +1 -0
- package/dist/adapters/RetentionCombinedChart.config-BQEu6B6q.cjs +1 -0
- package/dist/adapters/RetentionHeatmap.config-B7wz6qj4.cjs +1 -0
- package/dist/adapters/RetentionHeatmap.config-BTX_CrZJ.js +1 -0
- package/dist/adapters/SankeyChart.config-CicdaFta.js +1 -0
- package/dist/adapters/SankeyChart.config-n21KdYxz.cjs +1 -0
- package/dist/adapters/ScatterChart.config-CToAMrS3.cjs +1 -0
- package/dist/adapters/ScatterChart.config-DE9FdKgm.js +1 -0
- package/dist/adapters/SunburstChart.config-BH1UDwp2.js +1 -0
- package/dist/adapters/SunburstChart.config-BNgHwK_7.cjs +1 -0
- package/dist/adapters/TreeMapChart.config-C6aMNMTc.cjs +1 -0
- package/dist/adapters/TreeMapChart.config-CxTQF8zN.js +1 -0
- package/dist/adapters/WaterfallChart.config-B9AeS0MH.cjs +1 -0
- package/dist/adapters/WaterfallChart.config-CtiVue_6.js +1 -0
- package/dist/adapters/core/index.cjs +1 -1
- package/dist/adapters/core/index.js +1 -1
- package/dist/adapters/{core-D6Ghepzl.cjs → core-BcdrjdP_.cjs} +1 -1
- package/dist/adapters/{core-BAwQ6u3F.js → core-p2tpIc-e.js} +2 -2
- package/dist/adapters/{cors-headers-BqdVnwOm.js → cors-headers-BtxruIvb.js} +1 -1
- package/dist/adapters/{cors-headers-B9wxgUI3.cjs → cors-headers-C-cQjvVu.cjs} +1 -1
- package/dist/adapters/express/index.cjs +1 -1
- package/dist/adapters/express/index.js +5 -5
- package/dist/adapters/fastify/index.cjs +1 -1
- package/dist/adapters/fastify/index.js +5 -5
- package/dist/adapters/{handler-TM2VACi3.js → handler-Bt51aMjp.js} +147 -123
- package/dist/adapters/handler-CUvj92A3.cjs +32 -0
- package/dist/adapters/hono/index.cjs +1 -1
- package/dist/adapters/hono/index.js +4 -4
- package/dist/adapters/mcp-app-html.cjs +1 -1
- package/dist/adapters/mcp-app-html.js +1 -1
- package/dist/adapters/mcp-tools.cjs +1 -1
- package/dist/adapters/mcp-tools.js +2 -2
- package/dist/adapters/{mcp-transport-BRcw-fQh.cjs → mcp-transport-BQdvIzJZ.cjs} +1 -1
- package/dist/adapters/{mcp-transport-Dd8CiQTk.js → mcp-transport-D_PRLMFH.js} +1 -1
- package/dist/adapters/nextjs/index.cjs +1 -1
- package/dist/adapters/nextjs/index.js +5 -5
- package/dist/adapters/{openai-GmnIW6fg.cjs → openai-B8PNzl8m.cjs} +1 -1
- package/dist/adapters/{openai-1xYjNPzU.cjs → openai-BO26SYis.cjs} +1 -1
- package/dist/adapters/{openai-CvzXzyAV.js → openai-D8lG5oYl.js} +1 -1
- package/dist/adapters/{openai-DedOllZH.js → openai-f29v_-Jd.js} +1 -1
- package/dist/adapters/{utils-2FhyAM0C.js → utils-BVIM2U0f.js} +6 -0
- package/dist/adapters/{utils-BQz41FNg.cjs → utils-CPSvgG1y.cjs} +1 -1
- package/dist/adapters/utils.cjs +1 -1
- package/dist/adapters/utils.js +1 -1
- package/dist/cjs/client/charts/chartConfigHelpers.d.ts +5 -0
- package/dist/cjs/client/components/AnalyticsDashboard.d.ts +1 -1
- package/dist/cjs/client/components/DashboardFilters/CompactFilterBar.d.ts +2 -0
- package/dist/cjs/client/components/DashboardFilters/EditModeFilterList.d.ts +2 -0
- package/dist/cjs/client/components/DashboardGrid.d.ts +3 -1
- package/dist/cjs/client/components/DashboardPortletCard.d.ts +1 -1
- package/dist/cjs/client/components/analyticsPortlet/parsePortletQuery.d.ts +5 -1
- package/dist/cjs/client/components/charts/WaterfallChart.d.ts +1 -1
- package/dist/cjs/client/components/charts/cartesianChartHelpers.d.ts +14 -1
- package/dist/cjs/client/components/charts/chartScaffolding.d.ts +61 -1
- package/dist/cjs/client/components/dashboard/DashboardContext.d.ts +7 -1
- package/dist/cjs/client/components/dashboard/DashboardCoordinator.d.ts +1 -1
- package/dist/cjs/client/components/dashboardPortletCard/PortletCardHeader.d.ts +2 -0
- package/dist/cjs/client/components/dashboardPortletCard/propsEqual.d.ts +3 -1
- package/dist/cjs/client/hooks/useResponsiveDashboard.d.ts +10 -1
- package/dist/cjs/client/hooks.d.ts +1 -1
- package/dist/cjs/client/index.d.ts +1 -1
- package/dist/cjs/client/types.d.ts +30 -0
- package/dist/cjs/client/utils/autoGranularity.d.ts +18 -0
- package/dist/cjs/client/utils/index.d.ts +1 -0
- package/dist/cjs/client/utils/timeAxisFormatting.d.ts +81 -0
- package/dist/client/charts/chartConfigHelpers.d.ts +5 -0
- package/dist/client/charts.js +12 -12
- package/dist/client/chunks/{ActivityGridChart-DYJkZzwx.js → ActivityGridChart-9jQtN8-K.js} +4 -4
- package/dist/client/chunks/{ActivityGridChart-DYJkZzwx.js.map → ActivityGridChart-9jQtN8-K.js.map} +1 -1
- package/dist/client/chunks/{BarSeries-RYOuAiaW.js → BarSeries-DK-vuiwN.js} +2 -2
- package/dist/client/chunks/{BarSeries-RYOuAiaW.js.map → BarSeries-DK-vuiwN.js.map} +1 -1
- package/dist/client/chunks/{BubbleChart-DYLLZ_cl.js → BubbleChart-C68fNRF0.js} +4 -4
- package/dist/client/chunks/{BubbleChart-DYLLZ_cl.js.map → BubbleChart-C68fNRF0.js.map} +1 -1
- package/dist/client/chunks/{BubbleChart.helpers-CjbCvUeT.js → BubbleChart.helpers-uNNiXCp3.js} +2 -2
- package/dist/client/chunks/{BubbleChart.helpers-CjbCvUeT.js.map → BubbleChart.helpers-uNNiXCp3.js.map} +1 -1
- package/dist/client/chunks/{ChartStates-CmQaadEo.js → ChartStates-q3isKswo.js} +2 -2
- package/dist/client/chunks/{ChartStates-CmQaadEo.js.map → ChartStates-q3isKswo.js.map} +1 -1
- package/dist/client/chunks/{ChartSummaryHeader-CD9xvGd8.js → ChartSummaryHeader-CArf-Zae.js} +3 -3
- package/dist/client/chunks/{ChartSummaryHeader-CD9xvGd8.js.map → ChartSummaryHeader-CArf-Zae.js.map} +1 -1
- package/dist/client/chunks/{DashboardEditModal-B7OSUOiv.js → DashboardEditModal-DE4tRYdM.js} +1954 -1932
- package/dist/client/chunks/DashboardEditModal-DE4tRYdM.js.map +1 -0
- package/dist/client/chunks/{DataHistogram-06lCYT_Q.js → DataHistogram-ByPAXQ7l.js} +2 -2
- package/dist/client/chunks/{DataHistogram-06lCYT_Q.js.map → DataHistogram-ByPAXQ7l.js.map} +1 -1
- package/dist/client/chunks/{DotStripChart-BmKYH2yE.js → DotStripChart-C6pnWcnJ.js} +5 -5
- package/dist/client/chunks/{DotStripChart-BmKYH2yE.js.map → DotStripChart-C6pnWcnJ.js.map} +1 -1
- package/dist/client/chunks/{FunnelViews-Ck885XTd.js → FunnelViews-CjbkdKgA.js} +2 -2
- package/dist/client/chunks/{FunnelViews-Ck885XTd.js.map → FunnelViews-CjbkdKgA.js.map} +1 -1
- package/dist/client/chunks/{HeatMapChart-CZeYGRLC.js → HeatMapChart-CNxD7vQ7.js} +4 -4
- package/dist/client/chunks/{HeatMapChart-CZeYGRLC.js.map → HeatMapChart-CNxD7vQ7.js.map} +1 -1
- package/dist/client/chunks/{KpiDelta-ls34EAAv.js → KpiDelta-_ZYYbF62.js} +2 -2
- package/dist/client/chunks/{KpiDelta-ls34EAAv.js.map → KpiDelta-_ZYYbF62.js.map} +1 -1
- package/dist/client/chunks/{KpiText-BByhn9KP.js → KpiText-DbqKXrt_.js} +2 -2
- package/dist/client/chunks/{KpiText-BByhn9KP.js.map → KpiText-DbqKXrt_.js.map} +1 -1
- package/dist/client/chunks/{MarkdownChart.helpers-BZuq25Uq.js → MarkdownChart.helpers-BXTbF88z.js} +2 -2
- package/dist/client/chunks/{MarkdownChart.helpers-BZuq25Uq.js.map → MarkdownChart.helpers-BXTbF88z.js.map} +1 -1
- package/dist/client/chunks/{PortletAnalysisModal-BUK4uJRQ.js → PortletAnalysisModal-DyAH0Fr6.js} +6 -6
- package/dist/client/chunks/{PortletAnalysisModal-BUK4uJRQ.js.map → PortletAnalysisModal-DyAH0Fr6.js.map} +1 -1
- package/dist/client/chunks/{ProportionBarChart-BCnhz3Xe.js → ProportionBarChart-C-leF5gI.js} +6 -6
- package/dist/client/chunks/{ProportionBarChart-BCnhz3Xe.js.map → ProportionBarChart-C-leF5gI.js.map} +1 -1
- package/dist/client/chunks/{RecordsTable-DpFttrbE.js → RecordsTable-DYZF1s9w.js} +6 -6
- package/dist/client/chunks/{RecordsTable-DpFttrbE.js.map → RecordsTable-DYZF1s9w.js.map} +1 -1
- package/dist/client/chunks/{RetentionCombinedChart-D6HL0Ewc.js → RetentionCombinedChart-CQXtz2yS.js} +3 -3
- package/dist/client/chunks/{RetentionCombinedChart-D6HL0Ewc.js.map → RetentionCombinedChart-CQXtz2yS.js.map} +1 -1
- package/dist/client/chunks/{RetentionHeatmap-4-FOghfG.js → RetentionHeatmap-1Thi6ecj.js} +2 -2
- package/dist/client/chunks/{RetentionHeatmap-4-FOghfG.js.map → RetentionHeatmap-1Thi6ecj.js.map} +1 -1
- package/dist/client/chunks/{ScatterSeries-C69e7fWt.js → ScatterSeries-B4nwj1RE.js} +2 -2
- package/dist/client/chunks/{ScatterSeries-C69e7fWt.js.map → ScatterSeries-B4nwj1RE.js.map} +1 -1
- package/dist/client/chunks/{SchemaVisualization-BLNTnD5S.js → SchemaVisualization--StKeQKD.js} +1 -1
- package/dist/client/chunks/{TextPortletModal-DH5HkRuy.js → TextPortletModal-BLokJrUd.js} +4 -4
- package/dist/client/chunks/{TextPortletModal-DH5HkRuy.js.map → TextPortletModal-BLokJrUd.js.map} +1 -1
- package/dist/client/chunks/{TreeMapLegend-CccnfTYy.js → TreeMapLegend-D_vqfx_X.js} +2 -2
- package/dist/client/chunks/{TreeMapLegend-CccnfTYy.js.map → TreeMapLegend-D_vqfx_X.js.map} +1 -1
- package/dist/client/chunks/{analysis-builder-Bau8adTK.js → analysis-builder-ChpumcKg.js} +10 -10
- package/dist/client/chunks/{analysis-builder-Bau8adTK.js.map → analysis-builder-ChpumcKg.js.map} +1 -1
- package/dist/client/chunks/{analysis-builder-shared-DFMkGsT_.js → analysis-builder-shared-0wLNwq5q.js} +64 -64
- package/dist/client/chunks/{analysis-builder-shared-DFMkGsT_.js.map → analysis-builder-shared-0wLNwq5q.js.map} +1 -1
- package/dist/client/chunks/cartesianChartHelpers-Do-TAOih.js +421 -0
- package/dist/client/chunks/cartesianChartHelpers-Do-TAOih.js.map +1 -0
- package/dist/client/chunks/{chart-activity-grid-DgXF88W6.js → chart-activity-grid-B9dC1A5R.js} +5 -5
- package/dist/client/chunks/{chart-activity-grid-DgXF88W6.js.map → chart-activity-grid-B9dC1A5R.js.map} +1 -1
- package/dist/client/chunks/chart-area-BEXKNAXv.js +138 -0
- package/dist/client/chunks/chart-area-BEXKNAXv.js.map +1 -0
- package/dist/client/chunks/chart-bar-SMb2q1G9.js +143 -0
- package/dist/client/chunks/chart-bar-SMb2q1G9.js.map +1 -0
- package/dist/client/chunks/{chart-box-plot-DzY4pP09.js → chart-box-plot-C5COpr1_.js} +3 -3
- package/dist/client/chunks/{chart-box-plot-DzY4pP09.js.map → chart-box-plot-C5COpr1_.js.map} +1 -1
- package/dist/client/chunks/{chart-bubble-Dmcv09zb.js → chart-bubble-Df2C1LQW.js} +5 -5
- package/dist/client/chunks/{chart-bubble-Dmcv09zb.js.map → chart-bubble-Df2C1LQW.js.map} +1 -1
- package/dist/client/chunks/{chart-candlestick-BQbqfz7P.js → chart-candlestick-DuDaGj4R.js} +3 -3
- package/dist/client/chunks/{chart-candlestick-BQbqfz7P.js.map → chart-candlestick-DuDaGj4R.js.map} +1 -1
- package/dist/client/chunks/{chart-config-area-Bvft9O_T.js → chart-config-area-DVA0oKNp.js} +11 -10
- package/dist/client/chunks/chart-config-area-DVA0oKNp.js.map +1 -0
- package/dist/client/chunks/{chart-config-bar-OyxCyA3e.js → chart-config-bar-DhqbYfpf.js} +9 -8
- package/dist/client/chunks/chart-config-bar-DhqbYfpf.js.map +1 -0
- package/dist/client/chunks/{chart-config-kpi-delta-ZMObFeZr.js → chart-config-kpi-delta-BPMq7hzP.js} +2 -2
- package/dist/client/chunks/{chart-config-kpi-delta-ZMObFeZr.js.map → chart-config-kpi-delta-BPMq7hzP.js.map} +1 -1
- package/dist/client/chunks/{chart-config-kpi-number-C6rnZbNk.js → chart-config-kpi-number-B83Z2jLe.js} +2 -2
- package/dist/client/chunks/{chart-config-kpi-number-C6rnZbNk.js.map → chart-config-kpi-number-B83Z2jLe.js.map} +1 -1
- package/dist/client/chunks/{chart-config-line-FKcg6zYi.js → chart-config-line-CYwh72pj.js} +11 -10
- package/dist/client/chunks/chart-config-line-CYwh72pj.js.map +1 -0
- package/dist/client/chunks/{chart-config-measure-profile-Bw7okF4K.js → chart-config-measure-profile-Chi9pZNK.js} +5 -3
- package/dist/client/chunks/chart-config-measure-profile-Chi9pZNK.js.map +1 -0
- package/dist/client/chunks/{chart-config-pie-tNg_02bP.js → chart-config-pie-CenIR70H.js} +2 -2
- package/dist/client/chunks/{chart-config-pie-tNg_02bP.js.map → chart-config-pie-CenIR70H.js.map} +1 -1
- package/dist/client/chunks/{chart-config-radar-BbK_cePI.js → chart-config-radar-iBtE5R3S.js} +2 -2
- package/dist/client/chunks/{chart-config-radar-BbK_cePI.js.map → chart-config-radar-iBtE5R3S.js.map} +1 -1
- package/dist/client/chunks/{chart-config-radial-bar-B-ysOwq_.js → chart-config-radial-bar-U0gm1O8q.js} +2 -2
- package/dist/client/chunks/{chart-config-radial-bar-B-ysOwq_.js.map → chart-config-radial-bar-U0gm1O8q.js.map} +1 -1
- package/dist/client/chunks/{chart-config-tree-map-CES9mAql.js → chart-config-tree-map-DxSNKyGd.js} +2 -2
- package/dist/client/chunks/{chart-config-tree-map-CES9mAql.js.map → chart-config-tree-map-DxSNKyGd.js.map} +1 -1
- package/dist/client/chunks/{chart-config-waterfall-D3xkuYph.js → chart-config-waterfall-DtDzu_14.js} +5 -3
- package/dist/client/chunks/chart-config-waterfall-DtDzu_14.js.map +1 -0
- package/dist/client/chunks/{chart-data-table-CPjBzcme.js → chart-data-table-CytJbYDW.js} +5 -5
- package/dist/client/chunks/{chart-data-table-CPjBzcme.js.map → chart-data-table-CytJbYDW.js.map} +1 -1
- package/dist/client/chunks/{chart-funnel-DO66-IUH.js → chart-funnel-CXV90Ndw.js} +3 -3
- package/dist/client/chunks/{chart-funnel-DO66-IUH.js.map → chart-funnel-CXV90Ndw.js.map} +1 -1
- package/dist/client/chunks/{chart-gauge-BqWifMPW.js → chart-gauge-C4nY8NQj.js} +5 -5
- package/dist/client/chunks/{chart-gauge-BqWifMPW.js.map → chart-gauge-C4nY8NQj.js.map} +1 -1
- package/dist/client/chunks/{chart-heat-map-Cqsz9upg.js → chart-heat-map-BebyQ9Vf.js} +5 -5
- package/dist/client/chunks/{chart-heat-map-Cqsz9upg.js.map → chart-heat-map-BebyQ9Vf.js.map} +1 -1
- package/dist/client/chunks/{chart-kpi-delta-Bn_Anifd.js → chart-kpi-delta-CeEhPFso.js} +4 -4
- package/dist/client/chunks/{chart-kpi-delta-Bn_Anifd.js.map → chart-kpi-delta-CeEhPFso.js.map} +1 -1
- package/dist/client/chunks/{chart-kpi-number-6Hp4nqp9.js → chart-kpi-number-BU6XRX3h.js} +4 -4
- package/dist/client/chunks/{chart-kpi-number-6Hp4nqp9.js.map → chart-kpi-number-BU6XRX3h.js.map} +1 -1
- package/dist/client/chunks/{chart-kpi-text-Dbe-anJN.js → chart-kpi-text-skyF2iq6.js} +5 -5
- package/dist/client/chunks/{chart-kpi-text-Dbe-anJN.js.map → chart-kpi-text-skyF2iq6.js.map} +1 -1
- package/dist/client/chunks/chart-line-JtvhnFif.js +135 -0
- package/dist/client/chunks/chart-line-JtvhnFif.js.map +1 -0
- package/dist/client/chunks/{chart-markdown-BN0nnp-T.js → chart-markdown-CdrimJrm.js} +3 -3
- package/dist/client/chunks/{chart-markdown-BN0nnp-T.js.map → chart-markdown-CdrimJrm.js.map} +1 -1
- package/dist/client/chunks/{chart-measure-profile-B3bL3mfE.js → chart-measure-profile-DOl_xbBI.js} +19 -11
- package/dist/client/chunks/chart-measure-profile-DOl_xbBI.js.map +1 -0
- package/dist/client/chunks/{chart-pie-BD2UKMmW.js → chart-pie-DY_3XcSj.js} +6 -6
- package/dist/client/chunks/{chart-pie-BD2UKMmW.js.map → chart-pie-DY_3XcSj.js.map} +1 -1
- package/dist/client/chunks/{chart-radar-NyciE337.js → chart-radar-qus6NAYq.js} +6 -6
- package/dist/client/chunks/{chart-radar-NyciE337.js.map → chart-radar-qus6NAYq.js.map} +1 -1
- package/dist/client/chunks/{chart-radial-bar-BrmjHNAL.js → chart-radial-bar-CmvRUW7j.js} +6 -6
- package/dist/client/chunks/{chart-radial-bar-BrmjHNAL.js.map → chart-radial-bar-CmvRUW7j.js.map} +1 -1
- package/dist/client/chunks/{chart-sankey-DWPKdkOS.js → chart-sankey-Blp-T8_v.js} +2 -2
- package/dist/client/chunks/{chart-sankey-DWPKdkOS.js.map → chart-sankey-Blp-T8_v.js.map} +1 -1
- package/dist/client/chunks/{chart-scatter-CTvzOt2P.js → chart-scatter-BvHmImdY.js} +7 -7
- package/dist/client/chunks/{chart-scatter-CTvzOt2P.js.map → chart-scatter-BvHmImdY.js.map} +1 -1
- package/dist/client/chunks/{chart-sunburst-B3DzSatC.js → chart-sunburst-CYCSZ6pL.js} +2 -2
- package/dist/client/chunks/{chart-sunburst-B3DzSatC.js.map → chart-sunburst-CYCSZ6pL.js.map} +1 -1
- package/dist/client/chunks/{chart-tree-map-DyTG0Alb.js → chart-tree-map-DXl7KCM8.js} +7 -7
- package/dist/client/chunks/{chart-tree-map-DyTG0Alb.js.map → chart-tree-map-DXl7KCM8.js.map} +1 -1
- package/dist/client/chunks/{chart-waterfall-bJ_W_eiJ.js → chart-waterfall-E8bbmkm7.js} +99 -81
- package/dist/client/chunks/chart-waterfall-E8bbmkm7.js.map +1 -0
- package/dist/client/chunks/{chartComponentRegistry-xa0hV8aQ.js → chartComponentRegistry-LNS2NwAv.js} +4 -4
- package/dist/client/chunks/{chartComponentRegistry-xa0hV8aQ.js.map → chartComponentRegistry-LNS2NwAv.js.map} +1 -1
- package/dist/client/chunks/{chartPlugin-uXUb0QRv.js → chartPlugin-yM7JPt-B.js} +14 -14
- package/dist/client/chunks/{chartPlugin-uXUb0QRv.js.map → chartPlugin-yM7JPt-B.js.map} +1 -1
- package/dist/client/chunks/{chartRegistry-CVOMsXOK.js → chartRegistry-CI9eqtt9.js} +57 -38
- package/dist/client/chunks/chartRegistry-CI9eqtt9.js.map +1 -0
- package/dist/client/chunks/chartScaffolding-DcJLGHlm.js +188 -0
- package/dist/client/chunks/chartScaffolding-DcJLGHlm.js.map +1 -0
- package/dist/client/chunks/{chartUtils-CcCLgSOB.js → chartUtils-C49Kr8Nt.js} +2 -2
- package/dist/client/chunks/{chartUtils-CcCLgSOB.js.map → chartUtils-C49Kr8Nt.js.map} +1 -1
- package/dist/client/chunks/{charts-core-BHhJICdb.js → charts-core-Cur4p6Mn.js} +3 -3
- package/dist/client/chunks/{charts-core-BHhJICdb.js.map → charts-core-Cur4p6Mn.js.map} +1 -1
- package/dist/client/chunks/{charts-loader-fPRsqaiJ.js → charts-loader-dfaiJVGE.js} +32 -32
- package/dist/client/chunks/{charts-loader-fPRsqaiJ.js.map → charts-loader-dfaiJVGE.js.map} +1 -1
- package/dist/client/chunks/{dashboardExport-Cz_5rWlF.js → dashboardExport-Cuas_Jm2.js} +203 -144
- package/dist/client/chunks/dashboardExport-Cuas_Jm2.js.map +1 -0
- package/dist/client/chunks/{gaugeChartHelpers-D1QsCg21.js → gaugeChartHelpers-B0uUgsQ4.js} +2 -2
- package/dist/client/chunks/{gaugeChartHelpers-D1QsCg21.js.map → gaugeChartHelpers-B0uUgsQ4.js.map} +1 -1
- package/dist/client/chunks/{nl-NL-DtiGzigu.js → nl-NL-Dl2q6V08.js} +7 -1
- package/dist/client/chunks/nl-NL-Dl2q6V08.js.map +1 -0
- package/dist/client/chunks/{pivotUtils-Cc-PAP1w.js → pivotUtils-CD_kVHWS.js} +2 -2
- package/dist/client/chunks/{pivotUtils-Cc-PAP1w.js.map → pivotUtils-CD_kVHWS.js.map} +1 -1
- package/dist/client/chunks/{providers-DJq_2QU4.js → providers-BanUxi9o.js} +4 -4
- package/dist/client/chunks/{providers-DJq_2QU4.js.map → providers-BanUxi9o.js.map} +1 -1
- package/dist/client/chunks/{radarChartHelpers-B6Tcvmjg.js → radarChartHelpers-MSCZGEBc.js} +2 -2
- package/dist/client/chunks/{radarChartHelpers-B6Tcvmjg.js.map → radarChartHelpers-MSCZGEBc.js.map} +1 -1
- package/dist/client/chunks/{radialBarChartHelpers-2KuJKH_9.js → radialBarChartHelpers-CJ0tVPGJ.js} +2 -2
- package/dist/client/chunks/{radialBarChartHelpers-2KuJKH_9.js.map → radialBarChartHelpers-CJ0tVPGJ.js.map} +1 -1
- package/dist/client/chunks/{schema-visualization-B04dKs1c.js → schema-visualization-BBuxndAv.js} +5 -5
- package/dist/client/chunks/{schema-visualization-B04dKs1c.js.map → schema-visualization-BBuxndAv.js.map} +1 -1
- package/dist/client/chunks/{useCubeFieldLabel-DwTL-1fd.js → useCubeFieldLabel-DORlYhRk.js} +2 -2
- package/dist/client/chunks/{useCubeFieldLabel-DwTL-1fd.js.map → useCubeFieldLabel-DORlYhRk.js.map} +1 -1
- package/dist/client/chunks/{useCubeMetaQuery-CKkxam6t.js → useCubeMetaQuery-ClNaCRP-.js} +2 -2
- package/dist/client/chunks/{useCubeMetaQuery-CKkxam6t.js.map → useCubeMetaQuery-ClNaCRP-.js.map} +1 -1
- package/dist/client/chunks/{useDirtyStateTracking-CesO_Xr8.js → useDirtyStateTracking-BA8JTfGP.js} +111 -108
- package/dist/client/chunks/useDirtyStateTracking-BA8JTfGP.js.map +1 -0
- package/dist/client/chunks/{useExplainAI-B9CqKiqE.js → useExplainAI-DhkrNycx.js} +3 -3
- package/dist/client/chunks/{useExplainAI-B9CqKiqE.js.map → useExplainAI-DhkrNycx.js.map} +1 -1
- package/dist/client/chunks/{useTranslation-DgVTqWyJ.js → useTranslation-DQ_tbKyn.js} +9 -3
- package/dist/client/chunks/{useTranslation-DgVTqWyJ.js.map → useTranslation-DQ_tbKyn.js.map} +1 -1
- package/dist/client/chunks/utils-4nU07wK8.js.map +1 -1
- package/dist/client/components/AnalyticsDashboard.d.ts +1 -1
- package/dist/client/components/DashboardFilters/CompactFilterBar.d.ts +2 -0
- package/dist/client/components/DashboardFilters/EditModeFilterList.d.ts +2 -0
- package/dist/client/components/DashboardGrid.d.ts +3 -1
- package/dist/client/components/DashboardPortletCard.d.ts +1 -1
- package/dist/client/components/analyticsPortlet/parsePortletQuery.d.ts +5 -1
- package/dist/client/components/charts/WaterfallChart.d.ts +1 -1
- package/dist/client/components/charts/cartesianChartHelpers.d.ts +14 -1
- package/dist/client/components/charts/chartScaffolding.d.ts +61 -1
- package/dist/client/components/dashboard/DashboardContext.d.ts +7 -1
- package/dist/client/components/dashboard/DashboardCoordinator.d.ts +1 -1
- package/dist/client/components/dashboardPortletCard/PortletCardHeader.d.ts +2 -0
- package/dist/client/components/dashboardPortletCard/propsEqual.d.ts +3 -1
- package/dist/client/components.js +17 -17
- package/dist/client/components.js.map +1 -1
- package/dist/client/hooks/useResponsiveDashboard.d.ts +10 -1
- package/dist/client/hooks.d.ts +1 -1
- package/dist/client/hooks.js +3 -3
- package/dist/client/icons.js +1 -1
- package/dist/client/index.d.ts +1 -1
- package/dist/client/index.js +14 -14
- 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/types.d.ts +30 -0
- package/dist/client/utils/autoGranularity.d.ts +18 -0
- package/dist/client/utils/index.d.ts +1 -0
- package/dist/client/utils/timeAxisFormatting.d.ts +81 -0
- package/dist/client/utils.js +12 -12
- package/dist/client/utils.js.map +1 -1
- package/dist/client-bundle-stats.html +1 -1
- package/dist/mcp-app/mcp-app.html +111 -111
- package/dist/server/{chartConfigHelpers-CLCi4RHs.js → chartConfigHelpers-BZ93eyEi.js} +22 -1
- package/dist/server/{chartConfigHelpers-BhME7ow_.cjs → chartConfigHelpers-DqYCkMe-.cjs} +1 -1
- package/dist/server/index.cjs +3 -3
- package/dist/server/index.js +1732 -1721
- package/package.json +2 -2
- package/dist/adapters/ActivityGridChart.config-BiO_BwqY.cjs +0 -1
- package/dist/adapters/ActivityGridChart.config-CEwmvCjC.js +0 -1
- package/dist/adapters/AreaChart.config-BXAsVmwo.cjs +0 -1
- package/dist/adapters/AreaChart.config-CiXadO2d.js +0 -1
- package/dist/adapters/BarChart.config-By2FZ2kF.js +0 -1
- package/dist/adapters/BarChart.config-CW27elpr.cjs +0 -1
- package/dist/adapters/BoxPlotChart.config-CepOeLm6.js +0 -1
- package/dist/adapters/BoxPlotChart.config-tiimrKXX.cjs +0 -1
- package/dist/adapters/BubbleChart.config-36YTcVrQ.cjs +0 -1
- package/dist/adapters/BubbleChart.config-CsgN3Ttr.js +0 -1
- package/dist/adapters/CandlestickChart.config-B1_CPFAW.cjs +0 -1
- package/dist/adapters/CandlestickChart.config-DCeUTeiy.js +0 -1
- package/dist/adapters/DataTable.config-DxYwamnu.js +0 -1
- package/dist/adapters/DataTable.config-IN3GABQx.cjs +0 -1
- package/dist/adapters/DotStripChart.config-4nqXGR4i.cjs +0 -1
- package/dist/adapters/DotStripChart.config-DTO7E6Ya.js +0 -1
- package/dist/adapters/FunnelChart.config-DDzcKtc-.cjs +0 -1
- package/dist/adapters/FunnelChart.config-DywH337V.js +0 -1
- package/dist/adapters/GaugeChart.config-B15umptj.cjs +0 -1
- package/dist/adapters/GaugeChart.config-B649tVKp.js +0 -1
- package/dist/adapters/HeatMapChart.config-BdCTMqLA.js +0 -1
- package/dist/adapters/HeatMapChart.config-IMBhg4W9.cjs +0 -1
- package/dist/adapters/KpiDelta.config-BHgaI9Gx.cjs +0 -1
- package/dist/adapters/KpiDelta.config-OsBjIc_V.js +0 -1
- package/dist/adapters/KpiNumber.config-Bv9riES9.js +0 -1
- package/dist/adapters/KpiNumber.config-CYDzBYFA.cjs +0 -1
- package/dist/adapters/KpiText.config-RnsCqsm9.js +0 -1
- package/dist/adapters/KpiText.config-Y8Rnb2Nj.cjs +0 -1
- package/dist/adapters/LineChart.config-C3g8_jPt.js +0 -1
- package/dist/adapters/LineChart.config-CUfL4ZkJ.cjs +0 -1
- package/dist/adapters/MarkdownChart.config-CpijhI2w.cjs +0 -1
- package/dist/adapters/MarkdownChart.config-Jn4Zb-NH.js +0 -1
- package/dist/adapters/MeasureProfileChart.config-BfKPTnqR.js +0 -1
- package/dist/adapters/MeasureProfileChart.config-DCDH31a3.cjs +0 -1
- package/dist/adapters/PieChart.config-Bg3Mao5o.cjs +0 -1
- package/dist/adapters/PieChart.config-CIF81MzA.js +0 -1
- package/dist/adapters/ProportionBarChart.config-BlPsMMEk.cjs +0 -1
- package/dist/adapters/ProportionBarChart.config-BmTVGcQW.js +0 -1
- package/dist/adapters/RadarChart.config-BycPR9z8.js +0 -1
- package/dist/adapters/RadarChart.config-Dog6QtI2.cjs +0 -1
- package/dist/adapters/RadialBarChart.config-Di3ovQ4K.js +0 -1
- package/dist/adapters/RadialBarChart.config-Zj0zioze.cjs +0 -1
- package/dist/adapters/RecordsTable.config-BadLMdUV.js +0 -1
- package/dist/adapters/RecordsTable.config-inxw1DXR.cjs +0 -1
- package/dist/adapters/RetentionCombinedChart.config-Dr2dpeDV.cjs +0 -1
- package/dist/adapters/RetentionCombinedChart.config-OJsvPybR.js +0 -1
- package/dist/adapters/RetentionHeatmap.config-C51uRSfX.cjs +0 -1
- package/dist/adapters/RetentionHeatmap.config-DVnwGs5p.js +0 -1
- package/dist/adapters/SankeyChart.config-CAXBtVXD.js +0 -1
- package/dist/adapters/SankeyChart.config-DxhC9P0u.cjs +0 -1
- package/dist/adapters/ScatterChart.config-ClCGa8Lt.js +0 -1
- package/dist/adapters/ScatterChart.config-CoPZgwLx.cjs +0 -1
- package/dist/adapters/SunburstChart.config-DrZfdP6B.cjs +0 -1
- package/dist/adapters/SunburstChart.config-bKBKmu4e.js +0 -1
- package/dist/adapters/TreeMapChart.config-C-S7VqVg.cjs +0 -1
- package/dist/adapters/TreeMapChart.config-C12JqraB.js +0 -1
- package/dist/adapters/WaterfallChart.config-C5kwn5iF.js +0 -1
- package/dist/adapters/WaterfallChart.config-UcJtN8HT.cjs +0 -1
- package/dist/adapters/handler-8sQlwdFt.cjs +0 -32
- package/dist/client/chunks/AngledXAxisTick-DTvPXpZV.js +0 -21
- package/dist/client/chunks/AngledXAxisTick-DTvPXpZV.js.map +0 -1
- package/dist/client/chunks/DashboardEditModal-B7OSUOiv.js.map +0 -1
- package/dist/client/chunks/cartesianChartHelpers-XuqUcTM1.js +0 -256
- package/dist/client/chunks/cartesianChartHelpers-XuqUcTM1.js.map +0 -1
- package/dist/client/chunks/chart-area-D6InVJ_Y.js +0 -125
- package/dist/client/chunks/chart-area-D6InVJ_Y.js.map +0 -1
- package/dist/client/chunks/chart-bar-BkiQa3FZ.js +0 -129
- package/dist/client/chunks/chart-bar-BkiQa3FZ.js.map +0 -1
- package/dist/client/chunks/chart-config-area-Bvft9O_T.js.map +0 -1
- package/dist/client/chunks/chart-config-bar-OyxCyA3e.js.map +0 -1
- package/dist/client/chunks/chart-config-line-FKcg6zYi.js.map +0 -1
- package/dist/client/chunks/chart-config-measure-profile-Bw7okF4K.js.map +0 -1
- package/dist/client/chunks/chart-config-waterfall-D3xkuYph.js.map +0 -1
- package/dist/client/chunks/chart-line-CIsG5AVG.js +0 -122
- package/dist/client/chunks/chart-line-CIsG5AVG.js.map +0 -1
- package/dist/client/chunks/chart-measure-profile-B3bL3mfE.js.map +0 -1
- package/dist/client/chunks/chart-waterfall-bJ_W_eiJ.js.map +0 -1
- package/dist/client/chunks/chartRegistry-CVOMsXOK.js.map +0 -1
- package/dist/client/chunks/chartScaffolding-CBw7fDuD.js +0 -131
- package/dist/client/chunks/chartScaffolding-CBw7fDuD.js.map +0 -1
- package/dist/client/chunks/dashboardExport-Cz_5rWlF.js.map +0 -1
- package/dist/client/chunks/nl-NL-DtiGzigu.js.map +0 -1
- package/dist/client/chunks/useDirtyStateTracking-CesO_Xr8.js.map +0 -1
|
@@ -1,15 +1,16 @@
|
|
|
1
1
|
import e, { useMemo as t } from "react";
|
|
2
|
-
import { t as n } from "./useTranslation-
|
|
2
|
+
import { t as n } from "./useTranslation-DQ_tbKyn.js";
|
|
3
3
|
import { Bar as r, CartesianGrid as i, Cell as a, ComposedChart as o, LabelList as s, Legend as c, Line as l, XAxis as u, YAxis as d } from "recharts";
|
|
4
|
-
import { n as f, t as p } from "./charts-core-
|
|
5
|
-
import { t as m } from "./
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
4
|
+
import { n as f, t as p } from "./charts-core-Cur4p6Mn.js";
|
|
5
|
+
import { t as m } from "./chartScaffolding-DcJLGHlm.js";
|
|
6
|
+
import { u as h } from "./cartesianChartHelpers-Do-TAOih.js";
|
|
7
|
+
import { r as g } from "./chartConstants-BDkVHEEM.js";
|
|
8
|
+
import { n as _ } from "./chartUtils-C49Kr8Nt.js";
|
|
9
|
+
import { t as v } from "./useCubeFieldLabel-DORlYhRk.js";
|
|
10
|
+
import { jsx as y, jsxs as b } from "react/jsx-runtime";
|
|
10
11
|
// src/client/components/charts/WaterfallChart.tsx
|
|
11
|
-
var
|
|
12
|
-
function
|
|
12
|
+
var x = "#22c55e", S = "#ef4444", C = "#6366f1", w = "#94a3b8";
|
|
13
|
+
function T(e, t, n, r, i) {
|
|
13
14
|
let a = 0, o = e.map((e, r) => {
|
|
14
15
|
let i = String(e[t] ?? `Row ${r + 1}`), o = e[n], s = typeof o == "number" ? o : parseFloat(String(o ?? "")), c = isNaN(s) ? 0 : s, l = c < 0, u = l ? a + c : a, d = {
|
|
15
16
|
label: i,
|
|
@@ -36,11 +37,11 @@ function w(e, t, n, r, i) {
|
|
|
36
37
|
}
|
|
37
38
|
return o;
|
|
38
39
|
}
|
|
39
|
-
function
|
|
40
|
+
function E(e) {
|
|
40
41
|
let { x: t = 0, y: n = 0, width: r = 0, value: i = 0, isNegative: a, displayValue: o } = e;
|
|
41
42
|
if (o == null) return null;
|
|
42
43
|
let s = Number(o), c = a || s < 0 ? n + i + 14 : n - 6;
|
|
43
|
-
return /* @__PURE__ */
|
|
44
|
+
return /* @__PURE__ */ b("text", {
|
|
44
45
|
x: t + r / 2,
|
|
45
46
|
y: c,
|
|
46
47
|
fill: "currentColor",
|
|
@@ -49,96 +50,113 @@ function T(e) {
|
|
|
49
50
|
children: [s >= 0 ? "+" : "", s.toLocaleString()]
|
|
50
51
|
});
|
|
51
52
|
}
|
|
52
|
-
var
|
|
53
|
-
let { t:
|
|
54
|
-
let e = Array.isArray(
|
|
53
|
+
var D = e.memo(function({ data: e, chartConfig: D, displayConfig: O = {}, queryObject: k, height: A = "100%", onDataPointClick: j, drillEnabled: M }) {
|
|
54
|
+
let { t: N, locale: P } = n(), F = v(), I = O?.showTotal ?? !0, L = O?.showConnectorLine ?? !0, R = O?.showDataLabels ?? !1, z = O?.leftYAxisFormat, { xAxisField: B, yAxisField: V, configError: H } = t(() => {
|
|
55
|
+
let e = Array.isArray(D?.xAxis) ? D.xAxis[0] : D?.x, t = Array.isArray(D?.yAxis) ? D.yAxis[0] : D?.y?.[0];
|
|
55
56
|
return {
|
|
56
57
|
xAxisField: e,
|
|
57
58
|
yAxisField: t,
|
|
58
59
|
configError: !e || !t ? "Waterfall chart requires an X-axis dimension and a Y-axis measure" : null
|
|
59
60
|
};
|
|
60
|
-
}, [
|
|
61
|
+
}, [D]), U = t(() => H || !e || e.length === 0 || !B || !V ? [] : T(e, B, V, I, F), [
|
|
61
62
|
e,
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
]),
|
|
63
|
+
B,
|
|
64
|
+
V,
|
|
65
|
+
I,
|
|
66
|
+
F,
|
|
67
|
+
H
|
|
68
|
+
]), W = t(() => !L || U.length === 0 ? [] : U.map((e) => {
|
|
68
69
|
let t = e.isNegative ? e.runningBase : e.runningBase + e.value;
|
|
69
70
|
return {
|
|
70
71
|
label: e.label,
|
|
71
72
|
_connector: t
|
|
72
73
|
};
|
|
73
|
-
}), [
|
|
74
|
+
}), [U, L]), G = t(() => U.map((e, t) => ({
|
|
74
75
|
...e,
|
|
75
|
-
_connector:
|
|
76
|
-
})), [
|
|
76
|
+
_connector: W[t]?._connector
|
|
77
|
+
})), [U, W]);
|
|
77
78
|
try {
|
|
78
|
-
|
|
79
|
+
if (!e || e.length === 0) return /* @__PURE__ */ y("div", {
|
|
79
80
|
className: "dc:flex dc:items-center dc:justify-center dc:w-full text-dc-text-muted",
|
|
80
|
-
style: { height:
|
|
81
|
-
children: /* @__PURE__ */
|
|
81
|
+
style: { height: A },
|
|
82
|
+
children: /* @__PURE__ */ b("div", {
|
|
82
83
|
className: "dc:text-center",
|
|
83
|
-
children: [/* @__PURE__ */
|
|
84
|
+
children: [/* @__PURE__ */ y("div", {
|
|
84
85
|
className: "dc:text-sm dc:font-semibold dc:mb-1",
|
|
85
|
-
children:
|
|
86
|
-
}), /* @__PURE__ */
|
|
86
|
+
children: N("chart.runtime.noData")
|
|
87
|
+
}), /* @__PURE__ */ y("div", {
|
|
87
88
|
className: "dc:text-xs text-dc-text-secondary",
|
|
88
|
-
children:
|
|
89
|
+
children: N("chart.runtime.noDataHint.waterfall")
|
|
89
90
|
})]
|
|
90
91
|
})
|
|
91
|
-
})
|
|
92
|
+
});
|
|
93
|
+
if (H) return /* @__PURE__ */ y("div", {
|
|
92
94
|
className: "dc:flex dc:items-center dc:justify-center dc:w-full text-dc-warning",
|
|
93
|
-
style: { height:
|
|
94
|
-
children: /* @__PURE__ */
|
|
95
|
+
style: { height: A },
|
|
96
|
+
children: /* @__PURE__ */ b("div", {
|
|
95
97
|
className: "dc:text-center",
|
|
96
|
-
children: [/* @__PURE__ */
|
|
98
|
+
children: [/* @__PURE__ */ y("div", {
|
|
97
99
|
className: "dc:text-sm dc:font-semibold dc:mb-1",
|
|
98
|
-
children:
|
|
99
|
-
}), /* @__PURE__ */
|
|
100
|
+
children: N("chart.runtime.configError")
|
|
101
|
+
}), /* @__PURE__ */ y("div", {
|
|
100
102
|
className: "dc:text-xs",
|
|
101
|
-
children:
|
|
103
|
+
children: H
|
|
102
104
|
})]
|
|
103
105
|
})
|
|
104
|
-
})
|
|
106
|
+
});
|
|
107
|
+
let t = G.map((e) => e.label), n = h(t, k, B, {
|
|
108
|
+
locale: P,
|
|
109
|
+
formatQuarter: (e, t) => N("chart.axis.quarterTick", {
|
|
110
|
+
quarter: e,
|
|
111
|
+
year: t
|
|
112
|
+
})
|
|
113
|
+
}), v = m({
|
|
114
|
+
values: t,
|
|
115
|
+
tickFormatter: n,
|
|
116
|
+
mode: O?.xAxisLabels,
|
|
117
|
+
isTimeAxis: n !== void 0
|
|
118
|
+
});
|
|
119
|
+
return /* @__PURE__ */ y("div", {
|
|
105
120
|
className: "dc:relative dc:w-full",
|
|
106
|
-
style: { height:
|
|
107
|
-
children: /* @__PURE__ */
|
|
121
|
+
style: { height: A },
|
|
122
|
+
children: /* @__PURE__ */ y(f, {
|
|
108
123
|
height: "100%",
|
|
109
|
-
children: /* @__PURE__ */
|
|
110
|
-
data:
|
|
124
|
+
children: /* @__PURE__ */ b(o, {
|
|
125
|
+
data: G,
|
|
111
126
|
margin: {
|
|
112
|
-
...
|
|
127
|
+
...g,
|
|
113
128
|
left: 40
|
|
114
129
|
},
|
|
115
130
|
accessibilityLayer: !1,
|
|
116
131
|
children: [
|
|
117
|
-
/* @__PURE__ */
|
|
132
|
+
/* @__PURE__ */ y(i, {
|
|
118
133
|
strokeDasharray: "3 3",
|
|
119
134
|
style: { pointerEvents: "none" }
|
|
120
135
|
}),
|
|
121
|
-
/* @__PURE__ */
|
|
136
|
+
/* @__PURE__ */ y(u, {
|
|
122
137
|
dataKey: "label",
|
|
123
138
|
type: "category",
|
|
124
|
-
tick:
|
|
125
|
-
|
|
139
|
+
tick: v.tick,
|
|
140
|
+
tickFormatter: v.tickFormatter,
|
|
141
|
+
height: v.height,
|
|
142
|
+
interval: v.interval,
|
|
143
|
+
minTickGap: v.minTickGap
|
|
126
144
|
}),
|
|
127
|
-
/* @__PURE__ */
|
|
145
|
+
/* @__PURE__ */ y(d, {
|
|
128
146
|
tick: { fontSize: 12 },
|
|
129
|
-
tickFormatter:
|
|
147
|
+
tickFormatter: z ? (e) => _(e, z) : void 0
|
|
130
148
|
}),
|
|
131
|
-
/* @__PURE__ */
|
|
149
|
+
/* @__PURE__ */ y(p, {
|
|
132
150
|
formatter: (e, t, n) => {
|
|
133
151
|
if (t === "_connector") return ["", ""];
|
|
134
152
|
let r = n?.payload;
|
|
135
153
|
if (!r) return [e, t];
|
|
136
154
|
let i = r.displayValue ?? e;
|
|
137
|
-
return [
|
|
155
|
+
return [z ? _(i, z) : i?.toLocaleString?.() ?? i, r.isTotal ? "Total" : r.isNegative ? "Decrease" : "Increase"];
|
|
138
156
|
},
|
|
139
157
|
labelFormatter: (e) => e
|
|
140
158
|
}),
|
|
141
|
-
/* @__PURE__ */
|
|
159
|
+
/* @__PURE__ */ y(c, {
|
|
142
160
|
wrapperStyle: {
|
|
143
161
|
fontSize: "12px",
|
|
144
162
|
paddingTop: "8px"
|
|
@@ -147,36 +165,36 @@ var E = e.memo(function({ data: e, chartConfig: E, displayConfig: D = {}, height
|
|
|
147
165
|
{
|
|
148
166
|
value: "Increase",
|
|
149
167
|
type: "rect",
|
|
150
|
-
color:
|
|
168
|
+
color: x
|
|
151
169
|
},
|
|
152
170
|
{
|
|
153
171
|
value: "Decrease",
|
|
154
172
|
type: "rect",
|
|
155
|
-
color:
|
|
173
|
+
color: S
|
|
156
174
|
},
|
|
157
|
-
...
|
|
175
|
+
...I ? [{
|
|
158
176
|
value: "Total",
|
|
159
177
|
type: "rect",
|
|
160
|
-
color:
|
|
178
|
+
color: C
|
|
161
179
|
}] : []
|
|
162
180
|
]
|
|
163
181
|
}),
|
|
164
|
-
/* @__PURE__ */
|
|
182
|
+
/* @__PURE__ */ y(r, {
|
|
165
183
|
dataKey: "runningBase",
|
|
166
184
|
stackId: "wf",
|
|
167
185
|
fill: "transparent",
|
|
168
186
|
legendType: "none",
|
|
169
187
|
isAnimationActive: !1
|
|
170
188
|
}),
|
|
171
|
-
/* @__PURE__ */
|
|
189
|
+
/* @__PURE__ */ b(r, {
|
|
172
190
|
dataKey: "value",
|
|
173
191
|
stackId: "wf",
|
|
174
192
|
isAnimationActive: !1,
|
|
175
|
-
cursor:
|
|
193
|
+
cursor: M ? "pointer" : void 0,
|
|
176
194
|
onClick: (e, t, n) => {
|
|
177
|
-
|
|
195
|
+
j && M && e && !e.isTotal && j({
|
|
178
196
|
dataPoint: e,
|
|
179
|
-
clickedField:
|
|
197
|
+
clickedField: V,
|
|
180
198
|
xValue: e.label,
|
|
181
199
|
position: {
|
|
182
200
|
x: n.clientX,
|
|
@@ -185,20 +203,20 @@ var E = e.memo(function({ data: e, chartConfig: E, displayConfig: D = {}, height
|
|
|
185
203
|
nativeEvent: n
|
|
186
204
|
});
|
|
187
205
|
},
|
|
188
|
-
children: [
|
|
206
|
+
children: [R && /* @__PURE__ */ y(s, {
|
|
189
207
|
dataKey: "displayValue",
|
|
190
|
-
content: (e) => /* @__PURE__ */
|
|
208
|
+
content: (e) => /* @__PURE__ */ y(E, {
|
|
191
209
|
...e,
|
|
192
|
-
runningBase:
|
|
193
|
-
isNegative:
|
|
194
|
-
displayValue:
|
|
210
|
+
runningBase: G[e.index]?.runningBase,
|
|
211
|
+
isNegative: G[e.index]?.isNegative,
|
|
212
|
+
displayValue: G[e.index]?.displayValue
|
|
195
213
|
})
|
|
196
|
-
}),
|
|
214
|
+
}), G.map((e, t) => /* @__PURE__ */ y(a, { fill: e.isTotal ? C : e.isNegative ? S : x }, `cell-${t}`))]
|
|
197
215
|
}),
|
|
198
|
-
|
|
216
|
+
L && /* @__PURE__ */ y(l, {
|
|
199
217
|
type: "stepAfter",
|
|
200
218
|
dataKey: "_connector",
|
|
201
|
-
stroke:
|
|
219
|
+
stroke: w,
|
|
202
220
|
strokeWidth: 1.5,
|
|
203
221
|
strokeDasharray: "4 2",
|
|
204
222
|
dot: !1,
|
|
@@ -211,29 +229,29 @@ var E = e.memo(function({ data: e, chartConfig: E, displayConfig: D = {}, height
|
|
|
211
229
|
})
|
|
212
230
|
});
|
|
213
231
|
} catch (e) {
|
|
214
|
-
return /* @__PURE__ */
|
|
232
|
+
return /* @__PURE__ */ y("div", {
|
|
215
233
|
className: "dc:flex dc:flex-col dc:items-center dc:justify-center dc:w-full text-dc-error dc:p-4",
|
|
216
|
-
style: { height:
|
|
217
|
-
children: /* @__PURE__ */
|
|
234
|
+
style: { height: A },
|
|
235
|
+
children: /* @__PURE__ */ b("div", {
|
|
218
236
|
className: "dc:text-center",
|
|
219
237
|
children: [
|
|
220
|
-
/* @__PURE__ */
|
|
238
|
+
/* @__PURE__ */ y("div", {
|
|
221
239
|
className: "dc:text-sm dc:font-semibold dc:mb-1",
|
|
222
|
-
children:
|
|
240
|
+
children: N("chart.runtime.chartError", { chartType: "Waterfall Chart" })
|
|
223
241
|
}),
|
|
224
|
-
/* @__PURE__ */
|
|
242
|
+
/* @__PURE__ */ y("div", {
|
|
225
243
|
className: "dc:text-xs dc:mb-2",
|
|
226
|
-
children: e instanceof Error ? e.message :
|
|
244
|
+
children: e instanceof Error ? e.message : N("chart.runtime.unknownError")
|
|
227
245
|
}),
|
|
228
|
-
/* @__PURE__ */
|
|
246
|
+
/* @__PURE__ */ y("div", {
|
|
229
247
|
className: "dc:text-xs text-dc-text-muted",
|
|
230
|
-
children:
|
|
248
|
+
children: N("chart.runtime.checkConfig")
|
|
231
249
|
})
|
|
232
250
|
]
|
|
233
251
|
})
|
|
234
252
|
});
|
|
235
253
|
}
|
|
236
254
|
});
|
|
237
|
-
export {
|
|
255
|
+
export { D as default };
|
|
238
256
|
|
|
239
|
-
//# sourceMappingURL=chart-waterfall-
|
|
257
|
+
//# sourceMappingURL=chart-waterfall-E8bbmkm7.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"chart-waterfall-E8bbmkm7.js","names":["_jsxs","_jsx","React","useMemo","useTranslation","Bar","CartesianGrid","Cell","ComposedChart","LabelList","Legend","Line","XAxis","YAxis","ChartContainer","ChartTooltip","getCartesianXAxisProps","makeTimeAxisTickFormatter","CHART_MARGINS","formatAxisValue","useCubeFieldLabel","jsx","jsxs","POSITIVE_COLOR","NEGATIVE_COLOR","TOTAL_COLOR","CONNECTOR_COLOR","transformToWaterfall","data","xField","yField","showTotal","getFieldLabel","running","result","row","i","label","rawValue","parsed","value","isNegative","base","point","totalLabel","ValueLabel","props","x","y","width","displayValue","numericValue","yPos","WaterfallChart","chartConfig","displayConfig","queryObject","height","onDataPointClick","drillEnabled","t","locale","showConnectorLine","showDataLabels","yAxisFormat","xAxisField","yAxisField","configError","waterfallData","connectorData","d","connectorY","chartData","xAxisValues","timeTickFormatter","quarter","year","xAxisProps","v","name","entry","barData","_index","event","index","error"],"sources":["../../../src/client/components/charts/WaterfallChart.tsx"],"sourcesContent":["import React, { useMemo } from 'react'\nimport { useTranslation } from '../../hooks/useTranslation.js'\nimport { ComposedChart, Bar, Line, XAxis, YAxis, CartesianGrid, Cell, LabelList, Legend } from 'recharts'\nimport ChartContainer from './ChartContainer.js'\nimport ChartTooltip from './ChartTooltip.js'\nimport { getCartesianXAxisProps } from './chartScaffolding.js'\nimport { makeTimeAxisTickFormatter } from './cartesianChartHelpers.js'\nimport { CHART_MARGINS } from '../../utils/chartConstants.js'\nimport { formatAxisValue } from '../../utils/chartUtils.js'\nimport { useCubeFieldLabel } from '../../hooks/useCubeFieldLabel.js'\nimport type { ChartProps } from '../../types.js'\n\nconst POSITIVE_COLOR = '#22c55e'\nconst NEGATIVE_COLOR = '#ef4444'\nconst TOTAL_COLOR = '#6366f1'\nconst CONNECTOR_COLOR = '#94a3b8'\n\ninterface WaterfallDataPoint {\n label: string\n value: number\n runningBase: number\n isTotal: boolean\n isNegative: boolean\n displayValue: number\n originalIndex: number\n}\n\nfunction transformToWaterfall(\n data: Record<string, unknown>[],\n xField: string,\n yField: string,\n showTotal: boolean,\n getFieldLabel: (field: string) => string\n): WaterfallDataPoint[] {\n let running = 0\n const result: WaterfallDataPoint[] = data.map((row, i) => {\n const label = String(row[xField] ?? `Row ${i + 1}`)\n const rawValue = row[yField]\n const parsed = typeof rawValue === 'number' ? rawValue : parseFloat(String(rawValue ?? ''))\n const value = isNaN(parsed) ? 0 : parsed\n const isNegative = value < 0\n const base = isNegative ? running + value : running\n const point: WaterfallDataPoint = {\n label,\n value: Math.abs(value),\n runningBase: base,\n isTotal: false,\n isNegative,\n displayValue: value,\n originalIndex: i,\n }\n running += value\n return point\n })\n\n if (showTotal) {\n const totalLabel = getFieldLabel(yField) || 'Total'\n result.push({\n label: totalLabel,\n value: Math.abs(running),\n runningBase: running >= 0 ? 0 : running,\n isTotal: true,\n isNegative: running < 0,\n displayValue: running,\n originalIndex: result.length,\n })\n }\n\n return result\n}\n\ninterface ValueLabelProps {\n x?: number\n y?: number\n width?: number\n value?: number\n isNegative?: boolean\n displayValue?: number\n}\n\nfunction ValueLabel(props: ValueLabelProps) {\n const { x = 0, y = 0, width = 0, value = 0, isNegative, displayValue } = props\n if (displayValue === undefined || displayValue === null) return null\n const numericValue = Number(displayValue)\n const isNeg = isNegative || numericValue < 0\n const yPos = isNeg ? y + value + 14 : y - 6\n return (\n <text\n x={x + width / 2}\n y={yPos}\n fill=\"currentColor\"\n textAnchor=\"middle\"\n fontSize={11}\n >\n {numericValue >= 0 ? '+' : ''}{numericValue.toLocaleString()}\n </text>\n )\n}\n\nconst WaterfallChart = React.memo(function WaterfallChart({\n data,\n chartConfig,\n displayConfig = {},\n queryObject,\n height = '100%',\n onDataPointClick,\n drillEnabled,\n}: ChartProps) {\n const { t, locale } = useTranslation()\n const getFieldLabel = useCubeFieldLabel()\n\n const showTotal = displayConfig?.showTotal ?? true\n const showConnectorLine = displayConfig?.showConnectorLine ?? true\n const showDataLabels = displayConfig?.showDataLabels ?? false\n const yAxisFormat = displayConfig?.leftYAxisFormat\n\n const { xAxisField, yAxisField, configError } = useMemo(() => {\n const xAxisField: string | undefined = Array.isArray(chartConfig?.xAxis)\n ? chartConfig.xAxis[0]\n : chartConfig?.x\n const yAxisField: string | undefined = Array.isArray(chartConfig?.yAxis)\n ? chartConfig.yAxis[0]\n : chartConfig?.y?.[0]\n const configError =\n !xAxisField || !yAxisField\n ? 'Waterfall chart requires an X-axis dimension and a Y-axis measure'\n : null\n return { xAxisField, yAxisField, configError }\n }, [chartConfig])\n\n const waterfallData = useMemo(() => {\n if (configError || !data || data.length === 0 || !xAxisField || !yAxisField) return []\n return transformToWaterfall(\n data as Record<string, unknown>[],\n xAxisField,\n yAxisField,\n showTotal,\n getFieldLabel\n )\n }, [data, xAxisField, yAxisField, showTotal, getFieldLabel, configError])\n\n const connectorData = useMemo(() => {\n if (!showConnectorLine || waterfallData.length === 0) return []\n return waterfallData.map((d) => {\n const connectorY = d.isNegative ? d.runningBase : d.runningBase + d.value\n return { label: d.label, _connector: connectorY }\n })\n }, [waterfallData, showConnectorLine])\n\n const chartData = useMemo(() => {\n return waterfallData.map((d, i) => ({\n ...d,\n _connector: connectorData[i]?._connector,\n }))\n }, [waterfallData, connectorData])\n\n try {\n if (!data || data.length === 0) {\n return (\n <div className=\"dc:flex dc:items-center dc:justify-center dc:w-full text-dc-text-muted\" style={{ height }}>\n <div className=\"dc:text-center\">\n <div className=\"dc:text-sm dc:font-semibold dc:mb-1\">{t('chart.runtime.noData')}</div>\n <div className=\"dc:text-xs text-dc-text-secondary\">{t('chart.runtime.noDataHint.waterfall')}</div>\n </div>\n </div>\n )\n }\n\n if (configError) {\n return (\n <div className=\"dc:flex dc:items-center dc:justify-center dc:w-full text-dc-warning\" style={{ height }}>\n <div className=\"dc:text-center\">\n <div className=\"dc:text-sm dc:font-semibold dc:mb-1\">{t('chart.runtime.configError')}</div>\n <div className=\"dc:text-xs\">{configError}</div>\n </div>\n </div>\n )\n }\n // A time X axis gets compact ticks; the tooltip keeps the full label.\n const xAxisValues = chartData.map((d) => d.label)\n const timeTickFormatter = makeTimeAxisTickFormatter(xAxisValues, queryObject, xAxisField, {\n locale,\n formatQuarter: (quarter: number, year: string) => t('chart.axis.quarterTick', { quarter, year })\n })\n const xAxisProps = getCartesianXAxisProps({\n values: xAxisValues,\n tickFormatter: timeTickFormatter,\n mode: displayConfig?.xAxisLabels,\n isTimeAxis: timeTickFormatter !== undefined\n })\n\n return (\n <div className=\"dc:relative dc:w-full\" style={{ height }}>\n <ChartContainer height=\"100%\">\n <ComposedChart data={chartData} margin={{ ...CHART_MARGINS, left: 40 }} accessibilityLayer={false}>\n <CartesianGrid strokeDasharray=\"3 3\" style={{ pointerEvents: 'none' }} />\n <XAxis\n dataKey=\"label\"\n type=\"category\"\n tick={xAxisProps.tick}\n tickFormatter={xAxisProps.tickFormatter}\n height={xAxisProps.height}\n interval={xAxisProps.interval}\n minTickGap={xAxisProps.minTickGap}\n />\n <YAxis\n tick={{ fontSize: 12 }}\n tickFormatter={yAxisFormat ? (v) => formatAxisValue(v, yAxisFormat) : undefined}\n />\n <ChartTooltip\n formatter={(value: any, name: any, props: any) => {\n if (name === '_connector') return ['', '']\n const entry = props?.payload\n if (!entry) return [value, name]\n const displayValue = entry.displayValue ?? value\n return [\n yAxisFormat ? formatAxisValue(displayValue, yAxisFormat) : displayValue?.toLocaleString?.() ?? displayValue,\n entry.isTotal ? 'Total' : entry.isNegative ? 'Decrease' : 'Increase',\n ]\n }}\n labelFormatter={(label: string) => label}\n />\n <Legend\n wrapperStyle={{ fontSize: '12px', paddingTop: '8px' }}\n {...{\n payload: [\n { value: 'Increase', type: 'rect' as const, color: POSITIVE_COLOR },\n { value: 'Decrease', type: 'rect' as const, color: NEGATIVE_COLOR },\n ...(showTotal ? [{ value: 'Total', type: 'rect' as const, color: TOTAL_COLOR }] : []),\n ],\n }}\n />\n <Bar dataKey=\"runningBase\" stackId=\"wf\" fill=\"transparent\" legendType=\"none\" isAnimationActive={false} />\n <Bar\n dataKey=\"value\"\n stackId=\"wf\"\n isAnimationActive={false}\n cursor={drillEnabled ? 'pointer' : undefined}\n onClick={(barData: any, _index: number, event: React.MouseEvent) => {\n if (onDataPointClick && drillEnabled && barData && !barData.isTotal) {\n onDataPointClick({\n dataPoint: barData,\n clickedField: yAxisField!,\n xValue: barData.label,\n position: { x: event.clientX, y: event.clientY },\n nativeEvent: event,\n })\n }\n }}\n >\n {showDataLabels && (\n <LabelList\n dataKey=\"displayValue\"\n content={(props: any) => (\n <ValueLabel\n {...props}\n runningBase={chartData[props.index]?.runningBase}\n isNegative={chartData[props.index]?.isNegative}\n displayValue={chartData[props.index]?.displayValue}\n />\n )}\n />\n )}\n {chartData.map((entry, index) => (\n <Cell\n key={`cell-${index}`}\n fill={entry.isTotal ? TOTAL_COLOR : entry.isNegative ? NEGATIVE_COLOR : POSITIVE_COLOR}\n />\n ))}\n </Bar>\n {showConnectorLine && (\n <Line\n type=\"stepAfter\"\n dataKey=\"_connector\"\n stroke={CONNECTOR_COLOR}\n strokeWidth={1.5}\n strokeDasharray=\"4 2\"\n dot={false}\n activeDot={false}\n legendType=\"none\"\n isAnimationActive={false}\n />\n )}\n </ComposedChart>\n </ChartContainer>\n </div>\n )\n } catch (error) {\n return (\n <div className=\"dc:flex dc:flex-col dc:items-center dc:justify-center dc:w-full text-dc-error dc:p-4\" style={{ height }}>\n <div className=\"dc:text-center\">\n <div className=\"dc:text-sm dc:font-semibold dc:mb-1\">{t('chart.runtime.chartError', { chartType: 'Waterfall Chart' })}</div>\n <div className=\"dc:text-xs dc:mb-2\">{error instanceof Error ? error.message : t('chart.runtime.unknownError')}</div>\n <div className=\"dc:text-xs text-dc-text-muted\">{t('chart.runtime.checkConfig')}</div>\n </div>\n </div>\n )\n }\n})\n\nexport default WaterfallChart\n"],"mappings":";;;;;;;;;;;AAYA,IAAMuB,IAAiB,WACjBC,IAAiB,WACjBC,IAAc,WACdC,IAAkB;AAYxB,SAASC,EACPC,GACAC,GACAC,GACAC,GACAC,GACsB;CACtB,IAAIC,IAAU,GACRC,IAA+BN,EAAK,KAAKO,GAAKC,MAAM;EACxD,IAAMC,IAAQ,OAAOF,EAAIN,MAAW,OAAOO,IAAI,GAAG,GAC5CE,IAAWH,EAAIL,IACfS,IAAS,OAAOD,KAAa,WAAWA,IAAW,WAAW,OAAOA,KAAY,EAAE,CAAC,GACpFE,IAAQ,MAAMD,CAAM,IAAI,IAAIA,GAC5BE,IAAaD,IAAQ,GACrBE,IAAOD,IAAaR,IAAUO,IAAQP,GACtCU,IAA4B;GAChCN;GACA,OAAO,KAAK,IAAIG,CAAK;GACrB,aAAaE;GACb,SAAS;GACTD;GACA,cAAcD;GAC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CACE;;MACJtB,KACC7D,kBAACU,GAAD;OACE,MAAK;OACL,SAAQ;OACR,QAAQe;OACR,aAAa;OACb,iBAAgB;OAChB,KAAK;OACL,WAAW;OACX,YAAW;OACX,mBAAmB;MACpB,CAAA;KAEU;;GACD,CAAA;EACb,CAAA;CAET,SAAS2D,GAAO;EACd,OACEpF,kBAAC,OAAD;GAAK,WAAU;GAAuF,OAAO,EAAEwD,UAAO;GACpH,UAAAzD,kBAAC,OAAD;IAAK,WAAU;IAAf,UAAA;KACEC,kBAAC,OAAD;MAAK,WAAU;MAAuC,UAAA2D,EAAE,4BAA4B,EAAE,WAAW,kBAAkB,CAAC;KAAO,CAAA;KAC3H3D,kBAAC,OAAD;MAAK,WAAU;MAAsB,UAAAoF,aAAiB,QAAQA,EAAM,UAAUzB,EAAE,4BAA4B;KAAO,CAAA;KACnH3D,kBAAC,OAAD;MAAK,WAAU;MAAiC,UAAA2D,EAAE,2BAA2B;KAAO,CAAA;IACjF;;EACF,CAAA;CAET;AACF,CAAC"}
|
package/dist/client/chunks/{chartComponentRegistry-xa0hV8aQ.js → chartComponentRegistry-LNS2NwAv.js}
RENAMED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { n as e, r as t, t as n } from "./chartRegistry-
|
|
2
|
-
import { t as r } from "./useTranslation-
|
|
3
|
-
import { c as i } from "./charts-loader-
|
|
1
|
+
import { n as e, r as t, t as n } from "./chartRegistry-CI9eqtt9.js";
|
|
2
|
+
import { t as r } from "./useTranslation-DQ_tbKyn.js";
|
|
3
|
+
import { c as i } from "./charts-loader-dfaiJVGE.js";
|
|
4
4
|
import { lazy as a, useEffect as o, useState as s, useSyncExternalStore as c } from "react";
|
|
5
5
|
import { jsx as l, jsxs as u } from "react/jsx-runtime";
|
|
6
6
|
// src/client/charts/chartConfigs.ts
|
|
@@ -178,4 +178,4 @@ function I(e) {
|
|
|
178
178
|
}
|
|
179
179
|
export { S as _, A as a, E as c, x as d, T as f, O as g, D as h, j as i, y as l, w as m, P as n, F as o, C as p, M as r, I as s, k as t, b as u, d as v };
|
|
180
180
|
|
|
181
|
-
//# sourceMappingURL=chartComponentRegistry-
|
|
181
|
+
//# sourceMappingURL=chartComponentRegistry-LNS2NwAv.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"chartComponentRegistry-xa0hV8aQ.js","names":["_jsxs","_jsx","composeChartConfig","getChartEntry","chartRegistry","useTranslation","MissingDependencyFallback","lazy","useEffect","useState","useSyncExternalStore","jsx","jsxs","optionsForPlacement","options","placement","option","defaultChartConfig","configCache","pluginConfigVersion","pluginConfigListeners","subscribeToPluginConfigs","listener","getPluginConfigVersion","notifyPluginConfigChange","getChartConfigAsync","chartType","entry","base","config","error","getChartConfigSync","isChartConfigLoaded","useChartConfig","setConfig","loading","setLoading","loaded","setLoaded","pluginVersion","stale","loadedConfig","preloadChartConfig","preloadChartConfigs","chartTypes","loadAllChartConfigs","registry","clearChartConfigCache","registerConfigToCache","type","unregisterConfigFromCache","chartLoaderCache","failedChartTypes","customChartMap","createUnknownChartFallback","Fallback","height","t","createFallbackComponent","depInfo","FallbackComponent","createSafeImport","importFn","registerChartComponent","component","lazyComponent","dependencies","safeImport","comp","unregisterChartComponent"],"sources":["../../../src/client/charts/chartConfigs.ts","../../../src/client/charts/lazyChartConfigRegistry.ts","../../../src/client/charts/chartComponentRegistry.tsx"],"sourcesContent":["import type { ChartAxisConfig, ChartDisplayConfig, ChartType } from '../types.js'\nimport type { AxisBuilderContext } from '../shared/chartConfigBuilders.js'\n\n/**\n * Configuration for a single axis drop zone in the chart configuration UI\n */\nexport interface AxisDropZoneConfig {\n /** The key to store this field in chartConfig (e.g., 'xAxis', 'yAxis', 'sizeField') */\n key: string\n\n /** Display label for the drop zone */\n label: string\n\n /** Optional description/help text shown below the label */\n description?: string\n\n /** Whether at least one field is required in this drop zone */\n mandatory?: boolean\n\n /** Maximum number of items allowed in this drop zone */\n maxItems?: number\n\n /** Which field types this drop zone accepts */\n acceptTypes?: ('dimension' | 'timeDimension' | 'measure')[]\n\n /** Placeholder text when drop zone is empty */\n emptyText?: string\n\n /** Enable L/R axis toggle for items in this drop zone (for dual Y-axis support) */\n enableDualAxis?: boolean\n\n /**\n * Keep this zone out of automatic chart-config inference (the agent's\n * `inferChartConfig`). For zones whose meaning is subtractive or opt-in — the\n * records table's hidden columns being the case in point — filling them from\n * the query changes what renders rather than completing a partial config.\n */\n excludeFromInference?: boolean\n}\n\n/**\n * Configuration for a single display option\n */\nexport interface DisplayOptionConfig {\n /** The key to store this field in displayConfig */\n key: string\n \n /** Display label for the option */\n label: string\n \n /** Type of input control to render */\n type: 'boolean' | 'string' | 'number' | 'select' | 'color' | 'paletteColor' | 'axisFormat' | 'stringArray' | 'buttonGroup' | 'thresholdBands' | 'columnFormats' | 'rowLink'\n \n /** Default value for the option */\n defaultValue?: any\n \n /** Placeholder text for string/number inputs */\n placeholder?: string\n \n /** Options for select type */\n options?: Array<{ value: any; label: string }>\n \n /**\n * Which tab the option belongs on. Defaults to `display`.\n *\n * The Chart tab exists to answer \"what feeds this chart\", which for most\n * types is the axis drop zones. A content-first chart has no zones, and its\n * equivalent input is a display option — markdown's `content` being the case\n * in point, which is its whole substance and wants the room. Marking it\n * `chart` moves it there rather than leaving the tab empty and the editor\n * squeezed into a sidebar.\n */\n placement?: 'chart' | 'display'\n\n /** Help text shown below the input */\n description?: string\n\n /**\n * Shows the colour band picker on progress columns in a `columnFormats`\n * option. Set it only when the chart's renderer reads `progressBands`.\n */\n progressBands?: boolean\n\n /** Visible rows for a string option's textarea. Defaults to 8. */\n rows?: number\n\n /**\n * Render a string option with syntax highlighting rather than as a plain\n * textarea. Only `markdownTemplate` exists, colouring `{{ }}` expressions,\n * `{% %}` tags and markdown headings.\n */\n syntax?: 'markdownTemplate'\n\n /**\n * External reference for options whose full syntax cannot fit in help text.\n * Rendered as a link after the description, so the panel can stay short\n * instead of restating a whole template language badly.\n */\n docsUrl?: string\n\n /** Label for the `docsUrl` link — a translation key, like `label`. */\n docsLabel?: string\n\n /** Minimum value for number inputs */\n min?: number\n \n /** Maximum value for number inputs */\n max?: number\n \n /** Step value for number inputs */\n step?: number\n\n /**\n * The columns a `columnFormats` option lists, in place of\n * `chartConfig.columns`. A chart that builds columns of its own returns them\n * here so each one can be formatted — computed columns, say, or the value\n * field whose format a pivot's columns take. It sees the chart and display\n * config only, not the result data.\n */\n columns?: (context: {\n chartConfig?: ChartAxisConfig\n displayConfig: ChartDisplayConfig\n }) => string[]\n}\n\n/**\n * Split display options by which tab renders them.\n *\n * Shared by the Chart and Display panels so the two cannot disagree and leave\n * an option shown twice or not at all.\n */\nexport function optionsForPlacement(\n options: DisplayOptionConfig[] | undefined,\n placement: 'chart' | 'display'\n): DisplayOptionConfig[] {\n return (options ?? []).filter((option) => (option.placement ?? 'display') === placement)\n}\n\n/**\n * Whether a chart type can be rendered with the current query shape.\n * Each chart's .config.ts declares its own `isAvailable` to keep requirements\n * co-located with the chart itself (rather than in a central switch).\n */\nexport interface ChartAvailability {\n /** Whether the chart type can be used with the current selections */\n available: boolean\n /** Translation key explaining why the chart is unavailable (for tooltip) */\n reason?: string\n}\n\n/**\n * Snapshot of the current query shape passed to each chart's `isAvailable`.\n */\nexport interface ChartAvailabilityContext {\n /** Number of measures selected */\n measureCount: number\n /**\n * Number of dimension-like breakdowns (regular dimensions + time dimensions).\n * A time dimension can serve any role a regular dimension does (categories,\n * axes, heatmap rows/columns, pie slices, etc.), so they are counted together.\n */\n dimensionCount: number\n /**\n * Number of time dimensions specifically. Only needed by charts that *require*\n * a time dimension (e.g. activityGrid).\n */\n timeDimensionCount: number\n}\n\n/**\n * Configuration for which elements in a chart support clicking (for drill-down)\n */\nexport interface ClickableElementsConfig {\n /** Bars in bar charts */\n bar?: boolean\n /** Points/dots in line/scatter charts */\n point?: boolean\n /** Slices in pie/donut charts */\n slice?: boolean\n /** Cells in heatmaps */\n cell?: boolean\n /** Nodes in treemaps, sankey diagrams */\n node?: boolean\n /** Areas in area charts */\n area?: boolean\n /** Rows in data tables */\n row?: boolean\n}\n\n/**\n * Complete configuration for a chart type\n */\nexport interface ChartTypeConfig {\n /** Display label for the chart type in the picker (e.g., 'Bar Chart', 'KPI Number') */\n label?: string\n\n /** Configuration for each drop zone */\n dropZones: AxisDropZoneConfig[]\n\n /** Simple display options (backward compatibility) - rendered as boolean checkboxes */\n displayOptions?: string[]\n\n /** Structured display options with metadata for different input types */\n displayOptionsConfig?: DisplayOptionConfig[]\n\n /** Optional custom validation function */\n validate?: (config: any) => { isValid: boolean; message?: string }\n\n /** Brief description of the chart */\n description?: string\n\n /** When to use this chart type */\n useCase?: string\n\n /** Whether this chart type skips query requirements (for content-based charts like markdown) */\n skipQuery?: boolean\n\n /**\n * The chart loads its own data. The dashboard portlet and the\n * AnalysisBuilder preview do not fetch. They still build the effective\n * query (dashboard filters, universal time filter, drill) and pass it to\n * the chart as `queryObject`. The chart owns its loading, error and empty\n * states, and the portlet shows no XLSX download and no debug data for it.\n * A Refresh sends a new `refreshId` to the chart and does not reload the\n * Cube query. A portlet or a preview with more than one query (a\n * multi-query, funnel, flow or retention analysis) shows a message in place\n * of the chart, because the chart reads one query only.\n */\n fetchesOwnData?: boolean\n\n /** Configuration for which elements support clicking (for drill-down) */\n clickableElements?: ClickableElementsConfig\n\n /**\n * Whether this chart type can render with the given query shape.\n * Omit to mean \"always available\".\n */\n isAvailable?: (ctx: ChartAvailabilityContext) => ChartAvailability\n\n /**\n * This chart lists individual records rather than aggregates, so the query\n * built for it must be `ungrouped`.\n *\n * Declared here rather than switched on a chart type inside the query\n * builders, and read from the eager registry so those stay data-driven — and\n * so a custom chart can opt in through the same flag.\n */\n recordGrain?: boolean\n\n /**\n * Builds this chart's config from the selected fields whenever the analysis\n * builder needs a default config for it: when the user picks this chart\n * type, when the builder switches to it, and when it fills an empty config.\n * Omit it to use the built-in rule for the chart type, or the default rule\n * (first breakdown on `xAxis`, every measure on `yAxis`) for a custom chart.\n *\n * When the user picks this chart type, the context also carries the chart\n * they leave, so a chart that shares its drop zones with another chart can\n * keep that chart's config.\n */\n buildChartConfig?: (context: ChartConfigBuildContext) => ChartAxisConfig\n}\n\n/**\n * What a chart's `buildChartConfig` receives: the selected fields and, when\n * the user picks the chart type, the chart type and config they leave.\n */\nexport interface ChartConfigBuildContext extends AxisBuilderContext {\n /** The chart type the user leaves. Set only when the user picks the chart type. */\n previousChartType?: ChartType\n /** The chart config the user leaves. Set only when the user picks the chart type. */\n previousChartConfig?: ChartAxisConfig\n}\n\n/**\n * Registry of all chart type configurations\n */\nexport interface ChartConfigRegistry {\n [chartType: string]: ChartTypeConfig\n}\n\n/**\n * Default configuration for charts without specific requirements\n */\nexport const defaultChartConfig: ChartTypeConfig = {\n dropZones: [\n {\n key: 'xAxis',\n label: 'chart.dropZone.xAxis.label',\n description: 'chart.dropZone.xAxis.description',\n mandatory: false,\n acceptTypes: ['dimension', 'timeDimension'],\n emptyText: 'chart.dropZone.xAxis.empty'\n },\n {\n key: 'yAxis',\n label: 'chart.dropZone.yAxis.label',\n description: 'chart.dropZone.yAxis.description',\n mandatory: false,\n acceptTypes: ['measure', 'dimension'],\n emptyText: 'chart.dropZone.yAxis.empty'\n },\n {\n key: 'series',\n label: 'chart.dropZone.series.label',\n description: 'chart.dropZone.series.description',\n mandatory: false,\n acceptTypes: ['dimension'],\n emptyText: 'chart.dropZone.series.empty'\n }\n ],\n displayOptions: ['showLegend', 'showGrid', 'showTooltip']\n}\n\n/**\n * Helper function to get configuration for a chart type\n */\nexport function getChartConfig(chartType: string, registry: ChartConfigRegistry): ChartTypeConfig {\n return registry[chartType] || defaultChartConfig\n}","/**\n * Lazy Chart Config Registry\n *\n * Provides async loading for chart configurations.\n * This enables code splitting - each chart config loads only when needed.\n */\n\nimport { useState, useEffect, useSyncExternalStore } from 'react'\nimport type { ChartType } from '../types.js'\nimport type { ChartTypeConfig, ChartConfigRegistry } from './chartConfigs.js'\nimport { defaultChartConfig } from './chartConfigs.js'\nimport { chartRegistry, getChartEntry, composeChartConfig } from './chartRegistry.js'\n\n// Cache for loaded configs\nconst configCache = new Map<ChartType, ChartTypeConfig>()\n\n// Version of the plugin configs in the cache, for useSyncExternalStore. Only\n// the plugin system changes it; a lazy load fills the cache for the hook that\n// asked for it, so no other hook needs to know.\nlet pluginConfigVersion = 0\nconst pluginConfigListeners = new Set<() => void>()\n\nfunction subscribeToPluginConfigs(listener: () => void): () => void {\n pluginConfigListeners.add(listener)\n return () => {\n pluginConfigListeners.delete(listener)\n }\n}\n\nfunction getPluginConfigVersion(): number {\n return pluginConfigVersion\n}\n\nfunction notifyPluginConfigChange(): void {\n pluginConfigVersion++\n for (const listener of pluginConfigListeners) {\n listener()\n }\n}\n\n/**\n * Get a chart config asynchronously\n *\n * @param chartType The chart type to load config for\n * @returns The chart type config, or null if not found\n *\n * @example\n * ```typescript\n * const config = await getChartConfigAsync('bar')\n * console.log(config?.dropZones)\n * ```\n */\nexport async function getChartConfigAsync(chartType: ChartType): Promise<ChartTypeConfig | null> {\n // Check cache first (plugin overrides land here via registerConfigToCache —\n // their precedence stays ahead of the unified/legacy lookups below).\n if (configCache.has(chartType)) {\n return configCache.get(chartType)!\n }\n\n // Unified registry (custom-first): resolve the chart's config object via its\n // entry's `config` thunk, then compose the entry metadata over it so the lazy\n // public API returns the same full shape (label/description/useCase/isAvailable)\n // as the eager one. Using getChartEntry() means a registered plugin chart still\n // rehydrates here after the public clearChartConfigCache() drops its cache slot.\n const entry = getChartEntry(chartType)\n if (!entry) {\n return null\n }\n\n try {\n const base = await entry.config()\n if (base) {\n const config = composeChartConfig(entry, base)\n configCache.set(chartType, config)\n return config\n }\n return null\n } catch (error) {\n console.error(`Failed to load config for chart type: ${chartType}`, error)\n return null\n }\n}\n\n/**\n * Get a chart config synchronously from cache\n *\n * Returns the cached config if available, otherwise returns the default config.\n * Use this when you need sync access and have already preloaded the config.\n *\n * @param chartType The chart type to get config for\n * @returns The chart type config (from cache or default)\n */\nexport function getChartConfigSync(chartType: ChartType): ChartTypeConfig {\n return configCache.get(chartType) || defaultChartConfig\n}\n\n/**\n * Check if a chart config is already loaded\n */\nexport function isChartConfigLoaded(chartType: ChartType): boolean {\n return configCache.has(chartType)\n}\n\n/**\n * React hook for using chart config\n *\n * Loads the chart config asynchronously and caches it.\n * Returns the default config while loading.\n *\n * @param chartType The chart type to load config for\n * @returns Object with config, loading state, and loaded flag\n *\n * @example\n * ```tsx\n * function ChartSetup({ chartType }) {\n * const { config, loading } = useChartConfig(chartType)\n *\n * if (loading) return <Spinner />\n * return <ConfigForm config={config} />\n * }\n * ```\n */\nexport function useChartConfig(chartType: ChartType | undefined): {\n config: ChartTypeConfig\n loading: boolean\n loaded: boolean\n} {\n const [config, setConfig] = useState<ChartTypeConfig>(\n chartType ? getChartConfigSync(chartType) : defaultChartConfig\n )\n const [loading, setLoading] = useState(false)\n const [loaded, setLoaded] = useState(false)\n\n // Custom charts can register after mount (CubeProvider registers them in an\n // effect, after its children's effects), and a type can register again with\n // a new config. Resolve the config again when a plugin config changes.\n const pluginVersion = useSyncExternalStore(\n subscribeToPluginConfigs,\n getPluginConfigVersion,\n getPluginConfigVersion\n )\n\n useEffect(() => {\n if (!chartType) {\n setConfig(defaultChartConfig)\n setLoading(false)\n setLoaded(false)\n return\n }\n\n // Check cache synchronously first\n if (configCache.has(chartType)) {\n setConfig(configCache.get(chartType)!)\n setLoading(false)\n setLoaded(true)\n return\n }\n\n // Load async. Ignore a load that ends after chartType or a plugin config changed.\n let stale = false\n setLoading(true)\n getChartConfigAsync(chartType)\n .then((loadedConfig) => {\n if (stale) return\n if (loadedConfig) {\n setConfig(loadedConfig)\n setLoaded(true)\n } else {\n setConfig(defaultChartConfig)\n setLoaded(true)\n }\n })\n .finally(() => {\n if (!stale) setLoading(false)\n })\n\n return () => {\n stale = true\n }\n }, [chartType, pluginVersion])\n\n return { config, loading, loaded }\n}\n\n/**\n * Preload a chart config\n *\n * Triggers the async import without needing to use the config immediately.\n * Useful for prefetching configs that will likely be needed.\n *\n * @param chartType The chart type to preload config for\n */\nexport async function preloadChartConfig(chartType: ChartType): Promise<void> {\n if (!configCache.has(chartType)) {\n await getChartConfigAsync(chartType)\n }\n}\n\n/**\n * Preload multiple chart configs\n *\n * @param chartTypes Array of chart types to preload\n */\nexport async function preloadChartConfigs(chartTypes: ChartType[]): Promise<void> {\n await Promise.all(chartTypes.map(preloadChartConfig))\n}\n\n/**\n * Load all chart configs and return as a registry\n *\n * Useful for SSR or when you need all configs upfront.\n * After calling this, all configs are cached and available synchronously.\n *\n * @returns Complete chart config registry\n *\n * @example\n * ```typescript\n * // On server or during initialization\n * const registry = await loadAllChartConfigs()\n * // Now all configs are cached and getChartConfigSync works for all types\n * ```\n */\nexport async function loadAllChartConfigs(): Promise<ChartConfigRegistry> {\n // Every built-in resolves through its chartRegistry entry.\n const chartTypes = Object.keys(chartRegistry) as ChartType[]\n await Promise.all(chartTypes.map(getChartConfigAsync))\n\n const registry: ChartConfigRegistry = {}\n for (const chartType of chartTypes) {\n const config = configCache.get(chartType)\n if (config) {\n registry[chartType] = config\n }\n }\n return registry\n}\n\n/**\n * Clear the config cache\n *\n * Useful for testing or when configs need to be reloaded.\n */\nexport function clearChartConfigCache(): void {\n configCache.clear()\n}\n\n/**\n * Register a custom chart config directly into the cache.\n * Used by the chart plugin system. Mounted `useChartConfig` hooks update.\n */\nexport function registerConfigToCache(type: string, config: ChartTypeConfig): void {\n configCache.set(type as ChartType, config)\n notifyPluginConfigChange()\n}\n\n/**\n * Remove a custom chart config from the cache.\n * Used by the chart plugin system. Mounted `useChartConfig` hooks update.\n */\nexport function unregisterConfigFromCache(type: string): void {\n configCache.delete(type as ChartType)\n notifyPluginConfigChange()\n}\n","/**\n * Chart Component Registry\n *\n * Holds the shared mutable state and the custom (plugin) chart registration API\n * for the lazy chart loader. This module deliberately does NOT import the built-in\n * chart import map (which dynamically imports DataTable and pulls in CubeProvider /\n * the chart plugin system). Keeping the registration API here — separate from\n * `ChartLoader.tsx` — lets `chartPlugin.ts` register/unregister charts without\n * creating an import cycle (chartPlugin → ChartLoader → DataTable → CubeProvider →\n * chartPlugin).\n */\n\nimport { lazy, ComponentType, LazyExoticComponent } from 'react'\nimport type { ChartType, ChartProps } from '../types.js'\nimport { MissingDependencyFallback } from '../components/charts/MissingDependencyFallback.js'\nimport { useTranslation } from '../hooks/useTranslation.js'\n// chartRegistry only imports pure helpers at runtime, so this stays free of the\n// import-map cycle that this module is careful to avoid.\nimport { getChartEntry } from './chartRegistry.js'\n\n// Type for lazy-loaded chart components\nexport type LazyChartComponent = ComponentType<ChartProps>\n\n// Chart loader cache to prevent re-creating lazy components\nexport const chartLoaderCache = new Map<ChartType, LazyExoticComponent<LazyChartComponent>>()\n\n// Track which chart types have failed to load due to missing dependencies\nexport const failedChartTypes = new Set<ChartType>()\n\n// Registry for custom (plugin) chart components\nexport const customChartMap = new Map<string, LazyExoticComponent<LazyChartComponent>>()\n\n/**\n * Creates a fallback component for an unknown/unregistered chart type.\n */\nexport function createUnknownChartFallback(chartType: string): LazyChartComponent {\n const Fallback: LazyChartComponent = ({ height }) => {\n const { t } = useTranslation()\n return (\n <div\n className=\"dc:flex dc:flex-col dc:items-center dc:justify-center dc:w-full dc:gap-2\"\n style={{ height: typeof height === 'number' ? `${height}px` : height || '200px' }}\n >\n <div className=\"dc:text-sm dc:font-semibold text-dc-text-muted\">{t('chart.runtime.unknownChartType')}</div>\n <div className=\"dc:text-xs text-dc-text-muted\">“{chartType}” is not registered</div>\n </div>\n )\n }\n Fallback.displayName = `UnknownChart_${chartType}`\n return Fallback\n}\n\n/**\n * Creates a fallback component for a chart type with missing dependencies.\n */\nexport function createFallbackComponent(chartType: ChartType): LazyChartComponent {\n // Dependencies are declared on the chart's unified entry (custom or built-in).\n const depInfo = getChartEntry(chartType)?.dependencies\n\n const FallbackComponent: LazyChartComponent = ({ height }) => (\n <MissingDependencyFallback\n chartType={chartType}\n packageName={depInfo?.packageName || 'unknown'}\n installCommand={depInfo?.installCommand || `npm install [package-name]`}\n height={height}\n />\n )\n\n FallbackComponent.displayName = `${chartType}Fallback`\n return FallbackComponent\n}\n\n/**\n * Wraps a chart import function with error handling.\n * If the import fails (e.g., missing dependency), returns a fallback component.\n */\nexport function createSafeImport(\n chartType: ChartType,\n importFn: () => Promise<{ default: LazyChartComponent }>\n): () => Promise<{ default: LazyChartComponent }> {\n return async () => {\n try {\n return await importFn()\n } catch (error) {\n // Log the error for debugging\n console.warn(\n `[drizzle-cube] Failed to load ${chartType} chart:`,\n error instanceof Error ? error.message : error\n )\n\n // Track that this chart type failed\n failedChartTypes.add(chartType)\n\n // Return the fallback component wrapped in the expected format\n return { default: createFallbackComponent(chartType) }\n }\n }\n}\n\n/**\n * Register a custom chart component.\n * Used by the chart plugin system.\n */\nexport function registerChartComponent(\n type: string,\n component?: ComponentType<ChartProps>,\n lazyComponent?: () => Promise<{ default: ComponentType<ChartProps> }>,\n dependencies?: { packageName: string; installCommand: string }\n): void {\n // Clear any existing built-in cache entry so the custom chart takes priority\n chartLoaderCache.delete(type as ChartType)\n failedChartTypes.delete(type as ChartType)\n\n if (lazyComponent) {\n // Lazy import factory — wrap with safe import for graceful degradation\n const safeImport = dependencies\n ? createSafeImport(type as ChartType, lazyComponent)\n : lazyComponent\n customChartMap.set(type, lazy(safeImport))\n } else if (component) {\n // Eager component — wrap in a resolved lazy for consistent Suspense handling\n const comp = component\n customChartMap.set(type, lazy(() => Promise.resolve({ default: comp as LazyChartComponent })))\n }\n}\n\n/**\n * Unregister a custom chart component.\n * Used by the chart plugin system.\n */\nexport function unregisterChartComponent(type: string): void {\n customChartMap.delete(type)\n chartLoaderCache.delete(type as ChartType)\n failedChartTypes.delete(type as ChartType)\n}\n"],"mappings":";;;;;;AAmIA,SAAgBa,EACdC,GACAC,GACuB;CACvB,QAAQD,KAAW,CAAC,EAAA,CAAG,QAAQE,OAAYA,EAAO,aAAa,eAAeD,CAAS;AACzF;AAoJA,IAAaE,IAAsC;CACjD,WAAW;EACT;GACE,KAAK;GACL,O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AM,UAAUA,CAC3C,GAGAsB,EAAiB,IAAI1B,CAAS,GAGvB,EAAE,SAASgC,EAAwBhC,CAAS,EAAE;EACvD;CACF;AACF;AAMA,SAAgBqC,EACdd,GACAe,GACAC,GACAC,GACM;CAKN,IAHAf,EAAiB,OAAOF,CAAiB,GACzCG,EAAiB,OAAOH,CAAiB,GAErCgB,GAAe;EAEjB,IAAME,IAAaD,IACfL,EAAiBZ,GAAmBgB,CAAa,IACjDA;EACJZ,EAAe,IAAIJ,GAAM1C,EAAK4D,CAAU,CAAC;CAC3C,OAAO,IAAIH,GAAW;EAEpB,IAAMI,IAAOJ;EACbX,EAAe,IAAIJ,GAAM1C,QAAW,QAAQ,QAAQ,EAAE,SAAS6D,EAA2B,CAAC,CAAC,CAAC;CAC/F;AACF;AAMA,SAAgBC,EAAyBpB,GAAoB;CAC3DI,EAAe,OAAOJ,CAAI,GAC1BE,EAAiB,OAAOF,CAAiB,GACzCG,EAAiB,OAAOH,CAAiB;AAC3C"}
|
|
1
|
+
{"version":3,"file":"chartComponentRegistry-LNS2NwAv.js","names":["_jsxs","_jsx","composeChartConfig","getChartEntry","chartRegistry","useTranslation","MissingDependencyFallback","lazy","useEffect","useState","useSyncExternalStore","jsx","jsxs","optionsForPlacement","options","placement","option","defaultChartConfig","configCache","pluginConfigVersion","pluginConfigListeners","subscribeToPluginConfigs","listener","getPluginConfigVersion","notifyPluginConfigChange","getChartConfigAsync","chartType","entry","base","config","error","getChartConfigSync","isChartConfigLoaded","useChartConfig","setConfig","loading","setLoading","loaded","setLoaded","pluginVersion","stale","loadedConfig","preloadChartConfig","preloadChartConfigs","chartTypes","loadAllChartConfigs","registry","clearChartConfigCache","registerConfigToCache","type","unregisterConfigFromCache","chartLoaderCache","failedChartTypes","customChartMap","createUnknownChartFallback","Fallback","height","t","createFallbackComponent","depInfo","FallbackComponent","createSafeImport","importFn","registerChartComponent","component","lazyComponent","dependencies","safeImport","comp","unregisterChartComponent"],"sources":["../../../src/client/charts/chartConfigs.ts","../../../src/client/charts/lazyChartConfigRegistry.ts","../../../src/client/charts/chartComponentRegistry.tsx"],"sourcesContent":["import type { ChartAxisConfig, ChartDisplayConfig, ChartType } from '../types.js'\nimport type { AxisBuilderContext } from '../shared/chartConfigBuilders.js'\n\n/**\n * Configuration for a single axis drop zone in the chart configuration UI\n */\nexport interface AxisDropZoneConfig {\n /** The key to store this field in chartConfig (e.g., 'xAxis', 'yAxis', 'sizeField') */\n key: string\n\n /** Display label for the drop zone */\n label: string\n\n /** Optional description/help text shown below the label */\n description?: string\n\n /** Whether at least one field is required in this drop zone */\n mandatory?: boolean\n\n /** Maximum number of items allowed in this drop zone */\n maxItems?: number\n\n /** Which field types this drop zone accepts */\n acceptTypes?: ('dimension' | 'timeDimension' | 'measure')[]\n\n /** Placeholder text when drop zone is empty */\n emptyText?: string\n\n /** Enable L/R axis toggle for items in this drop zone (for dual Y-axis support) */\n enableDualAxis?: boolean\n\n /**\n * Keep this zone out of automatic chart-config inference (the agent's\n * `inferChartConfig`). For zones whose meaning is subtractive or opt-in — the\n * records table's hidden columns being the case in point — filling them from\n * the query changes what renders rather than completing a partial config.\n */\n excludeFromInference?: boolean\n}\n\n/**\n * Configuration for a single display option\n */\nexport interface DisplayOptionConfig {\n /** The key to store this field in displayConfig */\n key: string\n \n /** Display label for the option */\n label: string\n \n /** Type of input control to render */\n type: 'boolean' | 'string' | 'number' | 'select' | 'color' | 'paletteColor' | 'axisFormat' | 'stringArray' | 'buttonGroup' | 'thresholdBands' | 'columnFormats' | 'rowLink'\n \n /** Default value for the option */\n defaultValue?: any\n \n /** Placeholder text for string/number inputs */\n placeholder?: string\n \n /** Options for select type */\n options?: Array<{ value: any; label: string }>\n \n /**\n * Which tab the option belongs on. Defaults to `display`.\n *\n * The Chart tab exists to answer \"what feeds this chart\", which for most\n * types is the axis drop zones. A content-first chart has no zones, and its\n * equivalent input is a display option — markdown's `content` being the case\n * in point, which is its whole substance and wants the room. Marking it\n * `chart` moves it there rather than leaving the tab empty and the editor\n * squeezed into a sidebar.\n */\n placement?: 'chart' | 'display'\n\n /** Help text shown below the input */\n description?: string\n\n /**\n * Shows the colour band picker on progress columns in a `columnFormats`\n * option. Set it only when the chart's renderer reads `progressBands`.\n */\n progressBands?: boolean\n\n /** Visible rows for a string option's textarea. Defaults to 8. */\n rows?: number\n\n /**\n * Render a string option with syntax highlighting rather than as a plain\n * textarea. Only `markdownTemplate` exists, colouring `{{ }}` expressions,\n * `{% %}` tags and markdown headings.\n */\n syntax?: 'markdownTemplate'\n\n /**\n * External reference for options whose full syntax cannot fit in help text.\n * Rendered as a link after the description, so the panel can stay short\n * instead of restating a whole template language badly.\n */\n docsUrl?: string\n\n /** Label for the `docsUrl` link — a translation key, like `label`. */\n docsLabel?: string\n\n /** Minimum value for number inputs */\n min?: number\n \n /** Maximum value for number inputs */\n max?: number\n \n /** Step value for number inputs */\n step?: number\n\n /**\n * The columns a `columnFormats` option lists, in place of\n * `chartConfig.columns`. A chart that builds columns of its own returns them\n * here so each one can be formatted — computed columns, say, or the value\n * field whose format a pivot's columns take. It sees the chart and display\n * config only, not the result data.\n */\n columns?: (context: {\n chartConfig?: ChartAxisConfig\n displayConfig: ChartDisplayConfig\n }) => string[]\n}\n\n/**\n * Split display options by which tab renders them.\n *\n * Shared by the Chart and Display panels so the two cannot disagree and leave\n * an option shown twice or not at all.\n */\nexport function optionsForPlacement(\n options: DisplayOptionConfig[] | undefined,\n placement: 'chart' | 'display'\n): DisplayOptionConfig[] {\n return (options ?? []).filter((option) => (option.placement ?? 'display') === placement)\n}\n\n/**\n * Whether a chart type can be rendered with the current query shape.\n * Each chart's .config.ts declares its own `isAvailable` to keep requirements\n * co-located with the chart itself (rather than in a central switch).\n */\nexport interface ChartAvailability {\n /** Whether the chart type can be used with the current selections */\n available: boolean\n /** Translation key explaining why the chart is unavailable (for tooltip) */\n reason?: string\n}\n\n/**\n * Snapshot of the current query shape passed to each chart's `isAvailable`.\n */\nexport interface ChartAvailabilityContext {\n /** Number of measures selected */\n measureCount: number\n /**\n * Number of dimension-like breakdowns (regular dimensions + time dimensions).\n * A time dimension can serve any role a regular dimension does (categories,\n * axes, heatmap rows/columns, pie slices, etc.), so they are counted together.\n */\n dimensionCount: number\n /**\n * Number of time dimensions specifically. Only needed by charts that *require*\n * a time dimension (e.g. activityGrid).\n */\n timeDimensionCount: number\n}\n\n/**\n * Configuration for which elements in a chart support clicking (for drill-down)\n */\nexport interface ClickableElementsConfig {\n /** Bars in bar charts */\n bar?: boolean\n /** Points/dots in line/scatter charts */\n point?: boolean\n /** Slices in pie/donut charts */\n slice?: boolean\n /** Cells in heatmaps */\n cell?: boolean\n /** Nodes in treemaps, sankey diagrams */\n node?: boolean\n /** Areas in area charts */\n area?: boolean\n /** Rows in data tables */\n row?: boolean\n}\n\n/**\n * Complete configuration for a chart type\n */\nexport interface ChartTypeConfig {\n /** Display label for the chart type in the picker (e.g., 'Bar Chart', 'KPI Number') */\n label?: string\n\n /** Configuration for each drop zone */\n dropZones: AxisDropZoneConfig[]\n\n /** Simple display options (backward compatibility) - rendered as boolean checkboxes */\n displayOptions?: string[]\n\n /** Structured display options with metadata for different input types */\n displayOptionsConfig?: DisplayOptionConfig[]\n\n /** Optional custom validation function */\n validate?: (config: any) => { isValid: boolean; message?: string }\n\n /** Brief description of the chart */\n description?: string\n\n /** When to use this chart type */\n useCase?: string\n\n /** Whether this chart type skips query requirements (for content-based charts like markdown) */\n skipQuery?: boolean\n\n /**\n * The chart loads its own data. The dashboard portlet and the\n * AnalysisBuilder preview do not fetch. They still build the effective\n * query (dashboard filters, universal time filter, drill) and pass it to\n * the chart as `queryObject`. The chart owns its loading, error and empty\n * states, and the portlet shows no XLSX download and no debug data for it.\n * A Refresh sends a new `refreshId` to the chart and does not reload the\n * Cube query. A portlet or a preview with more than one query (a\n * multi-query, funnel, flow or retention analysis) shows a message in place\n * of the chart, because the chart reads one query only.\n */\n fetchesOwnData?: boolean\n\n /** Configuration for which elements support clicking (for drill-down) */\n clickableElements?: ClickableElementsConfig\n\n /**\n * Whether this chart type can render with the given query shape.\n * Omit to mean \"always available\".\n */\n isAvailable?: (ctx: ChartAvailabilityContext) => ChartAvailability\n\n /**\n * This chart lists individual records rather than aggregates, so the query\n * built for it must be `ungrouped`.\n *\n * Declared here rather than switched on a chart type inside the query\n * builders, and read from the eager registry so those stay data-driven — and\n * so a custom chart can opt in through the same flag.\n */\n recordGrain?: boolean\n\n /**\n * Builds this chart's config from the selected fields whenever the analysis\n * builder needs a default config for it: when the user picks this chart\n * type, when the builder switches to it, and when it fills an empty config.\n * Omit it to use the built-in rule for the chart type, or the default rule\n * (first breakdown on `xAxis`, every measure on `yAxis`) for a custom chart.\n *\n * When the user picks this chart type, the context also carries the chart\n * they leave, so a chart that shares its drop zones with another chart can\n * keep that chart's config.\n */\n buildChartConfig?: (context: ChartConfigBuildContext) => ChartAxisConfig\n}\n\n/**\n * What a chart's `buildChartConfig` receives: the selected fields and, when\n * the user picks the chart type, the chart type and config they leave.\n */\nexport interface ChartConfigBuildContext extends AxisBuilderContext {\n /** The chart type the user leaves. Set only when the user picks the chart type. */\n previousChartType?: ChartType\n /** The chart config the user leaves. Set only when the user picks the chart type. */\n previousChartConfig?: ChartAxisConfig\n}\n\n/**\n * Registry of all chart type configurations\n */\nexport interface ChartConfigRegistry {\n [chartType: string]: ChartTypeConfig\n}\n\n/**\n * Default configuration for charts without specific requirements\n */\nexport const defaultChartConfig: ChartTypeConfig = {\n dropZones: [\n {\n key: 'xAxis',\n label: 'chart.dropZone.xAxis.label',\n description: 'chart.dropZone.xAxis.description',\n mandatory: false,\n acceptTypes: ['dimension', 'timeDimension'],\n emptyText: 'chart.dropZone.xAxis.empty'\n },\n {\n key: 'yAxis',\n label: 'chart.dropZone.yAxis.label',\n description: 'chart.dropZone.yAxis.description',\n mandatory: false,\n acceptTypes: ['measure', 'dimension'],\n emptyText: 'chart.dropZone.yAxis.empty'\n },\n {\n key: 'series',\n label: 'chart.dropZone.series.label',\n description: 'chart.dropZone.series.description',\n mandatory: false,\n acceptTypes: ['dimension'],\n emptyText: 'chart.dropZone.series.empty'\n }\n ],\n displayOptions: ['showLegend', 'showGrid', 'showTooltip']\n}\n\n/**\n * Helper function to get configuration for a chart type\n */\nexport function getChartConfig(chartType: string, registry: ChartConfigRegistry): ChartTypeConfig {\n return registry[chartType] || defaultChartConfig\n}","/**\n * Lazy Chart Config Registry\n *\n * Provides async loading for chart configurations.\n * This enables code splitting - each chart config loads only when needed.\n */\n\nimport { useState, useEffect, useSyncExternalStore } from 'react'\nimport type { ChartType } from '../types.js'\nimport type { ChartTypeConfig, ChartConfigRegistry } from './chartConfigs.js'\nimport { defaultChartConfig } from './chartConfigs.js'\nimport { chartRegistry, getChartEntry, composeChartConfig } from './chartRegistry.js'\n\n// Cache for loaded configs\nconst configCache = new Map<ChartType, ChartTypeConfig>()\n\n// Version of the plugin configs in the cache, for useSyncExternalStore. Only\n// the plugin system changes it; a lazy load fills the cache for the hook that\n// asked for it, so no other hook needs to know.\nlet pluginConfigVersion = 0\nconst pluginConfigListeners = new Set<() => void>()\n\nfunction subscribeToPluginConfigs(listener: () => void): () => void {\n pluginConfigListeners.add(listener)\n return () => {\n pluginConfigListeners.delete(listener)\n }\n}\n\nfunction getPluginConfigVersion(): number {\n return pluginConfigVersion\n}\n\nfunction notifyPluginConfigChange(): void {\n pluginConfigVersion++\n for (const listener of pluginConfigListeners) {\n listener()\n }\n}\n\n/**\n * Get a chart config asynchronously\n *\n * @param chartType The chart type to load config for\n * @returns The chart type config, or null if not found\n *\n * @example\n * ```typescript\n * const config = await getChartConfigAsync('bar')\n * console.log(config?.dropZones)\n * ```\n */\nexport async function getChartConfigAsync(chartType: ChartType): Promise<ChartTypeConfig | null> {\n // Check cache first (plugin overrides land here via registerConfigToCache —\n // their precedence stays ahead of the unified/legacy lookups below).\n if (configCache.has(chartType)) {\n return configCache.get(chartType)!\n }\n\n // Unified registry (custom-first): resolve the chart's config object via its\n // entry's `config` thunk, then compose the entry metadata over it so the lazy\n // public API returns the same full shape (label/description/useCase/isAvailable)\n // as the eager one. Using getChartEntry() means a registered plugin chart still\n // rehydrates here after the public clearChartConfigCache() drops its cache slot.\n const entry = getChartEntry(chartType)\n if (!entry) {\n return null\n }\n\n try {\n const base = await entry.config()\n if (base) {\n const config = composeChartConfig(entry, base)\n configCache.set(chartType, config)\n return config\n }\n return null\n } catch (error) {\n console.error(`Failed to load config for chart type: ${chartType}`, error)\n return null\n }\n}\n\n/**\n * Get a chart config synchronously from cache\n *\n * Returns the cached config if available, otherwise returns the default config.\n * Use this when you need sync access and have already preloaded the config.\n *\n * @param chartType The chart type to get config for\n * @returns The chart type config (from cache or default)\n */\nexport function getChartConfigSync(chartType: ChartType): ChartTypeConfig {\n return configCache.get(chartType) || defaultChartConfig\n}\n\n/**\n * Check if a chart config is already loaded\n */\nexport function isChartConfigLoaded(chartType: ChartType): boolean {\n return configCache.has(chartType)\n}\n\n/**\n * React hook for using chart config\n *\n * Loads the chart config asynchronously and caches it.\n * Returns the default config while loading.\n *\n * @param chartType The chart type to load config for\n * @returns Object with config, loading state, and loaded flag\n *\n * @example\n * ```tsx\n * function ChartSetup({ chartType }) {\n * const { config, loading } = useChartConfig(chartType)\n *\n * if (loading) return <Spinner />\n * return <ConfigForm config={config} />\n * }\n * ```\n */\nexport function useChartConfig(chartType: ChartType | undefined): {\n config: ChartTypeConfig\n loading: boolean\n loaded: boolean\n} {\n const [config, setConfig] = useState<ChartTypeConfig>(\n chartType ? getChartConfigSync(chartType) : defaultChartConfig\n )\n const [loading, setLoading] = useState(false)\n const [loaded, setLoaded] = useState(false)\n\n // Custom charts can register after mount (CubeProvider registers them in an\n // effect, after its children's effects), and a type can register again with\n // a new config. Resolve the config again when a plugin config changes.\n const pluginVersion = useSyncExternalStore(\n subscribeToPluginConfigs,\n getPluginConfigVersion,\n getPluginConfigVersion\n )\n\n useEffect(() => {\n if (!chartType) {\n setConfig(defaultChartConfig)\n setLoading(false)\n setLoaded(false)\n return\n }\n\n // Check cache synchronously first\n if (configCache.has(chartType)) {\n setConfig(configCache.get(chartType)!)\n setLoading(false)\n setLoaded(true)\n return\n }\n\n // Load async. Ignore a load that ends after chartType or a plugin config changed.\n let stale = false\n setLoading(true)\n getChartConfigAsync(chartType)\n .then((loadedConfig) => {\n if (stale) return\n if (loadedConfig) {\n setConfig(loadedConfig)\n setLoaded(true)\n } else {\n setConfig(defaultChartConfig)\n setLoaded(true)\n }\n })\n .finally(() => {\n if (!stale) setLoading(false)\n })\n\n return () => {\n stale = true\n }\n }, [chartType, pluginVersion])\n\n return { config, loading, loaded }\n}\n\n/**\n * Preload a chart config\n *\n * Triggers the async import without needing to use the config immediately.\n * Useful for prefetching configs that will likely be needed.\n *\n * @param chartType The chart type to preload config for\n */\nexport async function preloadChartConfig(chartType: ChartType): Promise<void> {\n if (!configCache.has(chartType)) {\n await getChartConfigAsync(chartType)\n }\n}\n\n/**\n * Preload multiple chart configs\n *\n * @param chartTypes Array of chart types to preload\n */\nexport async function preloadChartConfigs(chartTypes: ChartType[]): Promise<void> {\n await Promise.all(chartTypes.map(preloadChartConfig))\n}\n\n/**\n * Load all chart configs and return as a registry\n *\n * Useful for SSR or when you need all configs upfront.\n * After calling this, all configs are cached and available synchronously.\n *\n * @returns Complete chart config registry\n *\n * @example\n * ```typescript\n * // On server or during initialization\n * const registry = await loadAllChartConfigs()\n * // Now all configs are cached and getChartConfigSync works for all types\n * ```\n */\nexport async function loadAllChartConfigs(): Promise<ChartConfigRegistry> {\n // Every built-in resolves through its chartRegistry entry.\n const chartTypes = Object.keys(chartRegistry) as ChartType[]\n await Promise.all(chartTypes.map(getChartConfigAsync))\n\n const registry: ChartConfigRegistry = {}\n for (const chartType of chartTypes) {\n const config = configCache.get(chartType)\n if (config) {\n registry[chartType] = config\n }\n }\n return registry\n}\n\n/**\n * Clear the config cache\n *\n * Useful for testing or when configs need to be reloaded.\n */\nexport function clearChartConfigCache(): void {\n configCache.clear()\n}\n\n/**\n * Register a custom chart config directly into the cache.\n * Used by the chart plugin system. Mounted `useChartConfig` hooks update.\n */\nexport function registerConfigToCache(type: string, config: ChartTypeConfig): void {\n configCache.set(type as ChartType, config)\n notifyPluginConfigChange()\n}\n\n/**\n * Remove a custom chart config from the cache.\n * Used by the chart plugin system. Mounted `useChartConfig` hooks update.\n */\nexport function unregisterConfigFromCache(type: string): void {\n configCache.delete(type as ChartType)\n notifyPluginConfigChange()\n}\n","/**\n * Chart Component Registry\n *\n * Holds the shared mutable state and the custom (plugin) chart registration API\n * for the lazy chart loader. This module deliberately does NOT import the built-in\n * chart import map (which dynamically imports DataTable and pulls in CubeProvider /\n * the chart plugin system). Keeping the registration API here — separate from\n * `ChartLoader.tsx` — lets `chartPlugin.ts` register/unregister charts without\n * creating an import cycle (chartPlugin → ChartLoader → DataTable → CubeProvider →\n * chartPlugin).\n */\n\nimport { lazy, ComponentType, LazyExoticComponent } from 'react'\nimport type { ChartType, ChartProps } from '../types.js'\nimport { MissingDependencyFallback } from '../components/charts/MissingDependencyFallback.js'\nimport { useTranslation } from '../hooks/useTranslation.js'\n// chartRegistry only imports pure helpers at runtime, so this stays free of the\n// import-map cycle that this module is careful to avoid.\nimport { getChartEntry } from './chartRegistry.js'\n\n// Type for lazy-loaded chart components\nexport type LazyChartComponent = ComponentType<ChartProps>\n\n// Chart loader cache to prevent re-creating lazy components\nexport const chartLoaderCache = new Map<ChartType, LazyExoticComponent<LazyChartComponent>>()\n\n// Track which chart types have failed to load due to missing dependencies\nexport const failedChartTypes = new Set<ChartType>()\n\n// Registry for custom (plugin) chart components\nexport const customChartMap = new Map<string, LazyExoticComponent<LazyChartComponent>>()\n\n/**\n * Creates a fallback component for an unknown/unregistered chart type.\n */\nexport function createUnknownChartFallback(chartType: string): LazyChartComponent {\n const Fallback: LazyChartComponent = ({ height }) => {\n const { t } = useTranslation()\n return (\n <div\n className=\"dc:flex dc:flex-col dc:items-center dc:justify-center dc:w-full dc:gap-2\"\n style={{ height: typeof height === 'number' ? `${height}px` : height || '200px' }}\n >\n <div className=\"dc:text-sm dc:font-semibold text-dc-text-muted\">{t('chart.runtime.unknownChartType')}</div>\n <div className=\"dc:text-xs text-dc-text-muted\">“{chartType}” is not registered</div>\n </div>\n )\n }\n Fallback.displayName = `UnknownChart_${chartType}`\n return Fallback\n}\n\n/**\n * Creates a fallback component for a chart type with missing dependencies.\n */\nexport function createFallbackComponent(chartType: ChartType): LazyChartComponent {\n // Dependencies are declared on the chart's unified entry (custom or built-in).\n const depInfo = getChartEntry(chartType)?.dependencies\n\n const FallbackComponent: LazyChartComponent = ({ height }) => (\n <MissingDependencyFallback\n chartType={chartType}\n packageName={depInfo?.packageName || 'unknown'}\n installCommand={depInfo?.installCommand || `npm install [package-name]`}\n height={height}\n />\n )\n\n FallbackComponent.displayName = `${chartType}Fallback`\n return FallbackComponent\n}\n\n/**\n * Wraps a chart import function with error handling.\n * If the import fails (e.g., missing dependency), returns a fallback component.\n */\nexport function createSafeImport(\n chartType: ChartType,\n importFn: () => Promise<{ default: LazyChartComponent }>\n): () => Promise<{ default: LazyChartComponent }> {\n return async () => {\n try {\n return await importFn()\n } catch (error) {\n // Log the error for debugging\n console.warn(\n `[drizzle-cube] Failed to load ${chartType} chart:`,\n error instanceof Error ? error.message : error\n )\n\n // Track that this chart type failed\n failedChartTypes.add(chartType)\n\n // Return the fallback component wrapped in the expected format\n return { default: createFallbackComponent(chartType) }\n }\n }\n}\n\n/**\n * Register a custom chart component.\n * Used by the chart plugin system.\n */\nexport function registerChartComponent(\n type: string,\n component?: ComponentType<ChartProps>,\n lazyComponent?: () => Promise<{ default: ComponentType<ChartProps> }>,\n dependencies?: { packageName: string; installCommand: string }\n): void {\n // Clear any existing built-in cache entry so the custom chart takes priority\n chartLoaderCache.delete(type as ChartType)\n failedChartTypes.delete(type as ChartType)\n\n if (lazyComponent) {\n // Lazy import factory — wrap with safe import for graceful degradation\n const safeImport = dependencies\n ? createSafeImport(type as ChartType, lazyComponent)\n : lazyComponent\n customChartMap.set(type, lazy(safeImport))\n } else if (component) {\n // Eager component — wrap in a resolved lazy for consistent Suspense handling\n const comp = component\n customChartMap.set(type, lazy(() => Promise.resolve({ default: comp as LazyChartComponent })))\n }\n}\n\n/**\n * Unregister a custom chart component.\n * Used by the chart plugin system.\n */\nexport function unregisterChartComponent(type: string): void {\n customChartMap.delete(type)\n chartLoaderCache.delete(type as ChartType)\n failedChartTypes.delete(type as ChartType)\n}\n"],"mappings":";;;;;;AAmIA,SAAgBa,EACdC,GACAC,GACuB;CACvB,QAAQD,KAAW,CAAC,EAAA,CAAG,QAAQE,OAAYA,EAAO,aAAa,eAAeD,CAAS;AACzF;AAoJA,IAAaE,IAAsC;CACjD,WAAW;EACT;GACE,KAAK;GACL,OAAO;GACP,aAAa;GACb,WAAW;GACX,aAAa,CAAC,aAAa,eAAe;GAC1C,WAAW;EACb;EACA;GACE,KAAK;GACL,OAAO;GACP,aAAa;GACb,WAAW;GACX,aAAa,CAAC,WAAW,WAAW;GACpC,WAAW;EACb;EACA;GACE,KAAK;GACL,OAAO;GACP,aAAa;GACb,WAAW;GACX,aAAa,CAAC,WAAW;GACzB,WAAW;EACb;CACF;CACA,gBAAgB;EAAC;EAAc;EAAY;CAAa;AAC1D,GC1SMC,oBAAc,IAAI,IAAgC,GAKpDC,IAAsB,GACpBC,oBAAwB,IAAI,IAAgB;AAElD,SAASC,EAAyBC,GAAkC;CAElE,OADAF,EAAsB,IAAIE,CAAQ,SACrB;EACXF,EAAsB,OAAOE,CAAQ;CACvC;AACF;AAEA,SAASC,IAAiC;CACxC,OAAOJ;AACT;AAEA,SAASK,IAAiC;CACxCL;CACA,KAAK,IAAMG,KAAYF,GACrBE,EAAS;AAEb;AAcA,eAAsBG,EAAoBC,GAAuD;CAG/F,IAAIR,EAAY,IAAIQ,CAAS,GAC3B,OAAOR,EAAY,IAAIQ,CAAS;CAQlC,IAAMC,IAAQxB,EAAcuB,CAAS;CACrC,IAAI,CAACC,GACH,OAAO;CAGT,IAAI;EACF,IAAMC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AChC6B;AACT;AAKA,SAAgBG,EAAwBhC,GAA0C;CAEhF,IAAMiC,IAAUxD,EAAcuB,CAAS,CAAC,EAAE,cAEpCkC,KAAyC,EAAEJ,gBAC/CvD,kBAACK,GAAD;EACaoB;EACX,aAAaiC,GAAS,eAAe;EACrC,gBAAgBA,GAAS,kBAAkB;EACnCH;CACT,CAAA;CAIH,OADAI,EAAkB,cAAc,GAAGlC,EAAU,WACtCkC;AACT;AAMA,SAAgBC,EACdnC,GACAoC,GACgD;CAChD,OAAO,YAAY;EACjB,IAAI;GACF,OAAO,MAAMA,EAAS;EACxB,SAAShC,GAAO;GAWd,OATA,QAAQ,KACN,iCAAiCJ,EAAU,UAC3CI,aAAiB,QAAQA,EAAM,UAAUA,CAC3C,GAGAsB,EAAiB,IAAI1B,CAAS,GAGvB,EAAE,SAASgC,EAAwBhC,CAAS,EAAE;EACvD;CACF;AACF;AAMA,SAAgBqC,EACdd,GACAe,GACAC,GACAC,GACM;CAKN,IAHAf,EAAiB,OAAOF,CAAiB,GACzCG,EAAiB,OAAOH,CAAiB,GAErCgB,GAAe;EAEjB,IAAME,IAAaD,IACfL,EAAiBZ,GAAmBgB,CAAa,IACjDA;EACJZ,EAAe,IAAIJ,GAAM1C,EAAK4D,CAAU,CAAC;CAC3C,OAAO,IAAIH,GAAW;EAEpB,IAAMI,IAAOJ;EACbX,EAAe,IAAIJ,GAAM1C,QAAW,QAAQ,QAAQ,EAAE,SAAS6D,EAA2B,CAAC,CAAC,CAAC;CAC/F;AACF;AAMA,SAAgBC,EAAyBpB,GAAoB;CAC3DI,EAAe,OAAOJ,CAAI,GAC1BE,EAAiB,OAAOF,CAAiB,GACzCG,EAAiB,OAAOH,CAAiB;AAC3C"}
|
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
import { barChartConfig as e } from "./chart-config-bar-
|
|
2
|
-
import { lineChartConfig as t } from "./chart-config-line-
|
|
3
|
-
import { areaChartConfig as n } from "./chart-config-area-
|
|
4
|
-
import { pieChartConfig as r } from "./chart-config-pie-
|
|
1
|
+
import { barChartConfig as e } from "./chart-config-bar-DhqbYfpf.js";
|
|
2
|
+
import { lineChartConfig as t } from "./chart-config-line-CYwh72pj.js";
|
|
3
|
+
import { areaChartConfig as n } from "./chart-config-area-DVA0oKNp.js";
|
|
4
|
+
import { pieChartConfig as r } from "./chart-config-pie-CenIR70H.js";
|
|
5
5
|
import { scatterChartConfig as i } from "./chart-config-scatter-tYWb294D.js";
|
|
6
6
|
import { bubbleChartConfig as a } from "./chart-config-bubble-CICROYUw.js";
|
|
7
|
-
import { radarChartConfig as o } from "./chart-config-radar-
|
|
8
|
-
import { radialBarChartConfig as s } from "./chart-config-radial-bar-
|
|
9
|
-
import { treemapChartConfig as c } from "./chart-config-tree-map-
|
|
7
|
+
import { radarChartConfig as o } from "./chart-config-radar-iBtE5R3S.js";
|
|
8
|
+
import { radialBarChartConfig as s } from "./chart-config-radial-bar-U0gm1O8q.js";
|
|
9
|
+
import { treemapChartConfig as c } from "./chart-config-tree-map-DxSNKyGd.js";
|
|
10
10
|
import { dataTableConfig as l } from "./chart-config-data-table-Bs8M7Nyy.js";
|
|
11
11
|
import { n as u } from "./RecordsTable.config-DV_LGfjg.js";
|
|
12
12
|
import { activityGridChartConfig as d } from "./chart-config-activity-grid-Dal50APt.js";
|
|
13
|
-
import { kpiNumberConfig as f } from "./chart-config-kpi-number-
|
|
14
|
-
import { kpiDeltaConfig as p } from "./chart-config-kpi-delta-
|
|
13
|
+
import { kpiNumberConfig as f } from "./chart-config-kpi-number-B83Z2jLe.js";
|
|
14
|
+
import { kpiDeltaConfig as p } from "./chart-config-kpi-delta-BPMq7hzP.js";
|
|
15
15
|
import { kpiTextConfig as m } from "./chart-config-kpi-text-3ChS5ARA.js";
|
|
16
16
|
import { markdownConfig as h } from "./chart-config-markdown-BQaLP1Iu.js";
|
|
17
17
|
import { funnelChartConfig as g } from "./chart-config-funnel-CV47qVSO.js";
|
|
@@ -22,13 +22,13 @@ import { n as b } from "./RetentionHeatmap.config-CwA-Qhjz.js";
|
|
|
22
22
|
import { n as x } from "./RetentionCombinedChart.config-C-ZpQaAA.js";
|
|
23
23
|
import { boxPlotChartConfig as S } from "./chart-config-box-plot-BuKVgC3h.js";
|
|
24
24
|
import { n as C } from "./DotStripChart.config-BIo96sC-.js";
|
|
25
|
-
import { waterfallChartConfig as w } from "./chart-config-waterfall-
|
|
25
|
+
import { waterfallChartConfig as w } from "./chart-config-waterfall-DtDzu_14.js";
|
|
26
26
|
import { candlestickChartConfig as T } from "./chart-config-candlestick-C-TgHYEG.js";
|
|
27
|
-
import { measureProfileChartConfig as E } from "./chart-config-measure-profile-
|
|
27
|
+
import { measureProfileChartConfig as E } from "./chart-config-measure-profile-Chi9pZNK.js";
|
|
28
28
|
import { n as D } from "./ProportionBarChart.config-9fryUoIj.js";
|
|
29
29
|
import { gaugeChartConfig as O } from "./chart-config-gauge-CWFTDDxM.js";
|
|
30
|
-
import { a as k, i as A, n as j, o as M, t as N } from "./chartRegistry-
|
|
31
|
-
import { g as P, h as F, o as I, s as L } from "./chartComponentRegistry-
|
|
30
|
+
import { a as k, i as A, n as j, o as M, t as N } from "./chartRegistry-CI9eqtt9.js";
|
|
31
|
+
import { g as P, h as F, o as I, s as L } from "./chartComponentRegistry-LNS2NwAv.js";
|
|
32
32
|
// src/client/charts/chartConfigRegistry.ts
|
|
33
33
|
var R = {
|
|
34
34
|
bar: e,
|
|
@@ -121,4 +121,4 @@ var W = new class {
|
|
|
121
121
|
}();
|
|
122
122
|
export { z as n, B as r, W as t };
|
|
123
123
|
|
|
124
|
-
//# sourceMappingURL=chartPlugin-
|
|
124
|
+
//# sourceMappingURL=chartPlugin-yM7JPt-B.js.map
|