@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
|
@@ -19,32 +19,18 @@ import Box from '@mui/material/Box';
|
|
|
19
19
|
import ContextDisplayItem from './ContextDisplayItem';
|
|
20
20
|
import { getContextDisplays } from '../../../utils/tabs';
|
|
21
21
|
import ItemLabelText from './ItemLabelText';
|
|
22
|
-
import Tooltip from '@mui/material/Tooltip';
|
|
23
|
-
import Typography from '@mui/material/Typography';
|
|
24
22
|
import useRenderingExtensions from '../../../hooks/useRenderingExtensions';
|
|
25
|
-
import
|
|
23
|
+
import { useRendererStylingStore } from '../../../stores';
|
|
24
|
+
import RequiredAsterisk from './RequiredAsterisk';
|
|
26
25
|
function ItemLabelWrapper(props) {
|
|
27
26
|
const { qItem, readOnly } = props;
|
|
28
|
-
const
|
|
27
|
+
const requiredIndicatorPosition = useRendererStylingStore.use.requiredIndicatorPosition();
|
|
28
|
+
const { required } = useRenderingExtensions(qItem);
|
|
29
29
|
const contextDisplayItems = getContextDisplays(qItem);
|
|
30
30
|
return (React.createElement(Box, { display: "flex", alignItems: "center", justifyContent: "space-between" },
|
|
31
|
-
React.createElement(
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
{
|
|
35
|
-
name: 'offset',
|
|
36
|
-
options: {
|
|
37
|
-
offset: [0, -8]
|
|
38
|
-
}
|
|
39
|
-
}
|
|
40
|
-
]
|
|
41
|
-
}
|
|
42
|
-
} },
|
|
43
|
-
React.createElement("span", null,
|
|
44
|
-
React.createElement(Box, { display: "flex", columnGap: 0.4, justifyContent: "space-between", alignItems: "center" },
|
|
45
|
-
required ? (React.createElement(Typography, { color: "red", sx: { ml: -1.15 } }, "*")) : null,
|
|
46
|
-
React.createElement(ItemLabelText, { qItem: qItem, readOnly: readOnly }),
|
|
47
|
-
displayFlyover !== '' ? (React.createElement(Iconify, { icon: "mdi:information-outline", sx: { height: 16, width: 16, mt: 0.25, ml: 0.25, color: 'text.secondary' } })) : null))),
|
|
31
|
+
React.createElement(Box, { position: "relative", flexGrow: 1 },
|
|
32
|
+
required && requiredIndicatorPosition === 'start' ? (React.createElement(RequiredAsterisk, { sx: { position: 'absolute', top: 0, left: -8 } }, "*")) : null,
|
|
33
|
+
React.createElement(ItemLabelText, { qItem: qItem, readOnly: readOnly })),
|
|
48
34
|
React.createElement(Box, { display: "flex", columnGap: 0.5 }, contextDisplayItems.map((item) => {
|
|
49
35
|
return React.createElement(ContextDisplayItem, { key: item.linkId, displayItem: item });
|
|
50
36
|
}))));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ItemLabelWrapper.js","sourceRoot":"","sources":["../../../../src/components/FormComponents/ItemParts/ItemLabelWrapper.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAEH,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,GAAG,MAAM,mBAAmB,CAAC;AACpC,OAAO,kBAAkB,MAAM,sBAAsB,CAAC;AAEtD,OAAO,EAAE,kBAAkB,EAAE,MAAM,qBAAqB,CAAC;AACzD,OAAO,aAAa,MAAM,iBAAiB,CAAC;AAC5C,OAAO,
|
|
1
|
+
{"version":3,"file":"ItemLabelWrapper.js","sourceRoot":"","sources":["../../../../src/components/FormComponents/It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EAAC,SAAS,EAAE,GAAG,IAC/B,mBAAmB,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE;YAChC,OAAO,oBAAC,kBAAkB,IAAC,GAAG,EAAE,IAAI,CAAC,MAAM,EAAE,WAAW,EAAE,IAAI,GAAI,CAAC;QACrE,CAAC,CAAC,CACE,CACF,CACP,CAAC;AACJ,CAAC;AAED,eAAe,gBAAgB,CAAC"}
|
|
@@ -18,14 +18,16 @@ import React from 'react';
|
|
|
18
18
|
import Box from '@mui/material/Box';
|
|
19
19
|
import { StandardTextField } from '../Textfield.styles';
|
|
20
20
|
import ChoiceRadioSingle from '../ChoiceItems/ChoiceRadioSingle';
|
|
21
|
+
import { useRendererStylingStore } from '../../../stores';
|
|
21
22
|
function RadioButtonWithOpenLabel(props) {
|
|
22
23
|
const { value, label, readOnly, isSelected, onInputChange } = props;
|
|
24
|
+
const textFieldWidth = useRendererStylingStore.use.textFieldWidth();
|
|
23
25
|
function handleInputChange(event) {
|
|
24
26
|
onInputChange(event.target.value);
|
|
25
27
|
}
|
|
26
28
|
return (React.createElement(Box, { "data-test": "q-item-radio-open-label-box" },
|
|
27
|
-
React.createElement(ChoiceRadioSingle, { value: value !== null && value !== void 0 ? value : '', label: label + ':', readOnly: readOnly }),
|
|
28
|
-
React.createElement(StandardTextField, { disabled: !isSelected, value: value, onChange: handleInputChange, fullWidth: true, isTabled: false, size: "small", "data-test": "q-item-radio-open-label-field" })));
|
|
29
|
+
React.createElement(ChoiceRadioSingle, { value: value !== null && value !== void 0 ? value : '', label: label + ':', readOnly: readOnly, fullWidth: false }),
|
|
30
|
+
React.createElement(StandardTextField, { disabled: !isSelected, value: value, onChange: handleInputChange, fullWidth: true, textFieldWidth: textFieldWidth, isTabled: false, size: "small", "data-test": "q-item-radio-open-label-field" })));
|
|
29
31
|
}
|
|
30
32
|
export default RadioButtonWithOpenLabel;
|
|
31
33
|
//# sourceMappingURL=RadioButtonWithOpenLabel.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RadioButtonWithOpenLabel.js","sourceRoot":"","sources":["../../../../src/components/FormComponents/ItemParts/RadioButtonWithOpenLabel.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAGH,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,GAAG,MAAM,mBAAmB,CAAC;AACpC,OAAO,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AACxD,OAAO,iBAAiB,MAAM,kCAAkC,CAAC;
|
|
1
|
+
{"version":3,"file":"RadioButtonWithOpenLabel.js","sourceRoot":"","sources":["../../../../src/components/FormComponents/ItemParts/RadioButtonWithOpenLabel.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAGH,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,GAAG,MAAM,mBAAmB,CAAC;AACpC,OAAO,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AACxD,OAAO,iBAAiB,MAAM,kCAAkC,CAAC;AACjE,OAAO,EAAE,uBAAuB,EAAE,MAAM,iBAAiB,CAAC;AAU1D,SAAS,wBAAwB,CAAC,KAAoC;IACpE,MAAM,EAAE,KAAK,EAAE,KAAK,EAAE,QAAQ,EAAE,UAAU,EAAE,aAAa,EAAE,GAAG,KAAK,CAAC;IAEpE,MAAM,cAAc,GAAG,uBAAuB,CAAC,GAAG,CAAC,cAAc,EAAE,CAAC;IAEpE,SAAS,iBAAiB,CAAC,KAAoC;QAC7D,aAAa,CAAC,KAAK,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;IACpC,CAAC;IAED,OAAO,CACL,oBAAC,GAAG,iBAAW,6BAA6B;QAC1C,oBAAC,iBAAiB,IAChB,KAAK,EAAE,KAAK,aAAL,KAAK,cAAL,KAAK,GAAI,EAAE,EAClB,KAAK,EAAE,KAAK,GAAG,GAAG,EAClB,QAAQ,EAAE,QAAQ,EAClB,SAAS,EAAE,KAAK,GAChB;QACF,oBAAC,iBAAiB,IAChB,QAAQ,EAAE,CAAC,UAAU,EACrB,KAAK,EAAE,KAAK,EACZ,QAAQ,EAAE,iBAAiB,EAC3B,SAAS,QACT,cAAc,EAAE,cAAc,EAC9B,QAAQ,EAAE,KAAK,EACf,IAAI,EAAC,OAAO,eACF,+BAA+B,GACzC,CACE,CACP,CAAC;AACJ,CAAC;AAED,eAAe,wBAAwB,CAAC"}
|
|
@@ -3,6 +3,7 @@ import type { QuestionnaireItemAnswerOption } from 'fhir/r4';
|
|
|
3
3
|
interface RadioOptionListProps {
|
|
4
4
|
options: QuestionnaireItemAnswerOption[];
|
|
5
5
|
readOnly: boolean;
|
|
6
|
+
fullWidth: boolean;
|
|
6
7
|
}
|
|
7
8
|
declare function RadioOptionList(props: RadioOptionListProps): React.JSX.Element;
|
|
8
9
|
export default RadioOptionList;
|
|
@@ -17,17 +17,17 @@
|
|
|
17
17
|
import React from 'react';
|
|
18
18
|
import ChoiceRadioSingle from '../ChoiceItems/ChoiceRadioSingle';
|
|
19
19
|
function RadioOptionList(props) {
|
|
20
|
-
const { options, readOnly } = props;
|
|
20
|
+
const { options, readOnly, fullWidth } = props;
|
|
21
21
|
return (React.createElement(React.Fragment, null, options.map((option) => {
|
|
22
22
|
var _a, _b, _c;
|
|
23
23
|
if (option['valueCoding']) {
|
|
24
|
-
return (React.createElement(ChoiceRadioSingle, { key: (_a = option.valueCoding.code) !== null && _a !== void 0 ? _a : '', value: (_b = option.valueCoding.code) !== null && _b !== void 0 ? _b : '', label: (_c = option.valueCoding.display) !== null && _c !== void 0 ? _c : `${option.valueCoding.code}`, readOnly: readOnly }));
|
|
24
|
+
return (React.createElement(ChoiceRadioSingle, { key: (_a = option.valueCoding.code) !== null && _a !== void 0 ? _a : '', value: (_b = option.valueCoding.code) !== null && _b !== void 0 ? _b : '', label: (_c = option.valueCoding.display) !== null && _c !== void 0 ? _c : `${option.valueCoding.code}`, readOnly: readOnly, fullWidth: fullWidth }));
|
|
25
25
|
}
|
|
26
26
|
if (option['valueString']) {
|
|
27
|
-
return (React.createElement(ChoiceRadioSingle, { key: option.valueString, value: option.valueString, label: option.valueString, readOnly: readOnly }));
|
|
27
|
+
return (React.createElement(ChoiceRadioSingle, { key: option.valueString, value: option.valueString, label: option.valueString, readOnly: readOnly, fullWidth: fullWidth }));
|
|
28
28
|
}
|
|
29
29
|
if (option['valueInteger']) {
|
|
30
|
-
return (React.createElement(ChoiceRadioSingle, { key: option.valueInteger, value: option.valueInteger.toString(), label: option.valueInteger.toString(), readOnly: readOnly }));
|
|
30
|
+
return (React.createElement(ChoiceRadioSingle, { key: option.valueInteger, value: option.valueInteger.toString(), label: option.valueInteger.toString(), readOnly: readOnly, fullWidth: fullWidth }));
|
|
31
31
|
}
|
|
32
32
|
return null;
|
|
33
33
|
})));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RadioOptionList.js","sourceRoot":"","sources":["../../../../src/components/FormComponents/ItemParts/RadioOptionList.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAEH,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,iBAAiB,MAAM,kCAAkC,CAAC;
|
|
1
|
+
{"version":3,"file":"RadioOptionList.js","sourceRoot":"","sources":["../../../../src/components/FormComponents/ItemParts/RadioOptionList.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAEH,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,iBAAiB,MAAM,kCAAkC,CAAC;AASjE,SAAS,eAAe,CAAC,KAA2B;IAClD,MAAM,EAAE,OAAO,EAAE,QAAQ,EAAE,SAAS,EAAE,GAAG,KAAK,CAAC;IAE/C,OAAO,CACL,0CACG,OAAO,CAAC,GAAG,CAAC,CAAC,MAAM,EAAE,EAAE;;QACtB,IAAI,MAAM,CAAC,aAAa,CAAC,EAAE;YACzB,OAAO,CACL,oBAAC,iBAAiB,IAChB,GAAG,EAAE,MAAA,MAAM,CAAC,WAAW,CAAC,IAAI,mCAAI,EAAE,EAClC,KAAK,EAAE,MAAA,MAAM,CAAC,WAAW,CAAC,IAAI,mCAAI,EAAE,EACpC,KAAK,EAAE,MAAA,MAAM,CAAC,WAAW,CAAC,OAAO,mCAAI,GAAG,MAAM,CAAC,WAAW,CAAC,IAAI,EAAE,EACjE,QAAQ,EAAE,QAAQ,EAClB,SAAS,EAAE,SAAS,GACpB,CACH,CAAC;SACH;QAED,IAAI,MAAM,CAAC,aAAa,CAAC,EAAE;YACzB,OAAO,CACL,oBAAC,iBAAiB,IAChB,GAAG,EAAE,MAAM,CAAC,WAAW,EACvB,KAAK,EAAE,MAAM,CAAC,WAAW,EACzB,KAAK,EAAE,MAAM,CAAC,WAAW,EACzB,QAAQ,EAAE,QAAQ,EAClB,SAAS,EAAE,SAAS,GACpB,CACH,CAAC;SACH;QAED,IAAI,MAAM,CAAC,cAAc,CAAC,EAAE;YAC1B,OAAO,CACL,oBAAC,iBAAiB,IAChB,GAAG,EAAE,MAAM,CAAC,YAAY,EACxB,KAAK,EAAE,MAAM,CAAC,YAAY,CAAC,QAAQ,EAAE,EACrC,KAAK,EAAE,MAAM,CAAC,YAAY,CAAC,QAAQ,EAAE,EACrC,QAAQ,EAAE,QAAQ,EAClB,SAAS,EAAE,SAAS,GACpB,CACH,CAAC;SACH;QAED,OAAO,IAAI,CAAC;IACd,CAAC,CAAC,CACD,CACJ,CAAC;AACJ,CAAC;AAED,eAAe,eAAe,CAAC"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { TypographyProps } from '@mui/material/Typography';
|
|
3
|
+
interface RequiredAsteriskProps extends TypographyProps {
|
|
4
|
+
readOnly?: boolean;
|
|
5
|
+
}
|
|
6
|
+
declare function RequiredAsterisk(props: RequiredAsteriskProps): React.JSX.Element;
|
|
7
|
+
export default RequiredAsterisk;
|
|
@@ -0,0 +1,35 @@
|
|
|
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
|
+
var __rest = (this && this.__rest) || function (s, e) {
|
|
18
|
+
var t = {};
|
|
19
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
20
|
+
t[p] = s[p];
|
|
21
|
+
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
22
|
+
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
23
|
+
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
24
|
+
t[p[i]] = s[p[i]];
|
|
25
|
+
}
|
|
26
|
+
return t;
|
|
27
|
+
};
|
|
28
|
+
import React from 'react';
|
|
29
|
+
import Typography from '@mui/material/Typography';
|
|
30
|
+
function RequiredAsterisk(props) {
|
|
31
|
+
const { readOnly, children = '*' } = props, rest = __rest(props, ["readOnly", "children"]);
|
|
32
|
+
return (React.createElement(Typography, Object.assign({ color: readOnly ? 'rgba(255, 0, 0, 0.5)' : 'red' }, rest), children));
|
|
33
|
+
}
|
|
34
|
+
export default RequiredAsterisk;
|
|
35
|
+
//# sourceMappingURL=RequiredAsterisk.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"RequiredAsterisk.js","sourceRoot":"","sources":["../../../../src/components/FormComponents/ItemParts/RequiredAsterisk.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;;;;;;;;;;;;AAEH,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,UAAU,MAAM,0BAA0B,CAAC;AAMlD,SAAS,gBAAgB,CAAC,KAA4B;IACpD,MAAM,EAAE,QAAQ,EAAE,QAAQ,GAAG,GAAG,KAAc,KAAK,EAAd,IAAI,UAAK,KAAK,EAA7C,wBAAqC,CAAQ,CAAC;IAEpD,OAAO,CACL,oBAAC,UAAU,kBAAC,KAAK,EAAE,QAAQ,CAAC,CAAC,CAAC,sBAAsB,CAAC,CAAC,CAAC,KAAK,IAAM,IAAI,GACnE,QAAQ,CACE,CACd,CAAC;AACJ,CAAC;AAED,eAAe,gBAAgB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/components/FormComponents/ItemParts/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAEH,OAAO,EAAE,OAAO,IAAI,aAAa,EAAE,MAAM,iBAAiB,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/components/FormComponents/ItemParts/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAEH,OAAO,EAAE,OAAO,IAAI,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAC3D,OAAO,EAAE,OAAO,IAAI,gBAAgB,EAAE,MAAM,oBAAoB,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 OpenChoiceAutocompleteFieldProps extends PropsWithIsTabledAttribute, PropsWithParentIsReadOnlyAttribute {
|
|
5
|
+
interface OpenChoiceAutocompleteFieldProps extends PropsWithIsTabledAttribute, PropsWithParentIsReadOnlyAttribute, PropsWithRenderingExtensionsAttribute {
|
|
6
6
|
qItem: QuestionnaireItem;
|
|
7
7
|
options: Coding[];
|
|
8
8
|
valueAutocomplete: string | Coding;
|
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
import React from 'react';
|
|
18
18
|
import Box from '@mui/material/Box';
|
|
19
19
|
import Autocomplete from '@mui/material/Autocomplete';
|
|
20
|
-
import { StandardTextField
|
|
20
|
+
import { StandardTextField } from '../Textfield.styles';
|
|
21
21
|
import SearchIcon from '@mui/icons-material/Search';
|
|
22
22
|
import CircularProgress from '@mui/material/CircularProgress';
|
|
23
23
|
import Fade from '@mui/material/Fade';
|
|
@@ -26,12 +26,14 @@ import InfoIcon from '@mui/icons-material/Info';
|
|
|
26
26
|
import WarningAmberIcon from '@mui/icons-material/WarningAmber';
|
|
27
27
|
import DoneIcon from '@mui/icons-material/Done';
|
|
28
28
|
import ErrorIcon from '@mui/icons-material/Error';
|
|
29
|
-
import
|
|
29
|
+
import { useRendererStylingStore } from '../../../stores';
|
|
30
|
+
import Typography from '@mui/material/Typography';
|
|
30
31
|
function OpenChoiceAutocompleteField(props) {
|
|
31
|
-
const { qItem, options, valueAutocomplete, input, loading, feedback, readOnly, isTabled, onInputChange, onValueChange, onUnfocus } = props;
|
|
32
|
-
const
|
|
32
|
+
const { qItem, options, valueAutocomplete, input, loading, feedback, readOnly, isTabled, renderingExtensions, onInputChange, onValueChange, onUnfocus } = props;
|
|
33
|
+
const textFieldWidth = useRendererStylingStore.use.textFieldWidth();
|
|
34
|
+
const { displayUnit, displayPrompt, entryFormat } = renderingExtensions;
|
|
33
35
|
return (React.createElement(Box, { display: "flex" },
|
|
34
|
-
React.createElement(Autocomplete, { id: qItem.linkId, value: valueAutocomplete, options: options, getOptionLabel: (option) => { var _a; return typeof option === 'string' ? option : (_a = option.display) !== null && _a !== void 0 ? _a : `${option.code}`; }, disabled: readOnly, loading: loading, loadingText: 'Fetching results...', clearOnEscape: true, freeSolo: true, sx: { maxWidth: !isTabled ?
|
|
36
|
+
React.createElement(Autocomplete, { id: qItem.linkId, value: valueAutocomplete, options: options, getOptionLabel: (option) => { var _a; return typeof option === 'string' ? option : (_a = option.display) !== null && _a !== void 0 ? _a : `${option.code}`; }, disabled: readOnly, loading: loading, loadingText: 'Fetching results...', clearOnEscape: true, freeSolo: true, sx: { maxWidth: !isTabled ? textFieldWidth : 3000, minWidth: 220, flexGrow: 1 }, onChange: (_, newValue) => onValueChange(newValue), filterOptions: (x) => x, renderInput: (params) => (React.createElement(StandardTextField, Object.assign({}, params, { value: input, onBlur: onUnfocus, 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,
|
|
35
37
|
!valueAutocomplete || valueAutocomplete === '' ? (React.createElement(SearchIcon, { fontSize: "small", sx: { ml: 0.5 } })) : null,
|
|
36
38
|
params.InputProps.startAdornment)),
|
|
37
39
|
// Warning indicator should not show up in open-choice autocomplete
|
|
@@ -44,7 +46,7 @@ function OpenChoiceAutocompleteField(props) {
|
|
|
44
46
|
error: React.createElement(ErrorIcon, { fontSize: "small", color: "error" })
|
|
45
47
|
}[feedback.color]))) : null,
|
|
46
48
|
params.InputProps.endAdornment,
|
|
47
|
-
displayUnit)) }), "data-test": "q-item-open-choice-autocomplete-field" }))) })));
|
|
49
|
+
React.createElement(Typography, { color: readOnly ? 'text.disabled' : 'text.secondary' }, displayUnit))) }), "data-test": "q-item-open-choice-autocomplete-field" }))) })));
|
|
48
50
|
}
|
|
49
51
|
export default OpenChoiceAutocompleteField;
|
|
50
52
|
//# sourceMappingURL=OpenChoiceAutocompleteField.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"OpenChoiceAutocompleteField.js","sourceRoot":"","sources":["../../../../src/components/FormComponents/OpenChoiceItems/OpenChoiceAutocompleteField.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAEH,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,GAAG,MAAM,mBAAmB,CAAC;AACpC,OAAO,YAAY,MAAM,4BAA4B,CAAC;AACtD,OAAO,EAAE,iBAAiB,EAAE,
|
|
1
|
+
{"version":3,"file":"OpenChoiceAutocompleteField.js","sourceRoot":"","sources":["../../../../src/components/FormComponents/OpenChoiceItems/OpenChoiceAutocompleteField.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAEH,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,GAAG,MAAM,mBAAmB,CAAC;AACpC,OAAO,YAAY,MAAM,4BAA4B,CAAC;AACtD,OAAO,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AACxD,OAAO,UAAU,MAAM,4BAA4B,CAAC;AACpD,OAAO,gBAAgB,MAAM,gCAAgC,CAAC;AAC9D,OAAO,IAAI,MAAM,oBAAoB,CAAC;AACtC,OAAO,OAAO,MAAM,uBAAuB,CAAC;AAC5C,OAAO,QAAQ,MAAM,0BAA0B,CAAC;AAChD,OAAO,gBAAgB,MAAM,kCAAkC,CAAC;AAChE,OAAO,QAAQ,MAAM,0BAA0B,CAAC;AAChD,OAAO,SAAS,MAAM,2BAA2B,CAAC;AAQlD,OAAO,EAAE,uBAAuB,EAAE,MAAM,iBAAiB,CAAC;AAC1D,OAAO,UAAU,MAAM,0BAA0B,CAAC;AAkBlD,SAAS,2BAA2B,CAAC,KAAuC;IAC1E,MAAM,EACJ,KAAK,EACL,OAAO,EACP,iBAAiB,EACjB,KAAK,EACL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D,CAAC,QAAQ,CAAC,KAAK,CAAC,CAEX,CACL,CACR,CAAC,CAAC,CAAC,IAAI;wBACP,MAAM,CAAC,UAAU,CAAC,YAAY;wBAC/B,oBAAC,UAAU,IAAC,KAAK,EAAE,QAAQ,CAAC,CAAC,CAAC,eAAe,CAAC,CAAC,CAAC,gBAAgB,IAC7D,WAAW,CACD,CACZ,CACJ,kBAEO,uCAAuC,IACjD,CACH,GACD,CACE,CACP,CAAC;AACJ,CAAC;AAED,eAAe,2BAA2B,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 OpenChoiceAutocompleteItemProps extends PropsWithQrItemChangeHandler, PropsWithIsRepeatedAttribute, PropsWithIsTabledAttribute, PropsWithParentIsReadOnlyAttribute {
|
|
3
|
+
import type { PropsWithIsRepeatedAttribute, PropsWithIsTabledAttribute, PropsWithParentIsReadOnlyAttribute, PropsWithQrItemChangeHandler, PropsWithRenderingExtensionsAttribute } from '../../../interfaces/renderProps.interface';
|
|
4
|
+
interface OpenChoiceAutocompleteItemProps extends PropsWithQrItemChangeHandler, PropsWithIsRepeatedAttribute, PropsWithIsTabledAttribute, PropsWithRenderingExtensionsAttribute, PropsWithParentIsReadOnlyAttribute {
|
|
5
5
|
qItem: QuestionnaireItem;
|
|
6
6
|
qrItem: QuestionnaireResponseItem | null;
|
|
7
7
|
}
|
|
@@ -24,9 +24,10 @@ import OpenChoiceAutocompleteField from './OpenChoiceAutocompleteField';
|
|
|
24
24
|
import useReadOnly from '../../../hooks/useReadOnly';
|
|
25
25
|
import ItemFieldGrid from '../ItemParts/ItemFieldGrid';
|
|
26
26
|
import { useQuestionnaireStore } from '../../../stores';
|
|
27
|
+
import { ItemLabelWrapper } from '../ItemParts';
|
|
27
28
|
function OpenChoiceAutocompleteItem(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
|
const readOnly = useReadOnly(qItem, parentIsReadOnly);
|
|
32
33
|
const answerKey = (_a = qrItem === null || qrItem === void 0 ? void 0 : qrItem.answer) === null || _a === void 0 ? void 0 : _a[0].id;
|
|
@@ -72,11 +73,10 @@ function OpenChoiceAutocompleteItem(props) {
|
|
|
72
73
|
}
|
|
73
74
|
}
|
|
74
75
|
if (isRepeated) {
|
|
75
|
-
return (React.createElement(OpenChoiceAutocompleteField, { qItem: qItem, options: options, valueAutocomplete: valueAutocomplete, input: input, loading: loading, feedback: feedback !== null && feedback !== void 0 ? feedback : null, readOnly: readOnly, isTabled: isTabled, onInputChange: (newValue) => setInput(newValue), onValueChange: handleValueChange, onUnfocus: handleUnfocus }));
|
|
76
|
+
return (React.createElement(OpenChoiceAutocompleteField, { qItem: qItem, options: options, valueAutocomplete: valueAutocomplete, input: input, loading: loading, feedback: feedback !== null && feedback !== void 0 ? feedback : null, readOnly: readOnly, isTabled: isTabled, renderingExtensions: renderingExtensions, onInputChange: (newValue) => setInput(newValue), onValueChange: handleValueChange, onUnfocus: handleUnfocus }));
|
|
76
77
|
}
|
|
77
78
|
return (React.createElement(FullWidthFormComponentBox, { "data-test": "q-item-open-choice-autocomplete-box", "data-linkid": qItem.linkId, onClick: () => onFocusLinkId(qItem.linkId) },
|
|
78
|
-
React.createElement(ItemFieldGrid, { qItem: qItem, readOnly: readOnly },
|
|
79
|
-
React.createElement(OpenChoiceAutocompleteField, { qItem: qItem, options: options, valueAutocomplete: valueAutocomplete, input: input, loading: loading, feedback: feedback !== null && feedback !== void 0 ? feedback : null, readOnly: readOnly, isTabled: isTabled, onInputChange: (newValue) => setInput(newValue), onValueChange: handleValueChange, onUnfocus: handleUnfocus }))));
|
|
79
|
+
React.createElement(ItemFieldGrid, { qItem: qItem, readOnly: readOnly, labelChildren: React.createElement(ItemLabelWrapper, { qItem: qItem, readOnly: readOnly }), fieldChildren: React.createElement(OpenChoiceAutocompleteField, { qItem: qItem, options: options, valueAutocomplete: valueAutocomplete, input: input, loading: loading, feedback: feedback !== null && feedback !== void 0 ? feedback : null, readOnly: readOnly, isTabled: isTabled, renderingExtensions: renderingExtensions, onInputChange: (newValue) => setInput(newValue), onValueChange: handleValueChange, onUnfocus: handleUnfocus }) })));
|
|
80
80
|
}
|
|
81
81
|
export default OpenChoiceAutocompleteItem;
|
|
82
82
|
//# sourceMappingURL=OpenChoiceAutocompleteItem.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"OpenChoiceAutocompleteItem.js","sourceRoot":"","sources":["../../../../src/components/FormComponents/OpenChoiceItems/OpenChoiceAutocompleteItem.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAEH,OAAO,KAAK,EAAE,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAIxC,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":"OpenChoiceAutocompleteItem.js","sourceRoot":"","sources":["../../../../src/components/FormComponents/OpenChoiceItems/OpenChoiceAutocompleteItem.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAEH,OAAO,KAAK,EAAE,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAIxC,OAAO,EAAE,iBAAiB,EAAE,MAA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AAE,EAAE,CAAC,QAAQ,CAAC,QAAQ,CAAC,EAC/C,aAAa,EAAE,iBAAiB,EAChC,SAAS,EAAE,aAAa,GACxB,GAEJ,CACwB,CAC7B,CAAC;AACJ,CAAC;AAED,eAAe,0BAA0B,CAAC"}
|
package/lib/components/FormComponents/OpenChoiceItems/OpenChoiceCheckboxAnswerOptionItem.d.ts
CHANGED
|
@@ -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 OpenChoiceCheckboxAnswerOptionItemProps extends PropsWithQrItemChangeHandler, PropsWithIsRepeatedAttribute, PropsWithShowMinimalViewAttribute, PropsWithParentIsReadOnlyAttribute {
|
|
3
|
+
import type { PropsWithIsRepeatedAttribute, PropsWithParentIsReadOnlyAttribute, PropsWithQrItemChangeHandler, PropsWithRenderingExtensionsAttribute, PropsWithShowMinimalViewAttribute } from '../../../interfaces/renderProps.interface';
|
|
4
|
+
interface OpenChoiceCheckboxAnswerOptionItemProps extends PropsWithQrItemChangeHandler, PropsWithIsRepeatedAttribute, PropsWithShowMinimalViewAttribute, PropsWithParentIsReadOnlyAttribute, PropsWithRenderingExtensionsAttribute {
|
|
5
5
|
qItem: QuestionnaireItem;
|
|
6
6
|
qrItem: QuestionnaireResponseItem | null;
|
|
7
7
|
}
|
|
@@ -20,7 +20,6 @@ import { getOpenLabelText } from '../../../utils/itemControl';
|
|
|
20
20
|
import { updateOpenLabelAnswer } from '../../../utils/openChoice';
|
|
21
21
|
import { FullWidthFormComponentBox } from '../../Box.styles';
|
|
22
22
|
import debounce from 'lodash.debounce';
|
|
23
|
-
import useRenderingExtensions from '../../../hooks/useRenderingExtensions';
|
|
24
23
|
import { DEBOUNCE_DURATION } from '../../../utils/debounce';
|
|
25
24
|
import DisplayInstructions from '../DisplayItem/DisplayInstructions';
|
|
26
25
|
import useReadOnly from '../../../hooks/useReadOnly';
|
|
@@ -29,16 +28,17 @@ import { useQuestionnaireStore } from '../../../stores';
|
|
|
29
28
|
import useOpenLabel from '../../../hooks/useOpenLabel';
|
|
30
29
|
import { updateChoiceCheckboxAnswers } from '../../../utils/choice';
|
|
31
30
|
import OpenChoiceCheckboxAnswerOptionFields from './OpenChoiceCheckboxAnswerOptionFields';
|
|
31
|
+
import { ItemLabelWrapper } from '../ItemParts';
|
|
32
32
|
function OpenChoiceCheckboxAnswerOptionItem(props) {
|
|
33
33
|
var _a, _b, _c;
|
|
34
|
-
const { qItem, qrItem, isRepeated, showMinimalView = false, parentIsReadOnly, onQrItemChange } = props;
|
|
34
|
+
const { qItem, qrItem, isRepeated, renderingExtensions, showMinimalView = false, parentIsReadOnly, onQrItemChange } = props;
|
|
35
35
|
const onFocusLinkId = useQuestionnaireStore.use.onFocusLinkId();
|
|
36
36
|
// Init input value
|
|
37
37
|
const answerKey = (_a = qrItem === null || qrItem === void 0 ? void 0 : qrItem.answer) === null || _a === void 0 ? void 0 : _a[0].id;
|
|
38
38
|
const qrOpenChoiceCheckbox = qrItem !== null && qrItem !== void 0 ? qrItem : createEmptyQrItem(qItem, answerKey);
|
|
39
39
|
const answers = (_b = qrOpenChoiceCheckbox.answer) !== null && _b !== void 0 ? _b : [];
|
|
40
40
|
const readOnly = useReadOnly(qItem, parentIsReadOnly);
|
|
41
|
-
const { displayInstructions } =
|
|
41
|
+
const { displayInstructions } = renderingExtensions;
|
|
42
42
|
const openLabelText = getOpenLabelText(qItem);
|
|
43
43
|
const options = (_c = qItem.answerOption) !== null && _c !== void 0 ? _c : [];
|
|
44
44
|
const { openLabelValue, setOpenLabelValue, openLabelChecked, setOpenLabelChecked } = useOpenLabel(options, answers);
|
|
@@ -84,8 +84,7 @@ function OpenChoiceCheckboxAnswerOptionItem(props) {
|
|
|
84
84
|
React.createElement(DisplayInstructions, { displayInstructions: displayInstructions, readOnly: readOnly })));
|
|
85
85
|
}
|
|
86
86
|
return (React.createElement(FullWidthFormComponentBox, { "data-test": "q-item-open-choice-checkbox-answer-option-box", "data-linkid": qItem.linkId, onClick: () => onFocusLinkId(qItem.linkId) },
|
|
87
|
-
React.createElement(ItemFieldGrid, { qItem: qItem, readOnly: readOnly },
|
|
88
|
-
React.createElement(OpenChoiceCheckboxAnswerOptionFields, { qItem: qItem, options: options, answers: answers, openLabelText: openLabelText, openLabelValue: openLabelValue, openLabelChecked: openLabelChecked, readOnly: readOnly, onOptionChange: handleOptionChange, onOpenLabelCheckedChange: handleOpenLabelCheckedChange, onOpenLabelInputChange: handleOpenLabelInputChange }))));
|
|
87
|
+
React.createElement(ItemFieldGrid, { qItem: qItem, readOnly: readOnly, labelChildren: React.createElement(ItemLabelWrapper, { qItem: qItem, readOnly: readOnly }), fieldChildren: React.createElement(OpenChoiceCheckboxAnswerOptionFields, { qItem: qItem, options: options, answers: answers, openLabelText: openLabelText, openLabelValue: openLabelValue, openLabelChecked: openLabelChecked, readOnly: readOnly, onOptionChange: handleOptionChange, onOpenLabelCheckedChange: handleOpenLabelCheckedChange, onOpenLabelInputChange: handleOpenLabelInputChange }) })));
|
|
89
88
|
}
|
|
90
89
|
export default OpenChoiceCheckboxAnswerOptionItem;
|
|
91
90
|
//# sourceMappingURL=OpenChoiceCheckboxAnswerOptionItem.js.map
|
package/lib/components/FormComponents/OpenChoiceItems/OpenChoiceCheckboxAnswerOptionItem.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"OpenChoiceCheckboxAnswerOptionItem.js","sourceRoot":"","sources":["../../../../src/components/FormComponents/OpenChoiceItems/OpenChoiceCheckboxAnswerOptionItem.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAEH,OAAO,KAAK,EAAE,EAAE,WAAW,EAAE,MAAM,OAAO,CAAC;AAE3C,OAAO,EAAE,iBAAiB,EAAE,MAAM,uBAAuB,CAAC;AAC1D,OAAO,EAAE,gBAAgB,EAAE,MAAM,4BAA4B,CAAC;AAC9D,OAAO,EAAE,qBAAqB,EAAE,MAAM,2BAA2B,CAAC;AAClE,OAAO,EAAE,yBAAyB,EAAE,MAAM,kBAAkB,CAAC;AAC7D,OAAO,QAAQ,MAAM,iBAAiB,CAAC;
|
|
1
|
+
{"version":3,"file":"OpenChoiceCheckboxAnswerOptionItem.js","sourceRoot":"","sources":["../../../../src/components/FormComponents/OpenChoiceItems/OpenChoiceCheckboxAnswerOptionItem.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAEH,OAAO,KAAK,EAAE,EAAE,WAAW,EAAE,MAAM,OAAO,CAAC;AAE3C,OAAO,EAAE,iBAAiB,EAAE,MAAM,uBAAuB,CAAC;AAC1D,OAAO,EAAE,gBAAgB,EAAE,MAAM,4BAA4B,CAAC;AAC9D,OAAO,EAAE,qBAAqB,EAAE,MAAM,2BAA2B,CAAC;AAClE,OAAO,EAAE,yBAAyB,EAAE,MAAM,kBAAkB,CAAC;AAC7D,OAAO,QAAQ,MAAM,iBAAiB,CAAC;AAQvC,OAAO,EAAE,iBAAiB,EAAE,MAAM,yBAAyB,CAAC;AAC5D,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,YAAY,MAAM,6BAA6B,CAAC;AACvD,OAAO,EAAE,2BAA2B,EAAE,MAAM,uBAAuB,CAAC;AACpE,OAAO,oCAAoC,MAAM,wCAAwC,CAAC;AAC1F,OAAO,EAAE,gBAAgB,EAAE,MAAM,cAAc,CAAC;AAYhD,SAAS,kCAAkC,CAAC,KAA8C;;IACxF,MAAM,EACJ,KAAK,EACL,MAAM,EACN,UAAU,EACV,mBA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AQ,EAAE,QAAQ,GAAI,CACpF,CACJ,CAAC;KACH;IAED,OAAO,CACL,oBAAC,yBAAyB,iBACd,+CAA+C,iBAC5C,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,oCAAoC,IACnC,KAAK,EAAE,KAAK,EACZ,OAAO,EAAE,OAAO,EAChB,OAAO,EAAE,OAAO,EAChB,aAAa,EAAE,aAAa,EAC5B,cAAc,EAAE,cAAc,EAC9B,gBAAgB,EAAE,gBAAgB,EAClC,QAAQ,EAAE,QAAQ,EAClB,cAAc,EAAE,kBAAkB,EAClC,wBAAwB,EAAE,4BAA4B,EACtD,sBAAsB,EAAE,0BAA0B,GAClD,GAEJ,CACwB,CAC7B,CAAC;AACJ,CAAC;AAED,eAAe,kCAAkC,CAAC"}
|
package/lib/components/FormComponents/OpenChoiceItems/OpenChoiceCheckboxAnswerValueSetItem.d.ts
CHANGED
|
@@ -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 OpenChoiceCheckboxAnswerValueSetItemProps extends PropsWithQrItemChangeHandler, PropsWithIsRepeatedAttribute, PropsWithShowMinimalViewAttribute, PropsWithParentIsReadOnlyAttribute {
|
|
3
|
+
import type { PropsWithIsRepeatedAttribute, PropsWithParentIsReadOnlyAttribute, PropsWithQrItemChangeHandler, PropsWithRenderingExtensionsAttribute, PropsWithShowMinimalViewAttribute } from '../../../interfaces/renderProps.interface';
|
|
4
|
+
interface OpenChoiceCheckboxAnswerValueSetItemProps extends PropsWithQrItemChangeHandler, PropsWithIsRepeatedAttribute, PropsWithShowMinimalViewAttribute, PropsWithParentIsReadOnlyAttribute, PropsWithRenderingExtensionsAttribute {
|
|
5
5
|
qItem: QuestionnaireItem;
|
|
6
6
|
qrItem: QuestionnaireResponseItem | null;
|
|
7
7
|
}
|
package/lib/components/FormComponents/OpenChoiceItems/OpenChoiceCheckboxAnswerValueSetItem.js
CHANGED
|
@@ -20,7 +20,6 @@ import { getOpenLabelText } from '../../../utils/itemControl';
|
|
|
20
20
|
import { updateOpenLabelAnswer } from '../../../utils/openChoice';
|
|
21
21
|
import { FullWidthFormComponentBox } from '../../Box.styles';
|
|
22
22
|
import debounce from 'lodash.debounce';
|
|
23
|
-
import useRenderingExtensions from '../../../hooks/useRenderingExtensions';
|
|
24
23
|
import { DEBOUNCE_DURATION } from '../../../utils/debounce';
|
|
25
24
|
import DisplayInstructions from '../DisplayItem/DisplayInstructions';
|
|
26
25
|
import OpenChoiceCheckboxAnswerValueSetFields from './OpenChoiceCheckboxAnswerValueSetFields';
|
|
@@ -30,16 +29,17 @@ import { useQuestionnaireStore } from '../../../stores';
|
|
|
30
29
|
import useOpenLabel from '../../../hooks/useOpenLabel';
|
|
31
30
|
import { convertCodingsToAnswerOptions, updateChoiceCheckboxAnswers } from '../../../utils/choice';
|
|
32
31
|
import useValueSetCodings from '../../../hooks/useValueSetCodings';
|
|
32
|
+
import { ItemLabelWrapper } from '../ItemParts';
|
|
33
33
|
function OpenChoiceCheckboxAnswerValueSetItem(props) {
|
|
34
34
|
var _a, _b;
|
|
35
|
-
const { qItem, qrItem, isRepeated, showMinimalView = false, parentIsReadOnly, onQrItemChange } = props;
|
|
35
|
+
const { qItem, qrItem, isRepeated, renderingExtensions, showMinimalView = false, parentIsReadOnly, onQrItemChange } = props;
|
|
36
36
|
const onFocusLinkId = useQuestionnaireStore.use.onFocusLinkId();
|
|
37
37
|
// Init input value
|
|
38
38
|
const answerKey = (_a = qrItem === null || qrItem === void 0 ? void 0 : qrItem.answer) === null || _a === void 0 ? void 0 : _a[0].id;
|
|
39
39
|
const qrOpenChoiceCheckbox = qrItem !== null && qrItem !== void 0 ? qrItem : createEmptyQrItem(qItem, answerKey);
|
|
40
40
|
const answers = (_b = qrOpenChoiceCheckbox.answer) !== null && _b !== void 0 ? _b : [];
|
|
41
41
|
const readOnly = useReadOnly(qItem, parentIsReadOnly);
|
|
42
|
-
const { displayInstructions } =
|
|
42
|
+
const { displayInstructions } = renderingExtensions;
|
|
43
43
|
const openLabelText = getOpenLabelText(qItem);
|
|
44
44
|
// Get codings/options from valueSet
|
|
45
45
|
const { codings, terminologyError } = useValueSetCodings(qItem);
|
|
@@ -87,8 +87,7 @@ function OpenChoiceCheckboxAnswerValueSetItem(props) {
|
|
|
87
87
|
React.createElement(DisplayInstructions, { displayInstructions: displayInstructions, readOnly: readOnly })));
|
|
88
88
|
}
|
|
89
89
|
return (React.createElement(FullWidthFormComponentBox, { "data-test": "q-item-open-choice-checkbox-answer-value-set-box", "data-linkid": qItem.linkId, onClick: () => onFocusLinkId(qItem.linkId) },
|
|
90
|
-
React.createElement(ItemFieldGrid, { qItem: qItem, readOnly: readOnly },
|
|
91
|
-
React.createElement(OpenChoiceCheckboxAnswerValueSetFields, { qItem: qItem, options: options, answers: answers, openLabelText: openLabelText, openLabelValue: openLabelValue, openLabelChecked: openLabelChecked, readOnly: readOnly, terminologyError: terminologyError, onOptionChange: handleOptionChange, onOpenLabelCheckedChange: handleOpenLabelCheckedChange, onOpenLabelInputChange: handleOpenLabelInputChange }))));
|
|
90
|
+
React.createElement(ItemFieldGrid, { qItem: qItem, readOnly: readOnly, labelChildren: React.createElement(ItemLabelWrapper, { qItem: qItem, readOnly: readOnly }), fieldChildren: React.createElement(OpenChoiceCheckboxAnswerValueSetFields, { qItem: qItem, options: options, answers: answers, openLabelText: openLabelText, openLabelValue: openLabelValue, openLabelChecked: openLabelChecked, readOnly: readOnly, terminologyError: terminologyError, onOptionChange: handleOptionChange, onOpenLabelCheckedChange: handleOpenLabelCheckedChange, onOpenLabelInputChange: handleOpenLabelInputChange }) })));
|
|
92
91
|
}
|
|
93
92
|
export default OpenChoiceCheckboxAnswerValueSetItem;
|
|
94
93
|
//# sourceMappingURL=OpenChoiceCheckboxAnswerValueSetItem.js.map
|
package/lib/components/FormComponents/OpenChoiceItems/OpenChoiceCheckboxAnswerValueSetItem.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"OpenChoiceCheckboxAnswerValueSetItem.js","sourceRoot":"","sources":["../../../../src/components/FormComponents/OpenChoiceItems/OpenChoiceCheckboxAnswerValueSetItem.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAEH,OAAO,KAAK,EAAE,EAAE,WAAW,EAAE,OAAO,EAAE,MAAM,OAAO,CAAC;AAEpD,OAAO,EAAE,iBAAiB,EAAE,MAAM,uBAAuB,CAAC;AAC1D,OAAO,EAAE,gBAAgB,EAAE,MAAM,4BAA4B,CAAC;AAC9D,OAAO,EAAE,qBAAqB,EAAE,MAAM,2BAA2B,CAAC;AAClE,OAAO,EAAE,yBAAyB,EAAE,MAAM,kBAAkB,CAAC;AAC7D,OAAO,QAAQ,MAAM,iBAAiB,CAAC;
|
|
1
|
+
{"version":3,"file":"OpenChoiceCheckboxAnswerValueSetItem.js","sourceRoot":"","sources":["../../../../src/components/FormComponents/OpenChoiceItems/OpenChoiceCheckboxAnswerValueSetItem.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAEH,OAAO,KAAK,EAAE,EAAE,WAAW,EAAE,OAAO,EAAE,MAAM,OAAO,CAAC;AAEpD,OAAO,EAAE,iBAAiB,EAAE,MAAM,uBAAuB,CAAC;AAC1D,OAAO,EAAE,gBAAgB,EAAE,MAAM,4BAA4B,CAA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AAI,EACrE,aAAa,EACX,oBAAC,sCAAsC,IACrC,KAAK,EAAE,KAAK,EACZ,OAAO,EAAE,OAAO,EAChB,OAAO,EAAE,OAAO,EAChB,aAAa,EAAE,aAAa,EAC5B,cAAc,EAAE,cAAc,EAC9B,gBAAgB,EAAE,gBAAgB,EAClC,QAAQ,EAAE,QAAQ,EAClB,gBAAgB,EAAE,gBAAgB,EAClC,cAAc,EAAE,kBAAkB,EAClC,wBAAwB,EAAE,4BAA4B,EACtD,sBAAsB,EAAE,0BAA0B,GAClD,GAEJ,CACwB,CAC7B,CAAC;AACJ,CAAC;AAED,eAAe,oCAAoC,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, PropsWithShowMinimalViewAttribute } from '../../../interfaces/renderProps.interface';
|
|
4
|
-
interface OpenChoiceItemSwitcherProps extends PropsWithQrItemChangeHandler, PropsWithIsRepeatedAttribute, PropsWithIsTabledAttribute, PropsWithShowMinimalViewAttribute, PropsWithParentIsReadOnlyAttribute {
|
|
3
|
+
import type { PropsWithIsRepeatedAttribute, PropsWithIsTabledAttribute, PropsWithParentIsReadOnlyAttribute, PropsWithQrItemChangeHandler, PropsWithRenderingExtensionsAttribute, PropsWithShowMinimalViewAttribute } from '../../../interfaces/renderProps.interface';
|
|
4
|
+
interface OpenChoiceItemSwitcherProps extends PropsWithQrItemChangeHandler, PropsWithIsRepeatedAttribute, PropsWithIsTabledAttribute, PropsWithRenderingExtensionsAttribute, PropsWithShowMinimalViewAttribute, PropsWithParentIsReadOnlyAttribute {
|
|
5
5
|
qItem: QuestionnaireItem;
|
|
6
6
|
qrItem: QuestionnaireResponseItem | null;
|
|
7
7
|
}
|
|
@@ -26,30 +26,30 @@ import OpenChoiceCheckboxAnswerValueSetItem from './OpenChoiceCheckboxAnswerValu
|
|
|
26
26
|
import OpenChoiceRadioAnswerValueSetItem from './OpenChoiceRadioAnswerValueSetItem';
|
|
27
27
|
function OpenChoiceItemSwitcher(props) {
|
|
28
28
|
var _a, _b, _c, _d;
|
|
29
|
-
const { qItem, qrItem, isRepeated, isTabled, showMinimalView, parentIsReadOnly, onQrItemChange } = props;
|
|
29
|
+
const { qItem, qrItem, isRepeated, isTabled, renderingExtensions, showMinimalView, parentIsReadOnly, onQrItemChange } = props;
|
|
30
30
|
switch (getOpenChoiceControlType(qItem)) {
|
|
31
31
|
case OpenChoiceItemControl.Checkbox:
|
|
32
32
|
if (qItem.answerValueSet) {
|
|
33
|
-
return (React.createElement(OpenChoiceCheckboxAnswerValueSetItem, { qItem: qItem, qrItem: qrItem, isRepeated: (_a = qItem['repeats']) !== null && _a !== void 0 ? _a : false, showMinimalView: showMinimalView, parentIsReadOnly: parentIsReadOnly, onQrItemChange: onQrItemChange }));
|
|
33
|
+
return (React.createElement(OpenChoiceCheckboxAnswerValueSetItem, { qItem: qItem, qrItem: qrItem, isRepeated: (_a = qItem['repeats']) !== null && _a !== void 0 ? _a : false, renderingExtensions: renderingExtensions, showMinimalView: showMinimalView, parentIsReadOnly: parentIsReadOnly, onQrItemChange: onQrItemChange }));
|
|
34
34
|
}
|
|
35
35
|
else {
|
|
36
|
-
return (React.createElement(OpenChoiceCheckboxAnswerOptionItem, { qItem: qItem, qrItem: qrItem, isRepeated: (_b = qItem['repeats']) !== null && _b !== void 0 ? _b : false, showMinimalView: showMinimalView, parentIsReadOnly: parentIsReadOnly, onQrItemChange: onQrItemChange }));
|
|
36
|
+
return (React.createElement(OpenChoiceCheckboxAnswerOptionItem, { qItem: qItem, qrItem: qrItem, isRepeated: (_b = qItem['repeats']) !== null && _b !== void 0 ? _b : false, renderingExtensions: renderingExtensions, showMinimalView: showMinimalView, parentIsReadOnly: parentIsReadOnly, onQrItemChange: onQrItemChange }));
|
|
37
37
|
}
|
|
38
38
|
case OpenChoiceItemControl.Radio:
|
|
39
39
|
if (qItem.answerValueSet) {
|
|
40
|
-
return (React.createElement(OpenChoiceRadioAnswerValueSetItem, { qItem: qItem, qrItem: qrItem, isRepeated: (_c = qItem['repeats']) !== null && _c !== void 0 ? _c : false, parentIsReadOnly: parentIsReadOnly, onQrItemChange: onQrItemChange }));
|
|
40
|
+
return (React.createElement(OpenChoiceRadioAnswerValueSetItem, { qItem: qItem, qrItem: qrItem, isRepeated: (_c = qItem['repeats']) !== null && _c !== void 0 ? _c : false, renderingExtensions: renderingExtensions, parentIsReadOnly: parentIsReadOnly, onQrItemChange: onQrItemChange }));
|
|
41
41
|
}
|
|
42
42
|
else {
|
|
43
|
-
return (React.createElement(OpenChoiceRadioAnswerOptionItem, { qItem: qItem, qrItem: qrItem, isRepeated: (_d = qItem['repeats']) !== null && _d !== void 0 ? _d : false, parentIsReadOnly: parentIsReadOnly, onQrItemChange: onQrItemChange }));
|
|
43
|
+
return (React.createElement(OpenChoiceRadioAnswerOptionItem, { qItem: qItem, qrItem: qrItem, isRepeated: (_d = qItem['repeats']) !== null && _d !== void 0 ? _d : false, renderingExtensions: renderingExtensions, parentIsReadOnly: parentIsReadOnly, onQrItemChange: onQrItemChange }));
|
|
44
44
|
}
|
|
45
45
|
case OpenChoiceItemControl.Autocomplete:
|
|
46
|
-
return (React.createElement(OpenChoiceAutocompleteItem, { qItem: qItem, qrItem: qrItem, isRepeated: isRepeated, isTabled: isTabled, parentIsReadOnly: parentIsReadOnly, onQrItemChange: onQrItemChange }));
|
|
46
|
+
return (React.createElement(OpenChoiceAutocompleteItem, { qItem: qItem, qrItem: qrItem, isRepeated: isRepeated, isTabled: isTabled, renderingExtensions: renderingExtensions, parentIsReadOnly: parentIsReadOnly, onQrItemChange: onQrItemChange }));
|
|
47
47
|
case OpenChoiceItemControl.Select:
|
|
48
48
|
if (qItem.answerValueSet) {
|
|
49
|
-
return (React.createElement(OpenChoiceSelectAnswerValueSetItem, { qItem: qItem, qrItem: qrItem, isRepeated: isRepeated, isTabled: isTabled, parentIsReadOnly: parentIsReadOnly, onQrItemChange: onQrItemChange }));
|
|
49
|
+
return (React.createElement(OpenChoiceSelectAnswerValueSetItem, { qItem: qItem, qrItem: qrItem, isRepeated: isRepeated, isTabled: isTabled, renderingExtensions: renderingExtensions, parentIsReadOnly: parentIsReadOnly, onQrItemChange: onQrItemChange }));
|
|
50
50
|
}
|
|
51
51
|
else {
|
|
52
|
-
return (React.createElement(OpenChoiceSelectAnswerOptionItem, { qItem: qItem, qrItem: qrItem, isRepeated: isRepeated, isTabled: isTabled, parentIsReadOnly: parentIsReadOnly, onQrItemChange: onQrItemChange }));
|
|
52
|
+
return (React.createElement(OpenChoiceSelectAnswerOptionItem, { qItem: qItem, qrItem: qrItem, isRepeated: isRepeated, isTabled: isTabled, renderingExtensions: renderingExtensions, parentIsReadOnly: parentIsReadOnly, onQrItemChange: onQrItemChange }));
|
|
53
53
|
}
|
|
54
54
|
default:
|
|
55
55
|
return null;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"OpenChoiceItemSwitcher.js","sourceRoot":"","sources":["../../../../src/components/FormComponents/OpenChoiceItems/OpenChoiceItemSwitcher.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAEH,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,qBAAqB,EAAE,MAAM,iCAAiC,CAAC;AAExE,OAAO,gCAAgC,MAAM,oCAAoC,CAAC;AAClF,OAAO,kCAAkC,MAAM,sCAAsC,CAAC;AACtF,OAAO,0BAA0B,MAAM,8BAA8B,CAAC;AACtE,OAAO,EAAE,wBAAwB,EAAE,MAAM,2BAA2B,CAAC;AACrE,OAAO,kCAAkC,MAAM,sCAAsC,CAAC;AACtF,OAAO,+BAA+B,MAAM,mCAAmC,CAAC;
|
|
1
|
+
{"version":3,"file":"OpenChoiceItemSwitcher.js","sourceRoot":"","sources":["../../../../src/components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B,CACH,CAAC;aACH;iBAAM;gBACL,OAAO,CACL,oBAAC,gCAAgC,IAC/B,KAAK,EAAE,KAAK,EACZ,MAAM,EAAE,MAAM,EACd,UAAU,EAAE,UAAU,EACtB,QAAQ,EAAE,QAAQ,EAClB,mBAAmB,EAAE,mBAAmB,EACxC,gBAAgB,EAAE,gBAAgB,EAClC,cAAc,EAAE,cAAc,GAC9B,CACH,CAAC;aACH;QACH;YACE,OAAO,IAAI,CAAC;KACf;AACH,CAAC;AAED,eAAe,sBAAsB,CAAC"}
|
|
@@ -20,12 +20,14 @@ import { StyledRadioGroup } from '../Item.styles';
|
|
|
20
20
|
import RadioButtonWithOpenLabel from '../ItemParts/RadioButtonWithOpenLabel';
|
|
21
21
|
import RadioOptionList from '../ItemParts/RadioOptionList';
|
|
22
22
|
import { getChoiceOrientation } from '../../../utils/choice';
|
|
23
|
+
import { useRendererStylingStore } from '../../../stores';
|
|
23
24
|
function OpenChoiceRadioAnswerOptionFields(props) {
|
|
24
25
|
var _a;
|
|
25
26
|
const { qItem, options, valueRadio, openLabelText, openLabelValue, openLabelSelected, readOnly, onValueChange } = props;
|
|
27
|
+
const inputsFlexGrow = useRendererStylingStore.use.inputsFlexGrow();
|
|
26
28
|
const orientation = (_a = getChoiceOrientation(qItem)) !== null && _a !== void 0 ? _a : ChoiceItemOrientation.Vertical;
|
|
27
|
-
return (React.createElement(StyledRadioGroup, { id: qItem.linkId, row: orientation === ChoiceItemOrientation.Horizontal, name: qItem.text, onChange: (e) => onValueChange(e.target.value, null), value: valueRadio, "data-test": "q-item-radio-group" },
|
|
28
|
-
React.createElement(RadioOptionList, { options: options, readOnly: readOnly }),
|
|
29
|
+
return (React.createElement(StyledRadioGroup, { id: qItem.linkId, row: orientation === ChoiceItemOrientation.Horizontal, name: qItem.text, sx: inputsFlexGrow ? { width: '100%', flexWrap: 'nowrap' } : {}, onChange: (e) => onValueChange(e.target.value, null), value: valueRadio, "data-test": "q-item-radio-group" },
|
|
30
|
+
React.createElement(RadioOptionList, { options: options, readOnly: readOnly, fullWidth: inputsFlexGrow }),
|
|
29
31
|
openLabelText ? (React.createElement(RadioButtonWithOpenLabel, { value: openLabelValue, label: openLabelText, readOnly: readOnly, isSelected: openLabelSelected, onInputChange: (input) => onValueChange(null, input) })) : null));
|
|
30
32
|
}
|
|
31
33
|
export default OpenChoiceRadioAnswerOptionFields;
|
package/lib/components/FormComponents/OpenChoiceItems/OpenChoiceRadioAnswerOptionFields.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"OpenChoiceRadioAnswerOptionFields.js","sourceRoot":"","sources":["../../../../src/components/FormComponents/OpenChoiceItems/OpenChoiceRadioAnswerOptionFields.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAGH,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,qBAAqB,EAAE,MAAM,iCAAiC,CAAC;AAExE,OAAO,EAAE,gBAAgB,EAAE,MAAM,gBAAgB,CAAC;AAClD,OAAO,wBAAwB,MAAM,uCAAuC,CAAC;AAC7E,OAAO,eAAe,MAAM,8BAA8B,CAAC;AAC3D,OAAO,EAAE,oBAAoB,EAAE,MAAM,uBAAuB,CAAC;
|
|
1
|
+
{"version":3,"file":"OpenChoiceRadioAnswerOptionFields.js","sourceRoot":"","sources":["../../../../src/components/FormComponents/OpenChoiceItems/OpenChoiceRadioAnswerOptionFields.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAGH,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,qBAAqB,EAAE,MAAM,iCAAiC,CAAC;AAExE,OAAO,EAAE,gBAAgB,EAAE,MAAM,gBAAgB,CAAC;AAClD,OAAO,wBAAwB,MAAM,uCAAuC,CAAC;AAC7E,OAAO,eAAe,MAAM,8BAA8B,CAAC;AAC3D,OAAO,EAAE,oBAAoB,EAAE,MAAM,uBAAuB,CAAC;AAC7D,OAAO,EAAE,uB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7 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import type { QuestionnaireItem, QuestionnaireResponseItem } from 'fhir/r4';
|
|
3
|
-
import type { PropsWithIsRepeatedAttribute, PropsWithParentIsReadOnlyAttribute, PropsWithQrItemChangeHandler } from '../../../interfaces/renderProps.interface';
|
|
4
|
-
interface OpenChoiceRadioAnswerOptionItemProps extends PropsWithQrItemChangeHandler, PropsWithIsRepeatedAttribute, PropsWithParentIsReadOnlyAttribute {
|
|
3
|
+
import type { PropsWithIsRepeatedAttribute, PropsWithParentIsReadOnlyAttribute, PropsWithQrItemChangeHandler, PropsWithRenderingExtensionsAttribute } from '../../../interfaces/renderProps.interface';
|
|
4
|
+
interface OpenChoiceRadioAnswerOptionItemProps extends PropsWithQrItemChangeHandler, PropsWithIsRepeatedAttribute, PropsWithParentIsReadOnlyAttribute, PropsWithRenderingExtensionsAttribute {
|
|
5
5
|
qItem: QuestionnaireItem;
|
|
6
6
|
qrItem: QuestionnaireResponseItem | null;
|
|
7
7
|
}
|