@eric-emg/symphiq-components 1.2.348 → 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.
- package/fesm2022/symphiq-components.mjs +52 -7
- package/fesm2022/symphiq-components.mjs.map +1 -1
- package/index.d.ts +38 -36
- package/index.d.ts.map +1 -1
- package/package.json +1 -1
|
@@ -89099,19 +89099,42 @@ class SymphiqProfileAnalysisDashboardComponent {
|
|
|
89099
89099
|
this.isEditingCurrency = signal(false, ...(ngDevMode ? [{ debugName: "isEditingCurrency" }] : []));
|
|
89100
89100
|
this.editingCurrencySelection = signal(null, ...(ngDevMode ? [{ debugName: "editingCurrencySelection" }] : []));
|
|
89101
89101
|
this.selectedPeriodUnit = computed(() => {
|
|
89102
|
-
return this.
|
|
89102
|
+
return this.accountSignal()?.chargebeeItemPricePeriodUnit || ChargebeeItemPricePeriodUnitEnum.YEAR;
|
|
89103
89103
|
}, ...(ngDevMode ? [{ debugName: "selectedPeriodUnit" }] : []));
|
|
89104
89104
|
this.showPlanSelection = computed(() => {
|
|
89105
|
-
|
|
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" }] : []));
|
|
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 }]));
|
|
89107
89127
|
this.isSubscriptionActive = computed(() => {
|
|
89108
|
-
const account = this.
|
|
89109
|
-
|
|
89110
|
-
|
|
89111
|
-
|
|
89128
|
+
const account = this.accountSignal();
|
|
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;
|
|
89112
89135
|
}, ...(ngDevMode ? [{ debugName: "isSubscriptionActive" }] : []));
|
|
89113
89136
|
this.hasBillingCurrency = computed(() => {
|
|
89114
|
-
const account = this.
|
|
89137
|
+
const account = this.accountSignal();
|
|
89115
89138
|
return !!account?.billingCurrencyCode;
|
|
89116
89139
|
}, ...(ngDevMode ? [{ debugName: "hasBillingCurrency" }] : []));
|
|
89117
89140
|
this.hasCurrencySelected = computed(() => {
|
|
@@ -89501,14 +89524,36 @@ class SymphiqProfileAnalysisDashboardComponent {
|
|
|
89501
89524
|
}
|
|
89502
89525
|
}
|
|
89503
89526
|
ngOnChanges(changes) {
|
|
89527
|
+
console.log('[ProfileAnalysisDashboard] ngOnChanges called with keys:', Object.keys(changes));
|
|
89504
89528
|
// Update the signal whenever funnelAnalysis input changes
|
|
89505
89529
|
if (changes['funnelAnalysis']) {
|
|
89506
89530
|
this.funnelAnalysisSignal.set(this.funnelAnalysis());
|
|
89507
89531
|
}
|
|
89532
|
+
// Update account signal when account input changes
|
|
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
|
+
});
|
|
89544
|
+
this.accountSignal.set(this.account());
|
|
89545
|
+
console.log('[ProfileAnalysisDashboard] accountSignal updated, isSubscriptionActive:', this.isSubscriptionActive());
|
|
89546
|
+
}
|
|
89508
89547
|
}
|
|
89509
89548
|
ngOnInit() {
|
|
89549
|
+
console.log('[ProfileAnalysisDashboard] ngOnInit called with account:', {
|
|
89550
|
+
subscriptionStatus: this.account()?.subscriptionStatus,
|
|
89551
|
+
billingCurrencyCode: this.account()?.billingCurrencyCode
|
|
89552
|
+
});
|
|
89510
89553
|
// Set the signal with the funnelAnalysis data
|
|
89511
89554
|
this.funnelAnalysisSignal.set(this.funnelAnalysis());
|
|
89555
|
+
// Set account signal (effect also does this, but ensure it's set on init)
|
|
89556
|
+
this.accountSignal.set(this.account());
|
|
89512
89557
|
// Index business profile recommendations into ProfileContextService
|
|
89513
89558
|
// This enables detailed recommendation lookup for goal business insights
|
|
89514
89559
|
const profileToUse = this.profile();
|