uhc-portal-components-react 0.2.8 → 0.2.10
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 +20 -0
- package/dist/AnimalIdentityOnboarding.d.ts +4 -4
- package/dist/AnimalIdentityOnboarding.d.ts.map +1 -1
- package/dist/AnimalIdentityOnboarding.js +1 -1
- package/dist/AnimalIdentityOnboardingV2.d.ts +5 -1
- package/dist/AnimalIdentityOnboardingV2.d.ts.map +1 -1
- package/dist/AnimalIdentityOnboardingV2.js +21 -10
- package/dist/IdentityEntityEditorV2.d.ts +52 -0
- package/dist/IdentityEntityEditorV2.d.ts.map +1 -0
- package/dist/IdentityEntityEditorV2.js +17 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -0
- package/dist/styles.css +15 -4
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,25 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 0.2.10 - 2026-10-10
|
|
4
|
+
|
|
5
|
+
- Keep animal-controller creation focused on identity and contact data: the
|
|
6
|
+
controller channel already owns its unlock credential, so the form no longer
|
|
7
|
+
asks for a second PIN or requires identity-evidence uploads at creation time.
|
|
8
|
+
- Let hosts require email and telephone independently, start country selection
|
|
9
|
+
without an implicit jurisdiction and keep optional evidence collection for a
|
|
10
|
+
later, explicit post-creation step.
|
|
11
|
+
- Improve the reusable entity editor contrast and distinguish its edit action
|
|
12
|
+
with an accessible icon.
|
|
13
|
+
|
|
14
|
+
## 0.2.9 - 2026-10-10
|
|
15
|
+
|
|
16
|
+
- Add one reusable identity entity editor for animal controllers and related
|
|
17
|
+
parties, with a fixed responsible-party relationship for the controller and
|
|
18
|
+
host-governed relationship choices for additional entities.
|
|
19
|
+
- Keep identity evidence inside the entity it supports and keep the regional
|
|
20
|
+
identifier control in a stable layout while enabling its region only when
|
|
21
|
+
applicable.
|
|
22
|
+
|
|
3
23
|
## 0.2.8 - 2026-10-10
|
|
4
24
|
|
|
5
25
|
- Restore the visual animal-photo picker from the earlier VetChain Expo flow:
|
|
@@ -17,10 +17,10 @@ export type AnimalIdentityOnboardingInput = Readonly<{
|
|
|
17
17
|
controllerTelephone?: string;
|
|
18
18
|
verificationMethod?: 'pipp' | 'sripp' | 'eid' | 'uripp';
|
|
19
19
|
relationship: AnimalControllerRelationship;
|
|
20
|
-
ownerDocument
|
|
20
|
+
ownerDocument?: File;
|
|
21
21
|
animalDocument: File;
|
|
22
|
-
relationshipDocument
|
|
23
|
-
controllerPin
|
|
22
|
+
relationshipDocument?: File;
|
|
23
|
+
controllerPin?: string;
|
|
24
24
|
}>;
|
|
25
25
|
export type AnimalIdentityOnboardingCopy = Readonly<{
|
|
26
26
|
title: string;
|
|
@@ -48,7 +48,7 @@ export type AnimalIdentityOnboardingCopy = Readonly<{
|
|
|
48
48
|
ownerDocument: string;
|
|
49
49
|
animalDocument: string;
|
|
50
50
|
relationshipDocument: string;
|
|
51
|
-
controllerPin
|
|
51
|
+
controllerPin?: string;
|
|
52
52
|
submit: string;
|
|
53
53
|
}>;
|
|
54
54
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AnimalIdentityOnboarding.d.ts","sourceRoot":"","sources":["../src/AnimalIdentityOnboarding.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,gCAAgC,CAAA;AAE5E,MAAM,MAAM,4BAA4B,GAAG,OAAO,GAAG,WAAW,CAAA;AAEhE,MAAM,MAAM,6BAA6B,GAAG,QAAQ,CAAC;IACnD,UAAU,EAAE,MAAM,CAAA;IAClB,UAAU,EAAE,MAAM,CAAA;IAClB,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,GAAG,EAAE,QAAQ,GAAG,MAAM,GAAG,OAAO,GAAG,SAAS,CAAA;IAC5C,gBAAgB,EAAE,MAAM,CAAA;IACxB,eAAe,EAAE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B,CAAC,+BAgBD"}
|
|
@@ -48,7 +48,7 @@ export function SubjectIdentityCard({ subject, relationship, statusLabels, editL
|
|
|
48
48
|
const initial = subject.displayName.trim().slice(0, 1).toUpperCase() || '•';
|
|
49
49
|
return _jsxs("article", { className: "uhcp-subject-identity-card", children: [_jsxs("header", { children: [subject.imageUrl
|
|
50
50
|
? _jsx("img", { src: subject.imageUrl, alt: "" })
|
|
51
|
-
: _jsx("span", { className: "uhcp-subject-identity-avatar", "aria-hidden": "true", children: initial }), _jsxs("div", { children: [_jsx("small", { children: subject.kind }), _jsx("h3", { children: subject.displayName })] }), canEdit && onEdit && editLabel ? _jsx("button", { type: "button", onClick: onEdit, children:
|
|
51
|
+
: _jsx("span", { className: "uhcp-subject-identity-avatar", "aria-hidden": "true", children: initial }), _jsxs("div", { children: [_jsx("small", { children: subject.kind }), _jsx("h3", { children: subject.displayName })] }), canEdit && onEdit && editLabel ? _jsx("button", { className: "uhcp-subject-identity-edit", type: "button", "aria-label": editLabel, title: editLabel, onClick: onEdit, children: _jsx("span", { "aria-hidden": "true", children: "\u270E" }) }) : null] }), _jsx("dl", { children: subject.facts.map(fact => _jsxs("div", { children: [_jsx("dt", { children: fact.label }), _jsx("dd", { children: fact.value })] }, `${fact.label}:${fact.value}`)) }), relationship ? _jsxs("section", { className: "uhcp-subject-identity-relationship", children: [_jsx("span", { children: relationship.label }), _jsx("strong", { children: relationship.displayName }), _jsx("small", { className: `uhcp-identity-status uhcp-identity-status-${relationship.status}`, children: statusLabels[relationship.status] })] }) : null] });
|
|
52
52
|
}
|
|
53
53
|
function StepNumber({ value }) {
|
|
54
54
|
return _jsx("span", { className: "uhcp-identity-step-number", "aria-hidden": "true", children: value });
|
|
@@ -8,6 +8,7 @@ export type AnimalIdentityOnboardingV2Copy = AnimalIdentityOnboardingCopy & Read
|
|
|
8
8
|
photoTooLarge: string;
|
|
9
9
|
photoDimensionsInvalid: string;
|
|
10
10
|
ownerKind: string;
|
|
11
|
+
responsibleParty?: string;
|
|
11
12
|
personOwner: string;
|
|
12
13
|
organizationOwner: string;
|
|
13
14
|
regionalIdentifier: string;
|
|
@@ -20,6 +21,7 @@ export type AnimalIdentityOnboardingV2Copy = AnimalIdentityOnboardingCopy & Read
|
|
|
20
21
|
supervisedRemote: string;
|
|
21
22
|
electronicId: string;
|
|
22
23
|
unsupervisedRemote: string;
|
|
24
|
+
countryPlaceholder?: string;
|
|
23
25
|
}>;
|
|
24
26
|
type SelectOption = Readonly<{
|
|
25
27
|
value: string;
|
|
@@ -29,7 +31,7 @@ type SelectOption = Readonly<{
|
|
|
29
31
|
* Progressive animal onboarding presentation. It preserves the V1 payload so
|
|
30
32
|
* hosts can adopt it without changing evidence, authorization or persistence.
|
|
31
33
|
*/
|
|
32
|
-
export declare function AnimalIdentityOnboardingV2({ copy, onSubmit, submitAction, speciesOptions, countryOptions, regionOptionsByCountry, identifierTypeOptions, showHeader, busy }: Readonly<{
|
|
34
|
+
export declare function AnimalIdentityOnboardingV2({ copy, onSubmit, submitAction, speciesOptions, countryOptions, regionOptionsByCountry, identifierTypeOptions, showHeader, requireEmail, requireTelephone, busy }: Readonly<{
|
|
33
35
|
copy: AnimalIdentityOnboardingV2Copy;
|
|
34
36
|
onSubmit: (input: AnimalIdentityOnboardingInput) => Promise<void> | void;
|
|
35
37
|
submitAction?: string;
|
|
@@ -44,6 +46,8 @@ export declare function AnimalIdentityOnboardingV2({ copy, onSubmit, submitActio
|
|
|
44
46
|
organization: readonly SelectOption[];
|
|
45
47
|
}>;
|
|
46
48
|
showHeader?: boolean;
|
|
49
|
+
requireEmail?: boolean;
|
|
50
|
+
requireTelephone?: boolean;
|
|
47
51
|
busy?: boolean;
|
|
48
52
|
}>): import("react").JSX.Element;
|
|
49
53
|
export {};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AnimalIdentityOnboardingV2.d.ts","sourceRoot":"","sources":["../src/AnimalIdentityOnboardingV2.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK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AE,cAAmB,EAAE,cAAmB,EAAE,sBAA2B,EAAE,qBAAqB,EAAE,UAAiB,EAAE,YAAoB,EAAE,gBAAwB,EAAE,IAAY,EAAE,EAAE,QAAQ,CAAC;IACnQ,IAAI,EAAE,8BAA8B,CAAA;IACpC,QAAQ,EAAE,CAAC,KAAK,EAAE,6BAA6B,KAAK,OAAO,CAAC,IAAI,CAAC,GAAG,IAAI,CAAA;IACxE,YAAY,CAAC,EAAE,MAAM,CAAA;IACrB,cAAc,CAAC,EAAE,SAAS,QAAQ,CAAC;QAAE,UAAU,EAAE,MAAM,CAAC;QAAC,KAAK,EAAE,MAAM,CAAA;KAAE,CAAC,EAAE,CAAA;IAC3E,cAAc,CAAC,EAAE,SAAS,YAAY,EAAE,CAAA;IACxC,sBAAsB,CAAC,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,SAAS,YAAY,EAAE,CAAC,CAAC,CAAA;IAC1E,qBAAqB,CAAC,EAAE,QAAQ,CAAC;QAAE,MAAM,EAAE,SAAS,YAAY,EAAE,CAAC;QAAC,YAAY,EAAE,SAAS,YAAY,EAAE,CAAA;KAAE,CAAC,CAAA;IAC5G,UAAU,CAAC,EAAE,OAAO,CAAA;IACpB,YAAY,CAAC,EAAE,OAAO,CAAA;IACtB,gBAAgB,CAAC,EAAE,OAAO,CAAA;IAC1B,IAAI,CAAC,EAAE,OAAO,CAAA;CACf,CAAC,+BAiID"}
|
|
@@ -1,20 +1,18 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { useEffect, useState } from 'react';
|
|
3
|
+
import { IdentityEntityEditorV2 } from './IdentityEntityEditorV2.js';
|
|
3
4
|
const MAX_ANIMAL_PHOTO_BYTES = 2 * 1024 * 1024;
|
|
4
5
|
/**
|
|
5
6
|
* Progressive animal onboarding presentation. It preserves the V1 payload so
|
|
6
7
|
* hosts can adopt it without changing evidence, authorization or persistence.
|
|
7
8
|
*/
|
|
8
|
-
export function AnimalIdentityOnboardingV2({ copy, onSubmit, submitAction, speciesOptions = [], countryOptions = [], regionOptionsByCountry = {}, identifierTypeOptions, showHeader = true, busy = false }) {
|
|
9
|
+
export function AnimalIdentityOnboardingV2({ copy, onSubmit, submitAction, speciesOptions = [], countryOptions = [], regionOptionsByCountry = {}, identifierTypeOptions, showHeader = true, requireEmail = false, requireTelephone = false, busy = false }) {
|
|
9
10
|
const [submitting, setSubmitting] = useState(false);
|
|
10
11
|
const [animalName, setAnimalName] = useState('');
|
|
11
12
|
const [previewUrl, setPreviewUrl] = useState('');
|
|
12
13
|
const [animalDocument, setAnimalDocument] = useState();
|
|
13
14
|
const [photoError, setPhotoError] = useState('');
|
|
14
15
|
const [contactError, setContactError] = useState('');
|
|
15
|
-
const [controllerKind, setControllerKind] = useState('person');
|
|
16
|
-
const [controllerCountry, setControllerCountry] = useState(countryOptions[0]?.value || '');
|
|
17
|
-
const [regionalIdentifier, setRegionalIdentifier] = useState(false);
|
|
18
16
|
useEffect(() => () => {
|
|
19
17
|
if (previewUrl.startsWith('blob:'))
|
|
20
18
|
URL.revokeObjectURL(previewUrl);
|
|
@@ -83,16 +81,14 @@ export function AnimalIdentityOnboardingV2({ copy, onSubmit, submitAction, speci
|
|
|
83
81
|
controllerIdentifierType: requiredText(form, 'controllerIdentifierType'),
|
|
84
82
|
controllerIdentifierValue: requiredText(form, 'controllerIdentifierValue'),
|
|
85
83
|
controllerCountry: requiredText(form, 'controllerCountry').toUpperCase(),
|
|
86
|
-
controllerKind,
|
|
84
|
+
controllerKind: requiredText(form, 'controllerKind'),
|
|
87
85
|
controllerRegion: optionalText(form, 'controllerRegion'),
|
|
88
86
|
controllerEmail,
|
|
89
87
|
controllerTelephone,
|
|
90
|
-
verificationMethod: requiredText(form, 'verificationMethod'),
|
|
91
88
|
relationship: requiredText(form, 'relationship'),
|
|
92
|
-
ownerDocument:
|
|
89
|
+
ownerDocument: optionalFile(formElement, 'ownerDocument'),
|
|
93
90
|
animalDocument: animalDocument || requiredFile(formElement, 'animalDocument'),
|
|
94
|
-
relationshipDocument:
|
|
95
|
-
controllerPin: requiredText(form, 'controllerPin'),
|
|
91
|
+
relationshipDocument: optionalFile(formElement, 'relationshipDocument'),
|
|
96
92
|
});
|
|
97
93
|
}
|
|
98
94
|
finally {
|
|
@@ -104,7 +100,17 @@ export function AnimalIdentityOnboardingV2({ copy, onSubmit, submitAction, speci
|
|
|
104
100
|
? _jsx("img", { src: previewUrl, alt: copy.animalPreview.replace('{name}', animalName || copy.animalName) })
|
|
105
101
|
: _jsx("span", { "aria-hidden": "true", children: "\uFF0B" }), _jsx("input", { name: "animalDocument", type: "file", accept: "image/jpeg,image/png", required: !animalDocument, "aria-label": copy.addAnimalPhoto, onChange: event => void previewAnimal(event.currentTarget.files?.[0]) })] }), previewUrl ? _jsx("button", { type: "button", className: "uhcp-animal-photo-remove", "aria-label": copy.removeAnimalPhoto, title: copy.removeAnimalPhoto, onClick: removeAnimalPhoto, children: "\u00D7" }) : null, _jsx("small", { children: copy.photoHelp }), photoError ? _jsx("p", { role: "alert", children: photoError }) : null] }), _jsxs("div", { className: "uhcp-animal-onboarding-fields", children: [_jsxs("label", { children: [copy.animalName, _jsx("input", { name: "animalName", required: true, maxLength: 80, value: animalName, onChange: event => setAnimalName(event.currentTarget.value) })] }), _jsxs("label", { children: [copy.taxonomyId, speciesOptions.length > 0
|
|
106
102
|
? _jsx("select", { name: "taxonomyId", required: true, defaultValue: speciesOptions[0]?.taxonomyId, children: speciesOptions.map(option => _jsx("option", { value: option.taxonomyId, children: option.label }, option.taxonomyId)) })
|
|
107
|
-
: _jsx("input", { name: "taxonomyId", required: true, inputMode: "numeric", pattern: "[1-9][0-9]{0,6}", defaultValue: "9615" })] }), _jsxs("label", { children: [copy.birthDate, _jsx("input", { name: "birthDate", type: "date" })] }), _jsxs("label", { children: [copy.sex, _jsxs("select", { name: "sex", defaultValue: "unknown", children: [_jsx("option", { value: "unknown", children: copy.sexUnknown }), _jsx("option", { value: "female", children: copy.sexFemale }), _jsx("option", { value: "male", children: copy.sexMale }), _jsx("option", { value: "other", children: copy.sexOther })] })] }), _jsxs("label", { children: [copy.identifierSystem, _jsxs("select", { name: "identifierSystem", defaultValue: "urn:iso:std:iso:11784:11785", children: [_jsx("option", { value: "urn:iso:std:iso:11784:11785", children: "ISO 11784/11785" }), _jsx("option", { value: "https://europa.eu/pet-passport", children: "EU pet passport" }), _jsx("option", { value: "https://vetchain.app/identifier/tattoo", children: "Tattoo" })] })] }), _jsxs("label", { children: [copy.identifierValue, _jsx("input", { name: "identifierValue", required: true, maxLength: 80, autoComplete: "off" })] })] })] })] }), _jsxs("details", { "aria-labelledby": "animal-onboarding-v2-controller-step", children: [_jsxs("summary", { id: "animal-onboarding-v2-controller-step", children: [_jsx(StepNumber, { value: 2 }), " ", copy.controllerStep] }),
|
|
103
|
+
: _jsx("input", { name: "taxonomyId", required: true, inputMode: "numeric", pattern: "[1-9][0-9]{0,6}", defaultValue: "9615" })] }), _jsxs("label", { children: [copy.birthDate, _jsx("input", { name: "birthDate", type: "date" })] }), _jsxs("label", { children: [copy.sex, _jsxs("select", { name: "sex", defaultValue: "unknown", children: [_jsx("option", { value: "unknown", children: copy.sexUnknown }), _jsx("option", { value: "female", children: copy.sexFemale }), _jsx("option", { value: "male", children: copy.sexMale }), _jsx("option", { value: "other", children: copy.sexOther })] })] }), _jsxs("label", { children: [copy.identifierSystem, _jsxs("select", { name: "identifierSystem", defaultValue: "urn:iso:std:iso:11784:11785", children: [_jsx("option", { value: "urn:iso:std:iso:11784:11785", children: "ISO 11784/11785" }), _jsx("option", { value: "https://europa.eu/pet-passport", children: "EU pet passport" }), _jsx("option", { value: "https://vetchain.app/identifier/tattoo", children: "Tattoo" })] })] }), _jsxs("label", { children: [copy.identifierValue, _jsx("input", { name: "identifierValue", required: true, maxLength: 80, autoComplete: "off" })] })] })] })] }), _jsxs("details", { "aria-labelledby": "animal-onboarding-v2-controller-step", children: [_jsxs("summary", { id: "animal-onboarding-v2-controller-step", children: [_jsx(StepNumber, { value: 2 }), " ", copy.controllerStep] }), _jsx(IdentityEntityEditorV2, { mode: "controller", showEvidence: false, countryOptions: countryOptions, regionOptionsByCountry: regionOptionsByCountry, identifierTypeOptions: identifierTypeOptions, contactError: contactError, requireEmail: requireEmail, requireTelephone: requireTelephone, copy: {
|
|
104
|
+
entityType: copy.ownerKind, personEntity: copy.personOwner, organizationEntity: copy.organizationOwner,
|
|
105
|
+
fullLegalName: copy.controllerLegalName, country: copy.controllerCountry, regionalIdentifier: copy.regionalIdentifier,
|
|
106
|
+
region: copy.controllerRegion, identifierType: copy.controllerIdentifierType, identifierValue: copy.controllerIdentifierValue,
|
|
107
|
+
email: copy.controllerEmail, telephone: copy.controllerTelephone, relationship: copy.relationship,
|
|
108
|
+
responsibleParty: copy.responsibleParty ?? copy.owner, evidence: copy.evidenceStep,
|
|
109
|
+
verificationMethod: copy.verificationMethod, physicalInPerson: copy.physicalInPerson,
|
|
110
|
+
supervisedRemote: copy.supervisedRemote, electronicId: copy.electronicId, unsupervisedRemote: copy.unsupervisedRemote,
|
|
111
|
+
identityDocument: copy.ownerDocument, relationshipDocument: copy.relationshipDocument,
|
|
112
|
+
countryPlaceholder: copy.countryPlaceholder, controllerConfirmation: copy.controllerIsLegalRepresentative,
|
|
113
|
+
} })] }), _jsx("button", { type: "submit", className: "uhcp-animal-onboarding-submit", "data-portal-action": submitAction, disabled: disabled, children: copy.submit })] })] });
|
|
108
114
|
}
|
|
109
115
|
function StepNumber({ value }) {
|
|
110
116
|
return _jsx("span", { className: "uhcp-identity-step-number", "aria-hidden": "true", children: value });
|
|
@@ -126,6 +132,11 @@ function requiredFile(form, name) {
|
|
|
126
132
|
throw new Error(`animal_identity_${name}_required`);
|
|
127
133
|
return value;
|
|
128
134
|
}
|
|
135
|
+
function optionalFile(form, name) {
|
|
136
|
+
const input = form.elements.namedItem(name);
|
|
137
|
+
const value = input instanceof HTMLInputElement ? input.files?.[0] : undefined;
|
|
138
|
+
return value && value.size > 0 ? value : undefined;
|
|
139
|
+
}
|
|
129
140
|
async function readImageDimensions(file) {
|
|
130
141
|
if (typeof createImageBitmap === 'function') {
|
|
131
142
|
const bitmap = await createImageBitmap(file);
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
export type IdentityEntitySelectOption = Readonly<{
|
|
2
|
+
value: string;
|
|
3
|
+
label: string;
|
|
4
|
+
}>;
|
|
5
|
+
export type IdentityEntityEditorV2Copy = Readonly<{
|
|
6
|
+
entityType: string;
|
|
7
|
+
personEntity: string;
|
|
8
|
+
organizationEntity: string;
|
|
9
|
+
fullLegalName: string;
|
|
10
|
+
country: string;
|
|
11
|
+
regionalIdentifier: string;
|
|
12
|
+
region: string;
|
|
13
|
+
identifierType: string;
|
|
14
|
+
identifierValue: string;
|
|
15
|
+
email: string;
|
|
16
|
+
telephone: string;
|
|
17
|
+
relationship: string;
|
|
18
|
+
responsibleParty: string;
|
|
19
|
+
evidence: string;
|
|
20
|
+
verificationMethod: string;
|
|
21
|
+
physicalInPerson: string;
|
|
22
|
+
supervisedRemote: string;
|
|
23
|
+
electronicId: string;
|
|
24
|
+
unsupervisedRemote: string;
|
|
25
|
+
identityDocument: string;
|
|
26
|
+
relationshipDocument: string;
|
|
27
|
+
pin?: string;
|
|
28
|
+
controllerConfirmation: string;
|
|
29
|
+
countryPlaceholder?: string;
|
|
30
|
+
}>;
|
|
31
|
+
/**
|
|
32
|
+
* Reusable identity-and-evidence editor for one controller or related entity.
|
|
33
|
+
* A controller has a fixed responsible-party relationship; related entities
|
|
34
|
+
* receive their host-governed relationship choices.
|
|
35
|
+
*/
|
|
36
|
+
export declare function IdentityEntityEditorV2({ copy, mode, countryOptions, regionOptionsByCountry, identifierTypeOptions, relationshipOptions, fieldPrefix, contactError, requireEmail, requireTelephone, showEvidence, }: Readonly<{
|
|
37
|
+
copy: IdentityEntityEditorV2Copy;
|
|
38
|
+
mode: 'controller' | 'related';
|
|
39
|
+
countryOptions?: readonly IdentityEntitySelectOption[];
|
|
40
|
+
regionOptionsByCountry?: Readonly<Record<string, readonly IdentityEntitySelectOption[]>>;
|
|
41
|
+
identifierTypeOptions?: Readonly<{
|
|
42
|
+
person: readonly IdentityEntitySelectOption[];
|
|
43
|
+
organization: readonly IdentityEntitySelectOption[];
|
|
44
|
+
}>;
|
|
45
|
+
relationshipOptions?: readonly IdentityEntitySelectOption[];
|
|
46
|
+
fieldPrefix?: string;
|
|
47
|
+
contactError?: string;
|
|
48
|
+
requireEmail?: boolean;
|
|
49
|
+
requireTelephone?: boolean;
|
|
50
|
+
showEvidence?: boolean;
|
|
51
|
+
}>): import("react").JSX.Element;
|
|
52
|
+
//# sourceMappingURL=IdentityEntityEditorV2.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"IdentityEntityEditorV2.d.ts","sourceRoot":"","sources":["../src/IdentityEntityEditorV2.tsx"],"names":[],"mappings":"AAEA,MAAM,MAAM,0BAA0B,GAAG,QAAQ,CAAC;IAAE,KAAK,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE,MAAM,CAAA;CAAE,CAAC,CAAA;AAEnF,MAAM,MAAM,0BAA0B,GAAG,QAAQ,CAAC;IAChD,UAAU,EAAE,MAAM,CAAA;IAClB,YAAY,EAAE,MAAM,CAAA;IACpB,kBAAkB,EAAE,MAAM,CAAA;IAC1B,aAAa,EAAE,MAAM,CAAA;IACrB,OAAO,EAAE,MAAM,CAAA;IACf,kBAAkB,EAAE,MAAM,CAAA;IAC1B,MAAM,EAAE,MAAM,CAAA;IACd,cAAc,EAAE,MAAM,CAAA;IACtB,eAAe,EAAE,MAAM,CAAA;IACvB,KAAK,EAAE,MAAM,CAAA;IACb,SAAS,EAAE,MAAM,CAAA;IACjB,YAAY,EAAE,MAAM,CAAA;IACpB,gBAAgB,EAAE,MAAM,CAAA;IACxB,QAAQ,EAAE,MAAM,CAAA;IAChB,kBAAkB,EAAE,MAAM,CAAA;IAC1B,gBAAgB,EAAE,M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"react/jsx-runtime";
|
|
2
|
+
import { useState } from 'react';
|
|
3
|
+
/**
|
|
4
|
+
* Reusable identity-and-evidence editor for one controller or related entity.
|
|
5
|
+
* A controller has a fixed responsible-party relationship; related entities
|
|
6
|
+
* receive their host-governed relationship choices.
|
|
7
|
+
*/
|
|
8
|
+
export function IdentityEntityEditorV2({ copy, mode, countryOptions = [], regionOptionsByCountry = {}, identifierTypeOptions, relationshipOptions = [], fieldPrefix = '', contactError, requireEmail = false, requireTelephone = false, showEvidence = true, }) {
|
|
9
|
+
const [entityType, setEntityType] = useState('person');
|
|
10
|
+
const [country, setCountry] = useState('');
|
|
11
|
+
const [regional, setRegional] = useState(false);
|
|
12
|
+
const regions = regionOptionsByCountry[country] ?? [];
|
|
13
|
+
const name = (value) => fieldPrefix ? `${fieldPrefix}.${value}` : value;
|
|
14
|
+
return _jsxs("div", { className: "uhcp-identity-entity-editor", children: [_jsxs("div", { className: "uhcp-identity-entity-heading-row", children: [_jsxs("fieldset", { className: "uhcp-animal-owner-kind", children: [_jsx("legend", { children: copy.entityType }), _jsxs("label", { children: [_jsx("input", { type: "radio", name: name('controllerKind'), value: "person", checked: entityType === 'person', onChange: () => setEntityType('person') }), " ", copy.personEntity] }), _jsxs("label", { children: [_jsx("input", { type: "radio", name: name('controllerKind'), value: "organization", checked: entityType === 'organization', onChange: () => setEntityType('organization') }), " ", copy.organizationEntity] })] }), _jsxs("div", { className: "uhcp-identity-entity-relationship", children: [_jsx("span", { children: copy.relationship }), mode === 'controller'
|
|
15
|
+
? _jsxs(_Fragment, { children: [_jsx("strong", { children: copy.responsibleParty }), _jsx("input", { type: "hidden", name: name('relationship'), value: "owner" })] })
|
|
16
|
+
: _jsx("select", { name: name('relationship'), "aria-label": copy.relationship, required: true, defaultValue: relationshipOptions[0]?.value, children: relationshipOptions.map(option => _jsx("option", { value: option.value, children: option.label }, option.value)) })] })] }), _jsxs("div", { className: "uhcp-animal-onboarding-fields", children: [_jsxs("label", { className: "uhcp-animal-owner-name", children: [copy.fullLegalName, _jsx("input", { name: name('controllerLegalName'), required: true, maxLength: 160, autoComplete: entityType === 'person' ? 'name' : 'organization' })] }), _jsxs("label", { children: [copy.country, countryOptions.length ? _jsxs("select", { name: name('controllerCountry'), required: true, value: country, onChange: event => setCountry(event.currentTarget.value), children: [_jsx("option", { value: "", disabled: true, children: copy.countryPlaceholder ?? copy.country }), countryOptions.map(option => _jsx("option", { value: option.value, children: option.label }, option.value))] }) : _jsx("input", { name: name('controllerCountry'), required: true, pattern: "[A-Za-z]{2}", maxLength: 2, autoComplete: "country", onChange: event => setCountry(event.currentTarget.value.toUpperCase()) })] }), _jsxs("label", { className: "uhcp-animal-regional-identifier", children: [_jsx("input", { type: "checkbox", checked: regional, disabled: !regions.length, onChange: event => setRegional(event.currentTarget.checked) }), " ", copy.regionalIdentifier] }), _jsxs("label", { children: [copy.region, _jsxs("select", { name: name('controllerRegion'), required: regional, disabled: !regional, children: [_jsx("option", { value: "" }), regions.map(option => _jsx("option", { value: option.value, children: option.label }, option.value))] })] }), _jsxs("label", { children: [copy.identifierType, identifierTypeOptions ? _jsx("select", { name: name('controllerIdentifierType'), required: true, children: identifierTypeOptions[entityType].map(option => _jsx("option", { value: option.value, children: option.label }, option.value)) }, entityType) : _jsx("input", { name: name('controllerIdentifierType'), required: true, defaultValue: "national_identity_card", maxLength: 80 })] }), _jsxs("label", { children: [copy.identifierValue, _jsx("input", { name: name('controllerIdentifierValue'), required: true, maxLength: 120, autoComplete: "off" })] }), _jsxs("label", { className: "uhcp-identity-entity-contact-wide", children: [copy.email, _jsx("input", { name: name('controllerEmail'), type: "email", autoComplete: "email", required: requireEmail })] }), _jsxs("label", { children: [copy.telephone, _jsx("input", { name: name('controllerTelephone'), type: "tel", autoComplete: "tel", required: requireTelephone })] }), mode === 'controller' ? _jsxs("label", { className: "uhcp-animal-controller-confirmation", children: [_jsx("input", { type: "checkbox", checked: true, disabled: true, readOnly: true, "aria-disabled": "true" }), " ", copy.controllerConfirmation] }) : null, contactError ? _jsx("p", { role: "alert", children: contactError }) : null] }), showEvidence ? _jsxs("fieldset", { className: "uhcp-identity-entity-evidence", children: [_jsx("legend", { children: copy.evidence }), _jsxs("div", { className: "uhcp-animal-onboarding-fields", children: [_jsxs("label", { children: [copy.verificationMethod, _jsxs("select", { name: name('verificationMethod'), defaultValue: "pipp", children: [_jsx("option", { value: "pipp", children: copy.physicalInPerson }), _jsx("option", { value: "sripp", children: copy.supervisedRemote }), _jsx("option", { value: "eid", children: copy.electronicId }), _jsx("option", { value: "uripp", children: copy.unsupervisedRemote })] })] }), _jsxs("label", { children: [copy.identityDocument, _jsx("input", { name: name('ownerDocument'), type: "file", accept: "application/pdf,image/jpeg,image/png" })] }), _jsxs("label", { children: [copy.relationshipDocument, _jsx("input", { name: name('relationshipDocument'), type: "file", accept: "application/pdf,image/jpeg,image/png" })] })] })] }) : null] });
|
|
17
|
+
}
|
package/dist/index.d.ts
CHANGED
|
@@ -38,6 +38,7 @@ export * from './IdentityEvidenceDocumentPanel.js';
|
|
|
38
38
|
export * from './IdentityEvidenceDeclarationForm.js';
|
|
39
39
|
export * from './AnimalIdentityOnboarding.js';
|
|
40
40
|
export * from './AnimalIdentityOnboardingV2.js';
|
|
41
|
+
export * from './IdentityEntityEditorV2.js';
|
|
41
42
|
export * from './AnimalCardArtifact.js';
|
|
42
43
|
export * from './AnimalControllerAttestationPanel.js';
|
|
43
44
|
export * from './EmergencyTaskHub.js';
|
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;AAC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;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,6BAA6B,CAAA;AAC3C,cAAc,yBAAyB,CAAA;AACvC,cAAc,uCAAuC,CAAA;AACrD,cAAc,uBAAuB,CAAA;AACrC,cAAc,iCAAiC,CAAA;AAC/C,cAAc,8BAA8B,CAAA"}
|
package/dist/index.js
CHANGED
|
@@ -38,6 +38,7 @@ export * from './IdentityEvidenceDocumentPanel.js';
|
|
|
38
38
|
export * from './IdentityEvidenceDeclarationForm.js';
|
|
39
39
|
export * from './AnimalIdentityOnboarding.js';
|
|
40
40
|
export * from './AnimalIdentityOnboardingV2.js';
|
|
41
|
+
export * from './IdentityEntityEditorV2.js';
|
|
41
42
|
export * from './AnimalCardArtifact.js';
|
|
42
43
|
export * from './AnimalControllerAttestationPanel.js';
|
|
43
44
|
export * from './EmergencyTaskHub.js';
|
package/dist/styles.css
CHANGED
|
@@ -782,7 +782,8 @@ html[data-theme='dark'] .uhcp-brand-artwork-dark { display: block !important; }
|
|
|
782
782
|
.uhcp-animal-onboarding-v2 summary::after { content:'⌄'; margin-inline-start:auto; transition:transform .18s ease; }
|
|
783
783
|
.uhcp-animal-onboarding-v2 details[open] summary::after { transform:rotate(180deg); }
|
|
784
784
|
.uhcp-animal-onboarding-v2 details > .uhcp-animal-onboarding-fields,
|
|
785
|
-
.uhcp-animal-onboarding-v2 details > .uhcp-animal-onboarding-primary
|
|
785
|
+
.uhcp-animal-onboarding-v2 details > .uhcp-animal-onboarding-primary,
|
|
786
|
+
.uhcp-animal-onboarding-v2 details > .uhcp-identity-entity-editor { border-top:1px solid var(--uhcp-border, #d9dee7); padding:1rem; }
|
|
786
787
|
.uhcp-animal-onboarding-primary { align-items:start; display:grid; gap:1rem; grid-template-columns:minmax(10rem, 14rem) minmax(0, 1fr); }
|
|
787
788
|
.uhcp-animal-photo { display:grid; gap:.45rem; position:relative; }
|
|
788
789
|
.uhcp-animal-photo-dropzone { align-items:center; aspect-ratio:1; background:var(--uhcp-accent-soft, #e9f3ff); border:2px dashed color-mix(in srgb, var(--uhcp-turquoise, #1597a6) 58%, var(--uhcp-border, #d9dee7)); border-radius:1.25rem; cursor:pointer; display:flex; font-size:4rem; font-weight:850; justify-content:center; overflow:hidden; width:100%; }
|
|
@@ -794,10 +795,18 @@ html[data-theme='dark'] .uhcp-brand-artwork-dark { display: block !important; }
|
|
|
794
795
|
.uhcp-animal-owner-kind { border:0!important; display:flex; gap:1rem; grid-column:1/-1; padding:0!important; }
|
|
795
796
|
.uhcp-animal-owner-kind label,.uhcp-animal-regional-identifier { align-items:center; display:flex!important; gap:.45rem; }
|
|
796
797
|
.uhcp-animal-owner-kind input,.uhcp-animal-regional-identifier input { min-height:auto!important; width:auto!important; }
|
|
798
|
+
.uhcp-identity-entity-editor { display:grid; gap:1rem; }
|
|
799
|
+
.uhcp-identity-entity-heading-row { align-items:stretch; display:grid; gap:1rem; grid-template-columns:minmax(0,1fr) minmax(12rem,.7fr); }
|
|
800
|
+
.uhcp-identity-entity-relationship { align-content:center; background:var(--uhcp-panel-muted, #f4f7fa); border:1px solid var(--uhcp-border, #d9dee7); border-radius:1rem; display:grid; gap:.35rem; padding:1rem; }
|
|
801
|
+
.uhcp-identity-entity-relationship span { color:var(--uhcp-muted, #5f6875); font-size:.85rem; font-weight:750; }
|
|
802
|
+
.uhcp-identity-entity-editor input,.uhcp-identity-entity-editor select { background:var(--uhcp-panel); border:1px solid var(--uhcp-border); border-radius:.75rem; color:var(--uhcp-text); font:inherit; padding:.7rem .8rem; }
|
|
803
|
+
.uhcp-identity-entity-evidence { background:var(--uhcp-panel-muted); border:1px solid var(--uhcp-border); border-radius:1rem; color:var(--uhcp-text); margin:0; padding:1rem; }
|
|
804
|
+
.uhcp-identity-entity-evidence legend { color:var(--uhcp-text); font-weight:800; padding:0 .35rem; }
|
|
805
|
+
.uhcp-identity-entity-contact-wide,.uhcp-animal-controller-confirmation { grid-column:1/-1; }
|
|
797
806
|
.uhcp-animal-owner-name { grid-column:1/-1; }
|
|
798
|
-
.uhcp-animal-controller-confirmation { align-items:center; background:var(--uhcp-
|
|
799
|
-
.uhcp-animal-controller-confirmation input { min-height:auto
|
|
800
|
-
@media (max-width: 42rem) { .uhcp-animal-onboarding-primary { grid-template-columns:1fr; } .uhcp-animal-photo { justify-self:center; max-width:15rem; width:100%; } }
|
|
807
|
+
.uhcp-animal-controller-confirmation { align-items:center; background:color-mix(in srgb,var(--uhcp-turquoise) 12%,var(--uhcp-panel)); border:1px solid color-mix(in srgb,var(--uhcp-turquoise) 30%,var(--uhcp-border)); border-radius:.75rem; color:var(--uhcp-text); display:flex!important; padding:.75rem; }
|
|
808
|
+
.uhcp-animal-controller-confirmation input { accent-color:var(--uhcp-turquoise); min-height:auto!important; width:auto!important; }
|
|
809
|
+
@media (max-width: 42rem) { .uhcp-animal-onboarding-primary,.uhcp-identity-entity-heading-row { grid-template-columns:1fr; } .uhcp-animal-photo { justify-self:center; max-width:15rem; width:100%; } }
|
|
801
810
|
.uhcp-animal-card { aspect-ratio: 1.586; background: linear-gradient(145deg, #0a4169 0%, #087f8d 60%, #18a4a6 100%); border: 1px solid color-mix(in srgb, #fff 32%, transparent); border-radius: 1.15rem; box-shadow: 0 1rem 2.5rem rgb(2 30 51 / 22%); box-sizing: border-box; color: #fff; display: grid; gap: .8rem; grid-template-rows: auto 1fr auto; max-width: 33.5rem; min-height: 18.25rem; overflow: hidden; padding: 1.25rem; position: relative; width: 100%; }
|
|
802
811
|
.uhcp-animal-card::after { background: radial-gradient(circle, rgb(255 255 255 / 18%), transparent 68%); content: ''; height: 18rem; inset: -8rem -7rem auto auto; pointer-events: none; position: absolute; width: 18rem; }
|
|
803
812
|
.uhcp-animal-card-header, .uhcp-animal-card-body, .uhcp-animal-card-brand { align-items: center; display: flex; }
|
|
@@ -835,6 +844,8 @@ html[data-theme='dark'] .uhcp-brand-artwork-dark { display: block !important; }
|
|
|
835
844
|
.uhcp-emergency-task-hub > header h1 { font-size: clamp(1.35rem, 3vw, 1.9rem); margin: 0; }
|
|
836
845
|
.uhcp-subject-identity-card { border: 1px solid var(--uhcp-border, #d9dee7); border-radius: 1rem; display: grid; gap: 1rem; padding: 1rem; }
|
|
837
846
|
.uhcp-subject-identity-card > header { align-items: center; display: grid; gap: .8rem; grid-template-columns: auto 1fr auto; }
|
|
847
|
+
.uhcp-subject-identity-edit { align-items: center; background: var(--uhcp-action-soft, #e8f3ff); border: 1px solid var(--uhcp-action-end, #2563a9); border-radius: 50%; color: var(--uhcp-action-end, #2563a9); cursor: pointer; display: inline-flex; font: inherit; font-size: 1.25rem; height: 2.75rem; justify-content: center; width: 2.75rem; }
|
|
848
|
+
.uhcp-subject-identity-edit:hover, .uhcp-subject-identity-edit:focus-visible { background: var(--uhcp-action-end, #2563a9); color: #fff; }
|
|
838
849
|
.uhcp-subject-identity-card img, .uhcp-subject-identity-avatar { align-items: center; aspect-ratio: 1; border-radius: 50%; display: flex; height: 3.5rem; justify-content: center; object-fit: cover; width: 3.5rem; }
|
|
839
850
|
.uhcp-current-subject { margin-inline-start:auto; position:relative; }
|
|
840
851
|
.uhcp-current-subject-trigger { align-items:center; background:var(--uhcp-surface, #fff); border:1px solid var(--uhcp-border, #d8e0e8); border-radius:999px; color:inherit; cursor:pointer; display:flex; gap:.55rem; min-height:2.75rem; padding:.3rem .7rem .3rem .3rem; }
|
package/package.json
CHANGED