kyd-shared-badge 0.3.114 → 0.3.117
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
|
@@ -52,7 +52,7 @@ type ChatWidgetProps = Partial<{
|
|
|
52
52
|
// return `rgba(${r}, ${g}, ${b}, ${alpha})`;
|
|
53
53
|
// };
|
|
54
54
|
|
|
55
|
-
const SharedBadgeDisplay = ({ badgeData, chatProps, headless, selfCheck = false }: { badgeData: PublicBadgeData, chatProps?: ChatWidgetProps, headless?: boolean, selfCheck?: boolean }) => {
|
|
55
|
+
const SharedBadgeDisplay = ({ badgeData, chatProps, headless, selfCheck = false, public: isPublicView = false, suppressChat = false }: { badgeData: PublicBadgeData, chatProps?: ChatWidgetProps, headless?: boolean, selfCheck?: boolean, 'public'?: boolean, suppressChat?: boolean }) => {
|
|
56
56
|
const {
|
|
57
57
|
badgeId,
|
|
58
58
|
developerName,
|
|
@@ -120,7 +120,7 @@ const SharedBadgeDisplay = ({ badgeData, chatProps, headless, selfCheck = false
|
|
|
120
120
|
{ key: 'technical', label: 'KYD Technical' },
|
|
121
121
|
{ key: 'risk', label: 'KYD Risk' },
|
|
122
122
|
// { key: 'ai', label: 'KYD AI' },
|
|
123
|
-
{ key: 'role', label: 'Role Fit & Coaching' },
|
|
123
|
+
{ key: 'role', label: showRoleFit ? 'Role Fit & Coaching' : 'Coaching' },
|
|
124
124
|
{ key: 'resume', label: 'Resume' },
|
|
125
125
|
{ key: 'appendix', label: 'Appendix' }
|
|
126
126
|
];
|
|
@@ -189,14 +189,20 @@ const SharedBadgeDisplay = ({ badgeData, chatProps, headless, selfCheck = false
|
|
|
189
189
|
}}
|
|
190
190
|
>
|
|
191
191
|
{IconComp ? (
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
192
|
+
<>
|
|
193
|
+
<span className="block sm:inline">
|
|
194
|
+
<IconComp
|
|
195
|
+
width={18}
|
|
196
|
+
height={18}
|
|
197
|
+
className="text-[var(--text-main)]"
|
|
198
|
+
style={{ display: 'inline-block', verticalAlign: 'middle', color: 'var(--text-main)' }}
|
|
199
|
+
/>
|
|
200
|
+
</span>
|
|
201
|
+
<span className="hidden sm:inline">{t.label}</span>
|
|
202
|
+
</>
|
|
203
|
+
) : (
|
|
204
|
+
t.label
|
|
205
|
+
)}
|
|
200
206
|
</button>
|
|
201
207
|
);
|
|
202
208
|
})}
|
|
@@ -592,6 +598,10 @@ const SharedBadgeDisplay = ({ badgeData, chatProps, headless, selfCheck = false
|
|
|
592
598
|
<div id="appendix-connected">
|
|
593
599
|
<ConnectedPlatforms accounts={connected} authenticity={assessmentResult?.account_authenticity} />
|
|
594
600
|
</div>
|
|
601
|
+
{/* badge id */}
|
|
602
|
+
<div className='mt-4 text-sm' style={{ color: 'var(--text-secondary)' }}>
|
|
603
|
+
<p className="font-medium">Badge ID: {badgeId}</p>
|
|
604
|
+
</div>
|
|
595
605
|
</div>
|
|
596
606
|
</div>
|
|
597
607
|
<Reveal headless={isHeadless}>
|
|
@@ -629,20 +639,24 @@ const SharedBadgeDisplay = ({ badgeData, chatProps, headless, selfCheck = false
|
|
|
629
639
|
{AppendixSection()}
|
|
630
640
|
</>
|
|
631
641
|
) : (
|
|
632
|
-
|
|
633
|
-
|
|
634
|
-
|
|
635
|
-
|
|
636
|
-
|
|
637
|
-
|
|
638
|
-
|
|
639
|
-
|
|
640
|
-
|
|
641
|
-
|
|
642
|
-
|
|
643
|
-
|
|
642
|
+
!isPublicView ? (
|
|
643
|
+
<>
|
|
644
|
+
<TabNav />
|
|
645
|
+
<div className={'px-2 sm:px-0 pb-2'}>
|
|
646
|
+
{activeTab === 'overview' && OverviewSection()}
|
|
647
|
+
{activeTab === 'technical' && TechnicalSection()}
|
|
648
|
+
{activeTab === 'risk' && RiskSection()}
|
|
649
|
+
{/* {activeTab === 'ai' && AiSection()} */}
|
|
650
|
+
{activeTab === 'role' && <RoleFitSection />}
|
|
651
|
+
{activeTab === 'resume' && <ResumeSection />}
|
|
652
|
+
{activeTab === 'appendix' && AppendixSection()}
|
|
653
|
+
</div>
|
|
654
|
+
</>
|
|
655
|
+
) : (
|
|
656
|
+
OverviewSection()
|
|
657
|
+
)
|
|
644
658
|
)}
|
|
645
|
-
{!headless && (
|
|
659
|
+
{!headless && !suppressChat && (
|
|
646
660
|
<ChatWidget api={chatProps?.api || '/api/chat'} badgeId={badgeId} title={chatProps?.title} hintText={chatProps?.hintText} loginPath={chatProps?.loginPath} headerOffset={chatProps?.headerOffset} developerName={developerName} />
|
|
647
661
|
)}
|
|
648
662
|
</div>
|
|
@@ -74,7 +74,7 @@ export default function GaugeCard({
|
|
|
74
74
|
>
|
|
75
75
|
<div className="mb-3 flex items-start justify-between gap-2 pt-5 px-5">
|
|
76
76
|
<div>
|
|
77
|
-
<div className={'font-semibold text-xl'} style={{ color: 'var(--text-main)' }}>{title}</div>
|
|
77
|
+
<div className={'font-semibold sm:text-xl text-base'} style={{ color: 'var(--text-main)' }}>{title}</div>
|
|
78
78
|
<div className={'text-sm mt-1'} style={{ color: 'var(--text-secondary)' }}>{description}</div>
|
|
79
79
|
</div>
|
|
80
80
|
{(tooltipText || description) && (
|
|
@@ -99,13 +99,13 @@ const ReportHeader = ({ badgeId, developerName, updatedAt, score = 0, badgeImage
|
|
|
99
99
|
</div>
|
|
100
100
|
);
|
|
101
101
|
})()}
|
|
102
|
-
<div className={`flex gap-3 ${rightBadgeLayout ? 'flex-
|
|
102
|
+
<div className={`flex gap-3 ${rightBadgeLayout ? 'flex-row items-center justify-between' : 'flex-col'}`}>
|
|
103
103
|
{/* Info section: Title, Candidate, Details and Summary */}
|
|
104
104
|
<div className={`w-full ${rightBadgeLayout ? 'md:flex-1' : ''}`}>
|
|
105
105
|
<div className='space-y-1'>
|
|
106
|
-
<span className='flex gap-2 w-full items-end text-start justify-start mb-2'>
|
|
107
|
-
<h2 className={'
|
|
108
|
-
<div className={'
|
|
106
|
+
<span className='flex gap-2 w-full items-end text-start justify-start mb-2 sm:text-xl text-base '>
|
|
107
|
+
<h2 className={'font-light'} style={{ color: 'var(--text-main)' }}>KYD Candidate:</h2>
|
|
108
|
+
<div className={'font-bold'} style={{ color: 'var(--text-main)' }}>{developerName || 'N/A'}</div>
|
|
109
109
|
</span>
|
|
110
110
|
<span className='flex gap-2 w-full items-end text-start justify-start'>
|
|
111
111
|
<h3 className='text-sm font-semibold text-[--text-secondary]'>Date:</h3>
|
|
@@ -117,7 +117,7 @@ const ReportHeader = ({ badgeId, developerName, updatedAt, score = 0, badgeImage
|
|
|
117
117
|
.map(code => countriesLib.getName((code || '').toUpperCase(), 'en') || code)
|
|
118
118
|
.filter(Boolean);
|
|
119
119
|
return (
|
|
120
|
-
<
|
|
120
|
+
<div className={'flex items-center gap-1 text-sm'}>
|
|
121
121
|
<span className={'font-semibold'} style={{ color: 'var(--text-secondary)' }}>
|
|
122
122
|
{countryNames.length > 1 ? 'Countries:' : 'Country:'}
|
|
123
123
|
</span>
|
|
@@ -132,7 +132,7 @@ const ReportHeader = ({ badgeId, developerName, updatedAt, score = 0, badgeImage
|
|
|
132
132
|
</div>
|
|
133
133
|
</div>
|
|
134
134
|
</span>
|
|
135
|
-
</
|
|
135
|
+
</div>
|
|
136
136
|
);
|
|
137
137
|
})()
|
|
138
138
|
)}
|
|
@@ -58,7 +58,7 @@ export default function RiskCard({
|
|
|
58
58
|
>
|
|
59
59
|
<div className="mb-3 flex items-start justify-between gap-2">
|
|
60
60
|
<div>
|
|
61
|
-
<div className={'font-semibold text-xl'} style={{ color: 'var(--text-main)' }}>{title}</div>
|
|
61
|
+
<div className={'font-semibold sm:text-xl text-base'} style={{ color: 'var(--text-main)' }}>{title}</div>
|
|
62
62
|
{description ? (
|
|
63
63
|
<div className={'text-sm mt-1'} style={{ color: 'var(--text-secondary)' }}>{description}</div>
|
|
64
64
|
) : null}
|
|
@@ -396,17 +396,7 @@ export default function SkillsBubble({ skillsCategoryRadar, skillsByCategory, sk
|
|
|
396
396
|
<div ref={containerRef} style={{ width: '100%', height: 340, position: 'relative' }}>
|
|
397
397
|
{!headless && (
|
|
398
398
|
<div
|
|
399
|
-
className="text-xs rounded-md border shadow-sm px-2 py-1"
|
|
400
|
-
style={{
|
|
401
|
-
position: 'absolute',
|
|
402
|
-
right: 8,
|
|
403
|
-
top: 8,
|
|
404
|
-
zIndex: 5,
|
|
405
|
-
pointerEvents: 'none',
|
|
406
|
-
background: 'var(--content-card-background)',
|
|
407
|
-
borderColor: 'var(--icon-button-secondary)',
|
|
408
|
-
color: 'var(--text-secondary)'
|
|
409
|
-
}}
|
|
399
|
+
className="text-xs rounded-md border shadow-sm px-2 py-1 relative sm:absolute sm:right-2 sm:top-2 z-40 pointer-events-none bg-[var(--content-card-background)] border-[var(--icon-button-secondary)] text-[var(--text-secondary)]"
|
|
410
400
|
>
|
|
411
401
|
<div className="flex items-center gap-2 text-base">
|
|
412
402
|
<span className="inline-block h-3 w-3 rounded-full border border-[var(--text-secondary)]" style={{ background: green5 }} />
|
|
@@ -480,7 +470,7 @@ export default function SkillsBubble({ skillsCategoryRadar, skillsByCategory, sk
|
|
|
480
470
|
</span>
|
|
481
471
|
) : null}
|
|
482
472
|
</div>
|
|
483
|
-
<div className="grid grid-cols-2 gap-x-20 text-xs" style={{ color: 'var(--text-secondary)', minHeight: 250 }}>
|
|
473
|
+
<div className="grid grid-cols-1 sm:grid-cols-2 gap-x-20 text-xs" style={{ color: 'var(--text-secondary)', minHeight: 250 }}>
|
|
484
474
|
<div className="grid gap-3">
|
|
485
475
|
{leftColumnGrid.map((entry, idx) => (
|
|
486
476
|
columnComponent(entry, idx, true)
|