uhc-portal-components-react 0.2.20 → 0.2.21
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 +11 -0
- package/README.md +15 -21
- package/dist/CardPreview.d.ts +6 -0
- package/dist/CardPreview.d.ts.map +1 -0
- package/dist/CardPreview.js +5 -0
- package/dist/CollapsiblePortalSection.d.ts +10 -0
- package/dist/CollapsiblePortalSection.d.ts.map +1 -0
- package/dist/CollapsiblePortalSection.js +11 -0
- package/dist/ElapsedOperationStatus.d.ts +9 -0
- package/dist/ElapsedOperationStatus.d.ts.map +1 -0
- package/dist/ElapsedOperationStatus.js +21 -0
- package/dist/ProfileRecoveryPanel.d.ts +29 -0
- package/dist/ProfileRecoveryPanel.d.ts.map +1 -0
- package/dist/ProfileRecoveryPanel.js +32 -0
- package/dist/index.d.ts +5 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +5 -0
- package/dist/passkey-policy.d.ts +9 -0
- package/dist/passkey-policy.d.ts.map +1 -0
- package/dist/passkey-policy.js +18 -0
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,17 @@
|
|
|
2
2
|
|
|
3
3
|
## Unreleased
|
|
4
4
|
|
|
5
|
+
## 0.2.21 - 2026-10-21
|
|
6
|
+
|
|
7
|
+
- Move the card preview, profile recovery, elapsed-operation status and
|
|
8
|
+
collapsible portal section into the shared package and remove their cloned
|
|
9
|
+
consumer implementations and duplicate elapsed-status tests.
|
|
10
|
+
- Keep package metadata and current usage guidance brand-neutral; consumer
|
|
11
|
+
names belong in host repositories rather than this reusable package.
|
|
12
|
+
- Centralize the platform-authenticator capability check and mandatory
|
|
13
|
+
passkey-before-wallet ordering so Personal and Professional hosts cannot
|
|
14
|
+
silently diverge on biometric enrollment policy.
|
|
15
|
+
|
|
5
16
|
## 0.2.20 - 2026-10-21
|
|
6
17
|
|
|
7
18
|
- Add one accessible Personal subject workspace shared by UHC, PetChain and
|
package/README.md
CHANGED
|
@@ -1,25 +1,19 @@
|
|
|
1
|
-
#
|
|
1
|
+
# Shared Portal Components React
|
|
2
2
|
|
|
3
3
|
Historical reusable UI and flow anchors are tracked in
|
|
4
4
|
[`docs/LEGACY_FRONTEND_RECOVERY_INVENTORY.md`](docs/LEGACY_FRONTEND_RECOVERY_INVENTORY.md).
|
|
5
5
|
|
|
6
|
-
Publishable, brand-neutral React components shared by
|
|
7
|
-
|
|
8
|
-
- UHC Personal
|
|
9
|
-
- UHC Professional
|
|
10
|
-
- VetChain Personal
|
|
11
|
-
- VetChain Professional
|
|
12
|
-
- SOSChain Personal
|
|
13
|
-
- SOSChain Professional
|
|
6
|
+
Publishable, brand-neutral React components shared by independent Personal and
|
|
7
|
+
Professional portal deployments.
|
|
14
8
|
|
|
15
9
|
The package owns visual shell behavior only. Authentication, protected-profile
|
|
16
10
|
storage, PIN verification and actor authorization remain in the host portal
|
|
17
11
|
through `ProfileRuntime`, `LoadedProfileWorkspace` and actor-scoped SDK facades.
|
|
18
12
|
|
|
19
13
|
`AnimalIdentityOnboardingV2` and `AnimalIdentityDetailsV2` define one shared
|
|
20
|
-
progressive create/read pattern.
|
|
21
|
-
|
|
22
|
-
|
|
14
|
+
progressive create/read pattern. A host can use the same contract for an animal
|
|
15
|
+
and responsible party or a newborn and responsible person, changing only
|
|
16
|
+
governed role policy and copy: an attending
|
|
23
17
|
physician, midwife, nurse or paramedic may prepare the identity and default
|
|
24
18
|
permission proposal where the jurisdiction authorizes that occupation. The
|
|
25
19
|
proposal remains pending until the responsible authority confirms it; showing
|
|
@@ -40,17 +34,17 @@ Brand differences are supplied through `PortalBrand`: product name,
|
|
|
40
34
|
organization, official artwork and CSS variables. Artwork declares its
|
|
41
35
|
light/dark-surface files and intrinsic dimensions; the shell preserves those
|
|
42
36
|
proportions and never synthesizes a text monogram. Components do not import
|
|
43
|
-
Firebase, Next.js or any
|
|
37
|
+
Firebase, Next.js or any product SDK runtime.
|
|
44
38
|
|
|
45
39
|
```tsx
|
|
46
40
|
const brand = {
|
|
47
41
|
family: 'professional',
|
|
48
|
-
productName: '
|
|
49
|
-
organizationName: '
|
|
42
|
+
productName: 'Example Professional',
|
|
43
|
+
organizationName: 'Example Organization',
|
|
50
44
|
homeHref: '/es',
|
|
51
45
|
mark: {
|
|
52
|
-
lightSurface: { src: '/logos/
|
|
53
|
-
darkSurface: { src: '/logos/
|
|
46
|
+
lightSurface: { src: '/logos/product.svg', alt: 'Product', width: 100, height: 100 },
|
|
47
|
+
darkSurface: { src: '/logos/product.svg', alt: 'Product', width: 100, height: 100 },
|
|
54
48
|
},
|
|
55
49
|
} satisfies PortalBrand
|
|
56
50
|
```
|
|
@@ -196,12 +190,12 @@ token immediately; otherwise it records a `Communication` request for the
|
|
|
196
190
|
individual controller to review. The GW remains authoritative for the exact
|
|
197
191
|
intersection of requested and consented sections.
|
|
198
192
|
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
193
|
+
Personal deployments must compose the same reusable Personal flow modules;
|
|
194
|
+
Professional deployments must do the same for Professional flows. This package
|
|
195
|
+
does **not yet expose every complete
|
|
202
196
|
route modules**: login, versioned terms, profile protection, individual/member
|
|
203
197
|
management, licences, clinical data, care and permissions still live in the
|
|
204
|
-
|
|
198
|
+
host application and must be extracted behind host-owned adapters. A brand
|
|
205
199
|
adapter may change tokens, logo, product vocabulary, animal-specific forms and
|
|
206
200
|
route destinations; it must not fork shared flow or authorization behavior.
|
|
207
201
|
Independent deployments are expected: reuse means versioned complete screens,
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import type { ReactNode } from 'react';
|
|
2
|
+
/** Keeps the canonical physical-card aspect ratio inside a responsive preview shell. */
|
|
3
|
+
export declare function CardPreview({ children }: Readonly<{
|
|
4
|
+
children: ReactNode;
|
|
5
|
+
}>): import("react").JSX.Element;
|
|
6
|
+
//# sourceMappingURL=CardPreview.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"CardPreview.d.ts","sourceRoot":"","sources":["../src/CardPreview.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;AAEtC,wFAAwF;AACxF,wBAAgB,WAAW,CAAC,EAAE,QAAQ,EAAE,EAAE,QAAQ,CAAC;IAAE,QAAQ,EAAE,SAAS,CAAA;CAAE,CAAC,+BAI1E"}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
/** Keeps the canonical physical-card aspect ratio inside a responsive preview shell. */
|
|
3
|
+
export function CardPreview({ children }) {
|
|
4
|
+
return _jsx("div", { className: "uhc-card-preview-shell", "data-testid": "card-preview", children: _jsx("div", { className: "uhc-card-preview", children: children }) });
|
|
5
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { type ReactNode } from 'react';
|
|
2
|
+
/** Keeps one portal phase mounted while allowing its content to be collapsed. */
|
|
3
|
+
export declare function CollapsiblePortalSection({ title, description, children, className, initiallyOpen, }: Readonly<{
|
|
4
|
+
title: string;
|
|
5
|
+
description?: string;
|
|
6
|
+
children: ReactNode;
|
|
7
|
+
className?: string;
|
|
8
|
+
initiallyOpen?: boolean;
|
|
9
|
+
}>): import("react").JSX.Element;
|
|
10
|
+
//# sourceMappingURL=CollapsiblePortalSection.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"CollapsiblePortalSection.d.ts","sourceRoot":"","sources":["../src/CollapsiblePortalSection.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAY,KAAK,SAAS,EAAuB,MAAM,OAAO,CAAA;AAErE,iFAAiF;AACjF,wBAAgB,wBAAwB,CAAC,EACvC,KAAK,EACL,WAAW,EACX,QAAQ,EACR,SAAc,EACd,aAAoB,GACrB,EAAE,QAAQ,CAAC;IACV,KAAK,EAAE,MAAM,CAAA;IACb,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,QAAQ,EAAE,SAAS,CAAA;IACnB,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,aAAa,CAAC,EAAE,OAAO,CAAA;CACxB,CAAC,+BAaD"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
|
+
import { useState } from 'react';
|
|
4
|
+
/** Keeps one portal phase mounted while allowing its content to be collapsed. */
|
|
5
|
+
export function CollapsiblePortalSection({ title, description, children, className = '', initiallyOpen = true, }) {
|
|
6
|
+
const [open, setOpen] = useState(initiallyOpen);
|
|
7
|
+
function retainDisclosureState(event) {
|
|
8
|
+
setOpen(event.currentTarget.open);
|
|
9
|
+
}
|
|
10
|
+
return _jsxs("details", { className: `research-import-disclosure ${className}`.trim(), open: open, onToggle: retainDisclosureState, children: [_jsxs("summary", { children: [_jsx("strong", { children: title }), description ? _jsx("span", { children: description }) : null] }), _jsx("div", { className: "research-import-disclosure-content", children: children })] });
|
|
11
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/** Renders one accessible status and elapsed counter for a long portal operation. */
|
|
2
|
+
export declare function ElapsedOperationStatus({ busy, status, fallback, tone, testId }: Readonly<{
|
|
3
|
+
busy: boolean;
|
|
4
|
+
status: string;
|
|
5
|
+
fallback: string;
|
|
6
|
+
tone?: 'info' | 'warning' | 'success' | 'error';
|
|
7
|
+
testId?: string;
|
|
8
|
+
}>): import("react").JSX.Element | null;
|
|
9
|
+
//# sourceMappingURL=ElapsedOperationStatus.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ElapsedOperationStatus.d.ts","sourceRoot":"","sources":["../src/ElapsedOperationStatus.tsx"],"names":[],"mappings":"AAIA,qFAAqF;AACrF,wBAAgB,sBAAsB,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,QAAQ,EAAE,IAAgB,EAAE,MAAM,EAAE,EAAE,QAAQ,CAAC;IACpG,IAAI,EAAE,OAAO,CAAA;IACb,MAAM,EAAE,MAAM,CAAA;IACd,QAAQ,EAAE,MAAM,CAAA;IAChB,IAAI,CAAC,EAAE,MAAM,GAAG,SAAS,GAAG,SAAS,GAAG,OAAO,CAAA;IAC/C,MAAM,CAAC,EAAE,MAAM,CAAA;CAChB,CAAC,sCAiBD"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
import { jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
|
+
import { useEffect, useState } from 'react';
|
|
4
|
+
/** Renders one accessible status and elapsed counter for a long portal operation. */
|
|
5
|
+
export function ElapsedOperationStatus({ busy, status, fallback, tone = 'warning', testId }) {
|
|
6
|
+
const [elapsedSeconds, setElapsedSeconds] = useState(0);
|
|
7
|
+
useEffect(() => {
|
|
8
|
+
if (!busy) {
|
|
9
|
+
setElapsedSeconds(0);
|
|
10
|
+
return;
|
|
11
|
+
}
|
|
12
|
+
const startedAt = Date.now();
|
|
13
|
+
setElapsedSeconds(0);
|
|
14
|
+
const timer = window.setInterval(() => setElapsedSeconds(Math.floor((Date.now() - startedAt) / 1000)), 1000);
|
|
15
|
+
return () => window.clearInterval(timer);
|
|
16
|
+
}, [busy]);
|
|
17
|
+
const text = status || (busy ? fallback : '');
|
|
18
|
+
if (!text)
|
|
19
|
+
return null;
|
|
20
|
+
return _jsxs("p", { role: tone === 'error' ? 'alert' : 'status', "data-testid": testId, className: `notice notice-${tone}`, children: [text, busy ? ` (${elapsedSeconds}s)` : ''] });
|
|
21
|
+
}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
export type ProfileRecoveryMessages = Readonly<{
|
|
2
|
+
open: string;
|
|
3
|
+
title: string;
|
|
4
|
+
explanation: string;
|
|
5
|
+
recoveryCode: string;
|
|
6
|
+
recoveryCodeHelp: string;
|
|
7
|
+
newPin: string;
|
|
8
|
+
confirmPin: string;
|
|
9
|
+
submit: string;
|
|
10
|
+
cancel: string;
|
|
11
|
+
mismatch: string;
|
|
12
|
+
completed: string;
|
|
13
|
+
replacementCode: string;
|
|
14
|
+
replacementCodeHelp: string;
|
|
15
|
+
notificationQueued: string;
|
|
16
|
+
}>;
|
|
17
|
+
/** Collects recovery proof and a replacement PIN without receiving wallet keys. */
|
|
18
|
+
export declare function ProfileRecoveryPanel({ profileId, messages, disabled, onRecover, onClose }: Readonly<{
|
|
19
|
+
profileId: string;
|
|
20
|
+
messages: ProfileRecoveryMessages;
|
|
21
|
+
disabled?: boolean;
|
|
22
|
+
onRecover: (input: {
|
|
23
|
+
profileId: string;
|
|
24
|
+
recoveryCode: string;
|
|
25
|
+
newPin: string;
|
|
26
|
+
}) => Promise<string>;
|
|
27
|
+
onClose: () => void;
|
|
28
|
+
}>): import("react").JSX.Element;
|
|
29
|
+
//# sourceMappingURL=ProfileRecoveryPanel.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ProfileRecoveryPanel.d.ts","sourceRoot":"","sources":["../src/ProfileRecoveryPanel.tsx"],"names":[],"mappings":"AAIA,MAAM,MAAM,uBAAuB,GAAG,QAAQ,CAAC;IAC7C,IAAI,EAAE,MAAM,CAAA;IACZ,KAAK,EAAE,MAAM,CAAA;IACb,WAAW,EAAE,MAAM,CAAA;IACnB,YAAY,EAAE,MAAM,CAAA;IACpB,gBAAgB,EAAE,MAAM,CAAA;IACxB,MAAM,EAAE,MAAM,CAAA;IACd,UAAU,EAAE,MAAM,CAAA;IAClB,MAAM,EAAE,MAAM,CAAA;IACd,MAAM,EAAE,MAAM,CAAA;IACd,QAAQ,EAAE,MAAM,CAAA;IAChB,SAAS,EAAE,MAAM,CAAA;IACjB,eAAe,EAAE,MAAM,CAAA;IACvB,mBAAmB,EAAE,MAAM,CAAA;IAC3B,kBAAkB,EAAE,MAAM,CAAA;CAC3B,CAAC,CAAA;AAEF,mFAAmF;AACnF,wBAAgB,oBAAoB,CAAC,EAAE,SAAS,EAAE,QAAQ,EAAE,QAAgB,EAAE,SAAS,EAAE,OAAO,EAAE,EAAE,QAAQ,CAAC;IAC3G,SAAS,EAAE,MAAM,CAAA;IACjB,QAAQ,EAAE,uBAAuB,CAAA;IACjC,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,SAAS,EAAE,CAAC,KAAK,EAAE;QAAE,SAAS,EAAE,MAAM,CAAC;QAAC,YAAY,EAAE,MAAM,CAAC;QAAC,MAAM,EAAE,MAAM,CAAA;KAAE,KAAK,OAAO,CAAC,MAAM,CAAC,CAAA;IAClG,OAAO,EAAE,MAAM,IAAI,CAAA;CACpB,CAAC,+BAwCD"}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
|
+
import { useState } from 'react';
|
|
4
|
+
/** Collects recovery proof and a replacement PIN without receiving wallet keys. */
|
|
5
|
+
export function ProfileRecoveryPanel({ profileId, messages, disabled = false, onRecover, onClose }) {
|
|
6
|
+
const [busy, setBusy] = useState(false);
|
|
7
|
+
const [error, setError] = useState('');
|
|
8
|
+
const [replacementCode, setReplacementCode] = useState('');
|
|
9
|
+
async function submit(event) {
|
|
10
|
+
event.preventDefault();
|
|
11
|
+
setError('');
|
|
12
|
+
const form = new FormData(event.currentTarget);
|
|
13
|
+
const newPin = String(form.get('newPin') || '');
|
|
14
|
+
if (newPin !== String(form.get('confirmPin') || '')) {
|
|
15
|
+
setError(messages.mismatch);
|
|
16
|
+
return;
|
|
17
|
+
}
|
|
18
|
+
setBusy(true);
|
|
19
|
+
try {
|
|
20
|
+
setReplacementCode(await onRecover({ profileId, recoveryCode: String(form.get('recoveryCode') || ''), newPin }));
|
|
21
|
+
}
|
|
22
|
+
catch (reason) {
|
|
23
|
+
setError(reason instanceof Error ? reason.message : 'profile_recovery_failed');
|
|
24
|
+
}
|
|
25
|
+
finally {
|
|
26
|
+
setBusy(false);
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
if (replacementCode)
|
|
30
|
+
return _jsxs("section", { className: "panel profile-recovery-result", role: "status", children: [_jsx("strong", { children: messages.completed }), _jsxs("label", { children: [messages.replacementCode, _jsx("textarea", { readOnly: true, rows: 3, value: replacementCode, "aria-label": messages.replacementCode })] }), _jsx("p", { children: messages.replacementCodeHelp }), _jsx("p", { children: messages.notificationQueued }), _jsx("button", { type: "button", "data-portal-action": "close-profile-recovery", onClick: onClose, children: messages.cancel })] });
|
|
31
|
+
return _jsxs("form", { className: "panel form profile-recovery-form", onSubmit: submit, children: [_jsxs("div", { children: [_jsx("h3", { children: messages.title }), _jsx("p", { className: "muted", children: messages.explanation })] }), _jsxs("label", { children: [messages.recoveryCode, _jsx("textarea", { name: "recoveryCode", rows: 3, required: true, autoComplete: "off", "aria-describedby": "profile-recovery-help" })] }), _jsx("p", { id: "profile-recovery-help", className: "technical-note", children: messages.recoveryCodeHelp }), _jsxs("label", { children: [messages.newPin, _jsx("input", { name: "newPin", type: "password", minLength: 6, required: true, autoComplete: "new-password" })] }), _jsxs("label", { children: [messages.confirmPin, _jsx("input", { name: "confirmPin", type: "password", minLength: 6, required: true, autoComplete: "new-password" })] }), error ? _jsx("p", { role: "alert", children: error }) : null, _jsxs("div", { className: "inline-actions", children: [_jsx("button", { "data-portal-action": "submit-profile-recovery", disabled: busy, children: messages.submit }), _jsx("button", { type: "button", "data-portal-action": "cancel-profile-recovery", className: "secondary", disabled: busy || disabled, onClick: onClose, children: messages.cancel })] })] });
|
|
32
|
+
}
|
package/dist/index.d.ts
CHANGED
|
@@ -50,4 +50,9 @@ export * from './notification-bff-client.js';
|
|
|
50
50
|
export * from './CommunicationsWorkspace.js';
|
|
51
51
|
export * from './SelectedSubjectWorkspace.js';
|
|
52
52
|
export * from './SubjectWorkspace.js';
|
|
53
|
+
export * from './CardPreview.js';
|
|
54
|
+
export * from './CollapsiblePortalSection.js';
|
|
55
|
+
export * from './ElapsedOperationStatus.js';
|
|
56
|
+
export * from './ProfileRecoveryPanel.js';
|
|
57
|
+
export * from './passkey-policy.js';
|
|
53
58
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,gBAAgB,CAAA;AAC9B,cAAc,kBAAkB,CAAA;AAChC,cAAc,yBAAyB,CAAA;AACvC,cAAc,mBAAmB,CAAA;AACjC,cAAc,2BAA2B,CAAA;AACzC,cAAc,kBAAkB,CAAA;AAChC,cAAc,kBAAkB,CAAA;AAChC,cAAc,4BAA4B,CAAA;AAC1C,cAAc,8BAA8B,CAAA;AAC5C,cAAc,4BAA4B,CAAA;AAC1C,cAAc,6BAA6B,CAAA;AAC3C,cAAc,uBAAuB,CAAA;AACrC,cAAc,wCAAwC,CAAA;AACtD,cAAc,0BAA0B,CAAA;AACxC,cAAc,uBAAuB,CAAA;AACrC,cAAc,6BAA6B,CAAA;AAC3C,cAAc,mCAAmC,CAAA;AACjD,cAAc,+BAA+B,CAAA;AAC7C,cAAc,qCAAqC,CAAA;AACnD,cAAc,mCAAmC,CAAA;AACjD,cAAc,gCAAgC,CAAA;AAC9C,cAAc,0BAA0B,CAAA;AACxC,cAAc,iCAAiC,CAAA;AAC/C,cAAc,2BAA2B,CAAA;AACzC,cAAc,8BAA8B,CAAA;AAC5C,cAAc,gCAAgC,CAAA;AAC9C,cAAc,gCAAgC,CAAA;AAC9C,cAAc,wBAAwB,CAAA;AACtC,cAAc,+BAA+B,CAAA;AAC7C,cAAc,gCAAgC,CAAA;AAC9C,cAAc,iCAAiC,CAAA;AAC/C,cAAc,0CAA0C,CAAA;AACxD,cAAc,kCAAkC,CAAA;AAChD,cAAc,0BAA0B,CAAA;AACxC,cAAc,4BAA4B,CAAA;AAC1C,cAAc,gCAAgC,CAAA;AAC9C,cAAc,oCAAoC,CAAA;AAClD,cAAc,sCAAsC,CAAA;AACpD,cAAc,+BAA+B,CAAA;AAC7C,cAAc,iCAAiC,CAAA;AAC/C,cAAc,8BAA8B,CAAA;AAC5C,cAAc,6BAA6B,CAAA;AAC3C,cAAc,yBAAyB,CAAA;AACvC,cAAc,uCAAuC,CAAA;AACrD,cAAc,uBAAuB,CAAA;AACrC,cAAc,iCAAiC,CAAA;AAC/C,cAAc,8BAA8B,CAAA;AAC5C,cAAc,2BAA2B,CAAA;AACzC,cAAc,8BAA8B,CAAA;AAC5C,cAAc,8BAA8B,CAAA;AAC5C,cAAc,+BAA+B,CAAA;AAC7C,cAAc,uBAAuB,CAAA"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,gBAAgB,CAAA;AAC9B,cAAc,kBAAkB,CAAA;AAChC,cAAc,yBAAyB,CAAA;AACvC,cAAc,mBAAmB,CAAA;AACjC,cAAc,2BAA2B,CAAA;AACzC,cAAc,kBAAkB,CAAA;AAChC,cAAc,kBAAkB,CAAA;AAChC,cAAc,4BAA4B,CAAA;AAC1C,cAAc,8BAA8B,CAAA;AAC5C,cAAc,4BAA4B,CAAA;AAC1C,cAAc,6BAA6B,CAAA;AAC3C,cAAc,uBAAuB,CAAA;AACrC,cAAc,wCAAwC,CAAA;AACtD,cAAc,0BAA0B,CAAA;AACxC,cAAc,uBAAuB,CAAA;AACrC,cAAc,6BAA6B,CAAA;AAC3C,cAAc,mCAAmC,CAAA;AACjD,cAAc,+BAA+B,CAAA;AAC7C,cAAc,qCAAqC,CAAA;AACnD,cAAc,mCAAmC,CAAA;AACjD,cAAc,gCAAgC,CAAA;AAC9C,cAAc,0BAA0B,CAAA;AACxC,cAAc,iCAAiC,CAAA;AAC/C,cAAc,2BAA2B,CAAA;AACzC,cAAc,8BAA8B,CAAA;AAC5C,cAAc,gCAAgC,CAAA;AAC9C,cAAc,gCAAgC,CAAA;AAC9C,cAAc,wBAAwB,CAAA;AACtC,cAAc,+BAA+B,CAAA;AAC7C,cAAc,gCAAgC,CAAA;AAC9C,cAAc,iCAAiC,CAAA;AAC/C,cAAc,0CAA0C,CAAA;AACxD,cAAc,kCAAkC,CAAA;AAChD,cAAc,0BAA0B,CAAA;AACxC,cAAc,4BAA4B,CAAA;AAC1C,cAAc,gCAAgC,CAAA;AAC9C,cAAc,oCAAoC,CAAA;AAClD,cAAc,sCAAsC,CAAA;AACpD,cAAc,+BAA+B,CAAA;AAC7C,cAAc,iCAAiC,CAAA;AAC/C,cAAc,8BAA8B,CAAA;AAC5C,cAAc,6BAA6B,CAAA;AAC3C,cAAc,yBAAyB,CAAA;AACvC,cAAc,uCAAuC,CAAA;AACrD,cAAc,uBAAuB,CAAA;AACrC,cAAc,iCAAiC,CAAA;AAC/C,cAAc,8BAA8B,CAAA;AAC5C,cAAc,2BAA2B,CAAA;AACzC,cAAc,8BAA8B,CAAA;AAC5C,cAAc,8BAA8B,CAAA;AAC5C,cAAc,+BAA+B,CAAA;AAC7C,cAAc,uBAAuB,CAAA;AACrC,cAAc,kBAAkB,CAAA;AAChC,cAAc,+BAA+B,CAAA;AAC7C,cAAc,6BAA6B,CAAA;AAC3C,cAAc,2BAA2B,CAAA;AACzC,cAAc,qBAAqB,CAAA"}
|
package/dist/index.js
CHANGED
|
@@ -50,3 +50,8 @@ export * from './notification-bff-client.js';
|
|
|
50
50
|
export * from './CommunicationsWorkspace.js';
|
|
51
51
|
export * from './SelectedSubjectWorkspace.js';
|
|
52
52
|
export * from './SubjectWorkspace.js';
|
|
53
|
+
export * from './CardPreview.js';
|
|
54
|
+
export * from './CollapsiblePortalSection.js';
|
|
55
|
+
export * from './ElapsedOperationStatus.js';
|
|
56
|
+
export * from './ProfileRecoveryPanel.js';
|
|
57
|
+
export * from './passkey-policy.js';
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/** Reports only a positive browser claim for a user-verifying platform authenticator. */
|
|
2
|
+
export declare function isUserVerifyingPlatformPasskeyAvailable(): Promise<boolean>;
|
|
3
|
+
/** Requires WebAuthn enrollment to finish before issuing a usable wallet session. */
|
|
4
|
+
export declare function openWalletAfterRequiredPasskey<T>(input: Readonly<{
|
|
5
|
+
passkeyRequired: boolean;
|
|
6
|
+
enroll(): Promise<void>;
|
|
7
|
+
open(): Promise<T>;
|
|
8
|
+
}>): Promise<T>;
|
|
9
|
+
//# sourceMappingURL=passkey-policy.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"passkey-policy.d.ts","sourceRoot":"","sources":["../src/passkey-policy.ts"],"names":[],"mappings":"AAAA,yFAAyF;AACzF,wBAAsB,uCAAuC,IAAI,OAAO,CAAC,OAAO,CAAC,CAQhF;AAED,qFAAqF;AACrF,wBAAsB,8BAA8B,CAAC,CAAC,EAAE,KAAK,EAAE,QAAQ,CAAC;IACtE,eAAe,EAAE,OAAO,CAAA;IACxB,MAAM,IAAI,OAAO,CAAC,IAAI,CAAC,CAAA;IACvB,IAAI,IAAI,OAAO,CAAC,CAAC,CAAC,CAAA;CACnB,CAAC,GAAG,OAAO,CAAC,CAAC,CAAC,CAGd"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/** Reports only a positive browser claim for a user-verifying platform authenticator. */
|
|
2
|
+
export async function isUserVerifyingPlatformPasskeyAvailable() {
|
|
3
|
+
if (typeof PublicKeyCredential === 'undefined'
|
|
4
|
+
|| typeof PublicKeyCredential.isUserVerifyingPlatformAuthenticatorAvailable !== 'function')
|
|
5
|
+
return false;
|
|
6
|
+
try {
|
|
7
|
+
return await PublicKeyCredential.isUserVerifyingPlatformAuthenticatorAvailable();
|
|
8
|
+
}
|
|
9
|
+
catch {
|
|
10
|
+
return false;
|
|
11
|
+
}
|
|
12
|
+
}
|
|
13
|
+
/** Requires WebAuthn enrollment to finish before issuing a usable wallet session. */
|
|
14
|
+
export async function openWalletAfterRequiredPasskey(input) {
|
|
15
|
+
if (input.passkeyRequired)
|
|
16
|
+
await input.enroll();
|
|
17
|
+
return input.open();
|
|
18
|
+
}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "uhc-portal-components-react",
|
|
3
|
-
"version": "0.2.
|
|
4
|
-
"description": "Brand-neutral React portal
|
|
3
|
+
"version": "0.2.21",
|
|
4
|
+
"description": "Brand-neutral React portal screens, account preferences and protected-profile UI.",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"type": "module",
|
|
7
7
|
"files": [
|