@eric-emg/symphiq-components 1.2.192 → 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 +17 -209
- 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
|
@@ -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
|
}
|
|
@@ -57515,81 +57394,50 @@ function getConvertedDataForSource(uiData, source) {
|
|
|
57515
57394
|
if (!uiData)
|
|
57516
57395
|
return undefined;
|
|
57517
57396
|
const periodInfo = uiData.periodInfo;
|
|
57518
|
-
console.group('[getConvertedDataForSource] Debug');
|
|
57519
|
-
console.log('source:', source);
|
|
57520
|
-
console.log('periodInfo:', periodInfo);
|
|
57521
|
-
console.log('period:', periodInfo?.period);
|
|
57522
|
-
console.log('comparePeriod:', periodInfo?.comparePeriod);
|
|
57523
57397
|
let result;
|
|
57524
57398
|
switch (source) {
|
|
57525
57399
|
case 'current':
|
|
57526
57400
|
result = uiData.convertedDataResults;
|
|
57527
|
-
console.log('Using convertedDataResults (current period)');
|
|
57528
57401
|
break;
|
|
57529
57402
|
case 'compare':
|
|
57530
57403
|
result = uiData.convertedDataResultsCompare;
|
|
57531
|
-
console.log('Using convertedDataResultsCompare (compare period)');
|
|
57532
57404
|
break;
|
|
57533
57405
|
case 'priorYear':
|
|
57534
57406
|
if (periodInfo?.period === UiDataPeriodEnum.THIS_YEAR &&
|
|
57535
57407
|
periodInfo?.comparePeriod === UiDataComparePeriodEnum.PREVIOUS_PERIOD) {
|
|
57536
57408
|
result = uiData.convertedDataResultsCompare;
|
|
57537
|
-
console.log('THIS_YEAR + PREVIOUS_PERIOD: Using convertedDataResultsCompare (all of last year)');
|
|
57538
57409
|
}
|
|
57539
57410
|
else if (periodInfo?.period === UiDataPeriodEnum.THIS_AND_LAST_YEAR) {
|
|
57540
|
-
console.log('THIS_AND_LAST_YEAR: Need to filter by year from convertedDataResults');
|
|
57541
57411
|
result = uiData.convertedDataResults;
|
|
57542
57412
|
}
|
|
57543
57413
|
else if (periodInfo?.comparePeriod === UiDataComparePeriodEnum.SAME_PERIOD_LAST_YEAR) {
|
|
57544
57414
|
result = uiData.convertedDataResultsCompare;
|
|
57545
|
-
console.log('SAME_PERIOD_LAST_YEAR: Using convertedDataResultsCompare');
|
|
57546
57415
|
}
|
|
57547
57416
|
else if (periodInfo?.comparePeriod === UiDataComparePeriodEnum.PREVIOUS_PERIOD) {
|
|
57548
57417
|
result = uiData.convertedDataResultsCompare;
|
|
57549
|
-
console.log('PREVIOUS_PERIOD: Using convertedDataResultsCompare');
|
|
57550
57418
|
}
|
|
57551
57419
|
else {
|
|
57552
|
-
console.log('No matching period config for priorYear, falling back to convertedDataResultsCompare');
|
|
57553
57420
|
result = uiData.convertedDataResultsCompare;
|
|
57554
57421
|
}
|
|
57555
57422
|
break;
|
|
57556
57423
|
}
|
|
57557
|
-
console.log('Result exists:', !!result);
|
|
57558
|
-
console.groupEnd();
|
|
57559
57424
|
return result;
|
|
57560
57425
|
}
|
|
57561
57426
|
function sumMetricFromUiData(uiData, metricToSum, source = 'current') {
|
|
57562
|
-
console.group('[sumMetricFromUiData] Debug');
|
|
57563
|
-
console.log('metricToSum:', metricToSum);
|
|
57564
|
-
console.log('source:', source);
|
|
57565
57427
|
const convertedData = getConvertedDataForSource(uiData, source);
|
|
57566
57428
|
if (!convertedData) {
|
|
57567
|
-
console.log('EARLY RETURN: convertedData is falsy');
|
|
57568
|
-
console.log('convertedDataResults exists:', !!uiData?.convertedDataResults);
|
|
57569
|
-
console.log('convertedDataResultsCompare exists:', !!uiData?.convertedDataResultsCompare);
|
|
57570
|
-
console.groupEnd();
|
|
57571
57429
|
return 0;
|
|
57572
57430
|
}
|
|
57573
57431
|
let total = 0;
|
|
57574
57432
|
const metricIndex = convertedData.metrics?.indexOf(metricToSum);
|
|
57575
|
-
console.log('Available metrics:', convertedData.metrics);
|
|
57576
|
-
console.log('metricIndex for', metricToSum, ':', metricIndex);
|
|
57577
57433
|
if (metricIndex === undefined || metricIndex === -1) {
|
|
57578
|
-
console.log('EARLY RETURN: metricIndex is undefined or -1');
|
|
57579
|
-
console.groupEnd();
|
|
57580
57434
|
return 0;
|
|
57581
57435
|
}
|
|
57582
|
-
|
|
57583
|
-
convertedData.rows?.forEach((row, idx) => {
|
|
57436
|
+
convertedData.rows?.forEach((row) => {
|
|
57584
57437
|
const rawValue = row.metricValues?.[metricIndex];
|
|
57585
57438
|
const metricValue = parseFloat(rawValue || '0');
|
|
57586
|
-
if (idx < 3) {
|
|
57587
|
-
console.log(`Row ${idx}: raw="${rawValue}", parsed=${metricValue}`);
|
|
57588
|
-
}
|
|
57589
57439
|
total += metricValue;
|
|
57590
57440
|
});
|
|
57591
|
-
console.log('Final total:', total);
|
|
57592
|
-
console.groupEnd();
|
|
57593
57441
|
return total;
|
|
57594
57442
|
}
|
|
57595
57443
|
|
|
@@ -57820,7 +57668,7 @@ class InitialTargetSettingComponent {
|
|
|
57820
57668
|
this.targetsCreated = output();
|
|
57821
57669
|
this.inputMode = signal('absolute', ...(ngDevMode ? [{ debugName: "inputMode" }] : []));
|
|
57822
57670
|
this.absoluteInput = signal(null, ...(ngDevMode ? [{ debugName: "absoluteInput" }] : []));
|
|
57823
|
-
this.percentageInput = signal(
|
|
57671
|
+
this.percentageInput = signal(null, ...(ngDevMode ? [{ debugName: "percentageInput" }] : []));
|
|
57824
57672
|
this.isSubmitting = signal(false, ...(ngDevMode ? [{ debugName: "isSubmitting" }] : []));
|
|
57825
57673
|
this.priorYearRevenue = computed(() => {
|
|
57826
57674
|
return sumMetricFromUiData(this.mainUiData(), MetricEnum.PURCHASE_REVENUE, 'priorYear');
|
|
@@ -57849,6 +57697,8 @@ class InitialTargetSettingComponent {
|
|
|
57849
57697
|
}
|
|
57850
57698
|
else {
|
|
57851
57699
|
const pct = this.percentageInput();
|
|
57700
|
+
if (pct === null)
|
|
57701
|
+
return 0;
|
|
57852
57702
|
return priorRevenue * (1 + pct / 100);
|
|
57853
57703
|
}
|
|
57854
57704
|
}, ...(ngDevMode ? [{ debugName: "calculatedRevenue" }] : []));
|
|
@@ -57870,7 +57720,10 @@ class InitialTargetSettingComponent {
|
|
|
57870
57720
|
return this.revenueCalcService.calculateTargetsFromRevenue(revenue, mainData, metrics).metricCalculations;
|
|
57871
57721
|
}
|
|
57872
57722
|
else {
|
|
57873
|
-
|
|
57723
|
+
const pct = this.percentageInput();
|
|
57724
|
+
if (pct === null)
|
|
57725
|
+
return [];
|
|
57726
|
+
return this.revenueCalcService.calculateTargetsFromPercentage(pct, mainData, metrics).metricCalculations;
|
|
57874
57727
|
}
|
|
57875
57728
|
}, ...(ngDevMode ? [{ debugName: "metricCalculations" }] : []));
|
|
57876
57729
|
this.isValid = computed(() => {
|
|
@@ -57912,31 +57765,6 @@ class InitialTargetSettingComponent {
|
|
|
57912
57765
|
}, ...(ngDevMode ? [{ debugName: "revenueChartData" }] : []));
|
|
57913
57766
|
this.currentYear = computed(() => new Date().getFullYear(), ...(ngDevMode ? [{ debugName: "currentYear" }] : []));
|
|
57914
57767
|
this.priorYear = computed(() => new Date().getFullYear() - 1, ...(ngDevMode ? [{ debugName: "priorYear" }] : []));
|
|
57915
|
-
effect(() => {
|
|
57916
|
-
const mainData = this.mainUiData();
|
|
57917
|
-
console.group('[InitialTargetSetting] mainUiData Debug');
|
|
57918
|
-
console.log('mainUiData exists:', !!mainData);
|
|
57919
|
-
console.log('mainUiData:', mainData);
|
|
57920
|
-
if (mainData) {
|
|
57921
|
-
console.log('convertedDataResults exists:', !!mainData.convertedDataResults);
|
|
57922
|
-
if (mainData.convertedDataResults) {
|
|
57923
|
-
const converted = mainData.convertedDataResults;
|
|
57924
|
-
console.log('metrics array:', converted.metrics);
|
|
57925
|
-
console.log('dimensions array:', converted.dimensions);
|
|
57926
|
-
console.log('rows count:', converted.rows?.length ?? 0);
|
|
57927
|
-
console.log('first 3 rows:', converted.rows?.slice(0, 3));
|
|
57928
|
-
const metricIndex = converted.metrics?.indexOf(MetricEnum.PURCHASE_REVENUE);
|
|
57929
|
-
console.log('PURCHASE_REVENUE enum value:', MetricEnum.PURCHASE_REVENUE);
|
|
57930
|
-
console.log('PURCHASE_REVENUE index in metrics:', metricIndex);
|
|
57931
|
-
if (metricIndex !== undefined && metricIndex !== -1 && converted.rows?.length) {
|
|
57932
|
-
const sampleValues = converted.rows.slice(0, 5).map(r => r.metricValues?.[metricIndex]);
|
|
57933
|
-
console.log('Sample metric values at index', metricIndex, ':', sampleValues);
|
|
57934
|
-
}
|
|
57935
|
-
}
|
|
57936
|
-
}
|
|
57937
|
-
console.log('Computed priorYearRevenue:', this.priorYearRevenue());
|
|
57938
|
-
console.groupEnd();
|
|
57939
|
-
});
|
|
57940
57768
|
}
|
|
57941
57769
|
ngAfterViewInit() {
|
|
57942
57770
|
setTimeout(() => {
|
|
@@ -57955,7 +57783,7 @@ class InitialTargetSettingComponent {
|
|
|
57955
57783
|
}
|
|
57956
57784
|
onPercentageInputChange() {
|
|
57957
57785
|
const pct = this.percentageInput();
|
|
57958
|
-
if (pct >= 0 && this.priorYearRevenue() > 0) {
|
|
57786
|
+
if (pct !== null && pct >= 0 && this.priorYearRevenue() > 0) {
|
|
57959
57787
|
const absolute = this.priorYearRevenue() * (1 + pct / 100);
|
|
57960
57788
|
this.absoluteInput.set(absolute);
|
|
57961
57789
|
}
|
|
@@ -63054,7 +62882,6 @@ class SymphiqBusinessAnalysisDashboardComponent {
|
|
|
63054
62882
|
const HEADER_OFFSET = 120;
|
|
63055
62883
|
const targetElement = document.querySelector(`[data-id="${event.itemId}"]`);
|
|
63056
62884
|
if (!targetElement) {
|
|
63057
|
-
console.warn(`Item not found: ${event.itemId}`);
|
|
63058
62885
|
return;
|
|
63059
62886
|
}
|
|
63060
62887
|
const elementPosition = targetElement.getBoundingClientRect().top + window.scrollY;
|
|
@@ -84201,15 +84028,8 @@ class SymphiqProfileAnalysisDashboardComponent {
|
|
|
84201
84028
|
modal.setMetricsAndInsights(this.allMetrics(), [], this.allCharts());
|
|
84202
84029
|
}
|
|
84203
84030
|
});
|
|
84204
|
-
// Update ProfileItemLookupService when profile changes
|
|
84205
|
-
// This enables competitor and focus area chip lookups in business insights
|
|
84206
84031
|
effect(() => {
|
|
84207
84032
|
const profileValue = this.profile();
|
|
84208
|
-
console.log('[ProfileAnalysisDashboard] profile effect triggered:', {
|
|
84209
|
-
hasProfile: !!profileValue,
|
|
84210
|
-
hasProfileStructured: !!profileValue?.profileStructured,
|
|
84211
|
-
hasSections: !!profileValue?.profileStructured?.sections
|
|
84212
|
-
});
|
|
84213
84033
|
if (profileValue) {
|
|
84214
84034
|
this.profileItemLookupService.setProfile(profileValue);
|
|
84215
84035
|
}
|
|
@@ -85281,10 +85101,6 @@ class LineChartComponent {
|
|
|
85281
85101
|
});
|
|
85282
85102
|
}
|
|
85283
85103
|
ngOnInit() {
|
|
85284
|
-
const chartData = this.chart().lineChartData;
|
|
85285
|
-
if (!chartData) {
|
|
85286
|
-
console.error('LineChartComponent: chart input with lineChartData is required');
|
|
85287
|
-
}
|
|
85288
85104
|
}
|
|
85289
85105
|
/**
|
|
85290
85106
|
* Generate a hash of the chart data to detect actual changes
|
|
@@ -85706,10 +85522,10 @@ class LineChartComponent {
|
|
|
85706
85522
|
}
|
|
85707
85523
|
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(LineChartComponent, [{
|
|
85708
85524
|
type: Component,
|
|
85709
|
-
args: [{ selector: 'symphiq-line-chart', standalone: true, changeDetection: ChangeDetectionStrategy.OnPush, template: `
|
|
85710
|
-
<div class="chart-container" [class.mini-mode]="!showAxisLabels()">
|
|
85711
|
-
<div #chartdiv class="chart" [style.height]="chartHeight()" style="width: 100%;"></div>
|
|
85712
|
-
</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>
|
|
85713
85529
|
`, styles: [".chart-container{width:100%;padding:1rem}.chart-container.mini-mode{padding:.25rem}\n"] }]
|
|
85714
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: [{
|
|
85715
85531
|
type: ViewChild,
|
|
@@ -86380,10 +86196,6 @@ class PieChartComponent {
|
|
|
86380
86196
|
});
|
|
86381
86197
|
}
|
|
86382
86198
|
ngOnInit() {
|
|
86383
|
-
const chartData = this.chart().pieChartData;
|
|
86384
|
-
if (!chartData) {
|
|
86385
|
-
console.error('PieChartComponent: chart input with pieChartData is required');
|
|
86386
|
-
}
|
|
86387
86199
|
}
|
|
86388
86200
|
/**
|
|
86389
86201
|
* Generate a hash of the chart data to detect actual changes
|
|
@@ -86497,17 +86309,13 @@ class PieChartComponent {
|
|
|
86497
86309
|
}
|
|
86498
86310
|
createChart() {
|
|
86499
86311
|
const chartData = this.chart().pieChartData;
|
|
86500
|
-
// Debug logging
|
|
86501
86312
|
if (!chartData || Object.keys(chartData).length === 0) {
|
|
86502
|
-
console.warn('PieChartComponent: No data provided');
|
|
86503
86313
|
return;
|
|
86504
86314
|
}
|
|
86505
86315
|
if (!this.chartDiv) {
|
|
86506
|
-
console.error('PieChartComponent: chartDiv reference not found');
|
|
86507
86316
|
return;
|
|
86508
86317
|
}
|
|
86509
86318
|
if (!chartData.series || chartData.series.length === 0) {
|
|
86510
|
-
console.warn('PieChartComponent: No series data', { chartData });
|
|
86511
86319
|
return;
|
|
86512
86320
|
}
|
|
86513
86321
|
this.root = Root.new(this.chartDiv.nativeElement);
|
|
@@ -86643,10 +86451,10 @@ class PieChartComponent {
|
|
|
86643
86451
|
}
|
|
86644
86452
|
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(PieChartComponent, [{
|
|
86645
86453
|
type: Component,
|
|
86646
|
-
args: [{ selector: 'symphiq-pie-chart', standalone: true, changeDetection: ChangeDetectionStrategy.OnPush, template: `
|
|
86647
|
-
<div class="chart-container" [class.mini-mode]="!showAxisLabels()">
|
|
86648
|
-
<div #chartdiv class="chart" [style.height]="chartHeight()" style="width: 100%;"></div>
|
|
86649
|
-
</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>
|
|
86650
86458
|
`, styles: [".chart-container{width:100%;padding:1rem}.chart-container.mini-mode{padding:.25rem}\n"] }]
|
|
86651
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: [{
|
|
86652
86460
|
type: ViewChild,
|