kyd-shared-badge 0.2.14 → 0.2.15

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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "kyd-shared-badge",
3
- "version": "0.2.14",
3
+ "version": "0.2.15",
4
4
  "private": false,
5
5
  "main": "./src/index.ts",
6
6
  "module": "./src/index.ts",
@@ -25,18 +25,32 @@ interface AppendixTableProps {
25
25
  developerName: string;
26
26
  }
27
27
 
28
- const SanctionsRow = ({ source, searchedAt, developerName }: { source: SanctionSource, searchedAt: string, developerName: string }) => (
29
- <tr className={'transition-colors hover:bg-black/5'} style={source.matched ? { backgroundColor: 'rgba(236,102,98,0.08)' } : undefined}>
30
- <td className={'px-4 py-4 whitespace-nowrap text-sm font-medium'} style={{ color: 'var(--text-main)' }}>
28
+ const SanctionsRow = ({ source, searchedAt, developerName }: { source: SanctionSource & { sublists?: string[] }, searchedAt: string, developerName: string }) => (
29
+ <tr className={'transition-colors'} style={source.matched ? { backgroundColor: 'rgba(236,102,98,0.08)' } : undefined}>
30
+ <td className={'px-4 py-4 whitespace-nowrap align-top text-sm font-medium'} style={{ color: 'var(--text-main)' }}>
31
31
  {source.issuingEntity}
32
32
  </td>
33
- <td className={'px-4 py-4 whitespace-normal text-sm'} style={{ color: 'var(--text-secondary)' }}>
34
- {source.listName}
33
+ <td className={'px-4 py-4 whitespace-normal align-top text-sm'} style={{ color: 'var(--text-secondary)' }}>
34
+ <div className="flex flex-col gap-2">
35
+ <div className="flex items-center justify-between gap-3">
36
+ <span>{source.listName}</span>
37
+ {source.sublists && source.sublists.length > 0 && (
38
+ <details className="ml-auto">
39
+ <summary className={'cursor-pointer text-xs font-semibold px-2 py-1 rounded-full'} style={{ backgroundColor: 'var(--icon-button-secondary)', color: 'var(--text-main)' }}>View sub-lists</summary>
40
+ <ul className="mt-2 text-xs list-disc pl-4 space-y-1" style={{ color: 'var(--text-secondary)' }}>
41
+ {source.sublists.map((sl, idx) => (
42
+ <li key={idx}>{sl}</li>
43
+ ))}
44
+ </ul>
45
+ </details>
46
+ )}
47
+ </div>
48
+ </div>
35
49
  </td>
36
- <td className={'px-4 py-4 whitespace-nowrap text-sm'} style={{ color: 'var(--text-secondary)' }}>
50
+ <td className={'px-4 py-4 whitespace-nowrap align-top text-sm'} style={{ color: 'var(--text-secondary)' }}>
37
51
  {searchedAt}
38
52
  </td>
39
- <td className={'px-4 py-4 whitespace-nowrap text-sm'} style={{ color: 'var(--text-secondary)' }}>
53
+ <td className={'px-4 py-4 whitespace-nowrap align-top text-sm'} style={{ color: 'var(--text-secondary)' }}>
40
54
  {source.matched ? (
41
55
  <span className={'px-2 inline-flex text-xs leading-5 font-semibold rounded-full'} style={{ backgroundColor: 'rgba(236,102,98,0.2)', color: 'var(--text-main)' }}>
42
56
  Match
@@ -47,7 +61,7 @@ const SanctionsRow = ({ source, searchedAt, developerName }: { source: SanctionS
47
61
  </span>
48
62
  )}
49
63
  </td>
50
- <td className={'px-4 py-4 text-sm whitespace-normal'} style={{ color: 'var(--text-secondary)' }}>
64
+ <td className={'px-4 py-4 text-sm whitespace-normal align-top'} style={{ color: 'var(--text-secondary)' }}>
51
65
  {source.matched
52
66
  ? (<span>Exact or strong match for <strong style={{ color: 'var(--text-main)' }}>{developerName}</strong> was found on this list.</span>)
53
67
  : (<span>No exact match for <strong style={{ color: 'var(--text-main)' }}>{developerName}</strong> was found on this list.</span>)}
package/src/types.ts CHANGED
@@ -161,7 +161,7 @@ export interface AssessmentResult {
161
161
  sources?: string[];
162
162
  matches?: any[];
163
163
  };
164
- sanctions_sources_detailed?: { issuingEntity: string; listName: string; matched?: boolean }[];
164
+ sanctions_sources_detailed?: { issuingEntity: string; listName: string; matched?: boolean; sublists?: string[] }[];
165
165
  sanctions_sublists?: string[];
166
166
  };
167
167
  optOutScreening?: boolean;