@aehrc/smart-forms-renderer 1.0.0-alpha.98 → 1.0.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/README.md +5 -1
- package/lib/api/callback.js +6 -15
- package/lib/api/callback.js.map +1 -1
- package/lib/api/smartClient.js +6 -21
- package/lib/api/smartClient.js.map +1 -1
- package/lib/components/Checkbox.styles.js +21 -19
- package/lib/components/Checkbox.styles.js.map +1 -1
- package/lib/components/ExpressionUpdateFadingGlow.styles.d.ts +2 -2
- package/lib/components/ExpressionUpdateFadingGlow.styles.js +12 -9
- package/lib/components/ExpressionUpdateFadingGlow.styles.js.map +1 -1
- package/lib/components/FormComponents/AttachmentItem/AttachmentField.d.ts +2 -2
- package/lib/components/FormComponents/AttachmentItem/AttachmentField.js +3 -3
- package/lib/components/FormComponents/AttachmentItem/AttachmentField.js.map +1 -1
- package/lib/components/FormComponents/AttachmentItem/AttachmentFieldWrapper.d.ts +2 -2
- package/lib/components/FormComponents/AttachmentItem/AttachmentFieldWrapper.js +1 -1
- package/lib/components/FormComponents/AttachmentItem/AttachmentFieldWrapper.js.map +1 -1
- package/lib/components/FormComponents/AttachmentItem/AttachmentFileCollector.d.ts +2 -2
- package/lib/components/FormComponents/AttachmentItem/AttachmentFileCollector.js +1 -2
- package/lib/components/FormComponents/AttachmentItem/AttachmentFileCollector.js.map +1 -1
- package/lib/components/FormComponents/AttachmentItem/AttachmentFileDropBox.d.ts +2 -2
- package/lib/components/FormComponents/AttachmentItem/AttachmentFileDropBox.js +4 -5
- package/lib/components/FormComponents/AttachmentItem/AttachmentFileDropBox.js.map +1 -1
- package/lib/components/FormComponents/AttachmentItem/AttachmentItem.js +27 -37
- package/lib/components/FormComponents/AttachmentItem/AttachmentItem.js.map +1 -1
- package/lib/components/FormComponents/AttachmentItem/AttachmentUrlField.d.ts +2 -2
- package/lib/components/FormComponents/AttachmentItem/AttachmentUrlField.js +3 -3
- package/lib/components/FormComponents/AttachmentItem/AttachmentUrlField.js.map +1 -1
- package/lib/components/FormComponents/BooleanItem/BooleanField.js +6 -7
- package/lib/components/FormComponents/BooleanItem/BooleanField.js.map +1 -1
- package/lib/components/FormComponents/BooleanItem/BooleanItem.js +33 -24
- package/lib/components/FormComponents/BooleanItem/BooleanItem.js.map +1 -1
- package/lib/components/FormComponents/ChoiceItems/CheckboxOptionList.js +1 -2
- package/lib/components/FormComponents/ChoiceItems/CheckboxOptionList.js.map +1 -1
- package/lib/components/FormComponents/ChoiceItems/ChoiceAutocompleteField.d.ts +2 -2
- package/lib/components/FormComponents/ChoiceItems/ChoiceAutocompleteField.js +12 -7
- package/lib/components/FormComponents/ChoiceItems/ChoiceAutocompleteField.js.map +1 -1
- package/lib/components/FormComponents/ChoiceItems/ChoiceAutocompleteItem.d.ts +2 -7
- package/lib/components/FormComponents/ChoiceItems/ChoiceAutocompleteItem.js +17 -28
- package/lib/components/FormComponents/ChoiceItems/ChoiceAutocompleteItem.js.map +1 -1
- package/lib/components/FormComponents/ChoiceItems/ChoiceCheckboxAnswerOptionFields.js.map +1 -1
- package/lib/components/FormComponents/ChoiceItems/ChoiceCheckboxAnswerOptionItem.d.ts +2 -7
- package/lib/components/FormComponents/ChoiceItems/ChoiceCheckboxAnswerOptionItem.js +29 -14
- package/lib/components/FormComponents/ChoiceItems/ChoiceCheckboxAnswerOptionItem.js.map +1 -1
- package/lib/components/FormComponents/ChoiceItems/ChoiceCheckboxAnswerValueSetFields.js +17 -1
- package/lib/components/FormComponents/ChoiceItems/ChoiceCheckboxAnswerValueSetFields.js.map +1 -1
- package/lib/components/FormComponents/ChoiceItems/ChoiceCheckboxAnswerValueSetItem.d.ts +2 -8
- package/lib/components/FormComponents/ChoiceItems/ChoiceCheckboxAnswerValueSetItem.js +12 -13
- package/lib/components/FormComponents/ChoiceItems/ChoiceCheckboxAnswerValueSetItem.js.map +1 -1
- package/lib/components/FormComponents/ChoiceItems/ChoiceItemSwitcher.d.ts +2 -7
- package/lib/components/FormComponents/ChoiceItems/ChoiceItemSwitcher.js +30 -15
- package/lib/components/FormComponents/ChoiceItems/ChoiceItemSwitcher.js.map +1 -1
- package/lib/components/FormComponents/ChoiceItems/ChoiceRadioAnswerOptionFields.js.map +1 -1
- package/lib/components/FormComponents/ChoiceItems/ChoiceRadioAnswerOptionItem.d.ts +2 -7
- package/lib/components/FormComponents/ChoiceItems/ChoiceRadioAnswerOptionItem.js +32 -29
- package/lib/components/FormComponents/ChoiceItems/ChoiceRadioAnswerOptionItem.js.map +1 -1
- package/lib/components/FormComponents/ChoiceItems/ChoiceRadioAnswerOptionView.d.ts +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 +17 -1
- package/lib/components/FormComponents/ChoiceItems/ChoiceRadioAnswerValueSetFields.js.map +1 -1
- package/lib/components/FormComponents/ChoiceItems/ChoiceRadioAnswerValueSetItem.d.ts +2 -7
- package/lib/components/FormComponents/ChoiceItems/ChoiceRadioAnswerValueSetItem.js +15 -27
- package/lib/components/FormComponents/ChoiceItems/ChoiceRadioAnswerValueSetItem.js.map +1 -1
- package/lib/components/FormComponents/ChoiceItems/ChoiceRadioSingle.js +9 -6
- 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 +28 -8
- package/lib/components/FormComponents/ChoiceItems/ChoiceSelectAnswerOptionFields.js.map +1 -1
- package/lib/components/FormComponents/ChoiceItems/ChoiceSelectAnswerOptionItem.d.ts +2 -7
- package/lib/components/FormComponents/ChoiceItems/ChoiceSelectAnswerOptionItem.js +14 -28
- 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 -20
- 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 +19 -14
- package/lib/components/FormComponents/ChoiceItems/ChoiceSelectAnswerValueSetFields.js.map +1 -1
- package/lib/components/FormComponents/ChoiceItems/ChoiceSelectAnswerValueSetItem.d.ts +2 -7
- package/lib/components/FormComponents/ChoiceItems/ChoiceSelectAnswerValueSetItem.js +16 -32
- package/lib/components/FormComponents/ChoiceItems/ChoiceSelectAnswerValueSetItem.js.map +1 -1
- package/lib/components/FormComponents/DateTimeItems/CustomDateItem/CustomDateField.d.ts +2 -3
- package/lib/components/FormComponents/DateTimeItems/CustomDateItem/CustomDateField.js +9 -10
- package/lib/components/FormComponents/DateTimeItems/CustomDateItem/CustomDateField.js.map +1 -1
- package/lib/components/FormComponents/DateTimeItems/CustomDateItem/CustomDateItem.js +17 -38
- package/lib/components/FormComponents/DateTimeItems/CustomDateItem/CustomDateItem.js.map +1 -1
- package/lib/components/FormComponents/DateTimeItems/CustomDateItem/DatePicker.js +1 -1
- package/lib/components/FormComponents/DateTimeItems/CustomDateItem/DatePicker.js.map +1 -1
- package/lib/components/FormComponents/DateTimeItems/CustomDateItem/DatePickerButton.js +3 -3
- package/lib/components/FormComponents/DateTimeItems/CustomDateItem/DatePickerButton.js.map +1 -1
- package/lib/components/FormComponents/DateTimeItems/CustomDateTimeItem/CustomDateTimeItem.js +19 -56
- package/lib/components/FormComponents/DateTimeItems/CustomDateTimeItem/CustomDateTimeItem.js.map +1 -1
- package/lib/components/FormComponents/DateTimeItems/CustomDateTimeItem/CustomTimeField.d.ts +2 -3
- package/lib/components/FormComponents/DateTimeItems/CustomDateTimeItem/CustomTimeField.js +25 -9
- package/lib/components/FormComponents/DateTimeItems/CustomDateTimeItem/CustomTimeField.js.map +1 -1
- package/lib/components/FormComponents/DateTimeItems/CustomDateTimeItem/DateTimeField.d.ts +2 -5
- package/lib/components/FormComponents/DateTimeItems/CustomDateTimeItem/DateTimeField.js +19 -3
- package/lib/components/FormComponents/DateTimeItems/CustomDateTimeItem/DateTimeField.js.map +1 -1
- package/lib/components/FormComponents/DecimalItem/DecimalField.d.ts +2 -3
- package/lib/components/FormComponents/DecimalItem/DecimalField.js +6 -6
- package/lib/components/FormComponents/DecimalItem/DecimalField.js.map +1 -1
- package/lib/components/FormComponents/DecimalItem/DecimalItem.js +22 -45
- package/lib/components/FormComponents/DecimalItem/DecimalItem.js.map +1 -1
- package/lib/components/FormComponents/DisplayItem/DisplayItem.js +1 -1
- package/lib/components/FormComponents/DisplayItem/DisplayItem.js.map +1 -1
- package/lib/components/FormComponents/GridGroup/GridGroup.d.ts +2 -2
- package/lib/components/FormComponents/GridGroup/GridGroup.js +29 -20
- package/lib/components/FormComponents/GridGroup/GridGroup.js.map +1 -1
- package/lib/components/FormComponents/GridGroup/GridRow.d.ts +6 -2
- package/lib/components/FormComponents/GridGroup/GridRow.js +7 -9
- package/lib/components/FormComponents/GridGroup/GridRow.js.map +1 -1
- package/lib/components/FormComponents/GridGroup/GridTable.d.ts +6 -2
- package/lib/components/FormComponents/GridGroup/GridTable.js +7 -4
- package/lib/components/FormComponents/GridGroup/GridTable.js.map +1 -1
- package/lib/components/FormComponents/GroupItem/GroupHeading.js +4 -4
- package/lib/components/FormComponents/GroupItem/GroupHeading.js.map +1 -1
- package/lib/components/FormComponents/GroupItem/GroupItem.d.ts +2 -2
- package/lib/components/FormComponents/GroupItem/GroupItem.js +8 -8
- 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 +11 -11
- package/lib/components/FormComponents/GroupItem/GroupItemSwitcher.js.map +1 -1
- package/lib/components/FormComponents/GroupItem/GroupItemView.d.ts +2 -2
- package/lib/components/FormComponents/GroupItem/GroupItemView.js +8 -10
- package/lib/components/FormComponents/GroupItem/GroupItemView.js.map +1 -1
- package/lib/components/FormComponents/GroupItem/PageButtonWrapper.js +2 -2
- package/lib/components/FormComponents/GroupItem/PageButtonWrapper.js.map +1 -1
- package/lib/components/FormComponents/GroupItem/TabButtonsWrapper.js +2 -2
- package/lib/components/FormComponents/GroupItem/TabButtonsWrapper.js.map +1 -1
- package/lib/components/FormComponents/IntegerItem/IntegerField.d.ts +2 -3
- package/lib/components/FormComponents/IntegerItem/IntegerField.js +6 -6
- package/lib/components/FormComponents/IntegerItem/IntegerField.js.map +1 -1
- package/lib/components/FormComponents/IntegerItem/IntegerItem.js +20 -40
- package/lib/components/FormComponents/IntegerItem/IntegerItem.js.map +1 -1
- package/lib/components/FormComponents/ItemParts/CheckboxFormGroup.d.ts +1 -1
- package/lib/components/FormComponents/ItemParts/CheckboxFormGroup.js +10 -11
- package/lib/components/FormComponents/ItemParts/CheckboxFormGroup.js.map +1 -1
- package/lib/components/FormComponents/ItemParts/CheckboxSingle.js +10 -7
- package/lib/components/FormComponents/ItemParts/CheckboxSingle.js.map +1 -1
- package/lib/components/FormComponents/ItemParts/CheckboxSingleWithOpenLabel.js +9 -7
- package/lib/components/FormComponents/ItemParts/CheckboxSingleWithOpenLabel.js.map +1 -1
- package/lib/components/FormComponents/ItemParts/ClearButtonAdornment.js +1 -2
- package/lib/components/FormComponents/ItemParts/ClearButtonAdornment.js.map +1 -1
- package/lib/components/FormComponents/ItemParts/ClearInputButton.d.ts +1 -1
- package/lib/components/FormComponents/ItemParts/ClearInputButton.js +9 -7
- package/lib/components/FormComponents/ItemParts/ClearInputButton.js.map +1 -1
- package/lib/components/FormComponents/ItemParts/DisplayUnitText.js +2 -2
- package/lib/components/FormComponents/ItemParts/DisplayUnitText.js.map +1 -1
- package/lib/components/FormComponents/ItemParts/ExpressionUpdateFadingIcon.js +6 -2
- package/lib/components/FormComponents/ItemParts/ExpressionUpdateFadingIcon.js.map +1 -1
- package/lib/components/FormComponents/ItemParts/ItemFieldGrid.js +3 -3
- package/lib/components/FormComponents/ItemParts/ItemFieldGrid.js.map +1 -1
- package/lib/components/FormComponents/ItemParts/ItemLabel.js +10 -9
- package/lib/components/FormComponents/ItemParts/ItemLabel.js.map +1 -1
- package/lib/components/FormComponents/ItemParts/ItemRepopulateButton.js +30 -48
- package/lib/components/FormComponents/ItemParts/ItemRepopulateButton.js.map +1 -1
- package/lib/components/FormComponents/ItemParts/ItemTextSwitcher.js +6 -5
- package/lib/components/FormComponents/ItemParts/ItemTextSwitcher.js.map +1 -1
- package/lib/components/FormComponents/ItemParts/OpenLabelField.js +4 -4
- package/lib/components/FormComponents/ItemParts/OpenLabelField.js.map +1 -1
- package/lib/components/FormComponents/ItemParts/RadioButtonWithOpenLabel.js +1 -1
- package/lib/components/FormComponents/ItemParts/RadioButtonWithOpenLabel.js.map +1 -1
- package/lib/components/FormComponents/ItemParts/RadioFormGroup.d.ts +1 -1
- package/lib/components/FormComponents/ItemParts/RadioFormGroup.js +12 -13
- package/lib/components/FormComponents/ItemParts/RadioFormGroup.js.map +1 -1
- package/lib/components/FormComponents/ItemParts/RadioOptionList.js +1 -2
- package/lib/components/FormComponents/ItemParts/RadioOptionList.js.map +1 -1
- package/lib/components/FormComponents/ItemParts/RequiredAsterisk.js +4 -15
- package/lib/components/FormComponents/ItemParts/RequiredAsterisk.js.map +1 -1
- package/lib/components/FormComponents/OpenChoiceItems/OpenChoiceAutocompleteField.d.ts +2 -2
- package/lib/components/FormComponents/OpenChoiceItems/OpenChoiceAutocompleteField.js +21 -16
- package/lib/components/FormComponents/OpenChoiceItems/OpenChoiceAutocompleteField.js.map +1 -1
- package/lib/components/FormComponents/OpenChoiceItems/OpenChoiceAutocompleteItem.d.ts +2 -7
- package/lib/components/FormComponents/OpenChoiceItems/OpenChoiceAutocompleteItem.js +41 -18
- package/lib/components/FormComponents/OpenChoiceItems/OpenChoiceAutocompleteItem.js.map +1 -1
- package/lib/components/FormComponents/OpenChoiceItems/OpenChoiceCheckboxAnswerOptionFields.js +1 -1
- package/lib/components/FormComponents/OpenChoiceItems/OpenChoiceCheckboxAnswerOptionFields.js.map +1 -1
- package/lib/components/FormComponents/OpenChoiceItems/OpenChoiceCheckboxAnswerOptionItem.d.ts +2 -7
- package/lib/components/FormComponents/OpenChoiceItems/OpenChoiceCheckboxAnswerOptionItem.js +18 -18
- package/lib/components/FormComponents/OpenChoiceItems/OpenChoiceCheckboxAnswerOptionItem.js.map +1 -1
- package/lib/components/FormComponents/OpenChoiceItems/OpenChoiceCheckboxAnswerValueSetFields.js +18 -2
- package/lib/components/FormComponents/OpenChoiceItems/OpenChoiceCheckboxAnswerValueSetFields.js.map +1 -1
- package/lib/components/FormComponents/OpenChoiceItems/OpenChoiceCheckboxAnswerValueSetItem.d.ts +2 -7
- package/lib/components/FormComponents/OpenChoiceItems/OpenChoiceCheckboxAnswerValueSetItem.js +18 -18
- package/lib/components/FormComponents/OpenChoiceItems/OpenChoiceCheckboxAnswerValueSetItem.js.map +1 -1
- package/lib/components/FormComponents/OpenChoiceItems/OpenChoiceItemSwitcher.d.ts +2 -7
- package/lib/components/FormComponents/OpenChoiceItems/OpenChoiceItemSwitcher.js +28 -13
- package/lib/components/FormComponents/OpenChoiceItems/OpenChoiceItemSwitcher.js.map +1 -1
- package/lib/components/FormComponents/OpenChoiceItems/OpenChoiceRadioAnswerOptionFields.js.map +1 -1
- package/lib/components/FormComponents/OpenChoiceItems/OpenChoiceRadioAnswerOptionItem.d.ts +2 -7
- package/lib/components/FormComponents/OpenChoiceItems/OpenChoiceRadioAnswerOptionItem.js +26 -17
- package/lib/components/FormComponents/OpenChoiceItems/OpenChoiceRadioAnswerOptionItem.js.map +1 -1
- package/lib/components/FormComponents/OpenChoiceItems/OpenChoiceRadioAnswerValueSetFields.js +18 -2
- package/lib/components/FormComponents/OpenChoiceItems/OpenChoiceRadioAnswerValueSetFields.js.map +1 -1
- package/lib/components/FormComponents/OpenChoiceItems/OpenChoiceRadioAnswerValueSetItem.d.ts +2 -7
- package/lib/components/FormComponents/OpenChoiceItems/OpenChoiceRadioAnswerValueSetItem.js +26 -17
- 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 +10 -6
- package/lib/components/FormComponents/OpenChoiceItems/OpenChoiceSelectAnswerOptionField.js.map +1 -1
- package/lib/components/FormComponents/OpenChoiceItems/OpenChoiceSelectAnswerOptionItem.d.ts +2 -7
- package/lib/components/FormComponents/OpenChoiceItems/OpenChoiceSelectAnswerOptionItem.js +25 -13
- 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 +10 -6
- package/lib/components/FormComponents/OpenChoiceItems/OpenChoiceSelectAnswerValueSetField.js.map +1 -1
- package/lib/components/FormComponents/OpenChoiceItems/OpenChoiceSelectAnswerValueSetItem.d.ts +2 -7
- package/lib/components/FormComponents/OpenChoiceItems/OpenChoiceSelectAnswerValueSetItem.js +21 -12
- package/lib/components/FormComponents/OpenChoiceItems/OpenChoiceSelectAnswerValueSetItem.js.map +1 -1
- package/lib/components/FormComponents/QuantityItem/QuantityComparatorField.d.ts +2 -2
- package/lib/components/FormComponents/QuantityItem/QuantityComparatorField.js +5 -5
- package/lib/components/FormComponents/QuantityItem/QuantityComparatorField.js.map +1 -1
- package/lib/components/FormComponents/QuantityItem/QuantityField.d.ts +2 -3
- package/lib/components/FormComponents/QuantityItem/QuantityField.js +6 -6
- package/lib/components/FormComponents/QuantityItem/QuantityField.js.map +1 -1
- package/lib/components/FormComponents/QuantityItem/QuantityItem.js +31 -89
- package/lib/components/FormComponents/QuantityItem/QuantityItem.js.map +1 -1
- package/lib/components/FormComponents/QuantityItem/QuantityUnitField.d.ts +2 -2
- package/lib/components/FormComponents/QuantityItem/QuantityUnitField.js +4 -4
- package/lib/components/FormComponents/QuantityItem/QuantityUnitField.js.map +1 -1
- package/lib/components/FormComponents/RepeatGroup/AddItemButton.js +1 -2
- package/lib/components/FormComponents/RepeatGroup/AddItemButton.js.map +1 -1
- package/lib/components/FormComponents/RepeatGroup/RepeatGroup.d.ts +2 -2
- package/lib/components/FormComponents/RepeatGroup/RepeatGroup.js +4 -6
- 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/RepeatGroup/RepeatGroupView.d.ts +3 -4
- package/lib/components/FormComponents/RepeatGroup/RepeatGroupView.js +3 -4
- package/lib/components/FormComponents/RepeatGroup/RepeatGroupView.js.map +1 -1
- package/lib/components/FormComponents/RepeatItem/AddItemButton.js +1 -1
- package/lib/components/FormComponents/RepeatItem/AddItemButton.js.map +1 -1
- package/lib/components/FormComponents/RepeatItem/RepeatField.d.ts +2 -2
- package/lib/components/FormComponents/RepeatItem/RepeatField.js +2 -3
- package/lib/components/FormComponents/RepeatItem/RepeatField.js.map +1 -1
- package/lib/components/FormComponents/RepeatItem/RepeatItem.d.ts +2 -2
- package/lib/components/FormComponents/RepeatItem/RepeatItem.js +17 -13
- package/lib/components/FormComponents/RepeatItem/RepeatItem.js.map +1 -1
- package/lib/components/FormComponents/SingleItem/SingleItem.d.ts +2 -2
- package/lib/components/FormComponents/SingleItem/SingleItem.js +9 -9
- 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 +54 -31
- package/lib/components/FormComponents/SingleItem/SingleItemSwitcher.js.map +1 -1
- package/lib/components/FormComponents/SingleItem/SingleItemView.d.ts +3 -4
- package/lib/components/FormComponents/SingleItem/SingleItemView.js +4 -5
- package/lib/components/FormComponents/SingleItem/SingleItemView.js.map +1 -1
- package/lib/components/FormComponents/SingleItem/SingleNestedItems.d.ts +2 -2
- package/lib/components/FormComponents/SingleItem/SingleNestedItems.js +8 -9
- package/lib/components/FormComponents/SingleItem/SingleNestedItems.js.map +1 -1
- package/lib/components/FormComponents/SliderItem/Slider.styles.js +23 -21
- package/lib/components/FormComponents/SliderItem/Slider.styles.js.map +1 -1
- package/lib/components/FormComponents/SliderItem/SliderField.d.ts +2 -2
- package/lib/components/FormComponents/SliderItem/SliderField.js +4 -4
- package/lib/components/FormComponents/SliderItem/SliderField.js.map +1 -1
- package/lib/components/FormComponents/SliderItem/SliderItem.js +10 -8
- package/lib/components/FormComponents/SliderItem/SliderItem.js.map +1 -1
- package/lib/components/FormComponents/StringItem/StringField.d.ts +2 -3
- package/lib/components/FormComponents/StringItem/StringField.js +22 -6
- package/lib/components/FormComponents/StringItem/StringField.js.map +1 -1
- package/lib/components/FormComponents/StringItem/StringItem.d.ts +2 -7
- package/lib/components/FormComponents/StringItem/StringItem.js +19 -55
- package/lib/components/FormComponents/StringItem/StringItem.js.map +1 -1
- package/lib/components/FormComponents/Tables/GroupTable.d.ts +2 -2
- package/lib/components/FormComponents/Tables/GroupTable.js +33 -37
- package/lib/components/FormComponents/Tables/GroupTable.js.map +1 -1
- package/lib/components/FormComponents/Tables/GroupTableBody.d.ts +7 -4
- package/lib/components/FormComponents/Tables/GroupTableBody.js +4 -5
- package/lib/components/FormComponents/Tables/GroupTableBody.js.map +1 -1
- package/lib/components/FormComponents/Tables/GroupTableRow.d.ts +7 -4
- package/lib/components/FormComponents/Tables/GroupTableRow.js +3 -3
- package/lib/components/FormComponents/Tables/GroupTableRow.js.map +1 -1
- package/lib/components/FormComponents/Tables/GroupTableRowCells.d.ts +6 -2
- package/lib/components/FormComponents/Tables/GroupTableRowCells.js +5 -6
- package/lib/components/FormComponents/Tables/GroupTableRowCells.js.map +1 -1
- package/lib/components/FormComponents/Tables/GroupTableView.d.ts +7 -4
- package/lib/components/FormComponents/Tables/GroupTableView.js +8 -9
- package/lib/components/FormComponents/Tables/GroupTableView.js.map +1 -1
- package/lib/components/FormComponents/Tables/SelectRowButton.js +3 -4
- package/lib/components/FormComponents/Tables/SelectRowButton.js.map +1 -1
- package/lib/components/FormComponents/Tables/Table.styles.d.ts +2 -2
- package/lib/components/FormComponents/Tables/Table.styles.js +25 -20
- package/lib/components/FormComponents/Tables/Table.styles.js.map +1 -1
- package/lib/components/FormComponents/TextItem/TextField.d.ts +0 -1
- package/lib/components/FormComponents/TextItem/TextField.js +4 -4
- package/lib/components/FormComponents/TextItem/TextField.js.map +1 -1
- package/lib/components/FormComponents/TextItem/TextItem.js +14 -34
- package/lib/components/FormComponents/TextItem/TextItem.js.map +1 -1
- package/lib/components/FormComponents/Textfield.styles.js +1 -1
- package/lib/components/FormComponents/Textfield.styles.js.map +1 -1
- package/lib/components/FormComponents/TimeItem/TimeField.d.ts +2 -2
- 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.js +8 -6
- package/lib/components/FormComponents/TimeItem/TimeItem.js.map +1 -1
- package/lib/components/FormComponents/UrlItem/UrlField.d.ts +2 -3
- package/lib/components/FormComponents/UrlItem/UrlField.js +5 -5
- package/lib/components/FormComponents/UrlItem/UrlField.js.map +1 -1
- package/lib/components/FormComponents/UrlItem/UrlItem.js +8 -17
- package/lib/components/FormComponents/UrlItem/UrlItem.js.map +1 -1
- package/lib/components/Radio.styles.js +21 -19
- package/lib/components/Radio.styles.js.map +1 -1
- package/lib/components/Renderer/BaseRenderer.js +11 -15
- package/lib/components/Renderer/BaseRenderer.js.map +1 -1
- package/lib/components/Renderer/FormBodyCollapsible.d.ts +2 -2
- package/lib/components/Renderer/FormBodyCollapsible.js +5 -6
- package/lib/components/Renderer/FormBodyCollapsible.js.map +1 -1
- package/lib/components/Renderer/FormBodyPageContainer.d.ts +2 -2
- package/lib/components/Renderer/FormBodyPageContainer.js +7 -9
- package/lib/components/Renderer/FormBodyPageContainer.js.map +1 -1
- package/lib/components/Renderer/FormBodyPaginated.d.ts +2 -2
- package/lib/components/Renderer/FormBodyPaginated.js +11 -15
- package/lib/components/Renderer/FormBodyPaginated.js.map +1 -1
- package/lib/components/Renderer/FormBodySingleCollapsible.js +1 -2
- package/lib/components/Renderer/FormBodySingleCollapsible.js.map +1 -1
- package/lib/components/Renderer/FormBodySingleCollapsibleWrapper.d.ts +2 -2
- package/lib/components/Renderer/FormBodySingleCollapsibleWrapper.js +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 +13 -15
- package/lib/components/Renderer/FormBodyTabbed.js.map +1 -1
- package/lib/components/Renderer/FormTopLevelItem.d.ts +2 -2
- package/lib/components/Renderer/FormTopLevelItem.js +12 -12
- package/lib/components/Renderer/FormTopLevelItem.js.map +1 -1
- package/lib/components/Renderer/SmartFormsRenderer.d.ts +4 -2
- package/lib/components/Renderer/SmartFormsRenderer.js +4 -2
- package/lib/components/Renderer/SmartFormsRenderer.js.map +1 -1
- package/lib/components/Tabs/FormBodySingleTab.d.ts +1 -0
- package/lib/components/Tabs/FormBodySingleTab.js +5 -2
- package/lib/components/Tabs/FormBodySingleTab.js.map +1 -1
- package/lib/components/Tabs/FormBodyTabList.js +2 -3
- package/lib/components/Tabs/FormBodyTabList.js.map +1 -1
- package/lib/hooks/index.d.ts +0 -2
- package/lib/hooks/index.js +1 -3
- package/lib/hooks/index.js.map +1 -1
- package/lib/hooks/useAnswerOptionsToggleExpressions.js +6 -8
- package/lib/hooks/useAnswerOptionsToggleExpressions.js.map +1 -1
- package/lib/hooks/useAttachmentUrlValidation.js +1 -1
- package/lib/hooks/useAttachmentUrlValidation.js.map +1 -1
- package/lib/hooks/useBuildForm.d.ts +13 -15
- package/lib/hooks/useBuildForm.js +26 -22
- package/lib/hooks/useBuildForm.js.map +1 -1
- package/lib/hooks/useCalculatedExpressionUpdated.d.ts +7 -0
- package/lib/hooks/useCalculatedExpressionUpdated.js +31 -0
- package/lib/hooks/useCalculatedExpressionUpdated.js.map +1 -0
- package/lib/hooks/useCodingCalculatedExpression.d.ts +0 -13
- package/lib/hooks/useCodingCalculatedExpression.js +1 -74
- package/lib/hooks/useCodingCalculatedExpression.js.map +1 -1
- package/lib/hooks/useDateCalculatedExpression.d.ts +0 -12
- package/lib/hooks/useDateCalculatedExpression.js +1 -58
- package/lib/hooks/useDateCalculatedExpression.js.map +1 -1
- package/lib/hooks/useDateTimeCalculatedExpression.d.ts +0 -12
- package/lib/hooks/useDateTimeCalculatedExpression.js +1 -58
- package/lib/hooks/useDateTimeCalculatedExpression.js.map +1 -1
- package/lib/hooks/useDisplayCqfAndCalculatedExpression.d.ts +13 -1
- package/lib/hooks/useDisplayCqfAndCalculatedExpression.js +14 -4
- package/lib/hooks/useDisplayCqfAndCalculatedExpression.js.map +1 -1
- package/lib/hooks/useDynamicValueSetEffect.js +6 -16
- package/lib/hooks/useDynamicValueSetEffect.js.map +1 -1
- package/lib/hooks/useHidden.js +2 -2
- package/lib/hooks/useHidden.js.map +1 -1
- package/lib/hooks/useInitialiseForm.d.ts +3 -2
- package/lib/hooks/useInitialiseForm.js +10 -3
- package/lib/hooks/useInitialiseForm.js.map +1 -1
- package/lib/hooks/useInitialiseRepeatAnswers.js +5 -5
- package/lib/hooks/useInitialiseRepeatAnswers.js.map +1 -1
- package/lib/hooks/useParseXhtml.js +2 -2
- package/lib/hooks/useParseXhtml.js.map +1 -1
- package/lib/hooks/useReadOnly.js +2 -2
- package/lib/hooks/useReadOnly.js.map +1 -1
- package/lib/hooks/useRenderingExtensions.js +11 -14
- package/lib/hooks/useRenderingExtensions.js.map +1 -1
- package/lib/hooks/useResizeColumns.d.ts +8 -0
- package/lib/hooks/useResizeColumns.js +46 -0
- package/lib/hooks/useResizeColumns.js.map +1 -0
- package/lib/hooks/useSliderExtensions.js +5 -6
- package/lib/hooks/useSliderExtensions.js.map +1 -1
- package/lib/hooks/useTerminologyServerQuery.js +2 -3
- package/lib/hooks/useTerminologyServerQuery.js.map +1 -1
- package/lib/hooks/useValidationFeedback.js +2 -3
- package/lib/hooks/useValidationFeedback.js.map +1 -1
- package/lib/hooks/useValueSetCodings.js +6 -39
- package/lib/hooks/useValueSetCodings.js.map +1 -1
- package/lib/index.d.ts +5 -7
- package/lib/index.js +3 -4
- package/lib/index.js.map +1 -1
- package/lib/interfaces/calculatedExpression.interface.d.ts +1 -1
- package/lib/interfaces/overrideComponent.interface.d.ts +2 -4
- package/lib/interfaces/renderProps.interface.d.ts +6 -31
- package/lib/interfaces/valueSet.interface.d.ts +2 -2
- package/lib/stores/formUpdateQueueStore.d.ts +6 -13
- package/lib/stores/formUpdateQueueStore.js +9 -24
- package/lib/stores/formUpdateQueueStore.js.map +1 -1
- package/lib/stores/index.d.ts +3 -3
- package/lib/stores/index.js +2 -2
- package/lib/stores/index.js.map +1 -1
- package/lib/stores/questionnaireResponseStore.d.ts +6 -9
- package/lib/stores/questionnaireResponseStore.js +22 -28
- package/lib/stores/questionnaireResponseStore.js.map +1 -1
- package/lib/stores/questionnaireStore.d.ts +39 -35
- package/lib/stores/questionnaireStore.js +136 -141
- package/lib/stores/questionnaireStore.js.map +1 -1
- package/lib/stores/{rendererStylingStore.d.ts → rendererConfigStore.d.ts} +8 -8
- package/lib/stores/rendererConfigStore.js +65 -0
- package/lib/stores/rendererConfigStore.js.map +1 -0
- package/lib/stores/smartConfigStore.d.ts +3 -3
- package/lib/stores/smartConfigStore.js +3 -3
- package/lib/stores/terminologyServerStore.d.ts +2 -2
- package/lib/stores/terminologyServerStore.js +2 -2
- package/lib/stories/storybookWrappers/InitialiseFormWrapperForStorybook.d.ts +1 -1
- package/lib/stories/storybookWrappers/InitialiseFormWrapperForStorybook.js +2 -2
- package/lib/stories/storybookWrappers/InitialiseFormWrapperForStorybook.js.map +1 -1
- package/lib/stories/testUtils.d.ts +23 -0
- package/lib/stories/testUtils.js +249 -0
- package/lib/stories/testUtils.js.map +1 -0
- package/lib/theme/rendererThemeOptions.js +1 -1
- package/lib/theme/rendererThemeOptions.js.map +1 -1
- package/lib/utils/answerOptionsToggleExpressions.d.ts +1 -1
- package/lib/utils/answerOptionsToggleExpressions.js +94 -111
- package/lib/utils/answerOptionsToggleExpressions.js.map +1 -1
- package/lib/utils/calculatedExpression.d.ts +39 -3
- package/lib/utils/calculatedExpression.js +426 -191
- package/lib/utils/calculatedExpression.js.map +1 -1
- package/lib/utils/choice.js +14 -11
- package/lib/utils/choice.js.map +1 -1
- package/lib/utils/columnWidth.d.ts +28 -0
- package/lib/utils/columnWidth.js +103 -0
- package/lib/utils/columnWidth.js.map +1 -0
- package/lib/utils/computedUpdates.js +14 -12
- package/lib/utils/computedUpdates.js.map +1 -1
- package/lib/utils/enableWhen.js +6 -8
- package/lib/utils/enableWhen.js.map +1 -1
- package/lib/utils/enableWhenExpression.d.ts +1 -1
- package/lib/utils/enableWhenExpression.js +143 -163
- package/lib/utils/enableWhenExpression.js.map +1 -1
- package/lib/utils/extensions.d.ts +9 -0
- package/lib/utils/extensions.js +77 -74
- package/lib/utils/extensions.js.map +1 -1
- package/lib/utils/extractObservation.js +37 -28
- package/lib/utils/extractObservation.js.map +1 -1
- package/lib/utils/fhirpath.d.ts +27 -21
- package/lib/utils/fhirpath.js +191 -171
- package/lib/utils/fhirpath.js.map +1 -1
- package/lib/utils/fileUtils.js +21 -32
- package/lib/utils/fileUtils.js.map +1 -1
- package/lib/utils/genericRecursive.js +4 -6
- package/lib/utils/genericRecursive.js.map +1 -1
- package/lib/utils/getExpressionsFromItem.js +59 -66
- package/lib/utils/getExpressionsFromItem.js.map +1 -1
- package/lib/utils/index.d.ts +2 -1
- package/lib/utils/index.js +1 -1
- package/lib/utils/index.js.map +1 -1
- package/lib/utils/initialise.js +88 -101
- package/lib/utils/initialise.js.map +1 -1
- package/lib/utils/inputSanitization.js +6 -6
- package/lib/utils/inputSanitization.js.map +1 -1
- package/lib/utils/itemPath.d.ts +2 -2
- package/lib/utils/manageForm.d.ts +87 -9
- package/lib/utils/manageForm.js +79 -54
- package/lib/utils/manageForm.js.map +1 -1
- package/lib/utils/misc.js +9 -9
- package/lib/utils/misc.js.map +1 -1
- package/lib/utils/openChoice.js +25 -23
- package/lib/utils/openChoice.js.map +1 -1
- package/lib/utils/page.js +3 -4
- package/lib/utils/page.js.map +1 -1
- package/lib/utils/parameterisedValueSets.d.ts +1 -1
- package/lib/utils/parameterisedValueSets.js +110 -124
- package/lib/utils/parameterisedValueSets.js.map +1 -1
- package/lib/utils/populateContexts.js +4 -5
- package/lib/utils/populateContexts.js.map +1 -1
- package/lib/utils/qItem.js +9 -21
- package/lib/utils/qItem.js.map +1 -1
- package/lib/utils/qrItem.js +2 -3
- package/lib/utils/qrItem.js.map +1 -1
- package/lib/utils/quantity.js +8 -9
- package/lib/utils/quantity.js.map +1 -1
- package/lib/utils/questionnaireStoreUtils/addDisplayToCodings.js +93 -111
- package/lib/utils/questionnaireStoreUtils/addDisplayToCodings.js.map +1 -1
- package/lib/utils/questionnaireStoreUtils/createQuestionnaireModel.js +53 -64
- package/lib/utils/questionnaireStoreUtils/createQuestionnaireModel.js.map +1 -1
- package/lib/utils/questionnaireStoreUtils/extractContainedValueSets.js +3 -5
- package/lib/utils/questionnaireStoreUtils/extractContainedValueSets.js.map +1 -1
- package/lib/utils/questionnaireStoreUtils/extractLaunchContext.js +1 -2
- package/lib/utils/questionnaireStoreUtils/extractLaunchContext.js.map +1 -1
- package/lib/utils/questionnaireStoreUtils/extractOtherExtensions.js +200 -212
- package/lib/utils/questionnaireStoreUtils/extractOtherExtensions.js.map +1 -1
- package/lib/utils/questionnaireStoreUtils/extractTabs.js +1 -1
- package/lib/utils/questionnaireStoreUtils/extractTabs.js.map +1 -1
- package/lib/utils/questionnaireStoreUtils/extractTargetConstraint.js +8 -9
- package/lib/utils/questionnaireStoreUtils/extractTargetConstraint.js.map +1 -1
- package/lib/utils/questionnaireStoreUtils/extractVariables.js +4 -10
- package/lib/utils/questionnaireStoreUtils/extractVariables.js.map +1 -1
- package/lib/utils/questionnaireStoreUtils/resolveValueSets.js +28 -37
- package/lib/utils/questionnaireStoreUtils/resolveValueSets.js.map +1 -1
- package/lib/utils/readValues.js +7 -7
- package/lib/utils/readValues.js.map +1 -1
- package/lib/utils/removeEmptyAnswers.js +11 -9
- package/lib/utils/removeEmptyAnswers.js.map +1 -1
- package/lib/utils/removeRepeatId.js +17 -22
- package/lib/utils/removeRepeatId.js.map +1 -1
- package/lib/utils/repopulateIntoResponse.js +7 -5
- package/lib/utils/repopulateIntoResponse.js.map +1 -1
- package/lib/utils/repopulateItems.js +6 -11
- package/lib/utils/repopulateItems.js.map +1 -1
- package/lib/utils/slider.js +3 -6
- package/lib/utils/slider.js.map +1 -1
- package/lib/utils/tabs.js +3 -5
- package/lib/utils/tabs.js.map +1 -1
- package/lib/utils/targetConstraint.d.ts +1 -1
- package/lib/utils/targetConstraint.js +85 -102
- package/lib/utils/targetConstraint.js.map +1 -1
- package/lib/utils/ucumQuantityConversion.d.ts +44 -0
- package/lib/utils/ucumQuantityConversion.js +132 -0
- package/lib/utils/ucumQuantityConversion.js.map +1 -0
- package/lib/utils/validate.js +35 -35
- package/lib/utils/validate.js.map +1 -1
- package/lib/utils/valueSet.d.ts +10 -1
- package/lib/utils/valueSet.js +67 -55
- package/lib/utils/valueSet.js.map +1 -1
- package/package.json +19 -19
- package/src/components/ExpressionUpdateFadingGlow.styles.ts +3 -3
- package/src/components/FormComponents/AttachmentItem/AttachmentField.tsx +5 -5
- package/src/components/FormComponents/AttachmentItem/AttachmentFieldWrapper.tsx +3 -2
- package/src/components/FormComponents/AttachmentItem/AttachmentFileCollector.tsx +2 -2
- package/src/components/FormComponents/AttachmentItem/AttachmentFileDropBox.tsx +5 -5
- package/src/components/FormComponents/AttachmentItem/AttachmentUrlField.tsx +5 -5
- package/src/components/FormComponents/BooleanItem/BooleanField.tsx +4 -4
- package/src/components/FormComponents/BooleanItem/BooleanItem.tsx +7 -26
- package/src/components/FormComponents/ChoiceItems/ChoiceAutocompleteField.tsx +5 -5
- package/src/components/FormComponents/ChoiceItems/ChoiceAutocompleteItem.tsx +15 -31
- package/src/components/FormComponents/ChoiceItems/ChoiceCheckboxAnswerOptionFields.tsx +0 -1
- package/src/components/FormComponents/ChoiceItems/ChoiceCheckboxAnswerOptionItem.tsx +12 -32
- package/src/components/FormComponents/ChoiceItems/ChoiceCheckboxAnswerValueSetFields.tsx +3 -4
- package/src/components/FormComponents/ChoiceItems/ChoiceCheckboxAnswerValueSetItem.tsx +14 -34
- package/src/components/FormComponents/ChoiceItems/ChoiceItemSwitcher.tsx +19 -43
- package/src/components/FormComponents/ChoiceItems/ChoiceRadioAnswerOptionFields.tsx +0 -1
- package/src/components/FormComponents/ChoiceItems/ChoiceRadioAnswerOptionItem.tsx +14 -59
- package/src/components/FormComponents/ChoiceItems/ChoiceRadioAnswerOptionView.tsx +4 -4
- package/src/components/FormComponents/ChoiceItems/ChoiceRadioAnswerValueSetFields.tsx +2 -3
- package/src/components/FormComponents/ChoiceItems/ChoiceRadioAnswerValueSetItem.tsx +14 -52
- package/src/components/FormComponents/ChoiceItems/ChoiceRadioSingle.tsx +2 -2
- package/src/components/FormComponents/ChoiceItems/ChoiceSelectAnswerOptionFields.tsx +8 -8
- package/src/components/FormComponents/ChoiceItems/ChoiceSelectAnswerOptionItem.tsx +12 -59
- package/src/components/FormComponents/ChoiceItems/ChoiceSelectAnswerOptionView.tsx +8 -7
- package/src/components/FormComponents/ChoiceItems/ChoiceSelectAnswerValueSetFields.tsx +12 -11
- package/src/components/FormComponents/ChoiceItems/ChoiceSelectAnswerValueSetItem.tsx +11 -55
- package/src/components/FormComponents/DateTimeItems/CustomDateItem/CustomDateField.tsx +6 -11
- package/src/components/FormComponents/DateTimeItems/CustomDateItem/CustomDateItem.tsx +11 -44
- package/src/components/FormComponents/DateTimeItems/CustomDateItem/DatePickerButton.tsx +2 -2
- package/src/components/FormComponents/DateTimeItems/CustomDateTimeItem/CustomDateTimeItem.tsx +21 -76
- package/src/components/FormComponents/DateTimeItems/CustomDateTimeItem/CustomTimeField.tsx +11 -15
- package/src/components/FormComponents/DateTimeItems/CustomDateTimeItem/DateTimeField.tsx +6 -14
- package/src/components/FormComponents/DecimalItem/DecimalField.tsx +7 -10
- package/src/components/FormComponents/DecimalItem/DecimalItem.tsx +20 -65
- package/src/components/FormComponents/DisplayItem/DisplayItem.tsx +1 -0
- package/src/components/FormComponents/GridGroup/GridGroup.tsx +45 -29
- package/src/components/FormComponents/GridGroup/GridRow.tsx +13 -15
- package/src/components/FormComponents/GridGroup/GridTable.tsx +6 -7
- package/src/components/FormComponents/GroupItem/GroupHeading.tsx +2 -2
- package/src/components/FormComponents/GroupItem/GroupItem.tsx +4 -9
- package/src/components/FormComponents/GroupItem/GroupItemSwitcher.tsx +0 -13
- package/src/components/FormComponents/GroupItem/GroupItemView.tsx +1 -7
- package/src/components/FormComponents/GroupItem/PageButtonWrapper.tsx +2 -2
- package/src/components/FormComponents/GroupItem/TabButtonsWrapper.tsx +2 -2
- package/src/components/FormComponents/IntegerItem/IntegerField.tsx +7 -10
- package/src/components/FormComponents/IntegerItem/IntegerItem.tsx +18 -57
- package/src/components/FormComponents/ItemParts/CheckboxFormGroup.tsx +8 -8
- package/src/components/FormComponents/ItemParts/CheckboxSingle.tsx +2 -2
- package/src/components/FormComponents/ItemParts/CheckboxSingleWithOpenLabel.tsx +2 -2
- package/src/components/FormComponents/ItemParts/ClearInputButton.tsx +17 -16
- package/src/components/FormComponents/ItemParts/DisplayUnitText.tsx +2 -2
- package/src/components/FormComponents/ItemParts/ItemFieldGrid.tsx +2 -2
- package/src/components/FormComponents/ItemParts/ItemLabel.tsx +3 -6
- package/src/components/FormComponents/ItemParts/ItemRepopulateButton.tsx +1 -8
- package/src/components/FormComponents/ItemParts/ItemTextSwitcher.tsx +9 -4
- package/src/components/FormComponents/ItemParts/OpenLabelField.tsx +3 -3
- package/src/components/FormComponents/ItemParts/RadioFormGroup.tsx +9 -9
- package/src/components/FormComponents/ItemParts/RequiredAsterisk.tsx +3 -3
- package/src/components/FormComponents/OpenChoiceItems/OpenChoiceAutocompleteField.tsx +5 -5
- package/src/components/FormComponents/OpenChoiceItems/OpenChoiceAutocompleteItem.tsx +40 -40
- package/src/components/FormComponents/OpenChoiceItems/OpenChoiceCheckboxAnswerOptionFields.tsx +1 -2
- package/src/components/FormComponents/OpenChoiceItems/OpenChoiceCheckboxAnswerOptionItem.tsx +19 -37
- package/src/components/FormComponents/OpenChoiceItems/OpenChoiceCheckboxAnswerValueSetFields.tsx +4 -5
- package/src/components/FormComponents/OpenChoiceItems/OpenChoiceCheckboxAnswerValueSetItem.tsx +24 -38
- package/src/components/FormComponents/OpenChoiceItems/OpenChoiceItemSwitcher.tsx +22 -46
- package/src/components/FormComponents/OpenChoiceItems/OpenChoiceRadioAnswerOptionFields.tsx +0 -1
- package/src/components/FormComponents/OpenChoiceItems/OpenChoiceRadioAnswerOptionItem.tsx +22 -33
- package/src/components/FormComponents/OpenChoiceItems/OpenChoiceRadioAnswerValueSetFields.tsx +3 -4
- package/src/components/FormComponents/OpenChoiceItems/OpenChoiceRadioAnswerValueSetItem.tsx +27 -36
- package/src/components/FormComponents/OpenChoiceItems/OpenChoiceSelectAnswerOptionField.tsx +5 -5
- package/src/components/FormComponents/OpenChoiceItems/OpenChoiceSelectAnswerOptionItem.tsx +10 -33
- package/src/components/FormComponents/OpenChoiceItems/OpenChoiceSelectAnswerValueSetField.tsx +5 -5
- package/src/components/FormComponents/OpenChoiceItems/OpenChoiceSelectAnswerValueSetItem.tsx +11 -30
- package/src/components/FormComponents/QuantityItem/QuantityComparatorField.tsx +6 -6
- package/src/components/FormComponents/QuantityItem/QuantityField.tsx +7 -10
- package/src/components/FormComponents/QuantityItem/QuantityItem.tsx +15 -105
- package/src/components/FormComponents/QuantityItem/QuantityUnitField.tsx +11 -6
- package/src/components/FormComponents/RepeatGroup/RepeatGroup.tsx +8 -21
- package/src/components/FormComponents/RepeatGroup/RepeatGroupItem.tsx +0 -4
- package/src/components/FormComponents/RepeatGroup/RepeatGroupView.tsx +5 -19
- package/src/components/FormComponents/RepeatItem/RepeatField.tsx +0 -4
- package/src/components/FormComponents/RepeatItem/RepeatItem.tsx +9 -27
- package/src/components/FormComponents/SingleItem/SingleItem.tsx +7 -12
- package/src/components/FormComponents/SingleItem/SingleItemSwitcher.tsx +56 -36
- package/src/components/FormComponents/SingleItem/SingleItemView.tsx +3 -15
- package/src/components/FormComponents/SingleItem/SingleNestedItems.tsx +5 -10
- package/src/components/FormComponents/SliderItem/SliderField.tsx +5 -5
- package/src/components/FormComponents/SliderItem/SliderItem.tsx +1 -0
- package/src/components/FormComponents/StringItem/StringField.tsx +7 -10
- package/src/components/FormComponents/StringItem/StringItem.tsx +19 -79
- package/src/components/FormComponents/Tables/GroupTable.tsx +69 -45
- package/src/components/FormComponents/Tables/GroupTableBody.tsx +7 -16
- package/src/components/FormComponents/Tables/GroupTableRow.tsx +7 -17
- package/src/components/FormComponents/Tables/GroupTableRowCells.tsx +5 -12
- package/src/components/FormComponents/Tables/GroupTableView.tsx +9 -13
- package/src/components/FormComponents/Tables/SelectRowButton.tsx +2 -2
- package/src/components/FormComponents/Tables/Table.styles.tsx +13 -8
- package/src/components/FormComponents/TextItem/TextField.tsx +3 -6
- package/src/components/FormComponents/TextItem/TextItem.tsx +11 -50
- package/src/components/FormComponents/Textfield.styles.ts +1 -1
- package/src/components/FormComponents/TimeItem/TimeField.tsx +5 -4
- package/src/components/FormComponents/TimeItem/TimeItem.tsx +6 -2
- package/src/components/FormComponents/UrlItem/UrlField.tsx +6 -9
- package/src/components/FormComponents/UrlItem/UrlItem.tsx +4 -19
- package/src/components/Renderer/BaseRenderer.tsx +18 -26
- package/src/components/Renderer/FormBodyCollapsible.tsx +3 -8
- package/src/components/Renderer/FormBodyPageContainer.tsx +3 -8
- package/src/components/Renderer/FormBodyPaginated.tsx +3 -11
- package/src/components/Renderer/FormBodySingleCollapsibleWrapper.tsx +2 -13
- package/src/components/Renderer/FormBodyTabbed.tsx +5 -10
- package/src/components/Renderer/FormTopLevelItem.tsx +3 -14
- package/src/components/Renderer/SmartFormsRenderer.tsx +4 -2
- package/src/components/Tabs/FormBodySingleTab.tsx +9 -2
- package/src/components/Tabs/FormBodyTabList.tsx +1 -0
- package/src/hooks/index.ts +1 -6
- package/src/hooks/useBuildForm.ts +31 -39
- package/src/hooks/useCalculatedExpressionUpdated.ts +39 -0
- package/src/hooks/useCodingCalculatedExpression.ts +0 -110
- package/src/hooks/useDateCalculatedExpression.ts +0 -90
- package/src/hooks/useDateTimeCalculatedExpression.ts +0 -90
- package/src/hooks/useDisplayCqfAndCalculatedExpression.ts +18 -2
- package/src/hooks/useHidden.ts +2 -2
- package/src/hooks/useInitialiseForm.ts +6 -5
- package/src/hooks/useReadOnly.ts +2 -2
- package/src/hooks/useResizeColumns.ts +53 -0
- package/src/hooks/useValueSetCodings.ts +5 -27
- package/src/index.ts +6 -12
- package/src/interfaces/calculatedExpression.interface.ts +1 -1
- package/src/interfaces/overrideComponent.interface.ts +2 -4
- package/src/interfaces/renderProps.interface.ts +8 -34
- package/src/interfaces/valueSet.interface.ts +2 -2
- package/src/stores/formUpdateQueueStore.ts +13 -29
- package/src/stores/index.ts +3 -3
- package/src/stores/questionnaireResponseStore.ts +28 -37
- package/src/stores/questionnaireStore.ts +230 -199
- package/src/stores/{rendererStylingStore.ts → rendererConfigStore.ts} +8 -8
- package/src/stores/smartConfigStore.ts +3 -3
- package/src/stores/terminologyServerStore.ts +2 -2
- package/src/theme/rendererThemeOptions.ts +1 -1
- package/src/utils/answerOptionsToggleExpressions.ts +12 -9
- package/src/utils/calculatedExpression.ts +466 -97
- package/src/utils/columnWidth.test.ts +75 -0
- package/src/utils/columnWidth.ts +110 -0
- package/src/utils/enableWhenExpression.ts +10 -6
- package/src/utils/extensions.ts +30 -0
- package/src/utils/extractObservation.ts +2 -1
- package/src/utils/fhirpath.ts +140 -115
- package/src/utils/getExpressionsFromItem.ts +33 -2
- package/src/utils/index.ts +2 -0
- package/src/utils/inputSanitization.ts +6 -6
- package/src/utils/manageForm.ts +148 -24
- package/src/utils/parameterisedValueSets.ts +20 -9
- package/src/utils/targetConstraint.ts +12 -9
- package/src/utils/ucumQuantityConversion.ts +195 -0
- package/src/utils/validate.ts +8 -3
- package/src/utils/valueSet.ts +44 -1
- package/src/vite-env.d.ts +2 -1
- package/tsconfig.json +2 -2
- package/vite.config.ts +5 -1
- package/lib/api/callbacks.d.ts +0 -8
- package/lib/api/callbacks.js +0 -52
- package/lib/api/callbacks.js.map +0 -1
- package/lib/api/xFhirQuerySync.d.ts +0 -1
- package/lib/api/xFhirQuerySync.js +0 -61
- package/lib/api/xFhirQuerySync.js.map +0 -1
- package/lib/components/ExpressionUpdateFadingGlow.d.ts +0 -0
- package/lib/components/ExpressionUpdateFadingGlow.js +0 -2
- package/lib/components/ExpressionUpdateFadingGlow.js.map +0 -1
- package/lib/components/FormComponents/ItemParts/ExpressionUpdateFadingGlow.d.ts +0 -0
- package/lib/components/FormComponents/ItemParts/ExpressionUpdateFadingGlow.js +0 -2
- package/lib/components/FormComponents/ItemParts/ExpressionUpdateFadingGlow.js.map +0 -1
- package/lib/components/FormComponents/ItemParts/FadingCheckIcon.d.ts +0 -7
- package/lib/components/FormComponents/ItemParts/FadingCheckIcon.js +0 -26
- package/lib/components/FormComponents/ItemParts/FadingCheckIcon.js.map +0 -1
- package/lib/components/FormComponents/ItemParts/FadingGlowExpressionUpdate.d.ts +0 -0
- package/lib/components/FormComponents/ItemParts/FadingGlowExpressionUpdate.js +0 -2
- package/lib/components/FormComponents/ItemParts/FadingGlowExpressionUpdate.js.map +0 -1
- package/lib/components/FormComponents/ItemParts/GranularRepopulateButton.d.ts +0 -8
- package/lib/components/FormComponents/ItemParts/GranularRepopulateButton.js +0 -130
- package/lib/components/FormComponents/ItemParts/GranularRepopulateButton.js.map +0 -1
- package/lib/components/FormComponents/ItemParts/GranularRepopulateSyncButton.d.ts +0 -8
- package/lib/components/FormComponents/ItemParts/GranularRepopulateSyncButton.js +0 -126
- package/lib/components/FormComponents/ItemParts/GranularRepopulateSyncButton.js.map +0 -1
- package/lib/components/FormComponents/ItemParts/GranularRepopulateSyncButtonStates.d.ts +0 -8
- package/lib/components/FormComponents/ItemParts/GranularRepopulateSyncButtonStates.js +0 -118
- package/lib/components/FormComponents/ItemParts/GranularRepopulateSyncButtonStates.js.map +0 -1
- package/lib/components/FormComponents/ItemParts/ItemLabelText.d.ts +0 -8
- package/lib/components/FormComponents/ItemParts/ItemLabelText.js +0 -63
- package/lib/components/FormComponents/ItemParts/ItemLabelText.js.map +0 -1
- package/lib/components/FormComponents/ItemParts/ItemLabelWrapper.d.ts +0 -8
- package/lib/components/FormComponents/ItemParts/ItemLabelWrapper.js +0 -53
- package/lib/components/FormComponents/ItemParts/ItemLabelWrapper.js.map +0 -1
- package/lib/components/FormComponents/ItemParts/SrOnlyCheckboxLabel.d.ts +0 -0
- package/lib/components/FormComponents/ItemParts/SrOnlyCheckboxLabel.js +0 -2
- package/lib/components/FormComponents/ItemParts/SrOnlyCheckboxLabel.js.map +0 -1
- package/lib/components/FormComponents/ItemParts/TempCalculatedExpressionSyncButton.d.ts +0 -7
- package/lib/components/FormComponents/ItemParts/TempCalculatedExpressionSyncButton.js +0 -95
- package/lib/components/FormComponents/ItemParts/TempCalculatedExpressionSyncButton.js.map +0 -1
- package/lib/components/FormComponents/RepeatGroup/DeleteItemButton.d.ts +0 -10
- package/lib/components/FormComponents/RepeatGroup/DeleteItemButton.js +0 -30
- package/lib/components/FormComponents/RepeatGroup/DeleteItemButton.js.map +0 -1
- package/lib/components/FormComponents/Tables/GroupTableRowCell.d.ts +0 -9
- package/lib/components/FormComponents/Tables/GroupTableRowCell.js +0 -15
- package/lib/components/FormComponents/Tables/GroupTableRowCell.js.map +0 -1
- package/lib/components/Iconify/Iconify.d.ts +0 -10
- package/lib/components/Iconify/Iconify.js +0 -26
- package/lib/components/Iconify/Iconify.js.map +0 -1
- package/lib/components/Renderer/FormBodyPage.d.ts +0 -9
- package/lib/components/Renderer/FormBodyPage.js +0 -43
- package/lib/components/Renderer/FormBodyPage.js.map +0 -1
- package/lib/components/Renderer/FormTitle.d.ts +0 -7
- package/lib/components/Renderer/FormTitle.js +0 -30
- package/lib/components/Renderer/FormTitle.js.map +0 -1
- package/lib/components/Renderer/FormTopLevelPage.d.ts +0 -9
- package/lib/components/Renderer/FormTopLevelPage.js +0 -29
- package/lib/components/Renderer/FormTopLevelPage.js.map +0 -1
- package/lib/hooks/useBooleanCalculatedExpression.d.ts +0 -12
- package/lib/hooks/useBooleanCalculatedExpression.js +0 -53
- package/lib/hooks/useBooleanCalculatedExpression.js.map +0 -1
- package/lib/hooks/useCalculatedExpressionAnimating.d.ts +0 -1
- package/lib/hooks/useCalculatedExpressionAnimating.js +0 -18
- package/lib/hooks/useCalculatedExpressionAnimating.js.map +0 -1
- package/lib/hooks/useCalculatedExpressionAnimation.d.ts +0 -1
- package/lib/hooks/useCalculatedExpressionAnimation.js +0 -18
- package/lib/hooks/useCalculatedExpressionAnimation.js.map +0 -1
- package/lib/hooks/useCqfAnswerValueSet.d.ts +0 -4
- package/lib/hooks/useCqfAnswerValueSet.js +0 -86
- package/lib/hooks/useCqfAnswerValueSet.js.map +0 -1
- package/lib/hooks/useCqfAnswerValueSetEffect.d.ts +0 -3
- package/lib/hooks/useCqfAnswerValueSetEffect.js +0 -111
- package/lib/hooks/useCqfAnswerValueSetEffect.js.map +0 -1
- package/lib/hooks/useDecimalCalculatedExpression.d.ts +0 -13
- package/lib/hooks/useDecimalCalculatedExpression.js +0 -64
- package/lib/hooks/useDecimalCalculatedExpression.js.map +0 -1
- package/lib/hooks/useIntegerCalculatedExpression.d.ts +0 -12
- package/lib/hooks/useIntegerCalculatedExpression.js +0 -61
- package/lib/hooks/useIntegerCalculatedExpression.js.map +0 -1
- package/lib/hooks/useQuantityCalculatedExpression.d.ts +0 -14
- package/lib/hooks/useQuantityCalculatedExpression.js +0 -115
- package/lib/hooks/useQuantityCalculatedExpression.js.map +0 -1
- package/lib/hooks/useShowDateTimeFeedback.d.ts +0 -13
- package/lib/hooks/useShowDateTimeFeedback.js +0 -40
- package/lib/hooks/useShowDateTimeFeedback.js.map +0 -1
- package/lib/hooks/useShowFeedback.d.ts +0 -11
- package/lib/hooks/useShowFeedback.js +0 -33
- package/lib/hooks/useShowFeedback.js.map +0 -1
- package/lib/hooks/useStringCalculatedExpression.d.ts +0 -12
- package/lib/hooks/useStringCalculatedExpression.js +0 -63
- package/lib/hooks/useStringCalculatedExpression.js.map +0 -1
- package/lib/hooks/useTempCalculatedExpressionsSyncButton.d.ts +0 -1
- package/lib/hooks/useTempCalculatedExpressionsSyncButton.js +0 -24
- package/lib/hooks/useTempCalculatedExpressionsSyncButton.js.map +0 -1
- package/lib/interfaces/fhirPathContext.interface.d.ts +0 -0
- package/lib/interfaces/fhirPathContext.interface.js +0 -2
- package/lib/interfaces/fhirPathContext.interface.js.map +0 -1
- package/lib/interfaces/itemDetails.interface.d.ts +0 -2
- package/lib/interfaces/itemDetails.interface.js +0 -2
- package/lib/interfaces/itemDetails.interface.js.map +0 -1
- package/lib/interfaces/itemMetadata.d.ts +0 -0
- package/lib/interfaces/itemMetadata.interface.d.ts +0 -6
- package/lib/interfaces/itemMetadata.interface.js +0 -2
- package/lib/interfaces/itemMetadata.interface.js.map +0 -1
- package/lib/interfaces/itemMetadata.js +0 -2
- package/lib/interfaces/itemMetadata.js.map +0 -1
- package/lib/interfaces/itemPath.d.ts +0 -31
- package/lib/interfaces/itemPath.js +0 -2
- package/lib/interfaces/itemPath.js.map +0 -1
- package/lib/stores/callbackStore.d.ts +0 -0
- package/lib/stores/callbackStore.js +0 -2
- package/lib/stores/callbackStore.js.map +0 -1
- package/lib/stores/extractOperationStore.d.ts +0 -26
- package/lib/stores/extractOperationStore.js +0 -20
- package/lib/stores/extractOperationStore.js.map +0 -1
- package/lib/stores/rendererStylingStore.js +0 -68
- package/lib/stores/rendererStylingStore.js.map +0 -1
- package/lib/stories/storybookWrappers/populateCallbackForStorybook.d.ts +0 -8
- package/lib/stories/storybookWrappers/populateCallbackForStorybook.js +0 -52
- package/lib/stories/storybookWrappers/populateCallbackForStorybook.js.map +0 -1
- package/lib/templates/bloodPressureTemplate.d.ts +0 -23
- package/lib/templates/bloodPressureTemplate.js +0 -80
- package/lib/templates/bloodPressureTemplate.js.map +0 -1
- package/lib/theme/RendererDynamicThemeProvider.d.ts +0 -24
- package/lib/theme/RendererDynamicThemeProvider.js +0 -65
- package/lib/theme/RendererDynamicThemeProvider.js.map +0 -1
- package/lib/theme/RendererThemeToggle.d.ts +0 -6
- package/lib/theme/RendererThemeToggle.js +0 -45
- package/lib/theme/RendererThemeToggle.js.map +0 -1
- package/lib/theme/Theme.d.ts +0 -44
- package/lib/theme/Theme.js +0 -43
- package/lib/theme/Theme.js.map +0 -1
- package/lib/theme/customGlobalStyles.d.ts +0 -1
- package/lib/theme/customGlobalStyles.js +0 -45
- package/lib/theme/customGlobalStyles.js.map +0 -1
- package/lib/theme/overrides/Accordion.d.ts +0 -14
- package/lib/theme/overrides/Accordion.js +0 -32
- package/lib/theme/overrides/Accordion.js.map +0 -1
- package/lib/theme/overrides/Autocomplete.d.ts +0 -10
- package/lib/theme/overrides/Autocomplete.js +0 -28
- package/lib/theme/overrides/Autocomplete.js.map +0 -1
- package/lib/theme/overrides/Button.d.ts +0 -33
- package/lib/theme/overrides/Button.js +0 -52
- package/lib/theme/overrides/Button.js.map +0 -1
- package/lib/theme/overrides/Card.d.ts +0 -35
- package/lib/theme/overrides/Card.js +0 -49
- package/lib/theme/overrides/Card.js.map +0 -1
- package/lib/theme/overrides/Input.d.ts +0 -64
- package/lib/theme/overrides/Input.js +0 -81
- package/lib/theme/overrides/Input.js.map +0 -1
- package/lib/theme/overrides/Overrides.d.ts +0 -3
- package/lib/theme/overrides/Overrides.js +0 -29
- package/lib/theme/overrides/Overrides.js.map +0 -1
- package/lib/theme/overrides/Paper.d.ts +0 -12
- package/lib/theme/overrides/Paper.js +0 -31
- package/lib/theme/overrides/Paper.js.map +0 -1
- package/lib/theme/overrides/SpeedDial.d.ts +0 -16
- package/lib/theme/overrides/SpeedDial.js +0 -34
- package/lib/theme/overrides/SpeedDial.js.map +0 -1
- package/lib/theme/overrides/Table.d.ts +0 -12
- package/lib/theme/overrides/Table.js +0 -30
- package/lib/theme/overrides/Table.js.map +0 -1
- package/lib/theme/overrides/rendererThemeComponentOverride.d.ts +0 -2
- package/lib/theme/overrides/rendererThemeComponentOverride.js +0 -28
- package/lib/theme/overrides/rendererThemeComponentOverride.js.map +0 -1
- package/lib/theme/overrides/rendererThemeComponentsOverride.d.ts +0 -2
- package/lib/theme/overrides/rendererThemeComponentsOverride.js +0 -28
- package/lib/theme/overrides/rendererThemeComponentsOverride.js.map +0 -1
- package/lib/theme/overrides/rendererThemeComponentsOverrides.d.ts +0 -2
- package/lib/theme/overrides/rendererThemeComponentsOverrides.js +0 -28
- package/lib/theme/overrides/rendererThemeComponentsOverrides.js.map +0 -1
- package/lib/theme/palette.d.ts +0 -27
- package/lib/theme/palette.js +0 -63
- package/lib/theme/palette.js.map +0 -1
- package/lib/theme/shadows.d.ts +0 -2
- package/lib/theme/shadows.js +0 -52
- package/lib/theme/shadows.js.map +0 -1
- package/lib/theme/themeOptions.d.ts +0 -2
- package/lib/theme/themeOptions.js +0 -85
- package/lib/theme/themeOptions.js.map +0 -1
- package/lib/theme/useRendererTheme.d.ts +0 -5
- package/lib/theme/useRendererTheme.js +0 -30
- package/lib/theme/useRendererTheme.js.map +0 -1
- package/lib/utils/FhirPathEvaluateParams.d.ts +0 -20
- package/lib/utils/FhirPathEvaluateParams.js +0 -35
- package/lib/utils/FhirPathEvaluateParams.js.map +0 -1
- package/lib/utils/dayjsExtend.d.ts +0 -1
- package/lib/utils/dayjsExtend.js +0 -22
- package/lib/utils/dayjsExtend.js.map +0 -1
- package/lib/utils/dayjsSetup.d.ts +0 -2
- package/lib/utils/dayjsSetup.js +0 -23
- package/lib/utils/dayjsSetup.js.map +0 -1
- package/lib/utils/extractTemplate.d.ts +0 -0
- package/lib/utils/extractTemplate.js +0 -1107
- package/lib/utils/extractTemplate.js.map +0 -1
- package/lib/utils/fhirathEvaluate.d.ts +0 -20
- package/lib/utils/fhirathEvaluate.js +0 -35
- package/lib/utils/fhirathEvaluate.js.map +0 -1
- package/lib/utils/fhirpathEvaluate.d.ts +0 -30
- package/lib/utils/fhirpathEvaluate.js +0 -68
- package/lib/utils/fhirpathEvaluate.js.map +0 -1
- package/lib/utils/find_item_no_text.d.ts +0 -1
- package/lib/utils/find_item_no_text.js +0 -65
- package/lib/utils/find_item_no_text.js.map +0 -1
- package/lib/utils/generateId.d.ts +0 -3
- package/lib/utils/generateId.js +0 -28
- package/lib/utils/generateId.js.map +0 -1
- package/lib/utils/granularRepopulateSync.d.ts +0 -1
- package/lib/utils/granularRepopulateSync.js +0 -70
- package/lib/utils/granularRepopulateSync.js.map +0 -1
- package/lib/utils/itemControl.d.ts +0 -103
- package/lib/utils/itemControl.js +0 -350
- package/lib/utils/itemControl.js.map +0 -1
- package/lib/utils/itemText.d.ts +0 -2
- package/lib/utils/itemText.js +0 -12
- package/lib/utils/itemText.js.map +0 -1
- package/lib/utils/questionnaireStoreUtils/addAdditionalVariables.d.ts +0 -2
- package/lib/utils/questionnaireStoreUtils/addAdditionalVariables.js +0 -43
- package/lib/utils/questionnaireStoreUtils/addAdditionalVariables.js.map +0 -1
- package/lib/utils/questionnaireStoreUtils/createQuestionaireModel.d.ts +0 -3
- package/lib/utils/questionnaireStoreUtils/createQuestionaireModel.js +0 -114
- package/lib/utils/questionnaireStoreUtils/createQuestionaireModel.js.map +0 -1
- package/lib/utils/questionnaireStoreUtils/itemDetails.d.ts +0 -5
- package/lib/utils/questionnaireStoreUtils/itemDetails.js +0 -2
- package/lib/utils/questionnaireStoreUtils/itemDetails.js.map +0 -1
- package/lib/utils/readItem.d.ts +0 -28
- package/lib/utils/readItem.js +0 -67
- package/lib/utils/readItem.js.map +0 -1
- package/lib/utils/syncInitialExpression.d.ts +0 -23
- package/lib/utils/syncInitialExpression.js +0 -407
- package/lib/utils/syncInitialExpression.js.map +0 -1
- package/lib/utils/templateMatching.d.ts +0 -15
- package/lib/utils/templateMatching.js +0 -56
- package/lib/utils/templateMatching.js.map +0 -1
- package/lib/utils/updateCodingsDynamic.d.ts +0 -1
- package/lib/utils/updateCodingsDynamic.js +0 -54
- package/lib/utils/updateCodingsDynamic.js.map +0 -1
- package/lib/utils/validateQuestionnaire.d.ts +0 -66
- package/lib/utils/validateQuestionnaire.js +0 -559
- package/lib/utils/validateQuestionnaire.js.map +0 -1
- package/src/hooks/useBooleanCalculatedExpression.ts +0 -83
- package/src/hooks/useDecimalCalculatedExpression.ts +0 -103
- package/src/hooks/useIntegerCalculatedExpression.ts +0 -93
- package/src/hooks/useQuantityCalculatedExpression.ts +0 -196
- package/src/hooks/useShowFeedback.ts +0 -36
- package/src/hooks/useStringCalculatedExpression.ts +0 -95
- package/src/interfaces/itemPath.interface.ts +0 -33
- package/src/utils/itemPath.ts +0 -79
- package/src/utils/questionnaireStoreUtils/addAdditionalVariables.ts +0 -52
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BooleanField.js","sourceRoot":"","sources":["../../../../src/components/FormComponents/BooleanItem/BooleanField.tsx"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;GAeG;AAEH,OAAO,EAAE,IAAI,EAAE,MAAM,OAAO,CAAC;AAC7B,OAAO,GAAG,MAAM,mBAAmB,CAAC;AACpC,OAAO,UAAU,MAAM,0BAA0B,CAAC;AAClD,OAAO,EAAE,qBAAqB,EAAE,MAAM,iCAAiC,CAAC;AAExE,OAAO,iBAAiB,MAAM,kCAAkC,CAAC;AACjE,OAAO,EAAE,wBAAwB,EAAE,MAAM,gBAAgB,CAAC;AAC1D,OAAO,EAAE,oBAAoB,EAAE,MAAM,uBAAuB,CAAC;AAC7D,OAAO,0BAA0B,MAAM,yCAAyC,CAAC;AACjF,OAAO,gBAAgB,MAAM,gCAAgC,CAAC;AAC9D,OAAO,EAAE,qBAAqB,EAAE,MAAM,gBAAgB,CAAC;AACvD,OAAO,gBAAgB,MAAM,+BAA+B,CAAC;AAC7D,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"BooleanField.js","sourceRoot":"","sources":["../../../../src/components/FormComponents/BooleanItem/BooleanField.tsx"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;GAeG;AAEH,OAAO,EAAE,IAAI,EAAE,MAAM,OAAO,CAAC;AAC7B,OAAO,GAAG,MAAM,mBAAmB,CAAC;AACpC,OAAO,UAAU,MAAM,0BAA0B,CAAC;AAClD,OAAO,EAAE,qBAAqB,EAAE,MAAM,iCAAiC,CAAC;AAExE,OAAO,iBAAiB,MAAM,kCAAkC,CAAC;AACjE,OAAO,EAAE,wBAAwB,EAAE,MAAM,gBAAgB,CAAC;AAC1D,OAAO,EAAE,oBAAoB,EAAE,MAAM,uBAAuB,CAAC;AAC7D,OAAO,0BAA0B,MAAM,yCAAyC,CAAC;AACjF,OAAO,gBAAgB,MAAM,gCAAgC,CAAC;AAC9D,OAAO,EAAE,qBAAqB,EAAE,MAAM,gBAAgB,CAAC;AACvD,OAAO,gBAAgB,MAAM,+BAA+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,EAAE,QAAQ,EAClB,OAAO,EAAE,OAAO,GAChB,IACE,EAEL,QAAQ,CAAC,CAAC,CAAC,KAAC,wBAAwB,cAAE,QAAQ,GAA4B,CAAC,CAAC,CAAC,IAAI,IACjF,CACJ,CAAC;AACJ,CAAC,CAAC,CAAC;AAEH,eAAe,YAAY,CAAC"}
|
|
@@ -1,46 +1,55 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
2
|
+
/*
|
|
3
|
+
* Copyright 2025 Commonwealth Scientific and Industrial Research
|
|
4
|
+
* Organisation (CSIRO) ABN 41 687 119 230.
|
|
5
|
+
*
|
|
6
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
7
|
+
* you may not use this file except in compliance with the License.
|
|
8
|
+
* You may obtain a copy of the License at
|
|
9
|
+
*
|
|
10
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
11
|
+
*
|
|
12
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
13
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
14
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
15
|
+
* See the License for the specific language governing permissions and
|
|
16
|
+
* limitations under the License.
|
|
17
|
+
*/
|
|
6
18
|
import Box from '@mui/material/Box';
|
|
7
19
|
import useReadOnly from '../../../hooks/useReadOnly';
|
|
8
|
-
import { useQuestionnaireStore } from '../../../stores';
|
|
9
|
-
import useBooleanCalculatedExpression from '../../../hooks/useBooleanCalculatedExpression';
|
|
10
20
|
import useValidationFeedback from '../../../hooks/useValidationFeedback';
|
|
21
|
+
import { useQuestionnaireStore } from '../../../stores';
|
|
22
|
+
import { createEmptyQrItem } from '../../../utils/qrItem';
|
|
23
|
+
import { FullWidthFormComponentBox } from '../../Box.styles';
|
|
24
|
+
import ItemFieldGrid from '../ItemParts/ItemFieldGrid';
|
|
11
25
|
import ItemLabel from '../ItemParts/ItemLabel';
|
|
26
|
+
import BooleanField from './BooleanField';
|
|
12
27
|
function BooleanItem(props) {
|
|
13
|
-
|
|
14
|
-
const { qItem, qrItem, itemPath, isRepeated, isTabled, parentIsReadOnly, feedbackFromParent, onQrItemChange } = props;
|
|
28
|
+
const { qItem, qrItem, isRepeated, isTabled, parentIsReadOnly, feedbackFromParent, calcExpUpdated, onQrItemChange } = props;
|
|
15
29
|
const onFocusLinkId = useQuestionnaireStore.use.onFocusLinkId();
|
|
16
30
|
const readOnly = useReadOnly(qItem, parentIsReadOnly);
|
|
17
31
|
// Perform validation checks - there's no string-based input here
|
|
18
32
|
const feedback = useValidationFeedback(qItem, feedbackFromParent);
|
|
19
33
|
// Init input value
|
|
20
|
-
const answerKey =
|
|
34
|
+
const answerKey = qrItem?.answer?.[0]?.id;
|
|
21
35
|
let valueBoolean = undefined;
|
|
22
|
-
if (
|
|
36
|
+
if (qrItem?.answer?.[0]?.valueBoolean !== undefined) {
|
|
23
37
|
valueBoolean = qrItem.answer[0].valueBoolean;
|
|
24
38
|
}
|
|
25
|
-
// Process calculated expressions
|
|
26
|
-
const { calcExpUpdated } = useBooleanCalculatedExpression({
|
|
27
|
-
qItem: qItem,
|
|
28
|
-
booleanValue: valueBoolean,
|
|
29
|
-
onChangeByCalcExpressionBoolean: (newValueBoolean) => {
|
|
30
|
-
onQrItemChange(Object.assign(Object.assign({}, createEmptyQrItem(qItem, answerKey)), { answer: [{ id: answerKey, valueBoolean: newValueBoolean }] }), itemPath);
|
|
31
|
-
},
|
|
32
|
-
onChangeByCalcExpressionNull: () => {
|
|
33
|
-
onQrItemChange(createEmptyQrItem(qItem, answerKey), itemPath);
|
|
34
|
-
}
|
|
35
|
-
});
|
|
36
39
|
// Event handlers
|
|
37
40
|
function handleValueChange(newValue) {
|
|
38
41
|
switch (newValue) {
|
|
39
42
|
case 'true':
|
|
40
|
-
onQrItemChange(
|
|
43
|
+
onQrItemChange({
|
|
44
|
+
...createEmptyQrItem(qItem, answerKey),
|
|
45
|
+
answer: [{ id: answerKey, valueBoolean: true }]
|
|
46
|
+
});
|
|
41
47
|
break;
|
|
42
48
|
case 'false':
|
|
43
|
-
onQrItemChange(
|
|
49
|
+
onQrItemChange({
|
|
50
|
+
...createEmptyQrItem(qItem, answerKey),
|
|
51
|
+
answer: [{ id: answerKey, valueBoolean: false }]
|
|
52
|
+
});
|
|
44
53
|
break;
|
|
45
54
|
default:
|
|
46
55
|
onQrItemChange(createEmptyQrItem(qItem, answerKey));
|
|
@@ -56,7 +65,7 @@ function BooleanItem(props) {
|
|
|
56
65
|
if (isRepeated) {
|
|
57
66
|
return (_jsx(BooleanField, { qItem: qItem, readOnly: readOnly, valueBoolean: valueBoolean, feedback: feedback, calcExpUpdated: calcExpUpdated, onCheckedChange: handleValueChange, onClear: handleClear }));
|
|
58
67
|
}
|
|
59
|
-
return (_jsx(FullWidthFormComponentBox, { "data-test": "q-item-boolean-box", "data-linkid": qItem.linkId, onClick: () => onFocusLinkId(qItem.linkId), children: _jsx(ItemFieldGrid, { qItem: qItem, readOnly: readOnly, labelChildren: _jsx(ItemLabel, { qItem: qItem, readOnly: readOnly }), fieldChildren: _jsx(BooleanField, { qItem: qItem, readOnly: readOnly, valueBoolean: valueBoolean, feedback: feedback, calcExpUpdated: calcExpUpdated, onCheckedChange: handleValueChange, onClear: handleClear }) }) }));
|
|
68
|
+
return (_jsx(FullWidthFormComponentBox, { "data-test": "q-item-boolean-box", "data-linkid": qItem.linkId, "data-label": qItem.text, onClick: () => onFocusLinkId(qItem.linkId), children: _jsx(ItemFieldGrid, { qItem: qItem, readOnly: readOnly, labelChildren: _jsx(ItemLabel, { qItem: qItem, readOnly: readOnly }), fieldChildren: _jsx(BooleanField, { qItem: qItem, readOnly: readOnly, valueBoolean: valueBoolean, feedback: feedback, calcExpUpdated: calcExpUpdated, onCheckedChange: handleValueChange, onClear: handleClear }) }) }));
|
|
60
69
|
}
|
|
61
70
|
export default BooleanItem;
|
|
62
71
|
//# sourceMappingURL=BooleanItem.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BooleanItem.js","sourceRoot":"","sources":["../../../../src/components/FormComponents/BooleanItem/BooleanItem.tsx"],"names":[],"mappings":";
|
|
1
|
+
{"version":3,"file":"BooleanItem.js","sourceRoot":"","sources":["../../../../src/components/FormComponents/BooleanItem/BooleanItem.tsx"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;GAeG;AAEH,OAAO,GAAG,MAAM,mBAAmB,CAAC;AACpC,OAAO,WAAW,MAAM,4BAA4B,CAAC;AACrD,OAAO,qBAAqB,MAAM,sCAAsC,CAAC;AAEzE,OAAO,EAAE,qBAAqB,EAAE,MAAM,iBAAiB,CAAC;AACxD,OAAO,EAAE,iBAAiB,EAAE,MAAM,uBAAuB,CAAC;AAC1D,OAAO,EAAE,yBAAyB,EAAE,MAAM,kBAAkB,CAAC;AAC7D,OAAO,aAAa,MAAM,4BAA4B,CAAC;AACvD,OAAO,SAAS,MAAM,wBAAwB,CAAC;AAC/C,OAAO,YAAY,MAAM,gBAAgB,CAAC;AAE1C,SAAS,WAAW,CAAC,KAAoB;IACvC,MAAM,EACJ,KAAK,EACL,MAAM,EACN,UAAU,EACV,QAAQ,EACR,gBAAgB,EAChB,kBAAkB,EAClB,cAAc,EACd,cAAc,EACf,GAAG,KAAK,CAAC;IAEV,MAAM,aAAa,GAAG,qBAAqB,CAAC,GAAG,CAAC,aAAa,EAAE,CAAC;IAEhE,MAAM,QAAQ,GAAG,WAAW,CAAC,KAAK,EAAE,gBAAgB,CAAC,CAAC;IAEtD,iEAAiE;IACjE,MAAM,QAAQ,GAAG,qBAAqB,CAAC,KAAK,EAAE,kBAAkB,CAAC,CAAC;IAElE,mBAAmB;IACnB,MAAM,SAAS,GAAG,MAAM,EAAE,MAAM,EAAE,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC;IAC1C,IAAI,YAAY,GAAwB,SAAS,CAAC;IAClD,IAAI,MAAM,EAAE,MA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IACX,KAAK,EAAE,KAAK,EACZ,QAAQ,EAAE,QAAQ,EAClB,YAAY,EAAE,YAAY,EAC1B,QAAQ,EAAE,QAAQ,EAClB,cAAc,EAAE,cAAc,EAC9B,eAAe,EAAE,iBAAiB,EAClC,OAAO,EAAE,WAAW,GACpB,CACH,CAAC;IACJ,CAAC;IAED,OAAO,CACL,KAAC,yBAAyB,iBACd,oBAAoB,iBACjB,KAAK,CAAC,MAAM,gBACb,KAAK,CAAC,IAAI,EACtB,OAAO,EAAE,GAAG,EAAE,CAAC,aAAa,CAAC,KAAK,CAAC,MAAM,CAAC,YAC1C,KAAC,aAAa,IACZ,KAAK,EAAE,KAAK,EACZ,QAAQ,EAAE,QAAQ,EAClB,aAAa,EAAE,KAAC,SAAS,IAAC,KAAK,EAAE,KAAK,EAAE,QAAQ,EAAE,QAAQ,GAAI,EAC9D,aAAa,EACX,KAAC,YAAY,IACX,KAAK,EAAE,KAAK,EACZ,QAAQ,EAAE,QAAQ,EAClB,YAAY,EAAE,YAAY,EAC1B,QAAQ,EAAE,QAAQ,EAClB,cAAc,EAAE,cAAc,EAC9B,eAAe,EAAE,iBAAiB,EAClC,OAAO,EAAE,WAAW,GACpB,GAEJ,GACwB,CAC7B,CAAC;AACJ,CAAC;AAED,eAAe,WAAW,CAAC"}
|
|
@@ -4,10 +4,9 @@ import { isOptionDisabled } from '../../../utils/choice';
|
|
|
4
4
|
function CheckboxOptionList(props) {
|
|
5
5
|
const { options, answers, readOnly, fullWidth, answerOptionsToggleExpressionsMap, onCheckedChange } = props;
|
|
6
6
|
return (_jsx(_Fragment, { children: options.map((option) => {
|
|
7
|
-
var _a, _b, _c, _d, _e;
|
|
8
7
|
const optionDisabledViaToggleExpression = isOptionDisabled(option, answerOptionsToggleExpressionsMap);
|
|
9
8
|
if (option['valueCoding']) {
|
|
10
|
-
return (_jsx(CheckboxSingle, { value:
|
|
9
|
+
return (_jsx(CheckboxSingle, { value: option.valueCoding.code ?? option.valueCoding.display ?? '', label: option.valueCoding.display ?? `${option.valueCoding.code}`, readOnly: readOnly, disabledViaToggleExpression: optionDisabledViaToggleExpression, fullWidth: fullWidth, isChecked: answers.some((answer) => JSON.stringify(answer) === JSON.stringify(option)), onCheckedChange: onCheckedChange }, option.valueCoding.code ?? option.valueCoding.display ?? ''));
|
|
11
10
|
}
|
|
12
11
|
if (option['valueString']) {
|
|
13
12
|
return (_jsx(CheckboxSingle, { value: option.valueString, label: option.valueString, readOnly: readOnly, disabledViaToggleExpression: optionDisabledViaToggleExpression, fullWidth: fullWidth, isChecked: answers.some((answer) => answer.valueString === option.valueString), onCheckedChange: onCheckedChange }, option.valueString));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CheckboxOptionList.js","sourceRoot":"","sources":["../../../../src/components/FormComponents/ChoiceItems/CheckboxOptionList.tsx"],"names":[],"mappings":";AAmBA,OAAO,cAAc,MAAM,6BAA6B,CAAC;AACzD,OAAO,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AAWzD,SAAS,kBAAkB,CAAC,KAA8B;IACxD,MAAM,EACJ,OAAO,EACP,OAAO,EACP,QAAQ,EACR,SAAS,EACT,iCAAiC,EACjC,eAAe,EAChB,GAAG,KAAK,CAAC;IAEV,OAAO,CACL,4BACG,OAAO,CAAC,GAAG,CAAC,CAAC,MAAM,EAAE,EAAE
|
|
1
|
+
{"version":3,"file":"CheckboxOptionList.js","sourceRoot":"","sources":["../../../../src/components/FormComponents/ChoiceItems/CheckboxOptionList.tsx"],"names":[],"mappings":";AAmBA,OAAO,cAAc,MAAM,6BAA6B,CAAC;AACzD,OAAO,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AAWzD,SAAS,kBAAkB,CAAC,KAA8B;IACxD,MAAM,EACJ,OAAO,EACP,OAAO,EACP,QAAQ,EACR,SAAS,EACT,iCAAiC,EACjC,eAAe,EAChB,GAAG,KAAK,CAAC;IAEV,OAAO,CACL,4BACG,OAAO,CAAC,GAAG,CAAC,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OAAO,CACL,KAAC,cAAc,IAEb,KAAK,EAAE,MAAM,CAAC,YAAY,CAAC,QAAQ,EAAE,EACrC,KAAK,EAAE,MAAM,CAAC,YAAY,CAAC,QAAQ,EAAE,EACrC,QAAQ,EAAE,QAAQ,EAClB,2BAA2B,EAAE,iCAAiC,EAC9D,SAAS,EAAE,SAAS,EACpB,SAAS,EAAE,OAAO,CAAC,IAAI,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,MAAM,CAAC,YAAY,KAAK,MAAM,CAAC,YAAY,CAAC,EAChF,eAAe,EAAE,eAAe,IAP3B,MAAM,CAAC,YAAY,CAQxB,CACH,CAAC;YACJ,CAAC;YAED,OAAO,IAAI,CAAC;QACd,CAAC,CAAC,GACD,CACJ,CAAC;AACJ,CAAC;AAED,eAAe,kBAAkB,CAAC"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { Coding, QuestionnaireItem } from 'fhir/r4';
|
|
2
|
-
import type {
|
|
2
|
+
import type { PropsWithIsTabledAttribute, PropsWithParentIsReadOnlyAttribute, PropsWithRenderingExtensionsAttribute } from '../../../interfaces/renderProps.interface';
|
|
3
3
|
import type { AlertColor } from '@mui/material/Alert';
|
|
4
|
-
interface ChoiceAutocompleteFieldsProps extends
|
|
4
|
+
interface ChoiceAutocompleteFieldsProps extends PropsWithIsTabledAttribute, PropsWithParentIsReadOnlyAttribute, PropsWithRenderingExtensionsAttribute {
|
|
5
5
|
qItem: QuestionnaireItem;
|
|
6
6
|
options: Coding[];
|
|
7
7
|
valueCoding: Coding | null;
|
|
@@ -10,21 +10,26 @@ import InfoIcon from '@mui/icons-material/Info';
|
|
|
10
10
|
import WarningAmberIcon from '@mui/icons-material/WarningAmber';
|
|
11
11
|
import DoneIcon from '@mui/icons-material/Done';
|
|
12
12
|
import ErrorIcon from '@mui/icons-material/Error';
|
|
13
|
-
import {
|
|
13
|
+
import { useRendererConfigStore } from '../../../stores';
|
|
14
14
|
import DisplayUnitText from '../ItemParts/DisplayUnitText';
|
|
15
15
|
function ChoiceAutocompleteField(props) {
|
|
16
16
|
const { qItem, options, valueCoding, loading, feedback, readOnly, isTabled, renderingExtensions, onInputChange, onValueChange } = props;
|
|
17
|
-
const readOnlyVisualStyle =
|
|
18
|
-
const textFieldWidth =
|
|
17
|
+
const readOnlyVisualStyle = useRendererConfigStore.use.readOnlyVisualStyle();
|
|
18
|
+
const textFieldWidth = useRendererConfigStore.use.textFieldWidth();
|
|
19
19
|
const { displayUnit, displayPrompt, entryFormat } = renderingExtensions;
|
|
20
|
-
return (_jsx(Autocomplete, { id: qItem.type + '-' + qItem.linkId, value: valueCoding
|
|
21
|
-
input:
|
|
20
|
+
return (_jsx(Autocomplete, { id: qItem.type + '-' + qItem.linkId, value: valueCoding ?? null, options: options, getOptionLabel: (option) => option.display ?? `${option.code}`, isOptionEqualToValue: (option, value) => option.id === value.id, disabled: readOnly && readOnlyVisualStyle === 'disabled', readOnly: readOnly && readOnlyVisualStyle === 'readonly', loading: loading, loadingText: 'Fetching results...', clearOnEscape: true, autoHighlight: true, onChange: (_, newValue) => onValueChange(newValue), sx: { maxWidth: !isTabled ? textFieldWidth : 3000, minWidth: 160, flexGrow: 1 }, filterOptions: (x) => x, renderInput: (params) => (_jsx(StandardTextField, { ...params, multiline: true, onChange: (e) => onInputChange(e.target.value), textFieldWidth: textFieldWidth, isTabled: isTabled, size: "small", placeholder: entryFormat || displayPrompt, slotProps: {
|
|
21
|
+
input: {
|
|
22
|
+
...params.InputProps,
|
|
23
|
+
readOnly: readOnly && readOnlyVisualStyle === 'readonly',
|
|
24
|
+
startAdornment: (_jsxs(_Fragment, { children: [!valueCoding ? _jsx(SearchIcon, { fontSize: "small", sx: { ml: 0.5 } }) : null, params.InputProps.startAdornment] })),
|
|
25
|
+
endAdornment: (_jsxs(_Fragment, { children: [loading ? (_jsx(CircularProgress, { color: "inherit", size: 16 })) : feedback ? (_jsx(Fade, { in: !!feedback, timeout: 300, children: _jsx(Tooltip, { title: feedback.message, arrow: true, sx: { ml: 1 }, children: {
|
|
22
26
|
info: _jsx(InfoIcon, { fontSize: "small", color: "info" }),
|
|
23
27
|
warning: _jsx(WarningAmberIcon, { fontSize: "small", color: "warning" }),
|
|
24
28
|
success: _jsx(DoneIcon, { fontSize: "small", color: "success" }),
|
|
25
29
|
error: _jsx(ErrorIcon, { fontSize: "small", color: "error" })
|
|
26
|
-
}[feedback.color] }) })) : null, params.InputProps.endAdornment, _jsx(DisplayUnitText, { readOnly: readOnly, children: displayUnit })] }))
|
|
27
|
-
|
|
30
|
+
}[feedback.color] }) })) : null, params.InputProps.endAdornment, _jsx(DisplayUnitText, { readOnly: readOnly, children: displayUnit })] }))
|
|
31
|
+
}
|
|
32
|
+
} })) }));
|
|
28
33
|
}
|
|
29
34
|
export default ChoiceAutocompleteField;
|
|
30
35
|
//# sourceMappingURL=ChoiceAutocompleteField.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ChoiceAutocompleteField.js","sourceRoot":"","sources":["../../../../src/components/FormComponents/ChoiceItems/ChoiceAutocompleteField.tsx"],"names":[],"mappings":";AAkBA,OAAO,YAAY,MAAM,4BAA4B,CAAC;AACtD,OAAO,gBAAgB,MAAM,gCAAgC,CAAC;AAC9D,OAAO,IAAI,MAAM,oBAAoB,CAAC;AACtC,OAAO,OAAO,MAAM,uBAAuB,CAAC;AAE5C,OAAO,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AACxD,OAAO,UAAU,MAAM,4BAA4B,CAAC;AACpD,OAAO,QAAQ,MAAM,0BAA0B,CAAC;AAChD,+GAA+G;AAC/G,OAAO,gBAAgB,MAAM,kCAAkC,CAAC;AAChE,OAAO,QAAQ,MAAM,0BAA0B,CAAC;AAChD,OAAO,SAAS,MAAM,2BAA2B,CAAC;AAOlD,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"ChoiceAutocompleteField.js","sourceRoot":"","sources":["../../../../src/components/FormComponents/ChoiceItems/ChoiceAutocompleteField.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G,OAAO,CAAC,CAAC,CAAC,CACT,KAAC,gBAAgB,IAAC,KAAK,EAAC,SAAS,EAAC,IAAI,EAAE,EAAE,GAAI,CAC/C,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,CACb,KAAC,IAAI,IAAC,EAAE,EAAE,CAAC,CAAC,QAAQ,EAAE,OAAO,EAAE,GAAG,YAChC,KAAC,OAAO,IAAC,KAAK,EAAE,QAAQ,CAAC,OAAO,EAAE,KAAK,QAAC,EAAE,EAAE,EAAE,EAAE,EAAE,CAAC,EAAE,YAEjD;wCACE,IAAI,EAAE,KAAC,QAAQ,IAAC,QAAQ,EAAC,OAAO,EAAC,KAAK,EAAC,MAAM,GAAG;wCAChD,OAAO,EAAE,KAAC,gBAAgB,IAAC,QAAQ,EAAC,OAAO,EAAC,KAAK,EAAC,SAAS,GAAG;wCAC9D,OAAO,EAAE,KAAC,QAAQ,IAAC,QAAQ,EAAC,OAAO,EAAC,KAAK,EAAC,SAAS,GAAG;wCACtD,KAAK,EAAE,KAAC,SAAS,IAAC,QAAQ,EAAC,OAAO,EAAC,KAAK,EAAC,OAAO,GAAG;qCACpD,CAAC,QAAQ,CAAC,KAAK,CAAC,GAEX,GACL,CACR,CAAC,CAAC,CAAC,IAAI,EACP,MAAM,CAAC,UAAU,CAAC,YAAY,EAC/B,KAAC,eAAe,IAAC,QAAQ,EAAE,QAAQ,YAAG,WAAW,GAAmB,IACnE,CACJ;iBACF;aACF,GACD,CACH,GACD,CACH,CAAC;AACJ,CAAC;AAED,eAAe,uBAAuB,CAAC"}
|
|
@@ -1,8 +1,3 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
|
|
3
|
-
interface ChoiceAutocompleteItemProps extends PropsWithQrItemChangeHandler, PropsWithItemPathAttribute, PropsWithIsRepeatedAttribute, PropsWithIsTabledRequiredAttribute, PropsWithParentIsReadOnlyAttribute, PropsWithRenderingExtensionsAttribute, PropsWithFeedbackFromParentAttribute {
|
|
4
|
-
qItem: QuestionnaireItem;
|
|
5
|
-
qrItem: QuestionnaireResponseItem | null;
|
|
6
|
-
}
|
|
7
|
-
declare function ChoiceAutocompleteItem(props: ChoiceAutocompleteItemProps): import("react/jsx-runtime").JSX.Element | null;
|
|
1
|
+
import type { BaseItemProps } from '../../../interfaces/renderProps.interface';
|
|
2
|
+
declare function ChoiceAutocompleteItem(props: BaseItemProps): import("react/jsx-runtime").JSX.Element | null;
|
|
8
3
|
export default ChoiceAutocompleteItem;
|
|
@@ -1,39 +1,23 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
-
/*
|
|
3
|
-
* Copyright 2025 Commonwealth Scientific and Industrial Research
|
|
4
|
-
* Organisation (CSIRO) ABN 41 687 119 230.
|
|
5
|
-
*
|
|
6
|
-
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
7
|
-
* you may not use this file except in compliance with the License.
|
|
8
|
-
* You may obtain a copy of the License at
|
|
9
|
-
*
|
|
10
|
-
* http://www.apache.org/licenses/LICENSE-2.0
|
|
11
|
-
*
|
|
12
|
-
* Unless required by applicable law or agreed to in writing, software
|
|
13
|
-
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
14
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
15
|
-
* See the License for the specific language governing permissions and
|
|
16
|
-
* limitations under the License.
|
|
17
|
-
*/
|
|
18
2
|
import { useState } from 'react';
|
|
19
|
-
import { createEmptyQrItem } from '../../../utils/qrItem';
|
|
20
|
-
import { FullWidthFormComponentBox } from '../../Box.styles';
|
|
21
3
|
import useDebounce from '../../../hooks/useDebounce';
|
|
4
|
+
import useReadOnly from '../../../hooks/useReadOnly';
|
|
22
5
|
import useTerminologyServerQuery from '../../../hooks/useTerminologyServerQuery';
|
|
6
|
+
import useValidationFeedback from '../../../hooks/useValidationFeedback';
|
|
7
|
+
import { useQuestionnaireStore } from '../../../stores';
|
|
23
8
|
import { AUTOCOMPLETE_DEBOUNCE_DURATION } from '../../../utils/debounce';
|
|
24
|
-
import
|
|
25
|
-
import
|
|
9
|
+
import { createEmptyQrItem } from '../../../utils/qrItem';
|
|
10
|
+
import { FullWidthFormComponentBox } from '../../Box.styles';
|
|
26
11
|
import ItemFieldGrid from '../ItemParts/ItemFieldGrid';
|
|
27
|
-
import { useQuestionnaireStore } from '../../../stores';
|
|
28
|
-
import useValidationFeedback from '../../../hooks/useValidationFeedback';
|
|
29
12
|
import ItemLabel from '../ItemParts/ItemLabel';
|
|
13
|
+
import ChoiceAutocompleteField from './ChoiceAutocompleteField';
|
|
30
14
|
function ChoiceAutocompleteItem(props) {
|
|
31
|
-
var _a, _b;
|
|
32
15
|
const { qItem, qrItem, isRepeated, isTabled, renderingExtensions, parentIsReadOnly, feedbackFromParent, onQrItemChange } = props;
|
|
16
|
+
// TODO no calcExpUpdated
|
|
33
17
|
const onFocusLinkId = useQuestionnaireStore.use.onFocusLinkId();
|
|
34
18
|
// Init input value
|
|
35
|
-
const answerKey =
|
|
36
|
-
const qrChoice = qrItem
|
|
19
|
+
const answerKey = qrItem?.answer?.[0]?.id;
|
|
20
|
+
const qrChoice = qrItem ?? createEmptyQrItem(qItem, answerKey);
|
|
37
21
|
let valueCoding;
|
|
38
22
|
if (qrChoice.answer) {
|
|
39
23
|
valueCoding = qrChoice.answer[0].valueCoding;
|
|
@@ -62,15 +46,20 @@ function ChoiceAutocompleteItem(props) {
|
|
|
62
46
|
function handleValueChange(newValue) {
|
|
63
47
|
if (newValue === null) {
|
|
64
48
|
setInput('');
|
|
49
|
+
// For clearing selection, update immediately
|
|
65
50
|
onQrItemChange(createEmptyQrItem(qItem, answerKey));
|
|
66
51
|
return;
|
|
67
52
|
}
|
|
68
|
-
|
|
53
|
+
// For option selection, update immediately (no debounce)
|
|
54
|
+
onQrItemChange({
|
|
55
|
+
...createEmptyQrItem(qItem, answerKey),
|
|
56
|
+
answer: [{ id: answerKey, valueCoding: newValue }]
|
|
57
|
+
});
|
|
69
58
|
}
|
|
70
59
|
if (isRepeated) {
|
|
71
|
-
return (_jsx(ChoiceAutocompleteField, { qItem: qItem, options: options, valueCoding: valueCoding
|
|
60
|
+
return (_jsx(ChoiceAutocompleteField, { qItem: qItem, options: options, valueCoding: valueCoding ?? null, loading: loading, feedback: feedback, readOnly: readOnly, isTabled: isTabled, renderingExtensions: renderingExtensions, onInputChange: setInput, onValueChange: handleValueChange }));
|
|
72
61
|
}
|
|
73
|
-
return (_jsx(FullWidthFormComponentBox, { "data-test": "q-item-choice-autocomplete-box", "data-linkid": qItem.linkId, onClick: () => onFocusLinkId(qItem.linkId), children: _jsx(ItemFieldGrid, { qItem: qItem, readOnly: readOnly, labelChildren: _jsx(ItemLabel, { qItem: qItem, readOnly: readOnly }), fieldChildren: _jsx(ChoiceAutocompleteField, { qItem: qItem, options: options, valueCoding: valueCoding
|
|
62
|
+
return (_jsx(FullWidthFormComponentBox, { "data-test": "q-item-choice-autocomplete-box", "data-linkid": qItem.linkId, "data-label": qItem.text, onClick: () => onFocusLinkId(qItem.linkId), children: _jsx(ItemFieldGrid, { qItem: qItem, readOnly: readOnly, labelChildren: _jsx(ItemLabel, { qItem: qItem, readOnly: readOnly }), fieldChildren: _jsx(ChoiceAutocompleteField, { qItem: qItem, options: options, valueCoding: valueCoding ?? null, loading: loading, feedback: feedback, readOnly: readOnly, isTabled: isTabled, renderingExtensions: renderingExtensions, onInputChange: setInput, onValueChange: handleValueChange }) }) }));
|
|
74
63
|
}
|
|
75
64
|
export default ChoiceAutocompleteItem;
|
|
76
65
|
//# sourceMappingURL=ChoiceAutocompleteItem.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ChoiceAutocompleteItem.js","sourceRoot":"","sources":["../../../../src/components/FormComponents/ChoiceItems/ChoiceAutocompleteItem.tsx"],"names":[],"mappings":";
|
|
1
|
+
{"version":3,"file":"ChoiceAutocompleteItem.js","sourceRoot":"","sources":["../../../../src/components/FormComponents/ChoiceItems/ChoiceAutocompleteItem.tsx"],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I,UAAU,EAAE,CAAC;QACf,OAAO,CACL,KAAC,uBAAuB,IACtB,KAAK,EAAE,KAAK,EACZ,OAAO,EAAE,OAAO,EAChB,WAAW,EAAE,WAAW,IAAI,IAAI,EAChC,OAAO,EAAE,OAAO,EAChB,QAAQ,EAAE,QAAQ,EAClB,QAAQ,EAAE,QAAQ,EAClB,QAAQ,EAAE,QAAQ,EAClB,mBAAmB,EAAE,mBAAmB,EACxC,aAAa,EAAE,QAAQ,EACvB,aAAa,EAAE,iBAAiB,GAChC,CACH,CAAC;IACJ,CAAC;IAED,OAAO,CACL,KAAC,yBAAyB,iBACd,gCAAgC,iBAC7B,KAAK,CAAC,MAAM,gBACb,KAAK,CAAC,IAAI,EACtB,OAAO,EAAE,GAAG,EAAE,CAAC,aAAa,CAAC,KAAK,CAAC,MAAM,CAAC,YAC1C,KAAC,aAAa,IACZ,KAAK,EAAE,KAAK,EACZ,QAAQ,EAAE,QAAQ,EAClB,aAAa,EAAE,KAAC,SAAS,IAAC,KAAK,EAAE,KAAK,EAAE,QAAQ,EAAE,QAAQ,GAAI,EAC9D,aAAa,EACX,KAAC,uBAAuB,IACtB,KAAK,EAAE,KAAK,EACZ,OAAO,EAAE,OAAO,EAChB,WAAW,EAAE,WAAW,IAAI,IAAI,EAChC,OAAO,EAAE,OAAO,EAChB,QAAQ,EAAE,QAAQ,EAClB,QAAQ,EAAE,QAAQ,EAClB,QAAQ,EAAE,QAAQ,EAClB,mBAAmB,EAAE,mBAAmB,EACxC,aAAa,EAAE,QAAQ,EACvB,aAAa,EAAE,iBAAiB,GAChC,GAEJ,GACwB,CAC7B,CAAC;AACJ,CAAC;AAED,eAAe,sBAAsB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ChoiceCheckboxAnswerOptionFields.js","sourceRoot":"","sources":["../../../../src/components/FormComponents/ChoiceItems/ChoiceCheckboxAnswerOptionFields.tsx"],"names":[],"mappings":";
|
|
1
|
+
{"version":3,"file":"ChoiceCheckboxAnswerOptionFields.js","sourceRoot":"","sources":["../../../../src/components/FormComponents/ChoiceItems/ChoiceCheckboxAnswerOptionFields.tsx"],"names":[],"mappings":";AAsBA,OAAO,iBAAiB,MAAM,gCAAgC,CAAC;AAe/D,SAAS,gCAAgC,CAAC,KAA4C;IACpF,MAAM,EACJ,KAAK,EACL,OAAO,EACP,OAAO,EACP,QAAQ,EACR,QAAQ,EACR,iBAAiB,EACjB,iCAAiC,EACjC,QAAQ,EACR,eAAe,EACf,OAAO,EACR,GAAG,KAAK,CAAC;IAEV,OAAO,CACL,KAAC,iBAAiB,IAChB,KAAK,EAAE,KAAK,EACZ,OAAO,EAAE,OAAO,EAChB,OAAO,EAAE,OAAO,EAChB,QAAQ,EAAE,QAAQ,EAClB,QAAQ,EAAE,QAAQ,EAClB,iBAAiB,EAAE,iBAAiB,EACpC,iCAAiC,EAAE,iCAAiC,EACpE,QAAQ,EAAE,QAAQ,EAClB,eAAe,EAAE,eAAe,EAChC,OAAO,EAAE,OAAO,GAChB,CACH,CAAC;AACJ,CAAC;AAED,eAAe,gCAAgC,CAAC"}
|
|
@@ -1,8 +1,3 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
|
|
3
|
-
interface ChoiceCheckboxAnswerOptionItemProps extends PropsWithQrItemChangeHandler, PropsWithItemPathAttribute, PropsWithIsRepeatedAttribute, PropsWithRenderingExtensionsAttribute, PropsWithParentIsReadOnlyAttribute, PropsWithFeedbackFromParentAttribute, PropsWithIsTabledAttribute {
|
|
4
|
-
qItem: QuestionnaireItem;
|
|
5
|
-
qrItem: QuestionnaireResponseItem | null;
|
|
6
|
-
}
|
|
7
|
-
declare function ChoiceCheckboxAnswerOptionItem(props: ChoiceCheckboxAnswerOptionItemProps): import("react/jsx-runtime").JSX.Element;
|
|
1
|
+
import type { BaseItemProps } from '../../../interfaces/renderProps.interface';
|
|
2
|
+
declare function ChoiceCheckboxAnswerOptionItem(props: BaseItemProps): import("react/jsx-runtime").JSX.Element;
|
|
8
3
|
export default ChoiceCheckboxAnswerOptionItem;
|
|
@@ -1,23 +1,38 @@
|
|
|
1
1
|
import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
|
|
2
|
+
/*
|
|
3
|
+
* Copyright 2025 Commonwealth Scientific and Industrial Research
|
|
4
|
+
* Organisation (CSIRO) ABN 41 687 119 230.
|
|
5
|
+
*
|
|
6
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
7
|
+
* you may not use this file except in compliance with the License.
|
|
8
|
+
* You may obtain a copy of the License at
|
|
9
|
+
*
|
|
10
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
11
|
+
*
|
|
12
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
13
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
14
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
15
|
+
* See the License for the specific language governing permissions and
|
|
16
|
+
* limitations under the License.
|
|
17
|
+
*/
|
|
18
|
+
import useAnswerOptionsToggleExpressions from '../../../hooks/useAnswerOptionsToggleExpressions';
|
|
19
|
+
import useReadOnly from '../../../hooks/useReadOnly';
|
|
20
|
+
import useValidationFeedback from '../../../hooks/useValidationFeedback';
|
|
21
|
+
import { useQuestionnaireStore } from '../../../stores';
|
|
3
22
|
import { updateChoiceCheckboxAnswers } from '../../../utils/choice';
|
|
23
|
+
import { createEmptyQrItem } from '../../../utils/qrItem';
|
|
4
24
|
import { FullWidthFormComponentBox } from '../../Box.styles';
|
|
5
25
|
import DisplayInstructions from '../DisplayItem/DisplayInstructions';
|
|
6
|
-
import useReadOnly from '../../../hooks/useReadOnly';
|
|
7
26
|
import ItemFieldGrid from '../ItemParts/ItemFieldGrid';
|
|
8
|
-
import { useQuestionnaireStore } from '../../../stores';
|
|
9
|
-
import ChoiceCheckboxAnswerOptionFields from './ChoiceCheckboxAnswerOptionFields';
|
|
10
|
-
import useValidationFeedback from '../../../hooks/useValidationFeedback';
|
|
11
27
|
import ItemLabel from '../ItemParts/ItemLabel';
|
|
12
|
-
import
|
|
28
|
+
import ChoiceCheckboxAnswerOptionFields from './ChoiceCheckboxAnswerOptionFields';
|
|
13
29
|
function ChoiceCheckboxAnswerOptionItem(props) {
|
|
14
|
-
|
|
15
|
-
const { qItem, qrItem, isRepeated, isTabled, renderingExtensions, parentIsReadOnly, feedbackFromParent, onQrItemChange } = props;
|
|
30
|
+
const { qItem, qrItem, isRepeated, isTabled, renderingExtensions, parentIsReadOnly, feedbackFromParent, calcExpUpdated, onQrItemChange } = props;
|
|
16
31
|
const onFocusLinkId = useQuestionnaireStore.use.onFocusLinkId();
|
|
17
32
|
// Init input value
|
|
18
|
-
const answerKey =
|
|
19
|
-
const qrChoiceCheckbox = qrItem
|
|
20
|
-
const answers =
|
|
33
|
+
const answerKey = qrItem?.answer?.[0]?.id;
|
|
34
|
+
const qrChoiceCheckbox = qrItem ?? createEmptyQrItem(qItem, answerKey);
|
|
35
|
+
const answers = qrChoiceCheckbox.answer ?? [];
|
|
21
36
|
const { displayInstructions } = renderingExtensions;
|
|
22
37
|
// TODO Process calculated expressions
|
|
23
38
|
// This requires its own hook, because in the case of multi-select, we need to check if the value is already checked to prevent an infinite loop
|
|
@@ -27,7 +42,7 @@ function ChoiceCheckboxAnswerOptionItem(props) {
|
|
|
27
42
|
const readOnly = useReadOnly(qItem, parentIsReadOnly);
|
|
28
43
|
// Perform validation checks
|
|
29
44
|
const feedback = useValidationFeedback(qItem, feedbackFromParent);
|
|
30
|
-
const options =
|
|
45
|
+
const options = qItem.answerOption ?? [];
|
|
31
46
|
// Event handlers
|
|
32
47
|
function handleCheckedChange(changedValue) {
|
|
33
48
|
if (options.length === 0) {
|
|
@@ -43,9 +58,9 @@ function ChoiceCheckboxAnswerOptionItem(props) {
|
|
|
43
58
|
onQrItemChange(createEmptyQrItem(qItem, answerKey));
|
|
44
59
|
}
|
|
45
60
|
if (isTabled) {
|
|
46
|
-
return (_jsxs(_Fragment, { children: [_jsx(ChoiceCheckboxAnswerOptionFields, { qItem: qItem, options: options, answers: answers, feedback: feedback, readOnly: readOnly, expressionUpdated: answerOptionsToggleExpUpdated, answerOptionsToggleExpressionsMap: answerOptionsToggleExpressionsMap, isTabled: isTabled, onCheckedChange: handleCheckedChange, onClear: handleClear }), _jsx(DisplayInstructions, { readOnly: readOnly, children: displayInstructions })] }));
|
|
61
|
+
return (_jsxs(_Fragment, { children: [_jsx(ChoiceCheckboxAnswerOptionFields, { qItem: qItem, options: options, answers: answers, feedback: feedback, readOnly: readOnly, expressionUpdated: calcExpUpdated || answerOptionsToggleExpUpdated, answerOptionsToggleExpressionsMap: answerOptionsToggleExpressionsMap, isTabled: isTabled, onCheckedChange: handleCheckedChange, onClear: handleClear }), _jsx(DisplayInstructions, { readOnly: readOnly, children: displayInstructions })] }));
|
|
47
62
|
}
|
|
48
|
-
return (_jsx(FullWidthFormComponentBox, { "data-test": "q-item-choice-checkbox-answer-option-box", "data-linkid": qItem.linkId, onClick: () => onFocusLinkId(qItem.linkId), children: _jsx(ItemFieldGrid, { qItem: qItem, readOnly: readOnly, labelChildren: _jsx(ItemLabel, { qItem: qItem, readOnly: readOnly }), fieldChildren: _jsx(ChoiceCheckboxAnswerOptionFields, { qItem: qItem, options: options, answers: answers, feedback: feedback, readOnly: readOnly, expressionUpdated: answerOptionsToggleExpUpdated, answerOptionsToggleExpressionsMap: answerOptionsToggleExpressionsMap, isTabled: isTabled, onCheckedChange: handleCheckedChange, onClear: handleClear }) }) }));
|
|
63
|
+
return (_jsx(FullWidthFormComponentBox, { "data-test": "q-item-choice-checkbox-answer-option-box", "data-linkid": qItem.linkId, "data-label": qItem.text, onClick: () => onFocusLinkId(qItem.linkId), children: _jsx(ItemFieldGrid, { qItem: qItem, readOnly: readOnly, labelChildren: _jsx(ItemLabel, { qItem: qItem, readOnly: readOnly }), fieldChildren: _jsx(ChoiceCheckboxAnswerOptionFields, { qItem: qItem, options: options, answers: answers, feedback: feedback, readOnly: readOnly, expressionUpdated: calcExpUpdated || answerOptionsToggleExpUpdated, answerOptionsToggleExpressionsMap: answerOptionsToggleExpressionsMap, isTabled: isTabled, onCheckedChange: handleCheckedChange, onClear: handleClear }) }) }));
|
|
49
64
|
}
|
|
50
65
|
export default ChoiceCheckboxAnswerOptionItem;
|
|
51
66
|
//# sourceMappingURL=ChoiceCheckboxAnswerOptionItem.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ChoiceCheckboxAnswerOptionItem.js","sourceRoot":"","sources":["../../../../src/components/FormComponents/ChoiceItems/ChoiceCheckboxAnswerOptionItem.tsx"],"names":[],"mappings":";
|
|
1
|
+
{"version":3,"file":"ChoiceCheckboxAnswerOptionItem.js","sourceRoot":"","sources":["../../../../src/components/FormComponents/ChoiceItems/ChoiceCheckboxAnswerOptionItem.tsx"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;GAeG;AAEH,OAAO,iCAAiC,MAAM,kDAAkD,CAAC;AACjG,OAAO,WAAW,MAAM,4BAA4B,CAAC;AACrD,OAAO,qBAAqB,MAAM,sCAAsC,CAAC;AAEzE,OAAO,EAAE,qBAAqB,EAAE,MAAM,iBAAiB,CAAC;AACxD,OAAO,EAAE,2BAA2B,EAAE,MAAM,uBAAuB,CAAC;AACpE,OAAO,EAAE,iBAAiB,EAAE,MAAM,uBAAuB,CAAC;AAC1D,OAAO,EAAE,yBAAyB,EAAE,MAAM,kBAAkB,CAAC;AAC7D,OAAO,mBAAmB,MAAM,oCAAoC,CAAC;AACrE,OAAO,aAAa,MAAM,4BAA4B,CAAC;AACvD,OAAO,SAAS,MAAM,wBAAwB,CAAC;AAC/C,OAAO,gCAAgC,MAAM,oCAAoC,CAAC;AAElF,SAAS,8BAA8B,CAAC,KAAoB;IAC1D,MAAM,EACJ,KAAK,EACL,MAAM,EACN,UAAU,EACV,QAAQ,EACR,mBAAmB,EACnB,gBAAgB,EAChB,kBAAkB,EAClB,cAAc,EACd,cAA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sx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
|
|
2
|
+
/*
|
|
3
|
+
* Copyright 2025 Commonwealth Scientific and Industrial Research
|
|
4
|
+
* Organisation (CSIRO) ABN 41 687 119 230.
|
|
5
|
+
*
|
|
6
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
7
|
+
* you may not use this file except in compliance with the License.
|
|
8
|
+
* You may obtain a copy of the License at
|
|
9
|
+
*
|
|
10
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
11
|
+
*
|
|
12
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
13
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
14
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
15
|
+
* See the License for the specific language governing permissions and
|
|
16
|
+
* limitations under the License.
|
|
17
|
+
*/
|
|
3
18
|
import ErrorOutlineIcon from '@mui/icons-material/ErrorOutline';
|
|
4
19
|
import Typography from '@mui/material/Typography';
|
|
20
|
+
import { StyledAlert } from '../../Alert.styles';
|
|
5
21
|
import CheckboxFormGroup from '../ItemParts/CheckboxFormGroup';
|
|
6
22
|
function ChoiceCheckboxAnswerValueSetFields(props) {
|
|
7
23
|
const { qItem, options, answers, feedback, readOnly, expressionUpdated, answerOptionsToggleExpressionsMap, terminologyError, isTabled, onCheckedChange, onClear } = props;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ChoiceCheckboxAnswerValueSetFields.js","sourceRoot":"","sources":["../../../../src/components/FormComponents/ChoiceItems/ChoiceCheckboxAnswerValueSetFields.tsx"],"names":[],"mappings":";
|
|
1
|
+
{"version":3,"file":"ChoiceCheckboxAnswerValueSetFields.js","sourceRoot":"","sources":["../../../../src/components/FormComponents/ChoiceItems/ChoiceCheckboxAnswerValueSetFields.tsx"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;GAeG;AAEH,OAAO,gBAAgB,MAAM,kCAAkC,CAAC;A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AED,OAAO,CACL,MAAC,WAAW,IAAC,KAAK,EAAC,OAAO,aACxB,KAAC,gBAAgB,IAAC,KAAK,EAAC,OAAO,EAAC,EAAE,EAAE,EAAE,EAAE,EAAE,IAAI,EAAE,GAAI,EACpD,KAAC,UAAU,mFAA8E,IAC7E,CACf,CAAC;AACJ,CAAC;AAED,eAAe,kCAAkC,CAAC"}
|
|
@@ -1,9 +1,3 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
|
|
3
|
-
interface ChoiceCheckboxAnswerValueSetItemProps extends PropsWithQrItemChangeHandler, PropsWithItemPathAttribute, PropsWithIsRepeatedAttribute, PropsWithRenderingExtensionsAttribute, PropsWithParentIsReadOnlyAttribute, PropsWithFeedbackFromParentAttribute, PropsWithIsTabledAttribute {
|
|
4
|
-
qItem: QuestionnaireItem;
|
|
5
|
-
qrItem: QuestionnaireResponseItem | null;
|
|
6
|
-
showText?: boolean;
|
|
7
|
-
}
|
|
8
|
-
declare function ChoiceCheckboxAnswerValueSetItem(props: ChoiceCheckboxAnswerValueSetItemProps): import("react/jsx-runtime").JSX.Element;
|
|
1
|
+
import type { BaseItemProps } from '../../../interfaces/renderProps.interface';
|
|
2
|
+
declare function ChoiceCheckboxAnswerValueSetItem(props: BaseItemProps): import("react/jsx-runtime").JSX.Element;
|
|
9
3
|
export default ChoiceCheckboxAnswerValueSetItem;
|
|
@@ -16,26 +16,25 @@ import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-run
|
|
|
16
16
|
* limitations under the License.
|
|
17
17
|
*/
|
|
18
18
|
import { useMemo } from 'react';
|
|
19
|
-
import
|
|
19
|
+
import useAnswerOptionsToggleExpressions from '../../../hooks/useAnswerOptionsToggleExpressions';
|
|
20
|
+
import useReadOnly from '../../../hooks/useReadOnly';
|
|
21
|
+
import useValidationFeedback from '../../../hooks/useValidationFeedback';
|
|
20
22
|
import useValueSetCodings from '../../../hooks/useValueSetCodings';
|
|
23
|
+
import { useQuestionnaireStore } from '../../../stores';
|
|
21
24
|
import { convertCodingsToAnswerOptions, updateChoiceCheckboxAnswers } from '../../../utils/choice';
|
|
25
|
+
import { createEmptyQrItem } from '../../../utils/qrItem';
|
|
22
26
|
import { FullWidthFormComponentBox } from '../../Box.styles';
|
|
23
27
|
import DisplayInstructions from '../DisplayItem/DisplayInstructions';
|
|
24
|
-
import ChoiceCheckboxAnswerValueSetFields from './ChoiceCheckboxAnswerValueSetFields';
|
|
25
|
-
import useReadOnly from '../../../hooks/useReadOnly';
|
|
26
28
|
import ItemFieldGrid from '../ItemParts/ItemFieldGrid';
|
|
27
|
-
import { useQuestionnaireStore } from '../../../stores';
|
|
28
|
-
import useValidationFeedback from '../../../hooks/useValidationFeedback';
|
|
29
29
|
import ItemLabel from '../ItemParts/ItemLabel';
|
|
30
|
-
import
|
|
30
|
+
import ChoiceCheckboxAnswerValueSetFields from './ChoiceCheckboxAnswerValueSetFields';
|
|
31
31
|
function ChoiceCheckboxAnswerValueSetItem(props) {
|
|
32
|
-
|
|
33
|
-
const { qItem, qrItem, isRepeated, renderingExtensions, parentIsReadOnly, feedbackFromParent, isTabled, onQrItemChange } = props;
|
|
32
|
+
const { qItem, qrItem, isRepeated, isTabled, renderingExtensions, parentIsReadOnly, feedbackFromParent, calcExpUpdated, onQrItemChange } = props;
|
|
34
33
|
const onFocusLinkId = useQuestionnaireStore.use.onFocusLinkId();
|
|
35
34
|
// Init input value
|
|
36
|
-
const answerKey =
|
|
37
|
-
const qrChoiceCheckbox = qrItem
|
|
38
|
-
const answers =
|
|
35
|
+
const answerKey = qrItem?.answer?.[0]?.id;
|
|
36
|
+
const qrChoiceCheckbox = qrItem ?? createEmptyQrItem(qItem, answerKey);
|
|
37
|
+
const answers = qrChoiceCheckbox.answer ?? [];
|
|
39
38
|
const { displayInstructions } = renderingExtensions;
|
|
40
39
|
const readOnly = useReadOnly(qItem, parentIsReadOnly);
|
|
41
40
|
// Perform validation checks
|
|
@@ -64,9 +63,9 @@ function ChoiceCheckboxAnswerValueSetItem(props) {
|
|
|
64
63
|
onQrItemChange(createEmptyQrItem(qItem, answerKey));
|
|
65
64
|
}
|
|
66
65
|
if (isTabled) {
|
|
67
|
-
return (_jsxs(_Fragment, { children: [_jsx(ChoiceCheckboxAnswerValueSetFields, { qItem: qItem, options: options, answers: answers, feedback: feedback, readOnly: readOnly, expressionUpdated: answerOptionsToggleExpUpdated, answerOptionsToggleExpressionsMap: answerOptionsToggleExpressionsMap, terminologyError: terminologyError, isTabled: isTabled, onCheckedChange: handleCheckedChange, onClear: handleClear }), _jsx(DisplayInstructions, { readOnly: readOnly, children: displayInstructions })] }));
|
|
66
|
+
return (_jsxs(_Fragment, { children: [_jsx(ChoiceCheckboxAnswerValueSetFields, { qItem: qItem, options: options, answers: answers, feedback: feedback, readOnly: readOnly, expressionUpdated: calcExpUpdated || answerOptionsToggleExpUpdated, answerOptionsToggleExpressionsMap: answerOptionsToggleExpressionsMap, terminologyError: terminologyError, isTabled: isTabled, onCheckedChange: handleCheckedChange, onClear: handleClear }), _jsx(DisplayInstructions, { readOnly: readOnly, children: displayInstructions })] }));
|
|
68
67
|
}
|
|
69
|
-
return (_jsx(FullWidthFormComponentBox, { "data-test": "q-item-choice-checkbox-answer-value-set-box", "data-linkid": qItem.linkId, onClick: () => onFocusLinkId(qItem.linkId), children: _jsx(ItemFieldGrid, { qItem: qItem, readOnly: readOnly, labelChildren: _jsx(ItemLabel, { qItem: qItem, readOnly: readOnly }), fieldChildren: _jsx(ChoiceCheckboxAnswerValueSetFields, { qItem: qItem, options: options, answers: answers, feedback: feedback, readOnly: readOnly, expressionUpdated: answerOptionsToggleExpUpdated, answerOptionsToggleExpressionsMap: answerOptionsToggleExpressionsMap, terminologyError: terminologyError, isTabled: isTabled, onCheckedChange: handleCheckedChange, onClear: handleClear }) }) }));
|
|
68
|
+
return (_jsx(FullWidthFormComponentBox, { "data-test": "q-item-choice-checkbox-answer-value-set-box", "data-linkid": qItem.linkId, "data-label": qItem.text, onClick: () => onFocusLinkId(qItem.linkId), children: _jsx(ItemFieldGrid, { qItem: qItem, readOnly: readOnly, labelChildren: _jsx(ItemLabel, { qItem: qItem, readOnly: readOnly }), fieldChildren: _jsx(ChoiceCheckboxAnswerValueSetFields, { qItem: qItem, options: options, answers: answers, feedback: feedback, readOnly: readOnly, expressionUpdated: calcExpUpdated || answerOptionsToggleExpUpdated, answerOptionsToggleExpressionsMap: answerOptionsToggleExpressionsMap, terminologyError: terminologyError, isTabled: isTabled, onCheckedChange: handleCheckedChange, onClear: handleClear }) }) }));
|
|
70
69
|
}
|
|
71
70
|
export default ChoiceCheckboxAnswerValueSetItem;
|
|
72
71
|
//# 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,
|
|
1
|
+
{"version":3,"file":"ChoiceCheckboxAnswerValueSetItem.js","sourceRoot":"","sources":["../../../../src/components/FormComponents/ChoiceItems/ChoiceCheckboxAnswerValueSetItem.tsx"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;GAeG;AAEH,OAAO,EAAE,OAAO,EAAE,MAAM,OAAO,CAAC;AAChC,OAAO,iCAAiC,MAAM,kDAAkD,CAAC;AACjG,OAAO,WAAW,MAAM,4BAA4B,CAAC;AACrD,OAAO,qBAAqB,MAAM,sCAAsC,CAAC;AACzE,OAAO,kBAAkB,MAAM,mCAAmC,CAAC;AAEnE,OAAO,EAAE,qBAAqB,EAAE,MAAM,iBAAiB,CAAC;AACxD,OAAO,EAAE,6BAA6B,EAAE,2BAA2B,EAAE,MAAM,uBAAuB,CAAC;AACnG,OAAO,EAAE,iBAAiB,EAAE,MAAM,uBAAuB,CAAC;AAC1D,OAAO,EAAE,yBAAyB,EAAE,MAAM,k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,QAAQ,EAAE,QAAQ,EAClB,aAAa,EAAE,KAAC,SAAS,IAAC,KAAK,EAAE,KAAK,EAAE,QAAQ,EAAE,QAAQ,GAAI,EAC9D,aAAa,EACX,KAAC,kCAAkC,IACjC,KAAK,EAAE,KAAK,EACZ,OAAO,EAAE,OAAO,EAChB,OAAO,EAAE,OAAO,EAChB,QAAQ,EAAE,QAAQ,EAClB,QAAQ,EAAE,QAAQ,EAClB,iBAAiB,EAAE,cAAc,IAAI,6BAA6B,EAClE,iCAAiC,EAAE,iCAAiC,EACpE,gBAAgB,EAAE,gBAAgB,EAClC,QAAQ,EAAE,QAAQ,EAClB,eAAe,EAAE,mBAAmB,EACpC,OAAO,EAAE,WAAW,GACpB,GAEJ,GACwB,CAC7B,CAAC;AACJ,CAAC;AAED,eAAe,gCAAgC,CAAC"}
|
|
@@ -1,8 +1,3 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
|
|
3
|
-
interface ChoiceItemSwitcherProps extends PropsWithQrItemChangeHandler, PropsWithItemPathAttribute, PropsWithIsRepeatedAttribute, PropsWithIsTabledRequiredAttribute, PropsWithRenderingExtensionsAttribute, PropsWithParentIsReadOnlyAttribute, PropsWithFeedbackFromParentAttribute, PropsWithParentStylesAttribute {
|
|
4
|
-
qItem: QuestionnaireItem;
|
|
5
|
-
qrItem: QuestionnaireResponseItem | null;
|
|
6
|
-
}
|
|
7
|
-
declare function ChoiceItemSwitcher(props: ChoiceItemSwitcherProps): import("react/jsx-runtime").JSX.Element;
|
|
1
|
+
import type { BaseItemProps } from '../../../interfaces/renderProps.interface';
|
|
2
|
+
declare function ChoiceItemSwitcher(props: BaseItemProps): import("react/jsx-runtime").JSX.Element;
|
|
8
3
|
export default ChoiceItemSwitcher;
|