uhc-portal-components-react 0.2.11 → 0.2.12

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
@@ -1,5 +1,14 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.2.12 - 2026-10-11
4
+
5
+ - Show the animal portrait and optional public legal-organization owner data,
6
+ including jurisdiction, legal identifier, official address, telephone,
7
+ email and public-profile provenance, in the shared read-only identity view.
8
+ - Keep per-resource credential content inside its owning clinical draft entry.
9
+ - Place the constructive V2 editor action first with the shared green action
10
+ treatment and keep cancellation visually distinct.
11
+
3
12
  ## 0.2.11 - 2026-10-11
4
13
 
5
14
  - Add a reusable read-only identity projection matching the progressive
@@ -9,14 +9,29 @@ export type AnimalIdentityDetailsV2Copy = Readonly<{
9
9
  controllerName: string;
10
10
  relationship: string;
11
11
  edit?: string;
12
+ jurisdiction?: string;
13
+ legalIdentifier?: string;
14
+ officialAddress?: string;
15
+ telephone?: string;
16
+ email?: string;
17
+ source?: string;
12
18
  }>;
13
19
  export type AnimalIdentityDetailsV2Value = Readonly<{
14
20
  animalName: string;
15
21
  species: string;
16
22
  identifierType: string;
17
23
  identifierValue: string;
24
+ animalPhotoUrl?: string;
25
+ animalPhotoAlt?: string;
18
26
  controllerName: string;
19
27
  relationship: string;
28
+ controllerKind?: 'person' | 'organization';
29
+ controllerJurisdiction?: string;
30
+ controllerIdentifier?: string;
31
+ controllerOfficialAddress?: string;
32
+ controllerTelephone?: string;
33
+ controllerEmail?: string;
34
+ controllerSource?: string;
20
35
  }>;
21
36
  /** Read-only counterpart of AnimalIdentityOnboardingV2 using the same progressive sections. */
22
37
  export declare function AnimalIdentityDetailsV2({ copy, value, onEdit, actions }: Readonly<{
@@ -1 +1 @@
1
- {"version":3,"file":"AnimalIdentityDetailsV2.d.ts","sourceRoot":"","sources":["../src/AnimalIdentityDetailsV2.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,SAAS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E,CAAC,+BAMjM"}
@@ -1,7 +1,8 @@
1
- import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
1
+ import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
2
2
  /** Read-only counterpart of AnimalIdentityOnboardingV2 using the same progressive sections. */
3
3
  export function AnimalIdentityDetailsV2({ copy, value, onEdit, actions }) {
4
- return _jsxs("section", { className: "uhcp-animal-onboarding uhcp-animal-onboarding-v2 uhcp-animal-identity-details-v2", children: [_jsxs("details", { children: [_jsxs("summary", { children: [_jsx(StepNumber, { value: 1 }), " ", copy.animalStep] }), _jsxs("dl", { className: "uhcp-animal-identity-readonly-grid", children: [_jsx(Fact, { label: copy.animalName, value: value.animalName }), _jsx(Fact, { label: copy.species, value: value.species }), _jsx(Fact, { label: copy.identifierType, value: value.identifierType }), _jsx(Fact, { label: copy.identifierValue, value: value.identifierValue })] })] }), _jsxs("details", { children: [_jsxs("summary", { children: [_jsx(StepNumber, { value: 2 }), " ", copy.controllerStep] }), _jsxs("dl", { className: "uhcp-animal-identity-readonly-grid", children: [_jsx(Fact, { label: copy.controllerName, value: value.controllerName }), _jsx(Fact, { label: copy.relationship, value: value.relationship })] })] }), onEdit || actions ? _jsxs("div", { className: "uhcp-animal-onboarding-actions", children: [actions, onEdit ? _jsx("button", { type: "button", onClick: onEdit, "aria-label": copy.edit, title: copy.edit, children: copy.edit }) : null] }) : null] });
4
+ return _jsxs("section", { className: "uhcp-animal-onboarding uhcp-animal-onboarding-v2 uhcp-animal-identity-details-v2", children: [_jsxs("details", { children: [_jsxs("summary", { children: [_jsx(StepNumber, { value: 1 }), " ", copy.animalStep] }), _jsxs("div", { className: "uhcp-animal-identity-readonly", children: [_jsx(_Fragment, { children: value.animalPhotoUrl ? _jsx("img", { className: "uhcp-animal-identity-photo", src: value.animalPhotoUrl, alt: value.animalPhotoAlt ?? value.animalName }) : null }), _jsxs("dl", { className: "uhcp-animal-identity-readonly-grid", children: [_jsx(Fact, { label: copy.animalName, value: value.animalName }), _jsx(Fact, { label: copy.species, value: value.species }), _jsx(Fact, { label: copy.identifierType, value: value.identifierType }), _jsx(Fact, { label: copy.identifierValue, value: value.identifierValue })] })] })] }), _jsxs("details", { children: [_jsxs("summary", { children: [_jsx(StepNumber, { value: 2 }), " ", copy.controllerStep] }), _jsxs("dl", { className: "uhcp-animal-identity-readonly-grid", children: [_jsx(Fact, { label: copy.controllerName, value: value.controllerName }), _jsx(Fact, { label: copy.relationship, value: value.relationship }), _jsx(OptionalFact, { label: copy.jurisdiction, value: value.controllerJurisdiction }), _jsx(OptionalFact, { label: copy.legalIdentifier, value: value.controllerIdentifier }), _jsx(OptionalFact, { label: copy.officialAddress, value: value.controllerOfficialAddress }), _jsx(OptionalFact, { label: copy.telephone, value: value.controllerTelephone }), _jsx(OptionalFact, { label: copy.email, value: value.controllerEmail }), _jsx(OptionalFact, { label: copy.source, value: value.controllerSource })] })] }), onEdit || actions ? _jsxs("div", { className: "uhcp-animal-onboarding-actions", children: [actions, onEdit ? _jsx("button", { type: "button", onClick: onEdit, "aria-label": copy.edit, title: copy.edit, children: copy.edit }) : null] }) : null] });
5
5
  }
6
6
  function StepNumber({ value }) { return _jsx("span", { className: "uhcp-identity-step-number", "aria-hidden": "true", children: value }); }
7
7
  function Fact({ label, value }) { return _jsxs("div", { children: [_jsx("dt", { children: label }), _jsx("dd", { children: value })] }); }
8
+ function OptionalFact({ label, value }) { return label && value ? _jsx(Fact, { label: label, value: value }) : null; }
@@ -59,7 +59,7 @@ export function ClinicalArtifactEditorV2({ request, authoringContext, copy, fiel
59
59
  delete next[field.codeClaim]; if (field.displayClaim)
60
60
  delete next[field.displayClaim]; return next; }); }, children: "\u00D7" }) : null, field.kind === 'documents' ? _jsx(DocumentReferencesPropertyV2, { copy: copy, attachments: attachments, onFiles: files => { void Promise.all(files.map(readClinicalAttachment)).then(next => setAttachments(current => [...current, ...next])).catch(reason => setError(reason instanceof Error ? reason.message : String(reason))); }, onRemove: id => setAttachments(current => current.filter(attachment => attachment.id !== id)) })
61
61
  : _jsx(ClinicalProperty, { field: field, label: fieldLabel(field.claim), resourceType: request.resourceType, value: claims[field.claim] ?? '', claims: claims, locale: locale, timeZone: timeZone, taxonomyId: taxonomyId, copy: copy, update: update, searchTerminology: searchTerminology, loadTerminologySources: loadTerminologySources })] }, field.claim)), _jsx(OptionalFieldsV2, { label: copy.addField, choose: copy.chooseField, add: copy.addSelectedField, options: optional, value: selectedOptional, onValueChange: setSelectedOptional, onAdd: () => { if (!selectedOptional)
62
- return; setVisibleClaims(current => [...current, selectedOptional]); setSelectedOptional(''); } }), error ? _jsx("p", { className: "uhcp-clinical-editor-error", role: "alert", children: error }) : null, _jsxs("footer", { children: [_jsx("button", { type: "button", onClick: onCancel, children: copy.cancel }), _jsx("button", { type: "submit", disabled: saving, children: saving ? copy.saving : copy.save })] })] })] }) });
62
+ return; setVisibleClaims(current => [...current, selectedOptional]); setSelectedOptional(''); } }), error ? _jsx("p", { className: "uhcp-clinical-editor-error", role: "alert", children: error }) : null, _jsxs("footer", { children: [_jsx("button", { className: "uhcp-clinical-editor-submit", type: "submit", disabled: saving, children: saving ? copy.saving : copy.save }), _jsx("button", { className: "uhcp-clinical-editor-cancel", type: "button", onClick: onCancel, children: copy.cancel })] })] })] }) });
63
63
  }
64
64
  function ClinicalProperty({ field, label, resourceType, value, claims, locale, timeZone, taxonomyId, copy, update, searchTerminology, loadTerminologySources }) {
65
65
  if (field.kind === 'date-time')
@@ -74,6 +74,11 @@ export type ClinicalBundleDraftEditorProps = Readonly<{
74
74
  draft: ClinicalArtifactDraftV2;
75
75
  bundle: ClinicalBundleDraft;
76
76
  }>) => void;
77
+ /** Renders the created credential inside its owning clinical entry. */
78
+ renderCreated?: (input: Readonly<{
79
+ draft: ClinicalArtifactDraftV2;
80
+ bundle: ClinicalBundleDraft;
81
+ }>) => ReactNode;
77
82
  }>;
78
83
  /** Host-owned document actions rendered beside the final submit action. */
79
84
  documentActions?: ReactNode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,EAAE,mBAAmB,CAAA;SAAE,CAAC,KAAK,SAAS,CAAA;KAChH,CAAC,CAAA;IACF,2EAA2E;IAC3E,eAAe,CAAC,EAAE,SAAS,CAAA;CAC5B,CAAC,CAAA;AAEF,KAAK,cAAc,GAAG,QAAQ,CAAC;IAC7B,MAAM,EAAE,yBAAyB,CAAA;IACjC,KAAK,EAAE,qBAAqB,CAAA;CAC7B,CAAC,CAAA;AAYF;;;;;;GAMG;AACH,wBAAgB,yBAAyB,CAAC,EACxC,OAAO,EACP,gBAAgB,EAChB,IAAI,EACJ,MAAa,EACb,QAAQ,EACR,UAAU,EACV,UAAU,EACV,iBAAiB,EACjB,iBAAiB,EACjB,sBAAsB,EACtB,aAAa,EACb,aAAa,EACb,aAAa,EACb,aAAoB,EACpB,YAAY,EACZ,wBAAwB,EACxB,eAAe,GAChB,EAAE,8BAA8B,+BA4KhC;AAWD,wBAAgB,qBAAqB,CACnC,SAAS,EAAE,SAAS,cAAc,EAAE,EACpC,gBAAgB,EAAE,gCAAgC,EAClD,aAAa,EAAE,MAAM,GACpB,mBAAmB,CAsDrB;AAED,MAAM,MAAM,gCAAgC,GAAG,IAAI,CAAC,8BAA8B,EAAE,eAAe,GAAG,cAAc,CAAC,GAAG,QAAQ,CAAC;IAC/H,YAAY,EAAE,gCAAgC,CAAA;CAC/C,CAAC,CAAA;AAEF,kFAAkF;AAClF,wBAAgB,2BAA2B,CAAC,KAAK,EAAE,gCAAgC,+BAElF"}
@@ -27,6 +27,7 @@ import { SchemaClinicalArtifactEditorV2 } from './SchemaClinicalArtifactEditorV2
27
27
  export function ClinicalBundleDraftEditor({ schemas, authoringContext, copy, locale = 'en', timeZone, taxonomyId, fieldLabel, resourceTypeLabel, searchTerminology, loadTerminologySources, initialBundle, onDraftChange, onSubmitDraft, editorVersion = 'v1', editorV2Copy, artifactCredentialAction, documentActions, }) {
28
28
  const [artifacts, setArtifacts] = useState(() => importedArtifacts(initialBundle, schemas));
29
29
  const [editor, setEditor] = useState();
30
+ const [expandedCredentialId, setExpandedCredentialId] = useState();
30
31
  const [resourceChooser, setResourceChooser] = useState();
31
32
  const [notice, setNotice] = useState('');
32
33
  const [error, setError] = useState('');
@@ -104,17 +105,23 @@ export function ClinicalBundleDraftEditor({ schemas, authoringContext, copy, loc
104
105
  setResourceChooser(undefined);
105
106
  }, children: copy.chooseResource || copy.add })] }) : null, sectionArtifacts.length === 0 ? _jsx("p", { children: copy.empty }) : _jsx("ul", { children: sectionArtifacts.map((artifact) => {
106
107
  const title = artifactTitle(artifact.draft);
108
+ const credentialDraft = artifact.draft;
109
+ const credentialBundle = combineClinicalDrafts([artifact], authoringContext, copy.title);
107
110
  return _jsxs("li", { children: [_jsxs("span", { children: [_jsx("strong", { children: title }), _jsx("small", { children: artifact.draft.resourceType })] }), _jsxs("span", { children: [artifactCredentialAction ? _jsx("button", { type: "button", className: "uhcp-clinical-entry-credential-action", onClick: () => {
108
- const draft = artifact.draft;
109
- const bundle = combineClinicalDrafts([artifact], authoringContext, copy.title);
111
+ const draft = credentialDraft;
112
+ const bundle = credentialBundle;
110
113
  if (artifactCredentialAction.isCreated(draft)) {
111
114
  artifactCredentialAction.onView({ draft, bundle });
115
+ setExpandedCredentialId(current => current === draft.id ? undefined : draft.id);
112
116
  return;
113
117
  }
114
118
  void Promise.resolve(artifactCredentialAction.onCreate({ draft, bundle })).then(nextDraft => {
115
119
  setArtifacts(current => current.map(candidate => candidate.draft.id === draft.id ? { ...candidate, draft: nextDraft } : candidate));
120
+ setExpandedCredentialId(nextDraft.id);
116
121
  }).catch(reason => setError(reason instanceof Error ? reason.message : String(reason)));
117
- }, children: artifactCredentialAction.isCreated(artifact.draft) ? artifactCredentialAction.viewLabel : artifactCredentialAction.createLabel }) : null, _jsx(ClinicalActionButton, { kind: "edit", label: `${copy.edit} ${title}`, onClick: () => setEditor({ schema: artifact.schema, draft: artifact.draft }) }), _jsx(ClinicalActionButton, { kind: "delete", label: `${copy.remove} ${title}`, onClick: () => setArtifacts((current) => current.filter((candidate) => candidate.draft.id !== artifact.draft.id)) })] })] }, artifact.draft.id);
122
+ }, children: artifactCredentialAction.isCreated(credentialDraft) ? artifactCredentialAction.viewLabel : artifactCredentialAction.createLabel }) : null, _jsx(ClinicalActionButton, { kind: "edit", label: `${copy.edit} ${title}`, onClick: () => setEditor({ schema: artifact.schema, draft: artifact.draft }) }), _jsx(ClinicalActionButton, { kind: "delete", label: `${copy.remove} ${title}`, onClick: () => setArtifacts((current) => current.filter((candidate) => candidate.draft.id !== artifact.draft.id)) })] }), artifactCredentialAction?.renderCreated && artifactCredentialAction.isCreated(credentialDraft) && expandedCredentialId === credentialDraft.id
123
+ ? _jsx("div", { className: "uhcp-clinical-entry-credential-panel", children: artifactCredentialAction.renderCreated({ draft: credentialDraft, bundle: credentialBundle }) })
124
+ : null] }, artifact.draft.id);
118
125
  }) })] }, label);
119
126
  }), activeSections.length === 0 ? _jsx("p", { children: copy.empty }) : null, _jsxs("footer", { "data-testid": "clinical-document-actions", children: [documentActions ? _jsx("div", { className: "uhcp-clinical-document-secondary-actions", children: documentActions }) : null, _jsx("button", { type: "button", className: "uhcp-clinical-document-submit", disabled: artifacts.length === 0 || submitting, onClick: () => void submitDraft(), children: submitting ? copy.submitting : copy.submit })] }), editor && editorVersion === 'v2' && editor.schema.schema.resourceType === 'Immunization' && editorV2Copy ? _jsx(ImmunizationArtifactEditorV2, { request: editorRequest(editor), authoringContext: authoringContext, copy: editorV2Copy, locale: locale, timeZone: timeZone, taxonomyId: taxonomyId, fieldLabel: fieldLabel, resourceTypeLabel: resourceTypeLabel?.(editor.schema.schema.resourceType) || editor.schema.artifactLabel, searchTerminology: searchTerminology, loadTerminologySources: loadTerminologySources, saveArtifact: async (draft) => stageArtifact(draft), onCancel: () => setEditor(undefined), onReadback: () => setEditor(undefined) }) : editor && editorVersion === 'v2' && editorV2Copy ? _jsx(SchemaClinicalArtifactEditorV2, { request: editorRequest(editor), schema: editor.schema.schema, authoringContext: authoringContext, copy: editorV2Copy, locale: locale, timeZone: timeZone, taxonomyId: taxonomyId, fieldLabel: fieldLabel, resourceTypeLabel: resourceTypeLabel?.(editor.schema.schema.resourceType) || editor.schema.artifactLabel, searchTerminology: searchTerminology, loadTerminologySources: loadTerminologySources, saveArtifact: async (draft) => stageArtifact(draft), onCancel: () => setEditor(undefined), onReadback: () => setEditor(undefined) }) : editor ? _jsx(ClinicalArtifactEditor, { request: editorRequest(editor), schema: editor.schema.schema, operationSchema: editor.schema.operationSchema, authoringContext: authoringContext, copy: copy.editor, locale: locale, timeZone: timeZone, taxonomyId: taxonomyId, fieldLabel: fieldLabel, resourceTypeLabel: resourceTypeLabel?.(editor.schema.schema.resourceType) || editor.schema.artifactLabel, searchTerminology: searchTerminology, loadTerminologySources: loadTerminologySources, saveArtifact: async (draft) => stageArtifact(draft), onCancel: () => setEditor(undefined), onReadback: () => setEditor(undefined) }) : null] });
120
127
  }
package/dist/styles.css CHANGED
@@ -229,7 +229,12 @@ html[data-theme='dark'] .uhcp-brand-artwork-dark { display: block !important; }
229
229
  .uhcp-clinical-editor-wide,.uhcp-clinical-editor-error,.uhcp-clinical-editor footer { grid-column:1/-1; }
230
230
  .uhcp-clinical-editor footer { background:var(--uhcp-panel); bottom:0; display:flex; gap:.75rem; justify-content:flex-end; padding:.75rem 0; position:sticky; z-index:2; }
231
231
  .uhcp-clinical-editor footer button,.uhcp-terminology-results button { border:1px solid var(--uhcp-border); border-radius:.7rem; cursor:pointer; font:inherit; padding:.7rem 1rem; }
232
- .uhcp-clinical-editor footer button[type=submit] { background:linear-gradient(135deg,var(--uhcp-action-start),var(--uhcp-action-end)); color:#fff; font-weight:800; }
232
+ .uhcp-clinical-editor footer .uhcp-clinical-editor-submit { background:linear-gradient(135deg,color-mix(in srgb,var(--uhcp-emerald) 90%,#fff),var(--uhcp-emerald)); border-color:var(--uhcp-emerald); color:#fff; font-weight:800; }
233
+ .uhcp-clinical-editor footer .uhcp-clinical-editor-cancel { background:color-mix(in srgb,#b42318 12%,var(--uhcp-panel)); border-color:color-mix(in srgb,#b42318 52%,var(--uhcp-border)); color:color-mix(in srgb,#b42318 84%,var(--uhcp-text)); }
234
+ .uhcp-clinical-entry-credential-panel { background:var(--uhcp-panel); border:1px solid var(--uhcp-border); border-radius:.85rem; grid-column:1/-1; margin-top:.75rem; padding:1rem; width:100%; }
235
+ .uhcp-animal-identity-readonly { align-items:start; display:grid; gap:1rem; grid-template-columns:minmax(8rem,12rem) minmax(0,1fr); }
236
+ .uhcp-animal-identity-photo { aspect-ratio:3/4; border:1px solid var(--uhcp-border); border-radius:1rem; display:block; object-fit:cover; width:100%; }
237
+ @media (max-width:620px) { .uhcp-animal-identity-readonly { grid-template-columns:minmax(0,1fr); } .uhcp-animal-identity-photo { max-width:12rem; } }
233
238
  .uhcp-clinical-editor-error { color:#b42318; font-weight:700; }
234
239
  .uhcp-emergency-contact-directory>header { align-items:center; display:flex; gap:1rem; justify-content:space-between; }
235
240
  .uhcp-emergency-contact-directory>ul { display:grid; gap:.75rem; list-style:none; margin:1rem 0; padding:0; }
@@ -552,7 +557,7 @@ html[data-theme='dark'] .uhcp-brand-artwork-dark { display: block !important; }
552
557
  .uhcp-clinical-bundle-draft .uhcp-add-entry-button { background:var(--uhcp-emerald); border:0; border-radius:.65rem; color:#fff; cursor:pointer; font-size:1.3rem; font-weight:900; height:2.5rem; margin-top:.65rem; width:2.5rem; }
553
558
  .uhcp-clinical-bundle-draft .uhcp-remove-section-button { background:color-mix(in srgb,#c64747 12%,var(--uhcp-panel)); border:1px solid color-mix(in srgb,#c64747 42%,var(--uhcp-border)); border-radius:.6rem; color:#a72f2f; cursor:pointer; font-size:1.25rem; font-weight:900; height:2.25rem; position:absolute; right:.7rem; top:.55rem; width:2.25rem; }
554
559
  .uhcp-clinical-bundle-draft ul { display:grid; gap:.55rem; list-style:none; margin:.8rem 0 0; padding:0; }
555
- .uhcp-clinical-bundle-draft li { align-items:center; background:var(--uhcp-panel); border:1px solid var(--uhcp-border); border-radius:.8rem; display:flex; gap:1rem; justify-content:space-between; padding:.7rem; }
560
+ .uhcp-clinical-bundle-draft li { align-items:center; background:var(--uhcp-panel); border:1px solid var(--uhcp-border); border-radius:.8rem; display:grid; gap:1rem; grid-template-columns:minmax(0,1fr) auto; justify-content:space-between; padding:.7rem; }
556
561
  .uhcp-clinical-bundle-draft li>span { display:flex; gap:.45rem; }
557
562
  .uhcp-clinical-bundle-draft li>span:first-child { align-items:flex-start; flex-direction:column; min-width:0; }
558
563
  .uhcp-clinical-bundle-draft li strong { overflow-wrap:anywhere; }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "uhc-portal-components-react",
3
- "version": "0.2.11",
3
+ "version": "0.2.12",
4
4
  "description": "Brand-neutral React portal shell, account preferences and protected-profile UI for UHC and VetChain portals.",
5
5
  "license": "Apache-2.0",
6
6
  "type": "module",