sos-portal-components-react 0.3.1 → 0.3.2

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,6 +1,11 @@
1
1
  # Changelog
2
2
 
3
- ## Unreleased
3
+ ## 0.3.2 - 2026-11-10
4
+
5
+ - Add controlled `SubjectCardLocatorFields` for card-number or DID/QR entry.
6
+ Number entry distinguishes person/animal and animal taxonomy, including
7
+ species beyond the supplied presets. Hosts provide labels/options and own
8
+ resolution and authorization; the fields select no mode, storage or provider.
4
9
 
5
10
  ## 0.3.1 - 2026-11-09
6
11
 
@@ -50,11 +55,11 @@
50
55
 
51
56
  - Replace the dated developer handoff with numbered, README-linked guides for
52
57
  generic portal modes/authentication and detailed cross-portal Tuskr cases.
53
- Preserve the existing `SOS-PORTAL-001`–`029` and specialist research IDs.
58
+ Preserve the existing `SOS-PORTAL-001`-`029` and specialist research IDs.
54
59
  - Distinguish public Demo real-email account login from fixed Firebase test
55
60
  phone fixtures, BFF-owned Demo persistence from Test Network authority/GW
56
61
  lifecycle, and dedicated RTC media from Communication history and assistants.
57
- - Document positive/negative Personal ↔ Professional journeys, both-side
62
+ - Document positive/negative Personal ? Professional journeys, both-side
58
63
  readback, profile/relationship revocation, sector variants and evidence
59
64
  boundaries without claiming unexecuted gates have passed.
60
65
  - Specify dependency-by-case progression: BFF/memory Demo first, independent
package/README.md CHANGED
@@ -21,6 +21,15 @@ release closure still requires every affected boundary.
21
21
 
22
22
  ## Runtime parity
23
23
 
24
+ `SubjectCardLocatorFields` is a controlled web input, exported separately at
25
+ `sos-portal-components-react/subject-card-locator-fields`. It distinguishes
26
+ card number from DID/QR entry. For numbers, the user chooses person or animal;
27
+ animals also choose a supplied species or enter another NCBI taxonomy ID.
28
+ The host verifies those hints against the registered card. DID/QR lookup uses
29
+ the registered identity without asking the user to reinterpret its species.
30
+ The same renderer works in Demo and Network; it provides no authorization or
31
+ persistence and requires a native renderer before use in Expo.
32
+
24
33
  Components share use-case state between Demo and Test Network. Native support
25
34
  is export-specific: conversation uses the React Native/Web adapter; the device
26
35
  preferences renderer currently uses web DOM. A native preferences renderer
@@ -0,0 +1,32 @@
1
+ export type SubjectCardLocatorValue = Readonly<{
2
+ method: 'card-number' | 'did-qr';
3
+ subjectKind: '' | 'person' | 'animal';
4
+ taxonomyId: string;
5
+ locator: string;
6
+ }>;
7
+ export type SubjectCardLocatorCopy = Readonly<{
8
+ method: string;
9
+ number: string;
10
+ didQr: string;
11
+ subjectKind: string;
12
+ choose: string;
13
+ person: string;
14
+ animal: string;
15
+ species: string;
16
+ taxonomy: string;
17
+ otherSpecies: string;
18
+ value: string;
19
+ }>;
20
+ export type SubjectCardLocatorFieldsProps = Readonly<{
21
+ copy: SubjectCardLocatorCopy;
22
+ value: SubjectCardLocatorValue;
23
+ speciesOptions: readonly Readonly<{
24
+ taxonomyId: string;
25
+ label: string;
26
+ }>[];
27
+ disabled?: boolean;
28
+ onChange(value: SubjectCardLocatorValue): void;
29
+ }>;
30
+ /** Controlled identification fields shared by portal modes; the host resolves and authorizes. */
31
+ export declare function SubjectCardLocatorFields({ copy, value, speciesOptions, disabled, onChange }: SubjectCardLocatorFieldsProps): import("react").JSX.Element;
32
+ //# sourceMappingURL=SubjectCardLocatorFields.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"SubjectCardLocatorFields.d.ts","sourceRoot":"","sources":["../src/SubjectCardLocatorFields.tsx"],"names":[],"mappings":"AAEA,MAAM,MAAM,uBAAuB,GAAC,QAAQ,CAAC;IAC3C,MAAM,EAAC,aAAa,GAAC,QAAQ,CAAA;IAC7B,WAAW,EAAC,EAAE,GAAC,QAAQ,GAAC,QAAQ,CAAA;IAChC,UAAU,EAAC,MAAM,CAAA;IACjB,OAAO,EAAC,MAAM,CAAA;CACf,CAAC,CAAA;AACF,MAAM,MAAM,sBAAsB,GAAC,QAAQ,CAAC;IAC1C,MAAM,EAAC,MAAM,CAAC;IAAA,MAAM,EAAC,MAAM,CAAC;IAAA,KAAK,EAAC,MAAM,CAAC;IAAA,WAAW,EAAC,MAAM,CAAC;IAAA,MAAM,EAAC,MAAM,CAAA;IACzE,MAAM,EAAC,MAAM,CAAC;IAAA,MAAM,EAAC,MAAM,CAAC;IAAA,OAAO,EAAC,MAAM,CAAC;IAAA,QAAQ,EAAC,MAAM,CAAC;IAAA,YAAY,EAAC,MAAM,CAAC;IAAA,KAAK,EAAC,MAAM,CAAA;CAC5F,CAAC,CAAA;AACF,MAAM,MAAM,6BAA6B,GAAC,QAAQ,CAAC;IACjD,IAAI,EAAC,sBAAsB,CAAA;IAC3B,KAAK,EAAC,uBAAuB,CAAA;IAC7B,cAAc,EAAC,SAAS,QAAQ,CAAC;QAAC,UAAU,EAAC,MAAM,CAAC;QAAA,KAAK,EAAC,MAAM,CAAA;KAAC,CAAC,EAAE,CAAA;IACpE,QAAQ,CAAC,EAAC,OAAO,CAAA;IACjB,QAAQ,CAAC,KAAK,EAAC,uBAAuB,GAAE,IAAI,CAAA;CAC7C,CAAC,CAAA;AAEF,iGAAiG;AACjG,wBAAgB,wBAAwB,CAAC,EAAC,IAAI,EAAC,KAAK,EAAC,cAAc,EAAC,QAAQ,EAAC,QAAQ,EAAC,EAAC,6BAA6B,+BAoBnH"}
@@ -0,0 +1,9 @@
1
+ 'use client';
2
+ import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
3
+ /** Controlled identification fields shared by portal modes; the host resolves and authorizes. */
4
+ export function SubjectCardLocatorFields({ copy, value, speciesOptions, disabled, onChange }) {
5
+ const animalNumber = value.method === 'card-number' && value.subjectKind === 'animal';
6
+ const otherSpecies = Boolean(value.taxonomyId) && !speciesOptions.some(option => option.taxonomyId === value.taxonomyId);
7
+ return _jsxs("div", { className: "subject-card-locator-fields", children: [_jsxs("label", { children: [copy.method, _jsxs("select", { disabled: disabled, value: value.method, onChange: event => onChange({ ...value, method: event.currentTarget.value, subjectKind: '', taxonomyId: '' }), children: [_jsx("option", { value: "card-number", children: copy.number }), _jsx("option", { value: "did-qr", children: copy.didQr })] })] }), value.method === 'card-number' ? _jsxs("label", { children: [copy.subjectKind, _jsxs("select", { disabled: disabled, value: value.subjectKind, onChange: event => onChange({ ...value, subjectKind: event.currentTarget.value, taxonomyId: '' }), children: [_jsx("option", { value: "", children: copy.choose }), _jsx("option", { value: "person", children: copy.person }), _jsx("option", { value: "animal", children: copy.animal })] })] }) : null, animalNumber ? _jsxs(_Fragment, { children: [_jsxs("label", { children: [copy.species, _jsxs("select", { disabled: disabled, value: otherSpecies ? 'other' : value.taxonomyId, onChange: event => onChange({ ...value, taxonomyId: event.currentTarget.value }), children: [_jsx("option", { value: "", children: copy.choose }), speciesOptions.map(option => _jsx("option", { value: option.taxonomyId, children: option.label }, option.taxonomyId)), _jsx("option", { value: "other", children: copy.otherSpecies })] })] }), otherSpecies ? _jsxs("label", { children: [copy.taxonomy, _jsx("input", { disabled: disabled, inputMode: "numeric", value: value.taxonomyId === 'other' ? '' : value.taxonomyId, onChange: event => onChange({ ...value, taxonomyId: event.currentTarget.value || 'other' }) })] }) : null] }) : null, _jsxs("label", { children: [copy.value, _jsx("input", { disabled: disabled, autoComplete: "off", inputMode: value.method === 'card-number' ? 'numeric' : 'text', value: value.locator, onChange: event => onChange({ ...value, locator: event.currentTarget.value }) })] })] });
8
+ }
9
+ //# sourceMappingURL=SubjectCardLocatorFields.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"SubjectCardLocatorFields.js","sourceRoot":"","sources":["../src/SubjectCardLocatorFields.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAA;;AAoBZ,iGAAiG;AACjG,MAAM,UAAU,wBAAwB,CAAC,EAAC,IAAI,EAAC,KAAK,EAAC,cAAc,EAAC,QAAQ,EAAC,QAAQ,EAA+B;IAClH,MAAM,YAAY,GAAC,KAAK,CAAC,MAAM,KAAG,aAAa,IAAE,KAAK,CAAC,WAAW,KAAG,QAAQ,CA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AE,QAAQ,EAAE,KAAK,CAAA,EAAE,CAAA,QAAQ,CAAC,EAAC,GAAG,KAAK,EAAC,OAAO,EAAC,KAAK,CAAC,aAAa,CAAC,KAAK,EAAC,CAAC,GAAG,IAAQ,IAC/N,CAAA;AACR,CAAC"}
package/dist/index.d.ts CHANGED
@@ -1,5 +1,6 @@
1
1
  export * from './SubjectConversationChat.js';
2
2
  export * from './DeviceAssistancePreferences.js';
3
+ export * from './SubjectCardLocatorFields.js';
3
4
  export * from './LiveKitRealtimeCallClient.js';
4
5
  export * from './EmergencyContactCardDirectory.js';
5
6
  export * from './PushNotificationRegistration.js';
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,8BAA8B,CAAA;AAC5C,cAAc,kCAAkC,CAAA;AAChD,cAAc,gCAAgC,CAAA;AAC9C,cAAc,oCAAoC,CAAA;AAClD,cAAc,mCAAmC,CAAA;AACjD,cAAc,sCAAsC,CAAA"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,8BAA8B,CAAA;AAC5C,cAAc,kCAAkC,CAAA;AAChD,cAAc,+BAA+B,CAAA;AAC7C,cAAc,gCAAgC,CAAA;AAC9C,cAAc,oCAAoC,CAAA;AAClD,cAAc,mCAAmC,CAAA;AACjD,cAAc,sCAAsC,CAAA"}
package/dist/index.js CHANGED
@@ -1,5 +1,6 @@
1
1
  export * from './SubjectConversationChat.js';
2
2
  export * from './DeviceAssistancePreferences.js';
3
+ export * from './SubjectCardLocatorFields.js';
3
4
  export * from './LiveKitRealtimeCallClient.js';
4
5
  export * from './EmergencyContactCardDirectory.js';
5
6
  export * from './PushNotificationRegistration.js';
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,8BAA8B,CAAA;AAC5C,cAAc,kCAAkC,CAAA;AAChD,cAAc,gCAAgC,CAAA;AAC9C,cAAc,oCAAoC,CAAA;AAClD,cAAc,mCAAmC,CAAA;AACjD,cAAc,sCAAsC,CAAA"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,8BAA8B,CAAA;AAC5C,cAAc,kCAAkC,CAAA;AAChD,cAAc,+BAA+B,CAAA;AAC7C,cAAc,gCAAgC,CAAA;AAC9C,cAAc,oCAAoC,CAAA;AAClD,cAAc,mCAAmC,CAAA;AACjD,cAAc,sCAAsC,CAAA"}
package/package.json CHANGED
@@ -1,12 +1,16 @@
1
1
  {
2
2
  "name": "sos-portal-components-react",
3
- "version": "0.3.1",
3
+ "version": "0.3.2",
4
4
  "description": "Shared portal UI for base components",
5
5
  "license": "Apache-2.0",
6
6
  "type": "module",
7
7
  "main": "./dist/index.js",
8
8
  "types": "./dist/index.d.ts",
9
9
  "exports": {
10
+ "./subject-card-locator-fields": {
11
+ "types": "./dist/SubjectCardLocatorFields.d.ts",
12
+ "default": "./dist/SubjectCardLocatorFields.js"
13
+ },
10
14
  "./device-assistance-preferences": {
11
15
  "types": "./dist/DeviceAssistancePreferences.d.ts",
12
16
  "default": "./dist/DeviceAssistancePreferences.js"