@aehrc/smart-forms-renderer 0.8.1 → 0.9.0
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/lib/components/FormComponents/BooleanItem/BooleanItem.d.ts +2 -2
- package/lib/components/FormComponents/ChoiceItems/ChoiceAutocompleteItem.d.ts +2 -2
- package/lib/components/FormComponents/ChoiceItems/ChoiceCheckboxAnswerOptionItem.d.ts +3 -3
- package/lib/components/FormComponents/ChoiceItems/ChoiceCheckboxAnswerOptionItem.js +12 -12
- package/lib/components/FormComponents/ChoiceItems/ChoiceCheckboxAnswerOptionItem.js.map +1 -1
- package/lib/components/FormComponents/ChoiceItems/ChoiceCheckboxAnswerValueSetItem.d.ts +3 -3
- package/lib/components/FormComponents/ChoiceItems/ChoiceCheckboxAnswerValueSetItem.js +12 -12
- package/lib/components/FormComponents/ChoiceItems/ChoiceCheckboxAnswerValueSetItem.js.map +1 -1
- package/lib/components/FormComponents/ChoiceItems/ChoiceItemSwitcher.d.ts +3 -4
- package/lib/components/FormComponents/ChoiceItems/ChoiceItemSwitcher.js +3 -3
- package/lib/components/FormComponents/ChoiceItems/ChoiceItemSwitcher.js.map +1 -1
- package/lib/components/FormComponents/ChoiceItems/ChoiceRadioAnswerOptionItem.d.ts +2 -2
- package/lib/components/FormComponents/ChoiceItems/ChoiceRadioAnswerValueSetItem.d.ts +2 -2
- package/lib/components/FormComponents/ChoiceItems/ChoiceSelectAnswerOptionItem.d.ts +2 -2
- package/lib/components/FormComponents/ChoiceItems/ChoiceSelectAnswerValueSetItem.d.ts +2 -2
- package/lib/components/FormComponents/CustomDateItem/CustomDateField2.d.ts +18 -0
- package/lib/components/FormComponents/CustomDateItem/CustomDateField2.js +31 -0
- package/lib/components/FormComponents/CustomDateItem/CustomDateField2.js.map +1 -0
- package/lib/components/FormComponents/CustomDateItem/CustomDateItem.d.ts +9 -0
- package/lib/components/FormComponents/CustomDateItem/CustomDateItem.js +68 -0
- package/lib/components/FormComponents/CustomDateItem/CustomDateItem.js.map +1 -0
- package/lib/components/FormComponents/CustomDateItem/CustomDateTimeField.d.ts +9 -0
- package/lib/components/FormComponents/CustomDateItem/CustomDateTimeField.js +75 -0
- package/lib/components/FormComponents/CustomDateItem/CustomDateTimeField.js.map +1 -0
- package/lib/components/FormComponents/CustomDateItem/CustomDateTimePickerText2.d.ts +9 -0
- package/lib/components/FormComponents/CustomDateItem/CustomDateTimePickerText2.js +75 -0
- package/lib/components/FormComponents/CustomDateItem/CustomDateTimePickerText2.js.map +1 -0
- package/lib/components/FormComponents/CustomDateItem/customDateTimePicker/CustomDateField.d.ts +18 -0
- package/lib/components/FormComponents/CustomDateItem/customDateTimePicker/CustomDateField.js +33 -0
- package/lib/components/FormComponents/CustomDateItem/customDateTimePicker/CustomDateField.js.map +1 -0
- package/lib/components/FormComponents/CustomDateItem/customDateTimePicker/DatePicker.d.ts +11 -0
- package/lib/components/FormComponents/CustomDateItem/customDateTimePicker/DatePicker.js +55 -0
- package/lib/components/FormComponents/CustomDateItem/customDateTimePicker/DatePicker.js.map +1 -0
- package/lib/components/FormComponents/CustomDateItem/customDateTimePicker/DatePickerButton.d.ts +9 -0
- package/lib/components/FormComponents/CustomDateItem/customDateTimePicker/DatePickerButton.js +13 -0
- package/lib/components/FormComponents/CustomDateItem/customDateTimePicker/DatePickerButton.js.map +1 -0
- package/lib/components/FormComponents/CustomDateItem/customDateTimePicker/MuiDatePicker.d.ts +5 -0
- package/lib/components/FormComponents/CustomDateItem/customDateTimePicker/MuiDatePicker.js +20 -0
- package/lib/components/FormComponents/CustomDateItem/customDateTimePicker/MuiDatePicker.js.map +1 -0
- package/lib/components/FormComponents/CustomDateItem/customDateTimePicker/hooks/useParseDates.d.ts +5 -0
- package/lib/components/FormComponents/CustomDateItem/customDateTimePicker/hooks/useParseDates.js +27 -0
- package/lib/components/FormComponents/CustomDateItem/customDateTimePicker/hooks/useParseDates.js.map +1 -0
- package/lib/components/FormComponents/CustomDateItem/customDateTimePicker/index.d.ts +1 -0
- package/lib/components/FormComponents/CustomDateItem/customDateTimePicker/index.js +18 -0
- package/lib/components/FormComponents/CustomDateItem/customDateTimePicker/index.js.map +1 -0
- package/lib/components/FormComponents/CustomDateItem/customDateTimePicker/utils/index.d.ts +1 -0
- package/lib/components/FormComponents/CustomDateItem/customDateTimePicker/utils/index.js +18 -0
- package/lib/components/FormComponents/CustomDateItem/customDateTimePicker/utils/index.js.map +1 -0
- package/lib/components/FormComponents/CustomDateItem/customDateTimePicker/utils/parseDates.d.ts +9 -0
- package/lib/components/FormComponents/CustomDateItem/customDateTimePicker/utils/parseDates.js +121 -0
- package/lib/components/FormComponents/CustomDateItem/customDateTimePicker/utils/parseDates.js.map +1 -0
- package/lib/components/FormComponents/CustomDateItem/customDateTimePickerText.d.ts +9 -0
- package/lib/components/FormComponents/CustomDateItem/customDateTimePickerText.js +71 -0
- package/lib/components/FormComponents/CustomDateItem/customDateTimePickerText.js.map +1 -0
- package/lib/components/FormComponents/CustomDateItem/index.d.ts +1 -0
- package/lib/components/FormComponents/CustomDateItem/index.js +18 -0
- package/lib/components/FormComponents/CustomDateItem/index.js.map +1 -0
- package/lib/components/FormComponents/DateItem/DateItem.d.ts +3 -4
- package/lib/components/FormComponents/DateTimeItem/DateTimeItem.d.ts +2 -2
- package/lib/components/FormComponents/DecimalItem/DecimalItem.d.ts +2 -2
- package/lib/components/FormComponents/DecimalItem/DecimalItem.js +2 -3
- package/lib/components/FormComponents/DecimalItem/DecimalItem.js.map +1 -1
- package/lib/components/FormComponents/DisplayItem/DisplayBox.d.ts +0 -0
- package/lib/components/FormComponents/DisplayItem/DisplayBox.js +2 -0
- package/lib/components/FormComponents/DisplayItem/DisplayBox.js.map +1 -0
- package/lib/components/FormComponents/DisplayItem/DisplayBox.styles.d.ts +4 -0
- package/lib/components/FormComponents/DisplayItem/DisplayBox.styles.js +35 -0
- package/lib/components/FormComponents/DisplayItem/DisplayBox.styles.js.map +1 -0
- package/lib/components/FormComponents/DisplayItem/DisplayInstructions.d.ts +2 -1
- package/lib/components/FormComponents/DisplayItem/DisplayInstructions.js.map +1 -1
- package/lib/components/FormComponents/DisplayItem/DisplayInstructions.styles.js +0 -1
- package/lib/components/FormComponents/DisplayItem/DisplayInstructions.styles.js.map +1 -1
- package/lib/components/FormComponents/GridGroup/GridGroup.d.ts +3 -3
- package/lib/components/FormComponents/GridGroup/GridGroup.js +13 -8
- package/lib/components/FormComponents/GridGroup/GridGroup.js.map +1 -1
- package/lib/components/FormComponents/GridGroup/GridRow.d.ts +3 -4
- package/lib/components/FormComponents/GridGroup/GridRow.js +3 -3
- package/lib/components/FormComponents/GridGroup/GridRow.js.map +1 -1
- package/lib/components/FormComponents/GridGroup/GridTable.d.ts +3 -3
- package/lib/components/FormComponents/GridGroup/GridTable.js +9 -4
- package/lib/components/FormComponents/GridGroup/GridTable.js.map +1 -1
- package/lib/components/FormComponents/GridGroup/index.d.ts +1 -0
- package/lib/components/FormComponents/GridGroup/index.js +18 -0
- package/lib/components/FormComponents/GridGroup/index.js.map +1 -0
- package/lib/components/FormComponents/GroupItem/GroupItem.d.ts +2 -2
- 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.d.ts +2 -2
- package/lib/components/FormComponents/GroupItem/GroupItemSwitcher.js +5 -6
- package/lib/components/FormComponents/GroupItem/GroupItemSwitcher.js.map +1 -1
- package/lib/components/FormComponents/IntegerItem/IntegerItem.d.ts +2 -2
- package/lib/components/FormComponents/IntegerItem/IntegerItem.js +2 -3
- package/lib/components/FormComponents/IntegerItem/IntegerItem.js.map +1 -1
- package/lib/components/FormComponents/IntegerItem/SliderItem.d.ts +9 -0
- package/lib/components/FormComponents/IntegerItem/SliderItem.js +75 -0
- package/lib/components/FormComponents/IntegerItem/SliderItem.js.map +1 -0
- package/lib/components/FormComponents/ItemParts/FadingCheckIcon.js +2 -2
- package/lib/components/FormComponents/ItemParts/FadingCheckIcon.js.map +1 -1
- package/lib/components/FormComponents/ItemParts/ItemFieldGrid.d.ts +2 -2
- package/lib/components/FormComponents/OpenChoiceItems/OpenChoiceAutocompleteItem.d.ts +2 -2
- package/lib/components/FormComponents/OpenChoiceItems/OpenChoiceCheckboxAnswerOptionItem.d.ts +3 -3
- package/lib/components/FormComponents/OpenChoiceItems/OpenChoiceCheckboxAnswerOptionItem.js +12 -12
- package/lib/components/FormComponents/OpenChoiceItems/OpenChoiceCheckboxAnswerOptionItem.js.map +1 -1
- package/lib/components/FormComponents/OpenChoiceItems/OpenChoiceItemSwitcher.d.ts +3 -3
- package/lib/components/FormComponents/OpenChoiceItems/OpenChoiceItemSwitcher.js +2 -2
- package/lib/components/FormComponents/OpenChoiceItems/OpenChoiceItemSwitcher.js.map +1 -1
- package/lib/components/FormComponents/OpenChoiceItems/OpenChoiceRadioAnswerOptionItem.d.ts +2 -2
- package/lib/components/FormComponents/OpenChoiceItems/OpenChoiceSelectAnswerOptionItem.d.ts +2 -2
- package/lib/components/FormComponents/OpenChoiceItems/OpenChoiceSelectAnswerValueSetItem.d.ts +2 -2
- package/lib/components/FormComponents/RepeatGroup/RepeatGroup.d.ts +2 -2
- package/lib/components/FormComponents/RepeatGroup/RepeatGroup.js +15 -4
- package/lib/components/FormComponents/RepeatGroup/RepeatGroup.js.map +1 -1
- package/lib/components/FormComponents/RepeatGroup/RepeatGroupItem.d.ts +2 -2
- package/lib/components/FormComponents/RepeatGroup/RepeatGroupItem.js +2 -2
- package/lib/components/FormComponents/RepeatGroup/RepeatGroupItem.js.map +1 -1
- package/lib/components/FormComponents/RepeatItem/RepeatField.d.ts +3 -3
- package/lib/components/FormComponents/RepeatItem/RepeatField.js +3 -3
- package/lib/components/FormComponents/RepeatItem/RepeatField.js.map +1 -1
- package/lib/components/FormComponents/RepeatItem/RepeatItem.d.ts +3 -2
- package/lib/components/FormComponents/RepeatItem/RepeatItem.js +11 -2
- package/lib/components/FormComponents/RepeatItem/RepeatItem.js.map +1 -1
- package/lib/components/FormComponents/RepeatItem/index.d.ts +1 -0
- package/lib/components/FormComponents/RepeatItem/index.js +18 -0
- package/lib/components/FormComponents/RepeatItem/index.js.map +1 -0
- package/lib/components/FormComponents/SingleItem/SingleItem.d.ts +3 -3
- package/lib/components/FormComponents/SingleItem/SingleItem.js +2 -2
- package/lib/components/FormComponents/SingleItem/SingleItem.js.map +1 -1
- package/lib/components/FormComponents/SingleItem/SingleItemSwitcher.d.ts +3 -3
- package/lib/components/FormComponents/SingleItem/SingleItemSwitcher.js +12 -7
- package/lib/components/FormComponents/SingleItem/SingleItemSwitcher.js.map +1 -1
- package/lib/components/FormComponents/SliderItem/DisplayBox.styles.d.ts +4 -0
- package/lib/components/FormComponents/SliderItem/DisplayBox.styles.js +35 -0
- package/lib/components/FormComponents/SliderItem/DisplayBox.styles.js.map +1 -0
- package/lib/components/FormComponents/SliderItem/Slider.styles.d.ts +6 -0
- package/lib/components/FormComponents/SliderItem/Slider.styles.js +33 -0
- package/lib/components/FormComponents/SliderItem/Slider.styles.js.map +1 -0
- package/lib/components/FormComponents/SliderItem/SliderDisplayValue.d.ts +8 -0
- package/lib/components/FormComponents/SliderItem/SliderDisplayValue.js +28 -0
- package/lib/components/FormComponents/SliderItem/SliderDisplayValue.js.map +1 -0
- package/lib/components/FormComponents/SliderItem/SliderField.d.ts +16 -0
- package/lib/components/FormComponents/SliderItem/SliderField.js +41 -0
- package/lib/components/FormComponents/SliderItem/SliderField.js.map +1 -0
- package/lib/components/FormComponents/SliderItem/SliderItem.d.ts +9 -0
- package/lib/components/FormComponents/SliderItem/SliderItem.js +56 -0
- package/lib/components/FormComponents/SliderItem/SliderItem.js.map +1 -0
- package/lib/components/FormComponents/SliderItem/SliderLabels.d.ts +7 -0
- package/lib/components/FormComponents/SliderItem/SliderLabels.js +32 -0
- package/lib/components/FormComponents/SliderItem/SliderLabels.js.map +1 -0
- package/lib/components/FormComponents/StringItem/StringItem.d.ts +2 -2
- package/lib/components/FormComponents/Tables/GroupTable.d.ts +3 -2
- package/lib/components/FormComponents/Tables/GroupTable.js +18 -1
- package/lib/components/FormComponents/Tables/GroupTable.js.map +1 -1
- package/lib/components/FormComponents/Tables/GroupTableRow.d.ts +3 -4
- package/lib/components/FormComponents/Tables/GroupTableRow.js +3 -3
- package/lib/components/FormComponents/Tables/GroupTableRow.js.map +1 -1
- package/lib/components/FormComponents/TextItem/TextItem.d.ts +2 -2
- package/lib/components/FormComponents/TimeItem/TimeItem.d.ts +2 -2
- package/lib/components/FormComponents/UrlItem/UrlItem.d.ts +2 -2
- package/lib/components/FormComponents/index.d.ts +3 -0
- package/lib/components/FormComponents/index.js +3 -0
- package/lib/components/FormComponents/index.js.map +1 -1
- package/lib/components/Renderer/BaseRenderer.js +3 -5
- package/lib/components/Renderer/BaseRenderer.js.map +1 -1
- package/lib/components/Renderer/FormBodyCollapsible.d.ts +2 -2
- package/lib/components/Renderer/FormBodyCollapsible.js +6 -5
- package/lib/components/Renderer/FormBodyCollapsible.js.map +1 -1
- package/lib/components/Renderer/FormBodySingleCollapsibleWrapper.d.ts +2 -2
- package/lib/components/Renderer/FormBodySingleCollapsibleWrapper.js.map +1 -1
- package/lib/components/Renderer/FormBodyTabbed.d.ts +2 -2
- package/lib/components/Renderer/FormBodyTabbed.js +6 -5
- package/lib/components/Renderer/FormBodyTabbed.js.map +1 -1
- package/lib/components/Renderer/FormTopLevelItem.d.ts +2 -2
- package/lib/components/Renderer/FormTopLevelItem.js +3 -1
- package/lib/components/Renderer/FormTopLevelItem.js.map +1 -1
- package/lib/hooks/useDateSeparatorValidation.d.ts +2 -0
- package/lib/hooks/useDateSeparatorValidation.js +25 -0
- package/lib/hooks/useDateSeparatorValidation.js.map +1 -0
- package/lib/hooks/useDateValidation.d.ts +2 -0
- package/lib/hooks/useDateValidation.js +61 -0
- package/lib/hooks/useDateValidation.js.map +1 -0
- package/lib/hooks/useDecimalCalculatedExpression.d.ts +0 -1
- package/lib/hooks/useDecimalCalculatedExpression.js +3 -3
- package/lib/hooks/useDecimalCalculatedExpression.js.map +1 -1
- package/lib/hooks/useInitialiseRepeatAnswers.d.ts +1 -1
- package/lib/hooks/useInitialiseRepeatAnswers.js.map +1 -1
- package/lib/hooks/useIntegerCalculatedExpression.d.ts +0 -1
- package/lib/hooks/useIntegerCalculatedExpression.js +3 -3
- package/lib/hooks/useIntegerCalculatedExpression.js.map +1 -1
- package/lib/hooks/useSliderExtensions.d.ts +10 -0
- package/lib/hooks/useSliderExtensions.js +37 -0
- package/lib/hooks/useSliderExtensions.js.map +1 -0
- package/lib/hooks/useTerminologyServerQuery.js +0 -1
- package/lib/hooks/useTerminologyServerQuery.js.map +1 -1
- package/lib/index.d.ts +3 -3
- package/lib/index.js +15 -6
- package/lib/index.js.map +1 -1
- package/lib/interfaces/index.d.ts +2 -0
- package/lib/interfaces/index.js +18 -0
- package/lib/interfaces/index.js.map +1 -0
- package/lib/interfaces/questionnaireStore.interface.d.ts +1 -0
- package/lib/interfaces/renderProps.interface.d.ts +4 -3
- package/lib/stores/useQuestionnaireStore.d.ts +1 -0
- package/lib/stores/useQuestionnaireStore.js +28 -12
- package/lib/stores/useQuestionnaireStore.js.map +1 -1
- package/lib/test.d.ts +4 -0
- package/lib/test.js +18 -0
- package/lib/test.js.map +1 -0
- package/lib/theme/customGlobalStyles.js +0 -4
- package/lib/theme/customGlobalStyles.js.map +1 -1
- package/lib/utils/calculatedExpression.d.ts +5 -1
- package/lib/utils/calculatedExpression.js +21 -16
- package/lib/utils/calculatedExpression.js.map +1 -1
- package/lib/utils/dayjsExtend.d.ts +1 -0
- package/lib/utils/dayjsExtend.js +22 -0
- package/lib/utils/dayjsExtend.js.map +1 -0
- package/lib/utils/enableWhenExpression.d.ts +5 -1
- package/lib/utils/enableWhenExpression.js +26 -21
- package/lib/utils/enableWhenExpression.js.map +1 -1
- package/lib/utils/fhirpath.d.ts +3 -1
- package/lib/utils/fhirpath.js +25 -15
- package/lib/utils/fhirpath.js.map +1 -1
- package/lib/utils/index.d.ts +1 -0
- package/lib/utils/index.js +1 -0
- package/lib/utils/index.js.map +1 -1
- package/lib/utils/initialiseForm.d.ts +2 -0
- package/lib/utils/initialiseForm.js +13 -5
- package/lib/utils/initialiseForm.js.map +1 -1
- package/lib/utils/itemControl.d.ts +12 -0
- package/lib/utils/itemControl.js +30 -0
- package/lib/utils/itemControl.js.map +1 -1
- package/lib/utils/launchContext.d.ts +0 -0
- package/lib/utils/launchContext.js +2 -0
- package/lib/utils/launchContext.js.map +1 -0
- package/lib/utils/mapItem.d.ts +1 -1
- package/lib/utils/qrItem.d.ts +1 -7
- package/lib/utils/qrItem.js +1 -12
- package/lib/utils/qrItem.js.map +1 -1
- package/lib/utils/questionnaireStoreUtils/createQuestionaireModel.js +4 -2
- package/lib/utils/questionnaireStoreUtils/createQuestionaireModel.js.map +1 -1
- package/lib/utils/removeHidden.js +2 -1
- package/lib/utils/removeHidden.js.map +1 -1
- package/lib/utils/repopulateIntoResponse.js +90 -29
- package/lib/utils/repopulateIntoResponse.js.map +1 -1
- package/lib/utils/repopulateItems.d.ts +14 -1
- package/lib/utils/repopulateItems.js +251 -70
- package/lib/utils/repopulateItems.js.map +1 -1
- package/lib/utils/repopulateRepeatGroup.js +9 -1
- package/lib/utils/repopulateRepeatGroup.js.map +1 -1
- package/lib/utils/slider.d.ts +28 -0
- package/lib/utils/slider.js +89 -0
- package/lib/utils/slider.js.map +1 -0
- package/package.json +11 -9
- package/src/components/FormComponents/BooleanItem/BooleanItem.tsx +2 -2
- package/src/components/FormComponents/ChoiceItems/ChoiceAutocompleteItem.tsx +2 -2
- package/src/components/FormComponents/ChoiceItems/ChoiceCheckboxAnswerOptionItem.tsx +33 -33
- package/src/components/FormComponents/ChoiceItems/ChoiceCheckboxAnswerValueSetItem.tsx +35 -35
- package/src/components/FormComponents/ChoiceItems/ChoiceItemSwitcher.tsx +8 -8
- package/src/components/FormComponents/ChoiceItems/ChoiceRadioAnswerOptionItem.tsx +2 -2
- package/src/components/FormComponents/ChoiceItems/ChoiceRadioAnswerValueSetItem.tsx +2 -2
- package/src/components/FormComponents/ChoiceItems/ChoiceSelectAnswerOptionItem.tsx +2 -2
- package/src/components/FormComponents/ChoiceItems/ChoiceSelectAnswerValueSetItem.tsx +2 -2
- package/src/components/FormComponents/CustomDateItem/CustomDateItem.tsx +140 -0
- package/src/components/FormComponents/CustomDateItem/customDateTimePicker/CustomDateField.tsx +96 -0
- package/src/components/FormComponents/CustomDateItem/customDateTimePicker/DatePicker.tsx +81 -0
- package/src/components/FormComponents/CustomDateItem/customDateTimePicker/DatePickerButton.tsx +33 -0
- package/src/components/FormComponents/CustomDateItem/customDateTimePicker/MuiDatePicker.ts +22 -0
- package/src/components/FormComponents/CustomDateItem/customDateTimePicker/index.ts +18 -0
- package/src/components/FormComponents/CustomDateItem/customDateTimePicker/utils/index.ts +18 -0
- package/src/components/FormComponents/CustomDateItem/customDateTimePicker/utils/parseDates.ts +154 -0
- package/src/components/FormComponents/CustomDateItem/index.ts +18 -0
- package/src/components/FormComponents/DateItem/DateItem.tsx +3 -3
- package/src/components/FormComponents/DateTimeItem/DateTimeItem.tsx +2 -2
- package/src/components/FormComponents/DecimalItem/DecimalItem.tsx +4 -5
- package/src/components/FormComponents/DisplayItem/DisplayInstructions.styles.ts +0 -1
- package/src/components/FormComponents/DisplayItem/DisplayInstructions.tsx +2 -1
- package/src/components/FormComponents/GridGroup/GridGroup.tsx +41 -15
- package/src/components/FormComponents/GridGroup/GridRow.tsx +10 -9
- package/src/components/FormComponents/GridGroup/GridTable.tsx +29 -9
- package/src/components/FormComponents/GridGroup/index.ts +18 -0
- package/src/components/FormComponents/GroupItem/GroupItem.tsx +5 -6
- package/src/components/FormComponents/GroupItem/GroupItemSwitcher.tsx +7 -8
- package/src/components/FormComponents/IntegerItem/IntegerItem.tsx +4 -5
- package/src/components/FormComponents/ItemParts/FadingCheckIcon.tsx +2 -2
- package/src/components/FormComponents/ItemParts/ItemFieldGrid.tsx +2 -2
- package/src/components/FormComponents/OpenChoiceItems/OpenChoiceAutocompleteItem.tsx +2 -2
- package/src/components/FormComponents/OpenChoiceItems/OpenChoiceCheckboxAnswerOptionItem.tsx +43 -43
- package/src/components/FormComponents/OpenChoiceItems/OpenChoiceItemSwitcher.tsx +6 -6
- package/src/components/FormComponents/OpenChoiceItems/OpenChoiceRadioAnswerOptionItem.tsx +2 -2
- package/src/components/FormComponents/OpenChoiceItems/OpenChoiceSelectAnswerOptionItem.tsx +2 -2
- package/src/components/FormComponents/OpenChoiceItems/OpenChoiceSelectAnswerValueSetItem.tsx +2 -2
- package/src/components/FormComponents/RepeatGroup/RepeatGroup.tsx +49 -6
- package/src/components/FormComponents/RepeatGroup/RepeatGroupItem.tsx +13 -8
- package/src/components/FormComponents/RepeatItem/RepeatField.tsx +15 -9
- package/src/components/FormComponents/RepeatItem/RepeatItem.tsx +33 -3
- package/src/components/FormComponents/RepeatItem/index.ts +18 -0
- package/src/components/FormComponents/SingleItem/SingleItem.tsx +6 -6
- package/src/components/FormComponents/SingleItem/SingleItemSwitcher.tsx +27 -11
- package/src/components/FormComponents/SliderItem/Slider.styles.ts +34 -0
- package/src/components/FormComponents/SliderItem/SliderDisplayValue.tsx +43 -0
- package/src/components/FormComponents/SliderItem/SliderField.tsx +88 -0
- package/src/components/FormComponents/SliderItem/SliderItem.tsx +115 -0
- package/src/components/FormComponents/SliderItem/SliderLabels.tsx +53 -0
- package/src/components/FormComponents/StringItem/StringItem.tsx +2 -2
- package/src/components/FormComponents/Tables/GroupTable.tsx +55 -3
- package/src/components/FormComponents/Tables/GroupTableRow.tsx +10 -9
- package/src/components/FormComponents/TextItem/TextItem.tsx +2 -2
- package/src/components/FormComponents/TimeItem/TimeItem.tsx +2 -2
- package/src/components/FormComponents/UrlItem/UrlItem.tsx +2 -2
- package/src/components/FormComponents/index.ts +3 -0
- package/src/components/Renderer/BaseRenderer.tsx +5 -12
- package/src/components/Renderer/FormBodyCollapsible.tsx +9 -7
- package/src/components/Renderer/FormBodySingleCollapsibleWrapper.tsx +2 -3
- package/src/components/Renderer/FormBodyTabbed.tsx +9 -7
- package/src/components/Renderer/FormTopLevelItem.tsx +14 -11
- package/src/hooks/useDateValidation.tsx +79 -0
- package/src/hooks/useDecimalCalculatedExpression.ts +3 -4
- package/src/hooks/useInitialiseRepeatAnswers.ts +1 -1
- package/src/hooks/useIntegerCalculatedExpression.ts +3 -4
- package/src/hooks/useSliderExtensions.ts +50 -0
- package/src/hooks/useTerminologyServerQuery.ts +0 -2
- package/src/index.ts +12 -9
- package/src/interfaces/questionnaireStore.interface.ts +1 -0
- package/src/interfaces/renderProps.interface.ts +4 -3
- package/src/stores/useQuestionnaireStore.ts +39 -16
- package/src/theme/customGlobalStyles.tsx +0 -4
- package/src/utils/calculatedExpression.ts +41 -28
- package/src/utils/dayjsExtend.ts +23 -0
- package/src/utils/enableWhenExpression.ts +49 -34
- package/src/utils/fhirpath.ts +50 -31
- package/src/utils/index.ts +1 -0
- package/src/utils/initialiseForm.ts +15 -5
- package/src/utils/itemControl.ts +32 -0
- package/src/utils/mapItem.ts +1 -1
- package/src/utils/qrItem.ts +1 -16
- package/src/utils/questionnaireStoreUtils/createQuestionaireModel.ts +4 -2
- package/src/utils/removeHidden.ts +2 -1
- package/src/utils/repopulateIntoResponse.ts +134 -43
- package/src/utils/repopulateItems.ts +379 -101
- package/src/utils/slider.ts +112 -0
- package/src/utils/repopulateRepeatGroup.ts +0 -68
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import type { PropsWithIsRepeatedAttribute, PropsWithIsTabledAttribute, PropsWithParentIsReadOnlyAttribute, PropsWithQrItemChangeHandler } from '../../../interfaces/renderProps.interface';
|
|
3
3
|
import type { QuestionnaireItem, QuestionnaireResponseItem } from 'fhir/r4';
|
|
4
|
-
interface BooleanItemProps extends PropsWithQrItemChangeHandler
|
|
4
|
+
interface BooleanItemProps extends PropsWithQrItemChangeHandler, PropsWithIsRepeatedAttribute, PropsWithIsTabledAttribute, PropsWithParentIsReadOnlyAttribute {
|
|
5
5
|
qItem: QuestionnaireItem;
|
|
6
|
-
qrItem: QuestionnaireResponseItem;
|
|
6
|
+
qrItem: QuestionnaireResponseItem | null;
|
|
7
7
|
}
|
|
8
8
|
declare function BooleanItem(props: BooleanItemProps): React.JSX.Element;
|
|
9
9
|
export default BooleanItem;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import type { QuestionnaireItem, QuestionnaireResponseItem } from 'fhir/r4';
|
|
3
3
|
import type { PropsWithIsRepeatedAttribute, PropsWithIsTabledAttribute, PropsWithParentIsReadOnlyAttribute, PropsWithQrItemChangeHandler } from '../../../interfaces/renderProps.interface';
|
|
4
|
-
interface ChoiceAutocompleteItemProps extends PropsWithQrItemChangeHandler
|
|
4
|
+
interface ChoiceAutocompleteItemProps extends PropsWithQrItemChangeHandler, PropsWithIsRepeatedAttribute, PropsWithIsTabledAttribute, PropsWithParentIsReadOnlyAttribute {
|
|
5
5
|
qItem: QuestionnaireItem;
|
|
6
|
-
qrItem: QuestionnaireResponseItem;
|
|
6
|
+
qrItem: QuestionnaireResponseItem | null;
|
|
7
7
|
}
|
|
8
8
|
declare function ChoiceAutocompleteItem(props: ChoiceAutocompleteItemProps): React.JSX.Element | null;
|
|
9
9
|
export default ChoiceAutocompleteItem;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import type { ChoiceItemOrientation } from '../../../interfaces/choice.enum';
|
|
3
3
|
import type { QuestionnaireItem, QuestionnaireResponseItem } from 'fhir/r4';
|
|
4
|
-
import type { PropsWithIsRepeatedAttribute, PropsWithParentIsReadOnlyAttribute, PropsWithQrItemChangeHandler,
|
|
5
|
-
interface ChoiceCheckboxAnswerOptionItemProps extends PropsWithQrItemChangeHandler
|
|
4
|
+
import type { PropsWithIsRepeatedAttribute, PropsWithParentIsReadOnlyAttribute, PropsWithQrItemChangeHandler, PropsWithShowMinimalViewAttribute } from '../../../interfaces/renderProps.interface';
|
|
5
|
+
interface ChoiceCheckboxAnswerOptionItemProps extends PropsWithQrItemChangeHandler, PropsWithIsRepeatedAttribute, PropsWithShowMinimalViewAttribute, PropsWithParentIsReadOnlyAttribute {
|
|
6
6
|
qItem: QuestionnaireItem;
|
|
7
|
-
qrItem: QuestionnaireResponseItem;
|
|
7
|
+
qrItem: QuestionnaireResponseItem | null;
|
|
8
8
|
orientation: ChoiceItemOrientation;
|
|
9
9
|
}
|
|
10
10
|
declare function ChoiceCheckboxAnswerOptionItem(props: ChoiceCheckboxAnswerOptionItemProps): React.JSX.Element;
|
|
@@ -25,7 +25,7 @@ import LabelWrapper from '../ItemParts/ItemLabelWrapper';
|
|
|
25
25
|
import ChoiceCheckboxAnswerValueSetFields from './ChoiceCheckboxAnswerOptionFields';
|
|
26
26
|
import useReadOnly from '../../../hooks/useReadOnly';
|
|
27
27
|
function ChoiceCheckboxAnswerOptionItem(props) {
|
|
28
|
-
const { qItem, qrItem, orientation, isRepeated,
|
|
28
|
+
const { qItem, qrItem, orientation, isRepeated, showMinimalView = false, parentIsReadOnly, onQrItemChange } = props;
|
|
29
29
|
// Init input value
|
|
30
30
|
const qrChoiceCheckbox = qrItem !== null && qrItem !== void 0 ? qrItem : createEmptyQrItem(qItem);
|
|
31
31
|
const answers = qrChoiceCheckbox.answer ? qrChoiceCheckbox.answer : [];
|
|
@@ -41,18 +41,18 @@ function ChoiceCheckboxAnswerOptionItem(props) {
|
|
|
41
41
|
onQrItemChange(updatedQrChoiceCheckbox);
|
|
42
42
|
}
|
|
43
43
|
}
|
|
44
|
-
if (
|
|
45
|
-
return (React.createElement(
|
|
46
|
-
React.createElement(
|
|
47
|
-
|
|
48
|
-
React.createElement(LabelWrapper, { qItem: qItem, readOnly: readOnly })),
|
|
49
|
-
React.createElement(Grid, { item: true, xs: 7 },
|
|
50
|
-
React.createElement(ChoiceCheckboxAnswerValueSetFields, { qItem: qItem, answers: answers, orientation: orientation, readOnly: readOnly, onCheckedChange: handleCheckedChange }),
|
|
51
|
-
React.createElement(DisplayInstructions, { displayInstructions: displayInstructions, readOnly: readOnly })))));
|
|
44
|
+
if (showMinimalView) {
|
|
45
|
+
return (React.createElement(React.Fragment, null,
|
|
46
|
+
React.createElement(ChoiceCheckboxAnswerValueSetFields, { qItem: qItem, answers: answers, orientation: orientation, readOnly: readOnly, onCheckedChange: handleCheckedChange }),
|
|
47
|
+
React.createElement(DisplayInstructions, { displayInstructions: displayInstructions, readOnly: readOnly })));
|
|
52
48
|
}
|
|
53
|
-
return (React.createElement(
|
|
54
|
-
React.createElement(
|
|
55
|
-
|
|
49
|
+
return (React.createElement(FullWidthFormComponentBox, { "data-test": "q-item-choice-checkbox-answer-option-box" },
|
|
50
|
+
React.createElement(Grid, { container: true, columnSpacing: 6 },
|
|
51
|
+
React.createElement(Grid, { item: true, xs: 5 },
|
|
52
|
+
React.createElement(LabelWrapper, { qItem: qItem, readOnly: readOnly })),
|
|
53
|
+
React.createElement(Grid, { item: true, xs: 7 },
|
|
54
|
+
React.createElement(ChoiceCheckboxAnswerValueSetFields, { qItem: qItem, answers: answers, orientation: orientation, readOnly: readOnly, onCheckedChange: handleCheckedChange }),
|
|
55
|
+
React.createElement(DisplayInstructions, { displayInstructions: displayInstructions, readOnly: readOnly })))));
|
|
56
56
|
}
|
|
57
57
|
export default ChoiceCheckboxAnswerOptionItem;
|
|
58
58
|
//# 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;AAC1B,OAAO,IAAI,MAAM,oBAAoB,CAAC;AAGtC,OAAO,EAAE,iBAAiB,EAAE,MAAM,uBAAuB,CAAC;AAC1D,OAAO,EAAE,uBAAuB,EAAE,MAAM,uBAAuB,CAAC;AAChE,OAAO,EAAE,yBAAyB,EAAE,MAAM,kBAAkB,CAAC;AAC7D,OAAO,sBAAsB,MAAM,uCAAuC,CAAC;AAO3E,OAAO,mBAAmB,MAAM,oCAAoC,CAAC;AACrE,OAAO,YAAY,MAAM,+BAA+B,CAAC;AACzD,OAAO,kCAAkC,MAAM,oCAAoC,CAAC;AACpF,OAAO,WAAW,MAAM,4BAA4B,CAAC;AAYrD,SAAS,8BAA8B,CAAC,KAA0C;IAChF,MAAM,EACJ,KAAK,EACL,MAAM,EACN,WAAW,EACX,UAAU,EACV,
|
|
1
|
+
{"version":3,"file":"ChoiceCheckboxAnswerOptionItem.js","sourceRoot":"","sources":["../../../../src/components/FormComponents/ChoiceItems/ChoiceCheckboxAnswerOptionItem.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAEH,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,IAAI,MAAM,oBAAoB,CAAC;AAGtC,OAAO,EAAE,iBAAiB,EAAE,MAAM,uBAAuB,CAAC;AAC1D,OAAO,EAAE,uBAAuB,EAAE,MAAM,uBAAuB,CAAC;AAChE,OAAO,EAAE,yBAAyB,EAAE,MAAM,kBAAkB,CAAC;AAC7D,OAAO,sBAAsB,MAAM,uCAAuC,CAAC;AAO3E,OAAO,mBAAmB,MAAM,oCAAoC,CAAC;AACrE,OAAO,YAAY,MAAM,+BAA+B,CAAC;AACzD,OAAO,kCAAkC,MAAM,oCAAoC,CAAC;AACpF,OAAO,WAAW,MAAM,4BAA4B,CAAC;AAYrD,SAAS,8BAA8B,CAAC,KAA0C;IAChF,MAAM,EACJ,KAAK,EACL,MAAM,EACN,WAAW,EACX,UAAU,EACV,eAAe,GAAG,KAAK,EACvB,gBAAgB,EAChB,cAAc,EACf,GAAG,KAAK,CAAC;IAEV,mBAAmB;IACnB,MAAM,gBAAgB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IAAI,QAAC,EAAE,EAAE,CAAC;gBACd,oBAAC,kCAAkC,IACjC,KAAK,EAAE,KAAK,EACZ,OAAO,EAAE,OAAO,EAChB,WAAW,EAAE,WAAW,EACxB,QAAQ,EAAE,QAAQ,EAClB,eAAe,EAAE,mBAAmB,GACpC;gBACF,oBAAC,mBAAmB,IAAC,mBAAmB,EAAE,mBAAmB,EAAE,QAAQ,EAAE,QAAQ,GAAI,CAChF,CACF,CACmB,CAC7B,CAAC;AACJ,CAAC;AAED,eAAe,8BAA8B,CAAC"}
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import type { QuestionnaireItem, QuestionnaireResponseItem } from 'fhir/r4';
|
|
3
3
|
import type { ChoiceItemOrientation } from '../../../interfaces/choice.enum';
|
|
4
|
-
import type { PropsWithIsRepeatedAttribute, PropsWithParentIsReadOnlyAttribute, PropsWithQrItemChangeHandler,
|
|
5
|
-
interface ChoiceCheckboxAnswerValueSetItemProps extends PropsWithQrItemChangeHandler
|
|
4
|
+
import type { PropsWithIsRepeatedAttribute, PropsWithParentIsReadOnlyAttribute, PropsWithQrItemChangeHandler, PropsWithShowMinimalViewAttribute } from '../../../interfaces/renderProps.interface';
|
|
5
|
+
interface ChoiceCheckboxAnswerValueSetItemProps extends PropsWithQrItemChangeHandler, PropsWithIsRepeatedAttribute, PropsWithShowMinimalViewAttribute, PropsWithParentIsReadOnlyAttribute {
|
|
6
6
|
qItem: QuestionnaireItem;
|
|
7
|
-
qrItem: QuestionnaireResponseItem;
|
|
7
|
+
qrItem: QuestionnaireResponseItem | null;
|
|
8
8
|
orientation: ChoiceItemOrientation;
|
|
9
9
|
showText?: boolean;
|
|
10
10
|
}
|
|
@@ -26,7 +26,7 @@ import LabelWrapper from '../ItemParts/ItemLabelWrapper';
|
|
|
26
26
|
import ChoiceCheckboxAnswerValueSetFields from './ChoiceCheckboxAnswerValueSetFields';
|
|
27
27
|
import useReadOnly from '../../../hooks/useReadOnly';
|
|
28
28
|
function ChoiceCheckboxAnswerValueSetItem(props) {
|
|
29
|
-
const { qItem, qrItem, orientation, isRepeated,
|
|
29
|
+
const { qItem, qrItem, orientation, isRepeated, showMinimalView = false, parentIsReadOnly, onQrItemChange } = props;
|
|
30
30
|
// Init input value
|
|
31
31
|
const qrChoiceCheckbox = qrItem !== null && qrItem !== void 0 ? qrItem : createEmptyQrItem(qItem);
|
|
32
32
|
const answers = qrChoiceCheckbox.answer ? qrChoiceCheckbox.answer : [];
|
|
@@ -43,18 +43,18 @@ function ChoiceCheckboxAnswerValueSetItem(props) {
|
|
|
43
43
|
onQrItemChange(updatedQrChoiceCheckbox);
|
|
44
44
|
}
|
|
45
45
|
}
|
|
46
|
-
if (
|
|
47
|
-
return (React.createElement(
|
|
48
|
-
React.createElement(
|
|
49
|
-
|
|
50
|
-
React.createElement(LabelWrapper, { qItem: qItem, readOnly: readOnly })),
|
|
51
|
-
React.createElement(Grid, { item: true, xs: 7 },
|
|
52
|
-
React.createElement(ChoiceCheckboxAnswerValueSetFields, { codings: codings, answers: answers, orientation: orientation, readOnly: readOnly, serverError: serverError, onCheckedChange: handleCheckedChange }),
|
|
53
|
-
React.createElement(DisplayInstructions, { displayInstructions: displayInstructions, readOnly: readOnly })))));
|
|
46
|
+
if (showMinimalView) {
|
|
47
|
+
return (React.createElement(React.Fragment, null,
|
|
48
|
+
React.createElement(ChoiceCheckboxAnswerValueSetFields, { codings: codings, answers: answers, orientation: orientation, readOnly: readOnly, serverError: serverError, onCheckedChange: handleCheckedChange }),
|
|
49
|
+
React.createElement(DisplayInstructions, { displayInstructions: displayInstructions, readOnly: readOnly })));
|
|
54
50
|
}
|
|
55
|
-
return (React.createElement(
|
|
56
|
-
React.createElement(
|
|
57
|
-
|
|
51
|
+
return (React.createElement(FullWidthFormComponentBox, { "data-test": "q-item-choice-checkbox-answer-value-set-box" },
|
|
52
|
+
React.createElement(Grid, { container: true, columnSpacing: 6 },
|
|
53
|
+
React.createElement(Grid, { item: true, xs: 5 },
|
|
54
|
+
React.createElement(LabelWrapper, { qItem: qItem, readOnly: readOnly })),
|
|
55
|
+
React.createElement(Grid, { item: true, xs: 7 },
|
|
56
|
+
React.createElement(ChoiceCheckboxAnswerValueSetFields, { codings: codings, answers: answers, orientation: orientation, readOnly: readOnly, serverError: serverError, onCheckedChange: handleCheckedChange }),
|
|
57
|
+
React.createElement(DisplayInstructions, { displayInstructions: displayInstructions, readOnly: readOnly })))));
|
|
58
58
|
}
|
|
59
59
|
export default ChoiceCheckboxAnswerValueSetItem;
|
|
60
60
|
//# sourceMappingURL=ChoiceCheckboxAnswerValueSetItem.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ChoiceCheckboxAnswerValueSetItem.js","sourceRoot":"","sources":["../../../../src/components/FormComponents/ChoiceItems/ChoiceCheckboxAnswerValueSetItem.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAEH,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,IAAI,MAAM,oBAAoB,CAAC;AAEtC,OAAO,EAAE,iBAAiB,EAAE,MAAM,uBAAuB,CAAC;AAC1D,OAAO,kBAAkB,MAAM,mCAAmC,CAAC;AAEnE,OAAO,EAAE,mBAAmB,EAAE,uBAAuB,EAAE,MAAM,uBAAuB,CAAC;AACrF,OAAO,EAAE,yBAAyB,EAAE,MAAM,kBAAkB,CAAC;AAC7D,OAAO,sBAAsB,MAAM,uCAAuC,CAAC;AAO3E,OAAO,mBAAmB,MAAM,oCAAoC,CAAC;AACrE,OAAO,YAAY,MAAM,+BAA+B,CAAC;AACzD,OAAO,kCAAkC,MAAM,sCAAsC,CAAC;AACtF,OAAO,WAAW,MAAM,4BAA4B,CAAC;AAarD,SAAS,gCAAgC,CAAC,KAA4C;IACpF,MAAM,EACJ,KAAK,EACL,MAAM,EACN,WAAW,EACX,UAAU,EACV,
|
|
1
|
+
{"version":3,"file":"ChoiceCheckboxAnswerValueSetItem.js","sourceRoot":"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J,CAAC;AAED,eAAe,gCAAgC,CAAC"}
|
|
@@ -1,10 +1,9 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import type { QuestionnaireItem, QuestionnaireResponseItem } from 'fhir/r4';
|
|
3
|
-
import type { PropsWithIsRepeatedAttribute, PropsWithIsTabledAttribute, PropsWithQrItemChangeHandler,
|
|
4
|
-
|
|
5
|
-
interface ChoiceItemSwitcherProps extends PropsWithQrItemChangeHandler<QuestionnaireResponseItem>, PropsWithIsRepeatedAttribute, PropsWithIsTabledAttribute, PropsWithTextShownAttribute, PropsWithParentIsReadOnlyAttribute {
|
|
3
|
+
import type { PropsWithIsRepeatedAttribute, PropsWithIsTabledAttribute, PropsWithParentIsReadOnlyAttribute, PropsWithQrItemChangeHandler, PropsWithShowMinimalViewAttribute } from '../../../interfaces/renderProps.interface';
|
|
4
|
+
interface ChoiceItemSwitcherProps extends PropsWithQrItemChangeHandler, PropsWithIsRepeatedAttribute, PropsWithIsTabledAttribute, PropsWithShowMinimalViewAttribute, PropsWithParentIsReadOnlyAttribute {
|
|
6
5
|
qItem: QuestionnaireItem;
|
|
7
|
-
qrItem: QuestionnaireResponseItem;
|
|
6
|
+
qrItem: QuestionnaireResponseItem | null;
|
|
8
7
|
}
|
|
9
8
|
declare function ChoiceItemSwitcher(props: ChoiceItemSwitcherProps): React.JSX.Element | null;
|
|
10
9
|
export default ChoiceItemSwitcher;
|
|
@@ -26,7 +26,7 @@ import ChoiceRadioAnswerValueSetItem from './ChoiceRadioAnswerValueSetItem';
|
|
|
26
26
|
import ChoiceCheckboxAnswerValueSetItem from './ChoiceCheckboxAnswerValueSetItem';
|
|
27
27
|
function ChoiceItemSwitcher(props) {
|
|
28
28
|
var _a, _b;
|
|
29
|
-
const { qItem, qrItem, isRepeated, isTabled,
|
|
29
|
+
const { qItem, qrItem, isRepeated, isTabled, showMinimalView, parentIsReadOnly, onQrItemChange } = props;
|
|
30
30
|
const orientation = getChoiceOrientation(qItem);
|
|
31
31
|
const choiceControlType = getChoiceControlType(qItem);
|
|
32
32
|
switch (choiceControlType) {
|
|
@@ -39,10 +39,10 @@ function ChoiceItemSwitcher(props) {
|
|
|
39
39
|
}
|
|
40
40
|
case ChoiceItemControl.Checkbox:
|
|
41
41
|
if (qItem.answerOption) {
|
|
42
|
-
return (React.createElement(ChoiceCheckboxAnswerOptionItem, { qItem: qItem, qrItem: qrItem, orientation: orientation, isRepeated: (_a = qItem.repeats) !== null && _a !== void 0 ? _a : false,
|
|
42
|
+
return (React.createElement(ChoiceCheckboxAnswerOptionItem, { qItem: qItem, qrItem: qrItem, orientation: orientation, isRepeated: (_a = qItem.repeats) !== null && _a !== void 0 ? _a : false, showMinimalView: showMinimalView, parentIsReadOnly: parentIsReadOnly, onQrItemChange: onQrItemChange }));
|
|
43
43
|
}
|
|
44
44
|
else {
|
|
45
|
-
return (React.createElement(ChoiceCheckboxAnswerValueSetItem, { qItem: qItem, qrItem: qrItem, isRepeated: (_b = qItem.repeats) !== null && _b !== void 0 ? _b : false, orientation: orientation,
|
|
45
|
+
return (React.createElement(ChoiceCheckboxAnswerValueSetItem, { qItem: qItem, qrItem: qrItem, isRepeated: (_b = qItem.repeats) !== null && _b !== void 0 ? _b : false, orientation: orientation, showMinimalView: showMinimalView, parentIsReadOnly: parentIsReadOnly, onQrItemChange: onQrItemChange }));
|
|
46
46
|
}
|
|
47
47
|
case ChoiceItemControl.Autocomplete:
|
|
48
48
|
return (React.createElement(ChoiceAutocompleteItem, { qItem: qItem, qrItem: qrItem, isRepeated: isRepeated, isTabled: isTabled, parentIsReadOnly: parentIsReadOnly, onQrItemChange: onQrItemChange }));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ChoiceItemSwitcher.js","sourceRoot":"","sources":["../../../../src/components/FormComponents/ChoiceItems/ChoiceItemSwitcher.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAEH,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EA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E,cAAc,GAC9B,CACH,CAAC;aACH;QACH,KAAK,iBAAiB,CAAC,YAAY;YACjC,OAAO,CACL,oBAAC,sBAAsB,IACrB,KAAK,EAAE,KAAK,EACZ,MAAM,EAAE,MAAM,EACd,UAAU,EAAE,UAAU,EACtB,QAAQ,EAAE,QAAQ,EAClB,gBAAgB,EAAE,gBAAgB,EAClC,cAAc,EAAE,cAAc,GAC9B,CACH,CAAC;QACJ,KAAK,iBAAiB,CAAC,MAAM;YAC3B,IAAI,KAAK,CAAC,YAAY,EAAE;gBACtB,OAAO,CACL,oBAAC,4BAA4B,IAC3B,KAAK,EAAE,KAAK,EACZ,MAAM,EAAE,MAAM,EACd,UAAU,EAAE,UAAU,EACtB,QAAQ,EAAE,QAAQ,EAClB,gBAAgB,EAAE,gBAAgB,EAClC,cAAc,EAAE,cAAc,GAC9B,CACH,CAAC;aACH;iBAAM;gBACL,OAAO,CACL,oBAAC,8BAA8B,IAC7B,KAAK,EAAE,KAAK,EACZ,MAAM,EAAE,MAAM,EACd,UAAU,EAAE,UAAU,EACtB,QAAQ,EAAE,QAAQ,EAClB,gBAAgB,EAAE,gBAAgB,EAClC,cAAc,EAAE,cAAc,GAC9B,CACH,CAAC;aACH;QACH;YACE,OAAO,IAAI,CAAC;KACf;AACH,CAAC;AAED,eAAe,kBAAkB,CAAC"}
|
|
@@ -2,9 +2,9 @@ import React from 'react';
|
|
|
2
2
|
import type { ChoiceItemOrientation } from '../../../interfaces/choice.enum';
|
|
3
3
|
import type { QuestionnaireItem, QuestionnaireResponseItem } from 'fhir/r4';
|
|
4
4
|
import type { PropsWithIsRepeatedAttribute, PropsWithParentIsReadOnlyAttribute, PropsWithQrItemChangeHandler } from '../../../interfaces/renderProps.interface';
|
|
5
|
-
interface ChoiceRadioAnswerOptionItemProps extends PropsWithQrItemChangeHandler
|
|
5
|
+
interface ChoiceRadioAnswerOptionItemProps extends PropsWithQrItemChangeHandler, PropsWithIsRepeatedAttribute, PropsWithParentIsReadOnlyAttribute {
|
|
6
6
|
qItem: QuestionnaireItem;
|
|
7
|
-
qrItem: QuestionnaireResponseItem;
|
|
7
|
+
qrItem: QuestionnaireResponseItem | null;
|
|
8
8
|
orientation: ChoiceItemOrientation;
|
|
9
9
|
}
|
|
10
10
|
declare function ChoiceRadioAnswerOptionItem(props: ChoiceRadioAnswerOptionItemProps): React.JSX.Element;
|
|
@@ -2,9 +2,9 @@ import React from 'react';
|
|
|
2
2
|
import type { ChoiceItemOrientation } from '../../../interfaces/choice.enum';
|
|
3
3
|
import type { QuestionnaireItem, QuestionnaireResponseItem } from 'fhir/r4';
|
|
4
4
|
import type { PropsWithIsRepeatedAttribute, PropsWithParentIsReadOnlyAttribute, PropsWithQrItemChangeHandler } from '../../../interfaces/renderProps.interface';
|
|
5
|
-
interface ChoiceRadioAnswerValueSetItemProps extends PropsWithQrItemChangeHandler
|
|
5
|
+
interface ChoiceRadioAnswerValueSetItemProps extends PropsWithQrItemChangeHandler, PropsWithIsRepeatedAttribute, PropsWithParentIsReadOnlyAttribute {
|
|
6
6
|
qItem: QuestionnaireItem;
|
|
7
|
-
qrItem: QuestionnaireResponseItem;
|
|
7
|
+
qrItem: QuestionnaireResponseItem | null;
|
|
8
8
|
orientation: ChoiceItemOrientation;
|
|
9
9
|
}
|
|
10
10
|
declare function ChoiceRadioAnswerValueSetItem(props: ChoiceRadioAnswerValueSetItemProps): React.JSX.Element;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import type { QuestionnaireItem, QuestionnaireResponseItem } from 'fhir/r4';
|
|
3
3
|
import type { PropsWithIsRepeatedAttribute, PropsWithIsTabledAttribute, PropsWithParentIsReadOnlyAttribute, PropsWithQrItemChangeHandler } from '../../../interfaces/renderProps.interface';
|
|
4
|
-
interface ChoiceSelectAnswerOptionItemProps extends PropsWithQrItemChangeHandler
|
|
4
|
+
interface ChoiceSelectAnswerOptionItemProps extends PropsWithQrItemChangeHandler, PropsWithIsRepeatedAttribute, PropsWithIsTabledAttribute, PropsWithParentIsReadOnlyAttribute {
|
|
5
5
|
qItem: QuestionnaireItem;
|
|
6
|
-
qrItem: QuestionnaireResponseItem;
|
|
6
|
+
qrItem: QuestionnaireResponseItem | null;
|
|
7
7
|
}
|
|
8
8
|
declare function ChoiceSelectAnswerOptionItem(props: ChoiceSelectAnswerOptionItemProps): React.JSX.Element;
|
|
9
9
|
export default ChoiceSelectAnswerOptionItem;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import type { QuestionnaireItem, QuestionnaireResponseItem } from 'fhir/r4';
|
|
3
3
|
import type { PropsWithIsRepeatedAttribute, PropsWithIsTabledAttribute, PropsWithParentIsReadOnlyAttribute, PropsWithQrItemChangeHandler } from '../../../interfaces/renderProps.interface';
|
|
4
|
-
interface ChoiceSelectAnswerValueSetItemProps extends PropsWithQrItemChangeHandler
|
|
4
|
+
interface ChoiceSelectAnswerValueSetItemProps extends PropsWithQrItemChangeHandler, PropsWithIsRepeatedAttribute, PropsWithIsTabledAttribute, PropsWithParentIsReadOnlyAttribute {
|
|
5
5
|
qItem: QuestionnaireItem;
|
|
6
|
-
qrItem: QuestionnaireResponseItem;
|
|
6
|
+
qrItem: QuestionnaireResponseItem | null;
|
|
7
7
|
}
|
|
8
8
|
declare function ChoiceSelectAnswerValueSetItem(props: ChoiceSelectAnswerValueSetItemProps): React.JSX.Element;
|
|
9
9
|
export default ChoiceSelectAnswerValueSetItem;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import type { Dispatch, SetStateAction } from 'react';
|
|
2
|
+
import React from 'react';
|
|
3
|
+
import { PropsWithIsTabledAttribute } from '../../../interfaces/renderProps.interface';
|
|
4
|
+
interface CustomDateField2Props extends PropsWithIsTabledAttribute {
|
|
5
|
+
linkId: string;
|
|
6
|
+
valueDate: string;
|
|
7
|
+
input: string;
|
|
8
|
+
feedback: string;
|
|
9
|
+
isFocused: boolean;
|
|
10
|
+
displayPrompt: string;
|
|
11
|
+
entryFormat: string;
|
|
12
|
+
readOnly: boolean;
|
|
13
|
+
setFocused: Dispatch<SetStateAction<boolean>>;
|
|
14
|
+
onInputChange: (newInput: string) => void;
|
|
15
|
+
onSelectDate: (newDateValue: string) => void;
|
|
16
|
+
}
|
|
17
|
+
declare function CustomDateField2(props: CustomDateField2Props): React.JSX.Element;
|
|
18
|
+
export default CustomDateField2;
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright 2023 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
|
+
import React, { useRef } from 'react';
|
|
18
|
+
import { StandardTextField } from '../Textfield.styles';
|
|
19
|
+
import DatePicker from './customDateTimePicker/DatePicker';
|
|
20
|
+
function CustomDateField2(props) {
|
|
21
|
+
const { linkId, valueDate, input, feedback, isFocused, displayPrompt, entryFormat, readOnly, isTabled, setFocused, onInputChange, onSelectDate } = props;
|
|
22
|
+
const anchorRef = useRef(null);
|
|
23
|
+
return (React.createElement(StandardTextField, { id: linkId, ref: anchorRef, fullWidth: true, isTabled: isTabled, value: input, error: !!feedback, onChange: (e) => onInputChange(e.target.value), label: displayPrompt, placeholder: entryFormat !== '' ? entryFormat : 'DD/MM/YYYY', disabled: readOnly, size: "small", focused: isFocused, onFocus: () => setFocused(true), onBlur: () => setFocused(false), InputProps: {
|
|
24
|
+
endAdornment: (React.createElement(React.Fragment, null,
|
|
25
|
+
React.createElement(DatePicker, { valueString: valueDate, anchorEl: anchorRef.current, onSelectDate: (valueDayjs) => {
|
|
26
|
+
onSelectDate(valueDayjs.format('DD/MM/YYYY'));
|
|
27
|
+
}, onFocus: (focus) => setFocused(focus) })))
|
|
28
|
+
}, helperText: feedback }));
|
|
29
|
+
}
|
|
30
|
+
export default CustomDateField2;
|
|
31
|
+
//# sourceMappingURL=CustomDateField2.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"CustomDateField2.js","sourceRoot":"","sources":["../../../../src/components/FormComponents/CustomDateItem/CustomDateField2.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAIH,OAAO,KAAK,EAAE,EAAE,MAAM,EAAE,MAAM,OAAO,CAAC;AAEtC,OAAO,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AACxD,OAAO,UAAU,MAAM,mCAAmC,CAAC;AAgB3D,SAAS,gBAAgB,CAAC,KAA4B;IACpD,MAAM,EACJ,MAAM,EACN,SAAS,EACT,KAAK,EACL,QAAQ,EACR,SAAS,EACT,aAAa,EACb,WAAW,EACX,QAAQ,EACR,QAAQ,EACR,UAAU,EACV,aAAa,EACb,YAAY,EACb,GAAG,KAAK,CAAC;IAEV,MAAM,SAAS,GAA8B,MAAM,CAAC,IAAI,CAAC,CAAC;IAE1D,OAAO,CACL,oBAAC,iBAAiB,IAChB,EAAE,EAAE,MAAM,EACV,GAAG,EAAE,SAAS,EACd,SAAS,QACT,QAAQ,EAAE,QAAQ,EAClB,KAAK,EAAE,KAAK,EACZ,KAAK,EAAE,CAAC,CAAC,QAAQ,EACjB,QAAQ,EAAE,CAAC,CAAgC,EAAE,EAAE,CAAC,aAAa,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,EAC7E,KAAK,EAAE,aAAa,EACpB,WAAW,EAAE,WAAW,KAAK,EAAE,CAAC,CAAC,CAAC,WAAW,CAAC,CAAC,CAAC,YAAY,EAC5D,QAAQ,EAAE,QAAQ,EAClB,IAAI,EAAC,OAAO,EACZ,OAAO,EAAE,SAAS,EAClB,OAAO,EAAE,GAAG,EAAE,CAAC,UAAU,CAAC,IAAI,CAAC,EAC/B,MAAM,EAAE,GAAG,EAAE,CAAC,UAAU,CAAC,KAAK,CAAC,EAC/B,UAAU,EAAE;YACV,YAAY,EAAE,CACZ;gBACE,oBAAC,UAAU,IACT,WAAW,EAAE,SAAS,EACtB,QAAQ,EAAE,SAAS,CAAC,OAAO,EAC3B,YAAY,EAAE,CAAC,UAAiB,EAAE,EAAE;wBAClC,YAAY,CAAC,UAAU,CAAC,MAAM,CAAC,YAAY,CAAC,CAAC,CAAC;oBAChD,CAAC,EACD,OAAO,EAAE,CAAC,KAAK,EAAE,EAAE,CAAC,UAAU,CAAC,KAAK,CAAC,GACrC,CACD,CACJ;SACF,EACD,UAAU,EAAE,QAAQ,GACpB,CACH,CAAC;AACJ,CAAC;AAED,eAAe,gBAAgB,CAAC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { PropsWithIsRepeatedAttribute, PropsWithIsTabledAttribute, PropsWithParentIsReadOnlyAttribute, PropsWithQrItemChangeHandler } from '../../../interfaces/renderProps.interface';
|
|
3
|
+
import type { QuestionnaireItem, QuestionnaireResponseItem } from 'fhir/r4';
|
|
4
|
+
interface CustomDateItemProps extends PropsWithQrItemChangeHandler, PropsWithIsRepeatedAttribute, PropsWithIsTabledAttribute, PropsWithParentIsReadOnlyAttribute {
|
|
5
|
+
qItem: QuestionnaireItem;
|
|
6
|
+
qrItem: QuestionnaireResponseItem | null;
|
|
7
|
+
}
|
|
8
|
+
declare function CustomDateItem(props: CustomDateItemProps): React.JSX.Element;
|
|
9
|
+
export default CustomDateItem;
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright 2023 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
|
+
import React, { useState } from 'react';
|
|
18
|
+
import useReadOnly from '../../../hooks/useReadOnly';
|
|
19
|
+
import useRenderingExtensions from '../../../hooks/useRenderingExtensions';
|
|
20
|
+
import { FullWidthFormComponentBox } from '../../Box.styles';
|
|
21
|
+
import ItemFieldGrid from '../ItemParts/ItemFieldGrid';
|
|
22
|
+
import { parseFhirDateToDisplayDate, parseInputDateToFhirDate, validateInput } from './customDateTimePicker/utils/parseDates';
|
|
23
|
+
import { createEmptyQrItem } from '../../../utils/qrItem';
|
|
24
|
+
import useDateValidation from '../../../hooks/useDateValidation';
|
|
25
|
+
import CustomDateField from './customDateTimePicker/CustomDateField';
|
|
26
|
+
function CustomDateItem(props) {
|
|
27
|
+
const { qItem, qrItem, isRepeated, isTabled, parentIsReadOnly, onQrItemChange } = props;
|
|
28
|
+
const readOnly = useReadOnly(qItem, parentIsReadOnly);
|
|
29
|
+
const { displayPrompt, displayInstructions, entryFormat } = useRenderingExtensions(qItem);
|
|
30
|
+
const qrDate = qrItem !== null && qrItem !== void 0 ? qrItem : createEmptyQrItem(qItem);
|
|
31
|
+
// Init input value
|
|
32
|
+
let valueDate = '';
|
|
33
|
+
if (qrDate.answer) {
|
|
34
|
+
if (qrDate.answer[0].valueDate) {
|
|
35
|
+
valueDate = qrDate.answer[0].valueDate;
|
|
36
|
+
}
|
|
37
|
+
else if (qrDate.answer[0].valueDateTime) {
|
|
38
|
+
valueDate = qrDate.answer[0].valueDateTime;
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
const { displayDate, parseFail } = parseFhirDateToDisplayDate(valueDate);
|
|
42
|
+
const [input, setInput] = useState(displayDate);
|
|
43
|
+
const [focused, setFocused] = useState(false);
|
|
44
|
+
// Perform validation checks
|
|
45
|
+
const errorFeedback = useDateValidation(input, parseFail);
|
|
46
|
+
function handleSelectDate(selectedDate) {
|
|
47
|
+
setInput(selectedDate);
|
|
48
|
+
onQrItemChange(Object.assign(Object.assign({}, createEmptyQrItem(qItem)), { answer: [{ valueDate: parseInputDateToFhirDate(selectedDate) }] }));
|
|
49
|
+
}
|
|
50
|
+
function handleInputChange(newInput) {
|
|
51
|
+
setInput(newInput);
|
|
52
|
+
if (newInput === '') {
|
|
53
|
+
onQrItemChange(createEmptyQrItem(qItem));
|
|
54
|
+
}
|
|
55
|
+
if (!validateInput(newInput)) {
|
|
56
|
+
return;
|
|
57
|
+
}
|
|
58
|
+
onQrItemChange(Object.assign(Object.assign({}, createEmptyQrItem(qItem)), { answer: [{ valueDate: parseInputDateToFhirDate(newInput) }] }));
|
|
59
|
+
}
|
|
60
|
+
if (isRepeated) {
|
|
61
|
+
return (React.createElement(CustomDateField, { linkId: qItem.linkId, valueDate: displayDate, input: input, feedback: errorFeedback !== null && errorFeedback !== void 0 ? errorFeedback : '', isFocused: focused, displayPrompt: displayPrompt, entryFormat: entryFormat, readOnly: readOnly, isTabled: isTabled, setFocused: setFocused, onInputChange: handleInputChange, onSelectDate: handleSelectDate }));
|
|
62
|
+
}
|
|
63
|
+
return (React.createElement(FullWidthFormComponentBox, { "data-test": "q-item-date-box" },
|
|
64
|
+
React.createElement(ItemFieldGrid, { qItem: qItem, displayInstructions: displayInstructions, readOnly: readOnly },
|
|
65
|
+
React.createElement(CustomDateField, { linkId: qItem.linkId, valueDate: displayDate, input: input, feedback: errorFeedback !== null && errorFeedback !== void 0 ? errorFeedback : '', isFocused: focused, displayPrompt: displayPrompt, entryFormat: entryFormat, readOnly: readOnly, isTabled: isTabled, setFocused: setFocused, onInputChange: handleInputChange, onSelectDate: handleSelectDate }))));
|
|
66
|
+
}
|
|
67
|
+
export default CustomDateItem;
|
|
68
|
+
//# sourceMappingURL=CustomDateItem.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"CustomDateItem.js","sourceRoot":"","sources":["../../../../src/components/FormComponents/CustomDateItem/CustomDateItem.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAEH,OAAO,KAAK,EAAE,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAQxC,OAAO,WAAW,MAAM,4BAA4B,CAAC;AACrD,OAAO,sBAAsB,MAAM,uCAAuC,CAAC;AAC3E,OAAO,EAAE,yBAAyB,EAAE,MAAM,kBAAkB,CAAC;AAC7D,OAAO,aAAa,MAAM,4BAA4B,CAAC;AACvD,OAAO,EACL,0BAA0B,EAC1B,wBAAwB,EACxB,aAAa,EACd,MAAM,yCAAyC,CAAC;AACjD,OAAO,EAAE,iBAAiB,EAAE,MAAM,uBAAuB,CAAC;AAC1D,OAAO,iBAAiB,MAAM,kCAAkC,CAAC;AACjE,OAAO,eAAe,MAAM,wCAAwC,CAAC;AAWrE,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,CAAC,CAAC;IACtD,MAAM,EAAE,aAAa,EAAE,mBAAmB,EAAE,WAAW,EAAE,GAAG,sBAAsB,CAAC,KAAK,CAAC,CAAC;IAE1F,MAAM,MAAM,GAAG,M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ithIsRepeatedAttribute, PropsWithIsTabledAttribute, PropsWithParentIsReadOnlyAttribute, PropsWithQrItemChangeHandler } from '../../../interfaces/renderProps.interface';
|
|
3
|
+
import type { QuestionnaireItem, QuestionnaireResponseItem } from 'fhir/r4';
|
|
4
|
+
interface CustomDateTimePickerTextProps extends PropsWithQrItemChangeHandler<QuestionnaireResponseItem>, PropsWithIsRepeatedAttribute, PropsWithIsTabledAttribute, PropsWithParentIsReadOnlyAttribute {
|
|
5
|
+
qItem: QuestionnaireItem;
|
|
6
|
+
qrItem: QuestionnaireResponseItem;
|
|
7
|
+
}
|
|
8
|
+
declare function CustomDateTimePickerText(props: CustomDateTimePickerTextProps): React.JSX.Element;
|
|
9
|
+
export default CustomDateTimePickerText;
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright 2023 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
|
+
import React, { useState } from 'react';
|
|
18
|
+
import useReadOnly from '../../../hooks/useReadOnly';
|
|
19
|
+
import useRenderingExtensions from '../../../hooks/useRenderingExtensions';
|
|
20
|
+
import { FullWidthFormComponentBox } from '../../Box.styles';
|
|
21
|
+
import ItemFieldGrid from '../ItemParts/ItemFieldGrid';
|
|
22
|
+
import useParseDates from './customDateTimePicker/hooks/useParseDates';
|
|
23
|
+
import CustomDateField from './customDateTimePicker/CustomDateField';
|
|
24
|
+
import { parseDisplayDateToFhirDate, parseFhirDateToDisplayDate, replaceMonthNameWithNumber } from './customDateTimePicker/utils/parseDates';
|
|
25
|
+
import { createEmptyQrItem } from '../../../utils/qrItem';
|
|
26
|
+
function CustomDateTimePickerText(props) {
|
|
27
|
+
const { qItem, qrItem, isRepeated, isTabled, parentIsReadOnly, onQrItemChange } = props;
|
|
28
|
+
const readOnly = useReadOnly(qItem, parentIsReadOnly);
|
|
29
|
+
const { displayPrompt, displayInstructions, entryFormat } = useRenderingExtensions(qItem);
|
|
30
|
+
const qrDate = qrItem !== null && qrItem !== void 0 ? qrItem : createEmptyQrItem(qItem);
|
|
31
|
+
// Init input value
|
|
32
|
+
let valueDate = '';
|
|
33
|
+
if (qrDate.answer) {
|
|
34
|
+
if (qrDate.answer[0].valueDate) {
|
|
35
|
+
valueDate = qrDate.answer[0].valueDate;
|
|
36
|
+
}
|
|
37
|
+
else if (qrDate.answer[0].valueDateTime) {
|
|
38
|
+
valueDate = qrDate.answer[0].valueDateTime;
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
valueDate = parseFhirDateToDisplayDate(valueDate);
|
|
42
|
+
const selectedDateToDisplay = valueDate.length === 0 ? 'N/A' : valueDate;
|
|
43
|
+
const [input, setInput] = useState(valueDate);
|
|
44
|
+
const [focused, setFocused] = useState(false);
|
|
45
|
+
let options = [];
|
|
46
|
+
const { dateOptions, seperator } = useParseDates(input);
|
|
47
|
+
if (dateOptions) {
|
|
48
|
+
options = dateOptions;
|
|
49
|
+
}
|
|
50
|
+
function handleValueChange(newDateString) {
|
|
51
|
+
onQrItemChange(Object.assign(Object.assign({}, createEmptyQrItem(qItem)), { answer: [{ valueDate: parseDisplayDateToFhirDate(newDateString, seperator) }] }));
|
|
52
|
+
}
|
|
53
|
+
function handleUnfocus() {
|
|
54
|
+
// set answer to current input when text field is unfocused
|
|
55
|
+
if (!valueDate && input !== '') {
|
|
56
|
+
const replacedInput = replaceMonthNameWithNumber(input);
|
|
57
|
+
const matchedOption = options.find((option) => replacedInput === option);
|
|
58
|
+
if (matchedOption) {
|
|
59
|
+
const newDateString = matchedOption.split(seperator).join('/');
|
|
60
|
+
onQrItemChange(Object.assign(Object.assign({}, createEmptyQrItem(qItem)), { answer: [{ valueDate: parseDisplayDateToFhirDate(newDateString, seperator) }] }));
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
setFocused(false);
|
|
64
|
+
}
|
|
65
|
+
if (isRepeated) {
|
|
66
|
+
return (React.createElement(CustomDateField, { valueDate: valueDate, input: input, isFocused: focused, displayPrompt: displayPrompt, entryFormat: entryFormat, readOnly: readOnly, isTabled: isTabled, setFocused: setFocused, onInputChange: (newInput) => setInput(newInput), onValueChange: handleValueChange, onUnfocus: handleUnfocus }));
|
|
67
|
+
}
|
|
68
|
+
return (React.createElement(FullWidthFormComponentBox, { "data-test": "q-item-date-box" },
|
|
69
|
+
React.createElement(ItemFieldGrid, { qItem: qItem, displayInstructions: displayInstructions.length > 0 ? (displayInstructions) : (React.createElement(React.Fragment, null,
|
|
70
|
+
"Selected date: ",
|
|
71
|
+
React.createElement("b", null, selectedDateToDisplay))), readOnly: readOnly },
|
|
72
|
+
React.createElement(CustomDateField, { valueDate: valueDate, input: input, isFocused: focused, displayPrompt: displayPrompt, entryFormat: entryFormat, readOnly: readOnly, isTabled: isTabled, setFocused: setFocused, onInputChange: (newInput) => setInput(newInput), onValueChange: handleValueChange, onUnfocus: handleUnfocus }))));
|
|
73
|
+
}
|
|
74
|
+
export default CustomDateTimePickerText;
|
|
75
|
+
//# sourceMappingURL=CustomDateTimeField.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"CustomDateTimeField.js","sourceRoot":"","sources":["../../../../src/components/FormComponents/CustomDateItem/CustomDateTimeField.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAEH,OAAO,KAAK,E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entIsReadOnlyAttribute, PropsWithQrItemChangeHandler } from '../../../interfaces/renderProps.interface';
|
|
3
|
+
import type { QuestionnaireItem, QuestionnaireResponseItem } from 'fhir/r4';
|
|
4
|
+
interface CustomDateTimePickerTextProps extends PropsWithQrItemChangeHandler<QuestionnaireResponseItem>, PropsWithIsRepeatedAttribute, PropsWithIsTabledAttribute, PropsWithParentIsReadOnlyAttribute {
|
|
5
|
+
qItem: QuestionnaireItem;
|
|
6
|
+
qrItem: QuestionnaireResponseItem;
|
|
7
|
+
}
|
|
8
|
+
declare function CustomDateTimePickerText(props: CustomDateTimePickerTextProps): React.JSX.Element;
|
|
9
|
+
export default CustomDateTimePickerText;
|