kyd-shared-badge 0.2.21 → 0.2.22
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/package.json
CHANGED
|
@@ -202,7 +202,7 @@ const SharedBadgeDisplay = ({ badgeData }: { badgeData: PublicBadgeData }) => {
|
|
|
202
202
|
{(() => {
|
|
203
203
|
const ss = assessmentResult?.screening_sources;
|
|
204
204
|
const ofacMatches = ss?.ofac_screen?.matches && (ss.ofac_screen.matches.length > 0);
|
|
205
|
-
const cslDetails = ss?.csl_details && (Array.isArray(ss.csl_details) ? ss.csl_details.length > 0 :
|
|
205
|
+
const cslDetails = ss?.csl_details && (Array.isArray(ss.csl_details) ? ss.csl_details.length > 0 : Object.keys(ss.csl_details).length > 0);
|
|
206
206
|
const fbiMatches = ss?.fbi_matches && (ss.fbi_matches.length > 0);
|
|
207
207
|
if (!(ofacMatches || cslDetails || fbiMatches)) return null;
|
|
208
208
|
return (
|
|
@@ -4,19 +4,19 @@ import { FiInfo } from 'react-icons/fi';
|
|
|
4
4
|
import { IpRiskAnalysis, IpRiskAnalysisFinding, IpRiskSections, IpRiskSection } from '../types';
|
|
5
5
|
|
|
6
6
|
interface IpRiskAnalysisDisplayProps {
|
|
7
|
-
|
|
7
|
+
ipRiskAnalysis?: IpRiskAnalysis;
|
|
8
8
|
}
|
|
9
9
|
|
|
10
10
|
const FindingRow = ({ finding }: { finding: IpRiskAnalysisFinding }) => (
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
</div>
|
|
15
|
-
<div className="md:col-span-2">
|
|
16
|
-
<p style={{ color: 'var(--text-secondary)' }}>{finding.details}</p>
|
|
17
|
-
<p className="text-xs mt-1 italic" style={{ color: 'var(--text-secondary)' }}>{finding.implication}</p>
|
|
18
|
-
</div>
|
|
11
|
+
<div className="grid grid-cols-1 md:grid-cols-3 gap-x-8 gap-y-2 py-4 border-b" style={{ borderColor: 'var(--icon-button-secondary)' }}>
|
|
12
|
+
<div className="md:col-span-1">
|
|
13
|
+
<p className="font-semibold" style={{ color: 'var(--text-main)' }}>{finding.label}</p>
|
|
19
14
|
</div>
|
|
15
|
+
<div className="md:col-span-2">
|
|
16
|
+
<p style={{ color: 'var(--text-secondary)' }}>{finding.details}</p>
|
|
17
|
+
<p className="text-xs mt-1 italic" style={{ color: 'var(--text-secondary)' }}>{finding.implication}</p>
|
|
18
|
+
</div>
|
|
19
|
+
</div>
|
|
20
20
|
);
|
|
21
21
|
|
|
22
22
|
const Section = ({ section }: { section: IpRiskSection }) => (
|
|
@@ -39,36 +39,36 @@ const Section = ({ section }: { section: IpRiskSection }) => (
|
|
|
39
39
|
);
|
|
40
40
|
|
|
41
41
|
const IpRiskAnalysisDisplay = ({ ipRiskAnalysis }: IpRiskAnalysisDisplayProps) => {
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
const { findings = [], sections } = ipRiskAnalysis as IpRiskAnalysis & { sections?: IpRiskSections };
|
|
42
|
+
if (!ipRiskAnalysis || !ipRiskAnalysis.checked || !ipRiskAnalysis.findings || ipRiskAnalysis.findings.length === 0) {
|
|
43
|
+
return (
|
|
44
|
+
<div className="mt-6 p-4 rounded-lg flex items-center" style={{ backgroundColor: 'var(--content-card-background)' }}>
|
|
45
|
+
<FiInfo className="h-5 w-5 mr-3 flex-shrink-0" style={{ color: 'var(--text-secondary)' }} />
|
|
46
|
+
<p className="text-sm" style={{ color: 'var(--text-secondary)' }}>IP risk analysis was not performed for this assessment.</p>
|
|
47
|
+
</div>
|
|
48
|
+
);
|
|
49
|
+
}
|
|
52
50
|
|
|
53
|
-
|
|
54
|
-
return (
|
|
55
|
-
<div className="mt-2 divide-y" style={{ borderColor: 'var(--icon-button-secondary)' }}>
|
|
56
|
-
<Section section={sections.general} />
|
|
57
|
-
<Section section={sections.location} />
|
|
58
|
-
<Section section={sections.reputational} />
|
|
59
|
-
</div>
|
|
60
|
-
);
|
|
61
|
-
}
|
|
51
|
+
const { findings = [], sections } = ipRiskAnalysis as IpRiskAnalysis & { sections?: IpRiskSections };
|
|
62
52
|
|
|
53
|
+
if (sections) {
|
|
63
54
|
return (
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
</div>
|
|
70
|
-
</div>
|
|
55
|
+
<div className="mt-2 divide-y" style={{ borderColor: 'var(--icon-button-secondary)' }}>
|
|
56
|
+
<Section section={sections.general} />
|
|
57
|
+
<Section section={sections.location} />
|
|
58
|
+
<Section section={sections.reputational} />
|
|
59
|
+
</div>
|
|
71
60
|
);
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
return (
|
|
64
|
+
<div className="mt-6">
|
|
65
|
+
<div className="divide-y" style={{ borderColor: 'var(--icon-button-secondary)' }}>
|
|
66
|
+
{findings.map((finding, index) => (
|
|
67
|
+
<FindingRow key={index} finding={finding} />
|
|
68
|
+
))}
|
|
69
|
+
</div>
|
|
70
|
+
</div>
|
|
71
|
+
);
|
|
72
72
|
};
|
|
73
73
|
|
|
74
74
|
export default IpRiskAnalysisDisplay;
|