@aehrc/smart-forms-renderer 1.2.9 → 1.2.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/components/FormComponents/AttachmentItem/AttachmentField.js +2 -3
- package/lib/components/FormComponents/AttachmentItem/AttachmentField.js.map +1 -1
- package/lib/components/FormComponents/BooleanItem/BooleanField.d.ts +1 -2
- package/lib/components/FormComponents/BooleanItem/BooleanField.js +4 -6
- package/lib/components/FormComponents/BooleanItem/BooleanField.js.map +1 -1
- package/lib/components/FormComponents/ChoiceItems/ChoiceSelectAnswerOptionFields.js +8 -8
- package/lib/components/FormComponents/ChoiceItems/ChoiceSelectAnswerOptionFields.js.map +1 -1
- package/lib/components/FormComponents/ChoiceItems/ChoiceSelectAnswerValueSetFields.js +11 -11
- package/lib/components/FormComponents/ChoiceItems/ChoiceSelectAnswerValueSetFields.js.map +1 -1
- package/lib/components/FormComponents/DateTimeItems/CustomDateItem/CustomDateField.js +1 -2
- package/lib/components/FormComponents/DateTimeItems/CustomDateItem/CustomDateField.js.map +1 -1
- package/lib/components/FormComponents/DateTimeItems/CustomDateTimeItem/CustomTimeField.js +1 -2
- package/lib/components/FormComponents/DateTimeItems/CustomDateTimeItem/CustomTimeField.js.map +1 -1
- package/lib/components/FormComponents/DecimalItem/DecimalField.js +1 -2
- package/lib/components/FormComponents/DecimalItem/DecimalField.js.map +1 -1
- package/lib/components/FormComponents/IntegerItem/IntegerField.js +1 -2
- package/lib/components/FormComponents/IntegerItem/IntegerField.js.map +1 -1
- package/lib/components/FormComponents/Item.styles.d.ts +1 -1
- package/lib/components/FormComponents/Item.styles.js +1 -1
- package/lib/components/FormComponents/ItemParts/CheckboxFormGroup.js +2 -4
- package/lib/components/FormComponents/ItemParts/CheckboxFormGroup.js.map +1 -1
- package/lib/components/FormComponents/ItemParts/RadioFormGroup.d.ts +1 -1
- package/lib/components/FormComponents/ItemParts/RadioFormGroup.js +3 -5
- package/lib/components/FormComponents/ItemParts/RadioFormGroup.js.map +1 -1
- package/lib/components/FormComponents/OpenChoiceItems/OpenChoiceSelectAnswerOptionField.js +8 -8
- package/lib/components/FormComponents/OpenChoiceItems/OpenChoiceSelectAnswerOptionField.js.map +1 -1
- package/lib/components/FormComponents/OpenChoiceItems/OpenChoiceSelectAnswerValueSetField.js +3 -3
- package/lib/components/FormComponents/OpenChoiceItems/OpenChoiceSelectAnswerValueSetField.js.map +1 -1
- package/lib/components/FormComponents/QuantityItem/QuantityField.js +1 -2
- package/lib/components/FormComponents/QuantityItem/QuantityField.js.map +1 -1
- package/lib/components/FormComponents/SliderItem/SliderField.js +2 -4
- package/lib/components/FormComponents/SliderItem/SliderField.js.map +1 -1
- package/lib/components/FormComponents/StringItem/StringField.js +1 -2
- package/lib/components/FormComponents/StringItem/StringField.js.map +1 -1
- package/lib/components/FormComponents/TextItem/TextField.js +1 -2
- package/lib/components/FormComponents/TextItem/TextField.js.map +1 -1
- package/lib/components/FormComponents/UrlItem/UrlField.js +1 -2
- package/lib/components/FormComponents/UrlItem/UrlField.js.map +1 -1
- package/package.json +1 -1
- package/src/components/FormComponents/AttachmentItem/AttachmentField.tsx +2 -7
- package/src/components/FormComponents/BooleanItem/BooleanField.tsx +3 -12
- package/src/components/FormComponents/ChoiceItems/ChoiceSelectAnswerOptionFields.tsx +3 -2
- package/src/components/FormComponents/ChoiceItems/ChoiceSelectAnswerValueSetFields.tsx +3 -3
- package/src/components/FormComponents/DateTimeItems/CustomDateItem/CustomDateField.tsx +1 -2
- package/src/components/FormComponents/DateTimeItems/CustomDateTimeItem/CustomTimeField.tsx +3 -6
- package/src/components/FormComponents/DecimalItem/DecimalField.tsx +1 -2
- package/src/components/FormComponents/IntegerItem/IntegerField.tsx +1 -2
- package/src/components/FormComponents/Item.styles.ts +1 -1
- package/src/components/FormComponents/ItemParts/CheckboxFormGroup.tsx +2 -10
- package/src/components/FormComponents/ItemParts/RadioFormGroup.tsx +3 -11
- package/src/components/FormComponents/OpenChoiceItems/OpenChoiceSelectAnswerOptionField.tsx +3 -2
- package/src/components/FormComponents/OpenChoiceItems/OpenChoiceSelectAnswerValueSetField.tsx +3 -2
- package/src/components/FormComponents/QuantityItem/QuantityField.tsx +1 -2
- package/src/components/FormComponents/SliderItem/SliderField.tsx +2 -10
- package/src/components/FormComponents/StringItem/StringField.tsx +1 -2
- package/src/components/FormComponents/TextItem/TextField.tsx +1 -2
- package/src/components/FormComponents/UrlItem/UrlField.tsx +1 -2
- package/src/components/FormComponents/ItemParts/AccessibleFeedback.tsx +0 -35
package/lib/components/FormComponents/OpenChoiceItems/OpenChoiceSelectAnswerValueSetField.js
CHANGED
|
@@ -3,20 +3,20 @@ import Autocomplete from '@mui/material/Autocomplete';
|
|
|
3
3
|
import { StandardTextField } from '../Textfield.styles';
|
|
4
4
|
import Typography from '@mui/material/Typography';
|
|
5
5
|
import { useRendererConfigStore } from '../../../stores';
|
|
6
|
+
import { StyledRequiredTypography } from '../Item.styles';
|
|
6
7
|
import DisplayUnitText from '../ItemParts/DisplayUnitText';
|
|
7
|
-
import AccessibleFeedback from '../ItemParts/AccessibleFeedback';
|
|
8
8
|
function OpenChoiceSelectAnswerValueSetField(props) {
|
|
9
9
|
const { qItem, options, valueSelect, terminologyError, feedback, readOnly, isTabled, renderingExtensions, onValueChange } = props;
|
|
10
10
|
const readOnlyVisualStyle = useRendererConfigStore.use.readOnlyVisualStyle();
|
|
11
11
|
const textFieldWidth = useRendererConfigStore.use.textFieldWidth();
|
|
12
12
|
const { displayUnit, displayPrompt, entryFormat } = renderingExtensions;
|
|
13
|
-
return (_jsxs(_Fragment, { children: [_jsx(Autocomplete, { id: qItem.type + '-' + qItem.linkId, value: valueSelect ?? null, options: options, getOptionLabel: (option) => typeof option === 'string' ? option : (option.display ?? `${option.code}`), onChange: (_, newValue, reason) => onValueChange(newValue, reason), onInputChange: (_, newValue, reason) => onValueChange(newValue, reason), freeSolo: true, autoHighlight: true, sx: { maxWidth: !isTabled ? textFieldWidth : 3000, minWidth: 160, flexGrow: 1 }, disabled: readOnly && readOnlyVisualStyle === 'disabled', readOnly: readOnly && readOnlyVisualStyle === 'readonly', size: "small", renderInput: (params) => (_jsx(StandardTextField, { multiline: true, textFieldWidth: textFieldWidth, isTabled: isTabled, placeholder: entryFormat || displayPrompt,
|
|
13
|
+
return (_jsxs(_Fragment, { children: [_jsx(Autocomplete, { id: qItem.type + '-' + qItem.linkId, value: valueSelect ?? null, options: options, getOptionLabel: (option) => typeof option === 'string' ? option : (option.display ?? `${option.code}`), onChange: (_, newValue, reason) => onValueChange(newValue, reason), onInputChange: (_, newValue, reason) => onValueChange(newValue, reason), freeSolo: true, autoHighlight: true, sx: { maxWidth: !isTabled ? textFieldWidth : 3000, minWidth: 160, flexGrow: 1 }, disabled: readOnly && readOnlyVisualStyle === 'disabled', readOnly: readOnly && readOnlyVisualStyle === 'readonly', size: "small", renderInput: (params) => (_jsx(StandardTextField, { multiline: true, textFieldWidth: textFieldWidth, isTabled: isTabled, placeholder: entryFormat || displayPrompt, ...params, slotProps: {
|
|
14
14
|
input: {
|
|
15
15
|
...params.InputProps,
|
|
16
16
|
readOnly: readOnly && readOnlyVisualStyle === 'readonly',
|
|
17
17
|
endAdornment: (_jsxs(_Fragment, { children: [params.InputProps.endAdornment, _jsx(DisplayUnitText, { readOnly: readOnly, children: displayUnit })] }))
|
|
18
18
|
}
|
|
19
|
-
} })) }), terminologyError.error ? (_jsxs(Typography, { children: ["There was an error fetching options from the terminology server for", ' ', terminologyError.answerValueSet] })) : null] }));
|
|
19
|
+
} })) }), terminologyError.error ? (_jsxs(Typography, { children: ["There was an error fetching options from the terminology server for", ' ', terminologyError.answerValueSet] })) : null, feedback ? _jsx(StyledRequiredTypography, { children: feedback }) : null] }));
|
|
20
20
|
}
|
|
21
21
|
export default OpenChoiceSelectAnswerValueSetField;
|
|
22
22
|
//# sourceMappingURL=OpenChoiceSelectAnswerValueSetField.js.map
|
package/lib/components/FormComponents/OpenChoiceItems/OpenChoiceSelectAnswerValueSetField.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"OpenChoiceSelectAnswerValueSetField.js","sourceRoot":"","sources":["../../../../src/components/FormComponents/OpenChoiceItems/OpenChoiceSelectAnswerValueSetField.tsx"],"names":[],"mappings":";AAmBA,OAAO,YAAY,MAAM,4BAA4B,CAAC;AACtD,OAAO,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AACxD,OAAO,UAAU,MAAM,0BAA0B,CAAC;AAQlD,OAAO,EAAE,sBAAsB,EAAE,MAAM,iBAAiB,CAAC;AACzD,OAAO,
|
|
1
|
+
{"version":3,"file":"OpenChoiceSelectAnswerValueSetField.js","sourceRoot":"","sources":["../../../../src/components/FormComponents/OpenChoiceItems/OpenChoiceSelectAnswerValueSetField.tsx"],"names":[],"mappings":";AAmBA,OAAO,YAAY,MAAM,4BAA4B,CAAC;AACtD,OAAO,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AACxD,OAAO,UAAU,MAAM,0BAA0B,CAAC;AAQlD,OAAO,EAAE,sBAAsB,EAAE,MAAM,iBAAiB,CAAC;AACzD,OAAO,EAAE,wBAAwB,EAAE,MAAM,gBAAgB,CAAC;AAC1D,OAAO,eAAe,MAAM,8BAA8B,CAAC;AAkB3D,SAAS,mCAAmC,CAAC,KAA+C;IAC1F,MAAM,EACJ,KAAK,EACL,OAAO,EACP,WAAW,EACX,gBAAgB,EAChB,QAAQ,EACR,QAAQ,EACR,QAAQ,EACR,mBAAmB,EACnB,aAAa,EACd,GAAG,KAAK,CAAC;IAEV,MAAM,mBAAmB,GAAG,sBAAsB,CAAC,GAAG,CAAC,mBAAmB,EAAE,CAAC;IAC7E,MAAM,cAAc,GAAG,sBAAsB,CAAC,GAAG,CAAC,cAAc,EAAE,CAAC;IAEnE,MAAM,EAAE,WAAW,EAAE,aAAa,EAAE,WAAW,EAAE,GAAG,mBAAmB,CAAC;IAExE,OAAO,CACL,8BACE,KAAC,YAA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C,QAAQ,EAAE,QAAQ,YAAG,WAAW,GAAmB,IACnE,CACJ;yBACF;qBACF,GACD,CACH,GACD,EACD,gBAAgB,CAAC,KAAK,CAAC,CAAC,CAAC,CACxB,MAAC,UAAU,sFAC2D,GAAG,EACtE,gBAAgB,CAAC,cAAc,IACrB,CACd,CAAC,CAAC,CAAC,IAAI,EAEP,QAAQ,CAAC,CAAC,CAAC,KAAC,wBAAwB,cAAE,QAAQ,GAA4B,CAAC,CAAC,CAAC,IAAI,IACjF,CACJ,CAAC;AACJ,CAAC;AAED,eAAe,mCAAmC,CAAC"}
|
|
@@ -21,7 +21,6 @@ import DisplayUnitText from '../ItemParts/DisplayUnitText';
|
|
|
21
21
|
import { ClearButtonAdornment } from '../ItemParts/ClearButtonAdornment';
|
|
22
22
|
import ExpressionUpdateFadingIcon from '../ItemParts/ExpressionUpdateFadingIcon';
|
|
23
23
|
import { StandardTextField } from '../Textfield.styles';
|
|
24
|
-
import AccessibleFeedback from '../ItemParts/AccessibleFeedback';
|
|
25
24
|
function QuantityField(props) {
|
|
26
25
|
const { linkId, itemType, itemText, input, feedback, displayPrompt, displayUnit, entryFormat, readOnly, calcExpUpdated, isTabled, onInputChange } = props;
|
|
27
26
|
const readOnlyVisualStyle = useRendererConfigStore.use.readOnlyVisualStyle();
|
|
@@ -48,7 +47,7 @@ function QuantityField(props) {
|
|
|
48
47
|
onInputChange('');
|
|
49
48
|
} }), _jsx(DisplayUnitText, { readOnly: readOnly, children: displayUnit })] }))
|
|
50
49
|
}
|
|
51
|
-
}, helperText:
|
|
50
|
+
}, helperText: feedback, "data-test": "q-item-quantity-field" }));
|
|
52
51
|
}
|
|
53
52
|
export default QuantityField;
|
|
54
53
|
//# sourceMappingURL=QuantityField.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"QuantityField.js","sourceRoot":"","sources":["../../../../src/components/FormComponents/QuantityItem/QuantityField.tsx"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;GAeG;AAEH,OAAO,cAAc,MAAM,8BAA8B,CAAC;AAE1D,OAAO,EAAE,sBAAsB,EAAE,MAAM,iBAAiB,CAAC;AACzD,OAAO,eAAe,MAAM,8BAA8B,CAAC;AAC3D,OAAO,EAAE,oBAAoB,EAAE,MAAM,mCAAmC,CAAC;AACzE,OAAO,0BAA0B,MAAM,yCAAyC,CAAC;AACjF,OAAO,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;
|
|
1
|
+
{"version":3,"file":"QuantityField.js","sourceRoot":"","sources":["../../../../src/components/FormComponents/QuantityItem/QuantityField.tsx"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;GAeG;AAEH,OAAO,cAAc,MAAM,8BAA8B,CAAC;AAE1D,OAAO,EAAE,sBAAsB,EAAE,MAAM,iBAAiB,CAAC;AACzD,OAAO,eAAe,MAAM,8BAA8B,CAAC;AAC3D,OAAO,EAAE,oBAAoB,EAAE,MAAM,mCAAmC,CAAC;AACzE,OAAO,0BAA0B,MAAM,yCAAyC,CAAC;AACjF,OAAO,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AAgBxD,SAAS,aAAa,CAAC,KAAyB;IAC9C,MAAM,EACJ,MAAM,EACN,QAAQ,EACR,QAAQ,EACR,KAAK,EACL,QAAQ,EACR,aAAa,EACb,WAAW,EACX,WAAW,EACX,QAAQ,EACR,cAAc,EACd,QAAQ,EACR,aAAa,EACd,GAAG,KAAK,CAAC;IAEV,MAAM,mBAAmB,GAAG,sBAAsB,CAAC,GAAG,CAAC,mBAAmB,EAAE,CAAC;IAC7E,MAAM,cAAc,GAAG,sBAAsB,CAAC,GAAG,CAAC,cAAc,EAAE,CAAC;IAEnE,IAAI,eAAe,GAAG,KAAK,CAAC;IAC5B,IAAI,aAAa,EAAE,CAAC;QAClB,eAAe,GAAG,aAAa,CAAC;IAClC,CAAC;IAED,IAAI,WAAW,EAAE,CAAC;QAChB,eAAe,GAAG,WAAW,CAAC;IAChC,CAAC;IAED,MAAM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H,CAAC;AACJ,CAAC;AAED,eAAe,aAAa,CAAC"}
|
|
@@ -4,9 +4,8 @@ import Stack from '@mui/material/Stack';
|
|
|
4
4
|
import SliderLabels from './SliderLabels';
|
|
5
5
|
import SliderDisplayValue from './SliderDisplayValue';
|
|
6
6
|
import { useRendererConfigStore } from '../../../stores';
|
|
7
|
-
import {
|
|
7
|
+
import { StyledRequiredTypography } from '../Item.styles';
|
|
8
8
|
import { StandardSlider } from './Slider.styles';
|
|
9
|
-
import AccessibleFeedback from '../ItemParts/AccessibleFeedback';
|
|
10
9
|
function SliderField(props) {
|
|
11
10
|
const { linkId, itemType, value, minValue, maxValue, stepValue, minLabel, maxLabel, isInteracted, feedback, readOnly, isTabled, onValueChange } = props;
|
|
12
11
|
const readOnlyVisualStyle = useRendererConfigStore.use.readOnlyVisualStyle();
|
|
@@ -17,7 +16,6 @@ function SliderField(props) {
|
|
|
17
16
|
minWidth: 160
|
|
18
17
|
};
|
|
19
18
|
const hasLabels = !!(minLabel || maxLabel);
|
|
20
|
-
const feedbackId = itemType + '-' + linkId + '-feedback';
|
|
21
19
|
return (_jsxs(_Fragment, { children: [_jsxs(Stack, { sx: { ...sliderSx }, children: [_jsx(SliderDisplayValue, { value: value, hasLabels: hasLabels, isInteracted: isInteracted }), hasLabels ? _jsx(SliderLabels, { minLabel: minLabel, maxLabel: maxLabel }) : null, _jsx(StandardSlider, { id: itemType + '-' + linkId, value: value, min: minValue, max: maxValue, step: stepValue, marks: sliderMarks, sx: { ...sliderSx }, onChange: (_, newValue) => {
|
|
22
20
|
// If item.readOnly=true, do not allow any changes
|
|
23
21
|
if (readOnly) {
|
|
@@ -26,7 +24,7 @@ function SliderField(props) {
|
|
|
26
24
|
if (typeof newValue === 'number') {
|
|
27
25
|
onValueChange(newValue);
|
|
28
26
|
}
|
|
29
|
-
}, disabled: readOnly && readOnlyVisualStyle === 'disabled', readOnly: readOnly && readOnlyVisualStyle === 'readonly', "aria-readonly": readOnly && readOnlyVisualStyle === 'readonly',
|
|
27
|
+
}, disabled: readOnly && readOnlyVisualStyle === 'disabled', readOnly: readOnly && readOnlyVisualStyle === 'readonly', "aria-readonly": readOnly && readOnlyVisualStyle === 'readonly', valueLabelDisplay: "auto", "data-test": "q-item-slider-field" })] }), feedback ? _jsx(StyledRequiredTypography, { children: feedback }) : null] }));
|
|
30
28
|
}
|
|
31
29
|
export default SliderField;
|
|
32
30
|
//# sourceMappingURL=SliderField.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SliderField.js","sourceRoot":"","sources":["../../../../src/components/FormComponents/SliderItem/SliderField.tsx"],"names":[],"mappings":";AAmBA,OAAO,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAC;AACvD,OAAO,KAAK,MAAM,qBAAqB,CAAC;AACxC,OAAO,YAAY,MAAM,gBAAgB,CAAC;AAC1C,OAAO,kBAAkB,MAAM,sBAAsB,CAAC;AACtD,OAAO,EAAE,sBAAsB,EAAE,MAAM,iBAAiB,CAAC;AACzD,OAAO,EAAE,wBAAwB,EAAE,MAAM,gBAAgB,CAAC;AAC1D,OAAO,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAC;
|
|
1
|
+
{"version":3,"file":"SliderField.js","sourceRoot":"","sources":["../../../../src/components/FormComponents/SliderItem/SliderField.tsx"],"names":[],"mappings":";AAmBA,OAAO,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAC;AACvD,OAAO,KAAK,MAAM,qBAAqB,CAAC;AACxC,OAAO,YAAY,MAAM,gBAAgB,CAAC;AAC1C,OAAO,kBAAkB,MAAM,sBAAsB,CAAC;AACtD,OAAO,EAAE,sBAAsB,EAAE,MAAM,iBAAiB,CAAC;AACzD,OAAO,EAAE,wBAAwB,EAAE,MAAM,gBAAgB,CAAC;AAC1D,OAAO,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAC;AAiBjD,SAAS,WAAW,CAAC,KAAuB;IAC1C,MAAM,EACJ,MAAM,EACN,QAAQ,EACR,KAA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QAAQ,EAAE,CAAC;gCACb,OAAO;4BACT,CAAC;4BAED,IAAI,OAAO,QAAQ,KAAK,QAAQ,EAAE,CAAC;gCACjC,aAAa,CAAC,QAAQ,CAAC,CAAC;4BAC1B,CAAC;wBACH,CAAC,EACD,QAAQ,EAAE,QAAQ,IAAI,mBAAmB,KAAK,UAAU,EACxD,QAAQ,EAAE,QAAQ,IAAI,mBAAmB,KAAK,UAAU,mBACzC,QAAQ,IAAI,mBAAmB,KAAK,UAAU,EAC7D,iBAAiB,EAAC,MAAM,eACd,qBAAqB,GAC/B,IACI,EAEP,QAAQ,CAAC,CAAC,CAAC,KAAC,wBAAwB,cAAE,QAAQ,GAA4B,CAAC,CAAC,CAAC,IAAI,IACjF,CACJ,CAAC;AACJ,CAAC;AAED,eAAe,WAAW,CAAC"}
|
|
@@ -22,7 +22,6 @@ import { ClearButtonAdornment } from '../ItemParts/ClearButtonAdornment';
|
|
|
22
22
|
import ExpressionUpdateFadingIcon from '../ItemParts/ExpressionUpdateFadingIcon';
|
|
23
23
|
import ItemRepopulateButton from '../ItemParts/ItemRepopulateButton';
|
|
24
24
|
import { StandardTextField } from '../Textfield.styles';
|
|
25
|
-
import AccessibleFeedback from '../ItemParts/AccessibleFeedback';
|
|
26
25
|
function StringField(props) {
|
|
27
26
|
const { qItem, input, feedback, renderingExtensions, readOnly, isTabled, calcExpUpdated, onInputChange, onRepopulateSync } = props;
|
|
28
27
|
const { displayPrompt, displayUnit, entryFormat, isRepopulatable } = renderingExtensions;
|
|
@@ -35,7 +34,7 @@ function StringField(props) {
|
|
|
35
34
|
onInputChange('');
|
|
36
35
|
} }), _jsx(ItemRepopulateButton, { qItem: qItem, repopulatable: isRepopulatable, onRepopulate: onRepopulateSync }), _jsx(DisplayUnitText, { readOnly: readOnly, children: displayUnit })] }))
|
|
37
36
|
}
|
|
38
|
-
}, helperText:
|
|
37
|
+
}, helperText: feedback, "data-test": "q-item-string-field" }));
|
|
39
38
|
}
|
|
40
39
|
export default StringField;
|
|
41
40
|
//# sourceMappingURL=StringField.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"StringField.js","sourceRoot":"","sources":["../../../../src/components/FormComponents/StringItem/StringField.tsx"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;GAeG;AAEH,OAAO,cAAc,MAAM,8BAA8B,CAAC;AAE1D,OAAO,EAAE,sBAAsB,EAAE,MAAM,iBAAiB,CAAC;AACzD,OAAO,eAAe,MAAM,8BAA8B,CAAC;AAC3D,OAAO,EAAE,oBAAoB,EAAE,MAAM,mCAAmC,CAAC;AACzE,OAAO,0BAA0B,MAAM,yCAAyC,CAAC;AACjF,OAAO,oBAAoB,MAAM,mCAAmC,CAAC;AAGrE,OAAO,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;
|
|
1
|
+
{"version":3,"file":"StringField.js","sourceRoot":"","sources":["../../../../src/components/FormComponents/StringItem/StringField.tsx"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;GAeG;AAEH,OAAO,cAAc,MAAM,8BAA8B,CAAC;AAE1D,OAAO,EAAE,sBAAsB,EAAE,MAAM,iBAAiB,CAAC;AACzD,OAAO,eAAe,MAAM,8BAA8B,CAAC;AAC3D,OAAO,EAAE,oBAAoB,EAAE,MAAM,mCAAmC,CAAC;AACzE,OAAO,0BAA0B,MAAM,yCAAyC,CAAC;AACjF,OAAO,oBAAoB,MAAM,mCAAmC,CAAC;AAGrE,OAAO,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AAaxD,SAAS,WAAW,CAAC,KAAuB;IAC1C,MAAM,EACJ,KAAK,EACL,KAAK,EACL,QAAQ,EACR,mBAAmB,EACnB,QAAQ,EACR,QAAQ,EACR,cAAc,EACd,aAAa,EACb,gBAAgB,EACjB,GAAG,KAAK,CAAC;IAEV,MAAM,EAAE,aAAa,EAAE,WAAW,EAAE,WAAW,EAAE,eAAe,EAAE,GAAG,mBAAmB,CAAC;IAEzF,MAAM,mBAAmB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,6 @@ import DisplayUnitText from '../ItemParts/DisplayUnitText';
|
|
|
21
21
|
import { useRendererConfigStore } from '../../../stores';
|
|
22
22
|
import ExpressionUpdateFadingIcon from '../ItemParts/ExpressionUpdateFadingIcon';
|
|
23
23
|
import ItemRepopulateButton from '../ItemParts/ItemRepopulateButton';
|
|
24
|
-
import AccessibleFeedback from '../ItemParts/AccessibleFeedback';
|
|
25
24
|
function TextField(props) {
|
|
26
25
|
const { qItem, input, feedback, renderingExtensions, readOnly, calcExpUpdated, onInputChange, onRepopulateSync } = props;
|
|
27
26
|
const { displayPrompt, displayUnit, entryFormat, isRepopulatable } = renderingExtensions;
|
|
@@ -31,7 +30,7 @@ function TextField(props) {
|
|
|
31
30
|
readOnly: readOnly && readOnlyVisualStyle === 'readonly',
|
|
32
31
|
endAdornment: (_jsxs(InputAdornment, { position: "end", children: [_jsx(ExpressionUpdateFadingIcon, { fadeIn: calcExpUpdated, disabled: readOnly }), _jsx(ItemRepopulateButton, { qItem: qItem, repopulatable: isRepopulatable, onRepopulate: onRepopulateSync }), _jsx(DisplayUnitText, { readOnly: readOnly, children: displayUnit })] }))
|
|
33
32
|
}
|
|
34
|
-
}, helperText:
|
|
33
|
+
}, helperText: feedback, "data-test": "q-item-text-field" }));
|
|
35
34
|
}
|
|
36
35
|
export default TextField;
|
|
37
36
|
//# sourceMappingURL=TextField.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TextField.js","sourceRoot":"","sources":["../../../../src/components/FormComponents/TextItem/TextField.tsx"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;GAeG;AAEH,OAAO,cAAc,MAAM,8BAA8B,CAAC;AAC1D,OAAO,YAAY,MAAM,gBAAgB,CAAC;AAC1C,OAAO,eAAe,MAAM,8BAA8B,CAAC;AAC3D,OAAO,EAAE,sBAAsB,EAAE,MAAM,iBAAiB,CAAC;AACzD,OAAO,0BAA0B,MAAM,yCAAyC,CAAC;AAGjF,OAAO,oBAAoB,MAAM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YAAY,EAAE,CACZ,MAAC,cAAc,IAAC,QAAQ,EAAC,KAAK,aAC5B,KAAC,0BAA0B,IAAC,MAAM,EAAE,cAAc,EAAE,QAAQ,EAAE,QAAQ,GAAI,EAC1E,KAAC,oBAAoB,IACnB,KAAK,EAAE,KAAK,EACZ,aAAa,EAAE,eAAe,EAC9B,YAAY,EAAE,gBAAgB,GAC9B,EACF,KAAC,eAAe,IAAC,QAAQ,EAAE,QAAQ,YAAG,WAAW,GAAmB,IACrD,CAClB;aACF;SACF,EACD,UAAU,EAAE,QAAQ,eACV,mBAAmB,GAC7B,CACH,CAAC;AACJ,CAAC;AAED,eAAe,SAAS,CAAC"}
|
|
@@ -4,7 +4,6 @@ import { StandardTextField } from '../Textfield.styles';
|
|
|
4
4
|
import { useRendererConfigStore } from '../../../stores';
|
|
5
5
|
import DisplayUnitText from '../ItemParts/DisplayUnitText';
|
|
6
6
|
import { ClearButtonAdornment } from '../ItemParts/ClearButtonAdornment';
|
|
7
|
-
import AccessibleFeedback from '../ItemParts/AccessibleFeedback';
|
|
8
7
|
function UrlField(props) {
|
|
9
8
|
const { linkId, itemType, input, feedback, displayPrompt, displayUnit, entryFormat, readOnly, isTabled, onInputChange } = props;
|
|
10
9
|
const readOnlyVisualStyle = useRendererConfigStore.use.readOnlyVisualStyle();
|
|
@@ -16,7 +15,7 @@ function UrlField(props) {
|
|
|
16
15
|
onInputChange('');
|
|
17
16
|
} }), _jsx(DisplayUnitText, { readOnly: readOnly, children: displayUnit })] }))
|
|
18
17
|
}
|
|
19
|
-
}, helperText:
|
|
18
|
+
}, helperText: feedback, "data-test": "q-item-url-field" }));
|
|
20
19
|
}
|
|
21
20
|
export default UrlField;
|
|
22
21
|
//# sourceMappingURL=UrlField.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"UrlField.js","sourceRoot":"","sources":["../../../../src/components/FormComponents/UrlItem/UrlField.tsx"],"names":[],"mappings":";AAmBA,OAAO,cAAc,MAAM,8BAA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AQ,EAAE,QAAQ,IAAI,mBAAmB,KAAK,UAAU,EACxD,IAAI,EAAC,OAAO,EACZ,SAAS,EAAE;YACT,KAAK,EAAE;gBACL,QAAQ,EAAE,QAAQ,IAAI,mBAAmB,KAAK,UAAU;gBACxD,YAAY,EAAE,CACZ,MAAC,cAAc,IAAC,QAAQ,EAAC,KAAK,aAC5B,KAAC,oBAAoB,IACnB,QAAQ,EAAE,QAAQ,EAClB,OAAO,EAAE,GAAG,EAAE;gCACZ,aAAa,CAAC,EAAE,CAAC,CAAC;4BACpB,CAAC,GACD,EACF,KAAC,eAAe,IAAC,QAAQ,EAAE,QAAQ,YAAG,WAAW,GAAmB,IACrD,CAClB;aACF;SACF,EACD,UAAU,EAAE,QAAQ,eACV,kBAAkB,GAC5B,CACH,CAAC;AACJ,CAAC;AAED,eAAe,QAAQ,CAAC"}
|
package/package.json
CHANGED
|
@@ -25,10 +25,9 @@ import Stack from '@mui/material/Stack';
|
|
|
25
25
|
import type { AttachmentValues } from './AttachmentItem';
|
|
26
26
|
import AttachmentUrlField from './AttachmentUrlField';
|
|
27
27
|
import { useRendererConfigStore } from '../../../stores';
|
|
28
|
-
import {
|
|
28
|
+
import { StyledRequiredTypography } from '../Item.styles';
|
|
29
29
|
import InputAdornment from '@mui/material/InputAdornment';
|
|
30
30
|
import { ClearButtonAdornment } from '../ItemParts/ClearButtonAdornment';
|
|
31
|
-
import AccessibleFeedback from '../ItemParts/AccessibleFeedback';
|
|
32
31
|
|
|
33
32
|
interface AttachmentFieldProps extends PropsWithIsTabledAttribute {
|
|
34
33
|
linkId: string;
|
|
@@ -133,11 +132,7 @@ function AttachmentField(props: AttachmentFieldProps) {
|
|
|
133
132
|
) : null}
|
|
134
133
|
</Stack>
|
|
135
134
|
|
|
136
|
-
{feedback ?
|
|
137
|
-
<AccessibleFeedback>
|
|
138
|
-
<StyledFeedbackTypography>{feedback}</StyledFeedbackTypography>
|
|
139
|
-
</AccessibleFeedback>
|
|
140
|
-
) : null}
|
|
135
|
+
{feedback ? <StyledRequiredTypography>{feedback}</StyledRequiredTypography> : null}
|
|
141
136
|
</>
|
|
142
137
|
);
|
|
143
138
|
}
|
|
@@ -15,13 +15,13 @@
|
|
|
15
15
|
* limitations under the License.
|
|
16
16
|
*/
|
|
17
17
|
|
|
18
|
-
import
|
|
18
|
+
import { memo } from 'react';
|
|
19
19
|
import Box from '@mui/material/Box';
|
|
20
20
|
import RadioGroup from '@mui/material/RadioGroup';
|
|
21
21
|
import { ChoiceItemOrientation } from '../../../interfaces/choice.enum';
|
|
22
22
|
import type { QuestionnaireItem } from 'fhir/r4';
|
|
23
23
|
import ChoiceRadioSingle from '../ChoiceItems/ChoiceRadioSingle';
|
|
24
|
-
import {
|
|
24
|
+
import { StyledRequiredTypography } from '../Item.styles';
|
|
25
25
|
import { getChoiceOrientation } from '../../../utils/choice';
|
|
26
26
|
import ExpressionUpdateFadingIcon from '../ItemParts/ExpressionUpdateFadingIcon';
|
|
27
27
|
import FormControlLabel from '@mui/material/FormControlLabel';
|
|
@@ -31,7 +31,6 @@ import { useRendererConfigStore } from '../../../stores';
|
|
|
31
31
|
import { StandardCheckbox } from '../../Checkbox.styles';
|
|
32
32
|
import { ariaCheckedMap } from '../../../utils/checkbox';
|
|
33
33
|
import { SrOnly } from '../SrOnly.styles';
|
|
34
|
-
import AccessibleFeedback from '../ItemParts/AccessibleFeedback';
|
|
35
34
|
|
|
36
35
|
interface BooleanFieldProps {
|
|
37
36
|
qItem: QuestionnaireItem;
|
|
@@ -60,8 +59,6 @@ const BooleanField = memo(function BooleanField(props: BooleanFieldProps) {
|
|
|
60
59
|
|
|
61
60
|
const ariaCheckedValue = ariaCheckedMap.get(selection ?? 'false');
|
|
62
61
|
|
|
63
|
-
const feedbackId = `${qItem.type}-${qItem.linkId}-feedback`;
|
|
64
|
-
|
|
65
62
|
return (
|
|
66
63
|
<>
|
|
67
64
|
<Box
|
|
@@ -81,7 +78,6 @@ const BooleanField = memo(function BooleanField(props: BooleanFieldProps) {
|
|
|
81
78
|
checked={selection === 'true'}
|
|
82
79
|
readOnly={readOnly && readOnlyVisualStyle === 'readonly'}
|
|
83
80
|
aria-readonly={readOnly && readOnlyVisualStyle === 'readonly'}
|
|
84
|
-
aria-describedby={feedback ? feedbackId : undefined}
|
|
85
81
|
role="checkbox"
|
|
86
82
|
aria-checked={ariaCheckedValue}
|
|
87
83
|
onChange={() => {
|
|
@@ -113,7 +109,6 @@ const BooleanField = memo(function BooleanField(props: BooleanFieldProps) {
|
|
|
113
109
|
row={orientation === ChoiceItemOrientation.Horizontal}
|
|
114
110
|
sx={inputsFlexGrow ? { width: '100%', flexWrap: 'nowrap' } : {}}
|
|
115
111
|
aria-readonly={readOnly && readOnlyVisualStyle === 'readonly'}
|
|
116
|
-
aria-describedby={feedback ? feedbackId : undefined}
|
|
117
112
|
onChange={(e) => {
|
|
118
113
|
// If item.readOnly=true, do not allow any changes
|
|
119
114
|
if (readOnly) {
|
|
@@ -173,11 +168,7 @@ const BooleanField = memo(function BooleanField(props: BooleanFieldProps) {
|
|
|
173
168
|
/>
|
|
174
169
|
</Box>
|
|
175
170
|
|
|
176
|
-
{feedback ?
|
|
177
|
-
<AccessibleFeedback id={feedbackId}>
|
|
178
|
-
<StyledFeedbackTypography>{feedback}</StyledFeedbackTypography>
|
|
179
|
-
</AccessibleFeedback>
|
|
180
|
-
) : null}
|
|
171
|
+
{feedback ? <StyledRequiredTypography>{feedback}</StyledRequiredTypography> : null}
|
|
181
172
|
</>
|
|
182
173
|
);
|
|
183
174
|
});
|
|
@@ -24,10 +24,10 @@ import type {
|
|
|
24
24
|
import { useRendererConfigStore } from '../../../stores';
|
|
25
25
|
import { compareAnswerOptionValue, isOptionDisabled } from '../../../utils/choice';
|
|
26
26
|
import { getAnswerOptionLabel } from '../../../utils/openChoice';
|
|
27
|
+
import { StyledRequiredTypography } from '../Item.styles';
|
|
27
28
|
import DisplayUnitText from '../ItemParts/DisplayUnitText';
|
|
28
29
|
import ExpressionUpdateFadingIcon from '../ItemParts/ExpressionUpdateFadingIcon';
|
|
29
30
|
import { StandardTextField } from '../Textfield.styles';
|
|
30
|
-
import AccessibleFeedback from '../ItemParts/AccessibleFeedback';
|
|
31
31
|
|
|
32
32
|
interface ChoiceSelectAnswerOptionFieldsProps
|
|
33
33
|
extends PropsWithIsTabledAttribute,
|
|
@@ -82,7 +82,6 @@ function ChoiceSelectAnswerOptionFields(props: ChoiceSelectAnswerOptionFieldsPro
|
|
|
82
82
|
textFieldWidth={textFieldWidth}
|
|
83
83
|
isTabled={isTabled}
|
|
84
84
|
placeholder={entryFormat || displayPrompt}
|
|
85
|
-
helperText={<AccessibleFeedback>{feedback}</AccessibleFeedback>}
|
|
86
85
|
{...params}
|
|
87
86
|
slotProps={{
|
|
88
87
|
input: {
|
|
@@ -100,6 +99,8 @@ function ChoiceSelectAnswerOptionFields(props: ChoiceSelectAnswerOptionFieldsPro
|
|
|
100
99
|
/>
|
|
101
100
|
)}
|
|
102
101
|
/>
|
|
102
|
+
|
|
103
|
+
{feedback ? <StyledRequiredTypography>{feedback}</StyledRequiredTypography> : null}
|
|
103
104
|
</>
|
|
104
105
|
);
|
|
105
106
|
}
|
|
@@ -28,10 +28,9 @@ import { useRendererConfigStore } from '../../../stores';
|
|
|
28
28
|
import { isCodingDisabled } from '../../../utils/choice';
|
|
29
29
|
import ExpressionUpdateFadingIcon from '../ItemParts/ExpressionUpdateFadingIcon';
|
|
30
30
|
import { StyledAlert } from '../../Alert.styles';
|
|
31
|
+
import { StyledRequiredTypography } from '../Item.styles';
|
|
31
32
|
import DisplayUnitText from '../ItemParts/DisplayUnitText';
|
|
32
33
|
import { StandardTextField } from '../Textfield.styles';
|
|
33
|
-
import AccessibleFeedback from '../ItemParts/AccessibleFeedback';
|
|
34
|
-
import React from 'react';
|
|
35
34
|
|
|
36
35
|
interface ChoiceSelectAnswerValueSetFieldsProps
|
|
37
36
|
extends PropsWithIsTabledAttribute,
|
|
@@ -90,7 +89,6 @@ function ChoiceSelectAnswerValueSetFields(props: ChoiceSelectAnswerValueSetField
|
|
|
90
89
|
textFieldWidth={textFieldWidth}
|
|
91
90
|
isTabled={isTabled}
|
|
92
91
|
placeholder={entryFormat || displayPrompt}
|
|
93
|
-
helperText={<AccessibleFeedback>{feedback}</AccessibleFeedback>}
|
|
94
92
|
{...params}
|
|
95
93
|
slotProps={{
|
|
96
94
|
input: {
|
|
@@ -115,6 +113,8 @@ function ChoiceSelectAnswerValueSetFields(props: ChoiceSelectAnswerValueSetField
|
|
|
115
113
|
/>
|
|
116
114
|
)}
|
|
117
115
|
/>
|
|
116
|
+
|
|
117
|
+
{feedback ? <StyledRequiredTypography>{feedback}</StyledRequiredTypography> : null}
|
|
118
118
|
</>
|
|
119
119
|
);
|
|
120
120
|
}
|
|
@@ -24,7 +24,6 @@ import { StandardTextField } from '../../Textfield.styles';
|
|
|
24
24
|
import DatePicker from './DatePicker';
|
|
25
25
|
import { useRendererConfigStore } from '../../../../stores';
|
|
26
26
|
import ExpressionUpdateFadingIcon from '../../ItemParts/ExpressionUpdateFadingIcon';
|
|
27
|
-
import AccessibleFeedback from '../../ItemParts/AccessibleFeedback';
|
|
28
27
|
|
|
29
28
|
interface CustomDateFieldProps extends PropsWithIsTabledAttribute {
|
|
30
29
|
linkId: string;
|
|
@@ -120,7 +119,7 @@ function CustomDateField(props: CustomDateFieldProps) {
|
|
|
120
119
|
}
|
|
121
120
|
}
|
|
122
121
|
}}
|
|
123
|
-
helperText={
|
|
122
|
+
helperText={feedback}
|
|
124
123
|
/>
|
|
125
124
|
);
|
|
126
125
|
}
|
|
@@ -25,7 +25,6 @@ import type { PropsWithIsTabledAttribute } from '../../../../interfaces/renderPr
|
|
|
25
25
|
import { useRendererConfigStore } from '../../../../stores';
|
|
26
26
|
import FormControl from '@mui/material/FormControl';
|
|
27
27
|
import MuiTextField from '../../TextItem/MuiTextField';
|
|
28
|
-
import AccessibleFeedback from '../../ItemParts/AccessibleFeedback';
|
|
29
28
|
|
|
30
29
|
interface CustomTimeFieldProps extends PropsWithIsTabledAttribute {
|
|
31
30
|
linkId: string;
|
|
@@ -114,11 +113,9 @@ function CustomTimeField(props: CustomTimeFieldProps) {
|
|
|
114
113
|
</Select>
|
|
115
114
|
</FormControl>
|
|
116
115
|
</Box>
|
|
117
|
-
<
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
</Typography>
|
|
121
|
-
</AccessibleFeedback>
|
|
116
|
+
<Typography component="span" variant="caption" color="error" sx={{ ml: 1.75, mt: -0.5 }}>
|
|
117
|
+
{feedback}
|
|
118
|
+
</Typography>
|
|
122
119
|
</>
|
|
123
120
|
);
|
|
124
121
|
}
|
|
@@ -25,7 +25,6 @@ import ItemRepopulateButton from '../ItemParts/ItemRepopulateButton';
|
|
|
25
25
|
import type { QuestionnaireItem, QuestionnaireResponseItem } from 'fhir/r4';
|
|
26
26
|
import type { RenderingExtensions } from '../../../hooks/useRenderingExtensions';
|
|
27
27
|
import { StandardTextField } from '../Textfield.styles';
|
|
28
|
-
import AccessibleFeedback from '../ItemParts/AccessibleFeedback';
|
|
29
28
|
|
|
30
29
|
interface DecimalFieldProps extends PropsWithIsTabledAttribute {
|
|
31
30
|
qItem: QuestionnaireItem;
|
|
@@ -75,7 +74,7 @@ function DecimalField(props: DecimalFieldProps) {
|
|
|
75
74
|
id={inputId}
|
|
76
75
|
value={input}
|
|
77
76
|
error={!!feedback}
|
|
78
|
-
helperText={
|
|
77
|
+
helperText={feedback}
|
|
79
78
|
onChange={(event) => onInputChange(event.target.value)}
|
|
80
79
|
disabled={readOnly && readOnlyVisualStyle === 'disabled'}
|
|
81
80
|
placeholder={placeholderText}
|
|
@@ -25,7 +25,6 @@ import type { QuestionnaireItem, QuestionnaireResponseItem } from 'fhir/r4';
|
|
|
25
25
|
import ItemRepopulateButton from '../ItemParts/ItemRepopulateButton';
|
|
26
26
|
import type { RenderingExtensions } from '../../../hooks/useRenderingExtensions';
|
|
27
27
|
import { StandardTextField } from '../Textfield.styles';
|
|
28
|
-
import AccessibleFeedback from '../ItemParts/AccessibleFeedback';
|
|
29
28
|
|
|
30
29
|
interface IntegerFieldProps extends PropsWithIsTabledAttribute {
|
|
31
30
|
qItem: QuestionnaireItem;
|
|
@@ -75,7 +74,7 @@ function IntegerField(props: IntegerFieldProps) {
|
|
|
75
74
|
id={inputId}
|
|
76
75
|
value={input}
|
|
77
76
|
error={!!feedback}
|
|
78
|
-
helperText={
|
|
77
|
+
helperText={feedback}
|
|
79
78
|
onChange={(event) => onInputChange(event.target.value)}
|
|
80
79
|
disabled={readOnly && readOnlyVisualStyle === 'disabled'}
|
|
81
80
|
label={displayPrompt}
|
|
@@ -18,7 +18,7 @@
|
|
|
18
18
|
import { styled } from '@mui/material/styles';
|
|
19
19
|
import Typography from '@mui/material/Typography';
|
|
20
20
|
|
|
21
|
-
export const
|
|
21
|
+
export const StyledRequiredTypography = styled(Typography)(({ theme }) => ({
|
|
22
22
|
color: theme.palette.error.main,
|
|
23
23
|
fontSize: '0.75rem',
|
|
24
24
|
marginTop: 4
|
|
@@ -10,10 +10,9 @@ import { ChoiceItemOrientation } from '../../../interfaces/choice.enum';
|
|
|
10
10
|
import { useRendererConfigStore } from '../../../stores';
|
|
11
11
|
import { getChoiceOrientation } from '../../../utils/choice';
|
|
12
12
|
import CheckboxOptionList from '../ChoiceItems/CheckboxOptionList';
|
|
13
|
-
import {
|
|
13
|
+
import { StyledRequiredTypography } from '../Item.styles';
|
|
14
14
|
import ClearInputButton from './ClearInputButton';
|
|
15
15
|
import ExpressionUpdateFadingIcon from './ExpressionUpdateFadingIcon';
|
|
16
|
-
import AccessibleFeedback from './AccessibleFeedback';
|
|
17
16
|
|
|
18
17
|
interface ChoiceCheckboxFormGroupProps {
|
|
19
18
|
qItem: QuestionnaireItem;
|
|
@@ -51,8 +50,6 @@ function CheckboxFormGroup(props: ChoiceCheckboxFormGroupProps) {
|
|
|
51
50
|
|
|
52
51
|
const answersEmpty = answers.length === 0;
|
|
53
52
|
|
|
54
|
-
const feedbackId = `${qItem.type}-${qItem.linkId}-feedback`;
|
|
55
|
-
|
|
56
53
|
return (
|
|
57
54
|
<>
|
|
58
55
|
<Box
|
|
@@ -71,7 +68,6 @@ function CheckboxFormGroup(props: ChoiceCheckboxFormGroupProps) {
|
|
|
71
68
|
{...(!isTabled
|
|
72
69
|
? { 'aria-labelledby': 'label-' + qItem.linkId }
|
|
73
70
|
: { 'aria-label': qItem.text ?? 'Unnamed checkbox list' })}
|
|
74
|
-
aria-describedby={feedback ? feedbackId : undefined}
|
|
75
71
|
role="group"
|
|
76
72
|
row={orientation === ChoiceItemOrientation.Horizontal}
|
|
77
73
|
sx={inputsFlexGrow ? { width: '100%', flexWrap: 'nowrap' } : {}}>
|
|
@@ -95,11 +91,7 @@ function CheckboxFormGroup(props: ChoiceCheckboxFormGroupProps) {
|
|
|
95
91
|
<ClearInputButton buttonShown={!answersEmpty} readOnly={readOnly} onClear={onClear} />
|
|
96
92
|
</Box>
|
|
97
93
|
|
|
98
|
-
{feedback ?
|
|
99
|
-
<AccessibleFeedback id={feedbackId}>
|
|
100
|
-
<StyledFeedbackTypography>{feedback}</StyledFeedbackTypography>
|
|
101
|
-
</AccessibleFeedback>
|
|
102
|
-
) : null}
|
|
94
|
+
{feedback ? <StyledRequiredTypography>{feedback}</StyledRequiredTypography> : null}
|
|
103
95
|
</>
|
|
104
96
|
);
|
|
105
97
|
}
|
|
@@ -1,15 +1,14 @@
|
|
|
1
1
|
import Box from '@mui/material/Box';
|
|
2
2
|
import RadioGroup from '@mui/material/RadioGroup';
|
|
3
3
|
import type { QuestionnaireItem, QuestionnaireItemAnswerOption } from 'fhir/r4';
|
|
4
|
-
import
|
|
4
|
+
import type { ReactNode } from 'react';
|
|
5
5
|
import { ChoiceItemOrientation } from '../../../interfaces/choice.enum';
|
|
6
6
|
import { useRendererConfigStore } from '../../../stores';
|
|
7
7
|
import { getChoiceOrientation } from '../../../utils/choice';
|
|
8
|
-
import {
|
|
8
|
+
import { StyledRequiredTypography } from '../Item.styles';
|
|
9
9
|
import ClearInputButton from './ClearInputButton';
|
|
10
10
|
import ExpressionUpdateFadingIcon from './ExpressionUpdateFadingIcon';
|
|
11
11
|
import RadioOptionList from './RadioOptionList';
|
|
12
|
-
import AccessibleFeedback from './AccessibleFeedback';
|
|
13
12
|
|
|
14
13
|
interface ChoiceRadioGroupProps {
|
|
15
14
|
qItem: QuestionnaireItem;
|
|
@@ -45,8 +44,6 @@ function RadioFormGroup(props: ChoiceRadioGroupProps) {
|
|
|
45
44
|
|
|
46
45
|
const orientation = getChoiceOrientation(qItem) ?? ChoiceItemOrientation.Vertical;
|
|
47
46
|
|
|
48
|
-
const feedbackId = qItem.type + '-' + qItem.linkId + '-feedback';
|
|
49
|
-
|
|
50
47
|
return (
|
|
51
48
|
<>
|
|
52
49
|
<Box
|
|
@@ -67,7 +64,6 @@ function RadioFormGroup(props: ChoiceRadioGroupProps) {
|
|
|
67
64
|
? { 'aria-labelledby': 'label-' + qItem.linkId }
|
|
68
65
|
: { 'aria-label': qItem.text ?? 'Unnamed radio group' })}
|
|
69
66
|
aria-readonly={readOnly && readOnlyVisualStyle === 'readonly'}
|
|
70
|
-
aria-describedby={feedback ? feedbackId : undefined}
|
|
71
67
|
row={orientation === ChoiceItemOrientation.Horizontal}
|
|
72
68
|
sx={inputsFlexGrow ? { width: '100%', flexWrap: 'nowrap' } : {}}
|
|
73
69
|
onChange={(e) => {
|
|
@@ -97,11 +93,7 @@ function RadioFormGroup(props: ChoiceRadioGroupProps) {
|
|
|
97
93
|
<ClearInputButton buttonShown={!!valueRadio} readOnly={readOnly} onClear={onClear} />
|
|
98
94
|
</Box>
|
|
99
95
|
|
|
100
|
-
{feedback ?
|
|
101
|
-
<AccessibleFeedback id={feedbackId}>
|
|
102
|
-
<StyledFeedbackTypography>{feedback}</StyledFeedbackTypography>
|
|
103
|
-
</AccessibleFeedback>
|
|
104
|
-
) : null}
|
|
96
|
+
{feedback ? <StyledRequiredTypography>{feedback}</StyledRequiredTypography> : null}
|
|
105
97
|
</>
|
|
106
98
|
);
|
|
107
99
|
}
|
|
@@ -27,8 +27,8 @@ import type {
|
|
|
27
27
|
PropsWithRenderingExtensionsAttribute
|
|
28
28
|
} from '../../../interfaces/renderProps.interface';
|
|
29
29
|
import { useRendererConfigStore } from '../../../stores';
|
|
30
|
+
import { StyledRequiredTypography } from '../Item.styles';
|
|
30
31
|
import DisplayUnitText from '../ItemParts/DisplayUnitText';
|
|
31
|
-
import AccessibleFeedback from '../ItemParts/AccessibleFeedback';
|
|
32
32
|
|
|
33
33
|
interface OpenChoiceSelectAnswerOptionFieldProps
|
|
34
34
|
extends PropsWithIsTabledAttribute,
|
|
@@ -83,7 +83,6 @@ function OpenChoiceSelectAnswerOptionField(props: OpenChoiceSelectAnswerOptionFi
|
|
|
83
83
|
textFieldWidth={textFieldWidth}
|
|
84
84
|
isTabled={isTabled}
|
|
85
85
|
placeholder={entryFormat || displayPrompt}
|
|
86
|
-
helperText={<AccessibleFeedback>{feedback}</AccessibleFeedback>}
|
|
87
86
|
{...params}
|
|
88
87
|
slotProps={{
|
|
89
88
|
input: {
|
|
@@ -100,6 +99,8 @@ function OpenChoiceSelectAnswerOptionField(props: OpenChoiceSelectAnswerOptionFi
|
|
|
100
99
|
/>
|
|
101
100
|
)}
|
|
102
101
|
/>
|
|
102
|
+
|
|
103
|
+
{feedback ? <StyledRequiredTypography>{feedback}</StyledRequiredTypography> : null}
|
|
103
104
|
</>
|
|
104
105
|
);
|
|
105
106
|
}
|
package/src/components/FormComponents/OpenChoiceItems/OpenChoiceSelectAnswerValueSetField.tsx
CHANGED
|
@@ -28,8 +28,8 @@ import type {
|
|
|
28
28
|
import type { Coding, QuestionnaireItem } from 'fhir/r4';
|
|
29
29
|
import type { TerminologyError } from '../../../hooks/useValueSetCodings';
|
|
30
30
|
import { useRendererConfigStore } from '../../../stores';
|
|
31
|
+
import { StyledRequiredTypography } from '../Item.styles';
|
|
31
32
|
import DisplayUnitText from '../ItemParts/DisplayUnitText';
|
|
32
|
-
import AccessibleFeedback from '../ItemParts/AccessibleFeedback';
|
|
33
33
|
|
|
34
34
|
interface OpenChoiceSelectAnswerValueSetFieldProps
|
|
35
35
|
extends PropsWithIsTabledAttribute,
|
|
@@ -88,7 +88,6 @@ function OpenChoiceSelectAnswerValueSetField(props: OpenChoiceSelectAnswerValueS
|
|
|
88
88
|
textFieldWidth={textFieldWidth}
|
|
89
89
|
isTabled={isTabled}
|
|
90
90
|
placeholder={entryFormat || displayPrompt}
|
|
91
|
-
helperText={<AccessibleFeedback>{feedback}</AccessibleFeedback>}
|
|
92
91
|
{...params}
|
|
93
92
|
slotProps={{
|
|
94
93
|
input: {
|
|
@@ -111,6 +110,8 @@ function OpenChoiceSelectAnswerValueSetField(props: OpenChoiceSelectAnswerValueS
|
|
|
111
110
|
{terminologyError.answerValueSet}
|
|
112
111
|
</Typography>
|
|
113
112
|
) : null}
|
|
113
|
+
|
|
114
|
+
{feedback ? <StyledRequiredTypography>{feedback}</StyledRequiredTypography> : null}
|
|
114
115
|
</>
|
|
115
116
|
);
|
|
116
117
|
}
|
|
@@ -22,7 +22,6 @@ import DisplayUnitText from '../ItemParts/DisplayUnitText';
|
|
|
22
22
|
import { ClearButtonAdornment } from '../ItemParts/ClearButtonAdornment';
|
|
23
23
|
import ExpressionUpdateFadingIcon from '../ItemParts/ExpressionUpdateFadingIcon';
|
|
24
24
|
import { StandardTextField } from '../Textfield.styles';
|
|
25
|
-
import AccessibleFeedback from '../ItemParts/AccessibleFeedback';
|
|
26
25
|
|
|
27
26
|
interface QuantityFieldProps extends PropsWithIsTabledAttribute {
|
|
28
27
|
linkId: string;
|
|
@@ -105,7 +104,7 @@ function QuantityField(props: QuantityFieldProps) {
|
|
|
105
104
|
)
|
|
106
105
|
}
|
|
107
106
|
}}
|
|
108
|
-
helperText={
|
|
107
|
+
helperText={feedback}
|
|
109
108
|
data-test="q-item-quantity-field"
|
|
110
109
|
/>
|
|
111
110
|
);
|