uhc-portal-components-react 0.1.3 → 0.1.4

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.1.4 - 2026-07-29
4
+
5
+ - Add `IpsBundleSummary`, which accepts a complete IPS document Bundle and
6
+ renders every Composition section and its Common Utils card projections.
7
+ - Test the official 16-section IPS fixture, every declared IPS resource type
8
+ and locale/terminology propagation.
9
+ - State explicitly that browser components render in-memory data and never call
10
+ backend ingestion operations.
11
+
3
12
  ## 0.1.3
4
13
 
5
14
  - Add the brand-neutral `ClinicalSectionSummary` renderer for resolved IPS
package/README.md CHANGED
@@ -49,6 +49,9 @@ The package deliberately exposes modules instead of a cloned application:
49
49
  - `ProfileProtectionGate`: fail-closed PIN unlock presentation.
50
50
  - `ClinicalSectionSummary`: brand-neutral rendering of already-resolved IPS
51
51
  cards for personal and professional portals.
52
+ - `IpsBundleSummary`: receives one in-memory IPS document Bundle, obtains all
53
+ `Composition.section` entries through Common Utils and renders every
54
+ section's cards. It performs no ingestion or GW call.
52
55
 
53
56
  Clinical label semantics stay in `gdc-common-utils-ts` / the SDK reader. Hosts
54
57
  pass human titles to `ClinicalSectionSummary`: local `CodeableConcept.text`
@@ -56,6 +59,19 @@ when the UI matches the resource language, English `Coding.display` for
56
59
  English, or a terminology translation keyed by `system|code` for another
57
60
  locale. The terminology token is never a visible or editable title.
58
61
 
62
+ ```tsx
63
+ <IpsBundleSummary
64
+ bundle={bundleInMemory}
65
+ locale={currentLocale}
66
+ translateCode={terminology.translate}
67
+ emptyLabel={t('emptySection')}
68
+ />
69
+ ```
70
+
71
+ The browser may render an optimistic in-memory Bundle while its authenticated
72
+ BFF persists the command. Only backend code calls
73
+ `ingestCommunicationAndUpdateIndex(...)`; the component never does.
74
+
59
75
  UHC Personal and VetChain Personal must compose the same personal route
60
76
  modules. UHC Professional and VetChain Professional must compose the same
61
77
  professional route modules. A brand adapter may change only tokens, logo,
@@ -0,0 +1,23 @@
1
+ import type { ReactNode } from 'react';
2
+ import { type ClinicalResourceBundleLike, type ClinicalSectionView, type ClinicalTerminologyTranslationInput } from 'gdc-common-utils-ts/utils/clinical-resource-view';
3
+ export type IpsBundleSummaryProps = Readonly<{
4
+ bundle: ClinicalResourceBundleLike;
5
+ locale?: string;
6
+ translateCode?: (input: ClinicalTerminologyTranslationInput) => string | undefined;
7
+ emptyLabel: string;
8
+ noSectionsLabel?: string;
9
+ sectionTitle?: (section: ClinicalSectionView) => string;
10
+ resourceTypeLabel?: (resourceType: string) => string;
11
+ sectionActions?: (section: ClinicalSectionView) => ReactNode;
12
+ }>;
13
+ /**
14
+ * Renders every section declared by an IPS Composition and the cards referenced
15
+ * by each section.
16
+ *
17
+ * The shared clinical reader owns Bundle traversal, section placement and card
18
+ * projection. `Composition.section.entry` is authoritative for placement;
19
+ * native FHIR fields or canonical `resource.meta.claims` provide card content.
20
+ * This component performs no ingestion, persistence or GW call.
21
+ */
22
+ export declare function IpsBundleSummary({ bundle, locale, translateCode, emptyLabel, noSectionsLabel, sectionTitle, resourceTypeLabel, sectionActions, }: IpsBundleSummaryProps): import("react").JSX.Element;
23
+ //# sourceMappingURL=IpsBundleSummary.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"IpsBundleSummary.d.ts","sourceRoot":"","sources":["../src/IpsBundleSummary.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;AACtC,OAAO,EAEL,KAAK,0BAA0B,EAC/B,KAAK,mBAAmB,EACxB,KAAK,mCAAmC,EACzC,MAAM,kDAAkD,CAAA;AAGzD,MAAM,MAAM,qBAAqB,GAAG,QAAQ,CAAC;IAC3C,MAAM,EAAE,0BAA0B,CAAA;IAClC,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,aAAa,CAAC,EAAE,CAAC,KAAK,EAAE,mCAAmC,KAAK,MAAM,GAAG,SAAS,CAAA;IAClF,UAAU,EAAE,MAAM,CAAA;IAClB,eAAe,CAAC,EAAE,MAAM,CAAA;IACxB,YAAY,CAAC,EAAE,CAAC,OAAO,EAAE,mBAAmB,KAAK,MAAM,CAAA;IACvD,iBAAiB,CAAC,EAAE,CAAC,YAAY,EAAE,MAAM,KAAK,MAAM,CAAA;IACpD,cAAc,CAAC,EAAE,CAAC,OAAO,EAAE,mBAAmB,KAAK,SAAS,CAAA;CAC7D,CAAC,CAAA;AAEF;;;;;;;;GAQG;AACH,wBAAgB,gBAAgB,CAAC,EAC/B,MAAM,EACN,MAAM,EACN,aAAa,EACb,UAAU,EACV,eAA4B,EAC5B,YAAyC,EACzC,iBAAiB,EACjB,cAAc,GACf,EAAE,qBAAqB,+BA2BvB"}
@@ -0,0 +1,24 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ import { toClinicalSectionViews, } from 'gdc-common-utils-ts/utils/clinical-resource-view';
3
+ import { ClinicalSectionSummary } from './ClinicalSectionSummary.js';
4
+ /**
5
+ * Renders every section declared by an IPS Composition and the cards referenced
6
+ * by each section.
7
+ *
8
+ * The shared clinical reader owns Bundle traversal, section placement and card
9
+ * projection. `Composition.section.entry` is authoritative for placement;
10
+ * native FHIR fields or canonical `resource.meta.claims` provide card content.
11
+ * This component performs no ingestion, persistence or GW call.
12
+ */
13
+ export function IpsBundleSummary({ bundle, locale, translateCode, emptyLabel, noSectionsLabel = emptyLabel, sectionTitle = (section) => section.title, resourceTypeLabel, sectionActions, }) {
14
+ const sections = toClinicalSectionViews(bundle, { locale, translateCode });
15
+ if (sections.length === 0) {
16
+ return _jsx("p", { className: "uhcp-clinical-empty", "data-ips-summary-empty": true, children: noSectionsLabel });
17
+ }
18
+ return (_jsx("div", { className: "uhcp-clinical-summary", "data-ips-summary": true, children: sections.map((section, sectionIndex) => (_jsx(ClinicalSectionSummary, { code: section.code ?? '', title: sectionTitle(section), resources: section.resources.map((resource, resourceIndex) => ({
19
+ key: resource.fullUrl ?? `${resource.resourceType}:${resourceIndex}:${resource.title}`,
20
+ title: resource.title,
21
+ resourceType: resource.resourceType,
22
+ date: resource.date,
23
+ })), emptyLabel: emptyLabel, resourceTypeLabel: resourceTypeLabel, actions: sectionActions?.(section) }, section.code ?? `${section.title}:${sectionIndex}`))) }));
24
+ }
package/dist/index.d.ts CHANGED
@@ -6,4 +6,5 @@ export * from './PortalShell.js';
6
6
  export * from './PortalEntry.js';
7
7
  export * from './ProfileProtectionGate.js';
8
8
  export * from './ClinicalSectionSummary.js';
9
+ export * from './IpsBundleSummary.js';
9
10
  //# sourceMappingURL=index.d.ts.map
@@ -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,kBAAkB,CAAA;AAChC,cAAc,kBAAkB,CAAA;AAChC,cAAc,4BAA4B,CAAA;AAC1C,cAAc,6BAA6B,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,kBAAkB,CAAA;AAChC,cAAc,kBAAkB,CAAA;AAChC,cAAc,4BAA4B,CAAA;AAC1C,cAAc,6BAA6B,CAAA;AAC3C,cAAc,uBAAuB,CAAA"}
package/dist/index.js CHANGED
@@ -6,3 +6,4 @@ export * from './PortalShell.js';
6
6
  export * from './PortalEntry.js';
7
7
  export * from './ProfileProtectionGate.js';
8
8
  export * from './ClinicalSectionSummary.js';
9
+ export * from './IpsBundleSummary.js';
package/dist/styles.css CHANGED
@@ -171,6 +171,11 @@ html[data-theme='dark'] .uhcp-brand-artwork-dark { display: block !important; }
171
171
  color: var(--uhcp-text);
172
172
  padding: 1.25rem;
173
173
  }
174
+
175
+ .uhcp-clinical-summary {
176
+ display: grid;
177
+ gap: 1rem;
178
+ }
174
179
  .uhcp-clinical-section > header { align-items: center; display: flex; gap: 1rem; justify-content: space-between; }
175
180
  .uhcp-clinical-section h3 { font-size: 1.125rem; margin: 0; }
176
181
  .uhcp-clinical-section h3 span { color: var(--uhcp-muted); }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "uhc-portal-components-react",
3
- "version": "0.1.3",
3
+ "version": "0.1.4",
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",
@@ -26,6 +26,9 @@
26
26
  "react": ">=18.3.0",
27
27
  "react-dom": ">=18.3.0"
28
28
  },
29
+ "dependencies": {
30
+ "gdc-common-utils-ts": "^2.3.10"
31
+ },
29
32
  "devDependencies": {
30
33
  "@types/react": "19.2.17",
31
34
  "@types/react-dom": "19.2.3",