@medplum/react 2.0.21 → 2.0.22
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 +171 -126
- package/dist/cjs/index.cjs.map +1 -1
- package/dist/cjs/index.min.cjs +1 -1
- package/dist/esm/AttachmentButton/AttachmentButton.mjs +1 -2
- package/dist/esm/AttachmentButton/AttachmentButton.mjs.map +1 -1
- package/dist/esm/DateTimeInput/DateTimeInput.mjs +1 -0
- package/dist/esm/DateTimeInput/DateTimeInput.mjs.map +1 -1
- package/dist/esm/FhirPathTable/FhirPathTable.mjs +2 -0
- package/dist/esm/FhirPathTable/FhirPathTable.mjs.map +1 -1
- package/dist/esm/Form/FormUtils.mjs +2 -1
- package/dist/esm/Form/FormUtils.mjs.map +1 -1
- package/dist/esm/GoogleButton/GoogleButton.mjs +2 -2
- package/dist/esm/GoogleButton/GoogleButton.mjs.map +1 -1
- package/dist/esm/MedplumProvider/MedplumProvider.mjs +4 -0
- package/dist/esm/MedplumProvider/MedplumProvider.mjs.map +1 -1
- package/dist/esm/PlanDefinitionBuilder/PlanDefinitionBuilder.mjs +2 -1
- package/dist/esm/PlanDefinitionBuilder/PlanDefinitionBuilder.mjs.map +1 -1
- package/dist/esm/QuestionnaireBuilder/QuestionnaireBuilder.mjs +3 -2
- package/dist/esm/QuestionnaireBuilder/QuestionnaireBuilder.mjs.map +1 -1
- package/dist/esm/ReferenceRangeEditor/ReferenceRangeEditor.mjs +13 -5
- package/dist/esm/ReferenceRangeEditor/ReferenceRangeEditor.mjs.map +1 -1
- package/dist/esm/ResourceName/ResourceName.mjs +0 -5
- package/dist/esm/ResourceName/ResourceName.mjs.map +1 -1
- package/dist/esm/ResourcePropertyDisplay/ResourcePropertyDisplay.mjs +6 -3
- package/dist/esm/ResourcePropertyDisplay/ResourcePropertyDisplay.mjs.map +1 -1
- package/dist/esm/SearchControl/SearchControl.mjs +2 -1
- package/dist/esm/SearchControl/SearchControl.mjs.map +1 -1
- package/dist/esm/SearchControl/SearchUtils.mjs +77 -54
- package/dist/esm/SearchControl/SearchUtils.mjs.map +1 -1
- package/dist/esm/SearchFieldEditor/SearchFieldEditor.mjs +6 -7
- package/dist/esm/SearchFieldEditor/SearchFieldEditor.mjs.map +1 -1
- package/dist/esm/ValueSetAutocomplete/ValueSetAutocomplete.mjs +3 -0
- package/dist/esm/ValueSetAutocomplete/ValueSetAutocomplete.mjs.map +1 -1
- package/dist/esm/auth/SignInForm.mjs +2 -0
- package/dist/esm/auth/SignInForm.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/IconChevronDown.mjs +1 -1
- package/dist/esm/node_modules/@tabler/icons-react/dist/esm/icons/IconChevronDown.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/IconLogout.mjs +1 -1
- package/dist/esm/node_modules/@tabler/icons-react/dist/esm/icons/IconLogout.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/IconPlus.mjs +1 -1
- package/dist/esm/node_modules/@tabler/icons-react/dist/esm/icons/IconPlus.mjs.map +1 -1
- package/dist/esm/node_modules/@tabler/icons-react/dist/esm/icons/IconSearch.mjs +1 -1
- package/dist/esm/node_modules/@tabler/icons-react/dist/esm/icons/IconSearch.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 +1 -1
- 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/IconSwitchHorizontal.mjs +1 -1
- package/dist/esm/node_modules/@tabler/icons-react/dist/esm/icons/IconSwitchHorizontal.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 +1 -0
- package/dist/esm/useResource/useResource.mjs.map +1 -1
- package/dist/esm/utils/script.mjs +1 -0
- package/dist/esm/utils/script.mjs.map +1 -1
- package/dist/types/FhirPathTable/FhirPathTable.d.ts +2 -0
- package/dist/types/Form/FormUtils.d.ts +1 -0
- package/dist/types/MedplumProvider/MedplumProvider.d.ts +4 -0
- package/dist/types/ResourceName/ResourceName.d.ts +0 -5
- package/dist/types/ResourcePropertyDisplay/ResourcePropertyDisplay.d.ts +4 -2
- package/dist/types/SearchControl/SearchControl.d.ts +2 -0
- package/dist/types/SearchControl/SearchUtils.d.ts +64 -44
- package/dist/types/ValueSetAutocomplete/ValueSetAutocomplete.d.ts +3 -0
- package/dist/types/auth/SignInForm.d.ts +2 -0
- package/dist/types/useResource/useResource.d.ts +1 -0
- package/dist/types/utils/script.d.ts +1 -0
- package/package.json +12 -12
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"IconMathGreater.mjs","sources":["../../../../../../../../../../node_modules/@tabler/icons-react/dist/esm/icons/IconMathGreater.js"],"sourcesContent":["/**\n * @tabler/icons-react v2.
|
|
1
|
+
{"version":3,"file":"IconMathGreater.mjs","sources":["../../../../../../../../../../node_modules/@tabler/icons-react/dist/esm/icons/IconMathGreater.js"],"sourcesContent":["/**\n * @tabler/icons-react v2.22.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;AACA;AAEA;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;;;;","x_google_ignoreList":[0]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"IconMathLower.mjs","sources":["../../../../../../../../../../node_modules/@tabler/icons-react/dist/esm/icons/IconMathLower.js"],"sourcesContent":["/**\n * @tabler/icons-react v2.
|
|
1
|
+
{"version":3,"file":"IconMathLower.mjs","sources":["../../../../../../../../../../node_modules/@tabler/icons-react/dist/esm/icons/IconMathLower.js"],"sourcesContent":["/**\n * @tabler/icons-react v2.22.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;AACA;AAEA;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;;;;","x_google_ignoreList":[0]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"IconMessage.mjs","sources":["../../../../../../../../../../node_modules/@tabler/icons-react/dist/esm/icons/IconMessage.js"],"sourcesContent":["/**\n * @tabler/icons-react v2.
|
|
1
|
+
{"version":3,"file":"IconMessage.mjs","sources":["../../../../../../../../../../node_modules/@tabler/icons-react/dist/esm/icons/IconMessage.js"],"sourcesContent":["/**\n * @tabler/icons-react v2.22.0 - MIT\n */\n\nimport createReactComponent from '../createReactComponent.js';\n\nvar IconMessage = createReactComponent(\"message\", \"IconMessage\", [\n [\"path\", { d: \"M8 9h8\", key: \"svg-0\" }],\n [\"path\", { d: \"M8 13h6\", key: \"svg-1\" }],\n [\n \"path\",\n {\n d: \"M18 4a3 3 0 0 1 3 3v8a3 3 0 0 1 -3 3h-5l-5 3v-3h-2a3 3 0 0 1 -3 -3v-8a3 3 0 0 1 3 -3h12z\",\n key: \"svg-2\"\n }\n ]\n]);\n\nexport { IconMessage as default };\n//# sourceMappingURL=IconMessage.js.map\n"],"names":[],"mappings":";;AAAA;AACA;AACA;AACA;AAEA;AACG,IAAC,WAAW,GAAG,oBAAoB,CAAC,SAAS,EAAE,aAAa,EAAE;AACjE,EAAE,CAAC,MAAM,EAAE,EAAE,CAAC,EAAE,QAAQ,EAAE,GAAG,EAAE,OAAO,EAAE,CAAC;AACzC,EAAE,CAAC,MAAM,EAAE,EAAE,CAAC,EAAE,SAAS,EAAE,GAAG,EAAE,OAAO,EAAE,CAAC;AAC1C,EAAE;AACF,IAAI,MAAM;AACV,IAAI;AACJ,MAAM,CAAC,EAAE,0FAA0F;AACnG,MAAM,GAAG,EAAE,OAAO;AAClB,KAAK;AACL,GAAG;AACH,CAAC;;;;","x_google_ignoreList":[0]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"IconPin.mjs","sources":["../../../../../../../../../../node_modules/@tabler/icons-react/dist/esm/icons/IconPin.js"],"sourcesContent":["/**\n * @tabler/icons-react v2.
|
|
1
|
+
{"version":3,"file":"IconPin.mjs","sources":["../../../../../../../../../../node_modules/@tabler/icons-react/dist/esm/icons/IconPin.js"],"sourcesContent":["/**\n * @tabler/icons-react v2.22.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;AACA;AAEA;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":["../../../../../../../../../../node_modules/@tabler/icons-react/dist/esm/icons/IconPinnedOff.js"],"sourcesContent":["/**\n * @tabler/icons-react v2.
|
|
1
|
+
{"version":3,"file":"IconPinnedOff.mjs","sources":["../../../../../../../../../../node_modules/@tabler/icons-react/dist/esm/icons/IconPinnedOff.js"],"sourcesContent":["/**\n * @tabler/icons-react v2.22.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;AACA;AAEA;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":"IconPlus.mjs","sources":["../../../../../../../../../../node_modules/@tabler/icons-react/dist/esm/icons/IconPlus.js"],"sourcesContent":["/**\n * @tabler/icons-react v2.
|
|
1
|
+
{"version":3,"file":"IconPlus.mjs","sources":["../../../../../../../../../../node_modules/@tabler/icons-react/dist/esm/icons/IconPlus.js"],"sourcesContent":["/**\n * @tabler/icons-react v2.22.0 - MIT\n */\n\nimport createReactComponent from '../createReactComponent.js';\n\nvar IconPlus = createReactComponent(\"plus\", \"IconPlus\", [\n [\"path\", { d: \"M12 5l0 14\", key: \"svg-0\" }],\n [\"path\", { d: \"M5 12l14 0\", key: \"svg-1\" }]\n]);\n\nexport { IconPlus as default };\n//# sourceMappingURL=IconPlus.js.map\n"],"names":[],"mappings":";;AAAA;AACA;AACA;AACA;AAEA;AACG,IAAC,QAAQ,GAAG,oBAAoB,CAAC,MAAM,EAAE,UAAU,EAAE;AACxD,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,CAAC;;;;","x_google_ignoreList":[0]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"IconSearch.mjs","sources":["../../../../../../../../../../node_modules/@tabler/icons-react/dist/esm/icons/IconSearch.js"],"sourcesContent":["/**\n * @tabler/icons-react v2.
|
|
1
|
+
{"version":3,"file":"IconSearch.mjs","sources":["../../../../../../../../../../node_modules/@tabler/icons-react/dist/esm/icons/IconSearch.js"],"sourcesContent":["/**\n * @tabler/icons-react v2.22.0 - MIT\n */\n\nimport createReactComponent from '../createReactComponent.js';\n\nvar IconSearch = createReactComponent(\"search\", \"IconSearch\", [\n [\"path\", { d: \"M10 10m-7 0a7 7 0 1 0 14 0a7 7 0 1 0 -14 0\", key: \"svg-0\" }],\n [\"path\", { d: \"M21 21l-6 -6\", key: \"svg-1\" }]\n]);\n\nexport { IconSearch as default };\n//# sourceMappingURL=IconSearch.js.map\n"],"names":[],"mappings":";;AAAA;AACA;AACA;AACA;AAEA;AACG,IAAC,UAAU,GAAG,oBAAoB,CAAC,QAAQ,EAAE,YAAY,EAAE;AAC9D,EAAE,CAAC,MAAM,EAAE,EAAE,CAAC,EAAE,4CAA4C,EAAE,GAAG,EAAE,OAAO,EAAE,CAAC;AAC7E,EAAE,CAAC,MAAM,EAAE,EAAE,CAAC,EAAE,cAAc,EAAE,GAAG,EAAE,OAAO,EAAE,CAAC;AAC/C,CAAC;;;;","x_google_ignoreList":[0]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"IconSettings.mjs","sources":["../../../../../../../../../../node_modules/@tabler/icons-react/dist/esm/icons/IconSettings.js"],"sourcesContent":["/**\n * @tabler/icons-react v2.
|
|
1
|
+
{"version":3,"file":"IconSettings.mjs","sources":["../../../../../../../../../../node_modules/@tabler/icons-react/dist/esm/icons/IconSettings.js"],"sourcesContent":["/**\n * @tabler/icons-react v2.22.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: \"M9 12a3 3 0 1 0 6 0a3 3 0 0 0 -6 0\", key: \"svg-1\" }]\n]);\n\nexport { IconSettings as default };\n//# sourceMappingURL=IconSettings.js.map\n"],"names":[],"mappings":";;AAAA;AACA;AACA;AACA;AAEA;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,oCAAoC,EAAE,GAAG,EAAE,OAAO,EAAE,CAAC;AACrE,CAAC;;;;","x_google_ignoreList":[0]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"IconSortAscending.mjs","sources":["../../../../../../../../../../node_modules/@tabler/icons-react/dist/esm/icons/IconSortAscending.js"],"sourcesContent":["/**\n * @tabler/icons-react v2.
|
|
1
|
+
{"version":3,"file":"IconSortAscending.mjs","sources":["../../../../../../../../../../node_modules/@tabler/icons-react/dist/esm/icons/IconSortAscending.js"],"sourcesContent":["/**\n * @tabler/icons-react v2.22.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;AACA;AAEA;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":["../../../../../../../../../../node_modules/@tabler/icons-react/dist/esm/icons/IconSortDescending.js"],"sourcesContent":["/**\n * @tabler/icons-react v2.
|
|
1
|
+
{"version":3,"file":"IconSortDescending.mjs","sources":["../../../../../../../../../../node_modules/@tabler/icons-react/dist/esm/icons/IconSortDescending.js"],"sourcesContent":["/**\n * @tabler/icons-react v2.22.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;AACA;AAEA;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 +1 @@
|
|
|
1
|
-
{"version":3,"file":"IconSquare.mjs","sources":["../../../../../../../../../../node_modules/@tabler/icons-react/dist/esm/icons/IconSquare.js"],"sourcesContent":["/**\n * @tabler/icons-react v2.
|
|
1
|
+
{"version":3,"file":"IconSquare.mjs","sources":["../../../../../../../../../../node_modules/@tabler/icons-react/dist/esm/icons/IconSquare.js"],"sourcesContent":["/**\n * @tabler/icons-react v2.22.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;AACA;AAEA;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]}
|
package/dist/esm/node_modules/@tabler/icons-react/dist/esm/icons/IconSwitchHorizontal.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"IconSwitchHorizontal.mjs","sources":["../../../../../../../../../../node_modules/@tabler/icons-react/dist/esm/icons/IconSwitchHorizontal.js"],"sourcesContent":["/**\n * @tabler/icons-react v2.
|
|
1
|
+
{"version":3,"file":"IconSwitchHorizontal.mjs","sources":["../../../../../../../../../../node_modules/@tabler/icons-react/dist/esm/icons/IconSwitchHorizontal.js"],"sourcesContent":["/**\n * @tabler/icons-react v2.22.0 - MIT\n */\n\nimport createReactComponent from '../createReactComponent.js';\n\nvar IconSwitchHorizontal = createReactComponent(\n \"switch-horizontal\",\n \"IconSwitchHorizontal\",\n [\n [\"path\", { d: \"M16 3l4 4l-4 4\", key: \"svg-0\" }],\n [\"path\", { d: \"M10 7l10 0\", key: \"svg-1\" }],\n [\"path\", { d: \"M8 13l-4 4l4 4\", key: \"svg-2\" }],\n [\"path\", { d: \"M4 17l9 0\", key: \"svg-3\" }]\n ]\n);\n\nexport { IconSwitchHorizontal as default };\n//# sourceMappingURL=IconSwitchHorizontal.js.map\n"],"names":[],"mappings":";;AAAA;AACA;AACA;AACA;AAEA;AACG,IAAC,oBAAoB,GAAG,oBAAoB;AAC/C,EAAE,mBAAmB;AACrB,EAAE,sBAAsB;AACxB,EAAE;AACF,IAAI,CAAC,MAAM,EAAE,EAAE,CAAC,EAAE,gBAAgB,EAAE,GAAG,EAAE,OAAO,EAAE,CAAC;AACnD,IAAI,CAAC,MAAM,EAAE,EAAE,CAAC,EAAE,YAAY,EAAE,GAAG,EAAE,OAAO,EAAE,CAAC;AAC/C,IAAI,CAAC,MAAM,EAAE,EAAE,CAAC,EAAE,gBAAgB,EAAE,GAAG,EAAE,OAAO,EAAE,CAAC;AACnD,IAAI,CAAC,MAAM,EAAE,EAAE,CAAC,EAAE,WAAW,EAAE,GAAG,EAAE,OAAO,EAAE,CAAC;AAC9C,GAAG;AACH;;;;","x_google_ignoreList":[0]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"IconTableExport.mjs","sources":["../../../../../../../../../../node_modules/@tabler/icons-react/dist/esm/icons/IconTableExport.js"],"sourcesContent":["/**\n * @tabler/icons-react v2.
|
|
1
|
+
{"version":3,"file":"IconTableExport.mjs","sources":["../../../../../../../../../../node_modules/@tabler/icons-react/dist/esm/icons/IconTableExport.js"],"sourcesContent":["/**\n * @tabler/icons-react v2.22.0 - MIT\n */\n\nimport createReactComponent from '../createReactComponent.js';\n\nvar IconTableExport = createReactComponent(\"table-export\", \"IconTableExport\", [\n [\n \"path\",\n {\n d: \"M12.5 21h-7.5a2 2 0 0 1 -2 -2v-14a2 2 0 0 1 2 -2h14a2 2 0 0 1 2 2v7.5\",\n key: \"svg-0\"\n }\n ],\n [\"path\", { d: \"M3 10h18\", key: \"svg-1\" }],\n [\"path\", { d: \"M10 3v18\", key: \"svg-2\" }],\n [\"path\", { d: \"M16 19h6\", key: \"svg-3\" }],\n [\"path\", { d: \"M19 16l3 3l-3 3\", key: \"svg-4\" }]\n]);\n\nexport { IconTableExport as default };\n//# sourceMappingURL=IconTableExport.js.map\n"],"names":[],"mappings":";;AAAA;AACA;AACA;AACA;AAEA;AACG,IAAC,eAAe,GAAG,oBAAoB,CAAC,cAAc,EAAE,iBAAiB,EAAE;AAC9E,EAAE;AACF,IAAI,MAAM;AACV,IAAI;AACJ,MAAM,CAAC,EAAE,uEAAuE;AAChF,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,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,iBAAiB,EAAE,GAAG,EAAE,OAAO,EAAE,CAAC;AAClD,CAAC;;;;","x_google_ignoreList":[0]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"IconTrash.mjs","sources":["../../../../../../../../../../node_modules/@tabler/icons-react/dist/esm/icons/IconTrash.js"],"sourcesContent":["/**\n * @tabler/icons-react v2.
|
|
1
|
+
{"version":3,"file":"IconTrash.mjs","sources":["../../../../../../../../../../node_modules/@tabler/icons-react/dist/esm/icons/IconTrash.js"],"sourcesContent":["/**\n * @tabler/icons-react v2.22.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;AACA;AAEA;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":["../../../../../../../../../../node_modules/@tabler/icons-react/dist/esm/icons/IconX.js"],"sourcesContent":["/**\n * @tabler/icons-react v2.
|
|
1
|
+
{"version":3,"file":"IconX.mjs","sources":["../../../../../../../../../../node_modules/@tabler/icons-react/dist/esm/icons/IconX.js"],"sourcesContent":["/**\n * @tabler/icons-react v2.22.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;AACA;AAEA;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]}
|
|
@@ -6,6 +6,7 @@ import { useMedplum } from '../MedplumProvider/MedplumProvider.mjs';
|
|
|
6
6
|
* React Hook to use a FHIR reference.
|
|
7
7
|
* Handles the complexity of resolving references and caching resources.
|
|
8
8
|
* @param value The resource or reference to resource.
|
|
9
|
+
* @param setOutcome Optional callback to set the OperationOutcome.
|
|
9
10
|
* @returns The resolved resource.
|
|
10
11
|
*/
|
|
11
12
|
function useResource(value, setOutcome) {
|
|
@@ -1 +1 @@
|
|
|
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
|
|
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 * @param setOutcome Optional callback to set the OperationOutcome.\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;;;;;;AAMG;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;;;;"}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Dynamically creates a script tag for the specified JavaScript file.
|
|
3
3
|
* @param src The JavaScript file URL.
|
|
4
|
+
* @param onload Optional callback for the onload event.
|
|
4
5
|
*/
|
|
5
6
|
function createScriptTag(src, onload) {
|
|
6
7
|
const head = document.getElementsByTagName('head')[0];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"script.mjs","sources":["../../../src/utils/script.ts"],"sourcesContent":["/**\n * Dynamically creates a script tag for the specified JavaScript file.\n * @param src The JavaScript file URL.\n */\nexport function createScriptTag(src: string, onload?: () => void): void {\n const head = document.getElementsByTagName('head')[0];\n const script = document.createElement('script');\n script.async = true;\n script.src = src;\n script.onload = onload || null;\n head.appendChild(script);\n}\n"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"script.mjs","sources":["../../../src/utils/script.ts"],"sourcesContent":["/**\n * Dynamically creates a script tag for the specified JavaScript file.\n * @param src The JavaScript file URL.\n * @param onload Optional callback for the onload event.\n */\nexport function createScriptTag(src: string, onload?: () => void): void {\n const head = document.getElementsByTagName('head')[0];\n const script = document.createElement('script');\n script.async = true;\n script.src = src;\n script.onload = onload || null;\n head.appendChild(script);\n}\n"],"names":[],"mappings":"AAAA;;;;AAIG;AACa,SAAA,eAAe,CAAC,GAAW,EAAE,MAAmB,EAAA;IAC9D,MAAM,IAAI,GAAG,QAAQ,CAAC,oBAAoB,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC;IACtD,MAAM,MAAM,GAAG,QAAQ,CAAC,aAAa,CAAC,QAAQ,CAAC,CAAC;AAChD,IAAA,MAAM,CAAC,KAAK,GAAG,IAAI,CAAC;AACpB,IAAA,MAAM,CAAC,GAAG,GAAG,GAAG,CAAC;AACjB,IAAA,MAAM,CAAC,MAAM,GAAG,MAAM,IAAI,IAAI,CAAC;AAC/B,IAAA,IAAI,CAAC,WAAW,CAAC,MAAM,CAAC,CAAC;AAC3B;;;;"}
|
|
@@ -23,6 +23,8 @@ export interface SmartSearchResponse {
|
|
|
23
23
|
}
|
|
24
24
|
/**
|
|
25
25
|
* The FhirPathTable component represents the embeddable search table control.
|
|
26
|
+
* @param props FhirPathTable React props.
|
|
27
|
+
* @returns FhirPathTable React node.
|
|
26
28
|
*/
|
|
27
29
|
export declare function FhirPathTable(props: FhirPathTableProps): JSX.Element;
|
|
28
30
|
export declare const MemoizedFhirPathTable: React.MemoExoticComponent<typeof FhirPathTable>;
|
|
@@ -18,15 +18,19 @@ export interface MedplumContext {
|
|
|
18
18
|
* Medplum context includes:
|
|
19
19
|
* 1) medplum - Medplum client library
|
|
20
20
|
* 2) profile - The current user profile (if signed in)
|
|
21
|
+
* @param props The MedplumProvider React props.
|
|
22
|
+
* @returns The MedplumProvider React node.
|
|
21
23
|
*/
|
|
22
24
|
export declare function MedplumProvider(props: MedplumProviderProps): JSX.Element;
|
|
23
25
|
/**
|
|
24
26
|
* Returns the MedplumContext instance.
|
|
27
|
+
* @returns The MedplumContext instance.
|
|
25
28
|
*/
|
|
26
29
|
export declare function useMedplumContext(): MedplumContext;
|
|
27
30
|
/**
|
|
28
31
|
* Returns the MedplumClient instance.
|
|
29
32
|
* This is a shortcut for useMedplumContext().medplum.
|
|
33
|
+
* @returns The MedplumClient instance.
|
|
30
34
|
*/
|
|
31
35
|
export declare function useMedplum(): MedplumClient;
|
|
32
36
|
/**
|
|
@@ -5,9 +5,4 @@ export interface ResourceNameProps extends TextProps {
|
|
|
5
5
|
value?: Reference | Resource;
|
|
6
6
|
link?: boolean;
|
|
7
7
|
}
|
|
8
|
-
/**
|
|
9
|
-
* Renders the name of a resource, given either the resource itself or a reference to the resource.
|
|
10
|
-
* @param props
|
|
11
|
-
* @returns
|
|
12
|
-
*/
|
|
13
8
|
export declare function ResourceName(props: ResourceNameProps): JSX.Element | null;
|
|
@@ -11,7 +11,9 @@ export interface ResourcePropertyDisplayProps {
|
|
|
11
11
|
link?: boolean;
|
|
12
12
|
}
|
|
13
13
|
/**
|
|
14
|
-
* Low-level component that renders a property from a given resource, given type information
|
|
14
|
+
* Low-level component that renders a property from a given resource, given type information.
|
|
15
|
+
* @param props The ResourcePropertyDisplay React props.
|
|
16
|
+
* @returns The ResourcePropertyDisplay React node.
|
|
15
17
|
*/
|
|
16
18
|
export declare function ResourcePropertyDisplay(props: ResourcePropertyDisplayProps): JSX.Element;
|
|
17
19
|
/**
|
|
@@ -21,7 +23,7 @@ export declare function ResourcePropertyDisplay(props: ResourcePropertyDisplayPr
|
|
|
21
23
|
* According to the spec, there can only be one property for a given element definition.
|
|
22
24
|
* This function returns the value and the type.
|
|
23
25
|
* @param context The base context (usually a FHIR resource).
|
|
24
|
-
* @param
|
|
26
|
+
* @param path The property path.
|
|
25
27
|
* @returns The value of the property and the property type.
|
|
26
28
|
*/
|
|
27
29
|
export declare function getValueAndType(context: TypedValue, path: string): [any, PropertyType];
|
|
@@ -36,6 +36,8 @@ export interface SearchControlProps {
|
|
|
36
36
|
* The SearchControl component represents the embeddable search table control.
|
|
37
37
|
* It includes the table, rows, headers, sorting, etc.
|
|
38
38
|
* It does not include the field editor, filter editor, pagination buttons.
|
|
39
|
+
* @param props The SearchControl React props.
|
|
40
|
+
* @returns The SearchControl React node.
|
|
39
41
|
*/
|
|
40
42
|
export declare function SearchControl(props: SearchControlProps): JSX.Element;
|
|
41
43
|
export declare const MemoizedSearchControl: React.MemoExoticComponent<typeof SearchControl>;
|