@medplum/react 2.0.17 → 2.0.19

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 (204) hide show
  1. package/dist/cjs/index.cjs +310 -147
  2. package/dist/cjs/index.cjs.map +1 -1
  3. package/dist/cjs/index.min.cjs +1 -1
  4. package/dist/esm/AppShell/AppShell.mjs +1 -1
  5. package/dist/esm/AppShell/AppShell.mjs.map +1 -1
  6. package/dist/esm/AppShell/Navbar.mjs +90 -32
  7. package/dist/esm/AppShell/Navbar.mjs.map +1 -1
  8. package/dist/esm/BookmarkDialog/BookmarkDialog.mjs +49 -0
  9. package/dist/esm/BookmarkDialog/BookmarkDialog.mjs.map +1 -0
  10. package/dist/esm/DefaultResourceTimeline/DefaultResourceTimeline.mjs +6 -1
  11. package/dist/esm/DefaultResourceTimeline/DefaultResourceTimeline.mjs.map +1 -1
  12. package/dist/esm/PatientTimeline/PatientTimeline.mjs +10 -7
  13. package/dist/esm/PatientTimeline/PatientTimeline.mjs.map +1 -1
  14. package/dist/esm/SearchControl/SearchUtils.mjs +1 -0
  15. package/dist/esm/SearchControl/SearchUtils.mjs.map +1 -1
  16. package/dist/esm/SearchFilterEditor/SearchFilterEditor.mjs +1 -1
  17. package/dist/esm/SearchFilterEditor/SearchFilterEditor.mjs.map +1 -1
  18. package/dist/esm/SearchFilterValueDisplay/SearchFilterValueDisplay.mjs +3 -2
  19. package/dist/esm/SearchFilterValueDisplay/SearchFilterValueDisplay.mjs.map +1 -1
  20. package/dist/esm/ServiceRequestTimeline/ServiceRequestTimeline.mjs +7 -4
  21. package/dist/esm/ServiceRequestTimeline/ServiceRequestTimeline.mjs.map +1 -1
  22. package/dist/esm/ValueSetAutocomplete/ValueSetAutocomplete.mjs +3 -0
  23. package/dist/esm/ValueSetAutocomplete/ValueSetAutocomplete.mjs.map +1 -1
  24. package/dist/esm/auth/AuthenticationForm.mjs +1 -1
  25. package/dist/esm/auth/AuthenticationForm.mjs.map +1 -1
  26. package/dist/esm/index.min.mjs +1 -1
  27. package/dist/esm/node_modules/@tabler/icons-react/dist/esm/createReactComponent.mjs +2 -1
  28. package/dist/esm/node_modules/@tabler/icons-react/dist/esm/createReactComponent.mjs.map +1 -1
  29. package/dist/esm/node_modules/@tabler/icons-react/dist/esm/defaultAttributes.mjs +1 -1
  30. package/dist/esm/node_modules/@tabler/icons-react/dist/esm/defaultAttributes.mjs.map +1 -1
  31. package/dist/esm/node_modules/@tabler/icons-react/dist/esm/icons/IconAdjustmentsHorizontal.mjs +2 -1
  32. package/dist/esm/node_modules/@tabler/icons-react/dist/esm/icons/IconAdjustmentsHorizontal.mjs.map +1 -1
  33. package/dist/esm/node_modules/@tabler/icons-react/dist/esm/icons/IconAlertCircle.mjs +2 -1
  34. package/dist/esm/node_modules/@tabler/icons-react/dist/esm/icons/IconAlertCircle.mjs.map +1 -1
  35. package/dist/esm/node_modules/@tabler/icons-react/dist/esm/icons/IconBleach.mjs +2 -1
  36. package/dist/esm/node_modules/@tabler/icons-react/dist/esm/icons/IconBleach.mjs.map +1 -1
  37. package/dist/esm/node_modules/@tabler/icons-react/dist/esm/icons/IconBleachOff.mjs +2 -1
  38. package/dist/esm/node_modules/@tabler/icons-react/dist/esm/icons/IconBleachOff.mjs.map +1 -1
  39. package/dist/esm/node_modules/@tabler/icons-react/dist/esm/icons/IconBoxMultiple.mjs +2 -1
  40. package/dist/esm/node_modules/@tabler/icons-react/dist/esm/icons/IconBoxMultiple.mjs.map +1 -1
  41. package/dist/esm/node_modules/@tabler/icons-react/dist/esm/icons/IconBracketsContain.mjs +2 -1
  42. package/dist/esm/node_modules/@tabler/icons-react/dist/esm/icons/IconBracketsContain.mjs.map +1 -1
  43. package/dist/esm/node_modules/@tabler/icons-react/dist/esm/icons/IconBucket.mjs +2 -1
  44. package/dist/esm/node_modules/@tabler/icons-react/dist/esm/icons/IconBucket.mjs.map +1 -1
  45. package/dist/esm/node_modules/@tabler/icons-react/dist/esm/icons/IconBucketOff.mjs +2 -1
  46. package/dist/esm/node_modules/@tabler/icons-react/dist/esm/icons/IconBucketOff.mjs.map +1 -1
  47. package/dist/esm/node_modules/@tabler/icons-react/dist/esm/icons/IconCalendar.mjs +2 -1
  48. package/dist/esm/node_modules/@tabler/icons-react/dist/esm/icons/IconCalendar.mjs.map +1 -1
  49. package/dist/esm/node_modules/@tabler/icons-react/dist/esm/icons/IconCheck.mjs +2 -1
  50. package/dist/esm/node_modules/@tabler/icons-react/dist/esm/icons/IconCheck.mjs.map +1 -1
  51. package/dist/esm/node_modules/@tabler/icons-react/dist/esm/icons/IconCheckbox.mjs +2 -1
  52. package/dist/esm/node_modules/@tabler/icons-react/dist/esm/icons/IconCheckbox.mjs.map +1 -1
  53. package/dist/esm/node_modules/@tabler/icons-react/dist/esm/icons/IconChevronDown.mjs +2 -1
  54. package/dist/esm/node_modules/@tabler/icons-react/dist/esm/icons/IconChevronDown.mjs.map +1 -1
  55. package/dist/esm/node_modules/@tabler/icons-react/dist/esm/icons/IconCircleMinus.mjs +2 -1
  56. package/dist/esm/node_modules/@tabler/icons-react/dist/esm/icons/IconCircleMinus.mjs.map +1 -1
  57. package/dist/esm/node_modules/@tabler/icons-react/dist/esm/icons/IconCirclePlus.mjs +2 -1
  58. package/dist/esm/node_modules/@tabler/icons-react/dist/esm/icons/IconCirclePlus.mjs.map +1 -1
  59. package/dist/esm/node_modules/@tabler/icons-react/dist/esm/icons/IconCloudUpload.mjs +2 -1
  60. package/dist/esm/node_modules/@tabler/icons-react/dist/esm/icons/IconCloudUpload.mjs.map +1 -1
  61. package/dist/esm/node_modules/@tabler/icons-react/dist/esm/icons/IconColumns.mjs +2 -1
  62. package/dist/esm/node_modules/@tabler/icons-react/dist/esm/icons/IconColumns.mjs.map +1 -1
  63. package/dist/esm/node_modules/@tabler/icons-react/dist/esm/icons/IconCurrencyDollar.mjs +2 -1
  64. package/dist/esm/node_modules/@tabler/icons-react/dist/esm/icons/IconCurrencyDollar.mjs.map +1 -1
  65. package/dist/esm/node_modules/@tabler/icons-react/dist/esm/icons/IconDots.mjs +2 -1
  66. package/dist/esm/node_modules/@tabler/icons-react/dist/esm/icons/IconDots.mjs.map +1 -1
  67. package/dist/esm/node_modules/@tabler/icons-react/dist/esm/icons/IconEdit.mjs +2 -1
  68. package/dist/esm/node_modules/@tabler/icons-react/dist/esm/icons/IconEdit.mjs.map +1 -1
  69. package/dist/esm/node_modules/@tabler/icons-react/dist/esm/icons/IconEqual.mjs +2 -1
  70. package/dist/esm/node_modules/@tabler/icons-react/dist/esm/icons/IconEqual.mjs.map +1 -1
  71. package/dist/esm/node_modules/@tabler/icons-react/dist/esm/icons/IconEqualNot.mjs +2 -1
  72. package/dist/esm/node_modules/@tabler/icons-react/dist/esm/icons/IconEqualNot.mjs.map +1 -1
  73. package/dist/esm/node_modules/@tabler/icons-react/dist/esm/icons/IconFileAlert.mjs +2 -1
  74. package/dist/esm/node_modules/@tabler/icons-react/dist/esm/icons/IconFileAlert.mjs.map +1 -1
  75. package/dist/esm/node_modules/@tabler/icons-react/dist/esm/icons/IconFilePlus.mjs +2 -1
  76. package/dist/esm/node_modules/@tabler/icons-react/dist/esm/icons/IconFilePlus.mjs.map +1 -1
  77. package/dist/esm/node_modules/@tabler/icons-react/dist/esm/icons/IconFilter.mjs +2 -1
  78. package/dist/esm/node_modules/@tabler/icons-react/dist/esm/icons/IconFilter.mjs.map +1 -1
  79. package/dist/esm/node_modules/@tabler/icons-react/dist/esm/icons/IconListDetails.mjs +2 -1
  80. package/dist/esm/node_modules/@tabler/icons-react/dist/esm/icons/IconListDetails.mjs.map +1 -1
  81. package/dist/esm/node_modules/@tabler/icons-react/dist/esm/icons/IconLogout.mjs +4 -2
  82. package/dist/esm/node_modules/@tabler/icons-react/dist/esm/icons/IconLogout.mjs.map +1 -1
  83. package/dist/esm/node_modules/@tabler/icons-react/dist/esm/icons/IconMathGreater.mjs +2 -1
  84. package/dist/esm/node_modules/@tabler/icons-react/dist/esm/icons/IconMathGreater.mjs.map +1 -1
  85. package/dist/esm/node_modules/@tabler/icons-react/dist/esm/icons/IconMathLower.mjs +2 -1
  86. package/dist/esm/node_modules/@tabler/icons-react/dist/esm/icons/IconMathLower.mjs.map +1 -1
  87. package/dist/esm/node_modules/@tabler/icons-react/dist/esm/icons/IconMessage.mjs +2 -1
  88. package/dist/esm/node_modules/@tabler/icons-react/dist/esm/icons/IconMessage.mjs.map +1 -1
  89. package/dist/esm/node_modules/@tabler/icons-react/dist/esm/icons/IconPin.mjs +2 -1
  90. package/dist/esm/node_modules/@tabler/icons-react/dist/esm/icons/IconPin.mjs.map +1 -1
  91. package/dist/esm/node_modules/@tabler/icons-react/dist/esm/icons/IconPinnedOff.mjs +2 -1
  92. package/dist/esm/node_modules/@tabler/icons-react/dist/esm/icons/IconPinnedOff.mjs.map +1 -1
  93. package/dist/esm/node_modules/@tabler/icons-react/dist/esm/icons/IconPlus.mjs +14 -0
  94. package/dist/esm/node_modules/@tabler/icons-react/dist/esm/icons/IconPlus.mjs.map +1 -0
  95. package/dist/esm/node_modules/@tabler/icons-react/dist/esm/icons/IconSearch.mjs +2 -1
  96. package/dist/esm/node_modules/@tabler/icons-react/dist/esm/icons/IconSearch.mjs.map +1 -1
  97. package/dist/esm/node_modules/@tabler/icons-react/dist/esm/icons/IconSettings.mjs +2 -1
  98. package/dist/esm/node_modules/@tabler/icons-react/dist/esm/icons/IconSettings.mjs.map +1 -1
  99. package/dist/esm/node_modules/@tabler/icons-react/dist/esm/icons/IconSortAscending.mjs +2 -1
  100. package/dist/esm/node_modules/@tabler/icons-react/dist/esm/icons/IconSortAscending.mjs.map +1 -1
  101. package/dist/esm/node_modules/@tabler/icons-react/dist/esm/icons/IconSortDescending.mjs +2 -1
  102. package/dist/esm/node_modules/@tabler/icons-react/dist/esm/icons/IconSortDescending.mjs.map +1 -1
  103. package/dist/esm/node_modules/@tabler/icons-react/dist/esm/icons/IconSquare.mjs +2 -1
  104. package/dist/esm/node_modules/@tabler/icons-react/dist/esm/icons/IconSquare.mjs.map +1 -1
  105. package/dist/esm/node_modules/@tabler/icons-react/dist/esm/icons/IconSwitchHorizontal.mjs +2 -1
  106. package/dist/esm/node_modules/@tabler/icons-react/dist/esm/icons/IconSwitchHorizontal.mjs.map +1 -1
  107. package/dist/esm/node_modules/@tabler/icons-react/dist/esm/icons/IconTableExport.mjs +2 -1
  108. package/dist/esm/node_modules/@tabler/icons-react/dist/esm/icons/IconTableExport.mjs.map +1 -1
  109. package/dist/esm/node_modules/@tabler/icons-react/dist/esm/icons/IconTrash.mjs +2 -1
  110. package/dist/esm/node_modules/@tabler/icons-react/dist/esm/icons/IconTrash.mjs.map +1 -1
  111. package/dist/esm/node_modules/@tabler/icons-react/dist/esm/icons/IconX.mjs +2 -1
  112. package/dist/esm/node_modules/@tabler/icons-react/dist/esm/icons/IconX.mjs.map +1 -1
  113. package/dist/types/AddressDisplay/AddressDisplay.d.ts +1 -0
  114. package/dist/types/AddressInput/AddressInput.d.ts +1 -0
  115. package/dist/types/AnnotationInput/AnnotationInput.d.ts +1 -0
  116. package/dist/types/AppShell/AppShell.d.ts +1 -0
  117. package/dist/types/AppShell/HeaderSearchInput.d.ts +1 -0
  118. package/dist/types/AppShell/Navbar.d.ts +2 -0
  119. package/dist/types/AsyncAutocomplete/AsyncAutocomplete.d.ts +1 -0
  120. package/dist/types/AttachmentArrayDisplay/AttachmentArrayDisplay.d.ts +1 -0
  121. package/dist/types/AttachmentArrayInput/AttachmentArrayInput.d.ts +1 -0
  122. package/dist/types/AttachmentDisplay/AttachmentDisplay.d.ts +1 -0
  123. package/dist/types/AttachmentInput/AttachmentInput.d.ts +1 -0
  124. package/dist/types/BackboneElementDisplay/BackboneElementDisplay.d.ts +1 -0
  125. package/dist/types/BackboneElementInput/BackboneElementInput.d.ts +1 -0
  126. package/dist/types/BookmarkDialog/BookmarkDialog.d.ts +9 -0
  127. package/dist/types/CalendarInput/CalendarInput.d.ts +1 -0
  128. package/dist/types/CodeInput/CodeInput.d.ts +1 -0
  129. package/dist/types/CodeableConceptDisplay/CodeableConceptDisplay.d.ts +1 -0
  130. package/dist/types/CodeableConceptInput/CodeableConceptInput.d.ts +1 -0
  131. package/dist/types/CodingDisplay/CodingDisplay.d.ts +1 -0
  132. package/dist/types/CodingInput/CodingInput.d.ts +1 -0
  133. package/dist/types/ContactDetailDisplay/ContactDetailDisplay.d.ts +1 -0
  134. package/dist/types/ContactDetailInput/ContactDetailInput.d.ts +1 -0
  135. package/dist/types/ContactPointDisplay/ContactPointDisplay.d.ts +1 -0
  136. package/dist/types/ContactPointInput/ContactPointInput.d.ts +1 -0
  137. package/dist/types/Container/Container.d.ts +1 -0
  138. package/dist/types/DateTimeInput/DateTimeInput.d.ts +1 -0
  139. package/dist/types/DefaultResourceTimeline/DefaultResourceTimeline.d.ts +1 -0
  140. package/dist/types/DiagnosticReportDisplay/DiagnosticReportDisplay.d.ts +1 -0
  141. package/dist/types/Document/Document.d.ts +1 -0
  142. package/dist/types/EncounterTimeline/EncounterTimeline.d.ts +1 -0
  143. package/dist/types/ExtensionInput/ExtensionInput.d.ts +1 -0
  144. package/dist/types/FhirPathDisplay/FhirPathDisplay.d.ts +1 -0
  145. package/dist/types/GoogleButton/GoogleButton.d.ts +1 -0
  146. package/dist/types/HumanNameDisplay/HumanNameDisplay.d.ts +1 -0
  147. package/dist/types/HumanNameInput/HumanNameInput.d.ts +1 -0
  148. package/dist/types/IdentifierDisplay/IdentifierDisplay.d.ts +1 -0
  149. package/dist/types/IdentifierInput/IdentifierInput.d.ts +1 -0
  150. package/dist/types/Loading/Loading.d.ts +1 -0
  151. package/dist/types/Logo/Logo.d.ts +1 -0
  152. package/dist/types/MoneyDisplay/MoneyDisplay.d.ts +1 -0
  153. package/dist/types/MoneyInput/MoneyInput.d.ts +1 -0
  154. package/dist/types/NoteDisplay/NoteDisplay.d.ts +1 -0
  155. package/dist/types/OperationOutcomeAlert/OperationOutcomeAlert.d.ts +1 -0
  156. package/dist/types/Panel/Panel.d.ts +1 -0
  157. package/dist/types/PatientTimeline/PatientTimeline.d.ts +1 -0
  158. package/dist/types/PeriodInput/PeriodInput.d.ts +1 -0
  159. package/dist/types/PlanDefinitionBuilder/PlanDefinitionBuilder.d.ts +1 -0
  160. package/dist/types/QuantityDisplay/QuantityDisplay.d.ts +1 -0
  161. package/dist/types/QuantityInput/QuantityInput.d.ts +1 -0
  162. package/dist/types/QuestionnaireBuilder/QuestionnaireBuilder.d.ts +1 -0
  163. package/dist/types/QuestionnaireForm/QuestionnaireForm.d.ts +1 -0
  164. package/dist/types/RangeDisplay/RangeDisplay.d.ts +1 -0
  165. package/dist/types/RangeInput/RangeInput.d.ts +1 -0
  166. package/dist/types/RatioDisplay/RatioDisplay.d.ts +1 -0
  167. package/dist/types/RatioInput/RatioInput.d.ts +1 -0
  168. package/dist/types/ReferenceDisplay/ReferenceDisplay.d.ts +1 -0
  169. package/dist/types/ReferenceInput/ReferenceInput.d.ts +1 -0
  170. package/dist/types/ReferenceRangeEditor/ReferenceRangeEditor.d.ts +1 -0
  171. package/dist/types/RequestGroupDisplay/RequestGroupDisplay.d.ts +1 -0
  172. package/dist/types/ResourceArrayDisplay/ResourceArrayDisplay.d.ts +1 -0
  173. package/dist/types/ResourceArrayInput/ResourceArrayInput.d.ts +1 -0
  174. package/dist/types/ResourceAvatar/ResourceAvatar.d.ts +1 -0
  175. package/dist/types/ResourceBadge/ResourceBadge.d.ts +1 -0
  176. package/dist/types/ResourceBlame/ResourceBlame.d.ts +1 -0
  177. package/dist/types/ResourceDiff/ResourceDiff.d.ts +1 -0
  178. package/dist/types/ResourceDiffTable/ResourceDiffTable.d.ts +1 -0
  179. package/dist/types/ResourceForm/ResourceForm.d.ts +1 -0
  180. package/dist/types/ResourceHistoryTable/ResourceHistoryTable.d.ts +1 -0
  181. package/dist/types/ResourceInput/ResourceInput.d.ts +1 -0
  182. package/dist/types/ResourceName/ResourceName.d.ts +1 -0
  183. package/dist/types/ResourcePropertyDisplay/ResourcePropertyDisplay.d.ts +1 -0
  184. package/dist/types/ResourcePropertyInput/ResourcePropertyInput.d.ts +1 -0
  185. package/dist/types/ResourceTable/ResourceTable.d.ts +1 -0
  186. package/dist/types/ResourceTimeline/ResourceTimeline.d.ts +1 -0
  187. package/dist/types/Scheduler/Scheduler.d.ts +1 -0
  188. package/dist/types/SearchControl/SearchUtils.d.ts +1 -0
  189. package/dist/types/SearchExportDialog/SearchExportDialog.d.ts +1 -0
  190. package/dist/types/SearchFieldEditor/SearchFieldEditor.d.ts +1 -0
  191. package/dist/types/SearchFilterEditor/SearchFilterEditor.d.ts +1 -0
  192. package/dist/types/SearchFilterValueDialog/SearchFilterValueDialog.d.ts +1 -0
  193. package/dist/types/SearchFilterValueDisplay/SearchFilterValueDisplay.d.ts +1 -0
  194. package/dist/types/SearchFilterValueInput/SearchFilterValueInput.d.ts +1 -0
  195. package/dist/types/SearchPopupMenu/SearchPopupMenu.d.ts +1 -0
  196. package/dist/types/ServiceRequestTimeline/ServiceRequestTimeline.d.ts +1 -0
  197. package/dist/types/StatusBadge/StatusBadge.d.ts +1 -0
  198. package/dist/types/TimingInput/TimingInput.d.ts +1 -0
  199. package/dist/types/ValueSetAutocomplete/ValueSetAutocomplete.d.ts +1 -0
  200. package/dist/types/auth/ChooseProfileForm.d.ts +1 -0
  201. package/dist/types/auth/ChooseScopeForm.d.ts +1 -0
  202. package/dist/types/auth/MfaForm.d.ts +1 -0
  203. package/dist/types/auth/NewProjectForm.d.ts +1 -0
  204. package/package.json +13 -13
@@ -154,7 +154,7 @@
154
154
  }
155
155
 
156
156
  /**
157
- * @tabler/icons-react v2.17.0 - MIT
157
+ * @tabler/icons-react v2.18.0 - MIT
158
158
  */
159
159
 
160
160
  var defaultAttributes = {
@@ -170,9 +170,10 @@
170
170
  };
171
171
 
172
172
  /**
173
- * @tabler/icons-react v2.17.0 - MIT
173
+ * @tabler/icons-react v2.18.0 - MIT
174
174
  */
175
175
 
176
+
176
177
  var __defProp = Object.defineProperty;
177
178
  var __defProps = Object.defineProperties;
178
179
  var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
@@ -233,9 +234,10 @@
233
234
  };
234
235
 
235
236
  /**
236
- * @tabler/icons-react v2.17.0 - MIT
237
+ * @tabler/icons-react v2.18.0 - MIT
237
238
  */
238
239
 
240
+
239
241
  var IconAdjustmentsHorizontal = createReactComponent(
240
242
  "adjustments-horizontal",
241
243
  "IconAdjustmentsHorizontal",
@@ -253,9 +255,10 @@
253
255
  );
254
256
 
255
257
  /**
256
- * @tabler/icons-react v2.17.0 - MIT
258
+ * @tabler/icons-react v2.18.0 - MIT
257
259
  */
258
260
 
261
+
259
262
  var IconAlertCircle = createReactComponent("alert-circle", "IconAlertCircle", [
260
263
  ["path", { d: "M3 12a9 9 0 1 0 18 0a9 9 0 0 0 -18 0", key: "svg-0" }],
261
264
  ["path", { d: "M12 8v4", key: "svg-1" }],
@@ -263,9 +266,10 @@
263
266
  ]);
264
267
 
265
268
  /**
266
- * @tabler/icons-react v2.17.0 - MIT
269
+ * @tabler/icons-react v2.18.0 - MIT
267
270
  */
268
271
 
272
+
269
273
  var IconBleachOff = createReactComponent("bleach-off", "IconBleachOff", [
270
274
  [
271
275
  "path",
@@ -278,9 +282,10 @@
278
282
  ]);
279
283
 
280
284
  /**
281
- * @tabler/icons-react v2.17.0 - MIT
285
+ * @tabler/icons-react v2.18.0 - MIT
282
286
  */
283
287
 
288
+
284
289
  var IconBleach = createReactComponent("bleach", "IconBleach", [
285
290
  [
286
291
  "path",
@@ -292,9 +297,10 @@
292
297
  ]);
293
298
 
294
299
  /**
295
- * @tabler/icons-react v2.17.0 - MIT
300
+ * @tabler/icons-react v2.18.0 - MIT
296
301
  */
297
302
 
303
+
298
304
  var IconBoxMultiple = createReactComponent("box-multiple", "IconBoxMultiple", [
299
305
  [
300
306
  "path",
@@ -313,9 +319,10 @@
313
319
  ]);
314
320
 
315
321
  /**
316
- * @tabler/icons-react v2.17.0 - MIT
322
+ * @tabler/icons-react v2.18.0 - MIT
317
323
  */
318
324
 
325
+
319
326
  var IconBracketsContain = createReactComponent("brackets-contain", "IconBracketsContain", [
320
327
  ["path", { d: "M7 4h-4v16h4", key: "svg-0" }],
321
328
  ["path", { d: "M17 4h4v16h-4", key: "svg-1" }],
@@ -325,9 +332,10 @@
325
332
  ]);
326
333
 
327
334
  /**
328
- * @tabler/icons-react v2.17.0 - MIT
335
+ * @tabler/icons-react v2.18.0 - MIT
329
336
  */
330
337
 
338
+
331
339
  var IconBucketOff = createReactComponent("bucket-off", "IconBucketOff", [
332
340
  [
333
341
  "path",
@@ -347,9 +355,10 @@
347
355
  ]);
348
356
 
349
357
  /**
350
- * @tabler/icons-react v2.17.0 - MIT
358
+ * @tabler/icons-react v2.18.0 - MIT
351
359
  */
352
360
 
361
+
353
362
  var IconBucket = createReactComponent("bucket", "IconBucket", [
354
363
  ["path", { d: "M12 7m-8 0a8 4 0 1 0 16 0a8 4 0 1 0 -16 0", key: "svg-0" }],
355
364
  [
@@ -362,9 +371,10 @@
362
371
  ]);
363
372
 
364
373
  /**
365
- * @tabler/icons-react v2.17.0 - MIT
374
+ * @tabler/icons-react v2.18.0 - MIT
366
375
  */
367
376
 
377
+
368
378
  var IconCalendar = createReactComponent("calendar", "IconCalendar", [
369
379
  [
370
380
  "path",
@@ -381,17 +391,19 @@
381
391
  ]);
382
392
 
383
393
  /**
384
- * @tabler/icons-react v2.17.0 - MIT
394
+ * @tabler/icons-react v2.18.0 - MIT
385
395
  */
386
396
 
397
+
387
398
  var IconCheck = createReactComponent("check", "IconCheck", [
388
399
  ["path", { d: "M5 12l5 5l10 -10", key: "svg-0" }]
389
400
  ]);
390
401
 
391
402
  /**
392
- * @tabler/icons-react v2.17.0 - MIT
403
+ * @tabler/icons-react v2.18.0 - MIT
393
404
  */
394
405
 
406
+
395
407
  var IconCheckbox = createReactComponent("checkbox", "IconCheckbox", [
396
408
  ["path", { d: "M9 11l3 3l8 -8", key: "svg-0" }],
397
409
  [
@@ -404,26 +416,29 @@
404
416
  ]);
405
417
 
406
418
  /**
407
- * @tabler/icons-react v2.17.0 - MIT
419
+ * @tabler/icons-react v2.18.0 - MIT
408
420
  */
409
421
 
422
+
410
423
  var IconChevronDown = createReactComponent("chevron-down", "IconChevronDown", [
411
424
  ["path", { d: "M6 9l6 6l6 -6", key: "svg-0" }]
412
425
  ]);
413
426
 
414
427
  /**
415
- * @tabler/icons-react v2.17.0 - MIT
428
+ * @tabler/icons-react v2.18.0 - MIT
416
429
  */
417
430
 
431
+
418
432
  var IconCircleMinus = createReactComponent("circle-minus", "IconCircleMinus", [
419
433
  ["path", { d: "M12 12m-9 0a9 9 0 1 0 18 0a9 9 0 1 0 -18 0", key: "svg-0" }],
420
434
  ["path", { d: "M9 12l6 0", key: "svg-1" }]
421
435
  ]);
422
436
 
423
437
  /**
424
- * @tabler/icons-react v2.17.0 - MIT
438
+ * @tabler/icons-react v2.18.0 - MIT
425
439
  */
426
440
 
441
+
427
442
  var IconCirclePlus = createReactComponent("circle-plus", "IconCirclePlus", [
428
443
  ["path", { d: "M12 12m-9 0a9 9 0 1 0 18 0a9 9 0 1 0 -18 0", key: "svg-0" }],
429
444
  ["path", { d: "M9 12l6 0", key: "svg-1" }],
@@ -431,9 +446,10 @@
431
446
  ]);
432
447
 
433
448
  /**
434
- * @tabler/icons-react v2.17.0 - MIT
449
+ * @tabler/icons-react v2.18.0 - MIT
435
450
  */
436
451
 
452
+
437
453
  var IconCloudUpload = createReactComponent("cloud-upload", "IconCloudUpload", [
438
454
  [
439
455
  "path",
@@ -447,9 +463,10 @@
447
463
  ]);
448
464
 
449
465
  /**
450
- * @tabler/icons-react v2.17.0 - MIT
466
+ * @tabler/icons-react v2.18.0 - MIT
451
467
  */
452
468
 
469
+
453
470
  var IconColumns = createReactComponent("columns", "IconColumns", [
454
471
  ["path", { d: "M4 6l5.5 0", key: "svg-0" }],
455
472
  ["path", { d: "M4 10l5.5 0", key: "svg-1" }],
@@ -462,9 +479,10 @@
462
479
  ]);
463
480
 
464
481
  /**
465
- * @tabler/icons-react v2.17.0 - MIT
482
+ * @tabler/icons-react v2.18.0 - MIT
466
483
  */
467
484
 
485
+
468
486
  var IconCurrencyDollar = createReactComponent("currency-dollar", "IconCurrencyDollar", [
469
487
  [
470
488
  "path",
@@ -477,9 +495,10 @@
477
495
  ]);
478
496
 
479
497
  /**
480
- * @tabler/icons-react v2.17.0 - MIT
498
+ * @tabler/icons-react v2.18.0 - MIT
481
499
  */
482
500
 
501
+
483
502
  var IconDots = createReactComponent("dots", "IconDots", [
484
503
  ["path", { d: "M5 12m-1 0a1 1 0 1 0 2 0a1 1 0 1 0 -2 0", key: "svg-0" }],
485
504
  ["path", { d: "M12 12m-1 0a1 1 0 1 0 2 0a1 1 0 1 0 -2 0", key: "svg-1" }],
@@ -487,9 +506,10 @@
487
506
  ]);
488
507
 
489
508
  /**
490
- * @tabler/icons-react v2.17.0 - MIT
509
+ * @tabler/icons-react v2.18.0 - MIT
491
510
  */
492
511
 
512
+
493
513
  var IconEdit = createReactComponent("edit", "IconEdit", [
494
514
  [
495
515
  "path",
@@ -509,9 +529,10 @@
509
529
  ]);
510
530
 
511
531
  /**
512
- * @tabler/icons-react v2.17.0 - MIT
532
+ * @tabler/icons-react v2.18.0 - MIT
513
533
  */
514
534
 
535
+
515
536
  var IconEqualNot = createReactComponent("equal-not", "IconEqualNot", [
516
537
  ["path", { d: "M5 10h14", key: "svg-0" }],
517
538
  ["path", { d: "M5 14h14", key: "svg-1" }],
@@ -519,18 +540,20 @@
519
540
  ]);
520
541
 
521
542
  /**
522
- * @tabler/icons-react v2.17.0 - MIT
543
+ * @tabler/icons-react v2.18.0 - MIT
523
544
  */
524
545
 
546
+
525
547
  var IconEqual = createReactComponent("equal", "IconEqual", [
526
548
  ["path", { d: "M5 10h14", key: "svg-0" }],
527
549
  ["path", { d: "M5 14h14", key: "svg-1" }]
528
550
  ]);
529
551
 
530
552
  /**
531
- * @tabler/icons-react v2.17.0 - MIT
553
+ * @tabler/icons-react v2.18.0 - MIT
532
554
  */
533
555
 
556
+
534
557
  var IconFileAlert = createReactComponent("file-alert", "IconFileAlert", [
535
558
  ["path", { d: "M14 3v4a1 1 0 0 0 1 1h4", key: "svg-0" }],
536
559
  [
@@ -545,9 +568,10 @@
545
568
  ]);
546
569
 
547
570
  /**
548
- * @tabler/icons-react v2.17.0 - MIT
571
+ * @tabler/icons-react v2.18.0 - MIT
549
572
  */
550
573
 
574
+
551
575
  var IconFilePlus = createReactComponent("file-plus", "IconFilePlus", [
552
576
  ["path", { d: "M14 3v4a1 1 0 0 0 1 1h4", key: "svg-0" }],
553
577
  [
@@ -562,9 +586,10 @@
562
586
  ]);
563
587
 
564
588
  /**
565
- * @tabler/icons-react v2.17.0 - MIT
589
+ * @tabler/icons-react v2.18.0 - MIT
566
590
  */
567
591
 
592
+
568
593
  var IconFilter = createReactComponent("filter", "IconFilter", [
569
594
  [
570
595
  "path",
@@ -576,9 +601,10 @@
576
601
  ]);
577
602
 
578
603
  /**
579
- * @tabler/icons-react v2.17.0 - MIT
604
+ * @tabler/icons-react v2.18.0 - MIT
580
605
  */
581
606
 
607
+
582
608
  var IconListDetails = createReactComponent("list-details", "IconListDetails", [
583
609
  ["path", { d: "M13 5h8", key: "svg-0" }],
584
610
  ["path", { d: "M13 9h5", key: "svg-1" }],
@@ -601,9 +627,10 @@
601
627
  ]);
602
628
 
603
629
  /**
604
- * @tabler/icons-react v2.17.0 - MIT
630
+ * @tabler/icons-react v2.18.0 - MIT
605
631
  */
606
632
 
633
+
607
634
  var IconLogout = createReactComponent("logout", "IconLogout", [
608
635
  [
609
636
  "path",
@@ -612,29 +639,33 @@
612
639
  key: "svg-0"
613
640
  }
614
641
  ],
615
- ["path", { d: "M7 12h14l-3 -3m0 6l3 -3", key: "svg-1" }]
642
+ ["path", { d: "M9 12h12l-3 -3", key: "svg-1" }],
643
+ ["path", { d: "M18 15l3 -3", key: "svg-2" }]
616
644
  ]);
617
645
 
618
646
  /**
619
- * @tabler/icons-react v2.17.0 - MIT
647
+ * @tabler/icons-react v2.18.0 - MIT
620
648
  */
621
649
 
650
+
622
651
  var IconMathGreater = createReactComponent("math-greater", "IconMathGreater", [
623
652
  ["path", { d: "M5 18l14 -6l-14 -6", key: "svg-0" }]
624
653
  ]);
625
654
 
626
655
  /**
627
- * @tabler/icons-react v2.17.0 - MIT
656
+ * @tabler/icons-react v2.18.0 - MIT
628
657
  */
629
658
 
659
+
630
660
  var IconMathLower = createReactComponent("math-lower", "IconMathLower", [
631
661
  ["path", { d: "M19 18l-14 -6l14 -6", key: "svg-0" }]
632
662
  ]);
633
663
 
634
664
  /**
635
- * @tabler/icons-react v2.17.0 - MIT
665
+ * @tabler/icons-react v2.18.0 - MIT
636
666
  */
637
667
 
668
+
638
669
  var IconMessage = createReactComponent("message", "IconMessage", [
639
670
  ["path", { d: "M8 9h8", key: "svg-0" }],
640
671
  ["path", { d: "M8 13h6", key: "svg-1" }],
@@ -648,9 +679,10 @@
648
679
  ]);
649
680
 
650
681
  /**
651
- * @tabler/icons-react v2.17.0 - MIT
682
+ * @tabler/icons-react v2.18.0 - MIT
652
683
  */
653
684
 
685
+
654
686
  var IconPin = createReactComponent("pin", "IconPin", [
655
687
  [
656
688
  "path",
@@ -664,9 +696,10 @@
664
696
  ]);
665
697
 
666
698
  /**
667
- * @tabler/icons-react v2.17.0 - MIT
699
+ * @tabler/icons-react v2.18.0 - MIT
668
700
  */
669
701
 
702
+
670
703
  var IconPinnedOff = createReactComponent("pinned-off", "IconPinnedOff", [
671
704
  ["path", { d: "M3 3l18 18", key: "svg-0" }],
672
705
  [
@@ -681,18 +714,30 @@
681
714
  ]);
682
715
 
683
716
  /**
684
- * @tabler/icons-react v2.17.0 - MIT
717
+ * @tabler/icons-react v2.18.0 - MIT
685
718
  */
686
719
 
720
+
721
+ var IconPlus = createReactComponent("plus", "IconPlus", [
722
+ ["path", { d: "M12 5l0 14", key: "svg-0" }],
723
+ ["path", { d: "M5 12l14 0", key: "svg-1" }]
724
+ ]);
725
+
726
+ /**
727
+ * @tabler/icons-react v2.18.0 - MIT
728
+ */
729
+
730
+
687
731
  var IconSearch = createReactComponent("search", "IconSearch", [
688
732
  ["path", { d: "M10 10m-7 0a7 7 0 1 0 14 0a7 7 0 1 0 -14 0", key: "svg-0" }],
689
733
  ["path", { d: "M21 21l-6 -6", key: "svg-1" }]
690
734
  ]);
691
735
 
692
736
  /**
693
- * @tabler/icons-react v2.17.0 - MIT
737
+ * @tabler/icons-react v2.18.0 - MIT
694
738
  */
695
739
 
740
+
696
741
  var IconSettings = createReactComponent("settings", "IconSettings", [
697
742
  [
698
743
  "path",
@@ -705,9 +750,10 @@
705
750
  ]);
706
751
 
707
752
  /**
708
- * @tabler/icons-react v2.17.0 - MIT
753
+ * @tabler/icons-react v2.18.0 - MIT
709
754
  */
710
755
 
756
+
711
757
  var IconSortAscending = createReactComponent("sort-ascending", "IconSortAscending", [
712
758
  ["path", { d: "M4 6l7 0", key: "svg-0" }],
713
759
  ["path", { d: "M4 12l7 0", key: "svg-1" }],
@@ -717,9 +763,10 @@
717
763
  ]);
718
764
 
719
765
  /**
720
- * @tabler/icons-react v2.17.0 - MIT
766
+ * @tabler/icons-react v2.18.0 - MIT
721
767
  */
722
768
 
769
+
723
770
  var IconSortDescending = createReactComponent("sort-descending", "IconSortDescending", [
724
771
  ["path", { d: "M4 6l9 0", key: "svg-0" }],
725
772
  ["path", { d: "M4 12l7 0", key: "svg-1" }],
@@ -729,9 +776,10 @@
729
776
  ]);
730
777
 
731
778
  /**
732
- * @tabler/icons-react v2.17.0 - MIT
779
+ * @tabler/icons-react v2.18.0 - MIT
733
780
  */
734
781
 
782
+
735
783
  var IconSquare = createReactComponent("square", "IconSquare", [
736
784
  [
737
785
  "path",
@@ -743,9 +791,10 @@
743
791
  ]);
744
792
 
745
793
  /**
746
- * @tabler/icons-react v2.17.0 - MIT
794
+ * @tabler/icons-react v2.18.0 - MIT
747
795
  */
748
796
 
797
+
749
798
  var IconSwitchHorizontal = createReactComponent(
750
799
  "switch-horizontal",
751
800
  "IconSwitchHorizontal",
@@ -758,9 +807,10 @@
758
807
  );
759
808
 
760
809
  /**
761
- * @tabler/icons-react v2.17.0 - MIT
810
+ * @tabler/icons-react v2.18.0 - MIT
762
811
  */
763
812
 
813
+
764
814
  var IconTableExport = createReactComponent("table-export", "IconTableExport", [
765
815
  [
766
816
  "path",
@@ -776,9 +826,10 @@
776
826
  ]);
777
827
 
778
828
  /**
779
- * @tabler/icons-react v2.17.0 - MIT
829
+ * @tabler/icons-react v2.18.0 - MIT
780
830
  */
781
831
 
832
+
782
833
  var IconTrash = createReactComponent("trash", "IconTrash", [
783
834
  ["path", { d: "M4 7l16 0", key: "svg-0" }],
784
835
  ["path", { d: "M10 11l0 6", key: "svg-1" }],
@@ -791,9 +842,10 @@
791
842
  ]);
792
843
 
793
844
  /**
794
- * @tabler/icons-react v2.17.0 - MIT
845
+ * @tabler/icons-react v2.18.0 - MIT
795
846
  */
796
847
 
848
+
797
849
  var IconX = createReactComponent("x", "IconX", [
798
850
  ["path", { d: "M18 6l-12 12", key: "svg-0" }],
799
851
  ["path", { d: "M6 6l12 12", key: "svg-1" }]
@@ -1390,6 +1442,102 @@
1390
1442
  React.createElement(core$1.Text, { size: "xs", color: "dimmed", align: "center" }, props.version))))));
1391
1443
  }
1392
1444
 
1445
+ /**
1446
+ * Parses an HTML form and returns the result as a JavaScript object.
1447
+ * @param form The HTML form element.
1448
+ */
1449
+ function parseForm(form) {
1450
+ const result = {};
1451
+ for (const element of Array.from(form.elements)) {
1452
+ if (element instanceof HTMLInputElement) {
1453
+ parseInputElement(result, element);
1454
+ }
1455
+ else if (element instanceof HTMLTextAreaElement) {
1456
+ result[element.name] = element.value;
1457
+ }
1458
+ else if (element instanceof HTMLSelectElement) {
1459
+ parseSelectElement(result, element);
1460
+ }
1461
+ }
1462
+ return result;
1463
+ }
1464
+ /**
1465
+ * Parses an HTML input element.
1466
+ * Sets the name/value pair in the result,
1467
+ * but only if the element is enabled and checked.
1468
+ * @param el The input element.
1469
+ * @param result The result builder.
1470
+ */
1471
+ function parseInputElement(result, el) {
1472
+ if (el.disabled) {
1473
+ // Ignore disabled elements
1474
+ return;
1475
+ }
1476
+ if ((el.type === 'checkbox' || el.type === 'radio') && !el.checked) {
1477
+ // Ignore unchecked radio or checkbox elements
1478
+ return;
1479
+ }
1480
+ result[el.name] = el.value;
1481
+ }
1482
+ /**
1483
+ * Parses an HTML select element.
1484
+ * Sets the name/value pair if one is selected.
1485
+ * @param result The result builder.
1486
+ * @param el The select element.
1487
+ */
1488
+ function parseSelectElement(result, el) {
1489
+ result[el.name] = el.value;
1490
+ }
1491
+
1492
+ function Form(props) {
1493
+ return (React.createElement("form", { style: props.style, "data-testid": props.testid, onSubmit: (e) => {
1494
+ e.preventDefault();
1495
+ const formData = parseForm(e.target);
1496
+ if (props.onSubmit) {
1497
+ props.onSubmit(formData);
1498
+ }
1499
+ } }, props.children));
1500
+ }
1501
+
1502
+ function BookmarkDialog(props) {
1503
+ const medplum = useMedplum();
1504
+ const config = medplum.getUserConfiguration();
1505
+ const location = reactRouterDom.useLocation();
1506
+ function submitHandler(formData) {
1507
+ const { menuname, bookmarkname: name } = formData;
1508
+ const target = location.pathname + location.search;
1509
+ const newConfig = core.deepClone(config);
1510
+ const menu = newConfig?.menu?.find(({ title }) => title === menuname);
1511
+ menu?.link?.push({ name, target });
1512
+ medplum
1513
+ .updateResource(newConfig)
1514
+ .then((res) => {
1515
+ // refresh current config menu
1516
+ config.menu = res.menu;
1517
+ medplum.dispatchEvent({ type: 'change' });
1518
+ notifications.showNotification({ color: 'green', message: 'Success' });
1519
+ props.onOk();
1520
+ })
1521
+ .catch((err) => {
1522
+ notifications.showNotification({ color: 'red', message: core.normalizeErrorString(err) });
1523
+ });
1524
+ }
1525
+ return (React.createElement(core$1.Modal, { title: "Add Bookmark", closeButtonProps: { 'aria-label': 'Close' }, opened: props.visible, onClose: props.onCancel },
1526
+ React.createElement(Form, { onSubmit: submitHandler },
1527
+ React.createElement(core$1.Stack, null,
1528
+ React.createElement(SelectMenu, { config: config }),
1529
+ React.createElement(core$1.TextInput, { label: "Bookmark Name", type: "text", name: "bookmarkname", placeholder: "bookmark name", withAsterisk: true }),
1530
+ React.createElement(core$1.Group, { position: "right" },
1531
+ React.createElement(core$1.Button, { mt: "sm", type: "submit" }, "OK"))))));
1532
+ }
1533
+ function SelectMenu(props) {
1534
+ function userConfigToMenu(config) {
1535
+ return config?.menu?.map((menu) => menu.title);
1536
+ }
1537
+ const menus = userConfigToMenu(props.config);
1538
+ return (React.createElement(core$1.NativeSelect, { name: "menuname", defaultValue: menus?.[0], label: "Select Menu Option", placeholder: "Menu", data: menus, withAsterisk: true }));
1539
+ }
1540
+
1393
1541
  function toKey(element) {
1394
1542
  return element.code;
1395
1543
  }
@@ -1413,6 +1561,9 @@
1413
1561
  const medplum = useMedplum();
1414
1562
  const { elementDefinition, creatable, clearable, ...rest } = props;
1415
1563
  const loadValues = React.useCallback(async (input, signal) => {
1564
+ if (!elementDefinition.binding) {
1565
+ return [];
1566
+ }
1416
1567
  const system = elementDefinition.binding?.valueSet;
1417
1568
  const valueSet = await medplum.searchValueSet(system, input, { signal });
1418
1569
  const valueSetElements = valueSet.expansion?.contains;
@@ -1498,6 +1649,10 @@
1498
1649
  function Navbar(props) {
1499
1650
  const { classes } = useStyles$f();
1500
1651
  const navigate = useMedplumNavigate();
1652
+ const location = reactRouterDom.useLocation();
1653
+ const [searchParams] = reactRouterDom.useSearchParams();
1654
+ const activeLink = getActiveLink(location.pathname, searchParams, props.menus);
1655
+ const [bookmarkDialogVisible, setBookmarkDialogVisible] = React.useState(false);
1501
1656
  function onLinkClick(e, to) {
1502
1657
  e.stopPropagation();
1503
1658
  e.preventDefault();
@@ -1511,40 +1666,27 @@
1511
1666
  navigate(`/${resourceType}`);
1512
1667
  }
1513
1668
  }
1514
- return (React.createElement(core$1.Navbar, { width: { sm: 250 }, p: "xs" },
1515
- React.createElement(core$1.Navbar.Section, null,
1516
- React.createElement(CodeInput, { key: window.location.pathname, name: "resourceType", placeholder: "Resource Type", property: {
1517
- binding: {
1518
- valueSet: 'http://hl7.org/fhir/ValueSet/resource-types',
1519
- },
1520
- }, onChange: (newValue) => navigateResourceType(newValue), creatable: false, maxSelectedValues: 0, clearSearchOnChange: true, clearable: false })),
1521
- props.menus && (React.createElement(core$1.Navbar.Section, { grow: true }, props.menus.map((menu) => (React.createElement(React.Fragment, { key: `menu-${menu.title}` },
1522
- React.createElement(core$1.Text, { className: classes.menuTitle }, menu.title),
1523
- menu.links?.map((link) => (React.createElement(NavbarLink, { key: link.href, to: link.href, onClick: (e) => onLinkClick(e, link.href) },
1524
- React.createElement(NavLinkIcon, { to: link.href, icon: link.icon }),
1525
- React.createElement("span", null, link.label)))))))))));
1669
+ return (React.createElement(React.Fragment, null,
1670
+ React.createElement(core$1.Navbar, { width: { sm: 250 }, p: "xs" },
1671
+ React.createElement(core$1.ScrollArea, null,
1672
+ React.createElement(core$1.Navbar.Section, { mb: "sm" },
1673
+ React.createElement(CodeInput, { key: window.location.pathname, name: "resourceType", placeholder: "Resource Type", property: {
1674
+ binding: {
1675
+ valueSet: 'http://hl7.org/fhir/ValueSet/resource-types',
1676
+ },
1677
+ }, onChange: (newValue) => navigateResourceType(newValue), creatable: false, maxSelectedValues: 0, clearSearchOnChange: true, clearable: false })),
1678
+ React.createElement(core$1.Navbar.Section, { grow: true },
1679
+ props.menus?.map((menu) => (React.createElement(React.Fragment, { key: `menu-${menu.title}` },
1680
+ React.createElement(core$1.Text, { className: classes.menuTitle }, menu.title),
1681
+ menu.links?.map((link) => (React.createElement(NavbarLink, { key: link.href, to: link.href, active: link.href === activeLink?.href, onClick: (e) => onLinkClick(e, link.href) },
1682
+ React.createElement(NavLinkIcon, { to: link.href, icon: link.icon }),
1683
+ React.createElement("span", null, link.label))))))),
1684
+ props.displayAddBookmark && (React.createElement(core$1.Button, { variant: "subtle", size: "xs", mt: "xl", leftIcon: React.createElement(IconPlus, { size: "0.75rem" }), onClick: () => setBookmarkDialogVisible(true) }, "Add Bookmark"))))),
1685
+ React.createElement(BookmarkDialog, { visible: bookmarkDialogVisible, onOk: () => setBookmarkDialogVisible(false), onCancel: () => setBookmarkDialogVisible(false) })));
1526
1686
  }
1527
1687
  function NavbarLink(props) {
1528
1688
  const { classes, cx } = useStyles$f();
1529
- const location = reactRouterDom.useLocation();
1530
- const [searchParams] = reactRouterDom.useSearchParams();
1531
- const toUrl = new URL(props.to, window.location.protocol + '//' + window.location.host);
1532
- const isActive = location.pathname === toUrl.pathname && matchesParams(searchParams, toUrl);
1533
- return (React.createElement(MedplumLink, { onClick: props.onClick, to: props.to, className: cx(classes.link, { [classes.linkActive]: isActive }) }, props.children));
1534
- }
1535
- /**
1536
- * Returns true if the search params match.
1537
- * @param searchParams The current search params.
1538
- * @param toUrl The destination URL of the link.
1539
- * @returns True if the search params match.
1540
- */
1541
- function matchesParams(searchParams, toUrl) {
1542
- for (const [key, value] of toUrl.searchParams.entries()) {
1543
- if (searchParams.get(key) !== value) {
1544
- return false;
1545
- }
1546
- }
1547
- return true;
1689
+ return (React.createElement(MedplumLink, { onClick: props.onClick, to: props.to, className: cx(classes.link, { [classes.linkActive]: props.active }) }, props.children));
1548
1690
  }
1549
1691
  function NavLinkIcon(props) {
1550
1692
  if (props.icon) {
@@ -1552,6 +1694,71 @@
1552
1694
  }
1553
1695
  return React.createElement(core$1.Space, { w: 30 });
1554
1696
  }
1697
+ /**
1698
+ * Returns the best "active" link for the menu.
1699
+ * In most cases, the navbar links are simple, and an exact match can determine which link is active.
1700
+ * However, we ignore some search parameters to support pagination.
1701
+ * But we cannot ignore all search parameters, to support separate links based on search filters.
1702
+ * So in the end, we use a simple scoring system based on the number of matching query search params.
1703
+ * @param currentPathname The web browser current pathname.
1704
+ * @param currentSearchParams The web browser current search parameters.
1705
+ * @param menus Collection of navbar menus and links.
1706
+ * @returns The active link if one is found.
1707
+ */
1708
+ function getActiveLink(currentPathname, currentSearchParams, menus) {
1709
+ let bestLink = undefined;
1710
+ let bestScore = 0;
1711
+ if (menus) {
1712
+ for (const menu of menus) {
1713
+ if (menu.links) {
1714
+ for (const link of menu.links) {
1715
+ const score = getLinkScore(currentPathname, currentSearchParams, link.href);
1716
+ if (score > bestScore) {
1717
+ bestScore = score;
1718
+ bestLink = link;
1719
+ }
1720
+ }
1721
+ }
1722
+ }
1723
+ }
1724
+ return bestLink;
1725
+ }
1726
+ /**
1727
+ * Calculates a score for a link.
1728
+ * Zero means "does not match at all".
1729
+ * One means "matches the pathname only".
1730
+ * Additional increases for each matching search parameter.
1731
+ * Ignores pagination parameters "_count" and "_offset".
1732
+ * @param currentPathname The web browser current pathname.
1733
+ * @param currentSearchParams The web browser current search parameters.
1734
+ * @param linkHref A candidate link href.
1735
+ * @returns The link score.
1736
+ */
1737
+ function getLinkScore(currentPathname, currentSearchParams, linkHref) {
1738
+ const linkUrl = new URL(linkHref, 'https://example.com');
1739
+ if (currentPathname !== linkUrl.pathname) {
1740
+ return 0;
1741
+ }
1742
+ const ignoredParams = ['_count', '_offset'];
1743
+ for (const [key, value] of linkUrl.searchParams.entries()) {
1744
+ if (ignoredParams.includes(key)) {
1745
+ continue;
1746
+ }
1747
+ if (currentSearchParams.get(key) !== value) {
1748
+ return 0;
1749
+ }
1750
+ }
1751
+ let count = 1;
1752
+ for (const [key, value] of currentSearchParams.entries()) {
1753
+ if (ignoredParams.includes(key)) {
1754
+ continue;
1755
+ }
1756
+ if (linkUrl.searchParams.get(key) === value) {
1757
+ count++;
1758
+ }
1759
+ }
1760
+ return count;
1761
+ }
1555
1762
 
1556
1763
  function AppShell(props) {
1557
1764
  const theme = core$1.useMantineTheme();
@@ -1575,7 +1782,7 @@
1575
1782
  main: {
1576
1783
  background: theme.colorScheme === 'dark' ? theme.colors.dark[8] : theme.colors.gray[0],
1577
1784
  },
1578
- }, padding: 0, fixed: true, header: profile && React.createElement(Header, { logo: props.logo, version: props.version, navbarToggle: toggleNavbar }), navbar: profile && navbarOpen ? React.createElement(Navbar, { menus: props.menus, closeNavbar: closeNavbar }) : undefined },
1785
+ }, padding: 0, fixed: true, header: profile && React.createElement(Header, { logo: props.logo, version: props.version, navbarToggle: toggleNavbar }), navbar: profile && navbarOpen ? (React.createElement(Navbar, { menus: props.menus, closeNavbar: closeNavbar, displayAddBookmark: props.displayAddBookmark })) : undefined },
1579
1786
  React.createElement(ErrorBoundary, null,
1580
1787
  React.createElement(React.Suspense, { fallback: React.createElement(Loading, null) }, props.children))));
1581
1788
  }
@@ -3256,63 +3463,6 @@
3256
3463
  return code === 'AA' || code === 'LL' || code === 'HH' || code === 'A';
3257
3464
  }
3258
3465
 
3259
- /**
3260
- * Parses an HTML form and returns the result as a JavaScript object.
3261
- * @param form The HTML form element.
3262
- */
3263
- function parseForm(form) {
3264
- const result = {};
3265
- for (const element of Array.from(form.elements)) {
3266
- if (element instanceof HTMLInputElement) {
3267
- parseInputElement(result, element);
3268
- }
3269
- else if (element instanceof HTMLTextAreaElement) {
3270
- result[element.name] = element.value;
3271
- }
3272
- else if (element instanceof HTMLSelectElement) {
3273
- parseSelectElement(result, element);
3274
- }
3275
- }
3276
- return result;
3277
- }
3278
- /**
3279
- * Parses an HTML input element.
3280
- * Sets the name/value pair in the result,
3281
- * but only if the element is enabled and checked.
3282
- * @param el The input element.
3283
- * @param result The result builder.
3284
- */
3285
- function parseInputElement(result, el) {
3286
- if (el.disabled) {
3287
- // Ignore disabled elements
3288
- return;
3289
- }
3290
- if ((el.type === 'checkbox' || el.type === 'radio') && !el.checked) {
3291
- // Ignore unchecked radio or checkbox elements
3292
- return;
3293
- }
3294
- result[el.name] = el.value;
3295
- }
3296
- /**
3297
- * Parses an HTML select element.
3298
- * Sets the name/value pair if one is selected.
3299
- * @param result The result builder.
3300
- * @param el The select element.
3301
- */
3302
- function parseSelectElement(result, el) {
3303
- result[el.name] = el.value;
3304
- }
3305
-
3306
- function Form(props) {
3307
- return (React.createElement("form", { style: props.style, "data-testid": props.testid, onSubmit: (e) => {
3308
- e.preventDefault();
3309
- const formData = parseForm(e.target);
3310
- if (props.onSubmit) {
3311
- props.onSubmit(formData);
3312
- }
3313
- } }, props.children));
3314
- }
3315
-
3316
3466
  const useStyles$9 = core$1.createStyles((theme, { width, fill }) => ({
3317
3467
  paper: {
3318
3468
  maxWidth: width,
@@ -3792,7 +3942,12 @@
3792
3942
 
3793
3943
  function DefaultResourceTimeline(props) {
3794
3944
  return (React.createElement(ResourceTimeline, { value: props.resource, loadTimelineResources: async (medplum, resourceType, id) => {
3795
- return Promise.allSettled([medplum.readHistory(resourceType, id)]);
3945
+ const ref = `${resourceType}/${id}`;
3946
+ const _count = 100;
3947
+ return Promise.allSettled([
3948
+ medplum.readHistory(resourceType, id),
3949
+ medplum.search('Task', { _filter: `based-on eq ${ref} or focus eq ${ref} or subject eq ${ref}`, _count }),
3950
+ ]);
3796
3951
  } }));
3797
3952
  }
3798
3953
 
@@ -3910,6 +4065,7 @@
3910
4065
  'of-type': 'of type',
3911
4066
  missing: 'missing',
3912
4067
  identifier: 'identifier',
4068
+ iterate: 'iterate',
3913
4069
  };
3914
4070
  /**
3915
4071
  * Sets the array of filters.
@@ -4506,7 +4662,8 @@
4506
4662
  const { resourceType, filter } = props;
4507
4663
  const searchParam = core.globalSchema.types[resourceType]?.searchParams?.[filter.code];
4508
4664
  if (searchParam) {
4509
- if (searchParam.type === 'reference') {
4665
+ if (searchParam.type === 'reference' &&
4666
+ (filter.operator === core.Operator.EQUALS || filter.operator === core.Operator.NOT_EQUALS)) {
4510
4667
  return React.createElement(ResourceName, { value: { reference: filter.value } });
4511
4668
  }
4512
4669
  const searchParamDetails = core.getSearchParameterDetails(resourceType, searchParam);
@@ -4580,7 +4737,7 @@
4580
4737
  return null;
4581
4738
  }
4582
4739
  const resourceType = props.search.resourceType;
4583
- const searchParams = core.globalSchema.types[resourceType].searchParams;
4740
+ const searchParams = core.globalSchema.types[resourceType].searchParams ?? {};
4584
4741
  const filters = search.filters || [];
4585
4742
  return (React.createElement(core$1.Modal, { title: "Filters", closeButtonProps: { 'aria-label': 'Close' }, size: 900, opened: props.visible, onClose: props.onCancel },
4586
4743
  React.createElement("div", null,
@@ -5327,15 +5484,18 @@
5327
5484
  }
5328
5485
 
5329
5486
  function PatientTimeline(props) {
5330
- const loadTimelineResources = React.useCallback((medplum, _resourceType, id) => {
5487
+ const loadTimelineResources = React.useCallback((medplum, resourceType, id) => {
5488
+ const ref = `${resourceType}/${id}`;
5489
+ const _count = 100;
5331
5490
  return Promise.allSettled([
5332
5491
  medplum.readHistory('Patient', id),
5333
- medplum.search('Communication', 'subject=Patient/' + id),
5334
- medplum.search('Device', 'patient=Patient/' + id),
5335
- medplum.search('DeviceRequest', 'patient=Patient/' + id),
5336
- medplum.search('DiagnosticReport', 'subject=Patient/' + id),
5337
- medplum.search('Media', 'subject=Patient/' + id),
5338
- medplum.search('ServiceRequest', 'subject=Patient/' + id),
5492
+ medplum.search('Communication', { subject: ref, _count }),
5493
+ medplum.search('Device', { patient: ref, _count }),
5494
+ medplum.search('DeviceRequest', { patient: ref, _count }),
5495
+ medplum.search('DiagnosticReport', { subject: ref, _count }),
5496
+ medplum.search('Media', { subject: ref, _count }),
5497
+ medplum.search('ServiceRequest', { subject: ref, _count }),
5498
+ medplum.search('Task', { subject: ref, _count }),
5339
5499
  ]);
5340
5500
  }, []);
5341
5501
  return (React.createElement(ResourceTimeline, { value: props.patient, loadTimelineResources: loadTimelineResources, createCommunication: (resource, sender, text) => ({
@@ -6925,12 +7085,15 @@
6925
7085
  }
6926
7086
 
6927
7087
  function ServiceRequestTimeline(props) {
6928
- return (React.createElement(ResourceTimeline, { value: props.serviceRequest, loadTimelineResources: async (medplum, _resourceType, id) => {
7088
+ return (React.createElement(ResourceTimeline, { value: props.serviceRequest, loadTimelineResources: async (medplum, resourceType, id) => {
7089
+ const ref = `${resourceType}/${id}`;
7090
+ const _count = 100;
6929
7091
  return Promise.allSettled([
6930
7092
  medplum.readHistory('ServiceRequest', id),
6931
- medplum.search('Communication', 'based-on=ServiceRequest/' + id),
6932
- medplum.search('Media', '_count=100&based-on=ServiceRequest/' + id),
6933
- medplum.search('DiagnosticReport', 'based-on=ServiceRequest/' + id),
7093
+ medplum.search('Communication', { 'based-on': ref, _count }),
7094
+ medplum.search('DiagnosticReport', { 'based-on': ref, _count }),
7095
+ medplum.search('Media', { 'based-on': ref, _count }),
7096
+ medplum.search('Task', { _filter: `based-on eq ${ref} or focus eq ${ref} or subject eq ${ref}`, _count }),
6934
7097
  ]);
6935
7098
  }, createCommunication: (resource, sender, text) => ({
6936
7099
  resourceType: 'Communication',
@@ -7240,7 +7403,7 @@
7240
7403
  React.createElement(core$1.Center, { sx: { flexDirection: 'column' } }, children),
7241
7404
  React.createElement(OperationOutcomeAlert, { issues: issues }),
7242
7405
  React.createElement(core$1.Stack, { spacing: "xl" },
7243
- React.createElement(core$1.PasswordInput, { name: "password", label: "Password", autoComplete: "off", required: true, error: getErrorsForInput(outcome, 'password') })),
7406
+ React.createElement(core$1.PasswordInput, { name: "password", label: "Password", autoComplete: "off", required: true, autoFocus: true, error: getErrorsForInput(outcome, 'password') })),
7244
7407
  React.createElement(core$1.Group, { position: "apart", mt: "xl", spacing: 0, noWrap: true },
7245
7408
  onForgotPassword && (React.createElement(core$1.Anchor, { component: "button", type: "button", color: "dimmed", onClick: onForgotPassword, size: "xs" }, "Forgot password")),
7246
7409
  React.createElement(core$1.Checkbox, { id: "remember", name: "remember", label: "Remember me", size: "xs", sx: { lineHeight: 1 } }),