vintasend 0.4.0 → 0.4.7

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.
Files changed (284) hide show
  1. package/README.md +5 -0
  2. package/dist/examples/vintasend-medplum-example/.env.example +11 -0
  3. package/dist/examples/vintasend-medplum-example/IMPLEMENTATION_PLAN_FILE_ATTACHMENTS.md +597 -0
  4. package/dist/examples/vintasend-medplum-example/README.md +190 -0
  5. package/dist/examples/vintasend-medplum-example/TUTORIAL_EMAIL_NOTIFICATIONS.md +2596 -0
  6. package/dist/examples/vintasend-medplum-example/bots/handlers/send-pending-notifications-bot.ts +39 -0
  7. package/dist/examples/vintasend-medplum-example/bots/handlers/send-task-assignment-email.ts +41 -0
  8. package/dist/examples/vintasend-medplum-example/bots/handlers/task-due-soon-notification-bot.ts +86 -0
  9. package/dist/examples/vintasend-medplum-example/bots/index.ts +53 -0
  10. package/dist/examples/vintasend-medplum-example/bots/services/emails/schedule-task-due-soon-email.ts +84 -0
  11. package/dist/examples/vintasend-medplum-example/bots/services/emails/send-task-assignment-email.test.ts +388 -0
  12. package/dist/examples/vintasend-medplum-example/bots/services/emails/send-task-assignment-email.ts +113 -0
  13. package/dist/examples/vintasend-medplum-example/bots/shared/task-due-soon-helpers.ts +115 -0
  14. package/dist/examples/vintasend-medplum-example/bots/task-assignment-bot.ts +41 -0
  15. package/dist/examples/vintasend-medplum-example/compiled-notification-templates.json +6 -0
  16. package/dist/examples/vintasend-medplum-example/esbuild-script.mjs +71 -0
  17. package/dist/examples/vintasend-medplum-example/index.html +14 -0
  18. package/dist/examples/vintasend-medplum-example/lib/constants.ts +32 -0
  19. package/dist/examples/vintasend-medplum-example/lib/extensions.ts +1 -0
  20. package/dist/examples/vintasend-medplum-example/lib/file-upload.test.ts +389 -0
  21. package/dist/examples/vintasend-medplum-example/lib/file-upload.ts +222 -0
  22. package/dist/examples/vintasend-medplum-example/lib/medplum-singleton.ts +18 -0
  23. package/dist/examples/vintasend-medplum-example/lib/notification-service.test.ts +293 -0
  24. package/dist/examples/vintasend-medplum-example/lib/notification-service.ts +284 -0
  25. package/dist/examples/vintasend-medplum-example/lib/patients.ts +20 -0
  26. package/dist/examples/vintasend-medplum-example/notification-templates/emails/task-assignment/body.html.pug +37 -0
  27. package/dist/examples/vintasend-medplum-example/notification-templates/emails/task-assignment/subject.txt.pug +4 -0
  28. package/dist/examples/vintasend-medplum-example/notification-templates/emails/task-due-soon/body.html.pug +34 -0
  29. package/dist/examples/vintasend-medplum-example/notification-templates/emails/task-due-soon/subject.txt.pug +4 -0
  30. package/dist/examples/vintasend-medplum-example/package.json +75 -0
  31. package/dist/examples/vintasend-medplum-example/plugins/gql-plugin.mjs +31 -0
  32. package/dist/examples/vintasend-medplum-example/postcss.config.mjs +21 -0
  33. package/dist/examples/vintasend-medplum-example/public/favicon.ico +0 -0
  34. package/dist/examples/vintasend-medplum-example/public/img/integrations/acuity.png +0 -0
  35. package/dist/examples/vintasend-medplum-example/public/img/integrations/auth0.png +0 -0
  36. package/dist/examples/vintasend-medplum-example/public/img/integrations/azure.png +0 -0
  37. package/dist/examples/vintasend-medplum-example/public/img/integrations/calcom.png +0 -0
  38. package/dist/examples/vintasend-medplum-example/public/img/integrations/candid.png +0 -0
  39. package/dist/examples/vintasend-medplum-example/public/img/integrations/claude.png +0 -0
  40. package/dist/examples/vintasend-medplum-example/public/img/integrations/datadog.png +0 -0
  41. package/dist/examples/vintasend-medplum-example/public/img/integrations/deepseek.png +0 -0
  42. package/dist/examples/vintasend-medplum-example/public/img/integrations/entra.png +0 -0
  43. package/dist/examples/vintasend-medplum-example/public/img/integrations/epic.png +0 -0
  44. package/dist/examples/vintasend-medplum-example/public/img/integrations/google.png +0 -0
  45. package/dist/examples/vintasend-medplum-example/public/img/integrations/healthgorilla.png +0 -0
  46. package/dist/examples/vintasend-medplum-example/public/img/integrations/healthie.png +0 -0
  47. package/dist/examples/vintasend-medplum-example/public/img/integrations/labcorp.png +0 -0
  48. package/dist/examples/vintasend-medplum-example/public/img/integrations/okta.png +0 -0
  49. package/dist/examples/vintasend-medplum-example/public/img/integrations/openai.png +0 -0
  50. package/dist/examples/vintasend-medplum-example/public/img/integrations/particle.png +0 -0
  51. package/dist/examples/vintasend-medplum-example/public/img/integrations/quest.png +0 -0
  52. package/dist/examples/vintasend-medplum-example/public/img/integrations/recaptcha.png +0 -0
  53. package/dist/examples/vintasend-medplum-example/public/img/integrations/snowflake.png +0 -0
  54. package/dist/examples/vintasend-medplum-example/public/img/integrations/stedi.png +0 -0
  55. package/dist/examples/vintasend-medplum-example/public/img/integrations/stripe.png +0 -0
  56. package/dist/examples/vintasend-medplum-example/public/img/integrations/sumo.png +0 -0
  57. package/dist/examples/vintasend-medplum-example/scripts/README.md +162 -0
  58. package/dist/examples/vintasend-medplum-example/scripts/client.ts +18 -0
  59. package/dist/examples/vintasend-medplum-example/scripts/deploy-bots.ts +171 -0
  60. package/dist/examples/vintasend-medplum-example/src/App.tsx +185 -0
  61. package/dist/examples/vintasend-medplum-example/src/components/ChargeItem/ChargeItemList.test.tsx +350 -0
  62. package/dist/examples/vintasend-medplum-example/src/components/ChargeItem/ChargeItemList.tsx +241 -0
  63. package/dist/examples/vintasend-medplum-example/src/components/ChargeItem/ChargeItemPanel.test.tsx +616 -0
  64. package/dist/examples/vintasend-medplum-example/src/components/ChargeItem/ChargeItemPanel.tsx +138 -0
  65. package/dist/examples/vintasend-medplum-example/src/components/Conditions/ConditionItem.test.tsx +92 -0
  66. package/dist/examples/vintasend-medplum-example/src/components/Conditions/ConditionItem.tsx +47 -0
  67. package/dist/examples/vintasend-medplum-example/src/components/Conditions/ConditionList.test.tsx +464 -0
  68. package/dist/examples/vintasend-medplum-example/src/components/Conditions/ConditionList.tsx +186 -0
  69. package/dist/examples/vintasend-medplum-example/src/components/Conditions/ConditionModal.test.tsx +80 -0
  70. package/dist/examples/vintasend-medplum-example/src/components/Conditions/ConditionModal.tsx +82 -0
  71. package/dist/examples/vintasend-medplum-example/src/components/DoseSpotIcon.test.tsx +100 -0
  72. package/dist/examples/vintasend-medplum-example/src/components/DoseSpotIcon.tsx +20 -0
  73. package/dist/examples/vintasend-medplum-example/src/components/IntegrationCard.module.css +3 -0
  74. package/dist/examples/vintasend-medplum-example/src/components/IntegrationCard.tsx +62 -0
  75. package/dist/examples/vintasend-medplum-example/src/components/MessageWithLinks.tsx +47 -0
  76. package/dist/examples/vintasend-medplum-example/src/components/PerformingLabInput.test.tsx +299 -0
  77. package/dist/examples/vintasend-medplum-example/src/components/PerformingLabInput.tsx +52 -0
  78. package/dist/examples/vintasend-medplum-example/src/components/ResourceFormWithRequiredProfile.tsx +82 -0
  79. package/dist/examples/vintasend-medplum-example/src/components/encounter/BillingTab.test.tsx +1016 -0
  80. package/dist/examples/vintasend-medplum-example/src/components/encounter/BillingTab.tsx +298 -0
  81. package/dist/examples/vintasend-medplum-example/src/components/encounter/EncounterChart.test.tsx +732 -0
  82. package/dist/examples/vintasend-medplum-example/src/components/encounter/EncounterChart.tsx +282 -0
  83. package/dist/examples/vintasend-medplum-example/src/components/encounter/EncounterHeader.test.tsx +268 -0
  84. package/dist/examples/vintasend-medplum-example/src/components/encounter/EncounterHeader.tsx +224 -0
  85. package/dist/examples/vintasend-medplum-example/src/components/encounter/SignAddendum.test.tsx +255 -0
  86. package/dist/examples/vintasend-medplum-example/src/components/encounter/SignAddendum.tsx +212 -0
  87. package/dist/examples/vintasend-medplum-example/src/components/encounter/SignLockDialog.test.tsx +120 -0
  88. package/dist/examples/vintasend-medplum-example/src/components/encounter/SignLockDialog.tsx +57 -0
  89. package/dist/examples/vintasend-medplum-example/src/components/encounter/VisitDetailsPanel.test.tsx +224 -0
  90. package/dist/examples/vintasend-medplum-example/src/components/encounter/VisitDetailsPanel.tsx +100 -0
  91. package/dist/examples/vintasend-medplum-example/src/components/labs/CoverageInput.test.tsx +431 -0
  92. package/dist/examples/vintasend-medplum-example/src/components/labs/CoverageInput.tsx +130 -0
  93. package/dist/examples/vintasend-medplum-example/src/components/labs/LabListItem.module.css +31 -0
  94. package/dist/examples/vintasend-medplum-example/src/components/labs/LabListItem.test.tsx +234 -0
  95. package/dist/examples/vintasend-medplum-example/src/components/labs/LabListItem.tsx +143 -0
  96. package/dist/examples/vintasend-medplum-example/src/components/labs/LabOrderDetails.module.css +11 -0
  97. package/dist/examples/vintasend-medplum-example/src/components/labs/LabOrderDetails.test.tsx +875 -0
  98. package/dist/examples/vintasend-medplum-example/src/components/labs/LabOrderDetails.tsx +943 -0
  99. package/dist/examples/vintasend-medplum-example/src/components/labs/LabResultDetails.test.tsx +413 -0
  100. package/dist/examples/vintasend-medplum-example/src/components/labs/LabResultDetails.tsx +203 -0
  101. package/dist/examples/vintasend-medplum-example/src/components/labs/LabSelectEmpty.tsx +22 -0
  102. package/dist/examples/vintasend-medplum-example/src/components/labs/README.md +104 -0
  103. package/dist/examples/vintasend-medplum-example/src/components/labs/TestMetadataCardInput.test.tsx +318 -0
  104. package/dist/examples/vintasend-medplum-example/src/components/labs/TestMetadataCardInput.tsx +87 -0
  105. package/dist/examples/vintasend-medplum-example/src/components/messages/ChatList.test.tsx +126 -0
  106. package/dist/examples/vintasend-medplum-example/src/components/messages/ChatList.tsx +38 -0
  107. package/dist/examples/vintasend-medplum-example/src/components/messages/ChatListItem.module.css +23 -0
  108. package/dist/examples/vintasend-medplum-example/src/components/messages/ChatListItem.test.tsx +167 -0
  109. package/dist/examples/vintasend-medplum-example/src/components/messages/ChatListItem.tsx +53 -0
  110. package/dist/examples/vintasend-medplum-example/src/components/messages/NewTopicDialog.test.tsx +94 -0
  111. package/dist/examples/vintasend-medplum-example/src/components/messages/NewTopicDialog.tsx +165 -0
  112. package/dist/examples/vintasend-medplum-example/src/components/messages/ParticipantFilter.module.css +8 -0
  113. package/dist/examples/vintasend-medplum-example/src/components/messages/ParticipantFilter.test.tsx +523 -0
  114. package/dist/examples/vintasend-medplum-example/src/components/messages/ParticipantFilter.tsx +230 -0
  115. package/dist/examples/vintasend-medplum-example/src/components/messages/ThreadInbox.module.css +23 -0
  116. package/dist/examples/vintasend-medplum-example/src/components/messages/ThreadInbox.test.tsx +567 -0
  117. package/dist/examples/vintasend-medplum-example/src/components/messages/ThreadInbox.tsx +358 -0
  118. package/dist/examples/vintasend-medplum-example/src/components/plandefinition/AddPlanDefinition.module.css +40 -0
  119. package/dist/examples/vintasend-medplum-example/src/components/plandefinition/AddPlanDefinition.tsx +257 -0
  120. package/dist/examples/vintasend-medplum-example/src/components/schedule/CreateVisit.module.css +7 -0
  121. package/dist/examples/vintasend-medplum-example/src/components/schedule/CreateVisit.test.tsx +279 -0
  122. package/dist/examples/vintasend-medplum-example/src/components/schedule/CreateVisit.tsx +156 -0
  123. package/dist/examples/vintasend-medplum-example/src/components/spaces/HistoryList.module.css +45 -0
  124. package/dist/examples/vintasend-medplum-example/src/components/spaces/HistoryList.test.tsx +90 -0
  125. package/dist/examples/vintasend-medplum-example/src/components/spaces/HistoryList.tsx +84 -0
  126. package/dist/examples/vintasend-medplum-example/src/components/spaces/ResourceBox.module.css +26 -0
  127. package/dist/examples/vintasend-medplum-example/src/components/spaces/ResourceBox.tsx +90 -0
  128. package/dist/examples/vintasend-medplum-example/src/components/spaces/ResourcePanel.test.tsx +305 -0
  129. package/dist/examples/vintasend-medplum-example/src/components/spaces/ResourcePanel.tsx +46 -0
  130. package/dist/examples/vintasend-medplum-example/src/components/spaces/SpacesInbox.module.css +262 -0
  131. package/dist/examples/vintasend-medplum-example/src/components/spaces/SpacesInbox.test.tsx +622 -0
  132. package/dist/examples/vintasend-medplum-example/src/components/spaces/SpacesInbox.tsx +286 -0
  133. package/dist/examples/vintasend-medplum-example/src/components/tasks/NewTaskModal.tsx +275 -0
  134. package/dist/examples/vintasend-medplum-example/src/components/tasks/TaskAttachmentList.tsx +132 -0
  135. package/dist/examples/vintasend-medplum-example/src/components/tasks/TaskBoard.module.css +45 -0
  136. package/dist/examples/vintasend-medplum-example/src/components/tasks/TaskBoard.test.tsx +749 -0
  137. package/dist/examples/vintasend-medplum-example/src/components/tasks/TaskBoard.tsx +416 -0
  138. package/dist/examples/vintasend-medplum-example/src/components/tasks/TaskDetailPanel.test.tsx +278 -0
  139. package/dist/examples/vintasend-medplum-example/src/components/tasks/TaskDetailPanel.tsx +133 -0
  140. package/dist/examples/vintasend-medplum-example/src/components/tasks/TaskDetailsModal.module.css +16 -0
  141. package/dist/examples/vintasend-medplum-example/src/components/tasks/TaskDetailsModal.test.tsx +255 -0
  142. package/dist/examples/vintasend-medplum-example/src/components/tasks/TaskDetailsModal.tsx +203 -0
  143. package/dist/examples/vintasend-medplum-example/src/components/tasks/TaskFileUpload.tsx +129 -0
  144. package/dist/examples/vintasend-medplum-example/src/components/tasks/TaskFilterMenu.test.tsx +156 -0
  145. package/dist/examples/vintasend-medplum-example/src/components/tasks/TaskFilterMenu.tsx +142 -0
  146. package/dist/examples/vintasend-medplum-example/src/components/tasks/TaskFilterMenu.utils.ts +28 -0
  147. package/dist/examples/vintasend-medplum-example/src/components/tasks/TaskInputNote.test.tsx +134 -0
  148. package/dist/examples/vintasend-medplum-example/src/components/tasks/TaskInputNote.tsx +250 -0
  149. package/dist/examples/vintasend-medplum-example/src/components/tasks/TaskListItem.module.css +23 -0
  150. package/dist/examples/vintasend-medplum-example/src/components/tasks/TaskListItem.test.tsx +149 -0
  151. package/dist/examples/vintasend-medplum-example/src/components/tasks/TaskListItem.tsx +53 -0
  152. package/dist/examples/vintasend-medplum-example/src/components/tasks/TaskNoteItem.test.tsx +68 -0
  153. package/dist/examples/vintasend-medplum-example/src/components/tasks/TaskNoteItem.tsx +46 -0
  154. package/dist/examples/vintasend-medplum-example/src/components/tasks/TaskProperties.test.tsx +555 -0
  155. package/dist/examples/vintasend-medplum-example/src/components/tasks/TaskProperties.tsx +170 -0
  156. package/dist/examples/vintasend-medplum-example/src/components/tasks/TaskSelectEmpty.test.tsx +32 -0
  157. package/dist/examples/vintasend-medplum-example/src/components/tasks/TaskSelectEmpty.tsx +34 -0
  158. package/dist/examples/vintasend-medplum-example/src/components/tasks/encounter/SimpleTask.test.tsx +47 -0
  159. package/dist/examples/vintasend-medplum-example/src/components/tasks/encounter/SimpleTask.tsx +29 -0
  160. package/dist/examples/vintasend-medplum-example/src/components/tasks/encounter/TaskPanel.test.tsx +285 -0
  161. package/dist/examples/vintasend-medplum-example/src/components/tasks/encounter/TaskPanel.tsx +129 -0
  162. package/dist/examples/vintasend-medplum-example/src/components/tasks/encounter/TaskQuestionnaireForm.test.tsx +455 -0
  163. package/dist/examples/vintasend-medplum-example/src/components/tasks/encounter/TaskQuestionnaireForm.tsx +167 -0
  164. package/dist/examples/vintasend-medplum-example/src/components/tasks/encounter/TaskServiceRequest.test.tsx +435 -0
  165. package/dist/examples/vintasend-medplum-example/src/components/tasks/encounter/TaskServiceRequest.tsx +116 -0
  166. package/dist/examples/vintasend-medplum-example/src/components/tasks/encounter/TaskStatusPanel.module.css +38 -0
  167. package/dist/examples/vintasend-medplum-example/src/components/tasks/encounter/TaskStatusPanel.test.tsx +200 -0
  168. package/dist/examples/vintasend-medplum-example/src/components/tasks/encounter/TaskStatusPanel.tsx +84 -0
  169. package/dist/examples/vintasend-medplum-example/src/components/utils.test.ts +176 -0
  170. package/dist/examples/vintasend-medplum-example/src/components/utils.ts +17 -0
  171. package/dist/examples/vintasend-medplum-example/src/config/constants.ts +3 -0
  172. package/dist/examples/vintasend-medplum-example/src/hooks/useDebouncedUpdateResource.test.tsx +166 -0
  173. package/dist/examples/vintasend-medplum-example/src/hooks/useDebouncedUpdateResource.ts +28 -0
  174. package/dist/examples/vintasend-medplum-example/src/hooks/useEncounter.test.tsx +94 -0
  175. package/dist/examples/vintasend-medplum-example/src/hooks/useEncounter.ts +11 -0
  176. package/dist/examples/vintasend-medplum-example/src/hooks/useEncounterChart.test.tsx +477 -0
  177. package/dist/examples/vintasend-medplum-example/src/hooks/useEncounterChart.ts +191 -0
  178. package/dist/examples/vintasend-medplum-example/src/hooks/usePatient.test.tsx +100 -0
  179. package/dist/examples/vintasend-medplum-example/src/hooks/usePatient.ts +18 -0
  180. package/dist/examples/vintasend-medplum-example/src/hooks/useThreadInbox.test.tsx +379 -0
  181. package/dist/examples/vintasend-medplum-example/src/hooks/useThreadInbox.ts +194 -0
  182. package/dist/examples/vintasend-medplum-example/src/index.css +8 -0
  183. package/dist/examples/vintasend-medplum-example/src/main.tsx +57 -0
  184. package/dist/examples/vintasend-medplum-example/src/pages/SearchPage.module.css +6 -0
  185. package/dist/examples/vintasend-medplum-example/src/pages/SearchPage.test.tsx +295 -0
  186. package/dist/examples/vintasend-medplum-example/src/pages/SearchPage.tsx +124 -0
  187. package/dist/examples/vintasend-medplum-example/src/pages/SignInPage.test.tsx +77 -0
  188. package/dist/examples/vintasend-medplum-example/src/pages/SignInPage.tsx +22 -0
  189. package/dist/examples/vintasend-medplum-example/src/pages/encounter/EncounterChartPage.test.tsx +87 -0
  190. package/dist/examples/vintasend-medplum-example/src/pages/encounter/EncounterChartPage.tsx +27 -0
  191. package/dist/examples/vintasend-medplum-example/src/pages/encounter/EncounterModal.module.css +16 -0
  192. package/dist/examples/vintasend-medplum-example/src/pages/encounter/EncounterModal.test.tsx +287 -0
  193. package/dist/examples/vintasend-medplum-example/src/pages/encounter/EncounterModal.tsx +151 -0
  194. package/dist/examples/vintasend-medplum-example/src/pages/integrations/DoseSpotFavoritesPage.test.tsx +519 -0
  195. package/dist/examples/vintasend-medplum-example/src/pages/integrations/DoseSpotFavoritesPage.tsx +179 -0
  196. package/dist/examples/vintasend-medplum-example/src/pages/integrations/FavoriteMedicationsTable.tsx +76 -0
  197. package/dist/examples/vintasend-medplum-example/src/pages/integrations/IntegrationsPage.test.tsx +234 -0
  198. package/dist/examples/vintasend-medplum-example/src/pages/integrations/IntegrationsPage.tsx +222 -0
  199. package/dist/examples/vintasend-medplum-example/src/pages/labs/OrderLabsPage.test.tsx +356 -0
  200. package/dist/examples/vintasend-medplum-example/src/pages/labs/OrderLabsPage.tsx +275 -0
  201. package/dist/examples/vintasend-medplum-example/src/pages/messages/MessagesPage.module.css +8 -0
  202. package/dist/examples/vintasend-medplum-example/src/pages/messages/MessagesPage.test.tsx +103 -0
  203. package/dist/examples/vintasend-medplum-example/src/pages/messages/MessagesPage.tsx +78 -0
  204. package/dist/examples/vintasend-medplum-example/src/pages/patient/CommunicationTab.test.tsx +84 -0
  205. package/dist/examples/vintasend-medplum-example/src/pages/patient/CommunicationTab.tsx +82 -0
  206. package/dist/examples/vintasend-medplum-example/src/pages/patient/DoseSpotAdvancedOptions.test.tsx +364 -0
  207. package/dist/examples/vintasend-medplum-example/src/pages/patient/DoseSpotAdvancedOptions.tsx +149 -0
  208. package/dist/examples/vintasend-medplum-example/src/pages/patient/DoseSpotTab.test.tsx +159 -0
  209. package/dist/examples/vintasend-medplum-example/src/pages/patient/DoseSpotTab.tsx +37 -0
  210. package/dist/examples/vintasend-medplum-example/src/pages/patient/EditTab.test.tsx +140 -0
  211. package/dist/examples/vintasend-medplum-example/src/pages/patient/EditTab.tsx +72 -0
  212. package/dist/examples/vintasend-medplum-example/src/pages/patient/ExportTab.test.tsx +57 -0
  213. package/dist/examples/vintasend-medplum-example/src/pages/patient/ExportTab.tsx +14 -0
  214. package/dist/examples/vintasend-medplum-example/src/pages/patient/IntakeFormPage.test.tsx +241 -0
  215. package/dist/examples/vintasend-medplum-example/src/pages/patient/IntakeFormPage.tsx +710 -0
  216. package/dist/examples/vintasend-medplum-example/src/pages/patient/LabsPage.module.css +37 -0
  217. package/dist/examples/vintasend-medplum-example/src/pages/patient/LabsPage.test.tsx +428 -0
  218. package/dist/examples/vintasend-medplum-example/src/pages/patient/LabsPage.tsx +334 -0
  219. package/dist/examples/vintasend-medplum-example/src/pages/patient/PatientPage.module.css +24 -0
  220. package/dist/examples/vintasend-medplum-example/src/pages/patient/PatientPage.test.tsx +154 -0
  221. package/dist/examples/vintasend-medplum-example/src/pages/patient/PatientPage.tsx +115 -0
  222. package/dist/examples/vintasend-medplum-example/src/pages/patient/PatientPage.utils.test.ts +223 -0
  223. package/dist/examples/vintasend-medplum-example/src/pages/patient/PatientPage.utils.ts +89 -0
  224. package/dist/examples/vintasend-medplum-example/src/pages/patient/PatientSearchPage.test.tsx +147 -0
  225. package/dist/examples/vintasend-medplum-example/src/pages/patient/PatientSearchPage.tsx +79 -0
  226. package/dist/examples/vintasend-medplum-example/src/pages/patient/PatientTabsNavigation.tsx +35 -0
  227. package/dist/examples/vintasend-medplum-example/src/pages/patient/TasksTab.test.tsx +185 -0
  228. package/dist/examples/vintasend-medplum-example/src/pages/patient/TasksTab.tsx +115 -0
  229. package/dist/examples/vintasend-medplum-example/src/pages/patient/TimelineTab.tsx +14 -0
  230. package/dist/examples/vintasend-medplum-example/src/pages/resource/ResourceCreatePage.test.tsx +170 -0
  231. package/dist/examples/vintasend-medplum-example/src/pages/resource/ResourceCreatePage.tsx +117 -0
  232. package/dist/examples/vintasend-medplum-example/src/pages/resource/ResourceDetailPage.tsx +28 -0
  233. package/dist/examples/vintasend-medplum-example/src/pages/resource/ResourceEditPage.test.tsx +131 -0
  234. package/dist/examples/vintasend-medplum-example/src/pages/resource/ResourceEditPage.tsx +65 -0
  235. package/dist/examples/vintasend-medplum-example/src/pages/resource/ResourceHistoryPage.test.tsx +108 -0
  236. package/dist/examples/vintasend-medplum-example/src/pages/resource/ResourceHistoryPage.tsx +16 -0
  237. package/dist/examples/vintasend-medplum-example/src/pages/resource/ResourcePage.module.css +7 -0
  238. package/dist/examples/vintasend-medplum-example/src/pages/resource/ResourcePage.test.tsx +37 -0
  239. package/dist/examples/vintasend-medplum-example/src/pages/resource/ResourcePage.tsx +44 -0
  240. package/dist/examples/vintasend-medplum-example/src/pages/resource/useResourceType.ts +44 -0
  241. package/dist/examples/vintasend-medplum-example/src/pages/resource/utils.ts +9 -0
  242. package/dist/examples/vintasend-medplum-example/src/pages/schedule/SchedulePage.test.tsx +302 -0
  243. package/dist/examples/vintasend-medplum-example/src/pages/schedule/SchedulePage.tsx +416 -0
  244. package/dist/examples/vintasend-medplum-example/src/pages/spaces/ChatInput.tsx +91 -0
  245. package/dist/examples/vintasend-medplum-example/src/pages/spaces/SpacesPage.module.css +6 -0
  246. package/dist/examples/vintasend-medplum-example/src/pages/spaces/SpacesPage.test.tsx +102 -0
  247. package/dist/examples/vintasend-medplum-example/src/pages/spaces/SpacesPage.tsx +44 -0
  248. package/dist/examples/vintasend-medplum-example/src/pages/tasks/TasksPage.module.css +7 -0
  249. package/dist/examples/vintasend-medplum-example/src/pages/tasks/TasksPage.test.tsx +133 -0
  250. package/dist/examples/vintasend-medplum-example/src/pages/tasks/TasksPage.tsx +91 -0
  251. package/dist/examples/vintasend-medplum-example/src/test-utils/render.tsx +20 -0
  252. package/dist/examples/vintasend-medplum-example/src/test.setup.ts +49 -0
  253. package/dist/examples/vintasend-medplum-example/src/types/encounter.ts +8 -0
  254. package/dist/examples/vintasend-medplum-example/src/types/spaces.ts +10 -0
  255. package/dist/examples/vintasend-medplum-example/src/utils/chargeitems.test.ts +141 -0
  256. package/dist/examples/vintasend-medplum-example/src/utils/chargeitems.ts +59 -0
  257. package/dist/examples/vintasend-medplum-example/src/utils/claims.test.ts +153 -0
  258. package/dist/examples/vintasend-medplum-example/src/utils/claims.ts +65 -0
  259. package/dist/examples/vintasend-medplum-example/src/utils/communication-search.ts +47 -0
  260. package/dist/examples/vintasend-medplum-example/src/utils/coverage.test.ts +48 -0
  261. package/dist/examples/vintasend-medplum-example/src/utils/coverage.ts +33 -0
  262. package/dist/examples/vintasend-medplum-example/src/utils/documentReference.test.ts +102 -0
  263. package/dist/examples/vintasend-medplum-example/src/utils/documentReference.ts +55 -0
  264. package/dist/examples/vintasend-medplum-example/src/utils/encounter.test.ts +169 -0
  265. package/dist/examples/vintasend-medplum-example/src/utils/encounter.ts +261 -0
  266. package/dist/examples/vintasend-medplum-example/src/utils/intake-form.test.ts +154 -0
  267. package/dist/examples/vintasend-medplum-example/src/utils/intake-form.ts +272 -0
  268. package/dist/examples/vintasend-medplum-example/src/utils/intake-utils.test.ts +1137 -0
  269. package/dist/examples/vintasend-medplum-example/src/utils/intake-utils.ts +827 -0
  270. package/dist/examples/vintasend-medplum-example/src/utils/notifications.test.ts +27 -0
  271. package/dist/examples/vintasend-medplum-example/src/utils/notifications.ts +15 -0
  272. package/dist/examples/vintasend-medplum-example/src/utils/spaceMessaging.ts +249 -0
  273. package/dist/examples/vintasend-medplum-example/src/utils/spacePersistence.test.ts +450 -0
  274. package/dist/examples/vintasend-medplum-example/src/utils/spacePersistence.ts +147 -0
  275. package/dist/examples/vintasend-medplum-example/src/utils/task-search.ts +63 -0
  276. package/dist/examples/vintasend-medplum-example/src/vite-env.d.ts +3 -0
  277. package/dist/examples/vintasend-medplum-example/tsconfig.bots.json +4 -0
  278. package/dist/examples/vintasend-medplum-example/tsconfig.json +19 -0
  279. package/dist/examples/vintasend-medplum-example/vercel.json +3 -0
  280. package/dist/examples/vintasend-medplum-example/vite.config.ts +44 -0
  281. package/dist/services/notification-backends/base-notification-backend.d.ts +5 -0
  282. package/dist/services/notification-service.js +11 -1
  283. package/dist/services/notification-template-renderers/base-email-template-renderer.d.ts +5 -0
  284. package/package.json +1 -1
@@ -0,0 +1,90 @@
1
+ // SPDX-FileCopyrightText: Copyright Orangebot, Inc. and Medplum contributors
2
+ // SPDX-License-Identifier: Apache-2.0
3
+ import { Box, Group, Loader, Paper, Text, ThemeIcon } from '@mantine/core';
4
+ import { getDisplayString } from '@medplum/core';
5
+ import type { Resource } from '@medplum/fhirtypes';
6
+ import { useMedplum } from '@medplum/react';
7
+ import { IconFileText } from '@tabler/icons-react';
8
+ import { useEffect, useState } from 'react';
9
+ import type { JSX } from 'react';
10
+ import classes from './ResourceBox.module.css';
11
+
12
+ interface ResourceBoxProps {
13
+ resourceReference: string;
14
+ onClick: (resourceReference: string) => void;
15
+ }
16
+
17
+ export function ResourceBox({ resourceReference, onClick }: ResourceBoxProps): JSX.Element {
18
+ const medplum = useMedplum();
19
+ const [resource, setResource] = useState<Resource | undefined>();
20
+ const [loading, setLoading] = useState(true);
21
+ const [error, setError] = useState<string | undefined>();
22
+
23
+ useEffect(() => {
24
+ const [resourceType, resourceId] = resourceReference.split('/');
25
+ if (!resourceType || !resourceId) {
26
+ setError('Invalid resource reference');
27
+ setLoading(false);
28
+ return;
29
+ }
30
+
31
+ setLoading(true);
32
+ setError(undefined);
33
+
34
+ medplum
35
+ .readReference({ reference: resourceReference })
36
+ .then(setResource)
37
+ .catch((err) => setError(err instanceof Error ? err.message : String(err)))
38
+ .finally(() => setLoading(false));
39
+ }, [medplum, resourceReference]);
40
+
41
+ if (loading) {
42
+ return (
43
+ <Paper withBorder p="sm" className={classes.resourceBox}>
44
+ <Group gap="sm" wrap="nowrap">
45
+ <Loader size="sm" />
46
+ <Text size="sm" c="dimmed">
47
+ Loading...
48
+ </Text>
49
+ </Group>
50
+ </Paper>
51
+ );
52
+ }
53
+
54
+ if (error || !resource) {
55
+ return (
56
+ <Paper withBorder p="sm" className={classes.resourceBox}>
57
+ <Text size="sm" c="red">
58
+ {error || 'Unable to find resource'}
59
+ </Text>
60
+ </Paper>
61
+ );
62
+ }
63
+
64
+ const displayName = getDisplayString(resource) ?? '';
65
+ const resourceType = resource.resourceType;
66
+
67
+ return (
68
+ <Paper
69
+ withBorder
70
+ p="sm"
71
+ className={classes.resourceBox}
72
+ onClick={() => onClick(resourceReference)}
73
+ data-testid="resource-box"
74
+ >
75
+ <Group gap="sm" wrap="nowrap">
76
+ <ThemeIcon size="lg" variant="light" color="violet">
77
+ <IconFileText size={20} />
78
+ </ThemeIcon>
79
+ <Box className={classes.content}>
80
+ <Text size="sm" fw={600} c="violet.7">
81
+ {resourceType}
82
+ </Text>
83
+ <Text size="xs" c="dimmed" truncate>
84
+ {displayName}
85
+ </Text>
86
+ </Box>
87
+ </Group>
88
+ </Paper>
89
+ );
90
+ }
@@ -0,0 +1,305 @@
1
+ // SPDX-FileCopyrightText: Copyright Orangebot, Inc. and Medplum contributors
2
+ // SPDX-License-Identifier: Apache-2.0
3
+ import { MantineProvider } from '@mantine/core';
4
+ import { Notifications } from '@mantine/notifications';
5
+ import { MockClient } from '@medplum/mock';
6
+ import type {
7
+ DiagnosticReport,
8
+ Encounter,
9
+ Observation,
10
+ Patient,
11
+ Practitioner,
12
+ ServiceRequest,
13
+ Task,
14
+ } from '@medplum/fhirtypes';
15
+ import { MedplumProvider } from '@medplum/react';
16
+ import { render, screen, waitFor } from '@testing-library/react';
17
+ import { MemoryRouter, Routes, Route } from 'react-router';
18
+ import { describe, expect, test, vi, beforeEach } from 'vitest';
19
+ import { ResourcePanel } from './ResourcePanel';
20
+ import { randomUUID } from 'crypto';
21
+
22
+ describe('ResourcePanel', () => {
23
+ let medplum: MockClient;
24
+
25
+ beforeEach(() => {
26
+ medplum = new MockClient();
27
+ vi.clearAllMocks();
28
+ });
29
+
30
+ function setup<T extends { resourceType: string; id?: string }>(resource: T | { reference: string }): void {
31
+ render(
32
+ <MemoryRouter initialEntries={['/spaces']}>
33
+ <MedplumProvider medplum={medplum}>
34
+ <MantineProvider>
35
+ <Notifications />
36
+ <Routes>
37
+ <Route path="/spaces" element={<ResourcePanel resource={resource as any} />} />
38
+ </Routes>
39
+ </MantineProvider>
40
+ </MedplumProvider>
41
+ </MemoryRouter>
42
+ );
43
+ }
44
+
45
+ test('renders loading state when resource is not yet loaded', async () => {
46
+ // Pass a reference that will need to be resolved
47
+ setup({ reference: 'Patient/unknown-patient' });
48
+
49
+ await waitFor(() => {
50
+ expect(screen.getByText('Loading resource...')).toBeInTheDocument();
51
+ });
52
+ });
53
+
54
+ test('renders PatientSummary for Patient resource', async () => {
55
+ const patientId = randomUUID();
56
+ const patient: Patient = {
57
+ resourceType: 'Patient',
58
+ id: patientId,
59
+ name: [{ given: ['Homer'], family: 'Simpson' }],
60
+ };
61
+ await medplum.createResource(patient);
62
+
63
+ setup(patient);
64
+
65
+ await waitFor(() => {
66
+ expect(screen.getByTestId('resource-panel')).toBeInTheDocument();
67
+ });
68
+
69
+ // PatientSummary should render patient information
70
+ expect(screen.getByText(/Homer/i)).toBeInTheDocument();
71
+ });
72
+
73
+ test('renders TaskDetailPanel for Task resource', async () => {
74
+ const task: Task = {
75
+ resourceType: 'Task',
76
+ id: 'task-123',
77
+ status: 'in-progress',
78
+ intent: 'order',
79
+ code: { text: 'Test Task' },
80
+ description: 'Task description for testing',
81
+ };
82
+ await medplum.createResource(task);
83
+
84
+ setup(task);
85
+
86
+ await waitFor(() => {
87
+ expect(screen.getByTestId('resource-panel')).toBeInTheDocument();
88
+ });
89
+
90
+ // TaskDetailPanel should render task information
91
+ await waitFor(() => {
92
+ expect(screen.getByText('Test Task')).toBeInTheDocument();
93
+ });
94
+ });
95
+
96
+ test('renders LabResultDetails for DiagnosticReport resource', async () => {
97
+ const diagnosticReport: DiagnosticReport = {
98
+ resourceType: 'DiagnosticReport',
99
+ id: 'dr-123',
100
+ status: 'final',
101
+ code: { text: 'Complete Blood Count', coding: [{ display: 'CBC' }] },
102
+ conclusion: 'Normal results',
103
+ };
104
+ await medplum.createResource(diagnosticReport);
105
+
106
+ setup(diagnosticReport);
107
+
108
+ await waitFor(() => {
109
+ expect(screen.getByTestId('resource-panel')).toBeInTheDocument();
110
+ });
111
+ });
112
+
113
+ test('renders LabOrderDetails for ServiceRequest resource', async () => {
114
+ const patient: Patient = {
115
+ resourceType: 'Patient',
116
+ id: 'patient-sr',
117
+ name: [{ given: ['Test'], family: 'Patient' }],
118
+ };
119
+ await medplum.createResource(patient);
120
+
121
+ const serviceRequest: ServiceRequest = {
122
+ resourceType: 'ServiceRequest',
123
+ id: 'sr-123',
124
+ status: 'active',
125
+ intent: 'order',
126
+ code: { text: 'Lab Order' },
127
+ subject: { reference: 'Patient/patient-sr' },
128
+ };
129
+ await medplum.createResource(serviceRequest);
130
+
131
+ setup(serviceRequest);
132
+
133
+ await waitFor(() => {
134
+ expect(screen.getByTestId('resource-panel')).toBeInTheDocument();
135
+ });
136
+ });
137
+
138
+ test('renders EncounterChart for Encounter resource', async () => {
139
+ const patient: Patient = {
140
+ resourceType: 'Patient',
141
+ id: 'patient-enc',
142
+ name: [{ given: ['Test'], family: 'Patient' }],
143
+ };
144
+ await medplum.createResource(patient);
145
+
146
+ const encounter: Encounter = {
147
+ resourceType: 'Encounter',
148
+ id: 'enc-123',
149
+ status: 'in-progress',
150
+ class: { code: 'AMB', display: 'Ambulatory' },
151
+ subject: { reference: 'Patient/patient-enc' },
152
+ };
153
+ await medplum.createResource(encounter);
154
+
155
+ setup(encounter);
156
+
157
+ await waitFor(() => {
158
+ expect(screen.getByTestId('resource-panel')).toBeInTheDocument();
159
+ });
160
+ });
161
+
162
+ test('renders ResourceTable for unknown resource types', async () => {
163
+ const observationId = randomUUID();
164
+ const observation: Observation = {
165
+ resourceType: 'Observation',
166
+ id: observationId,
167
+ status: 'final',
168
+ code: { text: 'Blood Pressure' },
169
+ };
170
+ await medplum.createResource(observation);
171
+
172
+ setup(observation);
173
+
174
+ await waitFor(() => {
175
+ expect(screen.getByTestId('resource-panel')).toBeInTheDocument();
176
+ });
177
+
178
+ // ResourceTable should be rendered - look for the code text instead
179
+ await waitFor(() => {
180
+ expect(screen.getByText(/Blood Pressure/i)).toBeInTheDocument();
181
+ });
182
+ });
183
+
184
+ test('renders Practitioner using ResourceTable', async () => {
185
+ const practitionerId = randomUUID();
186
+ const practitioner: Practitioner = {
187
+ resourceType: 'Practitioner',
188
+ id: practitionerId,
189
+ name: [{ given: ['Alice'], family: 'Smith' }],
190
+ };
191
+ await medplum.createResource(practitioner);
192
+
193
+ setup(practitioner);
194
+
195
+ await waitFor(() => {
196
+ expect(screen.getByTestId('resource-panel')).toBeInTheDocument();
197
+ });
198
+ });
199
+
200
+ test('handles resource passed as reference', async () => {
201
+ const patient: Patient = {
202
+ resourceType: 'Patient',
203
+ id: 'ref-patient',
204
+ name: [{ given: ['Referenced'], family: 'Patient' }],
205
+ };
206
+ await medplum.createResource(patient);
207
+
208
+ setup({ reference: 'Patient/ref-patient' });
209
+
210
+ await waitFor(() => {
211
+ expect(screen.getByTestId('resource-panel')).toBeInTheDocument();
212
+ });
213
+
214
+ // Should resolve reference and render PatientSummary
215
+ await waitFor(() => {
216
+ expect(screen.getByText(/Referenced/i)).toBeInTheDocument();
217
+ });
218
+ });
219
+
220
+ test('handles Task reference resolution', async () => {
221
+ const task: Task = {
222
+ resourceType: 'Task',
223
+ id: 'ref-task',
224
+ status: 'draft',
225
+ intent: 'order',
226
+ code: { text: 'Referenced Task' },
227
+ };
228
+ await medplum.createResource(task);
229
+
230
+ setup({ reference: 'Task/ref-task' });
231
+
232
+ await waitFor(() => {
233
+ expect(screen.getByTestId('resource-panel')).toBeInTheDocument();
234
+ });
235
+
236
+ await waitFor(() => {
237
+ expect(screen.getByText('Referenced Task')).toBeInTheDocument();
238
+ });
239
+ });
240
+
241
+ test('handles DiagnosticReport reference resolution', async () => {
242
+ const dr: DiagnosticReport = {
243
+ resourceType: 'DiagnosticReport',
244
+ id: 'ref-dr',
245
+ status: 'final',
246
+ code: { text: 'Referenced Lab Result' },
247
+ };
248
+ await medplum.createResource(dr);
249
+
250
+ setup({ reference: 'DiagnosticReport/ref-dr' });
251
+
252
+ await waitFor(() => {
253
+ expect(screen.getByTestId('resource-panel')).toBeInTheDocument();
254
+ });
255
+ });
256
+
257
+ test('handles ServiceRequest reference resolution', async () => {
258
+ const patient: Patient = {
259
+ resourceType: 'Patient',
260
+ id: 'patient-ref-sr',
261
+ name: [{ given: ['Test'], family: 'Patient' }],
262
+ };
263
+ await medplum.createResource(patient);
264
+
265
+ const sr: ServiceRequest = {
266
+ resourceType: 'ServiceRequest',
267
+ id: 'ref-sr',
268
+ status: 'active',
269
+ intent: 'order',
270
+ code: { text: 'Referenced Lab Order' },
271
+ subject: { reference: 'Patient/patient-ref-sr' },
272
+ };
273
+ await medplum.createResource(sr);
274
+
275
+ setup({ reference: 'ServiceRequest/ref-sr' });
276
+
277
+ await waitFor(() => {
278
+ expect(screen.getByTestId('resource-panel')).toBeInTheDocument();
279
+ });
280
+ });
281
+
282
+ test('handles Encounter reference resolution', async () => {
283
+ const patient: Patient = {
284
+ resourceType: 'Patient',
285
+ id: 'patient-ref-enc',
286
+ name: [{ given: ['Test'], family: 'Patient' }],
287
+ };
288
+ await medplum.createResource(patient);
289
+
290
+ const encounter: Encounter = {
291
+ resourceType: 'Encounter',
292
+ id: 'ref-enc',
293
+ status: 'finished',
294
+ class: { code: 'AMB' },
295
+ subject: { reference: 'Patient/patient-ref-enc' },
296
+ };
297
+ await medplum.createResource(encounter);
298
+
299
+ setup({ reference: 'Encounter/ref-enc' });
300
+
301
+ await waitFor(() => {
302
+ expect(screen.getByTestId('resource-panel')).toBeInTheDocument();
303
+ });
304
+ });
305
+ });
@@ -0,0 +1,46 @@
1
+ // SPDX-FileCopyrightText: Copyright Orangebot, Inc. and Medplum contributors
2
+ // SPDX-License-Identifier: Apache-2.0
3
+ import { Box, Text } from '@mantine/core';
4
+ import type { Reference, Resource } from '@medplum/fhirtypes';
5
+ import { ResourceTable, useResource, PatientSummary } from '@medplum/react';
6
+ import type { JSX } from 'react';
7
+ import { LabResultDetails } from '../labs/LabResultDetails';
8
+ import { LabOrderDetails } from '../labs/LabOrderDetails';
9
+ import { EncounterChart } from '../encounter/EncounterChart';
10
+ import { TaskDetailPanel } from '../tasks/TaskDetailPanel';
11
+
12
+ interface ResourcePanelProps<T extends Resource = Resource> {
13
+ resource: Reference<T> | T;
14
+ }
15
+
16
+ export function ResourcePanel<T extends Resource = Resource>(props: ResourcePanelProps<T>): JSX.Element | null {
17
+ const { resource } = props;
18
+ const displayResource = useResource(resource);
19
+
20
+ const renderResourceContent = (): JSX.Element => {
21
+ if (!displayResource) {
22
+ return <Text c="dimmed">Loading resource...</Text>;
23
+ }
24
+
25
+ switch (displayResource.resourceType) {
26
+ case 'Patient':
27
+ return <PatientSummary patient={displayResource} />;
28
+ case 'Task':
29
+ return <TaskDetailPanel task={displayResource} />;
30
+ case 'DiagnosticReport':
31
+ return <LabResultDetails result={displayResource} />;
32
+ case 'ServiceRequest':
33
+ return <LabOrderDetails order={displayResource} />;
34
+ case 'Encounter':
35
+ return <EncounterChart encounter={displayResource} />;
36
+ default:
37
+ return <ResourceTable value={displayResource} />;
38
+ }
39
+ };
40
+
41
+ return (
42
+ <Box p="md" data-testid="resource-panel">
43
+ {renderResourceContent()}
44
+ </Box>
45
+ );
46
+ }
@@ -0,0 +1,262 @@
1
+ @keyframes fadeOut {
2
+ from {
3
+ opacity: 1;
4
+ }
5
+ to {
6
+ opacity: 0;
7
+ }
8
+ }
9
+
10
+ @keyframes fadeIn {
11
+ from {
12
+ opacity: 0;
13
+ transform: translateY(10px);
14
+ }
15
+ to {
16
+ opacity: 1;
17
+ transform: translateY(0);
18
+ }
19
+ }
20
+
21
+ @keyframes slideIn {
22
+ from {
23
+ opacity: 0;
24
+ transform: translateX(-20px);
25
+ }
26
+ to {
27
+ opacity: 1;
28
+ transform: translateX(0);
29
+ }
30
+ }
31
+
32
+ /* Sidebar */
33
+ .sidebar {
34
+ width: 280px;
35
+ /* background-color: var(--mantine-color-white); */
36
+ color: var(--mantine-color-dark-9);
37
+ display: flex;
38
+ flex-direction: column;
39
+ border-right: 1px solid var(--mantine-color-gray-2);
40
+ transition: width 0.3s ease;
41
+ flex-shrink: 0;
42
+ padding: 0;
43
+ }
44
+
45
+ .sidebarHeader {
46
+ padding: var(--mantine-spacing-md);
47
+ border-bottom: 1px solid var(--mantine-color-gray-2);
48
+ display: flex;
49
+ justify-content: space-between;
50
+ align-items: center;
51
+ }
52
+
53
+ .sidebarTitle {
54
+ font-weight: 600;
55
+ color: var(--mantine-color-dark-9);
56
+ font-size: var(--mantine-font-size-sm);
57
+ text-transform: uppercase;
58
+ letter-spacing: 0.5px;
59
+ }
60
+
61
+ .sidebarContent {
62
+ flex: 1;
63
+ overflow-y: auto;
64
+ padding: 0;
65
+ }
66
+
67
+ /* Main Chat Area */
68
+ .chatContainer {
69
+ flex: 1;
70
+ display: flex;
71
+ flex-direction: column;
72
+ background-color: var(--mantine-color-body);
73
+ position: relative;
74
+ overflow: hidden;
75
+ }
76
+
77
+ .chatHeader {
78
+ height: 42px;
79
+ border-bottom: 1px solid var(--mantine-color-gray-2);
80
+ backdrop-filter: blur(10px);
81
+ z-index: 10;
82
+ display: flex;
83
+ justify-content: space-between;
84
+ align-items: center;
85
+ padding-right: var(--mantine-spacing-xs);
86
+ padding-left: var(--mantine-spacing-xs);
87
+ }
88
+
89
+ .messagesArea {
90
+ flex: 1;
91
+ overflow-y: auto;
92
+ padding: 0;
93
+ display: flex;
94
+ flex-direction: column;
95
+ gap: var(--mantine-spacing-lg);
96
+ }
97
+
98
+ .messageWrapper {
99
+ display: flex;
100
+ flex-direction: column;
101
+ max-width: 80%;
102
+ width: auto;
103
+ margin: 0;
104
+ animation: fadeIn 0.3s ease-out;
105
+ }
106
+
107
+ .userMessage {
108
+ align-self: flex-end;
109
+ align-items: flex-end;
110
+ }
111
+
112
+ .assistantMessage {
113
+ align-self: flex-start;
114
+ align-items: flex-start;
115
+ }
116
+
117
+ .messageContent {
118
+ padding: var(--mantine-spacing-md);
119
+ border-radius: var(--mantine-radius-lg);
120
+ font-size: var(--mantine-font-size-md);
121
+ line-height: 1.6;
122
+ position: relative;
123
+ word-break: break-word;
124
+ }
125
+
126
+ .userMessage .messageContent {
127
+ background-color: var(--mantine-color-blue-6);
128
+ color: var(--mantine-color-white);
129
+ border-bottom-right-radius: 4px;
130
+ }
131
+
132
+ .assistantMessage .messageContent {
133
+ background-color: var(--mantine-color-gray-1);
134
+ color: var(--mantine-color-dark-9);
135
+ border-bottom-left-radius: 4px;
136
+ }
137
+
138
+ /* Input Area */
139
+ .inputArea {
140
+ padding: var(--mantine-spacing-xl);
141
+ background: linear-gradient(to top, var(--mantine-color-body) 80%, rgba(255, 255, 255, 0));
142
+ display: flex;
143
+ justify-content: center;
144
+ }
145
+
146
+ .inputWrapper {
147
+ width: 100%;
148
+ max-width: 800px;
149
+ position: relative;
150
+ background-color: var(--mantine-color-white);
151
+ border-radius: var(--mantine-radius-xl);
152
+ box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
153
+ border: 1px solid var(--mantine-color-gray-2);
154
+ padding: var(--mantine-spacing-xs);
155
+ transition: box-shadow 0.2s ease;
156
+ }
157
+
158
+ .inputWrapper:focus-within {
159
+ box-shadow: 0 4px 25px rgba(0, 0, 0, 0.1);
160
+ border-color: var(--mantine-color-blue-3);
161
+ }
162
+
163
+ /* Resource Panel */
164
+ .resourcePanel {
165
+ flex: 1;
166
+ min-width: 0;
167
+ background-color: var(--mantine-color-white);
168
+ border-left: 1px solid var(--mantine-color-gray-2);
169
+ display: flex;
170
+ flex-direction: column;
171
+ animation: slideIn 0.3s ease-out;
172
+ box-shadow: -5px 0 20px rgba(0, 0, 0, 0.02);
173
+ }
174
+
175
+ .resourceHeader {
176
+ padding: var(--mantine-spacing-md);
177
+ border-bottom: 1px solid var(--mantine-color-gray-2);
178
+ display: flex;
179
+ justify-content: space-between;
180
+ align-items: center;
181
+ background-color: var(--mantine-color-gray-0);
182
+ }
183
+
184
+ /* Utilities */
185
+ .fadeOut {
186
+ animation: fadeOut 0.3s ease-out forwards;
187
+ }
188
+
189
+ .fadeIn {
190
+ animation: fadeIn 0.3s ease-in forwards;
191
+ }
192
+
193
+ .emptyState {
194
+ display: flex;
195
+ flex-direction: column;
196
+ align-items: center;
197
+ justify-content: center;
198
+ height: 100%;
199
+ color: var(--mantine-color-gray-5);
200
+ text-align: center;
201
+ }
202
+
203
+ .emptyStateIcon {
204
+ margin-bottom: var(--mantine-spacing-md);
205
+ color: var(--mantine-color-gray-3);
206
+ }
207
+
208
+ /* Dark Mode Overrides */
209
+ [data-mantine-color-scheme="dark"] .sidebar {
210
+ background-color: var(--mantine-color-dark-8);
211
+ color: var(--mantine-color-gray-3);
212
+ border-right: 1px solid var(--mantine-color-dark-6);
213
+ }
214
+
215
+ [data-mantine-color-scheme="dark"] .sidebarHeader {
216
+ border-bottom: 1px solid var(--mantine-color-dark-6);
217
+ }
218
+
219
+ [data-mantine-color-scheme="dark"] .sidebarTitle {
220
+ color: var(--mantine-color-white);
221
+ }
222
+
223
+ [data-mantine-color-scheme="dark"] .chatContainer {
224
+ background-color: var(--mantine-color-dark-9);
225
+ }
226
+
227
+ [data-mantine-color-scheme="dark"] .chatHeader {
228
+ border-bottom: 1px solid var(--mantine-color-dark-6);
229
+ background-color: rgba(26, 27, 30, 0.8);
230
+ }
231
+
232
+ [data-mantine-color-scheme="dark"] .assistantMessage .messageContent {
233
+ background-color: var(--mantine-color-dark-6);
234
+ color: var(--mantine-color-gray-1);
235
+ }
236
+
237
+ [data-mantine-color-scheme="dark"] .inputArea {
238
+ background: linear-gradient(to top, var(--mantine-color-dark-9) 80%, rgba(0, 0, 0, 0));
239
+ }
240
+
241
+ [data-mantine-color-scheme="dark"] .inputWrapper {
242
+ background-color: var(--mantine-color-dark-7);
243
+ border: 1px solid var(--mantine-color-dark-4);
244
+ }
245
+
246
+ [data-mantine-color-scheme="dark"] .resourcePanel {
247
+ background-color: var(--mantine-color-dark-8);
248
+ border-left: 1px solid var(--mantine-color-dark-6);
249
+ }
250
+
251
+ [data-mantine-color-scheme="dark"] .resourceHeader {
252
+ border-bottom: 1px solid var(--mantine-color-dark-6);
253
+ background-color: var(--mantine-color-dark-9);
254
+ }
255
+
256
+ [data-mantine-color-scheme="dark"] .emptyState {
257
+ color: var(--mantine-color-gray-6);
258
+ }
259
+
260
+ [data-mantine-color-scheme="dark"] .emptyStateIcon {
261
+ color: var(--mantine-color-gray-6);
262
+ }