@eric-emg/symphiq-components 1.3.50 → 1.3.51

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.
@@ -44215,6 +44215,21 @@ class ProfileAnalysisModalComponent {
44215
44215
  }, 0);
44216
44216
  return;
44217
44217
  }
44218
+ // Close ProfileAnalysisModalComponent when navigating to unified dashboard types
44219
+ // These should be handled by UnifiedDashboardModalComponent
44220
+ const unifiedDashboardOwnedTypes = ['unified-goal-detail', 'unified-goal-objectives', 'unified-goal-related-metrics'];
44221
+ if (unifiedDashboardOwnedTypes.includes(state.type || '')) {
44222
+ console.log('[ProfileAnalysisModal] Closing - unified dashboard type detected:', state.type);
44223
+ this.isOpen.set(false);
44224
+ setTimeout(() => {
44225
+ this.modalData.set(null);
44226
+ this.modalType.set(null);
44227
+ this.modalTitle.set('');
44228
+ this.navigationStack.set([]);
44229
+ this.currentCharts.set([]);
44230
+ }, 0);
44231
+ return;
44232
+ }
44218
44233
  // Check if navigation originates from unified dashboard flow
44219
44234
  // If so, let UnifiedDashboardModalComponent handle objective-strategies and strategy-recommendations
44220
44235
  const unifiedDashboardTypes = ['objective-strategies', 'strategy-recommendations'];
@@ -44222,6 +44237,7 @@ class ProfileAnalysisModalComponent {
44222
44237
  const isFromUnifiedFlow = state.previousState?.type?.startsWith('unified-goal-') ||
44223
44238
  state.navigationStack?.some(s => s.type?.startsWith('unified-goal-'));
44224
44239
  if (isFromUnifiedFlow) {
44240
+ console.log('[ProfileAnalysisModal] Closing - unified flow detected for:', state.type);
44225
44241
  this.isOpen.set(false);
44226
44242
  setTimeout(() => {
44227
44243
  this.modalData.set(null);
@@ -44486,6 +44502,14 @@ class ProfileAnalysisModalComponent {
44486
44502
  }
44487
44503
  else if (state.type === 'metric' && state.data) {
44488
44504
  const metric = state.data;
44505
+ console.log('[ProfileAnalysisModal] Handling metric state:', {
44506
+ metricName: metric.metric,
44507
+ chartsFromState: state.charts?.length || 0,
44508
+ chartIds: state.charts?.map(c => c.performanceItemId),
44509
+ allChartsInput: this.allCharts()?.length || 0,
44510
+ navigationStackLength: state.navigationStack?.length || 0,
44511
+ navigationStackTypes: state.navigationStack?.map(s => s.type)
44512
+ });
44489
44513
  this.modalData.set(metric);
44490
44514
  const formattedName = metric.metric ? this.metricFormatter.formatMetricName(metric.metric) : 'Metric Details';
44491
44515
  this.modalTitle.set(formattedName);
@@ -103163,7 +103187,7 @@ class SourceAnalysisTraceabilityComponent {
103163
103187
  }
103164
103188
  }
103165
103189
  static { this.ɵfac = function SourceAnalysisTraceabilityComponent_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || SourceAnalysisTraceabilityComponent)(); }; }
103166
- static { this.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: SourceAnalysisTraceabilityComponent, selectors: [["symphiq-source-analysis-traceability"]], inputs: { sourceAnalyses: [1, "sourceAnalyses"], loadedSourceAnalysisIds: [1, "loadedSourceAnalysisIds"], loadingSourceAnalysisId: [1, "loadingSourceAnalysisId"], viewMode: [1, "viewMode"], goal: [1, "goal"] }, outputs: { sourceAnalysisClick: "sourceAnalysisClick" }, decls: 1, vars: 1, consts: [[1, "p-5", "rounded-xl", 3, "ngClass"], [1, "text-sm", "font-semibold", "mb-4", "flex", "items-center", "gap-2", 3, "ngClass"], ["fill", "none", "stroke", "currentColor", "viewBox", "0 0 24 24", 1, "w-4", "h-4"], ["stroke-linecap", "round", "stroke-linejoin", "round", "stroke-width", "2", "d", "M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"], [3, "score", "explanation", "viewMode"], [1, "grid", "grid-cols-1", "sm:grid-cols-2", "gap-3"], ["type", "button", 1, "p-4", "rounded-lg", "text-left", "transition-all", "hover:scale-[1.02]", "relative", 3, "ngClass"], ["type", "button", 1, "p-4", "rounded-lg", "text-left", "transition-all", "hover:scale-[1.02]", "relative", 3, "click", "ngClass"], [1, "absolute", "inset-0", "bg-black/10", "rounded-lg", "flex", "items-center", "justify-center"], [1, "absolute", "top-2", "right-2"], [1, "flex", "items-start", "gap-3"], [1, "w-8", "h-8", "rounded-lg", "flex", "items-center", "justify-center", "flex-shrink-0", 3, "ngClass"], [1, "flex-1", "min-w-0"], [1, "text-xs", "font-medium", "uppercase", "mb-0.5", 3, "ngClass"], [1, "text-sm", "font-medium", "truncate", 3, "ngClass"], [1, "text-xs", "mt-1", 3, "ngClass"], [1, "w-5", "h-5", "border-2", "border-current", "border-t-transparent", "rounded-full", "animate-spin"], ["fill", "currentColor", "viewBox", "0 0 24 24", 1, "w-4", "h-4", "text-green-500"], ["d", "M9 12l2 2 4-4m6 2a9 9 0 11-18 0 9 9 0 0118 0z"], ["stroke-linecap", "round", "stroke-linejoin", "round", "stroke-width", "2", "d", "M19 21V5a2 2 0 00-2-2H7a2 2 0 00-2 2v16m14 0h2m-2 0h-5m-9 0H3m2 0h5M9 7h1m-1 4h1m4-4h1m-1 4h1m-5 10v-5a1 1 0 011-1h2a1 1 0 011 1v5m-4 0h4"], ["stroke-linecap", "round", "stroke-linejoin", "round", "stroke-width", "2", "d", "M12 6V4m0 2a2 2 0 100 4m0-4a2 2 0 110 4m-6 8a2 2 0 100-4m0 4a2 2 0 110-4m0 4v2m0-6V4m6 6v10m6-2a2 2 0 100-4m0 4a2 2 0 110-4m0 4v2m0-6V4"], ["stroke-linecap", "round", "stroke-linejoin", "round", "stroke-width", "2", "d", "M9 19v-6a2 2 0 00-2-2H5a2 2 0 00-2 2v6a2 2 0 002 2h2a2 2 0 002-2zm0 0V9a2 2 0 012-2h2a2 2 0 012 2v10m-6 0a2 2 0 002 2h2a2 2 0 002-2m0 0V5a2 2 0 012-2h2a2 2 0 012 2v14a2 2 0 01-2 2h-2a2 2 0 01-2-2z"]], template: function SourceAnalysisTraceabilityComponent_Template(rf, ctx) { if (rf & 1) {
103190
+ static { this.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: SourceAnalysisTraceabilityComponent, selectors: [["symphiq-source-analysis-traceability"]], inputs: { sourceAnalyses: [1, "sourceAnalyses"], loadedSourceAnalysisIds: [1, "loadedSourceAnalysisIds"], loadingSourceAnalysisId: [1, "loadingSourceAnalysisId"], viewMode: [1, "viewMode"], goal: [1, "goal"] }, outputs: { sourceAnalysisClick: "sourceAnalysisClick" }, decls: 1, vars: 1, consts: [[1, "p-5", "rounded-xl", "flex", "flex-col", "gap-4", 3, "ngClass"], [1, "text-sm", "font-semibold", "flex", "items-center", "gap-2", 3, "ngClass"], ["fill", "none", "stroke", "currentColor", "viewBox", "0 0 24 24", 1, "w-4", "h-4"], ["stroke-linecap", "round", "stroke-linejoin", "round", "stroke-width", "2", "d", "M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"], [3, "score", "explanation", "viewMode"], [1, "grid", "grid-cols-1", "sm:grid-cols-2", "gap-3"], ["type", "button", 1, "p-4", "rounded-lg", "text-left", "transition-all", "hover:scale-[1.02]", "relative", 3, "ngClass"], ["type", "button", 1, "p-4", "rounded-lg", "text-left", "transition-all", "hover:scale-[1.02]", "relative", 3, "click", "ngClass"], [1, "absolute", "inset-0", "bg-black/10", "rounded-lg", "flex", "items-center", "justify-center"], [1, "absolute", "top-2", "right-2"], [1, "flex", "items-start", "gap-3"], [1, "w-8", "h-8", "rounded-lg", "flex", "items-center", "justify-center", "flex-shrink-0", 3, "ngClass"], [1, "flex-1", "min-w-0"], [1, "text-xs", "font-medium", "uppercase", "mb-0.5", 3, "ngClass"], [1, "text-sm", "font-medium", "truncate", 3, "ngClass"], [1, "text-xs", "mt-1", 3, "ngClass"], [1, "w-5", "h-5", "border-2", "border-current", "border-t-transparent", "rounded-full", "animate-spin"], ["fill", "currentColor", "viewBox", "0 0 24 24", 1, "w-4", "h-4", "text-green-500"], ["d", "M9 12l2 2 4-4m6 2a9 9 0 11-18 0 9 9 0 0118 0z"], ["stroke-linecap", "round", "stroke-linejoin", "round", "stroke-width", "2", "d", "M19 21V5a2 2 0 00-2-2H7a2 2 0 00-2 2v16m14 0h2m-2 0h-5m-9 0H3m2 0h5M9 7h1m-1 4h1m4-4h1m-1 4h1m-5 10v-5a1 1 0 011-1h2a1 1 0 011 1v5m-4 0h4"], ["stroke-linecap", "round", "stroke-linejoin", "round", "stroke-width", "2", "d", "M12 6V4m0 2a2 2 0 100 4m0-4a2 2 0 110 4m-6 8a2 2 0 100-4m0 4a2 2 0 110-4m0 4v2m0-6V4m6 6v10m6-2a2 2 0 100-4m0 4a2 2 0 110-4m0 4v2m0-6V4"], ["stroke-linecap", "round", "stroke-linejoin", "round", "stroke-width", "2", "d", "M9 19v-6a2 2 0 00-2-2H5a2 2 0 00-2 2v6a2 2 0 002 2h2a2 2 0 002-2zm0 0V9a2 2 0 012-2h2a2 2 0 012 2v10m-6 0a2 2 0 002 2h2a2 2 0 002-2m0 0V5a2 2 0 012-2h2a2 2 0 012 2v14a2 2 0 01-2 2h-2a2 2 0 01-2-2z"]], template: function SourceAnalysisTraceabilityComponent_Template(rf, ctx) { if (rf & 1) {
103167
103191
  i0.ɵɵconditionalCreate(0, SourceAnalysisTraceabilityComponent_Conditional_0_Template, 9, 6, "div", 0);
103168
103192
  } if (rf & 2) {
103169
103193
  let tmp_0_0;
@@ -103179,8 +103203,8 @@ class SourceAnalysisTraceabilityComponent {
103179
103203
  imports: [CommonModule, SynthesisConfidenceSectionComponent],
103180
103204
  template: `
103181
103205
  @if ((sourceAnalyses()?.length ?? 0) > 0) {
103182
- <div [ngClass]="sectionCardClasses()" class="p-5 rounded-xl">
103183
- <h4 [ngClass]="sectionTitleClasses()" class="text-sm font-semibold mb-4 flex items-center gap-2">
103206
+ <div [ngClass]="sectionCardClasses()" class="p-5 rounded-xl flex flex-col gap-4">
103207
+ <h4 [ngClass]="sectionTitleClasses()" class="text-sm font-semibold flex items-center gap-2">
103184
103208
  <svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24">
103185
103209
  <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"/>
103186
103210
  </svg>
@@ -103888,7 +103912,22 @@ class UnifiedDashboardModalComponent {
103888
103912
  clearTimeout(this.cleanupTimeoutId);
103889
103913
  this.cleanupTimeoutId = null;
103890
103914
  }
103891
- if (state.type !== 'unified-goal-detail' && state.type !== 'unified-goal-objectives' && state.type !== 'unified-goal-related-metrics' && state.type !== 'objective-strategies' && state.type !== 'strategy-recommendations' && state.type !== null) {
103915
+ const unifiedModalTypes = ['unified-goal-detail', 'unified-goal-objectives', 'unified-goal-related-metrics', 'objective-strategies', 'strategy-recommendations'];
103916
+ const isUnifiedType = unifiedModalTypes.includes(state.type || '');
103917
+ if (!isUnifiedType && state.type !== null) {
103918
+ // Close this modal when transitioning to a type we don't handle (e.g., metrics-list, metric)
103919
+ if (this.isOpen()) {
103920
+ console.log('[UnifiedDashboardModal] Closing - transitioning to non-unified type:', state.type);
103921
+ this.isOpen.set(false);
103922
+ this.cleanupTimeoutId = setTimeout(() => {
103923
+ this.modalType.set(null);
103924
+ this.modalData.set(null);
103925
+ this.modalTitle.set('');
103926
+ this.previousState.set(null);
103927
+ this.currentModalState.set(null);
103928
+ this.cleanupTimeoutId = null;
103929
+ }, 300);
103930
+ }
103892
103931
  return;
103893
103932
  }
103894
103933
  this.previousState.set(state.previousState ?? null);
@@ -103956,6 +103995,14 @@ class UnifiedDashboardModalComponent {
103956
103995
  return;
103957
103996
  const contributingMetricNames = data.goal.contributingMetrics || [];
103958
103997
  const contributingMetrics = data.allMetrics.filter(m => m.metric && contributingMetricNames.includes(m.metric));
103998
+ console.log('[UnifiedDashboardModal] onContributingMetricsClick:', {
103999
+ goalTitle: data.goal.title,
104000
+ contributingMetricNames,
104001
+ contributingMetricsCount: contributingMetrics.length,
104002
+ contributingMetricsPerformanceItemIds: contributingMetrics.map(m => m.performanceItemId),
104003
+ allChartsCount: data.allCharts?.length || 0,
104004
+ allChartsPerformanceItemIds: data.allCharts?.map(c => c.performanceItemId)
104005
+ });
103959
104006
  this.modalService.navigateToUnifiedGoalRelatedMetrics(data.goal, contributingMetrics, data.allCharts, this.viewMode());
103960
104007
  }
103961
104008
  onShowObjectives() {
@@ -103968,6 +104015,14 @@ class UnifiedDashboardModalComponent {
103968
104015
  const data = this.relatedMetricsData();
103969
104016
  const allCharts = data?.allCharts || [];
103970
104017
  const metricCharts = allCharts.filter(chart => chart.performanceItemId === metric.performanceItemId);
104018
+ console.log('[UnifiedDashboardModal] onRelatedMetricClick:', {
104019
+ metricName: metric.metric,
104020
+ metricPerformanceItemId: metric.performanceItemId,
104021
+ allChartsCount: allCharts.length,
104022
+ allChartsPerformanceItemIds: allCharts.map(c => c.performanceItemId),
104023
+ filteredChartsCount: metricCharts.length,
104024
+ currentModalState: this.currentModalState()?.type
104025
+ });
103971
104026
  this.modalService.openMetricModal(metric, metricCharts, this.currentModalState() ?? undefined);
103972
104027
  }
103973
104028
  navigateToBreadcrumb(index) {