@eric-emg/symphiq-components 1.2.191 → 1.2.193
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 +57 -200
- package/fesm2022/symphiq-components.mjs.map +1 -1
- package/index.d.ts +37 -37
- package/index.d.ts.map +1 -1
- package/package.json +1 -1
- package/styles.css +0 -4
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ViewModeEnum, MetricStatusEnum, TrendDirectionEnum, CompetitiveScoreEnum, ChartTypeEnum, IconSourceEnum, ProfileAnalysisRecommendationPriorityEnum, ProfileItemTypeEnum, PriceVsCompetitorsEnum, DifferentiationStrengthEnum, ThreatLevelEnum, normalizeToV3, MetricEnum, FocusAreaDetailStatusEnum, FocusAreaDomainEnumUtil, FocusAreaDomainEnum, ShopDataLoadStatusEnum, DimensionEnum, AiDynamicContentStatusEnum, FocusAreaHealthEnum, ProfileAnalysisPriorityEnum, CapabilityStateEnum, QuadrantEnum, AdvantageEnum, OverallGradeEnum, OperationalMaturityEnum, ProfileAnalysisEffortLevelEnum, ProfileAnalysisImpactLevelEnum, ProfileAnalysisTypeEnum, LineChartUseCaseEnum, BarChartUseCaseEnum } from '@jebgem/model';
|
|
1
|
+
import { ViewModeEnum, MetricStatusEnum, TrendDirectionEnum, CompetitiveScoreEnum, ChartTypeEnum, IconSourceEnum, ProfileAnalysisRecommendationPriorityEnum, ProfileItemTypeEnum, PriceVsCompetitorsEnum, DifferentiationStrengthEnum, ThreatLevelEnum, normalizeToV3, MetricEnum, FocusAreaDetailStatusEnum, FocusAreaDomainEnumUtil, FocusAreaDomainEnum, ShopDataLoadStatusEnum, DimensionEnum, UiDataPeriodEnum, UiDataComparePeriodEnum, AiDynamicContentStatusEnum, FocusAreaHealthEnum, ProfileAnalysisPriorityEnum, CapabilityStateEnum, QuadrantEnum, AdvantageEnum, OverallGradeEnum, OperationalMaturityEnum, ProfileAnalysisEffortLevelEnum, ProfileAnalysisImpactLevelEnum, ProfileAnalysisTypeEnum, LineChartUseCaseEnum, BarChartUseCaseEnum } from '@jebgem/model';
|
|
2
2
|
export * from '@jebgem/model';
|
|
3
3
|
import * as i0 from '@angular/core';
|
|
4
4
|
import { Injectable, signal, computed, input, ChangeDetectionStrategy, Component, output, inject, ElementRef, Renderer2, effect, Directive, HostListener, untracked, ViewChild, PLATFORM_ID, Inject, Input } from '@angular/core';
|
|
@@ -13834,20 +13834,12 @@ class ProfileItemLookupService {
|
|
|
13834
13834
|
return undefined;
|
|
13835
13835
|
}
|
|
13836
13836
|
findItemsByIds(ids) {
|
|
13837
|
-
console.log('[ProfileItemLookupService] findItemsByIds called:', {
|
|
13838
|
-
inputIds: ids,
|
|
13839
|
-
hasProfileData: !!this.profileData(),
|
|
13840
|
-
hasProfileStructured: !!this.profileData()?.profileStructured,
|
|
13841
|
-
hasSections: !!this.profileData()?.profileStructured?.sections
|
|
13842
|
-
});
|
|
13843
13837
|
const results = ids
|
|
13844
13838
|
.map(id => {
|
|
13845
13839
|
const found = this.findItemById(id);
|
|
13846
|
-
console.log('[ProfileItemLookupService] findItemById:', { id, found: !!found });
|
|
13847
13840
|
return found;
|
|
13848
13841
|
})
|
|
13849
13842
|
.filter((item) => item !== undefined);
|
|
13850
|
-
console.log('[ProfileItemLookupService] findItemsByIds result:', { inputCount: ids.length, foundCount: results.length });
|
|
13851
13843
|
return results;
|
|
13852
13844
|
}
|
|
13853
13845
|
findItemWithContext(id) {
|
|
@@ -13924,11 +13916,6 @@ class RelatedAreaChipsComponent {
|
|
|
13924
13916
|
this.relatedItems = computed(() => {
|
|
13925
13917
|
const ids = this.relatedAreaIds();
|
|
13926
13918
|
const items = this.lookupService.findItemsByIds(ids);
|
|
13927
|
-
console.log('[RelatedAreaChips] relatedItems computed:', {
|
|
13928
|
-
inputIds: ids,
|
|
13929
|
-
foundItems: items,
|
|
13930
|
-
foundCount: items.length
|
|
13931
|
-
});
|
|
13932
13919
|
return items;
|
|
13933
13920
|
}, ...(ngDevMode ? [{ debugName: "relatedItems" }] : []));
|
|
13934
13921
|
}
|
|
@@ -14032,16 +14019,8 @@ class CompetitorChipListComponent {
|
|
|
14032
14019
|
this.modalService = inject(ModalService);
|
|
14033
14020
|
this.competitorItems = computed(() => {
|
|
14034
14021
|
const ids = this.relatedCompetitorIds();
|
|
14035
|
-
console.log('[CompetitorChipList] competitorItems computed:', {
|
|
14036
|
-
inputIds: ids,
|
|
14037
|
-
hasIds: ids && ids.length > 0
|
|
14038
|
-
});
|
|
14039
14022
|
if (ids && ids.length > 0) {
|
|
14040
14023
|
const items = this.lookupService.findItemsByIds(ids);
|
|
14041
|
-
console.log('[CompetitorChipList] lookupService.findItemsByIds result:', {
|
|
14042
|
-
foundItems: items,
|
|
14043
|
-
foundCount: items.length
|
|
14044
|
-
});
|
|
14045
14024
|
return items;
|
|
14046
14025
|
}
|
|
14047
14026
|
return [];
|
|
@@ -14049,11 +14028,9 @@ class CompetitorChipListComponent {
|
|
|
14049
14028
|
this.displayItems = computed(() => {
|
|
14050
14029
|
const items = this.competitorItems();
|
|
14051
14030
|
if (items.length > 0) {
|
|
14052
|
-
console.log('[CompetitorChipList] displayItems: using competitorItems', { count: items.length });
|
|
14053
14031
|
return items;
|
|
14054
14032
|
}
|
|
14055
14033
|
const fallbackItems = this.competitors().map(name => ({ label: name }));
|
|
14056
|
-
console.log('[CompetitorChipList] displayItems: using fallback competitors', { count: fallbackItems.length, fallbackItems });
|
|
14057
14034
|
return fallbackItems;
|
|
14058
14035
|
}, ...(ngDevMode ? [{ debugName: "displayItems" }] : []));
|
|
14059
14036
|
}
|
|
@@ -14599,7 +14576,6 @@ class RelatedRecommendationChipsComponent {
|
|
|
14599
14576
|
scrollToRecommendation(recommendationId) {
|
|
14600
14577
|
const targetElement = document.getElementById(`recommendation-${recommendationId}`);
|
|
14601
14578
|
if (!targetElement) {
|
|
14602
|
-
console.warn(`Recommendation element not found: recommendation-${recommendationId}`);
|
|
14603
14579
|
const recommendationsSection = document.querySelector('[data-subsection-id="recommendations"]');
|
|
14604
14580
|
if (recommendationsSection) {
|
|
14605
14581
|
const expandButton = recommendationsSection.querySelector('[aria-expanded="false"]');
|
|
@@ -15422,29 +15398,13 @@ class RecommendationCardComponent {
|
|
|
15422
15398
|
let result;
|
|
15423
15399
|
if (this.recommendation()) {
|
|
15424
15400
|
result = this.recommendation();
|
|
15425
|
-
console.log('[RecommendationCard] detailedRecommendation: using direct recommendation input', {
|
|
15426
|
-
id: result?.id,
|
|
15427
|
-
hasRelatedCompetitorIds: !!result?.relatedCompetitorIds,
|
|
15428
|
-
relatedCompetitorIds: result?.relatedCompetitorIds,
|
|
15429
|
-
hasRelatedProfileItemIds: !!result?.relatedProfileItemIds,
|
|
15430
|
-
relatedProfileItemIds: result?.relatedProfileItemIds
|
|
15431
|
-
});
|
|
15432
15401
|
return result;
|
|
15433
15402
|
}
|
|
15434
15403
|
const item = this.item();
|
|
15435
15404
|
if (!item?.id) {
|
|
15436
|
-
console.log('[RecommendationCard] detailedRecommendation: no item id');
|
|
15437
15405
|
return undefined;
|
|
15438
15406
|
}
|
|
15439
15407
|
result = this.profileContextService.getRecommendationById(item.id);
|
|
15440
|
-
console.log('[RecommendationCard] detailedRecommendation: from profileContextService', {
|
|
15441
|
-
itemId: item.id,
|
|
15442
|
-
found: !!result,
|
|
15443
|
-
hasRelatedCompetitorIds: !!result?.relatedCompetitorIds,
|
|
15444
|
-
relatedCompetitorIds: result?.relatedCompetitorIds,
|
|
15445
|
-
hasRelatedProfileItemIds: !!result?.relatedProfileItemIds,
|
|
15446
|
-
relatedProfileItemIds: result?.relatedProfileItemIds
|
|
15447
|
-
});
|
|
15448
15408
|
return result;
|
|
15449
15409
|
}, ...(ngDevMode ? [{ debugName: "detailedRecommendation" }] : []));
|
|
15450
15410
|
this.businessContextItems = computed(() => {
|
|
@@ -15507,13 +15467,6 @@ class RecommendationCardComponent {
|
|
|
15507
15467
|
const hasCompetitors = !!(detailed?.relatedCompetitorIds && detailed.relatedCompetitorIds.length > 0);
|
|
15508
15468
|
const isExpanded = this.isActuallyExpanded();
|
|
15509
15469
|
const shouldShow = hasCompetitors && isExpanded;
|
|
15510
|
-
console.log('[RecommendationCard] shouldShowRelatedCompetitors:', {
|
|
15511
|
-
hasDetailedRec: !!detailed,
|
|
15512
|
-
relatedCompetitorIds: detailed?.relatedCompetitorIds,
|
|
15513
|
-
hasCompetitors,
|
|
15514
|
-
isExpanded,
|
|
15515
|
-
shouldShow
|
|
15516
|
-
});
|
|
15517
15470
|
return shouldShow;
|
|
15518
15471
|
}, ...(ngDevMode ? [{ debugName: "shouldShowRelatedCompetitors" }] : []));
|
|
15519
15472
|
this.shouldShowRelatedAreas = computed(() => {
|
|
@@ -15521,13 +15474,6 @@ class RecommendationCardComponent {
|
|
|
15521
15474
|
const hasAreas = !!(detailed?.relatedProfileItemIds && detailed.relatedProfileItemIds.length > 0);
|
|
15522
15475
|
const isExpanded = this.isActuallyExpanded();
|
|
15523
15476
|
const shouldShow = hasAreas && isExpanded;
|
|
15524
|
-
console.log('[RecommendationCard] shouldShowRelatedAreas:', {
|
|
15525
|
-
hasDetailedRec: !!detailed,
|
|
15526
|
-
relatedProfileItemIds: detailed?.relatedProfileItemIds,
|
|
15527
|
-
hasAreas,
|
|
15528
|
-
isExpanded,
|
|
15529
|
-
shouldShow
|
|
15530
|
-
});
|
|
15531
15477
|
return shouldShow;
|
|
15532
15478
|
}, ...(ngDevMode ? [{ debugName: "shouldShowRelatedAreas" }] : []));
|
|
15533
15479
|
this.shouldShowRelatedFocusAreas = computed(() => {
|
|
@@ -15701,23 +15647,9 @@ class RecommendationCardComponent {
|
|
|
15701
15647
|
return detailed?.relatedFocusAreas || [];
|
|
15702
15648
|
}
|
|
15703
15649
|
logCompetitorData() {
|
|
15704
|
-
const detailed = this.detailedRecommendation();
|
|
15705
|
-
console.log('[RecommendationCard] logCompetitorData:', {
|
|
15706
|
-
recommendationId: this.item()?.id,
|
|
15707
|
-
recommendationLabel: this.displayItem()?.label,
|
|
15708
|
-
relatedCompetitorIds: detailed?.relatedCompetitorIds,
|
|
15709
|
-
hasCompetitors: !!(detailed?.relatedCompetitorIds && detailed.relatedCompetitorIds.length > 0)
|
|
15710
|
-
});
|
|
15711
15650
|
return false;
|
|
15712
15651
|
}
|
|
15713
15652
|
logAreaData() {
|
|
15714
|
-
const detailed = this.detailedRecommendation();
|
|
15715
|
-
console.log('[RecommendationCard] logAreaData:', {
|
|
15716
|
-
recommendationId: this.item()?.id,
|
|
15717
|
-
recommendationLabel: this.displayItem()?.label,
|
|
15718
|
-
relatedProfileItemIds: detailed?.relatedProfileItemIds,
|
|
15719
|
-
hasAreas: !!(detailed?.relatedProfileItemIds && detailed.relatedProfileItemIds.length > 0)
|
|
15720
|
-
});
|
|
15721
15653
|
return false;
|
|
15722
15654
|
}
|
|
15723
15655
|
onCardClick(event) {
|
|
@@ -24531,9 +24463,6 @@ class FloatingTocComponent {
|
|
|
24531
24463
|
if (element) {
|
|
24532
24464
|
this.scrollToElement(element);
|
|
24533
24465
|
}
|
|
24534
|
-
else {
|
|
24535
|
-
console.warn('[FloatingTOC] Element not found for section:', sectionId);
|
|
24536
|
-
}
|
|
24537
24466
|
if (!this.isPinned()) {
|
|
24538
24467
|
this.isHovered.set(false);
|
|
24539
24468
|
}
|
|
@@ -24543,9 +24472,6 @@ class FloatingTocComponent {
|
|
|
24543
24472
|
if (element) {
|
|
24544
24473
|
this.scrollToElement(element);
|
|
24545
24474
|
}
|
|
24546
|
-
else {
|
|
24547
|
-
console.warn('[FloatingTOC] Element not found for subsection:', subsectionId);
|
|
24548
|
-
}
|
|
24549
24475
|
if (!this.isPinned()) {
|
|
24550
24476
|
this.isHovered.set(false);
|
|
24551
24477
|
}
|
|
@@ -40639,7 +40565,6 @@ class CompetitorAnalysisCardComponent {
|
|
|
40639
40565
|
return;
|
|
40640
40566
|
const context = this.lookupService.findItemWithContext(item.id);
|
|
40641
40567
|
if (!context) {
|
|
40642
|
-
console.warn(`Item not found: ${item.id}`);
|
|
40643
40568
|
return;
|
|
40644
40569
|
}
|
|
40645
40570
|
// Check if an item-detail modal is currently open
|
|
@@ -44645,57 +44570,12 @@ class ProfileAnalysisModalComponent {
|
|
|
44645
44570
|
return undefined;
|
|
44646
44571
|
}
|
|
44647
44572
|
logContainingBlockInfo() {
|
|
44648
|
-
console.group('[ProfileAnalysisModal] Containing Block Debug Info');
|
|
44649
|
-
let element = this.hostElement.nativeElement;
|
|
44650
|
-
const containingBlockTriggers = [];
|
|
44651
|
-
while (element && element !== this.document.body) {
|
|
44652
|
-
const styles = window.getComputedStyle(element);
|
|
44653
|
-
const transform = styles.transform;
|
|
44654
|
-
const willChange = styles.willChange;
|
|
44655
|
-
const contain = styles.contain;
|
|
44656
|
-
const filter = styles.filter;
|
|
44657
|
-
const perspective = styles.perspective;
|
|
44658
|
-
const backdropFilter = styles.backdropFilter || styles.getPropertyValue('backdrop-filter');
|
|
44659
|
-
if (transform && transform !== 'none') {
|
|
44660
|
-
containingBlockTriggers.push({ element, property: 'transform', value: transform });
|
|
44661
|
-
}
|
|
44662
|
-
if (willChange && (willChange.includes('transform') || willChange.includes('perspective') || willChange.includes('filter'))) {
|
|
44663
|
-
containingBlockTriggers.push({ element, property: 'will-change', value: willChange });
|
|
44664
|
-
}
|
|
44665
|
-
if (contain && contain !== 'none') {
|
|
44666
|
-
containingBlockTriggers.push({ element, property: 'contain', value: contain });
|
|
44667
|
-
}
|
|
44668
|
-
if (filter && filter !== 'none') {
|
|
44669
|
-
containingBlockTriggers.push({ element, property: 'filter', value: filter });
|
|
44670
|
-
}
|
|
44671
|
-
if (perspective && perspective !== 'none') {
|
|
44672
|
-
containingBlockTriggers.push({ element, property: 'perspective', value: perspective });
|
|
44673
|
-
}
|
|
44674
|
-
if (backdropFilter && backdropFilter !== 'none') {
|
|
44675
|
-
containingBlockTriggers.push({ element, property: 'backdrop-filter', value: backdropFilter });
|
|
44676
|
-
}
|
|
44677
|
-
element = element.parentElement;
|
|
44678
|
-
}
|
|
44679
|
-
if (containingBlockTriggers.length > 0) {
|
|
44680
|
-
console.warn('Found CSS properties that create containing blocks for fixed positioning:');
|
|
44681
|
-
containingBlockTriggers.forEach(({ element, property, value }) => {
|
|
44682
|
-
console.log(` Element:`, element);
|
|
44683
|
-
console.log(` ${property}: ${value}`);
|
|
44684
|
-
});
|
|
44685
|
-
}
|
|
44686
|
-
else {
|
|
44687
|
-
console.log('No containing block triggers found in ancestor chain');
|
|
44688
|
-
}
|
|
44689
|
-
console.log('Host element:', this.hostElement.nativeElement);
|
|
44690
|
-
console.log('Modal wrapper ref:', this.modalWrapper);
|
|
44691
|
-
console.groupEnd();
|
|
44692
44573
|
}
|
|
44693
44574
|
moveModalToBody() {
|
|
44694
44575
|
if (this.modalMovedToBody || !this.modalWrapper?.nativeElement) {
|
|
44695
44576
|
return;
|
|
44696
44577
|
}
|
|
44697
44578
|
const modalEl = this.modalWrapper.nativeElement;
|
|
44698
|
-
console.log('[ProfileAnalysisModal] Moving modal to document.body');
|
|
44699
44579
|
this.renderer.appendChild(this.document.body, modalEl);
|
|
44700
44580
|
this.modalMovedToBody = true;
|
|
44701
44581
|
}
|
|
@@ -44704,7 +44584,6 @@ class ProfileAnalysisModalComponent {
|
|
|
44704
44584
|
return;
|
|
44705
44585
|
}
|
|
44706
44586
|
const modalEl = this.modalWrapper.nativeElement;
|
|
44707
|
-
console.log('[ProfileAnalysisModal] Returning modal to host element');
|
|
44708
44587
|
this.renderer.appendChild(this.hostElement.nativeElement, modalEl);
|
|
44709
44588
|
this.modalMovedToBody = false;
|
|
44710
44589
|
}
|
|
@@ -57511,36 +57390,54 @@ function aggregateAndSortByMonth(points) {
|
|
|
57511
57390
|
});
|
|
57512
57391
|
return sortDataByMonth(Array.from(monthMap.values()));
|
|
57513
57392
|
}
|
|
57514
|
-
function
|
|
57515
|
-
|
|
57516
|
-
|
|
57517
|
-
|
|
57518
|
-
|
|
57519
|
-
|
|
57520
|
-
|
|
57393
|
+
function getConvertedDataForSource(uiData, source) {
|
|
57394
|
+
if (!uiData)
|
|
57395
|
+
return undefined;
|
|
57396
|
+
const periodInfo = uiData.periodInfo;
|
|
57397
|
+
let result;
|
|
57398
|
+
switch (source) {
|
|
57399
|
+
case 'current':
|
|
57400
|
+
result = uiData.convertedDataResults;
|
|
57401
|
+
break;
|
|
57402
|
+
case 'compare':
|
|
57403
|
+
result = uiData.convertedDataResultsCompare;
|
|
57404
|
+
break;
|
|
57405
|
+
case 'priorYear':
|
|
57406
|
+
if (periodInfo?.period === UiDataPeriodEnum.THIS_YEAR &&
|
|
57407
|
+
periodInfo?.comparePeriod === UiDataComparePeriodEnum.PREVIOUS_PERIOD) {
|
|
57408
|
+
result = uiData.convertedDataResultsCompare;
|
|
57409
|
+
}
|
|
57410
|
+
else if (periodInfo?.period === UiDataPeriodEnum.THIS_AND_LAST_YEAR) {
|
|
57411
|
+
result = uiData.convertedDataResults;
|
|
57412
|
+
}
|
|
57413
|
+
else if (periodInfo?.comparePeriod === UiDataComparePeriodEnum.SAME_PERIOD_LAST_YEAR) {
|
|
57414
|
+
result = uiData.convertedDataResultsCompare;
|
|
57415
|
+
}
|
|
57416
|
+
else if (periodInfo?.comparePeriod === UiDataComparePeriodEnum.PREVIOUS_PERIOD) {
|
|
57417
|
+
result = uiData.convertedDataResultsCompare;
|
|
57418
|
+
}
|
|
57419
|
+
else {
|
|
57420
|
+
result = uiData.convertedDataResultsCompare;
|
|
57421
|
+
}
|
|
57422
|
+
break;
|
|
57423
|
+
}
|
|
57424
|
+
return result;
|
|
57425
|
+
}
|
|
57426
|
+
function sumMetricFromUiData(uiData, metricToSum, source = 'current') {
|
|
57427
|
+
const convertedData = getConvertedDataForSource(uiData, source);
|
|
57428
|
+
if (!convertedData) {
|
|
57521
57429
|
return 0;
|
|
57522
57430
|
}
|
|
57523
57431
|
let total = 0;
|
|
57524
|
-
const convertedData = uiData.convertedDataResults;
|
|
57525
57432
|
const metricIndex = convertedData.metrics?.indexOf(metricToSum);
|
|
57526
|
-
console.log('Available metrics:', convertedData.metrics);
|
|
57527
|
-
console.log('metricIndex for', metricToSum, ':', metricIndex);
|
|
57528
57433
|
if (metricIndex === undefined || metricIndex === -1) {
|
|
57529
|
-
console.log('EARLY RETURN: metricIndex is undefined or -1');
|
|
57530
|
-
console.groupEnd();
|
|
57531
57434
|
return 0;
|
|
57532
57435
|
}
|
|
57533
|
-
|
|
57534
|
-
convertedData.rows?.forEach((row, idx) => {
|
|
57436
|
+
convertedData.rows?.forEach((row) => {
|
|
57535
57437
|
const rawValue = row.metricValues?.[metricIndex];
|
|
57536
57438
|
const metricValue = parseFloat(rawValue || '0');
|
|
57537
|
-
if (idx < 3) {
|
|
57538
|
-
console.log(`Row ${idx}: raw="${rawValue}", parsed=${metricValue}`);
|
|
57539
|
-
}
|
|
57540
57439
|
total += metricValue;
|
|
57541
57440
|
});
|
|
57542
|
-
console.log('Final total:', total);
|
|
57543
|
-
console.groupEnd();
|
|
57544
57441
|
return total;
|
|
57545
57442
|
}
|
|
57546
57443
|
|
|
@@ -57556,7 +57453,7 @@ class RevenueCalculatorService {
|
|
|
57556
57453
|
return this.calculateTargetsFromRevenue(revenueTarget, mainUiData, funnelMetrics);
|
|
57557
57454
|
}
|
|
57558
57455
|
extractPriorYearRevenue(mainUiData) {
|
|
57559
|
-
return sumMetricFromUiData(mainUiData, MetricEnum.PURCHASE_REVENUE);
|
|
57456
|
+
return sumMetricFromUiData(mainUiData, MetricEnum.PURCHASE_REVENUE, 'priorYear');
|
|
57560
57457
|
}
|
|
57561
57458
|
extractBaselineValues(mainUiData, funnelMetrics) {
|
|
57562
57459
|
const baselineValues = new Map();
|
|
@@ -57565,7 +57462,7 @@ class RevenueCalculatorService {
|
|
|
57565
57462
|
}
|
|
57566
57463
|
funnelMetrics.forEach(fm => {
|
|
57567
57464
|
if (fm.relatedMetric) {
|
|
57568
|
-
const value = sumMetricFromUiData(mainUiData, fm.relatedMetric);
|
|
57465
|
+
const value = sumMetricFromUiData(mainUiData, fm.relatedMetric, 'priorYear');
|
|
57569
57466
|
baselineValues.set(fm.relatedMetric, value);
|
|
57570
57467
|
}
|
|
57571
57468
|
});
|
|
@@ -57771,10 +57668,10 @@ class InitialTargetSettingComponent {
|
|
|
57771
57668
|
this.targetsCreated = output();
|
|
57772
57669
|
this.inputMode = signal('absolute', ...(ngDevMode ? [{ debugName: "inputMode" }] : []));
|
|
57773
57670
|
this.absoluteInput = signal(null, ...(ngDevMode ? [{ debugName: "absoluteInput" }] : []));
|
|
57774
|
-
this.percentageInput = signal(
|
|
57671
|
+
this.percentageInput = signal(null, ...(ngDevMode ? [{ debugName: "percentageInput" }] : []));
|
|
57775
57672
|
this.isSubmitting = signal(false, ...(ngDevMode ? [{ debugName: "isSubmitting" }] : []));
|
|
57776
57673
|
this.priorYearRevenue = computed(() => {
|
|
57777
|
-
return sumMetricFromUiData(this.mainUiData(), MetricEnum.PURCHASE_REVENUE);
|
|
57674
|
+
return sumMetricFromUiData(this.mainUiData(), MetricEnum.PURCHASE_REVENUE, 'priorYear');
|
|
57778
57675
|
}, ...(ngDevMode ? [{ debugName: "priorYearRevenue" }] : []));
|
|
57779
57676
|
this.currentPaceProjection = computed(() => {
|
|
57780
57677
|
const pacingData = this.pacingMetrics();
|
|
@@ -57800,6 +57697,8 @@ class InitialTargetSettingComponent {
|
|
|
57800
57697
|
}
|
|
57801
57698
|
else {
|
|
57802
57699
|
const pct = this.percentageInput();
|
|
57700
|
+
if (pct === null)
|
|
57701
|
+
return 0;
|
|
57803
57702
|
return priorRevenue * (1 + pct / 100);
|
|
57804
57703
|
}
|
|
57805
57704
|
}, ...(ngDevMode ? [{ debugName: "calculatedRevenue" }] : []));
|
|
@@ -57821,7 +57720,10 @@ class InitialTargetSettingComponent {
|
|
|
57821
57720
|
return this.revenueCalcService.calculateTargetsFromRevenue(revenue, mainData, metrics).metricCalculations;
|
|
57822
57721
|
}
|
|
57823
57722
|
else {
|
|
57824
|
-
|
|
57723
|
+
const pct = this.percentageInput();
|
|
57724
|
+
if (pct === null)
|
|
57725
|
+
return [];
|
|
57726
|
+
return this.revenueCalcService.calculateTargetsFromPercentage(pct, mainData, metrics).metricCalculations;
|
|
57825
57727
|
}
|
|
57826
57728
|
}, ...(ngDevMode ? [{ debugName: "metricCalculations" }] : []));
|
|
57827
57729
|
this.isValid = computed(() => {
|
|
@@ -57863,31 +57765,6 @@ class InitialTargetSettingComponent {
|
|
|
57863
57765
|
}, ...(ngDevMode ? [{ debugName: "revenueChartData" }] : []));
|
|
57864
57766
|
this.currentYear = computed(() => new Date().getFullYear(), ...(ngDevMode ? [{ debugName: "currentYear" }] : []));
|
|
57865
57767
|
this.priorYear = computed(() => new Date().getFullYear() - 1, ...(ngDevMode ? [{ debugName: "priorYear" }] : []));
|
|
57866
|
-
effect(() => {
|
|
57867
|
-
const mainData = this.mainUiData();
|
|
57868
|
-
console.group('[InitialTargetSetting] mainUiData Debug');
|
|
57869
|
-
console.log('mainUiData exists:', !!mainData);
|
|
57870
|
-
console.log('mainUiData:', mainData);
|
|
57871
|
-
if (mainData) {
|
|
57872
|
-
console.log('convertedDataResults exists:', !!mainData.convertedDataResults);
|
|
57873
|
-
if (mainData.convertedDataResults) {
|
|
57874
|
-
const converted = mainData.convertedDataResults;
|
|
57875
|
-
console.log('metrics array:', converted.metrics);
|
|
57876
|
-
console.log('dimensions array:', converted.dimensions);
|
|
57877
|
-
console.log('rows count:', converted.rows?.length ?? 0);
|
|
57878
|
-
console.log('first 3 rows:', converted.rows?.slice(0, 3));
|
|
57879
|
-
const metricIndex = converted.metrics?.indexOf(MetricEnum.PURCHASE_REVENUE);
|
|
57880
|
-
console.log('PURCHASE_REVENUE enum value:', MetricEnum.PURCHASE_REVENUE);
|
|
57881
|
-
console.log('PURCHASE_REVENUE index in metrics:', metricIndex);
|
|
57882
|
-
if (metricIndex !== undefined && metricIndex !== -1 && converted.rows?.length) {
|
|
57883
|
-
const sampleValues = converted.rows.slice(0, 5).map(r => r.metricValues?.[metricIndex]);
|
|
57884
|
-
console.log('Sample metric values at index', metricIndex, ':', sampleValues);
|
|
57885
|
-
}
|
|
57886
|
-
}
|
|
57887
|
-
}
|
|
57888
|
-
console.log('Computed priorYearRevenue:', this.priorYearRevenue());
|
|
57889
|
-
console.groupEnd();
|
|
57890
|
-
});
|
|
57891
57768
|
}
|
|
57892
57769
|
ngAfterViewInit() {
|
|
57893
57770
|
setTimeout(() => {
|
|
@@ -57906,7 +57783,7 @@ class InitialTargetSettingComponent {
|
|
|
57906
57783
|
}
|
|
57907
57784
|
onPercentageInputChange() {
|
|
57908
57785
|
const pct = this.percentageInput();
|
|
57909
|
-
if (pct >= 0 && this.priorYearRevenue() > 0) {
|
|
57786
|
+
if (pct !== null && pct >= 0 && this.priorYearRevenue() > 0) {
|
|
57910
57787
|
const absolute = this.priorYearRevenue() * (1 + pct / 100);
|
|
57911
57788
|
this.absoluteInput.set(absolute);
|
|
57912
57789
|
}
|
|
@@ -63005,7 +62882,6 @@ class SymphiqBusinessAnalysisDashboardComponent {
|
|
|
63005
62882
|
const HEADER_OFFSET = 120;
|
|
63006
62883
|
const targetElement = document.querySelector(`[data-id="${event.itemId}"]`);
|
|
63007
62884
|
if (!targetElement) {
|
|
63008
|
-
console.warn(`Item not found: ${event.itemId}`);
|
|
63009
62885
|
return;
|
|
63010
62886
|
}
|
|
63011
62887
|
const elementPosition = targetElement.getBoundingClientRect().top + window.scrollY;
|
|
@@ -84152,15 +84028,8 @@ class SymphiqProfileAnalysisDashboardComponent {
|
|
|
84152
84028
|
modal.setMetricsAndInsights(this.allMetrics(), [], this.allCharts());
|
|
84153
84029
|
}
|
|
84154
84030
|
});
|
|
84155
|
-
// Update ProfileItemLookupService when profile changes
|
|
84156
|
-
// This enables competitor and focus area chip lookups in business insights
|
|
84157
84031
|
effect(() => {
|
|
84158
84032
|
const profileValue = this.profile();
|
|
84159
|
-
console.log('[ProfileAnalysisDashboard] profile effect triggered:', {
|
|
84160
|
-
hasProfile: !!profileValue,
|
|
84161
|
-
hasProfileStructured: !!profileValue?.profileStructured,
|
|
84162
|
-
hasSections: !!profileValue?.profileStructured?.sections
|
|
84163
|
-
});
|
|
84164
84033
|
if (profileValue) {
|
|
84165
84034
|
this.profileItemLookupService.setProfile(profileValue);
|
|
84166
84035
|
}
|
|
@@ -85232,10 +85101,6 @@ class LineChartComponent {
|
|
|
85232
85101
|
});
|
|
85233
85102
|
}
|
|
85234
85103
|
ngOnInit() {
|
|
85235
|
-
const chartData = this.chart().lineChartData;
|
|
85236
|
-
if (!chartData) {
|
|
85237
|
-
console.error('LineChartComponent: chart input with lineChartData is required');
|
|
85238
|
-
}
|
|
85239
85104
|
}
|
|
85240
85105
|
/**
|
|
85241
85106
|
* Generate a hash of the chart data to detect actual changes
|
|
@@ -85657,10 +85522,10 @@ class LineChartComponent {
|
|
|
85657
85522
|
}
|
|
85658
85523
|
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(LineChartComponent, [{
|
|
85659
85524
|
type: Component,
|
|
85660
|
-
args: [{ selector: 'symphiq-line-chart', standalone: true, changeDetection: ChangeDetectionStrategy.OnPush, template: `
|
|
85661
|
-
<div class="chart-container" [class.mini-mode]="!showAxisLabels()">
|
|
85662
|
-
<div #chartdiv class="chart" [style.height]="chartHeight()" style="width: 100%;"></div>
|
|
85663
|
-
</div>
|
|
85525
|
+
args: [{ selector: 'symphiq-line-chart', standalone: true, changeDetection: ChangeDetectionStrategy.OnPush, template: `
|
|
85526
|
+
<div class="chart-container" [class.mini-mode]="!showAxisLabels()">
|
|
85527
|
+
<div #chartdiv class="chart" [style.height]="chartHeight()" style="width: 100%;"></div>
|
|
85528
|
+
</div>
|
|
85664
85529
|
`, styles: [".chart-container{width:100%;padding:1rem}.chart-container.mini-mode{padding:.25rem}\n"] }]
|
|
85665
85530
|
}], () => [], { chart: [{ type: i0.Input, args: [{ isSignal: true, alias: "chart", required: false }] }], showAxisLabels: [{ type: i0.Input, args: [{ isSignal: true, alias: "showAxisLabels", required: false }] }], viewMode: [{ type: i0.Input, args: [{ isSignal: true, alias: "viewMode", required: false }] }], currencySymbol: [{ type: i0.Input, args: [{ isSignal: true, alias: "currencySymbol", required: false }] }], chartDiv: [{
|
|
85666
85531
|
type: ViewChild,
|
|
@@ -86331,10 +86196,6 @@ class PieChartComponent {
|
|
|
86331
86196
|
});
|
|
86332
86197
|
}
|
|
86333
86198
|
ngOnInit() {
|
|
86334
|
-
const chartData = this.chart().pieChartData;
|
|
86335
|
-
if (!chartData) {
|
|
86336
|
-
console.error('PieChartComponent: chart input with pieChartData is required');
|
|
86337
|
-
}
|
|
86338
86199
|
}
|
|
86339
86200
|
/**
|
|
86340
86201
|
* Generate a hash of the chart data to detect actual changes
|
|
@@ -86448,17 +86309,13 @@ class PieChartComponent {
|
|
|
86448
86309
|
}
|
|
86449
86310
|
createChart() {
|
|
86450
86311
|
const chartData = this.chart().pieChartData;
|
|
86451
|
-
// Debug logging
|
|
86452
86312
|
if (!chartData || Object.keys(chartData).length === 0) {
|
|
86453
|
-
console.warn('PieChartComponent: No data provided');
|
|
86454
86313
|
return;
|
|
86455
86314
|
}
|
|
86456
86315
|
if (!this.chartDiv) {
|
|
86457
|
-
console.error('PieChartComponent: chartDiv reference not found');
|
|
86458
86316
|
return;
|
|
86459
86317
|
}
|
|
86460
86318
|
if (!chartData.series || chartData.series.length === 0) {
|
|
86461
|
-
console.warn('PieChartComponent: No series data', { chartData });
|
|
86462
86319
|
return;
|
|
86463
86320
|
}
|
|
86464
86321
|
this.root = Root.new(this.chartDiv.nativeElement);
|
|
@@ -86594,10 +86451,10 @@ class PieChartComponent {
|
|
|
86594
86451
|
}
|
|
86595
86452
|
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(PieChartComponent, [{
|
|
86596
86453
|
type: Component,
|
|
86597
|
-
args: [{ selector: 'symphiq-pie-chart', standalone: true, changeDetection: ChangeDetectionStrategy.OnPush, template: `
|
|
86598
|
-
<div class="chart-container" [class.mini-mode]="!showAxisLabels()">
|
|
86599
|
-
<div #chartdiv class="chart" [style.height]="chartHeight()" style="width: 100%;"></div>
|
|
86600
|
-
</div>
|
|
86454
|
+
args: [{ selector: 'symphiq-pie-chart', standalone: true, changeDetection: ChangeDetectionStrategy.OnPush, template: `
|
|
86455
|
+
<div class="chart-container" [class.mini-mode]="!showAxisLabels()">
|
|
86456
|
+
<div #chartdiv class="chart" [style.height]="chartHeight()" style="width: 100%;"></div>
|
|
86457
|
+
</div>
|
|
86601
86458
|
`, styles: [".chart-container{width:100%;padding:1rem}.chart-container.mini-mode{padding:.25rem}\n"] }]
|
|
86602
86459
|
}], () => [], { chart: [{ type: i0.Input, args: [{ isSignal: true, alias: "chart", required: false }] }], showAxisLabels: [{ type: i0.Input, args: [{ isSignal: true, alias: "showAxisLabels", required: false }] }], viewMode: [{ type: i0.Input, args: [{ isSignal: true, alias: "viewMode", required: false }] }], currencySymbol: [{ type: i0.Input, args: [{ isSignal: true, alias: "currencySymbol", required: false }] }], chartDiv: [{
|
|
86603
86460
|
type: ViewChild,
|