@medplum/react 2.0.1 → 2.0.3

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 (165) hide show
  1. package/dist/cjs/DiagnosticReportDisplay/DiagnosticReportDisplay.d.ts +2 -0
  2. package/dist/cjs/DiagnosticReportDisplay/DiagnosticReportDisplay.stories.d.ts +1 -0
  3. package/dist/cjs/MedplumProvider/MedplumProvider.d.ts +8 -0
  4. package/dist/cjs/NoteDisplay/NoteDisplay.d.ts +6 -0
  5. package/dist/cjs/NoteDisplay/NoteDisplay.stories.d.ts +7 -0
  6. package/dist/cjs/OperationOutcomeAlert/OperationOutcomeAlert.d.ts +2 -1
  7. package/dist/cjs/QuantityInput/QuantityInput.d.ts +1 -0
  8. package/dist/cjs/QuantityInput/QuantityInput.stories.d.ts +7 -0
  9. package/dist/cjs/ResourceTable/ResourceTable.d.ts +13 -0
  10. package/dist/cjs/ResourceTimeline/ResourceTimeline.d.ts +2 -2
  11. package/dist/cjs/index.cjs +917 -230
  12. package/dist/cjs/index.cjs.map +1 -1
  13. package/dist/cjs/index.d.ts +1 -0
  14. package/dist/cjs/index.min.cjs +1 -1
  15. package/dist/cjs/useResource/useResource.d.ts +2 -2
  16. package/dist/cjs/utils/date.d.ts +2 -1
  17. package/dist/esm/AttachmentArrayInput/AttachmentArrayInput.mjs +2 -1
  18. package/dist/esm/AttachmentArrayInput/AttachmentArrayInput.mjs.map +1 -1
  19. package/dist/esm/DefaultResourceTimeline/DefaultResourceTimeline.mjs +2 -6
  20. package/dist/esm/DefaultResourceTimeline/DefaultResourceTimeline.mjs.map +1 -1
  21. package/dist/esm/DiagnosticReportDisplay/DiagnosticReportDisplay.d.ts +2 -0
  22. package/dist/esm/DiagnosticReportDisplay/DiagnosticReportDisplay.mjs +26 -22
  23. package/dist/esm/DiagnosticReportDisplay/DiagnosticReportDisplay.mjs.map +1 -1
  24. package/dist/esm/DiagnosticReportDisplay/DiagnosticReportDisplay.stories.d.ts +1 -0
  25. package/dist/esm/EncounterTimeline/EncounterTimeline.mjs +6 -6
  26. package/dist/esm/EncounterTimeline/EncounterTimeline.mjs.map +1 -1
  27. package/dist/esm/ErrorBoundary/ErrorBoundary.mjs +1 -1
  28. package/dist/esm/ErrorBoundary/ErrorBoundary.mjs.map +1 -1
  29. package/dist/esm/GoogleButton/GoogleButton.mjs +6 -4
  30. package/dist/esm/GoogleButton/GoogleButton.mjs.map +1 -1
  31. package/dist/esm/MedplumLink/MedplumLink.mjs +2 -2
  32. package/dist/esm/MedplumLink/MedplumLink.mjs.map +1 -1
  33. package/dist/esm/MedplumProvider/MedplumProvider.d.ts +8 -0
  34. package/dist/esm/MedplumProvider/MedplumProvider.mjs +17 -1
  35. package/dist/esm/MedplumProvider/MedplumProvider.mjs.map +1 -1
  36. package/dist/esm/MoneyInput/MoneyInput.mjs +1 -1
  37. package/dist/esm/MoneyInput/MoneyInput.mjs.map +1 -1
  38. package/dist/esm/NoteDisplay/NoteDisplay.d.ts +6 -0
  39. package/dist/esm/NoteDisplay/NoteDisplay.mjs +18 -0
  40. package/dist/esm/NoteDisplay/NoteDisplay.mjs.map +1 -0
  41. package/dist/esm/NoteDisplay/NoteDisplay.stories.d.ts +7 -0
  42. package/dist/esm/OperationOutcomeAlert/OperationOutcomeAlert.d.ts +2 -1
  43. package/dist/esm/OperationOutcomeAlert/OperationOutcomeAlert.mjs +4 -3
  44. package/dist/esm/OperationOutcomeAlert/OperationOutcomeAlert.mjs.map +1 -1
  45. package/dist/esm/PatientTimeline/PatientTimeline.mjs +10 -10
  46. package/dist/esm/PatientTimeline/PatientTimeline.mjs.map +1 -1
  47. package/dist/esm/QuantityInput/QuantityInput.d.ts +1 -0
  48. package/dist/esm/QuantityInput/QuantityInput.mjs +10 -4
  49. package/dist/esm/QuantityInput/QuantityInput.mjs.map +1 -1
  50. package/dist/esm/QuantityInput/QuantityInput.stories.d.ts +7 -0
  51. package/dist/esm/QuestionnaireForm/QuestionnaireForm.mjs +2 -2
  52. package/dist/esm/QuestionnaireForm/QuestionnaireForm.mjs.map +1 -1
  53. package/dist/esm/ReferenceRangeEditor/ReferenceRangeEditor.mjs +2 -1
  54. package/dist/esm/ReferenceRangeEditor/ReferenceRangeEditor.mjs.map +1 -1
  55. package/dist/esm/RequestGroupDisplay/RequestGroupDisplay.mjs +2 -1
  56. package/dist/esm/RequestGroupDisplay/RequestGroupDisplay.mjs.map +1 -1
  57. package/dist/esm/ResourceArrayInput/ResourceArrayInput.mjs +2 -1
  58. package/dist/esm/ResourceArrayInput/ResourceArrayInput.mjs.map +1 -1
  59. package/dist/esm/ResourceTable/ResourceTable.d.ts +13 -0
  60. package/dist/esm/ResourceTable/ResourceTable.mjs +4 -1
  61. package/dist/esm/ResourceTable/ResourceTable.mjs.map +1 -1
  62. package/dist/esm/ResourceTimeline/ResourceTimeline.d.ts +2 -2
  63. package/dist/esm/ResourceTimeline/ResourceTimeline.mjs +62 -34
  64. package/dist/esm/ResourceTimeline/ResourceTimeline.mjs.map +1 -1
  65. package/dist/esm/SearchControl/SearchControl.mjs +7 -1
  66. package/dist/esm/SearchControl/SearchControl.mjs.map +1 -1
  67. package/dist/esm/SearchPopupMenu/SearchPopupMenu.mjs +14 -1
  68. package/dist/esm/SearchPopupMenu/SearchPopupMenu.mjs.map +1 -1
  69. package/dist/esm/ServiceRequestTimeline/ServiceRequestTimeline.mjs +7 -7
  70. package/dist/esm/ServiceRequestTimeline/ServiceRequestTimeline.mjs.map +1 -1
  71. package/dist/esm/Timeline/Timeline.mjs +1 -1
  72. package/dist/esm/Timeline/Timeline.mjs.map +1 -1
  73. package/dist/esm/auth/AuthenticationForm.mjs +1 -1
  74. package/dist/esm/auth/AuthenticationForm.mjs.map +1 -1
  75. package/dist/esm/auth/MfaForm.mjs +1 -1
  76. package/dist/esm/auth/MfaForm.mjs.map +1 -1
  77. package/dist/esm/index.d.ts +1 -0
  78. package/dist/esm/index.min.mjs +1 -1
  79. package/dist/esm/index.mjs +2 -1
  80. package/dist/esm/index.mjs.map +1 -1
  81. package/dist/esm/node_modules/@tabler/icons-react/dist/esm/createReactComponent.mjs +69 -0
  82. package/dist/esm/node_modules/@tabler/icons-react/dist/esm/createReactComponent.mjs.map +1 -0
  83. package/dist/esm/node_modules/@tabler/icons-react/dist/esm/defaultAttributes.mjs +18 -0
  84. package/dist/esm/node_modules/@tabler/icons-react/dist/esm/defaultAttributes.mjs.map +1 -0
  85. package/dist/esm/node_modules/@tabler/icons-react/dist/esm/icons/IconAdjustmentsHorizontal.mjs +24 -0
  86. package/dist/esm/node_modules/@tabler/icons-react/dist/esm/icons/IconAdjustmentsHorizontal.mjs.map +1 -0
  87. package/dist/esm/node_modules/@tabler/icons-react/dist/esm/icons/IconAlertCircle.mjs +14 -0
  88. package/dist/esm/node_modules/@tabler/icons-react/dist/esm/icons/IconAlertCircle.mjs.map +1 -0
  89. package/dist/esm/node_modules/@tabler/icons-react/dist/esm/icons/IconBleach.mjs +18 -0
  90. package/dist/esm/node_modules/@tabler/icons-react/dist/esm/icons/IconBleach.mjs.map +1 -0
  91. package/dist/esm/node_modules/@tabler/icons-react/dist/esm/icons/IconBleachOff.mjs +19 -0
  92. package/dist/esm/node_modules/@tabler/icons-react/dist/esm/icons/IconBleachOff.mjs.map +1 -0
  93. package/dist/esm/node_modules/@tabler/icons-react/dist/esm/icons/IconBoxMultiple.mjs +25 -0
  94. package/dist/esm/node_modules/@tabler/icons-react/dist/esm/icons/IconBoxMultiple.mjs.map +1 -0
  95. package/dist/esm/node_modules/@tabler/icons-react/dist/esm/icons/IconBracketsContain.mjs +16 -0
  96. package/dist/esm/node_modules/@tabler/icons-react/dist/esm/icons/IconBracketsContain.mjs.map +1 -0
  97. package/dist/esm/node_modules/@tabler/icons-react/dist/esm/icons/IconBucket.mjs +19 -0
  98. package/dist/esm/node_modules/@tabler/icons-react/dist/esm/icons/IconBucket.mjs.map +1 -0
  99. package/dist/esm/node_modules/@tabler/icons-react/dist/esm/icons/IconBucketOff.mjs +26 -0
  100. package/dist/esm/node_modules/@tabler/icons-react/dist/esm/icons/IconBucketOff.mjs.map +1 -0
  101. package/dist/esm/node_modules/@tabler/icons-react/dist/esm/icons/IconCalendar.mjs +23 -0
  102. package/dist/esm/node_modules/@tabler/icons-react/dist/esm/icons/IconCalendar.mjs.map +1 -0
  103. package/dist/esm/node_modules/@tabler/icons-react/dist/esm/icons/IconCheck.mjs +12 -0
  104. package/dist/esm/node_modules/@tabler/icons-react/dist/esm/icons/IconCheck.mjs.map +1 -0
  105. package/dist/esm/node_modules/@tabler/icons-react/dist/esm/icons/IconCheckbox.mjs +19 -0
  106. package/dist/esm/node_modules/@tabler/icons-react/dist/esm/icons/IconCheckbox.mjs.map +1 -0
  107. package/dist/esm/node_modules/@tabler/icons-react/dist/esm/icons/IconCircleMinus.mjs +13 -0
  108. package/dist/esm/node_modules/@tabler/icons-react/dist/esm/icons/IconCircleMinus.mjs.map +1 -0
  109. package/dist/esm/node_modules/@tabler/icons-react/dist/esm/icons/IconCirclePlus.mjs +14 -0
  110. package/dist/esm/node_modules/@tabler/icons-react/dist/esm/icons/IconCirclePlus.mjs.map +1 -0
  111. package/dist/esm/node_modules/@tabler/icons-react/dist/esm/icons/IconCloudUpload.mjs +20 -0
  112. package/dist/esm/node_modules/@tabler/icons-react/dist/esm/icons/IconCloudUpload.mjs.map +1 -0
  113. package/dist/esm/node_modules/@tabler/icons-react/dist/esm/icons/IconColumns.mjs +19 -0
  114. package/dist/esm/node_modules/@tabler/icons-react/dist/esm/icons/IconColumns.mjs.map +1 -0
  115. package/dist/esm/node_modules/@tabler/icons-react/dist/esm/icons/IconCurrencyDollar.mjs +19 -0
  116. package/dist/esm/node_modules/@tabler/icons-react/dist/esm/icons/IconCurrencyDollar.mjs.map +1 -0
  117. package/dist/esm/node_modules/@tabler/icons-react/dist/esm/icons/IconDots.mjs +14 -0
  118. package/dist/esm/node_modules/@tabler/icons-react/dist/esm/icons/IconDots.mjs.map +1 -0
  119. package/dist/esm/node_modules/@tabler/icons-react/dist/esm/icons/IconEdit.mjs +26 -0
  120. package/dist/esm/node_modules/@tabler/icons-react/dist/esm/icons/IconEdit.mjs.map +1 -0
  121. package/dist/esm/node_modules/@tabler/icons-react/dist/esm/icons/IconEqual.mjs +13 -0
  122. package/dist/esm/node_modules/@tabler/icons-react/dist/esm/icons/IconEqual.mjs.map +1 -0
  123. package/dist/esm/node_modules/@tabler/icons-react/dist/esm/icons/IconEqualNot.mjs +14 -0
  124. package/dist/esm/node_modules/@tabler/icons-react/dist/esm/icons/IconEqualNot.mjs.map +1 -0
  125. package/dist/esm/node_modules/@tabler/icons-react/dist/esm/icons/IconFileAlert.mjs +21 -0
  126. package/dist/esm/node_modules/@tabler/icons-react/dist/esm/icons/IconFileAlert.mjs.map +1 -0
  127. package/dist/esm/node_modules/@tabler/icons-react/dist/esm/icons/IconFilePlus.mjs +21 -0
  128. package/dist/esm/node_modules/@tabler/icons-react/dist/esm/icons/IconFilePlus.mjs.map +1 -0
  129. package/dist/esm/node_modules/@tabler/icons-react/dist/esm/icons/IconFilter.mjs +18 -0
  130. package/dist/esm/node_modules/@tabler/icons-react/dist/esm/icons/IconFilter.mjs.map +1 -0
  131. package/dist/esm/node_modules/@tabler/icons-react/dist/esm/icons/IconListDetails.mjs +29 -0
  132. package/dist/esm/node_modules/@tabler/icons-react/dist/esm/icons/IconListDetails.mjs.map +1 -0
  133. package/dist/esm/node_modules/@tabler/icons-react/dist/esm/icons/IconMathGreater.mjs +12 -0
  134. package/dist/esm/node_modules/@tabler/icons-react/dist/esm/icons/IconMathGreater.mjs.map +1 -0
  135. package/dist/esm/node_modules/@tabler/icons-react/dist/esm/icons/IconMathLower.mjs +12 -0
  136. package/dist/esm/node_modules/@tabler/icons-react/dist/esm/icons/IconMathLower.mjs.map +1 -0
  137. package/dist/esm/node_modules/@tabler/icons-react/dist/esm/icons/IconMessage.mjs +20 -0
  138. package/dist/esm/node_modules/@tabler/icons-react/dist/esm/icons/IconMessage.mjs.map +1 -0
  139. package/dist/esm/node_modules/@tabler/icons-react/dist/esm/icons/IconPin.mjs +20 -0
  140. package/dist/esm/node_modules/@tabler/icons-react/dist/esm/icons/IconPin.mjs.map +1 -0
  141. package/dist/esm/node_modules/@tabler/icons-react/dist/esm/icons/IconPinnedOff.mjs +21 -0
  142. package/dist/esm/node_modules/@tabler/icons-react/dist/esm/icons/IconPinnedOff.mjs.map +1 -0
  143. package/dist/esm/node_modules/@tabler/icons-react/dist/esm/icons/IconSettings.mjs +19 -0
  144. package/dist/esm/node_modules/@tabler/icons-react/dist/esm/icons/IconSettings.mjs.map +1 -0
  145. package/dist/esm/node_modules/@tabler/icons-react/dist/esm/icons/IconSortAscending.mjs +16 -0
  146. package/dist/esm/node_modules/@tabler/icons-react/dist/esm/icons/IconSortAscending.mjs.map +1 -0
  147. package/dist/esm/node_modules/@tabler/icons-react/dist/esm/icons/IconSortDescending.mjs +16 -0
  148. package/dist/esm/node_modules/@tabler/icons-react/dist/esm/icons/IconSortDescending.mjs.map +1 -0
  149. package/dist/esm/node_modules/@tabler/icons-react/dist/esm/icons/IconSquare.mjs +18 -0
  150. package/dist/esm/node_modules/@tabler/icons-react/dist/esm/icons/IconSquare.mjs.map +1 -0
  151. package/dist/esm/node_modules/@tabler/icons-react/dist/esm/icons/IconTableExport.mjs +18 -0
  152. package/dist/esm/node_modules/@tabler/icons-react/dist/esm/icons/IconTableExport.mjs.map +1 -0
  153. package/dist/esm/node_modules/@tabler/icons-react/dist/esm/icons/IconTrash.mjs +19 -0
  154. package/dist/esm/node_modules/@tabler/icons-react/dist/esm/icons/IconTrash.mjs.map +1 -0
  155. package/dist/esm/node_modules/@tabler/icons-react/dist/esm/icons/IconX.mjs +13 -0
  156. package/dist/esm/node_modules/@tabler/icons-react/dist/esm/icons/IconX.mjs.map +1 -0
  157. package/dist/esm/useResource/useResource.d.ts +2 -2
  158. package/dist/esm/useResource/useResource.mjs +62 -39
  159. package/dist/esm/useResource/useResource.mjs.map +1 -1
  160. package/dist/esm/utils/date.d.ts +2 -1
  161. package/dist/esm/utils/date.mjs +31 -25
  162. package/dist/esm/utils/date.mjs.map +1 -1
  163. package/icons-unique.txt +36 -0
  164. package/icons.txt +44 -0
  165. package/package.json +12 -17
@@ -0,0 +1,14 @@
1
+ import createReactComponent from '../createReactComponent.mjs';
2
+
3
+ /**
4
+ * @tabler/icons-react v2.3.0 - MIT
5
+ */
6
+
7
+ var IconEqualNot = createReactComponent("equal-not", "IconEqualNot", [
8
+ ["path", { d: "M5 10h14", key: "svg-0" }],
9
+ ["path", { d: "M5 14h14", key: "svg-1" }],
10
+ ["path", { d: "M5 19l14 -14", key: "svg-2" }]
11
+ ]);
12
+
13
+ export { IconEqualNot as default };
14
+ //# sourceMappingURL=IconEqualNot.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"IconEqualNot.mjs","sources":["../../../../../../../../../../node_modules/@tabler/icons-react/dist/esm/icons/IconEqualNot.js"],"sourcesContent":["/**\n * @tabler/icons-react v2.3.0 - MIT\n */\n\nimport createReactComponent from '../createReactComponent.js';\n\nvar IconEqualNot = createReactComponent(\"equal-not\", \"IconEqualNot\", [\n [\"path\", { d: \"M5 10h14\", key: \"svg-0\" }],\n [\"path\", { d: \"M5 14h14\", key: \"svg-1\" }],\n [\"path\", { d: \"M5 19l14 -14\", key: \"svg-2\" }]\n]);\n\nexport { IconEqualNot as default };\n//# sourceMappingURL=IconEqualNot.js.map\n"],"names":[],"mappings":";;AAAA;AACA;AACA;AAGA;AACG,IAAC,YAAY,GAAG,oBAAoB,CAAC,WAAW,EAAE,cAAc,EAAE;AACrE,EAAE,CAAC,MAAM,EAAE,EAAE,CAAC,EAAE,UAAU,EAAE,GAAG,EAAE,OAAO,EAAE,CAAC;AAC3C,EAAE,CAAC,MAAM,EAAE,EAAE,CAAC,EAAE,UAAU,EAAE,GAAG,EAAE,OAAO,EAAE,CAAC;AAC3C,EAAE,CAAC,MAAM,EAAE,EAAE,CAAC,EAAE,cAAc,EAAE,GAAG,EAAE,OAAO,EAAE,CAAC;AAC/C,CAAC;;;;"}
@@ -0,0 +1,21 @@
1
+ import createReactComponent from '../createReactComponent.mjs';
2
+
3
+ /**
4
+ * @tabler/icons-react v2.3.0 - MIT
5
+ */
6
+
7
+ var IconFileAlert = createReactComponent("file-alert", "IconFileAlert", [
8
+ ["path", { d: "M14 3v4a1 1 0 0 0 1 1h4", key: "svg-0" }],
9
+ [
10
+ "path",
11
+ {
12
+ d: "M17 21h-10a2 2 0 0 1 -2 -2v-14a2 2 0 0 1 2 -2h7l5 5v11a2 2 0 0 1 -2 2z",
13
+ key: "svg-1"
14
+ }
15
+ ],
16
+ ["path", { d: "M12 17l.01 0", key: "svg-2" }],
17
+ ["path", { d: "M12 11l0 3", key: "svg-3" }]
18
+ ]);
19
+
20
+ export { IconFileAlert as default };
21
+ //# sourceMappingURL=IconFileAlert.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"IconFileAlert.mjs","sources":["../../../../../../../../../../node_modules/@tabler/icons-react/dist/esm/icons/IconFileAlert.js"],"sourcesContent":["/**\n * @tabler/icons-react v2.3.0 - MIT\n */\n\nimport createReactComponent from '../createReactComponent.js';\n\nvar IconFileAlert = createReactComponent(\"file-alert\", \"IconFileAlert\", [\n [\"path\", { d: \"M14 3v4a1 1 0 0 0 1 1h4\", key: \"svg-0\" }],\n [\n \"path\",\n {\n d: \"M17 21h-10a2 2 0 0 1 -2 -2v-14a2 2 0 0 1 2 -2h7l5 5v11a2 2 0 0 1 -2 2z\",\n key: \"svg-1\"\n }\n ],\n [\"path\", { d: \"M12 17l.01 0\", key: \"svg-2\" }],\n [\"path\", { d: \"M12 11l0 3\", key: \"svg-3\" }]\n]);\n\nexport { IconFileAlert as default };\n//# sourceMappingURL=IconFileAlert.js.map\n"],"names":[],"mappings":";;AAAA;AACA;AACA;AAGA;AACG,IAAC,aAAa,GAAG,oBAAoB,CAAC,YAAY,EAAE,eAAe,EAAE;AACxE,EAAE,CAAC,MAAM,EAAE,EAAE,CAAC,EAAE,yBAAyB,EAAE,GAAG,EAAE,OAAO,EAAE,CAAC;AAC1D,EAAE;AACF,IAAI,MAAM;AACV,IAAI;AACJ,MAAM,CAAC,EAAE,wEAAwE;AACjF,MAAM,GAAG,EAAE,OAAO;AAClB,KAAK;AACL,GAAG;AACH,EAAE,CAAC,MAAM,EAAE,EAAE,CAAC,EAAE,cAAc,EAAE,GAAG,EAAE,OAAO,EAAE,CAAC;AAC/C,EAAE,CAAC,MAAM,EAAE,EAAE,CAAC,EAAE,YAAY,EAAE,GAAG,EAAE,OAAO,EAAE,CAAC;AAC7C,CAAC;;;;"}
@@ -0,0 +1,21 @@
1
+ import createReactComponent from '../createReactComponent.mjs';
2
+
3
+ /**
4
+ * @tabler/icons-react v2.3.0 - MIT
5
+ */
6
+
7
+ var IconFilePlus = createReactComponent("file-plus", "IconFilePlus", [
8
+ ["path", { d: "M14 3v4a1 1 0 0 0 1 1h4", key: "svg-0" }],
9
+ [
10
+ "path",
11
+ {
12
+ d: "M17 21h-10a2 2 0 0 1 -2 -2v-14a2 2 0 0 1 2 -2h7l5 5v11a2 2 0 0 1 -2 2z",
13
+ key: "svg-1"
14
+ }
15
+ ],
16
+ ["path", { d: "M12 11l0 6", key: "svg-2" }],
17
+ ["path", { d: "M9 14l6 0", key: "svg-3" }]
18
+ ]);
19
+
20
+ export { IconFilePlus as default };
21
+ //# sourceMappingURL=IconFilePlus.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"IconFilePlus.mjs","sources":["../../../../../../../../../../node_modules/@tabler/icons-react/dist/esm/icons/IconFilePlus.js"],"sourcesContent":["/**\n * @tabler/icons-react v2.3.0 - MIT\n */\n\nimport createReactComponent from '../createReactComponent.js';\n\nvar IconFilePlus = createReactComponent(\"file-plus\", \"IconFilePlus\", [\n [\"path\", { d: \"M14 3v4a1 1 0 0 0 1 1h4\", key: \"svg-0\" }],\n [\n \"path\",\n {\n d: \"M17 21h-10a2 2 0 0 1 -2 -2v-14a2 2 0 0 1 2 -2h7l5 5v11a2 2 0 0 1 -2 2z\",\n key: \"svg-1\"\n }\n ],\n [\"path\", { d: \"M12 11l0 6\", key: \"svg-2\" }],\n [\"path\", { d: \"M9 14l6 0\", key: \"svg-3\" }]\n]);\n\nexport { IconFilePlus as default };\n//# sourceMappingURL=IconFilePlus.js.map\n"],"names":[],"mappings":";;AAAA;AACA;AACA;AAGA;AACG,IAAC,YAAY,GAAG,oBAAoB,CAAC,WAAW,EAAE,cAAc,EAAE;AACrE,EAAE,CAAC,MAAM,EAAE,EAAE,CAAC,EAAE,yBAAyB,EAAE,GAAG,EAAE,OAAO,EAAE,CAAC;AAC1D,EAAE;AACF,IAAI,MAAM;AACV,IAAI;AACJ,MAAM,CAAC,EAAE,wEAAwE;AACjF,MAAM,GAAG,EAAE,OAAO;AAClB,KAAK;AACL,GAAG;AACH,EAAE,CAAC,MAAM,EAAE,EAAE,CAAC,EAAE,YAAY,EAAE,GAAG,EAAE,OAAO,EAAE,CAAC;AAC7C,EAAE,CAAC,MAAM,EAAE,EAAE,CAAC,EAAE,WAAW,EAAE,GAAG,EAAE,OAAO,EAAE,CAAC;AAC5C,CAAC;;;;"}
@@ -0,0 +1,18 @@
1
+ import createReactComponent from '../createReactComponent.mjs';
2
+
3
+ /**
4
+ * @tabler/icons-react v2.3.0 - MIT
5
+ */
6
+
7
+ var IconFilter = createReactComponent("filter", "IconFilter", [
8
+ [
9
+ "path",
10
+ {
11
+ d: "M5.5 5h13a1 1 0 0 1 .5 1.5l-5 5.5l0 7l-4 -3l0 -4l-5 -5.5a1 1 0 0 1 .5 -1.5",
12
+ key: "svg-0"
13
+ }
14
+ ]
15
+ ]);
16
+
17
+ export { IconFilter as default };
18
+ //# sourceMappingURL=IconFilter.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"IconFilter.mjs","sources":["../../../../../../../../../../node_modules/@tabler/icons-react/dist/esm/icons/IconFilter.js"],"sourcesContent":["/**\n * @tabler/icons-react v2.3.0 - MIT\n */\n\nimport createReactComponent from '../createReactComponent.js';\n\nvar IconFilter = createReactComponent(\"filter\", \"IconFilter\", [\n [\n \"path\",\n {\n d: \"M5.5 5h13a1 1 0 0 1 .5 1.5l-5 5.5l0 7l-4 -3l0 -4l-5 -5.5a1 1 0 0 1 .5 -1.5\",\n key: \"svg-0\"\n }\n ]\n]);\n\nexport { IconFilter as default };\n//# sourceMappingURL=IconFilter.js.map\n"],"names":[],"mappings":";;AAAA;AACA;AACA;AAGA;AACG,IAAC,UAAU,GAAG,oBAAoB,CAAC,QAAQ,EAAE,YAAY,EAAE;AAC9D,EAAE;AACF,IAAI,MAAM;AACV,IAAI;AACJ,MAAM,CAAC,EAAE,4EAA4E;AACrF,MAAM,GAAG,EAAE,OAAO;AAClB,KAAK;AACL,GAAG;AACH,CAAC;;;;"}
@@ -0,0 +1,29 @@
1
+ import createReactComponent from '../createReactComponent.mjs';
2
+
3
+ /**
4
+ * @tabler/icons-react v2.3.0 - MIT
5
+ */
6
+
7
+ var IconListDetails = createReactComponent("list-details", "IconListDetails", [
8
+ ["path", { d: "M13 5h8", key: "svg-0" }],
9
+ ["path", { d: "M13 9h5", key: "svg-1" }],
10
+ ["path", { d: "M13 15h8", key: "svg-2" }],
11
+ ["path", { d: "M13 19h5", key: "svg-3" }],
12
+ [
13
+ "path",
14
+ {
15
+ d: "M3 4m0 1a1 1 0 0 1 1 -1h4a1 1 0 0 1 1 1v4a1 1 0 0 1 -1 1h-4a1 1 0 0 1 -1 -1z",
16
+ key: "svg-4"
17
+ }
18
+ ],
19
+ [
20
+ "path",
21
+ {
22
+ d: "M3 14m0 1a1 1 0 0 1 1 -1h4a1 1 0 0 1 1 1v4a1 1 0 0 1 -1 1h-4a1 1 0 0 1 -1 -1z",
23
+ key: "svg-5"
24
+ }
25
+ ]
26
+ ]);
27
+
28
+ export { IconListDetails as default };
29
+ //# sourceMappingURL=IconListDetails.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"IconListDetails.mjs","sources":["../../../../../../../../../../node_modules/@tabler/icons-react/dist/esm/icons/IconListDetails.js"],"sourcesContent":["/**\n * @tabler/icons-react v2.3.0 - MIT\n */\n\nimport createReactComponent from '../createReactComponent.js';\n\nvar IconListDetails = createReactComponent(\"list-details\", \"IconListDetails\", [\n [\"path\", { d: \"M13 5h8\", key: \"svg-0\" }],\n [\"path\", { d: \"M13 9h5\", key: \"svg-1\" }],\n [\"path\", { d: \"M13 15h8\", key: \"svg-2\" }],\n [\"path\", { d: \"M13 19h5\", key: \"svg-3\" }],\n [\n \"path\",\n {\n d: \"M3 4m0 1a1 1 0 0 1 1 -1h4a1 1 0 0 1 1 1v4a1 1 0 0 1 -1 1h-4a1 1 0 0 1 -1 -1z\",\n key: \"svg-4\"\n }\n ],\n [\n \"path\",\n {\n d: \"M3 14m0 1a1 1 0 0 1 1 -1h4a1 1 0 0 1 1 1v4a1 1 0 0 1 -1 1h-4a1 1 0 0 1 -1 -1z\",\n key: \"svg-5\"\n }\n ]\n]);\n\nexport { IconListDetails as default };\n//# sourceMappingURL=IconListDetails.js.map\n"],"names":[],"mappings":";;AAAA;AACA;AACA;AAGA;AACG,IAAC,eAAe,GAAG,oBAAoB,CAAC,cAAc,EAAE,iBAAiB,EAAE;AAC9E,EAAE,CAAC,MAAM,EAAE,EAAE,CAAC,EAAE,SAAS,EAAE,GAAG,EAAE,OAAO,EAAE,CAAC;AAC1C,EAAE,CAAC,MAAM,EAAE,EAAE,CAAC,EAAE,SAAS,EAAE,GAAG,EAAE,OAAO,EAAE,CAAC;AAC1C,EAAE,CAAC,MAAM,EAAE,EAAE,CAAC,EAAE,UAAU,EAAE,GAAG,EAAE,OAAO,EAAE,CAAC;AAC3C,EAAE,CAAC,MAAM,EAAE,EAAE,CAAC,EAAE,UAAU,EAAE,GAAG,EAAE,OAAO,EAAE,CAAC;AAC3C,EAAE;AACF,IAAI,MAAM;AACV,IAAI;AACJ,MAAM,CAAC,EAAE,8EAA8E;AACvF,MAAM,GAAG,EAAE,OAAO;AAClB,KAAK;AACL,GAAG;AACH,EAAE;AACF,IAAI,MAAM;AACV,IAAI;AACJ,MAAM,CAAC,EAAE,+EAA+E;AACxF,MAAM,GAAG,EAAE,OAAO;AAClB,KAAK;AACL,GAAG;AACH,CAAC;;;;"}
@@ -0,0 +1,12 @@
1
+ import createReactComponent from '../createReactComponent.mjs';
2
+
3
+ /**
4
+ * @tabler/icons-react v2.3.0 - MIT
5
+ */
6
+
7
+ var IconMathGreater = createReactComponent("math-greater", "IconMathGreater", [
8
+ ["path", { d: "M5 18l14 -6l-14 -6", key: "svg-0" }]
9
+ ]);
10
+
11
+ export { IconMathGreater as default };
12
+ //# sourceMappingURL=IconMathGreater.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"IconMathGreater.mjs","sources":["../../../../../../../../../../node_modules/@tabler/icons-react/dist/esm/icons/IconMathGreater.js"],"sourcesContent":["/**\n * @tabler/icons-react v2.3.0 - MIT\n */\n\nimport createReactComponent from '../createReactComponent.js';\n\nvar IconMathGreater = createReactComponent(\"math-greater\", \"IconMathGreater\", [\n [\"path\", { d: \"M5 18l14 -6l-14 -6\", key: \"svg-0\" }]\n]);\n\nexport { IconMathGreater as default };\n//# sourceMappingURL=IconMathGreater.js.map\n"],"names":[],"mappings":";;AAAA;AACA;AACA;AAGA;AACG,IAAC,eAAe,GAAG,oBAAoB,CAAC,cAAc,EAAE,iBAAiB,EAAE;AAC9E,EAAE,CAAC,MAAM,EAAE,EAAE,CAAC,EAAE,oBAAoB,EAAE,GAAG,EAAE,OAAO,EAAE,CAAC;AACrD,CAAC;;;;"}
@@ -0,0 +1,12 @@
1
+ import createReactComponent from '../createReactComponent.mjs';
2
+
3
+ /**
4
+ * @tabler/icons-react v2.3.0 - MIT
5
+ */
6
+
7
+ var IconMathLower = createReactComponent("math-lower", "IconMathLower", [
8
+ ["path", { d: "M19 18l-14 -6l14 -6", key: "svg-0" }]
9
+ ]);
10
+
11
+ export { IconMathLower as default };
12
+ //# sourceMappingURL=IconMathLower.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"IconMathLower.mjs","sources":["../../../../../../../../../../node_modules/@tabler/icons-react/dist/esm/icons/IconMathLower.js"],"sourcesContent":["/**\n * @tabler/icons-react v2.3.0 - MIT\n */\n\nimport createReactComponent from '../createReactComponent.js';\n\nvar IconMathLower = createReactComponent(\"math-lower\", \"IconMathLower\", [\n [\"path\", { d: \"M19 18l-14 -6l14 -6\", key: \"svg-0\" }]\n]);\n\nexport { IconMathLower as default };\n//# sourceMappingURL=IconMathLower.js.map\n"],"names":[],"mappings":";;AAAA;AACA;AACA;AAGA;AACG,IAAC,aAAa,GAAG,oBAAoB,CAAC,YAAY,EAAE,eAAe,EAAE;AACxE,EAAE,CAAC,MAAM,EAAE,EAAE,CAAC,EAAE,qBAAqB,EAAE,GAAG,EAAE,OAAO,EAAE,CAAC;AACtD,CAAC;;;;"}
@@ -0,0 +1,20 @@
1
+ import createReactComponent from '../createReactComponent.mjs';
2
+
3
+ /**
4
+ * @tabler/icons-react v2.3.0 - MIT
5
+ */
6
+
7
+ var IconMessage = createReactComponent("message", "IconMessage", [
8
+ [
9
+ "path",
10
+ {
11
+ d: "M4 21v-13a3 3 0 0 1 3 -3h10a3 3 0 0 1 3 3v6a3 3 0 0 1 -3 3h-9l-4 4",
12
+ key: "svg-0"
13
+ }
14
+ ],
15
+ ["path", { d: "M8 9l8 0", key: "svg-1" }],
16
+ ["path", { d: "M8 13l6 0", key: "svg-2" }]
17
+ ]);
18
+
19
+ export { IconMessage as default };
20
+ //# sourceMappingURL=IconMessage.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"IconMessage.mjs","sources":["../../../../../../../../../../node_modules/@tabler/icons-react/dist/esm/icons/IconMessage.js"],"sourcesContent":["/**\n * @tabler/icons-react v2.3.0 - MIT\n */\n\nimport createReactComponent from '../createReactComponent.js';\n\nvar IconMessage = createReactComponent(\"message\", \"IconMessage\", [\n [\n \"path\",\n {\n d: \"M4 21v-13a3 3 0 0 1 3 -3h10a3 3 0 0 1 3 3v6a3 3 0 0 1 -3 3h-9l-4 4\",\n key: \"svg-0\"\n }\n ],\n [\"path\", { d: \"M8 9l8 0\", key: \"svg-1\" }],\n [\"path\", { d: \"M8 13l6 0\", key: \"svg-2\" }]\n]);\n\nexport { IconMessage as default };\n//# sourceMappingURL=IconMessage.js.map\n"],"names":[],"mappings":";;AAAA;AACA;AACA;AAGA;AACG,IAAC,WAAW,GAAG,oBAAoB,CAAC,SAAS,EAAE,aAAa,EAAE;AACjE,EAAE;AACF,IAAI,MAAM;AACV,IAAI;AACJ,MAAM,CAAC,EAAE,oEAAoE;AAC7E,MAAM,GAAG,EAAE,OAAO;AAClB,KAAK;AACL,GAAG;AACH,EAAE,CAAC,MAAM,EAAE,EAAE,CAAC,EAAE,UAAU,EAAE,GAAG,EAAE,OAAO,EAAE,CAAC;AAC3C,EAAE,CAAC,MAAM,EAAE,EAAE,CAAC,EAAE,WAAW,EAAE,GAAG,EAAE,OAAO,EAAE,CAAC;AAC5C,CAAC;;;;"}
@@ -0,0 +1,20 @@
1
+ import createReactComponent from '../createReactComponent.mjs';
2
+
3
+ /**
4
+ * @tabler/icons-react v2.3.0 - MIT
5
+ */
6
+
7
+ var IconPin = createReactComponent("pin", "IconPin", [
8
+ [
9
+ "path",
10
+ {
11
+ d: "M15 4.5l-4 4l-4 1.5l-1.5 1.5l7 7l1.5 -1.5l1.5 -4l4 -4",
12
+ key: "svg-0"
13
+ }
14
+ ],
15
+ ["path", { d: "M9 15l-4.5 4.5", key: "svg-1" }],
16
+ ["path", { d: "M14.5 4l5.5 5.5", key: "svg-2" }]
17
+ ]);
18
+
19
+ export { IconPin as default };
20
+ //# sourceMappingURL=IconPin.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"IconPin.mjs","sources":["../../../../../../../../../../node_modules/@tabler/icons-react/dist/esm/icons/IconPin.js"],"sourcesContent":["/**\n * @tabler/icons-react v2.3.0 - MIT\n */\n\nimport createReactComponent from '../createReactComponent.js';\n\nvar IconPin = createReactComponent(\"pin\", \"IconPin\", [\n [\n \"path\",\n {\n d: \"M15 4.5l-4 4l-4 1.5l-1.5 1.5l7 7l1.5 -1.5l1.5 -4l4 -4\",\n key: \"svg-0\"\n }\n ],\n [\"path\", { d: \"M9 15l-4.5 4.5\", key: \"svg-1\" }],\n [\"path\", { d: \"M14.5 4l5.5 5.5\", key: \"svg-2\" }]\n]);\n\nexport { IconPin as default };\n//# sourceMappingURL=IconPin.js.map\n"],"names":[],"mappings":";;AAAA;AACA;AACA;AAGA;AACG,IAAC,OAAO,GAAG,oBAAoB,CAAC,KAAK,EAAE,SAAS,EAAE;AACrD,EAAE;AACF,IAAI,MAAM;AACV,IAAI;AACJ,MAAM,CAAC,EAAE,uDAAuD;AAChE,MAAM,GAAG,EAAE,OAAO;AAClB,KAAK;AACL,GAAG;AACH,EAAE,CAAC,MAAM,EAAE,EAAE,CAAC,EAAE,gBAAgB,EAAE,GAAG,EAAE,OAAO,EAAE,CAAC;AACjD,EAAE,CAAC,MAAM,EAAE,EAAE,CAAC,EAAE,iBAAiB,EAAE,GAAG,EAAE,OAAO,EAAE,CAAC;AAClD,CAAC;;;;"}
@@ -0,0 +1,21 @@
1
+ import createReactComponent from '../createReactComponent.mjs';
2
+
3
+ /**
4
+ * @tabler/icons-react v2.3.0 - MIT
5
+ */
6
+
7
+ var IconPinnedOff = createReactComponent("pinned-off", "IconPinnedOff", [
8
+ ["path", { d: "M3 3l18 18", key: "svg-0" }],
9
+ [
10
+ "path",
11
+ {
12
+ d: "M15 4.5l-3.249 3.249m-2.57 1.433l-2.181 .818l-1.5 1.5l7 7l1.5 -1.5l.82 -2.186m1.43 -2.563l3.25 -3.251",
13
+ key: "svg-1"
14
+ }
15
+ ],
16
+ ["path", { d: "M9 15l-4.5 4.5", key: "svg-2" }],
17
+ ["path", { d: "M14.5 4l5.5 5.5", key: "svg-3" }]
18
+ ]);
19
+
20
+ export { IconPinnedOff as default };
21
+ //# sourceMappingURL=IconPinnedOff.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"IconPinnedOff.mjs","sources":["../../../../../../../../../../node_modules/@tabler/icons-react/dist/esm/icons/IconPinnedOff.js"],"sourcesContent":["/**\n * @tabler/icons-react v2.3.0 - MIT\n */\n\nimport createReactComponent from '../createReactComponent.js';\n\nvar IconPinnedOff = createReactComponent(\"pinned-off\", \"IconPinnedOff\", [\n [\"path\", { d: \"M3 3l18 18\", key: \"svg-0\" }],\n [\n \"path\",\n {\n d: \"M15 4.5l-3.249 3.249m-2.57 1.433l-2.181 .818l-1.5 1.5l7 7l1.5 -1.5l.82 -2.186m1.43 -2.563l3.25 -3.251\",\n key: \"svg-1\"\n }\n ],\n [\"path\", { d: \"M9 15l-4.5 4.5\", key: \"svg-2\" }],\n [\"path\", { d: \"M14.5 4l5.5 5.5\", key: \"svg-3\" }]\n]);\n\nexport { IconPinnedOff as default };\n//# sourceMappingURL=IconPinnedOff.js.map\n"],"names":[],"mappings":";;AAAA;AACA;AACA;AAGA;AACG,IAAC,aAAa,GAAG,oBAAoB,CAAC,YAAY,EAAE,eAAe,EAAE;AACxE,EAAE,CAAC,MAAM,EAAE,EAAE,CAAC,EAAE,YAAY,EAAE,GAAG,EAAE,OAAO,EAAE,CAAC;AAC7C,EAAE;AACF,IAAI,MAAM;AACV,IAAI;AACJ,MAAM,CAAC,EAAE,uGAAuG;AAChH,MAAM,GAAG,EAAE,OAAO;AAClB,KAAK;AACL,GAAG;AACH,EAAE,CAAC,MAAM,EAAE,EAAE,CAAC,EAAE,gBAAgB,EAAE,GAAG,EAAE,OAAO,EAAE,CAAC;AACjD,EAAE,CAAC,MAAM,EAAE,EAAE,CAAC,EAAE,iBAAiB,EAAE,GAAG,EAAE,OAAO,EAAE,CAAC;AAClD,CAAC;;;;"}
@@ -0,0 +1,19 @@
1
+ import createReactComponent from '../createReactComponent.mjs';
2
+
3
+ /**
4
+ * @tabler/icons-react v2.3.0 - MIT
5
+ */
6
+
7
+ var IconSettings = createReactComponent("settings", "IconSettings", [
8
+ [
9
+ "path",
10
+ {
11
+ d: "M10.325 4.317c.426 -1.756 2.924 -1.756 3.35 0a1.724 1.724 0 0 0 2.573 1.066c1.543 -.94 3.31 .826 2.37 2.37a1.724 1.724 0 0 0 1.065 2.572c1.756 .426 1.756 2.924 0 3.35a1.724 1.724 0 0 0 -1.066 2.573c.94 1.543 -.826 3.31 -2.37 2.37a1.724 1.724 0 0 0 -2.572 1.065c-.426 1.756 -2.924 1.756 -3.35 0a1.724 1.724 0 0 0 -2.573 -1.066c-1.543 .94 -3.31 -.826 -2.37 -2.37a1.724 1.724 0 0 0 -1.065 -2.572c-1.756 -.426 -1.756 -2.924 0 -3.35a1.724 1.724 0 0 0 1.066 -2.573c-.94 -1.543 .826 -3.31 2.37 -2.37c1 .608 2.296 .07 2.572 -1.065z",
12
+ key: "svg-0"
13
+ }
14
+ ],
15
+ ["path", { d: "M12 12m-3 0a3 3 0 1 0 6 0a3 3 0 1 0 -6 0", key: "svg-1" }]
16
+ ]);
17
+
18
+ export { IconSettings as default };
19
+ //# sourceMappingURL=IconSettings.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"IconSettings.mjs","sources":["../../../../../../../../../../node_modules/@tabler/icons-react/dist/esm/icons/IconSettings.js"],"sourcesContent":["/**\n * @tabler/icons-react v2.3.0 - MIT\n */\n\nimport createReactComponent from '../createReactComponent.js';\n\nvar IconSettings = createReactComponent(\"settings\", \"IconSettings\", [\n [\n \"path\",\n {\n d: \"M10.325 4.317c.426 -1.756 2.924 -1.756 3.35 0a1.724 1.724 0 0 0 2.573 1.066c1.543 -.94 3.31 .826 2.37 2.37a1.724 1.724 0 0 0 1.065 2.572c1.756 .426 1.756 2.924 0 3.35a1.724 1.724 0 0 0 -1.066 2.573c.94 1.543 -.826 3.31 -2.37 2.37a1.724 1.724 0 0 0 -2.572 1.065c-.426 1.756 -2.924 1.756 -3.35 0a1.724 1.724 0 0 0 -2.573 -1.066c-1.543 .94 -3.31 -.826 -2.37 -2.37a1.724 1.724 0 0 0 -1.065 -2.572c-1.756 -.426 -1.756 -2.924 0 -3.35a1.724 1.724 0 0 0 1.066 -2.573c-.94 -1.543 .826 -3.31 2.37 -2.37c1 .608 2.296 .07 2.572 -1.065z\",\n key: \"svg-0\"\n }\n ],\n [\"path\", { d: \"M12 12m-3 0a3 3 0 1 0 6 0a3 3 0 1 0 -6 0\", key: \"svg-1\" }]\n]);\n\nexport { IconSettings as default };\n//# sourceMappingURL=IconSettings.js.map\n"],"names":[],"mappings":";;AAAA;AACA;AACA;AAGA;AACG,IAAC,YAAY,GAAG,oBAAoB,CAAC,UAAU,EAAE,cAAc,EAAE;AACpE,EAAE;AACF,IAAI,MAAM;AACV,IAAI;AACJ,MAAM,CAAC,EAAE,6gBAA6gB;AACthB,MAAM,GAAG,EAAE,OAAO;AAClB,KAAK;AACL,GAAG;AACH,EAAE,CAAC,MAAM,EAAE,EAAE,CAAC,EAAE,0CAA0C,EAAE,GAAG,EAAE,OAAO,EAAE,CAAC;AAC3E,CAAC;;;;"}
@@ -0,0 +1,16 @@
1
+ import createReactComponent from '../createReactComponent.mjs';
2
+
3
+ /**
4
+ * @tabler/icons-react v2.3.0 - MIT
5
+ */
6
+
7
+ var IconSortAscending = createReactComponent("sort-ascending", "IconSortAscending", [
8
+ ["path", { d: "M4 6l7 0", key: "svg-0" }],
9
+ ["path", { d: "M4 12l7 0", key: "svg-1" }],
10
+ ["path", { d: "M4 18l9 0", key: "svg-2" }],
11
+ ["path", { d: "M15 9l3 -3l3 3", key: "svg-3" }],
12
+ ["path", { d: "M18 6l0 12", key: "svg-4" }]
13
+ ]);
14
+
15
+ export { IconSortAscending as default };
16
+ //# sourceMappingURL=IconSortAscending.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"IconSortAscending.mjs","sources":["../../../../../../../../../../node_modules/@tabler/icons-react/dist/esm/icons/IconSortAscending.js"],"sourcesContent":["/**\n * @tabler/icons-react v2.3.0 - MIT\n */\n\nimport createReactComponent from '../createReactComponent.js';\n\nvar IconSortAscending = createReactComponent(\"sort-ascending\", \"IconSortAscending\", [\n [\"path\", { d: \"M4 6l7 0\", key: \"svg-0\" }],\n [\"path\", { d: \"M4 12l7 0\", key: \"svg-1\" }],\n [\"path\", { d: \"M4 18l9 0\", key: \"svg-2\" }],\n [\"path\", { d: \"M15 9l3 -3l3 3\", key: \"svg-3\" }],\n [\"path\", { d: \"M18 6l0 12\", key: \"svg-4\" }]\n]);\n\nexport { IconSortAscending as default };\n//# sourceMappingURL=IconSortAscending.js.map\n"],"names":[],"mappings":";;AAAA;AACA;AACA;AAGA;AACG,IAAC,iBAAiB,GAAG,oBAAoB,CAAC,gBAAgB,EAAE,mBAAmB,EAAE;AACpF,EAAE,CAAC,MAAM,EAAE,EAAE,CAAC,EAAE,UAAU,EAAE,GAAG,EAAE,OAAO,EAAE,CAAC;AAC3C,EAAE,CAAC,MAAM,EAAE,EAAE,CAAC,EAAE,WAAW,EAAE,GAAG,EAAE,OAAO,EAAE,CAAC;AAC5C,EAAE,CAAC,MAAM,EAAE,EAAE,CAAC,EAAE,WAAW,EAAE,GAAG,EAAE,OAAO,EAAE,CAAC;AAC5C,EAAE,CAAC,MAAM,EAAE,EAAE,CAAC,EAAE,gBAAgB,EAAE,GAAG,EAAE,OAAO,EAAE,CAAC;AACjD,EAAE,CAAC,MAAM,EAAE,EAAE,CAAC,EAAE,YAAY,EAAE,GAAG,EAAE,OAAO,EAAE,CAAC;AAC7C,CAAC;;;;"}
@@ -0,0 +1,16 @@
1
+ import createReactComponent from '../createReactComponent.mjs';
2
+
3
+ /**
4
+ * @tabler/icons-react v2.3.0 - MIT
5
+ */
6
+
7
+ var IconSortDescending = createReactComponent("sort-descending", "IconSortDescending", [
8
+ ["path", { d: "M4 6l9 0", key: "svg-0" }],
9
+ ["path", { d: "M4 12l7 0", key: "svg-1" }],
10
+ ["path", { d: "M4 18l7 0", key: "svg-2" }],
11
+ ["path", { d: "M15 15l3 3l3 -3", key: "svg-3" }],
12
+ ["path", { d: "M18 6l0 12", key: "svg-4" }]
13
+ ]);
14
+
15
+ export { IconSortDescending as default };
16
+ //# sourceMappingURL=IconSortDescending.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"IconSortDescending.mjs","sources":["../../../../../../../../../../node_modules/@tabler/icons-react/dist/esm/icons/IconSortDescending.js"],"sourcesContent":["/**\n * @tabler/icons-react v2.3.0 - MIT\n */\n\nimport createReactComponent from '../createReactComponent.js';\n\nvar IconSortDescending = createReactComponent(\"sort-descending\", \"IconSortDescending\", [\n [\"path\", { d: \"M4 6l9 0\", key: \"svg-0\" }],\n [\"path\", { d: \"M4 12l7 0\", key: \"svg-1\" }],\n [\"path\", { d: \"M4 18l7 0\", key: \"svg-2\" }],\n [\"path\", { d: \"M15 15l3 3l3 -3\", key: \"svg-3\" }],\n [\"path\", { d: \"M18 6l0 12\", key: \"svg-4\" }]\n]);\n\nexport { IconSortDescending as default };\n//# sourceMappingURL=IconSortDescending.js.map\n"],"names":[],"mappings":";;AAAA;AACA;AACA;AAGA;AACG,IAAC,kBAAkB,GAAG,oBAAoB,CAAC,iBAAiB,EAAE,oBAAoB,EAAE;AACvF,EAAE,CAAC,MAAM,EAAE,EAAE,CAAC,EAAE,UAAU,EAAE,GAAG,EAAE,OAAO,EAAE,CAAC;AAC3C,EAAE,CAAC,MAAM,EAAE,EAAE,CAAC,EAAE,WAAW,EAAE,GAAG,EAAE,OAAO,EAAE,CAAC;AAC5C,EAAE,CAAC,MAAM,EAAE,EAAE,CAAC,EAAE,WAAW,EAAE,GAAG,EAAE,OAAO,EAAE,CAAC;AAC5C,EAAE,CAAC,MAAM,EAAE,EAAE,CAAC,EAAE,iBAAiB,EAAE,GAAG,EAAE,OAAO,EAAE,CAAC;AAClD,EAAE,CAAC,MAAM,EAAE,EAAE,CAAC,EAAE,YAAY,EAAE,GAAG,EAAE,OAAO,EAAE,CAAC;AAC7C,CAAC;;;;"}
@@ -0,0 +1,18 @@
1
+ import createReactComponent from '../createReactComponent.mjs';
2
+
3
+ /**
4
+ * @tabler/icons-react v2.3.0 - MIT
5
+ */
6
+
7
+ var IconSquare = createReactComponent("square", "IconSquare", [
8
+ [
9
+ "path",
10
+ {
11
+ d: "M4 4m0 2a2 2 0 0 1 2 -2h12a2 2 0 0 1 2 2v12a2 2 0 0 1 -2 2h-12a2 2 0 0 1 -2 -2z",
12
+ key: "svg-0"
13
+ }
14
+ ]
15
+ ]);
16
+
17
+ export { IconSquare as default };
18
+ //# sourceMappingURL=IconSquare.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"IconSquare.mjs","sources":["../../../../../../../../../../node_modules/@tabler/icons-react/dist/esm/icons/IconSquare.js"],"sourcesContent":["/**\n * @tabler/icons-react v2.3.0 - MIT\n */\n\nimport createReactComponent from '../createReactComponent.js';\n\nvar IconSquare = createReactComponent(\"square\", \"IconSquare\", [\n [\n \"path\",\n {\n d: \"M4 4m0 2a2 2 0 0 1 2 -2h12a2 2 0 0 1 2 2v12a2 2 0 0 1 -2 2h-12a2 2 0 0 1 -2 -2z\",\n key: \"svg-0\"\n }\n ]\n]);\n\nexport { IconSquare as default };\n//# sourceMappingURL=IconSquare.js.map\n"],"names":[],"mappings":";;AAAA;AACA;AACA;AAGA;AACG,IAAC,UAAU,GAAG,oBAAoB,CAAC,QAAQ,EAAE,YAAY,EAAE;AAC9D,EAAE;AACF,IAAI,MAAM;AACV,IAAI;AACJ,MAAM,CAAC,EAAE,iFAAiF;AAC1F,MAAM,GAAG,EAAE,OAAO;AAClB,KAAK;AACL,GAAG;AACH,CAAC;;;;"}
@@ -0,0 +1,18 @@
1
+ import createReactComponent from '../createReactComponent.mjs';
2
+
3
+ /**
4
+ * @tabler/icons-react v2.3.0 - MIT
5
+ */
6
+
7
+ var IconTableExport = createReactComponent("table-export", "IconTableExport", [
8
+ [
9
+ "path",
10
+ {
11
+ d: "M11.5 20h-5.5a2 2 0 0 1 -2 -2v-12a2 2 0 0 1 2 -2h12a2 2 0 0 1 2 2v7.5m-16 -3.5h16m-10 -6v16m4 -1h7m-3 -3l3 3l-3 3",
12
+ key: "svg-0"
13
+ }
14
+ ]
15
+ ]);
16
+
17
+ export { IconTableExport as default };
18
+ //# sourceMappingURL=IconTableExport.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"IconTableExport.mjs","sources":["../../../../../../../../../../node_modules/@tabler/icons-react/dist/esm/icons/IconTableExport.js"],"sourcesContent":["/**\n * @tabler/icons-react v2.3.0 - MIT\n */\n\nimport createReactComponent from '../createReactComponent.js';\n\nvar IconTableExport = createReactComponent(\"table-export\", \"IconTableExport\", [\n [\n \"path\",\n {\n d: \"M11.5 20h-5.5a2 2 0 0 1 -2 -2v-12a2 2 0 0 1 2 -2h12a2 2 0 0 1 2 2v7.5m-16 -3.5h16m-10 -6v16m4 -1h7m-3 -3l3 3l-3 3\",\n key: \"svg-0\"\n }\n ]\n]);\n\nexport { IconTableExport as default };\n//# sourceMappingURL=IconTableExport.js.map\n"],"names":[],"mappings":";;AAAA;AACA;AACA;AAGA;AACG,IAAC,eAAe,GAAG,oBAAoB,CAAC,cAAc,EAAE,iBAAiB,EAAE;AAC9E,EAAE;AACF,IAAI,MAAM;AACV,IAAI;AACJ,MAAM,CAAC,EAAE,mHAAmH;AAC5H,MAAM,GAAG,EAAE,OAAO;AAClB,KAAK;AACL,GAAG;AACH,CAAC;;;;"}
@@ -0,0 +1,19 @@
1
+ import createReactComponent from '../createReactComponent.mjs';
2
+
3
+ /**
4
+ * @tabler/icons-react v2.3.0 - MIT
5
+ */
6
+
7
+ var IconTrash = createReactComponent("trash", "IconTrash", [
8
+ ["path", { d: "M4 7l16 0", key: "svg-0" }],
9
+ ["path", { d: "M10 11l0 6", key: "svg-1" }],
10
+ ["path", { d: "M14 11l0 6", key: "svg-2" }],
11
+ [
12
+ "path",
13
+ { d: "M5 7l1 12a2 2 0 0 0 2 2h8a2 2 0 0 0 2 -2l1 -12", key: "svg-3" }
14
+ ],
15
+ ["path", { d: "M9 7v-3a1 1 0 0 1 1 -1h4a1 1 0 0 1 1 1v3", key: "svg-4" }]
16
+ ]);
17
+
18
+ export { IconTrash as default };
19
+ //# sourceMappingURL=IconTrash.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"IconTrash.mjs","sources":["../../../../../../../../../../node_modules/@tabler/icons-react/dist/esm/icons/IconTrash.js"],"sourcesContent":["/**\n * @tabler/icons-react v2.3.0 - MIT\n */\n\nimport createReactComponent from '../createReactComponent.js';\n\nvar IconTrash = createReactComponent(\"trash\", \"IconTrash\", [\n [\"path\", { d: \"M4 7l16 0\", key: \"svg-0\" }],\n [\"path\", { d: \"M10 11l0 6\", key: \"svg-1\" }],\n [\"path\", { d: \"M14 11l0 6\", key: \"svg-2\" }],\n [\n \"path\",\n { d: \"M5 7l1 12a2 2 0 0 0 2 2h8a2 2 0 0 0 2 -2l1 -12\", key: \"svg-3\" }\n ],\n [\"path\", { d: \"M9 7v-3a1 1 0 0 1 1 -1h4a1 1 0 0 1 1 1v3\", key: \"svg-4\" }]\n]);\n\nexport { IconTrash as default };\n//# sourceMappingURL=IconTrash.js.map\n"],"names":[],"mappings":";;AAAA;AACA;AACA;AAGA;AACG,IAAC,SAAS,GAAG,oBAAoB,CAAC,OAAO,EAAE,WAAW,EAAE;AAC3D,EAAE,CAAC,MAAM,EAAE,EAAE,CAAC,EAAE,WAAW,EAAE,GAAG,EAAE,OAAO,EAAE,CAAC;AAC5C,EAAE,CAAC,MAAM,EAAE,EAAE,CAAC,EAAE,YAAY,EAAE,GAAG,EAAE,OAAO,EAAE,CAAC;AAC7C,EAAE,CAAC,MAAM,EAAE,EAAE,CAAC,EAAE,YAAY,EAAE,GAAG,EAAE,OAAO,EAAE,CAAC;AAC7C,EAAE;AACF,IAAI,MAAM;AACV,IAAI,EAAE,CAAC,EAAE,gDAAgD,EAAE,GAAG,EAAE,OAAO,EAAE;AACzE,GAAG;AACH,EAAE,CAAC,MAAM,EAAE,EAAE,CAAC,EAAE,0CAA0C,EAAE,GAAG,EAAE,OAAO,EAAE,CAAC;AAC3E,CAAC;;;;"}
@@ -0,0 +1,13 @@
1
+ import createReactComponent from '../createReactComponent.mjs';
2
+
3
+ /**
4
+ * @tabler/icons-react v2.3.0 - MIT
5
+ */
6
+
7
+ var IconX = createReactComponent("x", "IconX", [
8
+ ["path", { d: "M18 6l-12 12", key: "svg-0" }],
9
+ ["path", { d: "M6 6l12 12", key: "svg-1" }]
10
+ ]);
11
+
12
+ export { IconX as default };
13
+ //# sourceMappingURL=IconX.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"IconX.mjs","sources":["../../../../../../../../../../node_modules/@tabler/icons-react/dist/esm/icons/IconX.js"],"sourcesContent":["/**\n * @tabler/icons-react v2.3.0 - MIT\n */\n\nimport createReactComponent from '../createReactComponent.js';\n\nvar IconX = createReactComponent(\"x\", \"IconX\", [\n [\"path\", { d: \"M18 6l-12 12\", key: \"svg-0\" }],\n [\"path\", { d: \"M6 6l12 12\", key: \"svg-1\" }]\n]);\n\nexport { IconX as default };\n//# sourceMappingURL=IconX.js.map\n"],"names":[],"mappings":";;AAAA;AACA;AACA;AAGA;AACG,IAAC,KAAK,GAAG,oBAAoB,CAAC,GAAG,EAAE,OAAO,EAAE;AAC/C,EAAE,CAAC,MAAM,EAAE,EAAE,CAAC,EAAE,cAAc,EAAE,GAAG,EAAE,OAAO,EAAE,CAAC;AAC/C,EAAE,CAAC,MAAM,EAAE,EAAE,CAAC,EAAE,YAAY,EAAE,GAAG,EAAE,OAAO,EAAE,CAAC;AAC7C,CAAC;;;;"}
@@ -1,8 +1,8 @@
1
- import { Reference, Resource } from '@medplum/fhirtypes';
1
+ import { OperationOutcome, Reference, Resource } from '@medplum/fhirtypes';
2
2
  /**
3
3
  * React Hook to use a FHIR reference.
4
4
  * Handles the complexity of resolving references and caching resources.
5
5
  * @param value The resource or reference to resource.
6
6
  * @returns The resolved resource.
7
7
  */
8
- export declare function useResource<T extends Resource>(value: Reference<T> | T | undefined): T | undefined;
8
+ export declare function useResource<T extends Resource>(value: Reference<T> | T | undefined, setOutcome?: (outcome: OperationOutcome) => void): T | undefined;
@@ -1,64 +1,87 @@
1
- import { useState, useEffect } from 'react';
1
+ import { deepEquals } from '@medplum/core';
2
+ import { useRef, useState, useEffect } from 'react';
2
3
  import { useMedplum } from '../MedplumProvider/MedplumProvider.mjs';
3
4
 
4
- const system = {
5
- resourceType: 'Device',
6
- id: 'system',
7
- deviceName: [
8
- {
9
- name: 'System',
10
- },
11
- ],
12
- };
13
5
  /**
14
6
  * React Hook to use a FHIR reference.
15
7
  * Handles the complexity of resolving references and caching resources.
16
8
  * @param value The resource or reference to resource.
17
9
  * @returns The resolved resource.
18
10
  */
19
- function useResource(value) {
11
+ function useResource(value, setOutcome) {
20
12
  const medplum = useMedplum();
21
- const [resource, setResource] = useState(getInitialResource(medplum, value));
13
+ const referenceRef = useRef(undefined);
14
+ const resourceRef = useRef(undefined);
15
+ // Parse the input value into a reference and resource
16
+ parseValue(value, referenceRef, resourceRef);
17
+ // Priority order:
18
+ // 1. Cached reference
19
+ // 2. Resource passed in as-is
20
+ // 3. Undefined
21
+ const currentResource = getCurrentValue(medplum, referenceRef, resourceRef);
22
+ // Keep track of the previous resource
23
+ // This is used to detect when the resource has changed
24
+ // We need a React "state" variable to trigger a re-render
25
+ const [prevResource, forceRerender] = useState(currentResource);
26
+ // Subscribe to changes to the passed-in value
22
27
  useEffect(() => {
23
- let subscribed = true;
24
- if (!resource && value && 'reference' in value && value.reference) {
28
+ if (referenceRef.current) {
25
29
  medplum
26
- .readReference(value)
27
- .then((r) => {
28
- if (subscribed) {
29
- setResource(r);
30
+ .readReference(referenceRef.current)
31
+ .then((newValue) => {
32
+ if (!deepEquals(newValue, prevResource)) {
33
+ forceRerender(newValue);
30
34
  }
31
35
  })
32
- .catch(() => setResource(undefined));
36
+ .catch((err) => {
37
+ if (setOutcome) {
38
+ setOutcome(err);
39
+ }
40
+ });
33
41
  }
34
- return (() => (subscribed = false));
35
- }, [medplum, resource, value]);
36
- return resource;
42
+ }, [medplum, prevResource, value, setOutcome]);
43
+ return currentResource;
37
44
  }
38
45
  /**
39
- * Returns the initial resource value based on the input value.
40
- * If the input value is a resource, returns the resource.
41
- * If the input value is a reference to system, returns the system resource.
42
- * If the input value is a reference to a resource available in the cache, returns the resource.
43
- * Otherwise, returns undefined.
44
- * @param medplum The medplum client.
45
- * @param value The resource or reference to resource.
46
- * @returns An initial resource if available; undefined otherwise.
46
+ * Parses the input into a reference and resource.
47
+ * @param value The input value to parse. Can be either a reference or a resource.
48
+ * @param referenceRef The output reference.
49
+ * @param resourceRef The output resource.
47
50
  */
48
- function getInitialResource(medplum, value) {
51
+ function parseValue(value, referenceRef, resourceRef) {
52
+ // Reset the reference and resource
53
+ referenceRef.current = undefined;
54
+ resourceRef.current = undefined;
49
55
  if (!value) {
50
- return undefined;
51
- }
52
- if ('resourceType' in value) {
53
- return value;
56
+ return;
54
57
  }
55
58
  if ('reference' in value) {
56
- if (value.reference === 'system') {
57
- return system;
59
+ // If the input is a reference then we can use it as-is
60
+ referenceRef.current = value;
61
+ }
62
+ else if ('resourceType' in value) {
63
+ resourceRef.current = value;
64
+ if ('id' in value) {
65
+ // If the input is a resource with an ID, then we can still create a reference
66
+ referenceRef.current = { reference: value.resourceType + '/' + value.id };
58
67
  }
59
- return medplum.getCachedReference(value);
60
68
  }
61
- return undefined;
69
+ }
70
+ /**
71
+ * Returns the best currently available value.
72
+ * This is ***not*** asynchronous and returns immediately.
73
+ * It attempts to return the value from the cache, or the resource passed in as-is.
74
+ * @param medplum The Medplum client.
75
+ * @param referenceRef The reference.
76
+ * @param resourceRef The resource.
77
+ * @returns The currently available value.
78
+ */
79
+ function getCurrentValue(medplum, referenceRef, resourceRef) {
80
+ // Priority order:
81
+ // 1. Cached reference
82
+ // 2. Resource passed in as-is
83
+ // 3. Undefined
84
+ return (referenceRef.current && medplum.getCachedReference(referenceRef.current)) || resourceRef.current;
62
85
  }
63
86
 
64
87
  export { useResource };
@@ -1 +1 @@
1
- {"version":3,"file":"useResource.mjs","sources":["../../../src/useResource/useResource.ts"],"sourcesContent":["import { MedplumClient } from '@medplum/core';\nimport { Device, Reference, Resource } from '@medplum/fhirtypes';\nimport { useEffect, useState } from 'react';\nimport { useMedplum } from '../MedplumProvider/MedplumProvider';\n\nconst system: Device = {\n resourceType: 'Device',\n id: 'system',\n deviceName: [\n {\n name: 'System',\n },\n ],\n};\n\n/**\n * React Hook to use a FHIR reference.\n * Handles the complexity of resolving references and caching resources.\n * @param value The resource or reference to resource.\n * @returns The resolved resource.\n */\nexport function useResource<T extends Resource>(value: Reference<T> | T | undefined): T | undefined {\n const medplum = useMedplum();\n const [resource, setResource] = useState<T | undefined>(getInitialResource(medplum, value));\n\n useEffect(() => {\n let subscribed = true;\n\n if (!resource && value && 'reference' in value && value.reference) {\n medplum\n .readReference(value as Reference<T>)\n .then((r) => {\n if (subscribed) {\n setResource(r);\n }\n })\n .catch(() => setResource(undefined));\n }\n\n return (() => (subscribed = false)) as () => void;\n }, [medplum, resource, value]);\n\n return resource;\n}\n\n/**\n * Returns the initial resource value based on the input value.\n * If the input value is a resource, returns the resource.\n * If the input value is a reference to system, returns the system resource.\n * If the input value is a reference to a resource available in the cache, returns the resource.\n * Otherwise, returns undefined.\n * @param medplum The medplum client.\n * @param value The resource or reference to resource.\n * @returns An initial resource if available; undefined otherwise.\n */\nfunction getInitialResource<T extends Resource>(\n medplum: MedplumClient,\n value: Reference<T> | T | undefined\n): T | undefined {\n if (!value) {\n return undefined;\n }\n\n if ('resourceType' in value) {\n return value;\n }\n\n if ('reference' in value) {\n if (value.reference === 'system') {\n return system as T;\n }\n\n return medplum.getCachedReference(value);\n }\n\n return undefined;\n}\n"],"names":[],"mappings":";;;AAKA,MAAM,MAAM,GAAW;AACrB,IAAA,YAAY,EAAE,QAAQ;AACtB,IAAA,EAAE,EAAE,QAAQ;AACZ,IAAA,UAAU,EAAE;AACV,QAAA;AACE,YAAA,IAAI,EAAE,QAAQ;AACf,SAAA;AACF,KAAA;CACF,CAAC;AAEF;;;;;AAKG;AACG,SAAU,WAAW,CAAqB,KAAmC,EAAA;AACjF,IAAA,MAAM,OAAO,GAAG,UAAU,EAAE,CAAC;AAC7B,IAAA,MAAM,CAAC,QAAQ,EAAE,WAAW,CAAC,GAAG,QAAQ,CAAgB,kBAAkB,CAAC,OAAO,EAAE,KAAK,CAAC,CAAC,CAAC;IAE5F,SAAS,CAAC,MAAK;QACb,IAAI,UAAU,GAAG,IAAI,CAAC;AAEtB,QAAA,IAAI,CAAC,QAAQ,IAAI,KAAK,IAAI,WAAW,IAAI,KAAK,IAAI,KAAK,CAAC,SAAS,EAAE;YACjE,OAAO;iBACJ,aAAa,CAAC,KAAqB,CAAC;AACpC,iBAAA,IAAI,CAAC,CAAC,CAAC,KAAI;AACV,gBAAA,IAAI,UAAU,EAAE;oBACd,WAAW,CAAC,CAAC,CAAC,CAAC;AAChB,iBAAA;AACH,aAAC,CAAC;iBACD,KAAK,CAAC,MAAM,WAAW,CAAC,SAAS,CAAC,CAAC,CAAC;AACxC,SAAA;QAED,QAAQ,OAAO,UAAU,GAAG,KAAK,CAAC,EAAgB;KACnD,EAAE,CAAC,OAAO,EAAE,QAAQ,EAAE,KAAK,CAAC,CAAC,CAAC;AAE/B,IAAA,OAAO,QAAQ,CAAC;AAClB,CAAC;AAED;;;;;;;;;AASG;AACH,SAAS,kBAAkB,CACzB,OAAsB,EACtB,KAAmC,EAAA;IAEnC,IAAI,CAAC,KAAK,EAAE;AACV,QAAA,OAAO,SAAS,CAAC;AAClB,KAAA;IAED,IAAI,cAAc,IAAI,KAAK,EAAE;AAC3B,QAAA,OAAO,KAAK,CAAC;AACd,KAAA;IAED,IAAI,WAAW,IAAI,KAAK,EAAE;AACxB,QAAA,IAAI,KAAK,CAAC,SAAS,KAAK,QAAQ,EAAE;AAChC,YAAA,OAAO,MAAW,CAAC;AACpB,SAAA;AAED,QAAA,OAAO,OAAO,CAAC,kBAAkB,CAAC,KAAK,CAAC,CAAC;AAC1C,KAAA;AAED,IAAA,OAAO,SAAS,CAAC;AACnB;;;;"}
1
+ {"version":3,"file":"useResource.mjs","sources":["../../../src/useResource/useResource.ts"],"sourcesContent":["import { deepEquals, MedplumClient } from '@medplum/core';\nimport { OperationOutcome, Reference, Resource } from '@medplum/fhirtypes';\nimport { useEffect, useRef, useState } from 'react';\nimport { useMedplum } from '../MedplumProvider/MedplumProvider';\n\n/**\n * React Hook to use a FHIR reference.\n * Handles the complexity of resolving references and caching resources.\n * @param value The resource or reference to resource.\n * @returns The resolved resource.\n */\nexport function useResource<T extends Resource>(\n value: Reference<T> | T | undefined,\n setOutcome?: (outcome: OperationOutcome) => void\n): T | undefined {\n const medplum = useMedplum();\n const referenceRef = useRef<Reference<T> | undefined>(undefined);\n const resourceRef = useRef<T | undefined>(undefined);\n\n // Parse the input value into a reference and resource\n parseValue(value, referenceRef, resourceRef);\n\n // Priority order:\n // 1. Cached reference\n // 2. Resource passed in as-is\n // 3. Undefined\n const currentResource = getCurrentValue(medplum, referenceRef, resourceRef);\n\n // Keep track of the previous resource\n // This is used to detect when the resource has changed\n // We need a React \"state\" variable to trigger a re-render\n const [prevResource, forceRerender] = useState(currentResource);\n\n // Subscribe to changes to the passed-in value\n useEffect(() => {\n if (referenceRef.current) {\n medplum\n .readReference(referenceRef.current)\n .then((newValue) => {\n if (!deepEquals(newValue, prevResource)) {\n forceRerender(newValue);\n }\n })\n .catch((err) => {\n if (setOutcome) {\n setOutcome(err);\n }\n });\n }\n }, [medplum, prevResource, value, setOutcome]);\n\n return currentResource;\n}\n\n/**\n * Parses the input into a reference and resource.\n * @param value The input value to parse. Can be either a reference or a resource.\n * @param referenceRef The output reference.\n * @param resourceRef The output resource.\n */\nfunction parseValue<T extends Resource>(\n value: Reference<T> | T | undefined,\n referenceRef: React.MutableRefObject<Reference<T> | undefined>,\n resourceRef: React.MutableRefObject<T | undefined>\n): void {\n // Reset the reference and resource\n referenceRef.current = undefined;\n resourceRef.current = undefined;\n\n if (!value) {\n return;\n }\n\n if ('reference' in value) {\n // If the input is a reference then we can use it as-is\n referenceRef.current = value as Reference<T>;\n } else if ('resourceType' in value) {\n resourceRef.current = value;\n if ('id' in value) {\n // If the input is a resource with an ID, then we can still create a reference\n referenceRef.current = { reference: value.resourceType + '/' + value.id };\n }\n }\n}\n\n/**\n * Returns the best currently available value.\n * This is ***not*** asynchronous and returns immediately.\n * It attempts to return the value from the cache, or the resource passed in as-is.\n * @param medplum The Medplum client.\n * @param referenceRef The reference.\n * @param resourceRef The resource.\n * @returns The currently available value.\n */\nfunction getCurrentValue<T extends Resource>(\n medplum: MedplumClient,\n referenceRef: React.MutableRefObject<Reference<T> | undefined>,\n resourceRef: React.MutableRefObject<T | undefined>\n): T | undefined {\n // Priority order:\n // 1. Cached reference\n // 2. Resource passed in as-is\n // 3. Undefined\n return (referenceRef.current && medplum.getCachedReference(referenceRef.current)) || resourceRef.current;\n}\n"],"names":[],"mappings":";;;;AAKA;;;;;AAKG;AACa,SAAA,WAAW,CACzB,KAAmC,EACnC,UAAgD,EAAA;AAEhD,IAAA,MAAM,OAAO,GAAG,UAAU,EAAE,CAAC;AAC7B,IAAA,MAAM,YAAY,GAAG,MAAM,CAA2B,SAAS,CAAC,CAAC;AACjE,IAAA,MAAM,WAAW,GAAG,MAAM,CAAgB,SAAS,CAAC,CAAC;;AAGrD,IAAA,UAAU,CAAC,KAAK,EAAE,YAAY,EAAE,WAAW,CAAC,CAAC;;;;;IAM7C,MAAM,eAAe,GAAG,eAAe,CAAC,OAAO,EAAE,YAAY,EAAE,WAAW,CAAC,CAAC;;;;IAK5E,MAAM,CAAC,YAAY,EAAE,aAAa,CAAC,GAAG,QAAQ,CAAC,eAAe,CAAC,CAAC;;IAGhE,SAAS,CAAC,MAAK;QACb,IAAI,YAAY,CAAC,OAAO,EAAE;YACxB,OAAO;AACJ,iBAAA,aAAa,CAAC,YAAY,CAAC,OAAO,CAAC;AACnC,iBAAA,IAAI,CAAC,CAAC,QAAQ,KAAI;AACjB,gBAAA,IAAI,CAAC,UAAU,CAAC,QAAQ,EAAE,YAAY,CAAC,EAAE;oBACvC,aAAa,CAAC,QAAQ,CAAC,CAAC;AACzB,iBAAA;AACH,aAAC,CAAC;AACD,iBAAA,KAAK,CAAC,CAAC,GAAG,KAAI;AACb,gBAAA,IAAI,UAAU,EAAE;oBACd,UAAU,CAAC,GAAG,CAAC,CAAC;AACjB,iBAAA;AACH,aAAC,CAAC,CAAC;AACN,SAAA;KACF,EAAE,CAAC,OAAO,EAAE,YAAY,EAAE,KAAK,EAAE,UAAU,CAAC,CAAC,CAAC;AAE/C,IAAA,OAAO,eAAe,CAAC;AACzB,CAAC;AAED;;;;;AAKG;AACH,SAAS,UAAU,CACjB,KAAmC,EACnC,YAA8D,EAC9D,WAAkD,EAAA;;AAGlD,IAAA,YAAY,CAAC,OAAO,GAAG,SAAS,CAAC;AACjC,IAAA,WAAW,CAAC,OAAO,GAAG,SAAS,CAAC;IAEhC,IAAI,CAAC,KAAK,EAAE;QACV,OAAO;AACR,KAAA;IAED,IAAI,WAAW,IAAI,KAAK,EAAE;;AAExB,QAAA,YAAY,CAAC,OAAO,GAAG,KAAqB,CAAC;AAC9C,KAAA;SAAM,IAAI,cAAc,IAAI,KAAK,EAAE;AAClC,QAAA,WAAW,CAAC,OAAO,GAAG,KAAK,CAAC;QAC5B,IAAI,IAAI,IAAI,KAAK,EAAE;;AAEjB,YAAA,YAAY,CAAC,OAAO,GAAG,EAAE,SAAS,EAAE,KAAK,CAAC,YAAY,GAAG,GAAG,GAAG,KAAK,CAAC,EAAE,EAAE,CAAC;AAC3E,SAAA;AACF,KAAA;AACH,CAAC;AAED;;;;;;;;AAQG;AACH,SAAS,eAAe,CACtB,OAAsB,EACtB,YAA8D,EAC9D,WAAkD,EAAA;;;;;AAMlD,IAAA,OAAO,CAAC,YAAY,CAAC,OAAO,IAAI,OAAO,CAAC,kBAAkB,CAAC,YAAY,CAAC,OAAO,CAAC,KAAK,WAAW,CAAC,OAAO,CAAC;AAC3G;;;;"}
@@ -2,5 +2,6 @@ import { Resource } from '@medplum/fhirtypes';
2
2
  /**
3
3
  * Sorts an array of resources in place by meta.lastUpdated ascending.
4
4
  * @param resources Array of resources.
5
+ * @param timelineResource Optional primary resource of a timeline view. If specified, the primary resource will be sorted by meta.lastUpdated descending.
5
6
  */
6
- export declare function sortByDateAndPriority(resources: Resource[]): void;
7
+ export declare function sortByDateAndPriority(resources: Resource[], timelineResource?: Resource): void;