@aehrc/smart-forms-renderer 0.36.1 → 0.38.2

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.
Files changed (164) hide show
  1. package/CHANGELOG.md +40 -0
  2. package/lib/components/FormComponents/Button.styles.d.ts +4 -0
  3. package/lib/components/FormComponents/Button.styles.js +10 -0
  4. package/lib/components/FormComponents/Button.styles.js.map +1 -0
  5. package/lib/components/FormComponents/GroupItem/GroupHeading.d.ts +1 -0
  6. package/lib/components/FormComponents/GroupItem/GroupHeading.js +3 -2
  7. package/lib/components/FormComponents/GroupItem/GroupHeading.js.map +1 -1
  8. package/lib/components/FormComponents/GroupItem/GroupItem.d.ts +4 -0
  9. package/lib/components/FormComponents/GroupItem/GroupItem.js +3 -3
  10. package/lib/components/FormComponents/GroupItem/GroupItem.js.map +1 -1
  11. package/lib/components/FormComponents/GroupItem/GroupItemView.d.ts +4 -0
  12. package/lib/components/FormComponents/GroupItem/GroupItemView.js +8 -5
  13. package/lib/components/FormComponents/GroupItem/GroupItemView.js.map +1 -1
  14. package/lib/components/FormComponents/GroupItem/NextPageButton.d.ts +7 -0
  15. package/lib/{hooks/useQueryClient.js → components/FormComponents/GroupItem/NextPageButton.js} +9 -12
  16. package/lib/components/FormComponents/GroupItem/NextPageButton.js.map +1 -0
  17. package/lib/components/FormComponents/GroupItem/PageButtonWrapper.d.ts +8 -0
  18. package/lib/components/FormComponents/GroupItem/PageButtonWrapper.js +46 -0
  19. package/lib/components/FormComponents/GroupItem/PageButtonWrapper.js.map +1 -0
  20. package/lib/components/FormComponents/GroupItem/PreviousPageButton.d.ts +7 -0
  21. package/lib/components/FormComponents/GroupItem/PreviousPageButton.js +26 -0
  22. package/lib/components/FormComponents/GroupItem/PreviousPageButton.js.map +1 -0
  23. package/lib/components/FormComponents/QuantityItem/QuantityComparatorField.d.ts +12 -0
  24. package/lib/components/FormComponents/QuantityItem/QuantityComparatorField.js +13 -0
  25. package/lib/components/FormComponents/QuantityItem/QuantityComparatorField.js.map +1 -0
  26. package/lib/components/FormComponents/QuantityItem/QuantityField.d.ts +15 -0
  27. package/lib/components/FormComponents/QuantityItem/QuantityField.js +14 -0
  28. package/lib/components/FormComponents/QuantityItem/QuantityField.js.map +1 -0
  29. package/lib/components/FormComponents/{DateTimeItem/DateTimeItem.d.ts → QuantityItem/QuantityItem.d.ts} +3 -3
  30. package/lib/components/FormComponents/QuantityItem/QuantityItem.js +144 -0
  31. package/lib/components/FormComponents/QuantityItem/QuantityItem.js.map +1 -0
  32. package/lib/components/FormComponents/QuantityItem/QuantityUnitField.d.ts +12 -0
  33. package/lib/components/FormComponents/QuantityItem/QuantityUnitField.js +10 -0
  34. package/lib/components/FormComponents/QuantityItem/QuantityUnitField.js.map +1 -0
  35. package/lib/components/FormComponents/SingleItem/SingleItemSwitcher.js +2 -1
  36. package/lib/components/FormComponents/SingleItem/SingleItemSwitcher.js.map +1 -1
  37. package/lib/components/Renderer/BaseRenderer.js +8 -0
  38. package/lib/components/Renderer/BaseRenderer.js.map +1 -1
  39. package/lib/components/Renderer/FormBodyPage.d.ts +9 -0
  40. package/lib/components/Renderer/FormBodyPage.js +43 -0
  41. package/lib/components/Renderer/FormBodyPage.js.map +1 -0
  42. package/lib/components/Renderer/FormTopLevelItem.js +7 -0
  43. package/lib/components/Renderer/FormTopLevelItem.js.map +1 -1
  44. package/lib/components/Renderer/FormTopLevelPage.d.ts +9 -0
  45. package/lib/components/Renderer/FormTopLevelPage.js +29 -0
  46. package/lib/components/Renderer/FormTopLevelPage.js.map +1 -0
  47. package/lib/hooks/useDecimalCalculatedExpression.d.ts +2 -2
  48. package/lib/hooks/useNextAndPreviousVisiblePages.d.ts +7 -0
  49. package/lib/hooks/useNextAndPreviousVisiblePages.js +47 -0
  50. package/lib/hooks/useNextAndPreviousVisiblePages.js.map +1 -0
  51. package/lib/hooks/useQuantityCalculatedExpression.d.ts +14 -0
  52. package/lib/hooks/useQuantityCalculatedExpression.js +105 -0
  53. package/lib/hooks/useQuantityCalculatedExpression.js.map +1 -0
  54. package/lib/hooks/useRenderingExtensions.d.ts +2 -1
  55. package/lib/hooks/useRenderingExtensions.js +3 -2
  56. package/lib/hooks/useRenderingExtensions.js.map +1 -1
  57. package/lib/hooks/useStringInput.js +1 -0
  58. package/lib/hooks/useStringInput.js.map +1 -1
  59. package/lib/interfaces/page.interface.d.ts +16 -0
  60. package/lib/interfaces/page.interface.js +2 -0
  61. package/lib/interfaces/page.interface.js.map +1 -0
  62. package/lib/interfaces/questionnaireStore.interface.d.ts +2 -0
  63. package/lib/interfaces/valueSet.interface.d.ts +15 -0
  64. package/lib/stores/questionnaireStore.d.ts +13 -0
  65. package/lib/stores/questionnaireStore.js +19 -3
  66. package/lib/stores/questionnaireStore.js.map +1 -1
  67. package/lib/utils/calculatedExpression.js +4 -1
  68. package/lib/utils/calculatedExpression.js.map +1 -1
  69. package/lib/utils/initialise.d.ts +3 -0
  70. package/lib/utils/initialise.js +6 -1
  71. package/lib/utils/initialise.js.map +1 -1
  72. package/lib/utils/itemControl.d.ts +7 -1
  73. package/lib/utils/itemControl.js +14 -0
  74. package/lib/utils/itemControl.js.map +1 -1
  75. package/lib/utils/page.d.ts +43 -0
  76. package/lib/utils/page.js +101 -0
  77. package/lib/utils/page.js.map +1 -0
  78. package/lib/utils/quantity.d.ts +4 -0
  79. package/lib/utils/quantity.js +49 -0
  80. package/lib/utils/quantity.js.map +1 -0
  81. package/lib/utils/questionnaireStoreUtils/createQuestionaireModel.js +4 -0
  82. package/lib/utils/questionnaireStoreUtils/createQuestionaireModel.js.map +1 -1
  83. package/lib/utils/questionnaireStoreUtils/extractPages.d.ts +3 -0
  84. package/lib/utils/questionnaireStoreUtils/extractPages.js +18 -0
  85. package/lib/utils/questionnaireStoreUtils/extractPages.js.map +1 -0
  86. package/lib/utils/valueSet.d.ts +2 -1
  87. package/lib/utils/valueSet.js +22 -0
  88. package/lib/utils/valueSet.js.map +1 -1
  89. package/package.json +4 -4
  90. package/src/components/FormComponents/Button.styles.ts +10 -0
  91. package/src/components/FormComponents/GroupItem/GroupHeading.tsx +5 -3
  92. package/src/components/FormComponents/GroupItem/GroupItem.tsx +11 -1
  93. package/src/components/FormComponents/GroupItem/GroupItemView.tsx +12 -0
  94. package/src/components/FormComponents/GroupItem/NextPageButton.tsx +37 -0
  95. package/src/components/FormComponents/GroupItem/PageButtonWrapper.tsx +78 -0
  96. package/src/components/FormComponents/GroupItem/PreviousPageButton.tsx +41 -0
  97. package/src/components/FormComponents/QuantityItem/QuantityComparatorField.tsx +40 -0
  98. package/src/components/FormComponents/QuantityItem/QuantityField.tsx +60 -0
  99. package/src/components/FormComponents/QuantityItem/QuantityItem.tsx +286 -0
  100. package/src/components/FormComponents/QuantityItem/QuantityUnitField.tsx +38 -0
  101. package/src/components/FormComponents/SingleItem/SingleItemSwitcher.tsx +2 -1
  102. package/src/components/Renderer/BaseRenderer.tsx +21 -0
  103. package/src/components/Renderer/FormBodyPage.tsx +93 -0
  104. package/src/components/Renderer/FormTopLevelItem.tsx +17 -0
  105. package/src/components/Renderer/FormTopLevelPage.tsx +70 -0
  106. package/src/hooks/useDecimalCalculatedExpression.ts +2 -2
  107. package/src/hooks/useNextAndPreviousVisiblePages.ts +69 -0
  108. package/src/hooks/useQuantityCalculatedExpression.ts +177 -0
  109. package/src/hooks/useRenderingExtensions.ts +5 -2
  110. package/src/hooks/useStringInput.ts +1 -0
  111. package/src/interfaces/page.interface.ts +13 -0
  112. package/src/interfaces/questionnaireStore.interface.ts +2 -0
  113. package/src/interfaces/valueSet.interface.ts +19 -0
  114. package/src/stores/questionnaireStore.ts +33 -2
  115. package/src/stories/assets/questionnaires/AuCoreTestingJson/AuCoreAllergyIntolerance.json +1 -1
  116. package/src/stories/assets/questionnaires/AuCoreTestingJson/AuCoreCondition.json +1 -1
  117. package/src/stories/assets/questionnaires/AuCoreTestingJson/AuCoreEncounter.json +137 -58
  118. package/src/stories/assets/questionnaires/AuCoreTestingJson/AuCoreImmunization.json +175 -0
  119. package/src/stories/assets/questionnaires/AuCoreTestingJson/AuCoreMedicationRequest.json +229 -0
  120. package/src/stories/assets/questionnaires/AuCoreTestingJson/AuCoreObservationBP.json +359 -0
  121. package/src/stories/assets/questionnaires/AuCoreTestingJson/AuCoreObservationBodyHeight.json +195 -0
  122. package/src/stories/assets/questionnaires/AuCoreTestingJson/AuCoreObservationBodyWeight.json +195 -0
  123. package/src/stories/assets/questionnaires/AuCoreTestingJson/AuCoreObservationHeartRate.json +195 -0
  124. package/src/stories/assets/questionnaires/AuCoreTestingJson/AuCoreObservationSmokingStatus.json +174 -0
  125. package/src/stories/assets/questionnaires/AuCoreTestingJson/AuCorePatient.json +495 -0
  126. package/src/stories/assets/questionnaires/AuCoreTestingJson/AuCorePractitioner.json +139 -0
  127. package/src/stories/assets/questionnaires/AuCoreTestingJson/AuCorePractitionerRole.json +216 -0
  128. package/src/stories/assets/questionnaires/AuCoreTestingJson/AuCoreProcedure.json +199 -0
  129. package/src/stories/assets/questionnaires/AuCoreTestingJson/AuCoreRespirationRate.json +195 -0
  130. package/src/stories/assets/questionnaires/AuCoreTestingJson/AuCoreWaistCircumference.json +195 -0
  131. package/src/stories/assets/questionnaires/QAuCoreTesting.ts +3342 -1
  132. package/src/stories/assets/questionnaires/QItemControlGroup.ts +673 -0
  133. package/src/stories/assets/questionnaires/QPrePopTester.ts +30 -0
  134. package/src/stories/assets/questionnaires/QQuantity.ts +283 -1
  135. package/src/stories/itemTypes/Quantity.stories.tsx +33 -1
  136. package/src/stories/sdc/ItemControlGroup.stories.tsx +22 -1
  137. package/src/stories/testing/AuCoreTester.stories.tsx +140 -1
  138. package/src/utils/calculatedExpression.ts +5 -1
  139. package/src/utils/initialise.ts +11 -0
  140. package/src/utils/itemControl.ts +19 -1
  141. package/src/utils/page.ts +134 -0
  142. package/src/utils/quantity.ts +62 -0
  143. package/src/utils/questionnaireStoreUtils/createQuestionaireModel.ts +5 -0
  144. package/src/utils/questionnaireStoreUtils/extractPages.ts +24 -0
  145. package/src/utils/valueSet.ts +32 -1
  146. package/lib/components/FormComponents/DateTimeItem/DateTimeField.d.ts +0 -12
  147. package/lib/components/FormComponents/DateTimeItem/DateTimeField.js +0 -34
  148. package/lib/components/FormComponents/DateTimeItem/DateTimeField.js.map +0 -1
  149. package/lib/components/FormComponents/DateTimeItem/DateTimeItem.js +0 -60
  150. package/lib/components/FormComponents/DateTimeItem/DateTimeItem.js.map +0 -1
  151. package/lib/hooks/useDisplayCalculatedExpression.d.ts +0 -3
  152. package/lib/hooks/useDisplayCalculatedExpression.js +0 -40
  153. package/lib/hooks/useDisplayCalculatedExpression.js.map +0 -1
  154. package/lib/hooks/useInitialiseRenderer.d.ts +0 -4
  155. package/lib/hooks/useInitialiseRenderer.js +0 -85
  156. package/lib/hooks/useInitialiseRenderer.js.map +0 -1
  157. package/lib/hooks/useQueryClient.d.ts +0 -3
  158. package/lib/hooks/useQueryClient.js.map +0 -1
  159. package/lib/utils/buildForm.d.ts +0 -8
  160. package/lib/utils/buildForm.js +0 -26
  161. package/lib/utils/buildForm.js.map +0 -1
  162. package/stats.html +0 -4842
  163. package/stats1.html +0 -4842
  164. package/stats3.html +0 -4842
package/CHANGELOG.md ADDED
@@ -0,0 +1,40 @@
1
+ #### 0.36.1 (2024-07-23)
2
+
3
+ ##### Chores
4
+
5
+ * Add changelog_guide.md to .gitignore ([ca2a8558](https://github.com/aehrc/smart-forms/commit/ca2a85587592f681cb9db6501bafff3c663a7bd6))
6
+
7
+ ##### Bug Fixes
8
+
9
+ * retrieve new encounter for re-population ([652b2d03](https://github.com/aehrc/smart-forms/commit/652b2d03cd9eb500bd2182be6236a1c920e9bc66))
10
+
11
+ ##### Other Changes
12
+
13
+ * //smartforms.csiro.au/api/fhir' env to deployed $assemble ([dfef7f57](https://github.com/aehrc/smart-forms/commit/dfef7f57259ff80ad3b94bcd0ac0792ff6c28ab2))
14
+ * disable Format JSON button when editor is not in view ([d7792c35](https://github.com/aehrc/smart-forms/commit/d7792c359742302baf939b4bd7a2c8e5298139d1))
15
+ * true to renderer ([82fc29b5](https://github.com/aehrc/smart-forms/commit/82fc29b5bf9a87176d57a6661a330b7a61bbace5))
16
+ * true ([c5cfb692](https://github.com/aehrc/smart-forms/commit/c5cfb6923d97358b1f6e5f376360d29fca5bb1e6))
17
+ * //jira.hl7.org/browse/FHIR-41279 ([8c44bb8b](https://github.com/aehrc/smart-forms/commit/8c44bb8b62486c30df94c97e9b757eb2abc1a9cf))
18
+ * 3000 cypress tests ([c62388f3](https://github.com/aehrc/smart-forms/commit/c62388f385afa2f8901a306c42ccc13211f242b1))
19
+ * 3000 ([9934f7b9](https://github.com/aehrc/smart-forms/commit/9934f7b9cf74be622314f9b51113ef92d2ae0886))
20
+ * 3001 ([e701352b](https://github.com/aehrc/smart-forms/commit/e701352b7123e91cea8646648e0dd8cefbe0ed71))
21
+ * Remove out-of-place-looking debug bar label ([b4990852](https://github.com/aehrc/smart-forms/commit/b4990852d7f24289bda7b9a59b4c020fad68e0cf))
22
+ * Fix form rendering ([36baf7b1](https://github.com/aehrc/smart-forms/commit/36baf7b14df73f1c998fad08ee0d4e42e026536a))
23
+ * Testfeature enableWhen checks toggle ([160635a3](https://github.com/aehrc/smart-forms/commit/160635a303e02f4442cf6e8a8e1c00bebf18b151))
24
+ * Add text display prompt and instructions functionality ([67d67452](https://github.com/aehrc/smart-forms/commit/67d6745204832934d26a138f5ecc277448411873))
25
+ * Feature enablewhen ([b79c9190](https://github.com/aehrc/smart-forms/commit/b79c919048075ecd3bc45ba3e54aa034433f2c24))
26
+ * Feature calculated expressions ([065db5cb](https://github.com/aehrc/smart-forms/commit/065db5cbaa9d6cadb9090e8ba9e1c73d5ecadcd8))
27
+ * Feature smart launch from launch route ([1fc1aad3](https://github.com/aehrc/smart-forms/commit/1fc1aad375ff315e2183888b1235e261638c2ef8))
28
+ * Refactor form components ([1ec14063](https://github.com/aehrc/smart-forms/commit/1ec140633cffa9a8aed98d4520c0b2314dff4186))
29
+ * Refactor form components ([a9cdd6dc](https://github.com/aehrc/smart-forms/commit/a9cdd6dc9056ad325174f07b9c5dc6123a38c4e8))
30
+ * Feature tabs v2 ([c94a5739](https://github.com/aehrc/smart-forms/commit/c94a5739c073b1959c6536c1a060121392fdb43a))
31
+ * Add QItemTime form component ([a6594ac7](https://github.com/aehrc/smart-forms/commit/a6594ac75bd3c70e9f9a341284cacdba1c36c910))
32
+ * Fix use fhir r5 specification ([d7985657](https://github.com/aehrc/smart-forms/commit/d798565725b528539fc1afa01aa7da10ed80e232))
33
+ * Fix base Choice form component pass orientation props ([64481d0e](https://github.com/aehrc/smart-forms/commit/64481d0e1f2c6420c29c15ea19c3ddad1231de3a))
34
+ * Implement choice orientation ([c668add9](https://github.com/aehrc/smart-forms/commit/c668add9e6ecb326e7ac8499ab994fd394679d4c))
35
+ * Feature hidden questions ([83e978ea](https://github.com/aehrc/smart-forms/commit/83e978eaa1ee831e7a7406e7bb8e1d9d62812916))
36
+ * Feature repeats ([13acda31](https://github.com/aehrc/smart-forms/commit/13acda310dd997c9368aad0413e8b57794dc7338))
37
+ * Feature form components ([975ad066](https://github.com/aehrc/smart-forms/commit/975ad06649ed300b299831e95ffe265766fa7495))
38
+ * Fix write questionnaire response ([aae2595d](https://github.com/aehrc/smart-forms/commit/aae2595d722e6522fb992a90ccf0df09b91410f0))
39
+ * Feature read write questionnaire response ([cc851a35](https://github.com/aehrc/smart-forms/commit/cc851a3534ea7073c5a4438590e8a7dd8231f922))
40
+
@@ -0,0 +1,4 @@
1
+ /// <reference types="react" />
2
+ export declare const SecondaryFab: import("@emotion/styled").StyledComponent<import("@mui/material/Fab").FabOwnProps & Omit<import("@mui/material").ButtonBaseOwnProps, "classes"> & import("@mui/material/OverridableComponent").CommonProps & Omit<Omit<import("react").DetailedHTMLProps<import("react").ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, "ref"> & {
3
+ ref?: ((instance: HTMLButtonElement | null) => void) | import("react").RefObject<HTMLButtonElement> | null | undefined;
4
+ }, "disabled" | "style" | "color" | "children" | "href" | "className" | "tabIndex" | "sx" | "classes" | "action" | "size" | "variant" | "centerRipple" | "disableRipple" | "disableTouchRipple" | "focusRipple" | "focusVisibleClassName" | "LinkComponent" | "onFocusVisible" | "TouchRippleProps" | "touchRippleRef" | "disableFocusRipple"> & import("@mui/system").MUIStyledCommonProps<import("@mui/material/styles").Theme>, {}, {}>;
@@ -0,0 +1,10 @@
1
+ import { styled } from '@mui/material/styles';
2
+ import Fab from '@mui/material/Fab';
3
+ export const SecondaryFab = styled(Fab)(({ theme }) => ({
4
+ color: '#fff',
5
+ background: theme.palette.secondary.main,
6
+ '&:hover': {
7
+ background: theme.palette.secondary.dark
8
+ }
9
+ }));
10
+ //# sourceMappingURL=Button.styles.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Button.styles.js","sourceRoot":"","sources":["../../../src/components/FormComponents/Button.styles.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,sBAAsB,CAAC;AAC9C,OAAO,GAAG,MAAM,mBAAmB,CAAC;AAEpC,MAAM,CAAC,MAAM,YAAY,GAAG,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,KAAK,EAAE,EAAE,EAAE,CAAC,CAAC;IACtD,KAAK,EAAE,MAAM;IACb,UAAU,EAAE,KAAK,CAAC,OAAO,CAAC,SAAS,CAAC,IAAI;IACxC,SAAS,EAAE;QACT,UAAU,EAAE,KAAK,CAAC,OAAO,CAAC,SAAS,CAAC,IAAI;KACzC;CACF,CAAC,CAAC,CAAC"}
@@ -5,6 +5,7 @@ interface GroupHeadingProps extends PropsWithIsRepeatedAttribute {
5
5
  qItem: QuestionnaireItem;
6
6
  readOnly: boolean;
7
7
  tabIsMarkedAsComplete?: boolean;
8
+ pageIsMarkedAsComplete?: boolean;
8
9
  }
9
10
  declare const GroupHeading: React.NamedExoticComponent<GroupHeadingProps>;
10
11
  export default GroupHeading;
@@ -22,15 +22,16 @@ import { getContextDisplays } from '../../../utils/tabs';
22
22
  import ContextDisplayItem from '../ItemParts/ContextDisplayItem';
23
23
  import ItemLabelText from '../ItemParts/ItemLabelText';
24
24
  const GroupHeading = memo(function GroupHeading(props) {
25
- const { qItem, readOnly, tabIsMarkedAsComplete, isRepeated } = props;
25
+ const { qItem, readOnly, tabIsMarkedAsComplete, pageIsMarkedAsComplete, isRepeated } = props;
26
26
  const contextDisplayItems = getContextDisplays(qItem);
27
27
  if (isRepeated) {
28
28
  return null;
29
29
  }
30
30
  const isTabHeading = tabIsMarkedAsComplete !== undefined;
31
+ const isPageHeading = pageIsMarkedAsComplete !== undefined;
31
32
  return (React.createElement(React.Fragment, null,
32
33
  React.createElement(Box, { display: "flex", alignItems: "center", width: "100%" },
33
- React.createElement(Typography, { variant: "h6", fontSize: isTabHeading ? 16 : 15, color: readOnly && !isTabHeading ? 'text.secondary' : 'text.primary' },
34
+ React.createElement(Typography, { variant: "h6", fontSize: isTabHeading || isPageHeading ? 16 : 15, color: readOnly && (!isTabHeading || !isPageHeading) ? 'text.secondary' : 'text.primary' },
34
35
  React.createElement(ItemLabelText, { qItem: qItem })),
35
36
  React.createElement(Box, { flexGrow: 1 }),
36
37
  React.createElement(Box, { display: "flex", columnGap: 0.5, mx: 1 }, contextDisplayItems.map((item) => {
@@ -1 +1 @@
1
- {"version":3,"file":"GroupHeading.js","sourceRoot":"","sources":["../../../../src/components/FormComponents/GroupItem/GroupHeading.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAEH,OAAO,KAAK,EAAE,EAAE,IAAI,EAAE,MAAM,OAAO,CAAC;AACpC,OAAO,GAAG,MAAM,mBAAmB,CAAC;AACpC,OAAO,OAAO,MAAM,uBAAuB,CAAC;AAC5C,OAAO,UAAU,MAAM,0BAA0B,CAAC;AAGlD,OAAO,EAAE,kBAAkB,EAAE,MAAM,qBAAqB,CAAC;AACzD,OAAO,kBAAkB,MAAM,iCAAiC,CAAC;AACjE,OAAO,aAAa,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IAAC,KAAK,EAAE,KAAK,GAAI,CACpB;YACb,oBAAC,GAAG,IAAC,QAAQ,EAAE,CAAC,GAAI;YACpB,oBAAC,GAAG,IAAC,OAAO,EAAC,MAAM,EAAC,SAAS,EAAE,GAAG,EAAE,EAAE,EAAE,CAAC,IACtC,mBAAmB,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE;gBAChC,OAAO,oBAAC,kBAAkB,IAAC,GAAG,EAAE,IAAI,CAAC,MAAM,EAAE,WAAW,EAAE,IAAI,GAAI,CAAC;YACrE,CAAC,CAAC,CACE,CACF;QACL,KAAK,CAAC,IAAI,CAAC,CAAC,CAAC,oBAAC,OAAO,IAAC,EAAE,EAAE,EAAE,EAAE,EAAE,CAAC,EAAE,EAAE,EAAE,GAAG,EAAE,EAAE,KAAK,SAAG,CAAC,CAAC,CAAC,IAAI,CAC7D,CACJ,CAAC;AACJ,CAAC,CAAC,CAAC;AAEH,eAAe,YAAY,CAAC"}
@@ -2,6 +2,7 @@ import React from 'react';
2
2
  import type { QuestionnaireItem, QuestionnaireResponseItem } from 'fhir/r4';
3
3
  import type { PropsWithIsRepeatedAttribute, PropsWithParentIsReadOnlyAttribute, PropsWithParentIsRepeatGroupAttribute, PropsWithQrItemChangeHandler } from '../../../interfaces/renderProps.interface';
4
4
  import type { Tabs } from '../../../interfaces/tab.interface';
5
+ import type { Pages } from '../../../interfaces/page.interface';
5
6
  interface GroupItemProps extends PropsWithQrItemChangeHandler, PropsWithIsRepeatedAttribute, PropsWithParentIsReadOnlyAttribute, PropsWithParentIsRepeatGroupAttribute {
6
7
  qItem: QuestionnaireItem;
7
8
  qrItem: QuestionnaireResponseItem | null;
@@ -9,6 +10,9 @@ interface GroupItemProps extends PropsWithQrItemChangeHandler, PropsWithIsRepeat
9
10
  tabIsMarkedAsComplete?: boolean;
10
11
  tabs?: Tabs;
11
12
  currentTabIndex?: number;
13
+ pageIsMarkedAsComplete?: boolean;
14
+ pages?: Pages;
15
+ currentPageIndex?: number;
12
16
  }
13
17
  declare function GroupItem(props: GroupItemProps): React.JSX.Element | null;
14
18
  export default GroupItem;
@@ -20,7 +20,7 @@ import { createEmptyQrGroup, updateQrItemsInGroup } from '../../../utils/qrItem'
20
20
  import useHidden from '../../../hooks/useHidden';
21
21
  import GroupItemView from './GroupItemView';
22
22
  function GroupItem(props) {
23
- const { qItem, qrItem, isRepeated, groupCardElevation, tabIsMarkedAsComplete, tabs, currentTabIndex, parentIsReadOnly, parentIsRepeatGroup, parentRepeatGroupIndex, onQrItemChange } = props;
23
+ const { qItem, qrItem, isRepeated, groupCardElevation, tabIsMarkedAsComplete, tabs, currentTabIndex, pageIsMarkedAsComplete, pages, currentPageIndex, parentIsReadOnly, parentIsRepeatGroup, parentRepeatGroupIndex, onQrItemChange } = props;
24
24
  const qItemsIndexMap = useMemo(() => mapQItemsIndex(qItem), [qItem]);
25
25
  const itemIsHidden = useHidden(qItem, parentRepeatGroupIndex);
26
26
  if (itemIsHidden) {
@@ -41,11 +41,11 @@ function GroupItem(props) {
41
41
  onQrItemChange(updatedQrGroup);
42
42
  }
43
43
  if (!qItems || !qrItems) {
44
- return React.createElement(React.Fragment, null, "Unable to load group, something has gone terribly wrong.");
44
+ return React.createElement(React.Fragment, null, "Group Item: Unable to load group, something has gone terribly wrong.");
45
45
  }
46
46
  // If an item has multiple answers, it is a repeat group
47
47
  const qrItemsByIndex = getQrItemsIndex(qItems, qrItems, qItemsIndexMap);
48
- return (React.createElement(GroupItemView, { qItem: qItem, childQItems: qItems, qrItemsByIndex: qrItemsByIndex, isRepeated: isRepeated, groupCardElevation: groupCardElevation, tabIsMarkedAsComplete: tabIsMarkedAsComplete, tabs: tabs, currentTabIndex: currentTabIndex, parentIsReadOnly: parentIsReadOnly, parentIsRepeatGroup: parentIsRepeatGroup, parentRepeatGroupIndex: parentRepeatGroupIndex, onQrItemChange: handleQrItemChange, onQrRepeatGroupChange: handleQrRepeatGroupChange }));
48
+ return (React.createElement(GroupItemView, { qItem: qItem, childQItems: qItems, qrItemsByIndex: qrItemsByIndex, isRepeated: isRepeated, groupCardElevation: groupCardElevation, tabIsMarkedAsComplete: tabIsMarkedAsComplete, tabs: tabs, currentTabIndex: currentTabIndex, pageIsMarkedAsComplete: pageIsMarkedAsComplete, pages: pages, currentPageIndex: currentPageIndex, parentIsReadOnly: parentIsReadOnly, parentIsRepeatGroup: parentIsRepeatGroup, parentRepeatGroupIndex: parentRepeatGroupIndex, onQrItemChange: handleQrItemChange, onQrRepeatGroupChange: handleQrRepeatGroupChange }));
49
49
  }
50
50
  export default GroupItem;
51
51
  //# sourceMappingURL=GroupItem.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"GroupItem.js","sourceRoot":"","sources":["../../../../src/components/FormComponents/GroupItem/GroupItem.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAEH,OAAO,KAAK,EAAE,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;AAQjF,OAAO,SAAS,MAAM,0BAA0B,CAAC;AAEjD,OAAO,aAAa,MAAM,iBAAiB,CAAC;AAe5C,SAAS,SAAS,CAAC,KAAqB;IACtC,MAAM,EACJ,KAAK,EACL,MAAM,EACN,UAAU,EACV,kBAAkB,EAClB,qBAAqB,EACrB,IAAI,EACJ,eAAe,EACf,gBAAgB,EAChB,mBAAmB,EACnB,sBAAsB,EACtB,cAAc,EACf,GAAG,KAAK,CAAC;IAEV,MAAM,cAAc,GAAG,OAAO,CAAC,GAAG,EAAE,CAAC,cAAc,CAAC,KAAK,CAAC,EAAE,CAAC,KAAK,CAAC,CAAC,CAAC;IAErE,MAAM,YAAY,GAAG,SAAS,CAAC,KAAK,EAAE,sBAAsB,CAAC,CAAC;IAC9D,IAAI,YAAY,EAAE;QAChB,OAAO,IAAI,CAAC;K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CAAC,SAAS,EAAE,IAAI,EAAE,cAAc,EAAE,cAAc,CAAC,CAAC;QACtE,cAAc,CAAC,cAAc,CAAC,CAAC;IACjC,CAAC;IAED,SAAS,yBAAyB,CAAC,aAA4B;QAC7D,MAAM,cAAc,qBAAmC,OAAO,CAAE,CAAC;QACjE,oBAAoB,CAAC,IAAI,EAAE,aAAa,EAAE,cAAc,EAAE,cAAc,CAAC,CAAC;QAC1E,cAAc,CAAC,cAAc,CAAC,CAAC;IACjC,CAAC;IAED,IAAI,CAAC,MAAM,IAAI,CAAC,OAAO,EAAE;QACvB,OAAO,iHAAyE,CAAC;KAClF;IAED,wDAAwD;IACxD,MAAM,cAAc,GAAG,eAAe,CAAC,MAAM,EAAE,OAAO,EAAE,cAAc,CAAC,CAAC;IAExE,OAAO,CACL,oBAAC,aAAa,IACZ,KAAK,EAAE,KAAK,EACZ,WAAW,EAAE,MAAM,EACnB,cAAc,EAAE,cAAc,EAC9B,UAAU,EAAE,UAAU,EACtB,kBAAkB,EAAE,kBAAkB,EACtC,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,cAAc,EAAE,kBAAkB,EAClC,qBAAqB,EAAE,yBAAyB,GAChD,CACH,CAAC;AACJ,CAAC;AAED,eAAe,SAAS,CAAC"}
@@ -2,6 +2,7 @@ import React from 'react';
2
2
  import type { QuestionnaireItem, QuestionnaireResponseItem } from 'fhir/r4';
3
3
  import type { PropsWithIsRepeatedAttribute, PropsWithParentIsReadOnlyAttribute, PropsWithParentIsRepeatGroupAttribute, PropsWithQrItemChangeHandler, PropsWithQrRepeatGroupChangeHandler } from '../../../interfaces/renderProps.interface';
4
4
  import type { Tabs } from '../../../interfaces/tab.interface';
5
+ import type { Pages } from '../../../interfaces/page.interface';
5
6
  interface GroupItemViewProps extends PropsWithQrItemChangeHandler, PropsWithQrRepeatGroupChangeHandler, PropsWithIsRepeatedAttribute, PropsWithParentIsReadOnlyAttribute, PropsWithParentIsRepeatGroupAttribute {
6
7
  qItem: QuestionnaireItem;
7
8
  childQItems: QuestionnaireItem[];
@@ -10,6 +11,9 @@ interface GroupItemViewProps extends PropsWithQrItemChangeHandler, PropsWithQrRe
10
11
  tabIsMarkedAsComplete?: boolean;
11
12
  tabs?: Tabs;
12
13
  currentTabIndex?: number;
14
+ pageIsMarkedAsComplete?: boolean;
15
+ pages?: Pages;
16
+ currentPageIndex?: number;
13
17
  }
14
18
  declare function GroupItemView(props: GroupItemViewProps): React.JSX.Element;
15
19
  export default GroupItemView;
@@ -27,8 +27,9 @@ import Divider from '@mui/material/Divider';
27
27
  import { getGroupCollapsible } from '../../../utils/qItem';
28
28
  import useReadOnly from '../../../hooks/useReadOnly';
29
29
  import { GroupAccordion } from './GroupAccordion.styles';
30
+ import PageButtonsWrapper from './PageButtonWrapper';
30
31
  function GroupItemView(props) {
31
- const { qItem, childQItems, qrItemsByIndex, isRepeated, groupCardElevation, tabIsMarkedAsComplete, tabs, currentTabIndex, parentIsReadOnly, parentIsRepeatGroup, parentRepeatGroupIndex, onQrItemChange, onQrRepeatGroupChange } = props;
32
+ const { qItem, childQItems, qrItemsByIndex, isRepeated, groupCardElevation, tabIsMarkedAsComplete, tabs, currentTabIndex, pageIsMarkedAsComplete, pages, currentPageIndex, parentIsReadOnly, parentIsRepeatGroup, parentRepeatGroupIndex, onQrItemChange, onQrRepeatGroupChange } = props;
32
33
  const readOnly = useReadOnly(qItem, parentIsReadOnly);
33
34
  // Render collapsible group item
34
35
  // If group item is a repeating instance, do not render group item as collapsible
@@ -39,7 +40,7 @@ function GroupItemView(props) {
39
40
  transition: { unmountOnExit: true, timeout: 250 }
40
41
  } },
41
42
  React.createElement(AccordionSummary, { expandIcon: React.createElement(ExpandMoreIcon, null), sx: { minHeight: '28px' } },
42
- React.createElement(GroupHeading, { qItem: qItem, readOnly: readOnly, tabIsMarkedAsComplete: tabIsMarkedAsComplete, isRepeated: isRepeated })),
43
+ React.createElement(GroupHeading, { qItem: qItem, readOnly: readOnly, tabIsMarkedAsComplete: tabIsMarkedAsComplete, pageIsMarkedAsComplete: pageIsMarkedAsComplete, isRepeated: isRepeated })),
43
44
  React.createElement(AccordionDetails, { sx: { pt: 0 } },
44
45
  qItem.text ? React.createElement(Divider, { sx: { mb: 1.5 }, light: true }) : null,
45
46
  React.createElement(React.Fragment, null,
@@ -47,16 +48,18 @@ function GroupItemView(props) {
47
48
  const qrItemOrItems = qrItemsByIndex[i];
48
49
  return (React.createElement(GroupItemSwitcher, { key: qItem.linkId, qItem: qItem, qrItemOrItems: qrItemOrItems, groupCardElevation: groupCardElevation, parentIsReadOnly: readOnly, parentIsRepeatGroup: parentIsRepeatGroup, parentRepeatGroupIndex: parentRepeatGroupIndex, onQrItemChange: onQrItemChange, onQrRepeatGroupChange: onQrRepeatGroupChange }));
49
50
  }),
50
- React.createElement(TabButtonsWrapper, { currentTabIndex: currentTabIndex, tabs: tabs })))));
51
+ React.createElement(TabButtonsWrapper, { currentTabIndex: currentTabIndex, tabs: tabs }),
52
+ React.createElement(PageButtonsWrapper, { currentPageIndex: currentPageIndex, pages: pages })))));
51
53
  }
52
54
  return (React.createElement(QGroupContainerBox, { cardElevation: groupCardElevation, isRepeated: isRepeated, "data-test": "q-item-group-box" },
53
55
  React.createElement(GroupCard, { elevation: groupCardElevation, isRepeated: isRepeated },
54
- React.createElement(GroupHeading, { qItem: qItem, readOnly: readOnly, tabIsMarkedAsComplete: tabIsMarkedAsComplete, isRepeated: isRepeated }),
56
+ React.createElement(GroupHeading, { qItem: qItem, readOnly: readOnly, tabIsMarkedAsComplete: tabIsMarkedAsComplete, pageIsMarkedAsComplete: pageIsMarkedAsComplete, isRepeated: isRepeated }),
55
57
  childQItems.map((qItem, i) => {
56
58
  const qrItemOrItems = qrItemsByIndex[i];
57
59
  return (React.createElement(GroupItemSwitcher, { key: qItem.linkId, qItem: qItem, qrItemOrItems: qrItemOrItems, groupCardElevation: groupCardElevation, parentIsReadOnly: readOnly, parentIsRepeatGroup: parentIsRepeatGroup, parentRepeatGroupIndex: parentRepeatGroupIndex, onQrItemChange: onQrItemChange, onQrRepeatGroupChange: onQrRepeatGroupChange }));
58
60
  }),
59
- React.createElement(TabButtonsWrapper, { currentTabIndex: currentTabIndex, tabs: tabs }))));
61
+ React.createElement(TabButtonsWrapper, { currentTabIndex: currentTabIndex, tabs: tabs }),
62
+ React.createElement(PageButtonsWrapper, { currentPageIndex: currentPageIndex, pages: pages }))));
60
63
  }
61
64
  export default GroupItemView;
62
65
  //# sourceMappingURL=GroupItemView.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"GroupItemView.js","sourceRoot":"","sources":["../../../../src/components/FormComponents/GroupItem/GroupItemView.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAEH,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAE,kBAAkB,EAAE,MAAM,kBAAkB,CAAC;AAStD,OAAO,YAAY,MAAM,gBAAgB,CAAC;AAC1C,OAAO,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAC;AAC/C,OAAO,iBAAiB,MAAM,qBAAqB,CAAC;AACpD,OAAO,iBAAiB,MAAM,qBAAqB,CAAC;AACpD,OAAO,gBAAgB,MAAM,gCAAgC,CAAC;AAC9D,OAAO,cAAc,MAAM,gCAAgC,CAAC;AAC5D,OAAO,gBAAgB,MAAM,gCAAgC,CAAC;AAC9D,OAAO,OAAO,MAAM,uBAAuB,CAAC;AAC5C,OAAO,EAAE,mBAAmB,EAAE,MAAM,sBAAsB,CAAC;AAC3D,OAAO,WAAW,MAAM,4BAA4B,CAAC;AACrD,OAAO,EAAE,cAAc,EAAE,MAAM,yBAAyB,CAAC;AAiB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,CAAC;YAGF,oBAAC,iBAAiB,IAAC,eAAe,EAAE,eAAe,EAAE,IAAI,EAAE,IAAI,GAAI,CACzD,CACO,CACtB,CAAC;AACJ,CAAC;AAED,eAAe,aAAa,CAAC"}
1
+ {"version":3,"file":"GroupItemView.js","sourceRoot":"","sources":["../../../../src/components/FormComponents/GroupItem/GroupItemView.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAEH,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAE,kBAAkB,EAAE,MAAM,kBAAkB,CAAC;AAUtD,OAAO,YAAY,MAAM,gBAAgB,CAAC;AAC1C,OAAO,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAC;AAC/C,OAAO,iBAAiB,MAAM,qBAAqB,CAAC;AACpD,OAAO,iBAAiB,MAAM,qBAAqB,CAAC;AACpD,OAAO,gBAAgB,MAAM,gCAAgC,CAAC;AAC9D,OAAO,cAAc,MAAM,gCAAgC,CAAC;AAC5D,OAAO,gBAAgB,MAAM,gCAAgC,CAAC;AAC9D,OAAO,OAAO,MAAM,uBAAuB,CAAC;AAC5C,OAAO,EAAE,mBAAmB,EAAE,MAAM,sBAAsB,CAAC;AAC3D,OAAO,WAAW,MAAM,4BAA4B,CAAC;AACrD,OAAO,EAAE,cAAc,EAAE,MAAM,yBAAyB,CAAC;AACzD,OAAO,kBAAkB,MAAM,qBAAqB,CAAC;AAoBrD,SAAS,aAAa,CAAC,KAAyB;IAC9C,MAAM,EACJ,KAAK,EACL,WAAW,EACX,cAAc,EACd,UAAU,EACV,kBAAkB,EAClB,qBAAqB,EACrB,IAAI,EACJ,eAAe,EACf,sBAAsB,EACtB,KAAK,EACL,gBAAgB,EAChB,gBAAgB,EAChB,mBAAmB,EACnB,sBAAsB,EACtB,cAAc,EACd,qBAAqB,EACtB,GAAG,KAAK,CAAC;IAEV,MAAM,QAAQ,GAAG,WAAW,CAAC,KAAK,EAAE,gBAAgB,CAAC,CAAC;IAEtD,g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C9D,CACO,CACtB,CAAC;AACJ,CAAC;AAED,eAAe,aAAa,CAAC"}
@@ -0,0 +1,7 @@
1
+ import React from 'react';
2
+ interface NextPageButtonProps {
3
+ isDisabled: boolean;
4
+ onNextPageClick: () => void;
5
+ }
6
+ declare function NextPageButton(props: NextPageButtonProps): React.JSX.Element;
7
+ export default NextPageButton;
@@ -14,16 +14,13 @@
14
14
  * See the License for the specific language governing permissions and
15
15
  * limitations under the License.
16
16
  */
17
- import { QueryClient } from '@tanstack/react-query';
18
- function useQueryClient() {
19
- return new QueryClient({
20
- defaultOptions: {
21
- queries: {
22
- refetchOnWindowFocus: false,
23
- keepPreviousData: true
24
- }
25
- }
26
- });
17
+ import React from 'react';
18
+ import Iconify from '../../Iconify/Iconify';
19
+ import { SecondaryFab } from '../Button.styles';
20
+ function NextPageButton(props) {
21
+ const { isDisabled, onNextPageClick } = props;
22
+ return (React.createElement(SecondaryFab, { size: "small", "aria-label": "next", disabled: isDisabled, onClick: onNextPageClick },
23
+ React.createElement(Iconify, { icon: "material-symbols:chevron-right-rounded" })));
27
24
  }
28
- export default useQueryClient;
29
- //# sourceMappingURL=useQueryClient.js.map
25
+ export default NextPageButton;
26
+ //# sourceMappingURL=NextPageButton.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"NextPageButton.js","sourceRoot":"","sources":["../../../../src/components/FormComponents/GroupItem/NextPageButton.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAEH,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,OAAO,MAAM,uBAAuB,CAAC;AAC5C,OAAO,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC;AAOhD,SAAS,cAAc,CAAC,KAA0B;IAChD,MAAM,EAAE,UAAU,EAAE,eAAe,EAAE,GAAG,KAAK,CAAC;IAE9C,OAAO,CACL,oBAAC,YAAY,IAAC,IAAI,EAAC,OAAO,gBAAY,MAAM,EAAC,QAAQ,EAAE,UAAU,EAAE,OAAO,EAAE,eAAe;QACzF,oBAAC,OAAO,IAAC,IAAI,EAAC,wCAAwC,GAAG,CAC5C,CAChB,CAAC;AACJ,CAAC;AAED,eAAe,cAAc,CAAC"}
@@ -0,0 +1,8 @@
1
+ import React from 'react';
2
+ import type { Pages } from '../../../interfaces/page.interface';
3
+ interface PageButtonsWrapperProps {
4
+ currentPageIndex?: number;
5
+ pages?: Pages;
6
+ }
7
+ declare const PageButtonsWrapper: React.NamedExoticComponent<PageButtonsWrapperProps>;
8
+ export default PageButtonsWrapper;
@@ -0,0 +1,46 @@
1
+ import React, { memo } from 'react';
2
+ import Box from '@mui/material/Box';
3
+ import Typography from '@mui/material/Typography';
4
+ import { useQuestionnaireStore } from '../../../stores';
5
+ import NextPageButton from './NextPageButton';
6
+ import PreviousPageButton from './PreviousPageButton';
7
+ import useNextAndPreviousVisiblePages from '../../../hooks/useNextAndPreviousVisiblePages';
8
+ const PageButtonsWrapper = memo(function PageButtonsWrapper(props) {
9
+ const { currentPageIndex, pages } = props;
10
+ const switchPage = useQuestionnaireStore.use.switchPage();
11
+ const { previousPageIndex, nextPageIndex, numOfVisiblePages } = useNextAndPreviousVisiblePages(currentPageIndex, pages);
12
+ const pagesNotDefined = currentPageIndex === undefined || pages === undefined;
13
+ // Event handlers
14
+ function handlePreviousPageButtonClick() {
15
+ if (previousPageIndex === null) {
16
+ return;
17
+ }
18
+ switchPage(previousPageIndex);
19
+ // Scroll to top of page
20
+ window.scrollTo(0, 0);
21
+ }
22
+ function handleNextPageButtonClick() {
23
+ if (nextPageIndex === null) {
24
+ return;
25
+ }
26
+ switchPage(nextPageIndex);
27
+ // Scroll to top of page
28
+ window.scrollTo(0, 0);
29
+ }
30
+ if (pagesNotDefined) {
31
+ return null;
32
+ }
33
+ const previousPageButtonHidden = previousPageIndex === null;
34
+ const nextPageButtonHidden = nextPageIndex === null;
35
+ // This is more of a fallback check to prevent the user from navigating to an invisble page if buttons are visble for some reason
36
+ const pageButtonsDisabled = numOfVisiblePages <= 1;
37
+ return (React.createElement(Box, { display: "flex", mt: 3, gap: 2, alignItems: "center" },
38
+ React.createElement(Box, { flexGrow: 1 }),
39
+ React.createElement(Typography, { variant: "subtitle2", color: "text.secondary" },
40
+ "Page ",
41
+ `${currentPageIndex + 1} / ${numOfVisiblePages}`),
42
+ React.createElement(PreviousPageButton, { isDisabled: pageButtonsDisabled || previousPageButtonHidden, onPreviousPageClick: handlePreviousPageButtonClick }),
43
+ React.createElement(NextPageButton, { isDisabled: pageButtonsDisabled || nextPageButtonHidden, onNextPageClick: handleNextPageButtonClick })));
44
+ });
45
+ export default PageButtonsWrapper;
46
+ //# sourceMappingURL=PageButtonWrapper.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"PageButtonWrapper.js","sourceRoot":"","sources":["../../../../src/components/FormComponents/GroupItem/PageButtonWrapper.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,IAAI,EAAE,MAAM,OAAO,CAAC;AACpC,OAAO,GAAG,MAAM,mBAAmB,CAAC;AACpC,OAAO,UAAU,MAAM,0BAA0B,CAAC;AAElD,OAAO,EAAE,qBAAqB,EAAE,MAAM,iBAAiB,CAAC;AACxD,OAAO,cAAc,MAAM,kBAAkB,CAAC;AAC9C,OAAO,kBAAkB,MAAM,sBAAsB,CAAC;AACtD,OAAO,8BAA8B,MAAM,+CAA+C,CAAC;AAO3F,MAAM,kBAAkB,GAAG,IAAI,CAAC,SAAS,kBAAkB,CAAC,KAA8B;IACxF,MAAM,EAAE,gBAAgB,EAAE,KAAK,EAAE,GAAG,KAAK,CAAC;IAE1C,MAAM,UAAU,GAAG,qBAAqB,CAAC,GAAG,CAAC,UAAU,EAAE,CAAC;IAE1D,MAAM,EAAE,iBAAiB,EAAE,aAAa,EAAE,iBAAiB,EAAE,GAAG,8BAA8B,CAC5F,gBAAgB,EAChB,KAAK,CACN,CAAC;IAEF,MAAM,eAAe,GAAG,gBAAgB,KAAK,SAAS,IAAI,KAAK,KAAK,SAAS,C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
1
+ import React from 'react';
2
+ interface PreviousPageButtonProps {
3
+ isDisabled: boolean;
4
+ onPreviousPageClick: () => void;
5
+ }
6
+ declare function PreviousPageButton(props: PreviousPageButtonProps): React.JSX.Element;
7
+ export default PreviousPageButton;
@@ -0,0 +1,26 @@
1
+ /*
2
+ * Copyright 2024 Commonwealth Scientific and Industrial Research
3
+ * Organisation (CSIRO) ABN 41 687 119 230.
4
+ *
5
+ * Licensed under the Apache License, Version 2.0 (the "License");
6
+ * you may not use this file except in compliance with the License.
7
+ * You may obtain a copy of the License at
8
+ *
9
+ * http://www.apache.org/licenses/LICENSE-2.0
10
+ *
11
+ * Unless required by applicable law or agreed to in writing, software
12
+ * distributed under the License is distributed on an "AS IS" BASIS,
13
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
+ * See the License for the specific language governing permissions and
15
+ * limitations under the License.
16
+ */
17
+ import React from 'react';
18
+ import Iconify from '../../Iconify/Iconify';
19
+ import { SecondaryFab } from '../Button.styles';
20
+ function PreviousPageButton(props) {
21
+ const { isDisabled, onPreviousPageClick } = props;
22
+ return (React.createElement(SecondaryFab, { size: "small", "aria-label": "back", disabled: isDisabled, onClick: onPreviousPageClick },
23
+ React.createElement(Iconify, { icon: "material-symbols:chevron-left-rounded" })));
24
+ }
25
+ export default PreviousPageButton;
26
+ //# sourceMappingURL=PreviousPageButton.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"PreviousPageButton.js","sourceRoot":"","sources":["../../../../src/components/FormComponents/GroupItem/PreviousPageButton.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAEH,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,OAAO,MAAM,uBAAuB,CAAC;AAC5C,OAAO,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC;AAOhD,SAAS,kBAAkB,CAAC,KAA8B;IACxD,MAAM,EAAE,UAAU,EAAE,mBAAmB,EAAE,GAAG,KAAK,CAAC;IAElD,OAAO,CACL,oBAAC,YAAY,IACX,IAAI,EAAC,OAAO,gBACD,MAAM,EACjB,QAAQ,EAAE,UAAU,EACpB,OAAO,EAAE,mBAAmB;QAC5B,oBAAC,OAAO,IAAC,IAAI,EAAC,uCAAuC,GAAG,CAC3C,CAChB,CAAC;AACJ,CAAC;AAED,eAAe,kBAAkB,CAAC"}
@@ -0,0 +1,12 @@
1
+ import React from 'react';
2
+ import type { PropsWithIsTabledAttribute } from '../../../interfaces/renderProps.interface';
3
+ import type { Quantity } from 'fhir/r4';
4
+ interface QuantityComparatorFieldProps extends PropsWithIsTabledAttribute {
5
+ linkId: string;
6
+ options: Quantity['comparator'][];
7
+ valueSelect: Quantity['comparator'] | null;
8
+ readOnly: boolean;
9
+ onChange: (newValue: Quantity['comparator'] | null) => void;
10
+ }
11
+ declare function QuantityComparatorField(props: QuantityComparatorFieldProps): React.JSX.Element;
12
+ export default QuantityComparatorField;
@@ -0,0 +1,13 @@
1
+ import React from 'react';
2
+ import Autocomplete from '@mui/material/Autocomplete';
3
+ import MuiTextField from '../TextItem/MuiTextField';
4
+ import Box from '@mui/material/Box';
5
+ import Typography from '@mui/material/Typography';
6
+ function QuantityComparatorField(props) {
7
+ const { linkId, options, valueSelect, readOnly, onChange } = props;
8
+ return (React.createElement(Box, null,
9
+ React.createElement(Autocomplete, { id: linkId + '-comparator', value: valueSelect !== null && valueSelect !== void 0 ? valueSelect : null, options: options, onChange: (_, newValue) => onChange(newValue), autoHighlight: true, sx: { width: 88 }, disabled: readOnly, size: "small", renderInput: (params) => React.createElement(MuiTextField, Object.assign({ sx: { width: 88 } }, params)) }),
10
+ React.createElement(Typography, { variant: "caption", color: "text.secondary" }, "Symbol (optional)")));
11
+ }
12
+ export default QuantityComparatorField;
13
+ //# sourceMappingURL=QuantityComparatorField.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"QuantityComparatorField.js","sourceRoot":"","sources":["../../../../src/components/FormComponents/QuantityItem/QuantityComparatorField.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,YAAY,MAAM,4BAA4B,CAAC;AAEtD,OAAO,YAAY,MAAM,0BAA0B,CAAC;AACpD,OAAO,GAAG,MAAM,mBAAmB,CAAC;AACpC,OAAO,UAAU,MAAM,0BAA0B,CAAC;AAWlD,SAAS,uBAAuB,CAAC,KAAmC;IAClE,MAAM,EAAE,MAAM,EAAE,OAAO,EAAE,WAAW,EAAE,QAAQ,EAAE,QAAQ,EAAE,GAAG,KAAK,CAAC;IAEnE,OAAO,CACL,oBAAC,GAAG;QACF,oBAAC,YAAY,IACX,EAAE,EAAE,MAAM,GAAG,aAAa,EAC1B,KAAK,EAAE,WAAW,aAAX,WAAW,cAAX,WAAW,GAAI,IAAI,EAC1B,OAAO,EAAE,OAAO,EAChB,QAAQ,EAAE,CAAC,CAAC,EAAE,QAAQ,EAAE,EAAE,CAAC,QAAQ,CAAC,QAAkC,CAAC,EACvE,aAAa,QACb,EAAE,EAAE,EAAE,KAAK,EAAE,EAAE,EAAE,EACjB,QAAQ,EAAE,QAAQ,EAClB,IAAI,EAAC,OAAO,EACZ,WAAW,EAAE,CAAC,MAAM,EAAE,EAAE,CAAC,oBAAC,YAAY,kBAAC,EAAE,EAAE,EAAE,KAAK,EAAE,EAAE,EAAE,IAAM,MAAM,EAAI,GACxE;QACF,oBAAC,UAAU,IAAC,OAAO,EAAC,SAAS,EAAC,KAAK,EAAC,gBAAgB,wBAEvC,CACT,CACP,CAAC;AACJ,CAAC;AAED,eAAe,uBAAuB,CAAC"}
@@ -0,0 +1,15 @@
1
+ import React from 'react';
2
+ import type { PropsWithIsTabledAttribute } from '../../../interfaces/renderProps.interface';
3
+ interface QuantityFieldProps extends PropsWithIsTabledAttribute {
4
+ linkId: string;
5
+ input: string;
6
+ feedback: string;
7
+ displayPrompt: string;
8
+ displayUnit: string;
9
+ entryFormat: string;
10
+ readOnly: boolean;
11
+ calcExpUpdated: boolean;
12
+ onInputChange: (value: string) => void;
13
+ }
14
+ declare function QuantityField(props: QuantityFieldProps): React.JSX.Element;
15
+ export default QuantityField;
@@ -0,0 +1,14 @@
1
+ import React from 'react';
2
+ import InputAdornment from '@mui/material/InputAdornment';
3
+ import FadingCheckIcon from '../ItemParts/FadingCheckIcon';
4
+ import { StandardTextField } from '../Textfield.styles';
5
+ function QuantityField(props) {
6
+ const { linkId, input, feedback, displayPrompt, displayUnit, entryFormat, readOnly, calcExpUpdated, isTabled, onInputChange } = props;
7
+ return (React.createElement(StandardTextField, { id: linkId, value: input, error: !!feedback, onChange: (event) => onInputChange(event.target.value), disabled: readOnly, label: displayPrompt, placeholder: entryFormat === '' ? '0.0' : entryFormat, fullWidth: true, isTabled: isTabled, size: "small", inputProps: { inputMode: 'numeric', pattern: '[0-9]*' }, InputProps: {
8
+ endAdornment: (React.createElement(InputAdornment, { position: 'end' },
9
+ React.createElement(FadingCheckIcon, { fadeIn: calcExpUpdated, disabled: readOnly }),
10
+ displayUnit))
11
+ }, helperText: feedback, "data-test": "q-item-quantity-field" }));
12
+ }
13
+ export default QuantityField;
14
+ //# sourceMappingURL=QuantityField.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"QuantityField.js","sourceRoot":"","sources":["../../../../src/components/FormComponents/QuantityItem/QuantityField.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,cAAc,MAAM,8BAA8B,CAAC;AAC1D,OAAO,eAAe,MAAM,8BAA8B,CAAC;AAC3D,OAAO,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AAexD,SAAS,aAAa,CAAC,KAAyB;IAC9C,MAAM,EACJ,MAAM,EACN,KAAK,EACL,QAAQ,EACR,aAAa,EACb,WAAW,EACX,WAAW,EACX,QAAQ,EACR,cAAc,EACd,QAAQ,EACR,aAAa,EACd,GAAG,KAAK,CAAC;IAEV,OAAO,CACL,oBAAC,iBAAiB,IAChB,EAAE,EAAE,MAAM,EACV,KAAK,EAAE,KAAK,EACZ,KAAK,EAAE,CAAC,CAAC,QAAQ,EACjB,QAAQ,EAAE,CAAC,KAAK,EAAE,EAAE,CAAC,aAAa,CAAC,KAAK,CAAC,MAAM,CAAC,KAAK,CAAC,EACtD,QAAQ,EAAE,QAAQ,EAClB,KAAK,EAAE,aAAa,EACpB,WAAW,EAAE,WAAW,KAAK,EAAE,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,WAAW,EACrD,SAAS,QACT,QAAQ,EAAE,QAAQ,EAClB,IAAI,EAAC,OAAO,EACZ,UAAU,EAAE,EAAE,SAAS,EAAE,SAAS,EAAE,OAAO,EAAE,QAAQ,EAAE,EACvD,UAAU,EAAE;YACV,YAAY,EAAE,CACZ,oBAAC,cAAc,IAAC,QAAQ,EAAE,KAAK;gBAC7B,oBAAC,eAAe,IAAC,MAAM,EAAE,cAAc,EAAE,QAAQ,EAAE,QAAQ,GAAI;gBAC9D,WAAW,CACG,CAClB;SACF,EACD,UAAU,EAAE,QAAQ,eACV,uBAAuB,GACjC,CACH,CAAC;AACJ,CAAC;AAED,eAAe,aAAa,CAAC"}
@@ -1,9 +1,9 @@
1
1
  import React from 'react';
2
2
  import type { PropsWithIsRepeatedAttribute, PropsWithIsTabledAttribute, PropsWithParentIsReadOnlyAttribute, PropsWithQrItemChangeHandler } from '../../../interfaces/renderProps.interface';
3
3
  import type { QuestionnaireItem, QuestionnaireResponseItem } from 'fhir/r4';
4
- interface DateTimeItemProps extends PropsWithQrItemChangeHandler, PropsWithIsRepeatedAttribute, PropsWithIsTabledAttribute, PropsWithParentIsReadOnlyAttribute {
4
+ interface QuantityItemProps extends PropsWithQrItemChangeHandler, PropsWithIsRepeatedAttribute, PropsWithIsTabledAttribute, PropsWithParentIsReadOnlyAttribute {
5
5
  qItem: QuestionnaireItem;
6
6
  qrItem: QuestionnaireResponseItem | null;
7
7
  }
8
- declare function DateTimeItem(props: DateTimeItemProps): React.JSX.Element;
9
- export default DateTimeItem;
8
+ declare function QuantityItem(props: QuantityItemProps): React.JSX.Element;
9
+ export default QuantityItem;