@aehrc/smart-forms-renderer 1.0.0-alpha.77 → 1.0.0-alpha.79
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/ChoiceItems/ChoiceCheckboxAnswerOptionItem.d.ts +2 -2
- package/lib/components/FormComponents/ChoiceItems/ChoiceCheckboxAnswerOptionItem.js +2 -2
- package/lib/components/FormComponents/ChoiceItems/ChoiceCheckboxAnswerOptionItem.js.map +1 -1
- package/lib/components/FormComponents/ChoiceItems/ChoiceCheckboxAnswerValueSetItem.d.ts +2 -2
- package/lib/components/FormComponents/ChoiceItems/ChoiceCheckboxAnswerValueSetItem.js +2 -2
- package/lib/components/FormComponents/ChoiceItems/ChoiceCheckboxAnswerValueSetItem.js.map +1 -1
- package/lib/components/FormComponents/ChoiceItems/ChoiceItemSwitcher.d.ts +2 -2
- package/lib/components/FormComponents/ChoiceItems/ChoiceItemSwitcher.js +3 -3
- package/lib/components/FormComponents/ChoiceItems/ChoiceItemSwitcher.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 -3
- package/lib/components/FormComponents/GridGroup/GridGroup.js +14 -6
- package/lib/components/FormComponents/GridGroup/GridGroup.js.map +1 -1
- package/lib/components/FormComponents/GridGroup/GridRow.d.ts +3 -3
- package/lib/components/FormComponents/GridGroup/GridRow.js +7 -5
- package/lib/components/FormComponents/GridGroup/GridRow.js.map +1 -1
- package/lib/components/FormComponents/GridGroup/GridTable.d.ts +6 -3
- package/lib/components/FormComponents/GridGroup/GridTable.js +30 -9
- package/lib/components/FormComponents/GridGroup/GridTable.js.map +1 -1
- package/lib/components/FormComponents/GroupItem/GroupHeading.d.ts +2 -3
- package/lib/components/FormComponents/GroupItem/GroupHeading.js +2 -2
- package/lib/components/FormComponents/GroupItem/GroupHeading.js.map +1 -1
- package/lib/components/FormComponents/GroupItem/GroupItem.d.ts +2 -3
- package/lib/components/FormComponents/GroupItem/GroupItem.js.map +1 -1
- package/lib/components/FormComponents/GroupItem/GroupItemSwitcher.d.ts +2 -3
- package/lib/components/FormComponents/GroupItem/GroupItemSwitcher.js.map +1 -1
- package/lib/components/FormComponents/GroupItem/GroupItemView.d.ts +2 -3
- package/lib/components/FormComponents/GroupItem/GroupItemView.js.map +1 -1
- package/lib/components/FormComponents/ItemParts/ItemLabel.d.ts +2 -2
- package/lib/components/FormComponents/ItemParts/ItemLabel.js +6 -1
- package/lib/components/FormComponents/ItemParts/ItemLabel.js.map +1 -1
- package/lib/components/FormComponents/ItemParts/ItemTextSwitcher.d.ts +0 -1
- package/lib/components/FormComponents/ItemParts/ItemTextSwitcher.js +1 -13
- package/lib/components/FormComponents/ItemParts/ItemTextSwitcher.js.map +1 -1
- package/lib/components/FormComponents/OpenChoiceItems/OpenChoiceCheckboxAnswerOptionItem.d.ts +2 -2
- package/lib/components/FormComponents/OpenChoiceItems/OpenChoiceCheckboxAnswerOptionItem.js +2 -2
- package/lib/components/FormComponents/OpenChoiceItems/OpenChoiceCheckboxAnswerOptionItem.js.map +1 -1
- package/lib/components/FormComponents/OpenChoiceItems/OpenChoiceCheckboxAnswerValueSetItem.d.ts +2 -2
- package/lib/components/FormComponents/OpenChoiceItems/OpenChoiceCheckboxAnswerValueSetItem.js +2 -2
- package/lib/components/FormComponents/OpenChoiceItems/OpenChoiceCheckboxAnswerValueSetItem.js.map +1 -1
- package/lib/components/FormComponents/OpenChoiceItems/OpenChoiceItemSwitcher.d.ts +2 -2
- package/lib/components/FormComponents/OpenChoiceItems/OpenChoiceItemSwitcher.js +3 -3
- package/lib/components/FormComponents/OpenChoiceItems/OpenChoiceItemSwitcher.js.map +1 -1
- package/lib/components/FormComponents/RepeatGroup/RepeatGroup.d.ts +2 -3
- package/lib/components/FormComponents/RepeatGroup/RepeatGroup.js +2 -2
- 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 +2 -3
- package/lib/components/FormComponents/RepeatGroup/RepeatGroupView.js +1 -10
- package/lib/components/FormComponents/RepeatGroup/RepeatGroupView.js.map +1 -1
- package/lib/components/FormComponents/RepeatItem/RepeatField.d.ts +2 -2
- package/lib/components/FormComponents/RepeatItem/RepeatField.js +2 -2
- 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 +3 -13
- package/lib/components/FormComponents/RepeatItem/RepeatItem.js.map +1 -1
- package/lib/components/FormComponents/SingleItem/SingleItem.d.ts +2 -3
- package/lib/components/FormComponents/SingleItem/SingleItem.js +2 -2
- package/lib/components/FormComponents/SingleItem/SingleItem.js.map +1 -1
- package/lib/components/FormComponents/SingleItem/SingleItemSwitcher.d.ts +2 -2
- package/lib/components/FormComponents/SingleItem/SingleItemSwitcher.js +3 -3
- package/lib/components/FormComponents/SingleItem/SingleItemSwitcher.js.map +1 -1
- package/lib/components/FormComponents/SingleItem/SingleItemView.d.ts +2 -3
- package/lib/components/FormComponents/SingleItem/SingleItemView.js +4 -4
- package/lib/components/FormComponents/SingleItem/SingleItemView.js.map +1 -1
- package/lib/components/FormComponents/StringItem/StringItem.d.ts +2 -3
- 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.map +1 -1
- package/lib/components/FormComponents/Tables/GroupTableRowCells.js +1 -1
- package/lib/components/FormComponents/Tables/GroupTableRowCells.js.map +1 -1
- package/lib/components/FormComponents/Tables/GroupTableView.d.ts +2 -3
- package/lib/components/FormComponents/Tables/GroupTableView.js.map +1 -1
- package/lib/components/FormComponents/Tables/Table.styles.js +3 -1
- package/lib/components/FormComponents/Tables/Table.styles.js.map +1 -1
- package/lib/interfaces/renderProps.interface.d.ts +0 -3
- package/lib/utils/itemControl.js +1 -0
- package/lib/utils/itemControl.js.map +1 -1
- package/package.json +1 -1
- package/src/components/FormComponents/ChoiceItems/ChoiceCheckboxAnswerOptionItem.tsx +2 -5
- package/src/components/FormComponents/ChoiceItems/ChoiceCheckboxAnswerValueSetItem.tsx +2 -5
- package/src/components/FormComponents/ChoiceItems/ChoiceItemSwitcher.tsx +1 -6
- package/src/components/FormComponents/DisplayItem/DisplayItem.tsx +1 -0
- package/src/components/FormComponents/GridGroup/GridGroup.tsx +17 -32
- package/src/components/FormComponents/GridGroup/GridRow.tsx +21 -8
- package/src/components/FormComponents/GridGroup/GridTable.tsx +37 -22
- package/src/components/FormComponents/GroupItem/GroupHeading.tsx +3 -5
- package/src/components/FormComponents/GroupItem/GroupItem.tsx +3 -2
- package/src/components/FormComponents/GroupItem/GroupItemSwitcher.tsx +3 -2
- package/src/components/FormComponents/GroupItem/GroupItemView.tsx +3 -2
- package/src/components/FormComponents/ItemParts/ItemLabel.tsx +14 -4
- package/src/components/FormComponents/ItemParts/ItemTextSwitcher.tsx +1 -19
- package/src/components/FormComponents/OpenChoiceItems/OpenChoiceCheckboxAnswerOptionItem.tsx +2 -5
- package/src/components/FormComponents/OpenChoiceItems/OpenChoiceCheckboxAnswerValueSetItem.tsx +2 -5
- package/src/components/FormComponents/OpenChoiceItems/OpenChoiceItemSwitcher.tsx +1 -6
- package/src/components/FormComponents/RepeatGroup/RepeatGroup.tsx +4 -7
- package/src/components/FormComponents/RepeatGroup/RepeatGroupItem.tsx +7 -12
- package/src/components/FormComponents/RepeatGroup/RepeatGroupView.tsx +3 -43
- package/src/components/FormComponents/RepeatItem/RepeatField.tsx +7 -13
- package/src/components/FormComponents/RepeatItem/RepeatItem.tsx +2 -44
- package/src/components/FormComponents/SingleItem/SingleItem.tsx +4 -7
- package/src/components/FormComponents/SingleItem/SingleItemSwitcher.tsx +1 -6
- package/src/components/FormComponents/SingleItem/SingleItemView.tsx +4 -9
- package/src/components/FormComponents/StringItem/StringItem.tsx +3 -2
- package/src/components/FormComponents/Tables/GroupTable.tsx +1 -3
- package/src/components/FormComponents/Tables/GroupTableRowCells.tsx +0 -1
- package/src/components/FormComponents/Tables/GroupTableView.tsx +4 -3
- package/src/components/FormComponents/Tables/Table.styles.tsx +3 -1
- package/src/interfaces/renderProps.interface.ts +0 -4
- package/src/utils/itemControl.ts +1 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { QuestionnaireItem, QuestionnaireResponseItem } from 'fhir/r4';
|
|
2
|
-
import type { PropsWithFeedbackFromParentAttribute, PropsWithIsRepeatedAttribute, PropsWithItemPathAttribute, PropsWithIsTabledAttribute, PropsWithParentIsReadOnlyAttribute, PropsWithQrItemChangeHandler, PropsWithRenderingExtensionsAttribute
|
|
3
|
-
interface ChoiceCheckboxAnswerOptionItemProps extends PropsWithQrItemChangeHandler, PropsWithItemPathAttribute, PropsWithIsRepeatedAttribute, PropsWithRenderingExtensionsAttribute,
|
|
2
|
+
import type { PropsWithFeedbackFromParentAttribute, PropsWithIsRepeatedAttribute, PropsWithItemPathAttribute, PropsWithIsTabledAttribute, PropsWithParentIsReadOnlyAttribute, PropsWithQrItemChangeHandler, PropsWithRenderingExtensionsAttribute } from '../../../interfaces/renderProps.interface';
|
|
3
|
+
interface ChoiceCheckboxAnswerOptionItemProps extends PropsWithQrItemChangeHandler, PropsWithItemPathAttribute, PropsWithIsRepeatedAttribute, PropsWithRenderingExtensionsAttribute, PropsWithParentIsReadOnlyAttribute, PropsWithFeedbackFromParentAttribute, PropsWithIsTabledAttribute {
|
|
4
4
|
qItem: QuestionnaireItem;
|
|
5
5
|
qrItem: QuestionnaireResponseItem | null;
|
|
6
6
|
}
|
|
@@ -12,7 +12,7 @@ import ItemLabel from '../ItemParts/ItemLabel';
|
|
|
12
12
|
import useAnswerOptionsToggleExpressions from '../../../hooks/useAnswerOptionsToggleExpressions';
|
|
13
13
|
function ChoiceCheckboxAnswerOptionItem(props) {
|
|
14
14
|
var _a, _b, _c, _d;
|
|
15
|
-
const { qItem, qrItem, isRepeated, isTabled, renderingExtensions,
|
|
15
|
+
const { qItem, qrItem, isRepeated, isTabled, renderingExtensions, parentIsReadOnly, feedbackFromParent, onQrItemChange } = props;
|
|
16
16
|
const onFocusLinkId = useQuestionnaireStore.use.onFocusLinkId();
|
|
17
17
|
// Init input value
|
|
18
18
|
const answerKey = (_b = (_a = qrItem === null || qrItem === void 0 ? void 0 : qrItem.answer) === null || _a === void 0 ? void 0 : _a[0]) === null || _b === void 0 ? void 0 : _b.id;
|
|
@@ -42,7 +42,7 @@ function ChoiceCheckboxAnswerOptionItem(props) {
|
|
|
42
42
|
function handleClear() {
|
|
43
43
|
onQrItemChange(createEmptyQrItem(qItem, answerKey));
|
|
44
44
|
}
|
|
45
|
-
if (
|
|
45
|
+
if (isTabled) {
|
|
46
46
|
return (_jsxs(_Fragment, { children: [_jsx(ChoiceCheckboxAnswerOptionFields, { qItem: qItem, options: options, answers: answers, feedback: feedback, readOnly: readOnly, expressionUpdated: answerOptionsToggleExpUpdated, answerOptionsToggleExpressionsMap: answerOptionsToggleExpressionsMap, isTabled: isTabled, onCheckedChange: handleCheckedChange, onClear: handleClear }), _jsx(DisplayInstructions, { readOnly: readOnly, children: displayInstructions })] }));
|
|
47
47
|
}
|
|
48
48
|
return (_jsx(FullWidthFormComponentBox, { "data-test": "q-item-choice-checkbox-answer-option-box", "data-linkid": qItem.linkId, onClick: () => onFocusLinkId(qItem.linkId), children: _jsx(ItemFieldGrid, { qItem: qItem, readOnly: readOnly, labelChildren: _jsx(ItemLabel, { qItem: qItem, readOnly: readOnly }), fieldChildren: _jsx(ChoiceCheckboxAnswerOptionFields, { qItem: qItem, options: options, answers: answers, feedback: feedback, readOnly: readOnly, expressionUpdated: answerOptionsToggleExpUpdated, answerOptionsToggleExpressionsMap: answerOptionsToggleExpressionsMap, isTabled: isTabled, onCheckedChange: handleCheckedChange, onClear: handleClear }) }) }));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ChoiceCheckboxAnswerOptionItem.js","sourceRoot":"","sources":["../../../../src/components/FormComponents/ChoiceItems/ChoiceCheckboxAnswerOptionItem.tsx"],"names":[],"mappings":";AAmBA,OAAO,EAAE,iBAAiB,EAAE,MAAM,uBAAuB,CAAC;AAC1D,OAAO,EAAE,2BAA2B,EAAE,MAAM,uBAAuB,CAAC;AACpE,OAAO,EAAE,yBAAyB,EAAE,MAAM,kBAAkB,CAAC;
|
|
1
|
+
{"version":3,"file":"ChoiceCheckboxAnswerOptionItem.js","sourceRoot":"","sources":["../../../../src/components/FormComponents/ChoiceItems/ChoiceCheckboxAnswerOptionItem.tsx"],"names":[],"mappings":";AAmBA,OAAO,EAAE,iBAAiB,EAAE,MAAM,uBAAuB,CAAC;AAC1D,OAAO,EAAE,2BAA2B,EAAE,MAAM,uBAAuB,CAAC;AACpE,OAAO,EAAE,yBAAyB,EAAE,MAAM,kBAAkB,CAAC;AAU7D,OAAO,mBAAmB,MAAM,oCAAoC,CAAC;AACrE,OAAO,WAAW,MAAM,4BAA4B,CAAC;AACrD,OAAO,aAAa,MAAM,4BAA4B,CAAC;AACvD,OAAO,EAAE,qBAAqB,EAAE,MAAM,iBAAiB,CAAC;AACxD,OAAO,gCAAgC,MAAM,oCAAoC,CAAC;AAClF,OAAO,qBAAqB,MAAM,sCAAsC,CAAC;AACzE,OAAO,SAAS,MAAM,wBAAwB,CAAC;AAC/C,OAAO,iCAAiC,MAAM,kDAAkD,CAAC;AAcjG,SAAS,8BAA8B,CAAC,KAA0C;;IAChF,MAAM,EACJ,KAAK,EACL,MAAM,EACN,UAAU,EACV,QAAQ,EACR,mBAAmB,EACnB,gBAAgB,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e,8BAA8B,CAAC"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { QuestionnaireItem, QuestionnaireResponseItem } from 'fhir/r4';
|
|
2
|
-
import type { PropsWithFeedbackFromParentAttribute, PropsWithIsRepeatedAttribute, PropsWithItemPathAttribute, PropsWithIsTabledAttribute, PropsWithParentIsReadOnlyAttribute, PropsWithQrItemChangeHandler, PropsWithRenderingExtensionsAttribute
|
|
3
|
-
interface ChoiceCheckboxAnswerValueSetItemProps extends PropsWithQrItemChangeHandler, PropsWithItemPathAttribute, PropsWithIsRepeatedAttribute, PropsWithRenderingExtensionsAttribute,
|
|
2
|
+
import type { PropsWithFeedbackFromParentAttribute, PropsWithIsRepeatedAttribute, PropsWithItemPathAttribute, PropsWithIsTabledAttribute, PropsWithParentIsReadOnlyAttribute, PropsWithQrItemChangeHandler, PropsWithRenderingExtensionsAttribute } from '../../../interfaces/renderProps.interface';
|
|
3
|
+
interface ChoiceCheckboxAnswerValueSetItemProps extends PropsWithQrItemChangeHandler, PropsWithItemPathAttribute, PropsWithIsRepeatedAttribute, PropsWithRenderingExtensionsAttribute, PropsWithParentIsReadOnlyAttribute, PropsWithFeedbackFromParentAttribute, PropsWithIsTabledAttribute {
|
|
4
4
|
qItem: QuestionnaireItem;
|
|
5
5
|
qrItem: QuestionnaireResponseItem | null;
|
|
6
6
|
showText?: boolean;
|
|
@@ -30,7 +30,7 @@ import ItemLabel from '../ItemParts/ItemLabel';
|
|
|
30
30
|
import useAnswerOptionsToggleExpressions from '../../../hooks/useAnswerOptionsToggleExpressions';
|
|
31
31
|
function ChoiceCheckboxAnswerValueSetItem(props) {
|
|
32
32
|
var _a, _b, _c;
|
|
33
|
-
const { qItem, qrItem, isRepeated, renderingExtensions,
|
|
33
|
+
const { qItem, qrItem, isRepeated, renderingExtensions, parentIsReadOnly, feedbackFromParent, isTabled, onQrItemChange } = props;
|
|
34
34
|
const onFocusLinkId = useQuestionnaireStore.use.onFocusLinkId();
|
|
35
35
|
// Init input value
|
|
36
36
|
const answerKey = (_b = (_a = qrItem === null || qrItem === void 0 ? void 0 : qrItem.answer) === null || _a === void 0 ? void 0 : _a[0]) === null || _b === void 0 ? void 0 : _b.id;
|
|
@@ -63,7 +63,7 @@ function ChoiceCheckboxAnswerValueSetItem(props) {
|
|
|
63
63
|
function handleClear() {
|
|
64
64
|
onQrItemChange(createEmptyQrItem(qItem, answerKey));
|
|
65
65
|
}
|
|
66
|
-
if (
|
|
66
|
+
if (isTabled) {
|
|
67
67
|
return (_jsxs(_Fragment, { children: [_jsx(ChoiceCheckboxAnswerValueSetFields, { qItem: qItem, options: options, answers: answers, feedback: feedback, readOnly: readOnly, expressionUpdated: answerOptionsToggleExpUpdated, answerOptionsToggleExpressionsMap: answerOptionsToggleExpressionsMap, terminologyError: terminologyError, isTabled: isTabled, onCheckedChange: handleCheckedChange, onClear: handleClear }), _jsx(DisplayInstructions, { readOnly: readOnly, children: displayInstructions })] }));
|
|
68
68
|
}
|
|
69
69
|
return (_jsx(FullWidthFormComponentBox, { "data-test": "q-item-choice-checkbox-answer-value-set-box", "data-linkid": qItem.linkId, onClick: () => onFocusLinkId(qItem.linkId), children: _jsx(ItemFieldGrid, { qItem: qItem, readOnly: readOnly, labelChildren: _jsx(ItemLabel, { qItem: qItem, readOnly: readOnly }), fieldChildren: _jsx(ChoiceCheckboxAnswerValueSetFields, { qItem: qItem, options: options, answers: answers, feedback: feedback, readOnly: readOnly, expressionUpdated: answerOptionsToggleExpUpdated, answerOptionsToggleExpressionsMap: answerOptionsToggleExpressionsMap, terminologyError: terminologyError, isTabled: isTabled, onCheckedChange: handleCheckedChange, onClear: handleClear }) }) }));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ChoiceCheckboxAnswerValueSetItem.js","sourceRoot":"","sources":["../../../../src/components/FormComponents/ChoiceItems/ChoiceCheckboxAnswerValueSetItem.tsx"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;GAeG;AAEH,OAAc,EAAE,OAAO,EAAE,MAAM,OAAO,CAAC;AAEvC,OAAO,EAAE,iBAAiB,EAAE,MAAM,uBAAuB,CAAC;AAC1D,OAAO,kBAAkB,MAAM,mCAAmC,CAAC;AACnE,OAAO,EAAE,6BAA6B,EAAE,2BAA2B,EAAE,MAAM,uBAAuB,CAAC;AACnG,OAAO,EAAE,yBAAyB,EAAE,MAAM,kBAAkB,CAAC;
|
|
1
|
+
{"version":3,"file":"ChoiceCheckboxAnswerValueSetItem.js","sourceRoot":"","sources":["../../../../src/components/FormComponents/ChoiceItems/ChoiceCheckboxAnswerValueSetItem.tsx"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;GAeG;AAEH,OAAc,EAAE,OAAO,EAAE,MAAM,OAAO,CAAC;AAEvC,OAAO,EAAE,iBAAiB,EAAE,MAAM,uBAAuB,CAAC;AAC1D,OAAO,kBAAkB,MAAM,mCAAmC,CAAC;AACnE,OAAO,EAAE,6BAA6B,EAAE,2BAA2B,EAAE,MAAM,uBAAuB,CAAC;AACnG,OAAO,EAAE,yBAAyB,EAAE,MAAM,kBAAkB,CAAC;AAU7D,OAAO,mBAAmB,MAAM,oCAAoC,CAAC;AACrE,OAAO,kCAAkC,MAAM,sCAAsC,CAAC;AACtF,OAAO,WAAW,MAAM,4BAA4B,CAAC;AACrD,OAAO,aAAa,MAAM,4BAA4B,CAAC;AACvD,OAAO,EAAE,qBAAqB,EAAE,MAAM,iBAAiB,CAAC;AACxD,OAAO,qBAAqB,MAAM,sCAAsC,CAAC;AACzE,OAAO,SAAS,MAAM,wBAAwB,CAAC;AAC/C,OAAO,iCAAiC,MAAM,kDAAkD,CAAC;AAejG,SAAS,gCAAgC,CAAC,KAA4C;;IACpF,MAAM,EACJ,KAAK,EACL,MAAM,EACN,UAAU,EACV,mBAAmB,EACnB,gBAAgB,EAChB,kBAAkB,EAClB,QAAQ,EACR,cAAc,EACf,GAAG,KAAK,CAAC;IAEV,MAAM,aAAa,GAAG,qBAAqB,CAAC,GAAG,CA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AAQ,EAAE,QAAQ,EAClB,eAAe,EAAE,mBAAmB,EACpC,OAAO,EAAE,WAAW,GACpB,GAEJ,GACwB,CAC7B,CAAC;AACJ,CAAC;AAED,eAAe,gCAAgC,CAAC"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { QuestionnaireItem, QuestionnaireResponseItem } from 'fhir/r4';
|
|
2
|
-
import type { PropsWithFeedbackFromParentAttribute, PropsWithIsRepeatedAttribute, PropsWithIsTabledRequiredAttribute, PropsWithItemPathAttribute, PropsWithParentIsReadOnlyAttribute, PropsWithParentStylesAttribute, PropsWithQrItemChangeHandler, PropsWithRenderingExtensionsAttribute
|
|
3
|
-
interface ChoiceItemSwitcherProps extends PropsWithQrItemChangeHandler, PropsWithItemPathAttribute, PropsWithIsRepeatedAttribute, PropsWithIsTabledRequiredAttribute, PropsWithRenderingExtensionsAttribute,
|
|
2
|
+
import type { PropsWithFeedbackFromParentAttribute, PropsWithIsRepeatedAttribute, PropsWithIsTabledRequiredAttribute, PropsWithItemPathAttribute, PropsWithParentIsReadOnlyAttribute, PropsWithParentStylesAttribute, PropsWithQrItemChangeHandler, PropsWithRenderingExtensionsAttribute } from '../../../interfaces/renderProps.interface';
|
|
3
|
+
interface ChoiceItemSwitcherProps extends PropsWithQrItemChangeHandler, PropsWithItemPathAttribute, PropsWithIsRepeatedAttribute, PropsWithIsTabledRequiredAttribute, PropsWithRenderingExtensionsAttribute, PropsWithParentIsReadOnlyAttribute, PropsWithFeedbackFromParentAttribute, PropsWithParentStylesAttribute {
|
|
4
4
|
qItem: QuestionnaireItem;
|
|
5
5
|
qrItem: QuestionnaireResponseItem | null;
|
|
6
6
|
}
|
|
@@ -11,7 +11,7 @@ import ChoiceCheckboxAnswerValueSetItem from './ChoiceCheckboxAnswerValueSetItem
|
|
|
11
11
|
import Typography from '@mui/material/Typography';
|
|
12
12
|
function ChoiceItemSwitcher(props) {
|
|
13
13
|
var _a, _b;
|
|
14
|
-
const { qItem, qrItem, itemPath, isRepeated, isTabled, renderingExtensions,
|
|
14
|
+
const { qItem, qrItem, itemPath, isRepeated, isTabled, renderingExtensions, parentIsReadOnly, feedbackFromParent, onQrItemChange } = props;
|
|
15
15
|
const choiceControlType = getChoiceControlType(qItem);
|
|
16
16
|
switch (choiceControlType) {
|
|
17
17
|
case ChoiceItemControl.Radio:
|
|
@@ -23,10 +23,10 @@ function ChoiceItemSwitcher(props) {
|
|
|
23
23
|
}
|
|
24
24
|
case ChoiceItemControl.Checkbox:
|
|
25
25
|
if (qItem.answerOption) {
|
|
26
|
-
return (_jsx(ChoiceCheckboxAnswerOptionItem, { qItem: qItem, qrItem: qrItem, itemPath: itemPath, isRepeated: (_a = qItem.repeats) !== null && _a !== void 0 ? _a : false, renderingExtensions: renderingExtensions,
|
|
26
|
+
return (_jsx(ChoiceCheckboxAnswerOptionItem, { qItem: qItem, qrItem: qrItem, itemPath: itemPath, isRepeated: (_a = qItem.repeats) !== null && _a !== void 0 ? _a : false, renderingExtensions: renderingExtensions, parentIsReadOnly: parentIsReadOnly, feedbackFromParent: feedbackFromParent, isTabled: isTabled, onQrItemChange: onQrItemChange }));
|
|
27
27
|
}
|
|
28
28
|
else {
|
|
29
|
-
return (_jsx(ChoiceCheckboxAnswerValueSetItem, { qItem: qItem, qrItem: qrItem, itemPath: itemPath, isRepeated: (_b = qItem.repeats) !== null && _b !== void 0 ? _b : false, renderingExtensions: renderingExtensions,
|
|
29
|
+
return (_jsx(ChoiceCheckboxAnswerValueSetItem, { qItem: qItem, qrItem: qrItem, itemPath: itemPath, isRepeated: (_b = qItem.repeats) !== null && _b !== void 0 ? _b : false, renderingExtensions: renderingExtensions, parentIsReadOnly: parentIsReadOnly, feedbackFromParent: feedbackFromParent, isTabled: isTabled, onQrItemChange: onQrItemChange }));
|
|
30
30
|
}
|
|
31
31
|
case ChoiceItemControl.Autocomplete:
|
|
32
32
|
return (_jsx(ChoiceAutocompleteItem, { qItem: qItem, qrItem: qrItem, itemPath: itemPath, isRepeated: isRepeated, isTabled: isTabled, renderingExtensions: renderingExtensions, parentIsReadOnly: parentIsReadOnly, feedbackFromParent: feedbackFromParent, onQrItemChange: onQrItemChange }));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ChoiceItemSwitcher.js","sourceRoot":"","sources":["../../../../src/components/FormComponents/ChoiceItems/ChoiceItemSwitcher.tsx"],"names":[],"mappings":";AAkBA,OAAO,EAAE,iBAAiB,EAAE,MAAM,iCAAiC,CAAC;AAEpE,OAAO,2BAA2B,MAAM,+BAA+B,CAAC;AACxE,OAAO,4BAA4B,MAAM,gCAAgC,CAAC;AAC1E,OAAO,8BAA8B,MAAM,kCAAkC,CAAC;AAC9E,OAAO,sBAAsB,MAAM,0BAA0B,CAAC;AAC9D,OAAO,8BAA8B,MAAM,kCAAkC,CAAC;AAC9E,OAAO,EAAE,oBAAoB,EAAE,MAAM,uBAAuB,CAAC;AAC7D,OAAO,6BAA6B,MAAM,iCAAiC,CAAC;AAC5E,OAAO,gCAAgC,MAAM,oCAAoC,CAAC;
|
|
1
|
+
{"version":3,"file":"ChoiceItemSwitcher.js","sourceRoot":"","sources":["../../../../src/components/FormComponents/ChoiceItems/ChoiceItemSwitcher.tsx"],"names":[],"mappings":";AAkBA,OAAO,EAAE,iBAAiB,EAAE,MAAM,iCAAiC,CAAC;AAEpE,OAAO,2BAA2B,MAAM,+BAA+B,CAAC;AACxE,OAAO,4BAA4B,MAAM,gCAAgC,CAAC;AAC1E,OAAO,8BAA8B,MAAM,kCAAkC,CAAC;AAC9E,OAAO,sBAAsB,MAAM,0BAA0B,CAAC;AAC9D,OAAO,8BAA8B,MAAM,kCAAkC,CAAC;AAC9E,OAAO,EAAE,oBAAoB,EAAE,MAAM,uBAAuB,CAAC;AAC7D,OAAO,6BAA6B,MAAM,iCAAiC,CAAC;AAC5E,OAAO,gCAAgC,MAAM,oCAAoC,CAAC;AAWlF,OAAO,UAAU,MAAM,0BAA0B,CAAC;AAelD,SAAS,kBAAkB,C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MAAM,EACd,QAAQ,EAAE,QAAQ,EAClB,UAAU,EAAE,UAAU,EACtB,QAAQ,EAAE,QAAQ,EAClB,mBAAmB,EAAE,mBAAmB,EACxC,gBAAgB,EAAE,gBAAgB,EAClC,kBAAkB,EAAE,kBAAkB,EACtC,cAAc,EAAE,cAAc,GAC9B,CACH,CAAC;YACJ,CAAC;QACH;YACE,OAAO,CACL,MAAC,UAAU,IAAC,SAAS,EAAC,KAAK,4DACmB,KAAK,CAAC,MAAM,SAAK,KAAK,CAAC,IAAI,IAC5D,CACd,CAAC;IACN,CAAC;AACH,CAAC;AAED,eAAe,kBAAkB,CAAC"}
|
|
@@ -38,7 +38,7 @@ const DisplayItem = memo(function DisplayItem(props) {
|
|
|
38
38
|
if (isDivider) {
|
|
39
39
|
return _jsx(Divider, { sx: { mt: 1.5, mb: 1 } });
|
|
40
40
|
}
|
|
41
|
-
return (_jsx(FullWidthFormComponentBox, { "data-test": "q-item-display-box", "data-linkid": qItem.linkId, onClick: () => onFocusLinkId(qItem.linkId), children: _jsx(ItemLabel, { qItem: qItem, readOnly: readOnly, isDisplayItem: true, parentStyles: parentStyles }) }));
|
|
41
|
+
return (_jsx(FullWidthFormComponentBox, { "data-test": "q-item-display-box", "data-linkid": qItem.linkId, width: "100%", onClick: () => onFocusLinkId(qItem.linkId), children: _jsx(ItemLabel, { qItem: qItem, readOnly: readOnly, isDisplayItem: true, parentStyles: parentStyles }) }));
|
|
42
42
|
});
|
|
43
43
|
export default DisplayItem;
|
|
44
44
|
//# sourceMappingURL=DisplayItem.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DisplayItem.js","sourceRoot":"","sources":["../../../../src/components/FormComponents/DisplayItem/DisplayItem.tsx"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;GAeG;AAEH,OAAc,EAAE,IAAI,EAAE,MAAM,OAAO,CAAC;AAEpC,OAAO,EAAE,yBAAyB,EAAE,MAAM,kBAAkB,CAAC;AAC7D,OAAO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AAE,EAAE,EAAE,EAAE,GAAG,EAAE,EAAE,EAAE,CAAC,EAAE,GAAI,CAAC;IAC7C,CAAC;IAED,OAAO,CACL,KAAC,yBAAyB,iBACd,oBAAoB,iBACjB,KAAK,CAAC,MAAM,EACzB,KAAK,EAAC,MAAM,EACZ,OAAO,EAAE,GAAG,EAAE,CAAC,aAAa,CAAC,KAAK,CAAC,MAAM,CAAC,YAC1C,KAAC,SAAS,IACR,KAAK,EAAE,KAAK,EACZ,QAAQ,EAAE,QAAQ,EAClB,aAAa,EAAE,IAAI,EACnB,YAAY,EAAE,YAAY,GAC1B,GACwB,CAC7B,CAAC;AACJ,CAAC,CAAC,CAAC;AAEH,eAAe,WAAW,CAAC"}
|
|
@@ -1,10 +1,9 @@
|
|
|
1
1
|
import type { QuestionnaireItem, QuestionnaireResponseItem } from 'fhir/r4';
|
|
2
|
-
import type { PropsWithItemPathAttribute, PropsWithParentIsReadOnlyAttribute,
|
|
3
|
-
interface GridGroupProps extends PropsWithQrItemChangeHandler, PropsWithItemPathAttribute,
|
|
2
|
+
import type { PropsWithItemPathAttribute, PropsWithParentIsReadOnlyAttribute, PropsWithParentStylesAttribute, PropsWithQrItemChangeHandler } from '../../../interfaces/renderProps.interface';
|
|
3
|
+
interface GridGroupProps extends PropsWithQrItemChangeHandler, PropsWithItemPathAttribute, PropsWithParentIsReadOnlyAttribute, PropsWithParentStylesAttribute {
|
|
4
4
|
qItem: QuestionnaireItem;
|
|
5
5
|
qrItem: QuestionnaireResponseItem | null;
|
|
6
6
|
groupCardElevation: number;
|
|
7
|
-
parentStyles?: Record<string, string>;
|
|
8
7
|
}
|
|
9
8
|
/**
|
|
10
9
|
* Main component to render a Group Grid (grid) Questionnaire item.
|
|
@@ -27,6 +27,7 @@ import GridTable from './GridTable';
|
|
|
27
27
|
import useReadOnly from '../../../hooks/useReadOnly';
|
|
28
28
|
import { useQuestionnaireStore } from '../../../stores';
|
|
29
29
|
import GroupHeading from '../GroupItem/GroupHeading';
|
|
30
|
+
import { structuredDataCapture } from 'fhir-sdc-helpers';
|
|
30
31
|
/**
|
|
31
32
|
* Main component to render a Group Grid (grid) Questionnaire item.
|
|
32
33
|
* @see {@link https://hl7.org/fhir/extensions/CodeSystem-questionnaire-item-control.html}
|
|
@@ -34,13 +35,23 @@ import GroupHeading from '../GroupItem/GroupHeading';
|
|
|
34
35
|
* @author Sean Fong
|
|
35
36
|
*/
|
|
36
37
|
function GridGroup(props) {
|
|
37
|
-
const { qItem, qrItem, itemPath, groupCardElevation,
|
|
38
|
+
const { qItem, qrItem, itemPath, groupCardElevation, parentIsReadOnly, parentStyles, onQrItemChange } = props;
|
|
38
39
|
const onFocusLinkId = useQuestionnaireStore.use.onFocusLinkId();
|
|
39
40
|
const qRowItems = qItem.item;
|
|
40
41
|
const qrGroup = qrItem && qrItem.item ? qrItem : createEmptyQrGroup(qItem);
|
|
41
42
|
const qrRowItems = qrGroup.item;
|
|
42
43
|
const qItemsIndexMap = useMemo(() => mapQItemsIndex(qItem), [qItem]);
|
|
43
|
-
|
|
44
|
+
// Get column headers from first row item.text
|
|
45
|
+
const columnHeaders = useMemo(() => {
|
|
46
|
+
var _a, _b;
|
|
47
|
+
return (_b = (_a = qRowItems === null || qRowItems === void 0 ? void 0 : qRowItems[0].item) === null || _a === void 0 ? void 0 : _a.map((firstItem) => {
|
|
48
|
+
var _a, _b;
|
|
49
|
+
return ({
|
|
50
|
+
label: (_a = firstItem.text) !== null && _a !== void 0 ? _a : ' ',
|
|
51
|
+
styleString: (_b = structuredDataCapture.getStyle(firstItem._text)) !== null && _b !== void 0 ? _b : null
|
|
52
|
+
});
|
|
53
|
+
})) !== null && _b !== void 0 ? _b : [];
|
|
54
|
+
}, [qRowItems]);
|
|
44
55
|
const readOnly = useReadOnly(qItem, parentIsReadOnly);
|
|
45
56
|
const itemIsHidden = useHidden(qItem);
|
|
46
57
|
if (itemIsHidden) {
|
|
@@ -59,10 +70,7 @@ function GridGroup(props) {
|
|
|
59
70
|
updateQrItemsInGroup(newQrItem, null, updatedQrGroup, qItemsIndexMap);
|
|
60
71
|
onQrItemChange(updatedQrGroup, targetItemPath);
|
|
61
72
|
}
|
|
62
|
-
|
|
63
|
-
return (_jsx(QGroupContainerBox, { cardElevation: groupCardElevation, isRepeated: false, py: 1, style: parentStyles || undefined, children: _jsx(TableContainer, { component: Paper, elevation: groupCardElevation, children: _jsx(GridTable, { qItems: qRowItems, qrItems: qrRowItems, qItemsIndexMap: qItemsIndexMap, columnLabels: columnLabels, itemPath: itemPath, showMinimalView: showMinimalView, parentIsReadOnly: readOnly, onQrItemChange: handleRowChange }) }) }));
|
|
64
|
-
}
|
|
65
|
-
return (_jsxs(QGroupContainerBox, { cardElevation: groupCardElevation, isRepeated: false, py: 3, "data-linkid": qItem.linkId, onClick: () => onFocusLinkId(qItem.linkId), style: parentStyles || undefined, children: [qItem.text ? (_jsxs(_Fragment, { children: [_jsx(GroupHeading, { qItem: qItem, readOnly: readOnly, groupCardElevation: groupCardElevation }), _jsx(Divider, { sx: { my: 1, opacity: 0.6 } })] })) : null, _jsx(TableContainer, { component: Paper, elevation: groupCardElevation, children: _jsx(GridTable, { qItems: qRowItems, qrItems: qrRowItems, qItemsIndexMap: qItemsIndexMap, columnLabels: columnLabels, itemPath: itemPath, parentIsReadOnly: readOnly, onQrItemChange: handleRowChange }) })] }));
|
|
73
|
+
return (_jsxs(QGroupContainerBox, { cardElevation: groupCardElevation, isRepeated: false, py: 3, "data-linkid": qItem.linkId, onClick: () => onFocusLinkId(qItem.linkId), style: parentStyles || undefined, children: [qItem.text ? (_jsxs(_Fragment, { children: [_jsx(GroupHeading, { qItem: qItem, readOnly: readOnly, groupCardElevation: groupCardElevation }), _jsx(Divider, { sx: { my: 1, opacity: 0.6 } })] })) : null, _jsx(TableContainer, { component: Paper, elevation: groupCardElevation, children: _jsx(GridTable, { qItems: qRowItems, qrItems: qrRowItems, qItemsIndexMap: qItemsIndexMap, columnHeaders: columnHeaders, itemPath: itemPath, parentIsReadOnly: readOnly, parentStyles: parentStyles, onQrItemChange: handleRowChange }) })] }));
|
|
66
74
|
}
|
|
67
75
|
export default GridGroup;
|
|
68
76
|
//# sourceMappingURL=GridGroup.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"GridGroup.js","sourceRoot":"","sources":["../../../../src/components/FormComponents/GridGroup/GridGroup.tsx"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;GAeG;AAEH,OAAc,EAAE,OAAO,EAAE,MAAM,OAAO,CAAC;AAQvC,OAAO,EAAE,kBAAkB,EAAE,oBAAoB,EAAE,MAAM,uBAAuB,CAAC;AACjF,OAAO,SAAS,MAAM,0BAA0B,CAAC;AACjD,OAAO,EAAE,kBAAkB,EAAE,MAAM,kBAAkB,CAAC;AACtD,OAAO,OAAO,MAAM,uBAAuB,CAAC;AAC5C,OAAO,KAAK,MAAM,qBAAqB,CAAC;AACxC,OAAO,cAAc,MAAM,8BAA8B,CAAC;AAC1D,OAAO,EAAE,cAAc,EAAE,MAAM,wBAAwB,CAAC;AACxD,OAAO,SAAS,MAAM,aAAa,CAAC;AACpC,OAAO,WAAW,MAAM,4BAA4B,CAAC;AACrD,OAAO,EAAE,qBAAqB,EAAE,MAAM,iBAAiB,CAAC;AACxD,OAAO,YAAY,MAAM,2BAA2B,CAAC;
|
|
1
|
+
{"version":3,"file":"GridGroup.js","sourceRoot":"","sources":["../../../../src/components/FormComponents/GridGroup/GridGroup.tsx"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;GAeG;AAEH,OAAc,EAAE,OAAO,EAAE,MAAM,OAAO,CAAC;AAQvC,OAAO,EAAE,kBAAkB,EAAE,oBAAoB,EAAE,MAAM,uBAAuB,CAAC;AACjF,OAAO,SAAS,MAAM,0BAA0B,CAAC;AACjD,OAAO,EAAE,kBAAkB,EAAE,MAAM,kBAAkB,CAAC;AACtD,OAAO,OAAO,MAAM,uBAAuB,CAAC;AAC5C,OAAO,KAAK,MAAM,qBAAqB,CAAC;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CAAC,CAAC,IAAI,EAER,KAAC,cAAc,IAAC,SAAS,EAAE,KAAK,EAAE,SAAS,EAAE,kBAAkB,YAC7D,KAAC,SAAS,IACR,MAAM,EAAE,SAAS,EACjB,OAAO,EAAE,UAAU,EACnB,cAAc,EAAE,cAAc,EAC9B,aAAa,EAAE,aAAa,EAC5B,QAAQ,EAAE,QAAQ,EAClB,gBAAgB,EAAE,QAAQ,EAC1B,YAAY,EAAE,YAAY,EAC1B,cAAc,EAAE,eAAe,GAC/B,GACa,IACE,CACtB,CAAC;AACJ,CAAC;AAED,eAAe,SAAS,CAAC"}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import type { QuestionnaireItem, QuestionnaireResponseItem } from 'fhir/r4';
|
|
2
|
-
import type { PropsWithItemPathAttribute, PropsWithParentIsReadOnlyAttribute, PropsWithQrItemChangeHandler } from '../../../interfaces/renderProps.interface';
|
|
3
|
-
interface GridRowProps extends PropsWithQrItemChangeHandler, PropsWithItemPathAttribute, PropsWithParentIsReadOnlyAttribute {
|
|
2
|
+
import type { PropsWithItemPathAttribute, PropsWithParentIsReadOnlyAttribute, PropsWithQrItemChangeHandler, PropsWithParentStylesAttribute } from '../../../interfaces/renderProps.interface';
|
|
3
|
+
interface GridRowProps extends PropsWithQrItemChangeHandler, PropsWithItemPathAttribute, PropsWithParentIsReadOnlyAttribute, PropsWithParentStylesAttribute {
|
|
4
4
|
qItem: QuestionnaireItem;
|
|
5
5
|
qrItem: QuestionnaireResponseItem | null;
|
|
6
|
-
|
|
6
|
+
columnHeaderLabels: string[];
|
|
7
7
|
}
|
|
8
8
|
declare function GridRow(props: GridRowProps): import("react/jsx-runtime").JSX.Element | null;
|
|
9
9
|
export default GridRow;
|
|
@@ -25,7 +25,7 @@ import Box from '@mui/material/Box';
|
|
|
25
25
|
import useHidden from '../../../hooks/useHidden';
|
|
26
26
|
import { extendItemPath } from '../../../utils/itemPath';
|
|
27
27
|
function GridRow(props) {
|
|
28
|
-
const { qItem, qrItem, itemPath,
|
|
28
|
+
const { qItem, qrItem, itemPath, columnHeaderLabels, parentIsReadOnly, parentStyles, onQrItemChange } = props;
|
|
29
29
|
const rowQItems = qItem.item;
|
|
30
30
|
const row = qrItem && qrItem.item ? qrItem : createEmptyQrGroup(qItem);
|
|
31
31
|
const rowQrItems = row.item;
|
|
@@ -34,17 +34,19 @@ function GridRow(props) {
|
|
|
34
34
|
if (itemIsHidden) {
|
|
35
35
|
return null;
|
|
36
36
|
}
|
|
37
|
-
if (!rowQItems || !rowQrItems) {
|
|
37
|
+
if (!rowQItems || !rowQrItems || rowQItems.length === 0) {
|
|
38
38
|
return null;
|
|
39
39
|
}
|
|
40
|
+
// Add textAlign center style to all grid cells and pass it as parentStyles to the next item
|
|
41
|
+
const gridCellStyles = Object.assign(Object.assign({}, parentStyles), { textAlign: 'center' });
|
|
40
42
|
function handleQrRowItemChange(newQrRowItem, targetItemPath) {
|
|
41
43
|
const qrRow = Object.assign({}, row);
|
|
42
44
|
updateQrItemsInGroup(newQrRowItem, null, qrRow, qItemsIndexMap);
|
|
43
45
|
onQrItemChange(qrRow, targetItemPath);
|
|
44
46
|
}
|
|
45
47
|
const qrItemsByIndex = getQrItemsIndex(rowQItems, rowQrItems, qItemsIndexMap);
|
|
46
|
-
const numOfColumns =
|
|
47
|
-
return (_jsxs(_Fragment, { children: [_jsx(GridTextTableCell, { children: _jsx(Typography, { component: "span", fontWeight: "bold", children: qItem.text }) }),
|
|
48
|
+
const numOfColumns = columnHeaderLabels.length;
|
|
49
|
+
return (_jsxs(_Fragment, { children: [_jsx(GridTextTableCell, { children: _jsx(Typography, { component: "span", fontWeight: "bold", children: qItem.text }) }), columnHeaderLabels.map((label, colIndex) => {
|
|
48
50
|
// Find the QuestionnaireItem in this row that matches the current column label
|
|
49
51
|
const matchingCellQItemIndex = rowQItems.findIndex((item) => item.text === label);
|
|
50
52
|
// Render empty cell for sparsity
|
|
@@ -56,7 +58,7 @@ function GridRow(props) {
|
|
|
56
58
|
if (Array.isArray(cellQrItem)) {
|
|
57
59
|
return null;
|
|
58
60
|
}
|
|
59
|
-
return (_jsx(GridAnswerTableCell, { numOfColumns: numOfColumns, children: _jsx(Box, { display: "flex", alignItems: "center", justifyContent: "center", children: _jsx(SingleItem, { qItem: cellQItem, qrItem: cellQrItem !== null && cellQrItem !== void 0 ? cellQrItem : null, itemPath: extendItemPath(itemPath, cellQItem.linkId), isRepeated: true, isTabled: true, groupCardElevation: 1,
|
|
61
|
+
return (_jsx(GridAnswerTableCell, { numOfColumns: numOfColumns, children: _jsx(Box, { display: "flex", alignItems: "center", justifyContent: "center", children: _jsx(SingleItem, { qItem: cellQItem, qrItem: cellQrItem !== null && cellQrItem !== void 0 ? cellQrItem : null, itemPath: extendItemPath(itemPath, cellQItem.linkId), isRepeated: true, isTabled: true, groupCardElevation: 1, parentIsReadOnly: parentIsReadOnly, parentStyles: gridCellStyles, onQrItemChange: handleQrRowItemChange }) }) }, colIndex));
|
|
60
62
|
})] }));
|
|
61
63
|
}
|
|
62
64
|
export default GridRow;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"GridRow.js","sourceRoot":"","sources":["../../../../src/components/FormComponents/GridGroup/GridRow.tsx"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;GAeG;AAEH,OAAc,EAAE,OAAO,EAAE,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"GridRow.js","sourceRoot":"","sources":["../../../../src/components/FormComponents/GridGroup/GridRow.tsx"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;GAeG;AAEH,OAAc,EAAE,OAAO,EAAE,MAAM,OAAO,CAAC;AAQvC,OAAO,EAAE,kBAAkB,EAAE,oBAAoB,EAAE,MAAM,uBAAuB,CAAC;AACjF,OAAO,EAAE,mBAAmB,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAC;AAChF,OAAO,UAAU,MAAM,0BAA0B,CAAC;AAClD,OAAO,EAAE,eAAe,EAAE,cAAc,EAAE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AI,EACd,kBAAkB,EAAE,CAAC,EACrB,gBAAgB,EAAE,gBAAgB,EAClC,YAAY,EAAE,cAAc,EAC5B,cAAc,EAAE,qBAAqB,GACrC,GACE,IAbkB,QAAQ,CAcZ,CACvB,CAAC;YACJ,CAAC,CAAC,IACD,CACJ,CAAC;AACJ,CAAC;AAED,eAAe,OAAO,CAAC"}
|
|
@@ -1,10 +1,13 @@
|
|
|
1
1
|
import type { QuestionnaireItem, QuestionnaireResponseItem } from 'fhir/r4';
|
|
2
|
-
import type { PropsWithItemPathAttribute, PropsWithParentIsReadOnlyAttribute, PropsWithQrItemChangeHandler,
|
|
3
|
-
interface GridTableProps extends PropsWithQrItemChangeHandler, PropsWithItemPathAttribute,
|
|
2
|
+
import type { PropsWithItemPathAttribute, PropsWithParentIsReadOnlyAttribute, PropsWithQrItemChangeHandler, PropsWithParentStylesAttribute } from '../../../interfaces/renderProps.interface';
|
|
3
|
+
interface GridTableProps extends PropsWithQrItemChangeHandler, PropsWithItemPathAttribute, PropsWithParentIsReadOnlyAttribute, PropsWithParentStylesAttribute {
|
|
4
4
|
qItems: QuestionnaireItem[];
|
|
5
5
|
qrItems: QuestionnaireResponseItem[];
|
|
6
6
|
qItemsIndexMap: Record<string, number>;
|
|
7
|
-
|
|
7
|
+
columnHeaders: {
|
|
8
|
+
label: string;
|
|
9
|
+
styleString: string | null;
|
|
10
|
+
}[];
|
|
8
11
|
}
|
|
9
12
|
declare function GridTable(props: GridTableProps): import("react/jsx-runtime").JSX.Element;
|
|
10
13
|
export default GridTable;
|
|
@@ -1,4 +1,21 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
/*
|
|
3
|
+
* Copyright 2024 Commonwealth Scientific and Industrial Research
|
|
4
|
+
* Organisation (CSIRO) ABN 41 687 119 230.
|
|
5
|
+
*
|
|
6
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
7
|
+
* you may not use this file except in compliance with the License.
|
|
8
|
+
* You may obtain a copy of the License at
|
|
9
|
+
*
|
|
10
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
11
|
+
*
|
|
12
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
13
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
14
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
15
|
+
* See the License for the specific language governing permissions and
|
|
16
|
+
* limitations under the License.
|
|
17
|
+
*/
|
|
18
|
+
import { useMemo } from 'react';
|
|
2
19
|
import Table from '@mui/material/Table';
|
|
3
20
|
import TableBody from '@mui/material/TableBody';
|
|
4
21
|
import TableCell from '@mui/material/TableCell';
|
|
@@ -8,21 +25,25 @@ import { HeaderTableCell } from '../Tables/Table.styles';
|
|
|
8
25
|
import GridRow from './GridRow';
|
|
9
26
|
import { getQrItemsIndex } from '../../../utils/mapItem';
|
|
10
27
|
import { extendItemPath } from '../../../utils/itemPath';
|
|
11
|
-
import {
|
|
28
|
+
import { default as parseStyleToJs } from 'style-to-js';
|
|
12
29
|
function GridTable(props) {
|
|
13
|
-
const { qItems, qrItems, qItemsIndexMap,
|
|
30
|
+
const { qItems, qrItems, qItemsIndexMap, columnHeaders, itemPath, parentIsReadOnly, parentStyles, onQrItemChange } = props;
|
|
14
31
|
const qrItemsByIndex = getQrItemsIndex(qItems, qrItems, qItemsIndexMap);
|
|
15
|
-
const
|
|
16
|
-
return (_jsxs(Table, {
|
|
32
|
+
const columnHeaderLabels = useMemo(() => columnHeaders.map(({ label }) => label), [columnHeaders]);
|
|
33
|
+
return (_jsxs(Table, { children: [_jsx(TableHead, { children: _jsxs(TableRow, { children: [_jsx(HeaderTableCell, {}), columnHeaders.map(({ label, styleString }) => {
|
|
34
|
+
// Add default textAlign center style to all grid headers
|
|
35
|
+
const defaultStyle = {
|
|
36
|
+
textAlign: 'center'
|
|
37
|
+
};
|
|
38
|
+
const itemStyles = styleString ? parseStyleToJs(styleString) : {};
|
|
39
|
+
const combinedStyle = Object.assign(Object.assign(Object.assign({}, defaultStyle), parentStyles), itemStyles);
|
|
40
|
+
return (_jsx(HeaderTableCell, { size: "medium", style: combinedStyle, children: label }, label));
|
|
41
|
+
}), _jsx(TableCell, {})] }) }), _jsx(TableBody, { children: qItems.map((qItem, index) => {
|
|
17
42
|
const qrItem = qrItemsByIndex[index];
|
|
18
43
|
if (Array.isArray(qrItem)) {
|
|
19
44
|
return null;
|
|
20
45
|
}
|
|
21
|
-
|
|
22
|
-
if (showMinimalView && !qrItem) {
|
|
23
|
-
return null;
|
|
24
|
-
}
|
|
25
|
-
return (_jsx(TableRow, { children: _jsx(GridRow, { qItem: qItem, qrItem: qrItem !== null && qrItem !== void 0 ? qrItem : null, columnLabels: columnLabels, itemPath: extendItemPath(itemPath, qItem.linkId), parentIsReadOnly: parentIsReadOnly, onQrItemChange: onQrItemChange }) }, qItem.linkId));
|
|
46
|
+
return (_jsx(TableRow, { children: _jsx(GridRow, { qItem: qItem, qrItem: qrItem !== null && qrItem !== void 0 ? qrItem : null, columnHeaderLabels: columnHeaderLabels, itemPath: extendItemPath(itemPath, qItem.linkId), parentIsReadOnly: parentIsReadOnly, parentStyles: parentStyles, onQrItemChange: onQrItemChange }) }, qItem.linkId));
|
|
26
47
|
}) })] }));
|
|
27
48
|
}
|
|
28
49
|
export default GridTable;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"GridTable.js","sourceRoot":"","sources":["../../../../src/components/FormComponents/GridGroup/GridTable.tsx"],"names":[],"mappings":";
|
|
1
|
+
{"version":3,"file":"GridTable.js","sourceRoot":"","sources":["../../../../src/components/FormComponents/GridGroup/GridTable.tsx"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;GAeG;AAEH,OAAc,EAAE,OAAO,EAAE,MAAM,OAAO,CAAC;AACvC,OAAO,KAAK,MAAM,qBAAqB,CAAC;AACxC,OAAO,SAAS,MAAM,yBAAyB,CAAC;AAChD,OAAO,SAAS,MAAM,yBAAy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AAK,EAAE,aAAa,YAC5D,KAAK,IADc,KAAK,CAET,CACnB,CAAC;wBACJ,CAAC,CAAC,EACF,KAAC,SAAS,KAAG,IACJ,GACD,EACZ,KAAC,SAAS,cACP,MAAM,CAAC,GAAG,CAAC,CAAC,KAAK,EAAE,KAAK,EAAE,EAAE;oBAC3B,MAAM,MAAM,GAAG,cAAc,CAAC,KAAK,CAAC,CAAC;oBAErC,IAAI,KAAK,CAAC,OAAO,CAAC,MAAM,CAAC,EAAE,CAAC;wBAC1B,OAAO,IAAI,CAAC;oBACd,CAAC;oBAED,OAAO,CACL,KAAC,QAAQ,cACP,KAAC,OAAO,IACN,KAAK,EAAE,KAAK,EACZ,MAAM,EAAE,MAAM,aAAN,MAAM,cAAN,MAAM,GAAI,IAAI,EACtB,kBAAkB,EAAE,kBAAkB,EACtC,QAAQ,EAAE,cAAc,CAAC,QAAQ,EAAE,KAAK,CAAC,MAAM,CAAC,EAChD,gBAAgB,EAAE,gBAAgB,EAClC,YAAY,EAAE,YAAY,EAC1B,cAAc,EAAE,cAAc,GAC9B,IATW,KAAK,CAAC,MAAM,CAUhB,CACZ,CAAC;gBACJ,CAAC,CAAC,GACQ,IACN,CACT,CAAC;AACJ,CAAC;AAED,eAAe,SAAS,CAAC"}
|
|
@@ -1,13 +1,12 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import type { QuestionnaireItem } from 'fhir/r4';
|
|
3
|
-
|
|
3
|
+
import type { PropsWithParentStylesAttribute } from '../../../interfaces/renderProps.interface';
|
|
4
|
+
interface GroupHeadingProps extends PropsWithParentStylesAttribute {
|
|
4
5
|
qItem: QuestionnaireItem;
|
|
5
6
|
readOnly: boolean;
|
|
6
7
|
groupCardElevation: number;
|
|
7
8
|
tabIsMarkedAsComplete?: boolean;
|
|
8
9
|
pageIsMarkedAsComplete?: boolean;
|
|
9
|
-
onStylesExtracted?: (styles: Record<string, any>) => void;
|
|
10
|
-
parentStyles?: Record<string, string>;
|
|
11
10
|
}
|
|
12
11
|
declare const GroupHeading: React.NamedExoticComponent<GroupHeadingProps>;
|
|
13
12
|
export default GroupHeading;
|
|
@@ -27,7 +27,7 @@ import ItemTextSwitcher from '../ItemParts/ItemTextSwitcher';
|
|
|
27
27
|
import FlyoverItem from '../ItemParts/FlyoverItem';
|
|
28
28
|
import { getHeadingTag } from '../../../utils/headingVariant';
|
|
29
29
|
const GroupHeading = memo(function GroupHeading(props) {
|
|
30
|
-
const { qItem, readOnly, groupCardElevation, tabIsMarkedAsComplete, pageIsMarkedAsComplete,
|
|
30
|
+
const { qItem, readOnly, groupCardElevation, tabIsMarkedAsComplete, pageIsMarkedAsComplete, parentStyles } = props;
|
|
31
31
|
const requiredIndicatorPosition = useRendererStylingStore.use.requiredIndicatorPosition();
|
|
32
32
|
const { required, displayFlyover } = useRenderingExtensions(qItem);
|
|
33
33
|
const contextDisplayItems = getContextDisplays(qItem);
|
|
@@ -36,7 +36,7 @@ const GroupHeading = memo(function GroupHeading(props) {
|
|
|
36
36
|
// Get text color from parent styles if available
|
|
37
37
|
const textColor = (parentStyles === null || parentStyles === void 0 ? void 0 : parentStyles.color) ||
|
|
38
38
|
(readOnly && (!isTabHeading || !isPageHeading) ? 'text.secondary' : 'text.primary');
|
|
39
|
-
return (_jsx(_Fragment, { children: _jsxs(Box, { display: "flex", alignItems: "center", width: "100%", children: [_jsxs(Box, { position: "relative", display: "flex", flexGrow: 1, alignItems: "center", children: [required && requiredIndicatorPosition === 'start' ? (_jsx(RequiredAsterisk, { sx: { position: 'absolute', top: 0, left: -8 }, children: "*" })) : null, _jsxs(Typography, { component: getHeadingTag(groupCardElevation), variant: "groupHeading", color: textColor, display: "flex", alignItems: "center", sx: Object.assign({ flexGrow: 1 }, (parentStyles || {})), children: [_jsx(ItemTextSwitcher, { qItem: qItem
|
|
39
|
+
return (_jsx(_Fragment, { children: _jsxs(Box, { display: "flex", alignItems: "center", width: "100%", children: [_jsxs(Box, { position: "relative", display: "flex", flexGrow: 1, alignItems: "center", children: [required && requiredIndicatorPosition === 'start' ? (_jsx(RequiredAsterisk, { sx: { position: 'absolute', top: 0, left: -8 }, children: "*" })) : null, _jsxs(Typography, { component: getHeadingTag(groupCardElevation), variant: "groupHeading", color: textColor, display: "flex", alignItems: "center", sx: Object.assign({ flexGrow: 1 }, (parentStyles || {})), children: [_jsx(ItemTextSwitcher, { qItem: qItem }), required && requiredIndicatorPosition === 'end' ? (_jsx(RequiredAsterisk, { readOnly: readOnly, variant: "groupHeading", children: "*" })) : null, displayFlyover !== '' ? (_jsx(Typography, { component: "span", sx: { ml: 0.75 }, children: _jsx(FlyoverItem, { displayFlyover: displayFlyover, readOnly: readOnly }) })) : null] })] }), _jsx(Box, { display: "flex", columnGap: 0.5, children: contextDisplayItems.map((item) => {
|
|
40
40
|
return _jsx(ContextDisplayItem, { displayItem: item }, item.linkId);
|
|
41
41
|
}) })] }) }));
|
|
42
42
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"GroupHeading.js","sourceRoot":"","sources":["../../../../src/components/FormComponents/GroupItem/GroupHeading.tsx"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;GAeG;AAEH,OAAc,EAAE,IAAI,EAAE,MAAM,OAAO,CAAC;AACpC,OAAO,GAAG,MAAM,mBAAmB,CAAC;AACpC,OAAO,UAAU,MAAM,0BAA0B,CAAC;AAElD,OAAO,EAAE,kBAAkB,EAAE,MAAM,qBAAqB,CAAC;AACzD,OAAO,kBAAkB,MAAM,iCAAiC,CAAC;AACjE,OAAO,sBAAsB,MAAM,uCAAuC,CAAC;AAC3E,OAAO,EAAE,uBAAuB,EAAE,MAAM,iBAAiB,CAAC;AAC1D,OAAO,gBAAgB,MAAM,+BAA+B,CAAC;AAC7D,OAAO,gBAAgB,MAAM,+BAA+B,CAAC;AAC7D,OAAO,WAAW,MAAM,0BAA0B,CAAC;AACnD,OAAO,EAAE,aAAa,EAAE,MAAM,+BAA+B,CAAC;
|
|
1
|
+
{"version":3,"file":"GroupH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AAC,GAAG,IAAC,OAAO,EAAC,MAAM,EAAC,SAAS,EAAE,GAAG,YAC/B,mBAAmB,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE;wBAChC,OAAO,KAAC,kBAAkB,IAAmB,WAAW,EAAE,IAAI,IAA9B,IAAI,CAAC,MAAM,CAAuB,CAAC;oBACrE,CAAC,CAAC,GACE,IACF,GACL,CACJ,CAAC;AACJ,CAAC,CAAC,CAAC;AAEH,eAAe,YAAY,CAAC"}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import type { QuestionnaireItem, QuestionnaireResponseItem } from 'fhir/r4';
|
|
2
|
-
import type { PropsWithIsRepeatedAttribute, PropsWithItemPathAttribute, PropsWithParentIsReadOnlyAttribute, PropsWithParentIsRepeatGroupAttribute, PropsWithQrItemChangeHandler } from '../../../interfaces/renderProps.interface';
|
|
2
|
+
import type { PropsWithIsRepeatedAttribute, PropsWithItemPathAttribute, PropsWithParentIsReadOnlyAttribute, PropsWithParentIsRepeatGroupAttribute, PropsWithParentStylesAttribute, PropsWithQrItemChangeHandler } from '../../../interfaces/renderProps.interface';
|
|
3
3
|
import type { Tabs } from '../../../interfaces/tab.interface';
|
|
4
4
|
import type { Pages } from '../../../interfaces/page.interface';
|
|
5
|
-
interface GroupItemProps extends PropsWithQrItemChangeHandler, PropsWithItemPathAttribute, PropsWithIsRepeatedAttribute, PropsWithParentIsReadOnlyAttribute, PropsWithParentIsRepeatGroupAttribute {
|
|
5
|
+
interface GroupItemProps extends PropsWithQrItemChangeHandler, PropsWithItemPathAttribute, PropsWithIsRepeatedAttribute, PropsWithParentIsReadOnlyAttribute, PropsWithParentIsRepeatGroupAttribute, PropsWithParentStylesAttribute {
|
|
6
6
|
qItem: QuestionnaireItem;
|
|
7
7
|
qrItem: QuestionnaireResponseItem | null;
|
|
8
8
|
groupCardElevation: number;
|
|
@@ -13,7 +13,6 @@ interface GroupItemProps extends PropsWithQrItemChangeHandler, PropsWithItemPath
|
|
|
13
13
|
pageIsMarkedAsComplete?: boolean;
|
|
14
14
|
pages?: Pages;
|
|
15
15
|
currentPageIndex?: number;
|
|
16
|
-
parentStyles?: Record<string, string>;
|
|
17
16
|
}
|
|
18
17
|
declare function GroupItem(props: GroupItemProps): import("react/jsx-runtime").JSX.Element | null;
|
|
19
18
|
export default GroupItem;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"GroupItem.js","sourceRoot":"","sources":["../../../../src/components/FormComponents/GroupItem/GroupItem.tsx"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;GAeG;AAEH,OAAc,EAAE,OAAO,EAAE,MAAM,OAAO,CAAC;AACvC,OAAO,EAAE,eAAe,EAAE,cAAc,EAAE,MAAM,wBAAwB,CAAC;AAEzE,OAAO,EAAE,kBAAkB,EAAE,oBAAoB,EAAE,MAAM,uBAAuB,CAAC;
|
|
1
|
+
{"version":3,"file":"GroupItem.js","sourceRoot":"","sources":["../../../../src/components/FormComponents/GroupItem/GroupItem.tsx"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;GAeG;AAEH,OAAc,EAAE,OAAO,EAAE,MAAM,OAAO,CAAC;AACvC,OAAO,EAAE,eAAe,EAAE,cAAc,EAAE,MAAM,wBAAwB,CAAC;AAEzE,OAAO,EAAE,kBAAkB,EAAE,oBAAoB,EAAE,MAAM,uBAAuB,CAAC;AAUjF,OAAO,SAAS,MAAM,0BAA0B,CAAC;AAGjD,OAAO,aAAa,MAAM,iBAAiB,CAAC;AAC5C,OAAO,EAAE,kBAAkB,EAAE,MAAM,kBAAkB,CAAC;AACtD,OAAO,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAC;AAC/C,OAAO,kBAAkB,MAAM,qBAAqB,CAAC;AAsBrD,SAAS,SAAS,CAAC,KAAqB;IACtC,MAAM,EACJ,KAAK,EACL,MAAM,EACN,QAAQ,EACR,UAAU,EACV,kBAAkB,EAClB,eAAe,EACf,qBAAqB,EACrB,IAAI,EACJ,eAAe,EACf,sB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AE,UAAU,aAC3E,KAAC,SAAS,IAAC,SAAS,EAAE,kBAAkB,EAAE,UAAU,EAAE,UAAU,YAC9D,gJAE0B,GAAG,EAC3B,YACE,IAAI,EAAC,4GAA4G,EACjH,MAAM,EAAC,QAAQ,EACf,GAAG,EAAC,YAAY,2HAEd,EAAC,GAAG,+CAEP,GACO,EACZ,KAAC,kBAAkB,IAAC,gBAAgB,EAAE,gBAAgB,EAAE,KAAK,EAAE,KAAK,GAAI,IACrD,CACtB,CAAC;QACJ,CAAC;QAED,8CAA8C;QAC9C,OAAO,qGAAyE,CAAC;IACnF,CAAC;IAED,wDAAwD;IACxD,MAAM,cAAc,GAAG,eAAe,CAAC,MAAM,EAAE,OAAO,EAAE,cAAc,CAAC,CAAC;IAExE,OAAO,CACL,KAAC,aAAa,IACZ,KAAK,EAAE,KAAK,EACZ,WAAW,EAAE,MAAM,EACnB,cAAc,EAAE,cAAc,EAC9B,QAAQ,EAAE,QAAQ,EAClB,UAAU,EAAE,UAAU,EACtB,kBAAkB,EAAE,kBAAkB,EACtC,eAAe,EAAE,eAAe,EAChC,qBAAqB,EAAE,qBAAqB,EAC5C,IAAI,EAAE,IAAI,EACV,eAAe,EAAE,eAAe,EAChC,sBAAsB,EAAE,sBAAsB,EAC9C,KAAK,EAAE,KAAK,EACZ,gBAAgB,EAAE,gBAAgB,EAClC,gBAAgB,EAAE,gBAAgB,EAClC,mBAAmB,EAAE,mBAAmB,EACxC,sBAAsB,EAAE,sBAAsB,EAC9C,YAAY,EAAE,YAAY,EAC1B,cAAc,EAAE,kBAAkB,EAClC,qBAAqB,EAAE,yBAAyB,GAChD,CACH,CAAC;AACJ,CAAC;AAED,eAAe,SAAS,CAAC"}
|
|
@@ -1,10 +1,9 @@
|
|
|
1
|
-
import type { PropsWithItemPathAttribute, PropsWithParentIsReadOnlyAttribute, PropsWithParentIsRepeatGroupAttribute, PropsWithQrItemChangeHandler, PropsWithQrRepeatGroupChangeHandler } from '../../../interfaces/renderProps.interface';
|
|
1
|
+
import type { PropsWithItemPathAttribute, PropsWithParentIsReadOnlyAttribute, PropsWithParentIsRepeatGroupAttribute, PropsWithParentStylesAttribute, PropsWithQrItemChangeHandler, PropsWithQrRepeatGroupChangeHandler } from '../../../interfaces/renderProps.interface';
|
|
2
2
|
import type { QuestionnaireItem, QuestionnaireResponseItem } from 'fhir/r4';
|
|
3
|
-
interface GroupItemSwitcherProps extends PropsWithQrItemChangeHandler, PropsWithItemPathAttribute, PropsWithQrRepeatGroupChangeHandler, PropsWithParentIsReadOnlyAttribute, PropsWithParentIsRepeatGroupAttribute {
|
|
3
|
+
interface GroupItemSwitcherProps extends PropsWithQrItemChangeHandler, PropsWithItemPathAttribute, PropsWithQrRepeatGroupChangeHandler, PropsWithParentIsReadOnlyAttribute, PropsWithParentIsRepeatGroupAttribute, PropsWithParentStylesAttribute {
|
|
4
4
|
qItem: QuestionnaireItem;
|
|
5
5
|
qrItemOrItems: QuestionnaireResponseItem | QuestionnaireResponseItem[] | undefined;
|
|
6
6
|
groupCardElevation: number;
|
|
7
|
-
parentStyles?: Record<string, string>;
|
|
8
7
|
}
|
|
9
8
|
declare function GroupItemSwitcher(props: GroupItemSwitcherProps): import("react/jsx-runtime").JSX.Element | null;
|
|
10
9
|
export default GroupItemSwitcher;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"GroupItemSwitcher.js","sourceRoot":"","sources":["../../../../src/components/FormComponents/GroupItem/GroupItemSwitcher.tsx"],"names":[],"mappings":";
|
|
1
|
+
{"version":3,"file":"GroupItemSwitcher.js","sourceRoot":"","sources":["../../../../src/components/FormComponents/GroupItem/GroupItemSwitcher.tsx"],"names":[],"mappings":";AA2BA,OAAO,EAAE,0BAA0B,EAAE,qBAAqB,EAAE,MAAM,gBAAgB,CAAC;AACnF,OAAO,UAAU,MAAM,sBAAsB,CAAC;AAC9C,OAAO,WAAW,MAAM,4BAA4B,CAAC;AACrD,OAAO,UAAU,MAAM,0BAA0B,CAAC;AAClD,O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C,UAAU,IACT,KAAK,EAAE,KAAK,EACZ,OAAO,EAAE,MAAM,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,EAAE,EAC/B,QAAQ,EAAE,QAAQ,EAClB,kBAAkB,EAAE,kBAAkB,EACtC,UAAU,EAAE,KAAK,EACjB,gBAAgB,EAAE,gBAAgB,EAClC,qBAAqB,EAAE,qBAAqB,EAC5C,YAAY,EAAE,YAAY,GAC1B,CACH,CAAC;QACJ,CAAC;QAED,OAAO,CACL,KAAC,SAAS,IACR,KAAK,EAAE,KAAK,EACZ,MAAM,EAAE,MAAM,aAAN,MAAM,cAAN,MAAM,GAAI,IAAI,EACtB,QAAQ,EAAE,QAAQ,EAClB,UAAU,EAAE,KAAK,EACjB,kBAAkB,EAAE,kBAAkB,EACtC,gBAAgB,EAAE,gBAAgB,EAClC,mBAAmB,EAAE,mBAAmB,EACxC,sBAAsB,EAAE,sBAAsB,EAC9C,cAAc,EAAE,cAAc,EAC9B,YAAY,EAAE,YAAY,GAC1B,CACH,CAAC;IACJ,CAAC;IAED,uCAAuC;IACvC,OAAO,CACL,KAAC,UAAU,IACT,KAAK,EAAE,KAAK,EACZ,MAAM,EAAE,MAAM,aAAN,MAAM,cAAN,MAAM,GAAI,IAAI,EACtB,QAAQ,EAAE,QAAQ,EAClB,UAAU,EAAE,KAAK,EACjB,QAAQ,EAAE,KAAK,EACf,kBAAkB,EAAE,kBAAkB,EACtC,gBAAgB,EAAE,gBAAgB,EAClC,mBAAmB,EAAE,mBAAmB,EACxC,sBAAsB,EAAE,sBAAsB,EAC9C,cAAc,EAAE,cAAc,EAC9B,YAAY,EAAE,YAAY,GAC1B,CACH,CAAC;AACJ,CAAC;AAED,eAAe,iBAAiB,CAAC"}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import type { QuestionnaireItem, QuestionnaireResponseItem } from 'fhir/r4';
|
|
2
|
-
import type { PropsWithIsRepeatedAttribute, PropsWithItemPathAttribute, PropsWithParentIsReadOnlyAttribute, PropsWithParentIsRepeatGroupAttribute, PropsWithQrItemChangeHandler, PropsWithQrRepeatGroupChangeHandler } from '../../../interfaces/renderProps.interface';
|
|
2
|
+
import type { PropsWithIsRepeatedAttribute, PropsWithItemPathAttribute, PropsWithParentIsReadOnlyAttribute, PropsWithParentIsRepeatGroupAttribute, PropsWithParentStylesAttribute, PropsWithQrItemChangeHandler, PropsWithQrRepeatGroupChangeHandler } from '../../../interfaces/renderProps.interface';
|
|
3
3
|
import type { Tabs } from '../../../interfaces/tab.interface';
|
|
4
4
|
import type { Pages } from '../../../interfaces/page.interface';
|
|
5
|
-
interface GroupItemViewProps extends PropsWithQrItemChangeHandler, PropsWithItemPathAttribute, PropsWithQrRepeatGroupChangeHandler, PropsWithIsRepeatedAttribute, PropsWithParentIsReadOnlyAttribute, PropsWithParentIsRepeatGroupAttribute {
|
|
5
|
+
interface GroupItemViewProps extends PropsWithQrItemChangeHandler, PropsWithItemPathAttribute, PropsWithQrRepeatGroupChangeHandler, PropsWithIsRepeatedAttribute, PropsWithParentIsReadOnlyAttribute, PropsWithParentIsRepeatGroupAttribute, PropsWithParentStylesAttribute {
|
|
6
6
|
qItem: QuestionnaireItem;
|
|
7
7
|
childQItems: QuestionnaireItem[];
|
|
8
8
|
qrItemsByIndex: (QuestionnaireResponseItem | QuestionnaireResponseItem[] | undefined)[];
|
|
@@ -14,7 +14,6 @@ interface GroupItemViewProps extends PropsWithQrItemChangeHandler, PropsWithItem
|
|
|
14
14
|
pageIsMarkedAsComplete?: boolean;
|
|
15
15
|
pages?: Pages;
|
|
16
16
|
currentPageIndex?: number;
|
|
17
|
-
parentStyles?: Record<string, string>;
|
|
18
17
|
}
|
|
19
18
|
declare function GroupItemView(props: GroupItemViewProps): import("react/jsx-runtime").JSX.Element;
|
|
20
19
|
export default GroupItemView;
|