@medplum/react 0.9.25 → 0.9.28
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.js +282 -152
- package/dist/cjs/index.js.map +1 -1
- package/dist/cjs/index.min.js +1 -1
- package/dist/cjs/index.min.js.map +1 -1
- package/dist/cjs/styles.css +83 -79
- package/dist/{types → esm}/AddressDisplay.d.ts +0 -0
- package/dist/esm/AddressDisplay.js +13 -0
- package/dist/esm/AddressDisplay.js.map +1 -0
- package/dist/{types → esm}/AddressInput.d.ts +0 -0
- package/dist/esm/AddressInput.js +69 -0
- package/dist/esm/AddressInput.js.map +1 -0
- package/dist/{types → esm}/AnnotationInput.d.ts +0 -0
- package/dist/esm/AnnotationInput.js +28 -0
- package/dist/esm/AnnotationInput.js.map +1 -0
- package/dist/{types → esm}/AttachmentArrayDisplay.d.ts +0 -0
- package/dist/esm/AttachmentArrayDisplay.js +11 -0
- package/dist/esm/AttachmentArrayDisplay.js.map +1 -0
- package/dist/{types → esm}/AttachmentArrayInput.d.ts +0 -0
- package/dist/esm/AttachmentArrayInput.js +42 -0
- package/dist/esm/AttachmentArrayInput.js.map +1 -0
- package/dist/{types → esm}/AttachmentDisplay.d.ts +0 -0
- package/dist/esm/AttachmentDisplay.js +20 -0
- package/dist/esm/AttachmentDisplay.js.map +1 -0
- package/dist/{types → esm}/AttachmentInput.d.ts +0 -0
- package/dist/esm/AttachmentInput.js +27 -0
- package/dist/esm/AttachmentInput.js.map +1 -0
- package/dist/{types → esm}/Autocomplete.d.ts +1 -0
- package/dist/esm/Autocomplete.js +280 -0
- package/dist/esm/Autocomplete.js.map +1 -0
- package/dist/{types → esm}/Avatar.d.ts +0 -0
- package/dist/esm/Avatar.js +24 -0
- package/dist/esm/Avatar.js.map +1 -0
- package/dist/{types → esm}/BackboneElementDisplay.d.ts +0 -0
- package/dist/esm/BackboneElementDisplay.js +43 -0
- package/dist/esm/BackboneElementDisplay.js.map +1 -0
- package/dist/{types → esm}/BackboneElementInput.d.ts +0 -0
- package/dist/esm/BackboneElementInput.js +51 -0
- package/dist/esm/BackboneElementInput.js.map +1 -0
- package/dist/{types → esm}/Button.d.ts +0 -0
- package/dist/esm/Button.js +13 -0
- package/dist/esm/Button.js.map +1 -0
- package/dist/{types → esm}/CalendarInput.d.ts +0 -0
- package/dist/esm/CalendarInput.js +96 -0
- package/dist/esm/CalendarInput.js.map +1 -0
- package/dist/{types → esm}/Checkbox.d.ts +0 -0
- package/dist/esm/Checkbox.js +13 -0
- package/dist/esm/Checkbox.js.map +1 -0
- package/dist/{types → esm}/CheckboxFormSection.d.ts +0 -0
- package/dist/esm/CheckboxFormSection.js +12 -0
- package/dist/esm/CheckboxFormSection.js.map +1 -0
- package/dist/{types → esm}/CodeInput.d.ts +0 -0
- package/dist/esm/CodeInput.js +28 -0
- package/dist/esm/CodeInput.js.map +1 -0
- package/dist/{types → esm}/CodeableConceptDisplay.d.ts +0 -0
- package/dist/esm/CodeableConceptDisplay.js +21 -0
- package/dist/esm/CodeableConceptDisplay.js.map +1 -0
- package/dist/{types → esm}/CodeableConceptInput.d.ts +0 -0
- package/dist/esm/CodeableConceptInput.js +52 -0
- package/dist/esm/CodeableConceptInput.js.map +1 -0
- package/dist/{types → esm}/CodingDisplay.d.ts +0 -0
- package/dist/esm/CodingDisplay.js +9 -0
- package/dist/esm/CodingDisplay.js.map +1 -0
- package/dist/{types → esm}/CodingInput.d.ts +0 -0
- package/dist/esm/CodingInput.js +30 -0
- package/dist/esm/CodingInput.js.map +1 -0
- package/dist/{types → esm}/ContactDetailDisplay.d.ts +0 -0
- package/dist/esm/ContactDetailDisplay.js +17 -0
- package/dist/esm/ContactDetailDisplay.js.map +1 -0
- package/dist/{types → esm}/ContactDetailInput.d.ts +0 -0
- package/dist/esm/ContactDetailInput.js +37 -0
- package/dist/esm/ContactDetailInput.js.map +1 -0
- package/dist/{types → esm}/ContactPointDisplay.d.ts +0 -0
- package/dist/esm/ContactPointDisplay.js +29 -0
- package/dist/esm/ContactPointDisplay.js.map +1 -0
- package/dist/{types → esm}/ContactPointInput.d.ts +0 -0
- package/dist/esm/ContactPointInput.js +60 -0
- package/dist/esm/ContactPointInput.js.map +1 -0
- package/dist/{types → esm}/DateTimeInput.d.ts +0 -0
- package/dist/esm/DateTimeInput.js +60 -0
- package/dist/esm/DateTimeInput.js.map +1 -0
- package/dist/{types → esm}/DefaultResourceTimeline.d.ts +0 -0
- package/dist/esm/DefaultResourceTimeline.js +27 -0
- package/dist/esm/DefaultResourceTimeline.js.map +1 -0
- package/dist/{types → esm}/DescriptionList.d.ts +0 -0
- package/dist/esm/DescriptionList.js +13 -0
- package/dist/esm/DescriptionList.js.map +1 -0
- package/dist/{types → esm}/DiagnosticReportDisplay.d.ts +0 -0
- package/dist/esm/DiagnosticReportDisplay.js +101 -0
- package/dist/esm/DiagnosticReportDisplay.js.map +1 -0
- package/dist/{types → esm}/Dialog.d.ts +0 -0
- package/dist/esm/Dialog.js +43 -0
- package/dist/esm/Dialog.js.map +1 -0
- package/dist/{types → esm}/Document.d.ts +0 -0
- package/dist/esm/Document.js +9 -0
- package/dist/esm/Document.js.map +1 -0
- package/dist/{types → esm}/EncounterTimeline.d.ts +0 -0
- package/dist/esm/EncounterTimeline.js +47 -0
- package/dist/esm/EncounterTimeline.js.map +1 -0
- package/dist/{types → esm}/ErrorBoundary.d.ts +0 -0
- package/dist/esm/ErrorBoundary.js +27 -0
- package/dist/esm/ErrorBoundary.js.map +1 -0
- package/dist/{types → esm}/ExtensionInput.d.ts +0 -0
- package/dist/esm/ExtensionInput.js +14 -0
- package/dist/esm/ExtensionInput.js.map +1 -0
- package/dist/{types → esm}/FhirPathDisplay.d.ts +0 -0
- package/dist/esm/FhirPathDisplay.js +23 -0
- package/dist/esm/FhirPathDisplay.js.map +1 -0
- package/dist/{types → esm}/FhirPathTable.d.ts +0 -0
- package/dist/esm/FhirPathTable.js +117 -0
- package/dist/esm/FhirPathTable.js.map +1 -0
- package/dist/{types → esm}/FooterLinks.d.ts +0 -0
- package/dist/esm/FooterLinks.js +8 -0
- package/dist/esm/FooterLinks.js.map +1 -0
- package/dist/{types → esm}/Form.d.ts +0 -0
- package/dist/esm/Form.js +15 -0
- package/dist/esm/Form.js.map +1 -0
- package/dist/{types → esm}/FormSection.d.ts +0 -0
- package/dist/esm/FormSection.js +18 -0
- package/dist/esm/FormSection.js.map +1 -0
- package/dist/{types → esm}/FormUtils.d.ts +0 -0
- package/dist/esm/FormUtils.js +49 -0
- package/dist/esm/FormUtils.js.map +1 -0
- package/dist/{types → esm}/GoogleButton.d.ts +0 -0
- package/dist/esm/GoogleButton.js +48 -0
- package/dist/esm/GoogleButton.js.map +1 -0
- package/dist/{types → esm}/Header.d.ts +0 -0
- package/dist/esm/Header.js +95 -0
- package/dist/esm/Header.js.map +1 -0
- package/dist/{types → esm}/HeaderSearchInput.d.ts +0 -0
- package/dist/esm/HeaderSearchInput.js +181 -0
- package/dist/esm/HeaderSearchInput.js.map +1 -0
- package/dist/{types → esm}/HumanNameDisplay.d.ts +0 -0
- package/dist/esm/HumanNameDisplay.js +13 -0
- package/dist/esm/HumanNameDisplay.js.map +1 -0
- package/dist/{types → esm}/HumanNameInput.d.ts +0 -0
- package/dist/esm/HumanNameInput.js +49 -0
- package/dist/esm/HumanNameInput.js.map +1 -0
- package/dist/{types → esm}/IdentifierDisplay.d.ts +0 -0
- package/dist/esm/IdentifierDisplay.js +12 -0
- package/dist/esm/IdentifierDisplay.js.map +1 -0
- package/dist/{types → esm}/IdentifierInput.d.ts +0 -0
- package/dist/esm/IdentifierInput.js +19 -0
- package/dist/esm/IdentifierInput.js.map +1 -0
- package/dist/{types → esm}/Input.d.ts +0 -0
- package/dist/esm/Input.js +26 -0
- package/dist/esm/Input.js.map +1 -0
- package/dist/{types → esm}/InputRow.d.ts +0 -0
- package/dist/esm/InputRow.js +8 -0
- package/dist/esm/InputRow.js.map +1 -0
- package/dist/{types → esm}/Loading.d.ts +0 -0
- package/dist/esm/Loading.js +11 -0
- package/dist/esm/Loading.js.map +1 -0
- package/dist/{types → esm}/Logo.d.ts +0 -0
- package/dist/esm/Logo.js +14 -0
- package/dist/esm/Logo.js.map +1 -0
- package/dist/{types → esm}/MedplumLink.d.ts +0 -0
- package/dist/esm/MedplumLink.js +34 -0
- package/dist/esm/MedplumLink.js.map +1 -0
- package/dist/{types → esm}/MedplumProvider.d.ts +0 -0
- package/dist/esm/MedplumProvider.js +50 -0
- package/dist/esm/MedplumProvider.js.map +1 -0
- package/dist/{types → esm}/MenuItem.d.ts +0 -0
- package/dist/esm/MenuItem.js +8 -0
- package/dist/esm/MenuItem.js.map +1 -0
- package/dist/{types → esm}/MenuSeparator.d.ts +0 -0
- package/dist/esm/MenuSeparator.js +8 -0
- package/dist/esm/MenuSeparator.js.map +1 -0
- package/dist/{types → esm}/PatientTimeline.d.ts +0 -0
- package/dist/esm/PatientTimeline.js +40 -0
- package/dist/esm/PatientTimeline.js.map +1 -0
- package/dist/{types → esm}/PeriodInput.d.ts +0 -0
- package/dist/esm/PeriodInput.js +19 -0
- package/dist/esm/PeriodInput.js.map +1 -0
- package/dist/{types → esm}/PlanDefinitionBuilder.d.ts +0 -0
- package/dist/esm/PlanDefinitionBuilder.js +224 -0
- package/dist/esm/PlanDefinitionBuilder.js.map +1 -0
- package/dist/{types → esm}/Popup.d.ts +0 -0
- package/dist/esm/Popup.js +64 -0
- package/dist/esm/Popup.js.map +1 -0
- package/dist/{types → esm}/QuantityDisplay.d.ts +0 -0
- package/dist/esm/QuantityDisplay.js +28 -0
- package/dist/esm/QuantityDisplay.js.map +1 -0
- package/dist/{types → esm}/QuantityInput.d.ts +0 -0
- package/dist/esm/QuantityInput.js +33 -0
- package/dist/esm/QuantityInput.js.map +1 -0
- package/dist/{types → esm}/QuestionnaireBuilder.d.ts +0 -0
- package/dist/esm/QuestionnaireBuilder.js +217 -0
- package/dist/esm/QuestionnaireBuilder.js.map +1 -0
- package/dist/{types → esm}/QuestionnaireForm.d.ts +0 -0
- package/dist/esm/QuestionnaireForm.js +218 -0
- package/dist/esm/QuestionnaireForm.js.map +1 -0
- package/dist/{types → esm}/QuestionnaireUtils.d.ts +0 -0
- package/dist/esm/QuestionnaireUtils.js +103 -0
- package/dist/esm/QuestionnaireUtils.js.map +1 -0
- package/dist/{types → esm}/RangeDisplay.d.ts +0 -0
- package/dist/esm/RangeDisplay.js +21 -0
- package/dist/esm/RangeDisplay.js.map +1 -0
- package/dist/{types → esm}/RangeInput.d.ts +0 -0
- package/dist/esm/RangeInput.js +25 -0
- package/dist/esm/RangeInput.js.map +1 -0
- package/dist/{types → esm}/RatioDisplay.d.ts +0 -0
- package/dist/esm/RatioDisplay.js +16 -0
- package/dist/esm/RatioDisplay.js.map +1 -0
- package/dist/{types → esm}/RatioInput.d.ts +0 -0
- package/dist/esm/RatioInput.js +25 -0
- package/dist/esm/RatioInput.js.map +1 -0
- package/dist/{types → esm}/ReferenceDisplay.d.ts +0 -0
- package/dist/esm/ReferenceDisplay.js +21 -0
- package/dist/esm/ReferenceDisplay.js.map +1 -0
- package/dist/{types → esm}/ReferenceInput.d.ts +0 -0
- package/dist/esm/ReferenceInput.js +42 -0
- package/dist/esm/ReferenceInput.js.map +1 -0
- package/dist/{types → esm}/RegisterForm.d.ts +0 -0
- package/dist/esm/RegisterForm.js +121 -0
- package/dist/esm/RegisterForm.js.map +1 -0
- package/dist/{types → esm}/RequestGroupDisplay.d.ts +0 -0
- package/dist/esm/RequestGroupDisplay.js +72 -0
- package/dist/esm/RequestGroupDisplay.js.map +1 -0
- package/dist/{types → esm}/ResourceArrayDisplay.d.ts +0 -0
- package/dist/esm/ResourceArrayDisplay.js +14 -0
- package/dist/esm/ResourceArrayDisplay.js.map +1 -0
- package/dist/{types → esm}/ResourceArrayInput.d.ts +0 -0
- package/dist/esm/ResourceArrayInput.js +47 -0
- package/dist/esm/ResourceArrayInput.js.map +1 -0
- package/dist/{types → esm}/ResourceBadge.d.ts +0 -0
- package/dist/esm/ResourceBadge.js +13 -0
- package/dist/esm/ResourceBadge.js.map +1 -0
- package/dist/{types → esm}/ResourceBlame.d.ts +0 -0
- package/dist/esm/ResourceBlame.js +65 -0
- package/dist/esm/ResourceBlame.js.map +1 -0
- package/dist/{types → esm}/ResourceDiff.d.ts +0 -0
- package/dist/esm/ResourceDiff.js +28 -0
- package/dist/esm/ResourceDiff.js.map +1 -0
- package/dist/{types → esm}/ResourceDiffTable.d.ts +0 -0
- package/dist/esm/ResourceDiffTable.js +58 -0
- package/dist/esm/ResourceDiffTable.js.map +1 -0
- package/dist/{types → esm}/ResourceForm.d.ts +0 -0
- package/dist/esm/ResourceForm.js +55 -0
- package/dist/esm/ResourceForm.js.map +1 -0
- package/dist/{types → esm}/ResourceHistoryTable.d.ts +0 -0
- package/dist/esm/ResourceHistoryTable.js +45 -0
- package/dist/esm/ResourceHistoryTable.js.map +1 -0
- package/dist/{types → esm}/ResourceInput.d.ts +1 -0
- package/dist/esm/ResourceInput.js +41 -0
- package/dist/esm/ResourceInput.js.map +1 -0
- package/dist/{types → esm}/ResourceName.d.ts +0 -0
- package/dist/esm/ResourceName.js +16 -0
- package/dist/esm/ResourceName.js.map +1 -0
- package/dist/{types → esm}/ResourcePropertyDisplay.d.ts +0 -0
- package/dist/esm/ResourcePropertyDisplay.js +107 -0
- package/dist/esm/ResourcePropertyDisplay.js.map +1 -0
- package/dist/{types → esm}/ResourcePropertyInput.d.ts +0 -0
- package/dist/esm/ResourcePropertyInput.js +154 -0
- package/dist/esm/ResourcePropertyInput.js.map +1 -0
- package/dist/{types → esm}/ResourceTable.d.ts +0 -0
- package/dist/esm/ResourceTable.js +22 -0
- package/dist/esm/ResourceTable.js.map +1 -0
- package/dist/{types → esm}/ResourceTimeline.d.ts +0 -0
- package/dist/esm/ResourceTimeline.js +221 -0
- package/dist/esm/ResourceTimeline.js.map +1 -0
- package/dist/{types → esm}/Scheduler.d.ts +0 -0
- package/dist/esm/Scheduler.js +82 -0
- package/dist/esm/Scheduler.js.map +1 -0
- package/dist/{types → esm}/Scrollable.d.ts +0 -0
- package/dist/esm/Scrollable.js +12 -0
- package/dist/esm/Scrollable.js.map +1 -0
- package/dist/{types → esm}/SearchControl.d.ts +0 -0
- package/dist/esm/SearchControl.js +268 -0
- package/dist/esm/SearchControl.js.map +1 -0
- package/dist/{types → esm}/SearchControlField.d.ts +0 -0
- package/dist/esm/SearchControlField.js +98 -0
- package/dist/esm/SearchControlField.js.map +1 -0
- package/dist/{types → esm}/SearchFieldEditor.d.ts +0 -0
- package/dist/esm/SearchFieldEditor.js +192 -0
- package/dist/esm/SearchFieldEditor.js.map +1 -0
- package/dist/{types → esm}/SearchFilterEditor.d.ts +0 -0
- package/dist/esm/SearchFilterEditor.js +103 -0
- package/dist/esm/SearchFilterEditor.js.map +1 -0
- package/dist/{types → esm}/SearchFilterValueDialog.d.ts +0 -0
- package/dist/esm/SearchFilterValueDialog.js +22 -0
- package/dist/esm/SearchFilterValueDialog.js.map +1 -0
- package/dist/{types → esm}/SearchFilterValueDisplay.d.ts +0 -0
- package/dist/esm/SearchFilterValueDisplay.js +22 -0
- package/dist/esm/SearchFilterValueDisplay.js.map +1 -0
- package/dist/{types → esm}/SearchFilterValueInput.d.ts +0 -0
- package/dist/esm/SearchFilterValueInput.js +59 -0
- package/dist/esm/SearchFilterValueInput.js.map +1 -0
- package/dist/{types → esm}/SearchPopupMenu.d.ts +0 -0
- package/dist/esm/SearchPopupMenu.js +135 -0
- package/dist/esm/SearchPopupMenu.js.map +1 -0
- package/dist/{types → esm}/SearchUtils.d.ts +0 -0
- package/dist/esm/SearchUtils.js +487 -0
- package/dist/esm/SearchUtils.js.map +1 -0
- package/dist/{types → esm}/Select.d.ts +0 -0
- package/dist/esm/Select.js +16 -0
- package/dist/esm/Select.js.map +1 -0
- package/dist/{types → esm}/ServiceRequestTimeline.d.ts +0 -0
- package/dist/esm/ServiceRequestTimeline.js +53 -0
- package/dist/esm/ServiceRequestTimeline.js.map +1 -0
- package/dist/{types → esm}/SignInForm.d.ts +0 -0
- package/dist/esm/SignInForm.js +130 -0
- package/dist/esm/SignInForm.js.map +1 -0
- package/dist/{types → esm}/StatusBadge.d.ts +0 -0
- package/dist/esm/StatusBadge.js +8 -0
- package/dist/esm/StatusBadge.js.map +1 -0
- package/dist/{types → esm}/SubMenu.d.ts +0 -0
- package/dist/esm/SubMenu.js +38 -0
- package/dist/esm/SubMenu.js.map +1 -0
- package/dist/{types → esm}/Tab.d.ts +0 -0
- package/dist/esm/Tab.js +19 -0
- package/dist/esm/Tab.js.map +1 -0
- package/dist/{types → esm}/TabList.d.ts +0 -0
- package/dist/esm/TabList.js +23 -0
- package/dist/esm/TabList.js.map +1 -0
- package/dist/{types → esm}/TabPanel.d.ts +0 -0
- package/dist/esm/TabPanel.js +8 -0
- package/dist/esm/TabPanel.js.map +1 -0
- package/dist/{types → esm}/TabSwitch.d.ts +0 -0
- package/dist/esm/TabSwitch.js +16 -0
- package/dist/esm/TabSwitch.js.map +1 -0
- package/dist/{types → esm}/TextArea.d.ts +0 -0
- package/dist/esm/TextArea.js +16 -0
- package/dist/esm/TextArea.js.map +1 -0
- package/dist/{types → esm}/Timeline.d.ts +0 -0
- package/dist/esm/Timeline.js +48 -0
- package/dist/esm/Timeline.js.map +1 -0
- package/dist/esm/TimingInput.d.ts +8 -0
- package/dist/esm/TimingInput.js +90 -0
- package/dist/esm/TimingInput.js.map +1 -0
- package/dist/{types → esm}/TitleBar.d.ts +0 -0
- package/dist/esm/TitleBar.js +8 -0
- package/dist/esm/TitleBar.js.map +1 -0
- package/dist/{types → esm}/UploadButton.d.ts +0 -0
- package/dist/esm/UploadButton.js +55 -0
- package/dist/esm/UploadButton.js.map +1 -0
- package/dist/{types → esm}/constants.d.ts +0 -0
- package/dist/esm/constants.js +12 -0
- package/dist/esm/constants.js.map +1 -0
- package/dist/{types → esm}/index.d.ts +0 -1
- package/dist/esm/index.js +86 -5814
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/index.min.js +1 -1
- package/dist/esm/index.min.js.map +1 -1
- package/dist/esm/node_modules/tslib/tslib.es6.js +27 -0
- package/dist/esm/node_modules/tslib/tslib.es6.js.map +1 -0
- package/dist/{types → esm}/stories/AddressInput.stories.d.ts +0 -0
- package/dist/{types → esm}/stories/AttachmentArrayInput.stories.d.ts +0 -0
- package/dist/{types → esm}/stories/AttachmentInput.stories.d.ts +0 -0
- package/dist/{types → esm}/stories/Autocomplete.stories.d.ts +1 -0
- package/dist/{types → esm}/stories/Avatar.stories.d.ts +0 -0
- package/dist/{types → esm}/stories/Button.stories.d.ts +0 -0
- package/dist/esm/stories/CodeableConceptDisplay.stories.d.ts +8 -0
- package/dist/{types → esm}/stories/DiagnosticReportDisplay.stories.d.ts +0 -0
- package/dist/{types → esm}/stories/Dialog.stories.d.ts +0 -0
- package/dist/{types → esm}/stories/EncounterTimeline.stories.d.ts +0 -0
- package/dist/{types → esm}/stories/FhirPathDisplay.stories.d.ts +0 -0
- package/dist/{types → esm}/stories/FormSection.stories.d.ts +0 -0
- package/dist/{types → esm}/stories/Header.stories.d.ts +0 -0
- package/dist/{types → esm}/stories/Input.stories.d.ts +0 -0
- package/dist/{types → esm}/stories/Loading.stories.d.ts +0 -0
- package/dist/{types → esm}/stories/Logo.stories.d.ts +0 -0
- package/dist/{types → esm}/stories/PatientTimeline.stories.d.ts +0 -0
- package/dist/{types → esm}/stories/PlanDefinitionBuilder.stories.d.ts +0 -0
- package/dist/{types → esm}/stories/QuestionnaireBuilder.stories.d.ts +0 -0
- package/dist/{types → esm}/stories/QuestionnaireForm.stories.d.ts +0 -0
- package/dist/{types → esm}/stories/ReferenceInput.stories.d.ts +0 -0
- package/dist/{types → esm}/stories/RegisterForm.stories.d.ts +0 -0
- package/dist/{types → esm}/stories/RequestGroupDisplay.stories.d.ts +0 -0
- package/dist/{types → esm}/stories/ResourceBlame.stories.d.ts +0 -0
- package/dist/{types → esm}/stories/ResourceForm.stories.d.ts +0 -0
- package/dist/{types → esm}/stories/ResourceHistoryTable.stories.d.ts +0 -0
- package/dist/{types → esm}/stories/ResourceTable.stories.d.ts +0 -0
- package/dist/{types → esm}/stories/Scheduler.stories.d.ts +0 -0
- package/dist/{types → esm}/stories/SearchControl.stories.d.ts +0 -0
- package/dist/{types → esm}/stories/Select.stories.d.ts +0 -0
- package/dist/{types → esm}/stories/SignInForm.stories.d.ts +0 -0
- package/dist/{types → esm}/stories/StatusBadge.stories.d.ts +0 -0
- package/dist/{types → esm}/stories/Tabs.stories.d.ts +0 -0
- package/dist/{types → esm}/stories/Timeline.stories.d.ts +0 -0
- package/dist/esm/stories/TimingInput.stories.d.ts +6 -0
- package/dist/{types → esm}/stories/UploadButton.stories.d.ts +0 -0
- package/dist/esm/styles.css +83 -79
- package/dist/{types → esm}/test.setup.d.ts +0 -0
- package/dist/{types → esm}/useResource.d.ts +0 -0
- package/dist/esm/useResource.js +65 -0
- package/dist/esm/useResource.js.map +1 -0
- package/dist/{types → esm}/utils/blame.d.ts +0 -0
- package/dist/esm/utils/blame.js +74 -0
- package/dist/esm/utils/blame.js.map +1 -0
- package/dist/{types → esm}/utils/date.d.ts +0 -0
- package/dist/esm/utils/date.js +48 -0
- package/dist/esm/utils/date.js.map +1 -0
- package/dist/{types → esm}/utils/diff.d.ts +0 -0
- package/dist/esm/utils/diff.js +118 -0
- package/dist/esm/utils/diff.js.map +1 -0
- package/dist/{types → esm}/utils/dom.d.ts +0 -0
- package/dist/esm/utils/dom.js +34 -0
- package/dist/esm/utils/dom.js.map +1 -0
- package/dist/{types → esm}/utils/outcomes.d.ts +0 -0
- package/dist/esm/utils/outcomes.js +7 -0
- package/dist/esm/utils/outcomes.js.map +1 -0
- package/dist/{types → esm}/utils/recaptcha.d.ts +0 -0
- package/dist/esm/utils/recaptcha.js +27 -0
- package/dist/esm/utils/recaptcha.js.map +1 -0
- package/dist/{types → esm}/utils.d.ts +0 -0
- package/dist/esm/utils.js +15 -0
- package/dist/esm/utils.js.map +1 -0
- package/package.json +7 -7
- package/stats.html +4034 -0
- package/dist/types/DateTimeDisplay.d.ts +0 -5
- package/dist/types/PeriodDisplay.d.ts +0 -6
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
|
|
3
|
+
function Checkbox(props) {
|
|
4
|
+
const className = 'medplum-checkbox';
|
|
5
|
+
return (React.createElement("input", { id: props.name, name: props.name, className: className, type: "checkbox", value: "true", defaultChecked: !!props.defaultValue, required: props.required, ref: props.inputRef, "data-testid": props.testid, disabled: props.disabled, onChange: (e) => {
|
|
6
|
+
if (props.onChange) {
|
|
7
|
+
props.onChange(e.currentTarget.checked);
|
|
8
|
+
}
|
|
9
|
+
} }));
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
export { Checkbox };
|
|
13
|
+
//# sourceMappingURL=Checkbox.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Checkbox.js","sources":["../../src/Checkbox.tsx"],"sourcesContent":["import React, { RefObject } from 'react';\nimport './Checkbox.css';\n\nexport interface CheckboxProps {\n name?: string;\n defaultValue?: boolean | number;\n required?: boolean;\n inputRef?: RefObject<HTMLInputElement>;\n testid?: string;\n disabled?: boolean;\n onChange?: (newValue: boolean) => void;\n}\n\nexport function Checkbox(props: CheckboxProps): JSX.Element {\n const className = 'medplum-checkbox';\n return (\n <input\n id={props.name}\n name={props.name}\n className={className}\n type=\"checkbox\"\n value=\"true\"\n defaultChecked={!!props.defaultValue}\n required={props.required}\n ref={props.inputRef}\n data-testid={props.testid}\n disabled={props.disabled}\n onChange={(e) => {\n if (props.onChange) {\n props.onChange(e.currentTarget.checked);\n }\n }}\n />\n );\n}\n"],"names":[],"mappings":";;AAaM,SAAU,QAAQ,CAAC,KAAoB,EAAA;IAC3C,MAAM,SAAS,GAAG,kBAAkB,CAAC;AACrC,IAAA,QACE,KAAA,CAAA,aAAA,CAAA,OAAA,EAAA,EACE,EAAE,EAAE,KAAK,CAAC,IAAI,EACd,IAAI,EAAE,KAAK,CAAC,IAAI,EAChB,SAAS,EAAE,SAAS,EACpB,IAAI,EAAC,UAAU,EACf,KAAK,EAAC,MAAM,EACZ,cAAc,EAAE,CAAC,CAAC,KAAK,CAAC,YAAY,EACpC,QAAQ,EAAE,KAAK,CAAC,QAAQ,EACxB,GAAG,EAAE,KAAK,CAAC,QAAQ,EAAA,aAAA,EACN,KAAK,CAAC,MAAM,EACzB,QAAQ,EAAE,KAAK,CAAC,QAAQ,EACxB,QAAQ,EAAE,CAAC,CAAC,KAAI;YACd,IAAI,KAAK,CAAC,QAAQ,EAAE;gBAClB,KAAK,CAAC,QAAQ,CAAC,CAAC,CAAC,aAAa,CAAC,OAAO,CAAC,CAAC;AACzC,aAAA;SACF,EAAA,CACD,EACF;AACJ;;;;"}
|
|
File without changes
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
|
|
3
|
+
function CheckboxFormSection(props) {
|
|
4
|
+
return (React.createElement("div", { className: "medplum-checkbox-form-section" },
|
|
5
|
+
React.createElement("div", { className: "medplum-checkbox-form-section-checkbox-container" }, props.children),
|
|
6
|
+
React.createElement("div", { className: "medplum-checkbox-form-section-details-container" },
|
|
7
|
+
React.createElement("label", { htmlFor: props.htmlFor }, props.title),
|
|
8
|
+
React.createElement("p", null, props.description))));
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
export { CheckboxFormSection };
|
|
12
|
+
//# sourceMappingURL=CheckboxFormSection.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"CheckboxFormSection.js","sources":["../../src/CheckboxFormSection.tsx"],"sourcesContent":["import React from 'react';\nimport './CheckboxFormSection.css';\n\nexport interface CheckboxFormSectionProps {\n htmlFor?: string;\n title?: string;\n description?: string;\n children?: React.ReactNode;\n}\n\nexport function CheckboxFormSection(props: CheckboxFormSectionProps): JSX.Element {\n return (\n <div className=\"medplum-checkbox-form-section\">\n <div className=\"medplum-checkbox-form-section-checkbox-container\">{props.children}</div>\n <div className=\"medplum-checkbox-form-section-details-container\">\n <label htmlFor={props.htmlFor}>{props.title}</label>\n <p>{props.description}</p>\n </div>\n </div>\n );\n}\n"],"names":[],"mappings":";;AAUM,SAAU,mBAAmB,CAAC,KAA+B,EAAA;AACjE,IAAA,QACE,KAAA,CAAA,aAAA,CAAA,KAAA,EAAA,EAAK,SAAS,EAAC,+BAA+B,EAAA;AAC5C,QAAA,KAAA,CAAA,aAAA,CAAA,KAAA,EAAA,EAAK,SAAS,EAAC,kDAAkD,IAAE,KAAK,CAAC,QAAQ,CAAO;QACxF,KAAK,CAAA,aAAA,CAAA,KAAA,EAAA,EAAA,SAAS,EAAC,iDAAiD,EAAA;YAC9D,KAAO,CAAA,aAAA,CAAA,OAAA,EAAA,EAAA,OAAO,EAAE,KAAK,CAAC,OAAO,EAAG,EAAA,KAAK,CAAC,KAAK,CAAS;AACpD,YAAA,KAAA,CAAA,aAAA,CAAA,GAAA,EAAA,IAAA,EAAI,KAAK,CAAC,WAAW,CAAK,CACtB,CACF,EACN;AACJ;;;;"}
|
|
File without changes
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { Autocomplete } from './Autocomplete.js';
|
|
3
|
+
import { useMedplum } from './MedplumProvider.js';
|
|
4
|
+
|
|
5
|
+
const cachedDisplayValues = {};
|
|
6
|
+
function CodeInput(props) {
|
|
7
|
+
const medplum = useMedplum();
|
|
8
|
+
let defaultValue = undefined;
|
|
9
|
+
if (props.defaultValue) {
|
|
10
|
+
defaultValue = [props.defaultValue];
|
|
11
|
+
}
|
|
12
|
+
return (React.createElement(Autocomplete, { loadOptions: (input) => {
|
|
13
|
+
var _a;
|
|
14
|
+
const system = (_a = props.property.binding) === null || _a === void 0 ? void 0 : _a.valueSet;
|
|
15
|
+
return medplum.searchValueSet(system, input).then((valueSet) => {
|
|
16
|
+
const contains = valueSet.expansion.contains;
|
|
17
|
+
contains.forEach((e) => (cachedDisplayValues[e.code] = e.display));
|
|
18
|
+
return contains.map((e) => e.code);
|
|
19
|
+
});
|
|
20
|
+
}, buildUnstructured: (str) => str, getId: (item) => item, getDisplay: (item) => React.createElement(React.Fragment, null, cachedDisplayValues[item] || item), name: props.name, defaultValue: defaultValue, onChange: (values) => {
|
|
21
|
+
if (props.onChange) {
|
|
22
|
+
props.onChange(values[0]);
|
|
23
|
+
}
|
|
24
|
+
} }));
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
export { CodeInput };
|
|
28
|
+
//# sourceMappingURL=CodeInput.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"CodeInput.js","sources":["../../src/CodeInput.tsx"],"sourcesContent":["import { ElementDefinition, ValueSet, ValueSetExpansion, ValueSetExpansionContains } from '@medplum/fhirtypes';\nimport React from 'react';\nimport { Autocomplete } from './Autocomplete';\nimport { useMedplum } from './MedplumProvider';\n\nexport interface CodeInputProps {\n property: ElementDefinition;\n name: string;\n defaultValue?: string;\n onChange?: (value: string) => void;\n}\n\nconst cachedDisplayValues: Record<string, string> = {};\n\nexport function CodeInput(props: CodeInputProps): JSX.Element {\n const medplum = useMedplum();\n\n let defaultValue = undefined;\n if (props.defaultValue) {\n defaultValue = [props.defaultValue];\n }\n\n return (\n <Autocomplete\n loadOptions={(input: string): Promise<string[]> => {\n const system = props.property.binding?.valueSet as string;\n return medplum.searchValueSet(system, input).then((valueSet: ValueSet) => {\n const contains = (valueSet.expansion as ValueSetExpansion).contains as ValueSetExpansionContains[];\n contains.forEach((e) => (cachedDisplayValues[e.code as string] = e.display as string));\n return contains.map((e) => e.code as string);\n });\n }}\n buildUnstructured={(str: string) => str}\n getId={(item: string) => item}\n getDisplay={(item: string) => <>{cachedDisplayValues[item] || item}</>}\n name={props.name}\n defaultValue={defaultValue}\n onChange={(values: string[]) => {\n if (props.onChange) {\n props.onChange(values[0]);\n }\n }}\n />\n );\n}\n"],"names":[],"mappings":";;;;AAYA,MAAM,mBAAmB,GAA2B,EAAE,CAAC;AAEjD,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KAAK,CAAC,QAAQ,EAAE;gBAClB,KAAK,CAAC,QAAQ,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC;AAC3B,aAAA;SACF,EAAA,CACD,EACF;AACJ;;;;"}
|
|
File without changes
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { CodingDisplay } from './CodingDisplay.js';
|
|
3
|
+
|
|
4
|
+
function CodeableConceptDisplay(props) {
|
|
5
|
+
const value = props.value;
|
|
6
|
+
if (!value) {
|
|
7
|
+
return null;
|
|
8
|
+
}
|
|
9
|
+
if (value.text) {
|
|
10
|
+
return React.createElement(React.Fragment, null, value.text);
|
|
11
|
+
}
|
|
12
|
+
if (value.coding) {
|
|
13
|
+
return (React.createElement(React.Fragment, null, value.coding.map((coding, index) => (React.createElement(React.Fragment, { key: 'coding-' + index },
|
|
14
|
+
index > 0 && React.createElement(React.Fragment, null, ', '),
|
|
15
|
+
React.createElement(CodingDisplay, { value: coding }))))));
|
|
16
|
+
}
|
|
17
|
+
return null;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
export { CodeableConceptDisplay };
|
|
21
|
+
//# sourceMappingURL=CodeableConceptDisplay.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"CodeableConceptDisplay.js","sources":["../../src/CodeableConceptDisplay.tsx"],"sourcesContent":["import { CodeableConcept } from '@medplum/fhirtypes';\nimport React from 'react';\nimport { CodingDisplay } from './CodingDisplay';\n\nexport interface CodeableConceptDisplayProps {\n value?: CodeableConcept;\n}\n\nexport function CodeableConceptDisplay(props: CodeableConceptDisplayProps): JSX.Element | null {\n const value = props.value;\n if (!value) {\n return null;\n }\n\n if (value.text) {\n return <>{value.text}</>;\n }\n\n if (value.coding) {\n return (\n <>\n {value.coding.map((coding, index) => (\n <React.Fragment key={'coding-' + index}>\n {index > 0 && <>{', '}</>}\n <CodingDisplay value={coding} />\n </React.Fragment>\n ))}\n </>\n );\n }\n\n return null;\n}\n"],"names":[],"mappings":";;;AAQM,SAAU,sBAAsB,CAAC,KAAkC,EAAA;AACvE,IAAA,MAAM,KAAK,GAAG,KAAK,CAAC,KAAK,CAAC;IAC1B,IAAI,CAAC,KAAK,EAAE;AACV,QAAA,OAAO,IAAI,CAAC;AACb,KAAA;IAED,IAAI,KAAK,CAAC,IAAI,EAAE;AACd,QAAA,OAAO,KAAG,CAAA,aAAA,CAAA,KAAA,CAAA,QAAA,EAAA,IAAA,EAAA,KAAK,CAAC,IAAI,CAAI,CAAC;AAC1B,KAAA;IAED,IAAI,KAAK,CAAC,MAAM,EAAE;QAChB,QACE,KACG,CAAA,aAAA,CAAA,KAAA,CAAA,QAAA,EAAA,IAAA,EAAA,KAAK,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,MAAM,EAAE,KAAK,MAC9B,KAAA,CAAA,aAAA,CAAC,KAAK,CAAC,QAAQ,EAAA,EAAC,GAAG,EAAE,SAAS,GAAG,KAAK,EAAA;AACnC,YAAA,KAAK,GAAG,CAAC,IAAI,KAAA,CAAA,aAAA,CAAA,KAAA,CAAA,QAAA,EAAA,IAAA,EAAG,IAAI,CAAI;YACzB,KAAC,CAAA,aAAA,CAAA,aAAa,EAAC,EAAA,KAAK,EAAE,MAAM,EAAI,CAAA,CACjB,CAClB,CAAC,CACD,EACH;AACH,KAAA;AAED,IAAA,OAAO,IAAI,CAAC;AACd;;;;"}
|
|
File without changes
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import { stringify } from '@medplum/core';
|
|
2
|
+
import React from 'react';
|
|
3
|
+
import { Autocomplete } from './Autocomplete.js';
|
|
4
|
+
import { useMedplum } from './MedplumProvider.js';
|
|
5
|
+
|
|
6
|
+
function CodeableConceptInput(props) {
|
|
7
|
+
const medplum = useMedplum();
|
|
8
|
+
let defaultValue = undefined;
|
|
9
|
+
if (props.defaultValue) {
|
|
10
|
+
defaultValue = [props.defaultValue];
|
|
11
|
+
}
|
|
12
|
+
return (React.createElement(Autocomplete, { loadOptions: (input) => {
|
|
13
|
+
var _a;
|
|
14
|
+
const system = (_a = props.property.binding) === null || _a === void 0 ? void 0 : _a.valueSet;
|
|
15
|
+
return medplum.searchValueSet(system, input).then((valueSet) => {
|
|
16
|
+
return valueSet.expansion.contains.map(valueSetElementToCodeableConcept);
|
|
17
|
+
});
|
|
18
|
+
}, buildUnstructured: buildUnstructured, getId: getId, getDisplay: getDisplay, name: props.name, defaultValue: defaultValue, onChange: (values) => {
|
|
19
|
+
if (props.onChange) {
|
|
20
|
+
props.onChange(values[0]);
|
|
21
|
+
}
|
|
22
|
+
} }));
|
|
23
|
+
}
|
|
24
|
+
function valueSetElementToCodeableConcept(element) {
|
|
25
|
+
return {
|
|
26
|
+
text: element.display,
|
|
27
|
+
coding: [
|
|
28
|
+
{
|
|
29
|
+
system: element.system,
|
|
30
|
+
code: element.code,
|
|
31
|
+
display: element.display,
|
|
32
|
+
},
|
|
33
|
+
],
|
|
34
|
+
};
|
|
35
|
+
}
|
|
36
|
+
function buildUnstructured(str) {
|
|
37
|
+
return { text: str };
|
|
38
|
+
}
|
|
39
|
+
function getId(concept) {
|
|
40
|
+
if (concept.coding && concept.coding.length > 0) {
|
|
41
|
+
return concept.coding[0].code;
|
|
42
|
+
}
|
|
43
|
+
return stringify(concept);
|
|
44
|
+
}
|
|
45
|
+
function getDisplay(concept) {
|
|
46
|
+
var _a, _b, _c, _d, _e, _f;
|
|
47
|
+
const text = (_f = (_c = (_b = (_a = concept.coding) === null || _a === void 0 ? void 0 : _a[0]) === null || _b === void 0 ? void 0 : _b.display) !== null && _c !== void 0 ? _c : (_e = (_d = concept.coding) === null || _d === void 0 ? void 0 : _d[0]) === null || _e === void 0 ? void 0 : _e.code) !== null && _f !== void 0 ? _f : concept.text;
|
|
48
|
+
return React.createElement(React.Fragment, null, text);
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
export { CodeableConceptInput };
|
|
52
|
+
//# sourceMappingURL=CodeableConceptInput.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"CodeableConceptInput.js","sources":["../../src/CodeableConceptInput.tsx"],"sourcesContent":["import { stringify } from '@medplum/core';\nimport {\n CodeableConcept,\n ElementDefinition,\n ValueSet,\n ValueSetExpansion,\n ValueSetExpansionContains,\n} from '@medplum/fhirtypes';\nimport React from 'react';\nimport { Autocomplete } from './Autocomplete';\nimport { useMedplum } from './MedplumProvider';\n\nexport interface CodeableConceptInputProps {\n property: ElementDefinition;\n name: string;\n defaultValue?: CodeableConcept;\n onChange?: (value: CodeableConcept) => void;\n}\n\nexport function CodeableConceptInput(props: CodeableConceptInputProps): JSX.Element {\n const medplum = useMedplum();\n\n let defaultValue = undefined;\n if (props.defaultValue) {\n defaultValue = [props.defaultValue];\n }\n\n return (\n <Autocomplete\n loadOptions={(input: string): Promise<CodeableConcept[]> => {\n const system = props.property.binding?.valueSet as string;\n return medplum.searchValueSet(system, input).then((valueSet: ValueSet) => {\n return ((valueSet.expansion as ValueSetExpansion).contains as ValueSetExpansionContains[]).map(\n valueSetElementToCodeableConcept\n );\n });\n }}\n buildUnstructured={buildUnstructured}\n getId={getId}\n getDisplay={getDisplay}\n name={props.name}\n defaultValue={defaultValue}\n onChange={(values: CodeableConcept[]) => {\n if (props.onChange) {\n props.onChange(values[0]);\n }\n }}\n />\n );\n}\n\nfunction valueSetElementToCodeableConcept(element: ValueSetExpansionContains): CodeableConcept {\n return {\n text: element.display,\n coding: [\n {\n system: element.system,\n code: element.code,\n display: element.display,\n },\n ],\n };\n}\n\nfunction buildUnstructured(str: string): CodeableConcept {\n return { text: str };\n}\n\nfunction getId(concept: CodeableConcept): string {\n if (concept.coding && concept.coding.length > 0) {\n return concept.coding[0].code as string;\n }\n return stringify(concept);\n}\n\nfunction getDisplay(concept: CodeableConcept): JSX.Element {\n const text = concept.coding?.[0]?.display ?? concept.coding?.[0]?.code ?? concept.text;\n return <>{text}</>;\n}\n"],"names":[],"mappings":";;;;;AAmBM,SAAU,oB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es
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
|
|
3
|
+
function CodingDisplay(props) {
|
|
4
|
+
var _a, _b;
|
|
5
|
+
return React.createElement(React.Fragment, null, ((_a = props.value) === null || _a === void 0 ? void 0 : _a.display) || ((_b = props.value) === null || _b === void 0 ? void 0 : _b.code));
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
export { CodingDisplay };
|
|
9
|
+
//# sourceMappingURL=CodingDisplay.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"CodingDisplay.js","sources":["../../src/CodingDisplay.tsx"],"sourcesContent":["import { Coding } from '@medplum/fhirtypes';\nimport React from 'react';\n\nexport interface CodingDisplayProps {\n value?: Coding;\n}\n\nexport function CodingDisplay(props: CodingDisplayProps): JSX.Element {\n return <>{props.value?.display || props.value?.code}</>;\n}\n"],"names":[],"mappings":";;AAOM,SAAU,aAAa,CAAC,KAAyB,EAAA;;AACrD,IAAA,OAAO,0CAAG,CAAA,CAAA,EAAA,GAAA,KAAK,CAAC,KAAK,MAAE,IAAA,IAAA,EAAA,KAAA,KAAA,CAAA,GAAA,KAAA,CAAA,GAAA,EAAA,CAAA,OAAO,MAAI,CAAA,EAAA,GAAA,KAAK,CAAC,KAAK,0CAAE,IAAI,CAAA,CAAI,CAAC;AAC1D;;;;"}
|
|
File without changes
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { Autocomplete } from './Autocomplete.js';
|
|
3
|
+
import { CodingDisplay } from './CodingDisplay.js';
|
|
4
|
+
import { useMedplum } from './MedplumProvider.js';
|
|
5
|
+
|
|
6
|
+
function CodingInput(props) {
|
|
7
|
+
const medplum = useMedplum();
|
|
8
|
+
let defaultValue = undefined;
|
|
9
|
+
if (props.defaultValue) {
|
|
10
|
+
defaultValue = [props.defaultValue];
|
|
11
|
+
}
|
|
12
|
+
return (React.createElement(Autocomplete, { loadOptions: (input) => {
|
|
13
|
+
var _a;
|
|
14
|
+
const system = (_a = props.property.binding) === null || _a === void 0 ? void 0 : _a.valueSet;
|
|
15
|
+
return medplum.searchValueSet(system, input).then((valueSet) => {
|
|
16
|
+
return valueSet.expansion.contains.map((e) => ({
|
|
17
|
+
system: e.system,
|
|
18
|
+
code: e.code,
|
|
19
|
+
display: e.display,
|
|
20
|
+
}));
|
|
21
|
+
});
|
|
22
|
+
}, buildUnstructured: (str) => ({ code: str }), getId: (item) => item.code, getDisplay: (item) => React.createElement(CodingDisplay, { value: item }), name: props.name, defaultValue: defaultValue, onChange: (values) => {
|
|
23
|
+
if (props.onChange) {
|
|
24
|
+
props.onChange(values[0]);
|
|
25
|
+
}
|
|
26
|
+
} }));
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
export { CodingInput };
|
|
30
|
+
//# sourceMappingURL=CodingInput.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"CodingInput.js","sources":["../../src/CodingInput.tsx"],"sourcesContent":["import { Coding, ElementDefinition, ValueSet, ValueSetExpansion, ValueSetExpansionContains } from '@medplum/fhirtypes';\nimport React from 'react';\nimport { Autocomplete } from './Autocomplete';\nimport { CodingDisplay } from './CodingDisplay';\nimport { useMedplum } from './MedplumProvider';\n\nexport interface CodingInputProps {\n property: ElementDefinition;\n name: string;\n defaultValue?: Coding;\n onChange?: (value: Coding) => void;\n}\n\nexport function CodingInput(props: CodingInputProps): JSX.Element {\n const medplum = useMedplum();\n\n let defaultValue = undefined;\n if (props.defaultValue) {\n defaultValue = [props.defaultValue];\n }\n\n return (\n <Autocomplete\n loadOptions={(input: string): Promise<Coding[]> => {\n const system = props.property.binding?.valueSet as string;\n return medplum.searchValueSet(system, input).then((valueSet: ValueSet) => {\n return ((valueSet.expansion as ValueSetExpansion).contains as ValueSetExpansionContains[]).map(\n (e) =>\n ({\n system: e.system,\n code: e.code,\n display: e.display,\n } as Coding)\n );\n });\n }}\n buildUnstructured={(str: string) => ({ code: str })}\n getId={(item: Coding) => item.code as string}\n getDisplay={(item: Coding) => <CodingDisplay value={item} />}\n name={props.name}\n defaultValue={defaultValue}\n onChange={(values: Coding[]) => {\n if (props.onChange) {\n props.onChange(values[0]);\n }\n }}\n />\n );\n}\n"],"names":[],"mappings":";;;;;AAaM,SAAU,WAAW,CAAC,KAAuB,EAAA;AACjD,IAAA,MAAM,OAAO,GAAG,UAAU,EAAE,CAAC;IAE7B,IAAI,YAAY,GAAG,SAAS,CAAC;IAC7B,IAAI,KAAK,CAAC,YAAY,EAAE;AACtB,QAAA,YAAY,GAAG,CAAC,KAAK,CAAC,YAAY,CAAC,CAAC;AACrC,KAAA;IAED,QACE,oBAAC,YAAY,EAAA,EACX,WAAW,EAAE,CAAC,KAAa,KAAuB;;YAChD,MAAM,MAAM,GAAG,CAAA,EAAA,GAAA,KAAK,CAAC,QAAQ,CAAC,OAAO,MAAE,IAAA,IAAA,EAAA,KAAA,KAAA,CAAA,GAAA,KAAA,CAAA,GAAA,EAAA,CAAA,QAAkB,CAAC;AAC1D,YAAA,OAAO,OAAO,CAAC,cAAc,CAAC,MAAM,EAAE,KAAK,CAAC,CAAC,IAAI,CAAC,CAAC,QAAkB,KAAI;AACvE,gBAAA,OAAS,QAAQ,CAAC,SAA+B,CAAC,QAAwC,CAAC,GAAG,CAC5F,CAAC,CAAC,MACC;oBACC,MAAM,EAAE,CAAC,CAAC,MAAM;oBAChB,IAAI,EAAE,CAAC,CAAC,IAAI;oBACZ,OAAO,EAAE,CAAC,CAAC,OAAO;AACR,iBAAA,CAAA,CACf,CAAC;AACJ,aAAC,CAAC,CAAC;SACJ,EACD,iBAAiB,EAAE,CAAC,GAAW,MAAM,EAAE,IAAI,EAAE,GAAG,EAAE,CAAC,EACnD,KAAK,EAAE,CAAC,IAAY,KAAK,IAAI,CAAC,IAAc,EAC5C,UAAU,EAAE,CAAC,IAAY,KAAK,KAAA,CAAA,aAAA,CAAC,aAAa,EAAA,EAAC,KAAK,EAAE,IAAI,EAAA,CAAI,EAC5D,IAAI,EAAE,KAAK,CAAC,IAAI,EAChB,YAAY,EAAE,YAAY,EAC1B,QAAQ,EAAE,CAAC,MAAgB,KAAI;YAC7B,IAAI,KAAK,CAAC,QAAQ,EAAE;gBAClB,KAAK,CAAC,QAAQ,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC;AAC3B,aAAA;SACF,EAAA,CACD,EACF;AACJ;;;;"}
|
|
File without changes
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { ContactPointDisplay } from './ContactPointDisplay.js';
|
|
3
|
+
|
|
4
|
+
function ContactDetailDisplay(props) {
|
|
5
|
+
var _a;
|
|
6
|
+
const contactDetail = props.value;
|
|
7
|
+
if (!contactDetail) {
|
|
8
|
+
return null;
|
|
9
|
+
}
|
|
10
|
+
return (React.createElement(React.Fragment, null,
|
|
11
|
+
contactDetail.name,
|
|
12
|
+
contactDetail.name && ': ', (_a = contactDetail.telecom) === null || _a === void 0 ? void 0 :
|
|
13
|
+
_a.map((telecom, index) => (React.createElement(ContactPointDisplay, { key: 'telecom-' + index, value: telecom })))));
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
export { ContactDetailDisplay };
|
|
17
|
+
//# sourceMappingURL=ContactDetailDisplay.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ContactDetailDisplay.js","sources":["../../src/ContactDetailDisplay.tsx"],"sourcesContent":["import { ContactDetail } from '@medplum/fhirtypes';\nimport React from 'react';\nimport { ContactPointDisplay } from './ContactPointDisplay';\n\nexport interface ContactDetailDisplayProps {\n value?: ContactDetail;\n}\n\nexport function ContactDetailDisplay(props: ContactDetailDisplayProps): JSX.Element | null {\n const contactDetail = props.value;\n if (!contactDetail) {\n return null;\n }\n\n return (\n <>\n {contactDetail.name}\n {contactDetail.name && ': '}\n {contactDetail.telecom?.map((telecom, index) => (\n <ContactPointDisplay key={'telecom-' + index} value={telecom} />\n ))}\n </>\n );\n}\n"],"names":[],"mappings":";;;AAQM,SAAU,oBAAoB,CAAC,KAAgC,EAAA;;AACnE,IAAA,MAAM,aAAa,GAAG,KAAK,CAAC,KAAK,CAAC;IAClC,IAAI,CAAC,aAAa,EAAE;AAClB,QAAA,OAAO,IAAI,CAAC;AACb,KAAA;AAED,IAAA,QACE,KAAA,CAAA,aAAA,CAAA,KAAA,CAAA,QAAA,EAAA,IAAA;AACG,QAAA,aAAa,CAAC,IAAI;QAClB,aAAa,CAAC,IAAI,IAAI,IAAI,EAC1B,CAAA,EAAA,GAAA,aAAa,CAAC,OAAO,MAAA,IAAA,IAAA,EAAA,KAAA,KAAA,CAAA,GAAA,KAAA,CAAA;WAAE,GAAG,CAAC,CAAC,OAAO,EAAE,KAAK,MACzC,KAAC,CAAA,aAAA,CAAA,mBAAmB,EAAC,EAAA,GAAG,EAAE,UAAU,GAAG,KAAK,EAAE,KAAK,EAAE,OAAO,EAAA,CAAI,CACjE,CAAC,CACD,EACH;AACJ;;;;"}
|
|
File without changes
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import React, { useState, useRef } from 'react';
|
|
2
|
+
import { ContactPointInput } from './ContactPointInput.js';
|
|
3
|
+
import { Input } from './Input.js';
|
|
4
|
+
import { InputRow } from './InputRow.js';
|
|
5
|
+
|
|
6
|
+
function ContactDetailInput(props) {
|
|
7
|
+
var _a;
|
|
8
|
+
const [contactPoint, setContactDetail] = useState(props.defaultValue);
|
|
9
|
+
const ref = useRef();
|
|
10
|
+
ref.current = contactPoint;
|
|
11
|
+
function setContactDetailWrapper(newValue) {
|
|
12
|
+
setContactDetail(newValue);
|
|
13
|
+
if (props.onChange) {
|
|
14
|
+
props.onChange(newValue);
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
function setName(name) {
|
|
18
|
+
const newValue = Object.assign(Object.assign({}, ref.current), { name });
|
|
19
|
+
if (!name) {
|
|
20
|
+
delete newValue.name;
|
|
21
|
+
}
|
|
22
|
+
setContactDetailWrapper(newValue);
|
|
23
|
+
}
|
|
24
|
+
function setTelecom(telecom) {
|
|
25
|
+
const newValue = Object.assign(Object.assign({}, ref.current), { telecom: telecom && [telecom] });
|
|
26
|
+
if (!telecom) {
|
|
27
|
+
delete newValue.telecom;
|
|
28
|
+
}
|
|
29
|
+
setContactDetailWrapper(newValue);
|
|
30
|
+
}
|
|
31
|
+
return (React.createElement(InputRow, null,
|
|
32
|
+
React.createElement(Input, { name: props.name + '-name', placeholder: "Name", style: { width: 180 }, defaultValue: contactPoint === null || contactPoint === void 0 ? void 0 : contactPoint.name, onChange: setName }),
|
|
33
|
+
React.createElement(ContactPointInput, { name: props.name + '-telecom', defaultValue: (_a = contactPoint === null || contactPoint === void 0 ? void 0 : contactPoint.telecom) === null || _a === void 0 ? void 0 : _a[0], onChange: setTelecom })));
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
export { ContactDetailInput };
|
|
37
|
+
//# sourceMappingURL=ContactDetailInput.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ContactDetailInput.js","sources":["../../src/ContactDetailInput.tsx"],"sourcesContent":["import { ContactDetail, ContactPoint } from '@medplum/fhirtypes';\nimport React, { useRef, useState } from 'react';\nimport { ContactPointInput } from './ContactPointInput';\nimport { Input } from './Input';\nimport { InputRow } from './InputRow';\n\nexport interface ContactDetailInputProps {\n name: string;\n defaultValue?: ContactDetail;\n onChange?: (value: ContactDetail) => void;\n}\n\nexport function ContactDetailInput(props: ContactDetailInputProps): JSX.Element {\n const [contactPoint, setContactDetail] = useState(props.defaultValue);\n\n const ref = useRef<ContactDetail>();\n ref.current = contactPoint;\n\n function setContactDetailWrapper(newValue: ContactDetail): void {\n setContactDetail(newValue);\n if (props.onChange) {\n props.onChange(newValue);\n }\n }\n\n function setName(name: string): void {\n const newValue: ContactDetail = { ...ref.current, name };\n if (!name) {\n delete newValue.name;\n }\n setContactDetailWrapper(newValue);\n }\n\n function setTelecom(telecom: ContactPoint | undefined): void {\n const newValue: ContactDetail = { ...ref.current, telecom: telecom && [telecom] };\n if (!telecom) {\n delete newValue.telecom;\n }\n setContactDetailWrapper(newValue);\n }\n\n return (\n <InputRow>\n <Input\n name={props.name + '-name'}\n placeholder=\"Name\"\n style={{ width: 180 }}\n defaultValue={contactPoint?.name}\n onChange={setName}\n />\n <ContactPointInput\n name={props.name + '-telecom'}\n defaultValue={contactPoint?.telecom?.[0]}\n onChange={setTelecom}\n />\n </InputRow>\n );\n}\n"],"names":[],"mappings":";;;;;AAYM,SAAU,kBAAkB,CAAC,KAA8B,EAAA;;AAC/D,IAAA,MAAM,CAAC,YAAY,EAAE,gBAAgB,CAAC,GAAG,QAAQ,CAAC,KAAK,CAAC,YAAY,CAAC,CAAC;AAEtE,IAAA,MAAM,GAAG,GAAG,MAAM,EAAiB,CAAC;AACpC,IAAA,GAAG,CAAC,OAAO,GAAG,YAAY,CAAC;IAE3B,SAAS,uBAAuB,CAAC,QAAuB,EAAA;QACtD,gBAAgB,CAAC,QAAQ,CAAC,CAAC;QAC3B,IAAI,KAAK,CAAC,QAAQ,EAAE;AAClB,YAAA,KAAK,CAAC,QAAQ,CAAC,QAAQ,CAAC,CAAC;AAC1B,SAAA;KACF;IAED,SAAS,OAAO,CAAC,IAAY,EAAA;QAC3B,MAAM,QAAQ,mCAAuB,GAAG,CAAC,OAAO,CAAE,EAAA,EAAA,IAAI,GAAE,CAAC;QACzD,IAAI,CAAC,IAAI,EAAE;YACT,OAAO,QAAQ,CAAC,IAAI,CAAC;AACtB,SAAA;QACD,uBAAuB,CAAC,QAAQ,CAAC,CAAC;KACnC;IAED,SAAS,UAAU,CAAC,OAAiC,EAAA;AACnD,QAAA,MAAM,QAAQ,GAAA,MAAA,CAAA,MAAA,CAAA,MAAA,CAAA,MAAA,CAAA,EAAA,EAAuB,GAAG,CAAC,OAAO,CAAE,EAAA,EAAA,OAAO,EAAE,OAAO,IAAI,CAAC,OAAO,CAAC,GAAE,CAAC;QAClF,IAAI,CAAC,OAAO,EAAE;YACZ,OAAO,QAAQ,CAAC,OAAO,CAAC;AACzB,SAAA;QACD,uBAAuB,CAAC,QAAQ,CAAC,CAAC;KACnC;IAED,QACE,oBAAC,QAAQ,EAAA,IAAA;AACP,QAAA,KAAA,CAAA,aAAA,CAAC,KAAK,EAAA,EACJ,IAAI,EAAE,KAAK,CAAC,IAAI,GAAG,OAAO,EAC1B,WAAW,EAAC,MAAM,EAClB,KAAK,EAAE,EAAE,KAAK,EAAE,GAAG,EAAE,EACrB,YAAY,EAAE,YAAY,KAAZ,IAAA,IAAA,YAAY,KAAZ,KAAA,CAAA,GAAA,KAAA,CAAA,GAAA,YAAY,CAAE,IAAI,EAChC,QAAQ,EAAE,OAAO,EACjB,CAAA;AACF,QAAA,KAAA,CAAA,aAAA,CAAC,iBAAiB,EAAA,EAChB,IAAI,EAAE,KAAK,CAAC,IAAI,GAAG,UAAU,EAC7B,YAAY,EAAE,MAAA,YAAY,KAAA,IAAA,IAAZ,YAAY,KAAA,KAAA,CAAA,GAAA,KAAA,CAAA,GAAZ,YAAY,CAAE,OAAO,MAAA,IAAA,IAAA,EAAA,KAAA,KAAA,CAAA,GAAA,KAAA,CAAA,GAAA,EAAA,CAAG,CAAC,CAAC,EACxC,QAAQ,EAAE,UAAU,EACpB,CAAA,CACO,EACX;AACJ;;;;"}
|
|
File without changes
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
|
|
3
|
+
function ContactPointDisplay(props) {
|
|
4
|
+
const contactPoint = props.value;
|
|
5
|
+
if (!contactPoint) {
|
|
6
|
+
return null;
|
|
7
|
+
}
|
|
8
|
+
const builder = [];
|
|
9
|
+
if (contactPoint.value) {
|
|
10
|
+
builder.push(contactPoint.value);
|
|
11
|
+
}
|
|
12
|
+
if (contactPoint.use || contactPoint.system) {
|
|
13
|
+
builder.push(' [');
|
|
14
|
+
if (contactPoint.use) {
|
|
15
|
+
builder.push(contactPoint.use);
|
|
16
|
+
}
|
|
17
|
+
if (contactPoint.use && contactPoint.system) {
|
|
18
|
+
builder.push(' ');
|
|
19
|
+
}
|
|
20
|
+
if (contactPoint.system) {
|
|
21
|
+
builder.push(contactPoint.system);
|
|
22
|
+
}
|
|
23
|
+
builder.push(']');
|
|
24
|
+
}
|
|
25
|
+
return React.createElement(React.Fragment, null, builder.join('').trim());
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
export { ContactPointDisplay };
|
|
29
|
+
//# sourceMappingURL=ContactPointDisplay.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ContactPointDisplay.js","sources":["../../src/ContactPointDisplay.tsx"],"sourcesContent":["import { ContactPoint } from '@medplum/fhirtypes';\nimport React from 'react';\n\nexport interface ContactPointDisplayProps {\n value?: ContactPoint;\n}\n\nexport function ContactPointDisplay(props: ContactPointDisplayProps): JSX.Element | null {\n const contactPoint = props.value;\n if (!contactPoint) {\n return null;\n }\n\n const builder = [];\n\n if (contactPoint.value) {\n builder.push(contactPoint.value);\n }\n\n if (contactPoint.use || contactPoint.system) {\n builder.push(' [');\n\n if (contactPoint.use) {\n builder.push(contactPoint.use);\n }\n\n if (contactPoint.use && contactPoint.system) {\n builder.push(' ');\n }\n\n if (contactPoint.system) {\n builder.push(contactPoint.system);\n }\n\n builder.push(']');\n }\n\n return <>{builder.join('').trim()}</>;\n}\n"],"names":[],"mappings":";;AAOM,SAAU,mBAAmB,CAAC,KAA+B,EAAA;AACjE,IAAA,MAAM,YAAY,GAAG,KAAK,CAAC,KAAK,CAAC;IACjC,IAAI,CAAC,YAAY,EAAE;AACjB,QAAA,OAAO,IAAI,CAAC;AACb,KAAA;IAED,MAAM,OAAO,GAAG,EAAE,CAAC;IAEnB,IAAI,YAAY,CAAC,KAAK,EAAE;AACtB,QAAA,OAAO,CAAC,IAAI,CAAC,YAAY,CAAC,KAAK,CAAC,CAAC;AAClC,KAAA;AAED,IAAA,IAAI,YAAY,CAAC,GAAG,IAAI,YAAY,CAAC,MAAM,EAAE;AAC3C,QAAA,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QAEnB,IAAI,YAAY,CAAC,GAAG,EAAE;AACpB,YAAA,OAAO,CAAC,IAAI,CAAC,YAAY,CAAC,GAAG,CAAC,CAAC;AAChC,SAAA;AAED,QAAA,IAAI,YAAY,CAAC,GAAG,IAAI,YAAY,CAAC,MAAM,EAAE;AAC3C,YAAA,OAAO,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;AACnB,SAAA;QAED,IAAI,YAAY,CAAC,MAAM,EAAE;AACvB,YAAA,OAAO,CAAC,IAAI,CAAC,YAAY,CAAC,MAAM,CAAC,CAAC;AACnC,SAAA;AAED,QAAA,OAAO,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;AACnB,KAAA;IAED,OAAO,KAAA,CAAA,aAAA,CAAA,KAAA,CAAA,QAAA,EAAA,IAAA,EAAG,OAAO,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC,IAAI,EAAE,CAAI,CAAC;AACxC;;;;"}
|
|
File without changes
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
import React, { useState, useRef } from 'react';
|
|
2
|
+
import { Input } from './Input.js';
|
|
3
|
+
import { InputRow } from './InputRow.js';
|
|
4
|
+
import { Select } from './Select.js';
|
|
5
|
+
|
|
6
|
+
function ContactPointInput(props) {
|
|
7
|
+
const [contactPoint, setContactPoint] = useState(props.defaultValue);
|
|
8
|
+
const ref = useRef();
|
|
9
|
+
ref.current = contactPoint;
|
|
10
|
+
function setContactPointWrapper(newValue) {
|
|
11
|
+
if (newValue && Object.keys(newValue).length === 0) {
|
|
12
|
+
newValue = undefined;
|
|
13
|
+
}
|
|
14
|
+
setContactPoint(newValue);
|
|
15
|
+
if (props.onChange) {
|
|
16
|
+
props.onChange(newValue);
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
function setSystem(system) {
|
|
20
|
+
const newValue = Object.assign(Object.assign({}, ref.current), { system });
|
|
21
|
+
if (!system) {
|
|
22
|
+
delete newValue.system;
|
|
23
|
+
}
|
|
24
|
+
setContactPointWrapper(newValue);
|
|
25
|
+
}
|
|
26
|
+
function setUse(use) {
|
|
27
|
+
const newValue = Object.assign(Object.assign({}, ref.current), { use });
|
|
28
|
+
if (!use) {
|
|
29
|
+
delete newValue.use;
|
|
30
|
+
}
|
|
31
|
+
setContactPointWrapper(newValue);
|
|
32
|
+
}
|
|
33
|
+
function setValue(value) {
|
|
34
|
+
const newValue = Object.assign(Object.assign({}, ref.current), { value });
|
|
35
|
+
if (!value) {
|
|
36
|
+
delete newValue.value;
|
|
37
|
+
}
|
|
38
|
+
setContactPointWrapper(newValue);
|
|
39
|
+
}
|
|
40
|
+
return (React.createElement(InputRow, null,
|
|
41
|
+
React.createElement(Select, { defaultValue: contactPoint === null || contactPoint === void 0 ? void 0 : contactPoint.system, onChange: setSystem, testid: "system" },
|
|
42
|
+
React.createElement("option", null),
|
|
43
|
+
React.createElement("option", null, "email"),
|
|
44
|
+
React.createElement("option", null, "fax"),
|
|
45
|
+
React.createElement("option", null, "pager"),
|
|
46
|
+
React.createElement("option", null, "phone"),
|
|
47
|
+
React.createElement("option", null, "other"),
|
|
48
|
+
React.createElement("option", null, "sms")),
|
|
49
|
+
React.createElement(Select, { defaultValue: contactPoint === null || contactPoint === void 0 ? void 0 : contactPoint.use, onChange: setUse, testid: "use" },
|
|
50
|
+
React.createElement("option", null),
|
|
51
|
+
React.createElement("option", null, "home"),
|
|
52
|
+
React.createElement("option", null, "mobile"),
|
|
53
|
+
React.createElement("option", null, "old"),
|
|
54
|
+
React.createElement("option", null, "temp"),
|
|
55
|
+
React.createElement("option", null, "work")),
|
|
56
|
+
React.createElement(Input, { placeholder: "Value", defaultValue: contactPoint === null || contactPoint === void 0 ? void 0 : contactPoint.value, onChange: setValue })));
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
export { ContactPointInput };
|
|
60
|
+
//# sourceMappingURL=ContactPointInput.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ContactPointInput.js","sources":["../../src/ContactPointInput.tsx"],"sourcesContent":["import { ContactPoint } from '@medplum/fhirtypes';\nimport React, { useRef, useState } from 'react';\nimport { Input } from './Input';\nimport { InputRow } from './InputRow';\nimport { Select } from './Select';\n\nexport interface ContactPointInputProps {\n name: string;\n defaultValue?: ContactPoint;\n onChange?: (value: ContactPoint | undefined) => void;\n}\n\nexport function ContactPointInput(props: ContactPointInputProps): JSX.Element {\n const [contactPoint, setContactPoint] = useState(props.defaultValue);\n\n const ref = useRef<ContactPoint>();\n ref.current = contactPoint;\n\n function setContactPointWrapper(newValue: ContactPoint | undefined): void {\n if (newValue && Object.keys(newValue).length === 0) {\n newValue = undefined;\n }\n setContactPoint(newValue);\n if (props.onChange) {\n props.onChange(newValue);\n }\n }\n\n function setSystem(system: string): void {\n const newValue: ContactPoint = { ...ref.current, system };\n if (!system) {\n delete newValue.system;\n }\n setContactPointWrapper(newValue);\n }\n\n function setUse(use: string): void {\n const newValue: ContactPoint = { ...ref.current, use };\n if (!use) {\n delete newValue.use;\n }\n setContactPointWrapper(newValue);\n }\n\n function setValue(value: string): void {\n const newValue: ContactPoint = { ...ref.current, value };\n if (!value) {\n delete newValue.value;\n }\n setContactPointWrapper(newValue);\n }\n\n return (\n <InputRow>\n <Select defaultValue={contactPoint?.system} onChange={setSystem} testid=\"system\">\n <option></option>\n <option>email</option>\n <option>fax</option>\n <option>pager</option>\n <option>phone</option>\n <option>other</option>\n <option>sms</option>\n </Select>\n <Select defaultValue={contactPoint?.use} onChange={setUse} testid=\"use\">\n <option></option>\n <option>home</option>\n <option>mobile</option>\n <option>old</option>\n <option>temp</option>\n <option>work</option>\n </Select>\n <Input placeholder=\"Value\" defaultValue={contactPoint?.value} onChange={setValue} />\n </InputRow>\n );\n}\n"],"names":[],"mappings":";;;;;AAYM,SAAU,iBAAiB,CAAC,KAA6B,EAAA;AAC7D,IAAA,MAAM,CAAC,YAAY,EA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,MAAA,CAAA;AACrB,YAAA,KAAA,CAAA,aAAA,CAAA,QAAA,EAAA,IAAA,EAAA,MAAA,CAAqB,CACd;QACT,KAAC,CAAA,aAAA,CAAA,KAAK,IAAC,WAAW,EAAC,OAAO,EAAC,YAAY,EAAE,YAAY,KAAZ,IAAA,IAAA,YAAY,uBAAZ,YAAY,CAAE,KAAK,EAAE,QAAQ,EAAE,QAAQ,EAAA,CAAI,CAC3E,EACX;AACJ;;;;"}
|
|
File without changes
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
import { isValidDate } from '@medplum/core';
|
|
2
|
+
import React from 'react';
|
|
3
|
+
import { Input } from './Input.js';
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* The DateTimeInput component is a wrapper around the HTML5 input type="datetime-local".
|
|
7
|
+
* The main purpose is to reconcile time zones.
|
|
8
|
+
* Most of our date/time values are in ISO-8601, which includes a time zone offset.
|
|
9
|
+
* The datetime-local input does not support the time zone offset.
|
|
10
|
+
* @param props The Input props.
|
|
11
|
+
* @returns The JSX element to render.
|
|
12
|
+
*/
|
|
13
|
+
function DateTimeInput(props) {
|
|
14
|
+
return (React.createElement(Input, Object.assign({}, props, { type: "datetime-local", defaultValue: convertIsoToLocal(props.defaultValue), onChange: (newValue) => {
|
|
15
|
+
if (props.onChange) {
|
|
16
|
+
props.onChange(convertLocalToIso(newValue));
|
|
17
|
+
}
|
|
18
|
+
} })));
|
|
19
|
+
}
|
|
20
|
+
/**
|
|
21
|
+
* Converts an ISO-8601 date/time string to a local date/time string.
|
|
22
|
+
* @param isoString The ISO-8601 date/time string to convert.
|
|
23
|
+
* @returns The local date/time string.
|
|
24
|
+
*/
|
|
25
|
+
function convertIsoToLocal(isoString) {
|
|
26
|
+
if (!isoString) {
|
|
27
|
+
return '';
|
|
28
|
+
}
|
|
29
|
+
// Convert the ISO-8601 date to a local datetime-local value.
|
|
30
|
+
// See: https://developer.mozilla.org/en-US/docs/Web/HTML/Date_and_time_formats#local_date_and_time_strings
|
|
31
|
+
// See: https://stackoverflow.com/a/60368477
|
|
32
|
+
const date = new Date(isoString);
|
|
33
|
+
if (!isValidDate(date)) {
|
|
34
|
+
// If the input string was malformed, return an empty string.
|
|
35
|
+
return '';
|
|
36
|
+
}
|
|
37
|
+
return date.toLocaleDateString('sv') + 'T' + date.toLocaleTimeString('sv');
|
|
38
|
+
}
|
|
39
|
+
/**
|
|
40
|
+
* Converts a local date/time string to an ISO-8601 date/time string.
|
|
41
|
+
* @param localString The local date/time string to convert.
|
|
42
|
+
* @returns The ISO-8601 date/time string.
|
|
43
|
+
*/
|
|
44
|
+
function convertLocalToIso(localString) {
|
|
45
|
+
if (!localString) {
|
|
46
|
+
return '';
|
|
47
|
+
}
|
|
48
|
+
// Try to parse the local string as a Date
|
|
49
|
+
// JavaScript's Date() constructor defaults to the local time zone.
|
|
50
|
+
// The Date() constructor will throw if the value is malformed.
|
|
51
|
+
const date = new Date(localString);
|
|
52
|
+
if (!isValidDate(date)) {
|
|
53
|
+
// If the input string was malformed, return an empty string.
|
|
54
|
+
return '';
|
|
55
|
+
}
|
|
56
|
+
return date.toISOString();
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
export { DateTimeInput, convertIsoToLocal, convertLocalToIso };
|
|
60
|
+
//# sourceMappingURL=DateTimeInput.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"DateTimeInput.js","sources":["../../src/DateTimeInput.tsx"],"sourcesContent":["import { isValidDate } from '@medplum/core';\nimport React from 'react';\nimport { Input, InputProps } from './Input';\n\n/**\n * The DateTimeInput component is a wrapper around the HTML5 input type=\"datetime-local\".\n * The main purpose is to reconcile time zones.\n * Most of our date/time values are in ISO-8601, which includes a time zone offset.\n * The datetime-local input does not support the time zone offset.\n * @param props The Input props.\n * @returns The JSX element to render.\n */\nexport function DateTimeInput(props: InputProps): JSX.Element {\n return (\n <Input\n {...props}\n type=\"datetime-local\"\n defaultValue={convertIsoToLocal(props.defaultValue as string | undefined)}\n onChange={(newValue: string) => {\n if (props.onChange) {\n props.onChange(convertLocalToIso(newValue));\n }\n }}\n />\n );\n}\n\n/**\n * Converts an ISO-8601 date/time string to a local date/time string.\n * @param isoString The ISO-8601 date/time string to convert.\n * @returns The local date/time string.\n */\nexport function convertIsoToLocal(isoString: string | undefined): string {\n if (!isoString) {\n return '';\n }\n\n // Convert the ISO-8601 date to a local datetime-local value.\n // See: https://developer.mozilla.org/en-US/docs/Web/HTML/Date_and_time_formats#local_date_and_time_strings\n // See: https://stackoverflow.com/a/60368477\n const date = new Date(isoString);\n if (!isValidDate(date)) {\n // If the input string was malformed, return an empty string.\n return '';\n }\n\n return date.toLocaleDateString('sv') + 'T' + date.toLocaleTimeString('sv');\n}\n\n/**\n * Converts a local date/time string to an ISO-8601 date/time string.\n * @param localString The local date/time string to convert.\n * @returns The ISO-8601 date/time string.\n */\nexport function convertLocalToIso(localString: string | undefined): string {\n if (!localString) {\n return '';\n }\n\n // Try to parse the local string as a Date\n // JavaScript's Date() constructor defaults to the local time zone.\n // The Date() constructor will throw if the value is malformed.\n const date = new Date(localString);\n if (!isValidDate(date)) {\n // If the input string was malformed, return an empty string.\n return '';\n }\n\n return date.toISOString();\n}\n"],"names":[],"mappings":";;;;AAIA;;;;;;;AAOG;AACG,SAAU,aAAa,CAAC,KAAiB,EAAA;IAC7C,QACE,KAAC,CAAA,aAAA,CAAA,KAAK,EACA,MAAA,CAAA,MAAA,CAAA,EAAA,EAAA,KAAK,IACT,IAAI,EAAC,gBAAgB,EACrB,YAAY,EAAE,iBAAiB,CAAC,KAAK,CAAC,YAAkC,CAAC,EACzE,QAAQ,EAAE,CAAC,QAAgB,KAAI;YAC7B,IAAI,KAAK,CAAC,QAAQ,EAAE;gBAClB,KAAK,CAAC,QAAQ,CAAC,iBAAiB,CAAC,QAAQ,CAAC,CAAC,CAAC;AAC7C,aAAA;SACF,EAAA,CAAA,CACD,EACF;AACJ,CAAC;AAED;;;;AAIG;AACG,SAAU,iBAAiB,CAAC,SAA6B,EAAA;IAC7D,IAAI,CAAC,SAAS,EAAE;AACd,QAAA,OAAO,EAAE,CAAC;AACX,KAAA;;;;AAKD,IAAA,MAAM,IAAI,GAAG,IAAI,IAAI,CAAC,SAAS,CAAC,CAAC;AACjC,IAAA,IAAI,CAAC,WAAW,CAAC,IAAI,CAAC,EAAE;;AAEtB,QAAA,OAAO,EAAE,CAAC;AACX,KAAA;AAED,IAAA,OAAO,IAAI,CAAC,kBAAkB,CAAC,IAAI,CAAC,GAAG,GAAG,GAAG,IAAI,CAAC,kBAAkB,CAAC,IAAI,CAAC,CAAC;AAC7E,CAAC;AAED;;;;AAIG;AACG,SAAU,iBAAiB,CAAC,WAA+B,EAAA;IAC/D,IAAI,CAAC,WAAW,EAAE;AAChB,QAAA,OAAO,EAAE,CAAC;AACX,KAAA;;;;AAKD,IAAA,MAAM,IAAI,GAAG,IAAI,IAAI,CAAC,WAAW,CAAC,CAAC;AACnC,IAAA,IAAI,CAAC,WAAW,CAAC,IAAI,CAAC,EAAE;;AAEtB,QAAA,OAAO,EAAE,CAAC;AACX,KAAA;AAED,IAAA,OAAO,IAAI,CAAC,WAAW,EAAE,CAAC;AAC5B;;;;"}
|
|
File without changes
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { getReferenceString } from '@medplum/core';
|
|
2
|
+
import React from 'react';
|
|
3
|
+
import { ResourceTimeline } from './ResourceTimeline.js';
|
|
4
|
+
|
|
5
|
+
function DefaultResourceTimeline(props) {
|
|
6
|
+
return (React.createElement(ResourceTimeline, { value: props.resource, buildSearchRequests: (resource) => ({
|
|
7
|
+
resourceType: 'Bundle',
|
|
8
|
+
type: 'batch',
|
|
9
|
+
entry: [
|
|
10
|
+
{
|
|
11
|
+
request: {
|
|
12
|
+
method: 'GET',
|
|
13
|
+
url: `${getReferenceString(resource)}/_history`,
|
|
14
|
+
},
|
|
15
|
+
},
|
|
16
|
+
{
|
|
17
|
+
request: {
|
|
18
|
+
method: 'GET',
|
|
19
|
+
url: `AuditEvent?entity=${getReferenceString(resource)}&_sort=-_lastUpdated`,
|
|
20
|
+
},
|
|
21
|
+
},
|
|
22
|
+
],
|
|
23
|
+
}) }));
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
export { DefaultResourceTimeline };
|
|
27
|
+
//# sourceMappingURL=DefaultResourceTimeline.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"DefaultResourceTimeline.js","sources":["../../src/DefaultResourceTimeline.tsx"],"sourcesContent":["import { getReferenceString } from '@medplum/core';\nimport { Reference, Resource } from '@medplum/fhirtypes';\nimport React from 'react';\nimport { ResourceTimeline } from './ResourceTimeline';\n\nexport interface DefaultResourceTimelineProps {\n resource: Resource | Reference;\n}\n\nexport function DefaultResourceTimeline(props: DefaultResourceTimelineProps): JSX.Element {\n return (\n <ResourceTimeline\n value={props.resource}\n buildSearchRequests={(resource: Resource) => ({\n resourceType: 'Bundle',\n type: 'batch',\n entry: [\n {\n request: {\n method: 'GET',\n url: `${getReferenceString(resource)}/_history`,\n },\n },\n {\n request: {\n method: 'GET',\n url: `AuditEvent?entity=${getReferenceString(resource)}&_sort=-_lastUpdated`,\n },\n },\n ],\n })}\n />\n );\n}\n"],"names":[],"mappings":";;;;AASM,SAAU,uBAAuB,CAAC,KAAmC,EAAA;AACzE,IAAA,QACE,KAAC,CAAA,aAAA,CAAA,gBAAgB,EACf,EAAA,KAAK,EAAE,KAAK,CAAC,QAAQ,EACrB,mBAAmB,EAAE,CAAC,QAAkB,MAAM;AAC5C,YAAA,YAAY,EAAE,QAAQ;AACtB,YAAA,IAAI,EAAE,OAAO;AACb,YAAA,KAAK,EAAE;AACL,gBAAA;AACE,oBAAA,OAAO,EAAE;AACP,wBAAA,MAAM,EAAE,KAAK;AACb,wBAAA,GAAG,EAAE,CAAG,EAAA,kBAAkB,CAAC,QAAQ,CAAC,CAAW,SAAA,CAAA;AAChD,qBAAA;AACF,iBAAA;AACD,gBAAA;AACE,oBAAA,OAAO,EAAE;AACP,wBAAA,MAAM,EAAE,KAAK;AACb,wBAAA,GAAG,EAAE,CAAqB,kBAAA,EAAA,kBAAkB,CAAC,QAAQ,CAAC,CAAsB,oBAAA,CAAA;AAC7E,qBAAA;AACF,iBAAA;AACF,aAAA;SACF,CAAC,EAAA,CACF,EACF;AACJ;;;;"}
|
|
File without changes
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
|
|
3
|
+
function DescriptionList(props) {
|
|
4
|
+
return React.createElement("dl", { className: 'medplum-description-list' + (props.compact ? ' compact' : '') }, props.children);
|
|
5
|
+
}
|
|
6
|
+
function DescriptionListEntry(props) {
|
|
7
|
+
return (React.createElement(React.Fragment, null,
|
|
8
|
+
React.createElement("dt", null, props.term),
|
|
9
|
+
React.createElement("dd", null, props.children)));
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
export { DescriptionList, DescriptionListEntry };
|
|
13
|
+
//# sourceMappingURL=DescriptionList.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"DescriptionList.js","sources":["../../src/DescriptionList.tsx"],"sourcesContent":["import React from 'react';\nimport './DescriptionList.css';\n\nexport interface DescriptionListProps {\n children: React.ReactNode;\n compact?: boolean;\n}\n\nexport function DescriptionList(props: DescriptionListProps): JSX.Element {\n return <dl className={'medplum-description-list' + (props.compact ? ' compact' : '')}>{props.children}</dl>;\n}\n\nexport interface DescriptionListEntryProps {\n term: string;\n children: React.ReactNode;\n}\n\nexport function DescriptionListEntry(props: DescriptionListEntryProps): JSX.Element {\n return (\n <>\n <dt>{props.term}</dt>\n <dd>{props.children}</dd>\n </>\n );\n}\n"],"names":[],"mappings":";;AAQM,SAAU,eAAe,CAAC,KAA2B,EAAA;IACzD,OAAO,KAAA,CAAA,aAAA,CAAA,IAAA,EAAA,EAAI,SAAS,EAAE,0BAA0B,IAAI,KAAK,CAAC,OAAO,GAAG,UAAU,GAAG,EAAE,CAAC,IAAG,KAAK,CAAC,QAAQ,CAAM,CAAC;AAC9G,CAAC;AAOK,SAAU,oBAAoB,CAAC,KAAgC,EAAA;AACnE,IAAA,QACE,KAAA,CAAA,aAAA,CAAA,KAAA,CAAA,QAAA,EAAA,IAAA;QACE,KAAK,CAAA,aAAA,CAAA,IAAA,EAAA,IAAA,EAAA,KAAK,CAAC,IAAI,CAAM;AACrB,QAAA,KAAA,CAAA,aAAA,CAAA,IAAA,EAAA,IAAA,EAAK,KAAK,CAAC,QAAQ,CAAM,CACxB,EACH;AACJ;;;;"}
|
|
File without changes
|