@aehrc/smart-forms-renderer 0.8.1 → 0.9.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (340) hide show
  1. package/lib/components/FormComponents/BooleanItem/BooleanItem.d.ts +2 -2
  2. package/lib/components/FormComponents/ChoiceItems/ChoiceAutocompleteItem.d.ts +2 -2
  3. package/lib/components/FormComponents/ChoiceItems/ChoiceCheckboxAnswerOptionItem.d.ts +3 -3
  4. package/lib/components/FormComponents/ChoiceItems/ChoiceCheckboxAnswerOptionItem.js +12 -12
  5. package/lib/components/FormComponents/ChoiceItems/ChoiceCheckboxAnswerOptionItem.js.map +1 -1
  6. package/lib/components/FormComponents/ChoiceItems/ChoiceCheckboxAnswerValueSetItem.d.ts +3 -3
  7. package/lib/components/FormComponents/ChoiceItems/ChoiceCheckboxAnswerValueSetItem.js +12 -12
  8. package/lib/components/FormComponents/ChoiceItems/ChoiceCheckboxAnswerValueSetItem.js.map +1 -1
  9. package/lib/components/FormComponents/ChoiceItems/ChoiceItemSwitcher.d.ts +3 -4
  10. package/lib/components/FormComponents/ChoiceItems/ChoiceItemSwitcher.js +3 -3
  11. package/lib/components/FormComponents/ChoiceItems/ChoiceItemSwitcher.js.map +1 -1
  12. package/lib/components/FormComponents/ChoiceItems/ChoiceRadioAnswerOptionItem.d.ts +2 -2
  13. package/lib/components/FormComponents/ChoiceItems/ChoiceRadioAnswerValueSetItem.d.ts +2 -2
  14. package/lib/components/FormComponents/ChoiceItems/ChoiceSelectAnswerOptionItem.d.ts +2 -2
  15. package/lib/components/FormComponents/ChoiceItems/ChoiceSelectAnswerValueSetItem.d.ts +2 -2
  16. package/lib/components/FormComponents/CustomDateItem/CustomDateField2.d.ts +18 -0
  17. package/lib/components/FormComponents/CustomDateItem/CustomDateField2.js +31 -0
  18. package/lib/components/FormComponents/CustomDateItem/CustomDateField2.js.map +1 -0
  19. package/lib/components/FormComponents/CustomDateItem/CustomDateItem.d.ts +9 -0
  20. package/lib/components/FormComponents/CustomDateItem/CustomDateItem.js +68 -0
  21. package/lib/components/FormComponents/CustomDateItem/CustomDateItem.js.map +1 -0
  22. package/lib/components/FormComponents/CustomDateItem/CustomDateTimeField.d.ts +9 -0
  23. package/lib/components/FormComponents/CustomDateItem/CustomDateTimeField.js +75 -0
  24. package/lib/components/FormComponents/CustomDateItem/CustomDateTimeField.js.map +1 -0
  25. package/lib/components/FormComponents/CustomDateItem/CustomDateTimePickerText2.d.ts +9 -0
  26. package/lib/components/FormComponents/CustomDateItem/CustomDateTimePickerText2.js +75 -0
  27. package/lib/components/FormComponents/CustomDateItem/CustomDateTimePickerText2.js.map +1 -0
  28. package/lib/components/FormComponents/CustomDateItem/customDateTimePicker/CustomDateField.d.ts +18 -0
  29. package/lib/components/FormComponents/CustomDateItem/customDateTimePicker/CustomDateField.js +33 -0
  30. package/lib/components/FormComponents/CustomDateItem/customDateTimePicker/CustomDateField.js.map +1 -0
  31. package/lib/components/FormComponents/CustomDateItem/customDateTimePicker/DatePicker.d.ts +11 -0
  32. package/lib/components/FormComponents/CustomDateItem/customDateTimePicker/DatePicker.js +55 -0
  33. package/lib/components/FormComponents/CustomDateItem/customDateTimePicker/DatePicker.js.map +1 -0
  34. package/lib/components/FormComponents/CustomDateItem/customDateTimePicker/DatePickerButton.d.ts +9 -0
  35. package/lib/components/FormComponents/CustomDateItem/customDateTimePicker/DatePickerButton.js +13 -0
  36. package/lib/components/FormComponents/CustomDateItem/customDateTimePicker/DatePickerButton.js.map +1 -0
  37. package/lib/components/FormComponents/CustomDateItem/customDateTimePicker/MuiDatePicker.d.ts +5 -0
  38. package/lib/components/FormComponents/CustomDateItem/customDateTimePicker/MuiDatePicker.js +20 -0
  39. package/lib/components/FormComponents/CustomDateItem/customDateTimePicker/MuiDatePicker.js.map +1 -0
  40. package/lib/components/FormComponents/CustomDateItem/customDateTimePicker/hooks/useParseDates.d.ts +5 -0
  41. package/lib/components/FormComponents/CustomDateItem/customDateTimePicker/hooks/useParseDates.js +27 -0
  42. package/lib/components/FormComponents/CustomDateItem/customDateTimePicker/hooks/useParseDates.js.map +1 -0
  43. package/lib/components/FormComponents/CustomDateItem/customDateTimePicker/index.d.ts +1 -0
  44. package/lib/components/FormComponents/CustomDateItem/customDateTimePicker/index.js +18 -0
  45. package/lib/components/FormComponents/CustomDateItem/customDateTimePicker/index.js.map +1 -0
  46. package/lib/components/FormComponents/CustomDateItem/customDateTimePicker/utils/index.d.ts +1 -0
  47. package/lib/components/FormComponents/CustomDateItem/customDateTimePicker/utils/index.js +18 -0
  48. package/lib/components/FormComponents/CustomDateItem/customDateTimePicker/utils/index.js.map +1 -0
  49. package/lib/components/FormComponents/CustomDateItem/customDateTimePicker/utils/parseDates.d.ts +9 -0
  50. package/lib/components/FormComponents/CustomDateItem/customDateTimePicker/utils/parseDates.js +121 -0
  51. package/lib/components/FormComponents/CustomDateItem/customDateTimePicker/utils/parseDates.js.map +1 -0
  52. package/lib/components/FormComponents/CustomDateItem/customDateTimePickerText.d.ts +9 -0
  53. package/lib/components/FormComponents/CustomDateItem/customDateTimePickerText.js +71 -0
  54. package/lib/components/FormComponents/CustomDateItem/customDateTimePickerText.js.map +1 -0
  55. package/lib/components/FormComponents/CustomDateItem/index.d.ts +1 -0
  56. package/lib/components/FormComponents/CustomDateItem/index.js +18 -0
  57. package/lib/components/FormComponents/CustomDateItem/index.js.map +1 -0
  58. package/lib/components/FormComponents/DateItem/DateItem.d.ts +3 -4
  59. package/lib/components/FormComponents/DateTimeItem/DateTimeItem.d.ts +2 -2
  60. package/lib/components/FormComponents/DecimalItem/DecimalItem.d.ts +2 -2
  61. package/lib/components/FormComponents/DecimalItem/DecimalItem.js +2 -3
  62. package/lib/components/FormComponents/DecimalItem/DecimalItem.js.map +1 -1
  63. package/lib/components/FormComponents/DisplayItem/DisplayBox.d.ts +0 -0
  64. package/lib/components/FormComponents/DisplayItem/DisplayBox.js +2 -0
  65. package/lib/components/FormComponents/DisplayItem/DisplayBox.js.map +1 -0
  66. package/lib/components/FormComponents/DisplayItem/DisplayBox.styles.d.ts +4 -0
  67. package/lib/components/FormComponents/DisplayItem/DisplayBox.styles.js +35 -0
  68. package/lib/components/FormComponents/DisplayItem/DisplayBox.styles.js.map +1 -0
  69. package/lib/components/FormComponents/DisplayItem/DisplayInstructions.d.ts +2 -1
  70. package/lib/components/FormComponents/DisplayItem/DisplayInstructions.js.map +1 -1
  71. package/lib/components/FormComponents/DisplayItem/DisplayInstructions.styles.js +0 -1
  72. package/lib/components/FormComponents/DisplayItem/DisplayInstructions.styles.js.map +1 -1
  73. package/lib/components/FormComponents/GridGroup/GridGroup.d.ts +3 -3
  74. package/lib/components/FormComponents/GridGroup/GridGroup.js +13 -8
  75. package/lib/components/FormComponents/GridGroup/GridGroup.js.map +1 -1
  76. package/lib/components/FormComponents/GridGroup/GridRow.d.ts +3 -4
  77. package/lib/components/FormComponents/GridGroup/GridRow.js +3 -3
  78. package/lib/components/FormComponents/GridGroup/GridRow.js.map +1 -1
  79. package/lib/components/FormComponents/GridGroup/GridTable.d.ts +3 -3
  80. package/lib/components/FormComponents/GridGroup/GridTable.js +9 -4
  81. package/lib/components/FormComponents/GridGroup/GridTable.js.map +1 -1
  82. package/lib/components/FormComponents/GridGroup/index.d.ts +1 -0
  83. package/lib/components/FormComponents/GridGroup/index.js +18 -0
  84. package/lib/components/FormComponents/GridGroup/index.js.map +1 -0
  85. package/lib/components/FormComponents/GroupItem/GroupItem.d.ts +2 -2
  86. package/lib/components/FormComponents/GroupItem/GroupItem.js +2 -2
  87. package/lib/components/FormComponents/GroupItem/GroupItem.js.map +1 -1
  88. package/lib/components/FormComponents/GroupItem/GroupItemSwitcher.d.ts +2 -2
  89. package/lib/components/FormComponents/GroupItem/GroupItemSwitcher.js +5 -6
  90. package/lib/components/FormComponents/GroupItem/GroupItemSwitcher.js.map +1 -1
  91. package/lib/components/FormComponents/IntegerItem/IntegerItem.d.ts +2 -2
  92. package/lib/components/FormComponents/IntegerItem/IntegerItem.js +2 -3
  93. package/lib/components/FormComponents/IntegerItem/IntegerItem.js.map +1 -1
  94. package/lib/components/FormComponents/IntegerItem/SliderItem.d.ts +9 -0
  95. package/lib/components/FormComponents/IntegerItem/SliderItem.js +75 -0
  96. package/lib/components/FormComponents/IntegerItem/SliderItem.js.map +1 -0
  97. package/lib/components/FormComponents/ItemParts/FadingCheckIcon.js +2 -2
  98. package/lib/components/FormComponents/ItemParts/FadingCheckIcon.js.map +1 -1
  99. package/lib/components/FormComponents/ItemParts/ItemFieldGrid.d.ts +2 -2
  100. package/lib/components/FormComponents/OpenChoiceItems/OpenChoiceAutocompleteItem.d.ts +2 -2
  101. package/lib/components/FormComponents/OpenChoiceItems/OpenChoiceCheckboxAnswerOptionItem.d.ts +3 -3
  102. package/lib/components/FormComponents/OpenChoiceItems/OpenChoiceCheckboxAnswerOptionItem.js +12 -12
  103. package/lib/components/FormComponents/OpenChoiceItems/OpenChoiceCheckboxAnswerOptionItem.js.map +1 -1
  104. package/lib/components/FormComponents/OpenChoiceItems/OpenChoiceItemSwitcher.d.ts +3 -3
  105. package/lib/components/FormComponents/OpenChoiceItems/OpenChoiceItemSwitcher.js +2 -2
  106. package/lib/components/FormComponents/OpenChoiceItems/OpenChoiceItemSwitcher.js.map +1 -1
  107. package/lib/components/FormComponents/OpenChoiceItems/OpenChoiceRadioAnswerOptionItem.d.ts +2 -2
  108. package/lib/components/FormComponents/OpenChoiceItems/OpenChoiceSelectAnswerOptionItem.d.ts +2 -2
  109. package/lib/components/FormComponents/OpenChoiceItems/OpenChoiceSelectAnswerValueSetItem.d.ts +2 -2
  110. package/lib/components/FormComponents/RepeatGroup/RepeatGroup.d.ts +2 -2
  111. package/lib/components/FormComponents/RepeatGroup/RepeatGroup.js +15 -4
  112. package/lib/components/FormComponents/RepeatGroup/RepeatGroup.js.map +1 -1
  113. package/lib/components/FormComponents/RepeatGroup/RepeatGroupItem.d.ts +2 -2
  114. package/lib/components/FormComponents/RepeatGroup/RepeatGroupItem.js +2 -2
  115. package/lib/components/FormComponents/RepeatGroup/RepeatGroupItem.js.map +1 -1
  116. package/lib/components/FormComponents/RepeatItem/RepeatField.d.ts +3 -3
  117. package/lib/components/FormComponents/RepeatItem/RepeatField.js +3 -3
  118. package/lib/components/FormComponents/RepeatItem/RepeatField.js.map +1 -1
  119. package/lib/components/FormComponents/RepeatItem/RepeatItem.d.ts +3 -2
  120. package/lib/components/FormComponents/RepeatItem/RepeatItem.js +11 -2
  121. package/lib/components/FormComponents/RepeatItem/RepeatItem.js.map +1 -1
  122. package/lib/components/FormComponents/RepeatItem/index.d.ts +1 -0
  123. package/lib/components/FormComponents/RepeatItem/index.js +18 -0
  124. package/lib/components/FormComponents/RepeatItem/index.js.map +1 -0
  125. package/lib/components/FormComponents/SingleItem/SingleItem.d.ts +3 -3
  126. package/lib/components/FormComponents/SingleItem/SingleItem.js +2 -2
  127. package/lib/components/FormComponents/SingleItem/SingleItem.js.map +1 -1
  128. package/lib/components/FormComponents/SingleItem/SingleItemSwitcher.d.ts +3 -3
  129. package/lib/components/FormComponents/SingleItem/SingleItemSwitcher.js +12 -7
  130. package/lib/components/FormComponents/SingleItem/SingleItemSwitcher.js.map +1 -1
  131. package/lib/components/FormComponents/SliderItem/DisplayBox.styles.d.ts +4 -0
  132. package/lib/components/FormComponents/SliderItem/DisplayBox.styles.js +35 -0
  133. package/lib/components/FormComponents/SliderItem/DisplayBox.styles.js.map +1 -0
  134. package/lib/components/FormComponents/SliderItem/Slider.styles.d.ts +6 -0
  135. package/lib/components/FormComponents/SliderItem/Slider.styles.js +33 -0
  136. package/lib/components/FormComponents/SliderItem/Slider.styles.js.map +1 -0
  137. package/lib/components/FormComponents/SliderItem/SliderDisplayValue.d.ts +8 -0
  138. package/lib/components/FormComponents/SliderItem/SliderDisplayValue.js +28 -0
  139. package/lib/components/FormComponents/SliderItem/SliderDisplayValue.js.map +1 -0
  140. package/lib/components/FormComponents/SliderItem/SliderField.d.ts +16 -0
  141. package/lib/components/FormComponents/SliderItem/SliderField.js +41 -0
  142. package/lib/components/FormComponents/SliderItem/SliderField.js.map +1 -0
  143. package/lib/components/FormComponents/SliderItem/SliderItem.d.ts +9 -0
  144. package/lib/components/FormComponents/SliderItem/SliderItem.js +56 -0
  145. package/lib/components/FormComponents/SliderItem/SliderItem.js.map +1 -0
  146. package/lib/components/FormComponents/SliderItem/SliderLabels.d.ts +7 -0
  147. package/lib/components/FormComponents/SliderItem/SliderLabels.js +32 -0
  148. package/lib/components/FormComponents/SliderItem/SliderLabels.js.map +1 -0
  149. package/lib/components/FormComponents/StringItem/StringItem.d.ts +2 -2
  150. package/lib/components/FormComponents/Tables/GroupTable.d.ts +3 -2
  151. package/lib/components/FormComponents/Tables/GroupTable.js +18 -1
  152. package/lib/components/FormComponents/Tables/GroupTable.js.map +1 -1
  153. package/lib/components/FormComponents/Tables/GroupTableRow.d.ts +3 -4
  154. package/lib/components/FormComponents/Tables/GroupTableRow.js +3 -3
  155. package/lib/components/FormComponents/Tables/GroupTableRow.js.map +1 -1
  156. package/lib/components/FormComponents/TextItem/TextItem.d.ts +2 -2
  157. package/lib/components/FormComponents/TimeItem/TimeItem.d.ts +2 -2
  158. package/lib/components/FormComponents/UrlItem/UrlItem.d.ts +2 -2
  159. package/lib/components/FormComponents/index.d.ts +3 -0
  160. package/lib/components/FormComponents/index.js +3 -0
  161. package/lib/components/FormComponents/index.js.map +1 -1
  162. package/lib/components/Renderer/BaseRenderer.js +3 -5
  163. package/lib/components/Renderer/BaseRenderer.js.map +1 -1
  164. package/lib/components/Renderer/FormBodyCollapsible.d.ts +2 -2
  165. package/lib/components/Renderer/FormBodyCollapsible.js +6 -5
  166. package/lib/components/Renderer/FormBodyCollapsible.js.map +1 -1
  167. package/lib/components/Renderer/FormBodySingleCollapsibleWrapper.d.ts +2 -2
  168. package/lib/components/Renderer/FormBodySingleCollapsibleWrapper.js.map +1 -1
  169. package/lib/components/Renderer/FormBodyTabbed.d.ts +2 -2
  170. package/lib/components/Renderer/FormBodyTabbed.js +6 -5
  171. package/lib/components/Renderer/FormBodyTabbed.js.map +1 -1
  172. package/lib/components/Renderer/FormTopLevelItem.d.ts +2 -2
  173. package/lib/components/Renderer/FormTopLevelItem.js +3 -1
  174. package/lib/components/Renderer/FormTopLevelItem.js.map +1 -1
  175. package/lib/hooks/useDateSeparatorValidation.d.ts +2 -0
  176. package/lib/hooks/useDateSeparatorValidation.js +25 -0
  177. package/lib/hooks/useDateSeparatorValidation.js.map +1 -0
  178. package/lib/hooks/useDateValidation.d.ts +2 -0
  179. package/lib/hooks/useDateValidation.js +61 -0
  180. package/lib/hooks/useDateValidation.js.map +1 -0
  181. package/lib/hooks/useDecimalCalculatedExpression.d.ts +0 -1
  182. package/lib/hooks/useDecimalCalculatedExpression.js +3 -3
  183. package/lib/hooks/useDecimalCalculatedExpression.js.map +1 -1
  184. package/lib/hooks/useInitialiseRepeatAnswers.d.ts +1 -1
  185. package/lib/hooks/useInitialiseRepeatAnswers.js.map +1 -1
  186. package/lib/hooks/useIntegerCalculatedExpression.d.ts +0 -1
  187. package/lib/hooks/useIntegerCalculatedExpression.js +3 -3
  188. package/lib/hooks/useIntegerCalculatedExpression.js.map +1 -1
  189. package/lib/hooks/useSliderExtensions.d.ts +10 -0
  190. package/lib/hooks/useSliderExtensions.js +37 -0
  191. package/lib/hooks/useSliderExtensions.js.map +1 -0
  192. package/lib/hooks/useTerminologyServerQuery.js +0 -1
  193. package/lib/hooks/useTerminologyServerQuery.js.map +1 -1
  194. package/lib/index.d.ts +3 -3
  195. package/lib/index.js +15 -6
  196. package/lib/index.js.map +1 -1
  197. package/lib/interfaces/index.d.ts +2 -0
  198. package/lib/interfaces/index.js +18 -0
  199. package/lib/interfaces/index.js.map +1 -0
  200. package/lib/interfaces/questionnaireStore.interface.d.ts +1 -0
  201. package/lib/interfaces/renderProps.interface.d.ts +4 -3
  202. package/lib/stores/useQuestionnaireStore.d.ts +1 -0
  203. package/lib/stores/useQuestionnaireStore.js +28 -12
  204. package/lib/stores/useQuestionnaireStore.js.map +1 -1
  205. package/lib/test.d.ts +4 -0
  206. package/lib/test.js +18 -0
  207. package/lib/test.js.map +1 -0
  208. package/lib/theme/customGlobalStyles.js +0 -4
  209. package/lib/theme/customGlobalStyles.js.map +1 -1
  210. package/lib/utils/calculatedExpression.d.ts +5 -1
  211. package/lib/utils/calculatedExpression.js +21 -16
  212. package/lib/utils/calculatedExpression.js.map +1 -1
  213. package/lib/utils/dayjsExtend.d.ts +1 -0
  214. package/lib/utils/dayjsExtend.js +22 -0
  215. package/lib/utils/dayjsExtend.js.map +1 -0
  216. package/lib/utils/enableWhenExpression.d.ts +5 -1
  217. package/lib/utils/enableWhenExpression.js +26 -21
  218. package/lib/utils/enableWhenExpression.js.map +1 -1
  219. package/lib/utils/fhirpath.d.ts +3 -1
  220. package/lib/utils/fhirpath.js +25 -15
  221. package/lib/utils/fhirpath.js.map +1 -1
  222. package/lib/utils/index.d.ts +1 -0
  223. package/lib/utils/index.js +1 -0
  224. package/lib/utils/index.js.map +1 -1
  225. package/lib/utils/initialiseForm.d.ts +2 -0
  226. package/lib/utils/initialiseForm.js +13 -5
  227. package/lib/utils/initialiseForm.js.map +1 -1
  228. package/lib/utils/itemControl.d.ts +12 -0
  229. package/lib/utils/itemControl.js +30 -0
  230. package/lib/utils/itemControl.js.map +1 -1
  231. package/lib/utils/launchContext.d.ts +0 -0
  232. package/lib/utils/launchContext.js +2 -0
  233. package/lib/utils/launchContext.js.map +1 -0
  234. package/lib/utils/mapItem.d.ts +1 -1
  235. package/lib/utils/qrItem.d.ts +1 -7
  236. package/lib/utils/qrItem.js +1 -12
  237. package/lib/utils/qrItem.js.map +1 -1
  238. package/lib/utils/questionnaireStoreUtils/createQuestionaireModel.js +4 -2
  239. package/lib/utils/questionnaireStoreUtils/createQuestionaireModel.js.map +1 -1
  240. package/lib/utils/removeHidden.js +2 -1
  241. package/lib/utils/removeHidden.js.map +1 -1
  242. package/lib/utils/repopulateIntoResponse.js +90 -29
  243. package/lib/utils/repopulateIntoResponse.js.map +1 -1
  244. package/lib/utils/repopulateItems.d.ts +14 -1
  245. package/lib/utils/repopulateItems.js +251 -70
  246. package/lib/utils/repopulateItems.js.map +1 -1
  247. package/lib/utils/repopulateRepeatGroup.js +9 -1
  248. package/lib/utils/repopulateRepeatGroup.js.map +1 -1
  249. package/lib/utils/slider.d.ts +28 -0
  250. package/lib/utils/slider.js +89 -0
  251. package/lib/utils/slider.js.map +1 -0
  252. package/package.json +11 -9
  253. package/src/components/FormComponents/BooleanItem/BooleanItem.tsx +2 -2
  254. package/src/components/FormComponents/ChoiceItems/ChoiceAutocompleteItem.tsx +2 -2
  255. package/src/components/FormComponents/ChoiceItems/ChoiceCheckboxAnswerOptionItem.tsx +33 -33
  256. package/src/components/FormComponents/ChoiceItems/ChoiceCheckboxAnswerValueSetItem.tsx +35 -35
  257. package/src/components/FormComponents/ChoiceItems/ChoiceItemSwitcher.tsx +8 -8
  258. package/src/components/FormComponents/ChoiceItems/ChoiceRadioAnswerOptionItem.tsx +2 -2
  259. package/src/components/FormComponents/ChoiceItems/ChoiceRadioAnswerValueSetItem.tsx +2 -2
  260. package/src/components/FormComponents/ChoiceItems/ChoiceSelectAnswerOptionItem.tsx +2 -2
  261. package/src/components/FormComponents/ChoiceItems/ChoiceSelectAnswerValueSetItem.tsx +2 -2
  262. package/src/components/FormComponents/CustomDateItem/CustomDateItem.tsx +140 -0
  263. package/src/components/FormComponents/CustomDateItem/customDateTimePicker/CustomDateField.tsx +96 -0
  264. package/src/components/FormComponents/CustomDateItem/customDateTimePicker/DatePicker.tsx +81 -0
  265. package/src/components/FormComponents/CustomDateItem/customDateTimePicker/DatePickerButton.tsx +33 -0
  266. package/src/components/FormComponents/CustomDateItem/customDateTimePicker/MuiDatePicker.ts +22 -0
  267. package/src/components/FormComponents/CustomDateItem/customDateTimePicker/index.ts +18 -0
  268. package/src/components/FormComponents/CustomDateItem/customDateTimePicker/utils/index.ts +18 -0
  269. package/src/components/FormComponents/CustomDateItem/customDateTimePicker/utils/parseDates.ts +154 -0
  270. package/src/components/FormComponents/CustomDateItem/index.ts +18 -0
  271. package/src/components/FormComponents/DateItem/DateItem.tsx +3 -3
  272. package/src/components/FormComponents/DateTimeItem/DateTimeItem.tsx +2 -2
  273. package/src/components/FormComponents/DecimalItem/DecimalItem.tsx +4 -5
  274. package/src/components/FormComponents/DisplayItem/DisplayInstructions.styles.ts +0 -1
  275. package/src/components/FormComponents/DisplayItem/DisplayInstructions.tsx +2 -1
  276. package/src/components/FormComponents/GridGroup/GridGroup.tsx +41 -15
  277. package/src/components/FormComponents/GridGroup/GridRow.tsx +10 -9
  278. package/src/components/FormComponents/GridGroup/GridTable.tsx +29 -9
  279. package/src/components/FormComponents/GridGroup/index.ts +18 -0
  280. package/src/components/FormComponents/GroupItem/GroupItem.tsx +5 -6
  281. package/src/components/FormComponents/GroupItem/GroupItemSwitcher.tsx +7 -8
  282. package/src/components/FormComponents/IntegerItem/IntegerItem.tsx +4 -5
  283. package/src/components/FormComponents/ItemParts/FadingCheckIcon.tsx +2 -2
  284. package/src/components/FormComponents/ItemParts/ItemFieldGrid.tsx +2 -2
  285. package/src/components/FormComponents/OpenChoiceItems/OpenChoiceAutocompleteItem.tsx +2 -2
  286. package/src/components/FormComponents/OpenChoiceItems/OpenChoiceCheckboxAnswerOptionItem.tsx +43 -43
  287. package/src/components/FormComponents/OpenChoiceItems/OpenChoiceItemSwitcher.tsx +6 -6
  288. package/src/components/FormComponents/OpenChoiceItems/OpenChoiceRadioAnswerOptionItem.tsx +2 -2
  289. package/src/components/FormComponents/OpenChoiceItems/OpenChoiceSelectAnswerOptionItem.tsx +2 -2
  290. package/src/components/FormComponents/OpenChoiceItems/OpenChoiceSelectAnswerValueSetItem.tsx +2 -2
  291. package/src/components/FormComponents/RepeatGroup/RepeatGroup.tsx +49 -6
  292. package/src/components/FormComponents/RepeatGroup/RepeatGroupItem.tsx +13 -8
  293. package/src/components/FormComponents/RepeatItem/RepeatField.tsx +15 -9
  294. package/src/components/FormComponents/RepeatItem/RepeatItem.tsx +33 -3
  295. package/src/components/FormComponents/RepeatItem/index.ts +18 -0
  296. package/src/components/FormComponents/SingleItem/SingleItem.tsx +6 -6
  297. package/src/components/FormComponents/SingleItem/SingleItemSwitcher.tsx +27 -11
  298. package/src/components/FormComponents/SliderItem/Slider.styles.ts +34 -0
  299. package/src/components/FormComponents/SliderItem/SliderDisplayValue.tsx +43 -0
  300. package/src/components/FormComponents/SliderItem/SliderField.tsx +88 -0
  301. package/src/components/FormComponents/SliderItem/SliderItem.tsx +115 -0
  302. package/src/components/FormComponents/SliderItem/SliderLabels.tsx +53 -0
  303. package/src/components/FormComponents/StringItem/StringItem.tsx +2 -2
  304. package/src/components/FormComponents/Tables/GroupTable.tsx +55 -3
  305. package/src/components/FormComponents/Tables/GroupTableRow.tsx +10 -9
  306. package/src/components/FormComponents/TextItem/TextItem.tsx +2 -2
  307. package/src/components/FormComponents/TimeItem/TimeItem.tsx +2 -2
  308. package/src/components/FormComponents/UrlItem/UrlItem.tsx +2 -2
  309. package/src/components/FormComponents/index.ts +3 -0
  310. package/src/components/Renderer/BaseRenderer.tsx +5 -12
  311. package/src/components/Renderer/FormBodyCollapsible.tsx +9 -7
  312. package/src/components/Renderer/FormBodySingleCollapsibleWrapper.tsx +2 -3
  313. package/src/components/Renderer/FormBodyTabbed.tsx +9 -7
  314. package/src/components/Renderer/FormTopLevelItem.tsx +14 -11
  315. package/src/hooks/useDateValidation.tsx +79 -0
  316. package/src/hooks/useDecimalCalculatedExpression.ts +3 -4
  317. package/src/hooks/useInitialiseRepeatAnswers.ts +1 -1
  318. package/src/hooks/useIntegerCalculatedExpression.ts +3 -4
  319. package/src/hooks/useSliderExtensions.ts +50 -0
  320. package/src/hooks/useTerminologyServerQuery.ts +0 -2
  321. package/src/index.ts +12 -9
  322. package/src/interfaces/questionnaireStore.interface.ts +1 -0
  323. package/src/interfaces/renderProps.interface.ts +4 -3
  324. package/src/stores/useQuestionnaireStore.ts +39 -16
  325. package/src/theme/customGlobalStyles.tsx +0 -4
  326. package/src/utils/calculatedExpression.ts +41 -28
  327. package/src/utils/dayjsExtend.ts +23 -0
  328. package/src/utils/enableWhenExpression.ts +49 -34
  329. package/src/utils/fhirpath.ts +50 -31
  330. package/src/utils/index.ts +1 -0
  331. package/src/utils/initialiseForm.ts +15 -5
  332. package/src/utils/itemControl.ts +32 -0
  333. package/src/utils/mapItem.ts +1 -1
  334. package/src/utils/qrItem.ts +1 -16
  335. package/src/utils/questionnaireStoreUtils/createQuestionaireModel.ts +4 -2
  336. package/src/utils/removeHidden.ts +2 -1
  337. package/src/utils/repopulateIntoResponse.ts +134 -43
  338. package/src/utils/repopulateItems.ts +379 -101
  339. package/src/utils/slider.ts +112 -0
  340. package/src/utils/repopulateRepeatGroup.ts +0 -68
@@ -1,9 +1,9 @@
1
1
  import React from 'react';
2
2
  import type { QuestionnaireItem, QuestionnaireResponseItem } from 'fhir/r4';
3
- import type { PropsWithIsRepeatedAttribute, PropsWithIsTabledAttribute, PropsWithParentIsReadOnlyAttribute, PropsWithQrItemChangeHandler, PropsWithTextShownAttribute } from '../../../interfaces/renderProps.interface';
4
- interface SingleItemSwitcherProps extends PropsWithQrItemChangeHandler<QuestionnaireResponseItem>, PropsWithIsRepeatedAttribute, PropsWithIsTabledAttribute, PropsWithTextShownAttribute, PropsWithParentIsReadOnlyAttribute {
3
+ import type { PropsWithIsRepeatedAttribute, PropsWithIsTabledAttribute, PropsWithParentIsReadOnlyAttribute, PropsWithQrItemChangeHandler, PropsWithShowMinimalViewAttribute } from '../../../interfaces/renderProps.interface';
4
+ interface SingleItemSwitcherProps extends PropsWithQrItemChangeHandler, PropsWithIsRepeatedAttribute, PropsWithIsTabledAttribute, PropsWithShowMinimalViewAttribute, PropsWithParentIsReadOnlyAttribute {
5
5
  qItem: QuestionnaireItem;
6
- qrItem: QuestionnaireResponseItem;
6
+ qrItem: QuestionnaireResponseItem | null;
7
7
  }
8
8
  declare function SingleItemSwitcher(props: SingleItemSwitcherProps): React.JSX.Element;
9
9
  export default SingleItemSwitcher;
@@ -22,14 +22,16 @@ import StringItem from '../StringItem/StringItem';
22
22
  import BooleanItem from '../BooleanItem/BooleanItem';
23
23
  import TimeItem from '../TimeItem/TimeItem';
24
24
  import DateTimeItem from '../DateTimeItem/DateTimeItem';
25
- import DateItem from '../DateItem/DateItem';
26
25
  import TextItem from '../TextItem/TextItem';
27
26
  import DisplayItem from '../DisplayItem/DisplayItem';
28
- import IntegerItem from '../IntegerItem/IntegerItem';
29
27
  import DecimalItem from '../DecimalItem/DecimalItem';
30
28
  import UrlItem from '../UrlItem/UrlItem';
29
+ import CustomDateItem from '../CustomDateItem/CustomDateItem';
30
+ import { isSpecificItemControl } from '../../../utils';
31
+ import SliderItem from '../SliderItem/SliderItem';
32
+ import IntegerItem from '../IntegerItem/IntegerItem';
31
33
  function SingleItemSwitcher(props) {
32
- const { qItem, qrItem, isRepeated, isTabled, textShown, parentIsReadOnly, onQrItemChange } = props;
34
+ const { qItem, qrItem, isRepeated, isTabled, showMinimalView, parentIsReadOnly, onQrItemChange } = props;
33
35
  switch (qItem.type) {
34
36
  case 'string':
35
37
  return (React.createElement(StringItem, { qItem: qItem, qrItem: qrItem, isRepeated: isRepeated, isTabled: isTabled, parentIsReadOnly: parentIsReadOnly, onQrItemChange: onQrItemChange }));
@@ -38,7 +40,7 @@ function SingleItemSwitcher(props) {
38
40
  case 'time':
39
41
  return (React.createElement(TimeItem, { qItem: qItem, qrItem: qrItem, isRepeated: isRepeated, isTabled: isTabled, parentIsReadOnly: parentIsReadOnly, onQrItemChange: onQrItemChange }));
40
42
  case 'date':
41
- return (React.createElement(DateItem, { qItem: qItem, qrItem: qrItem, isRepeated: isRepeated, isTabled: isTabled, parentIsReadOnly: parentIsReadOnly, onQrItemChange: onQrItemChange }));
43
+ return (React.createElement(CustomDateItem, { qItem: qItem, qrItem: qrItem, isRepeated: isRepeated, isTabled: isTabled, parentIsReadOnly: parentIsReadOnly, onQrItemChange: onQrItemChange }));
42
44
  case 'dateTime':
43
45
  return (React.createElement(DateTimeItem, { qItem: qItem, qrItem: qrItem, isRepeated: isRepeated, isTabled: isTabled, parentIsReadOnly: parentIsReadOnly, onQrItemChange: onQrItemChange }));
44
46
  case 'text':
@@ -46,17 +48,20 @@ function SingleItemSwitcher(props) {
46
48
  case 'display':
47
49
  return React.createElement(DisplayItem, { qItem: qItem });
48
50
  case 'integer':
51
+ if (isSpecificItemControl(qItem, 'slider')) {
52
+ return (React.createElement(SliderItem, { qItem: qItem, qrItem: qrItem, isRepeated: isRepeated, isTabled: isTabled, parentIsReadOnly: parentIsReadOnly, onQrItemChange: onQrItemChange }));
53
+ }
49
54
  return (React.createElement(IntegerItem, { qItem: qItem, qrItem: qrItem, isRepeated: isRepeated, isTabled: isTabled, parentIsReadOnly: parentIsReadOnly, onQrItemChange: onQrItemChange }));
50
55
  case 'decimal':
51
56
  return (React.createElement(DecimalItem, { qItem: qItem, qrItem: qrItem, isRepeated: isRepeated, isTabled: isTabled, parentIsReadOnly: parentIsReadOnly, onQrItemChange: onQrItemChange }));
52
57
  case 'choice':
53
- return (React.createElement(ChoiceItemSwitcher, { qItem: qItem, qrItem: qrItem, isRepeated: isRepeated, isTabled: isTabled, textShown: textShown, parentIsReadOnly: parentIsReadOnly, onQrItemChange: onQrItemChange }));
58
+ return (React.createElement(ChoiceItemSwitcher, { qItem: qItem, qrItem: qrItem, isRepeated: isRepeated, isTabled: isTabled, showMinimalView: showMinimalView, parentIsReadOnly: parentIsReadOnly, onQrItemChange: onQrItemChange }));
54
59
  case 'open-choice':
55
- return (React.createElement(OpenChoiceItemSwitcher, { qItem: qItem, qrItem: qrItem, isRepeated: isRepeated, isTabled: isTabled, textShown: textShown, parentIsReadOnly: parentIsReadOnly, onQrItemChange: onQrItemChange }));
60
+ return (React.createElement(OpenChoiceItemSwitcher, { qItem: qItem, qrItem: qrItem, isRepeated: isRepeated, isTabled: isTabled, showMinimalView: showMinimalView, parentIsReadOnly: parentIsReadOnly, onQrItemChange: onQrItemChange }));
56
61
  case 'url':
57
62
  return (React.createElement(UrlItem, { qItem: qItem, qrItem: qrItem, isRepeated: isRepeated, isTabled: isTabled, parentIsReadOnly: parentIsReadOnly, onQrItemChange: onQrItemChange }));
58
63
  default:
59
- return (React.createElement(Typography, null, "Item type not supported yet. Only R4 datatypes are supported at the moment."));
64
+ return (React.createElement(Typography, null, "Item type not supported yet, or something has went wrong. If your questionnnaire is not a FHIR R4 resource, there might be issues rendering it."));
60
65
  }
61
66
  }
62
67
  export default SingleItemSwitcher;
@@ -1 +1 @@
1
- {"version":3,"file":"SingleItemSwitcher.js","sourceRoot":"","sources":["../../../../src/components/FormComponents/SingleItem/SingleItemSwitcher.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAEH,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,kBAAkB,MAAM,mCAAmC,CAAC;AAEnE,OAAO,sBAAsB,MAAM,2CAA2C,CAAC;AAC/E,OAAO,UAAU,MAAM,0BAA0B,CAAC;AAQlD,OAAO,UAAU,MAAM,0BAA0B,CAAC;AAClD,OAAO,WAAW,MAAM,4BAA4B,CAAC;AACrD,OAAO,QAAQ,MAAM,sBAAsB,CAAC;AAC5C,OAAO,YAAY,MAAM,8BAA8B,CAAC;AACxD,OAAO,QAAQ,MAAM,sBAAsB,CAAC;AAC5C,OAAO,QAAQ,MAAM,sBAAsB,CAAC;AAC5C,OAAO,WAAW,MAAM,4BAA4B,CAAC;AACrD,OAAO,WAAW,MAAM,4BAA4B,CAAC;AACrD,OAAO,WAAW,MAAM,4BAA4B,CAAC;AACrD,OAAO,OAAO,MAAM,oBAAoB,CAAC;AAYzC,SAAS,kBAAkB,CAAC,KAA8B;IACxD,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,UAAU,EAAE,QAAQ,EAAE,SAAS,EAAE,gBAAgB,EAAE,cAAc,EAAE,GACxF,KAAK,CAAC;IAER,QAAQ,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AAc,EAAE,cAAc,GAC9B,CACH,CAAC;QACJ;YACE,OAAO,CACL,oBAAC,UAAU,sFAEE,CACd,CAAC;KACL;AACH,CAAC;AAED,eAAe,kBAAkB,CAAC"}
1
+ {"version":3,"file":"SingleItemSwitcher.js","sourceRoot":"","sources":["../../../../src/components/FormComponents/SingleItem/SingleItemSwitcher.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAEH,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,kBAAkB,MAAM,mCAAmC,CAAC;AAEnE,OAAO,sBAAsB,MAAM,2CAA2C,CAAC;AAC/E,OAAO,UAAU,MAAM,0BAA0B,CAAC;AAQlD,OAAO,UAAU,MAAM,0BAA0B,CAAC;AAClD,OAAO,WAAW,MAAM,4BAA4B,CAAC;AACrD,OAAO,QAAQ,MAAM,sBAAsB,CAAC;AAC5C,OAAO,YAAY,MAAM,8BAA8B,CAAC;AACxD,OAAO,QAAQ,MAAM,sBAAsB,CAAC;AAC5C,OAAO,WAAW,MAAM,4BAA4B,CAAC;AACrD,OAAO,WAAW,MAAM,4BAA4B,CAAC;AACrD,OAAO,OAAO,MAAM,oBAAoB,CAAC;AACzC,OAAO,cAAc,MAAM,kCAAkC,CAAC;AAC9D,OAAO,EAAE,qBAAqB,EAAE,MAAM,gBAAgB,CAAC;AACvD,OAAO,UAAU,MAAM,0BAA0B,CAAC;AAClD,OAAO,WAAW,MAAM,4BAA4B,CAAC;AAYrD,SAAS,kBAAkB,CAAC,KAA8B;IACxD,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,UAAU,EAAE,QAAQ,EAAE,eAAe,EAAE,gBAAgB,EAAE,cAAc,EAAE,GAC9F,KAAK,CAAC;IAER,QAAQ,KAAK,CAAC,IAAI,EAAE;QAClB,KAAK,QAAQ;YACX,OAAO,CACL,oBAAC,UAAU,IACT,KAAK,EAAE,KAAK,EACZ,MAAM,EAAE,MAAM,EACd,UAAU,EAAE,UAAU,EACtB,QAA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ACZ,MAAM,EAAE,MAAM,EACd,UAAU,EAAE,UAAU,EACtB,QAAQ,EAAE,QAAQ,EAClB,gBAAgB,EAAE,gBAAgB,EAClC,cAAc,EAAE,cAAc,GAC9B,CACH,CAAC;QACJ;YACE,OAAO,CACL,oBAAC,UAAU,0JAGE,CACd,CAAC;KACL;AACH,CAAC;AAED,eAAe,kBAAkB,CAAC"}
@@ -0,0 +1,4 @@
1
+ /// <reference types="react" />
2
+ export declare const StyledDisplayBox: import("@emotion/styled").StyledComponent<import("@mui/system").BoxOwnProps<import("@mui/material").Theme> & Omit<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
3
+ ref?: ((instance: HTMLDivElement | null) => void) | import("react").RefObject<HTMLDivElement> | null | undefined;
4
+ }, keyof import("@mui/system").BoxOwnProps<import("@mui/material").Theme>> & import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme>, {}, {}>;
@@ -0,0 +1,35 @@
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 { styled } from '@mui/material/styles';
18
+ import { Box } from '@mui/material';
19
+ export const StyledDisplayBox = styled(Box)(({ theme }) => ({
20
+ display: 'flex',
21
+ alignItems: 'center',
22
+ padding: theme.spacing(0.5),
23
+ borderRadius: Number(theme.shape.borderRadius) * 1.5
24
+ // backgroundColor: alpha(
25
+ // color === 'error' ? theme.palette.error.light : theme.palette.info.light,
26
+ // 0.12
27
+ // ),
28
+ // [theme.breakpoints.up('sm')]: {
29
+ // padding: theme.spacing(1.5)
30
+ // },
31
+ // [theme.breakpoints.up('md')]: {
32
+ // padding: theme.spacing(2)
33
+ // }
34
+ }));
35
+ //# sourceMappingURL=DisplayBox.styles.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"DisplayBox.styles.js","sourceRoot":"","sources":["../../../../src/components/FormComponents/SliderItem/DisplayBox.styles.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAEH,OAAO,EAAE,MAAM,EAAE,MAAM,sBAAsB,CAAC;AAC9C,OAAO,EAAE,GAAG,EAAE,MAAM,eAAe,CAAC;AAEpC,MAAM,CAAC,MAAM,gBAAgB,GAAG,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,KAAK,EAAE,EAAE,EAAE,CAAC,CAAC;IAC1D,OAAO,EAAE,MAAM;IACf,UAAU,EAAE,QAAQ;IACpB,OAAO,EAAE,KAAK,CAAC,OAAO,CAAC,GAAG,CAAC;IAC3B,YAAY,EAAE,MAAM,CAAC,KAAK,CAAC,KAAK,CAAC,YAAY,CAAC,GAAG,GAAG;IACpD,0BAA0B;IAC1B,8EAA8E;IAC9E,SAAS;IACT,KAAK;IACL,kCAAkC;IAClC,gCAAgC;IAChC,KAAK;IACL,kCAAkC;IAClC,8BAA8B;IAC9B,IAAI;CACL,CAAC,CAAC,CAAC"}
@@ -0,0 +1,6 @@
1
+ /// <reference types="react" />
2
+ export declare const SliderDisplayBox: import("@emotion/styled").StyledComponent<import("@mui/system").BoxOwnProps<import("@mui/material").Theme> & Omit<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
3
+ ref?: ((instance: HTMLDivElement | null) => void) | import("react").RefObject<HTMLDivElement> | null | undefined;
4
+ }, keyof import("@mui/system").BoxOwnProps<import("@mui/material").Theme>> & import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme> & {
5
+ hasLabels: boolean;
6
+ }, {}, {}>;
@@ -0,0 +1,33 @@
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 { alpha, styled } from '@mui/material/styles';
18
+ import { Box } from '@mui/material';
19
+ export const SliderDisplayBox = styled(Box, {
20
+ shouldForwardProp: (prop) => prop !== 'hasLabels'
21
+ })(({ theme, hasLabels }) => ({
22
+ display: 'flex',
23
+ alignItems: 'center',
24
+ justifyContent: 'center',
25
+ margin: '0 auto',
26
+ marginBottom: hasLabels ? -20 : 0,
27
+ padding: theme.spacing(0.5),
28
+ borderRadius: Number(theme.shape.borderRadius) * 0.5,
29
+ border: `1px solid ${alpha(theme.palette.text.disabled, 0.5)}`,
30
+ minWidth: 28,
31
+ height: 18
32
+ }));
33
+ //# sourceMappingURL=Slider.styles.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Slider.styles.js","sourceRoot":"","sources":["../../../../src/components/FormComponents/SliderItem/Slider.styles.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAEH,OAAO,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,sBAAsB,CAAC;AACrD,OAAO,EAAE,GAAG,EAAE,MAAM,eAAe,CAAC;AAEpC,MAAM,CAAC,MAAM,gBAAgB,GAAG,MAAM,CAAC,GAAG,EAAE;IAC1C,iBAAiB,EAAE,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,KAAK,WAAW;CAClD,CAAC,CAAyB,CAAC,EAAE,KAAK,EAAE,SAAS,EAAE,EAAE,EAAE,CAAC,CAAC;IACpD,OAAO,EAAE,MAAM;IACf,UAAU,EAAE,QAAQ;IACpB,cAAc,EAAE,QAAQ;IACxB,MAAM,EAAE,QAAQ;IAChB,YAAY,EAAE,SAAS,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC;IACjC,OAAO,EAAE,KAAK,CAAC,OAAO,CAAC,GAAG,CAAC;IAC3B,YAAY,EAAE,MAAM,CAAC,KAAK,CAAC,KAAK,CAAC,YAAY,CAAC,GAAG,GAAG;IACpD,MAAM,EAAE,aAAa,KAAK,CAAC,KAAK,CAAC,OAAO,CAAC,IAAI,CAAC,QAAQ,EAAE,GAAG,CAAC,EAAE;IAC9D,QAAQ,EAAE,EAAE;IACZ,MAAM,EAAE,EAAE;CACX,CAAC,CAAC,CAAC"}
@@ -0,0 +1,8 @@
1
+ import React from 'react';
2
+ interface SliderDisplayValueProps {
3
+ value: number;
4
+ hasLabels: boolean;
5
+ isInteracted: boolean;
6
+ }
7
+ declare function SliderDisplayValue(props: SliderDisplayValueProps): React.JSX.Element;
8
+ export default SliderDisplayValue;
@@ -0,0 +1,28 @@
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 { SliderDisplayBox } from './Slider.styles';
19
+ import Typography from '@mui/material/Typography';
20
+ import { pxToRem } from '../../../theme/typography';
21
+ function SliderDisplayValue(props) {
22
+ const { value, hasLabels, isInteracted } = props;
23
+ const valueToDisplay = isInteracted ? value : '-';
24
+ return (React.createElement(SliderDisplayBox, { hasLabels: hasLabels },
25
+ React.createElement(Typography, { textAlign: "center", color: "text.disabled", fontSize: pxToRem(9.5) }, valueToDisplay)));
26
+ }
27
+ export default SliderDisplayValue;
28
+ //# sourceMappingURL=SliderDisplayValue.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"SliderDisplayValue.js","sourceRoot":"","sources":["../../../../src/components/FormComponents/SliderItem/SliderDisplayValue.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAEH,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,gBAAgB,EAAE,MAAM,iBAAiB,CAAC;AACnD,OAAO,UAAU,MAAM,0BAA0B,CAAC;AAClD,OAAO,EAAE,OAAO,EAAE,MAAM,2BAA2B,CAAC;AAQpD,SAAS,kBAAkB,CAAC,KAA8B;IACxD,MAAM,EAAE,KAAK,EAAE,SAAS,EAAE,YAAY,EAAE,GAAG,KAAK,CAAC;IAEjD,MAAM,cAAc,GAAG,YAAY,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,GAAG,CAAC;IAElD,OAAO,CACL,oBAAC,gBAAgB,IAAC,SAAS,EAAE,SAAS;QACpC,oBAAC,UAAU,IAAC,SAAS,EAAC,QAAQ,EAAC,KAAK,EAAC,eAAe,EAAC,QAAQ,EAAE,OAAO,CAAC,GAAG,CAAC,IACxE,cAAc,CACJ,CACI,CACpB,CAAC;AACJ,CAAC;AAED,eAAe,kBAAkB,CAAC"}
@@ -0,0 +1,16 @@
1
+ import React from 'react';
2
+ import type { PropsWithIsTabledAttribute } from '../../../interfaces/renderProps.interface';
3
+ interface SliderFieldProps extends PropsWithIsTabledAttribute {
4
+ linkId: string;
5
+ value: number;
6
+ minValue: number;
7
+ minLabel: string;
8
+ maxValue: number;
9
+ maxLabel: string;
10
+ stepValue: number;
11
+ isInteracted: boolean;
12
+ readOnly: boolean;
13
+ onValueChange: (newValue: number) => void;
14
+ }
15
+ declare function SliderField(props: SliderFieldProps): React.JSX.Element;
16
+ export default SliderField;
@@ -0,0 +1,41 @@
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 Slider from '@mui/material/Slider';
19
+ import { getSliderMarks } from '../../../utils/slider';
20
+ import Stack from '@mui/material/Stack';
21
+ import SliderLabels from './SliderLabels';
22
+ import SliderDisplayValue from './SliderDisplayValue';
23
+ function SliderField(props) {
24
+ const { linkId, value, minValue, maxValue, stepValue, minLabel, maxLabel, isInteracted, readOnly, isTabled, onValueChange } = props;
25
+ const sliderMarks = getSliderMarks(minValue, maxValue, minLabel, maxLabel, stepValue);
26
+ const sliderSx = {
27
+ maxWidth: !isTabled ? 280 : 3000,
28
+ minWidth: 160
29
+ };
30
+ const hasLabels = !!(minLabel || maxLabel);
31
+ return (React.createElement(Stack, { sx: Object.assign({}, sliderSx) },
32
+ React.createElement(SliderDisplayValue, { value: value, hasLabels: hasLabels, isInteracted: isInteracted }),
33
+ hasLabels ? React.createElement(SliderLabels, { minLabel: minLabel, maxLabel: maxLabel }) : null,
34
+ React.createElement(Slider, { id: linkId, value: value, min: minValue, max: maxValue, step: stepValue, marks: sliderMarks, sx: Object.assign({}, sliderSx), onChange: (_, newValue) => {
35
+ if (typeof newValue === 'number') {
36
+ onValueChange(newValue);
37
+ }
38
+ }, disabled: readOnly, valueLabelDisplay: "auto", "data-test": "q-item-slider-field" })));
39
+ }
40
+ export default SliderField;
41
+ //# sourceMappingURL=SliderField.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"SliderField.js","sourceRoot":"","sources":["../../../../src/components/FormComponents/SliderItem/SliderField.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAEH,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,MAAM,MAAM,sBAAsB,CAAC;AAC1C,OAAO,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAC;AACvD,OAAO,KAAK,MAAM,qBAAqB,CAAC;AACxC,OAAO,YAAY,MAAM,gBAAgB,CAAC;AAC1C,OAAO,kBAAkB,MAAM,sBAAsB,CAAC;AAetD,SAAS,WAAW,CAAC,KAAuB;IAC1C,MAAM,EACJ,MAAM,EACN,KAAK,EACL,QAAQ,EACR,QAAQ,EACR,SAAS,EACT,QAAQ,EACR,QAAQ,EACR,YAAY,EACZ,QAAQ,EACR,QAAQ,EACR,aAAa,EACd,GAAG,KAAK,CAAC;IAEV,MAAM,WAAW,GAAG,cAAc,CAAC,QAAQ,EAAE,QAAQ,EAAE,QAAQ,EAAE,QAAQ,EAAE,SAAS,CAAC,CAAC;IAEtF,MAAM,QAAQ,GAAG;QACf,QAAQ,EAAE,CAAC,QAAQ,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,IAAI;QAChC,QAAQ,EAAE,GAAG;KACd,CAAC;IAEF,MAAM,SAAS,GAAG,CAAC,CAAC,CAAC,QAAQ,IAAI,QAAQ,CAAC,CAAC;IAE3C,OAAO,CACL,oBAAC,KAAK,IAAC,EAAE,oBAAO,QAAQ;QACtB,oBAAC,kBAAkB,IAAC,KAAK,EAAE,KAAK,EAAE,SAAS,EAAE,SAAS,EAAE,YAAY,EAAE,YAAY,GAAI;QACrF,SAAS,CAAC,CAAC,CAAC,oBAAC,YAAY,IAAC,QAAQ,EAAE,QAAQ,EAAE,QAAQ,EAAE,QAAQ,GAAI,CAAC,CAAC,CAAC,IAAI;QAC5E,oBAAC,MAAM,IACL,EAAE,EAAE,MAAM,EACV,KAAK,EAAE,KAAK,EACZ,GAAG,EAAE,QAAQ,EACb,GAAG,EAAE,QAAQ,EACb,IAAI,EAAE,SAAS,EACf,KAAK,EAAE,WAAW,EAClB,EAAE,oBAAO,QAAQ,GACjB,QAAQ,EAAE,CAAC,CAAC,EAAE,QAAQ,EAAE,EAAE;gBACxB,IAAI,OAAO,QAAQ,KAAK,QAAQ,EAAE;oBAChC,aAAa,CAAC,QAAQ,CAAC,CAAC;iBACzB;YACH,CAAC,EACD,QAAQ,EAAE,QAAQ,EAClB,iBAAiB,EAAC,MAAM,eACd,qBAAqB,GAC/B,CACI,CACT,CAAC;AACJ,CAAC;AAED,eAAe,WAAW,CAAC"}
@@ -0,0 +1,9 @@
1
+ import React from 'react';
2
+ import type { PropsWithIsRepeatedAttribute, PropsWithIsTabledAttribute, PropsWithParentIsReadOnlyAttribute, PropsWithQrItemChangeHandler } from '../../../interfaces/renderProps.interface';
3
+ import type { QuestionnaireItem, QuestionnaireResponseItem } from 'fhir/r4';
4
+ interface SliderItemProps extends PropsWithQrItemChangeHandler, PropsWithIsRepeatedAttribute, PropsWithIsTabledAttribute, PropsWithParentIsReadOnlyAttribute {
5
+ qItem: QuestionnaireItem;
6
+ qrItem: QuestionnaireResponseItem | null;
7
+ }
8
+ declare function SliderItem(props: SliderItemProps): React.JSX.Element;
9
+ export default SliderItem;
@@ -0,0 +1,56 @@
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 useRenderingExtensions from '../../../hooks/useRenderingExtensions';
19
+ import { createEmptyQrItem } from '../../../utils/qrItem';
20
+ import { FullWidthFormComponentBox } from '../../Box.styles';
21
+ import ItemFieldGrid from '../ItemParts/ItemFieldGrid';
22
+ import useReadOnly from '../../../hooks/useReadOnly';
23
+ import SliderField from './SliderField';
24
+ import useSliderExtensions from '../../../hooks/useSliderExtensions';
25
+ import Box from '@mui/material/Box';
26
+ function SliderItem(props) {
27
+ const { qItem, qrItem, isRepeated, isTabled, parentIsReadOnly, onQrItemChange } = props;
28
+ const readOnly = useReadOnly(qItem, parentIsReadOnly);
29
+ const { displayInstructions } = useRenderingExtensions(qItem);
30
+ const { minValue, maxValue, stepValue, minLabel, maxLabel } = useSliderExtensions(qItem);
31
+ const isInteracted = !!(qrItem === null || qrItem === void 0 ? void 0 : qrItem.answer);
32
+ // Init input value
33
+ let valueInteger = 0;
34
+ if (qrItem === null || qrItem === void 0 ? void 0 : qrItem.answer) {
35
+ if (qrItem === null || qrItem === void 0 ? void 0 : qrItem.answer[0].valueInteger) {
36
+ valueInteger = qrItem.answer[0].valueInteger;
37
+ }
38
+ if (qrItem === null || qrItem === void 0 ? void 0 : qrItem.answer[0].valueDecimal) {
39
+ valueInteger = Math.round(qrItem.answer[0].valueDecimal);
40
+ }
41
+ }
42
+ // Event handlers
43
+ function handleValueChange(newValue) {
44
+ onQrItemChange(Object.assign(Object.assign({}, createEmptyQrItem(qItem)), { answer: [{ valueInteger: newValue }] }));
45
+ }
46
+ if (isRepeated) {
47
+ return (React.createElement(Box, { px: 4 },
48
+ React.createElement(SliderField, { linkId: qItem.linkId, value: valueInteger, minValue: minValue, maxValue: maxValue, stepValue: stepValue, minLabel: minLabel, maxLabel: maxLabel, isInteracted: isInteracted, readOnly: readOnly, isTabled: isTabled, onValueChange: handleValueChange })));
49
+ }
50
+ return (React.createElement(FullWidthFormComponentBox, { "data-test": "q-item-slider-box" },
51
+ React.createElement(ItemFieldGrid, { qItem: qItem, displayInstructions: displayInstructions, readOnly: readOnly },
52
+ React.createElement(Box, { px: 4 },
53
+ React.createElement(SliderField, { linkId: qItem.linkId, value: valueInteger, minValue: minValue, maxValue: maxValue, stepValue: stepValue, minLabel: minLabel, maxLabel: maxLabel, isInteracted: isInteracted, readOnly: readOnly, isTabled: isTabled, onValueChange: handleValueChange })))));
54
+ }
55
+ export default SliderItem;
56
+ //# sourceMappingURL=SliderItem.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"SliderItem.js","sourceRoot":"","sources":["../../../../src/components/FormComponents/SliderItem/SliderItem.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAEH,OAAO,KAAK,MAAM,OAAO,CAAC;AAQ1B,OAAO,sBAAsB,MAAM,uCAAuC,CAAC;AAC3E,OAAO,EAAE,iBAAiB,EAAE,MAAM,uBAAuB,CAAC;AAC1D,OAAO,EAAE,yBAAyB,EAAE,MAAM,kBAAkB,CAAC;AAC7D,OAAO,aAAa,MAAM,4BAA4B,CAAC;AACvD,OAAO,WAAW,MAAM,4BAA4B,CAAC;AACrD,OAAO,WAAW,MAAM,eAAe,CAAC;AACxC,OAAO,mBAAmB,MAAM,oCAAoC,CAAC;AACrE,OAAO,GAAG,MAAM,mBAAmB,CAAC;AAWpC,SAAS,UAAU,CAAC,KAAsB;IACxC,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,UAAU,EAAE,QAAQ,EAAE,gBAAgB,EAAE,cAAc,EAAE,GAAG,KAAK,CAAC;IAExF,MAAM,QAAQ,GAAG,WAAW,CAAC,KAAK,EAAE,gBAAgB,CAAC,CAAC;IACtD,MAAM,EAAE,mBAAmB,EAAE,GAAG,sBAAsB,CAAC,K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QAAQ,EAAE,QAAQ,EAClB,aAAa,EAAE,iBAAiB,GAChC,CACE,CACP,CAAC;KACH;IAED,OAAO,CACL,oBAAC,yBAAyB,iBAAW,mBAAmB;QACtD,oBAAC,aAAa,IAAC,KAAK,EAAE,KAAK,EAAE,mBAAmB,EAAE,mBAAmB,EAAE,QAAQ,EAAE,QAAQ;YACvF,oBAAC,GAAG,IAAC,EAAE,EAAE,CAAC;gBACR,oBAAC,WAAW,IACV,MAAM,EAAE,KAAK,CAAC,MAAM,EACpB,KAAK,EAAE,YAAY,EACnB,QAAQ,EAAE,QAAQ,EAClB,QAAQ,EAAE,QAAQ,EAClB,SAAS,EAAE,SAAS,EACpB,QAAQ,EAAE,QAAQ,EAClB,QAAQ,EAAE,QAAQ,EAClB,YAAY,EAAE,YAAY,EAC1B,QAAQ,EAAE,QAAQ,EAClB,QAAQ,EAAE,QAAQ,EAClB,aAAa,EAAE,iBAAiB,GAChC,CACE,CACQ,CACU,CAC7B,CAAC;AACJ,CAAC;AAED,eAAe,UAAU,CAAC"}
@@ -0,0 +1,7 @@
1
+ import React from 'react';
2
+ interface SliderLabelsProps {
3
+ minLabel: string;
4
+ maxLabel: string;
5
+ }
6
+ declare function SliderLabels(props: SliderLabelsProps): React.JSX.Element | null;
7
+ export default SliderLabels;
@@ -0,0 +1,32 @@
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 Typography from '@mui/material/Typography';
19
+ import { pxToRem } from '../../../theme/typography';
20
+ import Box from '@mui/material/Box';
21
+ function SliderLabels(props) {
22
+ const { minLabel, maxLabel } = props;
23
+ if (!minLabel && !maxLabel) {
24
+ return null;
25
+ }
26
+ return (React.createElement(Box, { display: "flex", justifyContent: "space-between", pb: 0.5 }, [minLabel, maxLabel].map((label, index) => (React.createElement(Typography, { key: index, textAlign: "center", fontSize: pxToRem(10), sx: {
27
+ transform: `translateX(${index === 0 ? '-50%' : '50%'})`,
28
+ wordWrap: 'break-word'
29
+ } }, label)))));
30
+ }
31
+ export default SliderLabels;
32
+ //# sourceMappingURL=SliderLabels.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"SliderLabels.js","sourceRoot":"","sources":["../../../../src/components/FormComponents/SliderItem/SliderLabels.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAEH,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,UAAU,MAAM,0BAA0B,CAAC;AAClD,OAAO,EAAE,OAAO,EAAE,MAAM,2BAA2B,CAAC;AACpD,OAAO,GAAG,MAAM,mBAAmB,CAAC;AAOpC,SAAS,YAAY,CAAC,KAAwB;IAC5C,MAAM,EAAE,QAAQ,EAAE,QAAQ,EAAE,GAAG,KAAK,CAAC;IAErC,IAAI,CAAC,QAAQ,IAAI,CAAC,QAAQ,EAAE;QAC1B,OAAO,IAAI,CAAC;KACb;IAED,OAAO,CACL,oBAAC,GAAG,IAAC,OAAO,EAAC,MAAM,EAAC,cAAc,EAAC,eAAe,EAAC,EAAE,EAAE,GAAG,IACvD,CAAC,QAAQ,EAAE,QAAQ,CAAC,CAAC,GAAG,CAAC,CAAC,KAAK,EAAE,KAAK,EAAE,EAAE,CAAC,CAC1C,oBAAC,UAAU,IACT,GAAG,EAAE,KAAK,EACV,SAAS,EAAC,QAAQ,EAClB,QAAQ,EAAE,OAAO,CAAC,EAAE,CAAC,EACrB,EAAE,EAAE;YACF,SAAS,EAAE,cAAc,KAAK,KAAK,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,KAAK,GAAG;YACxD,QAAQ,EAAE,YAAY;SACvB,IACA,KAAK,CACK,CACd,CAAC,CACE,CACP,CAAC;AACJ,CAAC;AAED,eAAe,YAAY,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 StringItemProps extends PropsWithQrItemChangeHandler<QuestionnaireResponseItem>, PropsWithIsRepeatedAttribute, PropsWithIsTabledAttribute, PropsWithParentIsReadOnlyAttribute {
4
+ interface StringItemProps extends PropsWithQrItemChangeHandler, PropsWithIsRepeatedAttribute, PropsWithIsTabledAttribute, PropsWithParentIsReadOnlyAttribute {
5
5
  qItem: QuestionnaireItem;
6
- qrItem: QuestionnaireResponseItem;
6
+ qrItem: QuestionnaireResponseItem | null;
7
7
  }
8
8
  declare function StringItem(props: StringItemProps): React.JSX.Element;
9
9
  export default StringItem;
@@ -1,10 +1,11 @@
1
1
  import React from 'react';
2
2
  import type { QuestionnaireItem, QuestionnaireResponseItem } from 'fhir/r4';
3
3
  import type { PropsWithParentIsReadOnlyAttribute, PropsWithQrRepeatGroupChangeHandler } from '../../../interfaces/renderProps.interface';
4
- interface Props extends PropsWithQrRepeatGroupChangeHandler, PropsWithParentIsReadOnlyAttribute {
4
+ import type { PropsWithShowMinimalViewAttribute } from '../../../interfaces/renderProps.interface';
5
+ interface GroupTableProps extends PropsWithQrRepeatGroupChangeHandler, PropsWithShowMinimalViewAttribute, PropsWithParentIsReadOnlyAttribute {
5
6
  qItem: QuestionnaireItem;
6
7
  qrItems: QuestionnaireResponseItem[];
7
8
  groupCardElevation: number;
8
9
  }
9
- declare function GroupTable(props: Props): React.JSX.Element | null;
10
+ declare function GroupTable(props: GroupTableProps): React.JSX.Element | null;
10
11
  export default GroupTable;
@@ -37,7 +37,7 @@ import cloneDeep from 'lodash.clonedeep';
37
37
  import AddRowButton from './AddRowButton';
38
38
  import useReadOnly from '../../../hooks/useReadOnly';
39
39
  function GroupTable(props) {
40
- const { qItem, qrItems, groupCardElevation, parentIsReadOnly, onQrRepeatGroupChange } = props;
40
+ const { qItem, qrItems, groupCardElevation, showMinimalView, parentIsReadOnly, onQrRepeatGroupChange } = props;
41
41
  const readOnly = useReadOnly(qItem, parentIsReadOnly);
42
42
  const initialisedGroupTables = useInitialiseGroupTable(qrItems);
43
43
  const [tableRows, setTableRows] = useState(initialisedGroupTables);
@@ -83,6 +83,23 @@ function GroupTable(props) {
83
83
  }
84
84
  ]);
85
85
  }
86
+ if (showMinimalView) {
87
+ return (React.createElement(QGroupContainerBox, { cardElevation: groupCardElevation, isRepeated: false, py: 1 },
88
+ React.createElement(TableContainer, { component: Paper, elevation: groupCardElevation },
89
+ React.createElement(Table, { size: "small" },
90
+ React.createElement(TableHead, null,
91
+ React.createElement(TableRow, null,
92
+ itemLabels.map((itemLabel) => (React.createElement(HeaderTableCell, { key: itemLabel, size: "medium" }, itemLabel))),
93
+ React.createElement(TableCell, null))),
94
+ React.createElement(TableBody, null, tableRows.map(({ nanoId, qrItem: nullableQrItem }, index) => {
95
+ const answeredQrItem = createEmptyQrItem(qItem);
96
+ if (nullableQrItem) {
97
+ answeredQrItem.item = nullableQrItem.item;
98
+ }
99
+ return (React.createElement(TableRow, { key: nanoId },
100
+ React.createElement(GroupTableRow, { qItem: qItem, qrItem: answeredQrItem, qItemsIndexMap: qItemsIndexMap, parentIsReadOnly: parentIsReadOnly, onQrItemChange: (newQrGroup) => handleRowChange(newQrGroup, index) })));
101
+ }))))));
102
+ }
86
103
  return (React.createElement(QGroupContainerBox, { cardElevation: groupCardElevation, isRepeated: false, py: 3 },
87
104
  groupCardElevation !== 1 ? (React.createElement(React.Fragment, null,
88
105
  React.createElement(Typography, { fontSize: 13, variant: "h6", color: readOnly ? 'text.secondary' : 'text.primary' },
@@ -1 +1 @@
1
- {"version":3,"file":"GroupTable.js","sourceRoot":"","sources":["../../../../src/components/FormComponents/Tables/GroupTable.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAEH,OAAO,KAAK,EAAE,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAGjD,OAAO,OAAO,MAAM,uBAAuB,CAAC;AAC5C,OAAO,KAAK,MAAM,qBAAqB,CAAC;AACxC,OAAO,KAAK,MAAM,qBAAqB,CAAC;AACxC,OAAO,SAAS,MAAM,yBAAyB,CAAC;AAChD,OAAO,SAAS,MAAM,yBAAyB,CAAC;AAChD,OAAO,cAAc,MAAM,8BAA8B,CAAC;AAC1D,OAAO,SAAS,MAAM,yBAAyB,CAAC;AAChD,OAAO,QAAQ,MAAM,wBAAwB,CAAC;AAC9C,OAAO,UAAU,MAAM,0BAA0B,CAAC;AAClD,OAAO,aAAa,MAAM,iBAAiB,CAAC;AAC5C,OAAO,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAC;AACjD,OAAO,EAAE,kBAAkB,EAAE,MAAM,kBAAkB,CAAC;AACtD,OAAO,EAAE,cAAc,EAAE,MAAM,wBAAwB,CAAC;AAKxD,OAAO,uBAAuB,MAAM,wCAAwC,CAAC;AAC7E,OAAO,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;AAChC,OAAO,EAAE,iBAAiB,EAAE,MAAM,uBAAuB,CAAC;AAC1D,OAAO,eAAe,MAAM,mBAAmB,CAAC;AAChD,OAAO,YAAY,MAAM,+BAA+B,CAAC;AACzD,OAAO,SAAS,MAAM,kBAAkB,CAAC;AACzC,OAAO,YAAY,MAAM,gBAAgB,CAAC;AAC1C,OAAO,WAAW,MAAM,4BAA4B,CAAC;AAQrD,SAAS,UAAU,CAAC,KAAY;IAC9B,MAAM,EAAE,KAAK,EAAE,OAAO,EAAE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ACE,CACtB,CAAC;AACJ,CAAC;AAED,eAAe,UAAU,CAAC"}
@@ -1,10 +1,9 @@
1
1
  import React from 'react';
2
2
  import type { QuestionnaireItem, QuestionnaireResponseItem } from 'fhir/r4';
3
- import type { PropsWithQrItemChangeHandler } from '../../../interfaces/renderProps.interface';
4
- import type { PropsWithParentIsReadOnlyAttribute } from '../../../interfaces/renderProps.interface';
5
- interface Props extends PropsWithQrItemChangeHandler<QuestionnaireResponseItem>, PropsWithParentIsReadOnlyAttribute {
3
+ import type { PropsWithParentIsReadOnlyAttribute, PropsWithQrItemChangeHandler } from '../../../interfaces/renderProps.interface';
4
+ interface Props extends PropsWithQrItemChangeHandler, PropsWithParentIsReadOnlyAttribute {
6
5
  qItem: QuestionnaireItem;
7
- qrItem: QuestionnaireResponseItem;
6
+ qrItem: QuestionnaireResponseItem | null;
8
7
  qItemsIndexMap: Record<string, number>;
9
8
  }
10
9
  declare function GroupTableRow(props: Props): React.JSX.Element | null;
@@ -15,14 +15,14 @@
15
15
  * limitations under the License.
16
16
  */
17
17
  import React from 'react';
18
- import { createQrGroup, updateQrItemsInGroup } from '../../../utils/qrItem';
18
+ import { createEmptyQrGroup, updateQrItemsInGroup } from '../../../utils/qrItem';
19
19
  import SingleItem from '../SingleItem/SingleItem';
20
20
  import { getQrItemsIndex } from '../../../utils/mapItem';
21
21
  import { StandardTableCell } from './Table.styles';
22
22
  function GroupTableRow(props) {
23
23
  const { qItem, qrItem, qItemsIndexMap, parentIsReadOnly, onQrItemChange } = props;
24
24
  const rowItems = qItem.item;
25
- const row = qrItem && qrItem.item ? qrItem : createQrGroup(qItem);
25
+ const row = qrItem && qrItem.item ? qrItem : createEmptyQrGroup(qItem);
26
26
  const rowQrItems = row.item;
27
27
  if (!rowItems || !rowQrItems) {
28
28
  return null;
@@ -39,7 +39,7 @@ function GroupTableRow(props) {
39
39
  return null;
40
40
  }
41
41
  return (React.createElement(StandardTableCell, { key: index, numOfColumns: rowItems.length, isFirst: index === 0 },
42
- React.createElement(SingleItem, { key: qItem.linkId, qItem: rowItem, qrItem: qrItem, isRepeated: true, isTabled: true, parentIsReadOnly: parentIsReadOnly, onQrItemChange: handleQrRowItemChange })));
42
+ React.createElement(SingleItem, { key: qItem.linkId, qItem: rowItem, qrItem: qrItem !== null && qrItem !== void 0 ? qrItem : null, isRepeated: true, isTabled: true, showMinimalView: true, parentIsReadOnly: parentIsReadOnly, onQrItemChange: handleQrRowItemChange })));
43
43
  })));
44
44
  }
45
45
  export default GroupTableRow;
@@ -1 +1 @@
1
- {"version":3,"file":"GroupTableRow.js","sourceRoot":"","sources":["../../../../src/components/FormComponents/Tables/GroupTableRow.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAEH,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAE,aAAa,EAAE,oBAAoB,EAAE,MAAM,uBAAuB,CAAC;AAC5E,OAAO,UAAU,MAAM,0BAA0B,CAAC;AAClD,OAAO,EAAE,eAAe,EAAE,MAAM,wBAAwB,CAAC;AACzD,OAAO,EAAE,iBAAiB,EAAE,MAAM,gBAAgB,CAAC;AAYnD,SAAS,aAAa,CAAC,KAAY;IACjC,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,cAAc,EAAE,gBAAgB,EAAE,cAAc,EAAE,GAAG,KAAK,CAAC;IAElF,MAAM,QAAQ,GAAG,KAAK,CAAC,IAAI,CAAC;IAC5B,MAAM,GAAG,GAAG,MAAM,IAAI,MAAM,CAAC,IAAI,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,aAAa,CAAC,KAAK,CAAC,CAAC;IAClE,MAAM,UAAU,GAAG,GAAG,CAAC,IAAI,CAAC;IAE5B,IAAI,CAAC,QAAQ,IAAI,CAAC,UAAU,EAAE;QAC5B,OAAO,IAAI,CAAC;KACb;IAED,SAAS,qBAAqB,CAAC,YAAuC;QACpE,MAAM,KAAK,qBAAmC,GAAG,CAAE,CAAC;QACpD,oBAAoB,CAAC,YAAY,EAAE,IAAI,EAAE,KAAK,EAAE,cAAc,CAAC,CAAC;QAChE,cAAc,CAAC,KAAK,CAAC,CAAC;IACxB,CAAC;IAED,MAAM,cAAc,GAAG,eAAe,CAAC,QAAQ,EAAE,UAAU,EAAE,cAAc,CAAC,CAAC;IAE7E,OAAO,CACL,0CACG,QAAQ,CAAC,GAAG,CAAC,CAAC,OAAO,EAAE,KAAK,EAAE,EAAE;QAC/B,MAAM,MAAM,GAAG,cAAc,CAAC,KAAK,CAAC,CAAC;QAErC,IAAI,KAAK,CAAC,OAAO,CAAC,MAAM,CAAC,EAAE;YACzB,OAAO,IAAI,CAAC;SACb;QAED,OAAO,CACL,oBAAC,iBAAiB,IAAC,GAAG,EAAE,KAAK,EAAE,YAAY,EAAE,QAAQ,CAAC,MAAM,EAAE,OAAO,EAAE,KAAK,KAAK,CAAC;YAChF,oBAAC,UAAU,IACT,GAAG,EAAE,KAAK,CAAC,MAAM,EACjB,KAAK,EAAE,OAAO,EACd,MAAM,EAAE,MAAM,EACd,UAAU,EAAE,IAAI,EAChB,QAAQ,EAAE,IAAI,EACd,gBAAgB,EAAE,gBAAgB,EAClC,cAAc,EAAE,qBAAqB,GACrC,CACgB,CACrB,CAAC;IACJ,CAAC,CAAC,CACD,CACJ,CAAC;AACJ,CAAC;AAED,eAAe,aAAa,CAAC"}
1
+ {"version":3,"file":"GroupTableRow.js","sourceRoot":"","sources":["../../../../src/components/FormComponents/Tables/GroupTableRow.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAEH,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAE,kBAAkB,EAAE,oBAAoB,EAAE,MAAM,uBAAuB,CAAC;AACjF,OAAO,UAAU,MAAM,0BAA0B,CAAC;AAClD,OAAO,EAAE,eAAe,EAAE,MAAM,wBAAwB,CAAC;AACzD,OAAO,EAAE,iBAAiB,EAAE,MAAM,gBAAgB,CAAC;AAYnD,SAAS,aAAa,CAAC,KAA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AAe,EAAE,IAAI,EACrB,gBAAgB,EAAE,gBAAgB,EAClC,cAAc,EAAE,qBAAqB,GACrC,CACgB,CACrB,CAAC;IACJ,CAAC,CAAC,CACD,CACJ,CAAC;AACJ,CAAC;AAED,eAAe,aAAa,CAAC"}
@@ -1,9 +1,9 @@
1
1
  import React from 'react';
2
2
  import type { PropsWithIsRepeatedAttribute, PropsWithParentIsReadOnlyAttribute, PropsWithQrItemChangeHandler } from '../../../interfaces/renderProps.interface';
3
3
  import type { QuestionnaireItem, QuestionnaireResponseItem } from 'fhir/r4';
4
- interface TextItemProps extends PropsWithQrItemChangeHandler<QuestionnaireResponseItem>, PropsWithIsRepeatedAttribute, PropsWithParentIsReadOnlyAttribute {
4
+ interface TextItemProps extends PropsWithQrItemChangeHandler, PropsWithIsRepeatedAttribute, PropsWithParentIsReadOnlyAttribute {
5
5
  qItem: QuestionnaireItem;
6
- qrItem: QuestionnaireResponseItem;
6
+ qrItem: QuestionnaireResponseItem | null;
7
7
  }
8
8
  declare function TextItem(props: TextItemProps): React.JSX.Element;
9
9
  export default TextItem;
@@ -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 TimeItemProps extends PropsWithQrItemChangeHandler<QuestionnaireResponseItem>, PropsWithIsRepeatedAttribute, PropsWithIsTabledAttribute, PropsWithParentIsReadOnlyAttribute {
4
+ interface TimeItemProps extends PropsWithQrItemChangeHandler, PropsWithIsRepeatedAttribute, PropsWithIsTabledAttribute, PropsWithParentIsReadOnlyAttribute {
5
5
  qItem: QuestionnaireItem;
6
- qrItem: QuestionnaireResponseItem;
6
+ qrItem: QuestionnaireResponseItem | null;
7
7
  }
8
8
  declare function TimeItem(props: TimeItemProps): React.JSX.Element;
9
9
  export default TimeItem;
@@ -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 UrlItemProps extends PropsWithQrItemChangeHandler<QuestionnaireResponseItem>, PropsWithIsRepeatedAttribute, PropsWithIsTabledAttribute, PropsWithParentIsReadOnlyAttribute {
4
+ interface UrlItemProps extends PropsWithQrItemChangeHandler, PropsWithIsRepeatedAttribute, PropsWithIsTabledAttribute, PropsWithParentIsReadOnlyAttribute {
5
5
  qItem: QuestionnaireItem;
6
- qrItem: QuestionnaireResponseItem;
6
+ qrItem: QuestionnaireResponseItem | null;
7
7
  }
8
8
  declare function UrlItem(props: UrlItemProps): React.JSX.Element;
9
9
  export default UrlItem;
@@ -1,3 +1,6 @@
1
1
  export * from './SingleItem';
2
+ export * from './RepeatItem';
2
3
  export * from './RepeatGroup';
4
+ export * from './GridGroup';
3
5
  export * from './Tables';
6
+ export * from './CustomDateItem';