@eric-emg/symphiq-components 1.2.349 → 1.2.350

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.
@@ -89102,14 +89102,36 @@ class SymphiqProfileAnalysisDashboardComponent {
89102
89102
  return this.accountSignal()?.chargebeeItemPricePeriodUnit || ChargebeeItemPricePeriodUnitEnum.YEAR;
89103
89103
  }, ...(ngDevMode ? [{ debugName: "selectedPeriodUnit" }] : []));
89104
89104
  this.showPlanSelection = computed(() => {
89105
- return this.hasBillingCurrency() && !this.isSubscriptionActive() && this.planCardInfos() && this.planCardInfos().length > 0;
89105
+ const hasCurrency = this.hasBillingCurrency();
89106
+ const isActive = this.isSubscriptionActive();
89107
+ const hasPlans = this.planCardInfos() && this.planCardInfos().length > 0;
89108
+ const result = hasCurrency && !isActive && hasPlans;
89109
+ console.log('[ProfileAnalysisDashboard] showPlanSelection computed:', {
89110
+ hasBillingCurrency: hasCurrency,
89111
+ isSubscriptionActive: isActive,
89112
+ hasPlans,
89113
+ result
89114
+ });
89115
+ return result;
89106
89116
  }, ...(ngDevMode ? [{ debugName: "showPlanSelection" }] : []));
89107
89117
  this.accountSignal = signal(undefined, ...(ngDevMode ? [{ debugName: "accountSignal" }] : []));
89118
+ this.accountInputEffect = effect(() => {
89119
+ const accountInput = this.account();
89120
+ console.log('[ProfileAnalysisDashboard] account input effect triggered:', {
89121
+ subscriptionStatus: accountInput?.subscriptionStatus,
89122
+ billingCurrencyCode: accountInput?.billingCurrencyCode,
89123
+ isActive: accountInput ? ChargebeeSubscriptionStatusEnumUtil.isActive(accountInput.subscriptionStatus) : false
89124
+ });
89125
+ this.accountSignal.set(accountInput);
89126
+ }, ...(ngDevMode ? [{ debugName: "accountInputEffect", allowSignalWrites: true }] : [{ allowSignalWrites: true }]));
89108
89127
  this.isSubscriptionActive = computed(() => {
89109
89128
  const account = this.accountSignal();
89110
- if (!account)
89111
- return false;
89112
- return ChargebeeSubscriptionStatusEnumUtil.isActive(account.subscriptionStatus) ?? false;
89129
+ const isActive = account ? (ChargebeeSubscriptionStatusEnumUtil.isActive(account.subscriptionStatus) ?? false) : false;
89130
+ console.log('[ProfileAnalysisDashboard] isSubscriptionActive computed:', {
89131
+ subscriptionStatus: account?.subscriptionStatus,
89132
+ isActive
89133
+ });
89134
+ return isActive;
89113
89135
  }, ...(ngDevMode ? [{ debugName: "isSubscriptionActive" }] : []));
89114
89136
  this.hasBillingCurrency = computed(() => {
89115
89137
  const account = this.accountSignal();
@@ -89502,19 +89524,35 @@ class SymphiqProfileAnalysisDashboardComponent {
89502
89524
  }
89503
89525
  }
89504
89526
  ngOnChanges(changes) {
89527
+ console.log('[ProfileAnalysisDashboard] ngOnChanges called with keys:', Object.keys(changes));
89505
89528
  // Update the signal whenever funnelAnalysis input changes
89506
89529
  if (changes['funnelAnalysis']) {
89507
89530
  this.funnelAnalysisSignal.set(this.funnelAnalysis());
89508
89531
  }
89509
89532
  // Update account signal when account input changes
89510
89533
  if (changes['account']) {
89534
+ const prevAccount = changes['account'].previousValue;
89535
+ const currAccount = changes['account'].currentValue;
89536
+ console.log('[ProfileAnalysisDashboard] account input changed:', {
89537
+ previousSubscriptionStatus: prevAccount?.subscriptionStatus,
89538
+ currentSubscriptionStatus: currAccount?.subscriptionStatus,
89539
+ previousBillingCurrency: prevAccount?.billingCurrencyCode,
89540
+ currentBillingCurrency: currAccount?.billingCurrencyCode,
89541
+ isFirstChange: changes['account'].firstChange,
89542
+ sameReference: prevAccount === currAccount
89543
+ });
89511
89544
  this.accountSignal.set(this.account());
89545
+ console.log('[ProfileAnalysisDashboard] accountSignal updated, isSubscriptionActive:', this.isSubscriptionActive());
89512
89546
  }
89513
89547
  }
89514
89548
  ngOnInit() {
89549
+ console.log('[ProfileAnalysisDashboard] ngOnInit called with account:', {
89550
+ subscriptionStatus: this.account()?.subscriptionStatus,
89551
+ billingCurrencyCode: this.account()?.billingCurrencyCode
89552
+ });
89515
89553
  // Set the signal with the funnelAnalysis data
89516
89554
  this.funnelAnalysisSignal.set(this.funnelAnalysis());
89517
- // Set account signal
89555
+ // Set account signal (effect also does this, but ensure it's set on init)
89518
89556
  this.accountSignal.set(this.account());
89519
89557
  // Index business profile recommendations into ProfileContextService
89520
89558
  // This enables detailed recommendation lookup for goal business insights