drizzle-cube 0.12.1 → 0.12.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/adapters/ActivityGridChart.config-D14_z5sv.js +1 -0
- package/dist/adapters/ActivityGridChart.config-ufhph9uT.cjs +1 -0
- package/dist/adapters/AreaChart.config-0WZQMQva.js +1 -0
- package/dist/adapters/AreaChart.config-D13ltksm.cjs +1 -0
- package/dist/adapters/BarChart.config-CKW_EixK.cjs +1 -0
- package/dist/adapters/BarChart.config-Dap2k5h9.js +1 -0
- package/dist/adapters/BoxPlotChart.config-BL9GycIS.js +1 -0
- package/dist/adapters/BoxPlotChart.config-D8ijk7P0.cjs +1 -0
- package/dist/adapters/BubbleChart.config-B5mdZpOU.js +1 -0
- package/dist/adapters/BubbleChart.config-D_F6Q5z3.cjs +1 -0
- package/dist/adapters/CandlestickChart.config-DWebnARH.cjs +1 -0
- package/dist/adapters/CandlestickChart.config-U_bjkKnh.js +1 -0
- package/dist/adapters/DataTable.config-CgONV9qM.cjs +1 -0
- package/dist/adapters/DataTable.config-Cuagfjxg.js +1 -0
- package/dist/adapters/DotStripChart.config-B5lxjWSO.js +1 -0
- package/dist/adapters/DotStripChart.config-fD9Mc6W1.cjs +1 -0
- package/dist/adapters/FunnelChart.config-BaE_hLT-.js +1 -0
- package/dist/adapters/FunnelChart.config-Cx7W7-R0.cjs +1 -0
- package/dist/adapters/GaugeChart.config-CgKuBQVo.cjs +1 -0
- package/dist/adapters/GaugeChart.config-ilNlLLj6.js +1 -0
- package/dist/adapters/HeatMapChart.config-Bbk6aa8K.js +1 -0
- package/dist/adapters/HeatMapChart.config-CURg_iiu.cjs +1 -0
- package/dist/adapters/KpiDelta.config-CuZ2C_6t.js +1 -0
- package/dist/adapters/KpiDelta.config-DRy870xF.cjs +1 -0
- package/dist/adapters/KpiNumber.config-BWowvaBG.cjs +1 -0
- package/dist/adapters/KpiNumber.config-h9VspPBo.js +1 -0
- package/dist/adapters/KpiText.config-CXouHoxx.js +1 -0
- package/dist/adapters/KpiText.config-dSbcOdVW.cjs +1 -0
- package/dist/adapters/LineChart.config-BrcTc3dO.cjs +1 -0
- package/dist/adapters/LineChart.config-DOZctkmK.js +1 -0
- package/dist/adapters/MarkdownChart.config-BduAIK5N.js +1 -0
- package/dist/adapters/MarkdownChart.config-CFnH92Fg.cjs +1 -0
- package/dist/adapters/MeasureProfileChart.config-BgdtMIbZ.js +1 -0
- package/dist/adapters/MeasureProfileChart.config-CUahwnse.cjs +1 -0
- package/dist/adapters/PieChart.config-Bwf8meCN.js +1 -0
- package/dist/adapters/PieChart.config-ClfJ6LyA.cjs +1 -0
- package/dist/adapters/ProportionBarChart.config-CKyen5fP.cjs +1 -0
- package/dist/adapters/ProportionBarChart.config-D7RADfKH.js +1 -0
- package/dist/adapters/RadarChart.config-CBR7pNrt.js +1 -0
- package/dist/adapters/RadarChart.config-DSLRklgx.cjs +1 -0
- package/dist/adapters/RadialBarChart.config-BTGjY6JD.js +1 -0
- package/dist/adapters/RadialBarChart.config-CPbimqdg.cjs +1 -0
- package/dist/adapters/RecordsTable.config-B1Z_3JTJ.js +1 -0
- package/dist/adapters/RecordsTable.config-C6QhLcZk.cjs +1 -0
- package/dist/adapters/RetentionCombinedChart.config-BkSezvSb.js +1 -0
- package/dist/adapters/RetentionCombinedChart.config-R1Eq-xRI.cjs +1 -0
- package/dist/adapters/RetentionHeatmap.config-BlUhtL5W.js +1 -0
- package/dist/adapters/RetentionHeatmap.config-DCIsToqo.cjs +1 -0
- package/dist/adapters/SankeyChart.config-Bt0F2A6e.js +1 -0
- package/dist/adapters/SankeyChart.config-_Z5ZrziF.cjs +1 -0
- package/dist/adapters/ScatterChart.config-BW0_kSo8.cjs +1 -0
- package/dist/adapters/ScatterChart.config-DCaM-v68.js +1 -0
- package/dist/adapters/SunburstChart.config-B8Q9pbbo.js +1 -0
- package/dist/adapters/SunburstChart.config-mhQZB6uc.cjs +1 -0
- package/dist/adapters/TreeMapChart.config-Ch--bdyv.js +1 -0
- package/dist/adapters/TreeMapChart.config-DaNlt1aC.cjs +1 -0
- package/dist/adapters/WaterfallChart.config-CR49XWjE.cjs +1 -0
- package/dist/adapters/WaterfallChart.config-qHaD0m4H.js +1 -0
- package/dist/adapters/core/cache-options.d.ts +4 -0
- package/dist/adapters/core/index.cjs +1 -1
- package/dist/adapters/core/index.js +1 -1
- package/dist/adapters/core-3nDM2f7O.cjs +1 -0
- package/dist/adapters/{core-D_0Wmhej.js → core-CD6SqK5q.js} +66 -58
- package/dist/adapters/{compiler-DqaN3YtE.js → cors-headers-DYYDrG7S.js} +129 -110
- package/dist/adapters/{compiler-DEvbReTk.cjs → cors-headers-DxkPVNnZ.cjs} +4 -4
- package/dist/adapters/cors-headers.d.ts +19 -0
- package/dist/adapters/express/index.cjs +1 -1
- package/dist/adapters/express/index.js +13 -13
- package/dist/adapters/fastify/index.cjs +1 -1
- package/dist/adapters/fastify/index.js +13 -13
- package/dist/adapters/{handler-HVRtFpEZ.js → handler-B_vsFWWm.js} +32 -32
- package/dist/adapters/{handler-XmEDxQUt.cjs → handler-DSOaXFuV.cjs} +3 -3
- package/dist/adapters/hono/index.cjs +1 -1
- package/dist/adapters/hono/index.js +12 -12
- package/dist/adapters/locale.d.ts +0 -1
- package/dist/adapters/mcp-app-html-DkiIh0rL.cjs +1 -0
- package/dist/adapters/mcp-app-html-DwnysAEL.js +5 -0
- package/dist/adapters/mcp-app-html.cjs +1 -1
- package/dist/adapters/mcp-app-html.js +1 -1
- package/dist/adapters/mcp-tools.cjs +1 -1
- package/dist/adapters/mcp-tools.js +3 -3
- package/dist/adapters/{mcp-transport-B8cN4YvW.cjs → mcp-transport-7zszPPXk.cjs} +1 -1
- package/dist/adapters/{mcp-transport-DhFjuVsC.js → mcp-transport-DVI1lCNM.js} +1 -1
- package/dist/adapters/nextjs/index.cjs +1 -1
- package/dist/adapters/nextjs/index.js +20 -20
- package/dist/adapters/{openai-BdF9UwVL.js → openai-Bdnnw3Ok.js} +1 -1
- package/dist/adapters/{openai-BuGJh2CT.cjs → openai-CE52anhW.cjs} +1 -1
- package/dist/adapters/{openai-D_3NG0fv.js → openai-DA9yrRkA.js} +1 -1
- package/dist/adapters/{openai-knSlM5V3.cjs → openai-JLaT_FPt.cjs} +1 -1
- package/dist/adapters/{utils-CS4TBdT1.js → utils-BtiRfbcX.js} +29 -2
- package/dist/adapters/utils-OLv25-nn.cjs +141 -0
- package/dist/adapters/utils.cjs +1 -1
- package/dist/adapters/utils.d.ts +5 -10
- package/dist/adapters/utils.js +1 -1
- package/dist/cjs/adapters/core/cache-options.d.ts +4 -0
- package/dist/cjs/adapters/cors-headers.d.ts +19 -0
- package/dist/cjs/adapters/locale.d.ts +0 -1
- package/dist/cjs/adapters/utils.d.ts +5 -10
- package/dist/cjs/client/charts/lazyChartConfigRegistry.d.ts +2 -2
- package/dist/cjs/client/client/BatchCoordinator.d.ts +21 -6
- package/dist/cjs/client/client/CubeClient.d.ts +34 -8
- package/dist/cjs/client/client/maxAge.d.ts +84 -0
- package/dist/cjs/client/client/subscription.d.ts +30 -0
- package/dist/cjs/client/components/AnalyticsDashboard.d.ts +1 -1
- package/dist/cjs/client/components/DashboardFilterPanel.d.ts +3 -2
- package/dist/cjs/client/components/DashboardFilters/CompactFilterBar.d.ts +3 -1
- package/dist/cjs/client/components/DashboardFilters/CompactFilterBarParts.d.ts +4 -0
- package/dist/cjs/client/components/DashboardFilters/DatePresetChips.d.ts +1 -0
- package/dist/cjs/client/components/DashboardFilters/FilterChip.d.ts +2 -0
- package/dist/cjs/client/components/DashboardFilters/FilterValuePopover.d.ts +1 -1
- package/dist/cjs/client/components/DashboardFilters/useCompactFilterBar.d.ts +3 -2
- package/dist/cjs/client/components/DashboardGrid.d.ts +8 -1
- package/dist/cjs/client/components/DashboardPortletCard.d.ts +1 -1
- package/dist/cjs/client/components/FloatingEditToolbar.d.ts +5 -1
- package/dist/cjs/client/components/MobileStackedLayout.d.ts +8 -2
- package/dist/cjs/client/components/PortletAnalysisModal.d.ts +4 -2
- package/dist/cjs/client/components/analyticsPortlet/usePortletDeadMembers.d.ts +4 -2
- package/dist/cjs/client/components/analyticsPortlet/usePortletQueryResults.d.ts +15 -5
- package/dist/cjs/client/components/analyticsPortlet/usePortletVisibility.d.ts +23 -0
- package/dist/cjs/client/components/dashboard/DashboardContext.d.ts +27 -6
- package/dist/cjs/client/components/dashboard/DashboardCoordinator.d.ts +1 -1
- package/dist/cjs/client/components/dashboard/DashboardEditBar.d.ts +1 -1
- package/dist/cjs/client/components/dashboard/DashboardRefreshSelector.d.ts +12 -0
- package/dist/cjs/client/components/dashboard/DashboardToolbar.d.ts +2 -1
- package/dist/cjs/client/components/dashboard/RefreshPauseToggle.d.ts +8 -0
- package/dist/cjs/client/components/dashboardPortletCard/DataFreshnessIndicator.d.ts +19 -0
- package/dist/cjs/client/components/dashboardPortletCard/PortletCardHeader.d.ts +13 -3
- package/dist/cjs/client/components/dashboardPortletCard/PortletFloatingActions.d.ts +2 -3
- package/dist/cjs/client/components/dashboardPortletCard/propsEqual.d.ts +7 -4
- package/dist/cjs/client/components/portletAnalysisModal/RefreshSettings.d.ts +24 -0
- package/dist/cjs/client/hooks/dashboard/useDashboardController.d.ts +6 -10
- package/dist/cjs/client/hooks/dashboard/useDashboardRefreshTimer.d.ts +28 -0
- package/dist/cjs/client/hooks/queries/useCubeLoadQuery.d.ts +28 -6
- package/dist/cjs/client/hooks/queries/useFlowQuery.d.ts +6 -3
- package/dist/cjs/client/hooks/queries/useMultiCubeLoadQuery.d.ts +15 -4
- package/dist/cjs/client/hooks/queries/useRetentionQuery.d.ts +7 -4
- package/dist/cjs/client/hooks/queries/useShownRowsAge.d.ts +10 -0
- package/dist/cjs/client/hooks/useAnalysisBuilderHook.d.ts +2 -3
- package/dist/cjs/client/hooks/useAnalysisEffects.d.ts +2 -0
- package/dist/cjs/client/hooks/useAnalysisQuery.d.ts +2 -3
- package/dist/cjs/client/hooks/useDashboardFilters.d.ts +7 -0
- package/dist/cjs/client/hooks/useDashboardHook.d.ts +7 -10
- package/dist/cjs/client/icons/types.d.ts +2 -0
- package/dist/cjs/client/index.d.ts +3 -1
- package/dist/cjs/client/shared/chartDefaults.d.ts +5 -3
- package/dist/cjs/client/shared/pendingChanges.d.ts +12 -0
- package/dist/cjs/client/stores/dashboardStore.d.ts +13 -0
- package/dist/cjs/client/types/funnel.d.ts +10 -4
- package/dist/cjs/client/types.d.ts +77 -3
- package/dist/cjs/client/utils/freshness.d.ts +37 -0
- package/dist/cjs/client/utils/multiQueryUtils.d.ts +23 -0
- package/dist/cjs/server/compiler.d.ts +2 -0
- package/dist/cjs/server/execution/query-result-cache.d.ts +8 -2
- package/dist/cjs/server/executor.d.ts +1 -0
- package/dist/cjs/server/physical-plan/processors/shared.d.ts +2 -0
- package/dist/cjs/server/types/core.d.ts +12 -1
- package/dist/cjs/server/types/cube.d.ts +7 -0
- package/dist/client/charts/lazyChartConfigRegistry.d.ts +2 -2
- package/dist/client/charts.js +13 -13
- package/dist/client/chunks/{DashboardEditModal-BnuKUeO4.js → DashboardEditModal-F2fGr29d.js} +3716 -3237
- package/dist/client/chunks/DashboardEditModal-F2fGr29d.js.map +1 -0
- package/dist/client/chunks/{DotStripChart-Cx9sKTGQ.js → DotStripChart-CQaJwo8K.js} +3 -3
- package/dist/client/chunks/{DotStripChart-Cx9sKTGQ.js.map → DotStripChart-CQaJwo8K.js.map} +1 -1
- package/dist/client/chunks/{ProportionBarChart-DpbPIrvi.js → ProportionBarChart-DiA5ZGeg.js} +3 -3
- package/dist/client/chunks/{ProportionBarChart-DpbPIrvi.js.map → ProportionBarChart-DiA5ZGeg.js.map} +1 -1
- package/dist/client/chunks/{RecordsTable-BOuaKB4P.js → RecordsTable-Bgqo-LjT.js} +166 -166
- package/dist/client/chunks/RecordsTable-Bgqo-LjT.js.map +1 -0
- package/dist/client/chunks/{RetentionCombinedChart-ZmHsRUvi.js → RetentionCombinedChart-BtMRtwlb.js} +3 -3
- package/dist/client/chunks/{RetentionCombinedChart-ZmHsRUvi.js.map → RetentionCombinedChart-BtMRtwlb.js.map} +1 -1
- package/dist/client/chunks/{RetentionHeatmap-D0JuLo7z.js → RetentionHeatmap-ChTa35gp.js} +2 -2
- package/dist/client/chunks/{RetentionHeatmap-D0JuLo7z.js.map → RetentionHeatmap-ChTa35gp.js.map} +1 -1
- package/dist/client/chunks/{analysis-builder-BOixrevS.js → analysis-builder-CnmkTZm2.js} +831 -845
- package/dist/client/chunks/analysis-builder-CnmkTZm2.js.map +1 -0
- package/dist/client/chunks/{analysis-builder-shared-jP6CddjM.js → analysis-builder-shared-BsjxOL7r.js} +809 -803
- package/dist/client/chunks/analysis-builder-shared-BsjxOL7r.js.map +1 -0
- package/dist/client/chunks/{chart-activity-grid-DsNm6fyo.js → chart-activity-grid-DeDPSs12.js} +28 -2
- package/dist/client/chunks/{chart-activity-grid-DsNm6fyo.js.map → chart-activity-grid-DeDPSs12.js.map} +1 -1
- package/dist/client/chunks/{chart-area-a_KELq6t.js → chart-area-WyrVYze7.js} +2 -2
- package/dist/client/chunks/{chart-area-a_KELq6t.js.map → chart-area-WyrVYze7.js.map} +1 -1
- package/dist/client/chunks/{chart-bar-WVxq1S5Z.js → chart-bar-wGHC1Hfo.js} +3 -3
- package/dist/client/chunks/{chart-bar-WVxq1S5Z.js.map → chart-bar-wGHC1Hfo.js.map} +1 -1
- package/dist/client/chunks/{chart-box-plot-LQVRkeTO.js → chart-box-plot-CW5GZHM9.js} +2 -2
- package/dist/client/chunks/{chart-box-plot-LQVRkeTO.js.map → chart-box-plot-CW5GZHM9.js.map} +1 -1
- package/dist/client/chunks/{chart-bubble-CylNA0iN.js → chart-bubble-CKkVi7L2.js} +2 -2
- package/dist/client/chunks/{chart-bubble-CylNA0iN.js.map → chart-bubble-CKkVi7L2.js.map} +1 -1
- package/dist/client/chunks/{chart-candlestick-D8iqjo3k.js → chart-candlestick-BPFeay7t.js} +2 -2
- package/dist/client/chunks/{chart-candlestick-D8iqjo3k.js.map → chart-candlestick-BPFeay7t.js.map} +1 -1
- package/dist/client/chunks/{chart-data-table-OT0wqqH1.js → chart-data-table-uJG1V-be.js} +1133 -854
- package/dist/client/chunks/chart-data-table-uJG1V-be.js.map +1 -0
- package/dist/client/chunks/{chart-funnel-D1LrMOYp.js → chart-funnel-BtUexI1t.js} +2 -2
- package/dist/client/chunks/{chart-funnel-D1LrMOYp.js.map → chart-funnel-BtUexI1t.js.map} +1 -1
- package/dist/client/chunks/{chart-gauge-DhxMq9zr.js → chart-gauge-BSrfZFsW.js} +3 -3
- package/dist/client/chunks/{chart-gauge-DhxMq9zr.js.map → chart-gauge-BSrfZFsW.js.map} +1 -1
- package/dist/client/chunks/{chart-heat-map-BEs4Oltn.js → chart-heat-map-DtMtuFnw.js} +3 -3
- package/dist/client/chunks/{chart-heat-map-BEs4Oltn.js.map → chart-heat-map-DtMtuFnw.js.map} +1 -1
- package/dist/client/chunks/{chart-kpi-delta-7qRGTeBe.js → chart-kpi-delta-B0BkN_Q6.js} +3 -3
- package/dist/client/chunks/{chart-kpi-delta-7qRGTeBe.js.map → chart-kpi-delta-B0BkN_Q6.js.map} +1 -1
- package/dist/client/chunks/{chart-kpi-number-DU1Rh4qF.js → chart-kpi-number-zlBkLesi.js} +5 -5
- package/dist/client/chunks/{chart-kpi-number-DU1Rh4qF.js.map → chart-kpi-number-zlBkLesi.js.map} +1 -1
- package/dist/client/chunks/{chart-kpi-text-FzAamcUq.js → chart-kpi-text-BXXfkhz_.js} +3 -3
- package/dist/client/chunks/{chart-kpi-text-FzAamcUq.js.map → chart-kpi-text-BXXfkhz_.js.map} +1 -1
- package/dist/client/chunks/{chart-line-RHy9KjtO.js → chart-line-D_yFQDze.js} +3 -3
- package/dist/client/chunks/{chart-line-RHy9KjtO.js.map → chart-line-D_yFQDze.js.map} +1 -1
- package/dist/client/chunks/{chart-markdown-C_Of-_ge.js → chart-markdown-DaBTpRgf.js} +2 -2
- package/dist/client/chunks/{chart-markdown-C_Of-_ge.js.map → chart-markdown-DaBTpRgf.js.map} +1 -1
- package/dist/client/chunks/{chart-measure-profile-B_5nRlFw.js → chart-measure-profile-DOHIm-QY.js} +3 -3
- package/dist/client/chunks/{chart-measure-profile-B_5nRlFw.js.map → chart-measure-profile-DOHIm-QY.js.map} +1 -1
- package/dist/client/chunks/{chart-pie-BndFTpDb.js → chart-pie-DLrT81CL.js} +3 -3
- package/dist/client/chunks/{chart-pie-BndFTpDb.js.map → chart-pie-DLrT81CL.js.map} +1 -1
- package/dist/client/chunks/{chart-radar-CEl8JqEM.js → chart-radar-CcXG6k6o.js} +3 -3
- package/dist/client/chunks/{chart-radar-CEl8JqEM.js.map → chart-radar-CcXG6k6o.js.map} +1 -1
- package/dist/client/chunks/{chart-radial-bar-BoVduM6q.js → chart-radial-bar-DYn5FLrG.js} +3 -3
- package/dist/client/chunks/{chart-radial-bar-BoVduM6q.js.map → chart-radial-bar-DYn5FLrG.js.map} +1 -1
- package/dist/client/chunks/{chart-sankey-OrhsKWge.js → chart-sankey-CWkctg-k.js} +2 -2
- package/dist/client/chunks/{chart-sankey-OrhsKWge.js.map → chart-sankey-CWkctg-k.js.map} +1 -1
- package/dist/client/chunks/{chart-scatter-Sl-hTrDW.js → chart-scatter-CCGL2IEP.js} +3 -3
- package/dist/client/chunks/{chart-scatter-Sl-hTrDW.js.map → chart-scatter-CCGL2IEP.js.map} +1 -1
- package/dist/client/chunks/{chart-sunburst-ShjUy6Zz.js → chart-sunburst-9sgiHFSO.js} +3 -3
- package/dist/client/chunks/{chart-sunburst-ShjUy6Zz.js.map → chart-sunburst-9sgiHFSO.js.map} +1 -1
- package/dist/client/chunks/{chart-tree-map-DoxyxdD2.js → chart-tree-map-DOWeXCn_.js} +3 -3
- package/dist/client/chunks/{chart-tree-map-DoxyxdD2.js.map → chart-tree-map-DOWeXCn_.js.map} +1 -1
- package/dist/client/chunks/{chart-waterfall-DWLPBbXk.js → chart-waterfall-BS7x0dW-.js} +3 -3
- package/dist/client/chunks/{chart-waterfall-DWLPBbXk.js.map → chart-waterfall-BS7x0dW-.js.map} +1 -1
- package/dist/client/chunks/{charts-core-DbyNKYNK.js → charts-core-DM-Eav_9.js} +2 -2
- package/dist/client/chunks/{charts-core-DbyNKYNK.js.map → charts-core-DM-Eav_9.js.map} +1 -1
- package/dist/client/chunks/charts-loader-3N-LqjLk.js +87 -0
- package/dist/client/chunks/{charts-loader-DEIGUdUM.js.map → charts-loader-3N-LqjLk.js.map} +1 -1
- package/dist/client/chunks/{dashboardExport-Cy5OOMpb.js → dashboardExport-ZiT4DcDZ.js} +143 -121
- package/dist/client/chunks/dashboardExport-ZiT4DcDZ.js.map +1 -0
- package/dist/client/chunks/{gapFilling-DKBRHcQL.js → gapFilling-C-A4o8Cl.js} +2 -1
- package/dist/client/chunks/{gapFilling-DKBRHcQL.js.map → gapFilling-C-A4o8Cl.js.map} +1 -1
- package/dist/client/chunks/{nl-NL-Dwf-Sv3i.js → nl-NL-CKfZudeP.js} +27 -1
- package/dist/client/chunks/{nl-NL-Dwf-Sv3i.js.map → nl-NL-CKfZudeP.js.map} +1 -1
- package/dist/client/chunks/{schema-visualization-D8Ak7GUd.js → schema-visualization-BO70spCF.js} +3 -3
- package/dist/client/chunks/{schema-visualization-D8Ak7GUd.js.map → schema-visualization-BO70spCF.js.map} +1 -1
- package/dist/client/chunks/useDirtyStateTracking-OVW-JnrF.js +1086 -0
- package/dist/client/chunks/useDirtyStateTracking-OVW-JnrF.js.map +1 -0
- package/dist/client/chunks/{useExplainAI-C73X4MkX.js → useExplainAI-BrjlR24K.js} +25 -25
- package/dist/client/chunks/{useExplainAI-C73X4MkX.js.map → useExplainAI-BrjlR24K.js.map} +1 -1
- package/dist/client/chunks/{vendor-C_TrpV9I.js → vendor-Das3qwov.js} +188 -188
- package/dist/client/chunks/vendor-Das3qwov.js.map +1 -0
- package/dist/client/client/BatchCoordinator.d.ts +21 -6
- package/dist/client/client/CubeClient.d.ts +34 -8
- package/dist/client/client/maxAge.d.ts +84 -0
- package/dist/client/client/subscription.d.ts +30 -0
- package/dist/client/components/AnalyticsDashboard.d.ts +1 -1
- package/dist/client/components/DashboardFilterPanel.d.ts +3 -2
- package/dist/client/components/DashboardFilters/CompactFilterBar.d.ts +3 -1
- package/dist/client/components/DashboardFilters/CompactFilterBarParts.d.ts +4 -0
- package/dist/client/components/DashboardFilters/DatePresetChips.d.ts +1 -0
- package/dist/client/components/DashboardFilters/FilterChip.d.ts +2 -0
- package/dist/client/components/DashboardFilters/FilterValuePopover.d.ts +1 -1
- package/dist/client/components/DashboardFilters/useCompactFilterBar.d.ts +3 -2
- package/dist/client/components/DashboardGrid.d.ts +8 -1
- package/dist/client/components/DashboardPortletCard.d.ts +1 -1
- package/dist/client/components/FloatingEditToolbar.d.ts +5 -1
- package/dist/client/components/MobileStackedLayout.d.ts +8 -2
- package/dist/client/components/PortletAnalysisModal.d.ts +4 -2
- package/dist/client/components/analyticsPortlet/usePortletDeadMembers.d.ts +4 -2
- package/dist/client/components/analyticsPortlet/usePortletQueryResults.d.ts +15 -5
- package/dist/client/components/analyticsPortlet/usePortletVisibility.d.ts +23 -0
- package/dist/client/components/dashboard/DashboardContext.d.ts +27 -6
- package/dist/client/components/dashboard/DashboardCoordinator.d.ts +1 -1
- package/dist/client/components/dashboard/DashboardEditBar.d.ts +1 -1
- package/dist/client/components/dashboard/DashboardRefreshSelector.d.ts +12 -0
- package/dist/client/components/dashboard/DashboardToolbar.d.ts +2 -1
- package/dist/client/components/dashboard/RefreshPauseToggle.d.ts +8 -0
- package/dist/client/components/dashboardPortletCard/DataFreshnessIndicator.d.ts +19 -0
- package/dist/client/components/dashboardPortletCard/PortletCardHeader.d.ts +13 -3
- package/dist/client/components/dashboardPortletCard/PortletFloatingActions.d.ts +2 -3
- package/dist/client/components/dashboardPortletCard/propsEqual.d.ts +7 -4
- package/dist/client/components/portletAnalysisModal/RefreshSettings.d.ts +24 -0
- package/dist/client/components.js +1 -1
- package/dist/client/hooks/dashboard/useDashboardController.d.ts +6 -10
- package/dist/client/hooks/dashboard/useDashboardRefreshTimer.d.ts +28 -0
- package/dist/client/hooks/queries/useCubeLoadQuery.d.ts +28 -6
- package/dist/client/hooks/queries/useFlowQuery.d.ts +6 -3
- package/dist/client/hooks/queries/useMultiCubeLoadQuery.d.ts +15 -4
- package/dist/client/hooks/queries/useRetentionQuery.d.ts +7 -4
- package/dist/client/hooks/queries/useShownRowsAge.d.ts +10 -0
- package/dist/client/hooks/useAnalysisBuilderHook.d.ts +2 -3
- package/dist/client/hooks/useAnalysisEffects.d.ts +2 -0
- package/dist/client/hooks/useAnalysisQuery.d.ts +2 -3
- package/dist/client/hooks/useDashboardFilters.d.ts +7 -0
- package/dist/client/hooks/useDashboardHook.d.ts +7 -10
- package/dist/client/hooks.js +4 -4
- package/dist/client/icons/types.d.ts +2 -0
- package/dist/client/icons.js +1 -1
- package/dist/client/index.d.ts +3 -1
- package/dist/client/index.js +265 -265
- package/dist/client/index.js.map +1 -1
- package/dist/client/providers.js +3 -3
- package/dist/client/schema.js +1 -1
- package/dist/client/shared/chartDefaults.d.ts +5 -3
- package/dist/client/shared/pendingChanges.d.ts +12 -0
- package/dist/client/stores/dashboardStore.d.ts +13 -0
- package/dist/client/types/funnel.d.ts +10 -4
- package/dist/client/types.d.ts +77 -3
- package/dist/client/utils/freshness.d.ts +37 -0
- package/dist/client/utils/multiQueryUtils.d.ts +23 -0
- package/dist/client/utils.js +6 -6
- package/dist/client-bundle-stats.html +1 -1
- package/dist/mcp-app/mcp-app.html +100 -100
- package/dist/server/compiler.d.ts +2 -0
- package/dist/server/execution/query-result-cache.d.ts +8 -2
- package/dist/server/executor.d.ts +1 -0
- package/dist/server/index.cjs +42 -42
- package/dist/server/index.js +1263 -1229
- package/dist/server/physical-plan/processors/shared.d.ts +2 -0
- package/dist/server/types/core.d.ts +12 -1
- package/dist/server/types/cube.d.ts +7 -0
- package/package.json +1 -1
- package/dist/adapters/ActivityGridChart.config-CPDtUaxW.cjs +0 -1
- package/dist/adapters/ActivityGridChart.config-DiFh1YnV.js +0 -1
- package/dist/adapters/AreaChart.config-BpqqAE80.cjs +0 -1
- package/dist/adapters/AreaChart.config-PtWbm6zf.js +0 -1
- package/dist/adapters/BarChart.config-BuI-bR2P.cjs +0 -1
- package/dist/adapters/BarChart.config-Df-PAP4z.js +0 -1
- package/dist/adapters/BoxPlotChart.config-BRKdy7Ns.js +0 -1
- package/dist/adapters/BoxPlotChart.config-Cp1-j_Ox.cjs +0 -1
- package/dist/adapters/BubbleChart.config-B_K6qEb3.js +0 -1
- package/dist/adapters/BubbleChart.config-DOU4NXqA.cjs +0 -1
- package/dist/adapters/CandlestickChart.config-C-ugFQ7P.js +0 -1
- package/dist/adapters/CandlestickChart.config-CqOWXejK.cjs +0 -1
- package/dist/adapters/DataTable.config-CBqfRrWN.cjs +0 -1
- package/dist/adapters/DataTable.config-tKzdYgrH.js +0 -1
- package/dist/adapters/DotStripChart.config-C7ErrLsf.js +0 -1
- package/dist/adapters/DotStripChart.config-CijSEksh.cjs +0 -1
- package/dist/adapters/FunnelChart.config-CyKO54ax.js +0 -1
- package/dist/adapters/FunnelChart.config-Sfav7sbv.cjs +0 -1
- package/dist/adapters/GaugeChart.config-BFbwYtsw.cjs +0 -1
- package/dist/adapters/GaugeChart.config-D7F3h4pU.js +0 -1
- package/dist/adapters/HeatMapChart.config-BiAmCffs.js +0 -1
- package/dist/adapters/HeatMapChart.config-DSXPzRKX.cjs +0 -1
- package/dist/adapters/KpiDelta.config-bCgUDnXB.cjs +0 -1
- package/dist/adapters/KpiDelta.config-xqLHGIV4.js +0 -1
- package/dist/adapters/KpiNumber.config-BDS_Bbit.cjs +0 -1
- package/dist/adapters/KpiNumber.config-CkJrVos4.js +0 -1
- package/dist/adapters/KpiText.config-BYg0b_F-.cjs +0 -1
- package/dist/adapters/KpiText.config-MDL0Ryfm.js +0 -1
- package/dist/adapters/LineChart.config-CkutnuLC.js +0 -1
- package/dist/adapters/LineChart.config-DHaH4EGn.cjs +0 -1
- package/dist/adapters/MarkdownChart.config-BLMG3J1J.cjs +0 -1
- package/dist/adapters/MarkdownChart.config-D6I1ssv4.js +0 -1
- package/dist/adapters/MeasureProfileChart.config-BqUMPDvt.cjs +0 -1
- package/dist/adapters/MeasureProfileChart.config-Do3M_Ysz.js +0 -1
- package/dist/adapters/PieChart.config-BbTDULWi.cjs +0 -1
- package/dist/adapters/PieChart.config-DQOY9v4X.js +0 -1
- package/dist/adapters/ProportionBarChart.config-BIEsty_Q.cjs +0 -1
- package/dist/adapters/ProportionBarChart.config-DdIXVNEC.js +0 -1
- package/dist/adapters/RadarChart.config-Kzg1gdEV.cjs +0 -1
- package/dist/adapters/RadarChart.config-uDhtdEst.js +0 -1
- package/dist/adapters/RadialBarChart.config-DA6a3VHY.cjs +0 -1
- package/dist/adapters/RadialBarChart.config-SgiiAoQe.js +0 -1
- package/dist/adapters/RecordsTable.config-B4PKTt98.js +0 -1
- package/dist/adapters/RecordsTable.config-o3BpbfZh.cjs +0 -1
- package/dist/adapters/RetentionCombinedChart.config-Di74WX5H.cjs +0 -1
- package/dist/adapters/RetentionCombinedChart.config-DsxKAoop.js +0 -1
- package/dist/adapters/RetentionHeatmap.config-DYQ0KjYo.js +0 -1
- package/dist/adapters/RetentionHeatmap.config-GapsTJoA.cjs +0 -1
- package/dist/adapters/SankeyChart.config-Bm_zLd32.cjs +0 -1
- package/dist/adapters/SankeyChart.config-MI4En5Kt.js +0 -1
- package/dist/adapters/ScatterChart.config-DgnPt-Sc.js +0 -1
- package/dist/adapters/ScatterChart.config-yC-WNnvU.cjs +0 -1
- package/dist/adapters/SunburstChart.config-C7RtFfC-.cjs +0 -1
- package/dist/adapters/SunburstChart.config-DKiYK73Z.js +0 -1
- package/dist/adapters/TreeMapChart.config-B2Y1OEQX.js +0 -1
- package/dist/adapters/TreeMapChart.config-bKilQLfd.cjs +0 -1
- package/dist/adapters/WaterfallChart.config-Kk7bCWf1.cjs +0 -1
- package/dist/adapters/WaterfallChart.config-ydLPycYF.js +0 -1
- package/dist/adapters/core-D-wZ8ceW.cjs +0 -1
- package/dist/adapters/mcp-app-html-Cm6V045a.cjs +0 -1
- package/dist/adapters/mcp-app-html-wZEFmwLE.js +0 -5
- package/dist/adapters/utils-DfLEeAJB.cjs +0 -141
- package/dist/client/chunks/DashboardEditModal-BnuKUeO4.js.map +0 -1
- package/dist/client/chunks/RecordsTable-BOuaKB4P.js.map +0 -1
- package/dist/client/chunks/analysis-builder-BOixrevS.js.map +0 -1
- package/dist/client/chunks/analysis-builder-shared-jP6CddjM.js.map +0 -1
- package/dist/client/chunks/chart-data-table-OT0wqqH1.js.map +0 -1
- package/dist/client/chunks/charts-loader-DEIGUdUM.js +0 -87
- package/dist/client/chunks/dashboardExport-Cy5OOMpb.js.map +0 -1
- package/dist/client/chunks/useDirtyStateTracking-vL8pFTP4.js +0 -1148
- package/dist/client/chunks/useDirtyStateTracking-vL8pFTP4.js.map +0 -1
- package/dist/client/chunks/vendor-C_TrpV9I.js.map +0 -1
|
@@ -1,18 +1,18 @@
|
|
|
1
|
-
import { A as e, C as t,
|
|
2
|
-
import { E as
|
|
3
|
-
import { i as
|
|
4
|
-
import { B as
|
|
5
|
-
import { r as
|
|
6
|
-
import { a as
|
|
7
|
-
import { F as
|
|
8
|
-
import { n as P } from "./charts-core-
|
|
9
|
-
import F, { Component as I, forwardRef as L, memo as R, useCallback as z, useEffect as B, useImperativeHandle as
|
|
1
|
+
import { A as e, C as t, Rt as n, _ as r, bt as i, l as a, u as o, y as s, zt as c } from "./chart-data-table-uJG1V-be.js";
|
|
2
|
+
import { E as l, M as u, S as d, c as f, o as p, s as m, y as h } from "./DashboardEditModal-F2fGr29d.js";
|
|
3
|
+
import { i as g, n as _, o as v, r as y, s as b } from "./retention-ChW9jYdy.js";
|
|
4
|
+
import { B as x, F as S } from "./chart-activity-grid-DeDPSs12.js";
|
|
5
|
+
import { r as C, t as w } from "./useExplainAI-BrjlR24K.js";
|
|
6
|
+
import { a as T, t as E } from "./charts-loader-3N-LqjLk.js";
|
|
7
|
+
import { F as D, M as O, N as k, S as A, c as j, n as ee, p as M, t as N, u as te } from "./analysis-builder-shared-BsjxOL7r.js";
|
|
8
|
+
import { n as P } from "./charts-core-DM-Eav_9.js";
|
|
9
|
+
import F, { Component as I, forwardRef as L, memo as R, useCallback as z, useEffect as B, useImperativeHandle as ne, useMemo as V, useRef as H, useState as U, useSyncExternalStore as re } from "react";
|
|
10
10
|
import { Fragment as W, jsx as G, jsxs as K } from "react/jsx-runtime";
|
|
11
11
|
//#region src/client/shared/components/QueryAnalysisPanel.sections.tsx
|
|
12
|
-
function
|
|
12
|
+
function ie(e) {
|
|
13
13
|
return e.replace(/([a-z])([A-Z])/g, "$1 $2").replace(/_/g, " ").replace(/\b\w/g, (e) => e.toUpperCase());
|
|
14
14
|
}
|
|
15
|
-
function
|
|
15
|
+
function ae(e) {
|
|
16
16
|
switch (e) {
|
|
17
17
|
case "most_dimensions": return "bg-dc-info-bg text-dc-info";
|
|
18
18
|
case "most_connected": return "bg-dc-accent-bg text-dc-accent";
|
|
@@ -21,7 +21,7 @@ function ie(e) {
|
|
|
21
21
|
default: return "bg-dc-muted-bg text-dc-muted";
|
|
22
22
|
}
|
|
23
23
|
}
|
|
24
|
-
var
|
|
24
|
+
var oe = ({ jp: e }) => {
|
|
25
25
|
let t = s("chevronRight");
|
|
26
26
|
return !e.pathFound || !e.path || e.path.length === 0 ? null : /* @__PURE__ */ G("div", {
|
|
27
27
|
className: "dc:space-y-1 dc:ml-2",
|
|
@@ -54,8 +54,8 @@ var ae = ({ jp: e }) => {
|
|
|
54
54
|
]
|
|
55
55
|
}, n))
|
|
56
56
|
});
|
|
57
|
-
},
|
|
58
|
-
let { t } =
|
|
57
|
+
}, se = ({ jp: e }) => {
|
|
58
|
+
let { t } = S();
|
|
59
59
|
return e.selection ? /* @__PURE__ */ K("div", {
|
|
60
60
|
className: "dc:mt-2 dc:ml-2 dc:text-xs text-dc-text-muted",
|
|
61
61
|
children: [
|
|
@@ -63,13 +63,13 @@ var ae = ({ jp: e }) => {
|
|
|
63
63
|
className: "dc:font-medium text-dc-text",
|
|
64
64
|
children: t("queryAnalysis.joinPaths.selection")
|
|
65
65
|
}),
|
|
66
|
-
/* @__PURE__ */ G("span", { children: ` ${
|
|
66
|
+
/* @__PURE__ */ G("span", { children: ` ${ie(e.selection.strategy)}` }),
|
|
67
67
|
typeof e.selection.selectedRank == "number" && /* @__PURE__ */ G("span", { children: `, selected #${e.selection.selectedRank}` }),
|
|
68
68
|
typeof e.selection.selectedScore == "number" && /* @__PURE__ */ G("span", { children: `, score ${e.selection.selectedScore}` })
|
|
69
69
|
]
|
|
70
70
|
}) : null;
|
|
71
|
-
},
|
|
72
|
-
let { t: n } =
|
|
71
|
+
}, q = ({ jp: e, primaryCube: t }) => {
|
|
72
|
+
let { t: n } = S();
|
|
73
73
|
return !e.selection?.candidates || e.selection.candidates.length === 0 ? null : /* @__PURE__ */ K("details", {
|
|
74
74
|
className: "dc:mt-2",
|
|
75
75
|
children: [/* @__PURE__ */ G("summary", {
|
|
@@ -96,7 +96,7 @@ var ae = ({ jp: e }) => {
|
|
|
96
96
|
})]
|
|
97
97
|
});
|
|
98
98
|
}, ce = ({ jp: e }) => {
|
|
99
|
-
let { t } =
|
|
99
|
+
let { t } = S();
|
|
100
100
|
return !e.visitedCubes || e.visitedCubes.length === 0 || e.pathFound ? null : /* @__PURE__ */ K("details", {
|
|
101
101
|
className: "dc:mt-1",
|
|
102
102
|
children: [/* @__PURE__ */ G("summary", {
|
|
@@ -141,9 +141,9 @@ var ae = ({ jp: e }) => {
|
|
|
141
141
|
jp: e,
|
|
142
142
|
primaryCube: t
|
|
143
143
|
}),
|
|
144
|
-
/* @__PURE__ */ G(ae, { jp: e }),
|
|
145
144
|
/* @__PURE__ */ G(oe, { jp: e }),
|
|
146
|
-
/* @__PURE__ */ G(se, {
|
|
145
|
+
/* @__PURE__ */ G(se, { jp: e }),
|
|
146
|
+
/* @__PURE__ */ G(q, {
|
|
147
147
|
jp: e,
|
|
148
148
|
primaryCube: t
|
|
149
149
|
}),
|
|
@@ -154,7 +154,7 @@ var ae = ({ jp: e }) => {
|
|
|
154
154
|
/* @__PURE__ */ G(ce, { jp: e })
|
|
155
155
|
]
|
|
156
156
|
}), de = ({ analysis: e }) => {
|
|
157
|
-
let { t } =
|
|
157
|
+
let { t } = S(), n = s("link");
|
|
158
158
|
return e.joinPaths.length === 0 ? null : /* @__PURE__ */ K("div", {
|
|
159
159
|
className: "dc:border-b border-dc-border dc:pb-3",
|
|
160
160
|
children: [/* @__PURE__ */ K("h4", {
|
|
@@ -169,7 +169,7 @@ var ae = ({ jp: e }) => {
|
|
|
169
169
|
})]
|
|
170
170
|
});
|
|
171
171
|
}, fe = ({ analysis: e }) => {
|
|
172
|
-
let { t } =
|
|
172
|
+
let { t } = S(), n = s("table"), r = s("success"), i = s("error");
|
|
173
173
|
return /* @__PURE__ */ K("div", {
|
|
174
174
|
className: "dc:border-b border-dc-border dc:pb-3",
|
|
175
175
|
children: [/* @__PURE__ */ K("h4", {
|
|
@@ -184,8 +184,8 @@ var ae = ({ jp: e }) => {
|
|
|
184
184
|
className: "dc:font-mono dc:font-medium text-dc-primary",
|
|
185
185
|
children: e.primaryCube.selectedCube
|
|
186
186
|
}), /* @__PURE__ */ G("span", {
|
|
187
|
-
className: `dc:text-xs dc:px-2 dc:py-0.5 dc:rounded-sm ${
|
|
188
|
-
children:
|
|
187
|
+
className: `dc:text-xs dc:px-2 dc:py-0.5 dc:rounded-sm ${ae(e.primaryCube.reason)}`,
|
|
188
|
+
children: ie(e.primaryCube.reason)
|
|
189
189
|
})]
|
|
190
190
|
}),
|
|
191
191
|
/* @__PURE__ */ G("p", {
|
|
@@ -230,7 +230,7 @@ var ae = ({ jp: e }) => {
|
|
|
230
230
|
})]
|
|
231
231
|
});
|
|
232
232
|
}, pe = ({ analysis: e }) => {
|
|
233
|
-
let { t } =
|
|
233
|
+
let { t } = S(), n = s("table");
|
|
234
234
|
return e.preAggregations.length === 0 ? null : /* @__PURE__ */ K("div", {
|
|
235
235
|
className: "dc:border-b border-dc-border dc:pb-3",
|
|
236
236
|
children: [/* @__PURE__ */ K("h4", {
|
|
@@ -289,7 +289,7 @@ var ae = ({ jp: e }) => {
|
|
|
289
289
|
})]
|
|
290
290
|
});
|
|
291
291
|
}, me = ({ analysis: e }) => {
|
|
292
|
-
let { t } =
|
|
292
|
+
let { t } = S(), n = s("warning");
|
|
293
293
|
return !e.warnings || e.warnings.length === 0 ? null : /* @__PURE__ */ K("div", { children: [/* @__PURE__ */ K("h4", {
|
|
294
294
|
className: "dc:text-sm dc:font-semibold text-dc-warning dc:mb-2 dc:flex dc:items-center",
|
|
295
295
|
children: [/* @__PURE__ */ G(n, { className: "dc:w-4 dc:h-4 dc:mr-2" }), t("queryAnalysis.warnings")]
|
|
@@ -297,11 +297,11 @@ var ae = ({ jp: e }) => {
|
|
|
297
297
|
className: "list-disc dc:list-inside dc:text-xs text-dc-warning dc:space-y-1",
|
|
298
298
|
children: e.warnings.map((e, t) => /* @__PURE__ */ G("li", { children: e }, t))
|
|
299
299
|
})] });
|
|
300
|
-
},
|
|
301
|
-
let { t } =
|
|
300
|
+
}, J = ({ analysis: e }) => {
|
|
301
|
+
let { t } = S(), n = s("info"), r = [
|
|
302
302
|
{
|
|
303
303
|
label: t("queryAnalysis.summary.type"),
|
|
304
|
-
value:
|
|
304
|
+
value: ie(e.querySummary.queryType)
|
|
305
305
|
},
|
|
306
306
|
{
|
|
307
307
|
label: t("queryAnalysis.summary.cubes"),
|
|
@@ -317,7 +317,7 @@ var ae = ({ jp: e }) => {
|
|
|
317
317
|
},
|
|
318
318
|
...e.querySummary.measureStrategy ? [{
|
|
319
319
|
label: t("queryAnalysis.summary.strategy"),
|
|
320
|
-
value:
|
|
320
|
+
value: ie(e.querySummary.measureStrategy)
|
|
321
321
|
}] : []
|
|
322
322
|
];
|
|
323
323
|
return /* @__PURE__ */ K("div", {
|
|
@@ -341,7 +341,7 @@ var ae = ({ jp: e }) => {
|
|
|
341
341
|
})]
|
|
342
342
|
});
|
|
343
343
|
}, he = ({ analysis: e }) => {
|
|
344
|
-
let { t } =
|
|
344
|
+
let { t } = S();
|
|
345
345
|
return e.cubesInvolved.length === 0 ? null : /* @__PURE__ */ K("div", {
|
|
346
346
|
className: "dc:text-xs text-dc-text-muted dc:pt-2 dc:border-t border-dc-border",
|
|
347
347
|
children: [
|
|
@@ -356,16 +356,16 @@ var ae = ({ jp: e }) => {
|
|
|
356
356
|
}, ge = ({ analysis: e }) => /* @__PURE__ */ K("div", {
|
|
357
357
|
className: "bg-dc-surface-secondary dc:border border-dc-border dc:rounded-lg dc:p-4 dc:space-y-4",
|
|
358
358
|
children: [
|
|
359
|
-
/* @__PURE__ */ G(
|
|
359
|
+
/* @__PURE__ */ G(J, { analysis: e }),
|
|
360
360
|
/* @__PURE__ */ G(fe, { analysis: e }),
|
|
361
361
|
/* @__PURE__ */ G(de, { analysis: e }),
|
|
362
362
|
/* @__PURE__ */ G(pe, { analysis: e }),
|
|
363
363
|
/* @__PURE__ */ G(me, { analysis: e }),
|
|
364
364
|
/* @__PURE__ */ G(he, { analysis: e })
|
|
365
365
|
]
|
|
366
|
-
}), _e = s("success"), ve = s("error"), ye = s("warning"),
|
|
366
|
+
}), _e = s("success"), ve = s("error"), ye = s("warning"), Y = s("codeBracket"), X = s("share"), Z = s("check"), Q = s("delete"), be = s("sparkles"), xe = s("arrowPath"), Se = s("schemaGraph");
|
|
367
367
|
function Ce({ summary: e, hasResults: t }) {
|
|
368
|
-
let { t: n } =
|
|
368
|
+
let { t: n } = S(), { executionResults: r, executionStatus: i, totalRowCount: a, resultsStale: o } = e;
|
|
369
369
|
return /* @__PURE__ */ K("div", {
|
|
370
370
|
className: "dc:flex dc:items-center",
|
|
371
371
|
children: [i === "refreshing" ? /* @__PURE__ */ G("div", {
|
|
@@ -390,20 +390,20 @@ function Ce({ summary: e, hasResults: t }) {
|
|
|
390
390
|
});
|
|
391
391
|
}
|
|
392
392
|
function we({ onShareClick: e, shareButtonState: t, canShare: n }) {
|
|
393
|
-
let { t: r } =
|
|
393
|
+
let { t: r } = S();
|
|
394
394
|
return e ? /* @__PURE__ */ G("button", {
|
|
395
395
|
onClick: e,
|
|
396
396
|
className: `dc:flex dc:items-center dc:gap-1 dc:px-2 dc:py-1.5 dc:text-xs dc:font-medium dc:rounded-sm dc:transition-colors ${t === "idle" && n ? "text-dc-accent dark:text-dc-accent bg-dc-accent-bg dark:bg-dc-accent-bg dc:border border-dc-accent dark:border-dc-accent hover:bg-dc-accent-bg dark:hover:bg-dc-accent-bg" : t === "idle" ? "text-dc-text-muted bg-dc-surface-secondary dc:border border-dc-border dc:cursor-not-allowed" : "text-dc-success dark:text-dc-success bg-dc-success-bg dark:bg-dc-success-bg dc:border border-dc-success dark:border-dc-success"}`,
|
|
397
397
|
title: t === "idle" ? "Share this analysis" : "Link copied!",
|
|
398
398
|
disabled: !n || t !== "idle",
|
|
399
|
-
children: t === "idle" ? /* @__PURE__ */ K(W, { children: [/* @__PURE__ */ G(
|
|
399
|
+
children: t === "idle" ? /* @__PURE__ */ K(W, { children: [/* @__PURE__ */ G(X, { className: "dc:w-3 dc:h-3" }), /* @__PURE__ */ G("span", {
|
|
400
400
|
className: "dc:hidden dc:sm:inline",
|
|
401
401
|
children: r("common.actions.share")
|
|
402
|
-
})] }) : t === "copied" ? /* @__PURE__ */ K(W, { children: [/* @__PURE__ */ G(
|
|
402
|
+
})] }) : t === "copied" ? /* @__PURE__ */ K(W, { children: [/* @__PURE__ */ G(Z, { className: "dc:w-3 dc:h-3" }), /* @__PURE__ */ G("span", {
|
|
403
403
|
className: "dc:hidden dc:sm:inline",
|
|
404
404
|
children: r("results.share.copied")
|
|
405
405
|
})] }) : /* @__PURE__ */ K(W, { children: [
|
|
406
|
-
/* @__PURE__ */ G(
|
|
406
|
+
/* @__PURE__ */ G(Z, { className: "dc:w-3 dc:h-3" }),
|
|
407
407
|
/* @__PURE__ */ G("span", {
|
|
408
408
|
className: "dc:hidden dc:sm:inline",
|
|
409
409
|
children: r("results.share.copied")
|
|
@@ -415,7 +415,7 @@ function we({ onShareClick: e, shareButtonState: t, canShare: n }) {
|
|
|
415
415
|
] })
|
|
416
416
|
}) : null;
|
|
417
417
|
}
|
|
418
|
-
function
|
|
418
|
+
function $({ onRefreshClick: e, canRefresh: t, isRefreshing: n, showCacheBustIndicator: r, setIsHoveringRefresh: i }) {
|
|
419
419
|
return !e || !t ? null : /* @__PURE__ */ K("button", {
|
|
420
420
|
onClick: (t) => e({ bustCache: t.shiftKey }),
|
|
421
421
|
onMouseEnter: () => i(!0),
|
|
@@ -430,7 +430,7 @@ function Q({ onRefreshClick: e, canRefresh: t, isRefreshing: n, showCacheBustInd
|
|
|
430
430
|
});
|
|
431
431
|
}
|
|
432
432
|
function Te({ summary: e, toolbar: t, display: n, hasResults: r }) {
|
|
433
|
-
let { t: i } =
|
|
433
|
+
let { t: i } = S(), { displayLimit: a, onDisplayLimitChange: o, isAIOpen: s, onAIToggle: c, onColorPaletteChange: u, currentPaletteName: d, onClearClick: f, canClear: p, setIsClearConfirmOpen: m, setShowDebug: h, setShowSchema: g } = t, { activeView: _, showDebug: v, showSchema: y, enableAI: b, isFunnelMode: x, showSchemaDiagram: C } = n, { executionError: w, debugDataPerQuery: T } = e;
|
|
434
434
|
return /* @__PURE__ */ K("div", {
|
|
435
435
|
className: "dc:flex dc:items-center dc:gap-2",
|
|
436
436
|
children: [
|
|
@@ -457,8 +457,8 @@ function Te({ summary: e, toolbar: t, display: n, hasResults: r }) {
|
|
|
457
457
|
})
|
|
458
458
|
]
|
|
459
459
|
}),
|
|
460
|
-
b &&
|
|
461
|
-
onClick:
|
|
460
|
+
b && c && /* @__PURE__ */ K("button", {
|
|
461
|
+
onClick: c,
|
|
462
462
|
className: `dc:flex dc:items-center dc:gap-1 dc:px-2 dc:py-1.5 dc:text-xs dc:font-medium dc:rounded-sm dc:transition-colors ${s ? "text-white bg-dc-accent dc:border border-dc-accent" : "text-dc-accent dark:text-dc-accent bg-dc-accent-bg dark:bg-dc-accent-bg dc:border border-dc-accent dark:border-dc-accent hover:bg-dc-accent-bg dark:hover:bg-dc-accent-bg"}`,
|
|
463
463
|
title: s ? "Close AI assistant" : "Analyse with AI",
|
|
464
464
|
children: [/* @__PURE__ */ G(be, { className: "dc:w-3 dc:h-3" }), /* @__PURE__ */ G("span", {
|
|
@@ -466,7 +466,7 @@ function Te({ summary: e, toolbar: t, display: n, hasResults: r }) {
|
|
|
466
466
|
children: i("results.ai.button")
|
|
467
467
|
})]
|
|
468
468
|
}),
|
|
469
|
-
u && r && /* @__PURE__ */ G(
|
|
469
|
+
u && r && /* @__PURE__ */ G(l, {
|
|
470
470
|
currentPalette: d || "default",
|
|
471
471
|
onPaletteChange: u
|
|
472
472
|
}),
|
|
@@ -475,7 +475,7 @@ function Te({ summary: e, toolbar: t, display: n, hasResults: r }) {
|
|
|
475
475
|
shareButtonState: t.shareButtonState,
|
|
476
476
|
canShare: t.canShare
|
|
477
477
|
}),
|
|
478
|
-
/* @__PURE__ */ G(
|
|
478
|
+
/* @__PURE__ */ G($, {
|
|
479
479
|
onRefreshClick: t.onRefreshClick,
|
|
480
480
|
canRefresh: t.canRefresh,
|
|
481
481
|
isRefreshing: t.isRefreshing,
|
|
@@ -485,8 +485,8 @@ function Te({ summary: e, toolbar: t, display: n, hasResults: r }) {
|
|
|
485
485
|
f && p && /* @__PURE__ */ K("button", {
|
|
486
486
|
onClick: () => m(!0),
|
|
487
487
|
className: "dc:flex dc:items-center dc:gap-1 dc:px-2 dc:py-1.5 dc:text-xs dc:font-medium text-dc-text-secondary hover:text-dc-text bg-dc-surface hover:bg-dc-surface-hover dc:border border-dc-border dc:rounded-sm dc:transition-colors",
|
|
488
|
-
title:
|
|
489
|
-
children: [/* @__PURE__ */ G(
|
|
488
|
+
title: x ? "Clear funnel" : "Clear all query data",
|
|
489
|
+
children: [/* @__PURE__ */ G(Q, { className: "dc:w-3 dc:h-3" }), /* @__PURE__ */ G("span", {
|
|
490
490
|
className: "dc:hidden dc:sm:inline",
|
|
491
491
|
children: i("common.actions.clear")
|
|
492
492
|
})]
|
|
@@ -505,13 +505,13 @@ function Te({ summary: e, toolbar: t, display: n, hasResults: r }) {
|
|
|
505
505
|
},
|
|
506
506
|
className: `dc:p-1.5 dc:rounded-sm dc:transition-colors dc:relative ${v ? "bg-dc-primary text-white" : "text-dc-text-secondary hover:text-dc-text hover:bg-dc-surface-hover"}`,
|
|
507
507
|
title: v ? "Hide debug info" : "Show debug info",
|
|
508
|
-
children: [/* @__PURE__ */ G(
|
|
508
|
+
children: [/* @__PURE__ */ G(Y, { className: "dc:w-4 dc:h-4" }), (w || T.some((e) => e.error)) && !v && /* @__PURE__ */ G("span", { className: "dc:absolute dc:-top-0.5 dc:-right-0.5 dc:w-2 dc:h-2 bg-dc-danger-bg0 dc:rounded-full" })]
|
|
509
509
|
})
|
|
510
510
|
]
|
|
511
511
|
});
|
|
512
512
|
}
|
|
513
513
|
function Ee({ summary: e, toolbar: t, display: n }) {
|
|
514
|
-
let { t: r } =
|
|
514
|
+
let { t: r } = S(), { executionResults: i, totalRowCount: a } = e, o = !!i && i.length > 0;
|
|
515
515
|
return /* @__PURE__ */ K("div", {
|
|
516
516
|
className: "dc:px-4 dc:py-2 dc:border-b border-dc-border bg-dc-surface-secondary dc:flex-shrink-0",
|
|
517
517
|
children: [/* @__PURE__ */ K("div", {
|
|
@@ -671,8 +671,8 @@ function Ke(e, t, n) {
|
|
|
671
671
|
}
|
|
672
672
|
//#endregion
|
|
673
673
|
//#region src/client/components/AnalysisBuilder/AnalysisResultsPanel.tsx
|
|
674
|
-
var qe = F.lazy(() => import("./schema-visualization-
|
|
675
|
-
let { t:
|
|
674
|
+
var qe = F.lazy(() => import("./schema-visualization-BO70spCF.js").then((e) => e.n).then((e) => ({ default: e.SchemaVisualizationLazy }))), Je = R(function({ executionStatus: t, executionResults: n, executionError: r, totalRowCount: a, resultsStale: o = !1, chartType: c = "line", chartConfig: l = {}, displayConfig: d = {}, colorPalette: f, currentPaletteName: m, onColorPaletteChange: h, allQueries: g, funnelExecutedQueries: _, activeView: v = "chart", onActiveViewChange: y, displayLimit: b = 100, onDisplayLimitChange: x, chartAvailability: D, debugDataPerQuery: O = [], onShareClick: A, canShare: j = !1, shareButtonState: ee = "idle", onRefreshClick: M, canRefresh: N = !1, isRefreshing: te = !1, needsRefresh: P = !1, onClearClick: I, canClear: L = !1, enableAI: R = !1, isAIOpen: ne = !1, onAIToggle: re, queryCount: ie = 1, perQueryResults: ae, activeTableIndex: oe = 0, onActiveTableChange: se, analysisType: q, isFunnelMode: ce = !1, funnelServerQuery: le, funnelDebugData: ue, flowServerQuery: de, flowDebugData: fe, retentionServerQuery: pe, retentionDebugData: me, retentionChartData: J, retentionValidation: he, warnings: _e, highlightedFields: ve, onSchemaFieldClick: ye }) {
|
|
675
|
+
let { t: Y } = S(), X = q === "funnel" || ce, Z = q === "flow", Q = q === "retention", { features: be } = e(), [xe, Se] = U(!1), [Ce, we] = U(!1), [$, Te] = U(0), [De, Oe] = U(!1), [ke, Ae] = U(!1), [je, Me] = U(!1), [Ne, Pe] = U("idle");
|
|
676
676
|
B(() => {
|
|
677
677
|
let e = (e) => {
|
|
678
678
|
e.key === "Shift" && Ae(!0);
|
|
@@ -685,50 +685,42 @@ var qe = F.lazy(() => import("./schema-visualization-D8Ak7GUd.js").then((e) => e
|
|
|
685
685
|
}, []);
|
|
686
686
|
let Fe = ke && je;
|
|
687
687
|
B(() => {
|
|
688
|
-
|
|
689
|
-
}, [
|
|
690
|
-
let Ie = ze(
|
|
688
|
+
O.length > 0 && $ >= O.length && Te(O.length - 1);
|
|
689
|
+
}, [O.length, $]);
|
|
690
|
+
let Ie = ze(O, $), Re = Ie.sql, Ve = Ie.analysis, Je = Ie.loading, Ye = Ie.error, Xe = _?.[$] ?? g?.[$] ?? null, Ze = !!(_?.length && _[$]), Qe = z(() => {
|
|
691
691
|
if (!Ve) return;
|
|
692
|
-
let e = Le(Ve,
|
|
692
|
+
let e = Le(Ve, Xe, Re);
|
|
693
693
|
navigator.clipboard.writeText(e).then(() => {
|
|
694
694
|
Pe("copied"), setTimeout(() => Pe("idle"), 2e3);
|
|
695
695
|
});
|
|
696
696
|
}, [
|
|
697
697
|
Ve,
|
|
698
|
-
|
|
698
|
+
Xe,
|
|
699
699
|
Re
|
|
700
|
-
]), { explainResult:
|
|
700
|
+
]), { explainResult: $e, isLoading: et, hasRun: tt, error: nt, runExplain: rt, clearExplain: it } = C(Xe, { skip: X || Z || Q || !Xe }), { explainResult: at, isLoading: ot, hasRun: st, error: ct, runExplain: lt, clearExplain: ut } = C(le, { skip: !X || !le }), { explainResult: dt, isLoading: ft, hasRun: pt, error: mt, runExplain: ht, clearExplain: gt } = C(de, { skip: !Z || !de }), { explainResult: _t, isLoading: vt, hasRun: yt, error: bt, runExplain: xt } = C(pe, { skip: !Q || !pe }), { analysis: St, isAnalyzing: Ct, error: wt, analyze: Tt, clearAnalysis: Et } = w();
|
|
701
701
|
B(() => {
|
|
702
|
-
|
|
703
|
-
}, [
|
|
704
|
-
|
|
705
|
-
}, [le,
|
|
706
|
-
|
|
707
|
-
}, [de,
|
|
708
|
-
let
|
|
709
|
-
isCurrentChartRenderable:
|
|
710
|
-
isFlowMode:
|
|
711
|
-
isFunnelMode:
|
|
712
|
-
isRetentionMode:
|
|
713
|
-
}),
|
|
702
|
+
it();
|
|
703
|
+
}, [$, it]), B(() => {
|
|
704
|
+
ut();
|
|
705
|
+
}, [le, ut]), B(() => {
|
|
706
|
+
gt();
|
|
707
|
+
}, [de, gt]);
|
|
708
|
+
let Dt = H(!0), Ot = D?.[c]?.available ?? !0, kt = Be({
|
|
709
|
+
isCurrentChartRenderable: Ot,
|
|
710
|
+
isFlowMode: Z,
|
|
711
|
+
isFunnelMode: X,
|
|
712
|
+
isRetentionMode: Q
|
|
713
|
+
}), At = D?.[c]?.reason, jt = Ke(kt, At, Y);
|
|
714
714
|
B(() => {
|
|
715
|
-
|
|
715
|
+
Dt.current ? Dt.current = !1 : q === "funnel" || q === "flow" || q === "retention" || X || !Ot && v === "chart" && y("table");
|
|
716
716
|
}, [
|
|
717
|
-
|
|
718
|
-
_,
|
|
717
|
+
Ot,
|
|
719
718
|
v,
|
|
720
|
-
|
|
721
|
-
|
|
719
|
+
y,
|
|
720
|
+
X,
|
|
721
|
+
q
|
|
722
722
|
]);
|
|
723
|
-
let
|
|
724
|
-
if (!h || h.length === 0) return;
|
|
725
|
-
if (h.length === 1) return h[0];
|
|
726
|
-
let e = h.flatMap((e) => e?.measures || []);
|
|
727
|
-
return {
|
|
728
|
-
...h[0],
|
|
729
|
-
measures: e
|
|
730
|
-
};
|
|
731
|
-
}, [h]), Mt = s("success"), Nt = s("error"), Pt = s("warning"), Ft = s("table"), It = s("measure"), Lt = s("sparkles"), Rt = () => /* @__PURE__ */ G("div", {
|
|
723
|
+
let Mt = V(() => i(g ?? []), [g]), Nt = s("success"), Pt = s("error"), Ft = s("warning"), It = s("table"), Lt = s("measure"), Rt = s("sparkles"), zt = () => /* @__PURE__ */ G("div", {
|
|
732
724
|
className: "dc:h-full dc:flex dc:items-center dc:justify-center",
|
|
733
725
|
children: /* @__PURE__ */ K("div", {
|
|
734
726
|
className: "dc:text-center",
|
|
@@ -739,17 +731,17 @@ var qe = F.lazy(() => import("./schema-visualization-D8Ak7GUd.js").then((e) => e
|
|
|
739
731
|
}),
|
|
740
732
|
/* @__PURE__ */ G("div", {
|
|
741
733
|
className: "dc:text-sm dc:font-semibold text-dc-text-secondary dc:mb-1",
|
|
742
|
-
children:
|
|
734
|
+
children: Y("results.loading.title")
|
|
743
735
|
}),
|
|
744
736
|
/* @__PURE__ */ G("div", {
|
|
745
737
|
className: "dc:text-xs text-dc-text-muted",
|
|
746
|
-
children:
|
|
738
|
+
children: Y("results.loading.subtitle")
|
|
747
739
|
})
|
|
748
740
|
]
|
|
749
741
|
})
|
|
750
|
-
}),
|
|
742
|
+
}), Bt = () => /* @__PURE__ */ K("div", {
|
|
751
743
|
className: "dc:h-full dc:flex dc:flex-col",
|
|
752
|
-
children: [
|
|
744
|
+
children: [fn(), /* @__PURE__ */ G("div", {
|
|
753
745
|
className: "dc:flex-1 dc:flex dc:items-center dc:justify-center dc:p-4",
|
|
754
746
|
children: Ce ? /* @__PURE__ */ G("div", {
|
|
755
747
|
className: "dc:w-full dc:h-full",
|
|
@@ -763,18 +755,18 @@ var qe = F.lazy(() => import("./schema-visualization-D8Ak7GUd.js").then((e) => e
|
|
|
763
755
|
})
|
|
764
756
|
}) : xe ? /* @__PURE__ */ G("div", {
|
|
765
757
|
className: "dc:w-full dc:h-full dc:overflow-auto",
|
|
766
|
-
children:
|
|
758
|
+
children: rn()
|
|
767
759
|
}) : /* @__PURE__ */ K("div", {
|
|
768
760
|
className: "dc:text-center dc:max-w-md",
|
|
769
761
|
children: [
|
|
770
|
-
/* @__PURE__ */ G(
|
|
762
|
+
/* @__PURE__ */ G(Pt, { className: "dc:w-12 dc:h-12 dc:mx-auto text-dc-error dc:mb-4" }),
|
|
771
763
|
/* @__PURE__ */ G("div", {
|
|
772
764
|
className: "dc:text-sm dc:font-semibold text-dc-text dc:mb-2",
|
|
773
|
-
children:
|
|
765
|
+
children: Y("results.error.title")
|
|
774
766
|
}),
|
|
775
767
|
/* @__PURE__ */ G("div", {
|
|
776
768
|
className: "dc:text-sm text-dc-text-secondary dc:mb-4",
|
|
777
|
-
children:
|
|
769
|
+
children: Y("results.error.subtitle")
|
|
778
770
|
}),
|
|
779
771
|
r && /* @__PURE__ */ G("div", {
|
|
780
772
|
className: "bg-dc-danger-bg dc:border border-dc-error dc:rounded-lg dc:p-3 dc:text-left",
|
|
@@ -786,15 +778,15 @@ var qe = F.lazy(() => import("./schema-visualization-D8Ak7GUd.js").then((e) => e
|
|
|
786
778
|
]
|
|
787
779
|
})
|
|
788
780
|
})]
|
|
789
|
-
}),
|
|
790
|
-
|
|
791
|
-
Y,
|
|
781
|
+
}), Vt = !!g?.some((e) => e?.measures && e.measures.length > 0 || e?.dimensions && e.dimensions.length > 0 || e?.timeDimensions && e.timeDimensions.length > 0), Ht = V(() => Q ? pe !== null : X ? le !== null : Z ? de !== null : Vt, [
|
|
782
|
+
Q,
|
|
792
783
|
X,
|
|
784
|
+
Z,
|
|
793
785
|
pe,
|
|
794
786
|
le,
|
|
795
787
|
de,
|
|
796
|
-
|
|
797
|
-
]),
|
|
788
|
+
Vt
|
|
789
|
+
]), Ut = () => /* @__PURE__ */ G("div", {
|
|
798
790
|
className: "dc:h-full dc:flex dc:items-center dc:justify-center",
|
|
799
791
|
children: /* @__PURE__ */ K("div", {
|
|
800
792
|
className: "dc:text-center",
|
|
@@ -805,15 +797,15 @@ var qe = F.lazy(() => import("./schema-visualization-D8Ak7GUd.js").then((e) => e
|
|
|
805
797
|
}),
|
|
806
798
|
/* @__PURE__ */ G("div", {
|
|
807
799
|
className: "dc:text-sm dc:font-semibold text-dc-text-secondary dc:mb-1",
|
|
808
|
-
children:
|
|
800
|
+
children: Y("results.waiting.title")
|
|
809
801
|
}),
|
|
810
802
|
/* @__PURE__ */ G("div", {
|
|
811
803
|
className: "dc:text-xs text-dc-text-muted",
|
|
812
|
-
children:
|
|
804
|
+
children: Y("results.waiting.subtitle")
|
|
813
805
|
})
|
|
814
806
|
]
|
|
815
807
|
})
|
|
816
|
-
}),
|
|
808
|
+
}), Wt = () => /* @__PURE__ */ G("div", {
|
|
817
809
|
className: "dc:h-full dc:flex dc:items-center dc:justify-center",
|
|
818
810
|
children: /* @__PURE__ */ K("div", {
|
|
819
811
|
className: "dc:text-center",
|
|
@@ -832,14 +824,14 @@ var qe = F.lazy(() => import("./schema-visualization-D8Ak7GUd.js").then((e) => e
|
|
|
832
824
|
}),
|
|
833
825
|
/* @__PURE__ */ G("div", {
|
|
834
826
|
className: "dc:text-sm dc:font-semibold text-dc-text-secondary dc:mb-1",
|
|
835
|
-
children:
|
|
827
|
+
children: Y("results.needsRefresh.title")
|
|
836
828
|
}),
|
|
837
829
|
/* @__PURE__ */ G("div", {
|
|
838
830
|
className: "dc:text-xs text-dc-text-muted dc:mb-4",
|
|
839
|
-
children:
|
|
831
|
+
children: Y("results.needsRefresh.subtitle")
|
|
840
832
|
}),
|
|
841
|
-
|
|
842
|
-
onClick: () =>
|
|
833
|
+
M && /* @__PURE__ */ K("button", {
|
|
834
|
+
onClick: () => M(),
|
|
843
835
|
className: "dc:inline-flex dc:items-center dc:gap-2 dc:px-4 dc:py-2 dc:text-sm dc:font-medium text-white bg-dc-accent dc:hover:opacity-90 dc:rounded-lg dc:transition-colors dc:shadow-sm",
|
|
844
836
|
children: [/* @__PURE__ */ G("svg", {
|
|
845
837
|
className: "dc:w-4 dc:h-4",
|
|
@@ -852,76 +844,76 @@ var qe = F.lazy(() => import("./schema-visualization-D8Ak7GUd.js").then((e) => e
|
|
|
852
844
|
strokeWidth: 2,
|
|
853
845
|
d: "M4 4v5h.582m15.356 2A8.001 8.001 0 004.582 9m0 0H9m11 11v-5h-.581m0 0a8.003 8.003 0 01-15.357-2m15.357 2H15"
|
|
854
846
|
})
|
|
855
|
-
}),
|
|
847
|
+
}), Y("results.needsRefresh.runButton")]
|
|
856
848
|
})
|
|
857
849
|
]
|
|
858
850
|
})
|
|
859
|
-
}),
|
|
860
|
-
let e =
|
|
861
|
-
return
|
|
851
|
+
}), Gt = () => {
|
|
852
|
+
let e = Y("results.empty.query");
|
|
853
|
+
return Q ? e = Y("results.empty.retention") : X ? e = Y("results.empty.funnel") : Z && (e = Y("results.empty.flow")), /* @__PURE__ */ G("div", {
|
|
862
854
|
className: "dc:h-full dc:flex dc:items-center dc:justify-center dc:pt-6",
|
|
863
855
|
children: /* @__PURE__ */ K("div", {
|
|
864
856
|
className: "dc:text-center dc:mb-16",
|
|
865
857
|
children: [
|
|
866
|
-
/* @__PURE__ */ G(
|
|
858
|
+
/* @__PURE__ */ G(Lt, { className: "dc:w-12 dc:h-12 dc:mx-auto text-dc-text-muted dc:mb-3" }),
|
|
867
859
|
/* @__PURE__ */ G("div", {
|
|
868
860
|
className: "dc:text-sm dc:font-semibold text-dc-text-secondary dc:mb-1",
|
|
869
|
-
children:
|
|
861
|
+
children: Y("results.empty.title")
|
|
870
862
|
}),
|
|
871
863
|
/* @__PURE__ */ G("div", {
|
|
872
864
|
className: "dc:text-xs text-dc-text-muted dc:mb-4",
|
|
873
865
|
children: e
|
|
874
866
|
}),
|
|
875
|
-
R &&
|
|
876
|
-
onClick:
|
|
867
|
+
R && re && !Q && !X && !Z && /* @__PURE__ */ K("button", {
|
|
868
|
+
onClick: re,
|
|
877
869
|
className: "dc:inline-flex dc:items-center dc:gap-2 dc:px-4 dc:py-2 dc:text-sm dc:font-medium text-white bg-dc-accent hover:bg-dc-accent dc:rounded-lg dc:transition-colors dc:shadow-sm",
|
|
878
|
-
children: [/* @__PURE__ */ G(
|
|
870
|
+
children: [/* @__PURE__ */ G(Rt, { className: "dc:w-4 dc:h-4" }), Y("results.ai.button")]
|
|
879
871
|
})
|
|
880
872
|
]
|
|
881
873
|
})
|
|
882
874
|
});
|
|
883
|
-
},
|
|
875
|
+
}, Kt = () => /* @__PURE__ */ G("div", {
|
|
884
876
|
className: "dc:h-full dc:flex dc:items-center dc:justify-center",
|
|
885
877
|
children: /* @__PURE__ */ K("div", {
|
|
886
878
|
className: "dc:text-center",
|
|
887
879
|
children: [
|
|
888
|
-
/* @__PURE__ */ G(
|
|
880
|
+
/* @__PURE__ */ G(Nt, { className: "dc:w-12 dc:h-12 dc:mx-auto text-dc-success dc:mb-3" }),
|
|
889
881
|
/* @__PURE__ */ G("div", {
|
|
890
882
|
className: "dc:text-sm dc:font-semibold text-dc-text dc:mb-1",
|
|
891
|
-
children:
|
|
883
|
+
children: Y("results.noData.title")
|
|
892
884
|
}),
|
|
893
885
|
/* @__PURE__ */ G("div", {
|
|
894
886
|
className: "dc:text-xs text-dc-text-muted",
|
|
895
|
-
children:
|
|
887
|
+
children: Y("results.noData.subtitle")
|
|
896
888
|
})
|
|
897
889
|
]
|
|
898
890
|
})
|
|
899
|
-
}),
|
|
891
|
+
}), qt = () => {
|
|
900
892
|
if (!n || n.length === 0) return /* @__PURE__ */ G("div", {
|
|
901
893
|
className: "dc:flex dc:items-center dc:justify-center dc:h-full text-dc-text-muted",
|
|
902
894
|
children: /* @__PURE__ */ K("div", {
|
|
903
895
|
className: "dc:text-center",
|
|
904
896
|
children: [
|
|
905
|
-
/* @__PURE__ */ G(
|
|
897
|
+
/* @__PURE__ */ G(Lt, { className: "dc:w-12 dc:h-12 dc:mx-auto dc:mb-3 dc:opacity-50" }),
|
|
906
898
|
/* @__PURE__ */ G("div", {
|
|
907
899
|
className: "dc:text-sm dc:font-semibold dc:mb-1",
|
|
908
|
-
children:
|
|
900
|
+
children: Y("results.chart.noData")
|
|
909
901
|
}),
|
|
910
902
|
/* @__PURE__ */ G("div", {
|
|
911
903
|
className: "dc:text-xs",
|
|
912
|
-
children:
|
|
904
|
+
children: Y("results.chart.noDataHint")
|
|
913
905
|
})
|
|
914
906
|
]
|
|
915
907
|
})
|
|
916
908
|
});
|
|
917
|
-
let e =
|
|
918
|
-
return
|
|
909
|
+
let e = c === "sankey" && d?.flowVisualization === "sunburst" ? "sunburst" : c;
|
|
910
|
+
return T(e) ? /* @__PURE__ */ G(E, {
|
|
919
911
|
chartType: e,
|
|
920
|
-
data:
|
|
921
|
-
chartConfig:
|
|
922
|
-
displayConfig:
|
|
923
|
-
colorPalette:
|
|
924
|
-
queryObject:
|
|
912
|
+
data: Q && J ? J : n,
|
|
913
|
+
chartConfig: l,
|
|
914
|
+
displayConfig: d,
|
|
915
|
+
colorPalette: f,
|
|
916
|
+
queryObject: Mt,
|
|
925
917
|
height: "100%",
|
|
926
918
|
fallback: /* @__PURE__ */ G("div", {
|
|
927
919
|
className: "dc:flex dc:items-center dc:justify-center dc:h-full",
|
|
@@ -932,10 +924,10 @@ var qe = F.lazy(() => import("./schema-visualization-D8Ak7GUd.js").then((e) => e
|
|
|
932
924
|
children: /* @__PURE__ */ K("div", {
|
|
933
925
|
className: "dc:text-center",
|
|
934
926
|
children: [
|
|
935
|
-
/* @__PURE__ */ G(
|
|
927
|
+
/* @__PURE__ */ G(Ft, { className: "dc:w-12 dc:h-12 dc:mx-auto dc:mb-3 dc:opacity-50" }),
|
|
936
928
|
/* @__PURE__ */ G("div", {
|
|
937
929
|
className: "dc:text-sm dc:font-semibold dc:mb-1",
|
|
938
|
-
children:
|
|
930
|
+
children: Y("results.chart.unsupported")
|
|
939
931
|
}),
|
|
940
932
|
/* @__PURE__ */ G("div", {
|
|
941
933
|
className: "dc:text-xs",
|
|
@@ -944,45 +936,45 @@ var qe = F.lazy(() => import("./schema-visualization-D8Ak7GUd.js").then((e) => e
|
|
|
944
936
|
]
|
|
945
937
|
})
|
|
946
938
|
});
|
|
947
|
-
},
|
|
939
|
+
}, Jt = () => r ? /* @__PURE__ */ K("div", {
|
|
948
940
|
className: "bg-dc-danger-bg dark:bg-dc-danger-bg dc:border border-dc-error dark:border-dc-error dc:rounded-sm dc:p-3",
|
|
949
941
|
children: [/* @__PURE__ */ G("h4", {
|
|
950
942
|
className: "dc:text-sm dc:font-semibold text-dc-error dark:text-dc-error dc:mb-1",
|
|
951
|
-
children:
|
|
943
|
+
children: Y("results.debug.executionError")
|
|
952
944
|
}), /* @__PURE__ */ G("p", {
|
|
953
945
|
className: "dc:text-sm text-dc-error dark:text-dc-error",
|
|
954
946
|
children: r
|
|
955
947
|
})]
|
|
956
|
-
}) : null,
|
|
948
|
+
}) : null, Yt = () => /* @__PURE__ */ K("div", {
|
|
957
949
|
className: "dc:grid dc:grid-cols-1 dc:md:grid-cols-2 dc:gap-4",
|
|
958
|
-
children: [/* @__PURE__ */ G("div", { children: /* @__PURE__ */ G(
|
|
959
|
-
code: JSON.stringify(
|
|
950
|
+
children: [/* @__PURE__ */ G("div", { children: /* @__PURE__ */ G(u, {
|
|
951
|
+
code: JSON.stringify(l, null, 2),
|
|
960
952
|
language: "json",
|
|
961
|
-
title:
|
|
953
|
+
title: Y("results.debug.chartConfig"),
|
|
962
954
|
height: "16rem"
|
|
963
|
-
}) }), /* @__PURE__ */ G("div", { children: /* @__PURE__ */ G(
|
|
964
|
-
code: JSON.stringify(
|
|
955
|
+
}) }), /* @__PURE__ */ G("div", { children: /* @__PURE__ */ G(u, {
|
|
956
|
+
code: JSON.stringify(d, null, 2),
|
|
965
957
|
language: "json",
|
|
966
|
-
title:
|
|
958
|
+
title: Y("results.debug.displayConfig"),
|
|
967
959
|
height: "16rem"
|
|
968
960
|
}) })]
|
|
969
|
-
}),
|
|
961
|
+
}), Xt = (e) => /* @__PURE__ */ G("div", { children: n ? /* @__PURE__ */ G(u, {
|
|
970
962
|
code: JSON.stringify(n, null, 2),
|
|
971
963
|
language: "json",
|
|
972
|
-
title: e || `${
|
|
964
|
+
title: e || `${Y("results.debug.serverResponse")} (${n.length} ${Y("results.header.rows")})`,
|
|
973
965
|
maxHeight: "24rem"
|
|
974
966
|
}) : /* @__PURE__ */ K(W, { children: [/* @__PURE__ */ G("h4", {
|
|
975
967
|
className: "dc:text-sm dc:font-semibold text-dc-text dc:mb-2",
|
|
976
|
-
children:
|
|
968
|
+
children: Y("results.debug.serverResponse")
|
|
977
969
|
}), /* @__PURE__ */ G("div", {
|
|
978
970
|
className: "bg-dc-surface-secondary dc:border border-dc-border dc:rounded-sm dc:p-3 text-dc-text-muted dc:text-sm",
|
|
979
|
-
children:
|
|
980
|
-
})] }) }),
|
|
981
|
-
code: JSON.stringify(
|
|
971
|
+
children: Y("results.debug.noResults")
|
|
972
|
+
})] }) }), Zt = () => /* @__PURE__ */ G("div", { children: J ? /* @__PURE__ */ G(u, {
|
|
973
|
+
code: JSON.stringify(J, null, 2),
|
|
982
974
|
language: "json",
|
|
983
|
-
title: `Server Response (${
|
|
975
|
+
title: `Server Response (${J.rows.length} rows, ${J.periods.length} periods)`,
|
|
984
976
|
maxHeight: "24rem"
|
|
985
|
-
}) :
|
|
977
|
+
}) : Xt() }), Qt = (e) => {
|
|
986
978
|
let t = e.debugData?.sql, n = e.debugData?.loading || !1, r = e.debugData?.error || null;
|
|
987
979
|
return /* @__PURE__ */ K("div", {
|
|
988
980
|
className: "dc:p-4 dc:space-y-4 dc:overflow-auto dc:h-full",
|
|
@@ -1000,18 +992,18 @@ var qe = F.lazy(() => import("./schema-visualization-D8Ak7GUd.js").then((e) => e
|
|
|
1000
992
|
}),
|
|
1001
993
|
n && /* @__PURE__ */ G("span", {
|
|
1002
994
|
className: "dc:text-xs text-dc-text-muted dc:animate-pulse",
|
|
1003
|
-
children:
|
|
995
|
+
children: Y("results.debug.loadingSql")
|
|
1004
996
|
})
|
|
1005
997
|
]
|
|
1006
998
|
}),
|
|
1007
|
-
|
|
1008
|
-
/* @__PURE__ */ G("div", { children: e.serverQuery ? /* @__PURE__ */ G(
|
|
999
|
+
Jt(),
|
|
1000
|
+
/* @__PURE__ */ G("div", { children: e.serverQuery ? /* @__PURE__ */ G(u, {
|
|
1009
1001
|
code: JSON.stringify(e.serverQuery, null, 2),
|
|
1010
1002
|
language: "json",
|
|
1011
1003
|
title: e.serverQueryTitle,
|
|
1012
1004
|
height: "16rem"
|
|
1013
1005
|
}) : e.serverQueryMissing }),
|
|
1014
|
-
/* @__PURE__ */ G(
|
|
1006
|
+
/* @__PURE__ */ G(k, {
|
|
1015
1007
|
sql: t,
|
|
1016
1008
|
sqlLoading: n,
|
|
1017
1009
|
sqlError: r,
|
|
@@ -1021,11 +1013,11 @@ var qe = F.lazy(() => import("./schema-visualization-D8Ak7GUd.js").then((e) => e
|
|
|
1021
1013
|
explainHasRun: e.explainHasRun,
|
|
1022
1014
|
explainError: e.explainError,
|
|
1023
1015
|
runExplain: e.runExplain,
|
|
1024
|
-
aiAnalysis:
|
|
1025
|
-
aiAnalysisLoading:
|
|
1026
|
-
aiAnalysisError:
|
|
1027
|
-
runAIAnalysis:
|
|
1028
|
-
clearAIAnalysis:
|
|
1016
|
+
aiAnalysis: St,
|
|
1017
|
+
aiAnalysisLoading: Ct,
|
|
1018
|
+
aiAnalysisError: wt,
|
|
1019
|
+
runAIAnalysis: Tt,
|
|
1020
|
+
clearAIAnalysis: Et,
|
|
1029
1021
|
enableAI: R,
|
|
1030
1022
|
query: e.serverQuery,
|
|
1031
1023
|
title: "Generated SQL",
|
|
@@ -1039,23 +1031,23 @@ var qe = F.lazy(() => import("./schema-visualization-D8Ak7GUd.js").then((e) => e
|
|
|
1039
1031
|
children: e.metadataSection
|
|
1040
1032
|
})] }),
|
|
1041
1033
|
e.extraSection,
|
|
1042
|
-
|
|
1034
|
+
Yt(),
|
|
1043
1035
|
e.responseSection
|
|
1044
1036
|
]
|
|
1045
1037
|
});
|
|
1046
|
-
},
|
|
1038
|
+
}, $t = () => /* @__PURE__ */ K("div", {
|
|
1047
1039
|
className: "dc:p-4 dc:space-y-4 dc:overflow-auto dc:h-full",
|
|
1048
1040
|
children: [
|
|
1049
|
-
|
|
1041
|
+
O.length > 1 && /* @__PURE__ */ K("div", {
|
|
1050
1042
|
className: "dc:flex dc:items-center dc:gap-1 dc:mb-4",
|
|
1051
1043
|
children: [/* @__PURE__ */ G("span", {
|
|
1052
1044
|
className: "dc:text-xs dc:font-medium text-dc-text-muted dc:mr-2",
|
|
1053
|
-
children:
|
|
1045
|
+
children: Y("results.debug.query")
|
|
1054
1046
|
}), /* @__PURE__ */ G("div", {
|
|
1055
1047
|
className: "dc:flex dc:border border-dc-border dc:rounded-md dc:overflow-hidden",
|
|
1056
|
-
children:
|
|
1048
|
+
children: O.map((e, t) => /* @__PURE__ */ K("button", {
|
|
1057
1049
|
onClick: () => Te(t),
|
|
1058
|
-
className: `dc:px-3 dc:py-1 dc:text-xs dc:font-medium dc:transition-colors dc:border-r dc:last:border-r-0 border-dc-border ${
|
|
1050
|
+
className: `dc:px-3 dc:py-1 dc:text-xs dc:font-medium dc:transition-colors dc:border-r dc:last:border-r-0 border-dc-border ${$ === t ? "bg-dc-accent text-white" : "bg-dc-bg text-dc-text-secondary hover:bg-dc-bg-secondary"}`,
|
|
1059
1051
|
children: [
|
|
1060
1052
|
"Q",
|
|
1061
1053
|
t + 1,
|
|
@@ -1075,7 +1067,7 @@ var qe = F.lazy(() => import("./schema-visualization-D8Ak7GUd.js").then((e) => e
|
|
|
1075
1067
|
className: "bg-dc-danger-bg dark:bg-dc-danger-bg dc:border border-dc-error dark:border-dc-error dc:rounded-sm dc:p-3",
|
|
1076
1068
|
children: [/* @__PURE__ */ G("h4", {
|
|
1077
1069
|
className: "dc:text-sm dc:font-semibold text-dc-error dark:text-dc-error dc:mb-1",
|
|
1078
|
-
children:
|
|
1070
|
+
children: Y("results.debug.executionError")
|
|
1079
1071
|
}), /* @__PURE__ */ G("p", {
|
|
1080
1072
|
className: "dc:text-sm text-dc-error dark:text-dc-error",
|
|
1081
1073
|
children: r
|
|
@@ -1085,32 +1077,32 @@ var qe = F.lazy(() => import("./schema-visualization-D8Ak7GUd.js").then((e) => e
|
|
|
1085
1077
|
className: "dc:flex dc:items-center dc:justify-between dc:mb-2",
|
|
1086
1078
|
children: [/* @__PURE__ */ G("h4", {
|
|
1087
1079
|
className: "dc:text-sm dc:font-semibold text-dc-text",
|
|
1088
|
-
children:
|
|
1080
|
+
children: Y("results.debug.queryAnalysis")
|
|
1089
1081
|
}), Ve && /* @__PURE__ */ G("button", {
|
|
1090
|
-
onClick:
|
|
1082
|
+
onClick: Qe,
|
|
1091
1083
|
className: "dc:px-2 dc:py-1 dc:text-xs dc:font-medium dc:rounded-sm dc:border border-dc-border bg-dc-surface hover:bg-dc-surface-hover text-dc-text-secondary hover:text-dc-text dc:transition-colors dc:flex dc:items-center dc:gap-1",
|
|
1092
|
-
title:
|
|
1084
|
+
title: Y("results.debug.copyMarkdownTitle"),
|
|
1093
1085
|
children: Ne === "copied" ? /* @__PURE__ */ K(W, { children: [/* @__PURE__ */ G("span", {
|
|
1094
1086
|
className: "text-dc-success",
|
|
1095
1087
|
children: "✓"
|
|
1096
|
-
}),
|
|
1088
|
+
}), Y("common.actions.copied")] }) : /* @__PURE__ */ G(W, { children: `📋 ${Y("results.debug.copyAsMarkdown")}` })
|
|
1097
1089
|
})]
|
|
1098
1090
|
}), Je ? /* @__PURE__ */ G("div", {
|
|
1099
1091
|
className: "bg-dc-surface-secondary dc:border border-dc-border dc:rounded-sm dc:p-3 text-dc-text-muted dc:text-sm",
|
|
1100
|
-
children:
|
|
1092
|
+
children: Y("common.loading")
|
|
1101
1093
|
}) : Ve ? /* @__PURE__ */ G("div", {
|
|
1102
1094
|
className: "bg-dc-surface-secondary dc:border border-dc-border dc:rounded-sm dc:p-3",
|
|
1103
1095
|
children: /* @__PURE__ */ G(ge, { analysis: Ve })
|
|
1104
1096
|
}) : /* @__PURE__ */ G("div", {
|
|
1105
1097
|
className: "bg-dc-surface-secondary dc:border border-dc-border dc:rounded-sm dc:p-3 text-dc-text-muted dc:text-sm",
|
|
1106
|
-
children:
|
|
1098
|
+
children: Y(Ye ? "results.debug.analysisError" : "results.debug.analysisEmpty")
|
|
1107
1099
|
})] }),
|
|
1108
|
-
/* @__PURE__ */ G("div", { children:
|
|
1109
|
-
code: JSON.stringify(
|
|
1100
|
+
/* @__PURE__ */ G("div", { children: Xe ? /* @__PURE__ */ K(W, { children: [/* @__PURE__ */ G(u, {
|
|
1101
|
+
code: JSON.stringify(Xe, null, 2),
|
|
1110
1102
|
language: "json",
|
|
1111
|
-
title:
|
|
1103
|
+
title: Y(Ze ? "results.debug.cubeQueryExecuted" : "results.debug.cubeQuery"),
|
|
1112
1104
|
height: "16rem"
|
|
1113
|
-
}),
|
|
1105
|
+
}), Ze && $ > 0 && /* @__PURE__ */ K("div", {
|
|
1114
1106
|
className: "dc:mt-1 dc:text-xs text-dc-text-muted",
|
|
1115
1107
|
children: [
|
|
1116
1108
|
/* @__PURE__ */ G("span", {
|
|
@@ -1118,63 +1110,63 @@ var qe = F.lazy(() => import("./schema-visualization-D8Ak7GUd.js").then((e) => e
|
|
|
1118
1110
|
children: "ℹ"
|
|
1119
1111
|
}),
|
|
1120
1112
|
" ",
|
|
1121
|
-
|
|
1113
|
+
Y("results.debug.funnelFilterHint")
|
|
1122
1114
|
]
|
|
1123
1115
|
})] }) : /* @__PURE__ */ K(W, { children: [/* @__PURE__ */ G("h4", {
|
|
1124
1116
|
className: "dc:text-sm dc:font-semibold text-dc-text dc:mb-2",
|
|
1125
|
-
children:
|
|
1117
|
+
children: Y("results.debug.cubeQuery")
|
|
1126
1118
|
}), /* @__PURE__ */ G("div", {
|
|
1127
1119
|
className: "bg-dc-surface-secondary dc:border border-dc-border dc:rounded-sm dc:p-3 text-dc-text-muted dc:text-sm dc:h-64 dc:overflow-auto",
|
|
1128
|
-
children:
|
|
1120
|
+
children: Y("results.debug.noQuery")
|
|
1129
1121
|
})] }) }),
|
|
1130
|
-
/* @__PURE__ */ G(
|
|
1122
|
+
/* @__PURE__ */ G(k, {
|
|
1131
1123
|
sql: Re,
|
|
1132
1124
|
sqlLoading: Je,
|
|
1133
1125
|
sqlError: Ye,
|
|
1134
|
-
sqlPlaceholder:
|
|
1135
|
-
explainResult:
|
|
1136
|
-
explainLoading:
|
|
1137
|
-
explainHasRun:
|
|
1138
|
-
explainError:
|
|
1139
|
-
runExplain:
|
|
1140
|
-
aiAnalysis:
|
|
1141
|
-
aiAnalysisLoading:
|
|
1142
|
-
aiAnalysisError:
|
|
1143
|
-
runAIAnalysis:
|
|
1144
|
-
clearAIAnalysis:
|
|
1126
|
+
sqlPlaceholder: Y("results.debug.standard.sqlPlaceholder"),
|
|
1127
|
+
explainResult: $e,
|
|
1128
|
+
explainLoading: et,
|
|
1129
|
+
explainHasRun: tt,
|
|
1130
|
+
explainError: nt,
|
|
1131
|
+
runExplain: rt,
|
|
1132
|
+
aiAnalysis: St,
|
|
1133
|
+
aiAnalysisLoading: Ct,
|
|
1134
|
+
aiAnalysisError: wt,
|
|
1135
|
+
runAIAnalysis: Tt,
|
|
1136
|
+
clearAIAnalysis: Et,
|
|
1145
1137
|
enableAI: R,
|
|
1146
|
-
query:
|
|
1138
|
+
query: Xe,
|
|
1147
1139
|
title: "Generated SQL",
|
|
1148
1140
|
height: "16rem"
|
|
1149
1141
|
}),
|
|
1150
1142
|
/* @__PURE__ */ K("div", {
|
|
1151
1143
|
className: "dc:grid dc:grid-cols-1 dc:md:grid-cols-2 dc:gap-4",
|
|
1152
|
-
children: [/* @__PURE__ */ G("div", { children: /* @__PURE__ */ G(
|
|
1153
|
-
code: JSON.stringify(
|
|
1144
|
+
children: [/* @__PURE__ */ G("div", { children: /* @__PURE__ */ G(u, {
|
|
1145
|
+
code: JSON.stringify(l, null, 2),
|
|
1154
1146
|
language: "json",
|
|
1155
|
-
title:
|
|
1147
|
+
title: Y("results.debug.chartConfig"),
|
|
1156
1148
|
height: "16rem"
|
|
1157
|
-
}) }), /* @__PURE__ */ G("div", { children: /* @__PURE__ */ G(
|
|
1158
|
-
code: JSON.stringify(
|
|
1149
|
+
}) }), /* @__PURE__ */ G("div", { children: /* @__PURE__ */ G(u, {
|
|
1150
|
+
code: JSON.stringify(d, null, 2),
|
|
1159
1151
|
language: "json",
|
|
1160
|
-
title:
|
|
1152
|
+
title: Y("results.debug.displayConfig"),
|
|
1161
1153
|
height: "16rem"
|
|
1162
1154
|
}) })]
|
|
1163
1155
|
}),
|
|
1164
|
-
/* @__PURE__ */ G("div", { children: n ? /* @__PURE__ */ G(
|
|
1156
|
+
/* @__PURE__ */ G("div", { children: n ? /* @__PURE__ */ G(u, {
|
|
1165
1157
|
code: JSON.stringify(n, null, 2),
|
|
1166
1158
|
language: "json",
|
|
1167
|
-
title: `${
|
|
1159
|
+
title: `${Y("results.debug.serverResponse")} (${n.length} ${Y("results.header.rows")})`,
|
|
1168
1160
|
maxHeight: "24rem"
|
|
1169
1161
|
}) : /* @__PURE__ */ K(W, { children: [/* @__PURE__ */ G("h4", {
|
|
1170
1162
|
className: "dc:text-sm dc:font-semibold text-dc-text dc:mb-2",
|
|
1171
|
-
children:
|
|
1163
|
+
children: Y("results.debug.serverResponse")
|
|
1172
1164
|
}), /* @__PURE__ */ G("div", {
|
|
1173
1165
|
className: "bg-dc-surface-secondary dc:border border-dc-border dc:rounded-sm dc:p-3 text-dc-text-muted dc:text-sm",
|
|
1174
|
-
children:
|
|
1166
|
+
children: Y("results.debug.noResults")
|
|
1175
1167
|
})] }) })
|
|
1176
1168
|
]
|
|
1177
|
-
}),
|
|
1169
|
+
}), en = () => {
|
|
1178
1170
|
let e = ue?.modeMetadata, t = e ? /* @__PURE__ */ G("div", {
|
|
1179
1171
|
className: "dc:flex dc:flex-wrap dc:gap-2",
|
|
1180
1172
|
children: e.steps.map((e, t) => /* @__PURE__ */ K("div", {
|
|
@@ -1199,37 +1191,37 @@ var qe = F.lazy(() => import("./schema-visualization-D8Ak7GUd.js").then((e) => e
|
|
|
1199
1191
|
]
|
|
1200
1192
|
}, t))
|
|
1201
1193
|
}) : null;
|
|
1202
|
-
return
|
|
1203
|
-
label:
|
|
1204
|
-
badgeText: e?.stepCount ?
|
|
1194
|
+
return Qt({
|
|
1195
|
+
label: Y("results.debug.funnel.label"),
|
|
1196
|
+
badgeText: e?.stepCount ? Y("results.debug.funnel.steps", { count: e.stepCount }) : void 0,
|
|
1205
1197
|
serverQuery: le,
|
|
1206
|
-
serverQueryTitle:
|
|
1198
|
+
serverQueryTitle: Y("results.debug.funnel.serverQuery"),
|
|
1207
1199
|
serverQueryMissing: /* @__PURE__ */ K(W, { children: [/* @__PURE__ */ G("h4", {
|
|
1208
1200
|
className: "dc:text-sm dc:font-semibold text-dc-text dc:mb-2",
|
|
1209
|
-
children:
|
|
1201
|
+
children: Y("results.debug.funnel.serverQuery")
|
|
1210
1202
|
}), /* @__PURE__ */ G("div", {
|
|
1211
1203
|
className: "bg-dc-surface-secondary dc:border border-dc-border dc:rounded-sm dc:p-3 text-dc-text-muted dc:text-sm dc:h-64 dc:overflow-auto",
|
|
1212
|
-
children:
|
|
1204
|
+
children: Y("results.debug.funnel.noQuery")
|
|
1213
1205
|
})] }),
|
|
1214
1206
|
debugData: ue,
|
|
1215
|
-
sqlPlaceholder:
|
|
1216
|
-
explainResult:
|
|
1217
|
-
explainLoading:
|
|
1218
|
-
explainHasRun:
|
|
1219
|
-
explainError:
|
|
1220
|
-
runExplain:
|
|
1221
|
-
metadataTitle: t ?
|
|
1207
|
+
sqlPlaceholder: Y("results.debug.funnel.sqlPlaceholder"),
|
|
1208
|
+
explainResult: at,
|
|
1209
|
+
explainLoading: ot,
|
|
1210
|
+
explainHasRun: st,
|
|
1211
|
+
explainError: ct,
|
|
1212
|
+
runExplain: lt,
|
|
1213
|
+
metadataTitle: t ? Y("results.debug.funnel.stepsTitle") : void 0,
|
|
1222
1214
|
metadataSection: t,
|
|
1223
|
-
responseSection:
|
|
1215
|
+
responseSection: Xt()
|
|
1224
1216
|
});
|
|
1225
|
-
},
|
|
1217
|
+
}, tn = () => {
|
|
1226
1218
|
let e = me?.modeMetadata, t = e ? /* @__PURE__ */ K("div", {
|
|
1227
1219
|
className: "dc:grid dc:grid-cols-2 dc:gap-4 dc:text-sm",
|
|
1228
1220
|
children: [
|
|
1229
1221
|
/* @__PURE__ */ K("div", { children: [
|
|
1230
1222
|
/* @__PURE__ */ G("span", {
|
|
1231
1223
|
className: "text-dc-text-muted",
|
|
1232
|
-
children:
|
|
1224
|
+
children: Y("results.debug.retention.retentionType")
|
|
1233
1225
|
}),
|
|
1234
1226
|
" ",
|
|
1235
1227
|
/* @__PURE__ */ G("span", {
|
|
@@ -1240,18 +1232,18 @@ var qe = F.lazy(() => import("./schema-visualization-D8Ak7GUd.js").then((e) => e
|
|
|
1240
1232
|
/* @__PURE__ */ K("div", { children: [
|
|
1241
1233
|
/* @__PURE__ */ G("span", {
|
|
1242
1234
|
className: "text-dc-text-muted",
|
|
1243
|
-
children:
|
|
1235
|
+
children: Y("results.debug.retention.periods")
|
|
1244
1236
|
}),
|
|
1245
1237
|
" ",
|
|
1246
1238
|
/* @__PURE__ */ G("span", {
|
|
1247
1239
|
className: "text-dc-text",
|
|
1248
|
-
children: e.periods ??
|
|
1240
|
+
children: e.periods ?? Y("results.debug.flow.notSet")
|
|
1249
1241
|
})
|
|
1250
1242
|
] }),
|
|
1251
1243
|
/* @__PURE__ */ K("div", { children: [
|
|
1252
1244
|
/* @__PURE__ */ G("span", {
|
|
1253
1245
|
className: "text-dc-text-muted",
|
|
1254
|
-
children:
|
|
1246
|
+
children: Y("results.debug.retention.granularity")
|
|
1255
1247
|
}),
|
|
1256
1248
|
" ",
|
|
1257
1249
|
/* @__PURE__ */ G("span", {
|
|
@@ -1262,7 +1254,7 @@ var qe = F.lazy(() => import("./schema-visualization-D8Ak7GUd.js").then((e) => e
|
|
|
1262
1254
|
/* @__PURE__ */ K("div", { children: [
|
|
1263
1255
|
/* @__PURE__ */ G("span", {
|
|
1264
1256
|
className: "text-dc-text-muted",
|
|
1265
|
-
children:
|
|
1257
|
+
children: Y("results.debug.retention.segments")
|
|
1266
1258
|
}),
|
|
1267
1259
|
" ",
|
|
1268
1260
|
/* @__PURE__ */ G("span", {
|
|
@@ -1271,9 +1263,9 @@ var qe = F.lazy(() => import("./schema-visualization-D8Ak7GUd.js").then((e) => e
|
|
|
1271
1263
|
})
|
|
1272
1264
|
] })
|
|
1273
1265
|
]
|
|
1274
|
-
}) : null, n =
|
|
1266
|
+
}) : null, n = J?.summary ? /* @__PURE__ */ K("div", { children: [/* @__PURE__ */ G("h4", {
|
|
1275
1267
|
className: "dc:text-sm dc:font-semibold text-dc-text dc:mb-2",
|
|
1276
|
-
children:
|
|
1268
|
+
children: Y("results.debug.retention.summaryTitle")
|
|
1277
1269
|
}), /* @__PURE__ */ G("div", {
|
|
1278
1270
|
className: "bg-dc-surface-secondary dc:border border-dc-border dc:rounded-sm dc:p-3",
|
|
1279
1271
|
children: /* @__PURE__ */ K("div", {
|
|
@@ -1282,163 +1274,163 @@ var qe = F.lazy(() => import("./schema-visualization-D8Ak7GUd.js").then((e) => e
|
|
|
1282
1274
|
/* @__PURE__ */ K("div", { children: [
|
|
1283
1275
|
/* @__PURE__ */ G("span", {
|
|
1284
1276
|
className: "text-dc-text-muted",
|
|
1285
|
-
children:
|
|
1277
|
+
children: Y("results.debug.retention.avgPeriod1")
|
|
1286
1278
|
}),
|
|
1287
1279
|
" ",
|
|
1288
1280
|
/* @__PURE__ */ K("span", {
|
|
1289
1281
|
className: "text-dc-text dc:font-medium",
|
|
1290
|
-
children: [(
|
|
1282
|
+
children: [(J.summary.avgPeriod1Retention * 100).toFixed(1), "%"]
|
|
1291
1283
|
})
|
|
1292
1284
|
] }),
|
|
1293
1285
|
/* @__PURE__ */ K("div", { children: [
|
|
1294
1286
|
/* @__PURE__ */ G("span", {
|
|
1295
1287
|
className: "text-dc-text-muted",
|
|
1296
|
-
children:
|
|
1288
|
+
children: Y("results.debug.retention.maxPeriod1")
|
|
1297
1289
|
}),
|
|
1298
1290
|
" ",
|
|
1299
1291
|
/* @__PURE__ */ K("span", {
|
|
1300
1292
|
className: "text-dc-text dc:font-medium",
|
|
1301
|
-
children: [(
|
|
1293
|
+
children: [(J.summary.maxPeriod1Retention * 100).toFixed(1), "%"]
|
|
1302
1294
|
})
|
|
1303
1295
|
] }),
|
|
1304
1296
|
/* @__PURE__ */ K("div", { children: [
|
|
1305
1297
|
/* @__PURE__ */ G("span", {
|
|
1306
1298
|
className: "text-dc-text-muted",
|
|
1307
|
-
children:
|
|
1299
|
+
children: Y("results.debug.retention.minPeriod1")
|
|
1308
1300
|
}),
|
|
1309
1301
|
" ",
|
|
1310
1302
|
/* @__PURE__ */ K("span", {
|
|
1311
1303
|
className: "text-dc-text dc:font-medium",
|
|
1312
|
-
children: [(
|
|
1304
|
+
children: [(J.summary.minPeriod1Retention * 100).toFixed(1), "%"]
|
|
1313
1305
|
})
|
|
1314
1306
|
] })
|
|
1315
1307
|
]
|
|
1316
1308
|
})
|
|
1317
1309
|
})] }) : null;
|
|
1318
|
-
return
|
|
1319
|
-
label:
|
|
1320
|
-
badgeText: e ?
|
|
1310
|
+
return Qt({
|
|
1311
|
+
label: Y("results.debug.retention.label"),
|
|
1312
|
+
badgeText: e ? Y("results.debug.retention.badge", {
|
|
1321
1313
|
segments: e.segmentCount || 1,
|
|
1322
1314
|
users: e.totalUsers
|
|
1323
1315
|
}) : void 0,
|
|
1324
1316
|
serverQuery: pe,
|
|
1325
|
-
serverQueryTitle:
|
|
1317
|
+
serverQueryTitle: Y("results.debug.retention.serverQuery"),
|
|
1326
1318
|
serverQueryMissing: /* @__PURE__ */ K(W, { children: [/* @__PURE__ */ G("h4", {
|
|
1327
1319
|
className: "dc:text-sm dc:font-semibold text-dc-text dc:mb-2",
|
|
1328
|
-
children:
|
|
1320
|
+
children: Y("results.debug.retention.serverQuery")
|
|
1329
1321
|
}), /* @__PURE__ */ K("div", {
|
|
1330
1322
|
className: "bg-dc-warning-bg dc:border border-dc-warning dc:rounded-sm dc:p-3 dc:text-sm dc:h-64 dc:overflow-auto",
|
|
1331
1323
|
children: [/* @__PURE__ */ G("div", {
|
|
1332
1324
|
className: "text-dc-warning dc:font-medium dc:mb-2",
|
|
1333
|
-
children:
|
|
1325
|
+
children: Y("results.debug.retention.configIncomplete")
|
|
1334
1326
|
}), he && he.errors.length > 0 ? /* @__PURE__ */ G("ul", {
|
|
1335
1327
|
className: "list-disc dc:list-inside text-dc-text-secondary dc:space-y-1",
|
|
1336
1328
|
children: he.errors.map((e, t) => /* @__PURE__ */ G("li", { children: e }, t))
|
|
1337
1329
|
}) : /* @__PURE__ */ G("p", {
|
|
1338
1330
|
className: "text-dc-text-muted",
|
|
1339
|
-
children:
|
|
1331
|
+
children: Y("results.debug.retention.configHint")
|
|
1340
1332
|
})]
|
|
1341
1333
|
})] }),
|
|
1342
1334
|
debugData: me,
|
|
1343
|
-
sqlPlaceholder:
|
|
1344
|
-
explainResult:
|
|
1345
|
-
explainLoading:
|
|
1346
|
-
explainHasRun:
|
|
1347
|
-
explainError:
|
|
1348
|
-
runExplain:
|
|
1349
|
-
metadataTitle: t ?
|
|
1335
|
+
sqlPlaceholder: Y("results.debug.retention.sqlPlaceholder"),
|
|
1336
|
+
explainResult: _t,
|
|
1337
|
+
explainLoading: vt,
|
|
1338
|
+
explainHasRun: yt,
|
|
1339
|
+
explainError: bt,
|
|
1340
|
+
runExplain: xt,
|
|
1341
|
+
metadataTitle: t ? Y("results.debug.retention.configTitle") : void 0,
|
|
1350
1342
|
metadataSection: t,
|
|
1351
1343
|
extraSection: n,
|
|
1352
|
-
responseSection:
|
|
1344
|
+
responseSection: Zt()
|
|
1353
1345
|
});
|
|
1354
|
-
},
|
|
1346
|
+
}, nn = () => {
|
|
1355
1347
|
let e = fe?.modeMetadata, t = e ? /* @__PURE__ */ K("div", {
|
|
1356
1348
|
className: "dc:grid dc:grid-cols-2 dc:gap-4 dc:text-sm",
|
|
1357
1349
|
children: [
|
|
1358
1350
|
/* @__PURE__ */ K("div", { children: [
|
|
1359
1351
|
/* @__PURE__ */ G("span", {
|
|
1360
1352
|
className: "text-dc-text-muted",
|
|
1361
|
-
children:
|
|
1353
|
+
children: Y("results.debug.flow.startingStep")
|
|
1362
1354
|
}),
|
|
1363
1355
|
" ",
|
|
1364
1356
|
/* @__PURE__ */ G("span", {
|
|
1365
1357
|
className: "text-dc-text",
|
|
1366
|
-
children: e.startingStep?.name ||
|
|
1358
|
+
children: e.startingStep?.name || Y("results.debug.flow.notSet")
|
|
1367
1359
|
})
|
|
1368
1360
|
] }),
|
|
1369
1361
|
/* @__PURE__ */ K("div", { children: [
|
|
1370
1362
|
/* @__PURE__ */ G("span", {
|
|
1371
1363
|
className: "text-dc-text-muted",
|
|
1372
|
-
children:
|
|
1364
|
+
children: Y("results.debug.flow.eventDimension")
|
|
1373
1365
|
}),
|
|
1374
1366
|
" ",
|
|
1375
1367
|
/* @__PURE__ */ G("span", {
|
|
1376
1368
|
className: "text-dc-text",
|
|
1377
|
-
children: e.eventDimension ||
|
|
1369
|
+
children: e.eventDimension || Y("results.debug.flow.notSet")
|
|
1378
1370
|
})
|
|
1379
1371
|
] }),
|
|
1380
1372
|
/* @__PURE__ */ K("div", { children: [
|
|
1381
1373
|
/* @__PURE__ */ G("span", {
|
|
1382
1374
|
className: "text-dc-text-muted",
|
|
1383
|
-
children:
|
|
1375
|
+
children: Y("results.debug.flow.stepsBefore")
|
|
1384
1376
|
}),
|
|
1385
1377
|
" ",
|
|
1386
1378
|
/* @__PURE__ */ G("span", {
|
|
1387
1379
|
className: "text-dc-text",
|
|
1388
|
-
children: e.stepsBefore ??
|
|
1380
|
+
children: e.stepsBefore ?? Y("results.debug.flow.notSet")
|
|
1389
1381
|
})
|
|
1390
1382
|
] }),
|
|
1391
1383
|
/* @__PURE__ */ K("div", { children: [
|
|
1392
1384
|
/* @__PURE__ */ G("span", {
|
|
1393
1385
|
className: "text-dc-text-muted",
|
|
1394
|
-
children:
|
|
1386
|
+
children: Y("results.debug.flow.stepsAfter")
|
|
1395
1387
|
}),
|
|
1396
1388
|
" ",
|
|
1397
1389
|
/* @__PURE__ */ G("span", {
|
|
1398
1390
|
className: "text-dc-text",
|
|
1399
|
-
children: e.stepsAfter ??
|
|
1391
|
+
children: e.stepsAfter ?? Y("results.debug.flow.notSet")
|
|
1400
1392
|
})
|
|
1401
1393
|
] })
|
|
1402
1394
|
]
|
|
1403
1395
|
}) : null;
|
|
1404
|
-
return
|
|
1405
|
-
label:
|
|
1396
|
+
return Qt({
|
|
1397
|
+
label: Y("results.debug.flow.label"),
|
|
1406
1398
|
badgeText: e ? `${e.stepsBefore} before, ${e.stepsAfter} after` : void 0,
|
|
1407
1399
|
serverQuery: de,
|
|
1408
|
-
serverQueryTitle:
|
|
1400
|
+
serverQueryTitle: Y("results.debug.flow.serverQuery"),
|
|
1409
1401
|
serverQueryMissing: /* @__PURE__ */ K(W, { children: [/* @__PURE__ */ G("h4", {
|
|
1410
1402
|
className: "dc:text-sm dc:font-semibold text-dc-text dc:mb-2",
|
|
1411
|
-
children:
|
|
1403
|
+
children: Y("results.debug.flow.serverQuery")
|
|
1412
1404
|
}), /* @__PURE__ */ G("div", {
|
|
1413
1405
|
className: "bg-dc-surface-secondary dc:border border-dc-border dc:rounded-sm dc:p-3 text-dc-text-muted dc:text-sm dc:h-64 dc:overflow-auto",
|
|
1414
|
-
children:
|
|
1406
|
+
children: Y("results.debug.flow.noQuery")
|
|
1415
1407
|
})] }),
|
|
1416
1408
|
debugData: fe,
|
|
1417
|
-
sqlPlaceholder:
|
|
1418
|
-
explainResult:
|
|
1419
|
-
explainLoading:
|
|
1420
|
-
explainHasRun:
|
|
1421
|
-
explainError:
|
|
1422
|
-
runExplain:
|
|
1423
|
-
metadataTitle: t ?
|
|
1409
|
+
sqlPlaceholder: Y("results.debug.flow.sqlPlaceholder"),
|
|
1410
|
+
explainResult: dt,
|
|
1411
|
+
explainLoading: ft,
|
|
1412
|
+
explainHasRun: pt,
|
|
1413
|
+
explainError: mt,
|
|
1414
|
+
runExplain: ht,
|
|
1415
|
+
metadataTitle: t ? Y("results.debug.flow.configTitle") : void 0,
|
|
1424
1416
|
metadataSection: t,
|
|
1425
|
-
responseSection:
|
|
1417
|
+
responseSection: Xt(Y("results.debug.flow.responseTitle"))
|
|
1426
1418
|
});
|
|
1427
|
-
},
|
|
1419
|
+
}, rn = () => X ? en() : Q ? tn() : Z ? nn() : $t(), an = Ge(X, ie, ae), on = () => {
|
|
1428
1420
|
let e = [], t = [];
|
|
1429
1421
|
if (!n || Array.isArray(n) && n.length === 0) return /* @__PURE__ */ G("div", {
|
|
1430
1422
|
className: "dc:flex dc:items-center dc:justify-center dc:h-full text-dc-text-muted",
|
|
1431
1423
|
children: /* @__PURE__ */ K("div", {
|
|
1432
1424
|
className: "dc:text-center",
|
|
1433
1425
|
children: [
|
|
1434
|
-
/* @__PURE__ */ G(
|
|
1426
|
+
/* @__PURE__ */ G(It, { className: "dc:w-12 dc:h-12 dc:mx-auto dc:mb-3 dc:opacity-50" }),
|
|
1435
1427
|
/* @__PURE__ */ G("div", {
|
|
1436
1428
|
className: "dc:text-sm dc:font-semibold dc:mb-1",
|
|
1437
|
-
children:
|
|
1429
|
+
children: Y("results.flow.noData")
|
|
1438
1430
|
}),
|
|
1439
1431
|
/* @__PURE__ */ G("div", {
|
|
1440
1432
|
className: "dc:text-xs",
|
|
1441
|
-
children:
|
|
1433
|
+
children: Y("results.flow.noDataHint")
|
|
1442
1434
|
})
|
|
1443
1435
|
]
|
|
1444
1436
|
})
|
|
@@ -1452,14 +1444,14 @@ var qe = F.lazy(() => import("./schema-visualization-D8Ak7GUd.js").then((e) => e
|
|
|
1452
1444
|
children: /* @__PURE__ */ K("div", {
|
|
1453
1445
|
className: "dc:text-center",
|
|
1454
1446
|
children: [
|
|
1455
|
-
/* @__PURE__ */ G(
|
|
1447
|
+
/* @__PURE__ */ G(It, { className: "dc:w-12 dc:h-12 dc:mx-auto dc:mb-3 dc:opacity-50" }),
|
|
1456
1448
|
/* @__PURE__ */ G("div", {
|
|
1457
1449
|
className: "dc:text-sm dc:font-semibold dc:mb-1",
|
|
1458
|
-
children:
|
|
1450
|
+
children: Y("results.flow.noData")
|
|
1459
1451
|
}),
|
|
1460
1452
|
/* @__PURE__ */ G("div", {
|
|
1461
1453
|
className: "dc:text-xs",
|
|
1462
|
-
children:
|
|
1454
|
+
children: Y("results.flow.noDataHint")
|
|
1463
1455
|
})
|
|
1464
1456
|
]
|
|
1465
1457
|
})
|
|
@@ -1467,7 +1459,7 @@ var qe = F.lazy(() => import("./schema-visualization-D8Ak7GUd.js").then((e) => e
|
|
|
1467
1459
|
className: "dc:h-full dc:overflow-auto dc:p-4 dc:space-y-6",
|
|
1468
1460
|
children: [/* @__PURE__ */ K("div", { children: [/* @__PURE__ */ G("h3", {
|
|
1469
1461
|
className: "dc:text-sm dc:font-semibold text-dc-text dc:mb-2",
|
|
1470
|
-
children:
|
|
1462
|
+
children: Y("results.flow.nodes", { count: e.length })
|
|
1471
1463
|
}), /* @__PURE__ */ G("div", {
|
|
1472
1464
|
className: "dc:border border-dc-border dc:rounded-sm dc:overflow-hidden",
|
|
1473
1465
|
children: /* @__PURE__ */ K("table", {
|
|
@@ -1477,15 +1469,15 @@ var qe = F.lazy(() => import("./schema-visualization-D8Ak7GUd.js").then((e) => e
|
|
|
1477
1469
|
children: /* @__PURE__ */ K("tr", { children: [
|
|
1478
1470
|
/* @__PURE__ */ G("th", {
|
|
1479
1471
|
className: "dc:px-3 dc:py-2 dc:text-left dc:text-xs dc:font-medium text-dc-text-muted dc:uppercase dc:tracking-wider",
|
|
1480
|
-
children:
|
|
1472
|
+
children: Y("results.flow.layer")
|
|
1481
1473
|
}),
|
|
1482
1474
|
/* @__PURE__ */ G("th", {
|
|
1483
1475
|
className: "dc:px-3 dc:py-2 dc:text-left dc:text-xs dc:font-medium text-dc-text-muted dc:uppercase dc:tracking-wider",
|
|
1484
|
-
children:
|
|
1476
|
+
children: Y("results.flow.name")
|
|
1485
1477
|
}),
|
|
1486
1478
|
/* @__PURE__ */ G("th", {
|
|
1487
1479
|
className: "dc:px-3 dc:py-2 dc:text-right dc:text-xs dc:font-medium text-dc-text-muted dc:uppercase dc:tracking-wider",
|
|
1488
|
-
children:
|
|
1480
|
+
children: Y("results.flow.count")
|
|
1489
1481
|
})
|
|
1490
1482
|
] })
|
|
1491
1483
|
}), /* @__PURE__ */ G("tbody", {
|
|
@@ -1514,7 +1506,7 @@ var qe = F.lazy(() => import("./schema-visualization-D8Ak7GUd.js").then((e) => e
|
|
|
1514
1506
|
})
|
|
1515
1507
|
})] }), /* @__PURE__ */ K("div", { children: [/* @__PURE__ */ G("h3", {
|
|
1516
1508
|
className: "dc:text-sm dc:font-semibold text-dc-text dc:mb-2",
|
|
1517
|
-
children:
|
|
1509
|
+
children: Y("results.flow.transitions", { count: t.length })
|
|
1518
1510
|
}), /* @__PURE__ */ G("div", {
|
|
1519
1511
|
className: "dc:border border-dc-border dc:rounded-sm dc:overflow-hidden",
|
|
1520
1512
|
children: /* @__PURE__ */ K("table", {
|
|
@@ -1524,7 +1516,7 @@ var qe = F.lazy(() => import("./schema-visualization-D8Ak7GUd.js").then((e) => e
|
|
|
1524
1516
|
children: /* @__PURE__ */ K("tr", { children: [
|
|
1525
1517
|
/* @__PURE__ */ G("th", {
|
|
1526
1518
|
className: "dc:px-3 dc:py-2 dc:text-left dc:text-xs dc:font-medium text-dc-text-muted dc:uppercase dc:tracking-wider",
|
|
1527
|
-
children:
|
|
1519
|
+
children: Y("results.flow.from")
|
|
1528
1520
|
}),
|
|
1529
1521
|
/* @__PURE__ */ G("th", {
|
|
1530
1522
|
className: "dc:px-3 dc:py-2 dc:text-center dc:text-xs dc:font-medium text-dc-text-muted dc:uppercase dc:tracking-wider",
|
|
@@ -1532,11 +1524,11 @@ var qe = F.lazy(() => import("./schema-visualization-D8Ak7GUd.js").then((e) => e
|
|
|
1532
1524
|
}),
|
|
1533
1525
|
/* @__PURE__ */ G("th", {
|
|
1534
1526
|
className: "dc:px-3 dc:py-2 dc:text-left dc:text-xs dc:font-medium text-dc-text-muted dc:uppercase dc:tracking-wider",
|
|
1535
|
-
children:
|
|
1527
|
+
children: Y("results.flow.to")
|
|
1536
1528
|
}),
|
|
1537
1529
|
/* @__PURE__ */ G("th", {
|
|
1538
1530
|
className: "dc:px-3 dc:py-2 dc:text-right dc:text-xs dc:font-medium text-dc-text-muted dc:uppercase dc:tracking-wider",
|
|
1539
|
-
children:
|
|
1531
|
+
children: Y("results.flow.count")
|
|
1540
1532
|
})
|
|
1541
1533
|
] })
|
|
1542
1534
|
}), /* @__PURE__ */ G("tbody", {
|
|
@@ -1569,37 +1561,37 @@ var qe = F.lazy(() => import("./schema-visualization-D8Ak7GUd.js").then((e) => e
|
|
|
1569
1561
|
})
|
|
1570
1562
|
})] })]
|
|
1571
1563
|
});
|
|
1572
|
-
},
|
|
1564
|
+
}, sn = (e) => {
|
|
1573
1565
|
let { tableData: t, tableQuery: r } = Ue({
|
|
1574
1566
|
tableIndex: e,
|
|
1575
|
-
isMultiQuery:
|
|
1576
|
-
allQueries:
|
|
1577
|
-
perQueryResults:
|
|
1567
|
+
isMultiQuery: an,
|
|
1568
|
+
allQueries: g,
|
|
1569
|
+
perQueryResults: ae,
|
|
1578
1570
|
executionResults: n,
|
|
1579
|
-
combinedQueryForChart:
|
|
1571
|
+
combinedQueryForChart: Mt
|
|
1580
1572
|
});
|
|
1581
1573
|
if (!t || t.length === 0) return /* @__PURE__ */ G("div", {
|
|
1582
1574
|
className: "dc:flex dc:items-center dc:justify-center dc:h-full text-dc-text-muted",
|
|
1583
1575
|
children: /* @__PURE__ */ K("div", {
|
|
1584
1576
|
className: "dc:text-center",
|
|
1585
1577
|
children: [
|
|
1586
|
-
/* @__PURE__ */ G(
|
|
1578
|
+
/* @__PURE__ */ G(It, { className: "dc:w-12 dc:h-12 dc:mx-auto dc:mb-3 dc:opacity-50" }),
|
|
1587
1579
|
/* @__PURE__ */ G("div", {
|
|
1588
1580
|
className: "dc:text-sm dc:font-semibold dc:mb-1",
|
|
1589
1581
|
children: "No data to display"
|
|
1590
1582
|
}),
|
|
1591
1583
|
/* @__PURE__ */ G("div", {
|
|
1592
1584
|
className: "dc:text-xs",
|
|
1593
|
-
children:
|
|
1585
|
+
children: Y("results.table.noDataHint")
|
|
1594
1586
|
})
|
|
1595
1587
|
]
|
|
1596
1588
|
})
|
|
1597
1589
|
});
|
|
1598
|
-
let i = t.slice(0,
|
|
1599
|
-
return /* @__PURE__ */ G(
|
|
1590
|
+
let i = t.slice(0, b);
|
|
1591
|
+
return /* @__PURE__ */ G(E, {
|
|
1600
1592
|
chartType: "table",
|
|
1601
1593
|
data: i,
|
|
1602
|
-
colorPalette:
|
|
1594
|
+
colorPalette: f,
|
|
1603
1595
|
queryObject: r,
|
|
1604
1596
|
height: "100%",
|
|
1605
1597
|
fallback: /* @__PURE__ */ G("div", {
|
|
@@ -1607,7 +1599,7 @@ var qe = F.lazy(() => import("./schema-visualization-D8Ak7GUd.js").then((e) => e
|
|
|
1607
1599
|
children: /* @__PURE__ */ G("div", { className: "dc:animate-pulse bg-dc-surface-secondary dc:rounded-sm dc:w-full dc:h-full" })
|
|
1608
1600
|
})
|
|
1609
1601
|
});
|
|
1610
|
-
},
|
|
1602
|
+
}, cn = () => /* @__PURE__ */ G("div", {
|
|
1611
1603
|
className: "dc:absolute dc:inset-0 dc:flex dc:items-center dc:justify-center bg-dc-surface bg-opacity-75 dc:z-10",
|
|
1612
1604
|
children: /* @__PURE__ */ K("div", {
|
|
1613
1605
|
className: "dc:text-center",
|
|
@@ -1616,29 +1608,29 @@ var qe = F.lazy(() => import("./schema-visualization-D8Ak7GUd.js").then((e) => e
|
|
|
1616
1608
|
style: { borderBottomColor: "var(--dc-primary)" }
|
|
1617
1609
|
}), /* @__PURE__ */ G("div", {
|
|
1618
1610
|
className: "dc:text-xs text-dc-text-secondary",
|
|
1619
|
-
children:
|
|
1611
|
+
children: Y("results.refreshing")
|
|
1620
1612
|
})]
|
|
1621
1613
|
})
|
|
1622
|
-
}),
|
|
1614
|
+
}), ln = {
|
|
1623
1615
|
executionResults: n,
|
|
1624
1616
|
executionStatus: t,
|
|
1625
|
-
totalRowCount:
|
|
1626
|
-
resultsStale:
|
|
1617
|
+
totalRowCount: a,
|
|
1618
|
+
resultsStale: o,
|
|
1627
1619
|
executionError: r,
|
|
1628
|
-
debugDataPerQuery:
|
|
1629
|
-
},
|
|
1630
|
-
displayLimit:
|
|
1631
|
-
onDisplayLimitChange:
|
|
1632
|
-
isAIOpen:
|
|
1633
|
-
onAIToggle:
|
|
1634
|
-
onColorPaletteChange:
|
|
1635
|
-
currentPaletteName:
|
|
1636
|
-
onShareClick:
|
|
1620
|
+
debugDataPerQuery: O
|
|
1621
|
+
}, un = {
|
|
1622
|
+
displayLimit: b,
|
|
1623
|
+
onDisplayLimitChange: x,
|
|
1624
|
+
isAIOpen: ne,
|
|
1625
|
+
onAIToggle: re,
|
|
1626
|
+
onColorPaletteChange: h,
|
|
1627
|
+
currentPaletteName: m,
|
|
1628
|
+
onShareClick: A,
|
|
1637
1629
|
shareButtonState: ee,
|
|
1638
|
-
canShare:
|
|
1639
|
-
onRefreshClick:
|
|
1640
|
-
canRefresh:
|
|
1641
|
-
isRefreshing:
|
|
1630
|
+
canShare: j,
|
|
1631
|
+
onRefreshClick: M,
|
|
1632
|
+
canRefresh: N,
|
|
1633
|
+
isRefreshing: te,
|
|
1642
1634
|
showCacheBustIndicator: Fe,
|
|
1643
1635
|
setIsHoveringRefresh: Me,
|
|
1644
1636
|
onClearClick: I,
|
|
@@ -1646,18 +1638,18 @@ var qe = F.lazy(() => import("./schema-visualization-D8Ak7GUd.js").then((e) => e
|
|
|
1646
1638
|
setIsClearConfirmOpen: Oe,
|
|
1647
1639
|
setShowDebug: Se,
|
|
1648
1640
|
setShowSchema: we
|
|
1649
|
-
},
|
|
1650
|
-
activeView:
|
|
1641
|
+
}, dn = {
|
|
1642
|
+
activeView: v,
|
|
1651
1643
|
showDebug: xe,
|
|
1652
1644
|
showSchema: Ce,
|
|
1653
1645
|
enableAI: R,
|
|
1654
|
-
isFunnelMode:
|
|
1646
|
+
isFunnelMode: X,
|
|
1655
1647
|
showSchemaDiagram: !!be.showSchemaDiagram
|
|
1656
|
-
},
|
|
1657
|
-
summary:
|
|
1658
|
-
toolbar:
|
|
1659
|
-
display:
|
|
1660
|
-
}),
|
|
1648
|
+
}, fn = () => /* @__PURE__ */ G(Ee, {
|
|
1649
|
+
summary: ln,
|
|
1650
|
+
toolbar: un,
|
|
1651
|
+
display: dn
|
|
1652
|
+
}), pn = () => !P || !M ? null : /* @__PURE__ */ K("div", {
|
|
1661
1653
|
className: "dc:px-4 dc:py-2 bg-dc-warning-bg dc:border-b border-dc-warning dc:flex dc:items-center dc:justify-between dc:gap-3 dc:flex-shrink-0",
|
|
1662
1654
|
children: [/* @__PURE__ */ K("div", {
|
|
1663
1655
|
className: "dc:flex dc:items-center dc:gap-2 text-dc-warning",
|
|
@@ -1674,14 +1666,14 @@ var qe = F.lazy(() => import("./schema-visualization-D8Ak7GUd.js").then((e) => e
|
|
|
1674
1666
|
})
|
|
1675
1667
|
}), /* @__PURE__ */ G("span", {
|
|
1676
1668
|
className: "dc:text-sm dc:font-medium",
|
|
1677
|
-
children:
|
|
1669
|
+
children: Y("results.warning.configChanged")
|
|
1678
1670
|
})]
|
|
1679
1671
|
}), /* @__PURE__ */ G("button", {
|
|
1680
|
-
onClick: () =>
|
|
1672
|
+
onClick: () => M(),
|
|
1681
1673
|
className: "dc:px-3 dc:py-1 dc:text-xs dc:font-medium bg-dc-warning text-white dc:rounded-sm hover:bg-dc-warning/90 dc:transition-colors",
|
|
1682
|
-
children:
|
|
1674
|
+
children: Y("results.warning.refreshNow")
|
|
1683
1675
|
})]
|
|
1684
|
-
}),
|
|
1676
|
+
}), mn = () => !_e || _e.length === 0 ? null : /* @__PURE__ */ G(W, { children: _e.map((e, t) => {
|
|
1685
1677
|
let n = s("warning"), r = e.severity === "error", i = r ? "bg-dc-danger-bg" : "bg-dc-warning-bg", a = r ? "border-dc-error" : "border-dc-warning", o = r ? "text-dc-error" : "text-dc-warning";
|
|
1686
1678
|
return /* @__PURE__ */ K("div", {
|
|
1687
1679
|
className: `dc:px-4 dc:py-2 ${i} dc:border-b ${a} dc:flex dc:items-start dc:gap-3 dc:flex-shrink-0`,
|
|
@@ -1696,75 +1688,75 @@ var qe = F.lazy(() => import("./schema-visualization-D8Ak7GUd.js").then((e) => e
|
|
|
1696
1688
|
})]
|
|
1697
1689
|
})]
|
|
1698
1690
|
}, `${e.code}-${t}`);
|
|
1699
|
-
}) }),
|
|
1691
|
+
}) }), hn = () => Ce ? /* @__PURE__ */ G(F.Suspense, {
|
|
1700
1692
|
fallback: null,
|
|
1701
1693
|
children: /* @__PURE__ */ G(qe, {
|
|
1702
1694
|
height: "100%",
|
|
1703
1695
|
highlightedFields: ve,
|
|
1704
1696
|
onFieldClick: ye
|
|
1705
1697
|
})
|
|
1706
|
-
}) : xe ?
|
|
1698
|
+
}) : xe ? rn() : v === "chart" ? /* @__PURE__ */ G("div", {
|
|
1707
1699
|
className: "dc:p-4 dc:h-full",
|
|
1708
|
-
children:
|
|
1709
|
-
}) :
|
|
1700
|
+
children: qt()
|
|
1701
|
+
}) : Z ? /* @__PURE__ */ G("div", {
|
|
1710
1702
|
className: "dc:h-full",
|
|
1711
|
-
children:
|
|
1712
|
-
}, "table-flow") :
|
|
1703
|
+
children: on()
|
|
1704
|
+
}, "table-flow") : an ? /* @__PURE__ */ G("div", {
|
|
1713
1705
|
className: "dc:h-full",
|
|
1714
|
-
children:
|
|
1715
|
-
}, `table-${
|
|
1706
|
+
children: sn(oe)
|
|
1707
|
+
}, `table-${oe}`) : /* @__PURE__ */ G("div", {
|
|
1716
1708
|
className: "dc:h-full",
|
|
1717
|
-
children:
|
|
1718
|
-
}, "table-single"),
|
|
1709
|
+
children: sn()
|
|
1710
|
+
}, "table-single"), gn = () => /* @__PURE__ */ K(W, { children: [Array.from({ length: ie }).map((e, t) => /* @__PURE__ */ K("button", {
|
|
1719
1711
|
onClick: () => {
|
|
1720
|
-
|
|
1712
|
+
y("table"), se?.(t);
|
|
1721
1713
|
},
|
|
1722
|
-
className: `dc:flex dc:items-center dc:gap-1.5 dc:px-3 dc:py-1.5 dc:text-sm dc:font-medium dc:transition-colors ${
|
|
1714
|
+
className: `dc:flex dc:items-center dc:gap-1.5 dc:px-3 dc:py-1.5 dc:text-sm dc:font-medium dc:transition-colors ${v === "table" && oe === t ? "bg-dc-primary text-white" : "text-dc-text-secondary hover:bg-dc-surface-hover"}`,
|
|
1723
1715
|
title: `Table Q${t + 1}`,
|
|
1724
1716
|
children: [
|
|
1725
|
-
/* @__PURE__ */ G(
|
|
1717
|
+
/* @__PURE__ */ G(It, { className: "dc:w-4 dc:h-4" }),
|
|
1726
1718
|
"Q",
|
|
1727
1719
|
t + 1
|
|
1728
1720
|
]
|
|
1729
1721
|
}, `table-${t}`)), /* @__PURE__ */ K("button", {
|
|
1730
1722
|
onClick: () => {
|
|
1731
|
-
|
|
1723
|
+
y("table"), se?.(-1);
|
|
1732
1724
|
},
|
|
1733
|
-
className: `dc:flex dc:items-center dc:gap-1.5 dc:px-3 dc:py-1.5 dc:text-sm dc:font-medium dc:transition-colors ${
|
|
1725
|
+
className: `dc:flex dc:items-center dc:gap-1.5 dc:px-3 dc:py-1.5 dc:text-sm dc:font-medium dc:transition-colors ${v === "table" && oe === -1 ? "bg-dc-primary text-white" : "text-dc-text-secondary hover:bg-dc-surface-hover"}`,
|
|
1734
1726
|
title: "Merged table view",
|
|
1735
|
-
children: [/* @__PURE__ */ G(
|
|
1736
|
-
})] }),
|
|
1727
|
+
children: [/* @__PURE__ */ G(It, { className: "dc:w-4 dc:h-4" }), Y("results.view.merged")]
|
|
1728
|
+
})] }), _n = () => /* @__PURE__ */ G("div", {
|
|
1737
1729
|
className: "dc:px-4 dc:py-3 dc:border-t border-dc-border bg-dc-surface dc:flex dc:justify-center dc:flex-shrink-0",
|
|
1738
1730
|
children: /* @__PURE__ */ K("div", {
|
|
1739
1731
|
className: "dc:flex dc:items-center bg-dc-surface-secondary dc:border border-dc-border dc:rounded-md dc:overflow-hidden",
|
|
1740
1732
|
children: [/* @__PURE__ */ K("button", {
|
|
1741
|
-
onClick: () =>
|
|
1742
|
-
disabled: !
|
|
1743
|
-
className: `dc:flex dc:items-center dc:gap-1.5 dc:px-4 dc:py-1.5 dc:text-sm dc:font-medium dc:transition-colors ${
|
|
1744
|
-
title:
|
|
1745
|
-
children: [/* @__PURE__ */ G(
|
|
1746
|
-
}),
|
|
1747
|
-
onClick: () =>
|
|
1748
|
-
className: `dc:flex dc:items-center dc:gap-1.5 dc:px-4 dc:py-1.5 dc:text-sm dc:font-medium dc:transition-colors ${
|
|
1733
|
+
onClick: () => kt && y("chart"),
|
|
1734
|
+
disabled: !kt,
|
|
1735
|
+
className: `dc:flex dc:items-center dc:gap-1.5 dc:px-4 dc:py-1.5 dc:text-sm dc:font-medium dc:transition-colors ${v === "chart" ? "bg-dc-primary text-white" : kt ? "text-dc-text-secondary hover:bg-dc-surface-hover" : "text-dc-text-disabled bg-dc-surface-tertiary dc:cursor-not-allowed"}`,
|
|
1736
|
+
title: jt,
|
|
1737
|
+
children: [/* @__PURE__ */ G(Lt, { className: "dc:w-4 dc:h-4" }), Y("results.view.chart")]
|
|
1738
|
+
}), an ? gn() : /* @__PURE__ */ K("button", {
|
|
1739
|
+
onClick: () => y("table"),
|
|
1740
|
+
className: `dc:flex dc:items-center dc:gap-1.5 dc:px-4 dc:py-1.5 dc:text-sm dc:font-medium dc:transition-colors ${v === "table" ? "bg-dc-primary text-white" : "text-dc-text-secondary hover:bg-dc-surface-hover"}`,
|
|
1749
1741
|
title: "Table view",
|
|
1750
|
-
children: [/* @__PURE__ */ G(
|
|
1742
|
+
children: [/* @__PURE__ */ G(It, { className: "dc:w-4 dc:h-4" }), Y("results.view.table")]
|
|
1751
1743
|
})]
|
|
1752
1744
|
})
|
|
1753
|
-
}),
|
|
1745
|
+
}), vn = () => n && n.length > 0 ? /* @__PURE__ */ K("div", {
|
|
1754
1746
|
className: "dc:h-full dc:flex dc:flex-col",
|
|
1755
1747
|
children: [
|
|
1756
|
-
dn(),
|
|
1757
1748
|
fn(),
|
|
1758
1749
|
pn(),
|
|
1750
|
+
mn(),
|
|
1759
1751
|
/* @__PURE__ */ G("div", {
|
|
1760
1752
|
className: "dc:flex-1 dc:min-h-0 dc:relative dc:overflow-auto",
|
|
1761
|
-
children:
|
|
1753
|
+
children: hn()
|
|
1762
1754
|
}),
|
|
1763
|
-
!xe && !Ce &&
|
|
1755
|
+
!xe && !Ce && _n()
|
|
1764
1756
|
]
|
|
1765
1757
|
}) : /* @__PURE__ */ K("div", {
|
|
1766
1758
|
className: "dc:h-full dc:flex dc:flex-col",
|
|
1767
|
-
children: [
|
|
1759
|
+
children: [fn(), /* @__PURE__ */ G("div", {
|
|
1768
1760
|
className: "dc:flex-1 dc:min-h-0 dc:relative dc:overflow-auto",
|
|
1769
1761
|
children: Ce ? /* @__PURE__ */ G(F.Suspense, {
|
|
1770
1762
|
fallback: null,
|
|
@@ -1773,42 +1765,42 @@ var qe = F.lazy(() => import("./schema-visualization-D8Ak7GUd.js").then((e) => e
|
|
|
1773
1765
|
highlightedFields: ve,
|
|
1774
1766
|
onFieldClick: ye
|
|
1775
1767
|
})
|
|
1776
|
-
}) : xe ?
|
|
1768
|
+
}) : xe ? rn() : Kt()
|
|
1777
1769
|
})]
|
|
1778
|
-
}),
|
|
1770
|
+
}), yn = V(() => He(n, Z, Q, J), [
|
|
1779
1771
|
n,
|
|
1780
|
-
X,
|
|
1781
1772
|
Z,
|
|
1782
|
-
|
|
1783
|
-
|
|
1784
|
-
|
|
1773
|
+
Q,
|
|
1774
|
+
J
|
|
1775
|
+
]), bn = yn && (t !== "idle" || Ht);
|
|
1776
|
+
return P && !yn ? /* @__PURE__ */ G("div", {
|
|
1785
1777
|
className: "dc:h-full dc:min-h-[400px] dc:flex dc:flex-col bg-dc-surface dc:relative",
|
|
1786
|
-
children:
|
|
1778
|
+
children: Wt()
|
|
1787
1779
|
}) : /* @__PURE__ */ K("div", {
|
|
1788
1780
|
className: "dc:h-full dc:min-h-[400px] dc:flex dc:flex-col bg-dc-surface dc:relative",
|
|
1789
1781
|
children: [
|
|
1790
1782
|
/* @__PURE__ */ K(W, { children: [
|
|
1791
|
-
t === "idle" && !
|
|
1792
|
-
t === "idle" &&
|
|
1793
|
-
t === "loading" && !
|
|
1794
|
-
t === "error" && !
|
|
1795
|
-
(t === "success" ||
|
|
1783
|
+
t === "idle" && !Ht && Gt(),
|
|
1784
|
+
t === "idle" && Ht && !yn && Ut(),
|
|
1785
|
+
t === "loading" && !yn && zt(),
|
|
1786
|
+
t === "error" && !yn && Bt(),
|
|
1787
|
+
(t === "success" || bn) && vn()
|
|
1796
1788
|
] }),
|
|
1797
|
-
(t === "loading" || t === "refreshing") &&
|
|
1798
|
-
I && /* @__PURE__ */ G(
|
|
1789
|
+
(t === "loading" || t === "refreshing") && yn && cn(),
|
|
1790
|
+
I && /* @__PURE__ */ G(p, {
|
|
1799
1791
|
isOpen: De,
|
|
1800
1792
|
onClose: () => Oe(!1),
|
|
1801
1793
|
onConfirm: () => {
|
|
1802
1794
|
I(), Oe(!1);
|
|
1803
1795
|
},
|
|
1804
|
-
title:
|
|
1805
|
-
message: /* @__PURE__ */ G(W, { children:
|
|
1796
|
+
title: X ? "Clear Funnel" : "Clear Query",
|
|
1797
|
+
message: /* @__PURE__ */ G(W, { children: X ? "Are you sure you want to clear this funnel? This action cannot be undone." : "Are you sure you want to clear this query? This action cannot be undone." }),
|
|
1806
1798
|
confirmText: "Clear",
|
|
1807
1799
|
confirmVariant: "warning"
|
|
1808
1800
|
})
|
|
1809
1801
|
]
|
|
1810
1802
|
});
|
|
1811
|
-
}), Ye = s("chartBar"),
|
|
1803
|
+
}), Ye = s("chartBar"), Xe = s("chartFunnel"), Ze = s("chartSankey"), Qe = s("chartRetention"), $e = [
|
|
1812
1804
|
{
|
|
1813
1805
|
type: "query",
|
|
1814
1806
|
labelKey: "analysis.modes.query.label",
|
|
@@ -1819,22 +1811,22 @@ var qe = F.lazy(() => import("./schema-visualization-D8Ak7GUd.js").then((e) => e
|
|
|
1819
1811
|
type: "funnel",
|
|
1820
1812
|
labelKey: "analysis.modes.funnel.label",
|
|
1821
1813
|
descriptionKey: "analysis.modes.funnel.description",
|
|
1822
|
-
icon:
|
|
1814
|
+
icon: Xe
|
|
1823
1815
|
},
|
|
1824
1816
|
{
|
|
1825
1817
|
type: "flow",
|
|
1826
1818
|
labelKey: "analysis.modes.flow.label",
|
|
1827
1819
|
descriptionKey: "analysis.modes.flow.description",
|
|
1828
|
-
icon:
|
|
1820
|
+
icon: Ze
|
|
1829
1821
|
},
|
|
1830
1822
|
{
|
|
1831
1823
|
type: "retention",
|
|
1832
1824
|
labelKey: "analysis.modes.retention.label",
|
|
1833
1825
|
descriptionKey: "analysis.modes.retention.description",
|
|
1834
|
-
icon:
|
|
1826
|
+
icon: Qe
|
|
1835
1827
|
}
|
|
1836
|
-
],
|
|
1837
|
-
let { t: i } =
|
|
1828
|
+
], et = R(function({ value: e, onChange: t, disabled: n = !1, schema: r }) {
|
|
1829
|
+
let { t: i } = S(), a = V(() => $e.map((e) => ({
|
|
1838
1830
|
...e,
|
|
1839
1831
|
label: i(e.labelKey),
|
|
1840
1832
|
description: i(e.descriptionKey)
|
|
@@ -1866,7 +1858,7 @@ var qe = F.lazy(() => import("./schema-visualization-D8Ak7GUd.js").then((e) => e
|
|
|
1866
1858
|
})
|
|
1867
1859
|
})
|
|
1868
1860
|
});
|
|
1869
|
-
}),
|
|
1861
|
+
}), tt = [
|
|
1870
1862
|
{
|
|
1871
1863
|
value: "hour",
|
|
1872
1864
|
label: "timeGranularity.hour"
|
|
@@ -1894,19 +1886,19 @@ var qe = F.lazy(() => import("./schema-visualization-D8Ak7GUd.js").then((e) => e
|
|
|
1894
1886
|
];
|
|
1895
1887
|
//#endregion
|
|
1896
1888
|
//#region src/client/components/AnalysisBuilder/SortToggleButton.tsx
|
|
1897
|
-
function
|
|
1889
|
+
function nt(e) {
|
|
1898
1890
|
switch (e) {
|
|
1899
1891
|
case "asc": return "Sorted ascending (click for descending)";
|
|
1900
1892
|
case "desc": return "Sorted descending (click to remove)";
|
|
1901
1893
|
default: return "Click to sort ascending";
|
|
1902
1894
|
}
|
|
1903
1895
|
}
|
|
1904
|
-
var
|
|
1896
|
+
var rt = R(function({ sortDirection: e, sortPriority: t, onToggleSort: n }) {
|
|
1905
1897
|
let r = s("chevronUp"), i = s("chevronDown"), a = s("chevronUpDown"), o;
|
|
1906
1898
|
return o = e === "asc" ? r ? /* @__PURE__ */ G(r, { className: "dc:w-4 dc:h-4" }) : "↑" : e === "desc" ? i ? /* @__PURE__ */ G(i, { className: "dc:w-4 dc:h-4" }) : "↓" : a ? /* @__PURE__ */ G(a, { className: "dc:w-4 dc:h-4" }) : "⇅", /* @__PURE__ */ K("button", {
|
|
1907
1899
|
onClick: n,
|
|
1908
1900
|
className: `dc:p-1 dc:transition-opacity dc:flex-shrink-0 dc:flex dc:items-center dc:gap-0.5 ${e ? "dc:opacity-100 text-dc-primary" : "dc:opacity-100 dc:sm:opacity-0 dc:sm:group-hover:opacity-100 text-dc-text-muted hover:text-dc-primary"}`,
|
|
1909
|
-
title:
|
|
1901
|
+
title: nt(e),
|
|
1910
1902
|
children: [o, e && t && /* @__PURE__ */ K("span", {
|
|
1911
1903
|
className: "dc:text-xs dc:font-medium",
|
|
1912
1904
|
children: [
|
|
@@ -1916,7 +1908,7 @@ var nt = R(function({ sortDirection: e, sortPriority: t, onToggleSort: n }) {
|
|
|
1916
1908
|
]
|
|
1917
1909
|
})]
|
|
1918
1910
|
});
|
|
1919
|
-
}),
|
|
1911
|
+
}), it = R(function({ enableComparison: e, comparisonDisabled: t, onComparisonToggle: n }) {
|
|
1920
1912
|
let r = t && !e, i;
|
|
1921
1913
|
return i = r ? "Another time dimension already has comparison enabled" : e ? "Click to disable comparison" : "Compare with previous period", /* @__PURE__ */ G("button", {
|
|
1922
1914
|
onClick: (e) => {
|
|
@@ -1927,13 +1919,13 @@ var nt = R(function({ sortDirection: e, sortPriority: t, onToggleSort: n }) {
|
|
|
1927
1919
|
title: i,
|
|
1928
1920
|
children: "vs prior"
|
|
1929
1921
|
});
|
|
1930
|
-
}),
|
|
1931
|
-
let { t: m } =
|
|
1922
|
+
}), at = R(function({ breakdown: e, fieldMeta: t, onRemove: n, onGranularityChange: r, onComparisonToggle: i, comparisonDisabled: a, sortDirection: o, sortPriority: c, onToggleSort: l, index: u, isDragging: d, onDragStart: f, onDragEnd: p }) {
|
|
1923
|
+
let { t: m } = S(), h = s("dimension"), g = s("timeDimension"), _ = s("close"), v = t?.shortTitle || t?.title || e.field.split(".").pop() || e.field, y = e.field.split(".")[0], b = e.isTimeDimension ? g : h, x = typeof u == "number" && f && p;
|
|
1932
1924
|
return /* @__PURE__ */ K("div", {
|
|
1933
|
-
className: `dc:flex dc:items-center dc:gap-2 dc:p-2 bg-dc-surface-secondary dc:rounded-lg dc:group hover:bg-dc-surface-tertiary dc:transition-all dc:duration-150 ${
|
|
1934
|
-
draggable:
|
|
1935
|
-
onDragStart:
|
|
1936
|
-
onDragEnd:
|
|
1925
|
+
className: `dc:flex dc:items-center dc:gap-2 dc:p-2 bg-dc-surface-secondary dc:rounded-lg dc:group hover:bg-dc-surface-tertiary dc:transition-all dc:duration-150 ${x ? "dc:cursor-grab dc:active:cursor-grabbing" : ""} ${d ? "dc:opacity-30" : ""}`,
|
|
1926
|
+
draggable: x ? !0 : void 0,
|
|
1927
|
+
onDragStart: x ? (e) => f(e, u) : void 0,
|
|
1928
|
+
onDragEnd: x ? p : void 0,
|
|
1937
1929
|
children: [
|
|
1938
1930
|
/* @__PURE__ */ G("span", {
|
|
1939
1931
|
className: `dc:w-6 dc:h-6 dc:flex dc:items-center dc:justify-center dc:rounded-sm dc:flex-shrink-0 ${e.isTimeDimension ? "bg-dc-time-dimension text-dc-time-dimension-text" : "bg-dc-dimension text-dc-dimension-text"}`,
|
|
@@ -1955,17 +1947,17 @@ var nt = R(function({ sortDirection: e, sortPriority: t, onToggleSort: n }) {
|
|
|
1955
1947
|
onChange: (e) => r(e.target.value),
|
|
1956
1948
|
onClick: (e) => e.stopPropagation(),
|
|
1957
1949
|
className: "dc:text-xs bg-dc-surface dc:border border-dc-border dc:rounded-sm dc:px-2 dc:py-1 text-dc-text dc:focus:outline-none dc:focus:ring-1 focus:ring-dc-primary dc:flex-shrink-0",
|
|
1958
|
-
children:
|
|
1950
|
+
children: tt.map((e) => /* @__PURE__ */ G("option", {
|
|
1959
1951
|
value: e.value,
|
|
1960
1952
|
children: m(e.label)
|
|
1961
1953
|
}, e.value))
|
|
1962
1954
|
}),
|
|
1963
|
-
e.isTimeDimension && i && /* @__PURE__ */ G(
|
|
1955
|
+
e.isTimeDimension && i && /* @__PURE__ */ G(it, {
|
|
1964
1956
|
enableComparison: e.enableComparison,
|
|
1965
1957
|
comparisonDisabled: a,
|
|
1966
1958
|
onComparisonToggle: i
|
|
1967
1959
|
}),
|
|
1968
|
-
l && /* @__PURE__ */ G(
|
|
1960
|
+
l && /* @__PURE__ */ G(rt, {
|
|
1969
1961
|
sortDirection: o,
|
|
1970
1962
|
sortPriority: c,
|
|
1971
1963
|
onToggleSort: l
|
|
@@ -1978,8 +1970,8 @@ var nt = R(function({ sortDirection: e, sortPriority: t, onToggleSort: n }) {
|
|
|
1978
1970
|
})
|
|
1979
1971
|
]
|
|
1980
1972
|
});
|
|
1981
|
-
}),
|
|
1982
|
-
let { t: a } =
|
|
1973
|
+
}), ot = s("chevronDown"), st = s("check"), ct = s("search"), lt = R(function({ bindingKey: e, onChange: t, schema: n, disabled: r = !1, className: i = "" }) {
|
|
1974
|
+
let { t: a } = S(), [o, s] = U(!1), [c, l] = U(""), u = H(null), d = H(null), f = V(() => N(n), [n]), p = V(() => {
|
|
1983
1975
|
let e = {};
|
|
1984
1976
|
for (let t of f) e[t.cube] || (e[t.cube] = []), e[t.cube].push(t);
|
|
1985
1977
|
return e;
|
|
@@ -2034,7 +2026,7 @@ var nt = R(function({ sortDirection: e, sortPriority: t, onToggleSort: n }) {
|
|
|
2034
2026
|
className: "dc:p-0.5 dc:rounded-sm hover:bg-dc-surface-hover text-dc-text-muted hover:text-dc-text",
|
|
2035
2027
|
title: a("funnel.bindingKey.clearTitle"),
|
|
2036
2028
|
children: "×"
|
|
2037
|
-
}),
|
|
2029
|
+
}), ot && /* @__PURE__ */ G(ot, { className: `dc:w-4 dc:h-4 text-dc-text-muted dc:transition-transform ${o ? "dc:rotate-180" : ""}` })]
|
|
2038
2030
|
})]
|
|
2039
2031
|
}), o && /* @__PURE__ */ K("div", {
|
|
2040
2032
|
className: "dc:absolute dc:z-50 dc:mt-1 dc:right-0 dc:w-[280px] bg-dc-surface dc:border border-dc-border dc:rounded-md dc:shadow-lg",
|
|
@@ -2043,7 +2035,7 @@ var nt = R(function({ sortDirection: e, sortPriority: t, onToggleSort: n }) {
|
|
|
2043
2035
|
className: "dc:p-2 dc:border-b border-dc-border",
|
|
2044
2036
|
children: /* @__PURE__ */ K("div", {
|
|
2045
2037
|
className: "dc:relative",
|
|
2046
|
-
children: [
|
|
2038
|
+
children: [ct && /* @__PURE__ */ G(ct, { className: "dc:absolute dc:left-2 dc:top-1/2 dc:-translate-y-1/2 dc:w-4 dc:h-4 text-dc-text-muted" }), /* @__PURE__ */ G("input", {
|
|
2047
2039
|
ref: d,
|
|
2048
2040
|
type: "text",
|
|
2049
2041
|
value: c,
|
|
@@ -2070,7 +2062,7 @@ var nt = R(function({ sortDirection: e, sortPriority: t, onToggleSort: n }) {
|
|
|
2070
2062
|
dc:rounded-sm dc:transition-colors
|
|
2071
2063
|
${_(e.dimension) ? "bg-dc-primary-bg text-dc-primary" : "text-dc-text hover:bg-dc-surface-hover"}
|
|
2072
2064
|
`,
|
|
2073
|
-
children: [/* @__PURE__ */ G("span", { children: e.label }), _(e.dimension) &&
|
|
2065
|
+
children: [/* @__PURE__ */ G("span", { children: e.label }), _(e.dimension) && st && /* @__PURE__ */ G(st, { className: "dc:w-4 dc:h-4" })]
|
|
2074
2066
|
}, e.dimension))]
|
|
2075
2067
|
}, e))
|
|
2076
2068
|
}),
|
|
@@ -2082,8 +2074,8 @@ var nt = R(function({ sortDirection: e, sortPriority: t, onToggleSort: n }) {
|
|
|
2082
2074
|
})]
|
|
2083
2075
|
})
|
|
2084
2076
|
});
|
|
2085
|
-
}),
|
|
2086
|
-
function
|
|
2077
|
+
}), ut = s("chevronDown"), dt = s("chevronRight"), ft = s("check"), pt = s("search"), mt = s("dimension"), ht = s("link"), gt = s("timeDimension");
|
|
2078
|
+
function _t(e) {
|
|
2087
2079
|
return e?.cubes ? e.cubes.filter((e) => e.meta?.eventStream).map((e) => ({
|
|
2088
2080
|
cube: e.name,
|
|
2089
2081
|
dimension: e.name,
|
|
@@ -2091,7 +2083,7 @@ function gt(e) {
|
|
|
2091
2083
|
eventStream: e.meta?.eventStream
|
|
2092
2084
|
})) : [];
|
|
2093
2085
|
}
|
|
2094
|
-
function
|
|
2086
|
+
function vt(e) {
|
|
2095
2087
|
if (!e?.cubes) return [];
|
|
2096
2088
|
let t = [];
|
|
2097
2089
|
for (let n of e.cubes) for (let e of n.dimensions || []) e.type === "time" && t.push({
|
|
@@ -2101,7 +2093,7 @@ function _t(e) {
|
|
|
2101
2093
|
});
|
|
2102
2094
|
return t;
|
|
2103
2095
|
}
|
|
2104
|
-
var
|
|
2096
|
+
var yt = R(function({ value: e, label: t, placeholder: n, icon: r, options: i, onChange: a, helpText: o }) {
|
|
2105
2097
|
let [s, c] = U(!1), [l, u] = U(""), d = H(null), f = H(null), p = V(() => {
|
|
2106
2098
|
let e = {};
|
|
2107
2099
|
for (let t of i) e[t.cube] || (e[t.cube] = []), e[t.cube].push(t);
|
|
@@ -2158,7 +2150,7 @@ var vt = R(function({ value: e, label: t, placeholder: n, icon: r, options: i, o
|
|
|
2158
2150
|
className: "dc:p-0.5 dc:rounded-sm hover:bg-dc-surface-hover text-dc-text-muted hover:text-dc-text",
|
|
2159
2151
|
title: "Clear",
|
|
2160
2152
|
children: "×"
|
|
2161
|
-
}),
|
|
2153
|
+
}), ut && /* @__PURE__ */ G(ut, { className: `dc:w-4 dc:h-4 text-dc-text-muted dc:transition-transform ${s ? "dc:rotate-180" : ""}` })]
|
|
2162
2154
|
})]
|
|
2163
2155
|
}), s && /* @__PURE__ */ K("div", {
|
|
2164
2156
|
className: "dc:absolute dc:z-50 dc:mt-1 dc:left-0 dc:right-0 dc:min-w-[200px] bg-dc-surface dc:border border-dc-border dc:rounded-md dc:shadow-lg",
|
|
@@ -2167,7 +2159,7 @@ var vt = R(function({ value: e, label: t, placeholder: n, icon: r, options: i, o
|
|
|
2167
2159
|
className: "dc:p-2 dc:border-b border-dc-border",
|
|
2168
2160
|
children: /* @__PURE__ */ K("div", {
|
|
2169
2161
|
className: "dc:relative",
|
|
2170
|
-
children: [
|
|
2162
|
+
children: [pt && /* @__PURE__ */ G(pt, { className: "dc:absolute dc:left-2 dc:top-1/2 dc:-translate-y-1/2 dc:w-4 dc:h-4 text-dc-text-muted" }), /* @__PURE__ */ G("input", {
|
|
2171
2163
|
ref: f,
|
|
2172
2164
|
type: "text",
|
|
2173
2165
|
value: l,
|
|
@@ -2194,7 +2186,7 @@ var vt = R(function({ value: e, label: t, placeholder: n, icon: r, options: i, o
|
|
|
2194
2186
|
dc:rounded-sm dc:transition-colors
|
|
2195
2187
|
${e === t.dimension ? "bg-dc-primary-bg text-dc-primary" : "text-dc-text hover:bg-dc-surface-hover"}
|
|
2196
2188
|
`,
|
|
2197
|
-
children: [/* @__PURE__ */ G("span", { children: t.label }), e === t.dimension &&
|
|
2189
|
+
children: [/* @__PURE__ */ G("span", { children: t.label }), e === t.dimension && ft && /* @__PURE__ */ G(ft, { className: "dc:w-4 dc:h-4" })]
|
|
2198
2190
|
}, t.dimension))]
|
|
2199
2191
|
}, t))
|
|
2200
2192
|
}),
|
|
@@ -2206,12 +2198,12 @@ var vt = R(function({ value: e, label: t, placeholder: n, icon: r, options: i, o
|
|
|
2206
2198
|
})]
|
|
2207
2199
|
})]
|
|
2208
2200
|
});
|
|
2209
|
-
}),
|
|
2210
|
-
let { t: s } =
|
|
2211
|
-
let t =
|
|
2201
|
+
}), bt = R(function({ selectedCube: e, bindingKey: t, timeDimension: n, schema: r, onCubeChange: i, onBindingKeyChange: a, onTimeDimensionChange: o }) {
|
|
2202
|
+
let { t: s } = S(), c = V(() => _t(r), [r]), l = V(() => {
|
|
2203
|
+
let t = N(r);
|
|
2212
2204
|
return e ? t.filter((t) => t.cube === e) : [];
|
|
2213
2205
|
}, [r, e]), u = V(() => {
|
|
2214
|
-
let t =
|
|
2206
|
+
let t = vt(r);
|
|
2215
2207
|
return e ? t.filter((t) => t.cube === e) : [];
|
|
2216
2208
|
}, [r, e]), d = !!(e && t && n), [f, p] = U(!1), m = H(!1);
|
|
2217
2209
|
B(() => {
|
|
@@ -2243,14 +2235,14 @@ var vt = R(function({ value: e, label: t, placeholder: n, icon: r, options: i, o
|
|
|
2243
2235
|
children: [/* @__PURE__ */ K("div", {
|
|
2244
2236
|
className: "dc:flex dc:items-center dc:gap-2",
|
|
2245
2237
|
children: [
|
|
2246
|
-
f ?
|
|
2238
|
+
f ? dt && /* @__PURE__ */ G(dt, { className: "dc:w-4 dc:h-4 text-dc-text-muted" }) : ut && /* @__PURE__ */ G(ut, { className: "dc:w-4 dc:h-4 text-dc-text-muted" }),
|
|
2247
2239
|
/* @__PURE__ */ G(P, {
|
|
2248
2240
|
className: "dc:mb-0",
|
|
2249
2241
|
children: s("funnel.config.configuration")
|
|
2250
2242
|
}),
|
|
2251
2243
|
d && /* @__PURE__ */ G("span", {
|
|
2252
2244
|
className: "dc:flex dc:items-center dc:gap-1 dc:text-xs text-dc-success",
|
|
2253
|
-
children:
|
|
2245
|
+
children: ft && /* @__PURE__ */ G(ft, { className: "dc:w-3.5 dc:h-3.5" })
|
|
2254
2246
|
})
|
|
2255
2247
|
]
|
|
2256
2248
|
}), f && d && /* @__PURE__ */ G("span", {
|
|
@@ -2260,29 +2252,29 @@ var vt = R(function({ value: e, label: t, placeholder: n, icon: r, options: i, o
|
|
|
2260
2252
|
}), !f && /* @__PURE__ */ K("div", {
|
|
2261
2253
|
className: "dc:flex dc:flex-col dc:gap-3 dc:px-4 dc:pb-3",
|
|
2262
2254
|
children: [
|
|
2263
|
-
/* @__PURE__ */ G(
|
|
2255
|
+
/* @__PURE__ */ G(yt, {
|
|
2264
2256
|
value: e,
|
|
2265
2257
|
label: "Cube",
|
|
2266
2258
|
placeholder: "Select event stream cube",
|
|
2267
|
-
icon:
|
|
2259
|
+
icon: mt,
|
|
2268
2260
|
options: c,
|
|
2269
2261
|
onChange: i,
|
|
2270
2262
|
helpText: "Select a cube configured for funnel analysis"
|
|
2271
2263
|
}),
|
|
2272
|
-
/* @__PURE__ */ G(
|
|
2264
|
+
/* @__PURE__ */ G(yt, {
|
|
2273
2265
|
value: h,
|
|
2274
2266
|
label: "Binding Key",
|
|
2275
2267
|
placeholder: e ? "Select binding key" : "Select cube first",
|
|
2276
|
-
icon:
|
|
2268
|
+
icon: ht,
|
|
2277
2269
|
options: l,
|
|
2278
2270
|
onChange: g,
|
|
2279
2271
|
helpText: "Entity that connects steps (e.g., user ID, order ID)"
|
|
2280
2272
|
}),
|
|
2281
|
-
/* @__PURE__ */ G(
|
|
2273
|
+
/* @__PURE__ */ G(yt, {
|
|
2282
2274
|
value: n,
|
|
2283
2275
|
label: "Time Dimension",
|
|
2284
2276
|
placeholder: e ? "Select time dimension" : "Select cube first",
|
|
2285
|
-
icon:
|
|
2277
|
+
icon: gt,
|
|
2286
2278
|
options: u,
|
|
2287
2279
|
onChange: o,
|
|
2288
2280
|
helpText: "Timestamp field for step ordering"
|
|
@@ -2290,7 +2282,7 @@ var vt = R(function({ value: e, label: t, placeholder: n, icon: r, options: i, o
|
|
|
2290
2282
|
]
|
|
2291
2283
|
})]
|
|
2292
2284
|
});
|
|
2293
|
-
}),
|
|
2285
|
+
}), xt = s("menu"), St = s("close"), Ct = s("chevronDown"), wt = s("check"), Tt = s("timeDimension"), Et = [
|
|
2294
2286
|
{
|
|
2295
2287
|
value: null,
|
|
2296
2288
|
label: "No limit"
|
|
@@ -2331,8 +2323,8 @@ var vt = R(function({ value: e, label: t, placeholder: n, icon: r, options: i, o
|
|
|
2331
2323
|
value: "P90D",
|
|
2332
2324
|
label: "90 days"
|
|
2333
2325
|
}
|
|
2334
|
-
],
|
|
2335
|
-
let { t: c } =
|
|
2326
|
+
], Dt = R(function({ step: e, stepIndex: t, isActive: n, canRemove: r, schema: i, onSelect: a, onRemove: o, onUpdate: s }) {
|
|
2327
|
+
let { t: c } = S(), [l, u] = U(!1), [f, p] = U(!1), [m, h] = U(e.name), g = H(null), _ = H(null);
|
|
2336
2328
|
B(() => {
|
|
2337
2329
|
h(e.name);
|
|
2338
2330
|
}, [e.name]), B(() => {
|
|
@@ -2346,26 +2338,26 @@ var vt = R(function({ value: e, label: t, placeholder: n, icon: r, options: i, o
|
|
|
2346
2338
|
let v = z((e) => {
|
|
2347
2339
|
h(e.target.value);
|
|
2348
2340
|
}, []), y = z((t) => {
|
|
2349
|
-
t.key === "Enter" ? t.currentTarget.blur() : t.key === "Escape" && (h(e.name),
|
|
2341
|
+
t.key === "Enter" ? t.currentTarget.blur() : t.key === "Escape" && (h(e.name), u(!1));
|
|
2350
2342
|
}, [e.name]), b = z(() => {
|
|
2351
2343
|
let n = m.trim();
|
|
2352
|
-
n !== e.name && s({ name: n || `Step ${t + 1}` }),
|
|
2344
|
+
n !== e.name && s({ name: n || `Step ${t + 1}` }), u(!1);
|
|
2353
2345
|
}, [
|
|
2354
2346
|
m,
|
|
2355
2347
|
e.name,
|
|
2356
2348
|
s,
|
|
2357
2349
|
t
|
|
2358
|
-
]),
|
|
2350
|
+
]), x = z((e) => {
|
|
2359
2351
|
s({ timeToConvert: e || void 0 }), p(!1);
|
|
2360
2352
|
}, [s]), C = z((e) => {
|
|
2361
2353
|
s({ filters: e });
|
|
2362
|
-
}, [s]), w = e.timeToConvert ?
|
|
2354
|
+
}, [s]), w = e.timeToConvert ? Et.find((t) => t.value === e.timeToConvert)?.label || e.timeToConvert : "No limit", T = V(() => {
|
|
2363
2355
|
if (!i) return null;
|
|
2364
2356
|
let t = { cubes: i.cubes.map((e) => ({
|
|
2365
2357
|
...e,
|
|
2366
2358
|
description: e.description || ""
|
|
2367
2359
|
})) };
|
|
2368
|
-
return e.cube ?
|
|
2360
|
+
return e.cube ? d(e.cube, t) : t;
|
|
2369
2361
|
}, [i, e.cube]);
|
|
2370
2362
|
return /* @__PURE__ */ K("div", {
|
|
2371
2363
|
className: `
|
|
@@ -2379,7 +2371,7 @@ var vt = R(function({ value: e, label: t, placeholder: n, icon: r, options: i, o
|
|
|
2379
2371
|
children: [
|
|
2380
2372
|
/* @__PURE__ */ G("div", {
|
|
2381
2373
|
className: "dc:cursor-grab dc:active:cursor-grabbing text-dc-text-muted hover:text-dc-text",
|
|
2382
|
-
children:
|
|
2374
|
+
children: xt && /* @__PURE__ */ G(xt, { className: "dc:w-4 dc:h-4" })
|
|
2383
2375
|
}),
|
|
2384
2376
|
/* @__PURE__ */ G("span", {
|
|
2385
2377
|
className: "dc:flex-shrink-0 dc:w-6 dc:h-6 dc:flex dc:items-center dc:justify-center dc:rounded-full bg-dc-primary/10 text-dc-primary dc:text-xs dc:font-medium",
|
|
@@ -2397,7 +2389,7 @@ var vt = R(function({ value: e, label: t, placeholder: n, icon: r, options: i, o
|
|
|
2397
2389
|
placeholder: "Step name"
|
|
2398
2390
|
}) : /* @__PURE__ */ G("button", {
|
|
2399
2391
|
onClick: (e) => {
|
|
2400
|
-
e.stopPropagation(),
|
|
2392
|
+
e.stopPropagation(), u(!0);
|
|
2401
2393
|
},
|
|
2402
2394
|
className: "dc:flex-1 dc:text-left dc:text-sm dc:font-medium text-dc-text hover:text-dc-primary dc:truncate",
|
|
2403
2395
|
title: "Click to edit name",
|
|
@@ -2409,21 +2401,21 @@ var vt = R(function({ value: e, label: t, placeholder: n, icon: r, options: i, o
|
|
|
2409
2401
|
},
|
|
2410
2402
|
className: "dc:p-1 dc:rounded-sm hover:bg-dc-danger-bg text-dc-text-muted hover:text-dc-error dc:transition-colors",
|
|
2411
2403
|
title: "Remove step",
|
|
2412
|
-
children:
|
|
2404
|
+
children: St && /* @__PURE__ */ G(St, { className: "dc:w-4 dc:h-4" })
|
|
2413
2405
|
})
|
|
2414
2406
|
]
|
|
2415
2407
|
}),
|
|
2416
2408
|
n && /* @__PURE__ */ K("div", {
|
|
2417
2409
|
className: "dc:px-3 dc:py-3 dc:space-y-4",
|
|
2418
2410
|
onClick: (e) => e.stopPropagation(),
|
|
2419
|
-
children: [/* @__PURE__ */ G(
|
|
2411
|
+
children: [/* @__PURE__ */ G(D, {
|
|
2420
2412
|
filters: e.filters,
|
|
2421
2413
|
schema: T,
|
|
2422
2414
|
onFiltersChange: C,
|
|
2423
2415
|
dimensionsOnly: !0
|
|
2424
2416
|
}), t > 0 && /* @__PURE__ */ K("div", { children: [/* @__PURE__ */ K("label", {
|
|
2425
2417
|
className: "dc:flex dc:items-center dc:gap-1.5 dc:text-xs dc:font-medium text-dc-text-muted dc:mb-1",
|
|
2426
|
-
children: [
|
|
2418
|
+
children: [Tt && /* @__PURE__ */ G(Tt, { className: "dc:w-3.5 dc:h-3.5" }), c("funnel.step.timeWindow")]
|
|
2427
2419
|
}), /* @__PURE__ */ K("div", {
|
|
2428
2420
|
ref: _,
|
|
2429
2421
|
className: "dc:relative",
|
|
@@ -2439,17 +2431,17 @@ var vt = R(function({ value: e, label: t, placeholder: n, icon: r, options: i, o
|
|
|
2439
2431
|
children: [/* @__PURE__ */ G("span", {
|
|
2440
2432
|
className: e.timeToConvert ? "text-dc-text" : "text-dc-text-muted",
|
|
2441
2433
|
children: w
|
|
2442
|
-
}),
|
|
2434
|
+
}), Ct && /* @__PURE__ */ G(Ct, { className: `dc:w-4 dc:h-4 text-dc-text-muted dc:transition-transform ${f ? "dc:rotate-180" : ""}` })]
|
|
2443
2435
|
}), f && /* @__PURE__ */ K("div", {
|
|
2444
2436
|
className: "dc:absolute dc:z-50 dc:mt-1 dc:left-0 dc:right-0 bg-dc-surface dc:border border-dc-border dc:rounded-md dc:shadow-lg dc:max-h-48 dc:overflow-y-auto",
|
|
2445
|
-
children: [
|
|
2446
|
-
onClick: () =>
|
|
2437
|
+
children: [Et.map((t) => /* @__PURE__ */ K("button", {
|
|
2438
|
+
onClick: () => x(t.value),
|
|
2447
2439
|
className: `
|
|
2448
2440
|
dc:flex dc:items-center dc:justify-between dc:w-full dc:px-3 dc:py-1.5 dc:text-sm
|
|
2449
2441
|
dc:transition-colors
|
|
2450
2442
|
${e.timeToConvert === t.value || !e.timeToConvert && t.value === null ? "bg-dc-primary-bg text-dc-primary" : "text-dc-text hover:bg-dc-surface-hover"}
|
|
2451
2443
|
`,
|
|
2452
|
-
children: [/* @__PURE__ */ G("span", { children: t.label }), (e.timeToConvert === t.value || !e.timeToConvert && t.value === null) &&
|
|
2444
|
+
children: [/* @__PURE__ */ G("span", { children: t.label }), (e.timeToConvert === t.value || !e.timeToConvert && t.value === null) && wt && /* @__PURE__ */ G(wt, { className: "dc:w-4 dc:h-4" })]
|
|
2453
2445
|
}, t.value || "none")), /* @__PURE__ */ G("div", {
|
|
2454
2446
|
className: "dc:px-3 dc:py-2 dc:border-t border-dc-border dc:text-xs text-dc-text-muted",
|
|
2455
2447
|
children: c("funnel.step.timeWindowHelp")
|
|
@@ -2481,8 +2473,8 @@ var vt = R(function({ value: e, label: t, placeholder: n, icon: r, options: i, o
|
|
|
2481
2473
|
})
|
|
2482
2474
|
]
|
|
2483
2475
|
});
|
|
2484
|
-
}),
|
|
2485
|
-
let { t: c } =
|
|
2476
|
+
}), Ot = s("add"), kt = R(function({ steps: e, activeStepIndex: t, schema: n, onAddStep: r, onRemoveStep: i, onUpdateStep: a, onSelectStep: o, onReorderSteps: s }) {
|
|
2477
|
+
let { t: c } = S(), [l, u] = U(null), [d, f] = U(null), p = z((e) => {
|
|
2486
2478
|
u(e);
|
|
2487
2479
|
}, []), m = z((e, t) => {
|
|
2488
2480
|
e.preventDefault(), l !== null && l !== t && f(t);
|
|
@@ -2515,7 +2507,7 @@ var vt = R(function({ value: e, label: t, placeholder: n, icon: r, options: i, o
|
|
|
2515
2507
|
}), /* @__PURE__ */ K("button", {
|
|
2516
2508
|
onClick: r,
|
|
2517
2509
|
className: "dc:inline-flex dc:items-center dc:gap-1.5 dc:px-3 dc:py-1.5 dc:text-sm dc:font-medium text-dc-primary bg-dc-primary/10 dc:rounded-md hover:bg-dc-primary/20 dc:transition-colors",
|
|
2518
|
-
children: [/* @__PURE__ */ G(
|
|
2510
|
+
children: [/* @__PURE__ */ G(Ot, { className: "dc:w-4 dc:h-4" }), c("funnel.steps.addFirst")]
|
|
2519
2511
|
})]
|
|
2520
2512
|
}) : /* @__PURE__ */ G("div", {
|
|
2521
2513
|
className: "dc:space-y-2",
|
|
@@ -2527,7 +2519,7 @@ var vt = R(function({ value: e, label: t, placeholder: n, icon: r, options: i, o
|
|
|
2527
2519
|
onDrop: (e) => g(e, s),
|
|
2528
2520
|
onDragEnd: _,
|
|
2529
2521
|
className: `dc:transition-all ${l === s ? "dc:opacity-50" : ""} ${d === s ? "dc:border-t-2 border-dc-primary dc:pt-1" : ""}`,
|
|
2530
|
-
children: /* @__PURE__ */ G(
|
|
2522
|
+
children: /* @__PURE__ */ G(Dt, {
|
|
2531
2523
|
step: r,
|
|
2532
2524
|
stepIndex: s,
|
|
2533
2525
|
isActive: s === t,
|
|
@@ -2542,7 +2534,7 @@ var vt = R(function({ value: e, label: t, placeholder: n, icon: r, options: i, o
|
|
|
2542
2534
|
e.length > 0 && /* @__PURE__ */ K("button", {
|
|
2543
2535
|
onClick: r,
|
|
2544
2536
|
className: "dc:flex dc:items-center dc:justify-center dc:gap-1.5 dc:w-full dc:py-2 dc:text-sm dc:font-medium text-dc-text-secondary bg-dc-surface dc:border-2 dc:border-dashed border-dc-border dc:rounded-lg hover:border-dc-primary hover:text-dc-primary hover:bg-dc-primary/5 dc:transition-colors",
|
|
2545
|
-
children: [/* @__PURE__ */ G(
|
|
2537
|
+
children: [/* @__PURE__ */ G(Ot, { className: "dc:w-4 dc:h-4" }), c("funnel.steps.addStep")]
|
|
2546
2538
|
}),
|
|
2547
2539
|
e.length === 1 && /* @__PURE__ */ G("p", {
|
|
2548
2540
|
className: "dc:text-xs text-dc-warning dc:text-center",
|
|
@@ -2550,8 +2542,8 @@ var vt = R(function({ value: e, label: t, placeholder: n, icon: r, options: i, o
|
|
|
2550
2542
|
})
|
|
2551
2543
|
]
|
|
2552
2544
|
});
|
|
2553
|
-
}),
|
|
2554
|
-
let { t: y } =
|
|
2545
|
+
}), At = R(function({ funnelCube: e, funnelSteps: t, activeFunnelStepIndex: n, funnelTimeDimension: r, funnelBindingKey: i, schema: a, onCubeChange: o, onAddStep: s, onRemoveStep: c, onUpdateStep: l, onSelectStep: u, onReorderSteps: d, onTimeDimensionChange: f, onBindingKeyChange: p, chartType: h = "funnel", displayConfig: g, colorPalette: _, onDisplayConfigChange: v }) {
|
|
2546
|
+
let { t: y } = S(), [b, x] = U("steps"), C = g && v;
|
|
2555
2547
|
return /* @__PURE__ */ K("div", {
|
|
2556
2548
|
className: "dc:flex dc:flex-col dc:h-full",
|
|
2557
2549
|
children: [/* @__PURE__ */ G("div", {
|
|
@@ -2559,11 +2551,11 @@ var vt = R(function({ value: e, label: t, placeholder: n, icon: r, options: i, o
|
|
|
2559
2551
|
children: /* @__PURE__ */ K("div", {
|
|
2560
2552
|
className: "dc:flex dc:min-w-max",
|
|
2561
2553
|
children: [/* @__PURE__ */ G("button", {
|
|
2562
|
-
onClick: () =>
|
|
2554
|
+
onClick: () => x("steps"),
|
|
2563
2555
|
className: `dc:flex-1 dc:px-4 dc:py-3 dc:text-sm dc:font-medium dc:transition-colors dc:whitespace-nowrap ${b === "steps" ? "text-dc-primary dc:border-b-2 border-dc-primary" : "text-dc-text-secondary hover:text-dc-text"}`,
|
|
2564
2556
|
children: y("funnel.tabs.steps")
|
|
2565
2557
|
}), /* @__PURE__ */ G("button", {
|
|
2566
|
-
onClick: () => C &&
|
|
2558
|
+
onClick: () => C && x("display"),
|
|
2567
2559
|
disabled: !C,
|
|
2568
2560
|
className: `dc:flex-1 dc:px-4 dc:py-3 dc:text-sm dc:font-medium dc:transition-colors dc:whitespace-nowrap ${b === "display" ? "text-dc-primary dc:border-b-2 border-dc-primary" : C ? "text-dc-text-secondary hover:text-dc-text" : "text-dc-text-muted dc:cursor-not-allowed dc:opacity-50"}`,
|
|
2569
2561
|
title: y(C ? "funnel.tabs.displayTitle" : "funnel.tabs.displayUnavailable"),
|
|
@@ -2572,17 +2564,17 @@ var vt = R(function({ value: e, label: t, placeholder: n, icon: r, options: i, o
|
|
|
2572
2564
|
})
|
|
2573
2565
|
}), b === "steps" ? /* @__PURE__ */ K("div", {
|
|
2574
2566
|
className: "dc:flex dc:flex-col dc:flex-1 dc:min-h-0",
|
|
2575
|
-
children: [/* @__PURE__ */ G(
|
|
2567
|
+
children: [/* @__PURE__ */ G(bt, {
|
|
2576
2568
|
selectedCube: e,
|
|
2577
2569
|
bindingKey: i,
|
|
2578
2570
|
timeDimension: r,
|
|
2579
2571
|
schema: a,
|
|
2580
2572
|
onCubeChange: o,
|
|
2581
|
-
onBindingKeyChange:
|
|
2573
|
+
onBindingKeyChange: p,
|
|
2582
2574
|
onTimeDimensionChange: f
|
|
2583
2575
|
}), /* @__PURE__ */ G("div", {
|
|
2584
2576
|
className: "dc:flex-1 dc:min-h-0 dc:overflow-auto dc:p-4 dc:pb-24",
|
|
2585
|
-
children: /* @__PURE__ */ G(
|
|
2577
|
+
children: /* @__PURE__ */ G(kt, {
|
|
2586
2578
|
steps: t,
|
|
2587
2579
|
activeStepIndex: n,
|
|
2588
2580
|
schema: a,
|
|
@@ -2595,7 +2587,7 @@ var vt = R(function({ value: e, label: t, placeholder: n, icon: r, options: i, o
|
|
|
2595
2587
|
})]
|
|
2596
2588
|
}) : b === "display" && g && v ? /* @__PURE__ */ G("div", {
|
|
2597
2589
|
className: "dc:flex-1 dc:min-h-0 dc:overflow-auto dc:p-4",
|
|
2598
|
-
children: /* @__PURE__ */ G(
|
|
2590
|
+
children: /* @__PURE__ */ G(m, {
|
|
2599
2591
|
chartType: h,
|
|
2600
2592
|
displayConfig: g,
|
|
2601
2593
|
colorPalette: _,
|
|
@@ -2603,8 +2595,8 @@ var vt = R(function({ value: e, label: t, placeholder: n, icon: r, options: i, o
|
|
|
2603
2595
|
})
|
|
2604
2596
|
}) : null]
|
|
2605
2597
|
});
|
|
2606
|
-
}),
|
|
2607
|
-
function
|
|
2598
|
+
}), jt = s("chevronDown"), Mt = s("chevronRight"), Nt = s("check"), Pt = s("search"), Ft = s("dimension"), It = s("link"), Lt = s("timeDimension"), Rt = s("dimension");
|
|
2599
|
+
function zt(e) {
|
|
2608
2600
|
return e?.cubes ? e.cubes.filter((e) => e.meta?.eventStream).map((e) => ({
|
|
2609
2601
|
cube: e.name,
|
|
2610
2602
|
dimension: e.name,
|
|
@@ -2612,7 +2604,7 @@ function Rt(e) {
|
|
|
2612
2604
|
eventStream: e.meta?.eventStream
|
|
2613
2605
|
})) : [];
|
|
2614
2606
|
}
|
|
2615
|
-
function
|
|
2607
|
+
function Bt(e) {
|
|
2616
2608
|
if (!e?.cubes) return [];
|
|
2617
2609
|
let t = [];
|
|
2618
2610
|
for (let n of e.cubes) for (let e of n.dimensions || []) e.type === "time" && t.push({
|
|
@@ -2622,7 +2614,7 @@ function zt(e) {
|
|
|
2622
2614
|
});
|
|
2623
2615
|
return t;
|
|
2624
2616
|
}
|
|
2625
|
-
function
|
|
2617
|
+
function Vt(e) {
|
|
2626
2618
|
if (!e?.cubes) return [];
|
|
2627
2619
|
let t = [];
|
|
2628
2620
|
for (let n of e.cubes) for (let e of n.dimensions || []) e.type === "string" && t.push({
|
|
@@ -2632,7 +2624,7 @@ function Bt(e) {
|
|
|
2632
2624
|
});
|
|
2633
2625
|
return t;
|
|
2634
2626
|
}
|
|
2635
|
-
var
|
|
2627
|
+
var Ht = R(function({ value: e, label: t, placeholder: n, icon: r, options: i, onChange: a, helpText: o }) {
|
|
2636
2628
|
let [s, c] = U(!1), [l, u] = U(""), d = H(null), f = H(null), p = V(() => {
|
|
2637
2629
|
let e = {};
|
|
2638
2630
|
for (let t of i) e[t.cube] || (e[t.cube] = []), e[t.cube].push(t);
|
|
@@ -2689,7 +2681,7 @@ var Vt = R(function({ value: e, label: t, placeholder: n, icon: r, options: i, o
|
|
|
2689
2681
|
className: "dc:p-0.5 dc:rounded-sm hover:bg-dc-surface-hover text-dc-text-muted hover:text-dc-text",
|
|
2690
2682
|
title: "Clear",
|
|
2691
2683
|
children: "x"
|
|
2692
|
-
}),
|
|
2684
|
+
}), jt && /* @__PURE__ */ G(jt, { className: `dc:w-4 dc:h-4 text-dc-text-muted dc:transition-transform ${s ? "dc:rotate-180" : ""}` })]
|
|
2693
2685
|
})]
|
|
2694
2686
|
}), s && /* @__PURE__ */ K("div", {
|
|
2695
2687
|
className: "dc:absolute dc:z-50 dc:mt-1 dc:left-0 dc:right-0 dc:min-w-[200px] bg-dc-surface dc:border border-dc-border dc:rounded-md dc:shadow-lg",
|
|
@@ -2698,7 +2690,7 @@ var Vt = R(function({ value: e, label: t, placeholder: n, icon: r, options: i, o
|
|
|
2698
2690
|
className: "dc:p-2 dc:border-b border-dc-border",
|
|
2699
2691
|
children: /* @__PURE__ */ K("div", {
|
|
2700
2692
|
className: "dc:relative",
|
|
2701
|
-
children: [
|
|
2693
|
+
children: [Pt && /* @__PURE__ */ G(Pt, { className: "dc:absolute dc:left-2 dc:top-1/2 dc:-translate-y-1/2 dc:w-4 dc:h-4 text-dc-text-muted" }), /* @__PURE__ */ G("input", {
|
|
2702
2694
|
ref: f,
|
|
2703
2695
|
type: "text",
|
|
2704
2696
|
value: l,
|
|
@@ -2725,7 +2717,7 @@ var Vt = R(function({ value: e, label: t, placeholder: n, icon: r, options: i, o
|
|
|
2725
2717
|
dc:rounded-sm dc:transition-colors
|
|
2726
2718
|
${e === t.dimension ? "bg-dc-primary-bg text-dc-primary" : "text-dc-text hover:bg-dc-surface-hover"}
|
|
2727
2719
|
`,
|
|
2728
|
-
children: [/* @__PURE__ */ G("span", { children: t.label }), e === t.dimension &&
|
|
2720
|
+
children: [/* @__PURE__ */ G("span", { children: t.label }), e === t.dimension && Nt && /* @__PURE__ */ G(Nt, { className: "dc:w-4 dc:h-4" })]
|
|
2729
2721
|
}, t.dimension))]
|
|
2730
2722
|
}, t))
|
|
2731
2723
|
}),
|
|
@@ -2737,15 +2729,15 @@ var Vt = R(function({ value: e, label: t, placeholder: n, icon: r, options: i, o
|
|
|
2737
2729
|
})]
|
|
2738
2730
|
})]
|
|
2739
2731
|
});
|
|
2740
|
-
}),
|
|
2741
|
-
let { t: l } =
|
|
2742
|
-
let t =
|
|
2732
|
+
}), Ut = R(function({ selectedCube: e, bindingKey: t, timeDimension: n, eventDimension: r, schema: i, onCubeChange: a, onBindingKeyChange: o, onTimeDimensionChange: s, onEventDimensionChange: c }) {
|
|
2733
|
+
let { t: l } = S(), u = V(() => zt(i), [i]), d = V(() => {
|
|
2734
|
+
let t = N(i);
|
|
2743
2735
|
return e ? t.filter((t) => t.cube === e) : [];
|
|
2744
2736
|
}, [i, e]), f = V(() => {
|
|
2745
|
-
let t =
|
|
2737
|
+
let t = Bt(i);
|
|
2746
2738
|
return e ? t.filter((t) => t.cube === e) : [];
|
|
2747
2739
|
}, [i, e]), p = V(() => {
|
|
2748
|
-
let t =
|
|
2740
|
+
let t = Vt(i);
|
|
2749
2741
|
return e ? t.filter((t) => t.cube === e) : [];
|
|
2750
2742
|
}, [i, e]), m = !!(e && t && n && r), [h, g] = U(!1), _ = H(!1);
|
|
2751
2743
|
B(() => {
|
|
@@ -2777,14 +2769,14 @@ var Vt = R(function({ value: e, label: t, placeholder: n, icon: r, options: i, o
|
|
|
2777
2769
|
children: [/* @__PURE__ */ K("div", {
|
|
2778
2770
|
className: "dc:flex dc:items-center dc:gap-2",
|
|
2779
2771
|
children: [
|
|
2780
|
-
h ?
|
|
2772
|
+
h ? Mt && /* @__PURE__ */ G(Mt, { className: "dc:w-4 dc:h-4 text-dc-text-muted" }) : jt && /* @__PURE__ */ G(jt, { className: "dc:w-4 dc:h-4 text-dc-text-muted" }),
|
|
2781
2773
|
/* @__PURE__ */ G(P, {
|
|
2782
2774
|
className: "dc:mb-0",
|
|
2783
2775
|
children: l("flow.config.configuration")
|
|
2784
2776
|
}),
|
|
2785
2777
|
m && /* @__PURE__ */ G("span", {
|
|
2786
2778
|
className: "dc:flex dc:items-center dc:gap-1 dc:text-xs text-dc-success",
|
|
2787
|
-
children:
|
|
2779
|
+
children: Nt && /* @__PURE__ */ G(Nt, { className: "dc:w-3.5 dc:h-3.5" })
|
|
2788
2780
|
})
|
|
2789
2781
|
]
|
|
2790
2782
|
}), h && m && /* @__PURE__ */ G("span", {
|
|
@@ -2794,38 +2786,38 @@ var Vt = R(function({ value: e, label: t, placeholder: n, icon: r, options: i, o
|
|
|
2794
2786
|
}), !h && /* @__PURE__ */ K("div", {
|
|
2795
2787
|
className: "dc:flex dc:flex-col dc:gap-3 dc:px-4 dc:pb-3",
|
|
2796
2788
|
children: [
|
|
2797
|
-
/* @__PURE__ */ G(
|
|
2789
|
+
/* @__PURE__ */ G(Ht, {
|
|
2798
2790
|
value: e,
|
|
2799
2791
|
label: "Cube",
|
|
2800
2792
|
placeholder: "Select event stream cube",
|
|
2801
|
-
icon:
|
|
2793
|
+
icon: Ft,
|
|
2802
2794
|
options: u,
|
|
2803
2795
|
onChange: a,
|
|
2804
2796
|
helpText: "Select a cube configured for flow analysis"
|
|
2805
2797
|
}),
|
|
2806
|
-
/* @__PURE__ */ G(
|
|
2798
|
+
/* @__PURE__ */ G(Ht, {
|
|
2807
2799
|
value: v,
|
|
2808
2800
|
label: "Binding Key",
|
|
2809
2801
|
placeholder: e ? "Select binding key" : "Select cube first",
|
|
2810
|
-
icon:
|
|
2802
|
+
icon: It,
|
|
2811
2803
|
options: d,
|
|
2812
2804
|
onChange: y,
|
|
2813
2805
|
helpText: "Entity that links events together (e.g., user ID)"
|
|
2814
2806
|
}),
|
|
2815
|
-
/* @__PURE__ */ G(
|
|
2807
|
+
/* @__PURE__ */ G(Ht, {
|
|
2816
2808
|
value: n,
|
|
2817
2809
|
label: "Time Dimension",
|
|
2818
2810
|
placeholder: e ? "Select time dimension" : "Select cube first",
|
|
2819
|
-
icon:
|
|
2811
|
+
icon: Lt,
|
|
2820
2812
|
options: f,
|
|
2821
2813
|
onChange: s,
|
|
2822
2814
|
helpText: "Timestamp field for event ordering"
|
|
2823
2815
|
}),
|
|
2824
|
-
/* @__PURE__ */ G(
|
|
2816
|
+
/* @__PURE__ */ G(Ht, {
|
|
2825
2817
|
value: r,
|
|
2826
2818
|
label: "Event Dimension",
|
|
2827
2819
|
placeholder: e ? "Select event dimension" : "Select cube first",
|
|
2828
|
-
icon:
|
|
2820
|
+
icon: Rt,
|
|
2829
2821
|
options: p,
|
|
2830
2822
|
onChange: c,
|
|
2831
2823
|
helpText: "Dimension that categorizes events (node labels in Sankey)"
|
|
@@ -2833,7 +2825,7 @@ var Vt = R(function({ value: e, label: t, placeholder: n, icon: r, options: i, o
|
|
|
2833
2825
|
]
|
|
2834
2826
|
})]
|
|
2835
2827
|
});
|
|
2836
|
-
}),
|
|
2828
|
+
}), Wt = [{
|
|
2837
2829
|
value: "sankey",
|
|
2838
2830
|
labelKey: "flow.visualization.sankey",
|
|
2839
2831
|
hintKey: "flow.visualization.sankeyHint"
|
|
@@ -2841,8 +2833,8 @@ var Vt = R(function({ value: e, label: t, placeholder: n, icon: r, options: i, o
|
|
|
2841
2833
|
value: "sunburst",
|
|
2842
2834
|
labelKey: "flow.visualization.sunburst",
|
|
2843
2835
|
hintKey: "flow.visualization.sunburstHint"
|
|
2844
|
-
}],
|
|
2845
|
-
let { t: n } =
|
|
2836
|
+
}], Gt = R(function({ chartType: e, onChartTypeChange: t }) {
|
|
2837
|
+
let { t: n } = S();
|
|
2846
2838
|
return /* @__PURE__ */ K("div", { children: [
|
|
2847
2839
|
/* @__PURE__ */ G(P, { children: n("flow.visualization.title") }),
|
|
2848
2840
|
/* @__PURE__ */ G("p", {
|
|
@@ -2851,7 +2843,7 @@ var Vt = R(function({ value: e, label: t, placeholder: n, icon: r, options: i, o
|
|
|
2851
2843
|
}),
|
|
2852
2844
|
/* @__PURE__ */ G("div", {
|
|
2853
2845
|
className: "dc:flex dc:gap-2",
|
|
2854
|
-
children:
|
|
2846
|
+
children: Wt.map((r) => /* @__PURE__ */ G("button", {
|
|
2855
2847
|
type: "button",
|
|
2856
2848
|
onClick: () => t(r.value),
|
|
2857
2849
|
className: `dc:flex-1 dc:px-3 dc:py-2 dc:rounded-md dc:border dc:text-sm dc:font-medium dc:transition-colors ${e === r.value ? "border-dc-primary bg-dc-primary/10 text-dc-primary" : "border-dc-border bg-dc-surface hover:bg-dc-surface-hover text-dc-text"}`,
|
|
@@ -2865,8 +2857,8 @@ var Vt = R(function({ value: e, label: t, placeholder: n, icon: r, options: i, o
|
|
|
2865
2857
|
}, r.value))
|
|
2866
2858
|
})
|
|
2867
2859
|
] });
|
|
2868
|
-
}),
|
|
2869
|
-
let { t: a } =
|
|
2860
|
+
}), Kt = R(function({ chartType: e, stepsBefore: t, stepsAfter: n, onStepsBeforeChange: r, onStepsAfterChange: i }) {
|
|
2861
|
+
let { t: a } = S(), o = e === "sunburst", s = !o && t >= 4 || n >= 4;
|
|
2870
2862
|
return /* @__PURE__ */ K("div", { children: [
|
|
2871
2863
|
/* @__PURE__ */ G(P, { children: a("flow.depth.title") }),
|
|
2872
2864
|
/* @__PURE__ */ G("p", {
|
|
@@ -2921,10 +2913,10 @@ var Vt = R(function({ value: e, label: t, placeholder: n, icon: r, options: i, o
|
|
|
2921
2913
|
children: a("flow.depth.performanceWarning")
|
|
2922
2914
|
})
|
|
2923
2915
|
] });
|
|
2924
|
-
}),
|
|
2925
|
-
let { t: w } =
|
|
2926
|
-
|
|
2927
|
-
}, [
|
|
2916
|
+
}), qt = R(function({ flowCube: e, flowBindingKey: t, flowTimeDimension: n, eventDimension: r, startingStep: i, stepsBefore: a, stepsAfter: o, joinStrategy: s = "auto", schema: c, onCubeChange: l, onBindingKeyChange: u, onTimeDimensionChange: d, onEventDimensionChange: f, onStartingStepFiltersChange: p, onStepsBeforeChange: h, onStepsAfterChange: g, onJoinStrategyChange: _, chartType: v = "sankey", onChartTypeChange: y, displayConfig: b, colorPalette: x, onDisplayConfigChange: C }) {
|
|
2917
|
+
let { t: w } = S(), [T, E] = U("config"), O = b && C, k = z((e) => {
|
|
2918
|
+
p(e);
|
|
2919
|
+
}, [p]);
|
|
2928
2920
|
return /* @__PURE__ */ K("div", {
|
|
2929
2921
|
className: "dc:flex dc:flex-col dc:h-full dc:min-h-0 dc:overflow-hidden",
|
|
2930
2922
|
children: [/* @__PURE__ */ G("div", {
|
|
@@ -2932,11 +2924,11 @@ var Vt = R(function({ value: e, label: t, placeholder: n, icon: r, options: i, o
|
|
|
2932
2924
|
children: /* @__PURE__ */ K("div", {
|
|
2933
2925
|
className: "dc:flex dc:min-w-max",
|
|
2934
2926
|
children: [/* @__PURE__ */ G("button", {
|
|
2935
|
-
onClick: () =>
|
|
2927
|
+
onClick: () => E("config"),
|
|
2936
2928
|
className: `dc:flex-1 dc:px-4 dc:py-3 dc:text-sm dc:font-medium dc:transition-colors dc:whitespace-nowrap ${T === "config" ? "text-dc-primary dc:border-b-2 border-dc-primary" : "text-dc-text-secondary hover:text-dc-text"}`,
|
|
2937
2929
|
children: w("flow.tabs.flow")
|
|
2938
2930
|
}), /* @__PURE__ */ G("button", {
|
|
2939
|
-
onClick: () => O &&
|
|
2931
|
+
onClick: () => O && E("display"),
|
|
2940
2932
|
disabled: !O,
|
|
2941
2933
|
className: `dc:flex-1 dc:px-4 dc:py-3 dc:text-sm dc:font-medium dc:transition-colors dc:whitespace-nowrap ${T === "display" ? "text-dc-primary dc:border-b-2 border-dc-primary" : O ? "text-dc-text-secondary hover:text-dc-text" : "text-dc-text-muted dc:cursor-not-allowed dc:opacity-50"}`,
|
|
2942
2934
|
title: w(O ? "flow.tabs.displayTitle" : "flow.tabs.displayUnavailable"),
|
|
@@ -2945,7 +2937,7 @@ var Vt = R(function({ value: e, label: t, placeholder: n, icon: r, options: i, o
|
|
|
2945
2937
|
})
|
|
2946
2938
|
}), T === "config" ? /* @__PURE__ */ K("div", {
|
|
2947
2939
|
className: "dc:flex dc:flex-col dc:flex-1 dc:min-h-0",
|
|
2948
|
-
children: [/* @__PURE__ */ G(
|
|
2940
|
+
children: [/* @__PURE__ */ G(Ut, {
|
|
2949
2941
|
selectedCube: e,
|
|
2950
2942
|
bindingKey: t,
|
|
2951
2943
|
timeDimension: n,
|
|
@@ -2958,7 +2950,7 @@ var Vt = R(function({ value: e, label: t, placeholder: n, icon: r, options: i, o
|
|
|
2958
2950
|
}), /* @__PURE__ */ K("div", {
|
|
2959
2951
|
className: "dc:flex-1 dc:min-h-0 dc:overflow-auto dc:p-4 dc:space-y-6",
|
|
2960
2952
|
children: [
|
|
2961
|
-
y && /* @__PURE__ */ G(
|
|
2953
|
+
y && /* @__PURE__ */ G(Gt, {
|
|
2962
2954
|
chartType: v,
|
|
2963
2955
|
onChartTypeChange: y
|
|
2964
2956
|
}),
|
|
@@ -2971,13 +2963,13 @@ var Vt = R(function({ value: e, label: t, placeholder: n, icon: r, options: i, o
|
|
|
2971
2963
|
/* @__PURE__ */ K("div", { children: [/* @__PURE__ */ G("label", {
|
|
2972
2964
|
className: "dc:block dc:text-xs dc:font-medium text-dc-text-muted dc:mb-2",
|
|
2973
2965
|
children: w("flow.startingStep.filterLabel")
|
|
2974
|
-
}), /* @__PURE__ */ G(
|
|
2966
|
+
}), /* @__PURE__ */ G(D, {
|
|
2975
2967
|
filters: i.filters,
|
|
2976
2968
|
schema: c,
|
|
2977
2969
|
onFiltersChange: k
|
|
2978
2970
|
})] })
|
|
2979
2971
|
] }),
|
|
2980
|
-
/* @__PURE__ */ G(
|
|
2972
|
+
/* @__PURE__ */ G(Kt, {
|
|
2981
2973
|
chartType: v,
|
|
2982
2974
|
stepsBefore: a,
|
|
2983
2975
|
stepsAfter: o,
|
|
@@ -3014,16 +3006,16 @@ var Vt = R(function({ value: e, label: t, placeholder: n, icon: r, options: i, o
|
|
|
3014
3006
|
})]
|
|
3015
3007
|
}) : T === "display" && b && C ? /* @__PURE__ */ G("div", {
|
|
3016
3008
|
className: "dc:flex-1 dc:min-h-0 dc:overflow-auto dc:p-4",
|
|
3017
|
-
children: /* @__PURE__ */ G(
|
|
3009
|
+
children: /* @__PURE__ */ G(m, {
|
|
3018
3010
|
chartType: v,
|
|
3019
3011
|
displayConfig: b,
|
|
3020
|
-
colorPalette:
|
|
3012
|
+
colorPalette: x,
|
|
3021
3013
|
onDisplayConfigChange: C
|
|
3022
3014
|
})
|
|
3023
3015
|
}) : null]
|
|
3024
3016
|
});
|
|
3025
|
-
}),
|
|
3026
|
-
function
|
|
3017
|
+
}), Jt = s("chevronDown"), Yt = s("chevronRight"), Xt = s("check"), Zt = s("search"), Qt = s("dimension"), $t = s("link"), en = s("timeDimension"), tn = s("timeDimension");
|
|
3018
|
+
function nn(e) {
|
|
3027
3019
|
return e?.cubes ? e.cubes.filter((e) => e.meta?.eventStream).map((e) => ({
|
|
3028
3020
|
cube: e.name,
|
|
3029
3021
|
dimension: e.name,
|
|
@@ -3031,7 +3023,7 @@ function tn(e) {
|
|
|
3031
3023
|
eventStream: e.meta?.eventStream
|
|
3032
3024
|
})) : [];
|
|
3033
3025
|
}
|
|
3034
|
-
function
|
|
3026
|
+
function rn(e) {
|
|
3035
3027
|
if (!e?.cubes) return [];
|
|
3036
3028
|
let t = [];
|
|
3037
3029
|
for (let n of e.cubes) for (let e of n.dimensions || []) e.type === "time" && t.push({
|
|
@@ -3041,13 +3033,13 @@ function nn(e) {
|
|
|
3041
3033
|
});
|
|
3042
3034
|
return t;
|
|
3043
3035
|
}
|
|
3044
|
-
function
|
|
3036
|
+
function an(e) {
|
|
3045
3037
|
return e ? new Date(e).toLocaleDateString("en-US", {
|
|
3046
3038
|
month: "short",
|
|
3047
3039
|
day: "numeric"
|
|
3048
3040
|
}) : "";
|
|
3049
3041
|
}
|
|
3050
|
-
var
|
|
3042
|
+
var on = R(function({ value: e, label: t, placeholder: n, icon: r, options: i, onChange: a, helpText: o }) {
|
|
3051
3043
|
let [s, c] = U(!1), [l, u] = U(""), d = H(null), f = H(null), p = V(() => {
|
|
3052
3044
|
let e = {};
|
|
3053
3045
|
for (let t of i) e[t.cube] || (e[t.cube] = []), e[t.cube].push(t);
|
|
@@ -3104,7 +3096,7 @@ var an = R(function({ value: e, label: t, placeholder: n, icon: r, options: i, o
|
|
|
3104
3096
|
className: "dc:p-0.5 dc:rounded-sm hover:bg-dc-surface-hover text-dc-text-muted hover:text-dc-text",
|
|
3105
3097
|
title: "Clear",
|
|
3106
3098
|
children: "×"
|
|
3107
|
-
}),
|
|
3099
|
+
}), Jt && /* @__PURE__ */ G(Jt, { className: `dc:w-4 dc:h-4 text-dc-text-muted dc:transition-transform ${s ? "dc:rotate-180" : ""}` })]
|
|
3108
3100
|
})]
|
|
3109
3101
|
}), s && /* @__PURE__ */ K("div", {
|
|
3110
3102
|
className: "dc:absolute dc:z-50 dc:mt-1 dc:left-0 dc:right-0 dc:min-w-[200px] bg-dc-surface dc:border border-dc-border dc:rounded-md dc:shadow-lg",
|
|
@@ -3113,7 +3105,7 @@ var an = R(function({ value: e, label: t, placeholder: n, icon: r, options: i, o
|
|
|
3113
3105
|
className: "dc:p-2 dc:border-b border-dc-border",
|
|
3114
3106
|
children: /* @__PURE__ */ K("div", {
|
|
3115
3107
|
className: "dc:relative",
|
|
3116
|
-
children: [
|
|
3108
|
+
children: [Zt && /* @__PURE__ */ G(Zt, { className: "dc:absolute dc:left-2 dc:top-1/2 dc:-translate-y-1/2 dc:w-4 dc:h-4 text-dc-text-muted" }), /* @__PURE__ */ G("input", {
|
|
3117
3109
|
ref: f,
|
|
3118
3110
|
type: "text",
|
|
3119
3111
|
value: l,
|
|
@@ -3140,7 +3132,7 @@ var an = R(function({ value: e, label: t, placeholder: n, icon: r, options: i, o
|
|
|
3140
3132
|
dc:rounded-sm dc:transition-colors
|
|
3141
3133
|
${e === t.dimension ? "bg-dc-primary-bg text-dc-primary" : "text-dc-text hover:bg-dc-surface-hover"}
|
|
3142
3134
|
`,
|
|
3143
|
-
children: [/* @__PURE__ */ G("span", { children: t.label }), e === t.dimension &&
|
|
3135
|
+
children: [/* @__PURE__ */ G("span", { children: t.label }), e === t.dimension && Xt && /* @__PURE__ */ G(Xt, { className: "dc:w-4 dc:h-4" })]
|
|
3144
3136
|
}, t.dimension))]
|
|
3145
3137
|
}, t))
|
|
3146
3138
|
}),
|
|
@@ -3152,24 +3144,24 @@ var an = R(function({ value: e, label: t, placeholder: n, icon: r, options: i, o
|
|
|
3152
3144
|
})]
|
|
3153
3145
|
})]
|
|
3154
3146
|
});
|
|
3155
|
-
}),
|
|
3156
|
-
let { t: n } =
|
|
3147
|
+
}), sn = R(function({ dateRange: e, onDateRangeChange: t }) {
|
|
3148
|
+
let { t: n } = S(), r = e ?? {
|
|
3157
3149
|
start: "",
|
|
3158
3150
|
end: ""
|
|
3159
|
-
}, i = r.start ?? "", a = r.end ?? "", [o, s] = U(!1), [c, l] = U(() => i && a ?
|
|
3151
|
+
}, i = r.start ?? "", a = r.end ?? "", [o, s] = U(!1), [c, l] = U(() => i && a ? v(r) : "last_3_months"), [u, d] = U(i), [f, p] = U(a), m = H(null);
|
|
3160
3152
|
B(() => {
|
|
3161
3153
|
let t = e?.start ?? "", n = e?.end ?? "";
|
|
3162
|
-
d(t), p(n), t && n && l(
|
|
3154
|
+
d(t), p(n), t && n && l(v({
|
|
3163
3155
|
start: t,
|
|
3164
3156
|
end: n
|
|
3165
3157
|
}));
|
|
3166
3158
|
}, [e?.start, e?.end]);
|
|
3167
3159
|
let h = z((e) => {
|
|
3168
3160
|
if (l(e), e !== "custom") {
|
|
3169
|
-
let n =
|
|
3161
|
+
let n = b(e);
|
|
3170
3162
|
t(n), d(n.start), p(n.end), s(!1);
|
|
3171
3163
|
}
|
|
3172
|
-
}, [t]),
|
|
3164
|
+
}, [t]), g = z(() => {
|
|
3173
3165
|
u && f && (t({
|
|
3174
3166
|
start: u,
|
|
3175
3167
|
end: f
|
|
@@ -3185,17 +3177,17 @@ var an = R(function({ value: e, label: t, placeholder: n, icon: r, options: i, o
|
|
|
3185
3177
|
}
|
|
3186
3178
|
if (o) return document.addEventListener("mousedown", e), () => document.removeEventListener("mousedown", e);
|
|
3187
3179
|
}, [o]);
|
|
3188
|
-
let
|
|
3189
|
-
let t =
|
|
3180
|
+
let y = V(() => {
|
|
3181
|
+
let t = _.find((e) => e.value === c);
|
|
3190
3182
|
if (t && c !== "custom") return t.label;
|
|
3191
3183
|
let n = e?.start ?? "", r = e?.end ?? "";
|
|
3192
|
-
return !n || !r ? "Select date range" : `${
|
|
3184
|
+
return !n || !r ? "Select date range" : `${an(n)} - ${an(r)}`;
|
|
3193
3185
|
}, [c, e]);
|
|
3194
3186
|
return /* @__PURE__ */ K("div", {
|
|
3195
3187
|
className: "dc:flex-1 dc:min-w-0",
|
|
3196
3188
|
children: [/* @__PURE__ */ K("label", {
|
|
3197
3189
|
className: "dc:flex dc:items-center dc:gap-1.5 dc:text-xs dc:font-medium text-dc-text-muted dc:mb-1",
|
|
3198
|
-
children: [
|
|
3190
|
+
children: [tn && /* @__PURE__ */ G(tn, { className: "dc:w-3.5 dc:h-3.5" }), n("retention.dateRange.label")]
|
|
3199
3191
|
}), /* @__PURE__ */ K("div", {
|
|
3200
3192
|
ref: m,
|
|
3201
3193
|
className: "dc:relative",
|
|
@@ -3210,13 +3202,13 @@ var an = R(function({ value: e, label: t, placeholder: n, icon: r, options: i, o
|
|
|
3210
3202
|
`,
|
|
3211
3203
|
children: [/* @__PURE__ */ G("span", {
|
|
3212
3204
|
className: "text-dc-text dc:truncate",
|
|
3213
|
-
children:
|
|
3214
|
-
}),
|
|
3205
|
+
children: y
|
|
3206
|
+
}), Jt && /* @__PURE__ */ G(Jt, { className: `dc:w-4 dc:h-4 text-dc-text-muted dc:transition-transform dc:ml-2 ${o ? "dc:rotate-180" : ""}` })]
|
|
3215
3207
|
}), o && /* @__PURE__ */ K("div", {
|
|
3216
3208
|
className: "dc:absolute dc:z-50 dc:mt-1 dc:left-0 dc:right-0 dc:min-w-[280px] bg-dc-surface dc:border border-dc-border dc:rounded-lg dc:shadow-lg dc:p-3",
|
|
3217
3209
|
children: [/* @__PURE__ */ G("div", {
|
|
3218
3210
|
className: "dc:grid dc:grid-cols-2 dc:gap-2 dc:mb-3",
|
|
3219
|
-
children:
|
|
3211
|
+
children: _.filter((e) => e.value !== "custom").map((e) => /* @__PURE__ */ G("button", {
|
|
3220
3212
|
type: "button",
|
|
3221
3213
|
onClick: () => h(e.value),
|
|
3222
3214
|
className: `dc:px-3 dc:py-1.5 dc:text-xs dc:rounded-sm dc:transition-colors ${c === e.value ? "bg-dc-primary text-white" : "bg-dc-surface-secondary text-dc-text hover:bg-dc-surface-hover"}`,
|
|
@@ -3256,7 +3248,7 @@ var an = R(function({ value: e, label: t, placeholder: n, icon: r, options: i, o
|
|
|
3256
3248
|
}),
|
|
3257
3249
|
/* @__PURE__ */ G("button", {
|
|
3258
3250
|
type: "button",
|
|
3259
|
-
onClick:
|
|
3251
|
+
onClick: g,
|
|
3260
3252
|
disabled: !u || !f,
|
|
3261
3253
|
className: "dc:w-full dc:px-3 dc:py-1.5 dc:text-xs bg-dc-primary text-white dc:rounded-sm hover:bg-dc-primary-hover dc:disabled:opacity-50 dc:disabled:cursor-not-allowed dc:transition-colors",
|
|
3262
3254
|
children: n("retention.dateRange.applyCustom")
|
|
@@ -3266,15 +3258,15 @@ var an = R(function({ value: e, label: t, placeholder: n, icon: r, options: i, o
|
|
|
3266
3258
|
})]
|
|
3267
3259
|
})]
|
|
3268
3260
|
});
|
|
3269
|
-
}),
|
|
3261
|
+
}), cn = R(function({ selectedCube: e = null, bindingKey: t = null, timeDimension: n = null, dateRange: r = {
|
|
3270
3262
|
start: "",
|
|
3271
3263
|
end: ""
|
|
3272
3264
|
}, schema: i = null, onCubeChange: a = () => {}, onBindingKeyChange: o = () => {}, onTimeDimensionChange: s = () => {} }) {
|
|
3273
|
-
let { t: c } =
|
|
3274
|
-
let t =
|
|
3265
|
+
let { t: c } = S(), l = V(() => nn(i), [i]), u = V(() => {
|
|
3266
|
+
let t = N(i);
|
|
3275
3267
|
return e ? t.filter((t) => t.cube === e) : [];
|
|
3276
3268
|
}, [i, e]), d = V(() => {
|
|
3277
|
-
let t =
|
|
3269
|
+
let t = rn(i);
|
|
3278
3270
|
return e ? t.filter((t) => t.cube === e) : [];
|
|
3279
3271
|
}, [i, e]), f = !!(e && t?.dimension && n && r?.start && r?.end), [p, m] = U(!1), h = H(!1);
|
|
3280
3272
|
B(() => {
|
|
@@ -3282,7 +3274,7 @@ var an = R(function({ value: e, label: t, placeholder: n, icon: r, options: i, o
|
|
|
3282
3274
|
}, [f]);
|
|
3283
3275
|
let g = t?.dimension ? typeof t.dimension == "string" ? t.dimension : t.dimension[0]?.dimension || null : null, _ = z((e) => {
|
|
3284
3276
|
o(e ? { dimension: e } : null);
|
|
3285
|
-
}, [o]), v = l.find((t) => t.dimension === e)?.label || e, y = r?.start ? `${
|
|
3277
|
+
}, [o]), v = l.find((t) => t.dimension === e)?.label || e, y = r?.start ? `${an(r.start)} - ${an(r.end)}` : "";
|
|
3286
3278
|
return /* @__PURE__ */ K("div", {
|
|
3287
3279
|
className: "bg-dc-surface-secondary dc:border-b border-dc-border",
|
|
3288
3280
|
children: [/* @__PURE__ */ K("button", {
|
|
@@ -3292,14 +3284,14 @@ var an = R(function({ value: e, label: t, placeholder: n, icon: r, options: i, o
|
|
|
3292
3284
|
children: [/* @__PURE__ */ K("div", {
|
|
3293
3285
|
className: "dc:flex dc:items-center dc:gap-2",
|
|
3294
3286
|
children: [
|
|
3295
|
-
p ?
|
|
3287
|
+
p ? Yt && /* @__PURE__ */ G(Yt, { className: "dc:w-4 dc:h-4 text-dc-text-muted" }) : Jt && /* @__PURE__ */ G(Jt, { className: "dc:w-4 dc:h-4 text-dc-text-muted" }),
|
|
3296
3288
|
/* @__PURE__ */ G(P, {
|
|
3297
3289
|
className: "dc:mb-0",
|
|
3298
3290
|
children: c("retention.config.configuration")
|
|
3299
3291
|
}),
|
|
3300
3292
|
f && /* @__PURE__ */ G("span", {
|
|
3301
3293
|
className: "dc:flex dc:items-center dc:gap-1 dc:text-xs text-dc-success",
|
|
3302
|
-
children:
|
|
3294
|
+
children: Xt && /* @__PURE__ */ G(Xt, { className: "dc:w-3.5 dc:h-3.5" })
|
|
3303
3295
|
})
|
|
3304
3296
|
]
|
|
3305
3297
|
}), p && f && /* @__PURE__ */ K("span", {
|
|
@@ -3313,29 +3305,29 @@ var an = R(function({ value: e, label: t, placeholder: n, icon: r, options: i, o
|
|
|
3313
3305
|
}), !p && /* @__PURE__ */ K("div", {
|
|
3314
3306
|
className: "dc:flex dc:flex-col dc:gap-3 dc:px-4 dc:pb-3",
|
|
3315
3307
|
children: [
|
|
3316
|
-
/* @__PURE__ */ G(
|
|
3308
|
+
/* @__PURE__ */ G(on, {
|
|
3317
3309
|
value: e,
|
|
3318
3310
|
label: "Cube",
|
|
3319
3311
|
placeholder: "Select cube",
|
|
3320
|
-
icon:
|
|
3312
|
+
icon: Qt,
|
|
3321
3313
|
options: l,
|
|
3322
3314
|
onChange: a,
|
|
3323
3315
|
helpText: "Select the cube containing your user events"
|
|
3324
3316
|
}),
|
|
3325
|
-
/* @__PURE__ */ G(
|
|
3317
|
+
/* @__PURE__ */ G(on, {
|
|
3326
3318
|
value: g,
|
|
3327
3319
|
label: "Binding Key",
|
|
3328
3320
|
placeholder: e ? "Select user identifier" : "Select cube first",
|
|
3329
|
-
icon:
|
|
3321
|
+
icon: $t,
|
|
3330
3322
|
options: u,
|
|
3331
3323
|
onChange: _,
|
|
3332
3324
|
helpText: "Dimension that identifies entities across events (e.g., user ID, customer ID)"
|
|
3333
3325
|
}),
|
|
3334
|
-
/* @__PURE__ */ G(
|
|
3326
|
+
/* @__PURE__ */ G(on, {
|
|
3335
3327
|
value: n,
|
|
3336
3328
|
label: "Timestamp",
|
|
3337
3329
|
placeholder: e ? "Select timestamp" : "Select cube first",
|
|
3338
|
-
icon:
|
|
3330
|
+
icon: en,
|
|
3339
3331
|
options: d,
|
|
3340
3332
|
onChange: s,
|
|
3341
3333
|
helpText: "Timestamp field for cohort entry and activity"
|
|
@@ -3346,7 +3338,7 @@ var an = R(function({ value: e, label: t, placeholder: n, icon: r, options: i, o
|
|
|
3346
3338
|
});
|
|
3347
3339
|
//#endregion
|
|
3348
3340
|
//#region src/client/components/AnalysisBuilder/utils/sortUtils.ts
|
|
3349
|
-
function
|
|
3341
|
+
function ln(e) {
|
|
3350
3342
|
switch (e) {
|
|
3351
3343
|
case null: return "asc";
|
|
3352
3344
|
case "asc": return "desc";
|
|
@@ -3356,7 +3348,7 @@ function cn(e) {
|
|
|
3356
3348
|
}
|
|
3357
3349
|
//#endregion
|
|
3358
3350
|
//#region src/client/components/AnalysisBuilder/BreakdownRow.tsx
|
|
3359
|
-
var
|
|
3351
|
+
var un = R(function({ breakdown: e, fieldMeta: t, sortDirection: n, sortPriority: r, index: i, transform: a, showGapBefore: o, isAnyDragging: s, isDragging: c, comparisonDisabled: l, onRemove: u, onGranularityChange: d, onComparisonToggle: f, onOrderChange: p, onReorder: m, onItemDragOver: h, onItemDrop: g, onDragStart: _, onDragEnd: v }) {
|
|
3360
3352
|
return /* @__PURE__ */ K("div", {
|
|
3361
3353
|
className: "dc:relative",
|
|
3362
3354
|
style: {
|
|
@@ -3368,7 +3360,7 @@ var ln = R(function({ breakdown: e, fieldMeta: t, sortDirection: n, sortPriority
|
|
|
3368
3360
|
children: [o && /* @__PURE__ */ G("div", {
|
|
3369
3361
|
className: "dc:absolute dc:-top-5 dc:left-0 dc:right-0 dc:flex dc:items-center dc:justify-center dc:pointer-events-none dc:z-10",
|
|
3370
3362
|
children: /* @__PURE__ */ G("div", { className: "dc:h-0.5 dc:w-full bg-dc-primary dc:rounded-full" })
|
|
3371
|
-
}), /* @__PURE__ */ G(
|
|
3363
|
+
}), /* @__PURE__ */ G(at, {
|
|
3372
3364
|
breakdown: e,
|
|
3373
3365
|
fieldMeta: t,
|
|
3374
3366
|
onRemove: () => u(e.id),
|
|
@@ -3378,7 +3370,7 @@ var ln = R(function({ breakdown: e, fieldMeta: t, sortDirection: n, sortPriority
|
|
|
3378
3370
|
sortDirection: n,
|
|
3379
3371
|
sortPriority: r,
|
|
3380
3372
|
onToggleSort: p ? () => {
|
|
3381
|
-
p(e.field,
|
|
3373
|
+
p(e.field, ln(n));
|
|
3382
3374
|
} : void 0,
|
|
3383
3375
|
index: i,
|
|
3384
3376
|
isDragging: c,
|
|
@@ -3386,11 +3378,11 @@ var ln = R(function({ breakdown: e, fieldMeta: t, sortDirection: n, sortPriority
|
|
|
3386
3378
|
onDragEnd: m ? v : void 0
|
|
3387
3379
|
})]
|
|
3388
3380
|
});
|
|
3389
|
-
}),
|
|
3390
|
-
function
|
|
3391
|
-
return t === null || n === null || e === t ? "" : t < n ? e > t && e < n ? "" : e === n - 1 ? `translateY(-${
|
|
3381
|
+
}), dn = 40;
|
|
3382
|
+
function fn(e, t, n) {
|
|
3383
|
+
return t === null || n === null || e === t ? "" : t < n ? e > t && e < n ? "" : e === n - 1 ? `translateY(-${dn / 2}px)` : e >= n ? `translateY(${dn / 2}px)` : "" : e >= n && e < t ? `translateY(${dn / 2}px)` : "";
|
|
3392
3384
|
}
|
|
3393
|
-
function
|
|
3385
|
+
function pn(e, t, n, r) {
|
|
3394
3386
|
let [i, a] = U(null), [o, s] = U(null), c = H(null), l = H(null), u = H(null);
|
|
3395
3387
|
return {
|
|
3396
3388
|
draggedIndex: i,
|
|
@@ -3441,24 +3433,24 @@ function fn(e, t, n, r) {
|
|
|
3441
3433
|
let t = n;
|
|
3442
3434
|
l.current !== t && c.current !== t - 1 && (s(t), l.current = t);
|
|
3443
3435
|
}, [n]),
|
|
3444
|
-
getItemTransform: z((e) =>
|
|
3436
|
+
getItemTransform: z((e) => fn(e, i, o), [i, o]),
|
|
3445
3437
|
shouldShowGapIndicator: z((e) => i === null || o === null ? !1 : e === o, [i, o])
|
|
3446
3438
|
};
|
|
3447
3439
|
}
|
|
3448
3440
|
//#endregion
|
|
3449
3441
|
//#region src/client/components/AnalysisBuilder/BreakdownSection.tsx
|
|
3450
|
-
var
|
|
3451
|
-
function
|
|
3442
|
+
var mn = s("add");
|
|
3443
|
+
function hn(e, t) {
|
|
3452
3444
|
if (!t?.cubes) return null;
|
|
3453
3445
|
let [n] = e.split("."), r = t.cubes.find((e) => e.name === n);
|
|
3454
3446
|
return r && r.dimensions?.find((t) => t.name === e) || null;
|
|
3455
3447
|
}
|
|
3456
|
-
var
|
|
3457
|
-
let { t: l } =
|
|
3448
|
+
var gn = R(function({ breakdowns: e, schema: t, onAdd: n, onRemove: r, onGranularityChange: i, onComparisonToggle: a, order: o, onOrderChange: s, onReorder: c }) {
|
|
3449
|
+
let { t: l } = S(), u = pn("breakdown", (t) => e[t].field, e.length, c), { draggedIndex: d, dropTargetIndex: f } = u, p = V(() => o ? Object.keys(o) : [], [o]), m = V(() => e.find((e) => e.isTimeDimension && e.enableComparison)?.id || null, [e]), h = V(() => e.map((e, n) => {
|
|
3458
3450
|
let r = o?.[e.field] || null, i = r ? p.indexOf(e.field) + 1 : void 0;
|
|
3459
3451
|
return {
|
|
3460
3452
|
breakdown: e,
|
|
3461
|
-
fieldMeta:
|
|
3453
|
+
fieldMeta: hn(e.field, t),
|
|
3462
3454
|
sortDirection: r,
|
|
3463
3455
|
sortPriority: i,
|
|
3464
3456
|
index: n
|
|
@@ -3473,14 +3465,14 @@ var hn = R(function({ breakdowns: e, schema: t, onAdd: n, onRemove: r, onGranula
|
|
|
3473
3465
|
onClick: n,
|
|
3474
3466
|
className: "dc:flex dc:items-center dc:justify-between dc:mb-3 dc:w-full dc:py-1 dc:px-2 dc:-ml-2 dc:rounded-lg hover:bg-dc-primary/10 dc:transition-colors dc:group",
|
|
3475
3467
|
title: "Add breakdown",
|
|
3476
|
-
children: [/* @__PURE__ */ G(P, { children: l("analysis.sections.breakdown") }), /* @__PURE__ */ G(
|
|
3468
|
+
children: [/* @__PURE__ */ G(P, { children: l("analysis.sections.breakdown") }), /* @__PURE__ */ G(mn, { className: "dc:w-5 dc:h-5 text-dc-text-secondary group-hover:text-dc-primary dc:transition-colors" })]
|
|
3477
3469
|
}), /* @__PURE__ */ K("div", {
|
|
3478
3470
|
className: "dc:space-y-2",
|
|
3479
3471
|
onDragLeave: c ? u.handleSectionDragLeave : void 0,
|
|
3480
3472
|
onDragOver: c ? (e) => e.preventDefault() : void 0,
|
|
3481
3473
|
onDrop: c ? u.handleItemDrop : void 0,
|
|
3482
3474
|
children: [
|
|
3483
|
-
h.map(({ breakdown: e, fieldMeta: t, sortDirection: n, sortPriority: o, index: l }) => /* @__PURE__ */ G(
|
|
3475
|
+
h.map(({ breakdown: e, fieldMeta: t, sortDirection: n, sortPriority: o, index: l }) => /* @__PURE__ */ G(un, {
|
|
3484
3476
|
breakdown: e,
|
|
3485
3477
|
fieldMeta: t,
|
|
3486
3478
|
sortDirection: n,
|
|
@@ -3518,7 +3510,7 @@ var hn = R(function({ breakdowns: e, schema: t, onAdd: n, onRemove: r, onGranula
|
|
|
3518
3510
|
});
|
|
3519
3511
|
//#endregion
|
|
3520
3512
|
//#region src/client/components/AnalysisBuilder/RetentionModeContent.tsx
|
|
3521
|
-
function
|
|
3513
|
+
function _n(e) {
|
|
3522
3514
|
return !e || !Array.isArray(e) ? [] : e.map((e) => ({
|
|
3523
3515
|
id: e.field,
|
|
3524
3516
|
field: e.field,
|
|
@@ -3527,18 +3519,18 @@ function gn(e) {
|
|
|
3527
3519
|
enableComparison: !1
|
|
3528
3520
|
}));
|
|
3529
3521
|
}
|
|
3530
|
-
var
|
|
3522
|
+
var vn = R(function({ retentionCube: e = null, retentionBindingKey: t = null, retentionTimeDimension: n = null, retentionDateRange: r = {
|
|
3531
3523
|
start: "",
|
|
3532
3524
|
end: ""
|
|
3533
|
-
}, retentionCohortFilters: i = [], retentionActivityFilters: a = [], retentionBreakdowns: o = [], retentionViewGranularity: s = "week", retentionPeriods: c = 12, retentionType: l = "classic", schema: u = null, onCubeChange: d = () => {}, onBindingKeyChange: f = () => {}, onTimeDimensionChange:
|
|
3534
|
-
let { t: N } =
|
|
3525
|
+
}, retentionCohortFilters: i = [], retentionActivityFilters: a = [], retentionBreakdowns: o = [], retentionViewGranularity: s = "week", retentionPeriods: c = 12, retentionType: l = "classic", schema: u = null, onCubeChange: d = () => {}, onBindingKeyChange: f = () => {}, onTimeDimensionChange: p = () => {}, onDateRangeChange: h = () => {}, onCohortFiltersChange: _ = () => {}, onActivityFiltersChange: v = () => {}, onBreakdownsChange: b = () => {}, onAddBreakdown: x = () => {}, onRemoveBreakdown: C = () => {}, onGranularityChange: w = () => {}, onPeriodsChange: T = () => {}, onRetentionTypeChange: E = () => {}, onOpenFieldModal: O = () => {}, chartType: k = "retentionCombined", onChartTypeChange: A, displayConfig: j, colorPalette: ee, onDisplayConfigChange: M }) {
|
|
3526
|
+
let { t: N } = S(), [te, F] = U("config"), I = j && M, L = V(() => !u || !e ? u : {
|
|
3535
3527
|
...u,
|
|
3536
3528
|
cubes: u.cubes?.filter((t) => t.name === e) || []
|
|
3537
|
-
}, [u, e]),
|
|
3529
|
+
}, [u, e]), R = V(() => _n(o), [o]), B = z((e) => {
|
|
3538
3530
|
C(e);
|
|
3539
|
-
}, [C]),
|
|
3531
|
+
}, [C]), ne = z(() => {
|
|
3540
3532
|
O && O();
|
|
3541
|
-
}, [O]),
|
|
3533
|
+
}, [O]), H = z(() => {}, []);
|
|
3542
3534
|
return /* @__PURE__ */ K("div", {
|
|
3543
3535
|
className: "dc:flex dc:flex-col dc:h-full dc:min-h-0 dc:overflow-hidden",
|
|
3544
3536
|
children: [/* @__PURE__ */ G("div", {
|
|
@@ -3546,20 +3538,20 @@ var _n = R(function({ retentionCube: e = null, retentionBindingKey: t = null, re
|
|
|
3546
3538
|
children: /* @__PURE__ */ K("div", {
|
|
3547
3539
|
className: "dc:flex dc:min-w-max",
|
|
3548
3540
|
children: [/* @__PURE__ */ G("button", {
|
|
3549
|
-
onClick: () =>
|
|
3550
|
-
className: `dc:flex-1 dc:px-4 dc:py-3 dc:text-sm dc:font-medium dc:transition-colors dc:whitespace-nowrap ${
|
|
3541
|
+
onClick: () => F("config"),
|
|
3542
|
+
className: `dc:flex-1 dc:px-4 dc:py-3 dc:text-sm dc:font-medium dc:transition-colors dc:whitespace-nowrap ${te === "config" ? "text-dc-primary dc:border-b-2 border-dc-primary" : "text-dc-text-secondary hover:text-dc-text"}`,
|
|
3551
3543
|
children: N("retention.tabs.retention")
|
|
3552
3544
|
}), /* @__PURE__ */ G("button", {
|
|
3553
|
-
onClick: () =>
|
|
3554
|
-
disabled: !
|
|
3555
|
-
className: `dc:flex-1 dc:px-4 dc:py-3 dc:text-sm dc:font-medium dc:transition-colors dc:whitespace-nowrap ${
|
|
3556
|
-
title: N(
|
|
3545
|
+
onClick: () => I && F("display"),
|
|
3546
|
+
disabled: !I,
|
|
3547
|
+
className: `dc:flex-1 dc:px-4 dc:py-3 dc:text-sm dc:font-medium dc:transition-colors dc:whitespace-nowrap ${te === "display" ? "text-dc-primary dc:border-b-2 border-dc-primary" : I ? "text-dc-text-secondary hover:text-dc-text" : "text-dc-text-muted dc:cursor-not-allowed dc:opacity-50"}`,
|
|
3548
|
+
title: N(I ? "retention.tabs.displayTitle" : "retention.tabs.displayUnavailable"),
|
|
3557
3549
|
children: N("retention.tabs.display")
|
|
3558
3550
|
})]
|
|
3559
3551
|
})
|
|
3560
|
-
}),
|
|
3552
|
+
}), te === "config" ? /* @__PURE__ */ K("div", {
|
|
3561
3553
|
className: "dc:flex dc:flex-col dc:flex-1 dc:min-h-0",
|
|
3562
|
-
children: [/* @__PURE__ */ G(
|
|
3554
|
+
children: [/* @__PURE__ */ G(cn, {
|
|
3563
3555
|
selectedCube: e,
|
|
3564
3556
|
bindingKey: t,
|
|
3565
3557
|
timeDimension: n,
|
|
@@ -3567,7 +3559,7 @@ var _n = R(function({ retentionCube: e = null, retentionBindingKey: t = null, re
|
|
|
3567
3559
|
schema: u,
|
|
3568
3560
|
onCubeChange: d,
|
|
3569
3561
|
onBindingKeyChange: f,
|
|
3570
|
-
onTimeDimensionChange:
|
|
3562
|
+
onTimeDimensionChange: p
|
|
3571
3563
|
}), /* @__PURE__ */ K("div", {
|
|
3572
3564
|
className: "dc:flex-1 dc:min-h-0 dc:overflow-auto dc:p-4 dc:space-y-6",
|
|
3573
3565
|
children: [
|
|
@@ -3577,9 +3569,9 @@ var _n = R(function({ retentionCube: e = null, retentionBindingKey: t = null, re
|
|
|
3577
3569
|
className: "dc:text-xs text-dc-text-muted dc:mb-3",
|
|
3578
3570
|
children: N("retention.dateRange.description")
|
|
3579
3571
|
}),
|
|
3580
|
-
/* @__PURE__ */ G(
|
|
3572
|
+
/* @__PURE__ */ G(sn, {
|
|
3581
3573
|
dateRange: r,
|
|
3582
|
-
onDateRangeChange:
|
|
3574
|
+
onDateRangeChange: h
|
|
3583
3575
|
})
|
|
3584
3576
|
] }),
|
|
3585
3577
|
/* @__PURE__ */ K("div", { children: [
|
|
@@ -3588,9 +3580,9 @@ var _n = R(function({ retentionCube: e = null, retentionBindingKey: t = null, re
|
|
|
3588
3580
|
className: "dc:text-xs text-dc-text-muted dc:mb-3",
|
|
3589
3581
|
children: N("retention.cohortFilter.description")
|
|
3590
3582
|
}),
|
|
3591
|
-
/* @__PURE__ */ G(
|
|
3583
|
+
/* @__PURE__ */ G(D, {
|
|
3592
3584
|
filters: i,
|
|
3593
|
-
schema:
|
|
3585
|
+
schema: L,
|
|
3594
3586
|
onFiltersChange: _,
|
|
3595
3587
|
dimensionsOnly: !0
|
|
3596
3588
|
})
|
|
@@ -3601,10 +3593,10 @@ var _n = R(function({ retentionCube: e = null, retentionBindingKey: t = null, re
|
|
|
3601
3593
|
className: "dc:text-xs text-dc-text-muted dc:mb-3",
|
|
3602
3594
|
children: N("retention.returnFilter.description")
|
|
3603
3595
|
}),
|
|
3604
|
-
/* @__PURE__ */ G(
|
|
3596
|
+
/* @__PURE__ */ G(D, {
|
|
3605
3597
|
filters: a,
|
|
3606
|
-
schema:
|
|
3607
|
-
onFiltersChange:
|
|
3598
|
+
schema: L,
|
|
3599
|
+
onFiltersChange: v,
|
|
3608
3600
|
dimensionsOnly: !0
|
|
3609
3601
|
})
|
|
3610
3602
|
] }),
|
|
@@ -3614,12 +3606,12 @@ var _n = R(function({ retentionCube: e = null, retentionBindingKey: t = null, re
|
|
|
3614
3606
|
className: "dc:text-xs text-dc-text-muted dc:mb-3",
|
|
3615
3607
|
children: N("retention.breakdown.description")
|
|
3616
3608
|
}),
|
|
3617
|
-
/* @__PURE__ */ G(
|
|
3618
|
-
breakdowns:
|
|
3619
|
-
schema:
|
|
3620
|
-
onAdd:
|
|
3621
|
-
onRemove:
|
|
3622
|
-
onGranularityChange:
|
|
3609
|
+
/* @__PURE__ */ G(gn, {
|
|
3610
|
+
breakdowns: R,
|
|
3611
|
+
schema: L,
|
|
3612
|
+
onAdd: ne,
|
|
3613
|
+
onRemove: B,
|
|
3614
|
+
onGranularityChange: H
|
|
3623
3615
|
})
|
|
3624
3616
|
] }),
|
|
3625
3617
|
/* @__PURE__ */ K("div", { children: [
|
|
@@ -3636,7 +3628,7 @@ var _n = R(function({ retentionCube: e = null, retentionBindingKey: t = null, re
|
|
|
3636
3628
|
children: N("retention.settings.granularityLabel")
|
|
3637
3629
|
}), /* @__PURE__ */ G("div", {
|
|
3638
3630
|
className: "dc:flex dc:gap-2",
|
|
3639
|
-
children:
|
|
3631
|
+
children: y.map((e) => /* @__PURE__ */ G("button", {
|
|
3640
3632
|
type: "button",
|
|
3641
3633
|
onClick: () => w(e.value),
|
|
3642
3634
|
className: `dc:flex-1 dc:px-3 dc:py-2 dc:rounded-md dc:border dc:text-sm dc:font-medium dc:transition-colors ${s === e.value ? "border-dc-primary bg-dc-primary/10 text-dc-primary" : "border-dc-border bg-dc-surface hover:bg-dc-surface-hover text-dc-text"}`,
|
|
@@ -3675,9 +3667,9 @@ var _n = R(function({ retentionCube: e = null, retentionBindingKey: t = null, re
|
|
|
3675
3667
|
children: N("retention.settings.retentionTypeLabel")
|
|
3676
3668
|
}), /* @__PURE__ */ G("div", {
|
|
3677
3669
|
className: "dc:flex dc:gap-2",
|
|
3678
|
-
children:
|
|
3670
|
+
children: g.map((e) => /* @__PURE__ */ G("button", {
|
|
3679
3671
|
type: "button",
|
|
3680
|
-
onClick: () =>
|
|
3672
|
+
onClick: () => E(e.value),
|
|
3681
3673
|
className: `dc:flex-1 dc:px-3 dc:py-2 dc:rounded-md dc:border dc:text-sm dc:transition-colors ${l === e.value ? "border-dc-primary bg-dc-primary/10 text-dc-primary" : "border-dc-border bg-dc-surface hover:bg-dc-surface-hover text-dc-text"}`,
|
|
3682
3674
|
children: /* @__PURE__ */ K("div", {
|
|
3683
3675
|
className: "dc:flex dc:flex-col dc:items-center dc:gap-0.5",
|
|
@@ -3696,17 +3688,17 @@ var _n = R(function({ retentionCube: e = null, retentionBindingKey: t = null, re
|
|
|
3696
3688
|
] })
|
|
3697
3689
|
]
|
|
3698
3690
|
})]
|
|
3699
|
-
}) :
|
|
3691
|
+
}) : te === "display" && j && M ? /* @__PURE__ */ G("div", {
|
|
3700
3692
|
className: "dc:flex-1 dc:min-h-0 dc:overflow-auto dc:p-4",
|
|
3701
|
-
children: /* @__PURE__ */ G(
|
|
3693
|
+
children: /* @__PURE__ */ G(m, {
|
|
3702
3694
|
chartType: k,
|
|
3703
|
-
displayConfig:
|
|
3704
|
-
colorPalette:
|
|
3695
|
+
displayConfig: j,
|
|
3696
|
+
colorPalette: ee,
|
|
3705
3697
|
onDisplayConfigChange: M
|
|
3706
3698
|
})
|
|
3707
3699
|
}) : null]
|
|
3708
3700
|
});
|
|
3709
|
-
}),
|
|
3701
|
+
}), yn = R(function({ metric: e, fieldMeta: n, onRemove: r, sortDirection: i, sortPriority: a, onToggleSort: o, index: c, isDragging: l, onDragStart: u, onDragEnd: d }) {
|
|
3710
3702
|
let f = s("close"), p = t(n?.type || "count") || s("measure"), m = n?.shortTitle || n?.title || e.field.split(".").pop() || e.field, h = e.field.split(".")[0], g = typeof c == "number" && u && d;
|
|
3711
3703
|
return /* @__PURE__ */ K("div", {
|
|
3712
3704
|
className: `dc:flex dc:items-center dc:gap-2 dc:p-2 bg-dc-surface-secondary dc:rounded-lg dc:group hover:bg-dc-surface-tertiary dc:transition-all dc:duration-150 ${g ? "dc:cursor-grab dc:active:cursor-grabbing" : ""} ${l ? "dc:opacity-30" : ""}`,
|
|
@@ -3729,7 +3721,7 @@ var _n = R(function({ retentionCube: e = null, retentionBindingKey: t = null, re
|
|
|
3729
3721
|
children: h
|
|
3730
3722
|
})]
|
|
3731
3723
|
}),
|
|
3732
|
-
o && /* @__PURE__ */ G(
|
|
3724
|
+
o && /* @__PURE__ */ G(rt, {
|
|
3733
3725
|
sortDirection: i,
|
|
3734
3726
|
sortPriority: a,
|
|
3735
3727
|
onToggleSort: o
|
|
@@ -3742,7 +3734,7 @@ var _n = R(function({ retentionCube: e = null, retentionBindingKey: t = null, re
|
|
|
3742
3734
|
})
|
|
3743
3735
|
]
|
|
3744
3736
|
});
|
|
3745
|
-
}),
|
|
3737
|
+
}), bn = R(function({ metric: e, fieldMeta: t, sortDirection: n, sortPriority: r, index: i, transform: a, showGapBefore: o, isAnyDragging: s, isDragging: c, onRemove: l, onOrderChange: u, onReorder: d, onItemDragOver: f, onItemDrop: p, onDragStart: m, onDragEnd: h }) {
|
|
3746
3738
|
return /* @__PURE__ */ K("div", {
|
|
3747
3739
|
className: "dc:relative",
|
|
3748
3740
|
style: {
|
|
@@ -3754,14 +3746,14 @@ var _n = R(function({ retentionCube: e = null, retentionBindingKey: t = null, re
|
|
|
3754
3746
|
children: [o && /* @__PURE__ */ G("div", {
|
|
3755
3747
|
className: "dc:absolute dc:-top-5 dc:left-0 dc:right-0 dc:flex dc:items-center dc:justify-center dc:pointer-events-none dc:z-10",
|
|
3756
3748
|
children: /* @__PURE__ */ G("div", { className: "dc:h-0.5 dc:w-full bg-dc-primary dc:rounded-full" })
|
|
3757
|
-
}), /* @__PURE__ */ G(
|
|
3749
|
+
}), /* @__PURE__ */ G(yn, {
|
|
3758
3750
|
metric: e,
|
|
3759
3751
|
fieldMeta: t,
|
|
3760
3752
|
onRemove: () => l(e.id),
|
|
3761
3753
|
sortDirection: n,
|
|
3762
3754
|
sortPriority: r,
|
|
3763
3755
|
onToggleSort: u ? () => {
|
|
3764
|
-
u(e.field,
|
|
3756
|
+
u(e.field, ln(n));
|
|
3765
3757
|
} : void 0,
|
|
3766
3758
|
index: i,
|
|
3767
3759
|
isDragging: c,
|
|
@@ -3769,18 +3761,18 @@ var _n = R(function({ retentionCube: e = null, retentionBindingKey: t = null, re
|
|
|
3769
3761
|
onDragEnd: d ? h : void 0
|
|
3770
3762
|
})]
|
|
3771
3763
|
});
|
|
3772
|
-
}),
|
|
3773
|
-
function
|
|
3764
|
+
}), xn = s("add");
|
|
3765
|
+
function Sn(e, t) {
|
|
3774
3766
|
if (!t?.cubes) return null;
|
|
3775
3767
|
let [n] = e.split("."), r = t.cubes.find((e) => e.name === n);
|
|
3776
3768
|
return r && r.measures?.find((t) => t.name === e) || null;
|
|
3777
3769
|
}
|
|
3778
|
-
var
|
|
3779
|
-
let { t: s } =
|
|
3770
|
+
var Cn = R(function({ metrics: e, schema: t, onAdd: n, onRemove: r, order: i, onOrderChange: a, onReorder: o }) {
|
|
3771
|
+
let { t: s } = S(), c = pn("metric", (t) => e[t].field, e.length, o), { draggedIndex: l, dropTargetIndex: u } = c, d = V(() => i ? Object.keys(i) : [], [i]), f = V(() => e.map((e, n) => {
|
|
3780
3772
|
let r = i?.[e.field] || null, a = r ? d.indexOf(e.field) + 1 : void 0;
|
|
3781
3773
|
return {
|
|
3782
3774
|
metric: e,
|
|
3783
|
-
fieldMeta:
|
|
3775
|
+
fieldMeta: Sn(e.field, t),
|
|
3784
3776
|
sortDirection: r,
|
|
3785
3777
|
sortPriority: a,
|
|
3786
3778
|
index: n
|
|
@@ -3795,14 +3787,14 @@ var Sn = R(function({ metrics: e, schema: t, onAdd: n, onRemove: r, order: i, on
|
|
|
3795
3787
|
onClick: n,
|
|
3796
3788
|
className: "dc:flex dc:items-center dc:justify-between dc:mb-3 dc:w-full dc:py-1 dc:px-2 dc:-ml-2 dc:rounded-lg hover:bg-dc-primary/10 dc:transition-colors dc:group",
|
|
3797
3789
|
title: "Add metric",
|
|
3798
|
-
children: [/* @__PURE__ */ G(P, { children: s("analysis.sections.metrics") }), /* @__PURE__ */ G(
|
|
3790
|
+
children: [/* @__PURE__ */ G(P, { children: s("analysis.sections.metrics") }), /* @__PURE__ */ G(xn, { className: "dc:w-5 dc:h-5 text-dc-text-secondary group-hover:text-dc-primary dc:transition-colors" })]
|
|
3799
3791
|
}), /* @__PURE__ */ K("div", {
|
|
3800
3792
|
className: "dc:space-y-2",
|
|
3801
3793
|
onDragLeave: o ? c.handleSectionDragLeave : void 0,
|
|
3802
3794
|
onDragOver: o ? (e) => e.preventDefault() : void 0,
|
|
3803
3795
|
onDrop: o ? c.handleItemDrop : void 0,
|
|
3804
3796
|
children: [
|
|
3805
|
-
f.map(({ metric: e, fieldMeta: t, sortDirection: n, sortPriority: i, index: s }) => /* @__PURE__ */ G(
|
|
3797
|
+
f.map(({ metric: e, fieldMeta: t, sortDirection: n, sortPriority: i, index: s }) => /* @__PURE__ */ G(bn, {
|
|
3806
3798
|
metric: e,
|
|
3807
3799
|
fieldMeta: t,
|
|
3808
3800
|
sortDirection: n,
|
|
@@ -3834,7 +3826,7 @@ var Sn = R(function({ metrics: e, schema: t, onAdd: n, onRemove: r, order: i, on
|
|
|
3834
3826
|
})
|
|
3835
3827
|
]
|
|
3836
3828
|
})] });
|
|
3837
|
-
}),
|
|
3829
|
+
}), wn = [
|
|
3838
3830
|
5,
|
|
3839
3831
|
10,
|
|
3840
3832
|
25,
|
|
@@ -3843,12 +3835,12 @@ var Sn = R(function({ metrics: e, schema: t, onAdd: n, onRemove: r, order: i, on
|
|
|
3843
3835
|
500,
|
|
3844
3836
|
1e3
|
|
3845
3837
|
];
|
|
3846
|
-
function
|
|
3847
|
-
let { t: n } =
|
|
3838
|
+
function Tn({ limit: e, onLimitChange: t }) {
|
|
3839
|
+
let { t: n } = S(), r = e != null && !wn.includes(e), [i, a] = U(r), [o, s] = U(r ? String(e) : ""), c = H(null);
|
|
3848
3840
|
B(() => {
|
|
3849
3841
|
i && c.current && (c.current.focus(), c.current.select());
|
|
3850
3842
|
}, [i]), B(() => {
|
|
3851
|
-
e != null && !
|
|
3843
|
+
e != null && !wn.includes(e) && (s(String(e)), a(!0));
|
|
3852
3844
|
}, [e]);
|
|
3853
3845
|
let l = (e) => {
|
|
3854
3846
|
a(!1), t(e);
|
|
@@ -3886,7 +3878,7 @@ function wn({ limit: e, onLimitChange: t }) {
|
|
|
3886
3878
|
})]
|
|
3887
3879
|
}), /* @__PURE__ */ K("div", {
|
|
3888
3880
|
className: "dc:flex dc:flex-wrap dc:gap-1",
|
|
3889
|
-
children: [
|
|
3881
|
+
children: [wn.map((t) => /* @__PURE__ */ G("button", {
|
|
3890
3882
|
onClick: () => l(t),
|
|
3891
3883
|
className: `dc:px-2 dc:py-0.5 dc:text-xs dc:rounded-sm dc:border dc:transition-colors ${e === t && !i ? "bg-dc-primary/10 border-dc-primary text-dc-primary dc:font-medium" : "border-dc-border text-dc-text-secondary dc:hover:border-dc-primary/50 dc:hover:text-dc-primary"}`,
|
|
3892
3884
|
children: t >= 1e3 ? `${t / 1e3}k` : t
|
|
@@ -3911,47 +3903,47 @@ function wn({ limit: e, onLimitChange: t }) {
|
|
|
3911
3903
|
}
|
|
3912
3904
|
//#endregion
|
|
3913
3905
|
//#region src/client/components/AnalysisBuilder/AnalysisAxisDropZone.tsx
|
|
3914
|
-
var
|
|
3915
|
-
function
|
|
3916
|
-
let { t: p } =
|
|
3906
|
+
var En = s("close"), Dn = s("dimension"), On = s("timeDimension"), kn = s("measure");
|
|
3907
|
+
function An({ config: e, fields: n, onDrop: r, onRemove: i, onDragStart: a, onDragEnd: o, onDragOver: s, onReorder: c, draggedItem: l, getFieldMeta: u, yAxisAssignment: d, onYAxisAssignmentChange: f }) {
|
|
3908
|
+
let { t: p } = S(), { key: m, label: h, description: g, mandatory: _, maxItems: v, emptyText: y } = e, [b, x] = U(null), [C, w] = U(!1), [T, E] = U(!1), D = H(null), O = H(null), k = H(n);
|
|
3917
3909
|
k.current = n;
|
|
3918
|
-
let A = H(null),
|
|
3910
|
+
let A = H(null), j = () => {
|
|
3919
3911
|
let e = n.length;
|
|
3920
3912
|
return l && l.fromAxis === m && (e = Math.max(0, n.length - 1)), !v || e < v;
|
|
3921
|
-
},
|
|
3913
|
+
}, ee = () => {
|
|
3922
3914
|
let e = n.length;
|
|
3923
3915
|
return l && l.fromAxis === m && (e = Math.max(0, n.length - 1)), v && e >= v;
|
|
3924
|
-
}, M =
|
|
3916
|
+
}, M = j(), N = ee();
|
|
3925
3917
|
B(() => {
|
|
3926
3918
|
let e = () => {
|
|
3927
|
-
|
|
3919
|
+
x(null), A.current = null, w(!1), E(!1), D.current = null;
|
|
3928
3920
|
};
|
|
3929
3921
|
return document.addEventListener("dragend", e), () => {
|
|
3930
3922
|
document.removeEventListener("dragend", e);
|
|
3931
3923
|
};
|
|
3932
3924
|
}, []), B(() => {
|
|
3933
|
-
l ? l.fromAxis === m ? l.fromAxis === m && l.fromIndex !== void 0 && w(!1) : (E(!1),
|
|
3925
|
+
l ? l.fromAxis === m ? l.fromAxis === m && l.fromIndex !== void 0 && w(!1) : (E(!1), x(null), A.current = null) : (x(null), A.current = null, w(!1), E(!1));
|
|
3934
3926
|
}, [l, m]);
|
|
3935
|
-
let
|
|
3927
|
+
let te = z((e, t) => {
|
|
3936
3928
|
if (!l || l.fromAxis !== m || l.fromIndex === void 0) return;
|
|
3937
3929
|
e.preventDefault(), e.stopPropagation();
|
|
3938
3930
|
let n = e.currentTarget.getBoundingClientRect(), r = e.clientY - n.top < n.height / 2, i = l.fromIndex, a = r ? t : t + 1;
|
|
3939
|
-
a === i || a === i + 1 ? (
|
|
3940
|
-
}, [l, m]),
|
|
3931
|
+
a === i || a === i + 1 ? (x(null), A.current = null) : (x(a), A.current = a, E(!0));
|
|
3932
|
+
}, [l, m]), P = z((e) => {
|
|
3941
3933
|
e.preventDefault();
|
|
3942
3934
|
let t = A.current;
|
|
3943
3935
|
if (!(l && l.fromAxis === m && l.fromIndex !== void 0 && t !== null)) {
|
|
3944
|
-
|
|
3936
|
+
x(null), A.current = null, E(!1);
|
|
3945
3937
|
return;
|
|
3946
3938
|
}
|
|
3947
3939
|
e.stopPropagation();
|
|
3948
3940
|
let n = l.fromIndex, r = t > n ? t - 1 : t;
|
|
3949
|
-
c && r !== n && c(n, r, m),
|
|
3941
|
+
c && r !== n && c(n, r, m), x(null), A.current = null, E(!1);
|
|
3950
3942
|
}, [
|
|
3951
3943
|
l,
|
|
3952
3944
|
m,
|
|
3953
3945
|
c
|
|
3954
|
-
]),
|
|
3946
|
+
]), F = z((e, t) => {
|
|
3955
3947
|
let n = O.current;
|
|
3956
3948
|
if (n && D.current === t) {
|
|
3957
3949
|
let r = n.getBoundingClientRect();
|
|
@@ -3959,12 +3951,12 @@ function kn({ config: e, fields: n, onDrop: r, onRemove: i, onDragStart: a, onDr
|
|
|
3959
3951
|
k.current.includes(t) && i(t, m);
|
|
3960
3952
|
}, 0);
|
|
3961
3953
|
}
|
|
3962
|
-
D.current = null,
|
|
3954
|
+
D.current = null, x(null), A.current = null, E(!1), o?.(e);
|
|
3963
3955
|
}, [
|
|
3964
3956
|
m,
|
|
3965
3957
|
i,
|
|
3966
3958
|
o
|
|
3967
|
-
]),
|
|
3959
|
+
]), I = z((e) => {
|
|
3968
3960
|
if (!l || l.fromAxis !== m || l.fromIndex === void 0 || b === null) return "";
|
|
3969
3961
|
let t = l.fromIndex;
|
|
3970
3962
|
if (e === t) return "";
|
|
@@ -3976,11 +3968,11 @@ function kn({ config: e, fields: n, onDrop: r, onRemove: i, onDragStart: a, onDr
|
|
|
3976
3968
|
l,
|
|
3977
3969
|
m,
|
|
3978
3970
|
b
|
|
3979
|
-
]),
|
|
3971
|
+
]), L = z((e) => !l || l.fromAxis !== m || b === null ? !1 : e === b, [
|
|
3980
3972
|
l,
|
|
3981
3973
|
m,
|
|
3982
3974
|
b
|
|
3983
|
-
]),
|
|
3975
|
+
]), R = (e) => {
|
|
3984
3976
|
let t = e.split("."), n = t[0] || e, r = t[1] || e;
|
|
3985
3977
|
return {
|
|
3986
3978
|
title: r,
|
|
@@ -3988,9 +3980,9 @@ function kn({ config: e, fields: n, onDrop: r, onRemove: i, onDragStart: a, onDr
|
|
|
3988
3980
|
cubeName: n,
|
|
3989
3981
|
type: "dimension"
|
|
3990
3982
|
};
|
|
3991
|
-
},
|
|
3983
|
+
}, ne = (e) => {
|
|
3992
3984
|
if (e.type === "measure") {
|
|
3993
|
-
let n = t(e.measureType || "count") ||
|
|
3985
|
+
let n = t(e.measureType || "count") || kn;
|
|
3994
3986
|
return /* @__PURE__ */ G("span", {
|
|
3995
3987
|
className: "dc:w-6 dc:h-6 dc:flex dc:items-center dc:justify-center dc:rounded-sm bg-dc-measure text-dc-measure-text dc:flex-shrink-0",
|
|
3996
3988
|
children: /* @__PURE__ */ G(n, { className: "dc:w-4 dc:h-4" })
|
|
@@ -3998,10 +3990,10 @@ function kn({ config: e, fields: n, onDrop: r, onRemove: i, onDragStart: a, onDr
|
|
|
3998
3990
|
}
|
|
3999
3991
|
return e.type === "timeDimension" ? /* @__PURE__ */ G("span", {
|
|
4000
3992
|
className: "dc:w-6 dc:h-6 dc:flex dc:items-center dc:justify-center dc:rounded-sm bg-dc-time-dimension text-dc-time-dimension-text dc:flex-shrink-0",
|
|
4001
|
-
children: /* @__PURE__ */ G(
|
|
3993
|
+
children: /* @__PURE__ */ G(On, { className: "dc:w-4 dc:h-4" })
|
|
4002
3994
|
}) : /* @__PURE__ */ G("span", {
|
|
4003
3995
|
className: "dc:w-6 dc:h-6 dc:flex dc:items-center dc:justify-center dc:rounded-sm bg-dc-dimension text-dc-dimension-text dc:flex-shrink-0",
|
|
4004
|
-
children: /* @__PURE__ */ G(
|
|
3996
|
+
children: /* @__PURE__ */ G(Dn, { className: "dc:w-4 dc:h-4" })
|
|
4005
3997
|
});
|
|
4006
3998
|
};
|
|
4007
3999
|
return /* @__PURE__ */ K("div", {
|
|
@@ -4047,11 +4039,11 @@ function kn({ config: e, fields: n, onDrop: r, onRemove: i, onDragStart: a, onDr
|
|
|
4047
4039
|
l && l.fromAxis === m && e.preventDefault();
|
|
4048
4040
|
},
|
|
4049
4041
|
onDrop: (e) => {
|
|
4050
|
-
l && l.fromAxis === m && l.fromIndex !== void 0 &&
|
|
4042
|
+
l && l.fromAxis === m && l.fromIndex !== void 0 && P(e);
|
|
4051
4043
|
},
|
|
4052
4044
|
children: [
|
|
4053
4045
|
n.map((t, n) => {
|
|
4054
|
-
let r = u ? u(t) :
|
|
4046
|
+
let r = u ? u(t) : R(t), o = l && l.field === t && l.fromAxis === m, s = I(n), c = L(n);
|
|
4055
4047
|
return /* @__PURE__ */ K("div", {
|
|
4056
4048
|
className: "dc:relative",
|
|
4057
4049
|
style: {
|
|
@@ -4066,12 +4058,12 @@ function kn({ config: e, fields: n, onDrop: r, onRemove: i, onDragStart: a, onDr
|
|
|
4066
4058
|
onDragStart: (e) => {
|
|
4067
4059
|
D.current = t, a(e, t, m, n);
|
|
4068
4060
|
},
|
|
4069
|
-
onDragEnd: (e) =>
|
|
4070
|
-
onDragOver: (e) =>
|
|
4071
|
-
onDrop:
|
|
4061
|
+
onDragEnd: (e) => F(e, t),
|
|
4062
|
+
onDragOver: (e) => te(e, n),
|
|
4063
|
+
onDrop: P,
|
|
4072
4064
|
className: `dc:flex dc:items-center dc:gap-2 dc:p-2 bg-dc-surface dc:rounded-lg dc:group hover:bg-dc-surface-tertiary dc:transition-colors dc:cursor-move ${o ? "dc:opacity-30 dc:cursor-grabbing" : ""}`,
|
|
4073
4065
|
children: [
|
|
4074
|
-
|
|
4066
|
+
ne(r),
|
|
4075
4067
|
/* @__PURE__ */ K("div", {
|
|
4076
4068
|
className: "dc:flex-1 dc:min-w-0",
|
|
4077
4069
|
children: [/* @__PURE__ */ G("div", {
|
|
@@ -4097,7 +4089,7 @@ function kn({ config: e, fields: n, onDrop: r, onRemove: i, onDragStart: a, onDr
|
|
|
4097
4089
|
onClick: () => i(t, m),
|
|
4098
4090
|
className: "dc:p-1 text-dc-text-muted hover:text-dc-danger dc:opacity-0 dc:group-hover:opacity-100 dc:transition-opacity dc:flex-shrink-0",
|
|
4099
4091
|
title: `Remove from ${p(h)}`,
|
|
4100
|
-
children: /* @__PURE__ */ G(
|
|
4092
|
+
children: /* @__PURE__ */ G(En, { className: "dc:w-4 dc:h-4" })
|
|
4101
4093
|
})
|
|
4102
4094
|
]
|
|
4103
4095
|
})]
|
|
@@ -4116,10 +4108,10 @@ function kn({ config: e, fields: n, onDrop: r, onRemove: i, onDragStart: a, onDr
|
|
|
4116
4108
|
if (l.fromIndex !== void 0) {
|
|
4117
4109
|
e.preventDefault();
|
|
4118
4110
|
let t = n.length;
|
|
4119
|
-
A.current !== t && l.fromIndex !== t - 1 && (
|
|
4111
|
+
A.current !== t && l.fromIndex !== t - 1 && (x(t), A.current = t, E(!0));
|
|
4120
4112
|
}
|
|
4121
4113
|
},
|
|
4122
|
-
onDrop:
|
|
4114
|
+
onDrop: P
|
|
4123
4115
|
})
|
|
4124
4116
|
]
|
|
4125
4117
|
})
|
|
@@ -4133,13 +4125,13 @@ function kn({ config: e, fields: n, onDrop: r, onRemove: i, onDragStart: a, onDr
|
|
|
4133
4125
|
}
|
|
4134
4126
|
//#endregion
|
|
4135
4127
|
//#region src/client/components/ChartTypeSelector.tsx
|
|
4136
|
-
function
|
|
4128
|
+
function jn(e) {
|
|
4137
4129
|
return o[e]?.label || e;
|
|
4138
4130
|
}
|
|
4139
|
-
function
|
|
4140
|
-
let { t: l } =
|
|
4131
|
+
function Mn({ selectedType: e, onTypeChange: t, className: n = "", compact: i = !1, availability: s, excludeTypes: c = [] }) {
|
|
4132
|
+
let { t: l } = S(), [u, d] = U(!1), f = re(a.subscribe, a.getSnapshot), p = V(() => Object.keys(o).filter((e) => !c.includes(e)).sort((e, t) => jn(e).localeCompare(jn(t))), [c, f]), m = r(e), h = jn(e);
|
|
4141
4133
|
return /* @__PURE__ */ K("div", {
|
|
4142
|
-
className: `${
|
|
4134
|
+
className: `${n} dc:relative`,
|
|
4143
4135
|
children: [/* @__PURE__ */ K("button", {
|
|
4144
4136
|
type: "button",
|
|
4145
4137
|
onClick: () => d(!u),
|
|
@@ -4168,12 +4160,12 @@ function jn({ selectedType: e, onTypeChange: t, className: r = "", compact: i =
|
|
|
4168
4160
|
className: "dc:p-2",
|
|
4169
4161
|
children: /* @__PURE__ */ G("div", {
|
|
4170
4162
|
className: `dc:grid dc:gap-1.5 ${i ? "dc:grid-cols-2" : "dc:grid-cols-2 dc:sm:grid-cols-3 dc:lg:grid-cols-4"}`,
|
|
4171
|
-
children: p.map((
|
|
4172
|
-
let i = o[
|
|
4163
|
+
children: p.map((n) => {
|
|
4164
|
+
let i = o[n], a = r(n), c = jn(n), u = e === n, f = i?.description, p = i?.useCase, m = s?.[n], h = m?.available ?? !0, g = m?.reason, _ = !h && g ? l(g) : [f, p].filter(Boolean).map((e) => l(e)).join(". ");
|
|
4173
4165
|
return /* @__PURE__ */ K("button", {
|
|
4174
4166
|
type: "button",
|
|
4175
4167
|
onClick: () => {
|
|
4176
|
-
h && (t(
|
|
4168
|
+
h && (t(n), d(!1));
|
|
4177
4169
|
},
|
|
4178
4170
|
disabled: !h,
|
|
4179
4171
|
className: `
|
|
@@ -4197,7 +4189,7 @@ function jn({ selectedType: e, onTypeChange: t, className: r = "", compact: i =
|
|
|
4197
4189
|
style: { backgroundColor: "var(--dc-primary)" }
|
|
4198
4190
|
})
|
|
4199
4191
|
})]
|
|
4200
|
-
},
|
|
4192
|
+
}, n);
|
|
4201
4193
|
})
|
|
4202
4194
|
})
|
|
4203
4195
|
})
|
|
@@ -4206,14 +4198,14 @@ function jn({ selectedType: e, onTypeChange: t, className: r = "", compact: i =
|
|
|
4206
4198
|
}
|
|
4207
4199
|
//#endregion
|
|
4208
4200
|
//#region src/client/components/AnalysisBuilder/utils/axisConfigUtils.ts
|
|
4209
|
-
function
|
|
4201
|
+
function Nn(e, t, n) {
|
|
4210
4202
|
let r = e[t];
|
|
4211
4203
|
if (Array.isArray(r)) {
|
|
4212
4204
|
let i = r.filter((e) => e !== n);
|
|
4213
4205
|
i.length === 0 ? delete e[t] : e[t] = i;
|
|
4214
4206
|
} else r === n && delete e[t];
|
|
4215
4207
|
}
|
|
4216
|
-
function
|
|
4208
|
+
function Pn(e, t, n, r) {
|
|
4217
4209
|
if (r) {
|
|
4218
4210
|
e[t] = n;
|
|
4219
4211
|
return;
|
|
@@ -4221,9 +4213,9 @@ function Nn(e, t, n, r) {
|
|
|
4221
4213
|
let i = e[t];
|
|
4222
4214
|
Array.isArray(i) ? i.includes(n) || (e[t] = [...i, n]) : e[t] = [n];
|
|
4223
4215
|
}
|
|
4224
|
-
function
|
|
4216
|
+
function Fn(e, t, n, r, i) {
|
|
4225
4217
|
let a = { ...e };
|
|
4226
|
-
if (n !== "available" && n !== r &&
|
|
4218
|
+
if (n !== "available" && n !== r && Nn(a, n, t), Pn(a, r, t, i?.maxItems === 1), r === "yAxis" && i?.enableDualAxis) {
|
|
4227
4219
|
let e = (Array.isArray(a.yAxis) ? a.yAxis : [t]).indexOf(t);
|
|
4228
4220
|
a.yAxisAssignment?.[t] || (a.yAxisAssignment = {
|
|
4229
4221
|
...a.yAxisAssignment,
|
|
@@ -4232,15 +4224,15 @@ function Pn(e, t, n, r, i) {
|
|
|
4232
4224
|
}
|
|
4233
4225
|
return a;
|
|
4234
4226
|
}
|
|
4235
|
-
function
|
|
4227
|
+
function In(e, t, n) {
|
|
4236
4228
|
let r = { ...e };
|
|
4237
|
-
if (
|
|
4229
|
+
if (Nn(r, n, t), n === "yAxis" && r.yAxisAssignment?.[t]) {
|
|
4238
4230
|
let { [t]: e, ...n } = r.yAxisAssignment;
|
|
4239
4231
|
r.yAxisAssignment = Object.keys(n).length > 0 ? n : void 0;
|
|
4240
4232
|
}
|
|
4241
4233
|
return r;
|
|
4242
4234
|
}
|
|
4243
|
-
function
|
|
4235
|
+
function Ln(e, t, n, r) {
|
|
4244
4236
|
let i = e[r];
|
|
4245
4237
|
if (!Array.isArray(i) || i.length <= 1 || t === n) return null;
|
|
4246
4238
|
let a = { ...e }, o = [...i], [s] = o.splice(t, 1);
|
|
@@ -4248,36 +4240,42 @@ function In(e, t, n, r) {
|
|
|
4248
4240
|
}
|
|
4249
4241
|
//#endregion
|
|
4250
4242
|
//#region src/client/components/AnalysisBuilder/AnalysisChartConfigPanel.tsx
|
|
4251
|
-
var
|
|
4252
|
-
|
|
4253
|
-
|
|
4243
|
+
var Rn = [
|
|
4244
|
+
"funnel",
|
|
4245
|
+
"sankey",
|
|
4246
|
+
"sunburst",
|
|
4247
|
+
"retentionHeatmap",
|
|
4248
|
+
"retentionCombined"
|
|
4249
|
+
], zn = s("measure"), Bn = s("dimension"), Vn = s("timeDimension");
|
|
4250
|
+
function Hn({ chartType: r, chartConfig: i, metrics: a, breakdowns: o, schema: s, chartAvailability: l, onChartTypeChange: u, onChartConfigChange: d, displayConfig: p, colorPalette: m, onDisplayConfigChange: h }) {
|
|
4251
|
+
let { t: g } = S(), { features: _ } = e(), v = V(() => [...Rn, ..._.hiddenChartTypes ?? []], [_.hiddenChartTypes]), [y, b] = U(null), x = V(() => ({
|
|
4254
4252
|
measures: a.map((e) => e.field),
|
|
4255
4253
|
dimensions: o.filter((e) => !e.isTimeDimension).map((e) => e.field),
|
|
4256
4254
|
timeDimensions: o.filter((e) => e.isTimeDimension).map((e) => e.field)
|
|
4257
|
-
}), [a, o]), { config:
|
|
4258
|
-
let t =
|
|
4255
|
+
}), [a, o]), { config: C, loaded: w } = n(r), T = C.skipQuery === !0, E = c(C.displayOptionsConfig, "chart"), D = z((e) => {
|
|
4256
|
+
let t = i[e];
|
|
4259
4257
|
return Array.isArray(t) ? t : typeof t == "string" ? [t] : [];
|
|
4260
|
-
}, [
|
|
4258
|
+
}, [i]);
|
|
4261
4259
|
B(() => {
|
|
4262
|
-
if (!
|
|
4260
|
+
if (!w) return;
|
|
4263
4261
|
let e = [
|
|
4264
|
-
...
|
|
4265
|
-
...
|
|
4266
|
-
...
|
|
4267
|
-
], t = !1,
|
|
4268
|
-
|
|
4269
|
-
let i =
|
|
4270
|
-
a.length !== i.length && (t = !0, a.length === 0 ? delete r
|
|
4271
|
-
}), t &&
|
|
4262
|
+
...x.dimensions,
|
|
4263
|
+
...x.timeDimensions,
|
|
4264
|
+
...x.measures
|
|
4265
|
+
], t = !1, n = { ...i };
|
|
4266
|
+
C.dropZones.forEach((r) => {
|
|
4267
|
+
let i = D(r.key), a = i.filter((t) => e.includes(t));
|
|
4268
|
+
a.length !== i.length && (t = !0, a.length === 0 ? delete n[r.key] : r.maxItems === 1 ? n[r.key] = a[0] : n[r.key] = a);
|
|
4269
|
+
}), t && d(n);
|
|
4272
4270
|
}, [
|
|
4273
|
-
|
|
4274
|
-
|
|
4275
|
-
|
|
4276
|
-
|
|
4277
|
-
|
|
4278
|
-
|
|
4271
|
+
x,
|
|
4272
|
+
i,
|
|
4273
|
+
C.dropZones,
|
|
4274
|
+
d,
|
|
4275
|
+
D,
|
|
4276
|
+
w
|
|
4279
4277
|
]);
|
|
4280
|
-
let
|
|
4278
|
+
let O = (e) => x.measures.includes(e) ? "measure" : x.timeDimensions.includes(e) ? "timeDimension" : "dimension", k = (e) => {
|
|
4281
4279
|
if (!s?.cubes) return null;
|
|
4282
4280
|
let [t] = e.split("."), n = s.cubes.find((e) => e.name === t);
|
|
4283
4281
|
if (!n) return null;
|
|
@@ -4291,8 +4289,8 @@ function Bn({ chartType: e, chartConfig: n, metrics: a, breakdowns: o, schema: s
|
|
|
4291
4289
|
...i,
|
|
4292
4290
|
fieldType: i.type === "time" ? "timeDimension" : "dimension"
|
|
4293
4291
|
} : null;
|
|
4294
|
-
},
|
|
4295
|
-
let t =
|
|
4292
|
+
}, A = (e) => {
|
|
4293
|
+
let t = O(e), n = e.split("."), r = n[0] || e, i = n[1] || e, a = k(e), s = o.find((t) => t.field === e);
|
|
4296
4294
|
return a ? {
|
|
4297
4295
|
title: a.title || i,
|
|
4298
4296
|
shortTitle: a.shortTitle || a.title || i,
|
|
@@ -4310,136 +4308,124 @@ function Bn({ chartType: e, chartConfig: n, metrics: a, breakdowns: o, schema: s
|
|
|
4310
4308
|
cubeName: r,
|
|
4311
4309
|
type: t
|
|
4312
4310
|
};
|
|
4313
|
-
},
|
|
4311
|
+
}, j = (e, t, n, r) => {
|
|
4314
4312
|
e.dataTransfer.setData("text/plain", JSON.stringify({
|
|
4315
4313
|
field: t,
|
|
4316
4314
|
fromAxis: n,
|
|
4317
4315
|
fromIndex: r
|
|
4318
|
-
})),
|
|
4316
|
+
})), b({
|
|
4319
4317
|
field: t,
|
|
4320
4318
|
fromAxis: n,
|
|
4321
4319
|
fromIndex: r
|
|
4322
4320
|
});
|
|
4323
|
-
},
|
|
4321
|
+
}, ee = (e) => {
|
|
4324
4322
|
e.preventDefault();
|
|
4325
|
-
},
|
|
4326
|
-
|
|
4327
|
-
},
|
|
4323
|
+
}, M = () => {
|
|
4324
|
+
b(null);
|
|
4325
|
+
}, N = (e, t) => {
|
|
4328
4326
|
e.preventDefault();
|
|
4329
|
-
let { field:
|
|
4330
|
-
|
|
4331
|
-
},
|
|
4332
|
-
|
|
4333
|
-
},
|
|
4334
|
-
let
|
|
4335
|
-
|
|
4336
|
-
},
|
|
4337
|
-
|
|
4338
|
-
...
|
|
4327
|
+
let { field: n, fromAxis: r } = JSON.parse(e.dataTransfer.getData("text/plain")), a = Fn(i, n, r, t, C.dropZones.find((e) => e.key === t));
|
|
4328
|
+
b(null), d(a);
|
|
4329
|
+
}, te = (e, t) => {
|
|
4330
|
+
d(In(i, e, t));
|
|
4331
|
+
}, F = (e, t, n) => {
|
|
4332
|
+
let r = Ln(i, e, t, n);
|
|
4333
|
+
r && (b(null), d(r));
|
|
4334
|
+
}, I = z((e, t) => {
|
|
4335
|
+
d({
|
|
4336
|
+
...i,
|
|
4339
4337
|
yAxisAssignment: {
|
|
4340
|
-
...
|
|
4338
|
+
...i.yAxisAssignment,
|
|
4341
4339
|
[e]: t
|
|
4342
4340
|
}
|
|
4343
4341
|
});
|
|
4344
|
-
}, [
|
|
4345
|
-
if (!
|
|
4342
|
+
}, [i, d]);
|
|
4343
|
+
if (!w) return /* @__PURE__ */ K("div", {
|
|
4346
4344
|
className: "dc:space-y-6",
|
|
4347
4345
|
children: [/* @__PURE__ */ K("div", { children: [/* @__PURE__ */ G(P, {
|
|
4348
4346
|
className: "dc:mb-2",
|
|
4349
|
-
children:
|
|
4350
|
-
}), /* @__PURE__ */ G(
|
|
4351
|
-
selectedType:
|
|
4352
|
-
onTypeChange:
|
|
4353
|
-
availability:
|
|
4354
|
-
excludeTypes:
|
|
4355
|
-
"funnel",
|
|
4356
|
-
"sankey",
|
|
4357
|
-
"sunburst",
|
|
4358
|
-
"retentionHeatmap",
|
|
4359
|
-
"retentionCombined"
|
|
4360
|
-
],
|
|
4347
|
+
children: g("chart.config.chartType")
|
|
4348
|
+
}), /* @__PURE__ */ G(Mn, {
|
|
4349
|
+
selectedType: r,
|
|
4350
|
+
onTypeChange: u,
|
|
4351
|
+
availability: l,
|
|
4352
|
+
excludeTypes: v,
|
|
4361
4353
|
compact: !0
|
|
4362
4354
|
})] }), /* @__PURE__ */ G("div", {
|
|
4363
4355
|
className: "dc:text-center text-dc-text-muted dc:text-sm dc:py-4",
|
|
4364
|
-
children:
|
|
4356
|
+
children: g("chart.config.loading")
|
|
4365
4357
|
})]
|
|
4366
4358
|
});
|
|
4367
|
-
let
|
|
4359
|
+
let L = (() => {
|
|
4368
4360
|
let e = /* @__PURE__ */ new Set();
|
|
4369
|
-
return
|
|
4370
|
-
|
|
4371
|
-
}),
|
|
4372
|
-
dimensions:
|
|
4373
|
-
timeDimensions:
|
|
4374
|
-
measures:
|
|
4361
|
+
return C.dropZones.forEach((t) => {
|
|
4362
|
+
D(t.key).forEach((t) => e.add(t));
|
|
4363
|
+
}), y && y.fromAxis !== "available" && e.add(y.field), {
|
|
4364
|
+
dimensions: x.dimensions.filter((t) => !e.has(t)),
|
|
4365
|
+
timeDimensions: x.timeDimensions.filter((t) => !e.has(t)),
|
|
4366
|
+
measures: x.measures.filter((t) => !e.has(t))
|
|
4375
4367
|
};
|
|
4376
|
-
})(),
|
|
4368
|
+
})(), R = L.dimensions.length > 0 || L.timeDimensions.length > 0 || L.measures.length > 0;
|
|
4377
4369
|
return /* @__PURE__ */ K("div", {
|
|
4378
4370
|
className: "dc:space-y-6",
|
|
4379
4371
|
children: [
|
|
4380
4372
|
/* @__PURE__ */ K("div", { children: [/* @__PURE__ */ G(P, {
|
|
4381
4373
|
className: "dc:mb-2",
|
|
4382
|
-
children:
|
|
4383
|
-
}), /* @__PURE__ */ G(
|
|
4384
|
-
selectedType:
|
|
4385
|
-
onTypeChange:
|
|
4386
|
-
availability:
|
|
4387
|
-
excludeTypes:
|
|
4388
|
-
"funnel",
|
|
4389
|
-
"sankey",
|
|
4390
|
-
"sunburst",
|
|
4391
|
-
"retentionHeatmap",
|
|
4392
|
-
"retentionCombined"
|
|
4393
|
-
],
|
|
4374
|
+
children: g("chart.config.chartType")
|
|
4375
|
+
}), /* @__PURE__ */ G(Mn, {
|
|
4376
|
+
selectedType: r,
|
|
4377
|
+
onTypeChange: u,
|
|
4378
|
+
availability: l,
|
|
4379
|
+
excludeTypes: v,
|
|
4394
4380
|
compact: !0
|
|
4395
4381
|
})] }),
|
|
4396
|
-
|
|
4382
|
+
p && h && E.length > 0 && /* @__PURE__ */ G("div", {
|
|
4397
4383
|
className: "dc:space-y-2",
|
|
4398
|
-
children:
|
|
4384
|
+
children: E.map((e) => /* @__PURE__ */ G(f, {
|
|
4399
4385
|
option: e,
|
|
4400
|
-
displayConfig:
|
|
4401
|
-
colorPalette:
|
|
4402
|
-
chartConfig:
|
|
4403
|
-
onDisplayConfigChange:
|
|
4386
|
+
displayConfig: p,
|
|
4387
|
+
colorPalette: m,
|
|
4388
|
+
chartConfig: i,
|
|
4389
|
+
onDisplayConfigChange: h
|
|
4404
4390
|
}, e.key))
|
|
4405
4391
|
}),
|
|
4406
|
-
!
|
|
4392
|
+
!T && C.dropZones.length > 0 && /* @__PURE__ */ K("div", { children: [/* @__PURE__ */ G(P, {
|
|
4407
4393
|
className: "dc:mb-2",
|
|
4408
|
-
children:
|
|
4394
|
+
children: g("chart.config.axisConfig")
|
|
4409
4395
|
}), /* @__PURE__ */ G("div", {
|
|
4410
4396
|
className: "dc:space-y-1",
|
|
4411
|
-
children:
|
|
4397
|
+
children: C.dropZones.map((e) => /* @__PURE__ */ G(An, {
|
|
4412
4398
|
config: e,
|
|
4413
|
-
fields:
|
|
4414
|
-
onDrop:
|
|
4415
|
-
onRemove:
|
|
4416
|
-
onDragStart:
|
|
4417
|
-
onDragEnd:
|
|
4418
|
-
onDragOver:
|
|
4419
|
-
onReorder:
|
|
4420
|
-
draggedItem:
|
|
4421
|
-
getFieldMeta:
|
|
4422
|
-
yAxisAssignment:
|
|
4423
|
-
onYAxisAssignmentChange: e.enableDualAxis ?
|
|
4399
|
+
fields: D(e.key),
|
|
4400
|
+
onDrop: N,
|
|
4401
|
+
onRemove: te,
|
|
4402
|
+
onDragStart: j,
|
|
4403
|
+
onDragEnd: M,
|
|
4404
|
+
onDragOver: ee,
|
|
4405
|
+
onReorder: F,
|
|
4406
|
+
draggedItem: y,
|
|
4407
|
+
getFieldMeta: A,
|
|
4408
|
+
yAxisAssignment: i.yAxisAssignment,
|
|
4409
|
+
onYAxisAssignmentChange: e.enableDualAxis ? I : void 0
|
|
4424
4410
|
}, e.key))
|
|
4425
4411
|
})] }),
|
|
4426
|
-
!
|
|
4412
|
+
!T && R && /* @__PURE__ */ K("div", { children: [/* @__PURE__ */ K("div", {
|
|
4427
4413
|
className: "dc:mb-2",
|
|
4428
|
-
children: [/* @__PURE__ */ G(P, { children:
|
|
4414
|
+
children: [/* @__PURE__ */ G(P, { children: g("chart.config.unassigned") }), /* @__PURE__ */ G("div", {
|
|
4429
4415
|
className: "dc:text-xs text-dc-text-muted dc:mt-0.5",
|
|
4430
|
-
children:
|
|
4416
|
+
children: g("chart.config.unassignedHint")
|
|
4431
4417
|
})]
|
|
4432
4418
|
}), /* @__PURE__ */ G("div", {
|
|
4433
4419
|
className: "dc:border-2 dc:border-dashed border-dc-border dc:rounded-lg dc:p-2 bg-dc-surface-secondary",
|
|
4434
4420
|
children: /* @__PURE__ */ K("div", {
|
|
4435
4421
|
className: "dc:space-y-2",
|
|
4436
4422
|
children: [
|
|
4437
|
-
|
|
4438
|
-
let n =
|
|
4423
|
+
L.measures.map((e) => {
|
|
4424
|
+
let n = A(e), r = y && y.field === e && y.fromAxis === "available", i = t(n.measureType || "count") || zn;
|
|
4439
4425
|
return /* @__PURE__ */ K("div", {
|
|
4440
4426
|
draggable: !0,
|
|
4441
|
-
onDragStart: (t) =>
|
|
4442
|
-
onDragEnd:
|
|
4427
|
+
onDragStart: (t) => j(t, e, "available"),
|
|
4428
|
+
onDragEnd: M,
|
|
4443
4429
|
className: `dc:flex dc:items-center dc:gap-2 dc:p-2 bg-dc-surface dc:rounded-lg hover:bg-dc-surface-tertiary dc:transition-colors dc:cursor-move ${r ? "dc:opacity-50 dc:cursor-grabbing" : ""}`,
|
|
4444
4430
|
title: e,
|
|
4445
4431
|
children: [/* @__PURE__ */ G("span", {
|
|
@@ -4457,17 +4443,17 @@ function Bn({ chartType: e, chartConfig: n, metrics: a, breakdowns: o, schema: s
|
|
|
4457
4443
|
})]
|
|
4458
4444
|
}, e);
|
|
4459
4445
|
}),
|
|
4460
|
-
|
|
4461
|
-
let t =
|
|
4446
|
+
L.dimensions.map((e) => {
|
|
4447
|
+
let t = A(e);
|
|
4462
4448
|
return /* @__PURE__ */ K("div", {
|
|
4463
4449
|
draggable: !0,
|
|
4464
|
-
onDragStart: (t) =>
|
|
4465
|
-
onDragEnd:
|
|
4466
|
-
className: `dc:flex dc:items-center dc:gap-2 dc:p-2 bg-dc-surface dc:rounded-lg hover:bg-dc-surface-tertiary dc:transition-colors dc:cursor-move ${
|
|
4450
|
+
onDragStart: (t) => j(t, e, "available"),
|
|
4451
|
+
onDragEnd: M,
|
|
4452
|
+
className: `dc:flex dc:items-center dc:gap-2 dc:p-2 bg-dc-surface dc:rounded-lg hover:bg-dc-surface-tertiary dc:transition-colors dc:cursor-move ${y && y.field === e && y.fromAxis === "available" ? "dc:opacity-50 dc:cursor-grabbing" : ""}`,
|
|
4467
4453
|
title: e,
|
|
4468
4454
|
children: [/* @__PURE__ */ G("span", {
|
|
4469
4455
|
className: "dc:w-6 dc:h-6 dc:flex dc:items-center dc:justify-center dc:rounded-sm bg-dc-dimension text-dc-dimension-text dc:flex-shrink-0",
|
|
4470
|
-
children: /* @__PURE__ */ G(
|
|
4456
|
+
children: /* @__PURE__ */ G(Bn, { className: "dc:w-4 dc:h-4" })
|
|
4471
4457
|
}), /* @__PURE__ */ K("div", {
|
|
4472
4458
|
className: "dc:flex-1 dc:min-w-0",
|
|
4473
4459
|
children: [/* @__PURE__ */ G("div", {
|
|
@@ -4480,17 +4466,17 @@ function Bn({ chartType: e, chartConfig: n, metrics: a, breakdowns: o, schema: s
|
|
|
4480
4466
|
})]
|
|
4481
4467
|
}, e);
|
|
4482
4468
|
}),
|
|
4483
|
-
|
|
4484
|
-
let t =
|
|
4469
|
+
L.timeDimensions.map((e) => {
|
|
4470
|
+
let t = A(e);
|
|
4485
4471
|
return /* @__PURE__ */ K("div", {
|
|
4486
4472
|
draggable: !0,
|
|
4487
|
-
onDragStart: (t) =>
|
|
4488
|
-
onDragEnd:
|
|
4489
|
-
className: `dc:flex dc:items-center dc:gap-2 dc:p-2 bg-dc-surface dc:rounded-lg hover:bg-dc-surface-tertiary dc:transition-colors dc:cursor-move ${
|
|
4473
|
+
onDragStart: (t) => j(t, e, "available"),
|
|
4474
|
+
onDragEnd: M,
|
|
4475
|
+
className: `dc:flex dc:items-center dc:gap-2 dc:p-2 bg-dc-surface dc:rounded-lg hover:bg-dc-surface-tertiary dc:transition-colors dc:cursor-move ${y && y.field === e && y.fromAxis === "available" ? "dc:opacity-50 dc:cursor-grabbing" : ""}`,
|
|
4490
4476
|
title: e,
|
|
4491
4477
|
children: [/* @__PURE__ */ G("span", {
|
|
4492
4478
|
className: "dc:w-6 dc:h-6 dc:flex dc:items-center dc:justify-center dc:rounded-sm bg-dc-time-dimension text-dc-time-dimension-text dc:flex-shrink-0",
|
|
4493
|
-
children: /* @__PURE__ */ G(
|
|
4479
|
+
children: /* @__PURE__ */ G(Vn, { className: "dc:w-4 dc:h-4" })
|
|
4494
4480
|
}), /* @__PURE__ */ K("div", {
|
|
4495
4481
|
className: "dc:flex-1 dc:min-w-0",
|
|
4496
4482
|
children: [/* @__PURE__ */ G("div", {
|
|
@@ -4506,28 +4492,28 @@ function Bn({ chartType: e, chartConfig: n, metrics: a, breakdowns: o, schema: s
|
|
|
4506
4492
|
]
|
|
4507
4493
|
})
|
|
4508
4494
|
})] }),
|
|
4509
|
-
!
|
|
4495
|
+
!T && x.measures.length === 0 && x.dimensions.length === 0 && x.timeDimensions.length === 0 && /* @__PURE__ */ G("div", {
|
|
4510
4496
|
className: "dc:text-center text-dc-text-muted dc:text-sm dc:py-4",
|
|
4511
|
-
children: /* @__PURE__ */ G("p", { children:
|
|
4497
|
+
children: /* @__PURE__ */ G("p", { children: g("chart.config.noFields") })
|
|
4512
4498
|
})
|
|
4513
4499
|
]
|
|
4514
4500
|
});
|
|
4515
4501
|
}
|
|
4516
4502
|
//#endregion
|
|
4517
4503
|
//#region src/client/components/AnalysisBuilder/AnalysisQueryPanelParts.tsx
|
|
4518
|
-
var
|
|
4519
|
-
function
|
|
4504
|
+
var Un = s("add"), Wn = s("close"), Gn = s("info"), Kn = s("warning"), qn = s("link");
|
|
4505
|
+
function Jn(e) {
|
|
4520
4506
|
return e.analysisType === "funnel" && !!e.onFunnelCubeChange && !!e.onAddFunnelStep && !!e.onRemoveFunnelStep && !!e.onUpdateFunnelStep && !!e.onSelectFunnelStep && !!e.onReorderFunnelSteps && !!e.onFunnelTimeDimensionChange && !!e.onFunnelBindingKeyChange;
|
|
4521
4507
|
}
|
|
4522
|
-
function
|
|
4508
|
+
function Yn(e) {
|
|
4523
4509
|
return e.analysisType === "flow" && !!e.onFlowCubeChange && !!e.onFlowBindingKeyChange && !!e.onFlowTimeDimensionChange && !!e.onEventDimensionChange && !!e.onStartingStepFiltersChange && !!e.onStepsBeforeChange && !!e.onStepsAfterChange && !!e.startingStep;
|
|
4524
4510
|
}
|
|
4525
|
-
function
|
|
4526
|
-
return
|
|
4511
|
+
function Xn(e) {
|
|
4512
|
+
return Jn(e) || Yn(e) || e.analysisType === "retention";
|
|
4527
4513
|
}
|
|
4528
|
-
function
|
|
4514
|
+
function Zn(e) {
|
|
4529
4515
|
let { schema: t, colorPalette: n, funnelCube: r = null, funnelSteps: i = [], activeFunnelStepIndex: a = 0, funnelTimeDimension: o, funnelBindingKey: s, onFunnelCubeChange: c, onAddFunnelStep: l, onRemoveFunnelStep: u, onUpdateFunnelStep: d, onSelectFunnelStep: f, onReorderFunnelSteps: p, onFunnelTimeDimensionChange: m, onFunnelBindingKeyChange: h, funnelDisplayConfig: g, onFunnelDisplayConfigChange: _ } = e;
|
|
4530
|
-
return /* @__PURE__ */ G(
|
|
4516
|
+
return /* @__PURE__ */ G(At, {
|
|
4531
4517
|
funnelCube: r,
|
|
4532
4518
|
funnelSteps: i,
|
|
4533
4519
|
activeFunnelStepIndex: a,
|
|
@@ -4548,9 +4534,9 @@ function Yn(e) {
|
|
|
4548
4534
|
onDisplayConfigChange: _
|
|
4549
4535
|
});
|
|
4550
4536
|
}
|
|
4551
|
-
function
|
|
4537
|
+
function Qn(e) {
|
|
4552
4538
|
let { schema: t, colorPalette: n, chartType: r, onChartTypeChange: i, flowCube: a, flowBindingKey: o, flowTimeDimension: s, eventDimension: c, startingStep: l, stepsBefore: u = 3, stepsAfter: d = 3, flowJoinStrategy: f = "auto", onFlowCubeChange: p, onFlowBindingKeyChange: m, onFlowTimeDimensionChange: h, onEventDimensionChange: g, onStartingStepFiltersChange: _, onStepsBeforeChange: v, onStepsAfterChange: y, onFlowJoinStrategyChange: b, flowDisplayConfig: x, onFlowDisplayConfigChange: S } = e;
|
|
4553
|
-
return /* @__PURE__ */ G(
|
|
4539
|
+
return /* @__PURE__ */ G(qt, {
|
|
4554
4540
|
flowCube: a ?? null,
|
|
4555
4541
|
flowBindingKey: o ?? null,
|
|
4556
4542
|
flowTimeDimension: s ?? null,
|
|
@@ -4575,9 +4561,9 @@ function Xn(e) {
|
|
|
4575
4561
|
onDisplayConfigChange: S
|
|
4576
4562
|
});
|
|
4577
4563
|
}
|
|
4578
|
-
function
|
|
4564
|
+
function $n(e) {
|
|
4579
4565
|
let { schema: t, colorPalette: n, chartType: r, onAddBreakdown: i, retentionCube: a, retentionBindingKey: o, retentionTimeDimension: s, retentionDateRange: c, retentionCohortFilters: l = [], retentionActivityFilters: u = [], retentionBreakdowns: d = [], retentionViewGranularity: f = "week", retentionPeriods: p = 12, retentionType: m = "classic", onRetentionCubeChange: h, onRetentionBindingKeyChange: g, onRetentionTimeDimensionChange: _, onRetentionDateRangeChange: v, onRetentionCohortFiltersChange: y, onRetentionActivityFiltersChange: b, onRetentionBreakdownsChange: x, onAddRetentionBreakdown: S, onRemoveRetentionBreakdown: C, onRetentionViewGranularityChange: w, onRetentionPeriodsChange: T, onRetentionTypeChange: E, retentionDisplayConfig: D, onRetentionDisplayConfigChange: O } = e, k = () => {};
|
|
4580
|
-
return /* @__PURE__ */ G(
|
|
4566
|
+
return /* @__PURE__ */ G(vn, {
|
|
4581
4567
|
retentionCube: a ?? null,
|
|
4582
4568
|
retentionBindingKey: o ?? null,
|
|
4583
4569
|
retentionTimeDimension: s ?? null,
|
|
@@ -4611,11 +4597,11 @@ function Zn(e) {
|
|
|
4611
4597
|
onDisplayConfigChange: O
|
|
4612
4598
|
});
|
|
4613
4599
|
}
|
|
4614
|
-
function
|
|
4615
|
-
return
|
|
4600
|
+
function er(e) {
|
|
4601
|
+
return Jn(e) ? /* @__PURE__ */ G(Zn, { ...e }) : Yn(e) ? /* @__PURE__ */ G(Qn, { ...e }) : e.analysisType === "retention" ? /* @__PURE__ */ G($n, { ...e }) : null;
|
|
4616
4602
|
}
|
|
4617
|
-
function
|
|
4618
|
-
let { t: l } =
|
|
4603
|
+
function tr({ isMultiQuery: e, queryCount: t, activeQueryIndex: n, activeTab: r, onActiveTabChange: i, onAddQuery: a, getQueryTabLabel: o, handleQueryTabClick: s, handleRemoveQuery: c }) {
|
|
4604
|
+
let { t: l } = S();
|
|
4619
4605
|
return e ? /* @__PURE__ */ K("div", {
|
|
4620
4606
|
className: "dc:flex dc:min-w-max",
|
|
4621
4607
|
children: [Array.from({ length: t }).map((e, t) => /* @__PURE__ */ K("button", {
|
|
@@ -4629,14 +4615,14 @@ function $n({ isMultiQuery: e, queryCount: t, activeQueryIndex: n, activeTab: r,
|
|
|
4629
4615
|
className: "dc:p-0.5 dc:rounded-sm hover:bg-dc-danger-bg hover:text-dc-error dc:transition-colors dc:ml-0.5",
|
|
4630
4616
|
title: l("analysis.multiQuery.removeQuery"),
|
|
4631
4617
|
"aria-label": `Remove ${o(t)}`,
|
|
4632
|
-
children: /* @__PURE__ */ G(
|
|
4618
|
+
children: /* @__PURE__ */ G(Wn, { className: "dc:w-3 dc:h-3" })
|
|
4633
4619
|
})]
|
|
4634
4620
|
}, `q${t}`)), /* @__PURE__ */ G("button", {
|
|
4635
4621
|
onClick: a,
|
|
4636
4622
|
className: "dc:flex dc:items-center dc:justify-center dc:px-2 dc:py-3 text-dc-text-secondary hover:text-dc-text dc:transition-colors dc:flex-shrink-0 dc:whitespace-nowrap",
|
|
4637
4623
|
title: l("analysis.multiQuery.addQuery"),
|
|
4638
4624
|
"aria-label": l("analysis.multiQuery.addQuery"),
|
|
4639
|
-
children: /* @__PURE__ */ G(
|
|
4625
|
+
children: /* @__PURE__ */ G(Un, { className: "dc:w-4 dc:h-4" })
|
|
4640
4626
|
})]
|
|
4641
4627
|
}) : /* @__PURE__ */ K("button", {
|
|
4642
4628
|
onClick: () => i("query"),
|
|
@@ -4653,18 +4639,18 @@ function $n({ isMultiQuery: e, queryCount: t, activeQueryIndex: n, activeTab: r,
|
|
|
4653
4639
|
className: "dc:ml-2 dc:p-0.5 dc:rounded-sm hover:bg-dc-surface-hover dc:transition-colors dc:inline-flex dc:items-center",
|
|
4654
4640
|
title: l("analysis.multiQuery.addAnother"),
|
|
4655
4641
|
"aria-label": l("analysis.multiQuery.addAnother"),
|
|
4656
|
-
children: /* @__PURE__ */ G(
|
|
4642
|
+
children: /* @__PURE__ */ G(Un, { className: "dc:w-3 dc:h-3" })
|
|
4657
4643
|
})]
|
|
4658
4644
|
});
|
|
4659
4645
|
}
|
|
4660
|
-
function
|
|
4661
|
-
let { t } =
|
|
4646
|
+
function nr(e) {
|
|
4647
|
+
let { t } = S(), { isMultiQuery: n, activeTab: r, onActiveTabChange: i } = e, a = n ? "" : "dc:flex-1";
|
|
4662
4648
|
return /* @__PURE__ */ G("div", {
|
|
4663
4649
|
className: "dc:border-b border-dc-border dc:flex-shrink-0 dc:overflow-x-auto dc:overflow-y-hidden scrollbar-thin",
|
|
4664
4650
|
children: /* @__PURE__ */ K("div", {
|
|
4665
4651
|
className: "dc:flex dc:min-w-max",
|
|
4666
4652
|
children: [
|
|
4667
|
-
/* @__PURE__ */ G(
|
|
4653
|
+
/* @__PURE__ */ G(tr, { ...e }),
|
|
4668
4654
|
/* @__PURE__ */ G("button", {
|
|
4669
4655
|
onClick: () => i("chart"),
|
|
4670
4656
|
className: `dc:px-4 dc:py-3 dc:text-sm dc:font-medium dc:transition-colors dc:flex-shrink-0 dc:whitespace-nowrap ${a} ${r === "chart" ? "text-dc-primary dc:border-b-2 border-dc-primary" : "text-dc-text-secondary hover:text-dc-text"}`,
|
|
@@ -4681,12 +4667,12 @@ function er(e) {
|
|
|
4681
4667
|
})
|
|
4682
4668
|
});
|
|
4683
4669
|
}
|
|
4684
|
-
function
|
|
4685
|
-
let { t: o } =
|
|
4670
|
+
function rr({ mergeStrategy: e, onMergeStrategyChange: t, isFunnelMode: n, funnelBindingKey: r, onFunnelBindingKeyChange: i, schema: a }) {
|
|
4671
|
+
let { t: o } = S();
|
|
4686
4672
|
return /* @__PURE__ */ K("div", {
|
|
4687
4673
|
className: "dc:flex dc:items-center dc:gap-2 dc:px-4 dc:py-1.5 dc:text-sm bg-dc-surface-secondary dc:border-b border-dc-border",
|
|
4688
4674
|
children: [
|
|
4689
|
-
|
|
4675
|
+
qn && /* @__PURE__ */ G(qn, { className: "dc:w-3.5 dc:h-3.5 text-dc-text-muted dc:flex-shrink-0" }),
|
|
4690
4676
|
/* @__PURE__ */ K("select", {
|
|
4691
4677
|
value: e,
|
|
4692
4678
|
onChange: (e) => t?.(e.target.value),
|
|
@@ -4706,7 +4692,7 @@ function tr({ mergeStrategy: e, onMergeStrategyChange: t, isFunnelMode: n, funne
|
|
|
4706
4692
|
})
|
|
4707
4693
|
]
|
|
4708
4694
|
}),
|
|
4709
|
-
n && i && /* @__PURE__ */ G(
|
|
4695
|
+
n && i && /* @__PURE__ */ G(lt, {
|
|
4710
4696
|
bindingKey: r ?? null,
|
|
4711
4697
|
onChange: i,
|
|
4712
4698
|
schema: a,
|
|
@@ -4715,37 +4701,37 @@ function tr({ mergeStrategy: e, onMergeStrategyChange: t, isFunnelMode: n, funne
|
|
|
4715
4701
|
]
|
|
4716
4702
|
});
|
|
4717
4703
|
}
|
|
4718
|
-
function
|
|
4719
|
-
let { t } =
|
|
4704
|
+
function ir({ adapterValidation: e }) {
|
|
4705
|
+
let { t } = S();
|
|
4720
4706
|
return /* @__PURE__ */ K("div", {
|
|
4721
4707
|
className: "dc:px-4 dc:py-2 dc:border-b border-dc-border bg-dc-warning-bg dc:space-y-1",
|
|
4722
4708
|
children: [e.errors.map((e, n) => /* @__PURE__ */ K("div", {
|
|
4723
4709
|
className: "dc:flex dc:items-start dc:gap-2 dc:text-xs text-dc-error",
|
|
4724
|
-
children: [/* @__PURE__ */ G(
|
|
4710
|
+
children: [/* @__PURE__ */ G(Kn, { className: "dc:w-3.5 dc:h-3.5 dc:mt-0.5 dc:flex-shrink-0" }), /* @__PURE__ */ G("span", { children: t(e) })]
|
|
4725
4711
|
}, `adapter-error-${n}`)), e.warnings.map((e, n) => /* @__PURE__ */ K("div", {
|
|
4726
4712
|
className: "dc:flex dc:items-start dc:gap-2 dc:text-xs text-dc-warning",
|
|
4727
|
-
children: [/* @__PURE__ */ G(
|
|
4713
|
+
children: [/* @__PURE__ */ G(Gn, { className: "dc:w-3.5 dc:h-3.5 dc:mt-0.5 dc:flex-shrink-0" }), /* @__PURE__ */ G("span", { children: t(e) })]
|
|
4728
4714
|
}, `adapter-warning-${n}`))]
|
|
4729
4715
|
});
|
|
4730
4716
|
}
|
|
4731
|
-
function
|
|
4732
|
-
let { t } =
|
|
4717
|
+
function ar({ multiQueryValidation: e }) {
|
|
4718
|
+
let { t } = S();
|
|
4733
4719
|
return /* @__PURE__ */ K("div", {
|
|
4734
4720
|
className: "dc:px-4 dc:py-2 dc:border-b border-dc-border bg-dc-warning-bg",
|
|
4735
4721
|
children: [e.errors.map((e, n) => /* @__PURE__ */ K("div", {
|
|
4736
4722
|
className: "dc:flex dc:items-start dc:gap-2 dc:text-xs text-dc-error",
|
|
4737
|
-
children: [/* @__PURE__ */ G(
|
|
4723
|
+
children: [/* @__PURE__ */ G(Kn, { className: "dc:w-3.5 dc:h-3.5 dc:mt-0.5 dc:flex-shrink-0" }), /* @__PURE__ */ G("span", { children: t(e.message) })]
|
|
4738
4724
|
}, `error-${n}`)), e.warnings.map((e, n) => /* @__PURE__ */ K("div", {
|
|
4739
4725
|
className: "dc:flex dc:items-start dc:gap-2 dc:text-xs text-dc-warning",
|
|
4740
|
-
children: [/* @__PURE__ */ G(
|
|
4726
|
+
children: [/* @__PURE__ */ G(Kn, { className: "dc:w-3.5 dc:h-3.5 dc:mt-0.5 dc:flex-shrink-0" }), /* @__PURE__ */ G("span", { children: t(e.message) })]
|
|
4741
4727
|
}, `warning-${n}`))]
|
|
4742
4728
|
});
|
|
4743
4729
|
}
|
|
4744
|
-
function
|
|
4730
|
+
function or({ metrics: e, breakdowns: t, filters: n, schema: r, onAddMetric: i, onRemoveMetric: a, onReorderMetrics: o, onAddBreakdown: s, onRemoveBreakdown: c, onBreakdownGranularityChange: l, onBreakdownComparisonToggle: u, onReorderBreakdowns: d, onFiltersChange: f, onDropFieldToFilter: p, order: m, onOrderChange: h, limit: g, onLimitChange: _, breakdownsLocked: v = !1, onMergeStrategyChange: y, getFieldMeta: b, comparisonEnabledBreakdown: x }) {
|
|
4745
4731
|
return /* @__PURE__ */ K("div", {
|
|
4746
4732
|
className: "dc:space-y-6",
|
|
4747
4733
|
children: [
|
|
4748
|
-
/* @__PURE__ */ G(
|
|
4734
|
+
/* @__PURE__ */ G(Cn, {
|
|
4749
4735
|
metrics: e,
|
|
4750
4736
|
schema: r,
|
|
4751
4737
|
onAdd: i,
|
|
@@ -4754,14 +4740,14 @@ function ir({ metrics: e, breakdowns: t, filters: n, schema: r, onAddMetric: i,
|
|
|
4754
4740
|
onOrderChange: h,
|
|
4755
4741
|
onReorder: o
|
|
4756
4742
|
}),
|
|
4757
|
-
v ? /* @__PURE__ */ G(
|
|
4743
|
+
v ? /* @__PURE__ */ G(cr, {
|
|
4758
4744
|
breakdowns: t,
|
|
4759
4745
|
getFieldMeta: b,
|
|
4760
4746
|
comparisonEnabledBreakdown: x,
|
|
4761
4747
|
onBreakdownGranularityChange: l,
|
|
4762
4748
|
onBreakdownComparisonToggle: u,
|
|
4763
4749
|
onMergeStrategyChange: y
|
|
4764
|
-
}) : /* @__PURE__ */ G(
|
|
4750
|
+
}) : /* @__PURE__ */ G(gn, {
|
|
4765
4751
|
breakdowns: t,
|
|
4766
4752
|
schema: r,
|
|
4767
4753
|
onAdd: s,
|
|
@@ -4772,22 +4758,22 @@ function ir({ metrics: e, breakdowns: t, filters: n, schema: r, onAddMetric: i,
|
|
|
4772
4758
|
onOrderChange: h,
|
|
4773
4759
|
onReorder: d
|
|
4774
4760
|
}),
|
|
4775
|
-
/* @__PURE__ */ G(
|
|
4761
|
+
/* @__PURE__ */ G(D, {
|
|
4776
4762
|
filters: n,
|
|
4777
4763
|
schema: r,
|
|
4778
4764
|
onFiltersChange: f,
|
|
4779
4765
|
onFieldDropped: p
|
|
4780
4766
|
}),
|
|
4781
|
-
_ && /* @__PURE__ */ G(
|
|
4767
|
+
_ && /* @__PURE__ */ G(Tn, {
|
|
4782
4768
|
limit: g,
|
|
4783
4769
|
onLimitChange: _
|
|
4784
4770
|
})
|
|
4785
4771
|
]
|
|
4786
4772
|
});
|
|
4787
4773
|
}
|
|
4788
|
-
function
|
|
4789
|
-
let { activeTab: t, isMultiQuery: n, metrics: r, breakdowns: i, schema: a, chartType: o, chartConfig: s, combinedMetrics: c, combinedBreakdowns: l, chartAvailability: u, onChartTypeChange: d, onChartConfigChange: f, displayConfig:
|
|
4790
|
-
return t === "query" ? /* @__PURE__ */ G(
|
|
4774
|
+
function sr(e) {
|
|
4775
|
+
let { activeTab: t, isMultiQuery: n, metrics: r, breakdowns: i, schema: a, chartType: o, chartConfig: s, combinedMetrics: c, combinedBreakdowns: l, chartAvailability: u, onChartTypeChange: d, onChartConfigChange: f, displayConfig: p, colorPalette: h, onDisplayConfigChange: g } = e;
|
|
4776
|
+
return t === "query" ? /* @__PURE__ */ G(or, { ...e }) : t === "chart" ? /* @__PURE__ */ G(Hn, {
|
|
4791
4777
|
chartType: o,
|
|
4792
4778
|
chartConfig: s,
|
|
4793
4779
|
metrics: n && c ? c : r,
|
|
@@ -4796,19 +4782,19 @@ function ar(e) {
|
|
|
4796
4782
|
chartAvailability: u,
|
|
4797
4783
|
onChartTypeChange: d,
|
|
4798
4784
|
onChartConfigChange: f,
|
|
4799
|
-
displayConfig:
|
|
4785
|
+
displayConfig: p,
|
|
4800
4786
|
colorPalette: h,
|
|
4801
4787
|
onDisplayConfigChange: g
|
|
4802
|
-
}) : t === "display" ? /* @__PURE__ */ G(
|
|
4788
|
+
}) : t === "display" ? /* @__PURE__ */ G(m, {
|
|
4803
4789
|
chartType: o,
|
|
4804
|
-
displayConfig:
|
|
4790
|
+
displayConfig: p,
|
|
4805
4791
|
colorPalette: h,
|
|
4806
4792
|
chartConfig: s,
|
|
4807
4793
|
onDisplayConfigChange: g
|
|
4808
4794
|
}) : null;
|
|
4809
4795
|
}
|
|
4810
|
-
function
|
|
4811
|
-
let { t: o } =
|
|
4796
|
+
function cr({ breakdowns: e, getFieldMeta: t, comparisonEnabledBreakdown: n, onBreakdownGranularityChange: r, onBreakdownComparisonToggle: i, onMergeStrategyChange: a }) {
|
|
4797
|
+
let { t: o } = S();
|
|
4812
4798
|
return /* @__PURE__ */ K("div", {
|
|
4813
4799
|
className: "dc:mb-4",
|
|
4814
4800
|
children: [
|
|
@@ -4821,7 +4807,7 @@ function or({ breakdowns: e, getFieldMeta: t, comparisonEnabledBreakdown: n, onB
|
|
|
4821
4807
|
}),
|
|
4822
4808
|
/* @__PURE__ */ K("div", {
|
|
4823
4809
|
className: "dc:flex dc:items-start dc:gap-2 dc:px-3 dc:py-2 dc:mb-3 bg-dc-surface-secondary dc:rounded-sm dc:border border-dc-border dc:text-xs",
|
|
4824
|
-
children: [
|
|
4810
|
+
children: [Gn && /* @__PURE__ */ G(Gn, { className: "dc:w-4 dc:h-4 text-dc-text-muted dc:flex-shrink-0 dc:mt-0.5" }), /* @__PURE__ */ K("span", {
|
|
4825
4811
|
className: "text-dc-text-muted",
|
|
4826
4812
|
children: [o("analysis.multiQuery.mergeExplanation"), a && /* @__PURE__ */ G("button", {
|
|
4827
4813
|
onClick: () => a("concat"),
|
|
@@ -4832,7 +4818,7 @@ function or({ breakdowns: e, getFieldMeta: t, comparisonEnabledBreakdown: n, onB
|
|
|
4832
4818
|
}),
|
|
4833
4819
|
e.length > 0 && /* @__PURE__ */ G("div", {
|
|
4834
4820
|
className: "dc:space-y-1",
|
|
4835
|
-
children: e.map((e) => /* @__PURE__ */ G(
|
|
4821
|
+
children: e.map((e) => /* @__PURE__ */ G(at, {
|
|
4836
4822
|
breakdown: e,
|
|
4837
4823
|
fieldMeta: t(e),
|
|
4838
4824
|
onRemove: () => {},
|
|
@@ -4846,8 +4832,8 @@ function or({ breakdowns: e, getFieldMeta: t, comparisonEnabledBreakdown: n, onB
|
|
|
4846
4832
|
}
|
|
4847
4833
|
//#endregion
|
|
4848
4834
|
//#region src/client/components/AnalysisBuilder/AnalysisQueryPanel.tsx
|
|
4849
|
-
var
|
|
4850
|
-
let { breakdowns: t, schema: n, activeTab: r, onActiveTabChange: i, queryCount: a = 1, activeQueryIndex: o = 0, mergeStrategy: s = "concat", onActiveQueryChange: c, onAddQuery: l, onRemoveQuery: u, onMergeStrategyChange: d, multiQueryValidation: f, adapterValidation: p, funnelBindingKey: m, onFunnelBindingKeyChange: h, analysisType: g = "query", onAnalysisTypeChange: _ } = e, { t: v } =
|
|
4835
|
+
var lr = R(function(e) {
|
|
4836
|
+
let { breakdowns: t, schema: n, activeTab: r, onActiveTabChange: i, queryCount: a = 1, activeQueryIndex: o = 0, mergeStrategy: s = "concat", onActiveQueryChange: c, onAddQuery: l, onRemoveQuery: u, onMergeStrategyChange: d, multiQueryValidation: f, adapterValidation: p, funnelBindingKey: m, onFunnelBindingKeyChange: h, analysisType: g = "query", onAnalysisTypeChange: _ } = e, { t: v } = S(), y = a > 1, b = g === "funnel", x = Xn(e), C = z((e) => {
|
|
4851
4837
|
if (!n?.cubes) return null;
|
|
4852
4838
|
let [t] = e.field.split("."), r = n.cubes.find((e) => e.name === t);
|
|
4853
4839
|
return r && r.dimensions?.find((t) => t.name === e.field) || null;
|
|
@@ -4862,12 +4848,12 @@ var sr = R(function(e) {
|
|
|
4862
4848
|
}, [u]);
|
|
4863
4849
|
return /* @__PURE__ */ K("div", {
|
|
4864
4850
|
className: "dc:h-full dc:flex dc:flex-col bg-dc-surface",
|
|
4865
|
-
children: [_ && /* @__PURE__ */ G(
|
|
4851
|
+
children: [_ && /* @__PURE__ */ G(et, {
|
|
4866
4852
|
value: g,
|
|
4867
4853
|
onChange: _,
|
|
4868
4854
|
schema: n
|
|
4869
|
-
}),
|
|
4870
|
-
/* @__PURE__ */ G(
|
|
4855
|
+
}), x ? /* @__PURE__ */ G(er, { ...e }) : /* @__PURE__ */ K(W, { children: [
|
|
4856
|
+
/* @__PURE__ */ G(nr, {
|
|
4871
4857
|
activeTab: r,
|
|
4872
4858
|
onActiveTabChange: i,
|
|
4873
4859
|
isMultiQuery: y,
|
|
@@ -4878,7 +4864,7 @@ var sr = R(function(e) {
|
|
|
4878
4864
|
handleQueryTabClick: T,
|
|
4879
4865
|
handleRemoveQuery: E
|
|
4880
4866
|
}),
|
|
4881
|
-
y && r === "query" && /* @__PURE__ */ G(
|
|
4867
|
+
y && r === "query" && /* @__PURE__ */ G(rr, {
|
|
4882
4868
|
mergeStrategy: s,
|
|
4883
4869
|
onMergeStrategyChange: d,
|
|
4884
4870
|
isFunnelMode: b,
|
|
@@ -4886,11 +4872,11 @@ var sr = R(function(e) {
|
|
|
4886
4872
|
onFunnelBindingKeyChange: h,
|
|
4887
4873
|
schema: n
|
|
4888
4874
|
}),
|
|
4889
|
-
p && (p.errors.length > 0 || p.warnings.length > 0) && r === "query" && /* @__PURE__ */ G(
|
|
4890
|
-
f && !b && (f.warnings.length > 0 || f.errors.length > 0) && r === "query" && /* @__PURE__ */ G(
|
|
4875
|
+
p && (p.errors.length > 0 || p.warnings.length > 0) && r === "query" && /* @__PURE__ */ G(ir, { adapterValidation: p }),
|
|
4876
|
+
f && !b && (f.warnings.length > 0 || f.errors.length > 0) && r === "query" && /* @__PURE__ */ G(ar, { multiQueryValidation: f }),
|
|
4891
4877
|
/* @__PURE__ */ G("div", {
|
|
4892
4878
|
className: "dc:flex-1 dc:overflow-auto dc:p-4",
|
|
4893
|
-
children: /* @__PURE__ */ G(
|
|
4879
|
+
children: /* @__PURE__ */ G(sr, {
|
|
4894
4880
|
...e,
|
|
4895
4881
|
isMultiQuery: y,
|
|
4896
4882
|
getFieldMeta: C,
|
|
@@ -4899,9 +4885,9 @@ var sr = R(function(e) {
|
|
|
4899
4885
|
})
|
|
4900
4886
|
] })]
|
|
4901
4887
|
});
|
|
4902
|
-
}),
|
|
4903
|
-
function
|
|
4904
|
-
let { t: c } =
|
|
4888
|
+
}), ur = s("sparkles"), dr = s("error");
|
|
4889
|
+
function fr({ userPrompt: e, onPromptChange: t, isGenerating: n, error: r, hasGeneratedQuery: i, onGenerate: a, onAccept: o, onCancel: s }) {
|
|
4890
|
+
let { t: c } = S(), l = z((e) => {
|
|
4905
4891
|
e.key === "Enter" && !e.shiftKey && (e.preventDefault(), a());
|
|
4906
4892
|
}, [a]);
|
|
4907
4893
|
return /* @__PURE__ */ K("div", {
|
|
@@ -4912,7 +4898,7 @@ function ur({ userPrompt: e, onPromptChange: t, isGenerating: n, error: r, hasGe
|
|
|
4912
4898
|
children: [/* @__PURE__ */ K("div", {
|
|
4913
4899
|
className: "dc:flex dc:items-center dc:gap-2",
|
|
4914
4900
|
children: [
|
|
4915
|
-
/* @__PURE__ */ G(
|
|
4901
|
+
/* @__PURE__ */ G(ur, { className: "dc:w-4 dc:h-4 text-dc-accent" }),
|
|
4916
4902
|
/* @__PURE__ */ G("span", {
|
|
4917
4903
|
className: "dc:text-sm dc:font-medium text-dc-text",
|
|
4918
4904
|
children: c("analysis.ai.title")
|
|
@@ -4959,13 +4945,13 @@ function ur({ userPrompt: e, onPromptChange: t, isGenerating: n, error: r, hasGe
|
|
|
4959
4945
|
onClick: a,
|
|
4960
4946
|
disabled: n || !e.trim(),
|
|
4961
4947
|
className: `dc:px-4 dc:py-2 dc:text-sm dc:font-medium dc:rounded-md dc:transition-colors dc:flex dc:items-center dc:gap-2 ${n || !e.trim() ? "bg-dc-surface-tertiary text-dc-text-disabled dc:cursor-not-allowed" : "bg-dc-accent hover:bg-dc-accent-hover text-white"}`,
|
|
4962
|
-
children: n ? /* @__PURE__ */ K(W, { children: [/* @__PURE__ */ G("div", { className: "dc:w-4 dc:h-4 dc:border-2 border-white border-t-transparent dc:rounded-full dc:animate-spin" }), /* @__PURE__ */ G("span", { children: c("analysis.ai.button.generating") })] }) : /* @__PURE__ */ K(W, { children: [/* @__PURE__ */ G(
|
|
4948
|
+
children: n ? /* @__PURE__ */ K(W, { children: [/* @__PURE__ */ G("div", { className: "dc:w-4 dc:h-4 dc:border-2 border-white border-t-transparent dc:rounded-full dc:animate-spin" }), /* @__PURE__ */ G("span", { children: c("analysis.ai.button.generating") })] }) : /* @__PURE__ */ K(W, { children: [/* @__PURE__ */ G(ur, { className: "dc:w-4 dc:h-4" }), /* @__PURE__ */ G("span", { children: c("analysis.ai.button.generate") })] })
|
|
4963
4949
|
})
|
|
4964
4950
|
})]
|
|
4965
4951
|
}),
|
|
4966
4952
|
r && /* @__PURE__ */ K("div", {
|
|
4967
4953
|
className: "dc:mt-3 dc:flex dc:items-start dc:gap-2 dc:p-3 bg-dc-error-bg dc:border border-dc-error-border dc:rounded-md",
|
|
4968
|
-
children: [/* @__PURE__ */ G(
|
|
4954
|
+
children: [/* @__PURE__ */ G(dr, { className: "dc:w-4 dc:h-4 text-dc-error dc:mt-0.5 dc:flex-shrink-0" }), /* @__PURE__ */ G("div", {
|
|
4969
4955
|
className: "dc:text-sm text-dc-error",
|
|
4970
4956
|
children: r
|
|
4971
4957
|
})]
|
|
@@ -4983,15 +4969,15 @@ function ur({ userPrompt: e, onPromptChange: t, isGenerating: n, error: r, hasGe
|
|
|
4983
4969
|
}
|
|
4984
4970
|
//#endregion
|
|
4985
4971
|
//#region src/client/components/AnalysisBuilder/AnalysisModeErrorBoundary.tsx
|
|
4986
|
-
var
|
|
4987
|
-
function
|
|
4988
|
-
let { t: i } =
|
|
4972
|
+
var pr = s("warning"), mr = s("refresh");
|
|
4973
|
+
function hr({ error: e, analysisType: t, onReset: n, onSwitchToSafeMode: r }) {
|
|
4974
|
+
let { t: i } = S();
|
|
4989
4975
|
return /* @__PURE__ */ K("div", {
|
|
4990
4976
|
className: "dc:flex dc:flex-col dc:items-center dc:justify-center dc:w-full dc:h-full dc:p-6 dc:text-center bg-dc-surface",
|
|
4991
4977
|
children: [
|
|
4992
4978
|
/* @__PURE__ */ G("div", {
|
|
4993
4979
|
className: "dc:h-10 dc:w-10 dc:mb-3 text-dc-warning",
|
|
4994
|
-
children:
|
|
4980
|
+
children: pr && /* @__PURE__ */ G(pr, { className: "dc:w-10 dc:h-10" })
|
|
4995
4981
|
}),
|
|
4996
4982
|
/* @__PURE__ */ G("h3", {
|
|
4997
4983
|
className: "dc:text-base dc:font-semibold dc:mb-2 text-dc-text",
|
|
@@ -5016,7 +5002,7 @@ function pr({ error: e, analysisType: t, onReset: n, onSwitchToSafeMode: r }) {
|
|
|
5016
5002
|
children: [/* @__PURE__ */ K("button", {
|
|
5017
5003
|
onClick: n,
|
|
5018
5004
|
className: "dc:px-3 dc:py-1.5 dc:border border-dc-border dc:rounded-sm dc:text-sm text-dc-text hover:bg-dc-surface-hover dc:transition-colors dc:flex dc:items-center dc:gap-1",
|
|
5019
|
-
children: [
|
|
5005
|
+
children: [mr && /* @__PURE__ */ G(mr, { className: "dc:w-4 dc:h-4" }), i("errorBoundary.tryAgain")]
|
|
5020
5006
|
}), r && /* @__PURE__ */ G("button", {
|
|
5021
5007
|
onClick: r,
|
|
5022
5008
|
className: "dc:px-3 dc:py-1.5 bg-dc-primary text-white dc:rounded-sm dc:text-sm dc:hover:opacity-90 dc:transition-opacity",
|
|
@@ -5026,7 +5012,7 @@ function pr({ error: e, analysisType: t, onReset: n, onSwitchToSafeMode: r }) {
|
|
|
5026
5012
|
]
|
|
5027
5013
|
});
|
|
5028
5014
|
}
|
|
5029
|
-
var
|
|
5015
|
+
var gr = class extends I {
|
|
5030
5016
|
constructor(e) {
|
|
5031
5017
|
super(e), this.state = {
|
|
5032
5018
|
hasError: !1,
|
|
@@ -5052,7 +5038,7 @@ var mr = class extends I {
|
|
|
5052
5038
|
this.handleReset(), this.props.onSwitchToSafeMode?.();
|
|
5053
5039
|
};
|
|
5054
5040
|
render() {
|
|
5055
|
-
return this.state.hasError ? /* @__PURE__ */ G(
|
|
5041
|
+
return this.state.hasError ? /* @__PURE__ */ G(hr, {
|
|
5056
5042
|
error: this.state.error,
|
|
5057
5043
|
analysisType: this.props.analysisType,
|
|
5058
5044
|
onReset: this.handleReset,
|
|
@@ -5062,9 +5048,9 @@ var mr = class extends I {
|
|
|
5062
5048
|
};
|
|
5063
5049
|
//#endregion
|
|
5064
5050
|
//#region src/client/components/AnalysisBuilder/hooks/useAnalysisBuilderImperativeHandle.ts
|
|
5065
|
-
function
|
|
5051
|
+
function _r(e, t) {
|
|
5066
5052
|
let { getQueryConfig: n, getChartConfig: r, getAnalysisType: i, clearQuery: a, storeApi: o } = t;
|
|
5067
|
-
|
|
5053
|
+
ne(e, () => ({
|
|
5068
5054
|
getQueryConfig: n,
|
|
5069
5055
|
getChartConfig: r,
|
|
5070
5056
|
getAnalysisType: i,
|
|
@@ -5102,7 +5088,7 @@ function hr(e, t) {
|
|
|
5102
5088
|
}
|
|
5103
5089
|
//#endregion
|
|
5104
5090
|
//#region src/client/components/AnalysisBuilder/utils/shareStateUtils.ts
|
|
5105
|
-
function
|
|
5091
|
+
function vr(e) {
|
|
5106
5092
|
if (!e || e.analysisType !== "funnel") return;
|
|
5107
5093
|
let t = "funnel" in e.query ? e.query.funnel : null;
|
|
5108
5094
|
if (!t) return;
|
|
@@ -5117,7 +5103,7 @@ function gr(e) {
|
|
|
5117
5103
|
funnelDisplayConfig: n?.displayConfig || {}
|
|
5118
5104
|
};
|
|
5119
5105
|
}
|
|
5120
|
-
function
|
|
5106
|
+
function yr(e) {
|
|
5121
5107
|
if (!e || e.analysisType !== "flow") return;
|
|
5122
5108
|
let t = "flow" in e.query ? e.query.flow : null;
|
|
5123
5109
|
if (!t) return;
|
|
@@ -5141,7 +5127,7 @@ function _r(e) {
|
|
|
5141
5127
|
flowDisplayConfig: n?.displayConfig || {}
|
|
5142
5128
|
};
|
|
5143
5129
|
}
|
|
5144
|
-
function
|
|
5130
|
+
function br(e) {
|
|
5145
5131
|
if (!e || e.analysisType !== "retention") return;
|
|
5146
5132
|
let t = "retention" in e.query ? e.query.retention : null;
|
|
5147
5133
|
if (!t) return;
|
|
@@ -5167,13 +5153,13 @@ function vr(e) {
|
|
|
5167
5153
|
}
|
|
5168
5154
|
//#endregion
|
|
5169
5155
|
//#region src/client/components/AnalysisBuilder/index.tsx
|
|
5170
|
-
var
|
|
5171
|
-
let { meta: u } =
|
|
5156
|
+
var xr = L(({ className: t = "", maxHeight: n, initialData: r, colorPalette: i, hideSettings: a = !1, hideShare: o = !1, onQueryChange: s, onChartConfigChange: c }, l) => {
|
|
5157
|
+
let { meta: u } = x(), { features: d } = e(), f = j({
|
|
5172
5158
|
initialData: r,
|
|
5173
5159
|
externalColorPalette: i,
|
|
5174
5160
|
onQueryChange: s,
|
|
5175
5161
|
onChartConfigChange: c
|
|
5176
|
-
}), p =
|
|
5162
|
+
}), p = O(), { aiState: m, shareButtonState: g } = f, _ = V(() => f.analysisType === "funnel" ? f.funnelSteps.length > 0 || f.funnelCube !== null || f.funnelBindingKey !== null || f.funnelTimeDimension !== null : f.queryState.metrics.length > 0 || f.queryState.breakdowns.length > 0 || f.queryState.filters.length > 0, [
|
|
5177
5163
|
f.analysisType,
|
|
5178
5164
|
f.funnelSteps.length,
|
|
5179
5165
|
f.funnelCube,
|
|
@@ -5183,7 +5169,7 @@ var yr = L(({ className: t = "", maxHeight: n, initialData: r, colorPalette: i,
|
|
|
5183
5169
|
f.queryState.breakdowns.length,
|
|
5184
5170
|
f.queryState.filters.length
|
|
5185
5171
|
]);
|
|
5186
|
-
|
|
5172
|
+
_r(l, {
|
|
5187
5173
|
getQueryConfig: f.getQueryConfig,
|
|
5188
5174
|
getChartConfig: f.getChartConfig,
|
|
5189
5175
|
getAnalysisType: f.getAnalysisType,
|
|
@@ -5204,12 +5190,12 @@ var yr = L(({ className: t = "", maxHeight: n, initialData: r, colorPalette: i,
|
|
|
5204
5190
|
children: [
|
|
5205
5191
|
/* @__PURE__ */ K("div", {
|
|
5206
5192
|
className: "dc:h-[60vh] dc:lg:h-auto dc:lg:flex-1 dc:min-w-0 dc:border-b dc:lg:border-b-0 dc:lg:border-r border-dc-border dc:overflow-auto dc:flex dc:flex-col",
|
|
5207
|
-
children: [
|
|
5208
|
-
userPrompt:
|
|
5193
|
+
children: [m.isOpen && /* @__PURE__ */ G(fr, {
|
|
5194
|
+
userPrompt: m.userPrompt,
|
|
5209
5195
|
onPromptChange: f.actions.setAIPrompt,
|
|
5210
|
-
isGenerating:
|
|
5211
|
-
error:
|
|
5212
|
-
hasGeneratedQuery:
|
|
5196
|
+
isGenerating: m.isGenerating,
|
|
5197
|
+
error: m.error,
|
|
5198
|
+
hasGeneratedQuery: m.hasGeneratedQuery,
|
|
5213
5199
|
onGenerate: f.actions.generateAI,
|
|
5214
5200
|
onAccept: f.actions.acceptAI,
|
|
5215
5201
|
onCancel: f.actions.cancelAI
|
|
@@ -5246,8 +5232,8 @@ var yr = L(({ className: t = "", maxHeight: n, initialData: r, colorPalette: i,
|
|
|
5246
5232
|
onClearClick: f.actions.clearCurrentMode,
|
|
5247
5233
|
canClear: _,
|
|
5248
5234
|
enableAI: d?.enableAI !== !1,
|
|
5249
|
-
isAIOpen:
|
|
5250
|
-
onAIToggle:
|
|
5235
|
+
isAIOpen: m.isOpen,
|
|
5236
|
+
onAIToggle: m.isOpen ? f.actions.closeAI : f.actions.openAI,
|
|
5251
5237
|
queryCount: f.queryStates.length,
|
|
5252
5238
|
perQueryResults: f.perQueryResults ?? void 0,
|
|
5253
5239
|
activeTableIndex: f.activeTableIndex,
|
|
@@ -5270,10 +5256,10 @@ var yr = L(({ className: t = "", maxHeight: n, initialData: r, colorPalette: i,
|
|
|
5270
5256
|
}),
|
|
5271
5257
|
/* @__PURE__ */ G("div", {
|
|
5272
5258
|
className: "dc:w-full dc:lg:w-96 dc:flex-shrink-0 dc:lg:h-full dc:overflow-auto dc:lg:overflow-hidden",
|
|
5273
|
-
children: /* @__PURE__ */ G(
|
|
5259
|
+
children: /* @__PURE__ */ G(gr, {
|
|
5274
5260
|
analysisType: f.analysisType,
|
|
5275
5261
|
onSwitchToSafeMode: () => f.actions.setAnalysisType("query"),
|
|
5276
|
-
children: /* @__PURE__ */ G(
|
|
5262
|
+
children: /* @__PURE__ */ G(lr, {
|
|
5277
5263
|
metrics: f.queryState.metrics,
|
|
5278
5264
|
breakdowns: f.effectiveBreakdowns,
|
|
5279
5265
|
filters: f.queryState.filters,
|
|
@@ -5378,7 +5364,7 @@ var yr = L(({ className: t = "", maxHeight: n, initialData: r, colorPalette: i,
|
|
|
5378
5364
|
})
|
|
5379
5365
|
})
|
|
5380
5366
|
}),
|
|
5381
|
-
/* @__PURE__ */ G(
|
|
5367
|
+
/* @__PURE__ */ G(h, {
|
|
5382
5368
|
isOpen: f.showFieldModal,
|
|
5383
5369
|
onClose: f.actions.closeFieldModal,
|
|
5384
5370
|
onSelect: f.actions.handleFieldSelected,
|
|
@@ -5396,10 +5382,10 @@ var yr = L(({ className: t = "", maxHeight: n, initialData: r, colorPalette: i,
|
|
|
5396
5382
|
]
|
|
5397
5383
|
});
|
|
5398
5384
|
});
|
|
5399
|
-
|
|
5400
|
-
var
|
|
5401
|
-
let { initialQuery: n, initialChartConfig: r, initialAnalysisType: i, initialFunnelState: a, initialFlowState: o, initialRetentionState: s, disableLocalStorage: c = !1, storageKey: l, ...u } = e, d =
|
|
5402
|
-
return /* @__PURE__ */ G(
|
|
5385
|
+
xr.displayName = "AnalysisBuilderInner";
|
|
5386
|
+
var Sr = L((e, t) => {
|
|
5387
|
+
let { initialQuery: n, initialChartConfig: r, initialAnalysisType: i, initialFunnelState: a, initialFlowState: o, initialRetentionState: s, disableLocalStorage: c = !1, storageKey: l, ...u } = e, d = M(), f = d ? te(d) : null, p = f?.activeView, m = f?.analysisType, h = vr(f), g = yr(f), _ = br(f), v = !!n || !!a || !!o || !!s;
|
|
5388
|
+
return /* @__PURE__ */ G(A, {
|
|
5403
5389
|
initialQuery: n,
|
|
5404
5390
|
initialChartConfig: r,
|
|
5405
5391
|
initialAnalysisType: i || m,
|
|
@@ -5409,15 +5395,15 @@ var br = L((e, t) => {
|
|
|
5409
5395
|
initialActiveView: p,
|
|
5410
5396
|
disableLocalStorage: c || !!n || !!a || !!o || !!s || !!d,
|
|
5411
5397
|
storageKey: l,
|
|
5412
|
-
children: /* @__PURE__ */ G(
|
|
5398
|
+
children: /* @__PURE__ */ G(xr, {
|
|
5413
5399
|
ref: t,
|
|
5414
5400
|
...u,
|
|
5415
5401
|
hideShare: v
|
|
5416
5402
|
})
|
|
5417
5403
|
});
|
|
5418
5404
|
});
|
|
5419
|
-
|
|
5405
|
+
Sr.displayName = "AnalysisBuilder";
|
|
5420
5406
|
//#endregion
|
|
5421
|
-
export {
|
|
5407
|
+
export { Sr as default };
|
|
5422
5408
|
|
|
5423
|
-
//# sourceMappingURL=analysis-builder-
|
|
5409
|
+
//# sourceMappingURL=analysis-builder-CnmkTZm2.js.map
|