uhc-portal-components-react 0.2.39 → 0.2.40
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/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,12 @@
|
|
|
2
2
|
|
|
3
3
|
## Unreleased
|
|
4
4
|
|
|
5
|
+
## 0.2.40 - 2026-11-04
|
|
6
|
+
|
|
7
|
+
- Keep credential QR, organization discovery and professional DID/URN as three
|
|
8
|
+
explicit evidence choices. Organization country and legal-identifier fields
|
|
9
|
+
no longer replace the manual DID/URN route.
|
|
10
|
+
|
|
5
11
|
## 0.2.39 - 2026-11-04
|
|
6
12
|
|
|
7
13
|
- Let hosts offer country, optional region, organization legal identifier and
|
package/README.md
CHANGED
|
@@ -135,12 +135,13 @@ The package deliberately exposes modules instead of a cloned application:
|
|
|
135
135
|
individual member; the host refreshes the authorized-subject list after its
|
|
136
136
|
BFF accepts the invitation.
|
|
137
137
|
- `ExistingProfessionalProfilePanel`: existing employees scan or upload a
|
|
138
|
-
signed professional-credential QR. A host may
|
|
139
|
-
|
|
140
|
-
identifier and sector
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
138
|
+
signed professional-credential QR. A host may also expose two separate
|
|
139
|
+
alternatives: join an existing organization by country, optional region,
|
|
140
|
+
legal identifier and sector, or enter a known professional DID/URN and
|
|
141
|
+
sector. Organization discovery never replaces the DID/URN fallback. When
|
|
142
|
+
the host supplies `onResolve`, the screen shows the server-resolved role
|
|
143
|
+
choices before it offers local device-PIN setup and DCR. This screen never
|
|
144
|
+
accepts an employee invitation or treats a browser role choice as authority.
|
|
144
145
|
- `SubjectAccessRequestPanel`: controlled provider-enabled QR, numeric-code,
|
|
145
146
|
`did:web`, microchip, tattoo, email or telephone locator. Resolution and
|
|
146
147
|
returned identifier evidence never grant subject access.
|
|
@@ -4,6 +4,7 @@ export type ExistingProfessionalProfileCopy = Readonly<{
|
|
|
4
4
|
title: string;
|
|
5
5
|
description: string;
|
|
6
6
|
credentialMethodLabel: string;
|
|
7
|
+
organizationMethodLabel: string;
|
|
7
8
|
manualMethodLabel: string;
|
|
8
9
|
scanProfessionalCredential: string;
|
|
9
10
|
uploadProfessionalCredentialQr: string;
|
|
@@ -108,8 +109,8 @@ export type ExistingProfessionalProfilePanelProps = Readonly<{
|
|
|
108
109
|
* Registers this portal device for an already-active professional profile.
|
|
109
110
|
* Professional evidence, employee invitations and device registration are
|
|
110
111
|
* separate artifacts. This screen accepts no invitation. A signed credential
|
|
111
|
-
* is the preferred path
|
|
112
|
-
*
|
|
112
|
+
* is the preferred path. Organization coordinates and a DID-or-URN are two
|
|
113
|
+
* explicit alternatives; neither becomes browser-selected authority by itself.
|
|
113
114
|
*/
|
|
114
115
|
export declare function ExistingProfessionalProfilePanel({ copy, sectors, countries, regionsByCountry, busy, error, onScanProfessionalCredential, onReadProfessionalCredentialImage, onResolve, onSubmit }: ExistingProfessionalProfilePanelProps): import("react").JSX.Element;
|
|
115
116
|
//# sourceMappingURL=ExistingProfessionalProfilePanel.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ExistingProfessionalProfilePanel.d.ts","sourceRoot":"","sources":["../src/ExistingProfessionalProfilePanel.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,gBAAgB,CAAA;AAS/D,MAAM,MAAM,+BAA+B,GAAG,QAAQ,CAAC;IACrD,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB,KAAK,EAAE,MAAM,CAAA;IACb,WAAW,EAAE,MAAM,CAAA;IACnB,qBAAqB,EAAE,MAAM,CAAA;IAC7B,iBAAiB,EAAE,MAAM,CAAA;IACzB,0BAA0B,EAAE,MAAM,CAAA;IAClC,8BAA8B,EAAE,MAAM,CAAA;IACtC,2BAA2B,EAAE,MAAM,CAAA;IACnC,8BAA8B,EAAE,MAAM,CAAA;IACtC,WAAW,EAAE,MAAM,CAAA;IACnB,YAAY,EAAE,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C,MAAM,GAAG,SAAS,CAAC,CAAA;IAC/E,SAAS,CAAC,EAAE,CAAC,KAAK,EAAE,iCAAiC,KAAK,OAAO,CAAC,mCAAmC,GAAG,SAAS,mCAAmC,EAAE,CAAC,CAAA;IACvJ,QAAQ,EAAE,CAAC,KAAK,EAAE,gCAAgC,KAAK,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,CAAA;CAC5E,CAAC,CAAA;AAEF;;;;;;GAMG;AACH,wBAAgB,gCAAgC,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,SAAc,EAAE,gBAAqB,EAAE,IAAI,EAAE,KAAK,EAAE,4BAA4B,EAAE,iCAAiC,EAAE,SAAS,EAAE,QAAQ,EAAE,EAAE,qCAAqC,+BAkNlP"}
|
|
@@ -23,8 +23,8 @@ export function toExistingProfessionalProfileRequest(input) {
|
|
|
23
23
|
* Registers this portal device for an already-active professional profile.
|
|
24
24
|
* Professional evidence, employee invitations and device registration are
|
|
25
25
|
* separate artifacts. This screen accepts no invitation. A signed credential
|
|
26
|
-
* is the preferred path
|
|
27
|
-
*
|
|
26
|
+
* is the preferred path. Organization coordinates and a DID-or-URN are two
|
|
27
|
+
* explicit alternatives; neither becomes browser-selected authority by itself.
|
|
28
28
|
*/
|
|
29
29
|
export function ExistingProfessionalProfilePanel({ copy, sectors, countries = [], regionsByCountry = {}, busy, error, onScanProfessionalCredential, onReadProfessionalCredentialImage, onResolve, onSubmit }) {
|
|
30
30
|
const [method, setMethod] = useState('credential');
|
|
@@ -130,7 +130,7 @@ export function ExistingProfessionalProfilePanel({ copy, sectors, countries = []
|
|
|
130
130
|
}
|
|
131
131
|
return { method, professionalCredential: professionalCredential.trim() };
|
|
132
132
|
}
|
|
133
|
-
if (
|
|
133
|
+
if (method === 'organization')
|
|
134
134
|
return {
|
|
135
135
|
method: 'organization',
|
|
136
136
|
country,
|
|
@@ -183,12 +183,12 @@ export function ExistingProfessionalProfilePanel({ copy, sectors, countries = []
|
|
|
183
183
|
}
|
|
184
184
|
if (onResolve && resolvedProfiles.length)
|
|
185
185
|
return _jsxs("section", { className: "uhcp-professional-activation uhcp-professional-pin-setup", "aria-labelledby": "uhcp-existing-professional-pin-title", children: [_jsxs("header", { children: [_jsx("h1", { id: "uhcp-existing-professional-pin-title", children: copy.verifiedProfile || copy.title }), _jsx("p", { children: copy.description })] }), resolvedProfiles.length > 1 ? _jsx("div", { className: "uhcp-resolved-professional-options", role: "group", "aria-label": copy.verifiedProfile || copy.title, children: resolvedProfiles.map(profile => _jsx("button", { type: "button", "aria-pressed": selectedProfile === profile, onClick: () => setSelectedProfile(profile), children: _jsx(ProfileIdentityTarget, { target: { eyebrow: copy.verifiedProfile || '', ...profile } }) }, profile.selectionValue || profile.title)) }) : selectedProfile ? _jsx(ProfileIdentityTarget, { target: { eyebrow: copy.verifiedProfile || '', ...selectedProfile } }) : null, _jsxs("form", { onSubmit: submit, children: [selectedProfile ? _jsxs(_Fragment, { children: [_jsxs("label", { children: [_jsx("span", { children: copy.pinLabel }), _jsx("input", { name: "newPin", type: "password", inputMode: "numeric", minLength: 6, maxLength: 12, autoComplete: "new-password", value: pin, onChange: event => setPin(event.currentTarget.value), required: true })] }), _jsxs("label", { children: [_jsx("span", { children: copy.pinConfirmationLabel }), _jsx("input", { name: "confirmPin", type: "password", inputMode: "numeric", minLength: 6, maxLength: 12, autoComplete: "new-password", value: pinConfirmation, onChange: event => setPinConfirmation(event.currentTarget.value), required: true })] })] }) : null, (localError || error) ? _jsx("p", { role: "alert", children: localError || error }) : null, selectedProfile ? _jsx("button", { type: "submit", disabled: busy, children: busy ? copy.submitting : copy.submit }) : null, _jsx("button", { type: "button", className: "uhcp-secondary-action", disabled: busy, onClick: () => { setResolvedProfiles([]); setSelectedProfile(undefined); setPin(''); setPinConfirmation(''); setLocalError(''); }, children: copy.changeEvidence || copy.manualMethodLabel })] })] });
|
|
186
|
-
return _jsx("section", { className: "uhcp-professional-activation", "aria-labelledby": "uhcp-existing-professional-title", children: _jsxs("form", { onSubmit: submit, children: [_jsxs("header", { children: [copy.eyebrow ? _jsx("p", { className: "uhcp-eyebrow", children: copy.eyebrow }) : null, _jsx("h1", { id: "uhcp-existing-professional-title", children: copy.title }), _jsx("p", { children: copy.description })] }), _jsxs("fieldset", { className: "uhcp-professional-evidence-methods", children: [_jsxs("label", { children: [_jsx("input", { type: "radio", name: "professionalEvidenceMethod", value: "credential", checked: method === 'credential', onChange: () => { setMethod('credential'); setLocalError(''); } }), _jsx("span", { children: copy.credentialMethodLabel })] }), _jsxs("label", { children: [_jsx("input", { type: "radio", name: "professionalEvidenceMethod", value: "identifier", checked: method === 'identifier', onChange: () => { setMethod('identifier'); setLocalError(''); } }), _jsx("span", { children: copy.manualMethodLabel })] })] }), method === 'credential'
|
|
186
|
+
return _jsx("section", { className: "uhcp-professional-activation", "aria-labelledby": "uhcp-existing-professional-title", children: _jsxs("form", { onSubmit: submit, children: [_jsxs("header", { children: [copy.eyebrow ? _jsx("p", { className: "uhcp-eyebrow", children: copy.eyebrow }) : null, _jsx("h1", { id: "uhcp-existing-professional-title", children: copy.title }), _jsx("p", { children: copy.description })] }), _jsxs("fieldset", { className: "uhcp-professional-evidence-methods", children: [_jsxs("label", { children: [_jsx("input", { type: "radio", name: "professionalEvidenceMethod", value: "credential", checked: method === 'credential', onChange: () => { setMethod('credential'); setLocalError(''); } }), _jsx("span", { children: copy.credentialMethodLabel })] }), countries.length ? _jsxs("label", { children: [_jsx("input", { type: "radio", name: "professionalEvidenceMethod", value: "organization", checked: method === 'organization', onChange: () => { setMethod('organization'); setLocalError(''); } }), _jsx("span", { children: copy.organizationMethodLabel })] }) : null, _jsxs("label", { children: [_jsx("input", { type: "radio", name: "professionalEvidenceMethod", value: "identifier", checked: method === 'identifier', onChange: () => { setMethod('identifier'); setLocalError(''); } }), _jsx("span", { children: copy.manualMethodLabel })] })] }), method === 'credential'
|
|
187
187
|
? _jsxs("div", { className: "uhcp-professional-credential-capture", children: [_jsx("button", { type: "button", disabled: busy, onClick: () => void captureCredential(scanWithCamera).catch(() => setLocalError(copy.professionalCredentialRequired)), children: copy.scanProfessionalCredential }), _jsxs("label", { children: [_jsx("span", { children: copy.uploadProfessionalCredentialQr }), _jsx("input", { name: "professionalCredentialQrImage", type: "file", accept: "image/png,image/jpeg,image/webp", disabled: busy, onChange: event => {
|
|
188
188
|
const file = event.currentTarget.files?.[0];
|
|
189
189
|
if (file)
|
|
190
190
|
void captureCredential(() => readCredentialImage(file)).catch(() => setLocalError(copy.credentialQrUnreadable));
|
|
191
191
|
} })] }), cameraActive ? _jsxs(_Fragment, { children: [_jsx("video", { ref: videoRef, playsInline: true, muted: true, "aria-label": copy.cameraActive }), _jsx("p", { role: "status", children: copy.cameraActive }), _jsx("button", { type: "button", onClick: () => stopCamera(), children: copy.closeCamera })] }) : _jsx("video", { ref: videoRef, hidden: true, playsInline: true, muted: true }), _jsx("canvas", { ref: canvasRef, hidden: true, "aria-hidden": "true" }), professionalCredential ? _jsx("p", { role: "status", children: copy.professionalCredentialReady }) : null] })
|
|
192
|
-
: _jsxs(_Fragment, { children: [
|
|
192
|
+
: _jsxs(_Fragment, { children: [method === 'organization' ? _jsxs(_Fragment, { children: [_jsxs("label", { children: [_jsx("span", { children: copy.countryLabel || 'Country' }), _jsxs("select", { name: "professionalCountry", value: country, onChange: event => { setCountry(event.currentTarget.value); setRegional(false); setRegion(''); }, required: true, children: [_jsx("option", { value: "", disabled: true, children: copy.countryPlaceholder || copy.countryLabel || 'Country' }), countries.map(option => _jsx("option", { value: option.value, children: option.label }, option.value))] })] }), _jsxs("label", { className: "uhcp-professional-regional-identifier", children: [_jsx("input", { type: "checkbox", checked: regional, disabled: !country || !(regionsByCountry[country]?.length), onChange: event => { setRegional(event.currentTarget.checked); if (!event.currentTarget.checked)
|
|
193
193
|
setRegion(''); } }), _jsx("span", { children: copy.regionalIdentifierLabel || 'The legal identifier is regional' })] }), regional ? _jsxs("label", { children: [_jsx("span", { children: copy.regionLabel || 'Region' }), _jsxs("select", { name: "professionalRegion", value: region, onChange: event => setRegion(event.currentTarget.value), required: true, children: [_jsx("option", { value: "", disabled: true, children: copy.regionPlaceholder || copy.regionLabel || 'Region' }), (regionsByCountry[country] || []).map(option => _jsx("option", { value: option.value, children: option.label }, option.value))] })] }) : null, _jsxs("label", { children: [_jsx("span", { children: copy.organizationIdentifierLabel || 'Organization legal identifier' }), _jsx("input", { name: "organizationIdentifier", value: organizationIdentifier, onChange: event => setOrganizationIdentifier(event.currentTarget.value), autoComplete: "off", required: true })] })] }) : _jsxs("label", { children: [_jsx("span", { children: copy.professionalIdentifierLabel }), _jsx("input", { name: "professionalIdentifier", value: professionalIdentifier, onChange: event => setProfessionalIdentifier(event.currentTarget.value), autoComplete: "off", required: true })] }), _jsxs("label", { children: [_jsx("span", { children: copy.sectorLabel }), _jsx("select", { name: "professionalSector", value: sector, onChange: event => setSector(event.currentTarget.value), required: true, children: sectors.map(option => _jsx("option", { value: option.value, children: option.label }, option.value)) })] })] }), !onResolve ? _jsxs(_Fragment, { children: [_jsxs("label", { children: [_jsx("span", { children: copy.pinLabel }), _jsx("input", { name: "newPin", type: "password", inputMode: "numeric", minLength: 6, maxLength: 12, autoComplete: "new-password", value: pin, onChange: event => setPin(event.currentTarget.value), required: true })] }), _jsxs("label", { children: [_jsx("span", { children: copy.pinConfirmationLabel }), _jsx("input", { name: "confirmPin", type: "password", inputMode: "numeric", minLength: 6, maxLength: 12, autoComplete: "new-password", value: pinConfirmation, onChange: event => setPinConfirmation(event.currentTarget.value), required: true })] })] }) : null, (localError || error) ? _jsx("p", { role: "alert", children: localError || error }) : null, _jsx("button", { type: "submit", disabled: busy || resolving, children: resolving ? copy.verifying || copy.submitting : onResolve ? copy.verify || copy.submit : busy ? copy.submitting : copy.submit })] }) });
|
|
194
194
|
}
|