@medplum/react 2.0.2 → 2.0.4
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/OperationOutcomeAlert/OperationOutcomeAlert.d.ts +2 -1
- package/dist/cjs/ResourceDiffTable/ResourceDiffTable.stories.d.ts +5 -0
- package/dist/cjs/ResourceTable/ResourceTable.d.ts +13 -0
- package/dist/cjs/ResourceTimeline/ResourceTimeline.d.ts +2 -2
- package/dist/cjs/auth/AuthenticationForm.d.ts +2 -1
- package/dist/cjs/auth/SignInForm.d.ts +1 -0
- package/dist/cjs/index.cjs +1834 -1212
- package/dist/cjs/index.cjs.map +1 -1
- package/dist/cjs/index.d.ts +1 -0
- package/dist/cjs/index.min.cjs +1 -1
- package/dist/cjs/useResource/useResource.d.ts +2 -2
- package/dist/cjs/utils/date.d.ts +2 -1
- package/dist/esm/AddressDisplay/AddressDisplay.mjs +2 -2
- package/dist/esm/AddressDisplay/AddressDisplay.mjs.map +1 -1
- package/dist/esm/AddressInput/AddressInput.mjs +9 -9
- package/dist/esm/AddressInput/AddressInput.mjs.map +1 -1
- package/dist/esm/AnnotationInput/AnnotationInput.mjs +2 -2
- package/dist/esm/AnnotationInput/AnnotationInput.mjs.map +1 -1
- package/dist/esm/AsyncAutocomplete/AsyncAutocomplete.mjs +2 -2
- package/dist/esm/AsyncAutocomplete/AsyncAutocomplete.mjs.map +1 -1
- package/dist/esm/AttachmentArrayDisplay/AttachmentArrayDisplay.mjs +4 -4
- package/dist/esm/AttachmentArrayDisplay/AttachmentArrayDisplay.mjs.map +1 -1
- package/dist/esm/AttachmentArrayInput/AttachmentArrayInput.mjs +20 -19
- package/dist/esm/AttachmentArrayInput/AttachmentArrayInput.mjs.map +1 -1
- package/dist/esm/AttachmentButton/AttachmentButton.mjs +3 -3
- package/dist/esm/AttachmentButton/AttachmentButton.mjs.map +1 -1
- package/dist/esm/AttachmentDisplay/AttachmentDisplay.mjs +9 -9
- package/dist/esm/AttachmentDisplay/AttachmentDisplay.mjs.map +1 -1
- package/dist/esm/AttachmentInput/AttachmentInput.mjs +5 -5
- package/dist/esm/AttachmentInput/AttachmentInput.mjs.map +1 -1
- package/dist/esm/BackboneElementDisplay/BackboneElementDisplay.mjs +6 -6
- package/dist/esm/BackboneElementDisplay/BackboneElementDisplay.mjs.map +1 -1
- package/dist/esm/BackboneElementInput/BackboneElementInput.mjs +7 -7
- package/dist/esm/BackboneElementInput/BackboneElementInput.mjs.map +1 -1
- package/dist/esm/CalendarInput/CalendarInput.mjs +18 -18
- package/dist/esm/CalendarInput/CalendarInput.mjs.map +1 -1
- package/dist/esm/CheckboxFormSection/CheckboxFormSection.mjs +5 -5
- package/dist/esm/CheckboxFormSection/CheckboxFormSection.mjs.map +1 -1
- package/dist/esm/CodeInput/CodeInput.mjs +2 -2
- package/dist/esm/CodeInput/CodeInput.mjs.map +1 -1
- package/dist/esm/CodeableConceptDisplay/CodeableConceptDisplay.mjs +2 -2
- package/dist/esm/CodeableConceptDisplay/CodeableConceptDisplay.mjs.map +1 -1
- package/dist/esm/CodeableConceptInput/CodeableConceptInput.mjs +2 -2
- package/dist/esm/CodeableConceptInput/CodeableConceptInput.mjs.map +1 -1
- package/dist/esm/CodingDisplay/CodingDisplay.mjs +2 -2
- package/dist/esm/CodingDisplay/CodingDisplay.mjs.map +1 -1
- package/dist/esm/CodingInput/CodingInput.mjs +2 -2
- package/dist/esm/CodingInput/CodingInput.mjs.map +1 -1
- package/dist/esm/ContactDetailDisplay/ContactDetailDisplay.mjs +3 -3
- package/dist/esm/ContactDetailDisplay/ContactDetailDisplay.mjs.map +1 -1
- package/dist/esm/ContactDetailInput/ContactDetailInput.mjs +4 -4
- package/dist/esm/ContactDetailInput/ContactDetailInput.mjs.map +1 -1
- package/dist/esm/ContactPointDisplay/ContactPointDisplay.mjs +2 -2
- package/dist/esm/ContactPointDisplay/ContactPointDisplay.mjs.map +1 -1
- package/dist/esm/ContactPointInput/ContactPointInput.mjs +5 -5
- package/dist/esm/ContactPointInput/ContactPointInput.mjs.map +1 -1
- package/dist/esm/Container/Container.mjs +2 -2
- package/dist/esm/Container/Container.mjs.map +1 -1
- package/dist/esm/DateTimeInput/DateTimeInput.mjs +2 -2
- package/dist/esm/DateTimeInput/DateTimeInput.mjs.map +1 -1
- package/dist/esm/DefaultResourceTimeline/DefaultResourceTimeline.mjs +3 -7
- package/dist/esm/DefaultResourceTimeline/DefaultResourceTimeline.mjs.map +1 -1
- package/dist/esm/DescriptionList/DescriptionList.mjs +5 -5
- package/dist/esm/DescriptionList/DescriptionList.mjs.map +1 -1
- package/dist/esm/DiagnosticReportDisplay/DiagnosticReportDisplay.mjs +49 -49
- package/dist/esm/DiagnosticReportDisplay/DiagnosticReportDisplay.mjs.map +1 -1
- package/dist/esm/Document/Document.mjs +3 -3
- package/dist/esm/Document/Document.mjs.map +1 -1
- package/dist/esm/EncounterTimeline/EncounterTimeline.mjs +7 -7
- package/dist/esm/EncounterTimeline/EncounterTimeline.mjs.map +1 -1
- package/dist/esm/ErrorBoundary/ErrorBoundary.mjs +4 -4
- package/dist/esm/ErrorBoundary/ErrorBoundary.mjs.map +1 -1
- package/dist/esm/ExtensionInput/ExtensionInput.mjs +2 -2
- package/dist/esm/ExtensionInput/ExtensionInput.mjs.map +1 -1
- package/dist/esm/FhirPathDisplay/FhirPathDisplay.mjs +2 -2
- package/dist/esm/FhirPathDisplay/FhirPathDisplay.mjs.map +1 -1
- package/dist/esm/FhirPathTable/FhirPathTable.mjs +19 -19
- package/dist/esm/FhirPathTable/FhirPathTable.mjs.map +1 -1
- package/dist/esm/Form/Form.mjs +2 -2
- package/dist/esm/Form/Form.mjs.map +1 -1
- package/dist/esm/FormSection/FormSection.mjs +2 -2
- package/dist/esm/FormSection/FormSection.mjs.map +1 -1
- package/dist/esm/GoogleButton/GoogleButton.mjs +4 -4
- package/dist/esm/GoogleButton/GoogleButton.mjs.map +1 -1
- package/dist/esm/HumanNameDisplay/HumanNameDisplay.mjs +2 -2
- package/dist/esm/HumanNameDisplay/HumanNameDisplay.mjs.map +1 -1
- package/dist/esm/HumanNameInput/HumanNameInput.mjs +7 -7
- package/dist/esm/HumanNameInput/HumanNameInput.mjs.map +1 -1
- package/dist/esm/IdentifierDisplay/IdentifierDisplay.mjs +2 -2
- package/dist/esm/IdentifierDisplay/IdentifierDisplay.mjs.map +1 -1
- package/dist/esm/IdentifierInput/IdentifierInput.mjs +4 -4
- package/dist/esm/IdentifierInput/IdentifierInput.mjs.map +1 -1
- package/dist/esm/Logo/Logo.mjs +8 -8
- package/dist/esm/Logo/Logo.mjs.map +1 -1
- package/dist/esm/MedplumLink/MedplumLink.mjs +2 -2
- package/dist/esm/MedplumLink/MedplumLink.mjs.map +1 -1
- package/dist/esm/MedplumProvider/MedplumProvider.mjs +2 -2
- package/dist/esm/MedplumProvider/MedplumProvider.mjs.map +1 -1
- package/dist/esm/MoneyDisplay/MoneyDisplay.mjs +2 -2
- package/dist/esm/MoneyDisplay/MoneyDisplay.mjs.map +1 -1
- package/dist/esm/MoneyInput/MoneyInput.mjs +4 -4
- package/dist/esm/MoneyInput/MoneyInput.mjs.map +1 -1
- package/dist/esm/NoteDisplay/NoteDisplay.mjs +2 -2
- package/dist/esm/NoteDisplay/NoteDisplay.mjs.map +1 -1
- package/dist/esm/OperationOutcomeAlert/OperationOutcomeAlert.d.ts +2 -1
- package/dist/esm/OperationOutcomeAlert/OperationOutcomeAlert.mjs +5 -4
- package/dist/esm/OperationOutcomeAlert/OperationOutcomeAlert.mjs.map +1 -1
- package/dist/esm/Panel/Panel.mjs +2 -2
- package/dist/esm/Panel/Panel.mjs.map +1 -1
- package/dist/esm/PatientTimeline/PatientTimeline.mjs +12 -12
- package/dist/esm/PatientTimeline/PatientTimeline.mjs.map +1 -1
- package/dist/esm/PeriodInput/PeriodInput.mjs +4 -4
- package/dist/esm/PeriodInput/PeriodInput.mjs.map +1 -1
- package/dist/esm/PlanDefinitionBuilder/PlanDefinitionBuilder.mjs +34 -34
- package/dist/esm/PlanDefinitionBuilder/PlanDefinitionBuilder.mjs.map +1 -1
- package/dist/esm/QuantityDisplay/QuantityDisplay.mjs +2 -2
- package/dist/esm/QuantityDisplay/QuantityDisplay.mjs.map +1 -1
- package/dist/esm/QuantityInput/QuantityInput.mjs +5 -5
- package/dist/esm/QuantityInput/QuantityInput.mjs.map +1 -1
- package/dist/esm/QuestionnaireBuilder/QuestionnaireBuilder.mjs +31 -31
- package/dist/esm/QuestionnaireBuilder/QuestionnaireBuilder.mjs.map +1 -1
- package/dist/esm/QuestionnaireForm/QuestionnaireForm.mjs +32 -32
- package/dist/esm/QuestionnaireForm/QuestionnaireForm.mjs.map +1 -1
- package/dist/esm/RangeDisplay/RangeDisplay.mjs +2 -2
- package/dist/esm/RangeDisplay/RangeDisplay.mjs.map +1 -1
- package/dist/esm/RangeInput/RangeInput.mjs +4 -4
- package/dist/esm/RangeInput/RangeInput.mjs.map +1 -1
- package/dist/esm/RatioDisplay/RatioDisplay.mjs +4 -4
- package/dist/esm/RatioDisplay/RatioDisplay.mjs.map +1 -1
- package/dist/esm/RatioInput/RatioInput.mjs +4 -4
- package/dist/esm/RatioInput/RatioInput.mjs.map +1 -1
- package/dist/esm/ReferenceDisplay/ReferenceDisplay.mjs +3 -3
- package/dist/esm/ReferenceDisplay/ReferenceDisplay.mjs.map +1 -1
- package/dist/esm/ReferenceInput/ReferenceInput.mjs +4 -4
- package/dist/esm/ReferenceInput/ReferenceInput.mjs.map +1 -1
- package/dist/esm/ReferenceRangeEditor/ReferenceRangeEditor.mjs +32 -31
- package/dist/esm/ReferenceRangeEditor/ReferenceRangeEditor.mjs.map +1 -1
- package/dist/esm/RequestGroupDisplay/RequestGroupDisplay.mjs +16 -15
- package/dist/esm/RequestGroupDisplay/RequestGroupDisplay.mjs.map +1 -1
- package/dist/esm/ResourceArrayDisplay/ResourceArrayDisplay.mjs +3 -3
- package/dist/esm/ResourceArrayDisplay/ResourceArrayDisplay.mjs.map +1 -1
- package/dist/esm/ResourceArrayInput/ResourceArrayInput.mjs +19 -18
- package/dist/esm/ResourceArrayInput/ResourceArrayInput.mjs.map +1 -1
- package/dist/esm/ResourceAvatar/ResourceAvatar.mjs +4 -4
- package/dist/esm/ResourceAvatar/ResourceAvatar.mjs.map +1 -1
- package/dist/esm/ResourceBadge/ResourceBadge.mjs +4 -4
- package/dist/esm/ResourceBadge/ResourceBadge.mjs.map +1 -1
- package/dist/esm/ResourceBlame/ResourceBlame.mjs +13 -13
- package/dist/esm/ResourceBlame/ResourceBlame.mjs.map +1 -1
- package/dist/esm/ResourceDiff/ResourceDiff.mjs +7 -7
- package/dist/esm/ResourceDiff/ResourceDiff.mjs.map +1 -1
- package/dist/esm/ResourceDiffTable/ResourceDiffTable.mjs +18 -18
- package/dist/esm/ResourceDiffTable/ResourceDiffTable.mjs.map +1 -1
- package/dist/esm/ResourceDiffTable/ResourceDiffTable.stories.d.ts +5 -0
- package/dist/esm/ResourceForm/ResourceForm.mjs +12 -12
- package/dist/esm/ResourceForm/ResourceForm.mjs.map +1 -1
- package/dist/esm/ResourceHistoryTable/ResourceHistoryTable.mjs +17 -17
- package/dist/esm/ResourceHistoryTable/ResourceHistoryTable.mjs.map +1 -1
- package/dist/esm/ResourceInput/ResourceInput.mjs +8 -8
- package/dist/esm/ResourceInput/ResourceInput.mjs.map +1 -1
- package/dist/esm/ResourceName/ResourceName.mjs +2 -2
- package/dist/esm/ResourceName/ResourceName.mjs.map +1 -1
- package/dist/esm/ResourcePropertyDisplay/ResourcePropertyDisplay.mjs +26 -26
- package/dist/esm/ResourcePropertyDisplay/ResourcePropertyDisplay.mjs.map +1 -1
- package/dist/esm/ResourcePropertyInput/ResourcePropertyInput.mjs +34 -34
- package/dist/esm/ResourcePropertyInput/ResourcePropertyInput.mjs.map +1 -1
- package/dist/esm/ResourceTable/ResourceTable.d.ts +13 -0
- package/dist/esm/ResourceTable/ResourceTable.mjs +5 -2
- package/dist/esm/ResourceTable/ResourceTable.mjs.map +1 -1
- package/dist/esm/ResourceTimeline/ResourceTimeline.d.ts +2 -2
- package/dist/esm/ResourceTimeline/ResourceTimeline.mjs +105 -76
- package/dist/esm/ResourceTimeline/ResourceTimeline.mjs.map +1 -1
- package/dist/esm/Scheduler/Scheduler.mjs +22 -22
- package/dist/esm/Scheduler/Scheduler.mjs.map +1 -1
- package/dist/esm/SearchControl/SearchControl.mjs +55 -49
- package/dist/esm/SearchControl/SearchControl.mjs.map +1 -1
- package/dist/esm/SearchControl/SearchUtils.mjs +4 -4
- package/dist/esm/SearchControl/SearchUtils.mjs.map +1 -1
- package/dist/esm/SearchFieldEditor/SearchFieldEditor.mjs +25 -25
- package/dist/esm/SearchFieldEditor/SearchFieldEditor.mjs.map +1 -1
- package/dist/esm/SearchFilterEditor/SearchFilterEditor.mjs +37 -37
- package/dist/esm/SearchFilterEditor/SearchFilterEditor.mjs.map +1 -1
- package/dist/esm/SearchFilterValueDialog/SearchFilterValueDialog.mjs +6 -6
- package/dist/esm/SearchFilterValueDialog/SearchFilterValueDialog.mjs.map +1 -1
- package/dist/esm/SearchFilterValueDisplay/SearchFilterValueDisplay.mjs +4 -4
- package/dist/esm/SearchFilterValueDisplay/SearchFilterValueDisplay.mjs.map +1 -1
- package/dist/esm/SearchFilterValueInput/SearchFilterValueInput.mjs +8 -8
- package/dist/esm/SearchFilterValueInput/SearchFilterValueInput.mjs.map +1 -1
- package/dist/esm/SearchPopupMenu/SearchPopupMenu.mjs +75 -62
- package/dist/esm/SearchPopupMenu/SearchPopupMenu.mjs.map +1 -1
- package/dist/esm/ServiceRequestTimeline/ServiceRequestTimeline.mjs +8 -8
- package/dist/esm/ServiceRequestTimeline/ServiceRequestTimeline.mjs.map +1 -1
- package/dist/esm/StatusBadge/StatusBadge.mjs +2 -2
- package/dist/esm/StatusBadge/StatusBadge.mjs.map +1 -1
- package/dist/esm/Timeline/Timeline.mjs +20 -20
- package/dist/esm/Timeline/Timeline.mjs.map +1 -1
- package/dist/esm/TimingInput/TimingInput.mjs +19 -19
- package/dist/esm/TimingInput/TimingInput.mjs.map +1 -1
- package/dist/esm/ValueSetAutocomplete/ValueSetAutocomplete.mjs +2 -2
- package/dist/esm/ValueSetAutocomplete/ValueSetAutocomplete.mjs.map +1 -1
- package/dist/esm/auth/AuthenticationForm.d.ts +2 -1
- package/dist/esm/auth/AuthenticationForm.mjs +23 -23
- package/dist/esm/auth/AuthenticationForm.mjs.map +1 -1
- package/dist/esm/auth/ChooseProfileForm.mjs +11 -11
- package/dist/esm/auth/ChooseProfileForm.mjs.map +1 -1
- package/dist/esm/auth/ChooseScopeForm.mjs +9 -9
- package/dist/esm/auth/ChooseScopeForm.mjs.map +1 -1
- package/dist/esm/auth/MfaForm.mjs +12 -12
- package/dist/esm/auth/MfaForm.mjs.map +1 -1
- package/dist/esm/auth/NewProjectForm.mjs +12 -12
- package/dist/esm/auth/NewProjectForm.mjs.map +1 -1
- package/dist/esm/auth/NewUserForm.mjs +22 -22
- package/dist/esm/auth/NewUserForm.mjs.map +1 -1
- package/dist/esm/auth/RegisterForm.mjs +5 -5
- package/dist/esm/auth/RegisterForm.mjs.map +1 -1
- package/dist/esm/auth/SignInForm.d.ts +1 -0
- package/dist/esm/auth/SignInForm.mjs +8 -8
- package/dist/esm/auth/SignInForm.mjs.map +1 -1
- package/dist/esm/index.d.ts +1 -0
- package/dist/esm/index.min.mjs +1 -1
- package/dist/esm/index.mjs +1 -0
- package/dist/esm/index.mjs.map +1 -1
- package/dist/esm/node_modules/@tabler/icons-react/dist/esm/createReactComponent.mjs +69 -0
- package/dist/esm/node_modules/@tabler/icons-react/dist/esm/createReactComponent.mjs.map +1 -0
- package/dist/esm/node_modules/@tabler/icons-react/dist/esm/defaultAttributes.mjs +18 -0
- package/dist/esm/node_modules/@tabler/icons-react/dist/esm/defaultAttributes.mjs.map +1 -0
- package/dist/esm/node_modules/@tabler/icons-react/dist/esm/icons/IconAdjustmentsHorizontal.mjs +24 -0
- package/dist/esm/node_modules/@tabler/icons-react/dist/esm/icons/IconAdjustmentsHorizontal.mjs.map +1 -0
- package/dist/esm/node_modules/@tabler/icons-react/dist/esm/icons/IconAlertCircle.mjs +14 -0
- package/dist/esm/node_modules/@tabler/icons-react/dist/esm/icons/IconAlertCircle.mjs.map +1 -0
- package/dist/esm/node_modules/@tabler/icons-react/dist/esm/icons/IconBleach.mjs +18 -0
- package/dist/esm/node_modules/@tabler/icons-react/dist/esm/icons/IconBleach.mjs.map +1 -0
- package/dist/esm/node_modules/@tabler/icons-react/dist/esm/icons/IconBleachOff.mjs +19 -0
- package/dist/esm/node_modules/@tabler/icons-react/dist/esm/icons/IconBleachOff.mjs.map +1 -0
- package/dist/esm/node_modules/@tabler/icons-react/dist/esm/icons/IconBoxMultiple.mjs +25 -0
- package/dist/esm/node_modules/@tabler/icons-react/dist/esm/icons/IconBoxMultiple.mjs.map +1 -0
- package/dist/esm/node_modules/@tabler/icons-react/dist/esm/icons/IconBracketsContain.mjs +16 -0
- package/dist/esm/node_modules/@tabler/icons-react/dist/esm/icons/IconBracketsContain.mjs.map +1 -0
- package/dist/esm/node_modules/@tabler/icons-react/dist/esm/icons/IconBucket.mjs +19 -0
- package/dist/esm/node_modules/@tabler/icons-react/dist/esm/icons/IconBucket.mjs.map +1 -0
- package/dist/esm/node_modules/@tabler/icons-react/dist/esm/icons/IconBucketOff.mjs +26 -0
- package/dist/esm/node_modules/@tabler/icons-react/dist/esm/icons/IconBucketOff.mjs.map +1 -0
- package/dist/esm/node_modules/@tabler/icons-react/dist/esm/icons/IconCalendar.mjs +23 -0
- package/dist/esm/node_modules/@tabler/icons-react/dist/esm/icons/IconCalendar.mjs.map +1 -0
- package/dist/esm/node_modules/@tabler/icons-react/dist/esm/icons/IconCheck.mjs +12 -0
- package/dist/esm/node_modules/@tabler/icons-react/dist/esm/icons/IconCheck.mjs.map +1 -0
- package/dist/esm/node_modules/@tabler/icons-react/dist/esm/icons/IconCheckbox.mjs +19 -0
- package/dist/esm/node_modules/@tabler/icons-react/dist/esm/icons/IconCheckbox.mjs.map +1 -0
- package/dist/esm/node_modules/@tabler/icons-react/dist/esm/icons/IconCircleMinus.mjs +13 -0
- package/dist/esm/node_modules/@tabler/icons-react/dist/esm/icons/IconCircleMinus.mjs.map +1 -0
- package/dist/esm/node_modules/@tabler/icons-react/dist/esm/icons/IconCirclePlus.mjs +14 -0
- package/dist/esm/node_modules/@tabler/icons-react/dist/esm/icons/IconCirclePlus.mjs.map +1 -0
- package/dist/esm/node_modules/@tabler/icons-react/dist/esm/icons/IconCloudUpload.mjs +20 -0
- package/dist/esm/node_modules/@tabler/icons-react/dist/esm/icons/IconCloudUpload.mjs.map +1 -0
- package/dist/esm/node_modules/@tabler/icons-react/dist/esm/icons/IconColumns.mjs +19 -0
- package/dist/esm/node_modules/@tabler/icons-react/dist/esm/icons/IconColumns.mjs.map +1 -0
- package/dist/esm/node_modules/@tabler/icons-react/dist/esm/icons/IconCurrencyDollar.mjs +19 -0
- package/dist/esm/node_modules/@tabler/icons-react/dist/esm/icons/IconCurrencyDollar.mjs.map +1 -0
- package/dist/esm/node_modules/@tabler/icons-react/dist/esm/icons/IconDots.mjs +14 -0
- package/dist/esm/node_modules/@tabler/icons-react/dist/esm/icons/IconDots.mjs.map +1 -0
- package/dist/esm/node_modules/@tabler/icons-react/dist/esm/icons/IconEdit.mjs +26 -0
- package/dist/esm/node_modules/@tabler/icons-react/dist/esm/icons/IconEdit.mjs.map +1 -0
- package/dist/esm/node_modules/@tabler/icons-react/dist/esm/icons/IconEqual.mjs +13 -0
- package/dist/esm/node_modules/@tabler/icons-react/dist/esm/icons/IconEqual.mjs.map +1 -0
- package/dist/esm/node_modules/@tabler/icons-react/dist/esm/icons/IconEqualNot.mjs +14 -0
- package/dist/esm/node_modules/@tabler/icons-react/dist/esm/icons/IconEqualNot.mjs.map +1 -0
- package/dist/esm/node_modules/@tabler/icons-react/dist/esm/icons/IconFileAlert.mjs +21 -0
- package/dist/esm/node_modules/@tabler/icons-react/dist/esm/icons/IconFileAlert.mjs.map +1 -0
- package/dist/esm/node_modules/@tabler/icons-react/dist/esm/icons/IconFilePlus.mjs +21 -0
- package/dist/esm/node_modules/@tabler/icons-react/dist/esm/icons/IconFilePlus.mjs.map +1 -0
- package/dist/esm/node_modules/@tabler/icons-react/dist/esm/icons/IconFilter.mjs +18 -0
- package/dist/esm/node_modules/@tabler/icons-react/dist/esm/icons/IconFilter.mjs.map +1 -0
- package/dist/esm/node_modules/@tabler/icons-react/dist/esm/icons/IconListDetails.mjs +29 -0
- package/dist/esm/node_modules/@tabler/icons-react/dist/esm/icons/IconListDetails.mjs.map +1 -0
- package/dist/esm/node_modules/@tabler/icons-react/dist/esm/icons/IconMathGreater.mjs +12 -0
- package/dist/esm/node_modules/@tabler/icons-react/dist/esm/icons/IconMathGreater.mjs.map +1 -0
- package/dist/esm/node_modules/@tabler/icons-react/dist/esm/icons/IconMathLower.mjs +12 -0
- package/dist/esm/node_modules/@tabler/icons-react/dist/esm/icons/IconMathLower.mjs.map +1 -0
- package/dist/esm/node_modules/@tabler/icons-react/dist/esm/icons/IconMessage.mjs +20 -0
- package/dist/esm/node_modules/@tabler/icons-react/dist/esm/icons/IconMessage.mjs.map +1 -0
- package/dist/esm/node_modules/@tabler/icons-react/dist/esm/icons/IconPin.mjs +20 -0
- package/dist/esm/node_modules/@tabler/icons-react/dist/esm/icons/IconPin.mjs.map +1 -0
- package/dist/esm/node_modules/@tabler/icons-react/dist/esm/icons/IconPinnedOff.mjs +21 -0
- package/dist/esm/node_modules/@tabler/icons-react/dist/esm/icons/IconPinnedOff.mjs.map +1 -0
- package/dist/esm/node_modules/@tabler/icons-react/dist/esm/icons/IconSettings.mjs +19 -0
- package/dist/esm/node_modules/@tabler/icons-react/dist/esm/icons/IconSettings.mjs.map +1 -0
- package/dist/esm/node_modules/@tabler/icons-react/dist/esm/icons/IconSortAscending.mjs +16 -0
- package/dist/esm/node_modules/@tabler/icons-react/dist/esm/icons/IconSortAscending.mjs.map +1 -0
- package/dist/esm/node_modules/@tabler/icons-react/dist/esm/icons/IconSortDescending.mjs +16 -0
- package/dist/esm/node_modules/@tabler/icons-react/dist/esm/icons/IconSortDescending.mjs.map +1 -0
- package/dist/esm/node_modules/@tabler/icons-react/dist/esm/icons/IconSquare.mjs +18 -0
- package/dist/esm/node_modules/@tabler/icons-react/dist/esm/icons/IconSquare.mjs.map +1 -0
- package/dist/esm/node_modules/@tabler/icons-react/dist/esm/icons/IconTableExport.mjs +18 -0
- package/dist/esm/node_modules/@tabler/icons-react/dist/esm/icons/IconTableExport.mjs.map +1 -0
- package/dist/esm/node_modules/@tabler/icons-react/dist/esm/icons/IconTrash.mjs +19 -0
- package/dist/esm/node_modules/@tabler/icons-react/dist/esm/icons/IconTrash.mjs.map +1 -0
- package/dist/esm/node_modules/@tabler/icons-react/dist/esm/icons/IconX.mjs +13 -0
- package/dist/esm/node_modules/@tabler/icons-react/dist/esm/icons/IconX.mjs.map +1 -0
- package/dist/esm/useResource/useResource.d.ts +2 -2
- package/dist/esm/useResource/useResource.mjs +62 -42
- package/dist/esm/useResource/useResource.mjs.map +1 -1
- package/dist/esm/utils/date.d.ts +2 -1
- package/dist/esm/utils/date.mjs +31 -25
- package/dist/esm/utils/date.mjs.map +1 -1
- package/icons-unique.txt +36 -0
- package/icons.txt +44 -0
- package/package.json +13 -13
- package/dist/esm/node_modules/@tabler/icons/icons-react/dist/index.esm.mjs +0 -6
- package/dist/esm/node_modules/@tabler/icons/icons-react/dist/index.esm.mjs.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"GoogleButton.mjs","sources":["../../../src/GoogleButton/GoogleButton.tsx"],"sourcesContent":["import { GoogleCredentialResponse } from '@medplum/core';\nimport React, { useEffect, useRef, useState } from 'react';\nimport { useMedplum } from '../MedplumProvider/MedplumProvider';\nimport { createScriptTag } from '../utils/script';\n\ninterface GoogleApi {\n accounts: {\n id: {\n initialize: (args: any) => void;\n renderButton: (parent: HTMLElement, args: any) => void;\n };\n };\n}\n\ndeclare const google: GoogleApi;\n\nexport interface GoogleButtonProps {\n readonly googleClientId?: string;\n readonly handleGoogleCredential: (response: GoogleCredentialResponse) => void;\n}\n\nexport function GoogleButton(props: GoogleButtonProps): JSX.Element | null {\n const medplum = useMedplum();\n const { googleClientId, handleGoogleCredential } = props;\n const parentRef = useRef<HTMLDivElement>(null);\n const [scriptLoaded, setScriptLoaded] = useState<boolean>(typeof google !== 'undefined');\n const [initialized, setInitialized] = useState<boolean>(false);\n const [buttonRendered, setButtonRendered] = useState<boolean>(false);\n\n useEffect(() => {\n if (typeof google === 'undefined') {\n createScriptTag('https://accounts.google.com/gsi/client', () => setScriptLoaded(true));\n return;\n }\n\n if (!initialized) {\n google.accounts.id.initialize({\n client_id: googleClientId,\n callback: handleGoogleCredential,\n });\n setInitialized(true);\n }\n\n if (parentRef.current && !buttonRendered) {\n google.accounts.id.renderButton(parentRef.current, {});\n setButtonRendered(true);\n }\n }, [medplum, googleClientId, initialized, scriptLoaded, parentRef, buttonRendered, handleGoogleCredential]);\n\n if (!googleClientId) {\n return null;\n }\n\n return <div ref={parentRef} />;\n}\n\nexport function getGoogleClientId(clientId: string | undefined): string | undefined {\n if (clientId) {\n return clientId;\n }\n\n if (typeof window !== 'undefined') {\n const origin = window.location.protocol + '//' + window.location.host;\n const authorizedOrigins = process.env.GOOGLE_AUTH_ORIGINS?.split(',') ?? [];\n if (authorizedOrigins.includes(origin)) {\n return process.env.GOOGLE_CLIENT_ID;\n }\n }\n\n return undefined;\n}\n"],"names":[
|
|
1
|
+
{"version":3,"file":"GoogleButton.mjs","sources":["../../../src/GoogleButton/GoogleButton.tsx"],"sourcesContent":["import { GoogleCredentialResponse } from '@medplum/core';\nimport React, { useEffect, useRef, useState } from 'react';\nimport { useMedplum } from '../MedplumProvider/MedplumProvider';\nimport { createScriptTag } from '../utils/script';\n\ninterface GoogleApi {\n accounts: {\n id: {\n initialize: (args: any) => void;\n renderButton: (parent: HTMLElement, args: any) => void;\n };\n };\n}\n\ndeclare const google: GoogleApi;\n\nexport interface GoogleButtonProps {\n readonly googleClientId?: string;\n readonly handleGoogleCredential: (response: GoogleCredentialResponse) => void;\n}\n\nexport function GoogleButton(props: GoogleButtonProps): JSX.Element | null {\n const medplum = useMedplum();\n const { googleClientId, handleGoogleCredential } = props;\n const parentRef = useRef<HTMLDivElement>(null);\n const [scriptLoaded, setScriptLoaded] = useState<boolean>(typeof google !== 'undefined');\n const [initialized, setInitialized] = useState<boolean>(false);\n const [buttonRendered, setButtonRendered] = useState<boolean>(false);\n\n useEffect(() => {\n if (typeof google === 'undefined') {\n createScriptTag('https://accounts.google.com/gsi/client', () => setScriptLoaded(true));\n return;\n }\n\n if (!initialized) {\n google.accounts.id.initialize({\n client_id: googleClientId,\n callback: handleGoogleCredential,\n });\n setInitialized(true);\n }\n\n if (parentRef.current && !buttonRendered) {\n google.accounts.id.renderButton(parentRef.current, {});\n setButtonRendered(true);\n }\n }, [medplum, googleClientId, initialized, scriptLoaded, parentRef, buttonRendered, handleGoogleCredential]);\n\n if (!googleClientId) {\n return null;\n }\n\n return <div ref={parentRef} />;\n}\n\nexport function getGoogleClientId(clientId: string | undefined): string | undefined {\n if (clientId) {\n return clientId;\n }\n\n if (typeof window !== 'undefined') {\n const origin = window.location.protocol + '//' + window.location.host;\n const authorizedOrigins = process.env.GOOGLE_AUTH_ORIGINS?.split(',') ?? [];\n if (authorizedOrigins.includes(origin)) {\n return process.env.GOOGLE_CLIENT_ID;\n }\n }\n\n return undefined;\n}\n"],"names":[],"mappings":";;;;AAqBM,SAAU,YAAY,CAAC,KAAwB,EAAA;AACnD,IAAA,MAAM,OAAO,GAAG,UAAU,EAAE,CAAC;AAC7B,IAAA,MAAM,EAAE,cAAc,EAAE,sBAAsB,EAAE,GAAG,KAAK,CAAC;AACzD,IAAA,MAAM,SAAS,GAAG,MAAM,CAAiB,IAAI,CAAC,CAAC;AAC/C,IAAA,MAAM,CAAC,YAAY,EAAE,eAAe,CAAC,GAAG,QAAQ,CAAU,OAAO,MAAM,KAAK,WAAW,CAAC,CAAC;IACzF,MAAM,CAAC,WAAW,EAAE,cAAc,CAAC,GAAG,QAAQ,CAAU,KAAK,CAAC,CAAC;IAC/D,MAAM,CAAC,cAAc,EAAE,iBAAiB,CAAC,GAAG,QAAQ,CAAU,KAAK,CAAC,CAAC;IAErE,SAAS,CAAC,MAAK;AACb,QAAA,IAAI,OAAO,MAAM,KAAK,WAAW,EAAE;YACjC,eAAe,CAAC,wCAAwC,EAAE,MAAM,eAAe,CAAC,IAAI,CAAC,CAAC,CAAC;YACvF,OAAO;AACR,SAAA;QAED,IAAI,CAAC,WAAW,EAAE;AAChB,YAAA,MAAM,CAAC,QAAQ,CAAC,EAAE,CAAC,UAAU,CAAC;AAC5B,gBAAA,SAAS,EAAE,cAAc;AACzB,gBAAA,QAAQ,EAAE,sBAAsB;AACjC,aAAA,CAAC,CAAC;YACH,cAAc,CAAC,IAAI,CAAC,CAAC;AACtB,SAAA;AAED,QAAA,IAAI,SAAS,CAAC,OAAO,IAAI,CAAC,cAAc,EAAE;AACxC,YAAA,MAAM,CAAC,QAAQ,CAAC,EAAE,CAAC,YAAY,CAAC,SAAS,CAAC,OAAO,EAAE,EAAE,CAAC,CAAC;YACvD,iBAAiB,CAAC,IAAI,CAAC,CAAC;AACzB,SAAA;AACH,KAAC,EAAE,CAAC,OAAO,EAAE,cAAc,EAAE,WAAW,EAAE,YAAY,EAAE,SAAS,EAAE,cAAc,EAAE,sBAAsB,CAAC,CAAC,CAAC;IAE5G,IAAI,CAAC,cAAc,EAAE;AACnB,QAAA,OAAO,IAAI,CAAC;AACb,KAAA;AAED,IAAA,OAAO,KAAK,CAAA,aAAA,CAAA,KAAA,EAAA,EAAA,GAAG,EAAE,SAAS,GAAI,CAAC;AACjC,CAAC;AAEK,SAAU,iBAAiB,CAAC,QAA4B,EAAA;AAC5D,IAAA,IAAI,QAAQ,EAAE;AACZ,QAAA,OAAO,QAAQ,CAAC;AACjB,KAAA;AAED,IAAA,IAAI,OAAO,MAAM,KAAK,WAAW,EAAE;AACjC,QAAA,MAAM,MAAM,GAAG,MAAM,CAAC,QAAQ,CAAC,QAAQ,GAAG,IAAI,GAAG,MAAM,CAAC,QAAQ,CAAC,IAAI,CAAC;AACtE,QAAA,MAAM,iBAAiB,GAAG,6NAA+B,EAAE,KAAK,CAAC,GAAG,CAAC,IAAI,EAAE,CAAC;AAC5E,QAAA,IAAI,iBAAiB,CAAC,QAAQ,CAAC,MAAM,CAAC,EAAE;AACtC,YAAA,OAAO,0EAA4B,CAAC;AACrC,SAAA;AACF,KAAA;AAED,IAAA,OAAO,SAAS,CAAC;AACnB;;;;"}
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { formatHumanName } from '@medplum/core';
|
|
2
|
-
import
|
|
2
|
+
import React from 'react';
|
|
3
3
|
|
|
4
4
|
function HumanNameDisplay(props) {
|
|
5
5
|
const name = props.value;
|
|
6
6
|
if (!name) {
|
|
7
7
|
return null;
|
|
8
8
|
}
|
|
9
|
-
return
|
|
9
|
+
return React.createElement(React.Fragment, null, formatHumanName(name, props.options));
|
|
10
10
|
}
|
|
11
11
|
|
|
12
12
|
export { HumanNameDisplay };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"HumanNameDisplay.mjs","sources":["../../../src/HumanNameDisplay/HumanNameDisplay.tsx"],"sourcesContent":["import { formatHumanName, HumanNameFormatOptions } from '@medplum/core';\nimport { HumanName } from '@medplum/fhirtypes';\nimport React from 'react';\n\nexport interface HumanNameDisplayProps {\n value?: HumanName;\n options?: HumanNameFormatOptions;\n}\n\nexport function HumanNameDisplay(props: HumanNameDisplayProps): JSX.Element | null {\n const name = props.value;\n if (!name) {\n return null;\n }\n\n return <>{formatHumanName(name, props.options)}</>;\n}\n"],"names":[
|
|
1
|
+
{"version":3,"file":"HumanNameDisplay.mjs","sources":["../../../src/HumanNameDisplay/HumanNameDisplay.tsx"],"sourcesContent":["import { formatHumanName, HumanNameFormatOptions } from '@medplum/core';\nimport { HumanName } from '@medplum/fhirtypes';\nimport React from 'react';\n\nexport interface HumanNameDisplayProps {\n value?: HumanName;\n options?: HumanNameFormatOptions;\n}\n\nexport function HumanNameDisplay(props: HumanNameDisplayProps): JSX.Element | null {\n const name = props.value;\n if (!name) {\n return null;\n }\n\n return <>{formatHumanName(name, props.options)}</>;\n}\n"],"names":[],"mappings":";;;AASM,SAAU,gBAAgB,CAAC,KAA4B,EAAA;AAC3D,IAAA,MAAM,IAAI,GAAG,KAAK,CAAC,KAAK,CAAC;IACzB,IAAI,CAAC,IAAI,EAAE;AACT,QAAA,OAAO,IAAI,CAAC;AACb,KAAA;IAED,OAAO,KAAA,CAAA,aAAA,CAAA,KAAA,CAAA,QAAA,EAAA,IAAA,EAAG,eAAe,CAAC,IAAI,EAAE,KAAK,CAAC,OAAO,CAAC,CAAI,CAAC;AACrD;;;;"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Group, NativeSelect, TextInput } from '@mantine/core';
|
|
2
|
-
import
|
|
2
|
+
import React, { useState, useRef } from 'react';
|
|
3
3
|
|
|
4
4
|
function HumanNameInput(props) {
|
|
5
5
|
const [value, setValue] = useState(props.defaultValue);
|
|
@@ -38,12 +38,12 @@ function HumanNameInput(props) {
|
|
|
38
38
|
suffix: suffix ? suffix.split(' ') : undefined,
|
|
39
39
|
});
|
|
40
40
|
}
|
|
41
|
-
return (
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
41
|
+
return (React.createElement(Group, { spacing: "xs", grow: true, noWrap: true },
|
|
42
|
+
React.createElement(NativeSelect, { defaultValue: value?.use, "data-testid": "use", onChange: (e) => setUse(e.currentTarget.value), data: ['', 'temp', 'old', 'usual', 'official', 'nickname', 'anonymous', 'maiden'] }),
|
|
43
|
+
React.createElement(TextInput, { placeholder: "Prefix", defaultValue: value?.prefix?.join(' '), onChange: (e) => setPrefix(e.currentTarget.value) }),
|
|
44
|
+
React.createElement(TextInput, { placeholder: "Given", defaultValue: value?.given?.join(' '), onChange: (e) => setGiven(e.currentTarget.value) }),
|
|
45
|
+
React.createElement(TextInput, { placeholder: "Family", defaultValue: value?.family, onChange: (e) => setFamily(e.currentTarget.value) }),
|
|
46
|
+
React.createElement(TextInput, { placeholder: "Suffix", defaultValue: value?.suffix?.join(' '), onChange: (e) => setSuffix(e.currentTarget.value) })));
|
|
47
47
|
}
|
|
48
48
|
|
|
49
49
|
export { HumanNameInput };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"HumanNameInput.mjs","sources":["../../../src/HumanNameInput/HumanNameInput.tsx"],"sourcesContent":["import { Group, NativeSelect, TextInput } from '@mantine/core';\nimport { HumanName } from '@medplum/fhirtypes';\nimport React, { useRef, useState } from 'react';\n\nexport interface HumanNameInputProps {\n name: string;\n defaultValue?: HumanName;\n onChange?: (value: HumanName) => void;\n}\n\nexport function HumanNameInput(props: HumanNameInputProps): JSX.Element {\n const [value, setValue] = useState<HumanName | undefined>(props.defaultValue);\n\n const valueRef = useRef<HumanName>();\n valueRef.current = value;\n\n function setValueWrapper(newValue: HumanName): void {\n setValue(newValue);\n if (props.onChange) {\n props.onChange(newValue);\n }\n }\n\n function setUse(use: 'temp' | 'old' | 'usual' | 'official' | 'nickname' | 'anonymous' | 'maiden' | undefined): void {\n setValueWrapper({ ...valueRef.current, use: use ? use : undefined });\n }\n\n function setPrefix(prefix: string): void {\n setValueWrapper({\n ...valueRef.current,\n prefix: prefix ? prefix.split(' ') : undefined,\n });\n }\n\n function setGiven(given: string): void {\n setValueWrapper({\n ...valueRef.current,\n given: given ? given.split(' ') : undefined,\n });\n }\n\n function setFamily(family: string): void {\n setValueWrapper({\n ...valueRef.current,\n family: family ? family : undefined,\n });\n }\n\n function setSuffix(suffix: string): void {\n setValueWrapper({\n ...valueRef.current,\n suffix: suffix ? suffix.split(' ') : undefined,\n });\n }\n\n return (\n <Group spacing=\"xs\" grow noWrap>\n <NativeSelect\n defaultValue={value?.use}\n data-testid=\"use\"\n onChange={(e) =>\n setUse(e.currentTarget.value as 'temp' | 'old' | 'usual' | 'official' | 'nickname' | 'anonymous' | 'maiden')\n }\n data={['', 'temp', 'old', 'usual', 'official', 'nickname', 'anonymous', 'maiden']}\n />\n <TextInput\n placeholder=\"Prefix\"\n defaultValue={value?.prefix?.join(' ')}\n onChange={(e) => setPrefix(e.currentTarget.value)}\n />\n <TextInput\n placeholder=\"Given\"\n defaultValue={value?.given?.join(' ')}\n onChange={(e) => setGiven(e.currentTarget.value)}\n />\n <TextInput placeholder=\"Family\" defaultValue={value?.family} onChange={(e) => setFamily(e.currentTarget.value)} />\n <TextInput\n placeholder=\"Suffix\"\n defaultValue={value?.suffix?.join(' ')}\n onChange={(e) => setSuffix(e.currentTarget.value)}\n />\n </Group>\n );\n}\n"],"names":[
|
|
1
|
+
{"version":3,"file":"HumanNameInput.mjs","sources":["../../../src/HumanNameInput/HumanNameInput.tsx"],"sourcesContent":["import { Group, NativeSelect, TextInput } from '@mantine/core';\nimport { HumanName } from '@medplum/fhirtypes';\nimport React, { useRef, useState } from 'react';\n\nexport interface HumanNameInputProps {\n name: string;\n defaultValue?: HumanName;\n onChange?: (value: HumanName) => void;\n}\n\nexport function HumanNameInput(props: HumanNameInputProps): JSX.Element {\n const [value, setValue] = useState<HumanName | undefined>(props.defaultValue);\n\n const valueRef = useRef<HumanName>();\n valueRef.current = value;\n\n function setValueWrapper(newValue: HumanName): void {\n setValue(newValue);\n if (props.onChange) {\n props.onChange(newValue);\n }\n }\n\n function setUse(use: 'temp' | 'old' | 'usual' | 'official' | 'nickname' | 'anonymous' | 'maiden' | undefined): void {\n setValueWrapper({ ...valueRef.current, use: use ? use : undefined });\n }\n\n function setPrefix(prefix: string): void {\n setValueWrapper({\n ...valueRef.current,\n prefix: prefix ? prefix.split(' ') : undefined,\n });\n }\n\n function setGiven(given: string): void {\n setValueWrapper({\n ...valueRef.current,\n given: given ? given.split(' ') : undefined,\n });\n }\n\n function setFamily(family: string): void {\n setValueWrapper({\n ...valueRef.current,\n family: family ? family : undefined,\n });\n }\n\n function setSuffix(suffix: string): void {\n setValueWrapper({\n ...valueRef.current,\n suffix: suffix ? suffix.split(' ') : undefined,\n });\n }\n\n return (\n <Group spacing=\"xs\" grow noWrap>\n <NativeSelect\n defaultValue={value?.use}\n data-testid=\"use\"\n onChange={(e) =>\n setUse(e.currentTarget.value as 'temp' | 'old' | 'usual' | 'official' | 'nickname' | 'anonymous' | 'maiden')\n }\n data={['', 'temp', 'old', 'usual', 'official', 'nickname', 'anonymous', 'maiden']}\n />\n <TextInput\n placeholder=\"Prefix\"\n defaultValue={value?.prefix?.join(' ')}\n onChange={(e) => setPrefix(e.currentTarget.value)}\n />\n <TextInput\n placeholder=\"Given\"\n defaultValue={value?.given?.join(' ')}\n onChange={(e) => setGiven(e.currentTarget.value)}\n />\n <TextInput placeholder=\"Family\" defaultValue={value?.family} onChange={(e) => setFamily(e.currentTarget.value)} />\n <TextInput\n placeholder=\"Suffix\"\n defaultValue={value?.suffix?.join(' ')}\n onChange={(e) => setSuffix(e.currentTarget.value)}\n />\n </Group>\n );\n}\n"],"names":[],"mappings":";;;AAUM,SAAU,cAAc,CAAC,KAA0B,EAAA;AACvD,IAAA,MAAM,CAAC,KAAK,EAAE,QAAQ,CAAC,GAAG,QAAQ,CAAwB,KAAK,CAAC,YAAY,CAAC,CAAC;AAE9E,IAAA,MAAM,QAAQ,GAAG,MAAM,EAAa,CAAC;AACrC,IAAA,QAAQ,CAAC,OAAO,GAAG,KAAK,CAAC;IAEzB,SAAS,eAAe,CAAC,QAAmB,EAAA;QAC1C,QAAQ,CAAC,QAAQ,CAAC,CAAC;QACnB,IAAI,KAAK,CAAC,QAAQ,EAAE;AAClB,YAAA,KAAK,CAAC,QAAQ,CAAC,QAAQ,CAAC,CAAC;AAC1B,SAAA;KACF;IAED,SAAS,MAAM,CAAC,GAA4F,EAAA;QAC1G,eAAe,CAAC,EAAE,GAAG,QAAQ,CAAC,OAAO,EAAE,GAAG,EAAE,GAAG,GAAG,GAAG,GAAG,SAAS,EAAE,CAAC,CAAC;KACtE;IAED,SAAS,SAAS,CAAC,MAAc,EAAA;AAC/B,QAAA,eAAe,CAAC;YACd,GAAG,QAAQ,CAAC,OAAO;AACnB,YAAA,MAAM,EAAE,MAAM,GAAG,MAAM,CAAC,KAAK,CAAC,GAAG,CAAC,GAAG,SAAS;AAC/C,SAAA,CAAC,CAAC;KACJ;IAED,SAAS,QAAQ,CAAC,KAAa,EAAA;AAC7B,QAAA,eAAe,CAAC;YACd,GAAG,QAAQ,CAAC,OAAO;AACnB,YAAA,KAAK,EAAE,KAAK,GAAG,KAAK,CAAC,KAAK,CAAC,GAAG,CAAC,GAAG,SAAS;AAC5C,SAAA,CAAC,CAAC;KACJ;IAED,SAAS,SAAS,CAAC,MAAc,EAAA;AAC/B,QAAA,eAAe,CAAC;YACd,GAAG,QAAQ,CAAC,OAAO;YACnB,MAAM,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS;AACpC,SAAA,CAAC,CAAC;KACJ;IAED,SAAS,SAAS,CAAC,MAAc,EAAA;AAC/B,QAAA,eAAe,CAAC;YACd,GAAG,QAAQ,CAAC,OAAO;AACnB,YAAA,MAAM,EAAE,MAAM,GAAG,MAAM,CAAC,KAAK,CAAC,GAAG,CAAC,GAAG,SAAS;AAC/C,SAAA,CAAC,CAAC;KACJ;IAED,QACE,KAAC,CAAA,aAAA,CAAA,KAAK,EAAC,EAAA,OAAO,EAAC,IAAI,EAAC,IAAI,EAAA,IAAA,EAAC,MAAM,EAAA,IAAA,EAAA;QAC7B,KAAC,CAAA,aAAA,CAAA,YAAY,IACX,YAAY,EAAE,KAAK,EAAE,GAAG,iBACZ,KAAK,EACjB,QAAQ,EAAE,CAAC,CAAC,KACV,MAAM,CAAC,CAAC,CAAC,aAAa,CAAC,KAAoF,CAAC,EAE9G,IAAI,EAAE,CAAC,EAAE,EAAE,MAAM,EAAE,KAAK,EAAE,OAAO,EAAE,UAAU,EAAE,UAAU,EAAE,WAAW,EAAE,QAAQ,CAAC,EACjF,CAAA;AACF,QAAA,KAAA,CAAA,aAAA,CAAC,SAAS,EAAA,EACR,WAAW,EAAC,QAAQ,EACpB,YAAY,EAAE,KAAK,EAAE,MAAM,EAAE,IAAI,CAAC,GAAG,CAAC,EACtC,QAAQ,EAAE,CAAC,CAAC,KAAK,SAAS,CAAC,CAAC,CAAC,aAAa,CAAC,KAAK,CAAC,EACjD,CAAA;AACF,QAAA,KAAA,CAAA,aAAA,CAAC,SAAS,EAAA,EACR,WAAW,EAAC,OAAO,EACnB,YAAY,EAAE,KAAK,EAAE,KAAK,EAAE,IAAI,CAAC,GAAG,CAAC,EACrC,QAAQ,EAAE,CAAC,CAAC,KAAK,QAAQ,CAAC,CAAC,CAAC,aAAa,CAAC,KAAK,CAAC,EAChD,CAAA;QACF,KAAC,CAAA,aAAA,CAAA,SAAS,EAAC,EAAA,WAAW,EAAC,QAAQ,EAAC,YAAY,EAAE,KAAK,EAAE,MAAM,EAAE,QAAQ,EAAE,CAAC,CAAC,KAAK,SAAS,CAAC,CAAC,CAAC,aAAa,CAAC,KAAK,CAAC,EAAI,CAAA;AAClH,QAAA,KAAA,CAAA,aAAA,CAAC,SAAS,EAAA,EACR,WAAW,EAAC,QAAQ,EACpB,YAAY,EAAE,KAAK,EAAE,MAAM,EAAE,IAAI,CAAC,GAAG,CAAC,EACtC,QAAQ,EAAE,CAAC,CAAC,KAAK,SAAS,CAAC,CAAC,CAAC,aAAa,CAAC,KAAK,CAAC,EACjD,CAAA,CACI,EACR;AACJ;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"IdentifierDisplay.mjs","sources":["../../../src/IdentifierDisplay/IdentifierDisplay.tsx"],"sourcesContent":["import { Identifier } from '@medplum/fhirtypes';\nimport React from 'react';\n\nexport interface IdentifierDisplayProps {\n value?: Identifier;\n}\n\nexport function IdentifierDisplay(props: IdentifierDisplayProps): JSX.Element {\n return (\n <div>\n {props.value?.system}: {props.value?.value}\n </div>\n );\n}\n"],"names":[
|
|
1
|
+
{"version":3,"file":"IdentifierDisplay.mjs","sources":["../../../src/IdentifierDisplay/IdentifierDisplay.tsx"],"sourcesContent":["import { Identifier } from '@medplum/fhirtypes';\nimport React from 'react';\n\nexport interface IdentifierDisplayProps {\n value?: Identifier;\n}\n\nexport function IdentifierDisplay(props: IdentifierDisplayProps): JSX.Element {\n return (\n <div>\n {props.value?.system}: {props.value?.value}\n </div>\n );\n}\n"],"names":[],"mappings":";;AAOM,SAAU,iBAAiB,CAAC,KAA6B,EAAA;AAC7D,IAAA,QACE,KAAA,CAAA,aAAA,CAAA,KAAA,EAAA,IAAA;QACG,KAAK,CAAC,KAAK,EAAE,MAAM;;AAAI,QAAA,KAAK,CAAC,KAAK,EAAE,KAAK,CACtC,EACN;AACJ;;;;"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Group, TextInput } from '@mantine/core';
|
|
2
|
-
import
|
|
2
|
+
import React, { useState } from 'react';
|
|
3
3
|
|
|
4
4
|
function IdentifierInput(props) {
|
|
5
5
|
const [value, setValue] = useState(props.defaultValue);
|
|
@@ -9,9 +9,9 @@ function IdentifierInput(props) {
|
|
|
9
9
|
props.onChange(newValue);
|
|
10
10
|
}
|
|
11
11
|
}
|
|
12
|
-
return (
|
|
13
|
-
|
|
14
|
-
|
|
12
|
+
return (React.createElement(Group, { spacing: "xs", grow: true, noWrap: true },
|
|
13
|
+
React.createElement(TextInput, { placeholder: "System", defaultValue: value?.system, onChange: (e) => setValueWrapper({ ...value, system: e.currentTarget.value }) }),
|
|
14
|
+
React.createElement(TextInput, { placeholder: "Value", defaultValue: value?.value, onChange: (e) => setValueWrapper({ ...value, value: e.currentTarget.value }) })));
|
|
15
15
|
}
|
|
16
16
|
|
|
17
17
|
export { IdentifierInput };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"IdentifierInput.mjs","sources":["../../../src/IdentifierInput/IdentifierInput.tsx"],"sourcesContent":["import { Group, TextInput } from '@mantine/core';\nimport { Identifier } from '@medplum/fhirtypes';\nimport React, { useState } from 'react';\n\nexport interface IdentifierInputProps {\n name: string;\n defaultValue?: Identifier;\n onChange?: (value: Identifier) => void;\n}\n\nexport function IdentifierInput(props: IdentifierInputProps): JSX.Element {\n const [value, setValue] = useState(props.defaultValue);\n\n function setValueWrapper(newValue: Identifier): void {\n setValue(newValue);\n if (props.onChange) {\n props.onChange(newValue);\n }\n }\n\n return (\n <Group spacing=\"xs\" grow noWrap>\n <TextInput\n placeholder=\"System\"\n defaultValue={value?.system}\n onChange={(e) => setValueWrapper({ ...value, system: e.currentTarget.value })}\n />\n <TextInput\n placeholder=\"Value\"\n defaultValue={value?.value}\n onChange={(e) => setValueWrapper({ ...value, value: e.currentTarget.value })}\n />\n </Group>\n );\n}\n"],"names":[
|
|
1
|
+
{"version":3,"file":"IdentifierInput.mjs","sources":["../../../src/IdentifierInput/IdentifierInput.tsx"],"sourcesContent":["import { Group, TextInput } from '@mantine/core';\nimport { Identifier } from '@medplum/fhirtypes';\nimport React, { useState } from 'react';\n\nexport interface IdentifierInputProps {\n name: string;\n defaultValue?: Identifier;\n onChange?: (value: Identifier) => void;\n}\n\nexport function IdentifierInput(props: IdentifierInputProps): JSX.Element {\n const [value, setValue] = useState(props.defaultValue);\n\n function setValueWrapper(newValue: Identifier): void {\n setValue(newValue);\n if (props.onChange) {\n props.onChange(newValue);\n }\n }\n\n return (\n <Group spacing=\"xs\" grow noWrap>\n <TextInput\n placeholder=\"System\"\n defaultValue={value?.system}\n onChange={(e) => setValueWrapper({ ...value, system: e.currentTarget.value })}\n />\n <TextInput\n placeholder=\"Value\"\n defaultValue={value?.value}\n onChange={(e) => setValueWrapper({ ...value, value: e.currentTarget.value })}\n />\n </Group>\n );\n}\n"],"names":[],"mappings":";;;AAUM,SAAU,eAAe,CAAC,KAA2B,EAAA;AACzD,IAAA,MAAM,CAAC,KAAK,EAAE,QAAQ,CAAC,GAAG,QAAQ,CAAC,KAAK,CAAC,YAAY,CAAC,CAAC;IAEvD,SAAS,eAAe,CAAC,QAAoB,EAAA;QAC3C,QAAQ,CAAC,QAAQ,CAAC,CAAC;QACnB,IAAI,KAAK,CAAC,QAAQ,EAAE;AAClB,YAAA,KAAK,CAAC,QAAQ,CAAC,QAAQ,CAAC,CAAC;AAC1B,SAAA;KACF;IAED,QACE,KAAC,CAAA,aAAA,CAAA,KAAK,EAAC,EAAA,OAAO,EAAC,IAAI,EAAC,IAAI,EAAA,IAAA,EAAC,MAAM,EAAA,IAAA,EAAA;AAC7B,QAAA,KAAA,CAAA,aAAA,CAAC,SAAS,EAAA,EACR,WAAW,EAAC,QAAQ,EACpB,YAAY,EAAE,KAAK,EAAE,MAAM,EAC3B,QAAQ,EAAE,CAAC,CAAC,KAAK,eAAe,CAAC,EAAE,GAAG,KAAK,EAAE,MAAM,EAAE,CAAC,CAAC,aAAa,CAAC,KAAK,EAAE,CAAC,EAC7E,CAAA;AACF,QAAA,KAAA,CAAA,aAAA,CAAC,SAAS,EACR,EAAA,WAAW,EAAC,OAAO,EACnB,YAAY,EAAE,KAAK,EAAE,KAAK,EAC1B,QAAQ,EAAE,CAAC,CAAC,KAAK,eAAe,CAAC,EAAE,GAAG,KAAK,EAAE,KAAK,EAAE,CAAC,CAAC,aAAa,CAAC,KAAK,EAAE,CAAC,EAC5E,CAAA,CACI,EACR;AACJ;;;;"}
|
package/dist/esm/Logo/Logo.mjs
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import
|
|
1
|
+
import React from 'react';
|
|
2
2
|
|
|
3
3
|
function Logo(props) {
|
|
4
|
-
return (
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
4
|
+
return (React.createElement("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 491 491", style: { width: props.size, height: props.size } },
|
|
5
|
+
React.createElement("title", null, "Medplum Logo"),
|
|
6
|
+
React.createElement("path", { fill: props.fill || '#ad7136', d: "M282 67c6-16 16-29 29-40L289 0c-22 17-37 41-43 68l17 23 19-24z" }),
|
|
7
|
+
React.createElement("path", { fill: props.fill || '#946af9', d: "M311 63c-17 0-33 4-48 11-16-7-32-11-49-11-87 0-158 96-158 214s71 214 158 214c17 0 33-4 49-11 15 7 31 11 48 11 87 0 158-96 158-214S398 63 311 63z" }),
|
|
8
|
+
React.createElement("path", { fill: props.fill || '#7857c5', d: "M231 489l-17 2c-87 0-158-96-158-214S127 63 214 63l17 1c-39 12-70 102-70 213s31 201 70 212z" }),
|
|
9
|
+
React.createElement("path", { fill: props.fill || '#40bc26', d: "M207 220a176 176 0 01-177 43A176 176 0 01251 43l1 5c17 59 2 125-45 172z" }),
|
|
10
|
+
React.createElement("path", { fill: props.fill || '#33961e', d: "M252 48A421 421 0 0057 270l-27-7A176 176 0 01251 43l1 5z" })));
|
|
11
11
|
}
|
|
12
12
|
|
|
13
13
|
export { Logo };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Logo.mjs","sources":["../../../src/Logo/Logo.tsx"],"sourcesContent":["import React from 'react';\n\nexport interface LogoProps {\n size: number;\n fill?: string;\n}\n\nexport function Logo(props: LogoProps): JSX.Element {\n return (\n <svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 491 491\" style={{ width: props.size, height: props.size }}>\n <title>Medplum Logo</title>\n <path fill={props.fill || '#ad7136'} d=\"M282 67c6-16 16-29 29-40L289 0c-22 17-37 41-43 68l17 23 19-24z\" />\n <path\n fill={props.fill || '#946af9'}\n d=\"M311 63c-17 0-33 4-48 11-16-7-32-11-49-11-87 0-158 96-158 214s71 214 158 214c17 0 33-4 49-11 15 7 31 11 48 11 87 0 158-96 158-214S398 63 311 63z\"\n />\n <path\n fill={props.fill || '#7857c5'}\n d=\"M231 489l-17 2c-87 0-158-96-158-214S127 63 214 63l17 1c-39 12-70 102-70 213s31 201 70 212z\"\n />\n <path\n fill={props.fill || '#40bc26'}\n d=\"M207 220a176 176 0 01-177 43A176 176 0 01251 43l1 5c17 59 2 125-45 172z\"\n />\n <path fill={props.fill || '#33961e'} d=\"M252 48A421 421 0 0057 270l-27-7A176 176 0 01251 43l1 5z\" />\n </svg>\n );\n}\n"],"names":[
|
|
1
|
+
{"version":3,"file":"Logo.mjs","sources":["../../../src/Logo/Logo.tsx"],"sourcesContent":["import React from 'react';\n\nexport interface LogoProps {\n size: number;\n fill?: string;\n}\n\nexport function Logo(props: LogoProps): JSX.Element {\n return (\n <svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 491 491\" style={{ width: props.size, height: props.size }}>\n <title>Medplum Logo</title>\n <path fill={props.fill || '#ad7136'} d=\"M282 67c6-16 16-29 29-40L289 0c-22 17-37 41-43 68l17 23 19-24z\" />\n <path\n fill={props.fill || '#946af9'}\n d=\"M311 63c-17 0-33 4-48 11-16-7-32-11-49-11-87 0-158 96-158 214s71 214 158 214c17 0 33-4 49-11 15 7 31 11 48 11 87 0 158-96 158-214S398 63 311 63z\"\n />\n <path\n fill={props.fill || '#7857c5'}\n d=\"M231 489l-17 2c-87 0-158-96-158-214S127 63 214 63l17 1c-39 12-70 102-70 213s31 201 70 212z\"\n />\n <path\n fill={props.fill || '#40bc26'}\n d=\"M207 220a176 176 0 01-177 43A176 176 0 01251 43l1 5c17 59 2 125-45 172z\"\n />\n <path fill={props.fill || '#33961e'} d=\"M252 48A421 421 0 0057 270l-27-7A176 176 0 01251 43l1 5z\" />\n </svg>\n );\n}\n"],"names":[],"mappings":";;AAOM,SAAU,IAAI,CAAC,KAAgB,EAAA;IACnC,QACE,KAAK,CAAA,aAAA,CAAA,KAAA,EAAA,EAAA,KAAK,EAAC,4BAA4B,EAAC,OAAO,EAAC,aAAa,EAAC,KAAK,EAAE,EAAE,KAAK,EAAE,KAAK,CAAC,IAAI,EAAE,MAAM,EAAE,KAAK,CAAC,IAAI,EAAE,EAAA;QAC5G,KAA2B,CAAA,aAAA,CAAA,OAAA,EAAA,IAAA,EAAA,cAAA,CAAA;QAC3B,KAAM,CAAA,aAAA,CAAA,MAAA,EAAA,EAAA,IAAI,EAAE,KAAK,CAAC,IAAI,IAAI,SAAS,EAAE,CAAC,EAAC,gEAAgE,EAAG,CAAA;QAC1G,KACE,CAAA,aAAA,CAAA,MAAA,EAAA,EAAA,IAAI,EAAE,KAAK,CAAC,IAAI,IAAI,SAAS,EAC7B,CAAC,EAAC,kJAAkJ,EACpJ,CAAA;QACF,KACE,CAAA,aAAA,CAAA,MAAA,EAAA,EAAA,IAAI,EAAE,KAAK,CAAC,IAAI,IAAI,SAAS,EAC7B,CAAC,EAAC,4FAA4F,EAC9F,CAAA;QACF,KACE,CAAA,aAAA,CAAA,MAAA,EAAA,EAAA,IAAI,EAAE,KAAK,CAAC,IAAI,IAAI,SAAS,EAC7B,CAAC,EAAC,yEAAyE,EAC3E,CAAA;AACF,QAAA,KAAA,CAAA,aAAA,CAAA,MAAA,EAAA,EAAM,IAAI,EAAE,KAAK,CAAC,IAAI,IAAI,SAAS,EAAE,CAAC,EAAC,0DAA0D,EAAG,CAAA,CAChG,EACN;AACJ;;;;"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Anchor } from '@mantine/core';
|
|
2
|
-
import
|
|
2
|
+
import React from 'react';
|
|
3
3
|
import { useMedplumNavigate } from '../MedplumProvider/MedplumProvider.mjs';
|
|
4
4
|
import { killEvent } from '../utils/dom.mjs';
|
|
5
5
|
|
|
@@ -10,7 +10,7 @@ function MedplumLink(props) {
|
|
|
10
10
|
if (suffix) {
|
|
11
11
|
href += '/' + suffix;
|
|
12
12
|
}
|
|
13
|
-
return (
|
|
13
|
+
return (React.createElement(Anchor, { href: href, "aria-label": label, onClick: (e) => {
|
|
14
14
|
killEvent(e);
|
|
15
15
|
if (onClick) {
|
|
16
16
|
onClick();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MedplumLink.mjs","sources":["../../../src/MedplumLink/MedplumLink.tsx"],"sourcesContent":["import { Anchor, TextProps } from '@mantine/core';\nimport { Reference, Resource } from '@medplum/fhirtypes';\nimport React from 'react';\nimport { useMedplumNavigate } from '../MedplumProvider/MedplumProvider';\nimport { killEvent } from '../utils/dom';\n\nexport interface MedplumLinkProps extends TextProps {\n to?: Resource | Reference | string;\n suffix?: string;\n label?: string;\n onClick?: () => void;\n children: React.ReactNode;\n}\n\nexport function MedplumLink(props: MedplumLinkProps): JSX.Element {\n const navigate = useMedplumNavigate();\n const { to, suffix, label, onClick, children, ...rest } = props;\n\n let href = getHref(to);\n if (suffix) {\n href += '/' + suffix;\n }\n\n return (\n <Anchor\n href={href}\n aria-label={label}\n onClick={(e: React.SyntheticEvent) => {\n killEvent(e);\n if (onClick) {\n onClick();\n } else if (to) {\n navigate(href);\n }\n }}\n {...rest}\n >\n {children}\n </Anchor>\n );\n}\n\nfunction getHref(to: Resource | Reference | string | undefined): string {\n if (to) {\n if (typeof to === 'string') {\n return getStringHref(to);\n } else if ('resourceType' in to) {\n return getResourceHref(to);\n } else if ('reference' in to) {\n return getReferenceHref(to);\n }\n }\n return '#';\n}\n\nfunction getStringHref(to: string): string {\n if (to.startsWith('http://') || to.startsWith('https://') || to.startsWith('/')) {\n return to;\n }\n return '/' + to;\n}\n\nfunction getResourceHref(to: Resource): string {\n return `/${to.resourceType}/${to.id}`;\n}\n\nfunction getReferenceHref(to: Reference): string {\n return `/${to.reference}`;\n}\n"],"names":[
|
|
1
|
+
{"version":3,"file":"MedplumLink.mjs","sources":["../../../src/MedplumLink/MedplumLink.tsx"],"sourcesContent":["import { Anchor, TextProps } from '@mantine/core';\nimport { Reference, Resource } from '@medplum/fhirtypes';\nimport React from 'react';\nimport { useMedplumNavigate } from '../MedplumProvider/MedplumProvider';\nimport { killEvent } from '../utils/dom';\n\nexport interface MedplumLinkProps extends TextProps {\n to?: Resource | Reference | string;\n suffix?: string;\n label?: string;\n onClick?: () => void;\n children: React.ReactNode;\n}\n\nexport function MedplumLink(props: MedplumLinkProps): JSX.Element {\n const navigate = useMedplumNavigate();\n const { to, suffix, label, onClick, children, ...rest } = props;\n\n let href = getHref(to);\n if (suffix) {\n href += '/' + suffix;\n }\n\n return (\n <Anchor\n href={href}\n aria-label={label}\n onClick={(e: React.SyntheticEvent) => {\n killEvent(e);\n if (onClick) {\n onClick();\n } else if (to) {\n navigate(href);\n }\n }}\n {...rest}\n >\n {children}\n </Anchor>\n );\n}\n\nfunction getHref(to: Resource | Reference | string | undefined): string {\n if (to) {\n if (typeof to === 'string') {\n return getStringHref(to);\n } else if ('resourceType' in to) {\n return getResourceHref(to);\n } else if ('reference' in to) {\n return getReferenceHref(to);\n }\n }\n return '#';\n}\n\nfunction getStringHref(to: string): string {\n if (to.startsWith('http://') || to.startsWith('https://') || to.startsWith('/')) {\n return to;\n }\n return '/' + to;\n}\n\nfunction getResourceHref(to: Resource): string {\n return `/${to.resourceType}/${to.id}`;\n}\n\nfunction getReferenceHref(to: Reference): string {\n return `/${to.reference}`;\n}\n"],"names":[],"mappings":";;;;;AAcM,SAAU,WAAW,CAAC,KAAuB,EAAA;AACjD,IAAA,MAAM,QAAQ,GAAG,kBAAkB,EAAE,CAAC;AACtC,IAAA,MAAM,EAAE,EAAE,EAAE,MAAM,EAAE,KAAK,EAAE,OAAO,EAAE,QAAQ,EAAE,GAAG,IAAI,EAAE,GAAG,KAAK,CAAC;AAEhE,IAAA,IAAI,IAAI,GAAG,OAAO,CAAC,EAAE,CAAC,CAAC;AACvB,IAAA,IAAI,MAAM,EAAE;AACV,QAAA,IAAI,IAAI,GAAG,GAAG,MAAM,CAAC;AACtB,KAAA;AAED,IAAA,QACE,KAAA,CAAA,aAAA,CAAC,MAAM,EAAA,EACL,IAAI,EAAE,IAAI,EACE,YAAA,EAAA,KAAK,EACjB,OAAO,EAAE,CAAC,CAAuB,KAAI;YACnC,SAAS,CAAC,CAAC,CAAC,CAAC;AACb,YAAA,IAAI,OAAO,EAAE;AACX,gBAAA,OAAO,EAAE,CAAC;AACX,aAAA;AAAM,iBAAA,IAAI,EAAE,EAAE;gBACb,QAAQ,CAAC,IAAI,CAAC,CAAC;AAChB,aAAA;AACH,SAAC,KACG,IAAI,EAAA,EAEP,QAAQ,CACF,EACT;AACJ,CAAC;AAED,SAAS,OAAO,CAAC,EAA6C,EAAA;AAC5D,IAAA,IAAI,EAAE,EAAE;AACN,QAAA,IAAI,OAAO,EAAE,KAAK,QAAQ,EAAE;AAC1B,YAAA,OAAO,aAAa,CAAC,EAAE,CAAC,CAAC;AAC1B,SAAA;aAAM,IAAI,cAAc,IAAI,EAAE,EAAE;AAC/B,YAAA,OAAO,eAAe,CAAC,EAAE,CAAC,CAAC;AAC5B,SAAA;aAAM,IAAI,WAAW,IAAI,EAAE,EAAE;AAC5B,YAAA,OAAO,gBAAgB,CAAC,EAAE,CAAC,CAAC;AAC7B,SAAA;AACF,KAAA;AACD,IAAA,OAAO,GAAG,CAAC;AACb,CAAC;AAED,SAAS,aAAa,CAAC,EAAU,EAAA;IAC/B,IAAI,EAAE,CAAC,UAAU,CAAC,SAAS,CAAC,IAAI,EAAE,CAAC,UAAU,CAAC,UAAU,CAAC,IAAI,EAAE,CAAC,UAAU,CAAC,GAAG,CAAC,EAAE;AAC/E,QAAA,OAAO,EAAE,CAAC;AACX,KAAA;IACD,OAAO,GAAG,GAAG,EAAE,CAAC;AAClB,CAAC;AAED,SAAS,eAAe,CAAC,EAAY,EAAA;IACnC,OAAO,CAAA,CAAA,EAAI,EAAE,CAAC,YAAY,IAAI,EAAE,CAAC,EAAE,CAAA,CAAE,CAAC;AACxC,CAAC;AAED,SAAS,gBAAgB,CAAC,EAAa,EAAA;AACrC,IAAA,OAAO,CAAI,CAAA,EAAA,EAAE,CAAC,SAAS,EAAE,CAAC;AAC5B;;;;"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import
|
|
1
|
+
import React, { createContext, useState, useEffect, useContext } from 'react';
|
|
2
2
|
|
|
3
3
|
const reactContext = createContext(undefined);
|
|
4
4
|
/**
|
|
@@ -30,7 +30,7 @@ function MedplumProvider(props) {
|
|
|
30
30
|
medplum,
|
|
31
31
|
navigate,
|
|
32
32
|
};
|
|
33
|
-
return
|
|
33
|
+
return React.createElement(reactContext.Provider, { value: medplumContext }, props.children);
|
|
34
34
|
}
|
|
35
35
|
/**
|
|
36
36
|
* Returns the MedplumContext instance.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MedplumProvider.mjs","sources":["../../../src/MedplumProvider/MedplumProvider.tsx"],"sourcesContent":["import { MedplumClient, ProfileResource } from '@medplum/core';\nimport React, { createContext, useContext, useEffect, useState } from 'react';\n\nconst reactContext = createContext(undefined as MedplumContext | undefined);\n\nexport type MepdlumNavigateFunction = (path: string) => void;\n\nexport interface MedplumProviderProps {\n medplum: MedplumClient;\n navigate?: MepdlumNavigateFunction;\n children: React.ReactNode;\n}\n\nexport interface MedplumContext {\n medplum: MedplumClient;\n navigate: MepdlumNavigateFunction;\n profile?: ProfileResource;\n loading: boolean;\n}\n\n/**\n * The MedplumProvider component provides Medplum context state.\n *\n * Medplum context includes:\n * 1) medplum - Medplum client library\n * 2) profile - The current user profile (if signed in)\n */\nexport function MedplumProvider(props: MedplumProviderProps): JSX.Element {\n const medplum = props.medplum;\n const navigate = props.navigate || defaultNavigate;\n\n const [state, setState] = useState({\n profile: medplum.getProfile(),\n loading: false,\n });\n\n useEffect(() => {\n function eventListener(): void {\n setState({\n ...state,\n profile: medplum.getProfile(),\n });\n }\n\n medplum.addEventListener('change', eventListener);\n return () => medplum.removeEventListeneer('change', eventListener);\n }, [medplum, state]);\n\n const medplumContext = {\n ...state,\n medplum,\n navigate,\n };\n\n return <reactContext.Provider value={medplumContext}>{props.children}</reactContext.Provider>;\n}\n\n/**\n * Returns the MedplumContext instance.\n */\nexport function useMedplumContext(): MedplumContext {\n return useContext(reactContext) as MedplumContext;\n}\n\n/**\n * Returns the MedplumClient instance.\n * This is a shortcut for useMedplumContext().medplum.\n */\nexport function useMedplum(): MedplumClient {\n return useMedplumContext().medplum;\n}\n\n/**\n * Returns the Medplum navigate function.\n * @returns The Medplum navigate function.\n */\nexport function useMedplumNavigate(): MepdlumNavigateFunction {\n return useMedplumContext().navigate;\n}\n\n/**\n * Returns the current Medplum user profile (if signed in).\n * This is a shortcut for useMedplumContext().profile.\n * @returns The current user profile.\n */\nexport function useMedplumProfile(): ProfileResource | undefined {\n return useMedplumContext().profile;\n}\n\n/**\n * The default \"navigate\" function which simply uses window.location.href.\n * @param path The path to navigate to.\n */\nfunction defaultNavigate(path: string): void {\n window.location.assign(path);\n}\n"],"names":[
|
|
1
|
+
{"version":3,"file":"MedplumProvider.mjs","sources":["../../../src/MedplumProvider/MedplumProvider.tsx"],"sourcesContent":["import { MedplumClient, ProfileResource } from '@medplum/core';\nimport React, { createContext, useContext, useEffect, useState } from 'react';\n\nconst reactContext = createContext(undefined as MedplumContext | undefined);\n\nexport type MepdlumNavigateFunction = (path: string) => void;\n\nexport interface MedplumProviderProps {\n medplum: MedplumClient;\n navigate?: MepdlumNavigateFunction;\n children: React.ReactNode;\n}\n\nexport interface MedplumContext {\n medplum: MedplumClient;\n navigate: MepdlumNavigateFunction;\n profile?: ProfileResource;\n loading: boolean;\n}\n\n/**\n * The MedplumProvider component provides Medplum context state.\n *\n * Medplum context includes:\n * 1) medplum - Medplum client library\n * 2) profile - The current user profile (if signed in)\n */\nexport function MedplumProvider(props: MedplumProviderProps): JSX.Element {\n const medplum = props.medplum;\n const navigate = props.navigate || defaultNavigate;\n\n const [state, setState] = useState({\n profile: medplum.getProfile(),\n loading: false,\n });\n\n useEffect(() => {\n function eventListener(): void {\n setState({\n ...state,\n profile: medplum.getProfile(),\n });\n }\n\n medplum.addEventListener('change', eventListener);\n return () => medplum.removeEventListeneer('change', eventListener);\n }, [medplum, state]);\n\n const medplumContext = {\n ...state,\n medplum,\n navigate,\n };\n\n return <reactContext.Provider value={medplumContext}>{props.children}</reactContext.Provider>;\n}\n\n/**\n * Returns the MedplumContext instance.\n */\nexport function useMedplumContext(): MedplumContext {\n return useContext(reactContext) as MedplumContext;\n}\n\n/**\n * Returns the MedplumClient instance.\n * This is a shortcut for useMedplumContext().medplum.\n */\nexport function useMedplum(): MedplumClient {\n return useMedplumContext().medplum;\n}\n\n/**\n * Returns the Medplum navigate function.\n * @returns The Medplum navigate function.\n */\nexport function useMedplumNavigate(): MepdlumNavigateFunction {\n return useMedplumContext().navigate;\n}\n\n/**\n * Returns the current Medplum user profile (if signed in).\n * This is a shortcut for useMedplumContext().profile.\n * @returns The current user profile.\n */\nexport function useMedplumProfile(): ProfileResource | undefined {\n return useMedplumContext().profile;\n}\n\n/**\n * The default \"navigate\" function which simply uses window.location.href.\n * @param path The path to navigate to.\n */\nfunction defaultNavigate(path: string): void {\n window.location.assign(path);\n}\n"],"names":[],"mappings":";;AAGA,MAAM,YAAY,GAAG,aAAa,CAAC,SAAuC,CAAC,CAAC;AAiB5E;;;;;;AAMG;AACG,SAAU,eAAe,CAAC,KAA2B,EAAA;AACzD,IAAA,MAAM,OAAO,GAAG,KAAK,CAAC,OAAO,CAAC;AAC9B,IAAA,MAAM,QAAQ,GAAG,KAAK,CAAC,QAAQ,IAAI,eAAe,CAAC;AAEnD,IAAA,MAAM,CAAC,KAAK,EAAE,QAAQ,CAAC,GAAG,QAAQ,CAAC;AACjC,QAAA,OAAO,EAAE,OAAO,CAAC,UAAU,EAAE;AAC7B,QAAA,OAAO,EAAE,KAAK;AACf,KAAA,CAAC,CAAC;IAEH,SAAS,CAAC,MAAK;AACb,QAAA,SAAS,aAAa,GAAA;AACpB,YAAA,QAAQ,CAAC;AACP,gBAAA,GAAG,KAAK;AACR,gBAAA,OAAO,EAAE,OAAO,CAAC,UAAU,EAAE;AAC9B,aAAA,CAAC,CAAC;SACJ;AAED,QAAA,OAAO,CAAC,gBAAgB,CAAC,QAAQ,EAAE,aAAa,CAAC,CAAC;QAClD,OAAO,MAAM,OAAO,CAAC,oBAAoB,CAAC,QAAQ,EAAE,aAAa,CAAC,CAAC;AACrE,KAAC,EAAE,CAAC,OAAO,EAAE,KAAK,CAAC,CAAC,CAAC;AAErB,IAAA,MAAM,cAAc,GAAG;AACrB,QAAA,GAAG,KAAK;QACR,OAAO;QACP,QAAQ;KACT,CAAC;AAEF,IAAA,OAAO,KAAC,CAAA,aAAA,CAAA,YAAY,CAAC,QAAQ,EAAC,EAAA,KAAK,EAAE,cAAc,EAAG,EAAA,KAAK,CAAC,QAAQ,CAAyB,CAAC;AAChG,CAAC;AAED;;AAEG;SACa,iBAAiB,GAAA;AAC/B,IAAA,OAAO,UAAU,CAAC,YAAY,CAAmB,CAAC;AACpD,CAAC;AAED;;;AAGG;SACa,UAAU,GAAA;AACxB,IAAA,OAAO,iBAAiB,EAAE,CAAC,OAAO,CAAC;AACrC,CAAC;AAED;;;AAGG;SACa,kBAAkB,GAAA;AAChC,IAAA,OAAO,iBAAiB,EAAE,CAAC,QAAQ,CAAC;AACtC,CAAC;AAED;;;;AAIG;SACa,iBAAiB,GAAA;AAC/B,IAAA,OAAO,iBAAiB,EAAE,CAAC,OAAO,CAAC;AACrC,CAAC;AAED;;;AAGG;AACH,SAAS,eAAe,CAAC,IAAY,EAAA;AACnC,IAAA,MAAM,CAAC,QAAQ,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC;AAC/B;;;;"}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { formatMoney } from '@medplum/core';
|
|
2
|
-
import
|
|
2
|
+
import React from 'react';
|
|
3
3
|
|
|
4
4
|
function MoneyDisplay(props) {
|
|
5
|
-
return
|
|
5
|
+
return React.createElement(React.Fragment, null, formatMoney(props.value));
|
|
6
6
|
}
|
|
7
7
|
|
|
8
8
|
export { MoneyDisplay };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MoneyDisplay.mjs","sources":["../../../src/MoneyDisplay/MoneyDisplay.tsx"],"sourcesContent":["import { formatMoney } from '@medplum/core';\nimport { Money } from '@medplum/fhirtypes';\nimport React from 'react';\n\nexport interface MoneyDisplayProps {\n value?: Money;\n}\n\nexport function MoneyDisplay(props: MoneyDisplayProps): JSX.Element | null {\n return <>{formatMoney(props.value)}</>;\n}\n"],"names":[
|
|
1
|
+
{"version":3,"file":"MoneyDisplay.mjs","sources":["../../../src/MoneyDisplay/MoneyDisplay.tsx"],"sourcesContent":["import { formatMoney } from '@medplum/core';\nimport { Money } from '@medplum/fhirtypes';\nimport React from 'react';\n\nexport interface MoneyDisplayProps {\n value?: Money;\n}\n\nexport function MoneyDisplay(props: MoneyDisplayProps): JSX.Element | null {\n return <>{formatMoney(props.value)}</>;\n}\n"],"names":[],"mappings":";;;AAQM,SAAU,YAAY,CAAC,KAAwB,EAAA;IACnD,OAAO,KAAA,CAAA,aAAA,CAAA,KAAA,CAAA,QAAA,EAAA,IAAA,EAAG,WAAW,CAAC,KAAK,CAAC,KAAK,CAAC,CAAI,CAAC;AACzC;;;;"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { NativeSelect, TextInput } from '@mantine/core';
|
|
2
|
-
import {
|
|
3
|
-
import
|
|
2
|
+
import React, { useState, useCallback } from 'react';
|
|
3
|
+
import IconCurrencyDollar from '../node_modules/@tabler/icons-react/dist/esm/icons/IconCurrencyDollar.mjs';
|
|
4
4
|
|
|
5
5
|
/*
|
|
6
6
|
* Based on: https://github.com/mantinedev/ui.mantine.dev/blob/master/components/CurrencyInput/CurrencyInput.tsx
|
|
@@ -38,7 +38,7 @@ function MoneyInput(props) {
|
|
|
38
38
|
value: e.currentTarget.valueAsNumber,
|
|
39
39
|
});
|
|
40
40
|
}, [value, setValueWrapper]);
|
|
41
|
-
const select = (
|
|
41
|
+
const select = (React.createElement(NativeSelect, { defaultValue: value?.currency, data: data, styles: {
|
|
42
42
|
input: {
|
|
43
43
|
fontWeight: 500,
|
|
44
44
|
borderTopLeftRadius: 0,
|
|
@@ -46,7 +46,7 @@ function MoneyInput(props) {
|
|
|
46
46
|
width: 92,
|
|
47
47
|
},
|
|
48
48
|
}, onChange: handleCurrencyChange }));
|
|
49
|
-
return (
|
|
49
|
+
return (React.createElement(TextInput, { type: "number", label: props.label, placeholder: props.placeholder || 'Value', defaultValue: value?.value?.toString() || 'USD', icon: React.createElement(IconCurrencyDollar, { size: 14 }), rightSection: select, rightSectionWidth: 92, onChange: handleValueChange }));
|
|
50
50
|
}
|
|
51
51
|
|
|
52
52
|
export { MoneyInput };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MoneyInput.mjs","sources":["../../../src/MoneyInput/MoneyInput.tsx"],"sourcesContent":["import { NativeSelect, TextInput } from '@mantine/core';\nimport { Money } from '@medplum/fhirtypes';\nimport { IconCurrencyDollar } from '@tabler/icons';\nimport React, { useCallback, useState } from 'react';\n\n/*\n * Based on: https://github.com/mantinedev/ui.mantine.dev/blob/master/components/CurrencyInput/CurrencyInput.tsx\n */\n\n/**\n * List of currencies.\n *\n * Full list of currencies:\n * https://www.hl7.org/fhir/valueset-currencies.html\n *\n * Latest browsers can report list of supported currencies, but it's not widely supported:\n * https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/supportedValuesOf\n *\n * Using a short list for simplicity for now.\n */\nconst data = ['USD', 'EUR', 'CAD', 'GBP', 'AUD'];\n\nexport interface MoneyInputProps {\n name: string;\n label?: string;\n placeholder?: string;\n defaultValue?: Money;\n onChange?: (value: Money) => void;\n}\n\nexport function MoneyInput(props: MoneyInputProps): JSX.Element {\n const { onChange } = props;\n const [value, setValue] = useState(props.defaultValue);\n\n const setValueWrapper = useCallback(\n (newValue: Money): void => {\n setValue(newValue);\n if (onChange) {\n onChange(newValue);\n }\n },\n [onChange]\n );\n\n const handleCurrencyChange = useCallback(\n (e: React.ChangeEvent<HTMLSelectElement>) => {\n setValueWrapper({\n ...value,\n currency: e.currentTarget.value,\n });\n },\n [value, setValueWrapper]\n );\n\n const handleValueChange = useCallback(\n (e: React.ChangeEvent<HTMLInputElement>) => {\n setValueWrapper({\n ...value,\n value: e.currentTarget.valueAsNumber,\n });\n },\n [value, setValueWrapper]\n );\n\n const select = (\n <NativeSelect\n defaultValue={value?.currency}\n data={data}\n styles={{\n input: {\n fontWeight: 500,\n borderTopLeftRadius: 0,\n borderBottomLeftRadius: 0,\n width: 92,\n },\n }}\n onChange={handleCurrencyChange}\n />\n );\n\n return (\n <TextInput\n type=\"number\"\n label={props.label}\n placeholder={props.placeholder || 'Value'}\n defaultValue={value?.value?.toString() || 'USD'}\n icon={<IconCurrencyDollar size={14} />}\n rightSection={select}\n rightSectionWidth={92}\n onChange={handleValueChange}\n />\n );\n}\n"],"names":[
|
|
1
|
+
{"version":3,"file":"MoneyInput.mjs","sources":["../../../src/MoneyInput/MoneyInput.tsx"],"sourcesContent":["import { NativeSelect, TextInput } from '@mantine/core';\nimport { Money } from '@medplum/fhirtypes';\nimport { IconCurrencyDollar } from '@tabler/icons-react';\nimport React, { useCallback, useState } from 'react';\n\n/*\n * Based on: https://github.com/mantinedev/ui.mantine.dev/blob/master/components/CurrencyInput/CurrencyInput.tsx\n */\n\n/**\n * List of currencies.\n *\n * Full list of currencies:\n * https://www.hl7.org/fhir/valueset-currencies.html\n *\n * Latest browsers can report list of supported currencies, but it's not widely supported:\n * https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/supportedValuesOf\n *\n * Using a short list for simplicity for now.\n */\nconst data = ['USD', 'EUR', 'CAD', 'GBP', 'AUD'];\n\nexport interface MoneyInputProps {\n name: string;\n label?: string;\n placeholder?: string;\n defaultValue?: Money;\n onChange?: (value: Money) => void;\n}\n\nexport function MoneyInput(props: MoneyInputProps): JSX.Element {\n const { onChange } = props;\n const [value, setValue] = useState(props.defaultValue);\n\n const setValueWrapper = useCallback(\n (newValue: Money): void => {\n setValue(newValue);\n if (onChange) {\n onChange(newValue);\n }\n },\n [onChange]\n );\n\n const handleCurrencyChange = useCallback(\n (e: React.ChangeEvent<HTMLSelectElement>) => {\n setValueWrapper({\n ...value,\n currency: e.currentTarget.value,\n });\n },\n [value, setValueWrapper]\n );\n\n const handleValueChange = useCallback(\n (e: React.ChangeEvent<HTMLInputElement>) => {\n setValueWrapper({\n ...value,\n value: e.currentTarget.valueAsNumber,\n });\n },\n [value, setValueWrapper]\n );\n\n const select = (\n <NativeSelect\n defaultValue={value?.currency}\n data={data}\n styles={{\n input: {\n fontWeight: 500,\n borderTopLeftRadius: 0,\n borderBottomLeftRadius: 0,\n width: 92,\n },\n }}\n onChange={handleCurrencyChange}\n />\n );\n\n return (\n <TextInput\n type=\"number\"\n label={props.label}\n placeholder={props.placeholder || 'Value'}\n defaultValue={value?.value?.toString() || 'USD'}\n icon={<IconCurrencyDollar size={14} />}\n rightSection={select}\n rightSectionWidth={92}\n onChange={handleValueChange}\n />\n );\n}\n"],"names":[],"mappings":";;;;AAKA;;AAEG;AAEH;;;;;;;;;;AAUG;AACH,MAAM,IAAI,GAAG,CAAC,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,CAAC,CAAC;AAU3C,SAAU,UAAU,CAAC,KAAsB,EAAA;AAC/C,IAAA,MAAM,EAAE,QAAQ,EAAE,GAAG,KAAK,CAAC;AAC3B,IAAA,MAAM,CAAC,KAAK,EAAE,QAAQ,CAAC,GAAG,QAAQ,CAAC,KAAK,CAAC,YAAY,CAAC,CAAC;AAEvD,IAAA,MAAM,eAAe,GAAG,WAAW,CACjC,CAAC,QAAe,KAAU;QACxB,QAAQ,CAAC,QAAQ,CAAC,CAAC;AACnB,QAAA,IAAI,QAAQ,EAAE;YACZ,QAAQ,CAAC,QAAQ,CAAC,CAAC;AACpB,SAAA;AACH,KAAC,EACD,CAAC,QAAQ,CAAC,CACX,CAAC;AAEF,IAAA,MAAM,oBAAoB,GAAG,WAAW,CACtC,CAAC,CAAuC,KAAI;AAC1C,QAAA,eAAe,CAAC;AACd,YAAA,GAAG,KAAK;AACR,YAAA,QAAQ,EAAE,CAAC,CAAC,aAAa,CAAC,KAAK;AAChC,SAAA,CAAC,CAAC;AACL,KAAC,EACD,CAAC,KAAK,EAAE,eAAe,CAAC,CACzB,CAAC;AAEF,IAAA,MAAM,iBAAiB,GAAG,WAAW,CACnC,CAAC,CAAsC,KAAI;AACzC,QAAA,eAAe,CAAC;AACd,YAAA,GAAG,KAAK;AACR,YAAA,KAAK,EAAE,CAAC,CAAC,aAAa,CAAC,aAAa;AACrC,SAAA,CAAC,CAAC;AACL,KAAC,EACD,CAAC,KAAK,EAAE,eAAe,CAAC,CACzB,CAAC;AAEF,IAAA,MAAM,MAAM,IACV,KAAC,CAAA,aAAA,CAAA,YAAY,IACX,YAAY,EAAE,KAAK,EAAE,QAAQ,EAC7B,IAAI,EAAE,IAAI,EACV,MAAM,EAAE;AACN,YAAA,KAAK,EAAE;AACL,gBAAA,UAAU,EAAE,GAAG;AACf,gBAAA,mBAAmB,EAAE,CAAC;AACtB,gBAAA,sBAAsB,EAAE,CAAC;AACzB,gBAAA,KAAK,EAAE,EAAE;AACV,aAAA;AACF,SAAA,EACD,QAAQ,EAAE,oBAAoB,EAAA,CAC9B,CACH,CAAC;IAEF,QACE,KAAC,CAAA,aAAA,CAAA,SAAS,EACR,EAAA,IAAI,EAAC,QAAQ,EACb,KAAK,EAAE,KAAK,CAAC,KAAK,EAClB,WAAW,EAAE,KAAK,CAAC,WAAW,IAAI,OAAO,EACzC,YAAY,EAAE,KAAK,EAAE,KAAK,EAAE,QAAQ,EAAE,IAAI,KAAK,EAC/C,IAAI,EAAE,KAAC,CAAA,aAAA,CAAA,kBAAkB,EAAC,EAAA,IAAI,EAAE,EAAE,EAAI,CAAA,EACtC,YAAY,EAAE,MAAM,EACpB,iBAAiB,EAAE,EAAE,EACrB,QAAQ,EAAE,iBAAiB,EAC3B,CAAA,EACF;AACJ;;;;"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { createStyles, Stack, Blockquote } from '@mantine/core';
|
|
2
|
-
import
|
|
2
|
+
import React from 'react';
|
|
3
3
|
|
|
4
4
|
const useStyles = createStyles((theme) => ({
|
|
5
5
|
noteBody: { fontSize: theme.fontSizes.sm },
|
|
@@ -11,7 +11,7 @@ function NoteDisplay({ value }) {
|
|
|
11
11
|
if (!value) {
|
|
12
12
|
return null;
|
|
13
13
|
}
|
|
14
|
-
return (
|
|
14
|
+
return (React.createElement(Stack, { justify: "flex-start", spacing: "xs" }, value.map((note, index) => note.text && (React.createElement(Blockquote, { key: `note-${index}`, classNames: { cite: classes.noteCite, body: classes.noteBody, root: classes.noteRoot }, cite: note.authorReference?.display || note.authorString, icon: null }, note.text)))));
|
|
15
15
|
}
|
|
16
16
|
|
|
17
17
|
export { NoteDisplay };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"NoteDisplay.mjs","sources":["../../../src/NoteDisplay/NoteDisplay.tsx"],"sourcesContent":["import { Blockquote, createStyles, Stack } from '@mantine/core';\nimport { Annotation } from '@medplum/fhirtypes';\nimport React from 'react';\n\nconst useStyles = createStyles((theme) => ({\n noteBody: { fontSize: theme.fontSizes.sm },\n noteCite: { fontSize: theme.fontSizes.xs, marginBlockStart: 3 },\n noteRoot: { padding: 5 },\n}));\n\nexport interface NoteDisplayProps {\n value?: Annotation[];\n}\n\nexport function NoteDisplay({ value }: NoteDisplayProps): JSX.Element | null {\n const { classes } = useStyles();\n if (!value) {\n return null;\n }\n\n return (\n <Stack justify=\"flex-start\" spacing=\"xs\">\n {value.map(\n (note, index) =>\n note.text && (\n <Blockquote\n key={`note-${index}`}\n classNames={{ cite: classes.noteCite, body: classes.noteBody, root: classes.noteRoot }}\n cite={note.authorReference?.display || note.authorString}\n icon={null}\n >\n {note.text}\n </Blockquote>\n )\n )}\n </Stack>\n );\n}\n"],"names":[
|
|
1
|
+
{"version":3,"file":"NoteDisplay.mjs","sources":["../../../src/NoteDisplay/NoteDisplay.tsx"],"sourcesContent":["import { Blockquote, createStyles, Stack } from '@mantine/core';\nimport { Annotation } from '@medplum/fhirtypes';\nimport React from 'react';\n\nconst useStyles = createStyles((theme) => ({\n noteBody: { fontSize: theme.fontSizes.sm },\n noteCite: { fontSize: theme.fontSizes.xs, marginBlockStart: 3 },\n noteRoot: { padding: 5 },\n}));\n\nexport interface NoteDisplayProps {\n value?: Annotation[];\n}\n\nexport function NoteDisplay({ value }: NoteDisplayProps): JSX.Element | null {\n const { classes } = useStyles();\n if (!value) {\n return null;\n }\n\n return (\n <Stack justify=\"flex-start\" spacing=\"xs\">\n {value.map(\n (note, index) =>\n note.text && (\n <Blockquote\n key={`note-${index}`}\n classNames={{ cite: classes.noteCite, body: classes.noteBody, root: classes.noteRoot }}\n cite={note.authorReference?.display || note.authorString}\n icon={null}\n >\n {note.text}\n </Blockquote>\n )\n )}\n </Stack>\n );\n}\n"],"names":[],"mappings":";;;AAIA,MAAM,SAAS,GAAG,YAAY,CAAC,CAAC,KAAK,MAAM;IACzC,QAAQ,EAAE,EAAE,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC,EAAE,EAAE;AAC1C,IAAA,QAAQ,EAAE,EAAE,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC,EAAE,EAAE,gBAAgB,EAAE,CAAC,EAAE;AAC/D,IAAA,QAAQ,EAAE,EAAE,OAAO,EAAE,CAAC,EAAE;AACzB,CAAA,CAAC,CAAC,CAAC;AAMY,SAAA,WAAW,CAAC,EAAE,KAAK,EAAoB,EAAA;AACrD,IAAA,MAAM,EAAE,OAAO,EAAE,GAAG,SAAS,EAAE,CAAC;IAChC,IAAI,CAAC,KAAK,EAAE;AACV,QAAA,OAAO,IAAI,CAAC;AACb,KAAA;AAED,IAAA,QACE,KAAC,CAAA,aAAA,CAAA,KAAK,EAAC,EAAA,OAAO,EAAC,YAAY,EAAC,OAAO,EAAC,IAAI,EACrC,EAAA,KAAK,CAAC,GAAG,CACR,CAAC,IAAI,EAAE,KAAK,KACV,IAAI,CAAC,IAAI,KACP,KAAC,CAAA,aAAA,CAAA,UAAU,EACT,EAAA,GAAG,EAAE,CAAQ,KAAA,EAAA,KAAK,EAAE,EACpB,UAAU,EAAE,EAAE,IAAI,EAAE,OAAO,CAAC,QAAQ,EAAE,IAAI,EAAE,OAAO,CAAC,QAAQ,EAAE,IAAI,EAAE,OAAO,CAAC,QAAQ,EAAE,EACtF,IAAI,EAAE,IAAI,CAAC,eAAe,EAAE,OAAO,IAAI,IAAI,CAAC,YAAY,EACxD,IAAI,EAAE,IAAI,EAET,EAAA,IAAI,CAAC,IAAI,CACC,CACd,CACJ,CACK,EACR;AACJ;;;;"}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
import { OperationOutcomeIssue } from '@medplum/fhirtypes';
|
|
2
|
+
import { OperationOutcome, OperationOutcomeIssue } from '@medplum/fhirtypes';
|
|
3
3
|
export interface OperationOutcomeAlertProps {
|
|
4
|
+
outcome?: OperationOutcome;
|
|
4
5
|
issues?: OperationOutcomeIssue[];
|
|
5
6
|
}
|
|
6
7
|
export declare function OperationOutcomeAlert(props: OperationOutcomeAlertProps): JSX.Element | null;
|
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
import { Alert } from '@mantine/core';
|
|
2
|
-
import
|
|
3
|
-
import
|
|
2
|
+
import React from 'react';
|
|
3
|
+
import IconAlertCircle from '../node_modules/@tabler/icons-react/dist/esm/icons/IconAlertCircle.mjs';
|
|
4
4
|
|
|
5
5
|
function OperationOutcomeAlert(props) {
|
|
6
|
-
|
|
6
|
+
const issues = props.outcome?.issue || props.issues;
|
|
7
|
+
if (!issues) {
|
|
7
8
|
return null;
|
|
8
9
|
}
|
|
9
|
-
return (
|
|
10
|
+
return (React.createElement(Alert, { icon: React.createElement(IconAlertCircle, { size: 16 }), color: "red" }, issues.map((issue) => (React.createElement("div", { "data-testid": "text-field-error", key: issue.details?.text }, issue.details?.text)))));
|
|
10
11
|
}
|
|
11
12
|
|
|
12
13
|
export { OperationOutcomeAlert };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"OperationOutcomeAlert.mjs","sources":["../../../src/OperationOutcomeAlert/OperationOutcomeAlert.tsx"],"sourcesContent":["import { Alert } from '@mantine/core';\nimport { OperationOutcomeIssue } from '@medplum/fhirtypes';\nimport { IconAlertCircle } from '@tabler/icons';\nimport React from 'react';\n\nexport interface OperationOutcomeAlertProps {\n issues?: OperationOutcomeIssue[];\n}\n\nexport function OperationOutcomeAlert(props: OperationOutcomeAlertProps): JSX.Element | null {\n if (!
|
|
1
|
+
{"version":3,"file":"OperationOutcomeAlert.mjs","sources":["../../../src/OperationOutcomeAlert/OperationOutcomeAlert.tsx"],"sourcesContent":["import { Alert } from '@mantine/core';\nimport { OperationOutcome, OperationOutcomeIssue } from '@medplum/fhirtypes';\nimport { IconAlertCircle } from '@tabler/icons-react';\nimport React from 'react';\n\nexport interface OperationOutcomeAlertProps {\n outcome?: OperationOutcome;\n issues?: OperationOutcomeIssue[];\n}\n\nexport function OperationOutcomeAlert(props: OperationOutcomeAlertProps): JSX.Element | null {\n const issues = props.outcome?.issue || props.issues;\n if (!issues) {\n return null;\n }\n return (\n <Alert icon={<IconAlertCircle size={16} />} color=\"red\">\n {issues.map((issue) => (\n <div data-testid=\"text-field-error\" key={issue.details?.text}>\n {issue.details?.text}\n </div>\n ))}\n </Alert>\n );\n}\n"],"names":[],"mappings":";;;;AAUM,SAAU,qBAAqB,CAAC,KAAiC,EAAA;IACrE,MAAM,MAAM,GAAG,KAAK,CAAC,OAAO,EAAE,KAAK,IAAI,KAAK,CAAC,MAAM,CAAC;IACpD,IAAI,CAAC,MAAM,EAAE;AACX,QAAA,OAAO,IAAI,CAAC;AACb,KAAA;IACD,QACE,oBAAC,KAAK,EAAA,EAAC,IAAI,EAAE,KAAA,CAAA,aAAA,CAAC,eAAe,EAAA,EAAC,IAAI,EAAE,EAAE,EAAI,CAAA,EAAE,KAAK,EAAC,KAAK,IACpD,MAAM,CAAC,GAAG,CAAC,CAAC,KAAK,MAChB,KAAiB,CAAA,aAAA,CAAA,KAAA,EAAA,EAAA,aAAA,EAAA,kBAAkB,EAAC,GAAG,EAAE,KAAK,CAAC,OAAO,EAAE,IAAI,EACzD,EAAA,KAAK,CAAC,OAAO,EAAE,IAAI,CAChB,CACP,CAAC,CACI,EACR;AACJ;;;;"}
|
package/dist/esm/Panel/Panel.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { createStyles, useComponentDefaultProps, Paper } from '@mantine/core';
|
|
2
|
-
import
|
|
2
|
+
import React from 'react';
|
|
3
3
|
|
|
4
4
|
const useStyles = createStyles((theme, { width, fill }) => ({
|
|
5
5
|
paper: {
|
|
@@ -27,7 +27,7 @@ const defaultProps = {
|
|
|
27
27
|
function Panel(props) {
|
|
28
28
|
const { className, children, width, fill, unstyled, ...others } = useComponentDefaultProps('Panel', defaultProps, props);
|
|
29
29
|
const { classes, cx } = useStyles({ width, fill }, { name: 'Panel', unstyled });
|
|
30
|
-
return (
|
|
30
|
+
return (React.createElement(Paper, { className: cx(classes.paper, className), ...others }, children));
|
|
31
31
|
}
|
|
32
32
|
|
|
33
33
|
export { Panel };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Panel.mjs","sources":["../../../src/Panel/Panel.tsx"],"sourcesContent":["import { createStyles, Paper, PaperProps, useComponentDefaultProps } from '@mantine/core';\nimport React from 'react';\n\nexport interface PanelStylesParams {\n width?: number;\n fill?: boolean;\n}\n\nconst useStyles = createStyles((theme, { width, fill }: PanelStylesParams) => ({\n paper: {\n maxWidth: width,\n margin: `${theme.spacing.xl}px auto`,\n padding: fill ? 0 : theme.spacing.md,\n '@media (max-width: 800px)': {\n padding: fill ? 0 : 8,\n },\n '& img': {\n width: '100%',\n maxWidth: '100%',\n },\n '& video': {\n width: '100%',\n maxWidth: '100%',\n },\n },\n}));\n\nexport interface PanelProps extends PaperProps {\n width?: number;\n fill?: boolean;\n}\n\nconst defaultProps: Partial<PanelProps> = {\n shadow: 'xs',\n radius: 'md',\n withBorder: true,\n};\n\nexport function Panel(props: PanelProps): JSX.Element {\n const { className, children, width, fill, unstyled, ...others } = useComponentDefaultProps(\n 'Panel',\n defaultProps,\n props\n );\n const { classes, cx } = useStyles({ width, fill }, { name: 'Panel', unstyled });\n\n return (\n <Paper className={cx(classes.paper, className)} {...others}>\n {children}\n </Paper>\n );\n}\n"],"names":[
|
|
1
|
+
{"version":3,"file":"Panel.mjs","sources":["../../../src/Panel/Panel.tsx"],"sourcesContent":["import { createStyles, Paper, PaperProps, useComponentDefaultProps } from '@mantine/core';\nimport React from 'react';\n\nexport interface PanelStylesParams {\n width?: number;\n fill?: boolean;\n}\n\nconst useStyles = createStyles((theme, { width, fill }: PanelStylesParams) => ({\n paper: {\n maxWidth: width,\n margin: `${theme.spacing.xl}px auto`,\n padding: fill ? 0 : theme.spacing.md,\n '@media (max-width: 800px)': {\n padding: fill ? 0 : 8,\n },\n '& img': {\n width: '100%',\n maxWidth: '100%',\n },\n '& video': {\n width: '100%',\n maxWidth: '100%',\n },\n },\n}));\n\nexport interface PanelProps extends PaperProps {\n width?: number;\n fill?: boolean;\n}\n\nconst defaultProps: Partial<PanelProps> = {\n shadow: 'xs',\n radius: 'md',\n withBorder: true,\n};\n\nexport function Panel(props: PanelProps): JSX.Element {\n const { className, children, width, fill, unstyled, ...others } = useComponentDefaultProps(\n 'Panel',\n defaultProps,\n props\n );\n const { classes, cx } = useStyles({ width, fill }, { name: 'Panel', unstyled });\n\n return (\n <Paper className={cx(classes.paper, className)} {...others}>\n {children}\n </Paper>\n );\n}\n"],"names":[],"mappings":";;;AAQA,MAAM,SAAS,GAAG,YAAY,CAAC,CAAC,KAAK,EAAE,EAAE,KAAK,EAAE,IAAI,EAAqB,MAAM;AAC7E,IAAA,KAAK,EAAE;AACL,QAAA,QAAQ,EAAE,KAAK;AACf,QAAA,MAAM,EAAE,CAAG,EAAA,KAAK,CAAC,OAAO,CAAC,EAAE,CAAS,OAAA,CAAA;AACpC,QAAA,OAAO,EAAE,IAAI,GAAG,CAAC,GAAG,KAAK,CAAC,OAAO,CAAC,EAAE;AACpC,QAAA,2BAA2B,EAAE;YAC3B,OAAO,EAAE,IAAI,GAAG,CAAC,GAAG,CAAC;AACtB,SAAA;AACD,QAAA,OAAO,EAAE;AACP,YAAA,KAAK,EAAE,MAAM;AACb,YAAA,QAAQ,EAAE,MAAM;AACjB,SAAA;AACD,QAAA,SAAS,EAAE;AACT,YAAA,KAAK,EAAE,MAAM;AACb,YAAA,QAAQ,EAAE,MAAM;AACjB,SAAA;AACF,KAAA;AACF,CAAA,CAAC,CAAC,CAAC;AAOJ,MAAM,YAAY,GAAwB;AACxC,IAAA,MAAM,EAAE,IAAI;AACZ,IAAA,MAAM,EAAE,IAAI;AACZ,IAAA,UAAU,EAAE,IAAI;CACjB,CAAC;AAEI,SAAU,KAAK,CAAC,KAAiB,EAAA;IACrC,MAAM,EAAE,SAAS,EAAE,QAAQ,EAAE,KAAK,EAAE,IAAI,EAAE,QAAQ,EAAE,GAAG,MAAM,EAAE,GAAG,wBAAwB,CACxF,OAAO,EACP,YAAY,EACZ,KAAK,CACN,CAAC;IACF,MAAM,EAAE,OAAO,EAAE,EAAE,EAAE,GAAG,SAAS,CAAC,EAAE,KAAK,EAAE,IAAI,EAAE,EAAE,EAAE,IAAI,EAAE,OAAO,EAAE,QAAQ,EAAE,CAAC,CAAC;IAEhF,QACE,oBAAC,KAAK,EAAA,EAAC,SAAS,EAAE,EAAE,CAAC,OAAO,CAAC,KAAK,EAAE,SAAS,CAAC,EAAM,GAAA,MAAM,IACvD,QAAQ,CACH,EACR;AACJ;;;;"}
|
|
@@ -1,20 +1,20 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import
|
|
1
|
+
import { createReference } from '@medplum/core';
|
|
2
|
+
import React, { useCallback } from 'react';
|
|
3
3
|
import { ResourceTimeline } from '../ResourceTimeline/ResourceTimeline.mjs';
|
|
4
4
|
|
|
5
5
|
function PatientTimeline(props) {
|
|
6
|
-
const loadTimelineResources = useCallback((medplum,
|
|
7
|
-
return Promise.
|
|
8
|
-
medplum.readHistory('Patient',
|
|
9
|
-
medplum.search('Communication', 'subject=' +
|
|
10
|
-
medplum.search('Device', 'patient=' +
|
|
11
|
-
medplum.search('DeviceRequest', 'patient=' +
|
|
12
|
-
medplum.search('DiagnosticReport', 'subject=' +
|
|
13
|
-
medplum.search('Media', 'subject=' +
|
|
14
|
-
medplum.search('ServiceRequest', 'subject=' +
|
|
6
|
+
const loadTimelineResources = useCallback((medplum, _resourceType, id) => {
|
|
7
|
+
return Promise.allSettled([
|
|
8
|
+
medplum.readHistory('Patient', id),
|
|
9
|
+
medplum.search('Communication', 'subject=Patient/' + id),
|
|
10
|
+
medplum.search('Device', 'patient=Patient/' + id),
|
|
11
|
+
medplum.search('DeviceRequest', 'patient=Patient/' + id),
|
|
12
|
+
medplum.search('DiagnosticReport', 'subject=Patient/' + id),
|
|
13
|
+
medplum.search('Media', 'subject=Patient/' + id),
|
|
14
|
+
medplum.search('ServiceRequest', 'subject=Patient/' + id),
|
|
15
15
|
]);
|
|
16
16
|
}, []);
|
|
17
|
-
return (
|
|
17
|
+
return (React.createElement(ResourceTimeline, { value: props.patient, loadTimelineResources: loadTimelineResources, createCommunication: (resource, sender, text) => ({
|
|
18
18
|
resourceType: 'Communication',
|
|
19
19
|
status: 'completed',
|
|
20
20
|
subject: createReference(resource),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PatientTimeline.mjs","sources":["../../../src/PatientTimeline/PatientTimeline.tsx"],"sourcesContent":["import { createReference,
|
|
1
|
+
{"version":3,"file":"PatientTimeline.mjs","sources":["../../../src/PatientTimeline/PatientTimeline.tsx"],"sourcesContent":["import { createReference, MedplumClient, ProfileResource } from '@medplum/core';\nimport { Attachment, Patient, Reference, ResourceType } from '@medplum/fhirtypes';\nimport React, { useCallback } from 'react';\nimport { ResourceTimeline } from '../ResourceTimeline/ResourceTimeline';\n\nexport interface PatientTimelineProps {\n patient: Patient | Reference<Patient>;\n}\n\nexport function PatientTimeline(props: PatientTimelineProps): JSX.Element {\n const loadTimelineResources = useCallback((medplum: MedplumClient, _resourceType: ResourceType, id: string) => {\n return Promise.allSettled([\n medplum.readHistory('Patient', id),\n medplum.search('Communication', 'subject=Patient/' + id),\n medplum.search('Device', 'patient=Patient/' + id),\n medplum.search('DeviceRequest', 'patient=Patient/' + id),\n medplum.search('DiagnosticReport', 'subject=Patient/' + id),\n medplum.search('Media', 'subject=Patient/' + id),\n medplum.search('ServiceRequest', 'subject=Patient/' + id),\n ]);\n }, []);\n\n return (\n <ResourceTimeline\n value={props.patient}\n loadTimelineResources={loadTimelineResources}\n createCommunication={(resource: Patient, sender: ProfileResource, text: string) => ({\n resourceType: 'Communication',\n status: 'completed',\n subject: createReference(resource),\n sender: createReference(sender),\n sent: new Date().toISOString(),\n payload: [{ contentString: text }],\n })}\n createMedia={(resource: Patient, operator: ProfileResource, content: Attachment) => ({\n resourceType: 'Media',\n status: 'completed',\n subject: createReference(resource),\n operator: createReference(operator),\n issued: new Date().toISOString(),\n content,\n })}\n />\n );\n}\n"],"names":[],"mappings":";;;;AASM,SAAU,eAAe,CAAC,KAA2B,EAAA;IACzD,MAAM,qBAAqB,GAAG,WAAW,CAAC,CAAC,OAAsB,EAAE,aAA2B,EAAE,EAAU,KAAI;QAC5G,OAAO,OAAO,CAAC,UAAU,CAAC;AACxB,YAAA,OAAO,CAAC,WAAW,CAAC,SAAS,EAAE,EAAE,CAAC;YAClC,OAAO,CAAC,MAAM,CAAC,eAAe,EAAE,kBAAkB,GAAG,EAAE,CAAC;YACxD,OAAO,CAAC,MAAM,CAAC,QAAQ,EAAE,kBAAkB,GAAG,EAAE,CAAC;YACjD,OAAO,CAAC,MAAM,CAAC,eAAe,EAAE,kBAAkB,GAAG,EAAE,CAAC;YACxD,OAAO,CAAC,MAAM,CAAC,kBAAkB,EAAE,kBAAkB,GAAG,EAAE,CAAC;YAC3D,OAAO,CAAC,MAAM,CAAC,OAAO,EAAE,kBAAkB,GAAG,EAAE,CAAC;YAChD,OAAO,CAAC,MAAM,CAAC,gBAAgB,EAAE,kBAAkB,GAAG,EAAE,CAAC;AAC1D,SAAA,CAAC,CAAC;KACJ,EAAE,EAAE,CAAC,CAAC;IAEP,QACE,KAAC,CAAA,aAAA,CAAA,gBAAgB,EACf,EAAA,KAAK,EAAE,KAAK,CAAC,OAAO,EACpB,qBAAqB,EAAE,qBAAqB,EAC5C,mBAAmB,EAAE,CAAC,QAAiB,EAAE,MAAuB,EAAE,IAAY,MAAM;AAClF,YAAA,YAAY,EAAE,eAAe;AAC7B,YAAA,MAAM,EAAE,WAAW;AACnB,YAAA,OAAO,EAAE,eAAe,CAAC,QAAQ,CAAC;AAClC,YAAA,MAAM,EAAE,eAAe,CAAC,MAAM,CAAC;AAC/B,YAAA,IAAI,EAAE,IAAI,IAAI,EAAE,CAAC,WAAW,EAAE;AAC9B,YAAA,OAAO,EAAE,CAAC,EAAE,aAAa,EAAE,IAAI,EAAE,CAAC;AACnC,SAAA,CAAC,EACF,WAAW,EAAE,CAAC,QAAiB,EAAE,QAAyB,EAAE,OAAmB,MAAM;AACnF,YAAA,YAAY,EAAE,OAAO;AACrB,YAAA,MAAM,EAAE,WAAW;AACnB,YAAA,OAAO,EAAE,eAAe,CAAC,QAAQ,CAAC;AAClC,YAAA,QAAQ,EAAE,eAAe,CAAC,QAAQ,CAAC;AACnC,YAAA,MAAM,EAAE,IAAI,IAAI,EAAE,CAAC,WAAW,EAAE;YAChC,OAAO;SACR,CAAC,EAAA,CACF,EACF;AACJ;;;;"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Group } from '@mantine/core';
|
|
2
|
-
import
|
|
2
|
+
import React, { useState } from 'react';
|
|
3
3
|
import { DateTimeInput } from '../DateTimeInput/DateTimeInput.mjs';
|
|
4
4
|
|
|
5
5
|
function PeriodInput(props) {
|
|
@@ -10,9 +10,9 @@ function PeriodInput(props) {
|
|
|
10
10
|
props.onChange(newValue);
|
|
11
11
|
}
|
|
12
12
|
}
|
|
13
|
-
return (
|
|
14
|
-
|
|
15
|
-
|
|
13
|
+
return (React.createElement(Group, { spacing: "xs", grow: true, noWrap: true },
|
|
14
|
+
React.createElement(DateTimeInput, { name: props.name + '.start', placeholder: "Start", defaultValue: value?.start, onChange: (newValue) => setValueWrapper({ ...value, start: newValue }) }),
|
|
15
|
+
React.createElement(DateTimeInput, { name: props.name + '.end', placeholder: "End", defaultValue: value?.end, onChange: (newValue) => setValueWrapper({ ...value, end: newValue }) })));
|
|
16
16
|
}
|
|
17
17
|
|
|
18
18
|
export { PeriodInput };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PeriodInput.mjs","sources":["../../../src/PeriodInput/PeriodInput.tsx"],"sourcesContent":["import { Group } from '@mantine/core';\nimport { Period } from '@medplum/fhirtypes';\nimport React, { useState } from 'react';\nimport { DateTimeInput } from '../DateTimeInput/DateTimeInput';\n\nexport interface PeriodInputProps {\n name: string;\n defaultValue?: Period;\n onChange?: (value: Period) => void;\n}\n\nexport function PeriodInput(props: PeriodInputProps): JSX.Element {\n const [value, setValue] = useState(props.defaultValue);\n\n function setValueWrapper(newValue: Period): void {\n setValue(newValue);\n if (props.onChange) {\n props.onChange(newValue);\n }\n }\n\n return (\n <Group spacing=\"xs\" grow noWrap>\n <DateTimeInput\n name={props.name + '.start'}\n placeholder=\"Start\"\n defaultValue={value?.start}\n onChange={(newValue) => setValueWrapper({ ...value, start: newValue })}\n />\n <DateTimeInput\n name={props.name + '.end'}\n placeholder=\"End\"\n defaultValue={value?.end}\n onChange={(newValue) => setValueWrapper({ ...value, end: newValue })}\n />\n </Group>\n );\n}\n"],"names":[
|
|
1
|
+
{"version":3,"file":"PeriodInput.mjs","sources":["../../../src/PeriodInput/PeriodInput.tsx"],"sourcesContent":["import { Group } from '@mantine/core';\nimport { Period } from '@medplum/fhirtypes';\nimport React, { useState } from 'react';\nimport { DateTimeInput } from '../DateTimeInput/DateTimeInput';\n\nexport interface PeriodInputProps {\n name: string;\n defaultValue?: Period;\n onChange?: (value: Period) => void;\n}\n\nexport function PeriodInput(props: PeriodInputProps): JSX.Element {\n const [value, setValue] = useState(props.defaultValue);\n\n function setValueWrapper(newValue: Period): void {\n setValue(newValue);\n if (props.onChange) {\n props.onChange(newValue);\n }\n }\n\n return (\n <Group spacing=\"xs\" grow noWrap>\n <DateTimeInput\n name={props.name + '.start'}\n placeholder=\"Start\"\n defaultValue={value?.start}\n onChange={(newValue) => setValueWrapper({ ...value, start: newValue })}\n />\n <DateTimeInput\n name={props.name + '.end'}\n placeholder=\"End\"\n defaultValue={value?.end}\n onChange={(newValue) => setValueWrapper({ ...value, end: newValue })}\n />\n </Group>\n );\n}\n"],"names":[],"mappings":";;;;AAWM,SAAU,WAAW,CAAC,KAAuB,EAAA;AACjD,IAAA,MAAM,CAAC,KAAK,EAAE,QAAQ,CAAC,GAAG,QAAQ,CAAC,KAAK,CAAC,YAAY,CAAC,CAAC;IAEvD,SAAS,eAAe,CAAC,QAAgB,EAAA;QACvC,QAAQ,CAAC,QAAQ,CAAC,CAAC;QACnB,IAAI,KAAK,CAAC,QAAQ,EAAE;AAClB,YAAA,KAAK,CAAC,QAAQ,CAAC,QAAQ,CAAC,CAAC;AAC1B,SAAA;KACF;IAED,QACE,KAAC,CAAA,aAAA,CAAA,KAAK,EAAC,EAAA,OAAO,EAAC,IAAI,EAAC,IAAI,EAAA,IAAA,EAAC,MAAM,EAAA,IAAA,EAAA;AAC7B,QAAA,KAAA,CAAA,aAAA,CAAC,aAAa,EACZ,EAAA,IAAI,EAAE,KAAK,CAAC,IAAI,GAAG,QAAQ,EAC3B,WAAW,EAAC,OAAO,EACnB,YAAY,EAAE,KAAK,EAAE,KAAK,EAC1B,QAAQ,EAAE,CAAC,QAAQ,KAAK,eAAe,CAAC,EAAE,GAAG,KAAK,EAAE,KAAK,EAAE,QAAQ,EAAE,CAAC,EACtE,CAAA;AACF,QAAA,KAAA,CAAA,aAAA,CAAC,aAAa,EACZ,EAAA,IAAI,EAAE,KAAK,CAAC,IAAI,GAAG,MAAM,EACzB,WAAW,EAAC,KAAK,EACjB,YAAY,EAAE,KAAK,EAAE,GAAG,EACxB,QAAQ,EAAE,CAAC,QAAQ,KAAK,eAAe,CAAC,EAAE,GAAG,KAAK,EAAE,GAAG,EAAE,QAAQ,EAAE,CAAC,EACpE,CAAA,CACI,EACR;AACJ;;;;"}
|