@natoe/colab 0.1.9 → 0.1.11
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/dist/index.d.mts +8 -2
- package/dist/index.d.ts +8 -2
- package/dist/index.js +29 -9
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +29 -9
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -183,6 +183,8 @@ interface CollabPanelProps {
|
|
|
183
183
|
* its compact / single-pane layout to return to the conversation list).
|
|
184
184
|
*/
|
|
185
185
|
onBack?: () => void;
|
|
186
|
+
/** Hide the patient name row in the header — set when a parent already shows it (e.g. CollabPopup title bar) */
|
|
187
|
+
hidePatientName?: boolean;
|
|
186
188
|
/** Custom class name for the outer container */
|
|
187
189
|
className?: string;
|
|
188
190
|
/** Custom inline styles for the outer container */
|
|
@@ -192,7 +194,7 @@ interface CollabPanelProps {
|
|
|
192
194
|
* Full collaboration panel: patient header + pinned bar + message thread + input.
|
|
193
195
|
* Supports reply, pin/unpin, and (optionally) seen-by indicators.
|
|
194
196
|
*/
|
|
195
|
-
declare function CollabPanel({ orderId, patientData, participantIds, showSeenBy, onBack, className, style, }: CollabPanelProps): react_jsx_runtime.JSX.Element;
|
|
197
|
+
declare function CollabPanel({ orderId, patientData, participantIds, showSeenBy, onBack, hidePatientName, className, style, }: CollabPanelProps): react_jsx_runtime.JSX.Element;
|
|
196
198
|
|
|
197
199
|
interface CollabPopupProps {
|
|
198
200
|
/** Order ID for this conversation */
|
|
@@ -668,9 +670,13 @@ interface PatientHeaderProps {
|
|
|
668
670
|
onOpenSettings?: () => void;
|
|
669
671
|
/** When set, renders a back-arrow button (compact inbox returning to list) */
|
|
670
672
|
onBack?: () => void;
|
|
673
|
+
/** Suppress the channel name row — use when the name is already shown in a parent title bar */
|
|
674
|
+
hideName?: boolean;
|
|
675
|
+
/** Override the displayed name — use the stored conversation.name to avoid reconstructing from patientData components */
|
|
676
|
+
displayName?: string;
|
|
671
677
|
className?: string;
|
|
672
678
|
}
|
|
673
|
-
declare function PatientHeader({ patientData, onOpenDicom, onOpenSettings, onBack, className, }: PatientHeaderProps): react_jsx_runtime.JSX.Element;
|
|
679
|
+
declare function PatientHeader({ patientData, onOpenDicom, onOpenSettings, onBack, hideName, displayName, className, }: PatientHeaderProps): react_jsx_runtime.JSX.Element;
|
|
674
680
|
|
|
675
681
|
interface MessageListHandle {
|
|
676
682
|
/** Scroll to a specific message by ID (used by pin jump-to) */
|
package/dist/index.d.ts
CHANGED
|
@@ -183,6 +183,8 @@ interface CollabPanelProps {
|
|
|
183
183
|
* its compact / single-pane layout to return to the conversation list).
|
|
184
184
|
*/
|
|
185
185
|
onBack?: () => void;
|
|
186
|
+
/** Hide the patient name row in the header — set when a parent already shows it (e.g. CollabPopup title bar) */
|
|
187
|
+
hidePatientName?: boolean;
|
|
186
188
|
/** Custom class name for the outer container */
|
|
187
189
|
className?: string;
|
|
188
190
|
/** Custom inline styles for the outer container */
|
|
@@ -192,7 +194,7 @@ interface CollabPanelProps {
|
|
|
192
194
|
* Full collaboration panel: patient header + pinned bar + message thread + input.
|
|
193
195
|
* Supports reply, pin/unpin, and (optionally) seen-by indicators.
|
|
194
196
|
*/
|
|
195
|
-
declare function CollabPanel({ orderId, patientData, participantIds, showSeenBy, onBack, className, style, }: CollabPanelProps): react_jsx_runtime.JSX.Element;
|
|
197
|
+
declare function CollabPanel({ orderId, patientData, participantIds, showSeenBy, onBack, hidePatientName, className, style, }: CollabPanelProps): react_jsx_runtime.JSX.Element;
|
|
196
198
|
|
|
197
199
|
interface CollabPopupProps {
|
|
198
200
|
/** Order ID for this conversation */
|
|
@@ -668,9 +670,13 @@ interface PatientHeaderProps {
|
|
|
668
670
|
onOpenSettings?: () => void;
|
|
669
671
|
/** When set, renders a back-arrow button (compact inbox returning to list) */
|
|
670
672
|
onBack?: () => void;
|
|
673
|
+
/** Suppress the channel name row — use when the name is already shown in a parent title bar */
|
|
674
|
+
hideName?: boolean;
|
|
675
|
+
/** Override the displayed name — use the stored conversation.name to avoid reconstructing from patientData components */
|
|
676
|
+
displayName?: string;
|
|
671
677
|
className?: string;
|
|
672
678
|
}
|
|
673
|
-
declare function PatientHeader({ patientData, onOpenDicom, onOpenSettings, onBack, className, }: PatientHeaderProps): react_jsx_runtime.JSX.Element;
|
|
679
|
+
declare function PatientHeader({ patientData, onOpenDicom, onOpenSettings, onBack, hideName, displayName, className, }: PatientHeaderProps): react_jsx_runtime.JSX.Element;
|
|
674
680
|
|
|
675
681
|
interface MessageListHandle {
|
|
676
682
|
/** Scroll to a specific message by ID (used by pin jump-to) */
|
package/dist/index.js
CHANGED
|
@@ -1298,11 +1298,18 @@ var Z_INDEX = {
|
|
|
1298
1298
|
/** Portaled message-actions menu — must sit above the dialog. */
|
|
1299
1299
|
menu: 1e4
|
|
1300
1300
|
};
|
|
1301
|
+
function resolveDisplayName(patientData, displayName) {
|
|
1302
|
+
const localComplete = !!patientData.labName && !!patientData.displayOrderId;
|
|
1303
|
+
if (localComplete) return buildChannelName(patientData);
|
|
1304
|
+
return displayName ?? buildChannelName(patientData);
|
|
1305
|
+
}
|
|
1301
1306
|
function PatientHeader({
|
|
1302
1307
|
patientData,
|
|
1303
1308
|
onOpenDicom,
|
|
1304
1309
|
onOpenSettings,
|
|
1305
1310
|
onBack,
|
|
1311
|
+
hideName = false,
|
|
1312
|
+
displayName,
|
|
1306
1313
|
className
|
|
1307
1314
|
}) {
|
|
1308
1315
|
const hasDicom = !!(patientData.studyId && patientData.storageId);
|
|
@@ -1317,7 +1324,7 @@ function PatientHeader({
|
|
|
1317
1324
|
meta.push({ label: "Ref", value: patientData.referringPhysician });
|
|
1318
1325
|
}
|
|
1319
1326
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className, style: styles.container, children: [
|
|
1320
|
-
/* @__PURE__ */ jsxRuntime.jsxs("div", { style: styles.nameRow, children: [
|
|
1327
|
+
!hideName && /* @__PURE__ */ jsxRuntime.jsxs("div", { style: styles.nameRow, children: [
|
|
1321
1328
|
onBack && /* @__PURE__ */ jsxRuntime.jsx(
|
|
1322
1329
|
"button",
|
|
1323
1330
|
{
|
|
@@ -1329,7 +1336,7 @@ function PatientHeader({
|
|
|
1329
1336
|
children: /* @__PURE__ */ jsxRuntime.jsx(BackIcon, { size: 22, color: COLOR.neutral800 })
|
|
1330
1337
|
}
|
|
1331
1338
|
),
|
|
1332
|
-
/* @__PURE__ */ jsxRuntime.jsx("span", { style: styles.nameText, children:
|
|
1339
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { style: styles.nameText, children: resolveDisplayName(patientData, displayName) })
|
|
1333
1340
|
] }),
|
|
1334
1341
|
meta.length > 0 && /* @__PURE__ */ jsxRuntime.jsx("div", { style: styles.metaRow, children: meta.map((item) => /* @__PURE__ */ jsxRuntime.jsxs("span", { style: styles.metaItem, children: [
|
|
1335
1342
|
/* @__PURE__ */ jsxRuntime.jsxs("span", { style: styles.metaLabel, children: [
|
|
@@ -3758,6 +3765,7 @@ function CollabPanel({
|
|
|
3758
3765
|
participantIds,
|
|
3759
3766
|
showSeenBy = true,
|
|
3760
3767
|
onBack,
|
|
3768
|
+
hidePatientName = false,
|
|
3761
3769
|
className,
|
|
3762
3770
|
style
|
|
3763
3771
|
}) {
|
|
@@ -3866,7 +3874,9 @@ function CollabPanel({
|
|
|
3866
3874
|
participants,
|
|
3867
3875
|
onOpenDicom: handleOpenDicom,
|
|
3868
3876
|
onOpenSettings: () => setShowSettings(true),
|
|
3869
|
-
onBack
|
|
3877
|
+
onBack,
|
|
3878
|
+
hideName: hidePatientName,
|
|
3879
|
+
displayName: conversation?.name
|
|
3870
3880
|
}
|
|
3871
3881
|
),
|
|
3872
3882
|
pinnedMessages.length > 0 && /* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -4138,7 +4148,7 @@ function CollabPopup({
|
|
|
4138
4148
|
)
|
|
4139
4149
|
] })
|
|
4140
4150
|
] }),
|
|
4141
|
-
!isMinimized && /* @__PURE__ */ jsxRuntime.jsx("div", { style: styles13.panelWrapper, children: /* @__PURE__ */ jsxRuntime.jsx(CollabPanel, { orderId, patientData, participantIds }) })
|
|
4151
|
+
!isMinimized && /* @__PURE__ */ jsxRuntime.jsx("div", { style: styles13.panelWrapper, children: /* @__PURE__ */ jsxRuntime.jsx(CollabPanel, { orderId, patientData, participantIds, hidePatientName: true }) })
|
|
4142
4152
|
]
|
|
4143
4153
|
}
|
|
4144
4154
|
);
|
|
@@ -5360,8 +5370,18 @@ function CollabInbox({
|
|
|
5360
5370
|
);
|
|
5361
5371
|
}
|
|
5362
5372
|
function buildPatientData(item) {
|
|
5363
|
-
|
|
5364
|
-
|
|
5373
|
+
const parsed = parseChannelName(item.name, item.orderId);
|
|
5374
|
+
if (item.patientSnapshot) {
|
|
5375
|
+
return {
|
|
5376
|
+
...item.patientSnapshot,
|
|
5377
|
+
labName: item.patientSnapshot.labName ?? parsed.labName,
|
|
5378
|
+
displayOrderId: item.patientSnapshot.displayOrderId ?? parsed.displayOrderId
|
|
5379
|
+
};
|
|
5380
|
+
}
|
|
5381
|
+
return parsed;
|
|
5382
|
+
}
|
|
5383
|
+
function parseChannelName(name, orderId) {
|
|
5384
|
+
const parts = name.split(" - ");
|
|
5365
5385
|
if (parts.length >= 3) {
|
|
5366
5386
|
const last4 = parts[parts.length - 1];
|
|
5367
5387
|
const labName = parts[parts.length - 2];
|
|
@@ -5369,13 +5389,13 @@ function buildPatientData(item) {
|
|
|
5369
5389
|
return {
|
|
5370
5390
|
patientName,
|
|
5371
5391
|
labName: labName || void 0,
|
|
5372
|
-
orderId
|
|
5392
|
+
orderId,
|
|
5373
5393
|
displayOrderId: last4
|
|
5374
5394
|
};
|
|
5375
5395
|
}
|
|
5376
5396
|
return {
|
|
5377
|
-
patientName:
|
|
5378
|
-
orderId
|
|
5397
|
+
patientName: name,
|
|
5398
|
+
orderId
|
|
5379
5399
|
};
|
|
5380
5400
|
}
|
|
5381
5401
|
function EmptyState({ hasAny }) {
|