@naniteninja/dashboard-components-lib 2.1.15 → 2.1.16
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.
|
@@ -10729,11 +10729,97 @@ class MatcherViewportComponent {
|
|
|
10729
10729
|
];
|
|
10730
10730
|
this.traitVisualPrefWeights = [...this.traitVisualAttrWeights];
|
|
10731
10731
|
this.traitVisualPrefWeights[0] = Math.max(0, this.traitVisualPrefWeights[0] - 0.05);
|
|
10732
|
-
|
|
10733
|
-
|
|
10734
|
-
|
|
10735
|
-
|
|
10736
|
-
|
|
10732
|
+
const selectedPairs = this.prefMatchManagerItems
|
|
10733
|
+
.filter((item) => item.selected)
|
|
10734
|
+
.map((item) => {
|
|
10735
|
+
const match = this.clientMatches.find((m) => m._id === item.id || m.id === item.id);
|
|
10736
|
+
if (!match) {
|
|
10737
|
+
return null;
|
|
10738
|
+
}
|
|
10739
|
+
const prospectAge = match.prospectData?.prospectAge ??
|
|
10740
|
+
match.prospectAge;
|
|
10741
|
+
if (typeof prospectAge === 'number' && Number.isFinite(prospectAge)) {
|
|
10742
|
+
if (prospectAge < this.prefMatchManagerMinAge || prospectAge > this.prefMatchManagerMaxAge) {
|
|
10743
|
+
return null;
|
|
10744
|
+
}
|
|
10745
|
+
}
|
|
10746
|
+
return { item, match };
|
|
10747
|
+
})
|
|
10748
|
+
.filter((pair) => !!pair);
|
|
10749
|
+
if (!selectedPairs.length) {
|
|
10750
|
+
this.traitVisualNodes = [
|
|
10751
|
+
{
|
|
10752
|
+
id: 0,
|
|
10753
|
+
name: 'Central Node',
|
|
10754
|
+
initialPosition: [0, 0, 0],
|
|
10755
|
+
isSupermassiveBlackhole: true,
|
|
10756
|
+
color: '#00001e',
|
|
10757
|
+
attributes: { attr1: 50, attr2: 50, attr3: 50, attr4: 50, attr5: 50, attr6: 50, attr7: 50, attr8: 50 },
|
|
10758
|
+
preferences: { attr1: 0, attr2: 50, attr3: 0, attr4: 50, attr5: 0, attr6: 50, attr7: 0, attr8: 50 },
|
|
10759
|
+
},
|
|
10760
|
+
];
|
|
10761
|
+
this.traitVisualConfig = {
|
|
10762
|
+
nodeData: this.traitVisualNodes,
|
|
10763
|
+
attributeWeights: this.traitVisualAttrWeights,
|
|
10764
|
+
preferenceWeights: this.traitVisualPrefWeights,
|
|
10765
|
+
defaultZoomLevel: 1.75,
|
|
10766
|
+
backgroundColor: 'transparent',
|
|
10767
|
+
primaryColor: '#c300ff',
|
|
10768
|
+
secondaryColor: '#ff3366',
|
|
10769
|
+
blackholeRepulsion: 1.0,
|
|
10770
|
+
simulationSpeed: 3.25,
|
|
10771
|
+
pairwiseRepulsionMain: 52,
|
|
10772
|
+
pairwiseRepulsionSecondary: 42,
|
|
10773
|
+
dissimilarityRepulsionExponent: 2.0,
|
|
10774
|
+
minDistanceWidths: 0.25,
|
|
10775
|
+
maxDistanceWidths: 4.5,
|
|
10776
|
+
particleSizeScale: 1.0,
|
|
10777
|
+
particleDepth: 1.0,
|
|
10778
|
+
title: this.config?.toastInfo?.[this.alertStatusFields.compatibilityProfileTrait]?.title || this.translate.instant('CLIENT_DASHBOARD.ALERT_POPUP.FORCE_GRAPH_COMPATIBILITY.TITLE'),
|
|
10779
|
+
description: this.config?.toastInfo?.[this.alertStatusFields.compatibilityProfileTrait]?.description || this.translate.instant('CLIENT_DASHBOARD.ALERT_POPUP.FORCE_GRAPH_COMPATIBILITY.DESCRIPTION')
|
|
10780
|
+
};
|
|
10781
|
+
this.traitVisualVisible = false;
|
|
10782
|
+
this.cdr.markForCheck();
|
|
10783
|
+
setTimeout(() => {
|
|
10784
|
+
this.traitVisualVisible = true;
|
|
10785
|
+
this.cdr.markForCheck();
|
|
10786
|
+
}, 50);
|
|
10787
|
+
return;
|
|
10788
|
+
}
|
|
10789
|
+
const nodes = [
|
|
10790
|
+
{
|
|
10791
|
+
id: 0,
|
|
10792
|
+
name: 'Central Node',
|
|
10793
|
+
initialPosition: [0, 0, 0],
|
|
10794
|
+
isSupermassiveBlackhole: true,
|
|
10795
|
+
color: '#00001e',
|
|
10796
|
+
attributes: { attr1: 50, attr2: 50, attr3: 50, attr4: 50, attr5: 50, attr6: 50, attr7: 50, attr8: 50 },
|
|
10797
|
+
preferences: { attr1: 0, attr2: 50, attr3: 0, attr4: 50, attr5: 0, attr6: 50, attr7: 0, attr8: 50 },
|
|
10798
|
+
},
|
|
10799
|
+
];
|
|
10800
|
+
const radius = 5;
|
|
10801
|
+
selectedPairs.forEach((pair, index) => {
|
|
10802
|
+
const { item } = pair;
|
|
10803
|
+
const angle = (index * 2 * Math.PI) / selectedPairs.length;
|
|
10804
|
+
const x = radius * Math.cos(angle);
|
|
10805
|
+
const z = radius * Math.sin(angle);
|
|
10806
|
+
const attributes = {
|
|
10807
|
+
attr1: 50, attr2: 0, attr3: 50, attr4: 0, attr5: 50, attr6: 0, attr7: 50, attr8: 0,
|
|
10808
|
+
};
|
|
10809
|
+
const preferences = {
|
|
10810
|
+
attr1: 0, attr2: 50, attr3: 0, attr4: 50, attr5: 0, attr6: 50, attr7: 0, attr8: 50,
|
|
10811
|
+
};
|
|
10812
|
+
nodes.push({
|
|
10813
|
+
id: index + 1,
|
|
10814
|
+
name: item.name,
|
|
10815
|
+
initialPosition: [x, 0, z],
|
|
10816
|
+
isSupermassiveBlackhole: false,
|
|
10817
|
+
color: '#00001e',
|
|
10818
|
+
attributes,
|
|
10819
|
+
preferences,
|
|
10820
|
+
});
|
|
10821
|
+
});
|
|
10822
|
+
this.traitVisualNodes = nodes;
|
|
10737
10823
|
// Update stable config object for the visual canvas
|
|
10738
10824
|
this.traitVisualConfig = {
|
|
10739
10825
|
nodeData: this.traitVisualNodes,
|