@natoe/colab 0.1.7 → 0.1.8
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.js +39 -0
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +39 -0
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -2685,6 +2685,7 @@ function MessageInput({
|
|
|
2685
2685
|
}) {
|
|
2686
2686
|
const [text, setText] = useState("");
|
|
2687
2687
|
const [isSending, setIsSending] = useState(false);
|
|
2688
|
+
const [isUploading, setIsUploading] = useState(false);
|
|
2688
2689
|
const [fileError, setFileError] = useState(null);
|
|
2689
2690
|
const fileInputRef = useRef(null);
|
|
2690
2691
|
const typingTimeoutRef = useRef(null);
|
|
@@ -2748,10 +2749,12 @@ function MessageInput({
|
|
|
2748
2749
|
return;
|
|
2749
2750
|
}
|
|
2750
2751
|
setIsSending(true);
|
|
2752
|
+
setIsUploading(true);
|
|
2751
2753
|
try {
|
|
2752
2754
|
await onSendFile(file);
|
|
2753
2755
|
} finally {
|
|
2754
2756
|
setIsSending(false);
|
|
2757
|
+
setIsUploading(false);
|
|
2755
2758
|
if (fileInputRef.current) fileInputRef.current.value = "";
|
|
2756
2759
|
}
|
|
2757
2760
|
},
|
|
@@ -2759,6 +2762,10 @@ function MessageInput({
|
|
|
2759
2762
|
);
|
|
2760
2763
|
return /* @__PURE__ */ jsxs("div", { className, style: styles8.container, children: [
|
|
2761
2764
|
replyTo && onCancelReply && /* @__PURE__ */ jsx(ReplyPreview, { message: replyTo, onCancel: onCancelReply }),
|
|
2765
|
+
isUploading && /* @__PURE__ */ jsxs("div", { style: styles8.uploadBanner, children: [
|
|
2766
|
+
/* @__PURE__ */ jsx("span", { style: styles8.uploadSpinner }),
|
|
2767
|
+
"Uploading file\u2026"
|
|
2768
|
+
] }),
|
|
2762
2769
|
fileError && /* @__PURE__ */ jsxs("div", { style: styles8.error, role: "alert", children: [
|
|
2763
2770
|
/* @__PURE__ */ jsx("span", { style: styles8.errorText, children: fileError }),
|
|
2764
2771
|
/* @__PURE__ */ jsx(
|
|
@@ -2844,6 +2851,26 @@ var styles8 = {
|
|
|
2844
2851
|
borderTop: "1px solid #e5e7eb",
|
|
2845
2852
|
backgroundColor: "#ffffff"
|
|
2846
2853
|
},
|
|
2854
|
+
uploadBanner: {
|
|
2855
|
+
display: "flex",
|
|
2856
|
+
alignItems: "center",
|
|
2857
|
+
gap: "8px",
|
|
2858
|
+
padding: "6px 14px",
|
|
2859
|
+
fontSize: "12px",
|
|
2860
|
+
color: "#6b7280",
|
|
2861
|
+
backgroundColor: "#f9fafb",
|
|
2862
|
+
borderBottom: "1px solid #e5e7eb"
|
|
2863
|
+
},
|
|
2864
|
+
uploadSpinner: {
|
|
2865
|
+
display: "inline-block",
|
|
2866
|
+
width: "12px",
|
|
2867
|
+
height: "12px",
|
|
2868
|
+
border: "2px solid #d1d5db",
|
|
2869
|
+
borderTopColor: "#7c3aed",
|
|
2870
|
+
borderRadius: "50%",
|
|
2871
|
+
animation: "natoe-colab-spin 0.7s linear infinite",
|
|
2872
|
+
flexShrink: 0
|
|
2873
|
+
},
|
|
2847
2874
|
error: {
|
|
2848
2875
|
display: "flex",
|
|
2849
2876
|
alignItems: "center",
|
|
@@ -5235,6 +5262,18 @@ function CollabInbox({
|
|
|
5235
5262
|
}
|
|
5236
5263
|
function buildPatientData(item) {
|
|
5237
5264
|
if (item.patientSnapshot) return item.patientSnapshot;
|
|
5265
|
+
const parts = item.name.split(" - ");
|
|
5266
|
+
if (parts.length >= 3) {
|
|
5267
|
+
const last4 = parts[parts.length - 1];
|
|
5268
|
+
const labName = parts[parts.length - 2];
|
|
5269
|
+
const patientName = parts.slice(0, parts.length - 2).join(" - ");
|
|
5270
|
+
return {
|
|
5271
|
+
patientName,
|
|
5272
|
+
labName: labName || void 0,
|
|
5273
|
+
orderId: item.orderId,
|
|
5274
|
+
displayOrderId: last4
|
|
5275
|
+
};
|
|
5276
|
+
}
|
|
5238
5277
|
return {
|
|
5239
5278
|
patientName: item.name,
|
|
5240
5279
|
orderId: item.orderId
|