@natoe/colab 0.1.30 → 0.1.31
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 +7 -4
- package/dist/index.d.ts +7 -4
- package/dist/index.js +5 -2
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +5 -2
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -369,10 +369,13 @@ interface CollabPanelProps {
|
|
|
369
369
|
declare function CollabPanel({ orderId, conversation: providedConversation, patientData, participantIds, kind, showSeenBy, onBack, hidePatientName, hideOpenCase, onConversationChange, themeMode, showSettings: controlledShowSettings, onSettingsChange, className, style, }: CollabPanelProps): react_jsx_runtime.JSX.Element;
|
|
370
370
|
|
|
371
371
|
interface CollabPopupProps {
|
|
372
|
-
/** Order
|
|
373
|
-
|
|
372
|
+
/** Order this thread belongs to. Required for a `case` thread; omitted for a
|
|
373
|
+
* help channel, which belongs to a lab rather than an order. */
|
|
374
|
+
orderId?: string;
|
|
375
|
+
/** A thread the caller already resolved — how a help channel is opened. */
|
|
376
|
+
conversation?: Conversation | null;
|
|
374
377
|
/** Patient/study data */
|
|
375
|
-
patientData
|
|
378
|
+
patientData?: PatientData;
|
|
376
379
|
/** Participant user IDs — only used when creating a brand-new conversation */
|
|
377
380
|
participantIds?: string[];
|
|
378
381
|
/** Which thread on the case. Defaults to the shared `case` thread. */
|
|
@@ -406,7 +409,7 @@ interface CollabPopupProps {
|
|
|
406
409
|
* Draggable floating chat popup — drop-in replacement for DraggableChatPopup.
|
|
407
410
|
* Renders a CollabPanel inside a movable, resizable container.
|
|
408
411
|
*/
|
|
409
|
-
declare function CollabPopup({ orderId, patientData, participantIds, kind, isOpen, onClose, onBack, onMinimize, initialPosition, width, height, className, }: CollabPopupProps): react_jsx_runtime.JSX.Element | null;
|
|
412
|
+
declare function CollabPopup({ orderId, conversation: providedConversation, patientData, participantIds, kind, isOpen, onClose, onBack, onMinimize, initialPosition, width, height, className, }: CollabPopupProps): react_jsx_runtime.JSX.Element | null;
|
|
410
413
|
|
|
411
414
|
type ColabInlineMode = 'light' | 'dark';
|
|
412
415
|
interface CollabInlineProps {
|
package/dist/index.d.ts
CHANGED
|
@@ -369,10 +369,13 @@ interface CollabPanelProps {
|
|
|
369
369
|
declare function CollabPanel({ orderId, conversation: providedConversation, patientData, participantIds, kind, showSeenBy, onBack, hidePatientName, hideOpenCase, onConversationChange, themeMode, showSettings: controlledShowSettings, onSettingsChange, className, style, }: CollabPanelProps): react_jsx_runtime.JSX.Element;
|
|
370
370
|
|
|
371
371
|
interface CollabPopupProps {
|
|
372
|
-
/** Order
|
|
373
|
-
|
|
372
|
+
/** Order this thread belongs to. Required for a `case` thread; omitted for a
|
|
373
|
+
* help channel, which belongs to a lab rather than an order. */
|
|
374
|
+
orderId?: string;
|
|
375
|
+
/** A thread the caller already resolved — how a help channel is opened. */
|
|
376
|
+
conversation?: Conversation | null;
|
|
374
377
|
/** Patient/study data */
|
|
375
|
-
patientData
|
|
378
|
+
patientData?: PatientData;
|
|
376
379
|
/** Participant user IDs — only used when creating a brand-new conversation */
|
|
377
380
|
participantIds?: string[];
|
|
378
381
|
/** Which thread on the case. Defaults to the shared `case` thread. */
|
|
@@ -406,7 +409,7 @@ interface CollabPopupProps {
|
|
|
406
409
|
* Draggable floating chat popup — drop-in replacement for DraggableChatPopup.
|
|
407
410
|
* Renders a CollabPanel inside a movable, resizable container.
|
|
408
411
|
*/
|
|
409
|
-
declare function CollabPopup({ orderId, patientData, participantIds, kind, isOpen, onClose, onBack, onMinimize, initialPosition, width, height, className, }: CollabPopupProps): react_jsx_runtime.JSX.Element | null;
|
|
412
|
+
declare function CollabPopup({ orderId, conversation: providedConversation, patientData, participantIds, kind, isOpen, onClose, onBack, onMinimize, initialPosition, width, height, className, }: CollabPopupProps): react_jsx_runtime.JSX.Element | null;
|
|
410
413
|
|
|
411
414
|
type ColabInlineMode = 'light' | 'dark';
|
|
412
415
|
interface CollabInlineProps {
|
package/dist/index.js
CHANGED
|
@@ -4835,6 +4835,7 @@ ensureGlobalStyles();
|
|
|
4835
4835
|
var FOCUSABLE_SELECTOR = 'a[href], button:not([disabled]), textarea:not([disabled]), input:not([disabled]), select:not([disabled]), [tabindex]:not([tabindex="-1"])';
|
|
4836
4836
|
function CollabPopup({
|
|
4837
4837
|
orderId,
|
|
4838
|
+
conversation: providedConversation,
|
|
4838
4839
|
patientData,
|
|
4839
4840
|
participantIds,
|
|
4840
4841
|
kind,
|
|
@@ -4861,7 +4862,7 @@ function CollabPopup({
|
|
|
4861
4862
|
const containerRef = React4.useRef(null);
|
|
4862
4863
|
const previouslyFocused = React4.useRef(null);
|
|
4863
4864
|
const titleId = React4.useId();
|
|
4864
|
-
const titleText = cleanChannelName(loadedConversation?.name) || buildChannelName(patientData);
|
|
4865
|
+
const titleText = cleanChannelName(loadedConversation?.name) || (patientData ? buildChannelName(patientData) : "Natoe Support");
|
|
4865
4866
|
const handleMouseDown = React4.useCallback(
|
|
4866
4867
|
(e) => {
|
|
4867
4868
|
if (!e.target.closest("[data-drag-handle]")) return;
|
|
@@ -4966,8 +4967,9 @@ function CollabPopup({
|
|
|
4966
4967
|
}
|
|
4967
4968
|
),
|
|
4968
4969
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { style: styles13.titleCenter, children: [
|
|
4969
|
-
/* @__PURE__ */ jsxRuntime.jsx("h2", { id: titleId, style: styles13.patientName, children: patientData
|
|
4970
|
+
/* @__PURE__ */ jsxRuntime.jsx("h2", { id: titleId, style: styles13.patientName, children: patientData?.patientName || titleText }),
|
|
4970
4971
|
(() => {
|
|
4972
|
+
if (!patientData) return /* @__PURE__ */ jsxRuntime.jsx("div", { style: styles13.subRow, children: /* @__PURE__ */ jsxRuntime.jsx("span", { style: styles13.metaText, children: "Help and support" }) });
|
|
4971
4973
|
const parts = [];
|
|
4972
4974
|
if (patientData.patientAge) parts.push(String(patientData.patientAge));
|
|
4973
4975
|
if (patientData.patientSex) parts.push(String(patientData.patientSex));
|
|
@@ -5024,6 +5026,7 @@ function CollabPopup({
|
|
|
5024
5026
|
CollabPanel,
|
|
5025
5027
|
{
|
|
5026
5028
|
orderId,
|
|
5029
|
+
conversation: providedConversation,
|
|
5027
5030
|
patientData,
|
|
5028
5031
|
participantIds,
|
|
5029
5032
|
kind,
|