@medplum/react 2.0.5 → 2.0.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/index.cjs +100 -123
- package/dist/cjs/index.cjs.map +1 -1
- package/dist/cjs/index.min.cjs +1 -1
- package/dist/esm/DescriptionList/DescriptionList.mjs +2 -2
- package/dist/esm/DescriptionList/DescriptionList.mjs.map +1 -1
- package/dist/esm/MedplumLink/MedplumLink.mjs +3 -2
- package/dist/esm/MedplumLink/MedplumLink.mjs.map +1 -1
- package/dist/esm/Panel/Panel.mjs +1 -1
- package/dist/esm/Panel/Panel.mjs.map +1 -1
- package/dist/esm/QuestionnaireBuilder/QuestionnaireBuilder.mjs +6 -6
- package/dist/esm/QuestionnaireBuilder/QuestionnaireBuilder.mjs.map +1 -1
- package/dist/esm/QuestionnaireForm/QuestionnaireForm.mjs +1 -1
- package/dist/esm/QuestionnaireForm/QuestionnaireForm.mjs.map +1 -1
- package/dist/esm/ResourceBlame/ResourceBlame.mjs +2 -2
- package/dist/esm/ResourceBlame/ResourceBlame.mjs.map +1 -1
- package/dist/esm/ResourceDiffTable/ResourceDiffTable.mjs +1 -1
- package/dist/esm/ResourceDiffTable/ResourceDiffTable.mjs.map +1 -1
- package/dist/esm/ResourceForm/ResourceForm.mjs +2 -2
- package/dist/esm/ResourceForm/ResourceForm.mjs.map +1 -1
- package/dist/esm/ResourceTimeline/ResourceTimeline.mjs +2 -2
- package/dist/esm/ResourceTimeline/ResourceTimeline.mjs.map +1 -1
- package/dist/esm/SearchControl/SearchControl.mjs +7 -7
- package/dist/esm/SearchControl/SearchControl.mjs.map +1 -1
- package/dist/esm/SearchFieldEditor/SearchFieldEditor.mjs +1 -1
- package/dist/esm/SearchFieldEditor/SearchFieldEditor.mjs.map +1 -1
- package/dist/esm/SearchFilterEditor/SearchFilterEditor.mjs +1 -1
- package/dist/esm/SearchFilterEditor/SearchFilterEditor.mjs.map +1 -1
- package/dist/esm/TimingInput/TimingInput.mjs +1 -1
- package/dist/esm/TimingInput/TimingInput.mjs.map +1 -1
- package/dist/esm/index.min.mjs +1 -1
- package/dist/esm/node_modules/@tabler/icons-react/dist/esm/createReactComponent.mjs +1 -1
- package/dist/esm/node_modules/@tabler/icons-react/dist/esm/createReactComponent.mjs.map +1 -1
- package/dist/esm/node_modules/@tabler/icons-react/dist/esm/defaultAttributes.mjs +1 -1
- package/dist/esm/node_modules/@tabler/icons-react/dist/esm/defaultAttributes.mjs.map +1 -1
- package/dist/esm/node_modules/@tabler/icons-react/dist/esm/icons/IconAdjustmentsHorizontal.mjs +1 -1
- package/dist/esm/node_modules/@tabler/icons-react/dist/esm/icons/IconAdjustmentsHorizontal.mjs.map +1 -1
- package/dist/esm/node_modules/@tabler/icons-react/dist/esm/icons/IconAlertCircle.mjs +1 -1
- package/dist/esm/node_modules/@tabler/icons-react/dist/esm/icons/IconAlertCircle.mjs.map +1 -1
- package/dist/esm/node_modules/@tabler/icons-react/dist/esm/icons/IconBleach.mjs +1 -1
- package/dist/esm/node_modules/@tabler/icons-react/dist/esm/icons/IconBleach.mjs.map +1 -1
- package/dist/esm/node_modules/@tabler/icons-react/dist/esm/icons/IconBleachOff.mjs +1 -1
- package/dist/esm/node_modules/@tabler/icons-react/dist/esm/icons/IconBleachOff.mjs.map +1 -1
- package/dist/esm/node_modules/@tabler/icons-react/dist/esm/icons/IconBoxMultiple.mjs +1 -1
- package/dist/esm/node_modules/@tabler/icons-react/dist/esm/icons/IconBoxMultiple.mjs.map +1 -1
- package/dist/esm/node_modules/@tabler/icons-react/dist/esm/icons/IconBracketsContain.mjs +1 -1
- package/dist/esm/node_modules/@tabler/icons-react/dist/esm/icons/IconBracketsContain.mjs.map +1 -1
- package/dist/esm/node_modules/@tabler/icons-react/dist/esm/icons/IconBucket.mjs +1 -1
- package/dist/esm/node_modules/@tabler/icons-react/dist/esm/icons/IconBucket.mjs.map +1 -1
- package/dist/esm/node_modules/@tabler/icons-react/dist/esm/icons/IconBucketOff.mjs +1 -1
- package/dist/esm/node_modules/@tabler/icons-react/dist/esm/icons/IconBucketOff.mjs.map +1 -1
- package/dist/esm/node_modules/@tabler/icons-react/dist/esm/icons/IconCalendar.mjs +1 -1
- package/dist/esm/node_modules/@tabler/icons-react/dist/esm/icons/IconCalendar.mjs.map +1 -1
- package/dist/esm/node_modules/@tabler/icons-react/dist/esm/icons/IconCheck.mjs +1 -1
- package/dist/esm/node_modules/@tabler/icons-react/dist/esm/icons/IconCheck.mjs.map +1 -1
- package/dist/esm/node_modules/@tabler/icons-react/dist/esm/icons/IconCheckbox.mjs +1 -1
- package/dist/esm/node_modules/@tabler/icons-react/dist/esm/icons/IconCheckbox.mjs.map +1 -1
- package/dist/esm/node_modules/@tabler/icons-react/dist/esm/icons/IconCircleMinus.mjs +1 -1
- package/dist/esm/node_modules/@tabler/icons-react/dist/esm/icons/IconCircleMinus.mjs.map +1 -1
- package/dist/esm/node_modules/@tabler/icons-react/dist/esm/icons/IconCirclePlus.mjs +1 -1
- package/dist/esm/node_modules/@tabler/icons-react/dist/esm/icons/IconCirclePlus.mjs.map +1 -1
- package/dist/esm/node_modules/@tabler/icons-react/dist/esm/icons/IconCloudUpload.mjs +1 -1
- package/dist/esm/node_modules/@tabler/icons-react/dist/esm/icons/IconCloudUpload.mjs.map +1 -1
- package/dist/esm/node_modules/@tabler/icons-react/dist/esm/icons/IconColumns.mjs +1 -1
- package/dist/esm/node_modules/@tabler/icons-react/dist/esm/icons/IconColumns.mjs.map +1 -1
- package/dist/esm/node_modules/@tabler/icons-react/dist/esm/icons/IconCurrencyDollar.mjs +1 -1
- package/dist/esm/node_modules/@tabler/icons-react/dist/esm/icons/IconCurrencyDollar.mjs.map +1 -1
- package/dist/esm/node_modules/@tabler/icons-react/dist/esm/icons/IconDots.mjs +1 -1
- package/dist/esm/node_modules/@tabler/icons-react/dist/esm/icons/IconDots.mjs.map +1 -1
- package/dist/esm/node_modules/@tabler/icons-react/dist/esm/icons/IconEdit.mjs +1 -1
- package/dist/esm/node_modules/@tabler/icons-react/dist/esm/icons/IconEdit.mjs.map +1 -1
- package/dist/esm/node_modules/@tabler/icons-react/dist/esm/icons/IconEqual.mjs +1 -1
- package/dist/esm/node_modules/@tabler/icons-react/dist/esm/icons/IconEqual.mjs.map +1 -1
- package/dist/esm/node_modules/@tabler/icons-react/dist/esm/icons/IconEqualNot.mjs +1 -1
- package/dist/esm/node_modules/@tabler/icons-react/dist/esm/icons/IconEqualNot.mjs.map +1 -1
- package/dist/esm/node_modules/@tabler/icons-react/dist/esm/icons/IconFileAlert.mjs +1 -1
- package/dist/esm/node_modules/@tabler/icons-react/dist/esm/icons/IconFileAlert.mjs.map +1 -1
- package/dist/esm/node_modules/@tabler/icons-react/dist/esm/icons/IconFilePlus.mjs +1 -1
- package/dist/esm/node_modules/@tabler/icons-react/dist/esm/icons/IconFilePlus.mjs.map +1 -1
- package/dist/esm/node_modules/@tabler/icons-react/dist/esm/icons/IconFilter.mjs +1 -1
- package/dist/esm/node_modules/@tabler/icons-react/dist/esm/icons/IconFilter.mjs.map +1 -1
- package/dist/esm/node_modules/@tabler/icons-react/dist/esm/icons/IconListDetails.mjs +1 -1
- package/dist/esm/node_modules/@tabler/icons-react/dist/esm/icons/IconListDetails.mjs.map +1 -1
- package/dist/esm/node_modules/@tabler/icons-react/dist/esm/icons/IconMathGreater.mjs +1 -1
- package/dist/esm/node_modules/@tabler/icons-react/dist/esm/icons/IconMathGreater.mjs.map +1 -1
- package/dist/esm/node_modules/@tabler/icons-react/dist/esm/icons/IconMathLower.mjs +1 -1
- package/dist/esm/node_modules/@tabler/icons-react/dist/esm/icons/IconMathLower.mjs.map +1 -1
- package/dist/esm/node_modules/@tabler/icons-react/dist/esm/icons/IconMessage.mjs +1 -1
- package/dist/esm/node_modules/@tabler/icons-react/dist/esm/icons/IconMessage.mjs.map +1 -1
- package/dist/esm/node_modules/@tabler/icons-react/dist/esm/icons/IconPin.mjs +1 -1
- package/dist/esm/node_modules/@tabler/icons-react/dist/esm/icons/IconPin.mjs.map +1 -1
- package/dist/esm/node_modules/@tabler/icons-react/dist/esm/icons/IconPinnedOff.mjs +1 -1
- package/dist/esm/node_modules/@tabler/icons-react/dist/esm/icons/IconPinnedOff.mjs.map +1 -1
- package/dist/esm/node_modules/@tabler/icons-react/dist/esm/icons/IconSettings.mjs +1 -1
- package/dist/esm/node_modules/@tabler/icons-react/dist/esm/icons/IconSettings.mjs.map +1 -1
- package/dist/esm/node_modules/@tabler/icons-react/dist/esm/icons/IconSortAscending.mjs +1 -1
- package/dist/esm/node_modules/@tabler/icons-react/dist/esm/icons/IconSortAscending.mjs.map +1 -1
- package/dist/esm/node_modules/@tabler/icons-react/dist/esm/icons/IconSortDescending.mjs +1 -1
- package/dist/esm/node_modules/@tabler/icons-react/dist/esm/icons/IconSortDescending.mjs.map +1 -1
- package/dist/esm/node_modules/@tabler/icons-react/dist/esm/icons/IconSquare.mjs +2 -2
- package/dist/esm/node_modules/@tabler/icons-react/dist/esm/icons/IconSquare.mjs.map +1 -1
- package/dist/esm/node_modules/@tabler/icons-react/dist/esm/icons/IconTableExport.mjs +1 -1
- package/dist/esm/node_modules/@tabler/icons-react/dist/esm/icons/IconTableExport.mjs.map +1 -1
- package/dist/esm/node_modules/@tabler/icons-react/dist/esm/icons/IconTrash.mjs +1 -1
- package/dist/esm/node_modules/@tabler/icons-react/dist/esm/icons/IconTrash.mjs.map +1 -1
- package/dist/esm/node_modules/@tabler/icons-react/dist/esm/icons/IconX.mjs +1 -1
- package/dist/esm/node_modules/@tabler/icons-react/dist/esm/icons/IconX.mjs.map +1 -1
- package/dist/esm/useResource/useResource.mjs +40 -63
- package/dist/esm/useResource/useResource.mjs.map +1 -1
- package/package.json +10 -10
- package/dist/types/icons/IconAdjustmentsHorizontal.d.ts +0 -0
- package/tsconfig.build.json +0 -9
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"IconMessage.mjs","sources":["
|
|
1
|
+
{"version":3,"file":"IconMessage.mjs","sources":["../../../../../../../../../../node_modules/@tabler/icons-react/dist/esm/icons/IconMessage.js"],"sourcesContent":["/**\n * @tabler/icons-react v2.9.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;;;;","x_google_ignoreList":[0]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"IconPin.mjs","sources":["
|
|
1
|
+
{"version":3,"file":"IconPin.mjs","sources":["../../../../../../../../../../node_modules/@tabler/icons-react/dist/esm/icons/IconPin.js"],"sourcesContent":["/**\n * @tabler/icons-react v2.9.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;;;;","x_google_ignoreList":[0]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"IconPinnedOff.mjs","sources":["
|
|
1
|
+
{"version":3,"file":"IconPinnedOff.mjs","sources":["../../../../../../../../../../node_modules/@tabler/icons-react/dist/esm/icons/IconPinnedOff.js"],"sourcesContent":["/**\n * @tabler/icons-react v2.9.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;;;;","x_google_ignoreList":[0]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"IconSettings.mjs","sources":["
|
|
1
|
+
{"version":3,"file":"IconSettings.mjs","sources":["../../../../../../../../../../node_modules/@tabler/icons-react/dist/esm/icons/IconSettings.js"],"sourcesContent":["/**\n * @tabler/icons-react v2.9.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;;;;","x_google_ignoreList":[0]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"IconSortAscending.mjs","sources":["
|
|
1
|
+
{"version":3,"file":"IconSortAscending.mjs","sources":["../../../../../../../../../../node_modules/@tabler/icons-react/dist/esm/icons/IconSortAscending.js"],"sourcesContent":["/**\n * @tabler/icons-react v2.9.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;;;;","x_google_ignoreList":[0]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"IconSortDescending.mjs","sources":["
|
|
1
|
+
{"version":3,"file":"IconSortDescending.mjs","sources":["../../../../../../../../../../node_modules/@tabler/icons-react/dist/esm/icons/IconSortDescending.js"],"sourcesContent":["/**\n * @tabler/icons-react v2.9.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;;;;","x_google_ignoreList":[0]}
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import createReactComponent from '../createReactComponent.mjs';
|
|
2
2
|
|
|
3
3
|
/**
|
|
4
|
-
* @tabler/icons-react v2.
|
|
4
|
+
* @tabler/icons-react v2.9.0 - MIT
|
|
5
5
|
*/
|
|
6
6
|
|
|
7
7
|
var IconSquare = createReactComponent("square", "IconSquare", [
|
|
8
8
|
[
|
|
9
9
|
"path",
|
|
10
10
|
{
|
|
11
|
-
d: "
|
|
11
|
+
d: "M3 3m0 2a2 2 0 0 1 2 -2h14a2 2 0 0 1 2 2v14a2 2 0 0 1 -2 2h-14a2 2 0 0 1 -2 -2z",
|
|
12
12
|
key: "svg-0"
|
|
13
13
|
}
|
|
14
14
|
]
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"IconSquare.mjs","sources":["
|
|
1
|
+
{"version":3,"file":"IconSquare.mjs","sources":["../../../../../../../../../../node_modules/@tabler/icons-react/dist/esm/icons/IconSquare.js"],"sourcesContent":["/**\n * @tabler/icons-react v2.9.0 - MIT\n */\n\nimport createReactComponent from '../createReactComponent.js';\n\nvar IconSquare = createReactComponent(\"square\", \"IconSquare\", [\n [\n \"path\",\n {\n d: \"M3 3m0 2a2 2 0 0 1 2 -2h14a2 2 0 0 1 2 2v14a2 2 0 0 1 -2 2h-14a2 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;;;;","x_google_ignoreList":[0]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"IconTableExport.mjs","sources":["
|
|
1
|
+
{"version":3,"file":"IconTableExport.mjs","sources":["../../../../../../../../../../node_modules/@tabler/icons-react/dist/esm/icons/IconTableExport.js"],"sourcesContent":["/**\n * @tabler/icons-react v2.9.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;;;;","x_google_ignoreList":[0]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"IconTrash.mjs","sources":["
|
|
1
|
+
{"version":3,"file":"IconTrash.mjs","sources":["../../../../../../../../../../node_modules/@tabler/icons-react/dist/esm/icons/IconTrash.js"],"sourcesContent":["/**\n * @tabler/icons-react v2.9.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;;;;","x_google_ignoreList":[0]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"IconX.mjs","sources":["
|
|
1
|
+
{"version":3,"file":"IconX.mjs","sources":["../../../../../../../../../../node_modules/@tabler/icons-react/dist/esm/icons/IconX.js"],"sourcesContent":["/**\n * @tabler/icons-react v2.9.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;;;;","x_google_ignoreList":[0]}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { deepEquals, normalizeOperationOutcome } from '@medplum/core';
|
|
2
|
-
import {
|
|
1
|
+
import { deepEquals, isReference, normalizeOperationOutcome, isResource } from '@medplum/core';
|
|
2
|
+
import { useState, useCallback, useEffect } from 'react';
|
|
3
3
|
import { useMedplum } from '../MedplumProvider/MedplumProvider.mjs';
|
|
4
4
|
|
|
5
5
|
/**
|
|
@@ -10,80 +10,57 @@ import { useMedplum } from '../MedplumProvider/MedplumProvider.mjs';
|
|
|
10
10
|
*/
|
|
11
11
|
function useResource(value, setOutcome) {
|
|
12
12
|
const medplum = useMedplum();
|
|
13
|
-
const
|
|
14
|
-
const
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
const currentResource = getCurrentValue(medplum, referenceRef, resourceRef);
|
|
23
|
-
// Keep track of the previous resource
|
|
24
|
-
// This is used to detect when the resource has changed
|
|
25
|
-
// We need a React "state" variable to trigger a re-render
|
|
26
|
-
const [prevResource, forceRerender] = useState(currentResource);
|
|
27
|
-
// Subscribe to changes to the passed-in value
|
|
13
|
+
const [resource, setResource] = useState(getInitialResource(medplum, value));
|
|
14
|
+
const setResourceIfChanged = useCallback((r) => {
|
|
15
|
+
if (!deepEquals(r, resource)) {
|
|
16
|
+
setResource(r);
|
|
17
|
+
}
|
|
18
|
+
}, [resource, setResource]);
|
|
19
|
+
useEffect(() => {
|
|
20
|
+
setResourceIfChanged(getInitialResource(medplum, value));
|
|
21
|
+
}, [medplum, value, setResourceIfChanged]);
|
|
28
22
|
useEffect(() => {
|
|
29
|
-
|
|
30
|
-
|
|
23
|
+
let subscribed = true;
|
|
24
|
+
if (isReference(value)) {
|
|
31
25
|
medplum
|
|
32
|
-
.readReference(
|
|
33
|
-
.then((
|
|
34
|
-
if (
|
|
35
|
-
|
|
26
|
+
.readReference(value)
|
|
27
|
+
.then((r) => {
|
|
28
|
+
if (subscribed) {
|
|
29
|
+
setResourceIfChanged(r);
|
|
36
30
|
}
|
|
37
31
|
})
|
|
38
32
|
.catch((err) => {
|
|
39
|
-
if (
|
|
40
|
-
|
|
33
|
+
if (subscribed) {
|
|
34
|
+
setResourceIfChanged(undefined);
|
|
35
|
+
if (setOutcome) {
|
|
36
|
+
setOutcome(normalizeOperationOutcome(err));
|
|
37
|
+
}
|
|
41
38
|
}
|
|
42
39
|
});
|
|
43
40
|
}
|
|
44
|
-
|
|
45
|
-
|
|
41
|
+
return (() => (subscribed = false));
|
|
42
|
+
}, [medplum, resource, value, setResourceIfChanged, setOutcome]);
|
|
43
|
+
return resource;
|
|
46
44
|
}
|
|
47
45
|
/**
|
|
48
|
-
*
|
|
49
|
-
*
|
|
50
|
-
*
|
|
51
|
-
*
|
|
46
|
+
* Returns the initial resource value based on the input value.
|
|
47
|
+
* If the input value is a resource, returns the resource.
|
|
48
|
+
* If the input value is a reference to a resource available in the cache, returns the resource.
|
|
49
|
+
* Otherwise, returns undefined.
|
|
50
|
+
* @param medplum The medplum client.
|
|
51
|
+
* @param value The resource or reference to resource.
|
|
52
|
+
* @returns An initial resource if available; undefined otherwise.
|
|
52
53
|
*/
|
|
53
|
-
function
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
if ('reference' in value) {
|
|
61
|
-
// If the input is a reference then we can use it as-is
|
|
62
|
-
referenceRef.current = value;
|
|
63
|
-
}
|
|
64
|
-
else if ('resourceType' in value) {
|
|
65
|
-
resourceRef.current = value;
|
|
66
|
-
if ('id' in value) {
|
|
67
|
-
// If the input is a resource with an ID, then we can still create a reference
|
|
68
|
-
referenceRef.current = { reference: value.resourceType + '/' + value.id };
|
|
54
|
+
function getInitialResource(medplum, value) {
|
|
55
|
+
if (value) {
|
|
56
|
+
if (isResource(value)) {
|
|
57
|
+
return value;
|
|
58
|
+
}
|
|
59
|
+
if (isReference(value)) {
|
|
60
|
+
return medplum.getCachedReference(value);
|
|
69
61
|
}
|
|
70
62
|
}
|
|
71
|
-
|
|
72
|
-
/**
|
|
73
|
-
* Returns the best currently available value.
|
|
74
|
-
* This is ***not*** asynchronous and returns immediately.
|
|
75
|
-
* It attempts to return the value from the cache, or the resource passed in as-is.
|
|
76
|
-
* @param medplum The Medplum client.
|
|
77
|
-
* @param referenceRef The reference.
|
|
78
|
-
* @param resourceRef The resource.
|
|
79
|
-
* @returns The currently available value.
|
|
80
|
-
*/
|
|
81
|
-
function getCurrentValue(medplum, referenceRef, resourceRef) {
|
|
82
|
-
// Priority order:
|
|
83
|
-
// 1. Cached reference
|
|
84
|
-
// 2. Resource passed in as-is
|
|
85
|
-
// 3. Undefined
|
|
86
|
-
return (referenceRef.current && medplum.getCachedReference(referenceRef.current)) || resourceRef.current;
|
|
63
|
+
return undefined;
|
|
87
64
|
}
|
|
88
65
|
|
|
89
66
|
export { useResource };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useResource.mjs","sources":["../../../src/useResource/useResource.ts"],"sourcesContent":["import { deepEquals, MedplumClient, normalizeOperationOutcome } from '@medplum/core';\nimport { OperationOutcome, Reference, Resource } from '@medplum/fhirtypes';\nimport {
|
|
1
|
+
{"version":3,"file":"useResource.mjs","sources":["../../../src/useResource/useResource.ts"],"sourcesContent":["import { deepEquals, isReference, isResource, MedplumClient, normalizeOperationOutcome } from '@medplum/core';\nimport { OperationOutcome, Reference, Resource } from '@medplum/fhirtypes';\nimport { useCallback, useEffect, 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 [resource, setResource] = useState<T | undefined>(getInitialResource(medplum, value));\n\n const setResourceIfChanged = useCallback(\n (r: T | undefined) => {\n if (!deepEquals(r, resource)) {\n setResource(r);\n }\n },\n [resource, setResource]\n );\n\n useEffect(() => {\n setResourceIfChanged(getInitialResource(medplum, value));\n }, [medplum, value, setResourceIfChanged]);\n\n useEffect(() => {\n let subscribed = true;\n\n if (isReference<T>(value)) {\n medplum\n .readReference(value as Reference<T>)\n .then((r) => {\n if (subscribed) {\n setResourceIfChanged(r);\n }\n })\n .catch((err) => {\n if (subscribed) {\n setResourceIfChanged(undefined);\n if (setOutcome) {\n setOutcome(normalizeOperationOutcome(err));\n }\n }\n });\n }\n\n return (() => (subscribed = false)) as () => void;\n }, [medplum, resource, value, setResourceIfChanged, setOutcome]);\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 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 if (isResource<T>(value)) {\n return value;\n }\n\n if (isReference<T>(value)) {\n return medplum.getCachedReference(value);\n }\n }\n\n return undefined;\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,CAAC,QAAQ,EAAE,WAAW,CAAC,GAAG,QAAQ,CAAgB,kBAAkB,CAAC,OAAO,EAAE,KAAK,CAAC,CAAC,CAAC;AAE5F,IAAA,MAAM,oBAAoB,GAAG,WAAW,CACtC,CAAC,CAAgB,KAAI;AACnB,QAAA,IAAI,CAAC,UAAU,CAAC,CAAC,EAAE,QAAQ,CAAC,EAAE;YAC5B,WAAW,CAAC,CAAC,CAAC,CAAC;AAChB,SAAA;AACH,KAAC,EACD,CAAC,QAAQ,EAAE,WAAW,CAAC,CACxB,CAAC;IAEF,SAAS,CAAC,MAAK;QACb,oBAAoB,CAAC,kBAAkB,CAAC,OAAO,EAAE,KAAK,CAAC,CAAC,CAAC;KAC1D,EAAE,CAAC,OAAO,EAAE,KAAK,EAAE,oBAAoB,CAAC,CAAC,CAAC;IAE3C,SAAS,CAAC,MAAK;QACb,IAAI,UAAU,GAAG,IAAI,CAAC;AAEtB,QAAA,IAAI,WAAW,CAAI,KAAK,CAAC,EAAE;YACzB,OAAO;iBACJ,aAAa,CAAC,KAAqB,CAAC;AACpC,iBAAA,IAAI,CAAC,CAAC,CAAC,KAAI;AACV,gBAAA,IAAI,UAAU,EAAE;oBACd,oBAAoB,CAAC,CAAC,CAAC,CAAC;AACzB,iBAAA;AACH,aAAC,CAAC;AACD,iBAAA,KAAK,CAAC,CAAC,GAAG,KAAI;AACb,gBAAA,IAAI,UAAU,EAAE;oBACd,oBAAoB,CAAC,SAAS,CAAC,CAAC;AAChC,oBAAA,IAAI,UAAU,EAAE;AACd,wBAAA,UAAU,CAAC,yBAAyB,CAAC,GAAG,CAAC,CAAC,CAAC;AAC5C,qBAAA;AACF,iBAAA;AACH,aAAC,CAAC,CAAC;AACN,SAAA;QAED,QAAQ,OAAO,UAAU,GAAG,KAAK,CAAC,EAAgB;AACpD,KAAC,EAAE,CAAC,OAAO,EAAE,QAAQ,EAAE,KAAK,EAAE,oBAAoB,EAAE,UAAU,CAAC,CAAC,CAAC;AAEjE,IAAA,OAAO,QAAQ,CAAC;AAClB,CAAC;AAED;;;;;;;;AAQG;AACH,SAAS,kBAAkB,CACzB,OAAsB,EACtB,KAAmC,EAAA;AAEnC,IAAA,IAAI,KAAK,EAAE;AACT,QAAA,IAAI,UAAU,CAAI,KAAK,CAAC,EAAE;AACxB,YAAA,OAAO,KAAK,CAAC;AACd,SAAA;AAED,QAAA,IAAI,WAAW,CAAI,KAAK,CAAC,EAAE;AACzB,YAAA,OAAO,OAAO,CAAC,kBAAkB,CAAC,KAAK,CAAC,CAAC;AAC1C,SAAA;AACF,KAAA;AAED,IAAA,OAAO,SAAS,CAAC;AACnB;;;;"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@medplum/react",
|
|
3
|
-
"version": "2.0.
|
|
3
|
+
"version": "2.0.7",
|
|
4
4
|
"description": "Medplum React Component Library",
|
|
5
5
|
"author": "Medplum <hello@medplum.com>",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -19,9 +19,9 @@
|
|
|
19
19
|
},
|
|
20
20
|
"devDependencies": {
|
|
21
21
|
"@emotion/react": "11.10.6",
|
|
22
|
-
"@mantine/core": "
|
|
23
|
-
"@mantine/hooks": "
|
|
24
|
-
"@mantine/notifications": "
|
|
22
|
+
"@mantine/core": "6.0.1",
|
|
23
|
+
"@mantine/hooks": "6.0.1",
|
|
24
|
+
"@mantine/notifications": "6.0.1",
|
|
25
25
|
"@medplum/core": "*",
|
|
26
26
|
"@medplum/definitions": "*",
|
|
27
27
|
"@medplum/fhirtypes": "*",
|
|
@@ -33,23 +33,23 @@
|
|
|
33
33
|
"@storybook/manager-webpack5": "6.5.16",
|
|
34
34
|
"@storybook/react": "6.5.16",
|
|
35
35
|
"@svgr/rollup": "6.5.1",
|
|
36
|
-
"@tabler/icons-react": "2.
|
|
37
|
-
"@testing-library/dom": "9.0.
|
|
36
|
+
"@tabler/icons-react": "2.9.0",
|
|
37
|
+
"@testing-library/dom": "9.0.1",
|
|
38
38
|
"@testing-library/jest-dom": "5.16.5",
|
|
39
39
|
"@testing-library/react": "14.0.0",
|
|
40
40
|
"@types/jest": "29.4.0",
|
|
41
|
-
"@types/node": "18.14.
|
|
41
|
+
"@types/node": "18.14.6",
|
|
42
42
|
"@types/react": "18.0.28",
|
|
43
43
|
"@types/react-dom": "18.0.11",
|
|
44
44
|
"@types/react-router-dom": "5.3.3",
|
|
45
45
|
"dotenv-webpack": "8.0.1",
|
|
46
46
|
"identity-obj-proxy": "3.0.0",
|
|
47
|
-
"jest": "29.
|
|
48
|
-
"jest-each": "29.
|
|
47
|
+
"jest": "29.5.0",
|
|
48
|
+
"jest-each": "29.5.0",
|
|
49
49
|
"html-webpack-plugin": "5.5.0",
|
|
50
50
|
"react": "18.2.0",
|
|
51
51
|
"react-dom": "18.2.0",
|
|
52
|
-
"rimraf": "4.
|
|
52
|
+
"rimraf": "4.4.0",
|
|
53
53
|
"typescript": "4.9.5"
|
|
54
54
|
},
|
|
55
55
|
"peerDependencies": {
|
|
File without changes
|