@medplum/react 2.0.24 → 2.0.26

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 (333) hide show
  1. package/dist/cjs/index.cjs +11 -7714
  2. package/dist/cjs/index.cjs.map +7 -1
  3. package/dist/esm/index.mjs +67 -92
  4. package/dist/esm/index.mjs.map +7 -1
  5. package/dist/types/auth/NewUserForm.d.ts +1 -0
  6. package/dist/types/auth/RegisterForm.d.ts +1 -0
  7. package/package.json +20 -20
  8. package/dist/cjs/index.min.cjs +0 -1
  9. package/dist/esm/AddressDisplay/AddressDisplay.mjs +0 -13
  10. package/dist/esm/AddressDisplay/AddressDisplay.mjs.map +0 -1
  11. package/dist/esm/AddressInput/AddressInput.mjs +0 -57
  12. package/dist/esm/AddressInput/AddressInput.mjs.map +0 -1
  13. package/dist/esm/AnnotationInput/AnnotationInput.mjs +0 -28
  14. package/dist/esm/AnnotationInput/AnnotationInput.mjs.map +0 -1
  15. package/dist/esm/AppShell/AppShell.mjs +0 -37
  16. package/dist/esm/AppShell/AppShell.mjs.map +0 -1
  17. package/dist/esm/AppShell/Header.mjs +0 -88
  18. package/dist/esm/AppShell/Header.mjs.map +0 -1
  19. package/dist/esm/AppShell/HeaderSearchInput.mjs +0 -230
  20. package/dist/esm/AppShell/HeaderSearchInput.mjs.map +0 -1
  21. package/dist/esm/AppShell/Navbar.mjs +0 -169
  22. package/dist/esm/AppShell/Navbar.mjs.map +0 -1
  23. package/dist/esm/AsyncAutocomplete/AsyncAutocomplete.mjs +0 -121
  24. package/dist/esm/AsyncAutocomplete/AsyncAutocomplete.mjs.map +0 -1
  25. package/dist/esm/AttachmentArrayDisplay/AttachmentArrayDisplay.mjs +0 -10
  26. package/dist/esm/AttachmentArrayDisplay/AttachmentArrayDisplay.mjs.map +0 -1
  27. package/dist/esm/AttachmentArrayInput/AttachmentArrayInput.mjs +0 -45
  28. package/dist/esm/AttachmentArrayInput/AttachmentArrayInput.mjs.map +0 -1
  29. package/dist/esm/AttachmentButton/AttachmentButton.mjs +0 -55
  30. package/dist/esm/AttachmentButton/AttachmentButton.mjs.map +0 -1
  31. package/dist/esm/AttachmentDisplay/AttachmentDisplay.mjs +0 -21
  32. package/dist/esm/AttachmentDisplay/AttachmentDisplay.mjs.map +0 -1
  33. package/dist/esm/AttachmentInput/AttachmentInput.mjs +0 -27
  34. package/dist/esm/AttachmentInput/AttachmentInput.mjs.map +0 -1
  35. package/dist/esm/BackboneElementDisplay/BackboneElementDisplay.mjs +0 -49
  36. package/dist/esm/BackboneElementDisplay/BackboneElementDisplay.mjs.map +0 -1
  37. package/dist/esm/BackboneElementInput/BackboneElementInput.mjs +0 -52
  38. package/dist/esm/BackboneElementInput/BackboneElementInput.mjs.map +0 -1
  39. package/dist/esm/BookmarkDialog/BookmarkDialog.mjs +0 -47
  40. package/dist/esm/BookmarkDialog/BookmarkDialog.mjs.map +0 -1
  41. package/dist/esm/CalendarInput/CalendarInput.mjs +0 -133
  42. package/dist/esm/CalendarInput/CalendarInput.mjs.map +0 -1
  43. package/dist/esm/CheckboxFormSection/CheckboxFormSection.mjs +0 -12
  44. package/dist/esm/CheckboxFormSection/CheckboxFormSection.mjs.map +0 -1
  45. package/dist/esm/CodeInput/CodeInput.mjs +0 -24
  46. package/dist/esm/CodeInput/CodeInput.mjs.map +0 -1
  47. package/dist/esm/CodeableConceptDisplay/CodeableConceptDisplay.mjs +0 -9
  48. package/dist/esm/CodeableConceptDisplay/CodeableConceptDisplay.mjs.map +0 -1
  49. package/dist/esm/CodeableConceptInput/CodeableConceptInput.mjs +0 -36
  50. package/dist/esm/CodeableConceptInput/CodeableConceptInput.mjs.map +0 -1
  51. package/dist/esm/CodingDisplay/CodingDisplay.mjs +0 -9
  52. package/dist/esm/CodingDisplay/CodingDisplay.mjs.map +0 -1
  53. package/dist/esm/CodingInput/CodingInput.mjs +0 -32
  54. package/dist/esm/CodingInput/CodingInput.mjs.map +0 -1
  55. package/dist/esm/ContactDetailDisplay/ContactDetailDisplay.mjs +0 -16
  56. package/dist/esm/ContactDetailDisplay/ContactDetailDisplay.mjs.map +0 -1
  57. package/dist/esm/ContactDetailInput/ContactDetailInput.mjs +0 -35
  58. package/dist/esm/ContactDetailInput/ContactDetailInput.mjs.map +0 -1
  59. package/dist/esm/ContactPointDisplay/ContactPointDisplay.mjs +0 -29
  60. package/dist/esm/ContactPointDisplay/ContactPointDisplay.mjs.map +0 -1
  61. package/dist/esm/ContactPointInput/ContactPointInput.mjs +0 -45
  62. package/dist/esm/ContactPointInput/ContactPointInput.mjs.map +0 -1
  63. package/dist/esm/Container/Container.mjs +0 -19
  64. package/dist/esm/Container/Container.mjs.map +0 -1
  65. package/dist/esm/DateTimeInput/DateTimeInput.mjs +0 -71
  66. package/dist/esm/DateTimeInput/DateTimeInput.mjs.map +0 -1
  67. package/dist/esm/DefaultResourceTimeline/DefaultResourceTimeline.mjs +0 -16
  68. package/dist/esm/DefaultResourceTimeline/DefaultResourceTimeline.mjs.map +0 -1
  69. package/dist/esm/DescriptionList/DescriptionList.mjs +0 -35
  70. package/dist/esm/DescriptionList/DescriptionList.mjs.map +0 -1
  71. package/dist/esm/DiagnosticReportDisplay/DiagnosticReportDisplay.mjs +0 -172
  72. package/dist/esm/DiagnosticReportDisplay/DiagnosticReportDisplay.mjs.map +0 -1
  73. package/dist/esm/Document/Document.mjs +0 -12
  74. package/dist/esm/Document/Document.mjs.map +0 -1
  75. package/dist/esm/EncounterTimeline/EncounterTimeline.mjs +0 -32
  76. package/dist/esm/EncounterTimeline/EncounterTimeline.mjs.map +0 -1
  77. package/dist/esm/ErrorBoundary/ErrorBoundary.mjs +0 -30
  78. package/dist/esm/ErrorBoundary/ErrorBoundary.mjs.map +0 -1
  79. package/dist/esm/ExtensionInput/ExtensionInput.mjs +0 -14
  80. package/dist/esm/ExtensionInput/ExtensionInput.mjs.map +0 -1
  81. package/dist/esm/FhirPathDisplay/FhirPathDisplay.mjs +0 -23
  82. package/dist/esm/FhirPathDisplay/FhirPathDisplay.mjs.map +0 -1
  83. package/dist/esm/FhirPathTable/FhirPathTable.mjs +0 -122
  84. package/dist/esm/FhirPathTable/FhirPathTable.mjs.map +0 -1
  85. package/dist/esm/Form/Form.mjs +0 -15
  86. package/dist/esm/Form/Form.mjs.map +0 -1
  87. package/dist/esm/Form/FormUtils.mjs +0 -50
  88. package/dist/esm/Form/FormUtils.mjs.map +0 -1
  89. package/dist/esm/FormSection/FormSection.mjs +0 -10
  90. package/dist/esm/FormSection/FormSection.mjs.map +0 -1
  91. package/dist/esm/GoogleButton/GoogleButton.mjs +0 -49
  92. package/dist/esm/GoogleButton/GoogleButton.mjs.map +0 -1
  93. package/dist/esm/HumanNameDisplay/HumanNameDisplay.mjs +0 -13
  94. package/dist/esm/HumanNameDisplay/HumanNameDisplay.mjs.map +0 -1
  95. package/dist/esm/HumanNameInput/HumanNameInput.mjs +0 -50
  96. package/dist/esm/HumanNameInput/HumanNameInput.mjs.map +0 -1
  97. package/dist/esm/IdentifierDisplay/IdentifierDisplay.mjs +0 -11
  98. package/dist/esm/IdentifierDisplay/IdentifierDisplay.mjs.map +0 -1
  99. package/dist/esm/IdentifierInput/IdentifierInput.mjs +0 -18
  100. package/dist/esm/IdentifierInput/IdentifierInput.mjs.map +0 -1
  101. package/dist/esm/Loading/Loading.mjs +0 -10
  102. package/dist/esm/Loading/Loading.mjs.map +0 -1
  103. package/dist/esm/Logo/Logo.mjs +0 -14
  104. package/dist/esm/Logo/Logo.mjs.map +0 -1
  105. package/dist/esm/MedplumLink/MedplumLink.mjs +0 -52
  106. package/dist/esm/MedplumLink/MedplumLink.mjs.map +0 -1
  107. package/dist/esm/MedplumProvider/MedplumProvider.mjs +0 -84
  108. package/dist/esm/MedplumProvider/MedplumProvider.mjs.map +0 -1
  109. package/dist/esm/MoneyDisplay/MoneyDisplay.mjs +0 -9
  110. package/dist/esm/MoneyDisplay/MoneyDisplay.mjs.map +0 -1
  111. package/dist/esm/MoneyInput/MoneyInput.mjs +0 -53
  112. package/dist/esm/MoneyInput/MoneyInput.mjs.map +0 -1
  113. package/dist/esm/NoteDisplay/NoteDisplay.mjs +0 -18
  114. package/dist/esm/NoteDisplay/NoteDisplay.mjs.map +0 -1
  115. package/dist/esm/OperationOutcomeAlert/OperationOutcomeAlert.mjs +0 -14
  116. package/dist/esm/OperationOutcomeAlert/OperationOutcomeAlert.mjs.map +0 -1
  117. package/dist/esm/Panel/Panel.mjs +0 -34
  118. package/dist/esm/Panel/Panel.mjs.map +0 -1
  119. package/dist/esm/PatientTimeline/PatientTimeline.mjs +0 -38
  120. package/dist/esm/PatientTimeline/PatientTimeline.mjs.map +0 -1
  121. package/dist/esm/PeriodInput/PeriodInput.mjs +0 -19
  122. package/dist/esm/PeriodInput/PeriodInput.mjs.map +0 -1
  123. package/dist/esm/PlanDefinitionBuilder/PlanDefinitionBuilder.mjs +0 -258
  124. package/dist/esm/PlanDefinitionBuilder/PlanDefinitionBuilder.mjs.map +0 -1
  125. package/dist/esm/QuantityDisplay/QuantityDisplay.mjs +0 -9
  126. package/dist/esm/QuantityDisplay/QuantityDisplay.mjs.map +0 -1
  127. package/dist/esm/QuantityInput/QuantityInput.mjs +0 -40
  128. package/dist/esm/QuantityInput/QuantityInput.mjs.map +0 -1
  129. package/dist/esm/QuestionnaireBuilder/QuestionnaireBuilder.mjs +0 -288
  130. package/dist/esm/QuestionnaireBuilder/QuestionnaireBuilder.mjs.map +0 -1
  131. package/dist/esm/QuestionnaireForm/QuestionnaireForm.mjs +0 -276
  132. package/dist/esm/QuestionnaireForm/QuestionnaireForm.mjs.map +0 -1
  133. package/dist/esm/RangeDisplay/RangeDisplay.mjs +0 -9
  134. package/dist/esm/RangeDisplay/RangeDisplay.mjs.map +0 -1
  135. package/dist/esm/RangeInput/RangeInput.mjs +0 -31
  136. package/dist/esm/RangeInput/RangeInput.mjs.map +0 -1
  137. package/dist/esm/RatioDisplay/RatioDisplay.mjs +0 -16
  138. package/dist/esm/RatioDisplay/RatioDisplay.mjs.map +0 -1
  139. package/dist/esm/RatioInput/RatioInput.mjs +0 -31
  140. package/dist/esm/RatioInput/RatioInput.mjs.map +0 -1
  141. package/dist/esm/ReferenceDisplay/ReferenceDisplay.mjs +0 -21
  142. package/dist/esm/ReferenceDisplay/ReferenceDisplay.mjs.map +0 -1
  143. package/dist/esm/ReferenceInput/ReferenceInput.mjs +0 -45
  144. package/dist/esm/ReferenceInput/ReferenceInput.mjs.map +0 -1
  145. package/dist/esm/ReferenceRangeEditor/ReferenceRangeEditor.mjs +0 -286
  146. package/dist/esm/ReferenceRangeEditor/ReferenceRangeEditor.mjs.map +0 -1
  147. package/dist/esm/RequestGroupDisplay/RequestGroupDisplay.mjs +0 -72
  148. package/dist/esm/RequestGroupDisplay/RequestGroupDisplay.mjs.map +0 -1
  149. package/dist/esm/ResourceArrayDisplay/ResourceArrayDisplay.mjs +0 -13
  150. package/dist/esm/ResourceArrayDisplay/ResourceArrayDisplay.mjs.map +0 -1
  151. package/dist/esm/ResourceArrayInput/ResourceArrayInput.mjs +0 -51
  152. package/dist/esm/ResourceArrayInput/ResourceArrayInput.mjs.map +0 -1
  153. package/dist/esm/ResourceAvatar/ResourceAvatar.mjs +0 -23
  154. package/dist/esm/ResourceAvatar/ResourceAvatar.mjs.map +0 -1
  155. package/dist/esm/ResourceBadge/ResourceBadge.mjs +0 -13
  156. package/dist/esm/ResourceBadge/ResourceBadge.mjs.map +0 -1
  157. package/dist/esm/ResourceBlame/ResourceBlame.mjs +0 -113
  158. package/dist/esm/ResourceBlame/ResourceBlame.mjs.map +0 -1
  159. package/dist/esm/ResourceDiff/ResourceDiff.mjs +0 -39
  160. package/dist/esm/ResourceDiff/ResourceDiff.mjs.map +0 -1
  161. package/dist/esm/ResourceDiffTable/ResourceDiffTable.mjs +0 -80
  162. package/dist/esm/ResourceDiffTable/ResourceDiffTable.mjs.map +0 -1
  163. package/dist/esm/ResourceForm/ResourceForm.mjs +0 -56
  164. package/dist/esm/ResourceForm/ResourceForm.mjs.map +0 -1
  165. package/dist/esm/ResourceHistoryTable/ResourceHistoryTable.mjs +0 -50
  166. package/dist/esm/ResourceHistoryTable/ResourceHistoryTable.mjs.map +0 -1
  167. package/dist/esm/ResourceInput/ResourceInput.mjs +0 -70
  168. package/dist/esm/ResourceInput/ResourceInput.mjs.map +0 -1
  169. package/dist/esm/ResourceName/ResourceName.mjs +0 -25
  170. package/dist/esm/ResourceName/ResourceName.mjs.map +0 -1
  171. package/dist/esm/ResourcePropertyDisplay/ResourcePropertyDisplay.mjs +0 -119
  172. package/dist/esm/ResourcePropertyDisplay/ResourcePropertyDisplay.mjs.map +0 -1
  173. package/dist/esm/ResourcePropertyInput/ResourcePropertyInput.mjs +0 -171
  174. package/dist/esm/ResourcePropertyInput/ResourcePropertyInput.mjs.map +0 -1
  175. package/dist/esm/ResourceTable/ResourceTable.mjs +0 -25
  176. package/dist/esm/ResourceTable/ResourceTable.mjs.map +0 -1
  177. package/dist/esm/ResourceTimeline/ResourceTimeline.mjs +0 -309
  178. package/dist/esm/ResourceTimeline/ResourceTimeline.mjs.map +0 -1
  179. package/dist/esm/Scheduler/Scheduler.mjs +0 -98
  180. package/dist/esm/Scheduler/Scheduler.mjs.map +0 -1
  181. package/dist/esm/SearchControl/SearchControl.mjs +0 -337
  182. package/dist/esm/SearchControl/SearchControl.mjs.map +0 -1
  183. package/dist/esm/SearchControl/SearchControlField.mjs +0 -95
  184. package/dist/esm/SearchControl/SearchControlField.mjs.map +0 -1
  185. package/dist/esm/SearchControl/SearchUtils.mjs +0 -497
  186. package/dist/esm/SearchControl/SearchUtils.mjs.map +0 -1
  187. package/dist/esm/SearchExportDialog/SearchExportDialog.mjs +0 -19
  188. package/dist/esm/SearchExportDialog/SearchExportDialog.mjs.map +0 -1
  189. package/dist/esm/SearchFieldEditor/SearchFieldEditor.mjs +0 -196
  190. package/dist/esm/SearchFieldEditor/SearchFieldEditor.mjs.map +0 -1
  191. package/dist/esm/SearchFilterEditor/SearchFilterEditor.mjs +0 -97
  192. package/dist/esm/SearchFilterEditor/SearchFilterEditor.mjs.map +0 -1
  193. package/dist/esm/SearchFilterValueDialog/SearchFilterValueDialog.mjs +0 -22
  194. package/dist/esm/SearchFilterValueDialog/SearchFilterValueDialog.mjs.map +0 -1
  195. package/dist/esm/SearchFilterValueDisplay/SearchFilterValueDisplay.mjs +0 -22
  196. package/dist/esm/SearchFilterValueDisplay/SearchFilterValueDisplay.mjs.map +0 -1
  197. package/dist/esm/SearchFilterValueInput/SearchFilterValueInput.mjs +0 -57
  198. package/dist/esm/SearchFilterValueInput/SearchFilterValueInput.mjs.map +0 -1
  199. package/dist/esm/SearchPopupMenu/SearchPopupMenu.mjs +0 -134
  200. package/dist/esm/SearchPopupMenu/SearchPopupMenu.mjs.map +0 -1
  201. package/dist/esm/ServiceRequestTimeline/ServiceRequestTimeline.mjs +0 -36
  202. package/dist/esm/ServiceRequestTimeline/ServiceRequestTimeline.mjs.map +0 -1
  203. package/dist/esm/StatusBadge/StatusBadge.mjs +0 -63
  204. package/dist/esm/StatusBadge/StatusBadge.mjs.map +0 -1
  205. package/dist/esm/Timeline/Timeline.mjs +0 -40
  206. package/dist/esm/Timeline/Timeline.mjs.map +0 -1
  207. package/dist/esm/TimingInput/TimingInput.mjs +0 -76
  208. package/dist/esm/TimingInput/TimingInput.mjs.map +0 -1
  209. package/dist/esm/ValueSetAutocomplete/ValueSetAutocomplete.mjs +0 -58
  210. package/dist/esm/ValueSetAutocomplete/ValueSetAutocomplete.mjs.map +0 -1
  211. package/dist/esm/auth/AuthenticationForm.mjs +0 -89
  212. package/dist/esm/auth/AuthenticationForm.mjs.map +0 -1
  213. package/dist/esm/auth/ChooseProfileForm.mjs +0 -33
  214. package/dist/esm/auth/ChooseProfileForm.mjs.map +0 -1
  215. package/dist/esm/auth/ChooseScopeForm.mjs +0 -28
  216. package/dist/esm/auth/ChooseScopeForm.mjs.map +0 -1
  217. package/dist/esm/auth/MfaForm.mjs +0 -34
  218. package/dist/esm/auth/MfaForm.mjs.map +0 -1
  219. package/dist/esm/auth/NewProjectForm.mjs +0 -39
  220. package/dist/esm/auth/NewProjectForm.mjs.map +0 -1
  221. package/dist/esm/auth/NewUserForm.mjs +0 -84
  222. package/dist/esm/auth/NewUserForm.mjs.map +0 -1
  223. package/dist/esm/auth/RegisterForm.mjs +0 -39
  224. package/dist/esm/auth/RegisterForm.mjs.map +0 -1
  225. package/dist/esm/auth/SignInForm.mjs +0 -100
  226. package/dist/esm/auth/SignInForm.mjs.map +0 -1
  227. package/dist/esm/constants.mjs +0 -12
  228. package/dist/esm/constants.mjs.map +0 -1
  229. package/dist/esm/index.min.mjs +0 -1
  230. package/dist/esm/node_modules/@tabler/icons-react/dist/esm/createReactComponent.mjs +0 -70
  231. package/dist/esm/node_modules/@tabler/icons-react/dist/esm/createReactComponent.mjs.map +0 -1
  232. package/dist/esm/node_modules/@tabler/icons-react/dist/esm/defaultAttributes.mjs +0 -18
  233. package/dist/esm/node_modules/@tabler/icons-react/dist/esm/defaultAttributes.mjs.map +0 -1
  234. package/dist/esm/node_modules/@tabler/icons-react/dist/esm/icons/IconAdjustmentsHorizontal.mjs +0 -25
  235. package/dist/esm/node_modules/@tabler/icons-react/dist/esm/icons/IconAdjustmentsHorizontal.mjs.map +0 -1
  236. package/dist/esm/node_modules/@tabler/icons-react/dist/esm/icons/IconAlertCircle.mjs +0 -15
  237. package/dist/esm/node_modules/@tabler/icons-react/dist/esm/icons/IconAlertCircle.mjs.map +0 -1
  238. package/dist/esm/node_modules/@tabler/icons-react/dist/esm/icons/IconBleach.mjs +0 -19
  239. package/dist/esm/node_modules/@tabler/icons-react/dist/esm/icons/IconBleach.mjs.map +0 -1
  240. package/dist/esm/node_modules/@tabler/icons-react/dist/esm/icons/IconBleachOff.mjs +0 -20
  241. package/dist/esm/node_modules/@tabler/icons-react/dist/esm/icons/IconBleachOff.mjs.map +0 -1
  242. package/dist/esm/node_modules/@tabler/icons-react/dist/esm/icons/IconBoxMultiple.mjs +0 -26
  243. package/dist/esm/node_modules/@tabler/icons-react/dist/esm/icons/IconBoxMultiple.mjs.map +0 -1
  244. package/dist/esm/node_modules/@tabler/icons-react/dist/esm/icons/IconBracketsContain.mjs +0 -17
  245. package/dist/esm/node_modules/@tabler/icons-react/dist/esm/icons/IconBracketsContain.mjs.map +0 -1
  246. package/dist/esm/node_modules/@tabler/icons-react/dist/esm/icons/IconBucket.mjs +0 -20
  247. package/dist/esm/node_modules/@tabler/icons-react/dist/esm/icons/IconBucket.mjs.map +0 -1
  248. package/dist/esm/node_modules/@tabler/icons-react/dist/esm/icons/IconBucketOff.mjs +0 -27
  249. package/dist/esm/node_modules/@tabler/icons-react/dist/esm/icons/IconBucketOff.mjs.map +0 -1
  250. package/dist/esm/node_modules/@tabler/icons-react/dist/esm/icons/IconCalendar.mjs +0 -24
  251. package/dist/esm/node_modules/@tabler/icons-react/dist/esm/icons/IconCalendar.mjs.map +0 -1
  252. package/dist/esm/node_modules/@tabler/icons-react/dist/esm/icons/IconCheck.mjs +0 -13
  253. package/dist/esm/node_modules/@tabler/icons-react/dist/esm/icons/IconCheck.mjs.map +0 -1
  254. package/dist/esm/node_modules/@tabler/icons-react/dist/esm/icons/IconCheckbox.mjs +0 -20
  255. package/dist/esm/node_modules/@tabler/icons-react/dist/esm/icons/IconCheckbox.mjs.map +0 -1
  256. package/dist/esm/node_modules/@tabler/icons-react/dist/esm/icons/IconChevronDown.mjs +0 -13
  257. package/dist/esm/node_modules/@tabler/icons-react/dist/esm/icons/IconChevronDown.mjs.map +0 -1
  258. package/dist/esm/node_modules/@tabler/icons-react/dist/esm/icons/IconCircleMinus.mjs +0 -14
  259. package/dist/esm/node_modules/@tabler/icons-react/dist/esm/icons/IconCircleMinus.mjs.map +0 -1
  260. package/dist/esm/node_modules/@tabler/icons-react/dist/esm/icons/IconCirclePlus.mjs +0 -15
  261. package/dist/esm/node_modules/@tabler/icons-react/dist/esm/icons/IconCirclePlus.mjs.map +0 -1
  262. package/dist/esm/node_modules/@tabler/icons-react/dist/esm/icons/IconCloudUpload.mjs +0 -21
  263. package/dist/esm/node_modules/@tabler/icons-react/dist/esm/icons/IconCloudUpload.mjs.map +0 -1
  264. package/dist/esm/node_modules/@tabler/icons-react/dist/esm/icons/IconColumns.mjs +0 -20
  265. package/dist/esm/node_modules/@tabler/icons-react/dist/esm/icons/IconColumns.mjs.map +0 -1
  266. package/dist/esm/node_modules/@tabler/icons-react/dist/esm/icons/IconCurrencyDollar.mjs +0 -20
  267. package/dist/esm/node_modules/@tabler/icons-react/dist/esm/icons/IconCurrencyDollar.mjs.map +0 -1
  268. package/dist/esm/node_modules/@tabler/icons-react/dist/esm/icons/IconDots.mjs +0 -15
  269. package/dist/esm/node_modules/@tabler/icons-react/dist/esm/icons/IconDots.mjs.map +0 -1
  270. package/dist/esm/node_modules/@tabler/icons-react/dist/esm/icons/IconEdit.mjs +0 -27
  271. package/dist/esm/node_modules/@tabler/icons-react/dist/esm/icons/IconEdit.mjs.map +0 -1
  272. package/dist/esm/node_modules/@tabler/icons-react/dist/esm/icons/IconEqual.mjs +0 -14
  273. package/dist/esm/node_modules/@tabler/icons-react/dist/esm/icons/IconEqual.mjs.map +0 -1
  274. package/dist/esm/node_modules/@tabler/icons-react/dist/esm/icons/IconEqualNot.mjs +0 -15
  275. package/dist/esm/node_modules/@tabler/icons-react/dist/esm/icons/IconEqualNot.mjs.map +0 -1
  276. package/dist/esm/node_modules/@tabler/icons-react/dist/esm/icons/IconFileAlert.mjs +0 -22
  277. package/dist/esm/node_modules/@tabler/icons-react/dist/esm/icons/IconFileAlert.mjs.map +0 -1
  278. package/dist/esm/node_modules/@tabler/icons-react/dist/esm/icons/IconFilePlus.mjs +0 -22
  279. package/dist/esm/node_modules/@tabler/icons-react/dist/esm/icons/IconFilePlus.mjs.map +0 -1
  280. package/dist/esm/node_modules/@tabler/icons-react/dist/esm/icons/IconFilter.mjs +0 -19
  281. package/dist/esm/node_modules/@tabler/icons-react/dist/esm/icons/IconFilter.mjs.map +0 -1
  282. package/dist/esm/node_modules/@tabler/icons-react/dist/esm/icons/IconListDetails.mjs +0 -30
  283. package/dist/esm/node_modules/@tabler/icons-react/dist/esm/icons/IconListDetails.mjs.map +0 -1
  284. package/dist/esm/node_modules/@tabler/icons-react/dist/esm/icons/IconLogout.mjs +0 -21
  285. package/dist/esm/node_modules/@tabler/icons-react/dist/esm/icons/IconLogout.mjs.map +0 -1
  286. package/dist/esm/node_modules/@tabler/icons-react/dist/esm/icons/IconMathGreater.mjs +0 -13
  287. package/dist/esm/node_modules/@tabler/icons-react/dist/esm/icons/IconMathGreater.mjs.map +0 -1
  288. package/dist/esm/node_modules/@tabler/icons-react/dist/esm/icons/IconMathLower.mjs +0 -13
  289. package/dist/esm/node_modules/@tabler/icons-react/dist/esm/icons/IconMathLower.mjs.map +0 -1
  290. package/dist/esm/node_modules/@tabler/icons-react/dist/esm/icons/IconMessage.mjs +0 -21
  291. package/dist/esm/node_modules/@tabler/icons-react/dist/esm/icons/IconMessage.mjs.map +0 -1
  292. package/dist/esm/node_modules/@tabler/icons-react/dist/esm/icons/IconPin.mjs +0 -21
  293. package/dist/esm/node_modules/@tabler/icons-react/dist/esm/icons/IconPin.mjs.map +0 -1
  294. package/dist/esm/node_modules/@tabler/icons-react/dist/esm/icons/IconPinnedOff.mjs +0 -22
  295. package/dist/esm/node_modules/@tabler/icons-react/dist/esm/icons/IconPinnedOff.mjs.map +0 -1
  296. package/dist/esm/node_modules/@tabler/icons-react/dist/esm/icons/IconPlus.mjs +0 -14
  297. package/dist/esm/node_modules/@tabler/icons-react/dist/esm/icons/IconPlus.mjs.map +0 -1
  298. package/dist/esm/node_modules/@tabler/icons-react/dist/esm/icons/IconSearch.mjs +0 -14
  299. package/dist/esm/node_modules/@tabler/icons-react/dist/esm/icons/IconSearch.mjs.map +0 -1
  300. package/dist/esm/node_modules/@tabler/icons-react/dist/esm/icons/IconSettings.mjs +0 -20
  301. package/dist/esm/node_modules/@tabler/icons-react/dist/esm/icons/IconSettings.mjs.map +0 -1
  302. package/dist/esm/node_modules/@tabler/icons-react/dist/esm/icons/IconSortAscending.mjs +0 -17
  303. package/dist/esm/node_modules/@tabler/icons-react/dist/esm/icons/IconSortAscending.mjs.map +0 -1
  304. package/dist/esm/node_modules/@tabler/icons-react/dist/esm/icons/IconSortDescending.mjs +0 -17
  305. package/dist/esm/node_modules/@tabler/icons-react/dist/esm/icons/IconSortDescending.mjs.map +0 -1
  306. package/dist/esm/node_modules/@tabler/icons-react/dist/esm/icons/IconSquare.mjs +0 -19
  307. package/dist/esm/node_modules/@tabler/icons-react/dist/esm/icons/IconSquare.mjs.map +0 -1
  308. package/dist/esm/node_modules/@tabler/icons-react/dist/esm/icons/IconSwitchHorizontal.mjs +0 -20
  309. package/dist/esm/node_modules/@tabler/icons-react/dist/esm/icons/IconSwitchHorizontal.mjs.map +0 -1
  310. package/dist/esm/node_modules/@tabler/icons-react/dist/esm/icons/IconTableExport.mjs +0 -23
  311. package/dist/esm/node_modules/@tabler/icons-react/dist/esm/icons/IconTableExport.mjs.map +0 -1
  312. package/dist/esm/node_modules/@tabler/icons-react/dist/esm/icons/IconTrash.mjs +0 -20
  313. package/dist/esm/node_modules/@tabler/icons-react/dist/esm/icons/IconTrash.mjs.map +0 -1
  314. package/dist/esm/node_modules/@tabler/icons-react/dist/esm/icons/IconX.mjs +0 -14
  315. package/dist/esm/node_modules/@tabler/icons-react/dist/esm/icons/IconX.mjs.map +0 -1
  316. package/dist/esm/useResource/useResource.mjs +0 -68
  317. package/dist/esm/useResource/useResource.mjs.map +0 -1
  318. package/dist/esm/utils/blame.mjs +0 -72
  319. package/dist/esm/utils/blame.mjs.map +0 -1
  320. package/dist/esm/utils/date.mjs +0 -56
  321. package/dist/esm/utils/date.mjs.map +0 -1
  322. package/dist/esm/utils/diff.mjs +0 -118
  323. package/dist/esm/utils/diff.mjs.map +0 -1
  324. package/dist/esm/utils/dom.mjs +0 -34
  325. package/dist/esm/utils/dom.mjs.map +0 -1
  326. package/dist/esm/utils/outcomes.mjs +0 -30
  327. package/dist/esm/utils/outcomes.mjs.map +0 -1
  328. package/dist/esm/utils/questionnaire.mjs +0 -26
  329. package/dist/esm/utils/questionnaire.mjs.map +0 -1
  330. package/dist/esm/utils/recaptcha.mjs +0 -32
  331. package/dist/esm/utils/recaptcha.mjs.map +0 -1
  332. package/dist/esm/utils/script.mjs +0 -16
  333. package/dist/esm/utils/script.mjs.map +0 -1
@@ -1,133 +0,0 @@
1
- import { createStyles, Group, Button } from '@mantine/core';
2
- import React, { useState, useMemo } from 'react';
3
-
4
- const useStyles = createStyles((theme) => ({
5
- table: {
6
- width: 350,
7
- '& th': {
8
- fontWeight: 'normal',
9
- fontSize: 11,
10
- padding: 8,
11
- textAlign: 'center',
12
- },
13
- '& td': {
14
- padding: '2px 4px',
15
- },
16
- '& td button': {
17
- width: 44,
18
- height: 44,
19
- color: theme.colors[theme.primaryColor][5],
20
- fontSize: 16,
21
- fontWeight: 500,
22
- textAlign: 'center',
23
- padding: 0,
24
- backgroundColor: theme.colors[theme.primaryColor][0],
25
- border: 0,
26
- borderRadius: '50%',
27
- cursor: 'pointer',
28
- },
29
- '& td button:hover': {
30
- backgroundColor: theme.colors[theme.primaryColor][1],
31
- },
32
- '& td button:disabled': {
33
- backgroundColor: 'transparent',
34
- cursor: 'default',
35
- color: theme.colors.gray[4],
36
- fontWeight: 'normal',
37
- },
38
- },
39
- }));
40
- /**
41
- * Returns a month display string (e.g. "January 2020").
42
- * @param date Any date within the month.
43
- * @returns The month display string (e.g. "January 2020")
44
- */
45
- function getMonthString(date) {
46
- return date.toLocaleString('default', { month: 'long' }) + ' ' + date.getFullYear();
47
- }
48
- function CalendarInput(props) {
49
- const { classes } = useStyles();
50
- const { onChangeMonth, onClick } = props;
51
- const [month, setMonth] = useState(getStartMonth);
52
- function moveMonth(delta) {
53
- setMonth((currMonth) => {
54
- const newMonth = new Date(currMonth.getTime());
55
- newMonth.setMonth(currMonth.getMonth() + delta);
56
- onChangeMonth(newMonth);
57
- return newMonth;
58
- });
59
- }
60
- const grid = useMemo(() => buildGrid(month, props.slots), [month, props.slots]);
61
- return (React.createElement("div", null,
62
- React.createElement(Group, { position: "apart", spacing: "xs", grow: true, noWrap: true },
63
- React.createElement("p", { style: { flex: 1 } }, getMonthString(month)),
64
- React.createElement(Group, { position: "right", spacing: "xs" },
65
- React.createElement(Button, { variant: "outline", "aria-label": "Previous month", onClick: () => moveMonth(-1) }, "<"),
66
- React.createElement(Button, { variant: "outline", "aria-label": "Next month", onClick: () => moveMonth(1) }, ">"))),
67
- React.createElement("table", { className: classes.table },
68
- React.createElement("thead", null,
69
- React.createElement("tr", null,
70
- React.createElement("th", null, "SUN"),
71
- React.createElement("th", null, "MON"),
72
- React.createElement("th", null, "TUE"),
73
- React.createElement("th", null, "WED"),
74
- React.createElement("th", null, "THU"),
75
- React.createElement("th", null, "FRI"),
76
- React.createElement("th", null, "SAT"))),
77
- React.createElement("tbody", null, grid.map((week, weekIndex) => (React.createElement("tr", { key: 'week-' + weekIndex }, week.map((day, dayIndex) => (React.createElement("td", { key: 'day-' + dayIndex }, day && (React.createElement(Button, { disabled: !day.available, onClick: () => onClick(day.date) }, day.date.getDate()))))))))))));
78
- }
79
- function getStartMonth() {
80
- const result = new Date();
81
- result.setDate(1);
82
- result.setHours(0, 0, 0, 0);
83
- return result;
84
- }
85
- function buildGrid(startDate, slots) {
86
- const d = new Date(startDate.getFullYear(), startDate.getMonth());
87
- const grid = [];
88
- let row = [];
89
- // Fill leading empty days
90
- for (let i = 0; i < d.getDay(); i++) {
91
- row.push(undefined);
92
- }
93
- while (d.getMonth() === startDate.getMonth()) {
94
- row.push({
95
- date: new Date(d.getTime()),
96
- available: isDayAvailable(d, slots),
97
- });
98
- if (d.getDay() === 6) {
99
- grid.push(row);
100
- row = [];
101
- }
102
- d.setDate(d.getDate() + 1);
103
- }
104
- // Fill trailing empty days
105
- if (d.getDay() !== 0) {
106
- for (let i = d.getDay(); i < 7; i++) {
107
- row.push(undefined);
108
- }
109
- grid.push(row);
110
- }
111
- return grid;
112
- }
113
- /**
114
- * Returns true if the given date is available for booking.
115
- * @param day The day to check.
116
- * @param slots The list of available slots.
117
- * @returns True if there are any available slots for the day.
118
- */
119
- function isDayAvailable(day, slots) {
120
- // Note that slot start and end time may or may not be in UTC.
121
- for (const slot of slots) {
122
- const slotStart = new Date(slot.start);
123
- if (slotStart.getFullYear() === day.getFullYear() &&
124
- slotStart.getMonth() === day.getMonth() &&
125
- slotStart.getDate() === day.getDate()) {
126
- return true;
127
- }
128
- }
129
- return false;
130
- }
131
-
132
- export { CalendarInput, getMonthString, getStartMonth };
133
- //# sourceMappingURL=CalendarInput.mjs.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"CalendarInput.mjs","sources":["../../../src/CalendarInput/CalendarInput.tsx"],"sourcesContent":["import { Button, createStyles, Group } from '@mantine/core';\nimport { Slot } from '@medplum/fhirtypes';\nimport React, { useMemo, useState } from 'react';\n\nconst useStyles = createStyles((theme) => ({\n table: {\n width: 350,\n\n '& th': {\n fontWeight: 'normal',\n fontSize: 11,\n padding: 8,\n textAlign: 'center',\n },\n\n '& td': {\n padding: '2px 4px',\n },\n\n '& td button': {\n width: 44,\n height: 44,\n color: theme.colors[theme.primaryColor][5],\n fontSize: 16,\n fontWeight: 500,\n textAlign: 'center',\n padding: 0,\n backgroundColor: theme.colors[theme.primaryColor][0],\n border: 0,\n borderRadius: '50%',\n cursor: 'pointer',\n },\n\n '& td button:hover': {\n backgroundColor: theme.colors[theme.primaryColor][1],\n },\n\n '& td button:disabled': {\n backgroundColor: 'transparent',\n cursor: 'default',\n color: theme.colors.gray[4],\n fontWeight: 'normal',\n },\n },\n}));\n\nexport interface CalendarInputProps {\n slots: Slot[];\n onChangeMonth: (date: Date) => void;\n onClick: (date: Date) => void;\n}\n\n/**\n * Returns a month display string (e.g. \"January 2020\").\n * @param date Any date within the month.\n * @returns The month display string (e.g. \"January 2020\")\n */\nexport function getMonthString(date: Date): string {\n return date.toLocaleString('default', { month: 'long' }) + ' ' + date.getFullYear();\n}\n\ninterface CalendarCell {\n date: Date;\n available: boolean;\n}\n\ntype OptionalCalendarCell = CalendarCell | undefined;\n\nexport function CalendarInput(props: CalendarInputProps): JSX.Element {\n const { classes } = useStyles();\n const { onChangeMonth, onClick } = props;\n const [month, setMonth] = useState<Date>(getStartMonth);\n\n function moveMonth(delta: number): void {\n setMonth((currMonth) => {\n const newMonth = new Date(currMonth.getTime());\n newMonth.setMonth(currMonth.getMonth() + delta);\n onChangeMonth(newMonth);\n return newMonth;\n });\n }\n\n const grid = useMemo(() => buildGrid(month, props.slots), [month, props.slots]);\n\n return (\n <div>\n <Group position=\"apart\" spacing=\"xs\" grow noWrap>\n <p style={{ flex: 1 }}>{getMonthString(month)}</p>\n <Group position=\"right\" spacing=\"xs\">\n <Button variant=\"outline\" aria-label=\"Previous month\" onClick={() => moveMonth(-1)}>\n &lt;\n </Button>\n <Button variant=\"outline\" aria-label=\"Next month\" onClick={() => moveMonth(1)}>\n &gt;\n </Button>\n </Group>\n </Group>\n <table className={classes.table}>\n <thead>\n <tr>\n <th>SUN</th>\n <th>MON</th>\n <th>TUE</th>\n <th>WED</th>\n <th>THU</th>\n <th>FRI</th>\n <th>SAT</th>\n </tr>\n </thead>\n <tbody>\n {grid.map((week, weekIndex) => (\n <tr key={'week-' + weekIndex}>\n {week.map((day, dayIndex) => (\n <td key={'day-' + dayIndex}>\n {day && (\n <Button disabled={!day.available} onClick={() => onClick(day.date)}>\n {day.date.getDate()}\n </Button>\n )}\n </td>\n ))}\n </tr>\n ))}\n </tbody>\n </table>\n </div>\n );\n}\n\nexport function getStartMonth(): Date {\n const result = new Date();\n result.setDate(1);\n result.setHours(0, 0, 0, 0);\n return result;\n}\n\nfunction buildGrid(startDate: Date, slots: Slot[]): OptionalCalendarCell[][] {\n const d = new Date(startDate.getFullYear(), startDate.getMonth());\n const grid: OptionalCalendarCell[][] = [];\n let row: OptionalCalendarCell[] = [];\n\n // Fill leading empty days\n for (let i = 0; i < d.getDay(); i++) {\n row.push(undefined);\n }\n\n while (d.getMonth() === startDate.getMonth()) {\n row.push({\n date: new Date(d.getTime()),\n available: isDayAvailable(d, slots),\n });\n\n if (d.getDay() === 6) {\n grid.push(row);\n row = [];\n }\n\n d.setDate(d.getDate() + 1);\n }\n\n // Fill trailing empty days\n if (d.getDay() !== 0) {\n for (let i = d.getDay(); i < 7; i++) {\n row.push(undefined);\n }\n grid.push(row);\n }\n\n return grid;\n}\n\n/**\n * Returns true if the given date is available for booking.\n * @param day The day to check.\n * @param slots The list of available slots.\n * @returns True if there are any available slots for the day.\n */\nfunction isDayAvailable(day: Date, slots: Slot[]): boolean {\n // Note that slot start and end time may or may not be in UTC.\n for (const slot of slots) {\n const slotStart = new Date(slot.start as string);\n if (\n slotStart.getFullYear() === day.getFullYear() &&\n slotStart.getMonth() === day.getMonth() &&\n slotStart.getDate() === day.getDate()\n ) {\n return true;\n }\n }\n\n return false;\n}\n"],"names":[],"mappings":";;;AAIA,MAAM,SAAS,GAAG,YAAY,CAAC,CAAC,KAAK,MAAM;AACzC,IAAA,KAAK,EAAE;AACL,QAAA,KAAK,EAAE,GAAG;AAEV,QAAA,MAAM,EAAE;AACN,YAAA,UAAU,EAAE,QAAQ;AACpB,YAAA,QAAQ,EAAE,EAAE;AACZ,YAAA,OAAO,EAAE,CAAC;AACV,YAAA,SAAS,EAAE,QAAQ;AACpB,SAAA;AAED,QAAA,MAAM,EAAE;AACN,YAAA,OAAO,EAAE,SAAS;AACnB,SAAA;AAED,QAAA,aAAa,EAAE;AACb,YAAA,KAAK,EAAE,EAAE;AACT,YAAA,MAAM,EAAE,EAAE;YACV,KAAK,EAAE,KAAK,CAAC,MAAM,CAAC,KAAK,CAAC,YAAY,CAAC,CAAC,CAAC,CAAC;AAC1C,YAAA,QAAQ,EAAE,EAAE;AACZ,YAAA,UAAU,EAAE,GAAG;AACf,YAAA,SAAS,EAAE,QAAQ;AACnB,YAAA,OAAO,EAAE,CAAC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AC;AACrB,SAAA;AACD,QAAA,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;AAChB,KAAA;AAED,IAAA,OAAO,IAAI,CAAC;AACd,CAAC;AAED;;;;;AAKG;AACH,SAAS,cAAc,CAAC,GAAS,EAAE,KAAa,EAAA;;AAE9C,IAAA,KAAK,MAAM,IAAI,IAAI,KAAK,EAAE;QACxB,MAAM,SAAS,GAAG,IAAI,IAAI,CAAC,IAAI,CAAC,KAAe,CAAC,CAAC;QACjD,IACE,SAAS,CAAC,WAAW,EAAE,KAAK,GAAG,CAAC,WAAW,EAAE;AAC7C,YAAA,SAAS,CAAC,QAAQ,EAAE,KAAK,GAAG,CAAC,QAAQ,EAAE;YACvC,SAAS,CAAC,OAAO,EAAE,KAAK,GAAG,CAAC,OAAO,EAAE,EACrC;AACA,YAAA,OAAO,IAAI,CAAC;AACb,SAAA;AACF,KAAA;AAED,IAAA,OAAO,KAAK,CAAC;AACf;;;;"}
@@ -1,12 +0,0 @@
1
- import { Group, Input } from '@mantine/core';
2
- import React from 'react';
3
-
4
- function CheckboxFormSection(props) {
5
- return (React.createElement(Group, { noWrap: true },
6
- React.createElement("div", null, props.children),
7
- React.createElement("div", null,
8
- React.createElement(Input.Wrapper, { id: props.htmlFor, label: props.title, description: props.description, withAsterisk: props.withAsterisk }, (() => null)()))));
9
- }
10
-
11
- export { CheckboxFormSection };
12
- //# sourceMappingURL=CheckboxFormSection.mjs.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"CheckboxFormSection.mjs","sources":["../../../src/CheckboxFormSection/CheckboxFormSection.tsx"],"sourcesContent":["import { Group, Input } from '@mantine/core';\nimport React from 'react';\n\nexport interface CheckboxFormSectionProps {\n htmlFor?: string;\n title?: string;\n description?: string;\n withAsterisk?: boolean;\n children?: React.ReactNode;\n}\n\nexport function CheckboxFormSection(props: CheckboxFormSectionProps): JSX.Element {\n return (\n <Group noWrap>\n <div>{props.children}</div>\n <div>\n <Input.Wrapper\n id={props.htmlFor}\n label={props.title}\n description={props.description}\n withAsterisk={props.withAsterisk}\n >\n {(() => null)()}\n </Input.Wrapper>\n </div>\n </Group>\n );\n}\n"],"names":[],"mappings":";;;AAWM,SAAU,mBAAmB,CAAC,KAA+B,EAAA;AACjE,IAAA,QACE,KAAA,CAAA,aAAA,CAAC,KAAK,EAAA,EAAC,MAAM,EAAA,IAAA,EAAA;QACX,KAAM,CAAA,aAAA,CAAA,KAAA,EAAA,IAAA,EAAA,KAAK,CAAC,QAAQ,CAAO;AAC3B,QAAA,KAAA,CAAA,aAAA,CAAA,KAAA,EAAA,IAAA;AACE,YAAA,KAAA,CAAA,aAAA,CAAC,KAAK,CAAC,OAAO,EACZ,EAAA,EAAE,EAAE,KAAK,CAAC,OAAO,EACjB,KAAK,EAAE,KAAK,CAAC,KAAK,EAClB,WAAW,EAAE,KAAK,CAAC,WAAW,EAC9B,YAAY,EAAE,KAAK,CAAC,YAAY,IAE/B,CAAC,MAAM,IAAI,GAAG,CACD,CACZ,CACA,EACR;AACJ;;;;"}
@@ -1,24 +0,0 @@
1
- import React, { useState } from 'react';
2
- import { ValueSetAutocomplete } from '../ValueSetAutocomplete/ValueSetAutocomplete.mjs';
3
-
4
- function CodeInput(props) {
5
- const [value, setValue] = useState(props.defaultValue);
6
- function handleChange(newValues) {
7
- const newValue = newValues[0];
8
- const newCode = valueSetElementToCode(newValue);
9
- setValue(newCode);
10
- if (props.onChange) {
11
- props.onChange(newCode);
12
- }
13
- }
14
- return (React.createElement(ValueSetAutocomplete, { elementDefinition: props.property, name: props.name, placeholder: props.placeholder, defaultValue: codeToValueSetElement(value), onChange: handleChange, creatable: props.creatable, maxSelectedValues: props.maxSelectedValues, clearSearchOnChange: props.clearSearchOnChange, clearable: props.clearable }));
15
- }
16
- function codeToValueSetElement(code) {
17
- return code ? { code } : undefined;
18
- }
19
- function valueSetElementToCode(element) {
20
- return element?.code;
21
- }
22
-
23
- export { CodeInput };
24
- //# sourceMappingURL=CodeInput.mjs.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"CodeInput.mjs","sources":["../../../src/CodeInput/CodeInput.tsx"],"sourcesContent":["import { ElementDefinition, ValueSetExpansionContains } from '@medplum/fhirtypes';\nimport React, { useState } from 'react';\nimport { ValueSetAutocomplete } from '../ValueSetAutocomplete/ValueSetAutocomplete';\n\nexport interface CodeInputProps {\n property: ElementDefinition;\n name: string;\n placeholder?: string;\n defaultValue?: string;\n onChange?: (value: string | undefined) => void;\n creatable?: boolean;\n maxSelectedValues?: number;\n clearSearchOnChange?: boolean;\n clearable?: boolean;\n}\n\nexport function CodeInput(props: CodeInputProps): JSX.Element {\n const [value, setValue] = useState<string | undefined>(props.defaultValue);\n\n function handleChange(newValues: ValueSetExpansionContains[]): void {\n const newValue = newValues[0];\n const newCode = valueSetElementToCode(newValue);\n setValue(newCode);\n if (props.onChange) {\n props.onChange(newCode);\n }\n }\n\n return (\n <ValueSetAutocomplete\n elementDefinition={props.property}\n name={props.name}\n placeholder={props.placeholder}\n defaultValue={codeToValueSetElement(value)}\n onChange={handleChange}\n creatable={props.creatable}\n maxSelectedValues={props.maxSelectedValues}\n clearSearchOnChange={props.clearSearchOnChange}\n clearable={props.clearable}\n />\n );\n}\n\nfunction codeToValueSetElement(code: string | undefined): ValueSetExpansionContains | undefined {\n return code ? { code } : undefined;\n}\n\nfunction valueSetElementToCode(element: ValueSetExpansionContains | undefined): string | undefined {\n return element?.code;\n}\n"],"names":[],"mappings":";;;AAgBM,SAAU,SAAS,CAAC,KAAqB,EAAA;AAC7C,IAAA,MAAM,CAAC,KAAK,EAAE,QAAQ,CAAC,GAAG,QAAQ,CAAqB,KAAK,CAAC,YAAY,CAAC,CAAC;IAE3E,SAAS,YAAY,CAAC,SAAsC,EAAA;AAC1D,QAAA,MAAM,QAAQ,GAAG,SAAS,CAAC,CAAC,CAAC,CAAC;AAC9B,QAAA,MAAM,OAAO,GAAG,qBAAqB,CAAC,QAAQ,CAAC,CAAC;QAChD,QAAQ,CAAC,OAAO,CAAC,CAAC;QAClB,IAAI,KAAK,CAAC,QAAQ,EAAE;AAClB,YAAA,KAAK,CAAC,QAAQ,CAAC,OAAO,CAAC,CAAC;AACzB,SAAA;KACF;IAED,QACE,KAAC,CAAA,aAAA,CAAA,oBAAoB,EACnB,EAAA,iBAAiB,EAAE,KAAK,CAAC,QAAQ,EACjC,IAAI,EAAE,KAAK,CAAC,IAAI,EAChB,WAAW,EAAE,KAAK,CAAC,WAAW,EAC9B,YAAY,EAAE,qBAAqB,CAAC,KAAK,CAAC,EAC1C,QAAQ,EAAE,YAAY,EACtB,SAAS,EAAE,KAAK,CAAC,SAAS,EAC1B,iBAAiB,EAAE,KAAK,CAAC,iBAAiB,EAC1C,mBAAmB,EAAE,KAAK,CAAC,mBAAmB,EAC9C,SAAS,EAAE,KAAK,CAAC,SAAS,EAC1B,CAAA,EACF;AACJ,CAAC;AAED,SAAS,qBAAqB,CAAC,IAAwB,EAAA;IACrD,OAAO,IAAI,GAAG,EAAE,IAAI,EAAE,GAAG,SAAS,CAAC;AACrC,CAAC;AAED,SAAS,qBAAqB,CAAC,OAA8C,EAAA;IAC3E,OAAO,OAAO,EAAE,IAAI,CAAC;AACvB;;;;"}
@@ -1,9 +0,0 @@
1
- import { formatCodeableConcept } from '@medplum/core';
2
- import React from 'react';
3
-
4
- function CodeableConceptDisplay(props) {
5
- return React.createElement(React.Fragment, null, formatCodeableConcept(props.value));
6
- }
7
-
8
- export { CodeableConceptDisplay };
9
- //# sourceMappingURL=CodeableConceptDisplay.mjs.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"CodeableConceptDisplay.mjs","sources":["../../../src/CodeableConceptDisplay/CodeableConceptDisplay.tsx"],"sourcesContent":["import { formatCodeableConcept } from '@medplum/core';\nimport { CodeableConcept } from '@medplum/fhirtypes';\nimport React from 'react';\n\nexport interface CodeableConceptDisplayProps {\n value?: CodeableConcept;\n}\n\nexport function CodeableConceptDisplay(props: CodeableConceptDisplayProps): JSX.Element {\n return <>{formatCodeableConcept(props.value)}</>;\n}\n"],"names":[],"mappings":";;;AAQM,SAAU,sBAAsB,CAAC,KAAkC,EAAA;IACvE,OAAO,KAAA,CAAA,aAAA,CAAA,KAAA,CAAA,QAAA,EAAA,IAAA,EAAG,qBAAqB,CAAC,KAAK,CAAC,KAAK,CAAC,CAAI,CAAC;AACnD;;;;"}
@@ -1,36 +0,0 @@
1
- import React, { useState } from 'react';
2
- import { ValueSetAutocomplete } from '../ValueSetAutocomplete/ValueSetAutocomplete.mjs';
3
-
4
- function CodeableConceptInput(props) {
5
- const [value, setValue] = useState(props.defaultValue);
6
- function handleChange(newValues) {
7
- const newConcept = valueSetElementToCodeableConcept(newValues);
8
- setValue(newConcept);
9
- if (props.onChange) {
10
- props.onChange(newConcept);
11
- }
12
- }
13
- return (React.createElement(ValueSetAutocomplete, { elementDefinition: props.property, name: props.name, placeholder: props.placeholder, defaultValue: value && codeableConceptToValueSetElement(value), onChange: handleChange }));
14
- }
15
- function codeableConceptToValueSetElement(concept) {
16
- return concept.coding?.map((c) => ({
17
- system: c.system,
18
- code: c.code,
19
- display: c.display,
20
- }));
21
- }
22
- function valueSetElementToCodeableConcept(elements) {
23
- if (elements.length === 0) {
24
- return undefined;
25
- }
26
- return {
27
- coding: elements.map((e) => ({
28
- system: e.system,
29
- code: e.code,
30
- display: e.display,
31
- })),
32
- };
33
- }
34
-
35
- export { CodeableConceptInput };
36
- //# sourceMappingURL=CodeableConceptInput.mjs.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"CodeableConceptInput.mjs","sources":["../../../src/CodeableConceptInput/CodeableConceptInput.tsx"],"sourcesContent":["import { CodeableConcept, ElementDefinition, ValueSetExpansionContains } from '@medplum/fhirtypes';\nimport React, { useState } from 'react';\nimport { ValueSetAutocomplete } from '../ValueSetAutocomplete/ValueSetAutocomplete';\n\nexport interface CodeableConceptInputProps {\n property: ElementDefinition;\n name: string;\n placeholder?: string;\n defaultValue?: CodeableConcept;\n onChange?: (value: CodeableConcept | undefined) => void;\n}\n\nexport function CodeableConceptInput(props: CodeableConceptInputProps): JSX.Element {\n const [value, setValue] = useState<CodeableConcept | undefined>(props.defaultValue);\n\n function handleChange(newValues: ValueSetExpansionContains[]): void {\n const newConcept = valueSetElementToCodeableConcept(newValues);\n setValue(newConcept);\n if (props.onChange) {\n props.onChange(newConcept);\n }\n }\n\n return (\n <ValueSetAutocomplete\n elementDefinition={props.property}\n name={props.name}\n placeholder={props.placeholder}\n defaultValue={value && codeableConceptToValueSetElement(value)}\n onChange={handleChange}\n />\n );\n}\n\nfunction codeableConceptToValueSetElement(concept: CodeableConcept): ValueSetExpansionContains[] | undefined {\n return concept.coding?.map((c) => ({\n system: c.system,\n code: c.code,\n display: c.display,\n }));\n}\n\nfunction valueSetElementToCodeableConcept(elements: ValueSetExpansionContains[]): CodeableConcept | undefined {\n if (elements.length === 0) {\n return undefined;\n }\n return {\n coding: elements.map((e) => ({\n system: e.system,\n code: e.code,\n display: e.display,\n })),\n };\n}\n"],"names":[],"mappings":";;;AAYM,SAAU,oBAAoB,CAAC,KAAgC,EAAA;AACnE,IAAA,MAAM,CAAC,KAAK,EAAE,QAAQ,CAAC,GAAG,QAAQ,CAA8B,KAAK,CAAC,YAAY,CAAC,CAAC;IAEpF,SAAS,YAAY,CAAC,SAAsC,EAAA;AAC1D,QAAA,MAAM,UAAU,GAAG,gCAAgC,CAAC,SAAS,CAAC,CAAC;QAC/D,QAAQ,CAAC,UAAU,CAAC,CAAC;QACrB,IAAI,KAAK,CAAC,QAAQ,EAAE;AAClB,YAAA,KAAK,CAAC,QAAQ,CAAC,UAAU,CAAC,CAAC;AAC5B,SAAA;KACF;AAED,IAAA,QACE,KAAC,CAAA,aAAA,CAAA,oBAAoB,EACnB,EAAA,iBAAiB,EAAE,KAAK,CAAC,QAAQ,EACjC,IAAI,EAAE,KAAK,CAAC,IAAI,EAChB,WAAW,EAAE,KAAK,CAAC,WAAW,EAC9B,YAAY,EAAE,KAAK,IAAI,gCAAgC,CAAC,KAAK,CAAC,EAC9D,QAAQ,EAAE,YAAY,EAAA,CACtB,EACF;AACJ,CAAC;AAED,SAAS,gCAAgC,CAAC,OAAwB,EAAA;IAChE,OAAO,OAAO,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC,CAAC,MAAM;QACjC,MAAM,EAAE,CAAC,CAAC,MAAM;QAChB,IAAI,EAAE,CAAC,CAAC,IAAI;QACZ,OAAO,EAAE,CAAC,CAAC,OAAO;AACnB,KAAA,CAAC,CAAC,CAAC;AACN,CAAC;AAED,SAAS,gCAAgC,CAAC,QAAqC,EAAA;AAC7E,IAAA,IAAI,QAAQ,CAAC,MAAM,KAAK,CAAC,EAAE;AACzB,QAAA,OAAO,SAAS,CAAC;AAClB,KAAA;IACD,OAAO;QACL,MAAM,EAAE,QAAQ,CAAC,GAAG,CAAC,CAAC,CAAC,MAAM;YAC3B,MAAM,EAAE,CAAC,CAAC,MAAM;YAChB,IAAI,EAAE,CAAC,CAAC,IAAI;YACZ,OAAO,EAAE,CAAC,CAAC,OAAO;AACnB,SAAA,CAAC,CAAC;KACJ,CAAC;AACJ;;;;"}
@@ -1,9 +0,0 @@
1
- import { formatCoding } from '@medplum/core';
2
- import React from 'react';
3
-
4
- function CodingDisplay(props) {
5
- return React.createElement(React.Fragment, null, formatCoding(props.value));
6
- }
7
-
8
- export { CodingDisplay };
9
- //# sourceMappingURL=CodingDisplay.mjs.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"CodingDisplay.mjs","sources":["../../../src/CodingDisplay/CodingDisplay.tsx"],"sourcesContent":["import { formatCoding } from '@medplum/core';\nimport { Coding } from '@medplum/fhirtypes';\nimport React from 'react';\n\nexport interface CodingDisplayProps {\n value?: Coding;\n}\n\nexport function CodingDisplay(props: CodingDisplayProps): JSX.Element {\n return <>{formatCoding(props.value)}</>;\n}\n"],"names":[],"mappings":";;;AAQM,SAAU,aAAa,CAAC,KAAyB,EAAA;IACrD,OAAO,KAAA,CAAA,aAAA,CAAA,KAAA,CAAA,QAAA,EAAA,IAAA,EAAG,YAAY,CAAC,KAAK,CAAC,KAAK,CAAC,CAAI,CAAC;AAC1C;;;;"}
@@ -1,32 +0,0 @@
1
- import React, { useState } from 'react';
2
- import { ValueSetAutocomplete } from '../ValueSetAutocomplete/ValueSetAutocomplete.mjs';
3
-
4
- function CodingInput(props) {
5
- const [value, setValue] = useState(props.defaultValue);
6
- function handleChange(newValues) {
7
- const newValue = newValues[0];
8
- const newConcept = newValue && valueSetElementToCoding(newValue);
9
- setValue(newConcept);
10
- if (props.onChange) {
11
- props.onChange(newConcept);
12
- }
13
- }
14
- return (React.createElement(ValueSetAutocomplete, { elementDefinition: props.property, name: props.name, placeholder: props.placeholder, defaultValue: value && codingToValueSetElement(value), onChange: handleChange }));
15
- }
16
- function codingToValueSetElement(coding) {
17
- return {
18
- system: coding.system,
19
- code: coding.code,
20
- display: coding.display,
21
- };
22
- }
23
- function valueSetElementToCoding(element) {
24
- return {
25
- system: element.system,
26
- code: element.code,
27
- display: element.display,
28
- };
29
- }
30
-
31
- export { CodingInput };
32
- //# sourceMappingURL=CodingInput.mjs.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"CodingInput.mjs","sources":["../../../src/CodingInput/CodingInput.tsx"],"sourcesContent":["import { Coding, ElementDefinition, ValueSetExpansionContains } from '@medplum/fhirtypes';\nimport React, { useState } from 'react';\nimport { ValueSetAutocomplete } from '../ValueSetAutocomplete/ValueSetAutocomplete';\n\nexport interface CodingInputProps {\n property: ElementDefinition;\n name: string;\n placeholder?: string;\n defaultValue?: Coding;\n onChange?: (value: Coding | undefined) => void;\n}\n\nexport function CodingInput(props: CodingInputProps): JSX.Element {\n const [value, setValue] = useState<Coding | undefined>(props.defaultValue);\n\n function handleChange(newValues: ValueSetExpansionContains[]): void {\n const newValue = newValues[0];\n const newConcept = newValue && valueSetElementToCoding(newValue);\n setValue(newConcept);\n if (props.onChange) {\n props.onChange(newConcept);\n }\n }\n\n return (\n <ValueSetAutocomplete\n elementDefinition={props.property}\n name={props.name}\n placeholder={props.placeholder}\n defaultValue={value && codingToValueSetElement(value)}\n onChange={handleChange}\n />\n );\n}\n\nfunction codingToValueSetElement(coding: Coding): ValueSetExpansionContains {\n return {\n system: coding.system,\n code: coding.code,\n display: coding.display,\n };\n}\n\nfunction valueSetElementToCoding(element: ValueSetExpansionContains): Coding {\n return {\n system: element.system,\n code: element.code,\n display: element.display,\n };\n}\n"],"names":[],"mappings":";;;AAYM,SAAU,WAAW,CAAC,KAAuB,EAAA;AACjD,IAAA,MAAM,CAAC,KAAK,EAAE,QAAQ,CAAC,GAAG,QAAQ,CAAqB,KAAK,CAAC,YAAY,CAAC,CAAC;IAE3E,SAAS,YAAY,CAAC,SAAsC,EAAA;AAC1D,QAAA,MAAM,QAAQ,GAAG,SAAS,CAAC,CAAC,CAAC,CAAC;QAC9B,MAAM,UAAU,GAAG,QAAQ,IAAI,uBAAuB,CAAC,QAAQ,CAAC,CAAC;QACjE,QAAQ,CAAC,UAAU,CAAC,CAAC;QACrB,IAAI,KAAK,CAAC,QAAQ,EAAE;AAClB,YAAA,KAAK,CAAC,QAAQ,CAAC,UAAU,CAAC,CAAC;AAC5B,SAAA;KACF;AAED,IAAA,QACE,KAAC,CAAA,aAAA,CAAA,oBAAoB,EACnB,EAAA,iBAAiB,EAAE,KAAK,CAAC,QAAQ,EACjC,IAAI,EAAE,KAAK,CAAC,IAAI,EAChB,WAAW,EAAE,KAAK,CAAC,WAAW,EAC9B,YAAY,EAAE,KAAK,IAAI,uBAAuB,CAAC,KAAK,CAAC,EACrD,QAAQ,EAAE,YAAY,EAAA,CACtB,EACF;AACJ,CAAC;AAED,SAAS,uBAAuB,CAAC,MAAc,EAAA;IAC7C,OAAO;QACL,MAAM,EAAE,MAAM,CAAC,MAAM;QACrB,IAAI,EAAE,MAAM,CAAC,IAAI;QACjB,OAAO,EAAE,MAAM,CAAC,OAAO;KACxB,CAAC;AACJ,CAAC;AAED,SAAS,uBAAuB,CAAC,OAAkC,EAAA;IACjE,OAAO;QACL,MAAM,EAAE,OAAO,CAAC,MAAM;QACtB,IAAI,EAAE,OAAO,CAAC,IAAI;QAClB,OAAO,EAAE,OAAO,CAAC,OAAO;KACzB,CAAC;AACJ;;;;"}
@@ -1,16 +0,0 @@
1
- import React from 'react';
2
- import { ContactPointDisplay } from '../ContactPointDisplay/ContactPointDisplay.mjs';
3
-
4
- function ContactDetailDisplay(props) {
5
- const contactDetail = props.value;
6
- if (!contactDetail) {
7
- return null;
8
- }
9
- return (React.createElement(React.Fragment, null,
10
- contactDetail.name,
11
- contactDetail.name && ': ',
12
- contactDetail.telecom?.map((telecom, index) => (React.createElement(ContactPointDisplay, { key: 'telecom-' + index, value: telecom })))));
13
- }
14
-
15
- export { ContactDetailDisplay };
16
- //# sourceMappingURL=ContactDetailDisplay.mjs.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"ContactDetailDisplay.mjs","sources":["../../../src/ContactDetailDisplay/ContactDetailDisplay.tsx"],"sourcesContent":["import { ContactDetail } from '@medplum/fhirtypes';\nimport React from 'react';\nimport { ContactPointDisplay } from '../ContactPointDisplay/ContactPointDisplay';\n\nexport interface ContactDetailDisplayProps {\n value?: ContactDetail;\n}\n\nexport function ContactDetailDisplay(props: ContactDetailDisplayProps): JSX.Element | null {\n const contactDetail = props.value;\n if (!contactDetail) {\n return null;\n }\n\n return (\n <>\n {contactDetail.name}\n {contactDetail.name && ': '}\n {contactDetail.telecom?.map((telecom, index) => (\n <ContactPointDisplay key={'telecom-' + index} value={telecom} />\n ))}\n </>\n );\n}\n"],"names":[],"mappings":";;;AAQM,SAAU,oBAAoB,CAAC,KAAgC,EAAA;AACnE,IAAA,MAAM,aAAa,GAAG,KAAK,CAAC,KAAK,CAAC;IAClC,IAAI,CAAC,aAAa,EAAE;AAClB,QAAA,OAAO,IAAI,CAAC;AACb,KAAA;AAED,IAAA,QACE,KAAA,CAAA,aAAA,CAAA,KAAA,CAAA,QAAA,EAAA,IAAA;AACG,QAAA,aAAa,CAAC,IAAI;QAClB,aAAa,CAAC,IAAI,IAAI,IAAI;AAC1B,QAAA,aAAa,CAAC,OAAO,EAAE,GAAG,CAAC,CAAC,OAAO,EAAE,KAAK,MACzC,KAAC,CAAA,aAAA,CAAA,mBAAmB,EAAC,EAAA,GAAG,EAAE,UAAU,GAAG,KAAK,EAAE,KAAK,EAAE,OAAO,EAAI,CAAA,CACjE,CAAC,CACD,EACH;AACJ;;;;"}
@@ -1,35 +0,0 @@
1
- import { Group, TextInput } from '@mantine/core';
2
- import React, { useState, useRef } from 'react';
3
- import { ContactPointInput } from '../ContactPointInput/ContactPointInput.mjs';
4
-
5
- function ContactDetailInput(props) {
6
- const [contactPoint, setContactDetail] = useState(props.defaultValue);
7
- const ref = useRef();
8
- ref.current = contactPoint;
9
- function setContactDetailWrapper(newValue) {
10
- setContactDetail(newValue);
11
- if (props.onChange) {
12
- props.onChange(newValue);
13
- }
14
- }
15
- function setName(name) {
16
- const newValue = { ...ref.current, name };
17
- if (!name) {
18
- delete newValue.name;
19
- }
20
- setContactDetailWrapper(newValue);
21
- }
22
- function setTelecom(telecom) {
23
- const newValue = { ...ref.current, telecom: telecom && [telecom] };
24
- if (!telecom) {
25
- delete newValue.telecom;
26
- }
27
- setContactDetailWrapper(newValue);
28
- }
29
- return (React.createElement(Group, { spacing: "xs", grow: true, noWrap: true },
30
- React.createElement(TextInput, { "data-testid": props.name + '-name', name: props.name + '-name', placeholder: "Name", style: { width: 180 }, defaultValue: contactPoint?.name, onChange: (e) => setName(e.currentTarget.value) }),
31
- React.createElement(ContactPointInput, { name: props.name + '-telecom', defaultValue: contactPoint?.telecom?.[0], onChange: setTelecom })));
32
- }
33
-
34
- export { ContactDetailInput };
35
- //# sourceMappingURL=ContactDetailInput.mjs.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"ContactDetailInput.mjs","sources":["../../../src/ContactDetailInput/ContactDetailInput.tsx"],"sourcesContent":["import { Group, TextInput } from '@mantine/core';\nimport { ContactDetail, ContactPoint } from '@medplum/fhirtypes';\nimport React, { useRef, useState } from 'react';\nimport { ContactPointInput } from '../ContactPointInput/ContactPointInput';\n\nexport interface ContactDetailInputProps {\n name: string;\n defaultValue?: ContactDetail;\n onChange?: (value: ContactDetail) => void;\n}\n\nexport function ContactDetailInput(props: ContactDetailInputProps): JSX.Element {\n const [contactPoint, setContactDetail] = useState(props.defaultValue);\n\n const ref = useRef<ContactDetail>();\n ref.current = contactPoint;\n\n function setContactDetailWrapper(newValue: ContactDetail): void {\n setContactDetail(newValue);\n if (props.onChange) {\n props.onChange(newValue);\n }\n }\n\n function setName(name: string): void {\n const newValue: ContactDetail = { ...ref.current, name };\n if (!name) {\n delete newValue.name;\n }\n setContactDetailWrapper(newValue);\n }\n\n function setTelecom(telecom: ContactPoint | undefined): void {\n const newValue: ContactDetail = { ...ref.current, telecom: telecom && [telecom] };\n if (!telecom) {\n delete newValue.telecom;\n }\n setContactDetailWrapper(newValue);\n }\n\n return (\n <Group spacing=\"xs\" grow noWrap>\n <TextInput\n data-testid={props.name + '-name'}\n name={props.name + '-name'}\n placeholder=\"Name\"\n style={{ width: 180 }}\n defaultValue={contactPoint?.name}\n onChange={(e) => setName(e.currentTarget.value)}\n />\n <ContactPointInput\n name={props.name + '-telecom'}\n defaultValue={contactPoint?.telecom?.[0]}\n onChange={setTelecom}\n />\n </Group>\n );\n}\n"],"names":[],"mappings":";;;;AAWM,SAAU,kBAAkB,CAAC,KAA8B,EAAA;AAC/D,IAAA,MAAM,CAAC,YAAY,EAAE,gBAAgB,CAAC,GAAG,QAAQ,CAAC,KAAK,CAAC,YAAY,CAAC,CAAC;AAEtE,IAAA,MAAM,GAAG,GAAG,MAAM,EAAiB,CAAC;AACpC,IAAA,GAAG,CAAC,OAAO,GAAG,YAAY,CAAC;IAE3B,SAAS,uBAAuB,CAAC,QAAuB,EAAA;QACtD,gBAAgB,CAAC,QAAQ,CAAC,CAAC;QAC3B,IAAI,KAAK,CAAC,QAAQ,EAAE;AAClB,YAAA,KAAK,CAAC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}
@@ -1,29 +0,0 @@
1
- import React from 'react';
2
-
3
- function ContactPointDisplay(props) {
4
- const contactPoint = props.value;
5
- if (!contactPoint) {
6
- return null;
7
- }
8
- const builder = [];
9
- if (contactPoint.value) {
10
- builder.push(contactPoint.value);
11
- }
12
- if (contactPoint.use || contactPoint.system) {
13
- builder.push(' [');
14
- if (contactPoint.use) {
15
- builder.push(contactPoint.use);
16
- }
17
- if (contactPoint.use && contactPoint.system) {
18
- builder.push(' ');
19
- }
20
- if (contactPoint.system) {
21
- builder.push(contactPoint.system);
22
- }
23
- builder.push(']');
24
- }
25
- return React.createElement(React.Fragment, null, builder.join('').trim());
26
- }
27
-
28
- export { ContactPointDisplay };
29
- //# sourceMappingURL=ContactPointDisplay.mjs.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"ContactPointDisplay.mjs","sources":["../../../src/ContactPointDisplay/ContactPointDisplay.tsx"],"sourcesContent":["import { ContactPoint } from '@medplum/fhirtypes';\nimport React from 'react';\n\nexport interface ContactPointDisplayProps {\n value?: ContactPoint;\n}\n\nexport function ContactPointDisplay(props: ContactPointDisplayProps): JSX.Element | null {\n const contactPoint = props.value;\n if (!contactPoint) {\n return null;\n }\n\n const builder = [];\n\n if (contactPoint.value) {\n builder.push(contactPoint.value);\n }\n\n if (contactPoint.use || contactPoint.system) {\n builder.push(' [');\n\n if (contactPoint.use) {\n builder.push(contactPoint.use);\n }\n\n if (contactPoint.use && contactPoint.system) {\n builder.push(' ');\n }\n\n if (contactPoint.system) {\n builder.push(contactPoint.system);\n }\n\n builder.push(']');\n }\n\n return <>{builder.join('').trim()}</>;\n}\n"],"names":[],"mappings":";;AAOM,SAAU,mBAAmB,CAAC,KAA+B,EAAA;AACjE,IAAA,MAAM,YAAY,GAAG,KAAK,CAAC,KAAK,CAAC;IACjC,IAAI,CAAC,YAAY,EAAE;AACjB,QAAA,OAAO,IAAI,CAAC;AACb,KAAA;IAED,MAAM,OAAO,GAAG,EAAE,CAAC;IAEnB,IAAI,YAAY,CAAC,KAAK,EAAE;AACtB,QAAA,OAAO,CAAC,IAAI,CAAC,YAAY,CAAC,KAAK,CAAC,CAAC;AAClC,KAAA;AAED,IAAA,IAAI,YAAY,CAAC,GAAG,IAAI,YAAY,CAAC,MAAM,EAAE;AAC3C,QAAA,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QAEnB,IAAI,YAAY,CAAC,GAAG,EAAE;AACpB,YAAA,OAAO,CAAC,IAAI,CAAC,YAAY,CAAC,GAAG,CAAC,CAAC;AAChC,SAAA;AAED,QAAA,IAAI,YAAY,CAAC,GAAG,IAAI,YAAY,CAAC,MAAM,EAAE;AAC3C,YAAA,OAAO,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;AACnB,SAAA;QAED,IAAI,YAAY,CAAC,MAAM,EAAE;AACvB,YAAA,OAAO,CAAC,IAAI,CAAC,YAAY,CAAC,MAAM,CAAC,CAAC;AACnC,SAAA;AAED,QAAA,OAAO,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;AACnB,KAAA;IAED,OAAO,KAAA,CAAA,aAAA,CAAA,KAAA,CAAA,QAAA,EAAA,IAAA,EAAG,OAAO,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC,IAAI,EAAE,CAAI,CAAC;AACxC;;;;"}
@@ -1,45 +0,0 @@
1
- import { Group, NativeSelect, TextInput } from '@mantine/core';
2
- import React, { useState, useRef } from 'react';
3
-
4
- function ContactPointInput(props) {
5
- const [contactPoint, setContactPoint] = useState(props.defaultValue);
6
- const ref = useRef();
7
- ref.current = contactPoint;
8
- function setContactPointWrapper(newValue) {
9
- if (newValue && Object.keys(newValue).length === 0) {
10
- newValue = undefined;
11
- }
12
- setContactPoint(newValue);
13
- if (props.onChange) {
14
- props.onChange(newValue);
15
- }
16
- }
17
- function setSystem(system) {
18
- const newValue = { ...ref.current, system };
19
- if (!system) {
20
- delete newValue.system;
21
- }
22
- setContactPointWrapper(newValue);
23
- }
24
- function setUse(use) {
25
- const newValue = { ...ref.current, use };
26
- if (!use) {
27
- delete newValue.use;
28
- }
29
- setContactPointWrapper(newValue);
30
- }
31
- function setValue(value) {
32
- const newValue = { ...ref.current, value };
33
- if (!value) {
34
- delete newValue.value;
35
- }
36
- setContactPointWrapper(newValue);
37
- }
38
- return (React.createElement(Group, { spacing: "xs", grow: true, noWrap: true },
39
- React.createElement(NativeSelect, { "data-testid": "system", defaultValue: contactPoint?.system, onChange: (e) => setSystem(e.currentTarget.value), data: ['', 'email', 'phone', 'fax', 'pager', 'sms', 'other'] }),
40
- React.createElement(NativeSelect, { "data-testid": "use", defaultValue: contactPoint?.use, onChange: (e) => setUse(e.currentTarget.value), data: ['', 'home', 'work', 'temp', 'old', 'mobile'] }),
41
- React.createElement(TextInput, { placeholder: "Value", defaultValue: contactPoint?.value, onChange: (e) => setValue(e.currentTarget.value) })));
42
- }
43
-
44
- export { ContactPointInput };
45
- //# sourceMappingURL=ContactPointInput.mjs.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"ContactPointInput.mjs","sources":["../../../src/ContactPointInput/ContactPointInput.tsx"],"sourcesContent":["import { Group, NativeSelect, TextInput } from '@mantine/core';\nimport { ContactPoint } from '@medplum/fhirtypes';\nimport React, { useRef, useState } from 'react';\n\nexport interface ContactPointInputProps {\n name: string;\n defaultValue?: ContactPoint;\n onChange?: (value: ContactPoint | undefined) => void;\n}\n\nexport function ContactPointInput(props: ContactPointInputProps): JSX.Element {\n const [contactPoint, setContactPoint] = useState(props.defaultValue);\n\n const ref = useRef<ContactPoint>();\n ref.current = contactPoint;\n\n function setContactPointWrapper(newValue: ContactPoint | undefined): void {\n if (newValue && Object.keys(newValue).length === 0) {\n newValue = undefined;\n }\n setContactPoint(newValue);\n if (props.onChange) {\n props.onChange(newValue);\n }\n }\n\n function setSystem(system: 'url' | 'phone' | 'fax' | 'email' | 'pager' | 'sms' | 'other'): void {\n const newValue: ContactPoint = { ...ref.current, system };\n if (!system) {\n delete newValue.system;\n }\n setContactPointWrapper(newValue);\n }\n\n function setUse(use: 'home' | 'work' | 'temp' | 'old' | 'mobile'): void {\n const newValue: ContactPoint = { ...ref.current, use };\n if (!use) {\n delete newValue.use;\n }\n setContactPointWrapper(newValue);\n }\n\n function setValue(value: string): void {\n const newValue: ContactPoint = { ...ref.current, value };\n if (!value) {\n delete newValue.value;\n }\n setContactPointWrapper(newValue);\n }\n\n return (\n <Group spacing=\"xs\" grow noWrap>\n <NativeSelect\n data-testid=\"system\"\n defaultValue={contactPoint?.system}\n onChange={(e) =>\n setSystem(e.currentTarget.value as 'url' | 'phone' | 'fax' | 'email' | 'pager' | 'sms' | 'other')\n }\n data={['', 'email', 'phone', 'fax', 'pager', 'sms', 'other']}\n />\n <NativeSelect\n data-testid=\"use\"\n defaultValue={contactPoint?.use}\n onChange={(e) => setUse(e.currentTarget.value as 'home' | 'work' | 'temp' | 'old' | 'mobile')}\n data={['', 'home', 'work', 'temp', 'old', 'mobile']}\n />\n <TextInput\n placeholder=\"Value\"\n defaultValue={contactPoint?.value}\n onChange={(e) => setValue(e.currentTarget.value)}\n />\n </Group>\n );\n}\n"],"names":[],"mappings":";;;AAUM,SAAU,iBAAiB,CAAC,KAA6B,EAAA;AAC7D,IAAA,MAAM,CAAC,YAAY,EAAE,eAAe,CAAC,GAAG,QAAQ,CAAC,KAAK,CAAC,YAAY,CAAC,CAAC;AAErE,IAAA,MAAM,GAAG,GAAG,MAAM,EAAgB,CAAC;AACnC,IAAA,GAAG,CAAC,OAAO,GAAG,YAAY,CAAC;IAE3B,SAAS,sBAAsB,CAAC,QAAkC,EAAA;AAChE,QAAA,IAAI,QAAQ,IAAI,MAAM,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC,MAAM,KAAK,CAAC,EAAE;YAClD,QAAQ,GAAG,SAAS,CAAC;AACtB,SAAA;QACD,eAAe,CAAC,QAAQ,CAAC,CAAC;QAC1B,IAAI,KAAK,CAAC,QAAQ,EAAE;AAClB,YAAA,KAAK,CAAC,QAAQ,CAAC,QAAQ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AY,EACC,EAAA,aAAA,EAAA,KAAK,EACjB,YAAY,EAAE,YAAY,EAAE,GAAG,EAC/B,QAAQ,EAAE,CAAC,CAAC,KAAK,MAAM,CAAC,CAAC,CAAC,aAAa,CAAC,KAAoD,CAAC,EAC7F,IAAI,EAAE,CAAC,EAAE,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,KAAK,EAAE,QAAQ,CAAC,EACnD,CAAA;AACF,QAAA,KAAA,CAAA,aAAA,CAAC,SAAS,EAAA,EACR,WAAW,EAAC,OAAO,EACnB,YAAY,EAAE,YAAY,EAAE,KAAK,EACjC,QAAQ,EAAE,CAAC,CAAC,KAAK,QAAQ,CAAC,CAAC,CAAC,aAAa,CAAC,KAAK,CAAC,EAChD,CAAA,CACI,EACR;AACJ;;;;"}
@@ -1,19 +0,0 @@
1
- import { createStyles, Container as Container$1 } from '@mantine/core';
2
- import React from 'react';
3
-
4
- const useStyles = createStyles(() => ({
5
- root: {
6
- '@media (max-width: 800px)': {
7
- paddingLeft: 4,
8
- paddingRight: 4,
9
- },
10
- },
11
- }));
12
- function Container(props) {
13
- const { children, ...others } = props;
14
- const { classes } = useStyles();
15
- return (React.createElement(Container$1, { className: classes.root, ...others }, children));
16
- }
17
-
18
- export { Container };
19
- //# sourceMappingURL=Container.mjs.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"Container.mjs","sources":["../../../src/Container/Container.tsx"],"sourcesContent":["import { Container as MantineContainer, ContainerProps, createStyles } from '@mantine/core';\nimport React from 'react';\n\nconst useStyles = createStyles(() => ({\n root: {\n '@media (max-width: 800px)': {\n paddingLeft: 4,\n paddingRight: 4,\n },\n },\n}));\n\nexport function Container(props: ContainerProps): JSX.Element {\n const { children, ...others } = props;\n const { classes } = useStyles();\n\n return (\n <MantineContainer className={classes.root} {...others}>\n {children}\n </MantineContainer>\n );\n}\n"],"names":["MantineContainer"],"mappings":";;;AAGA,MAAM,SAAS,GAAG,YAAY,CAAC,OAAO;AACpC,IAAA,IAAI,EAAE;AACJ,QAAA,2BAA2B,EAAE;AAC3B,YAAA,WAAW,EAAE,CAAC;AACd,YAAA,YAAY,EAAE,CAAC;AAChB,SAAA;AACF,KAAA;AACF,CAAA,CAAC,CAAC,CAAC;AAEE,SAAU,SAAS,CAAC,KAAqB,EAAA;IAC7C,MAAM,EAAE,QAAQ,EAAE,GAAG,MAAM,EAAE,GAAG,KAAK,CAAC;AACtC,IAAA,MAAM,EAAE,OAAO,EAAE,GAAG,SAAS,EAAE,CAAC;AAEhC,IAAA,QACE,KAAA,CAAA,aAAA,CAACA,WAAgB,EAAA,EAAC,SAAS,EAAE,OAAO,CAAC,IAAI,KAAM,MAAM,EAAA,EAClD,QAAQ,CACQ,EACnB;AACJ;;;;"}
@@ -1,71 +0,0 @@
1
- import { TextInput } from '@mantine/core';
2
- import { isValidDate } from '@medplum/core';
3
- import React from 'react';
4
- import { getErrorsForInput } from '../utils/outcomes.mjs';
5
-
6
- /**
7
- * The DateTimeInput component is a wrapper around the HTML5 input type="datetime-local".
8
- * The main purpose is to reconcile time zones.
9
- * Most of our date/time values are in ISO-8601, which includes a time zone offset.
10
- * The datetime-local input does not support the time zone offset.
11
- * @param props The Input props.
12
- * @returns The JSX element to render.
13
- */
14
- function DateTimeInput(props) {
15
- return (React.createElement(TextInput, { id: props.name, name: props.name, "data-testid": props.name, placeholder: props.placeholder, required: props.required, type: getInputType(), defaultValue: convertIsoToLocal(props.defaultValue), error: getErrorsForInput(props.outcome, props.name), onChange: (e) => {
16
- if (props.onChange) {
17
- const newValue = e.currentTarget.value;
18
- props.onChange(convertLocalToIso(newValue));
19
- }
20
- } }));
21
- }
22
- /**
23
- * Converts an ISO-8601 date/time string to a local date/time string.
24
- * @param isoString The ISO-8601 date/time string to convert.
25
- * @returns The local date/time string.
26
- */
27
- function convertIsoToLocal(isoString) {
28
- if (!isoString) {
29
- return '';
30
- }
31
- // Convert the ISO-8601 date to a local datetime-local value.
32
- // See: https://developer.mozilla.org/en-US/docs/Web/HTML/Date_and_time_formats#local_date_and_time_strings
33
- // See: https://stackoverflow.com/a/60368477
34
- const date = new Date(isoString);
35
- if (!isValidDate(date)) {
36
- // If the input string was malformed, return an empty string.
37
- return '';
38
- }
39
- return date.toLocaleDateString('sv') + 'T' + date.toLocaleTimeString('sv');
40
- }
41
- /**
42
- * Converts a local date/time string to an ISO-8601 date/time string.
43
- * @param localString The local date/time string to convert.
44
- * @returns The ISO-8601 date/time string.
45
- */
46
- function convertLocalToIso(localString) {
47
- if (!localString) {
48
- return '';
49
- }
50
- // Try to parse the local string as a Date
51
- // JavaScript's Date() constructor defaults to the local time zone.
52
- // The Date() constructor will throw if the value is malformed.
53
- const date = new Date(localString);
54
- if (!isValidDate(date)) {
55
- // If the input string was malformed, return an empty string.
56
- return '';
57
- }
58
- return date.toISOString();
59
- }
60
- /**
61
- * Returns the input type for the requested type.
62
- * JSDOM does not support many of the valid <input> type attributes.
63
- * For example, it won't fire change events for <input type="datetime-local">.
64
- * @returns The input type for the current environment.
65
- */
66
- function getInputType() {
67
- return 'datetime-local';
68
- }
69
-
70
- export { DateTimeInput, convertIsoToLocal, convertLocalToIso };
71
- //# sourceMappingURL=DateTimeInput.mjs.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"DateTimeInput.mjs","sources":["../../../src/DateTimeInput/DateTimeInput.tsx"],"sourcesContent":["import { TextInput } from '@mantine/core';\nimport { isValidDate } from '@medplum/core';\nimport { OperationOutcome } from '@medplum/fhirtypes';\nimport React from 'react';\nimport { getErrorsForInput } from '../utils/outcomes';\n\nexport interface DateTimeInputProps {\n name?: string;\n placeholder?: string;\n defaultValue?: string;\n required?: boolean;\n outcome?: OperationOutcome;\n onChange?: (value: string) => void;\n}\n\n/**\n * The DateTimeInput component is a wrapper around the HTML5 input type=\"datetime-local\".\n * The main purpose is to reconcile time zones.\n * Most of our date/time values are in ISO-8601, which includes a time zone offset.\n * The datetime-local input does not support the time zone offset.\n * @param props The Input props.\n * @returns The JSX element to render.\n */\nexport function DateTimeInput(props: DateTimeInputProps): JSX.Element {\n return (\n <TextInput\n id={props.name}\n name={props.name}\n data-testid={props.name}\n placeholder={props.placeholder}\n required={props.required}\n type={getInputType()}\n defaultValue={convertIsoToLocal(props.defaultValue)}\n error={getErrorsForInput(props.outcome, props.name)}\n onChange={(e: React.ChangeEvent<HTMLInputElement>) => {\n if (props.onChange) {\n const newValue = e.currentTarget.value;\n props.onChange(convertLocalToIso(newValue));\n }\n }}\n />\n );\n}\n\n/**\n * Converts an ISO-8601 date/time string to a local date/time string.\n * @param isoString The ISO-8601 date/time string to convert.\n * @returns The local date/time string.\n */\nexport function convertIsoToLocal(isoString: string | undefined): string {\n if (!isoString) {\n return '';\n }\n\n // Convert the ISO-8601 date to a local datetime-local value.\n // See: https://developer.mozilla.org/en-US/docs/Web/HTML/Date_and_time_formats#local_date_and_time_strings\n // See: https://stackoverflow.com/a/60368477\n const date = new Date(isoString);\n if (!isValidDate(date)) {\n // If the input string was malformed, return an empty string.\n return '';\n }\n\n return date.toLocaleDateString('sv') + 'T' + date.toLocaleTimeString('sv');\n}\n\n/**\n * Converts a local date/time string to an ISO-8601 date/time string.\n * @param localString The local date/time string to convert.\n * @returns The ISO-8601 date/time string.\n */\nexport function convertLocalToIso(localString: string | undefined): string {\n if (!localString) {\n return '';\n }\n\n // Try to parse the local string as a Date\n // JavaScript's Date() constructor defaults to the local time zone.\n // The Date() constructor will throw if the value is malformed.\n const date = new Date(localString);\n if (!isValidDate(date)) {\n // If the input string was malformed, return an empty string.\n return '';\n }\n\n return date.toISOString();\n}\n\n/**\n * Returns the input type for the requested type.\n * JSDOM does not support many of the valid <input> type attributes.\n * For example, it won't fire change events for <input type=\"datetime-local\">.\n * @returns The input type for the current environment.\n */\nfunction getInputType(): string {\n return process.env.NODE_ENV === 'test' ? 'text' : 'datetime-local';\n}\n"],"names":[],"mappings":";;;;;AAeA;;;;;;;AAOG;AACG,SAAU,aAAa,CAAC,KAAyB,EAAA;AACrD,IAAA,QACE,KAAA,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,CAAC,WAAW,CAAC,CAAC;AACnC,IAAA,IAAI,CAAC,WAAW,CAAC,IAAI,CAAC,EAAE;;AAEtB,QAAA,OAAO,EAAE,CAAC;AACX,KAAA;AAED,IAAA,OAAO,IAAI,CAAC,WAAW,EAAE,CAAC;AAC5B,CAAC;AAED;;;;;AAKG;AACH,SAAS,YAAY,GAAA;AACnB,IAAA,OAAkD,gBAAgB,CAAC;AACrE;;;;"}
@@ -1,16 +0,0 @@
1
- import React from 'react';
2
- import { ResourceTimeline } from '../ResourceTimeline/ResourceTimeline.mjs';
3
-
4
- function DefaultResourceTimeline(props) {
5
- return (React.createElement(ResourceTimeline, { value: props.resource, loadTimelineResources: async (medplum, resourceType, id) => {
6
- const ref = `${resourceType}/${id}`;
7
- const _count = 100;
8
- return Promise.allSettled([
9
- medplum.readHistory(resourceType, id),
10
- medplum.search('Task', { _filter: `based-on eq ${ref} or focus eq ${ref} or subject eq ${ref}`, _count }),
11
- ]);
12
- } }));
13
- }
14
-
15
- export { DefaultResourceTimeline };
16
- //# sourceMappingURL=DefaultResourceTimeline.mjs.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"DefaultResourceTimeline.mjs","sources":["../../../src/DefaultResourceTimeline/DefaultResourceTimeline.tsx"],"sourcesContent":["import { MedplumClient } from '@medplum/core';\nimport { Reference, Resource, ResourceType } from '@medplum/fhirtypes';\nimport React from 'react';\nimport { ResourceTimeline } from '../ResourceTimeline/ResourceTimeline';\n\nexport interface DefaultResourceTimelineProps {\n resource: Resource | Reference;\n}\n\nexport function DefaultResourceTimeline(props: DefaultResourceTimelineProps): JSX.Element {\n return (\n <ResourceTimeline\n value={props.resource}\n loadTimelineResources={async (medplum: MedplumClient, resourceType: ResourceType, id: string) => {\n const ref = `${resourceType}/${id}`;\n const _count = 100;\n return Promise.allSettled([\n medplum.readHistory(resourceType, id),\n medplum.search('Task', { _filter: `based-on eq ${ref} or focus eq ${ref} or subject eq ${ref}`, _count }),\n ]);\n }}\n />\n );\n}\n"],"names":[],"mappings":";;;AASM,SAAU,uBAAuB,CAAC,KAAmC,EAAA;IACzE,QACE,oBAAC,gBAAgB,EAAA,EACf,KAAK,EAAE,KAAK,CAAC,QAAQ,EACrB,qBAAqB,EAAE,OAAO,OAAsB,EAAE,YAA0B,EAAE,EAAU,KAAI;AAC9F,YAAA,MAAM,GAAG,GAAG,CAAA,EAAG,YAAY,CAAI,CAAA,EAAA,EAAE,EAAE,CAAC;YACpC,MAAM,MAAM,GAAG,GAAG,CAAC;YACnB,OAAO,OAAO,CAAC,UAAU,CAAC;AACxB,gBAAA,OAAO,CAAC,WAAW,CAAC,YAAY,EAAE,EAAE,CAAC;AACrC,gBAAA,OAAO,CAAC,MAAM,CAAC,MAAM,EAAE,EAAE,OAAO,EAAE,CAAA,YAAA,EAAe,GAAG,CAAA,aAAA,EAAgB,GAAG,CAAkB,eAAA,EAAA,GAAG,EAAE,EAAE,MAAM,EAAE,CAAC;AAC1G,aAAA,CAAC,CAAC;SACJ,EAAA,CACD,EACF;AACJ;;;;"}