@aehrc/smart-forms-renderer 1.0.0-alpha.99 → 1.1.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 +4 -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 -31
- 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 -17
- 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 -16
- 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 -21
- 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 -21
- 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 -21
- 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 -20
- 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 -16
- 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 -15
- 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 +52 -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 -16
- 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 +3 -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 -146
- 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 +48 -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 +21 -21
- 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 +6 -6
- package/src/components/FormComponents/ChoiceItems/ChoiceAutocompleteItem.tsx +15 -35
- package/src/components/FormComponents/ChoiceItems/ChoiceCheckboxAnswerOptionFields.tsx +0 -1
- package/src/components/FormComponents/ChoiceItems/ChoiceCheckboxAnswerOptionItem.tsx +12 -36
- package/src/components/FormComponents/ChoiceItems/ChoiceCheckboxAnswerValueSetFields.tsx +3 -4
- package/src/components/FormComponents/ChoiceItems/ChoiceCheckboxAnswerValueSetItem.tsx +14 -38
- 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 +19 -75
- 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 +1 -14
- 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 -44
- package/src/components/FormComponents/OpenChoiceItems/OpenChoiceCheckboxAnswerOptionFields.tsx +1 -2
- package/src/components/FormComponents/OpenChoiceItems/OpenChoiceCheckboxAnswerOptionItem.tsx +19 -41
- package/src/components/FormComponents/OpenChoiceItems/OpenChoiceCheckboxAnswerValueSetFields.tsx +4 -5
- package/src/components/FormComponents/OpenChoiceItems/OpenChoiceCheckboxAnswerValueSetItem.tsx +24 -42
- 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 -37
- 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 -37
- package/src/components/FormComponents/OpenChoiceItems/OpenChoiceSelectAnswerValueSetField.tsx +5 -5
- package/src/components/FormComponents/OpenChoiceItems/OpenChoiceSelectAnswerValueSetItem.tsx +11 -34
- 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 +57 -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 -12
- 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 +3 -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 -206
- 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/misc.ts +0 -2
- package/src/utils/parameterisedValueSets.ts +20 -9
- package/src/utils/questionnaireStoreUtils/createQuestionnaireModel.ts +0 -6
- 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,59 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
* Copyright 2025 Commonwealth Scientific and Industrial Research
|
|
3
|
-
* Organisation (CSIRO) ABN 41 687 119 230.
|
|
4
|
-
*
|
|
5
|
-
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
6
|
-
* you may not use this file except in compliance with the License.
|
|
7
|
-
* You may obtain a copy of the License at
|
|
8
|
-
*
|
|
9
|
-
* http://www.apache.org/licenses/LICENSE-2.0
|
|
10
|
-
*
|
|
11
|
-
* Unless required by applicable law or agreed to in writing, software
|
|
12
|
-
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
13
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
14
|
-
* See the License for the specific language governing permissions and
|
|
15
|
-
* limitations under the License.
|
|
16
|
-
*/
|
|
17
|
-
import { useEffect, useState } from 'react';
|
|
18
|
-
import { useQuestionnaireStore } from '../stores';
|
|
19
|
-
function useDateTimeCalculatedExpression(props) {
|
|
20
|
-
const { qItem, valueDateTimeFhir, onChangeByCalcExpressionString, onChangeByCalcExpressionNull } = props;
|
|
21
|
-
const calculatedExpressions = useQuestionnaireStore.use.calculatedExpressions();
|
|
22
|
-
const [calcExpUpdated, setCalcExpUpdated] = useState(false);
|
|
23
|
-
useEffect(() => {
|
|
24
|
-
var _a;
|
|
25
|
-
const calcExpression = (_a = calculatedExpressions[qItem.linkId]) === null || _a === void 0 ? void 0 : _a.find((exp) => exp.from === 'item');
|
|
26
|
-
if (!calcExpression) {
|
|
27
|
-
return;
|
|
28
|
-
}
|
|
29
|
-
// If both input and calculated value are falsy, there is nothing to update
|
|
30
|
-
const inputAndCalcValueAreBothFalsy = valueDateTimeFhir === '' && !calcExpression.value;
|
|
31
|
-
if (inputAndCalcValueAreBothFalsy) {
|
|
32
|
-
return;
|
|
33
|
-
}
|
|
34
|
-
// only update if calculated value is different from current value
|
|
35
|
-
if (calcExpression.value !== valueDateTimeFhir &&
|
|
36
|
-
(typeof calcExpression.value === 'string' || calcExpression.value === null)) {
|
|
37
|
-
// update ui to show calculated value changes
|
|
38
|
-
setCalcExpUpdated(true);
|
|
39
|
-
const timeoutId = setTimeout(() => {
|
|
40
|
-
setCalcExpUpdated(false);
|
|
41
|
-
}, 500);
|
|
42
|
-
// calculatedExpression value is null
|
|
43
|
-
if (calcExpression.value === null) {
|
|
44
|
-
onChangeByCalcExpressionNull();
|
|
45
|
-
return () => clearTimeout(timeoutId);
|
|
46
|
-
}
|
|
47
|
-
// calculatedExpression value is string
|
|
48
|
-
onChangeByCalcExpressionString(calcExpression.value);
|
|
49
|
-
return () => clearTimeout(timeoutId);
|
|
50
|
-
}
|
|
51
|
-
return undefined;
|
|
52
|
-
},
|
|
53
|
-
// Only trigger this effect if calculatedExpression of item changes
|
|
54
|
-
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
55
|
-
[calculatedExpressions]);
|
|
56
|
-
return { calcExpUpdated };
|
|
57
|
-
}
|
|
58
|
-
export default useDateTimeCalculatedExpression;
|
|
1
|
+
"use strict";
|
|
59
2
|
//# sourceMappingURL=useDateTimeCalculatedExpression.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useDateTimeCalculatedExpression.js","sourceRoot":"","sources":["../../src/hooks/useDateTimeCalculatedExpression.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"useDateTimeCalculatedExpression.js","sourceRoot":"","sources":["../../src/hooks/useDateTimeCalculatedExpression.ts"],"names":[],"mappings":""}
|
|
@@ -1,3 +1,15 @@
|
|
|
1
1
|
import type { QuestionnaireItem } from 'fhir/r4';
|
|
2
|
-
|
|
2
|
+
import type { CalculatedExpression } from '../interfaces';
|
|
3
|
+
/**
|
|
4
|
+
* Returns the value of a cqf-expression, calculatedExpression or ItemTextAriaLabelExpression.
|
|
5
|
+
*
|
|
6
|
+
* - If no expression is found → returns null.
|
|
7
|
+
* - If the value is null → returns an empty string.
|
|
8
|
+
* - If the value is a string or number → returns it as a string.
|
|
9
|
+
*
|
|
10
|
+
* @param {QuestionnaireItem} qItem - The questionnaire item.
|
|
11
|
+
* @param {CalculatedExpression['from']} from - The expression source. Should be a one of 'item._text' or 'item._text.aria-label'
|
|
12
|
+
* @returns {string | null} The display value as a string, empty string, or null.
|
|
13
|
+
*/
|
|
14
|
+
declare function useDisplayCqfAndCalculatedExpression(qItem: QuestionnaireItem, from: CalculatedExpression['from']): string | null;
|
|
3
15
|
export default useDisplayCqfAndCalculatedExpression;
|
|
@@ -15,11 +15,21 @@
|
|
|
15
15
|
* limitations under the License.
|
|
16
16
|
*/
|
|
17
17
|
import { useQuestionnaireStore } from '../stores';
|
|
18
|
-
|
|
19
|
-
|
|
18
|
+
/**
|
|
19
|
+
* Returns the value of a cqf-expression, calculatedExpression or ItemTextAriaLabelExpression.
|
|
20
|
+
*
|
|
21
|
+
* - If no expression is found → returns null.
|
|
22
|
+
* - If the value is null → returns an empty string.
|
|
23
|
+
* - If the value is a string or number → returns it as a string.
|
|
24
|
+
*
|
|
25
|
+
* @param {QuestionnaireItem} qItem - The questionnaire item.
|
|
26
|
+
* @param {CalculatedExpression['from']} from - The expression source. Should be a one of 'item._text' or 'item._text.aria-label'
|
|
27
|
+
* @returns {string | null} The display value as a string, empty string, or null.
|
|
28
|
+
*/
|
|
29
|
+
function useDisplayCqfAndCalculatedExpression(qItem, from) {
|
|
20
30
|
const calculatedExpressions = useQuestionnaireStore.use.calculatedExpressions();
|
|
21
|
-
const cqfOrCalcExpression =
|
|
22
|
-
|
|
31
|
+
const cqfOrCalcExpression = calculatedExpressions?.[qItem.linkId]?.find((exp) => exp && exp.from === from);
|
|
32
|
+
// Add null check for exp
|
|
23
33
|
if (!cqfOrCalcExpression) {
|
|
24
34
|
return null;
|
|
25
35
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useDisplayCqfAndCalculatedExpression.js","sourceRoot":"","sources":["../../src/hooks/useDisplayCqfAndCalculatedExpression.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAEH,OAAO,EAAE,qBAAqB,EAAE,MAAM,WAAW,CAAC;
|
|
1
|
+
{"version":3,"file":"useDisplayCqfAndCalculatedExpression.js","sourceRoot":"","sources":["../../src/hooks/useDisplayCqfAndCalculatedExpression.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAEH,OAAO,EAAE,qBAAqB,EAAE,MAAM,WAAW,CAAC;AAIlD;;;;;;;;;;GAUG;AACH,SAAS,oCAAoC,CAC3C,KAAwB,EACxB,IAAkC;IAElC,MAAM,qBAAqB,GAAG,qBAAqB,CAAC,GAAG,CAAC,qBAAqB,EAAE,CAAC;IAEhF,MAAM,mBAAmB,GAAG,qBAAqB,EAAE,CAAC,KAAK,CAAC,MAAM,CAAC,EAAE,IAAI,CACrE,CAAC,GAAG,EAAE,EAAE,CAAC,GAAG,IAAI,GAAG,CAAC,IAAI,KAAK,IAAI,CAClC,CAAC;IAEF,yBAAyB;IACzB,IAAI,CAAC,mBAAmB,EAAE,CAAC;QACzB,OAAO,IAAI,CAAC;IACd,CAAC;IAED,IACE,OAAO,mBAAmB,CAAC,KAAK,KAAK,QAAQ;QAC7C,OAAO,mBAAmB,CAAC,KAAK,KAAK,QAAQ;QAC7C,mBAAmB,CAAC,KAAK,KAAK,IAAI,EAClC,CAAC;QACD,qCAAqC;QACrC,IAAI,mBAAmB,CAAC,KAAK,KAAK,IAAI,EAAE,CAAC;YACvC,OAAO,EAAE,CAAC;QACZ,CAAC;QAED,iDAAiD;QACjD,OAAO,OAAO,mBAAmB,CAAC,KAAK,KAAK,QAAQ;YAClD,CAAC,CAAC,mBAAmB,CAAC,KAAK;YAC3B,CAAC,CAAC,mBAAmB,CAAC,KAAK,CAAC,QAAQ,EAAE,CAAC;IAC3C,CAAC;IAED,OAAO,IAAI,CAAC;AACd,CAAC;AAED,eAAe,oCAAoC,CAAC"}
|
|
@@ -1,12 +1,3 @@
|
|
|
1
|
-
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
2
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
3
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
4
|
-
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
5
|
-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
6
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
7
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
8
|
-
});
|
|
9
|
-
};
|
|
10
1
|
import { useEffect, useRef } from 'react';
|
|
11
2
|
import { getValueSetCodings, getValueSetPromise } from '../utils/valueSet';
|
|
12
3
|
import { addDisplayToCodingArray } from '../utils/questionnaireStoreUtils/addDisplayToCodings';
|
|
@@ -39,10 +30,10 @@ function useDynamicValueSetEffect(qItem, terminologyServerUrl, processedValueSet
|
|
|
39
30
|
return;
|
|
40
31
|
}
|
|
41
32
|
promise
|
|
42
|
-
.then((valueSet) =>
|
|
33
|
+
.then(async (valueSet) => {
|
|
43
34
|
const newCodings = getValueSetCodings(valueSet);
|
|
44
35
|
try {
|
|
45
|
-
const newCodingsWithDisplay =
|
|
36
|
+
const newCodingsWithDisplay = await addDisplayToCodingArray(newCodings, terminologyServerUrl);
|
|
46
37
|
addCodingToCache(updatableValueSetUrl, newCodingsWithDisplay);
|
|
47
38
|
onSetCodings(newCodingsWithDisplay.length > 0 ? newCodingsWithDisplay : []);
|
|
48
39
|
// Update UI to show calculated value changes
|
|
@@ -53,7 +44,7 @@ function useDynamicValueSetEffect(qItem, terminologyServerUrl, processedValueSet
|
|
|
53
44
|
catch (error) {
|
|
54
45
|
onSetServerError(error);
|
|
55
46
|
}
|
|
56
|
-
})
|
|
47
|
+
})
|
|
57
48
|
.catch((error) => {
|
|
58
49
|
onSetServerError(error);
|
|
59
50
|
});
|
|
@@ -70,14 +61,13 @@ function useDynamicValueSetEffect(qItem, terminologyServerUrl, processedValueSet
|
|
|
70
61
|
}
|
|
71
62
|
// Get updatableValueSetUrl from cqfAnswerValueSetCqfExpression or processedValueSets's updatableValueSetUrl, otherwise return empty string
|
|
72
63
|
export function getUpdatableValueSetUrl(qItem, calculatedExpressions, processedValueSets) {
|
|
73
|
-
|
|
74
|
-
const cqfAnswerValueSetCqfExpression = (_a = calculatedExpressions[qItem.linkId]) === null || _a === void 0 ? void 0 : _a.find((exp) => exp.from === 'item._answerValueSet');
|
|
64
|
+
const cqfAnswerValueSetCqfExpression = calculatedExpressions[qItem.linkId]?.find((exp) => exp.from === 'item._answerValueSet');
|
|
75
65
|
if (cqfAnswerValueSetCqfExpression &&
|
|
76
|
-
typeof
|
|
66
|
+
typeof cqfAnswerValueSetCqfExpression?.value === 'string' &&
|
|
77
67
|
cqfAnswerValueSetCqfExpression.value !== '') {
|
|
78
68
|
return cqfAnswerValueSetCqfExpression.value;
|
|
79
69
|
}
|
|
80
|
-
return
|
|
70
|
+
return processedValueSets[qItem.answerValueSet ?? '']?.updatableValueSetUrl ?? '';
|
|
81
71
|
}
|
|
82
72
|
export default useDynamicValueSetEffect;
|
|
83
73
|
//# sourceMappingURL=useDynamicValueSetEffect.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useDynamicValueSetEffect.js","sourceRoot":"","sources":["../../src/hooks/useDynamicValueSetEffect.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"useDynamicValueSetEffect.js","sourceRoot":"","sources":["../../src/hooks/useDynamicValueSetEffect.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,EAAE,MAAM,OAAO,CAAC;AAC1C,OAAO,EAAE,kBAAkB,EAAE,kBAAkB,EAAE,MAAM,mBAAmB,CAAC;AAE3E,OAAO,EAAE,uBAAuB,EAAE,MAAM,sDAAsD,CAAC;AAE/F,OAAO,EAAE,qBAAqB,EAAE,MAAM,WAAW,CA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B;QAC9B,OAAO,8BAA8B,EAAE,KAAK,KAAK,QAAQ;QACzD,8BAA8B,CAAC,KAAK,KAAK,EAAE,EAC3C,CAAC;QACD,OAAO,8BAA8B,CAAC,KAAK,CAAC;IAC9C,CAAC;IAED,OAAO,kBAAkB,CAAC,KAAK,CAAC,cAAc,IAAI,EAAE,CAAC,EAAE,oBAAoB,IAAI,EAAE,CAAC;AACpF,CAAC;AAED,eAAe,wBAAwB,CAAC"}
|
package/lib/hooks/useHidden.js
CHANGED
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
import { useQuestionnaireStore } from '../stores';
|
|
18
18
|
import { isHiddenByEnableWhen } from '../utils/qItem';
|
|
19
19
|
import { structuredDataCapture } from 'fhir-sdc-helpers';
|
|
20
|
-
import {
|
|
20
|
+
import { useRendererConfigStore } from '../stores/rendererConfigStore';
|
|
21
21
|
/**
|
|
22
22
|
* React hook to determine if a QuestionnaireItem is hidden via item.hidden, enableWhens, enableWhenExpressions.
|
|
23
23
|
* When checking for repeating group enableWhen items, the parentRepeatGroupIndex should be provided.
|
|
@@ -28,7 +28,7 @@ function useHidden(qItem, parentRepeatGroupIndex) {
|
|
|
28
28
|
const enableWhenIsActivated = useQuestionnaireStore.use.enableWhenIsActivated();
|
|
29
29
|
const enableWhenItems = useQuestionnaireStore.use.enableWhenItems();
|
|
30
30
|
const enableWhenExpressions = useQuestionnaireStore.use.enableWhenExpressions();
|
|
31
|
-
const enableWhenAsReadOnly =
|
|
31
|
+
const enableWhenAsReadOnly = useRendererConfigStore.use.enableWhenAsReadOnly();
|
|
32
32
|
if (structuredDataCapture.getHidden(qItem)) {
|
|
33
33
|
return true;
|
|
34
34
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useHidden.js","sourceRoot":"","sources":["../../src/hooks/useHidden.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAGH,OAAO,EAAE,qBAAqB,EAAE,MAAM,WAAW,CAAC;AAClD,OAAO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AAC;AAED,eAAe,SAAS,CAAC"}
|
|
@@ -5,6 +5,9 @@ import type Client from 'fhirclient/lib/Client';
|
|
|
5
5
|
* - Calling the buildForm() function to build a form from a questionnaire, an optional QuestionnaireResponse and other optional properties.
|
|
6
6
|
* - Setting a FHIRClient object to make further FHIR calls i.e. answerExpressions.
|
|
7
7
|
*
|
|
8
|
+
* Deprecated in favour of directly calling {@link buildForm} or using the {@link useBuildForm} hook in your own code.
|
|
9
|
+
* You can still use it, but it might not be compatible with renderer appearance and behaviour customisation via {@link rendererConfigStore}.
|
|
10
|
+
*
|
|
8
11
|
* @param questionnaire - Questionnaire to be rendered
|
|
9
12
|
* @param questionnaireResponse - Pre-populated/draft/loaded QuestionnaireResponse to be rendered (optional)
|
|
10
13
|
* @param readOnly - Applies read-only mode to all items in the form view
|
|
@@ -12,8 +15,6 @@ import type Client from 'fhirclient/lib/Client';
|
|
|
12
15
|
* @param additionalVariables - Additional key-value pair of SDC variables `Record<name, variable extension>` for testing (optional)
|
|
13
16
|
* @param fhirClient - FHIRClient object to perform further FHIR calls. At the moment it's only used in answerExpressions (optional)
|
|
14
17
|
*
|
|
15
|
-
* @see buildForm() for more information.
|
|
16
|
-
*
|
|
17
18
|
* @author Sean Fong
|
|
18
19
|
*/
|
|
19
20
|
declare function useInitialiseForm(questionnaire: Questionnaire, questionnaireResponse?: QuestionnaireResponse, readOnly?: boolean, terminologyServerUrl?: string, additionalVariables?: Record<string, any>, fhirClient?: Client): boolean;
|
|
@@ -23,6 +23,9 @@ import { initialiseFhirClient } from '../utils/manageForm';
|
|
|
23
23
|
* - Calling the buildForm() function to build a form from a questionnaire, an optional QuestionnaireResponse and other optional properties.
|
|
24
24
|
* - Setting a FHIRClient object to make further FHIR calls i.e. answerExpressions.
|
|
25
25
|
*
|
|
26
|
+
* Deprecated in favour of directly calling {@link buildForm} or using the {@link useBuildForm} hook in your own code.
|
|
27
|
+
* You can still use it, but it might not be compatible with renderer appearance and behaviour customisation via {@link rendererConfigStore}.
|
|
28
|
+
*
|
|
26
29
|
* @param questionnaire - Questionnaire to be rendered
|
|
27
30
|
* @param questionnaireResponse - Pre-populated/draft/loaded QuestionnaireResponse to be rendered (optional)
|
|
28
31
|
* @param readOnly - Applies read-only mode to all items in the form view
|
|
@@ -30,8 +33,6 @@ import { initialiseFhirClient } from '../utils/manageForm';
|
|
|
30
33
|
* @param additionalVariables - Additional key-value pair of SDC variables `Record<name, variable extension>` for testing (optional)
|
|
31
34
|
* @param fhirClient - FHIRClient object to perform further FHIR calls. At the moment it's only used in answerExpressions (optional)
|
|
32
35
|
*
|
|
33
|
-
* @see buildForm() for more information.
|
|
34
|
-
*
|
|
35
36
|
* @author Sean Fong
|
|
36
37
|
*/
|
|
37
38
|
function useInitialiseForm(questionnaire, questionnaireResponse, readOnly, terminologyServerUrl, additionalVariables, fhirClient) {
|
|
@@ -51,7 +52,13 @@ function useInitialiseForm(questionnaire, questionnaireResponse, readOnly, termi
|
|
|
51
52
|
}
|
|
52
53
|
// Initialise form including Questionnaire and other optionally provided parameters
|
|
53
54
|
// Includes initialisation for enableWhen, enableWhenExpressions, calculatedExpressions, initialExpressions, answerExpressions, cache answerValueSets
|
|
54
|
-
buildForm(
|
|
55
|
+
buildForm({
|
|
56
|
+
questionnaire,
|
|
57
|
+
questionnaireResponse,
|
|
58
|
+
readOnly,
|
|
59
|
+
terminologyServerUrl,
|
|
60
|
+
additionalContext: additionalVariables
|
|
61
|
+
}).then(() => {
|
|
55
62
|
setIsBuilding(false);
|
|
56
63
|
});
|
|
57
64
|
}, [
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useInitialiseForm.js","sourceRoot":"","sources":["../../src/hooks/useInitialiseForm.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAGH,OAAO,EAAE,eAAe,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAClD,OAAO,EAAE,SAAS,EAAE,MAAM,UAAU,CAAC;AAErC,OAAO,EAAE,mB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AC,CAAC;YAC9B,CAAC,CAAC,CAAC;QACL,CAAC;QAED,mFAAmF;QACnF,qJAAqJ;QACrJ,SAAS,CAAC;YACR,aAAa;YACb,qBAAqB;YACrB,QAAQ;YACR,oBAAoB;YACpB,iBAAiB,EAAE,mBAAmB;SACvC,CAAC,CAAC,IAAI,CAAC,GAAG,EAAE;YACX,aAAa,CAAC,KAAK,CAAC,CAAC;QACvB,CAAC,CAAC,CAAC;IACL,CAAC,EAAE;QACD,aAAa;QACb,qBAAqB;QACrB,mBAAmB;QACnB,oBAAoB;QACpB,UAAU;QACV,QAAQ;QACR,cAAc;QACd,UAAU;QACV,OAAO;QACP,YAAY;KACb,CAAC,CAAC;IAEH,OAAO,iBAAiB,IAAI,UAAU,CAAC;AACzC,CAAC;AAED,eAAe,iBAAiB,CAAC"}
|
|
@@ -18,13 +18,13 @@ import { useMemo } from 'react';
|
|
|
18
18
|
import { generateExistingRepeatId, generateNewRepeatId } from '../utils/repeatId';
|
|
19
19
|
function useInitialiseRepeatAnswers(linkId, qrItem) {
|
|
20
20
|
return useMemo(() => {
|
|
21
|
-
if (!
|
|
21
|
+
if (!qrItem?.answer) {
|
|
22
22
|
return [{ id: generateNewRepeatId(linkId) }];
|
|
23
23
|
}
|
|
24
|
-
return qrItem.answer.map((answer, index) => {
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
});
|
|
24
|
+
return qrItem.answer.map((answer, index) => ({
|
|
25
|
+
...answer,
|
|
26
|
+
id: answer.id ?? generateExistingRepeatId(linkId, index)
|
|
27
|
+
}));
|
|
28
28
|
}, [linkId, qrItem]);
|
|
29
29
|
}
|
|
30
30
|
export default useInitialiseRepeatAnswers;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useInitialiseRepeatAnswers.js","sourceRoot":"","sources":["../../src/hooks/useInitialiseRepeatAnswers.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAGH,OAAO,EAAE,OAAO,EAAE,MAAM,OAAO,CAAC;AAChC,OAAO,EAAE,wBAAwB,EAAE,mBAAmB,EAAE,MAAM,mBAAmB,CAAC;AAElF,SAAS,0BAA0B,CACjC,MAAc,EACd,MAAwC;IAExC,OAAO,OAAO,CAAC,GAAG,EAAE;QAClB,IAAI,CAAC,
|
|
1
|
+
{"version":3,"file":"useInitialiseRepeatAnswers.js","sourceRoot":"","sources":["../../src/hooks/useInitialiseRepeatAnswers.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAGH,OAAO,EAAE,OAAO,EAAE,MAAM,OAAO,CAAC;AAChC,OAAO,EAAE,wBAAwB,EAAE,mBAAmB,EAAE,MAAM,mBAAmB,CAAC;AAElF,SAAS,0BAA0B,CACjC,MAAc,EACd,MAAwC;IAExC,OAAO,OAAO,CAAC,GAAG,EAAE;QAClB,IAAI,CAAC,MAAM,EAAE,MAAM,EAAE,CAAC;YACpB,OAAO,CAAC,EAAE,EAAE,EAAE,mBAAmB,CAAC,MAAM,CAAC,EAAE,CAAC,CAAC;QAC/C,CAAC;QAED,OAAO,MAAM,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,MAAM,EAAE,KAAK,EAAE,EAAE,CAAC,CAAC;YAC3C,GAAG,MAAM;YACT,EAAE,EAAE,MAAM,CAAC,EAAE,IAAI,wBAAwB,CAAC,MAAM,EAAE,KAAK,CAAC;SACzD,CAAC,CAAC,CAAC;IACN,CAAC,EAAE,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,CAAC;AACvB,CAAC;AAED,eAAe,0BAA0B,CAAC"}
|
|
@@ -43,7 +43,7 @@ export function useParseXhtml(qItem) {
|
|
|
43
43
|
classNames.forEach((className) => {
|
|
44
44
|
const classStyles = getStylesFromClass(className);
|
|
45
45
|
if (classStyles) {
|
|
46
|
-
extractedStyles =
|
|
46
|
+
extractedStyles = { ...extractedStyles, ...classStyles };
|
|
47
47
|
}
|
|
48
48
|
});
|
|
49
49
|
}
|
|
@@ -100,7 +100,7 @@ export function useParseXhtml(qItem) {
|
|
|
100
100
|
};
|
|
101
101
|
}
|
|
102
102
|
delete domNode.attribs.onclick;
|
|
103
|
-
return (_jsx("button",
|
|
103
|
+
return (_jsx("button", { ...attributesToProps(domNode.attribs), onClick: clickHandler || (() => console.log('No specific handler defined')), children: domToReact(domNode.children, htmlParseOptions) }));
|
|
104
104
|
}
|
|
105
105
|
}
|
|
106
106
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useParseXhtml.js","sourceRoot":"","sources":["../../src/hooks/useParseXhtml.tsx"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;GAeG;AAEH,OAAc,EAAE,OAAO,EAAE,MAAM,OAAO,CAAC;AACvC,OAAO,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AAGrD,OAAO,EAAE,iBAAiB,EAAE,OAAO,IAAI,SAAS,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAQxF,MAAM,UAAU,aAAa,CAAC,KAAwB;IACpD,OAAO,OAAO,CAAC,GAAG,EAAE;QAClB,IAAI,WAAW,GAAG,cAAc,CAAC,KAAK,CAAC,CAAC;QAExC,IAAI,WAAW,KAAK,IAAI,IAAI,WAAW,KAAK,EAAE,EAAE,CAAC;YAC/C,OAAO,IAAI,CAAC;QACd,CAAC;QAED,6DAA6D;QAC7D,IAAI,CAAC,WAAW,CAAC,QAAQ,CAAC,MAAM,CAAC,IAAI,CAAC,WAAW,CAAC,QAAQ,CAAC,OAAO,CAAC,EAAE,CAAC;YACpE,MAAM,OAAO,GAAG,aAAa,KAAK,CAAC,IAAI,GAAG,CAAC;YAC3C,WAAW,GAAG,WAAW,CAAC,OAAO,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;QACrD,CAAC;QAED,uCAAuC;QACvC,IAAI,eAAmD,CAAC;QAExD,MAAM,gBAAgB,GAAG;YACvB,iEAAiE;YACjE,OAAO,EAAE,CAAC,OAA8E,EAAE,EAAE;gBAC1F,IAAI,CAAC,OAA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
* limitations under the License.
|
|
16
16
|
*/
|
|
17
17
|
import useRenderingExtensions from './useRenderingExtensions';
|
|
18
|
-
import {
|
|
18
|
+
import { useRendererConfigStore } from '../stores/rendererConfigStore';
|
|
19
19
|
import { isHiddenByEnableWhen } from '../utils/qItem';
|
|
20
20
|
import { useQuestionnaireStore } from '../stores';
|
|
21
21
|
function useReadOnly(qItem, parentIsReadOnly, parentRepeatGroupIndex) {
|
|
@@ -23,7 +23,7 @@ function useReadOnly(qItem, parentIsReadOnly, parentRepeatGroupIndex) {
|
|
|
23
23
|
const enableWhenIsActivated = useQuestionnaireStore.use.enableWhenIsActivated();
|
|
24
24
|
const enableWhenItems = useQuestionnaireStore.use.enableWhenItems();
|
|
25
25
|
const enableWhenExpressions = useQuestionnaireStore.use.enableWhenExpressions();
|
|
26
|
-
const enableWhenAsReadOnly =
|
|
26
|
+
const enableWhenAsReadOnly = useRendererConfigStore.use.enableWhenAsReadOnly();
|
|
27
27
|
// If enableWhenAsReadOnly is true, then items hidden by enableWhen should be displayed, but set as readOnly
|
|
28
28
|
// If enableWhenAsReadOnly is a Set, all item types in the set should be displayed, but set as readOnly
|
|
29
29
|
if (!readOnly) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useReadOnly.js","sourceRoot":"","sources":["../../src/hooks/useReadOnly.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAGH,OAAO,sBAAsB,MAAM,0BAA0B,CAAC;AAC9D,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"useReadOnly.js","sourceRoot":"","sources":["../../src/hooks/useReadOnly.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAGH,OAAO,sBAAsB,MAAM,0BAA0B,CAAC;AAC9D,OAAO,EAAE,sBAAsB,EAAE,MAAM,+BAA+B,CAAC;AACvE,OAAO,EAAE,oBAAoB,EAAE,MAAM,gBAAgB,CAAC;AACtD,OAAO,EAAE,qBAAqB,EAAE,MAAM,WAAW,CAAC;AAElD,SAAS,WAAW,CAClB,KAAwB,EACxB,gBAAqC,EACrC,sBAA+B;IAE/B,IAAI,EAAE,QAAQ,EAAE,GAAG,sBAAsB,CAAC,KAAK,CAAC,CAAC;IAEjD,MAAM,qBAAqB,GAAG,qBAAqB,CAAC,GAAG,CAAC,qBAAqB,EAAE,CAAC;IAChF,MAAM,eAAe,GAAG,qBAAqB,CAAC,GAAG,CAAC,eAAe,EAAE,CAAC;IACpE,MAAM,qBAAqB,GAAG,qBAAqB,CAAC,GAAG,CAAC,qBAAqB,EAAE,CAAC;IAEhF,MAAM,oBAAoB,GAAG,sBAAsB,CAAC,GAAG,CAAC,oBAAoB,EAAE,CAAC;IAE/E,4GAA4G;IAC5G,uGAAuG;IACvG,IAAI,CAAC,QAAQ,EAAE,CAAC;QACd,IACE,oBAAoB,KAAK,IAAI;YAC7B,CAAC,oBAAoB,YAAY,GAAG,IAAI,oBAAoB,CAAC,GAAG,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,EAC7E,CAAC;YACD,QAAQ,GAAG,oBAAoB,CAAC;gBAC9B,MAAM,EAAE,KAAK,CAAC,MAAM;gBACpB,qBAAqB;gBACrB,eAAe;gBACf,qBAAqB;gBACrB,sBAAsB;aACvB,CAAC,CAAC;QACL,CAAC;IACH,CAAC;IAED,IAAI,OAAO,gBAAgB,KAAK,SAAS,IAAI,gBAAgB,EAAE,CAAC;QAC9D,QAAQ,GAAG,gBAAgB,CAAC;IAC9B,CAAC;IAED,OAAO,QAAQ,CAAC;AAClB,CAAC;AAED,eAAe,WAAW,CAAC"}
|
|
@@ -18,20 +18,17 @@ import { getQuantityUnit, getTextDisplayFlyover, getTextDisplayInstructions, get
|
|
|
18
18
|
import { structuredDataCapture } from 'fhir-sdc-helpers';
|
|
19
19
|
import { useMemo } from 'react';
|
|
20
20
|
function useRenderingExtensions(qItem) {
|
|
21
|
-
return useMemo(() => {
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
isRepopulatable: isItemRepopulatable(qItem)
|
|
33
|
-
});
|
|
34
|
-
}, [qItem]);
|
|
21
|
+
return useMemo(() => ({
|
|
22
|
+
displayUnit: getTextDisplayUnit(qItem),
|
|
23
|
+
displayPrompt: getTextDisplayPrompt(qItem),
|
|
24
|
+
displayInstructions: getTextDisplayInstructions(qItem),
|
|
25
|
+
displayFlyover: getTextDisplayFlyover(qItem),
|
|
26
|
+
readOnly: !!qItem.readOnly,
|
|
27
|
+
entryFormat: structuredDataCapture.getEntryFormat(qItem) ?? '',
|
|
28
|
+
required: qItem.required ?? false,
|
|
29
|
+
quantityUnit: getQuantityUnit(qItem),
|
|
30
|
+
isRepopulatable: isItemRepopulatable(qItem)
|
|
31
|
+
}), [qItem]);
|
|
35
32
|
}
|
|
36
33
|
export default useRenderingExtensions;
|
|
37
34
|
//# sourceMappingURL=useRenderingExtensions.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useRenderingExtensions.js","sourceRoot":"","sources":["../../src/hooks/useRenderingExtensions.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAEH,OAAO,EACL,eAAe,EACf,qBAAqB,EACrB,0BAA0B,EAC1B,oBAAoB,EACpB,kBAAkB,EAClB,mBAAmB,EACpB,MAAM,qBAAqB,CAAC;AAE7B,OAAO,EAAE,qBAAqB,EAAE,MAAM,kBAAkB,CAAC;AAEzD,OAAO,EAAE,OAAO,EAAE,MAAM,OAAO,CAAC;AAchC,SAAS,sBAAsB,CAAC,KAAwB;IACtD,OAAO,OAAO,CACZ,GAAG,EAAE
|
|
1
|
+
{"version":3,"file":"useRenderingExtensions.js","sourceRoot":"","sources":["../../src/hooks/useRenderingExtensions.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAEH,OAAO,EACL,eAAe,EACf,qBAAqB,EACrB,0BAA0B,EAC1B,oBAAoB,EACpB,kBAAkB,EAClB,mBAAmB,EACpB,MAAM,qBAAqB,CAAC;AAE7B,OAAO,EAAE,qBAAqB,EAAE,MAAM,kBAAkB,CAAC;AAEzD,OAAO,EAAE,OAAO,EAAE,MAAM,OAAO,CAAC;AAchC,SAAS,sBAAsB,CAAC,KAAwB;IACtD,OAAO,OAAO,CACZ,GAAG,EAAE,CAAC,CAAC;QACL,WAAW,EAAE,kBAAkB,CAAC,KAAK,CAAC;QACtC,aAAa,EAAE,oBAAoB,CAAC,KAAK,CAAC;QAC1C,mBAAmB,EAAE,0BAA0B,CAAC,KAAK,CAAC;QACtD,cAAc,EAAE,qBAAqB,CAAC,KAAK,CAAC;QAC5C,QAAQ,EAAE,CAAC,CAAC,KAAK,CAAC,QAAQ;QAC1B,WAAW,EAAE,qBAAqB,CAAC,cAAc,CAAC,KAAK,CAAC,IAAI,EAAE;QAC9D,QAAQ,EAAE,KAAK,CAAC,QAAQ,IAAI,KAAK;QACjC,YAAY,EAAE,eAAe,CAAC,KAAK,CAAC;QACpC,eAAe,EAAE,mBAAmB,CAAC,KAAK,CAAC;KAC5C,CAAC,EACF,CAAC,KAAK,CAAC,CACR,CAAC;AACJ,CAAC;AAED,eAAe,sBAAsB,CAAC"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Hook to observe a container element's width and call a callback whenever it changes.
|
|
3
|
+
*
|
|
4
|
+
* Uses `ResizeObserver` to track changes to the element’s dimensions.
|
|
5
|
+
* Works with libraries like Allotment that resize elements without triggering a window resize event.
|
|
6
|
+
*
|
|
7
|
+
*/
|
|
8
|
+
export declare function useResizeColumns(ref: React.RefObject<HTMLDivElement | null>, onSetTableWidth: (width: number) => void): void;
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright 2025 Commonwealth Scientific and Industrial Research
|
|
3
|
+
* Organisation (CSIRO) ABN 41 687 119 230.
|
|
4
|
+
*
|
|
5
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
6
|
+
* you may not use this file except in compliance with the License.
|
|
7
|
+
* You may obtain a copy of the License at
|
|
8
|
+
*
|
|
9
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
10
|
+
*
|
|
11
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
12
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
13
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
14
|
+
* See the License for the specific language governing permissions and
|
|
15
|
+
* limitations under the License.
|
|
16
|
+
*/
|
|
17
|
+
import { useLayoutEffect } from 'react';
|
|
18
|
+
/**
|
|
19
|
+
* Hook to observe a container element's width and call a callback whenever it changes.
|
|
20
|
+
*
|
|
21
|
+
* Uses `ResizeObserver` to track changes to the element’s dimensions.
|
|
22
|
+
* Works with libraries like Allotment that resize elements without triggering a window resize event.
|
|
23
|
+
*
|
|
24
|
+
*/
|
|
25
|
+
export function useResizeColumns(ref, onSetTableWidth) {
|
|
26
|
+
useLayoutEffect(() => {
|
|
27
|
+
if (!ref.current) {
|
|
28
|
+
return;
|
|
29
|
+
}
|
|
30
|
+
const node = ref.current;
|
|
31
|
+
const observer = new ResizeObserver((entries) => {
|
|
32
|
+
for (const entry of entries) {
|
|
33
|
+
if (entry.contentRect) {
|
|
34
|
+
onSetTableWidth(entry.contentRect.width);
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
});
|
|
38
|
+
observer.observe(node);
|
|
39
|
+
// Set initial width
|
|
40
|
+
onSetTableWidth(node.offsetWidth);
|
|
41
|
+
return () => {
|
|
42
|
+
observer.disconnect();
|
|
43
|
+
};
|
|
44
|
+
}, [onSetTableWidth, ref]);
|
|
45
|
+
}
|
|
46
|
+
//# sourceMappingURL=useResizeColumns.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useResizeColumns.js","sourceRoot":"","sources":["../../src/hooks/useResizeColumns.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAEH,OAAO,EAAE,eAAe,EAAE,MAAM,OAAO,CAAC;AAExC;;;;;;GAMG;AACH,MAAM,UAAU,gBAAgB,CAC9B,GAA2C,EAC3C,eAAwC;IAExC,eAAe,CAAC,GAAG,EAAE;QACnB,IAAI,CAAC,GAAG,CAAC,OAAO,EAAE,CAAC;YACjB,OAAO;QACT,CAAC;QAED,MAAM,IAAI,GAAG,GAAG,CAAC,OAAO,CAAC;QACzB,MAAM,QAAQ,GAAG,IAAI,cAAc,CAAC,CAAC,OAAO,EAAE,EAAE;YAC9C,KAAK,MAAM,KAAK,IAAI,OAAO,EAAE,CAAC;gBAC5B,IAAI,KAAK,CAAC,WAAW,EAAE,CAAC;oBACtB,eAAe,CAAC,KAAK,CAAC,WAAW,CAAC,KAAK,CAAC,CAAC;gBAC3C,CAAC;YACH,CAAC;QACH,CAAC,CAAC,CAAC;QACH,QAAQ,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC;QAEvB,oBAAoB;QACpB,eAAe,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC;QAElC,OAAO,GAAG,EAAE;YACV,QAAQ,CAAC,UAAU,EAAE,CAAC;QACxB,CAAC,CAAC;IACJ,CAAC,EAAE,CAAC,eAAe,EAAE,GAAG,CAAC,CAAC,CAAC;AAC7B,CAAC"}
|
|
@@ -22,15 +22,14 @@ const defaultMaxValue = 100;
|
|
|
22
22
|
const defaultMaxLabel = '100';
|
|
23
23
|
const defaultStepValue = 1;
|
|
24
24
|
function useSliderExtensions(qItem) {
|
|
25
|
-
|
|
26
|
-
const
|
|
27
|
-
const maxValue = (_b = getMaxValue(qItem)) !== null && _b !== void 0 ? _b : defaultMaxValue;
|
|
25
|
+
const minValue = getMinValue(qItem) ?? defaultMinValue;
|
|
26
|
+
const maxValue = getMaxValue(qItem) ?? defaultMaxValue;
|
|
28
27
|
return {
|
|
29
28
|
minValue: minValue,
|
|
30
|
-
minLabel:
|
|
29
|
+
minLabel: getTextDisplayLower(qItem) ?? minValue.toString() ?? defaultMinLabel,
|
|
31
30
|
maxValue: maxValue,
|
|
32
|
-
maxLabel:
|
|
33
|
-
stepValue:
|
|
31
|
+
maxLabel: getTextDisplayUpper(qItem) ?? maxValue.toString() ?? defaultMaxLabel,
|
|
32
|
+
stepValue: getSliderStepValue(qItem) ?? defaultStepValue
|
|
34
33
|
};
|
|
35
34
|
}
|
|
36
35
|
export default useSliderExtensions;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useSliderExtensions.js","sourceRoot":"","sources":["../../src/hooks/useSliderExtensions.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAEH,OAAO,EAAE,mBAAmB,EAAE,mBAAmB,EAAE,MAAM,qBAAqB,CAAC;AAE/E,OAAO,EAAE,WAAW,EAAE,WAAW,EAAE,kBAAkB,EAAE,MAAM,iBAAiB,CAAC;AAE/E,MAAM,eAAe,GAAG,CAAC,CAAC;AAC1B,MAAM,eAAe,GAAG,GAAG,CAAC;AAE5B,MAAM,eAAe,GAAG,GAAG,CAAC;AAC5B,MAAM,eAAe,GAAG,KAAK,CAAC;AAE9B,MAAM,gBAAgB,GAAG,CAAC,CAAC;AAU3B,SAAS,mBAAmB,CAAC,KAAwB
|
|
1
|
+
{"version":3,"file":"useSliderExtensions.js","sourceRoot":"","sources":["../../src/hooks/useSliderExtensions.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAEH,OAAO,EAAE,mBAAmB,EAAE,mBAAmB,EAAE,MAAM,qBAAqB,CAAC;AAE/E,OAAO,EAAE,WAAW,EAAE,WAAW,EAAE,kBAAkB,EAAE,MAAM,iBAAiB,CAAC;AAE/E,MAAM,eAAe,GAAG,CAAC,CAAC;AAC1B,MAAM,eAAe,GAAG,GAAG,CAAC;AAE5B,MAAM,eAAe,GAAG,GAAG,CAAC;AAC5B,MAAM,eAAe,GAAG,KAAK,CAAC;AAE9B,MAAM,gBAAgB,GAAG,CAAC,CAAC;AAU3B,SAAS,mBAAmB,CAAC,KAAwB;IACnD,MAAM,QAAQ,GAAG,WAAW,CAAC,KAAK,CAAC,IAAI,eAAe,CAAC;IACvD,MAAM,QAAQ,GAAG,WAAW,CAAC,KAAK,CAAC,IAAI,eAAe,CAAC;IACvD,OAAO;QACL,QAAQ,EAAE,QAAQ;QAClB,QAAQ,EAAE,mBAAmB,CAAC,KAAK,CAAC,IAAI,QAAQ,CAAC,QAAQ,EAAE,IAAI,eAAe;QAC9E,QAAQ,EAAE,QAAQ;QAClB,QAAQ,EAAE,mBAAmB,CAAC,KAAK,CAAC,IAAI,QAAQ,CAAC,QAAQ,EAAE,IAAI,eAAe;QAC9E,SAAS,EAAE,kBAAkB,CAAC,KAAK,CAAC,IAAI,gBAAgB;KACzD,CAAC;AACJ,CAAC;AAED,eAAe,mBAAmB,CAAC"}
|
|
@@ -19,7 +19,6 @@ import { useQuestionnaireStore, useTerminologyServerStore } from '../stores';
|
|
|
19
19
|
import { useQuery } from '@tanstack/react-query';
|
|
20
20
|
import { getItemTerminologyServerToUse } from '../utils/preferredTerminologyServer';
|
|
21
21
|
function useTerminologyServerQuery(qItem, maxList, input, searchTerm) {
|
|
22
|
-
var _a, _b;
|
|
23
22
|
const processedValueSets = useQuestionnaireStore.use.processedValueSets();
|
|
24
23
|
const itemPreferredTerminologyServers = useQuestionnaireStore.use.itemPreferredTerminologyServers();
|
|
25
24
|
const defaultTerminologyServerUrl = useTerminologyServerStore.use.url();
|
|
@@ -39,7 +38,7 @@ function useTerminologyServerQuery(qItem, maxList, input, searchTerm) {
|
|
|
39
38
|
answerValueSetUrl = answerValueSetUrl.slice(1);
|
|
40
39
|
}
|
|
41
40
|
// attempt to get url from contained value sets when loading questionnaire
|
|
42
|
-
if (
|
|
41
|
+
if (processedValueSets[answerValueSetUrl]?.updatableValueSetUrl) {
|
|
43
42
|
answerValueSetUrl = processedValueSets[answerValueSetUrl].updatableValueSetUrl;
|
|
44
43
|
}
|
|
45
44
|
const urlWithTrailingAmpersand = answerValueSetUrl + (answerValueSetUrl[answerValueSetUrl.length - 1] !== '&' ? '&' : '');
|
|
@@ -60,7 +59,7 @@ function useTerminologyServerQuery(qItem, maxList, input, searchTerm) {
|
|
|
60
59
|
};
|
|
61
60
|
}
|
|
62
61
|
if (data) {
|
|
63
|
-
if (
|
|
62
|
+
if (data.expansion?.total !== 0) {
|
|
64
63
|
options = getValueSetCodings(data);
|
|
65
64
|
}
|
|
66
65
|
else {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useTerminologyServerQuery.js","sourceRoot":"","sources":["../../src/hooks/useTerminologyServerQuery.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAGH,OAAO,EAAE,kBAAkB,EAAE,kBAAkB,EAAE,MAAM,mBAAmB,CAAC;AAG3E,OAAO,EAAE,qBAAqB,EAAE,yBAAyB,EAAE,MAAM,WAAW,CAAC;AAC7E,OAAO,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AACjD,OAAO,EAAE,6BAA6B,EAAE,MAAM,qCAAqC,CAAC;AAEpF,SAAS,yBAAyB,CAChC,KAAwB,EACxB,OAAe,EACf,KAAa,EACb,UAAkB
|
|
1
|
+
{"version":3,"file":"useTerminologyServerQuery.js","sourceRoot":"","sources":["../../src/hooks/useTerminologyServerQuery.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAGH,OAAO,EAAE,kBAAkB,EAAE,kBAAkB,EAAE,MAAM,mBAAmB,CAAC;AAG3E,OAAO,EAAE,qBAAqB,EAAE,yBAAyB,EAAE,MAAM,WAAW,CAAC;AAC7E,OAAO,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AACjD,OAAO,EAAE,6BAA6B,EAAE,MAAM,qCAAqC,CAAC;AAEpF,SAAS,yBAAyB,CAChC,KAAwB,EACxB,OAAe,EACf,KAAa,EACb,UAAkB;IAElB,MA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AAgB;IAChB,MAAM,oBAAoB,GAAG,6BAA6B,CACxD,KAAK,EACL,+BAA+B,EAC/B,2BAA2B,CAC5B,CAAC;IAEF,MAAM,EAAE,UAAU,EAAE,KAAK,EAAE,IAAI,EAAE,GAAG,QAAQ,CAAW;QACrD,QAAQ,EAAE,CAAC,gBAAgB,EAAE,OAAO,CAAC;QACrC,OAAO,EAAE,GAAG,EAAE,CAAC,kBAAkB,CAAC,OAAO,EAAE,oBAAoB,CAAC;QAChE,OAAO,EAAE,UAAU,CAAC,MAAM,IAAI,CAAC,IAAI,iBAAiB,KAAK,SAAS;KACnE,CAAC,CAAC;IAEH,IAAI,KAAK,EAAE,CAAC;QACV,OAAO,CAAC,IAAI,CAAC,4CAA4C,GAAG,KAAK,CAAC,CAAC;QACnE,QAAQ,GAAG;YACT,OAAO,EAAE,2EAA2E;YACpF,KAAK,EAAE,OAAO;SACf,CAAC;IACJ,CAAC;IAED,IAAI,IAAI,EAAE,CAAC;QACT,IAAI,IAAI,CAAC,SAAS,EAAE,KAAK,KAAK,CAAC,EAAE,CAAC;YAChC,OAAO,GAAG,kBAAkB,CAAC,IAAI,CAAC,CAAC;QACrC,CAAC;aAAM,CAAC;YACN,QAAQ,GAAG;gBACT,OAAO,EAAE,wEAAwE;gBACjF,KAAK,EAAE,SAAS;aACjB,CAAC;QACJ,CAAC;IACH,CAAC;IAED,OAAO,EAAE,OAAO,EAAE,OAAO,EAAE,UAAU,EAAE,QAAQ,EAAE,CAAC;AACpD,CAAC;AACD,eAAe,yBAAyB,CAAC"}
|
|
@@ -18,7 +18,6 @@ import { getMaxQuantityValue, getMaxQuantityValueFeedback, getMaxValue, getMaxVa
|
|
|
18
18
|
import { useQuestionnaireResponseStore, useQuestionnaireStore } from '../stores';
|
|
19
19
|
import { structuredDataCapture } from 'fhir-sdc-helpers';
|
|
20
20
|
function useValidationFeedback(qItem, feedbackFromParent) {
|
|
21
|
-
var _a, _b;
|
|
22
21
|
const invalidItems = useQuestionnaireResponseStore.use.invalidItems();
|
|
23
22
|
const requiredItemsIsHighlighted = useQuestionnaireResponseStore.use.requiredItemsIsHighlighted();
|
|
24
23
|
// Target constraint-based validation
|
|
@@ -56,13 +55,13 @@ function useValidationFeedback(qItem, feedbackFromParent) {
|
|
|
56
55
|
const requiredIssue = invalidOperationOutcome.issue.find((issue) => issue.code === 'required');
|
|
57
56
|
if (requiredIssue) {
|
|
58
57
|
const requiredFeedback = getRequiredFeedback(qItem);
|
|
59
|
-
return requiredFeedback
|
|
58
|
+
return requiredFeedback ?? 'This field is required.';
|
|
60
59
|
}
|
|
61
60
|
}
|
|
62
61
|
// Iterate through the issues but we only return the first validation feedback we find.
|
|
63
62
|
// Once that's resolved, the subsequent feedbacks will be returned.
|
|
64
63
|
for (const issue of invalidOperationOutcome.issue) {
|
|
65
|
-
const validationCode =
|
|
64
|
+
const validationCode = issue?.details?.coding?.[0].code;
|
|
66
65
|
// If no validation code is provided, something is wrong with the validation - should never happen
|
|
67
66
|
if (!validationCode) {
|
|
68
67
|
return 'Input is invalid but no specific issues are found. Please report this at https://github.com/aehrc/smart-forms/issues.';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useValidationFeedback.js","sourceRoot":"","sources":["../../src/hooks/useValidationFeedback.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAGH,OAAO,EACL,mBAAmB,EACnB,2BAA2B,EAC3B,WAAW,EACX,mBAAmB,EACnB,mBAAmB,EACnB,2BAA2B,EAC3B,WAAW,EACX,mBAAmB,EACnB,kBAAkB,EAClB,mBAAmB,EACpB,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EAAE,6BAA6B,EAAE,qBAAqB,EAAE,MAAM,WAAW,CAAC;AACjF,OAAO,EAAE,qBAAqB,EAAE,MAAM,kBAAkB,CAAC;AAEzD,SAAS,qBAAqB,CAC5B,KAAwB,EACxB,kBAAsC
|
|
1
|
+
{"version":3,"file":"useValidationFeedback.js","sourceRoot":"","sources":["../../src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