@eric-emg/symphiq-components 1.3.52 → 1.3.55
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.
|
@@ -104050,7 +104050,7 @@ class UnifiedDashboardModalComponent {
|
|
|
104050
104050
|
onMetricClick(metric) {
|
|
104051
104051
|
const data = this.unifiedGoalData();
|
|
104052
104052
|
const allCharts = data?.allCharts || [];
|
|
104053
|
-
const metricCharts =
|
|
104053
|
+
const metricCharts = this.getChartsForMetric(metric, allCharts);
|
|
104054
104054
|
this.modalService.openMetricModal(metric, metricCharts, this.currentModalState() ?? undefined);
|
|
104055
104055
|
}
|
|
104056
104056
|
onContributingMetricsClick() {
|
|
@@ -104078,17 +104078,38 @@ class UnifiedDashboardModalComponent {
|
|
|
104078
104078
|
onRelatedMetricClick(metric) {
|
|
104079
104079
|
const data = this.relatedMetricsData();
|
|
104080
104080
|
const allCharts = data?.allCharts || [];
|
|
104081
|
-
const metricCharts =
|
|
104081
|
+
const metricCharts = this.getChartsForMetric(metric, allCharts);
|
|
104082
104082
|
console.log('[UnifiedDashboardModal] onRelatedMetricClick:', {
|
|
104083
104083
|
metricName: metric.metric,
|
|
104084
104084
|
metricPerformanceItemId: metric.performanceItemId,
|
|
104085
104085
|
allChartsCount: allCharts.length,
|
|
104086
|
-
allChartsPerformanceItemIds: allCharts.map(c => c.performanceItemId),
|
|
104087
104086
|
filteredChartsCount: metricCharts.length,
|
|
104088
104087
|
currentModalState: this.currentModalState()?.type
|
|
104089
104088
|
});
|
|
104090
104089
|
this.modalService.openMetricModal(metric, metricCharts, this.currentModalState() ?? undefined);
|
|
104091
104090
|
}
|
|
104091
|
+
getChartsForMetric(metric, allCharts) {
|
|
104092
|
+
const metricEnum = metric.metric;
|
|
104093
|
+
const metricId = metric.performanceItemId;
|
|
104094
|
+
if (!metricEnum && !metricId) {
|
|
104095
|
+
return [];
|
|
104096
|
+
}
|
|
104097
|
+
const matchingCharts = [];
|
|
104098
|
+
for (const chart of allCharts) {
|
|
104099
|
+
if (metricEnum && chart.metrics?.includes(metricEnum)) {
|
|
104100
|
+
matchingCharts.push(chart);
|
|
104101
|
+
continue;
|
|
104102
|
+
}
|
|
104103
|
+
if (metricId) {
|
|
104104
|
+
const chartId = chart.performanceItemId || '';
|
|
104105
|
+
const prefix = metricId + '_';
|
|
104106
|
+
if (chartId === metricId || chartId.startsWith(prefix)) {
|
|
104107
|
+
matchingCharts.push(chart);
|
|
104108
|
+
}
|
|
104109
|
+
}
|
|
104110
|
+
}
|
|
104111
|
+
return matchingCharts;
|
|
104112
|
+
}
|
|
104092
104113
|
navigateToBreadcrumb(index) {
|
|
104093
104114
|
this.modalService.navigateToStackIndex(index);
|
|
104094
104115
|
}
|
|
@@ -104699,17 +104720,17 @@ class SymphiqProfileAnalysisUnifiedDashboardComponent {
|
|
|
104699
104720
|
return normalized?.metrics || [];
|
|
104700
104721
|
}, ...(ngDevMode ? [{ debugName: "allMetrics" }] : []));
|
|
104701
104722
|
this.allCharts = computed(() => {
|
|
104702
|
-
const analysis = this.
|
|
104723
|
+
const analysis = this.funnelAnalysis();
|
|
104703
104724
|
if (!analysis)
|
|
104704
104725
|
return [];
|
|
104705
|
-
const normalized = normalizeToV3(analysis);
|
|
104726
|
+
const normalized = normalizeToV3(analysis.performanceOverviewStructured);
|
|
104706
104727
|
return normalized?.charts || [];
|
|
104707
104728
|
}, ...(ngDevMode ? [{ debugName: "allCharts" }] : []));
|
|
104708
104729
|
this.allInsights = computed(() => {
|
|
104709
|
-
const analysis = this.
|
|
104730
|
+
const analysis = this.funnelAnalysis();
|
|
104710
104731
|
if (!analysis)
|
|
104711
104732
|
return [];
|
|
104712
|
-
const normalized = normalizeToV3(analysis);
|
|
104733
|
+
const normalized = normalizeToV3(analysis.performanceOverviewStructured);
|
|
104713
104734
|
return normalized?.insights || [];
|
|
104714
104735
|
}, ...(ngDevMode ? [{ debugName: "allInsights" }] : []));
|
|
104715
104736
|
this.unifiedTimeline = computed(() => {
|