@aehrc/smart-forms-renderer 0.44.3 → 1.0.0-alpha.10
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/.storybook/main.ts +6 -1
- package/lib/components/FormComponents/AttachmentItem/AttachmentField.js +3 -1
- package/lib/components/FormComponents/AttachmentItem/AttachmentField.js.map +1 -1
- package/lib/components/FormComponents/AttachmentItem/AttachmentFieldWrapper.js +2 -5
- package/lib/components/FormComponents/AttachmentItem/AttachmentFieldWrapper.js.map +1 -1
- package/lib/components/FormComponents/AttachmentItem/AttachmentFileDropBox.js +3 -1
- package/lib/components/FormComponents/AttachmentItem/AttachmentFileDropBox.js.map +1 -1
- package/lib/components/FormComponents/AttachmentItem/AttachmentFileDropBox.styles.d.ts +1 -0
- package/lib/components/FormComponents/AttachmentItem/AttachmentFileDropBox.styles.js +3 -4
- package/lib/components/FormComponents/AttachmentItem/AttachmentFileDropBox.styles.js.map +1 -1
- package/lib/components/FormComponents/AttachmentItem/AttachmentItem.d.ts +2 -2
- package/lib/components/FormComponents/AttachmentItem/AttachmentItem.js.map +1 -1
- package/lib/components/FormComponents/AttachmentItem/AttachmentUrlField.js +3 -1
- package/lib/components/FormComponents/AttachmentItem/AttachmentUrlField.js.map +1 -1
- package/lib/components/FormComponents/BooleanItem/BooleanField.js +27 -17
- package/lib/components/FormComponents/BooleanItem/BooleanField.js.map +1 -1
- package/lib/components/FormComponents/BooleanItem/BooleanItem.d.ts +2 -2
- package/lib/components/FormComponents/BooleanItem/BooleanItem.js +2 -2
- package/lib/components/FormComponents/BooleanItem/BooleanItem.js.map +1 -1
- package/lib/components/FormComponents/BooleanItem/index.d.ts +1 -0
- package/lib/components/FormComponents/BooleanItem/index.js +18 -0
- package/lib/components/FormComponents/BooleanItem/index.js.map +1 -0
- package/lib/components/FormComponents/ChoiceItems/ChoiceAutocompleteField.d.ts +2 -2
- package/lib/components/FormComponents/ChoiceItems/ChoiceAutocompleteField.js +8 -6
- package/lib/components/FormComponents/ChoiceItems/ChoiceAutocompleteField.js.map +1 -1
- package/lib/components/FormComponents/ChoiceItems/ChoiceAutocompleteItem.d.ts +2 -2
- package/lib/components/FormComponents/ChoiceItems/ChoiceAutocompleteItem.js +4 -4
- package/lib/components/FormComponents/ChoiceItems/ChoiceAutocompleteItem.js.map +1 -1
- package/lib/components/FormComponents/ChoiceItems/ChoiceCheckboxAnswerOptionItem.d.ts +2 -2
- package/lib/components/FormComponents/ChoiceItems/ChoiceCheckboxAnswerOptionItem.js +4 -5
- package/lib/components/FormComponents/ChoiceItems/ChoiceCheckboxAnswerOptionItem.js.map +1 -1
- package/lib/components/FormComponents/ChoiceItems/ChoiceCheckboxAnswerValueSetItem.d.ts +2 -2
- package/lib/components/FormComponents/ChoiceItems/ChoiceCheckboxAnswerValueSetItem.js +4 -5
- package/lib/components/FormComponents/ChoiceItems/ChoiceCheckboxAnswerValueSetItem.js.map +1 -1
- package/lib/components/FormComponents/ChoiceItems/ChoiceItemSwitcher.d.ts +2 -2
- package/lib/components/FormComponents/ChoiceItems/ChoiceItemSwitcher.js +8 -8
- package/lib/components/FormComponents/ChoiceItems/ChoiceItemSwitcher.js.map +1 -1
- package/lib/components/FormComponents/ChoiceItems/ChoiceRadioAnswerOptionFields.js +7 -13
- package/lib/components/FormComponents/ChoiceItems/ChoiceRadioAnswerOptionFields.js.map +1 -1
- package/lib/components/FormComponents/ChoiceItems/ChoiceRadioAnswerOptionItem.d.ts +2 -2
- package/lib/components/FormComponents/ChoiceItems/ChoiceRadioAnswerOptionItem.js +2 -2
- package/lib/components/FormComponents/ChoiceItems/ChoiceRadioAnswerOptionItem.js.map +1 -1
- package/lib/components/FormComponents/ChoiceItems/ChoiceRadioAnswerOptionView.js +2 -2
- package/lib/components/FormComponents/ChoiceItems/ChoiceRadioAnswerOptionView.js.map +1 -1
- package/lib/components/FormComponents/ChoiceItems/ChoiceRadioAnswerValueSetFields.js +7 -13
- package/lib/components/FormComponents/ChoiceItems/ChoiceRadioAnswerValueSetFields.js.map +1 -1
- package/lib/components/FormComponents/ChoiceItems/ChoiceRadioAnswerValueSetItem.d.ts +2 -2
- package/lib/components/FormComponents/ChoiceItems/ChoiceRadioAnswerValueSetItem.js +2 -2
- package/lib/components/FormComponents/ChoiceItems/ChoiceRadioAnswerValueSetItem.js.map +1 -1
- package/lib/components/FormComponents/ChoiceItems/ChoiceRadioSingle.d.ts +1 -0
- package/lib/components/FormComponents/ChoiceItems/ChoiceRadioSingle.js +3 -3
- package/lib/components/FormComponents/ChoiceItems/ChoiceRadioSingle.js.map +1 -1
- package/lib/components/FormComponents/ChoiceItems/ChoiceSelectAnswerOptionFields.d.ts +2 -2
- package/lib/components/FormComponents/ChoiceItems/ChoiceSelectAnswerOptionFields.js +8 -6
- package/lib/components/FormComponents/ChoiceItems/ChoiceSelectAnswerOptionFields.js.map +1 -1
- package/lib/components/FormComponents/ChoiceItems/ChoiceSelectAnswerOptionItem.d.ts +2 -2
- package/lib/components/FormComponents/ChoiceItems/ChoiceSelectAnswerOptionItem.js +2 -2
- package/lib/components/FormComponents/ChoiceItems/ChoiceSelectAnswerOptionItem.js.map +1 -1
- package/lib/components/FormComponents/ChoiceItems/ChoiceSelectAnswerOptionView.d.ts +2 -2
- package/lib/components/FormComponents/ChoiceItems/ChoiceSelectAnswerOptionView.js +4 -4
- package/lib/components/FormComponents/ChoiceItems/ChoiceSelectAnswerOptionView.js.map +1 -1
- package/lib/components/FormComponents/ChoiceItems/ChoiceSelectAnswerValueSetFields.d.ts +2 -2
- package/lib/components/FormComponents/ChoiceItems/ChoiceSelectAnswerValueSetFields.js +7 -6
- package/lib/components/FormComponents/ChoiceItems/ChoiceSelectAnswerValueSetFields.js.map +1 -1
- package/lib/components/FormComponents/ChoiceItems/ChoiceSelectAnswerValueSetItem.d.ts +2 -2
- package/lib/components/FormComponents/ChoiceItems/ChoiceSelectAnswerValueSetItem.js +4 -4
- package/lib/components/FormComponents/ChoiceItems/ChoiceSelectAnswerValueSetItem.js.map +1 -1
- package/lib/components/FormComponents/ChoiceItems/index.d.ts +1 -0
- package/lib/components/FormComponents/ChoiceItems/index.js +18 -0
- package/lib/components/FormComponents/ChoiceItems/index.js.map +1 -0
- package/lib/components/FormComponents/DateTimeItems/CustomDateItem/CustomDateField.js +3 -1
- package/lib/components/FormComponents/DateTimeItems/CustomDateItem/CustomDateField.js.map +1 -1
- package/lib/components/FormComponents/DateTimeItems/CustomDateItem/CustomDateItem.d.ts +2 -2
- package/lib/components/FormComponents/DateTimeItems/CustomDateItem/CustomDateItem.js +4 -5
- package/lib/components/FormComponents/DateTimeItems/CustomDateItem/CustomDateItem.js.map +1 -1
- package/lib/components/FormComponents/DateTimeItems/CustomDateTimeItem/CustomDateTimeItem.d.ts +2 -2
- package/lib/components/FormComponents/DateTimeItems/CustomDateTimeItem/CustomDateTimeItem.js +4 -5
- package/lib/components/FormComponents/DateTimeItems/CustomDateTimeItem/CustomDateTimeItem.js.map +1 -1
- package/lib/components/FormComponents/DateTimeItems/CustomDateTimeItem/CustomTimeField.js +3 -2
- package/lib/components/FormComponents/DateTimeItems/CustomDateTimeItem/CustomTimeField.js.map +1 -1
- package/lib/components/FormComponents/DecimalItem/DecimalField.js +5 -2
- package/lib/components/FormComponents/DecimalItem/DecimalField.js.map +1 -1
- package/lib/components/FormComponents/DecimalItem/DecimalItem.d.ts +2 -2
- package/lib/components/FormComponents/DecimalItem/DecimalItem.js +4 -5
- package/lib/components/FormComponents/DecimalItem/DecimalItem.js.map +1 -1
- package/lib/components/FormComponents/DisplayItem/DisplayItem.d.ts +2 -1
- package/lib/components/FormComponents/DisplayItem/DisplayItem.js +13 -2
- package/lib/components/FormComponents/DisplayItem/DisplayItem.js.map +1 -1
- package/lib/components/FormComponents/GroupItem/GroupAccordion.styles.d.ts +1 -1
- package/lib/components/FormComponents/GroupItem/GroupHeading.js +10 -2
- package/lib/components/FormComponents/GroupItem/GroupHeading.js.map +1 -1
- package/lib/components/FormComponents/GroupItem/GroupItem.d.ts +1 -0
- package/lib/components/FormComponents/GroupItem/GroupItem.js +2 -2
- package/lib/components/FormComponents/GroupItem/GroupItem.js.map +1 -1
- package/lib/components/FormComponents/GroupItem/GroupItemSwitcher.js +10 -0
- package/lib/components/FormComponents/GroupItem/GroupItemSwitcher.js.map +1 -1
- package/lib/components/FormComponents/GroupItem/GroupItemView.d.ts +1 -0
- package/lib/components/FormComponents/GroupItem/GroupItemView.js +12 -2
- package/lib/components/FormComponents/GroupItem/GroupItemView.js.map +1 -1
- package/lib/components/FormComponents/GroupItem/PageButtonWrapper.js +7 -0
- package/lib/components/FormComponents/GroupItem/PageButtonWrapper.js.map +1 -1
- package/lib/components/FormComponents/GroupItem/index.d.ts +1 -0
- package/lib/components/FormComponents/GroupItem/index.js +18 -0
- package/lib/components/FormComponents/GroupItem/index.js.map +1 -0
- package/lib/components/FormComponents/IntegerItem/IntegerField.js +5 -2
- package/lib/components/FormComponents/IntegerItem/IntegerField.js.map +1 -1
- package/lib/components/FormComponents/IntegerItem/IntegerItem.d.ts +2 -2
- package/lib/components/FormComponents/IntegerItem/IntegerItem.js +4 -5
- package/lib/components/FormComponents/IntegerItem/IntegerItem.js.map +1 -1
- package/lib/components/FormComponents/ItemParts/CheckboxSingle.js +2 -2
- package/lib/components/FormComponents/ItemParts/CheckboxSingle.js.map +1 -1
- package/lib/components/FormComponents/ItemParts/CheckboxSingleWithOpenLabel.js +4 -2
- package/lib/components/FormComponents/ItemParts/CheckboxSingleWithOpenLabel.js.map +1 -1
- package/lib/components/FormComponents/ItemParts/ClearInputButton.d.ts +8 -0
- package/lib/components/FormComponents/ItemParts/ClearInputButton.js +33 -0
- package/lib/components/FormComponents/ItemParts/ClearInputButton.js.map +1 -0
- package/lib/components/FormComponents/ItemParts/ContextDisplayItem.js +1 -1
- package/lib/components/FormComponents/ItemParts/ContextDisplayItem.js.map +1 -1
- package/lib/components/FormComponents/ItemParts/FlyoverItem.d.ts +2 -1
- package/lib/components/FormComponents/ItemParts/FlyoverItem.js +2 -2
- package/lib/components/FormComponents/ItemParts/FlyoverItem.js.map +1 -1
- package/lib/components/FormComponents/ItemParts/ItemFieldGrid.d.ts +2 -1
- package/lib/components/FormComponents/ItemParts/ItemFieldGrid.js +9 -8
- package/lib/components/FormComponents/ItemParts/ItemFieldGrid.js.map +1 -1
- package/lib/components/FormComponents/ItemParts/ItemLabelText.d.ts +1 -1
- package/lib/components/FormComponents/ItemParts/ItemLabelText.js +31 -13
- package/lib/components/FormComponents/ItemParts/ItemLabelText.js.map +1 -1
- package/lib/components/FormComponents/ItemParts/ItemLabelWrapper.js +7 -21
- package/lib/components/FormComponents/ItemParts/ItemLabelWrapper.js.map +1 -1
- package/lib/components/FormComponents/ItemParts/RadioButtonWithOpenLabel.js +4 -2
- package/lib/components/FormComponents/ItemParts/RadioButtonWithOpenLabel.js.map +1 -1
- package/lib/components/FormComponents/ItemParts/RadioOptionList.d.ts +1 -0
- package/lib/components/FormComponents/ItemParts/RadioOptionList.js +4 -4
- package/lib/components/FormComponents/ItemParts/RadioOptionList.js.map +1 -1
- package/lib/components/FormComponents/ItemParts/RequiredAsterisk.d.ts +7 -0
- package/lib/components/FormComponents/ItemParts/RequiredAsterisk.js +35 -0
- package/lib/components/FormComponents/ItemParts/RequiredAsterisk.js.map +1 -0
- package/lib/components/FormComponents/ItemParts/index.d.ts +1 -0
- package/lib/components/FormComponents/ItemParts/index.js +1 -0
- package/lib/components/FormComponents/ItemParts/index.js.map +1 -1
- package/lib/components/FormComponents/OpenChoiceItems/OpenChoiceAutocompleteField.d.ts +2 -2
- package/lib/components/FormComponents/OpenChoiceItems/OpenChoiceAutocompleteField.js +8 -6
- package/lib/components/FormComponents/OpenChoiceItems/OpenChoiceAutocompleteField.js.map +1 -1
- package/lib/components/FormComponents/OpenChoiceItems/OpenChoiceAutocompleteItem.d.ts +2 -2
- package/lib/components/FormComponents/OpenChoiceItems/OpenChoiceAutocompleteItem.js +4 -4
- package/lib/components/FormComponents/OpenChoiceItems/OpenChoiceAutocompleteItem.js.map +1 -1
- package/lib/components/FormComponents/OpenChoiceItems/OpenChoiceCheckboxAnswerOptionItem.d.ts +2 -2
- package/lib/components/FormComponents/OpenChoiceItems/OpenChoiceCheckboxAnswerOptionItem.js +4 -5
- package/lib/components/FormComponents/OpenChoiceItems/OpenChoiceCheckboxAnswerOptionItem.js.map +1 -1
- package/lib/components/FormComponents/OpenChoiceItems/OpenChoiceCheckboxAnswerValueSetItem.d.ts +2 -2
- package/lib/components/FormComponents/OpenChoiceItems/OpenChoiceCheckboxAnswerValueSetItem.js +4 -5
- package/lib/components/FormComponents/OpenChoiceItems/OpenChoiceCheckboxAnswerValueSetItem.js.map +1 -1
- package/lib/components/FormComponents/OpenChoiceItems/OpenChoiceItemSwitcher.d.ts +2 -2
- package/lib/components/FormComponents/OpenChoiceItems/OpenChoiceItemSwitcher.js +8 -8
- package/lib/components/FormComponents/OpenChoiceItems/OpenChoiceItemSwitcher.js.map +1 -1
- package/lib/components/FormComponents/OpenChoiceItems/OpenChoiceRadioAnswerOptionFields.js +4 -2
- package/lib/components/FormComponents/OpenChoiceItems/OpenChoiceRadioAnswerOptionFields.js.map +1 -1
- package/lib/components/FormComponents/OpenChoiceItems/OpenChoiceRadioAnswerOptionItem.d.ts +2 -2
- package/lib/components/FormComponents/OpenChoiceItems/OpenChoiceRadioAnswerOptionItem.js +2 -2
- package/lib/components/FormComponents/OpenChoiceItems/OpenChoiceRadioAnswerOptionItem.js.map +1 -1
- package/lib/components/FormComponents/OpenChoiceItems/OpenChoiceRadioAnswerValueSetFields.js +4 -2
- package/lib/components/FormComponents/OpenChoiceItems/OpenChoiceRadioAnswerValueSetFields.js.map +1 -1
- package/lib/components/FormComponents/OpenChoiceItems/OpenChoiceRadioAnswerValueSetItem.d.ts +2 -2
- package/lib/components/FormComponents/OpenChoiceItems/OpenChoiceRadioAnswerValueSetItem.js +2 -2
- package/lib/components/FormComponents/OpenChoiceItems/OpenChoiceRadioAnswerValueSetItem.js.map +1 -1
- package/lib/components/FormComponents/OpenChoiceItems/OpenChoiceSelectAnswerOptionField.d.ts +2 -2
- package/lib/components/FormComponents/OpenChoiceItems/OpenChoiceSelectAnswerOptionField.js +8 -6
- package/lib/components/FormComponents/OpenChoiceItems/OpenChoiceSelectAnswerOptionField.js.map +1 -1
- package/lib/components/FormComponents/OpenChoiceItems/OpenChoiceSelectAnswerOptionItem.d.ts +2 -2
- package/lib/components/FormComponents/OpenChoiceItems/OpenChoiceSelectAnswerOptionItem.js +4 -4
- package/lib/components/FormComponents/OpenChoiceItems/OpenChoiceSelectAnswerOptionItem.js.map +1 -1
- package/lib/components/FormComponents/OpenChoiceItems/OpenChoiceSelectAnswerValueSetField.d.ts +2 -2
- package/lib/components/FormComponents/OpenChoiceItems/OpenChoiceSelectAnswerValueSetField.js +7 -6
- package/lib/components/FormComponents/OpenChoiceItems/OpenChoiceSelectAnswerValueSetField.js.map +1 -1
- package/lib/components/FormComponents/OpenChoiceItems/OpenChoiceSelectAnswerValueSetItem.d.ts +2 -2
- package/lib/components/FormComponents/OpenChoiceItems/OpenChoiceSelectAnswerValueSetItem.js +4 -4
- package/lib/components/FormComponents/OpenChoiceItems/OpenChoiceSelectAnswerValueSetItem.js.map +1 -1
- package/lib/components/FormComponents/QuantityItem/QuantityComparatorField.d.ts +1 -1
- package/lib/components/FormComponents/QuantityItem/QuantityComparatorField.js +5 -0
- package/lib/components/FormComponents/QuantityItem/QuantityComparatorField.js.map +1 -1
- package/lib/components/FormComponents/QuantityItem/QuantityField.js +5 -2
- package/lib/components/FormComponents/QuantityItem/QuantityField.js.map +1 -1
- package/lib/components/FormComponents/QuantityItem/QuantityItem.d.ts +2 -2
- package/lib/components/FormComponents/QuantityItem/QuantityItem.js +15 -11
- package/lib/components/FormComponents/QuantityItem/QuantityItem.js.map +1 -1
- package/lib/components/FormComponents/QuantityItem/QuantityUnitField.js +4 -2
- package/lib/components/FormComponents/QuantityItem/QuantityUnitField.js.map +1 -1
- package/lib/components/FormComponents/RepeatGroup/RepeatGroupItem.js +1 -1
- package/lib/components/FormComponents/RepeatGroup/RepeatGroupItem.js.map +1 -1
- package/lib/components/FormComponents/RepeatItem/RepeatItem.js +3 -3
- package/lib/components/FormComponents/RepeatItem/RepeatItem.js.map +1 -1
- package/lib/components/FormComponents/SingleItem/NestedSingleItemAccordion.styles.d.ts +1 -1
- package/lib/components/FormComponents/SingleItem/SingleItem.js +1 -1
- package/lib/components/FormComponents/SingleItem/SingleItem.js.map +1 -1
- package/lib/components/FormComponents/SingleItem/SingleItemSwitcher.d.ts +2 -2
- package/lib/components/FormComponents/SingleItem/SingleItemSwitcher.js +26 -18
- package/lib/components/FormComponents/SingleItem/SingleItemSwitcher.js.map +1 -1
- package/lib/components/FormComponents/SingleItem/SingleItemView.js +5 -4
- package/lib/components/FormComponents/SingleItem/SingleItemView.js.map +1 -1
- package/lib/components/FormComponents/SingleItem/SingleNestedItems.js +1 -0
- package/lib/components/FormComponents/SingleItem/SingleNestedItems.js.map +1 -1
- package/lib/components/FormComponents/SliderItem/SliderField.js +3 -2
- package/lib/components/FormComponents/SliderItem/SliderField.js.map +1 -1
- package/lib/components/FormComponents/SliderItem/SliderItem.d.ts +2 -2
- package/lib/components/FormComponents/SliderItem/SliderItem.js +3 -3
- package/lib/components/FormComponents/SliderItem/SliderItem.js.map +1 -1
- package/lib/components/FormComponents/StringItem/StringField.js +5 -2
- package/lib/components/FormComponents/StringItem/StringField.js.map +1 -1
- package/lib/components/FormComponents/StringItem/StringItem.d.ts +2 -2
- package/lib/components/FormComponents/StringItem/StringItem.js +4 -5
- package/lib/components/FormComponents/StringItem/StringItem.js.map +1 -1
- package/lib/components/FormComponents/TextItem/TextField.js +3 -2
- package/lib/components/FormComponents/TextItem/TextField.js.map +1 -1
- package/lib/components/FormComponents/TextItem/TextItem.d.ts +2 -2
- package/lib/components/FormComponents/TextItem/TextItem.js +4 -5
- package/lib/components/FormComponents/TextItem/TextItem.js.map +1 -1
- package/lib/components/FormComponents/Textfield.styles.d.ts +1 -1
- package/lib/components/FormComponents/Textfield.styles.js +5 -6
- package/lib/components/FormComponents/Textfield.styles.js.map +1 -1
- package/lib/components/FormComponents/TimeItem/TimeField.js +3 -2
- package/lib/components/FormComponents/TimeItem/TimeField.js.map +1 -1
- package/lib/components/FormComponents/TimeItem/TimeItem.d.ts +2 -2
- package/lib/components/FormComponents/TimeItem/TimeItem.js +4 -5
- package/lib/components/FormComponents/TimeItem/TimeItem.js.map +1 -1
- package/lib/components/FormComponents/UrlItem/UrlField.js +7 -1
- package/lib/components/FormComponents/UrlItem/UrlField.js.map +1 -1
- package/lib/components/FormComponents/UrlItem/UrlItem.d.ts +2 -2
- package/lib/components/FormComponents/UrlItem/UrlItem.js +4 -5
- package/lib/components/FormComponents/UrlItem/UrlItem.js.map +1 -1
- package/lib/components/FormComponents/index.d.ts +6 -0
- package/lib/components/FormComponents/index.js +7 -0
- package/lib/components/FormComponents/index.js.map +1 -1
- package/lib/components/Renderer/BaseRenderer.js +5 -5
- package/lib/components/Renderer/BaseRenderer.js.map +1 -1
- package/lib/components/Renderer/FormTopLevelItem.js +0 -7
- package/lib/components/Renderer/FormTopLevelItem.js.map +1 -1
- package/lib/components/index.d.ts +2 -1
- package/lib/components/index.js +3 -1
- package/lib/components/index.js.map +1 -1
- package/lib/hooks/index.d.ts +7 -0
- package/lib/hooks/index.js +8 -0
- package/lib/hooks/index.js.map +1 -1
- package/lib/hooks/useBuildForm.d.ts +8 -1
- package/lib/hooks/useBuildForm.js +23 -3
- package/lib/hooks/useBuildForm.js.map +1 -1
- package/lib/hooks/useCodingCalculatedExpression.d.ts +2 -1
- package/lib/hooks/useCodingCalculatedExpression.js +1 -1
- package/lib/hooks/useCodingCalculatedExpression.js.map +1 -1
- package/lib/hooks/useHidden.js +8 -0
- package/lib/hooks/useHidden.js.map +1 -1
- package/lib/hooks/useParseXhtml.d.ts +3 -0
- package/lib/hooks/useParseXhtml.js +60 -0
- package/lib/hooks/useParseXhtml.js.map +1 -0
- package/lib/hooks/useReadOnly.d.ts +1 -1
- package/lib/hooks/useReadOnly.js +22 -1
- package/lib/hooks/useReadOnly.js.map +1 -1
- package/lib/hooks/useRenderingExtensions.d.ts +3 -2
- package/lib/hooks/useValidationFeedback.js +5 -3
- package/lib/hooks/useValidationFeedback.js.map +1 -1
- package/lib/hooks/useValueSetCodings.js +7 -1
- package/lib/hooks/useValueSetCodings.js.map +1 -1
- package/lib/hooks/useXhtmlParse.d.ts +4 -0
- package/lib/hooks/useXhtmlParse.js +63 -0
- package/lib/hooks/useXhtmlParse.js.map +1 -0
- package/lib/index.d.ts +6 -6
- package/lib/index.js +4 -4
- package/lib/index.js.map +1 -1
- package/lib/interfaces/index.d.ts +2 -0
- package/lib/interfaces/overrideComponent.interface.d.ts +12 -3
- package/lib/interfaces/qItemOverrideComponent.interface.d.ts +7 -6
- package/lib/interfaces/renderProps.interface.d.ts +4 -0
- package/lib/stores/index.d.ts +2 -0
- package/lib/stores/index.js +1 -0
- package/lib/stores/index.js.map +1 -1
- package/lib/stores/questionnaireStore.d.ts +17 -9
- package/lib/stores/questionnaireStore.js +47 -22
- package/lib/stores/questionnaireStore.js.map +1 -1
- package/lib/stores/rendererStylingStore.d.ts +35 -3
- package/lib/stores/rendererStylingStore.js +20 -4
- package/lib/stores/rendererStylingStore.js.map +1 -1
- package/lib/utils/calculatedExpression.d.ts +5 -4
- package/lib/utils/calculatedExpression.js +76 -55
- package/lib/utils/calculatedExpression.js.map +1 -1
- package/lib/utils/enableWhenExpression.d.ts +10 -8
- package/lib/utils/enableWhenExpression.js +153 -118
- package/lib/utils/enableWhenExpression.js.map +1 -1
- package/lib/utils/fhirpath.d.ts +7 -5
- package/lib/utils/fhirpath.js +105 -72
- package/lib/utils/fhirpath.js.map +1 -1
- package/lib/utils/getExpressionsFromItem.d.ts +2 -1
- package/lib/utils/getExpressionsFromItem.js +1 -1
- package/lib/utils/getExpressionsFromItem.js.map +1 -1
- package/lib/utils/index.d.ts +6 -2
- package/lib/utils/index.js +6 -2
- package/lib/utils/index.js.map +1 -1
- package/lib/utils/initialise.d.ts +3 -2
- package/lib/utils/initialise.js +49 -36
- package/lib/utils/initialise.js.map +1 -1
- package/lib/utils/itemControl.d.ts +4 -1
- package/lib/utils/itemControl.js +27 -0
- package/lib/utils/itemControl.js.map +1 -1
- package/lib/utils/manageForm.d.ts +5 -1
- package/lib/utils/manageForm.js +4 -2
- package/lib/utils/manageForm.js.map +1 -1
- package/lib/utils/misc.d.ts +0 -1
- package/lib/utils/misc.js +1 -1
- package/lib/utils/misc.js.map +1 -1
- package/lib/utils/openChoice.js +2 -10
- package/lib/utils/openChoice.js.map +1 -1
- package/lib/utils/page.d.ts +3 -3
- package/lib/utils/page.js +2 -5
- package/lib/utils/page.js.map +1 -1
- package/lib/utils/questionnaireStoreUtils/createQuestionaireModel.js +1 -1
- package/lib/utils/questionnaireStoreUtils/createQuestionaireModel.js.map +1 -1
- package/lib/utils/questionnaireStoreUtils/extractOtherExtensions.d.ts +1 -1
- package/lib/utils/questionnaireStoreUtils/extractOtherExtensions.js +166 -150
- package/lib/utils/questionnaireStoreUtils/extractOtherExtensions.js.map +1 -1
- package/lib/utils/questionnaireStoreUtils/extractPages.js +5 -11
- package/lib/utils/questionnaireStoreUtils/extractPages.js.map +1 -1
- package/lib/utils/repopulateItems.js +0 -8
- package/lib/utils/repopulateItems.js.map +1 -1
- package/lib/utils/validateQuestionnaire.js +8 -4
- package/lib/utils/validateQuestionnaire.js.map +1 -1
- package/package.json +3 -3
- package/src/components/FormComponents/AttachmentItem/AttachmentField.tsx +4 -0
- package/src/components/FormComponents/AttachmentItem/AttachmentFieldWrapper.tsx +17 -15
- package/src/components/FormComponents/AttachmentItem/AttachmentFileDropBox.styles.ts +12 -10
- package/src/components/FormComponents/AttachmentItem/AttachmentFileDropBox.tsx +4 -0
- package/src/components/FormComponents/AttachmentItem/AttachmentItem.tsx +3 -1
- package/src/components/FormComponents/AttachmentItem/AttachmentUrlField.tsx +4 -0
- package/src/components/FormComponents/BooleanItem/BooleanField.tsx +87 -30
- package/src/components/FormComponents/BooleanItem/BooleanItem.tsx +20 -11
- package/src/components/FormComponents/BooleanItem/index.ts +18 -0
- package/src/components/FormComponents/ChoiceItems/ChoiceAutocompleteField.tsx +16 -7
- package/src/components/FormComponents/ChoiceItems/ChoiceAutocompleteItem.tsx +34 -16
- package/src/components/FormComponents/ChoiceItems/ChoiceCheckboxAnswerOptionItem.tsx +19 -11
- package/src/components/FormComponents/ChoiceItems/ChoiceCheckboxAnswerValueSetItem.tsx +20 -12
- package/src/components/FormComponents/ChoiceItems/ChoiceItemSwitcher.tsx +19 -2
- package/src/components/FormComponents/ChoiceItems/ChoiceRadioAnswerOptionFields.tsx +10 -20
- package/src/components/FormComponents/ChoiceItems/ChoiceRadioAnswerOptionItem.tsx +13 -2
- package/src/components/FormComponents/ChoiceItems/ChoiceRadioAnswerOptionView.tsx +17 -11
- package/src/components/FormComponents/ChoiceItems/ChoiceRadioAnswerValueSetFields.tsx +11 -20
- package/src/components/FormComponents/ChoiceItems/ChoiceRadioAnswerValueSetItem.tsx +21 -13
- package/src/components/FormComponents/ChoiceItems/ChoiceRadioSingle.tsx +5 -4
- package/src/components/FormComponents/ChoiceItems/ChoiceSelectAnswerOptionFields.tsx +28 -8
- package/src/components/FormComponents/ChoiceItems/ChoiceSelectAnswerOptionItem.tsx +13 -2
- package/src/components/FormComponents/ChoiceItems/ChoiceSelectAnswerOptionView.tsx +24 -13
- package/src/components/FormComponents/ChoiceItems/ChoiceSelectAnswerValueSetFields.tsx +18 -7
- package/src/components/FormComponents/ChoiceItems/ChoiceSelectAnswerValueSetItem.tsx +32 -14
- package/src/components/FormComponents/ChoiceItems/index.ts +18 -0
- package/src/components/FormComponents/DateTimeItems/CustomDateItem/CustomDateField.tsx +4 -0
- package/src/components/FormComponents/DateTimeItems/CustomDateItem/CustomDateItem.tsx +36 -21
- package/src/components/FormComponents/DateTimeItems/CustomDateTimeItem/CustomDateTimeItem.tsx +40 -25
- package/src/components/FormComponents/DateTimeItems/CustomDateTimeItem/CustomTimeField.tsx +4 -19
- package/src/components/FormComponents/DecimalItem/DecimalField.tsx +8 -1
- package/src/components/FormComponents/DecimalItem/DecimalItem.tsx +33 -18
- package/src/components/FormComponents/DecimalItem/index.ts +18 -0
- package/src/components/FormComponents/DisplayItem/DisplayItem.tsx +18 -3
- package/src/components/FormComponents/GroupItem/GroupHeading.tsx +27 -6
- package/src/components/FormComponents/GroupItem/GroupItem.tsx +3 -0
- package/src/components/FormComponents/GroupItem/GroupItemSwitcher.tsx +26 -0
- package/src/components/FormComponents/GroupItem/GroupItemView.tsx +34 -1
- package/src/components/FormComponents/GroupItem/PageButtonWrapper.tsx +8 -0
- package/src/components/FormComponents/GroupItem/index.ts +18 -0
- package/src/components/FormComponents/IntegerItem/IntegerField.tsx +8 -1
- package/src/components/FormComponents/IntegerItem/IntegerItem.tsx +33 -18
- package/src/components/FormComponents/ItemParts/CheckboxSingle.tsx +2 -3
- package/src/components/FormComponents/ItemParts/CheckboxSingleWithOpenLabel.tsx +4 -1
- package/src/components/FormComponents/ItemParts/ClearInputButton.tsx +52 -0
- package/src/components/FormComponents/ItemParts/ContextDisplayItem.tsx +1 -1
- package/src/components/FormComponents/ItemParts/FlyoverItem.tsx +62 -0
- package/src/components/FormComponents/ItemParts/ItemFieldGrid.tsx +23 -9
- package/src/components/FormComponents/ItemParts/ItemLabelText.tsx +64 -13
- package/src/components/FormComponents/ItemParts/ItemLabelWrapper.tsx +15 -36
- package/src/components/FormComponents/ItemParts/RadioButtonWithOpenLabel.tsx +11 -1
- package/src/components/FormComponents/ItemParts/RadioOptionList.tsx +5 -1
- package/src/components/FormComponents/ItemParts/RequiredAsterisk.tsx +36 -0
- package/src/components/FormComponents/ItemParts/index.ts +19 -0
- package/src/components/FormComponents/OpenChoiceItems/OpenChoiceAutocompleteField.tsx +16 -7
- package/src/components/FormComponents/OpenChoiceItems/OpenChoiceAutocompleteItem.tsx +35 -17
- package/src/components/FormComponents/OpenChoiceItems/OpenChoiceCheckboxAnswerOptionItem.tsx +25 -17
- package/src/components/FormComponents/OpenChoiceItems/OpenChoiceCheckboxAnswerValueSetItem.tsx +26 -18
- package/src/components/FormComponents/OpenChoiceItems/OpenChoiceItemSwitcher.tsx +19 -2
- package/src/components/FormComponents/OpenChoiceItems/OpenChoiceRadioAnswerOptionFields.tsx +5 -1
- package/src/components/FormComponents/OpenChoiceItems/OpenChoiceRadioAnswerOptionItem.tsx +22 -14
- package/src/components/FormComponents/OpenChoiceItems/OpenChoiceRadioAnswerValueSetFields.tsx +5 -1
- package/src/components/FormComponents/OpenChoiceItems/OpenChoiceRadioAnswerValueSetItem.tsx +23 -15
- package/src/components/FormComponents/OpenChoiceItems/OpenChoiceSelectAnswerOptionField.tsx +16 -8
- package/src/components/FormComponents/OpenChoiceItems/OpenChoiceSelectAnswerOptionItem.tsx +30 -12
- package/src/components/FormComponents/OpenChoiceItems/OpenChoiceSelectAnswerValueSetField.tsx +24 -9
- package/src/components/FormComponents/OpenChoiceItems/OpenChoiceSelectAnswerValueSetItem.tsx +31 -13
- package/src/components/FormComponents/QuantityItem/QuantityComparatorField.tsx +6 -0
- package/src/components/FormComponents/QuantityItem/QuantityField.tsx +8 -1
- package/src/components/FormComponents/QuantityItem/QuantityItem.tsx +56 -35
- package/src/components/FormComponents/QuantityItem/QuantityUnitField.tsx +8 -3
- package/src/components/FormComponents/RepeatGroup/RepeatGroupItem.tsx +1 -1
- package/src/components/FormComponents/RepeatItem/RepeatItem.tsx +34 -28
- package/src/components/FormComponents/SingleItem/SingleItem.tsx +1 -1
- package/src/components/FormComponents/SingleItem/SingleItemSwitcher.tsx +50 -4
- package/src/components/FormComponents/SingleItem/SingleItemView.tsx +14 -11
- package/src/components/FormComponents/SingleItem/SingleNestedItems.tsx +1 -0
- package/src/components/FormComponents/SliderItem/SliderField.tsx +4 -2
- package/src/components/FormComponents/SliderItem/SliderItem.tsx +26 -18
- package/src/components/FormComponents/StringItem/StringField.tsx +8 -1
- package/src/components/FormComponents/StringItem/StringItem.tsx +33 -18
- package/src/components/FormComponents/StringItem/index.ts +18 -0
- package/src/components/FormComponents/TextItem/TextField.tsx +5 -2
- package/src/components/FormComponents/TextItem/TextItem.tsx +25 -17
- package/src/components/FormComponents/Textfield.styles.ts +5 -7
- package/src/components/FormComponents/TimeItem/TimeField.tsx +4 -2
- package/src/components/FormComponents/TimeItem/TimeItem.tsx +29 -14
- package/src/components/FormComponents/UrlItem/UrlField.tsx +14 -1
- package/src/components/FormComponents/UrlItem/UrlItem.tsx +32 -17
- package/src/components/FormComponents/index.ts +8 -0
- package/src/components/Renderer/BaseRenderer.tsx +5 -5
- package/src/components/Renderer/FormBodyPaginated.tsx +127 -0
- package/src/components/Renderer/FormTopLevelItem.tsx +0 -17
- package/src/components/index.ts +11 -1
- package/src/hooks/index.ts +12 -0
- package/src/hooks/useBuildForm.ts +33 -3
- package/src/hooks/useCodingCalculatedExpression.ts +1 -1
- package/src/hooks/useHidden.ts +12 -0
- package/src/hooks/useParseXhtml.tsx +73 -0
- package/src/hooks/useReadOnly.ts +32 -1
- package/src/hooks/useRenderingExtensions.ts +2 -2
- package/src/hooks/useValidationFeedback.ts +11 -3
- package/src/hooks/useValueSetCodings.ts +10 -6
- package/src/index.ts +49 -6
- package/src/interfaces/index.ts +5 -0
- package/src/interfaces/overrideComponent.interface.ts +39 -0
- package/src/interfaces/renderProps.interface.ts +5 -0
- package/src/stores/index.ts +3 -0
- package/src/stores/questionnaireStore.ts +73 -31
- package/src/stores/rendererStylingStore.ts +120 -0
- package/src/stories/assets/questionnaires/QQuantity.ts +45 -6
- package/src/stories/itemTypes/Attachment.stories.tsx +1 -1
- package/src/stories/itemTypes/Boolean.stories.tsx +1 -1
- package/src/stories/itemTypes/Choice.stories.tsx +1 -1
- package/src/stories/itemTypes/Date.stories.tsx +1 -1
- package/src/stories/itemTypes/DateTime.stories.tsx +1 -1
- package/src/stories/itemTypes/Decimal.stories.tsx +1 -1
- package/src/stories/itemTypes/Display.stories.tsx +1 -1
- package/src/stories/itemTypes/Group.stories.tsx +1 -1
- package/src/stories/itemTypes/Integer.stories.tsx +1 -1
- package/src/stories/itemTypes/OpenChoice.stories.tsx +1 -1
- package/src/stories/itemTypes/Quantity.stories.tsx +1 -1
- package/src/stories/itemTypes/Reference.stories.tsx +1 -1
- package/src/stories/itemTypes/String.stories.tsx +1 -1
- package/src/stories/itemTypes/Text.stories.tsx +1 -1
- package/src/stories/itemTypes/Time.stories.tsx +1 -1
- package/src/stories/itemTypes/Url.stories.tsx +1 -1
- package/src/stories/sdc/AdvancedAdditionalDisplayContent.stories.tsx +1 -1
- package/src/stories/sdc/AdvancedControlAppearance.stories.tsx +1 -1
- package/src/stories/sdc/AdvancedOther.stories.tsx +1 -1
- package/src/stories/sdc/AdvancedTextAppearance.stories.tsx +1 -1
- package/src/stories/sdc/BehaviorCalculations.stories.tsx +1 -1
- package/src/stories/sdc/BehaviorChoiceRestriction.stories.tsx +1 -1
- package/src/stories/sdc/BehaviorOther.stories.tsx +1 -1
- package/src/stories/sdc/BehaviorValueConstraints.stories.tsx +1 -1
- package/src/stories/sdc/FormPopulation.stories.tsx +1 -1
- package/src/stories/sdc/ItemControlDisplay.stories.tsx +1 -1
- package/src/stories/sdc/ItemControlGroup.stories.tsx +1 -1
- package/src/stories/sdc/ItemControlQuestion.stories.tsx +1 -1
- package/src/stories/sdc/OtherExtensions.stories.tsx +1 -1
- package/src/stories/testing/AuCoreTester.stories.tsx +1 -1
- package/src/stories/testing/BuildFormButtonTesterWrapper.stories.tsx +1 -1
- package/src/stories/testing/GroupTableTester.stories.tsx +1 -1
- package/src/stories/testing/IdRemoverDebuggerWrapper.stories.tsx +1 -1
- package/src/stories/testing/Mbs715Tester.stories.tsx +1 -1
- package/src/stories/testing/PrePopButtonTesterWrapper.stories.tsx +1 -1
- package/src/stories/testing/ValidateFormTesterWrapper.stories.tsx +1 -1
- package/src/utils/calculatedExpression.ts +29 -15
- package/src/utils/enableWhenExpression.ts +91 -48
- package/src/utils/fhirpath.ts +64 -27
- package/src/utils/getExpressionsFromItem.ts +1 -1
- package/src/utils/index.ts +8 -2
- package/src/utils/initialise.ts +11 -7
- package/src/utils/itemControl.ts +38 -1
- package/src/utils/manageForm.ts +16 -2
- package/src/utils/misc.ts +1 -1
- package/src/utils/openChoice.ts +2 -13
- package/src/utils/page.ts +4 -11
- package/src/utils/questionnaireStoreUtils/createQuestionaireModel.ts +1 -1
- package/src/utils/questionnaireStoreUtils/extractOtherExtensions.ts +20 -18
- package/src/utils/questionnaireStoreUtils/extractPages.ts +5 -12
- package/src/utils/repopulateItems.ts +0 -11
- package/src/utils/validateQuestionnaire.ts +6 -1
- package/vite.config.ts +2 -2
- package/src/components/Renderer/FormBodyPage.tsx +0 -93
- package/src/components/Renderer/FormTopLevelPage.tsx +0 -70
package/.storybook/main.ts
CHANGED
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
import type { StorybookConfig } from '@storybook/react-vite';
|
|
2
|
+
// @ts-ignore
|
|
3
|
+
import { version } from '../package.json';
|
|
2
4
|
|
|
3
5
|
import { dirname, join } from 'path';
|
|
4
6
|
|
|
@@ -10,7 +12,10 @@ function getAbsolutePath(value: string): any {
|
|
|
10
12
|
return dirname(require.resolve(join(value, 'package.json')));
|
|
11
13
|
}
|
|
12
14
|
const config: StorybookConfig = {
|
|
13
|
-
stories: [
|
|
15
|
+
stories: [
|
|
16
|
+
'../src/**/*.mdx',
|
|
17
|
+
{ directory: '../src/stories', titlePrefix: `Renderer v${version}` }
|
|
18
|
+
],
|
|
14
19
|
|
|
15
20
|
addons: [
|
|
16
21
|
getAbsolutePath('@storybook/addon-links'),
|
|
@@ -21,8 +21,10 @@ import Typography from '@mui/material/Typography';
|
|
|
21
21
|
import Box from '@mui/material/Box';
|
|
22
22
|
import Stack from '@mui/material/Stack';
|
|
23
23
|
import AttachmentUrlField from './AttachmentUrlField';
|
|
24
|
+
import { useRendererStylingStore } from '../../../stores';
|
|
24
25
|
function AttachmentField(props) {
|
|
25
26
|
const { linkId, attachmentValues, readOnly, isTabled, onUploadFile, onUrlChange, onFileNameChange } = props;
|
|
27
|
+
const textFieldWidth = useRendererStylingStore.use.textFieldWidth();
|
|
26
28
|
const { uploadedFile, url, fileName } = attachmentValues;
|
|
27
29
|
return (React.createElement(React.Fragment, null,
|
|
28
30
|
React.createElement(Stack, { rowGap: 1 },
|
|
@@ -32,7 +34,7 @@ function AttachmentField(props) {
|
|
|
32
34
|
React.createElement(AttachmentUrlField, { linkId: linkId, url: url, readOnly: readOnly, isTabled: isTabled, onUrlChange: onUrlChange }),
|
|
33
35
|
React.createElement(Box, null,
|
|
34
36
|
React.createElement(Typography, { variant: "body2", color: readOnly ? 'text.disabled' : 'text.primary' }, "File name (optional)"),
|
|
35
|
-
React.createElement(StandardTextField, { fullWidth: true, isTabled: isTabled, id: linkId, value: fileName, onChange: (event) => onFileNameChange(event.target.value), disabled: readOnly, size: "small", "data-test": "q-item-attachment-field" })),
|
|
37
|
+
React.createElement(StandardTextField, { fullWidth: true, textFieldWidth: textFieldWidth, isTabled: isTabled, id: linkId, value: fileName, onChange: (event) => onFileNameChange(event.target.value), disabled: readOnly, size: "small", "data-test": "q-item-attachment-field" })),
|
|
36
38
|
uploadedFile && url ? (React.createElement(Typography, { variant: "subtitle2", color: readOnly ? 'text.disabled' : 'text.primary' }, "Ensure that the attached file and URL has the same content.")) : null)));
|
|
37
39
|
}
|
|
38
40
|
export default AttachmentField;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AttachmentField.js","sourceRoot":"","sources":["../../../../src/components/FormComponents/AttachmentItem/AttachmentField.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAEH,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AACxD,OAAO,uBAAuB,MAAM,2BAA2B,CAAC;AAChE,OAAO,UAAU,MAAM,0BAA0B,CAAC;AAClD,OAAO,GAAG,MAAM,mBAAmB,CAAC;AACpC,OAAO,KAAK,MAAM,qBAAqB,CAAC;AAExC,OAAO,kBAAkB,MAAM,sBAAsB,CAAC;
|
|
1
|
+
{"version":3,"file":"AttachmentField.js","sourceRoot":"","sources":["../../../../src/components/FormComponents/AttachmentItem/AttachmentField.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAEH,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AACxD,OAAO,uBAAuB,MAAM,2BAA2B,CAAC;AAChE,OAAO,UAAU,MAAM,0BAA0B,CAAC;AAClD,OAAO,GAAG,MAAM,mBAAmB,CAAC;AACpC,OAAO,KAAK,MAAM,qBAAqB,CAAC;AAExC,OAAO,kBAAkB,MAAM,sBAAsB,CAAC;AACtD,OAAO,EAAE,uBAAuB,EAAE,MAAM,iBAAiB,CAAC;AAW1D,SAAS,eAAe,CAAC,KAA2B;IAClD,MAAM,EACJ,MAAM,EACN,gBAAgB,EAChB,QAAQ,EACR,QAAQ,EACR,YAAY,EACZ,WAAW,EACX,gBAAgB,EACjB,GAAG,KAAK,CAAC;IAEV,MAAM,cAAc,GAAG,uBAAuB,CAAC,GAAG,CAAC,cAAc,EAAE,CAAC;IAEpE,MAAM,EAAE,YAAY,EAAE,GAAG,EAAE,QAAQ,EAAE,GAAG,gBAAgB,CAAC;IAEzD,OAAO,CACL;QACE,oBAAC,KAAK,IAAC,MAAM,EAAE,CAAC;YACd,oBAAC,UAAU,IAAC,OAAO,EAAC,WAAW,EAAC,KAAK,EAAE,QAAQ,CAAC,CAAC,CAAC,eAAe,CAAC,CAAC,CAAC,cAAc,+DAErE;YACb,oBAAC,GAAG;gBACF,oBAAC,uBAAuB,IACtB,YAAY,EAAE,YAAY,EAC1B,QAAQ,EAAE,QAAQ,EAClB,QAAQ,EAAE,QAAQ,EAClB,YAAY,EAAE,YAAY,GAC1B,CACE;YAEN,oBAAC,kBAAkB,IACjB,MAAM,EAAE,MAAM,EACd,GAAG,EAAE,GAAG,EACR,QAAQ,EAAE,QAAQ,EAClB,QAAQ,EAAE,QAAQ,EAClB,WAAW,EAAE,WAAW,GACxB;YAEF,oBAAC,GAAG;gBACF,oBAAC,UAAU,IAAC,OAAO,EAAC,OAAO,EAAC,KAAK,EAAE,QAAQ,CAAC,CAAC,CAAC,eAAe,CAAC,CAAC,CAAC,cAAc,2BAEjE;gBACb,oBAAC,iBAAiB,IAChB,SAAS,QACT,cAAc,EAAE,cAAc,EAC9B,QAAQ,EAAE,QAAQ,EAClB,EAAE,EAAE,MAAM,EACV,KAAK,EAAE,QAAQ,EACf,QAAQ,EAAE,CAAC,KAAK,EAAE,EAAE,CAAC,gBAAgB,CAAC,KAAK,CAAC,MAAM,CAAC,KAAK,CAAC,EACzD,QAAQ,EAAE,QAAQ,EAClB,IAAI,EAAC,OAAO,eACF,yBAAyB,GACnC,CACE;YAEL,YAAY,IAAI,GAAG,CAAC,CAAC,CAAC,CACrB,oBAAC,UAAU,IAAC,OAAO,EAAC,WAAW,EAAC,KAAK,EAAE,QAAQ,CAAC,CAAC,CAAC,eAAe,CAAC,CAAC,CAAC,cAAc,kEAErE,CACd,CAAC,CAAC,CAAC,IAAI,CACF,CACP,CACJ,CAAC;AACJ,CAAC;AAED,eAAe,eAAe,CAAC"}
|
|
@@ -14,14 +14,12 @@
|
|
|
14
14
|
* See the License for the specific language governing permissions and
|
|
15
15
|
* limitations under the License.
|
|
16
16
|
*/
|
|
17
|
-
// import { HTML5Backend } from 'react-dnd-html5-backend';
|
|
18
|
-
//
|
|
19
|
-
// <DndProvider backend={HTML5Backend}>
|
|
20
17
|
import React from 'react';
|
|
21
18
|
import AttachmentField from './AttachmentField';
|
|
22
19
|
import { FullWidthFormComponentBox } from '../../Box.styles';
|
|
23
20
|
import ItemFieldGrid from '../ItemParts/ItemFieldGrid';
|
|
24
21
|
import { useQuestionnaireStore } from '../../../stores';
|
|
22
|
+
import { ItemLabelWrapper } from '../ItemParts';
|
|
25
23
|
function AttachmentFieldWrapper(props) {
|
|
26
24
|
const { qItem, attachmentValues, readOnly, isRepeated, isTabled, onUploadFile, onUrlChange, onFileNameChange } = props;
|
|
27
25
|
const onFocusLinkId = useQuestionnaireStore.use.onFocusLinkId();
|
|
@@ -29,8 +27,7 @@ function AttachmentFieldWrapper(props) {
|
|
|
29
27
|
return (React.createElement(AttachmentField, { linkId: qItem.linkId, attachmentValues: attachmentValues, readOnly: readOnly, isTabled: isTabled, onUploadFile: onUploadFile, onUrlChange: onUrlChange, onFileNameChange: onFileNameChange }));
|
|
30
28
|
}
|
|
31
29
|
return (React.createElement(FullWidthFormComponentBox, { "data-test": "q-item-attachment-box", "data-linkid": qItem.linkId, onClick: () => onFocusLinkId(qItem.linkId) },
|
|
32
|
-
React.createElement(ItemFieldGrid, { qItem: qItem, readOnly: readOnly },
|
|
33
|
-
React.createElement(AttachmentField, { linkId: qItem.linkId, attachmentValues: attachmentValues, readOnly: readOnly, isTabled: isTabled, onUploadFile: onUploadFile, onUrlChange: onUrlChange, onFileNameChange: onFileNameChange }))));
|
|
30
|
+
React.createElement(ItemFieldGrid, { qItem: qItem, readOnly: readOnly, labelChildren: React.createElement(ItemLabelWrapper, { qItem: qItem, readOnly: readOnly }), fieldChildren: React.createElement(AttachmentField, { linkId: qItem.linkId, attachmentValues: attachmentValues, readOnly: readOnly, isTabled: isTabled, onUploadFile: onUploadFile, onUrlChange: onUrlChange, onFileNameChange: onFileNameChange }) })));
|
|
34
31
|
}
|
|
35
32
|
export default AttachmentFieldWrapper;
|
|
36
33
|
//# sourceMappingURL=AttachmentFieldWrapper.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AttachmentFieldWrapper.js","sourceRoot":"","sources":["../../../../src/components/FormComponents/AttachmentItem/AttachmentFieldWrapper.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAEH,
|
|
1
|
+
{"version":3,"file":"AttachmentFieldWrapper.js","sourceRoot":"","sources":["../../../../src/components/FormComponents/AttachmentItem/AttachmentFieldWrapper.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAEH,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,eAAe,MAAM,mBAAmB,CAAC;AAChD,OAAO,EAAE,yBAAyB,EAAE,MAAM,kBAAkB,CAAC;AAC7D,OAAO,aAAa,MAAM,4BAA4B,CAAC;AAOvD,OAAO,EAAE,qBAAqB,EAAE,MAAM,iBAAiB,CAAC;AACxD,OAAO,EAAE,gBAAgB,EAAE,MAAM,cAAc,CAAC;AAahD,SAAS,sBAAsB,CAAC,KAAkC;IAChE,MAAM,EACJ,KAAK,EACL,gBAAgB,EAChB,QAAQ,EACR,UAAU,EACV,QAAQ,EACR,YAAY,EACZ,WAAW,EACX,gBAAgB,EACjB,GAAG,KAAK,CAAC;IAEV,MAAM,aAAa,GAAG,qBAAqB,CAAC,GAAG,CAAC,aAAa,EAAE,CAAC;IAEhE,IAAI,UAAU,EAAE;QACd,OAAO,CACL,oBAAC,eAAe,IACd,MAAM,EAAE,KAAK,CAAC,MAAM,EACpB,gBAAgB,EAAE,gBAAgB,EAClC,QAAQ,EAAE,QAAQ,EAClB,QAAQ,EAAE,QAAQ,EAClB,YAAY,EAAE,YAAY,EAC1B,WAAW,EAAE,WAAW,EACxB,gBAAgB,EAAE,gBAAgB,GAClC,CACH,CAAC;KACH;IAED,OAAO,CACL,oBAAC,yBAAyB,iBACd,uBAAuB,iBACpB,KAAK,CAAC,MAAM,EACzB,OAAO,EAAE,GAAG,EAAE,CAAC,aAAa,CAAC,KAAK,CAAC,MAAM,CAAC;QAC1C,oBAAC,aAAa,IACZ,KAAK,EAAE,KAAK,EACZ,QAAQ,EAAE,QAAQ,EAClB,aAAa,EAAE,oBAAC,gBAAgB,IAAC,KAAK,EAAE,KAAK,EAAE,QAAQ,EAAE,QAAQ,GAAI,EACrE,aAAa,EACX,oBAAC,eAAe,IACd,MAAM,EAAE,KAAK,CAAC,MAAM,EACpB,gBAAgB,EAAE,gBAAgB,EAClC,QAAQ,EAAE,QAAQ,EAClB,QAAQ,EAAE,QAAQ,EAClB,YAAY,EAAE,YAAY,EAC1B,WAAW,EAAE,WAAW,EACxB,gBAAgB,EAAE,gBAAgB,GAClC,GAEJ,CACwB,CAC7B,CAAC;AACJ,CAAC;AAED,eAAe,sBAAsB,CAAC"}
|
|
@@ -19,9 +19,11 @@ import useFileDrop from '../../../hooks/UseFileDrop';
|
|
|
19
19
|
import { AttachmentFileDropBoxWrapper } from './AttachmentFileDropBox.styles';
|
|
20
20
|
import React from 'react';
|
|
21
21
|
import { getFileSize } from '../../../utils/fileUtils';
|
|
22
|
+
import { useRendererStylingStore } from '../../../stores';
|
|
22
23
|
function AttachmentFileDropBox(props) {
|
|
23
24
|
var _a;
|
|
24
25
|
const { file, onDrop, errorMessage, readOnly, isTabled } = props;
|
|
26
|
+
const textFieldWidth = useRendererStylingStore.use.textFieldWidth();
|
|
25
27
|
const { canDrop, isOver, dropTarget } = useFileDrop(onDrop);
|
|
26
28
|
const isActive = canDrop && isOver;
|
|
27
29
|
let boxMessage = 'No file selected';
|
|
@@ -37,7 +39,7 @@ function AttachmentFileDropBox(props) {
|
|
|
37
39
|
else if (file) {
|
|
38
40
|
boxMessage = file.name;
|
|
39
41
|
}
|
|
40
|
-
return (React.createElement(AttachmentFileDropBoxWrapper, { ref: dropTarget, display: "flex", isActive: isActive, isTabled: isTabled },
|
|
42
|
+
return (React.createElement(AttachmentFileDropBoxWrapper, { ref: dropTarget, display: "flex", isActive: isActive, textFieldWidth: textFieldWidth, isTabled: isTabled },
|
|
41
43
|
React.createElement(Box, { p: 1.5 },
|
|
42
44
|
React.createElement(Typography, { color: readOnly ? 'text.disabled' : 'text.primary' }, boxMessage),
|
|
43
45
|
file ? (React.createElement(Box, { pt: 1 },
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AttachmentFileDropBox.js","sourceRoot":"","sources":["../../../../src/components/FormComponents/AttachmentItem/AttachmentFileDropBox.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAEH,OAAO,EAAE,GAAG,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAChD,OAAO,WAAW,MAAM,4BAA4B,CAAC;AACrD,OAAO,EAAE,4BAA4B,EAAE,MAAM,gCAAgC,CAAC;AAC9E,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAE,WAAW,EAAE,MAAM,0BAA0B,CAAC;
|
|
1
|
+
{"version":3,"file":"AttachmentFileDropBox.js","sourceRoot":"","sources":["../../../../src/components/FormComponents/AttachmentItem/AttachmentFileDropBox.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAEH,OAAO,EAAE,GAAG,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAChD,OAAO,WAAW,MAAM,4BAA4B,CAAC;AACrD,OAAO,EAAE,4BAA4B,EAAE,MAAM,gCAAgC,CAAC;AAC9E,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAE,WAAW,EAAE,MAAM,0BAA0B,CAAC;AACvD,OAAO,EAAE,uBAAuB,EAAE,MAAM,iBAAiB,CAAC;AAS1D,SAAS,qBAAqB,CAAC,KAAiC;;IAC9D,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,YAAY,EAAE,QAAQ,EAAE,QAAQ,EAAE,GAAG,KAAK,CAAC;IAEjE,MAAM,cAAc,GAAG,uBAAuB,CAAC,GAAG,CAAC,cAAc,EAAE,CAAC;IAEpE,MAAM,EAAE,OAAO,EAAE,MAAM,EAAE,UAAU,EAAE,GAAG,WAAW,CAAC,MAAM,CAAC,CAAC;IAE5D,MAAM,QAAQ,GAAG,OAAO,IAAI,MAAM,CAAC;IAEnC,IAAI,UAAU,GAAG,kBAAkB,CAAC;IACpC,IAAI,QAAQ,EAAE;QACZ,UAAU,GAAG,mBAAmB,CAAC;KAClC;SAAM,IAAI,QAAQ,EAAE;QACnB,UAAU,GAAG,sBAAsB,CAAC;KACrC;SAAM,IAAI,YAAY,EAAE;QACvB,UAAU,GAAG,YAAY,CAAC;KAC3B;SAAM,IAAI,IAAI,EAAE;QACf,UAAU,GAAG,IAAI,CAAC,IAAI,CAAC;KACxB;IAED,OAAO,CACL,oBAAC,4BAA4B,IAC3B,GAAG,EAAE,UAAU,EACf,OAAO,EAAC,MAAM,EACd,QAAQ,EAAE,QAAQ,EAClB,cAAc,EAAE,cAAc,EAC9B,QAAQ,EAAE,QAAQ;QAClB,oBAAC,GAAG,IAAC,CAAC,EAAE,GAAG;YACT,oBAAC,UAAU,IAAC,KAAK,EAAE,QAAQ,CAAC,CAAC,CAAC,eAAe,CAAC,CAAC,CAAC,cAAc,IAAG,UAAU,CAAc;YAExF,IAAI,CAAC,CAAC,CAAC,CACN,oBAAC,GAAG,IAAC,EAAE,EAAE,CAAC;gBACR,oBAAC,UAAU,IAAC,QAAQ,EAAE,EAAE;;oBAAS,WAAW,CAAC,MAAA,IAAI,CAAC,IAAI,CAAC,QAAQ,EAAE,mCAAI,GAAG,CAAC,CAAc;gBACvF,oBAAC,UAAU,IAAC,QAAQ,EAAE,EAAE;;oBAAS,IAAI,CAAC,IAAI,CAAc,CACpD,CACP,CAAC,CAAC,CAAC,IAAI,CACJ,CACuB,CAChC,CAAC;AACJ,CAAC;AAED,eAAe,qBAAqB,CAAC"}
|
|
@@ -4,4 +4,5 @@ export declare const AttachmentFileDropBoxWrapper: import("@emotion/styled").Sty
|
|
|
4
4
|
}, keyof import("@mui/system").BoxOwnProps<import("@mui/material").Theme>> & import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme> & {
|
|
5
5
|
isActive: boolean;
|
|
6
6
|
isTabled: boolean;
|
|
7
|
+
textFieldWidth: number;
|
|
7
8
|
}, {}, {}>;
|
|
@@ -16,15 +16,14 @@
|
|
|
16
16
|
*/
|
|
17
17
|
import { styled } from '@mui/material/styles';
|
|
18
18
|
import { Box } from '@mui/material';
|
|
19
|
-
import { TEXT_FIELD_WIDTH } from '../Textfield.styles';
|
|
20
19
|
export const AttachmentFileDropBoxWrapper = styled(Box, {
|
|
21
|
-
shouldForwardProp: (prop) => prop !== 'isActive' && prop !== 'isTabled'
|
|
22
|
-
})(({ theme, isActive, isTabled }) => ({
|
|
20
|
+
shouldForwardProp: (prop) => prop !== 'isActive' && prop !== 'isTabled' && prop !== 'textFieldWidth'
|
|
21
|
+
})(({ theme, isActive, isTabled, textFieldWidth }) => ({
|
|
23
22
|
backgroundColor: theme.palette.background.paper,
|
|
24
23
|
border: '2px dashed',
|
|
25
24
|
borderColor: isActive ? theme.palette.secondary.main : theme.palette.primary.main,
|
|
26
25
|
borderRadius: '4px',
|
|
27
|
-
maxWidth: !isTabled ?
|
|
26
|
+
maxWidth: !isTabled ? textFieldWidth : 3000,
|
|
28
27
|
minWidth: 160
|
|
29
28
|
}));
|
|
30
29
|
//# sourceMappingURL=AttachmentFileDropBox.styles.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AttachmentFileDropBox.styles.js","sourceRoot":"","sources":["../../../../src/components/FormComponents/AttachmentItem/AttachmentFileDropBox.styles.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAEH,OAAO,EAAE,MAAM,EAAE,MAAM,sBAAsB,CAAC;AAC9C,OAAO,EAAE,GAAG,EAAE,MAAM,eAAe,CAAC;
|
|
1
|
+
{"version":3,"file":"AttachmentFileDropBox.styles.js","sourceRoot":"","sources":["../../../../src/components/FormComponents/AttachmentItem/AttachmentFileDropBox.styles.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAEH,OAAO,EAAE,MAAM,EAAE,MAAM,sBAAsB,CAAC;AAC9C,OAAO,EAAE,GAAG,EAAE,MAAM,eAAe,CAAC;AAEpC,MAAM,CAAC,MAAM,4BAA4B,GAAG,MAAM,CAAC,GAAG,EAAE;IACtD,iBAAiB,EAAE,CAAC,IAAI,EAAE,EAAE,CAC1B,IAAI,KAAK,UAAU,IAAI,IAAI,KAAK,UAAU,IAAI,IAAI,KAAK,gBAAgB;CAC1E,CAAC,CACA,CAAC,EAAE,KAAK,EAAE,QAAQ,EAAE,QAAQ,EAAE,cAAc,EAAE,EAAE,EAAE,CAAC,CAAC;IAClD,eAAe,EAAE,KAAK,CAAC,OAAO,CAAC,UAAU,CAAC,KAAK;IAC/C,MAAM,EAAE,YAAY;IACpB,WAAW,EAAE,QAAQ,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,SAAS,CAAC,IAAI,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,OAAO,CAAC,IAAI;IACjF,YAAY,EAAE,KAAK;IACnB,QAAQ,EAAE,CAAC,QAAQ,CAAC,CAAC,CAAC,cAAc,CAAC,CAAC,CAAC,IAAI;IAC3C,QAAQ,EAAE,GAAG;CACd,CAAC,CACH,CAAC"}
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import type { PropsWithIsRepeatedAttribute, PropsWithIsTabledAttribute, PropsWithParentIsReadOnlyAttribute, PropsWithQrItemChangeHandler } from '../../../interfaces/renderProps.interface';
|
|
2
|
+
import type { PropsWithIsRepeatedAttribute, PropsWithIsTabledAttribute, PropsWithParentIsReadOnlyAttribute, PropsWithQrItemChangeHandler, PropsWithRenderingExtensionsAttribute } from '../../../interfaces/renderProps.interface';
|
|
3
3
|
import type { QuestionnaireItem, QuestionnaireResponseItem } from 'fhir/r4';
|
|
4
4
|
export interface AttachmentValues {
|
|
5
5
|
uploadedFile: File | null;
|
|
6
6
|
url: string;
|
|
7
7
|
fileName: string;
|
|
8
8
|
}
|
|
9
|
-
interface AttachmentItemProps extends PropsWithQrItemChangeHandler, PropsWithIsRepeatedAttribute, PropsWithIsTabledAttribute, PropsWithParentIsReadOnlyAttribute {
|
|
9
|
+
interface AttachmentItemProps extends PropsWithQrItemChangeHandler, PropsWithIsRepeatedAttribute, PropsWithIsTabledAttribute, PropsWithRenderingExtensionsAttribute, PropsWithParentIsReadOnlyAttribute {
|
|
10
10
|
qItem: QuestionnaireItem;
|
|
11
11
|
qrItem: QuestionnaireResponseItem | null;
|
|
12
12
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AttachmentItem.js","sourceRoot":"","sources":["../../../../src/components/FormComponents/AttachmentItem/AttachmentItem.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;;;;;;;;;;AAEH,OAAO,KAAK,EAAE,EAAE,WAAW,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"AttachmentItem.js","sourceRoot":"","sources":["../../../../src/components/FormComponents/AttachmentItem/AttachmentItem.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;;;;;;;;;;AAEH,OAAO,KAAK,EAAE,EAAE,WAAW,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AASrD,OAAO,QAAQ,MAAM,iBAAiB,CAAC;AACvC,OAAO,EAAE,iBAAiB,EAAE,MAAM,uBAAuB,CAAC;AAC1D,OAAO,EAAE,iBAAiB,EAAE,MAAM,yBAAyB,CAAC;AAC5D,OAAO,WAAW,MAAM,4BAA4B,CAAC;AACrD,OAAO,sBAAsB,MAAM,0BAA0B,CAAC;AAC9D,OAAO,EAAE,YAAY,EAAE,MAAM,yBAAyB,CAAC;AACvD,OAAO,EAAE,WAAW,EAAE,MAAM,WAAW,CAAC;AACxC,OAAO,EAAE,sBAAsB,EAAE,MAAM,0BAA0B,CAAC;AAkBlE,SAAS,cAAc,CAAC,KAA0B;;IAChD,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,UAAU,EAAE,QAAQ,EAAE,gBAAgB,EAAE,cAAc,EAAE,GAAG,KAAK,CAAC;IAExF,MAAM,QAAQ,GAAG,WAAW,CAAC,KAAK,EAAE,gBAAgB,CAA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|
|
24
24
|
import Tooltip from '@mui/material/Tooltip';
|
|
25
25
|
import CheckIcon from '@mui/icons-material/Check';
|
|
26
26
|
import DangerousIcon from '@mui/icons-material/Dangerous';
|
|
27
|
+
import { useRendererStylingStore } from '../../../stores';
|
|
27
28
|
function AttachmentUrlField(props) {
|
|
28
29
|
const { linkId, url, readOnly, isTabled, onUrlChange } = props;
|
|
30
|
+
const textFieldWidth = useRendererStylingStore.use.textFieldWidth();
|
|
29
31
|
const urlIsValid = useAttachmentUrlValidation(url);
|
|
30
32
|
return (React.createElement(Box, null,
|
|
31
33
|
React.createElement(Typography, { variant: "body2", color: readOnly ? 'text.disabled' : 'text.primary' }, "URL"),
|
|
32
34
|
React.createElement(Stack, { direction: "row", alignItems: "center" },
|
|
33
|
-
React.createElement(StandardTextField, { fullWidth: true, isTabled: isTabled, id: linkId, value: url, onChange: (event) => onUrlChange(event.target.value), disabled: readOnly, size: "small", "data-test": "q-item-attachment-field", InputProps: {
|
|
35
|
+
React.createElement(StandardTextField, { fullWidth: true, textFieldWidth: textFieldWidth, isTabled: isTabled, id: linkId, value: url, onChange: (event) => onUrlChange(event.target.value), disabled: readOnly, size: "small", "data-test": "q-item-attachment-field", InputProps: {
|
|
34
36
|
endAdornment: (React.createElement(InputAdornment, { position: "end" }, url != '' ? (React.createElement(Tooltip, { title: urlIsValid ? 'URL is valid!' : 'Invalid URL', placement: "right" },
|
|
35
37
|
React.createElement(Box, { mt: 0.5 }, urlIsValid ? (React.createElement(CheckIcon, { color: "success", fontSize: "small" })) : (React.createElement(DangerousIcon, { color: "error", fontSize: "small" }))))) : null))
|
|
36
38
|
} }))));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AttachmentUrlField.js","sourceRoot":"","sources":["../../../../src/components/FormComponents/AttachmentItem/AttachmentUrlField.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAEH,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAE,iB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aAAa,EAAE,SAAS,EAAC,OAAO;wBAC7E,oBAAC,GAAG,IAAC,EAAE,EAAE,GAAG,IACT,UAAU,CAAC,CAAC,CAAC,CACZ,oBAAC,SAAS,IAAC,KAAK,EAAC,SAAS,EAAC,QAAQ,EAAC,OAAO,GAAG,CAC/C,CAAC,CAAC,CAAC,CACF,oBAAC,aAAa,IAAC,KAAK,EAAC,OAAO,EAAC,QAAQ,EAAC,OAAO,GAAG,CACjD,CACG,CACE,CACX,CAAC,CAAC,CAAC,IAAI,CACO,CAClB;iBACF,GACD,CACI,CACJ,CACP,CAAC;AACJ,CAAC;AAED,eAAe,kBAAkB,CAAC"}
|
|
1
|
+
{"version":3,"file":"AttachmentUrlField.js","sourceRoot":"","sources":["../../../../src/components/FormComponents/AttachmentItem/AttachmentUrlField.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAEH,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AACxD,OAAO,UAAU,MAAM,0BAA0B,CAAC;AAClD,OAAO,GAAG,MAAM,mBAAmB,CAAC;AACpC,OAAO,KAAK,MAAM,qBAAqB,CAAC;AACxC,OAAO,0BAA0B,MAAM,2CAA2C,CAAC;AACnF,OAAO,cAAc,MAAM,8BAA8B,CAAC;AAC1D,OAAO,OAAO,MAAM,uBAAuB,CAAC;AAC5C,OAAO,SAAS,MAAM,2BAA2B,CAAC;AAClD,OAAO,aAAa,MAAM,+BAA+B,CAAC;AAC1D,OAAO,EAAE,uBAAuB,EAAE,MAAM,iBAAiB,CAAC;AAS1D,SAAS,kBAAkB,CAAC,KAA8B;IACxD,MAAM,EAAE,MAAM,EAAE,GAAG,EAAE,QAAQ,EAAE,QAAQ,EAAE,WAAW,EAAE,GAAG,KAAK,CAAC;IAE/D,MAAM,cAAc,GAAG,uBAAuB,CAAC,GAAG,CAAC,cAAc,EAAE,CAAC;IAEpE,MAAM,UAAU,GAAG,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
18
18
|
import Box from '@mui/material/Box';
|
|
19
|
-
import Button from '@mui/material/Button';
|
|
20
|
-
import { grey } from '@mui/material/colors';
|
|
21
|
-
import Fade from '@mui/material/Fade';
|
|
22
|
-
import Tooltip from '@mui/material/Tooltip';
|
|
23
19
|
import { ChoiceItemOrientation } from '../../../interfaces/choice.enum';
|
|
24
20
|
import ChoiceRadioSingle from '../ChoiceItems/ChoiceRadioSingle';
|
|
25
21
|
import { StyledRadioGroup } from '../Item.styles';
|
|
26
22
|
import { getChoiceOrientation } from '../../../utils/choice';
|
|
27
23
|
import FadingCheckIcon from '../ItemParts/FadingCheckIcon';
|
|
24
|
+
import Checkbox from '@mui/material/Checkbox';
|
|
25
|
+
import FormControlLabel from '@mui/material/FormControlLabel';
|
|
26
|
+
import { isSpecificItemControl } from '../../../utils';
|
|
27
|
+
import ClearInputButton from '../ItemParts/ClearInputButton';
|
|
28
|
+
import { useRendererStylingStore } from '../../../stores';
|
|
29
|
+
import { findCalculatedExpressionsInExtensions } from '../../../utils/getExpressionsFromItem';
|
|
28
30
|
const BooleanField = memo(function BooleanField(props) {
|
|
29
|
-
var _a;
|
|
31
|
+
var _a, _b;
|
|
30
32
|
const { qItem, readOnly, valueBoolean, calcExpUpdated, onCheckedChange, onClear } = props;
|
|
33
|
+
const inputsFlexGrow = useRendererStylingStore.use.inputsFlexGrow();
|
|
34
|
+
const reverseBooleanYesNo = useRendererStylingStore.use.reverseBooleanYesNo();
|
|
35
|
+
const hideClearButton = useRendererStylingStore.use.hideClearButton();
|
|
36
|
+
const calculatedExpressionExist = findCalculatedExpressionsInExtensions((_a = qItem.extension) !== null && _a !== void 0 ? _a : []).length > 0;
|
|
37
|
+
const booleanAsCheckbox = isSpecificItemControl(qItem, 'check-box');
|
|
31
38
|
// defaults to horizontal, only set to vertical if explicitly set
|
|
32
|
-
const orientation = (
|
|
39
|
+
const orientation = (_b = getChoiceOrientation(qItem)) !== null && _b !== void 0 ? _b : ChoiceItemOrientation.Horizontal;
|
|
33
40
|
const selection = valueBoolean === undefined ? null : valueBoolean.toString();
|
|
34
41
|
return (React.createElement(Box, { display: "flex", alignItems: "center" },
|
|
35
|
-
React.createElement(
|
|
36
|
-
|
|
37
|
-
|
|
42
|
+
booleanAsCheckbox ? (React.createElement(FormControlLabel, { id: qItem.linkId, disabled: readOnly, control: React.createElement(Checkbox, { size: "small", checked: selection === 'true', onChange: () => {
|
|
43
|
+
if (selection === 'true') {
|
|
44
|
+
onCheckedChange('false');
|
|
45
|
+
}
|
|
46
|
+
if (selection === 'false' || selection === null) {
|
|
47
|
+
onCheckedChange('true');
|
|
48
|
+
}
|
|
49
|
+
} }), label: "" })) : (React.createElement(StyledRadioGroup, { id: qItem.linkId, row: orientation === ChoiceItemOrientation.Horizontal, name: qItem.text, sx: inputsFlexGrow ? { width: '100%', flexWrap: 'nowrap' } : {}, onChange: (e) => onCheckedChange(e.target.value), value: selection }, reverseBooleanYesNo ? (React.createElement(React.Fragment, null,
|
|
50
|
+
React.createElement(ChoiceRadioSingle, { value: "false", label: "No", readOnly: readOnly, fullWidth: inputsFlexGrow }),
|
|
51
|
+
React.createElement(ChoiceRadioSingle, { value: "true", label: "Yes", readOnly: readOnly, fullWidth: inputsFlexGrow }))) : (React.createElement(React.Fragment, null,
|
|
52
|
+
React.createElement(ChoiceRadioSingle, { value: "true", label: "Yes", readOnly: readOnly, fullWidth: inputsFlexGrow }),
|
|
53
|
+
React.createElement(ChoiceRadioSingle, { value: "false", label: "No", readOnly: readOnly, fullWidth: inputsFlexGrow }))))),
|
|
38
54
|
React.createElement(Box, { flexGrow: 1 }),
|
|
39
|
-
React.createElement(FadingCheckIcon, { fadeIn: calcExpUpdated, disabled: readOnly }),
|
|
40
|
-
React.createElement(
|
|
41
|
-
React.createElement(Tooltip, { title: "Set question as unanswered" },
|
|
42
|
-
React.createElement("span", null,
|
|
43
|
-
React.createElement(Button, { sx: {
|
|
44
|
-
color: grey['500'],
|
|
45
|
-
'&:hover': { backgroundColor: grey['200'] }
|
|
46
|
-
}, disabled: readOnly, onClick: onClear }, "Clear"))))));
|
|
55
|
+
calculatedExpressionExist ? (React.createElement(FadingCheckIcon, { fadeIn: calcExpUpdated, disabled: readOnly })) : null,
|
|
56
|
+
hideClearButton ? null : (React.createElement(ClearInputButton, { buttonShown: valueBoolean !== undefined, readOnly: readOnly, onClear: onClear }))));
|
|
47
57
|
});
|
|
48
58
|
export default BooleanField;
|
|
49
59
|
//# sourceMappingURL=BooleanField.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BooleanField.js","sourceRoot":"","sources":["../../../../src/components/FormComponents/BooleanItem/BooleanField.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAEH,OAAO,KAAK,EAAE,EAAE,IAAI,EAAE,MAAM,OAAO,CAAC;AACpC,OAAO,GAAG,MAAM,mBAAmB,CAAC;AACpC,OAAO,MAAM,MAAM,
|
|
1
|
+
{"version":3,"file":"BooleanField.js","sourceRoot":"","sources":["../../../../src/components/FormComponents/BooleanItem/BooleanField.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAEH,OAAO,KAAK,EAAE,EAAE,IAAI,EAAE,MAAM,OAAO,CAAC;AACpC,OAAO,GAAG,MAAM,mBAAmB,CAAC;AACpC,OAAO,EAAE,qBAAqB,EAAE,MAAM,iCAAiC,CAAC;AAExE,OAAO,iBAAiB,MAAM,kCAAkC,CAAC;AACjE,OAAO,EAAE,gBAAgB,EAAE,MAAM,gBAAgB,CAAC;AAClD,OAAO,EAAE,oBAAoB,EAAE,MAAM,uBAAuB,CAAC;AAC7D,OAAO,eAAe,MAAM,8BAA8B,CAAC;AAC3D,OAAO,QAAQ,MAAM,wBAAwB,CAAC;AAC9C,OAAO,gBAAgB,MAAM,gCAAgC,CAAC;AAC9D,OAAO,EAAE,qBAAqB,EAAE,MAAM,gBAAgB,CAAC;AACvD,OAAO,gBAAgB,MAAM,+BAA+B,CAAC;AAC7D,OAAO,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AC,QAAQ,EAAE,CAAC,GAAI;QACnB,yBAAyB,CAAC,CAAC,CAAC,CAC3B,oBAAC,eAAe,IAAC,MAAM,EAAE,cAAc,EAAE,QAAQ,EAAE,QAAQ,GAAI,CAChE,CAAC,CAAC,CAAC,IAAI;QACP,eAAe,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,CACxB,oBAAC,gBAAgB,IACf,WAAW,EAAE,YAAY,KAAK,SAAS,EACvC,QAAQ,EAAE,QAAQ,EAClB,OAAO,EAAE,OAAO,GAChB,CACH,CACG,CACP,CAAC;AACJ,CAAC,CAAC,CAAC;AAEH,eAAe,YAAY,CAAC"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import type { PropsWithIsRepeatedAttribute, PropsWithIsTabledAttribute, PropsWithParentIsReadOnlyAttribute, PropsWithQrItemChangeHandler } from '../../../interfaces/renderProps.interface';
|
|
2
|
+
import type { PropsWithIsRepeatedAttribute, PropsWithIsTabledAttribute, PropsWithParentIsReadOnlyAttribute, PropsWithQrItemChangeHandler, PropsWithRenderingExtensionsAttribute } from '../../../interfaces/renderProps.interface';
|
|
3
3
|
import type { QuestionnaireItem, QuestionnaireResponseItem } from 'fhir/r4';
|
|
4
|
-
interface BooleanItemProps extends PropsWithQrItemChangeHandler, PropsWithIsRepeatedAttribute, PropsWithIsTabledAttribute, PropsWithParentIsReadOnlyAttribute {
|
|
4
|
+
interface BooleanItemProps extends PropsWithQrItemChangeHandler, PropsWithIsRepeatedAttribute, PropsWithIsTabledAttribute, PropsWithRenderingExtensionsAttribute, PropsWithParentIsReadOnlyAttribute {
|
|
5
5
|
qItem: QuestionnaireItem;
|
|
6
6
|
qrItem: QuestionnaireResponseItem | null;
|
|
7
7
|
}
|
|
@@ -23,6 +23,7 @@ import Box from '@mui/material/Box';
|
|
|
23
23
|
import useReadOnly from '../../../hooks/useReadOnly';
|
|
24
24
|
import { useQuestionnaireStore } from '../../../stores';
|
|
25
25
|
import useBooleanCalculatedExpression from '../../../hooks/useBooleanCalculatedExpression';
|
|
26
|
+
import { ItemLabelWrapper } from '../ItemParts';
|
|
26
27
|
function BooleanItem(props) {
|
|
27
28
|
var _a, _b, _c;
|
|
28
29
|
const { qItem, qrItem, isRepeated, isTabled, parentIsReadOnly, onQrItemChange } = props;
|
|
@@ -70,8 +71,7 @@ function BooleanItem(props) {
|
|
|
70
71
|
return (React.createElement(BooleanField, { qItem: qItem, readOnly: readOnly, valueBoolean: valueBoolean, calcExpUpdated: calcExpUpdated, onCheckedChange: handleValueChange, onClear: handleClear }));
|
|
71
72
|
}
|
|
72
73
|
return (React.createElement(FullWidthFormComponentBox, { "data-test": "q-item-boolean-box", "data-linkid": qItem.linkId, onClick: () => onFocusLinkId(qItem.linkId) },
|
|
73
|
-
React.createElement(ItemFieldGrid, { qItem: qItem, readOnly: readOnly },
|
|
74
|
-
React.createElement(BooleanField, { qItem: qItem, readOnly: readOnly, valueBoolean: valueBoolean, calcExpUpdated: calcExpUpdated, onCheckedChange: handleValueChange, onClear: handleClear }))));
|
|
74
|
+
React.createElement(ItemFieldGrid, { qItem: qItem, readOnly: readOnly, labelChildren: React.createElement(ItemLabelWrapper, { qItem: qItem, readOnly: readOnly }), fieldChildren: React.createElement(BooleanField, { qItem: qItem, readOnly: readOnly, valueBoolean: valueBoolean, calcExpUpdated: calcExpUpdated, onCheckedChange: handleValueChange, onClear: handleClear }) })));
|
|
75
75
|
}
|
|
76
76
|
export default BooleanItem;
|
|
77
77
|
//# sourceMappingURL=BooleanItem.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BooleanItem.js","sourceRoot":"","sources":["../../../../src/components/FormComponents/BooleanItem/BooleanItem.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAEH,OAAO,KAAK,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"BooleanItem.js","sourceRoot":"","sources":["../../../../src/components/FormComponents/BooleanItem/Boo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AC9B,eAAe,EAAE,iBAAiB,EAClC,OAAO,EAAE,WAAW,GACpB,CACE,CACP,CAAC;KACH;IAED,IAAI,UAAU,EAAE;QACd,OAAO,CACL,oBAAC,YAAY,IACX,KAAK,EAAE,KAAK,EACZ,QAAQ,EAAE,QAAQ,EAClB,YAAY,EAAE,YAAY,EAC1B,cAAc,EAAE,cAAc,EAC9B,eAAe,EAAE,iBAAiB,EAClC,OAAO,EAAE,WAAW,GACpB,CACH,CAAC;KACH;IAED,OAAO,CACL,oBAAC,yBAAyB,iBACd,oBAAoB,iBACjB,KAAK,CAAC,MAAM,EACzB,OAAO,EAAE,GAAG,EAAE,CAAC,aAAa,CAAC,KAAK,CAAC,MAAM,CAAC;QAC1C,oBAAC,aAAa,IACZ,KAAK,EAAE,KAAK,EACZ,QAAQ,EAAE,QAAQ,EAClB,aAAa,EAAE,oBAAC,gBAAgB,IAAC,KAAK,EAAE,KAAK,EAAE,QAAQ,EAAE,QAAQ,GAAI,EACrE,aAAa,EACX,oBAAC,YAAY,IACX,KAAK,EAAE,KAAK,EACZ,QAAQ,EAAE,QAAQ,EAClB,YAAY,EAAE,YAAY,EAC1B,cAAc,EAAE,cAAc,EAC9B,eAAe,EAAE,iBAAiB,EAClC,OAAO,EAAE,WAAW,GACpB,GAEJ,CACwB,CAC7B,CAAC;AACJ,CAAC;AAED,eAAe,WAAW,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default as BooleanField } from './BooleanField';
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright 2024 Commonwealth Scientific and Industrial Research
|
|
3
|
+
* Organisation (CSIRO) ABN 41 687 119 230.
|
|
4
|
+
*
|
|
5
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
6
|
+
* you may not use this file except in compliance with the License.
|
|
7
|
+
* You may obtain a copy of the License at
|
|
8
|
+
*
|
|
9
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
10
|
+
*
|
|
11
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
12
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
13
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
14
|
+
* See the License for the specific language governing permissions and
|
|
15
|
+
* limitations under the License.
|
|
16
|
+
*/
|
|
17
|
+
export { default as BooleanField } from './BooleanField';
|
|
18
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/components/FormComponents/BooleanItem/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAEH,OAAO,EAAE,OAAO,IAAI,YAAY,EAAE,MAAM,gBAAgB,CAAC"}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import type { Coding, QuestionnaireItem } from 'fhir/r4';
|
|
3
|
-
import type { PropsWithIsTabledAttribute, PropsWithParentIsReadOnlyAttribute } from '../../../interfaces/renderProps.interface';
|
|
3
|
+
import type { PropsWithIsTabledAttribute, PropsWithParentIsReadOnlyAttribute, PropsWithRenderingExtensionsAttribute } from '../../../interfaces/renderProps.interface';
|
|
4
4
|
import type { AlertColor } from '@mui/material/Alert';
|
|
5
|
-
interface ChoiceAutocompleteFieldsProps extends PropsWithIsTabledAttribute, PropsWithParentIsReadOnlyAttribute {
|
|
5
|
+
interface ChoiceAutocompleteFieldsProps extends PropsWithIsTabledAttribute, PropsWithParentIsReadOnlyAttribute, PropsWithRenderingExtensionsAttribute {
|
|
6
6
|
qItem: QuestionnaireItem;
|
|
7
7
|
options: Coding[];
|
|
8
8
|
valueCoding: Coding | null;
|
|
@@ -19,17 +19,19 @@ import Autocomplete from '@mui/material/Autocomplete';
|
|
|
19
19
|
import CircularProgress from '@mui/material/CircularProgress';
|
|
20
20
|
import Fade from '@mui/material/Fade';
|
|
21
21
|
import Tooltip from '@mui/material/Tooltip';
|
|
22
|
-
import { StandardTextField
|
|
22
|
+
import { StandardTextField } from '../Textfield.styles';
|
|
23
23
|
import SearchIcon from '@mui/icons-material/Search';
|
|
24
24
|
import InfoIcon from '@mui/icons-material/Info';
|
|
25
25
|
import WarningAmberIcon from '@mui/icons-material/WarningAmber';
|
|
26
26
|
import DoneIcon from '@mui/icons-material/Done';
|
|
27
27
|
import ErrorIcon from '@mui/icons-material/Error';
|
|
28
|
-
import
|
|
28
|
+
import { useRendererStylingStore } from '../../../stores';
|
|
29
|
+
import Typography from '@mui/material/Typography';
|
|
29
30
|
function ChoiceAutocompleteField(props) {
|
|
30
|
-
const { qItem, options, valueCoding, loading, feedback, readOnly, isTabled, onInputChange, onValueChange } = props;
|
|
31
|
-
const
|
|
32
|
-
|
|
31
|
+
const { qItem, options, valueCoding, loading, feedback, readOnly, isTabled, renderingExtensions, onInputChange, onValueChange } = props;
|
|
32
|
+
const textFieldWidth = useRendererStylingStore.use.textFieldWidth();
|
|
33
|
+
const { displayUnit, displayPrompt, entryFormat } = renderingExtensions;
|
|
34
|
+
return (React.createElement(Autocomplete, { id: qItem.linkId, value: valueCoding !== null && valueCoding !== void 0 ? valueCoding : null, options: options, getOptionLabel: (option) => { var _a; return (_a = option.display) !== null && _a !== void 0 ? _a : `${option.code}`; }, isOptionEqualToValue: (option, value) => option.id === value.id, disabled: readOnly, loading: loading, loadingText: 'Fetching results...', clearOnEscape: true, autoHighlight: true, onChange: (_, newValue) => onValueChange(newValue), sx: { maxWidth: !isTabled ? textFieldWidth : 3000, minWidth: 160, flexGrow: 1 }, filterOptions: (x) => x, renderInput: (params) => (React.createElement(StandardTextField, Object.assign({}, params, { onChange: (e) => onInputChange(e.target.value), textFieldWidth: textFieldWidth, isTabled: isTabled, label: displayPrompt, size: "small", placeholder: entryFormat, InputProps: Object.assign(Object.assign({}, params.InputProps), { startAdornment: (React.createElement(React.Fragment, null,
|
|
33
35
|
!valueCoding ? React.createElement(SearchIcon, { fontSize: "small", sx: { ml: 0.5 } }) : null,
|
|
34
36
|
params.InputProps.startAdornment)), endAdornment: (React.createElement(React.Fragment, null,
|
|
35
37
|
loading ? (React.createElement(CircularProgress, { color: "inherit", size: 16 })) : feedback ? (React.createElement(Fade, { in: !!feedback, timeout: 300 },
|
|
@@ -40,7 +42,7 @@ function ChoiceAutocompleteField(props) {
|
|
|
40
42
|
error: React.createElement(ErrorIcon, { fontSize: "small", color: "error" })
|
|
41
43
|
}[feedback.color]))) : null,
|
|
42
44
|
params.InputProps.endAdornment,
|
|
43
|
-
displayUnit)) }) }))) }));
|
|
45
|
+
React.createElement(Typography, { color: readOnly ? 'text.disabled' : 'text.secondary' }, displayUnit))) }) }))) }));
|
|
44
46
|
}
|
|
45
47
|
export default ChoiceAutocompleteField;
|
|
46
48
|
//# sourceMappingURL=ChoiceAutocompleteField.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ChoiceAutocompleteField.js","sourceRoot":"","sources":["../../../../src/components/FormComponents/ChoiceItems/ChoiceAutocompleteField.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAEH,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,YAAY,MAAM,4BAA4B,CAAC;AACtD,OAAO,gBAAgB,MAAM,gCAAgC,CAAC;AAC9D,OAAO,IAAI,MAAM,oBAAoB,CAAC;AACtC,OAAO,OAAO,MAAM,uBAAuB,CAAC;AAE5C,OAAO,EAAE,iBAAiB,EAAE,
|
|
1
|
+
{"version":3,"file":"ChoiceAutocompleteField.js","sourceRoot":"","sources":["../../../../src/components/FormComponents/ChoiceItems/ChoiceAutocompleteField.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAEH,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,YAAY,MAAM,4BAA4B,CAAC;AACtD,OAAO,gBAAgB,MAAM,gCAAgC,CAAC;AAC9D,OAAO,IAAI,MAAM,oBAAoB,CAAC;AACtC,OAAO,OAAO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AAC,QAAQ,EAAC,OAAO,EAAC,KAAK,EAAC,MAAM,GAAG;4BAChD,OAAO,EAAE,oBAAC,gBAAgB,IAAC,QAAQ,EAAC,OAAO,EAAC,KAAK,EAAC,SAAS,GAAG;4BAC9D,OAAO,EAAE,oBAAC,QAAQ,IAAC,QAAQ,EAAC,OAAO,EAAC,KAAK,EAAC,SAAS,GAAG;4BACtD,KAAK,EAAE,oBAAC,SAAS,IAAC,QAAQ,EAAC,OAAO,EAAC,KAAK,EAAC,OAAO,GAAG;yBACpD,CAAC,QAAQ,CAAC,KAAK,CAAC,CAEX,CACL,CACR,CAAC,CAAC,CAAC,IAAI;oBACP,MAAM,CAAC,UAAU,CAAC,YAAY;oBAC/B,oBAAC,UAAU,IAAC,KAAK,EAAE,QAAQ,CAAC,CAAC,CAAC,eAAe,CAAC,CAAC,CAAC,gBAAgB,IAC7D,WAAW,CACD,CACZ,CACJ,OAEH,CACH,GACD,CACH,CAAC;AACJ,CAAC;AAED,eAAe,uBAAuB,CAAC"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import type { QuestionnaireItem, QuestionnaireResponseItem } from 'fhir/r4';
|
|
3
|
-
import type { PropsWithIsRepeatedAttribute, PropsWithIsTabledAttribute, PropsWithParentIsReadOnlyAttribute, PropsWithQrItemChangeHandler } from '../../../interfaces/renderProps.interface';
|
|
4
|
-
interface ChoiceAutocompleteItemProps extends PropsWithQrItemChangeHandler, PropsWithIsRepeatedAttribute, PropsWithIsTabledAttribute, PropsWithParentIsReadOnlyAttribute {
|
|
3
|
+
import type { PropsWithIsRepeatedAttribute, PropsWithIsTabledAttribute, PropsWithParentIsReadOnlyAttribute, PropsWithQrItemChangeHandler, PropsWithRenderingExtensionsAttribute } from '../../../interfaces/renderProps.interface';
|
|
4
|
+
interface ChoiceAutocompleteItemProps extends PropsWithQrItemChangeHandler, PropsWithIsRepeatedAttribute, PropsWithIsTabledAttribute, PropsWithParentIsReadOnlyAttribute, PropsWithRenderingExtensionsAttribute {
|
|
5
5
|
qItem: QuestionnaireItem;
|
|
6
6
|
qrItem: QuestionnaireResponseItem | null;
|
|
7
7
|
}
|
|
@@ -24,9 +24,10 @@ import useReadOnly from '../../../hooks/useReadOnly';
|
|
|
24
24
|
import ChoiceAutocompleteField from './ChoiceAutocompleteField';
|
|
25
25
|
import ItemFieldGrid from '../ItemParts/ItemFieldGrid';
|
|
26
26
|
import { useQuestionnaireStore } from '../../../stores';
|
|
27
|
+
import { ItemLabelWrapper } from '../ItemParts';
|
|
27
28
|
function ChoiceAutocompleteItem(props) {
|
|
28
29
|
var _a;
|
|
29
|
-
const { qItem, qrItem, isRepeated, isTabled, parentIsReadOnly, onQrItemChange } = props;
|
|
30
|
+
const { qItem, qrItem, isRepeated, isTabled, renderingExtensions, parentIsReadOnly, onQrItemChange } = props;
|
|
30
31
|
const onFocusLinkId = useQuestionnaireStore.use.onFocusLinkId();
|
|
31
32
|
// Init input value
|
|
32
33
|
const answerKey = (_a = qrItem === null || qrItem === void 0 ? void 0 : qrItem.answer) === null || _a === void 0 ? void 0 : _a[0].id;
|
|
@@ -53,11 +54,10 @@ function ChoiceAutocompleteItem(props) {
|
|
|
53
54
|
onQrItemChange(Object.assign(Object.assign({}, createEmptyQrItem(qItem, answerKey)), { answer: [{ id: answerKey, valueCoding: newValue }] }));
|
|
54
55
|
}
|
|
55
56
|
if (isRepeated) {
|
|
56
|
-
return (React.createElement(ChoiceAutocompleteField, { qItem: qItem, options: options, valueCoding: valueCoding !== null && valueCoding !== void 0 ? valueCoding : null, loading: loading, feedback: feedback !== null && feedback !== void 0 ? feedback : null, readOnly: readOnly, isTabled: isTabled, onInputChange: setInput, onValueChange: handleValueChange }));
|
|
57
|
+
return (React.createElement(ChoiceAutocompleteField, { qItem: qItem, options: options, valueCoding: valueCoding !== null && valueCoding !== void 0 ? valueCoding : null, loading: loading, feedback: feedback !== null && feedback !== void 0 ? feedback : null, readOnly: readOnly, isTabled: isTabled, renderingExtensions: renderingExtensions, onInputChange: setInput, onValueChange: handleValueChange }));
|
|
57
58
|
}
|
|
58
59
|
return (React.createElement(FullWidthFormComponentBox, { "data-test": "q-item-choice-autocomplete-box", "data-linkid": qItem.linkId, onClick: () => onFocusLinkId(qItem.linkId) },
|
|
59
|
-
React.createElement(ItemFieldGrid, { qItem: qItem, readOnly: readOnly },
|
|
60
|
-
React.createElement(ChoiceAutocompleteField, { qItem: qItem, options: options, valueCoding: valueCoding !== null && valueCoding !== void 0 ? valueCoding : null, loading: loading, feedback: feedback !== null && feedback !== void 0 ? feedback : null, readOnly: readOnly, isTabled: isTabled, onInputChange: setInput, onValueChange: handleValueChange }))));
|
|
60
|
+
React.createElement(ItemFieldGrid, { qItem: qItem, readOnly: readOnly, labelChildren: React.createElement(ItemLabelWrapper, { qItem: qItem, readOnly: readOnly }), fieldChildren: React.createElement(ChoiceAutocompleteField, { qItem: qItem, options: options, valueCoding: valueCoding !== null && valueCoding !== void 0 ? valueCoding : null, loading: loading, feedback: feedback !== null && feedback !== void 0 ? feedback : null, readOnly: readOnly, isTabled: isTabled, renderingExtensions: renderingExtensions, onInputChange: setInput, onValueChange: handleValueChange }) })));
|
|
61
61
|
}
|
|
62
62
|
export default ChoiceAutocompleteItem;
|
|
63
63
|
//# sourceMappingURL=ChoiceAutocompleteItem.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ChoiceAutocompleteItem.js","sourceRoot":"","sources":["../../../../src/components/FormComponents/ChoiceItems/ChoiceAutocompleteItem.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAEH,OAAO,KAAK,EAAE,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAGxC,OAAO,EAAE,iBAAiB,EAAE,MAAM,uBAAuB,CAAC;AAC1D,OAAO,EAAE,yBAAyB,EAAE,MAAM,kBAAkB,CAAC;AAC7D,OAAO,WAAW,MAAM,4BAA4B,CAAC;AACrD,OAAO,yBAAyB,MAAM,0CAA0C,CAAC;
|
|
1
|
+
{"version":3,"file":"ChoiceAutocompleteItem.js","sourceRoot":"","sources":["../../../../src/components/FormComponents/ChoiceItems/ChoiceAutocompleteItem.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAEH,OAAO,KAAK,EAAE,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAGxC,OAAO,EAAE,iBAAiB,EAAE,MAAM,uBAAuB,CAAC;AAC1D,OAAO,EAAE,yBAAyB,EAAE,MAAM,kBAAkB,CAAC;AAC7D,OAAO,WAAW,MAAM,4BAA4B,CAAC;AACrD,OAAO,yBAAyB,MAAM,0CAA0C,CAAC;AAQjF,OAAO,EAAE,8BAA8B,EAAE,MAAM,yBAAyB,CAAC;AACzE,OAAO,WAAW,MAAM,4BAA4B,CAAC;AACrD,OAAO,uBAAuB,MAAM,2BAA2B,CAAC;AAChE,OAAO,aAAa,MAAM,4BAA4B,CAAC;AACvD,OAAO,EAAE,qBAAqB,EAAE,MAAM,iBAAiB,CAAC;AACxD,OAAO,EAAE,gBAAgB,EAAE,MAAM,cAAc,CAAC;AAYhD,SAAS,sBAAsB,CAAC,KAAkC;;IAChE,MAAM,EACJ,KAAK,EACL,MAAM,EACN,UAAU,EACV,QAAQ,EACR,mBAAmB,EACnB,gBAAgB,EAChB,cAAc,EACf,GAAG,KAAK,CAAC;IAEV,MAAM,aAAa,GAAG,qBAAqB,CAAC,GAAG,CAAC,aAAa,EAAE,CAAC;IAEhE,mBAAmB;IACnB,MAAM,SAAS,GAAG,MAAA,MAAM,aAAN,MAAM,uBAAN,MAAM,CAAE,MAAM,0CAAG,CAAC,EAAE,EAAE,CAAC;IACzC,MAAM,QAAQ,GAAG,MAAM,aAAN,MAAM,cAAN,MAAM,GAAI,iBAAiB,CAAC,KAAK,EAAE,SAAS,CAAC,CAAC;IAE/D,IAAI,WAA+B,CAAC;IACpC,IAAI,QAAQ,CAAC,MAAM,EAAE;QACnB,WAAW,GAAG,QAAQ,C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AAQ,EACvB,aAAa,EAAE,iBAAiB,GAChC,CACH,CAAC;KACH;IAED,OAAO,CACL,oBAAC,yBAAyB,iBACd,gCAAgC,iBAC7B,KAAK,CAAC,MAAM,EACzB,OAAO,EAAE,GAAG,EAAE,CAAC,aAAa,CAAC,KAAK,CAAC,MAAM,CAAC;QAC1C,oBAAC,aAAa,IACZ,KAAK,EAAE,KAAK,EACZ,QAAQ,EAAE,QAAQ,EAClB,aAAa,EAAE,oBAAC,gBAAgB,IAAC,KAAK,EAAE,KAAK,EAAE,QAAQ,EAAE,QAAQ,GAAI,EACrE,aAAa,EACX,oBAAC,uBAAuB,IACtB,KAAK,EAAE,KAAK,EACZ,OAAO,EAAE,OAAO,EAChB,WAAW,EAAE,WAAW,aAAX,WAAW,cAAX,WAAW,GAAI,IAAI,EAChC,OAAO,EAAE,OAAO,EAChB,QAAQ,EAAE,QAAQ,aAAR,QAAQ,cAAR,QAAQ,GAAI,IAAI,EAC1B,QAAQ,EAAE,QAAQ,EAClB,QAAQ,EAAE,QAAQ,EAClB,mBAAmB,EAAE,mBAAmB,EACxC,aAAa,EAAE,QAAQ,EACvB,aAAa,EAAE,iBAAiB,GAChC,GAEJ,CACwB,CAC7B,CAAC;AACJ,CAAC;AAED,eAAe,sBAAsB,CAAC"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import type { QuestionnaireItem, QuestionnaireResponseItem } from 'fhir/r4';
|
|
3
|
-
import type { PropsWithIsRepeatedAttribute, PropsWithParentIsReadOnlyAttribute, PropsWithQrItemChangeHandler, PropsWithShowMinimalViewAttribute } from '../../../interfaces/renderProps.interface';
|
|
4
|
-
interface ChoiceCheckboxAnswerOptionItemProps extends PropsWithQrItemChangeHandler, PropsWithIsRepeatedAttribute, PropsWithShowMinimalViewAttribute, PropsWithParentIsReadOnlyAttribute {
|
|
3
|
+
import type { PropsWithIsRepeatedAttribute, PropsWithParentIsReadOnlyAttribute, PropsWithQrItemChangeHandler, PropsWithRenderingExtensionsAttribute, PropsWithShowMinimalViewAttribute } from '../../../interfaces/renderProps.interface';
|
|
4
|
+
interface ChoiceCheckboxAnswerOptionItemProps extends PropsWithQrItemChangeHandler, PropsWithIsRepeatedAttribute, PropsWithRenderingExtensionsAttribute, PropsWithShowMinimalViewAttribute, PropsWithParentIsReadOnlyAttribute {
|
|
5
5
|
qItem: QuestionnaireItem;
|
|
6
6
|
qrItem: QuestionnaireResponseItem | null;
|
|
7
7
|
}
|
|
@@ -18,22 +18,22 @@ import React from 'react';
|
|
|
18
18
|
import { createEmptyQrItem } from '../../../utils/qrItem';
|
|
19
19
|
import { updateChoiceCheckboxAnswers } from '../../../utils/choice';
|
|
20
20
|
import { FullWidthFormComponentBox } from '../../Box.styles';
|
|
21
|
-
import useRenderingExtensions from '../../../hooks/useRenderingExtensions';
|
|
22
21
|
import DisplayInstructions from '../DisplayItem/DisplayInstructions';
|
|
23
22
|
import useReadOnly from '../../../hooks/useReadOnly';
|
|
24
23
|
import ItemFieldGrid from '../ItemParts/ItemFieldGrid';
|
|
25
24
|
import { useQuestionnaireStore } from '../../../stores';
|
|
26
25
|
import ChoiceCheckboxAnswerOptionFields from './ChoiceCheckboxAnswerOptionFields';
|
|
26
|
+
import { ItemLabelWrapper } from '../ItemParts';
|
|
27
27
|
function ChoiceCheckboxAnswerOptionItem(props) {
|
|
28
28
|
var _a, _b, _c;
|
|
29
|
-
const { qItem, qrItem, isRepeated, showMinimalView = false, parentIsReadOnly, onQrItemChange } = props;
|
|
29
|
+
const { qItem, qrItem, isRepeated, renderingExtensions, showMinimalView = false, parentIsReadOnly, onQrItemChange } = props;
|
|
30
30
|
const onFocusLinkId = useQuestionnaireStore.use.onFocusLinkId();
|
|
31
31
|
// Init input value
|
|
32
32
|
const answerKey = (_a = qrItem === null || qrItem === void 0 ? void 0 : qrItem.answer) === null || _a === void 0 ? void 0 : _a[0].id;
|
|
33
33
|
const qrChoiceCheckbox = qrItem !== null && qrItem !== void 0 ? qrItem : createEmptyQrItem(qItem, answerKey);
|
|
34
34
|
const answers = (_b = qrChoiceCheckbox.answer) !== null && _b !== void 0 ? _b : [];
|
|
35
35
|
const readOnly = useReadOnly(qItem, parentIsReadOnly);
|
|
36
|
-
const { displayInstructions } =
|
|
36
|
+
const { displayInstructions } = renderingExtensions;
|
|
37
37
|
// TODO Process calculated expressions
|
|
38
38
|
// This requires its own hook, because in the case of multi-select, we need to check if the value is already checked to prevent an infinite loop
|
|
39
39
|
// This will be done after the choice/open-choice refactoring
|
|
@@ -55,8 +55,7 @@ function ChoiceCheckboxAnswerOptionItem(props) {
|
|
|
55
55
|
React.createElement(DisplayInstructions, { displayInstructions: displayInstructions, readOnly: readOnly })));
|
|
56
56
|
}
|
|
57
57
|
return (React.createElement(FullWidthFormComponentBox, { "data-test": "q-item-choice-checkbox-answer-option-box", "data-linkid": qItem.linkId, onClick: () => onFocusLinkId(qItem.linkId) },
|
|
58
|
-
React.createElement(ItemFieldGrid, { qItem: qItem, readOnly: readOnly },
|
|
59
|
-
React.createElement(ChoiceCheckboxAnswerOptionFields, { qItem: qItem, options: options, answers: answers, readOnly: readOnly, onCheckedChange: handleCheckedChange }))));
|
|
58
|
+
React.createElement(ItemFieldGrid, { qItem: qItem, readOnly: readOnly, labelChildren: React.createElement(ItemLabelWrapper, { qItem: qItem, readOnly: readOnly }), fieldChildren: React.createElement(ChoiceCheckboxAnswerOptionFields, { qItem: qItem, options: options, answers: answers, readOnly: readOnly, onCheckedChange: handleCheckedChange }) })));
|
|
60
59
|
}
|
|
61
60
|
export default ChoiceCheckboxAnswerOptionItem;
|
|
62
61
|
//# sourceMappingURL=ChoiceCheckboxAnswerOptionItem.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ChoiceCheckboxAnswerOptionItem.js","sourceRoot":"","sources":["../../../../src/components/FormComponents/ChoiceItems/ChoiceCheckboxAnswerOptionItem.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAEH,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAE,iBAAiB,EAAE,MAAM,uBAAuB,CAAC;AAC1D,OAAO,EAAE,2BAA2B,EAAE,MAAM,uBAAuB,CAAC;AACpE,OAAO,EAAE,yBAAyB,EAAE,MAAM,kBAAkB,CAAC;
|
|
1
|
+
{"version":3,"file":"ChoiceCheckboxAnswerOptionItem.js","sourceRoot":"","sources":["../../../../src/components/FormComponents/ChoiceItems/ChoiceCheckboxAnswerOptionItem.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAEH,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAE,iBAAiB,EAAE,MAAM,uBAAuB,CAAC;AAC1D,OAAO,EAAE,2BAA2B,EAAE,MAAM,uBAAuB,CAAC;AACpE,OAAO,EAAE,yBAAyB,EAAE,MAAM,kBAAkB,CAAC;AAQ7D,OAAO,mBAAmB,MAAM,oCAAoC,CAAC;AACrE,OAAO,WAAW,MAAM,4BAA4B,CAAC;AACrD,OAAO,aAAa,MAAM,4BAA4B,CAAC;AACvD,OAAO,EAAE,qBAAqB,EAAE,MAAM,iBAAiB,CAAC;AACxD,OAAO,gCAAgC,MAAM,oCAAoC,CAAC;AAClF,OAAO,EAAE,gBAAgB,EAAE,MAAM,cAAc,CAAC;AAYhD,SAAS,8BAA8B,CAAC,KAA0C;;IAChF,MAAM,EACJ,KAAK,EACL,MAAM,EACN,UAAU,EACV,mBAAmB,EACnB,eAAe,GAAG,KAAK,EACvB,gBAAgB,EAChB,cAAc,EACf,GAAG,KAAK,CAAC;IAEV,MAAM,aAAa,GAAG,qBAAqB,CAAC,GAAG,CAAC,aAAa,EAAE,CAAC;IAEhE,mBAAmB;IACnB,MAAM,SAAS,GAAG,MAAA,MAAM,aAAN,MAAM,uBAAN,MAAM,CAAE,MAAM,0CAAG,CAAC,EAAE,EAAE,CAAC;IACzC,MAAM,gBAAgB,GAAG,MAAM,aAAN,MAAM,cAAN,M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EACZ,QAAQ,EAAE,QAAQ,EAClB,aAAa,EAAE,oBAAC,gBAAgB,IAAC,KAAK,EAAE,KAAK,EAAE,QAAQ,EAAE,QAAQ,GAAI,EACrE,aAAa,EACX,oBAAC,gCAAgC,IAC/B,KAAK,EAAE,KAAK,EACZ,OAAO,EAAE,OAAO,EAChB,OAAO,EAAE,OAAO,EAChB,QAAQ,EAAE,QAAQ,EAClB,eAAe,EAAE,mBAAmB,GACpC,GAEJ,CACwB,CAC7B,CAAC;AACJ,CAAC;AAED,eAAe,8BAA8B,CAAC"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import type { QuestionnaireItem, QuestionnaireResponseItem } from 'fhir/r4';
|
|
3
|
-
import type { PropsWithIsRepeatedAttribute, PropsWithParentIsReadOnlyAttribute, PropsWithQrItemChangeHandler, PropsWithShowMinimalViewAttribute } from '../../../interfaces/renderProps.interface';
|
|
4
|
-
interface ChoiceCheckboxAnswerValueSetItemProps extends PropsWithQrItemChangeHandler, PropsWithIsRepeatedAttribute, PropsWithShowMinimalViewAttribute, PropsWithParentIsReadOnlyAttribute {
|
|
3
|
+
import type { PropsWithIsRepeatedAttribute, PropsWithParentIsReadOnlyAttribute, PropsWithQrItemChangeHandler, PropsWithRenderingExtensionsAttribute, PropsWithShowMinimalViewAttribute } from '../../../interfaces/renderProps.interface';
|
|
4
|
+
interface ChoiceCheckboxAnswerValueSetItemProps extends PropsWithQrItemChangeHandler, PropsWithIsRepeatedAttribute, PropsWithRenderingExtensionsAttribute, PropsWithShowMinimalViewAttribute, PropsWithParentIsReadOnlyAttribute {
|
|
5
5
|
qItem: QuestionnaireItem;
|
|
6
6
|
qrItem: QuestionnaireResponseItem | null;
|
|
7
7
|
showText?: boolean;
|