@aehrc/smart-forms-renderer 0.6.0 → 0.6.3

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 (191) hide show
  1. package/README.md +59 -0
  2. package/lib/components/FormComponents/TextItem/MuiTextField.d.ts +3 -0
  3. package/lib/components/{FormRenderer/index.js → FormComponents/TextItem/MuiTextField.js} +4 -3
  4. package/lib/components/FormComponents/TextItem/MuiTextField.js.map +1 -0
  5. package/lib/components/FormComponents/TextItem/TextField.js +2 -1
  6. package/lib/components/FormComponents/TextItem/TextField.js.map +1 -1
  7. package/lib/components/Renderer/FormBodyTabbed.js +2 -1
  8. package/lib/components/Renderer/FormBodyTabbed.js.map +1 -1
  9. package/lib/index.d.ts +1 -1
  10. package/lib/index.js +1 -1
  11. package/lib/index.js.map +1 -1
  12. package/lib/theme/Theme.js +2 -2
  13. package/lib/theme/Theme.js.map +1 -1
  14. package/lib/theme/customGlobalStyles.d.ts +2 -0
  15. package/lib/theme/{globalStyles.js → customGlobalStyles.js} +4 -4
  16. package/lib/theme/customGlobalStyles.js.map +1 -0
  17. package/package.json +15 -4
  18. package/{lib/hooks/useTestContext.js → src/components/FormComponents/TextItem/MuiTextField.ts} +6 -11
  19. package/src/components/FormComponents/TextItem/TextField.tsx +2 -1
  20. package/src/components/Renderer/FormBodyTabbed.tsx +2 -1
  21. package/src/index.ts +1 -1
  22. package/src/theme/Theme.tsx +2 -2
  23. package/src/theme/{globalStyles.tsx → customGlobalStyles.tsx} +3 -3
  24. package/lib/api/populate.d.ts +0 -8
  25. package/lib/api/populate.js +0 -63
  26. package/lib/api/populate.js.map +0 -1
  27. package/lib/components/FormComponents/ChoiceItems/ChoiceRadio.d.ts +0 -8
  28. package/lib/components/FormComponents/ChoiceItems/ChoiceRadio.js +0 -25
  29. package/lib/components/FormComponents/ChoiceItems/ChoiceRadio.js.map +0 -1
  30. package/lib/components/FormComponents/ChoiceItems/ChoiceRadioButton.d.ts +0 -8
  31. package/lib/components/FormComponents/ChoiceItems/ChoiceRadioButton.js +0 -25
  32. package/lib/components/FormComponents/ChoiceItems/ChoiceRadioButton.js.map +0 -1
  33. package/lib/components/FormComponents/ChoiceItems/ChoiceRadioSingleItem.d.ts +0 -8
  34. package/lib/components/FormComponents/ChoiceItems/ChoiceRadioSingleItem.js +0 -25
  35. package/lib/components/FormComponents/ChoiceItems/ChoiceRadioSingleItem.js.map +0 -1
  36. package/lib/components/FormComponents/ChoiceItems/QItemChoice.d.ts +0 -9
  37. package/lib/components/FormComponents/ChoiceItems/QItemChoice.js +0 -61
  38. package/lib/components/FormComponents/ChoiceItems/QItemChoice.js.map +0 -1
  39. package/lib/components/FormComponents/ChoiceItems/QItemChoiceAutocomplete.d.ts +0 -9
  40. package/lib/components/FormComponents/ChoiceItems/QItemChoiceAutocomplete.js +0 -89
  41. package/lib/components/FormComponents/ChoiceItems/QItemChoiceAutocomplete.js.map +0 -1
  42. package/lib/components/FormComponents/ChoiceItems/QItemChoiceCheckboxAnswerOption.d.ts +0 -11
  43. package/lib/components/FormComponents/ChoiceItems/QItemChoiceCheckboxAnswerOption.js +0 -70
  44. package/lib/components/FormComponents/ChoiceItems/QItemChoiceCheckboxAnswerOption.js.map +0 -1
  45. package/lib/components/FormComponents/ChoiceItems/QItemChoiceCheckboxAnswerValueSet.d.ts +0 -11
  46. package/lib/components/FormComponents/ChoiceItems/QItemChoiceCheckboxAnswerValueSet.js +0 -67
  47. package/lib/components/FormComponents/ChoiceItems/QItemChoiceCheckboxAnswerValueSet.js.map +0 -1
  48. package/lib/components/FormComponents/ChoiceItems/QItemChoiceRadioAnswerOption.d.ts +0 -11
  49. package/lib/components/FormComponents/ChoiceItems/QItemChoiceRadioAnswerOption.js +0 -70
  50. package/lib/components/FormComponents/ChoiceItems/QItemChoiceRadioAnswerOption.js.map +0 -1
  51. package/lib/components/FormComponents/ChoiceItems/QItemChoiceRadioAnswerValueSet.d.ts +0 -11
  52. package/lib/components/FormComponents/ChoiceItems/QItemChoiceRadioAnswerValueSet.js +0 -72
  53. package/lib/components/FormComponents/ChoiceItems/QItemChoiceRadioAnswerValueSet.js.map +0 -1
  54. package/lib/components/FormComponents/ChoiceItems/QItemChoiceRadioSingle.d.ts +0 -8
  55. package/lib/components/FormComponents/ChoiceItems/QItemChoiceRadioSingle.js +0 -25
  56. package/lib/components/FormComponents/ChoiceItems/QItemChoiceRadioSingle.js.map +0 -1
  57. package/lib/components/FormComponents/ChoiceItems/QItemChoiceSelectAnswerOption.d.ts +0 -9
  58. package/lib/components/FormComponents/ChoiceItems/QItemChoiceSelectAnswerOption.js +0 -73
  59. package/lib/components/FormComponents/ChoiceItems/QItemChoiceSelectAnswerOption.js.map +0 -1
  60. package/lib/components/FormComponents/ChoiceItems/QItemChoiceSelectAnswerValueSet.d.ts +0 -9
  61. package/lib/components/FormComponents/ChoiceItems/QItemChoiceSelectAnswerValueSet.js +0 -82
  62. package/lib/components/FormComponents/ChoiceItems/QItemChoiceSelectAnswerValueSet.js.map +0 -1
  63. package/lib/components/FormComponents/ItemParts/CheckboxWithOpenLabel.d.ts +0 -10
  64. package/lib/components/FormComponents/ItemParts/CheckboxWithOpenLabel.js +0 -35
  65. package/lib/components/FormComponents/ItemParts/CheckboxWithOpenLabel.js.map +0 -1
  66. package/lib/components/FormComponents/ItemParts/QItemCheckboxSingle.d.ts +0 -10
  67. package/lib/components/FormComponents/ItemParts/QItemCheckboxSingle.js +0 -25
  68. package/lib/components/FormComponents/ItemParts/QItemCheckboxSingle.js.map +0 -1
  69. package/lib/components/FormComponents/ItemParts/QItemCheckboxSingleWithOpenLabel.d.ts +0 -10
  70. package/lib/components/FormComponents/ItemParts/QItemCheckboxSingleWithOpenLabel.js +0 -35
  71. package/lib/components/FormComponents/ItemParts/QItemCheckboxSingleWithOpenLabel.js.map +0 -1
  72. package/lib/components/FormComponents/ItemParts/QItemRadioButtonWithOpenLabel.d.ts +0 -10
  73. package/lib/components/FormComponents/ItemParts/QItemRadioButtonWithOpenLabel.js +0 -31
  74. package/lib/components/FormComponents/ItemParts/QItemRadioButtonWithOpenLabel.js.map +0 -1
  75. package/lib/components/FormComponents/ItemParts/RadioButtonItemWithOpenLabel.d.ts +0 -10
  76. package/lib/components/FormComponents/ItemParts/RadioButtonItemWithOpenLabel.js +0 -31
  77. package/lib/components/FormComponents/ItemParts/RadioButtonItemWithOpenLabel.js.map +0 -1
  78. package/lib/components/FormComponents/OpenChoiceItems/QItemOpenChoice.d.ts +0 -9
  79. package/lib/components/FormComponents/OpenChoiceItems/QItemOpenChoice.js +0 -49
  80. package/lib/components/FormComponents/OpenChoiceItems/QItemOpenChoice.js.map +0 -1
  81. package/lib/components/FormComponents/OpenChoiceItems/QItemOpenChoiceAutocomplete.d.ts +0 -9
  82. package/lib/components/FormComponents/OpenChoiceItems/QItemOpenChoiceAutocomplete.js +0 -109
  83. package/lib/components/FormComponents/OpenChoiceItems/QItemOpenChoiceAutocomplete.js.map +0 -1
  84. package/lib/components/FormComponents/OpenChoiceItems/QItemOpenChoiceCheckboxAnswerOption.d.ts +0 -11
  85. package/lib/components/FormComponents/OpenChoiceItems/QItemOpenChoiceCheckboxAnswerOption.js +0 -105
  86. package/lib/components/FormComponents/OpenChoiceItems/QItemOpenChoiceCheckboxAnswerOption.js.map +0 -1
  87. package/lib/components/FormComponents/OpenChoiceItems/QItemOpenChoiceRadioAnswerOption.d.ts +0 -11
  88. package/lib/components/FormComponents/OpenChoiceItems/QItemOpenChoiceRadioAnswerOption.js +0 -116
  89. package/lib/components/FormComponents/OpenChoiceItems/QItemOpenChoiceRadioAnswerOption.js.map +0 -1
  90. package/lib/components/FormComponents/OpenChoiceItems/QItemOpenChoiceSelectAnswerOption.d.ts +0 -9
  91. package/lib/components/FormComponents/OpenChoiceItems/QItemOpenChoiceSelectAnswerOption.js +0 -75
  92. package/lib/components/FormComponents/OpenChoiceItems/QItemOpenChoiceSelectAnswerOption.js.map +0 -1
  93. package/lib/components/FormComponents/OpenChoiceItems/QItemOpenChoiceSelectAnswerValueSet.d.ts +0 -9
  94. package/lib/components/FormComponents/OpenChoiceItems/QItemOpenChoiceSelectAnswerValueSet.js +0 -68
  95. package/lib/components/FormComponents/OpenChoiceItems/QItemOpenChoiceSelectAnswerValueSet.js.map +0 -1
  96. package/lib/components/FormComponents/QItemChoice/QItemChoice.d.ts +0 -9
  97. package/lib/components/FormComponents/QItemChoice/QItemChoice.js +0 -61
  98. package/lib/components/FormComponents/QItemChoice/QItemChoice.js.map +0 -1
  99. package/lib/components/FormComponents/QItemChoice/QItemChoiceAutocomplete.d.ts +0 -9
  100. package/lib/components/FormComponents/QItemChoice/QItemChoiceAutocomplete.js +0 -89
  101. package/lib/components/FormComponents/QItemChoice/QItemChoiceAutocomplete.js.map +0 -1
  102. package/lib/components/FormComponents/QItemChoice/QItemChoiceCheckboxAnswerOption.d.ts +0 -11
  103. package/lib/components/FormComponents/QItemChoice/QItemChoiceCheckboxAnswerOption.js +0 -70
  104. package/lib/components/FormComponents/QItemChoice/QItemChoiceCheckboxAnswerOption.js.map +0 -1
  105. package/lib/components/FormComponents/QItemChoice/QItemChoiceCheckboxAnswerValueSet.d.ts +0 -11
  106. package/lib/components/FormComponents/QItemChoice/QItemChoiceCheckboxAnswerValueSet.js +0 -67
  107. package/lib/components/FormComponents/QItemChoice/QItemChoiceCheckboxAnswerValueSet.js.map +0 -1
  108. package/lib/components/FormComponents/QItemChoice/QItemChoiceRadioAnswerOption.d.ts +0 -11
  109. package/lib/components/FormComponents/QItemChoice/QItemChoiceRadioAnswerOption.js +0 -70
  110. package/lib/components/FormComponents/QItemChoice/QItemChoiceRadioAnswerOption.js.map +0 -1
  111. package/lib/components/FormComponents/QItemChoice/QItemChoiceRadioAnswerValueSet.d.ts +0 -11
  112. package/lib/components/FormComponents/QItemChoice/QItemChoiceRadioAnswerValueSet.js +0 -72
  113. package/lib/components/FormComponents/QItemChoice/QItemChoiceRadioAnswerValueSet.js.map +0 -1
  114. package/lib/components/FormComponents/QItemChoice/QItemChoiceRadioSingle.d.ts +0 -8
  115. package/lib/components/FormComponents/QItemChoice/QItemChoiceRadioSingle.js +0 -25
  116. package/lib/components/FormComponents/QItemChoice/QItemChoiceRadioSingle.js.map +0 -1
  117. package/lib/components/FormComponents/QItemChoice/QItemChoiceSelectAnswerOption.d.ts +0 -9
  118. package/lib/components/FormComponents/QItemChoice/QItemChoiceSelectAnswerOption.js +0 -73
  119. package/lib/components/FormComponents/QItemChoice/QItemChoiceSelectAnswerOption.js.map +0 -1
  120. package/lib/components/FormComponents/QItemChoice/QItemChoiceSelectAnswerValueSet.d.ts +0 -9
  121. package/lib/components/FormComponents/QItemChoice/QItemChoiceSelectAnswerValueSet.js +0 -82
  122. package/lib/components/FormComponents/QItemChoice/QItemChoiceSelectAnswerValueSet.js.map +0 -1
  123. package/lib/components/FormComponents/QItemOpenChoice/QItemOpenChoice.d.ts +0 -9
  124. package/lib/components/FormComponents/QItemOpenChoice/QItemOpenChoice.js +0 -49
  125. package/lib/components/FormComponents/QItemOpenChoice/QItemOpenChoice.js.map +0 -1
  126. package/lib/components/FormComponents/QItemOpenChoice/QItemOpenChoiceAutocomplete.d.ts +0 -9
  127. package/lib/components/FormComponents/QItemOpenChoice/QItemOpenChoiceAutocomplete.js +0 -109
  128. package/lib/components/FormComponents/QItemOpenChoice/QItemOpenChoiceAutocomplete.js.map +0 -1
  129. package/lib/components/FormComponents/QItemOpenChoice/QItemOpenChoiceCheckboxAnswerOption.d.ts +0 -11
  130. package/lib/components/FormComponents/QItemOpenChoice/QItemOpenChoiceCheckboxAnswerOption.js +0 -105
  131. package/lib/components/FormComponents/QItemOpenChoice/QItemOpenChoiceCheckboxAnswerOption.js.map +0 -1
  132. package/lib/components/FormComponents/QItemOpenChoice/QItemOpenChoiceRadioAnswerOption.d.ts +0 -11
  133. package/lib/components/FormComponents/QItemOpenChoice/QItemOpenChoiceRadioAnswerOption.js +0 -116
  134. package/lib/components/FormComponents/QItemOpenChoice/QItemOpenChoiceRadioAnswerOption.js.map +0 -1
  135. package/lib/components/FormComponents/QItemOpenChoice/QItemOpenChoiceSelectAnswerOption.d.ts +0 -9
  136. package/lib/components/FormComponents/QItemOpenChoice/QItemOpenChoiceSelectAnswerOption.js +0 -75
  137. package/lib/components/FormComponents/QItemOpenChoice/QItemOpenChoiceSelectAnswerOption.js.map +0 -1
  138. package/lib/components/FormComponents/QItemOpenChoice/QItemOpenChoiceSelectAnswerValueSet.d.ts +0 -9
  139. package/lib/components/FormComponents/QItemOpenChoice/QItemOpenChoiceSelectAnswerValueSet.js +0 -68
  140. package/lib/components/FormComponents/QItemOpenChoice/QItemOpenChoiceSelectAnswerValueSet.js.map +0 -1
  141. package/lib/components/FormRenderer/BaseRenderer.d.ts +0 -3
  142. package/lib/components/FormRenderer/BaseRenderer.js +0 -54
  143. package/lib/components/FormRenderer/BaseRenderer.js.map +0 -1
  144. package/lib/components/FormRenderer/FormBodyCollapsible.d.ts +0 -9
  145. package/lib/components/FormRenderer/FormBodyCollapsible.js +0 -57
  146. package/lib/components/FormRenderer/FormBodyCollapsible.js.map +0 -1
  147. package/lib/components/FormRenderer/FormBodySingleCollapsible.d.ts +0 -12
  148. package/lib/components/FormRenderer/FormBodySingleCollapsible.js +0 -39
  149. package/lib/components/FormRenderer/FormBodySingleCollapsible.js.map +0 -1
  150. package/lib/components/FormRenderer/FormBodySingleCollapsibleWrapper.d.ts +0 -12
  151. package/lib/components/FormRenderer/FormBodySingleCollapsibleWrapper.js +0 -31
  152. package/lib/components/FormRenderer/FormBodySingleCollapsibleWrapper.js.map +0 -1
  153. package/lib/components/FormRenderer/FormBodyTabbed.d.ts +0 -9
  154. package/lib/components/FormRenderer/FormBodyTabbed.js +0 -60
  155. package/lib/components/FormRenderer/FormBodyTabbed.js.map +0 -1
  156. package/lib/components/FormRenderer/FormRenderer.d.ts +0 -3
  157. package/lib/components/FormRenderer/FormRenderer.js +0 -54
  158. package/lib/components/FormRenderer/FormRenderer.js.map +0 -1
  159. package/lib/components/FormRenderer/FormTitle.d.ts +0 -7
  160. package/lib/components/FormRenderer/FormTitle.js +0 -30
  161. package/lib/components/FormRenderer/FormTitle.js.map +0 -1
  162. package/lib/components/FormRenderer/FormTopLevelItem.d.ts +0 -9
  163. package/lib/components/FormRenderer/FormTopLevelItem.js +0 -45
  164. package/lib/components/FormRenderer/FormTopLevelItem.js.map +0 -1
  165. package/lib/components/FormRenderer/SmartFormsRenderer.d.ts +0 -9
  166. package/lib/components/FormRenderer/SmartFormsRenderer.js +0 -39
  167. package/lib/components/FormRenderer/SmartFormsRenderer.js.map +0 -1
  168. package/lib/components/FormRenderer/index.d.ts +0 -2
  169. package/lib/components/FormRenderer/index.js.map +0 -1
  170. package/lib/contexts/TestContext.d.ts +0 -11
  171. package/lib/contexts/TestContext.js +0 -32
  172. package/lib/contexts/TestContext.js.map +0 -1
  173. package/lib/contexts/index.d.ts +0 -1
  174. package/lib/contexts/index.js +0 -2
  175. package/lib/contexts/index.js.map +0 -1
  176. package/lib/hooks/useTestContext.d.ts +0 -5
  177. package/lib/hooks/useTestContext.js.map +0 -1
  178. package/lib/stores/useConfigStore.d.ts +0 -18
  179. package/lib/stores/useConfigStore.js +0 -17
  180. package/lib/stores/useConfigStore.js.map +0 -1
  181. package/lib/stores/useSmartClientStore.d.ts +0 -7
  182. package/lib/stores/useSmartClientStore.js +0 -7
  183. package/lib/stores/useSmartClientStore.js.map +0 -1
  184. package/lib/theme/globalStyles.d.ts +0 -2
  185. package/lib/theme/globalStyles.js.map +0 -1
  186. package/lib/utils/populate.d.ts +0 -16
  187. package/lib/utils/populate.js +0 -78
  188. package/lib/utils/populate.js.map +0 -1
  189. package/lib/utils/populateCallback.d.ts +0 -6
  190. package/lib/utils/populateCallback.js +0 -40
  191. package/lib/utils/populateCallback.js.map +0 -1
package/README.md ADDED
@@ -0,0 +1,59 @@
1
+ # Smart Forms Renderer
2
+ This React-based package acts as the rendering engine for the [Smart Forms app](https://github.com/aehrc/smart-forms).
3
+
4
+ ## Installation
5
+ ```bash
6
+ npm install @aehrc/smart-forms-renderer
7
+ ```
8
+
9
+ ## Usage
10
+
11
+ ```javascript
12
+ import React from 'react';
13
+ import { SmartFormsRenderer, getResponse } from 'aehrc/smart-forms-renderer';
14
+
15
+ export default function App () {
16
+ const questionnaire = {...} // FHIR R4.Questionnaire
17
+
18
+ return (
19
+ <div>
20
+ <SmartFormsRenderer questionnaire={questionnaire}/>
21
+ <button onClick={() => {
22
+ const response = getResponse()
23
+ // Do something with the questionnaire response
24
+ }}/>
25
+ </div>
26
+ )
27
+ }
28
+
29
+ ```
30
+ ### SmartFormsRenderer Props
31
+
32
+
33
+ | Name | Type | Description | Required? |
34
+ |-----------------------|------------------------------------------------------|------------------------------------------------------------------------------------------------|-----------|
35
+ | questionnaire | FHIR R4.Questionnaire | Questionnaire to be rendered | Required |
36
+ | questionnaireResponse | FHIR R4.QuestionnaireResponse | Pre-populated QuestionnaireResponse to be rendered | Optional |
37
+ | additionalVariables | Record<string, Extension> | Key-value pair of [SDC variables](http://hl7.org/fhir/R4/extension-variable.html) <name, variable extension> | Optional |
38
+
39
+ The below props are not supported at the moment, but will be in the future.
40
+
41
+ | Name | Type | Description |
42
+ |----------------------|------------------------------------------------------|---------------------------------------------|
43
+ | fhirClient | [Client](https://github.com/smart-on-fhir/client-js) | FhirClient to perform further FHIR calls |
44
+ | terminologyServerUrl | string | Terminology server url to fetch terminology |
45
+
46
+ ### Methods
47
+
48
+ ```javascript
49
+ /**
50
+ * Get the filled QuestionnaireResponse at its current state.
51
+ * If no changes have been made to the form, the initial or an empty QuestionnaireResponse is returned.
52
+ *
53
+ * @returns {FHIR R4.QuestionnaireResponse} The filled QuestionnaireResponse
54
+ */
55
+ function getResponse() {}
56
+ ```
57
+
58
+
59
+ ### Advanced Usage (If the above does not suffice)
@@ -0,0 +1,3 @@
1
+ import TextField from '@mui/material/TextField';
2
+ declare const MuiTextField: typeof TextField;
3
+ export default MuiTextField;
@@ -14,6 +14,7 @@
14
14
  * See the License for the specific language governing permissions and
15
15
  * limitations under the License.
16
16
  */
17
- export { default as SmartFormsRenderer } from './SmartFormsRenderer';
18
- export { default as BaseRenderer } from './BaseRenderer';
19
- //# sourceMappingURL=index.js.map
17
+ import TextField from '@mui/material/TextField';
18
+ const MuiTextField = TextField;
19
+ export default MuiTextField;
20
+ //# sourceMappingURL=MuiTextField.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"MuiTextField.js","sourceRoot":"","sources":["../../../../src/components/FormComponents/TextItem/MuiTextField.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAEH,OAAO,SAAS,MAAM,yBAAyB,CAAC;AAEhD,MAAM,YAAY,GAAG,SAAS,CAAC;AAE/B,eAAe,YAAY,CAAC"}
@@ -15,7 +15,8 @@
15
15
  * limitations under the License.
16
16
  */
17
17
  import React from 'react';
18
- import { InputAdornment, TextField as MuiTextField } from '@mui/material';
18
+ import InputAdornment from '@mui/material/InputAdornment';
19
+ import MuiTextField from './MuiTextField';
19
20
  import FadingCheckIcon from '../ItemParts/FadingCheckIcon';
20
21
  function TextField(props) {
21
22
  const { linkId, input, feedback, displayPrompt, displayUnit, entryFormat, readOnly, calcExpUpdated, onInputChange } = props;
@@ -1 +1 @@
1
- {"version":3,"file":"TextField.js","sourceRoot":"","sources":["../../../../src/components/FormComponents/TextItem/TextField.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAEH,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,cAAc,EAAE,SAAS,IAAI,YAAY,EAAE,MAAM,eAAe,CAAC;AAC1E,OAAO,eAAe,MAAM,8BAA8B,CAAC;AAc3D,SAAS,SAAS,CAAC,KAAqB;IACtC,MAAM,EACJ,MAAM,EACN,KAAK,EACL,QAAQ,EACR,aAAa,EACb,WAAW,EACX,WAAW,EACX,QAAQ,EACR,cAAc,EACd,aAAa,EACd,GAAG,KAAK,CAAC;IAEV,OAAO,CACL,oBAAC,YAAY,IACX,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,EACxB,SAAS,QACT,SAAS,QACT,IAAI,EAAC,OAAO,EACZ,OAAO,EAAE,CAAC,EACV,UAAU,EAAE;YACV,YAAY,EAAE,CACZ,oBAAC,cAAc,IAAC,QAAQ,EAAE,KAAK;gBAC7B,oBAAC,eAAe,IAAC,MAAM,EAAE,cAAc,GAAI;gBAC1C,WAAW,CACG,CAClB;SACF,EACD,UAAU,EAAE,QAAQ,eACV,mBAAmB,GAC7B,CACH,CAAC;AACJ,CAAC;AAED,eAAe,SAAS,CAAC"}
1
+ {"version":3,"file":"TextField.js","sourceRoot":"","sources":["../../../../src/components/FormComponents/TextItem/TextField.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAEH,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,cAAc,MAAM,8BAA8B,CAAC;AAC1D,OAAO,YAAY,MAAM,gBAAgB,CAAC;AAC1C,OAAO,eAAe,MAAM,8BAA8B,CAAC;AAc3D,SAAS,SAAS,CAAC,KAAqB;IACtC,MAAM,EACJ,MAAM,EACN,KAAK,EACL,QAAQ,EACR,aAAa,EACb,WAAW,EACX,WAAW,EACX,QAAQ,EACR,cAAc,EACd,aAAa,EACd,GAAG,KAAK,CAAC;IAEV,OAAO,CACL,oBAAC,YAAY,IACX,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,EACxB,SAAS,QACT,SAAS,QACT,IAAI,EAAC,OAAO,EACZ,OAAO,EAAE,CAAC,EACV,UAAU,EAAE;YACV,YAAY,EAAE,CACZ,oBAAC,cAAc,IAAC,QAAQ,EAAE,KAAK;gBAC7B,oBAAC,eAAe,IAAC,MAAM,EAAE,cAAc,GAAI;gBAC1C,WAAW,CACG,CAClB;SACF,EACD,UAAU,EAAE,QAAQ,eACV,mBAAmB,GAC7B,CACH,CAAC;AACJ,CAAC;AAED,eAAe,SAAS,CAAC"}
@@ -16,7 +16,8 @@
16
16
  */
17
17
  import React, { useMemo } from 'react';
18
18
  import Grid from '@mui/material/Grid';
19
- import { TabContext, TabPanel } from '@mui/lab';
19
+ import TabContext from '@mui/lab/TabContext';
20
+ import TabPanel from '@mui/lab/TabPanel';
20
21
  import { getQrItemsIndex, mapQItemsIndex } from '../../utils/mapItem';
21
22
  import GroupItem from '../FormComponents/GroupItem/GroupItem';
22
23
  import { updateQrGroup } from '../../utils/qrItem';
@@ -1 +1 @@
1
- {"version":3,"file":"FormBodyTabbed.js","sourceRoot":"","sources":["../../../src/components/Renderer/FormBodyTabbed.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAEH,OAAO,KAAK,EAAE,EAAE,OAAO,EAAE,MAAM,OAAO,CAAC;AACvC,OAAO,IAAI,MAAM,oBAAoB,CAAC;AAEtC,OAAO,EAAE,UAAU,EAAE,QAAQ,EAAE,MAAM,UAAU,CAAC;AAChD,OAAO,EAAE,eAAe,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AACtE,OAAO,SAAS,MAAM,uCAAuC,CAAC;AAC9D,OAAO,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AACnD,OAAO,eAAe,MAAM,yBAAyB,CAAC;AAEtD,OAAO,qBAAqB,MAAM,oCAAoC,CAAC;AAOvE,SAAS,cAAc,CAAC,KAA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C9B,oBAAC,SAAS,IACR,KAAK,EAAE,KAAK,EACZ,MAAM,EAAE,MAAM,EACd,UAAU,EAAE,UAAU,EACtB,kBAAkB,EAAE,CAAC,EACrB,qBAAqB,EAAE,qBAAqB,EAC5C,IAAI,EAAE,IAAI,EACV,eAAe,EAAE,UAAU,EAC3B,cAAc,EAAE,mBAAmB,GACnC,CACO,CACZ,CAAC;YACJ,CAAC,CAAC,CACG,CACI,CACR,CACR,CAAC;AACJ,CAAC;AAED,eAAe,cAAc,CAAC"}
package/lib/index.d.ts CHANGED
@@ -21,7 +21,7 @@ export declare function destroyForm(): void;
21
21
  *
22
22
  * @author Sean Fong
23
23
  */
24
- export declare function getUpdatableResponse(): QuestionnaireResponse;
24
+ export declare function getResponse(): QuestionnaireResponse;
25
25
  /**
26
26
  * Remove all hidden answers from the filled QuestionnaireResponse.
27
27
  * This takes into account the questionnaire-hidden extension, enableWhens and enableWhenExpressions.
package/lib/index.js CHANGED
@@ -48,7 +48,7 @@ export function destroyForm() {
48
48
  *
49
49
  * @author Sean Fong
50
50
  */
51
- export function getUpdatableResponse() {
51
+ export function getResponse() {
52
52
  return useQuestionnaireResponseStore.getState().updatableResponse;
53
53
  }
54
54
  /**
package/lib/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;AAAA,OAAO,qBAAqB,MAAM,gCAAgC,CAAC;AAEnE,OAAO,EAAE,2BAA2B,EAAE,MAAM,gBAAgB,CAAC;AAC7D,OAAO,6BAA6B,MAAM,wCAAwC,CAAC;AACnF,OAAO,EAAE,mBAAmB,EAAE,MAAM,sBAAsB,CAAC;AAE3D,cAAc,cAAc,CAAC;AAC7B,cAAc,SAAS,CAAC;AACxB,cAAc,UAAU,CAAC;AAEzB;;;;;GAKG;AACH,MAAM,UAAgB,SAAS,CAC7B,aAA4B,EAC5B,qBAA6C;;QAE7C,MAAM,qBAAqB,CAAC,QAAQ,EAA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QACb,qBAAqB;QACrB,qBAAqB;QACrB,eAAe;QACf,qBAAqB;KACtB,CAAC,CAAC;AACL,CAAC"}
@@ -3,7 +3,7 @@ import { alpha, createTheme, StyledEngineProvider, ThemeProvider as MUIThemeProv
3
3
  import CssBaseline from '@mui/material/CssBaseline';
4
4
  import palette from './palette';
5
5
  import typography from './typography';
6
- import GlobalStyles from './globalStyles';
6
+ import CustomGlobalStyles from './customGlobalStyles';
7
7
  import componentsOverride from './overrides/Overrides';
8
8
  import { grey } from '@mui/material/colors';
9
9
  // ----------------------------------------------------------------------
@@ -32,7 +32,7 @@ function ThemeProvider({ children }) {
32
32
  return (React.createElement(StyledEngineProvider, { injectFirst: true },
33
33
  React.createElement(MUIThemeProvider, { theme: theme },
34
34
  React.createElement(CssBaseline, null),
35
- React.createElement(GlobalStyles, null),
35
+ React.createElement(CustomGlobalStyles, null),
36
36
  children)));
37
37
  }
38
38
  export default ThemeProvider;
@@ -1 +1 @@
1
- {"version":3,"file":"Theme.js","sourceRoot":"","sources":["../../src/theme/Theme.tsx"],"names":[],"mappings":"AAiBA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EACL,KAAK,EACL,WAAW,EACX,oBAAoB,EACpB,aAAa,IAAI,gBAAgB,EAClC,MAAM,sBAAsB,CAAC;AAC9B,OAAO,WAAW,MAAM,2BAA2B,CAAC;AACpD,OAAO,OAAO,MAAM,WAAW,CAAC;AAChC,OAAO,UAAU,MAAM,cAAc,CAAC;AACtC,OAAO,YAAY,MAAM,gBAAgB,CAAC;AAC1C,OAAO,kBAAkB,MAAM,uBAAuB,CAAC;AACvD,OAAO,EAAE,IAAI,EAAE,MAAM,sBAAsB,CAAC;AAsC5C,yEAAyE;AAEzE,MAAM,WAAW,GAAG,KAAK,CAAC,IAAI,CAAC,GAAG,CAAC,EAAE,IAAI,CAAC,CAAC;AAE3C,MAAM,CAAC,MAAM,YAAY,GAAiB;IACxC,OAAO;IACP,KAAK,EAAE,EAAE,YAAY,EA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,aAAa,CAAC,EAAE,QAAQ,EAA2B;IAC1D,MAAM,KAAK,GAAG,WAAW,CAAC,YAAY,CAAC,CAAC;IACxC,KAAK,CAAC,UAAU,GAAG,kBAAkB,CAAC,KAAK,CAAC,CAAC;IAE7C,OAAO,CACL,oBAAC,oBAAoB,IAAC,WAAW;QAC/B,oBAAC,gBAAgB,IAAC,KAAK,EAAE,KAAK;YAC5B,oBAAC,WAAW,OAAG;YACf,oBAAC,kBAAkB,OAAG;YACrB,QAAQ,CACQ,CACE,CACxB,CAAC;AACJ,CAAC;AAED,eAAe,aAAa,CAAC"}
@@ -0,0 +1,2 @@
1
+ import React from 'react';
2
+ export default function CustomGlobalStyles(): React.JSX.Element;
@@ -15,9 +15,9 @@
15
15
  * limitations under the License.
16
16
  */
17
17
  import React from 'react';
18
- import { GlobalStyles as MUIGlobalStyles } from '@mui/material';
19
- export default function GlobalStyles() {
20
- return (React.createElement(MUIGlobalStyles, { styles: {
18
+ import GlobalStyles from '@mui/material/GlobalStyles';
19
+ export default function CustomGlobalStyles() {
20
+ return (React.createElement(GlobalStyles, { styles: {
21
21
  '*': {
22
22
  boxSizing: 'border-box'
23
23
  },
@@ -61,4 +61,4 @@ export default function GlobalStyles() {
61
61
  }
62
62
  } }));
63
63
  }
64
- //# sourceMappingURL=globalStyles.js.map
64
+ //# sourceMappingURL=customGlobalStyles.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"customGlobalStyles.js","sourceRoot":"","sources":["../../src/theme/customGlobalStyles.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AACH,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,YAAY,MAAM,4BAA4B,CAAC;AAEtD,MAAM,CAAC,OAAO,UAAU,kBAAkB;IACxC,OAAO,CACL,oBAAC,YAAY,IACX,MAAM,EAAE;YACN,GAAG,EAAE;gBACH,SAAS,EAAE,YAAY;aACxB;YACD,IAAI,EAAE;gBACJ,MAAM,EAAE,CAAC;gBACT,OAAO,EAAE,CAAC;gBACV,KAAK,EAAE,MAAM;gBACb,MAAM,EAAE,MAAM;gBACd,uBAAuB,EAAE,OAAO;aACjC;YACD,IAAI,EAAE;gBACJ,MAAM,EAAE,CAAC;gBACT,OAAO,EAAE,CAAC;gBACV,KAAK,EAAE,MAAM;gBACb,MAAM,EAAE,MAAM;aACf;YACD,OAAO,EAAE;gBACP,KAAK,EAAE,MAAM;gBACb,MAAM,EAAE,MAAM;aACf;YACD,KAAK,EAAE;gBACL,gBAAgB,EAAE;oBAChB,aAAa,EAAE,WAAW;oBAC1B,8BAA8B,EAAE;wBAC9B,MAAM,EAAE,CAAC;wBACT,gBAAgB,EAAE,MAAM;qBACzB;oBACD,8BAA8B,EAAE;wBAC9B,MAAM,EAAE,CAAC;wBACT,gBAAgB,EAAE,MAAM;qBACzB;iBACF;aACF;YACD,GAAG,EAAE;gBACH,OAAO,EAAE,OAAO;gBAChB,QAAQ,EAAE,MAAM;aACjB;YACD,EAAE,EAAE;gBACF,MAAM,EAAE,CAAC;gBACT,OAAO,EAAE,CAAC;aACX;SACF,GACD,CACH,CAAC;AACJ,CAAC"}
package/package.json CHANGED
@@ -1,16 +1,27 @@
1
1
  {
2
2
  "name": "@aehrc/smart-forms-renderer",
3
- "version": "0.6.0",
3
+ "version": "0.6.3",
4
+ "description": "FHIR Structured Data Captured (SDC) rendering engine for Smart Forms",
4
5
  "main": "lib/index.js",
5
6
  "scripts": {
6
7
  "compile": "tsc",
7
- "build:watch": "tsc --watch",
8
+ "compile:watch": "tsc -w",
8
9
  "prepare": "npm run compile",
9
10
  "test": "jest",
10
11
  "test:watch": "jest --watch",
11
12
  "storybook": "storybook dev -p 6006",
12
13
  "build-storybook": "storybook build"
13
14
  },
15
+ "repository": {
16
+ "type": "git",
17
+ "url": "git+https://github.com/aehrc/smart-forms.git"
18
+ },
19
+ "author": "Sean Fong",
20
+ "license": "Apache-2.0",
21
+ "bugs": {
22
+ "url": "https://github.com/aehrc/smart-forms/issues"
23
+ },
24
+ "homepage": "https://github.com/aehrc/smart-forms#readme",
14
25
  "dependencies": {
15
26
  "@iconify/react": "^4.1.1",
16
27
  "dayjs": "^1.11.9",
@@ -23,7 +34,7 @@
23
34
  "@types/fhir": "^0.0.37",
24
35
  "zustand": "^4.4.1",
25
36
  "react-markdown": "^8.0.7",
26
- "sdc-assemble": "^1.0.1"
37
+ "@aehrc/sdc-assemble": "^1.0.2"
27
38
  },
28
39
  "peerDependencies": {
29
40
  "@emotion/react": ">=11.11.0",
@@ -48,7 +59,7 @@
48
59
  "@storybook/react-vite": "^7.4.0",
49
60
  "@storybook/testing-library": "^0.2.0",
50
61
  "@testing-library/jest-dom": "^5.14.1",
51
- "@testing-library/react": "^11.2.7",
62
+ "@testing-library/react": "^14.0.0",
52
63
  "@testing-library/react-hooks": "^7.0.2",
53
64
  "@types/jest": "^29.5.4",
54
65
  "@types/react": "^18.2.18",
@@ -14,14 +14,9 @@
14
14
  * See the License for the specific language governing permissions and
15
15
  * limitations under the License.
16
16
  */
17
- import { useContext } from 'react';
18
- import { TestContext } from '../contexts/TestContext';
19
- function useTestContext() {
20
- const { hasChanges, setHasChanges } = useContext(TestContext);
21
- return {
22
- hasChanges,
23
- setHasChanges
24
- };
25
- }
26
- export default useTestContext;
27
- //# sourceMappingURL=useTestContext.js.map
17
+
18
+ import TextField from '@mui/material/TextField';
19
+
20
+ const MuiTextField = TextField;
21
+
22
+ export default MuiTextField;
@@ -16,7 +16,8 @@
16
16
  */
17
17
 
18
18
  import React from 'react';
19
- import { InputAdornment, TextField as MuiTextField } from '@mui/material';
19
+ import InputAdornment from '@mui/material/InputAdornment';
20
+ import MuiTextField from './MuiTextField';
20
21
  import FadingCheckIcon from '../ItemParts/FadingCheckIcon';
21
22
 
22
23
  interface TextFieldProps {
@@ -18,7 +18,8 @@
18
18
  import React, { useMemo } from 'react';
19
19
  import Grid from '@mui/material/Grid';
20
20
  import type { QuestionnaireItem, QuestionnaireResponseItem } from 'fhir/r4';
21
- import { TabContext, TabPanel } from '@mui/lab';
21
+ import TabContext from '@mui/lab/TabContext';
22
+ import TabPanel from '@mui/lab/TabPanel';
22
23
  import { getQrItemsIndex, mapQItemsIndex } from '../../utils/mapItem';
23
24
  import GroupItem from '../FormComponents/GroupItem/GroupItem';
24
25
  import { updateQrGroup } from '../../utils/qrItem';
package/src/index.ts CHANGED
@@ -47,7 +47,7 @@ export function destroyForm(): void {
47
47
  *
48
48
  * @author Sean Fong
49
49
  */
50
- export function getUpdatableResponse(): QuestionnaireResponse {
50
+ export function getResponse(): QuestionnaireResponse {
51
51
  return useQuestionnaireResponseStore.getState().updatableResponse;
52
52
  }
53
53
 
@@ -26,7 +26,7 @@ import {
26
26
  import CssBaseline from '@mui/material/CssBaseline';
27
27
  import palette from './palette';
28
28
  import typography from './typography';
29
- import GlobalStyles from './globalStyles';
29
+ import CustomGlobalStyles from './customGlobalStyles';
30
30
  import componentsOverride from './overrides/Overrides';
31
31
  import { grey } from '@mui/material/colors';
32
32
 
@@ -97,7 +97,7 @@ function ThemeProvider({ children }: { children: ReactNode }) {
97
97
  <StyledEngineProvider injectFirst>
98
98
  <MUIThemeProvider theme={theme}>
99
99
  <CssBaseline />
100
- <GlobalStyles />
100
+ <CustomGlobalStyles />
101
101
  {children}
102
102
  </MUIThemeProvider>
103
103
  </StyledEngineProvider>
@@ -15,11 +15,11 @@
15
15
  * limitations under the License.
16
16
  */
17
17
  import React from 'react';
18
- import { GlobalStyles as MUIGlobalStyles } from '@mui/material';
18
+ import GlobalStyles from '@mui/material/GlobalStyles';
19
19
 
20
- export default function GlobalStyles() {
20
+ export default function CustomGlobalStyles() {
21
21
  return (
22
- <MUIGlobalStyles
22
+ <GlobalStyles
23
23
  styles={{
24
24
  '*': {
25
25
  boxSizing: 'border-box'
@@ -1,8 +0,0 @@
1
- import type { InputParameters, OutputParameters } from 'sdc-populate';
2
- import type Client from 'fhirclient/lib/Client';
3
- import type { OperationOutcome } from 'fhir/r4';
4
- export declare const HEADERS: {
5
- 'Content-Type': string;
6
- Accept: string;
7
- };
8
- export declare function requestPopulate(fhirClient: Client, inputParameters: InputParameters): Promise<OutputParameters | OperationOutcome>;
@@ -1,63 +0,0 @@
1
- /*
2
- * Copyright 2023 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
- var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
18
- function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
19
- return new (P || (P = Promise))(function (resolve, reject) {
20
- function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
21
- function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
22
- function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
23
- step((generator = generator.apply(thisArg, _arguments || [])).next());
24
- });
25
- };
26
- import { isOutputParameters, populate } from 'sdc-populate';
27
- import { fetchResourceCallback } from '../utils/populateCallback';
28
- const IS_IN_APP_POPULATE = true;
29
- export const HEADERS = {
30
- 'Content-Type': 'application/json;charset=utf-8',
31
- Accept: 'application/json;charset=utf-8'
32
- };
33
- export function requestPopulate(fhirClient, inputParameters) {
34
- return __awaiter(this, void 0, void 0, function* () {
35
- const requestConfig = {
36
- clientEndpoint: fhirClient.state.serverUrl,
37
- authToken: fhirClient.state.tokenResponse.access_token
38
- };
39
- if (IS_IN_APP_POPULATE) {
40
- return yield populate(inputParameters, fetchResourceCallback, requestConfig);
41
- }
42
- const outputParameters = yield fhirClient.request({
43
- url: 'Questionnaire/$populate',
44
- method: 'POST',
45
- body: JSON.stringify(inputParameters),
46
- headers: Object.assign(Object.assign({}, HEADERS), { 'Content-Type': 'application/json', Authorization: `Bearer ${requestConfig.authToken}` })
47
- });
48
- if (isOutputParameters(outputParameters)) {
49
- return outputParameters;
50
- }
51
- return {
52
- resourceType: 'OperationOutcome',
53
- issue: [
54
- {
55
- severity: 'error',
56
- code: 'invalid',
57
- details: { text: 'Output parameters does not match the specification.' }
58
- }
59
- ]
60
- };
61
- });
62
- }
63
- //# sourceMappingURL=populate.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"populate.js","sourceRoot":"","sources":["../../src/api/populate.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;;;;;;;;;;AAGH,OAAO,EAAE,kBAAkB,EAAE,QAAQ,EAAE,MAAM,cAAc,CAAC;AAE5D,OAAO,EAAE,qBAAqB,EAAE,MAAM,2BAA2B,CAAC;AAIlE,MAAM,kBAAkB,GAAG,IAAI,CAAC;AAEhC,MAAM,CAAC,MAAM,OAAO,GAAG;IACrB,cAAc,EAAE,gCAAgC;IAChD,MAAM,EAAE,gCAAgC;CACzC,CAAC;AAEF,MAAM,UAAgB,eAAe,CACnC,UAAkB,EAClB,eAAgC;;QAEhC,MAAM,aAAa,GAAkB;YACnC,cAAc,EAAE,UAAU,CAAC,KAAK,CAAC,SAAS;YAC1C,SAAS,EAAE,UAAU,CAAC,KAAK,CAAC,aAAc,CAAC,YAAa;SACzD,CAAC;QAEF,IAAI,kBAAkB,EAAE;YACtB,OAAO,MAAM,QAAQ,CAAC,eAAe,EAAE,qBAAqB,EAAE,aAAa,CAAC,CAAC;SAC9E;QAED,MAAM,gBAAgB,GAAG,MAAM,UAAU,CAAC,OAAO,CAAC;YAChD,GAAG,EAAE,yBAAyB;YAC9B,MAAM,EAAE,MAAM;YACd,IAAI,EAAE,IAAI,CAAC,SAAS,CAAC,eAAe,CAAC;YACrC,OAAO,kCACF,OAAO,KACV,cAAc,EAAE,kBAAkB,EAClC,aAAa,EAAE,UAAU,aAAa,CAAC,SAAS,EAAE,GACnD;SACF,CAAC,CAAC;QAEH,IAAI,kBAAkB,CAAC,gBAAgB,CAAC,EAAE;YACxC,OAAO,gBAAgB,CAAC;SACzB;QAED,OAAO;YACL,YAAY,EAAE,kBAAkB;YAChC,KAAK,EAAE;gBACL;oBACE,QAAQ,EAAE,OAAO;oBACjB,IAAI,EAAE,SAAS;oBACf,OAAO,EAAE,EAAE,IAAI,EAAE,qDAAqD,EAAE;iBACzE;aACF;SACF,CAAC;IACJ,CAAC;CAAA"}
@@ -1,8 +0,0 @@
1
- import React from 'react';
2
- interface Props {
3
- value: string;
4
- label: string;
5
- readOnly: boolean;
6
- }
7
- declare function ChoiceRadio(props: Props): React.JSX.Element;
8
- export default ChoiceRadio;
@@ -1,25 +0,0 @@
1
- /*
2
- * Copyright 2023 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 FormControlLabel from '@mui/material/FormControlLabel';
19
- import Radio from '@mui/material/Radio';
20
- function ChoiceRadio(props) {
21
- const { value, label, readOnly } = props;
22
- return (React.createElement(FormControlLabel, { disabled: readOnly, value: value, control: React.createElement(Radio, { size: "small" }), label: label, sx: { mr: 3 } }));
23
- }
24
- export default ChoiceRadio;
25
- //# sourceMappingURL=ChoiceRadio.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"ChoiceRadio.js","sourceRoot":"","sources":["../../../../src/components/FormComponents/ChoiceItems/ChoiceRadio.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAEH,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,gBAAgB,MAAM,gCAAgC,CAAC;AAC9D,OAAO,KAAK,MAAM,qBAAqB,CAAC;AAQxC,SAAS,WAAW,CAAC,KAAY;IAC/B,MAAM,EAAE,KAAK,EAAE,KAAK,EAAE,QAAQ,EAAE,GAAG,KAAK,CAAC;IAEzC,OAAO,CACL,oBAAC,gBAAgB,IACf,QAAQ,EAAE,QAAQ,EAClB,KAAK,EAAE,KAAK,EACZ,OAAO,EAAE,oBAAC,KAAK,IAAC,IAAI,EAAC,OAAO,GAAG,EAC/B,KAAK,EAAE,KAAK,EACZ,EAAE,EAAE,EAAE,EAAE,EAAE,CAAC,EAAE,GACb,CACH,CAAC;AACJ,CAAC;AAED,eAAe,WAAW,CAAC"}
@@ -1,8 +0,0 @@
1
- import React from 'react';
2
- interface Props {
3
- value: string;
4
- label: string;
5
- readOnly: boolean;
6
- }
7
- declare function ChoiceRadioButton(props: Props): React.JSX.Element;
8
- export default ChoiceRadioButton;
@@ -1,25 +0,0 @@
1
- /*
2
- * Copyright 2023 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 FormControlLabel from '@mui/material/FormControlLabel';
19
- import Radio from '@mui/material/Radio';
20
- function ChoiceRadioButton(props) {
21
- const { value, label, readOnly } = props;
22
- return (React.createElement(FormControlLabel, { disabled: readOnly, value: value, control: React.createElement(Radio, { size: "small" }), label: label, sx: { mr: 3 } }));
23
- }
24
- export default ChoiceRadioButton;
25
- //# sourceMappingURL=ChoiceRadioButton.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"ChoiceRadioButton.js","sourceRoot":"","sources":["../../../../src/components/FormComponents/ChoiceItems/ChoiceRadioButton.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAEH,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,gBAAgB,MAAM,gCAAgC,CAAC;AAC9D,OAAO,KAAK,MAAM,qBAAqB,CAAC;AAQxC,SAAS,iBAAiB,CAAC,KAAY;IACrC,MAAM,EAAE,KAAK,EAAE,KAAK,EAAE,QAAQ,EAAE,GAAG,KAAK,CAAC;IAEzC,OAAO,CACL,oBAAC,gBAAgB,IACf,QAAQ,EAAE,QAAQ,EAClB,KAAK,EAAE,KAAK,EACZ,OAAO,EAAE,oBAAC,KAAK,IAAC,IAAI,EAAC,OAAO,GAAG,EAC/B,KAAK,EAAE,KAAK,EACZ,EAAE,EAAE,EAAE,EAAE,EAAE,CAAC,EAAE,GACb,CACH,CAAC;AACJ,CAAC;AAED,eAAe,iBAAiB,CAAC"}
@@ -1,8 +0,0 @@
1
- import React from 'react';
2
- interface Props {
3
- value: string;
4
- label: string;
5
- readOnly: boolean;
6
- }
7
- declare function ChoiceRadioSingleItem(props: Props): React.JSX.Element;
8
- export default ChoiceRadioSingleItem;
@@ -1,25 +0,0 @@
1
- /*
2
- * Copyright 2023 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 FormControlLabel from '@mui/material/FormControlLabel';
19
- import Radio from '@mui/material/Radio';
20
- function ChoiceRadioSingleItem(props) {
21
- const { value, label, readOnly } = props;
22
- return (React.createElement(FormControlLabel, { disabled: readOnly, value: value, control: React.createElement(Radio, { size: "small" }), label: label, sx: { mr: 3 } }));
23
- }
24
- export default ChoiceRadioSingleItem;
25
- //# sourceMappingURL=ChoiceRadioSingleItem.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"ChoiceRadioSingleItem.js","sourceRoot":"","sources":["../../../../src/components/FormComponents/ChoiceItems/ChoiceRadioSingleItem.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAEH,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,gBAAgB,MAAM,gCAAgC,CAAC;AAC9D,OAAO,KAAK,MAAM,qBAAqB,CAAC;AAQxC,SAAS,qBAAqB,CAAC,KAAY;IACzC,MAAM,EAAE,KAAK,EAAE,KAAK,EAAE,QAAQ,EAAE,GAAG,KAAK,CAAC;IAEzC,OAAO,CACL,oBAAC,gBAAgB,IACf,QAAQ,EAAE,QAAQ,EAClB,KAAK,EAAE,KAAK,EACZ,OAAO,EAAE,oBAAC,KAAK,IAAC,IAAI,EAAC,OAAO,GAAG,EAC/B,KAAK,EAAE,KAAK,EACZ,EAAE,EAAE,EAAE,EAAE,EAAE,CAAC,EAAE,GACb,CACH,CAAC;AACJ,CAAC;AAED,eAAe,qBAAqB,CAAC"}
@@ -1,9 +0,0 @@
1
- import React from 'react';
2
- import type { QuestionnaireItem, QuestionnaireResponseItem } from 'fhir/r4';
3
- import type { PropsWithIsRepeatedAttribute, PropsWithIsTabledAttribute, PropsWithQrItemChangeHandler } from '../../../interfaces/renderProps.interface';
4
- interface Props extends PropsWithQrItemChangeHandler<QuestionnaireResponseItem>, PropsWithIsRepeatedAttribute, PropsWithIsTabledAttribute {
5
- qItem: QuestionnaireItem;
6
- qrItem: QuestionnaireResponseItem;
7
- }
8
- declare function QItemChoice(props: Props): React.JSX.Element | null;
9
- export default QItemChoice;
@@ -1,61 +0,0 @@
1
- /*
2
- * Copyright 2023 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 { QItemChoiceControl } from '../../../interfaces/choice.enum';
19
- import QItemChoiceRadioAnswerOption from './QItemChoiceRadioAnswerOption';
20
- import QItemChoiceSelectAnswerOption from './QItemChoiceSelectAnswerOption';
21
- import QItemChoiceCheckboxAnswerOption from './QItemChoiceCheckboxAnswerOption';
22
- import QItemChoiceAutocomplete from './QItemChoiceAutocomplete';
23
- import QItemChoiceSelectAnswerValueSet from './QItemChoiceSelectAnswerValueSet';
24
- import { getChoiceControlType, getChoiceOrientation } from '../../../utils/choice';
25
- import QItemChoiceRadioAnswerValueSet from './QItemChoiceRadioAnswerValueSet';
26
- import QItemChoiceCheckboxAnswerValueSet from './QItemChoiceCheckboxAnswerValueSet';
27
- function QItemChoice(props) {
28
- var _a, _b;
29
- const { qItem, qrItem, isRepeated, isTabled, onQrItemChange } = props;
30
- const orientation = getChoiceOrientation(qItem);
31
- const choiceControlType = getChoiceControlType(qItem);
32
- switch (choiceControlType) {
33
- case QItemChoiceControl.Radio:
34
- if (qItem.answerOption) {
35
- return (React.createElement(QItemChoiceRadioAnswerOption, { qItem: qItem, qrItem: qrItem, isRepeated: isRepeated, onQrItemChange: onQrItemChange, orientation: orientation }));
36
- }
37
- else {
38
- return (React.createElement(QItemChoiceRadioAnswerValueSet, { qItem: qItem, qrItem: qrItem, isRepeated: isRepeated, onQrItemChange: onQrItemChange, orientation: orientation }));
39
- }
40
- case QItemChoiceControl.Checkbox:
41
- if (qItem.answerOption) {
42
- return (React.createElement(QItemChoiceCheckboxAnswerOption, { qItem: qItem, qrItem: qrItem, isRepeated: (_a = qItem['repeats']) !== null && _a !== void 0 ? _a : false, onQrItemChange: onQrItemChange, orientation: orientation }));
43
- }
44
- else {
45
- return (React.createElement(QItemChoiceCheckboxAnswerValueSet, { qItem: qItem, qrItem: qrItem, isRepeated: (_b = qItem['repeats']) !== null && _b !== void 0 ? _b : false, onQrItemChange: onQrItemChange, orientation: orientation }));
46
- }
47
- case QItemChoiceControl.Autocomplete:
48
- return (React.createElement(QItemChoiceAutocomplete, { qItem: qItem, qrItem: qrItem, isRepeated: isRepeated, isTabled: isTabled, onQrItemChange: onQrItemChange }));
49
- case QItemChoiceControl.Select:
50
- if (qItem.answerOption) {
51
- return (React.createElement(QItemChoiceSelectAnswerOption, { qItem: qItem, qrItem: qrItem, isRepeated: isRepeated, isTabled: isTabled, onQrItemChange: onQrItemChange }));
52
- }
53
- else {
54
- return (React.createElement(QItemChoiceSelectAnswerValueSet, { qItem: qItem, qrItem: qrItem, isRepeated: isRepeated, isTabled: isTabled, onQrItemChange: onQrItemChange }));
55
- }
56
- default:
57
- return null;
58
- }
59
- }
60
- export default QItemChoice;
61
- //# sourceMappingURL=QItemChoice.js.map