@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
@@ -16,10 +16,12 @@
16
16
  */
17
17
  import _isEqual from 'lodash/isEqual';
18
18
  import { containsTabs, isTabContainer } from './tabs';
19
- import { getShortText } from './itemControl';
20
- import { checkIsRepeatGroupToRepopulate, getRepeatGroupToRepopulate } from './repopulateRepeatGroup';
21
- export function getItemsToRepopulate(sourceQuestionnaire, itemTypes, tabs, populatedResponse, updatableResponse) {
19
+ import { getShortText, isSpecificItemControl } from './itemControl';
20
+ import { getQrItemsIndex, mapQItemsIndex } from './mapItem';
21
+ import { isHidden } from './qItem';
22
+ export function getItemsToRepopulate(params) {
22
23
  var _a;
24
+ const { sourceQuestionnaire, tabs, populatedResponse, updatableResponse, enableWhenIsActivated, enableWhenItems, enableWhenExpressions } = params;
23
25
  if (!sourceQuestionnaire.item ||
24
26
  sourceQuestionnaire.item.length === 0 ||
25
27
  !populatedResponse.item ||
@@ -28,27 +30,37 @@ export function getItemsToRepopulate(sourceQuestionnaire, itemTypes, tabs, popul
28
30
  updatableResponse.item.length === 0) {
29
31
  return {};
30
32
  }
31
- const populatedItems = [];
32
- for (const topLevelItem of populatedResponse.item) {
33
- populatedItems.push(...getPopulatedItemsRecursive(topLevelItem, itemTypes));
34
- }
35
- const itemsToRepopulate = populatedItems.reduce((mapping, item) => {
36
- mapping[item.linkId] = {
37
- qItem: null,
38
- heading: null,
39
- newQRItem: item
40
- };
41
- return mapping;
42
- }, {});
43
- // Get corresponding old items from updatableResponse if they are different
44
- for (const topLevelItem of updatableResponse.item) {
45
- checkCorrespondingOldItemsRecursive(topLevelItem, itemTypes, itemsToRepopulate);
46
- }
47
- // Get corresponding old items from updatableResponse if they are different
48
- for (const topLevelItem of sourceQuestionnaire.item) {
49
- const heading = (_a = topLevelItem.text) !== null && _a !== void 0 ? _a : null;
50
- const hasTabs = isTabContainer(topLevelItem) || containsTabs(topLevelItem);
51
- getCorrespondingQuestionnaireItemsRecursive(topLevelItem, heading, tabs, hasTabs, itemsToRepopulate);
33
+ const topLevelQItems = sourceQuestionnaire.item;
34
+ const populatedTopLevelQRItems = populatedResponse.item;
35
+ const qItemsIndexMap = mapQItemsIndex(sourceQuestionnaire);
36
+ const populatedTopLevelQRItemsByIndex = getQrItemsIndex(topLevelQItems, populatedTopLevelQRItems, qItemsIndexMap);
37
+ const itemsToRepopulate = {};
38
+ for (const [index, topLevelQItem] of topLevelQItems.entries()) {
39
+ const populatedQrItemOrItems = populatedTopLevelQRItemsByIndex[index];
40
+ if (!populatedQrItemOrItems) {
41
+ continue;
42
+ }
43
+ const heading = (_a = topLevelQItem.text) !== null && _a !== void 0 ? _a : null;
44
+ const hasTabs = isTabContainer(topLevelQItem) || containsTabs(topLevelQItem);
45
+ getItemsToRepopulateRecursive({
46
+ qItem: topLevelQItem,
47
+ qrItemOrItems: populatedQrItemOrItems,
48
+ heading,
49
+ tabs,
50
+ hasTabs,
51
+ itemsToRepopulate,
52
+ enableWhenIsActivated,
53
+ enableWhenItems,
54
+ enableWhenExpressions
55
+ });
56
+ }
57
+ const oldTopLevelQRItemsByIndex = getQrItemsIndex(topLevelQItems, updatableResponse.item, qItemsIndexMap);
58
+ for (const [index, topLevelQItem] of topLevelQItems.entries()) {
59
+ const oldQrItemOrItems = oldTopLevelQRItemsByIndex[index];
60
+ if (!oldQrItemOrItems) {
61
+ continue;
62
+ }
63
+ checkCorrespondingOldItemsRecursive(topLevelQItem, oldQrItemOrItems, itemsToRepopulate);
52
64
  }
53
65
  return itemsToRepopulate;
54
66
  }
@@ -57,74 +69,243 @@ export function getItemsToRepopulate(sourceQuestionnaire, itemTypes, tabs, popul
57
69
  // 3. Compare old and new items in dialog - if there are none, show a dialog saying there is no new data
58
70
  // 4. Have checkboxes in dialog to update response
59
71
  // 5. Replace old answers with new answers
60
- function getCorrespondingQuestionnaireItemsRecursive(qItem, heading, tabs, hasTabs, itemsToRepopulate) {
72
+ function getItemsToRepopulateRecursive(params) {
61
73
  var _a, _b;
62
- if (qItem.type === 'group' && qItem.item && qItem.item.length > 0) {
74
+ const { qItem, qrItemOrItems, tabs, hasTabs, itemsToRepopulate, enableWhenIsActivated, enableWhenItems, enableWhenExpressions } = params;
75
+ let { heading } = params;
76
+ if (!qrItemOrItems) {
77
+ return;
78
+ }
79
+ // Return nothing if corresponding qItem is hidden
80
+ if (isHidden({
81
+ questionnaireItem: qItem,
82
+ enableWhenIsActivated,
83
+ enableWhenItems,
84
+ enableWhenExpressions
85
+ })) {
86
+ return null;
87
+ }
88
+ // For repeat groups
89
+ const hasMultipleAnswers = Array.isArray(qrItemOrItems);
90
+ if (hasMultipleAnswers) {
91
+ if (qrItemOrItems.length > 0) {
92
+ getRepeatGroupToRepopulate(qItem, qrItemOrItems, heading, itemsToRepopulate);
93
+ }
94
+ return;
95
+ }
96
+ const childQItems = qItem.item;
97
+ const childQRItems = qrItemOrItems.item;
98
+ if (childQItems && childQItems.length > 0 && childQRItems) {
63
99
  const isTab = !!tabs[qItem.linkId];
64
100
  if (isTab) {
65
101
  heading = (_b = (_a = getShortText(qItem)) !== null && _a !== void 0 ? _a : qItem.text) !== null && _b !== void 0 ? _b : null;
66
102
  }
67
- // TODO it seems like there can only be one answer per linkId, we might need to do repeat groups differently
68
- /* Repeat group implementation */
69
- if (qItem.type === 'group' && qItem.repeats) {
70
- const isRepeatGroupToRepopulate = checkIsRepeatGroupToRepopulate(qItem, itemsToRepopulate);
71
- if (isRepeatGroupToRepopulate) {
72
- const repeatGroupToRepopulate = getRepeatGroupToRepopulate(qItem, itemsToRepopulate);
73
- if (repeatGroupToRepopulate) {
74
- itemsToRepopulate[qItem.linkId] = repeatGroupToRepopulate;
75
- return;
76
- }
103
+ const qItemsIndexMap = mapQItemsIndex(qItem);
104
+ const populatedQRItemsByIndex = getQrItemsIndex(childQItems, childQRItems, qItemsIndexMap);
105
+ // For grid groups
106
+ const itemIsGrid = isSpecificItemControl(qItem, 'grid');
107
+ if (itemIsGrid) {
108
+ getGridTableToRepopulate({
109
+ qItem,
110
+ gridChildQItems: childQItems,
111
+ gridChildQRItemsByIndex: populatedQRItemsByIndex,
112
+ heading,
113
+ itemsToRepopulate,
114
+ enableWhenIsActivated,
115
+ enableWhenItems,
116
+ enableWhenExpressions
117
+ });
118
+ return;
119
+ }
120
+ // For normal groups with children
121
+ for (const [index, childQItem] of childQItems.entries()) {
122
+ const childQrItemOrItems = populatedQRItemsByIndex[index];
123
+ if (!childQrItemOrItems) {
124
+ continue;
77
125
  }
126
+ getItemsToRepopulateRecursive({
127
+ qItem: childQItem,
128
+ qrItemOrItems: childQrItemOrItems,
129
+ heading,
130
+ tabs,
131
+ hasTabs,
132
+ itemsToRepopulate,
133
+ enableWhenIsActivated,
134
+ enableWhenItems,
135
+ enableWhenExpressions
136
+ });
78
137
  }
79
- // /* Grid implementation */
80
- // if (qItem.type === 'group' && isSpecificItemControl(qItem, 'grid')) {
81
- // const isRepeatGroupToRepopulate = checkIsRepeatGroupToRepopulate(qItem, itemsToRepopulate);
82
- // if (isRepeatGroupToRepopulate) {
83
- // getRepeatGroupToRepopulate(qItem, itemsToRepopulate);
84
- // }
85
- // }
86
- for (const childItem of qItem.item) {
87
- getCorrespondingQuestionnaireItemsRecursive(childItem, heading, tabs, hasTabs, itemsToRepopulate);
138
+ const hasSingleAnswer = !Array.isArray(qrItemOrItems);
139
+ if (hasSingleAnswer && qrItemOrItems.answer) {
140
+ getSingleItemToRepopulate(qItem, qrItemOrItems, heading, itemsToRepopulate);
88
141
  }
89
142
  return;
90
143
  }
91
- if (!itemsToRepopulate[qItem.linkId]) {
144
+ // For single items without children
145
+ getSingleItemToRepopulate(qItem, qrItemOrItems, heading, itemsToRepopulate);
146
+ }
147
+ function getSingleItemToRepopulate(qItem, qrItem, heading, itemsToRepopulate) {
148
+ itemsToRepopulate[qItem.linkId] = {
149
+ qItem: qItem,
150
+ heading: heading,
151
+ newQRItem: qrItem,
152
+ newQRItems: []
153
+ };
154
+ }
155
+ function getRepeatGroupToRepopulate(qItem, qrItems, heading, itemsToRepopulate) {
156
+ itemsToRepopulate[qItem.linkId] = {
157
+ qItem: qItem,
158
+ heading: heading,
159
+ newQRItem: {
160
+ linkId: qItem.linkId
161
+ },
162
+ newQRItems: qrItems
163
+ };
164
+ }
165
+ function getGridTableToRepopulate(params) {
166
+ const { qItem, gridChildQItems, gridChildQRItemsByIndex, heading, itemsToRepopulate, enableWhenIsActivated, enableWhenItems, enableWhenExpressions } = params;
167
+ if (gridChildQItems.length === 0) {
92
168
  return;
93
169
  }
94
- itemsToRepopulate[qItem.linkId].qItem = qItem;
95
- itemsToRepopulate[qItem.linkId].heading = heading;
170
+ const gridChildQRItemsToRepopulate = gridChildQItems
171
+ .map((qItem, index) => {
172
+ if (isHidden({
173
+ questionnaireItem: qItem,
174
+ enableWhenIsActivated,
175
+ enableWhenItems,
176
+ enableWhenExpressions
177
+ })) {
178
+ return null;
179
+ }
180
+ const gridChildQrItemOrItems = gridChildQRItemsByIndex === null || gridChildQRItemsByIndex === void 0 ? void 0 : gridChildQRItemsByIndex[index];
181
+ if (gridChildQrItemOrItems && !Array.isArray(gridChildQrItemOrItems)) {
182
+ return gridChildQrItemOrItems;
183
+ }
184
+ return null;
185
+ })
186
+ .filter((item) => item !== null);
187
+ itemsToRepopulate[qItem.linkId] = {
188
+ qItem: qItem,
189
+ heading: heading,
190
+ newQRItem: {
191
+ linkId: qItem.linkId,
192
+ text: qItem.text,
193
+ item: gridChildQRItemsToRepopulate
194
+ },
195
+ newQRItems: []
196
+ };
96
197
  }
97
- function getPopulatedItemsRecursive(qrItem, itemTypes) {
98
- const itemType = itemTypes[qrItem.linkId];
99
- if (itemType === 'group' && qrItem.item && qrItem.item.length > 0) {
100
- const populatedChildItems = [];
101
- for (const childItem of qrItem.item) {
102
- populatedChildItems.push(...getPopulatedItemsRecursive(childItem, itemTypes));
198
+ function checkCorrespondingOldItemsRecursive(qItem, oldQrItemOrItems, itemsToRepopulate) {
199
+ // For repeat groups
200
+ const hasMultipleAnswers = Array.isArray(oldQrItemOrItems);
201
+ if (hasMultipleAnswers) {
202
+ retrieveRepeatGroupOldQRItems(qItem, oldQrItemOrItems, itemsToRepopulate);
203
+ return;
204
+ }
205
+ const childQItems = qItem.item;
206
+ const oldChildQRItems = oldQrItemOrItems.item;
207
+ if (childQItems && childQItems.length > 0 && oldChildQRItems) {
208
+ const qItemsIndexMap = mapQItemsIndex(qItem);
209
+ const oldQRItemsByIndex = getQrItemsIndex(childQItems, oldChildQRItems, qItemsIndexMap);
210
+ // For grid groups
211
+ const itemIsGrid = isSpecificItemControl(qItem, 'grid');
212
+ if (itemIsGrid) {
213
+ retrieveGridGroupOldQRItems(qItem, childQItems, oldQRItemsByIndex, itemsToRepopulate);
214
+ return;
215
+ }
216
+ // For normal groups with children
217
+ for (const [index, childQItem] of childQItems.entries()) {
218
+ const oldChildQrItemOrItems = oldQRItemsByIndex[index];
219
+ if (!oldChildQrItemOrItems) {
220
+ continue;
221
+ }
222
+ checkCorrespondingOldItemsRecursive(childQItem, oldChildQrItemOrItems, itemsToRepopulate);
103
223
  }
104
- return populatedChildItems;
224
+ const hasSingleAnswer = !Array.isArray(oldQrItemOrItems);
225
+ if (hasSingleAnswer && oldQrItemOrItems.answer) {
226
+ retrieveSingleOldQRItem(qItem, oldQrItemOrItems, itemsToRepopulate);
227
+ }
228
+ return;
105
229
  }
106
- // record item if it is not a group item
107
- return [qrItem];
230
+ // For single items without children
231
+ retrieveSingleOldQRItem(qItem, oldQrItemOrItems, itemsToRepopulate);
108
232
  }
109
- function checkCorrespondingOldItemsRecursive(qrItem, itemTypes, itemsToRepopulate) {
233
+ function retrieveSingleOldQRItem(qItem, oldQRItem, itemsToRepopulate) {
110
234
  var _a;
111
- const itemType = itemTypes[qrItem.linkId];
112
- if (itemType === 'group' && qrItem.item && qrItem.item.length > 0) {
113
- for (const childItem of qrItem.item) {
114
- checkCorrespondingOldItemsRecursive(childItem, itemTypes, itemsToRepopulate);
115
- }
235
+ const newQRItem = (_a = itemsToRepopulate[qItem.linkId]) === null || _a === void 0 ? void 0 : _a.newQRItem;
236
+ if (!newQRItem) {
237
+ return;
238
+ }
239
+ if (_isEqual(oldQRItem, newQRItem)) {
240
+ delete itemsToRepopulate[qItem.linkId];
116
241
  return;
117
242
  }
118
- const oldItem = qrItem;
119
- const newItem = (_a = itemsToRepopulate[qrItem.linkId]) === null || _a === void 0 ? void 0 : _a.newQRItem;
120
- if (!newItem) {
243
+ itemsToRepopulate[qItem.linkId].oldQRItem = oldQRItem;
244
+ }
245
+ function retrieveRepeatGroupOldQRItems(qItem, oldQRItems, itemsToRepopulate) {
246
+ var _a;
247
+ if (!(qItem && oldQRItems && oldQRItems.length > 0)) {
121
248
  return;
122
249
  }
123
- if (_isEqual(oldItem, newItem)) {
124
- delete itemsToRepopulate[qrItem.linkId];
250
+ const newQRItems = (_a = itemsToRepopulate[qItem.linkId]) === null || _a === void 0 ? void 0 : _a.newQRItems;
251
+ if (!newQRItems) {
252
+ return;
253
+ }
254
+ if (_isEqual(oldQRItems, newQRItems)) {
255
+ delete itemsToRepopulate[qItem.linkId];
256
+ return;
257
+ }
258
+ itemsToRepopulate[qItem.linkId].oldQRItems = oldQRItems;
259
+ }
260
+ function retrieveGridGroupOldQRItems(qItem, gridChildQItems, oldGridQRItemsByIndex, itemsToRepopulate) {
261
+ var _a;
262
+ if (gridChildQItems.length === 0) {
263
+ return;
264
+ }
265
+ const newGridQRItem = (_a = itemsToRepopulate[qItem.linkId]) === null || _a === void 0 ? void 0 : _a.newQRItem;
266
+ if (!newGridQRItem || !newGridQRItem.item) {
267
+ return;
268
+ }
269
+ const newGridChildQRItemMap = new Map();
270
+ for (const newGridChildQRItem of newGridQRItem.item) {
271
+ newGridChildQRItemMap.set(newGridChildQRItem.linkId, newGridChildQRItem);
272
+ }
273
+ // Get old qr items that are different from the new qr items
274
+ const oldGridChildQRItems = [];
275
+ for (const [index, gridChildQItem] of gridChildQItems.entries()) {
276
+ const oldGridChildQrItemOrItems = oldGridQRItemsByIndex[index];
277
+ if (!oldGridChildQrItemOrItems || Array.isArray(oldGridChildQrItemOrItems)) {
278
+ continue;
279
+ }
280
+ // At this point we have a single qrItem
281
+ const oldGridChildQrItem = oldGridChildQrItemOrItems;
282
+ const newGridChildQRItem = newGridChildQRItemMap.get(gridChildQItem.linkId);
283
+ if (!newGridChildQRItem) {
284
+ continue;
285
+ }
286
+ if (_isEqual(oldGridChildQrItem, newGridChildQRItem)) {
287
+ newGridChildQRItemMap.delete(gridChildQItem.linkId);
288
+ }
289
+ else {
290
+ oldGridChildQRItems.push(oldGridChildQrItem);
291
+ }
292
+ }
293
+ const newGridChildQRItemsToRepopulate = [...newGridChildQRItemMap.values()];
294
+ // Nothing to repopulate, delete whole item
295
+ if (newGridChildQRItemsToRepopulate.length === 0) {
296
+ delete itemsToRepopulate[qItem.linkId];
125
297
  return;
126
298
  }
127
- // const filteredNewItems = newItems.filter((newItem) => !_isEqual(oldItem, newItem));
128
- itemsToRepopulate[qrItem.linkId].oldQRItem = oldItem;
299
+ // Otherwise create both old and new grid qr item
300
+ itemsToRepopulate[qItem.linkId].newQRItem = {
301
+ linkId: qItem.linkId,
302
+ text: qItem.text,
303
+ item: newGridChildQRItemsToRepopulate
304
+ };
305
+ itemsToRepopulate[qItem.linkId].oldQRItem = {
306
+ linkId: qItem.linkId,
307
+ text: qItem.text,
308
+ item: oldGridChildQRItems
309
+ };
129
310
  }
130
311
  //# sourceMappingURL=repopulateItems.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"repopulateItems.js","sourceRoot":"","sources":["../../src/utils/repopulateItems.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AASH,OAAO,QAAQ,MAAM,gBAAgB,CAAC;AACtC,OAAO,EAAE,YAAY,EAAE,cAAc,EAAE,MAAM,QAAQ,CAAC;AACtD,OAAO,EAAE,YAAY,EAAE,MAAM,eAAe,CAAC;AAC7C,OAAO,EACL,8BAA8B,EAC9B,0BAA0B,EAC3B,MAAM,yBAAyB,CAAC;AASjC,MAAM,UAAU,oBAAoB,CAClC,mBAAkC,EAClC,SAAiC,EACjC,IAAU,EACV,iBAAwC,EACxC,iBAAwC;;IAExC,IACE,CAAC,mBAAmB,CAAC,IAAI;QACzB,mBAAmB,CAAC,IAAI,CAAC,MAAM,KAAK,CAAC;QACrC,CAAC,iBAAiB,CAAC,IAAI;QACvB,iBAAiB,CAAC,IAAI,CAAC,MAAM,KAAK,CAAC;QACnC,CAAC,iBAAiB,CAAC,IAAI;QACvB,iBAAiB,CAAC,IAAI,CAAC,MAAM,KAAK,CAAC,EACnC;QACA,OAAO,EAAE,CAAC;KACX;IAED,MAAM,cAAc,GAAgC,EAAE,CAAC;IACvD,KAAK,MAAM,YAAY,IAAI,iBAAiB,CAAC,IAAI,EAAE;QACjD,cAAc,CAAC,IAAI,CAAC,GAAG,0BAA0B,CAAC,YAAY,EAAE,SAAS,CAAC,CAAC,CAAC;KAC7E;IAED,MAAM,iBAAiB,GAAG,cAAc,CAAC,MAAM,CAC7C,CAAC,OAAyC,EAAE,IAAI,EAAE,EAAE;QAClD,OAAO,CAAC,IAAI,CAAC,MAAM,CAAC,GAAG;YACrB,KAAK,EAAE,IAAI;YACX,OAAO,EAAE,IAAI;YACb,SAAS,EAAE,I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,qBAAqB,CAAC,GAAG,CAAC,cAAc,CAAC,MAAM,CAAC,CAAC;QAE5E,IAAI,CAAC,kBAAkB,EAAE;YACvB,SAAS;SACV;QAED,IAAI,QAAQ,CAAC,kBAAkB,EAAE,kBAAkB,CAAC,EAAE;YACpD,qBAAqB,CAAC,MAAM,CAAC,cAAc,CAAC,MAAM,CAAC,CAAC;SACrD;aAAM;YACL,mBAAmB,CAAC,IAAI,CAAC,kBAAkB,CAAC,CAAC;SAC9C;KACF;IAED,MAAM,+BAA+B,GAAG,CAAC,GAAG,qBAAqB,CAAC,MAAM,EAAE,CAAC,CAAC;IAC5E,2CAA2C;IAC3C,IAAI,+BAA+B,CAAC,MAAM,KAAK,CAAC,EAAE;QAChD,OAAO,iBAAiB,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC;QACvC,OAAO;KACR;IAED,iDAAiD;IACjD,iBAAiB,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC,SAAS,GAAG;QAC1C,MAAM,EAAE,KAAK,CAAC,MAAM;QACpB,IAAI,EAAE,KAAK,CAAC,IAAI;QAChB,IAAI,EAAE,+BAA+B;KACtC,CAAC;IACF,iBAAiB,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC,SAAS,GAAG;QAC1C,MAAM,EAAE,KAAK,CAAC,MAAM;QACpB,IAAI,EAAE,KAAK,CAAC,IAAI;QAChB,IAAI,EAAE,mBAAmB;KAC1B,CAAC;AACJ,CAAC"}
@@ -30,8 +30,14 @@ export function getRepeatGroupToRepopulate(qItem, itemsToRepopulate) {
30
30
  return null;
31
31
  }
32
32
  const childLinkIds = qItem.item
33
- .filter((childItem) => !!itemsToRepopulate[childItem.linkId])
33
+ // .filter((childItem) => !!itemsToRepopulate[childItem.linkId])
34
34
  .map((childItem) => childItem.linkId);
35
+ console.log(childLinkIds);
36
+ const aggr = childLinkIds
37
+ .map((linkId) => itemsToRepopulate[linkId])
38
+ .map((itemToRepopulate) => itemToRepopulate.newQRItems);
39
+ console.log(aggr);
40
+ // TODO ok good progress but how do we know to map sprased answers
35
41
  const childQRItemsToRepopulate = childLinkIds
36
42
  .reduce((result, linkId) => {
37
43
  if (itemsToRepopulate[linkId]) {
@@ -40,6 +46,8 @@ export function getRepeatGroupToRepopulate(qItem, itemsToRepopulate) {
40
46
  return result;
41
47
  }, [])
42
48
  .map((itemToRepopulate) => itemToRepopulate.newQRItem);
49
+ // console.log(cloneDeep(childQRItemsToRepopulate));
50
+ console.log(childQRItemsToRepopulate);
43
51
  const repeatGroupToRepopulate = {
44
52
  heading: (_a = qItem.text) !== null && _a !== void 0 ? _a : null,
45
53
  qItem: qItem,
@@ -1 +1 @@
1
- {"version":3,"file":"repopulateRepeatGroup.js","sourceRoot":"","sources":["../../src/utils/repopulateRepeatGroup.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAKH,MAAM,UAAU,8BAA8B,CAC5C,KAAwB,EACxB,iBAAmD;IAEnD,IAAI,CAAC,KAAK,CAAC,IAAI,EAAE;QACf,OAAO,KAAK,CAAC;KACd;IAED,KAAK,MAAM,SAAS,IAAI,KAAK,CAAC,IAAI,EAAE;QAClC,IAAI,iBAAiB,CAAC,SAAS,CAAC,MAAM,CAAC,EAAE;YACvC,OAAO,IAAI,CAAC;SACb;KACF;AACH,CAAC;AAED,MAAM,UAAU,0BAA0B,CACxC,KAAwB,EACxB,iBAAmD;;IAEnD,IAAI,CAAC,KAAK,CAAC,IAAI,EAAE;QACf,OAAO,IAAI,CAAC;KACb;IAED,MAAM,YAAY,GAAG,KAAK,CAAC,IAAI;SAC5B,MAAM,CAAC,CAAC,SAAS,EAAE,EAAE,CAAC,CAAC,CAAC,iBAAiB,CAAC,SAAS,CAAC,MAAM,CAAC,CAAC;SAC5D,GAAG,CAAC,CAAC,SAAS,EAAE,EAAE,CAAC,SAAS,CAAC,MAAM,CAAC,CAAC;IAExC,MAAM,wBAAwB,GAAG,YAAY;SAC1C,MAAM,CAAC,CAAC,MAA0B,EAAE,MAAM,E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AG,CAAC,YAAY,CAAC,CAAC;IAE1B,MAAM,IAAI,GAAG,YAAY;SACtB,GAAG,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,iBAAiB,CAAC,MAAM,CAAC,CAAC;SAC1C,GAAG,CAAC,CAAC,gBAAgB,EAAE,EAAE,CAAC,gBAAgB,CAAC,UAAU,CAAC,CAAC;IAE1D,OAAO,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC;IAClB,kEAAkE;IAElE,MAAM,wBAAwB,GAAG,YAAY;SAC1C,MAAM,CAAC,CAAC,MAA0B,EAAE,MAAM,EAAE,EAAE;QAC7C,IAAI,iBAAiB,CAAC,MAAM,CAAC,EAAE;YAC7B,MAAM,CAAC,IAAI,CAAC,iBAAiB,CAAC,MAAM,CAAC,CAAC,CAAC;SACxC;QACD,OAAO,MAAM,CAAC;IAChB,CAAC,EAAE,EAAE,CAAC;SACL,GAAG,CAAC,CAAC,gBAAgB,EAAE,EAAE,CAAC,gBAAgB,CAAC,SAAS,CAAC,CAAC;IAEzD,oDAAoD;IACpD,OAAO,CAAC,GAAG,CAAC,wBAAwB,CAAC,CAAC;IAEtC,MAAM,uBAAuB,GAAqB;QAChD,OAAO,EAAE,MAAA,KAAK,CAAC,IAAI,mCAAI,IAAI;QAC3B,KAAK,EAAE,KAAK;QACZ,SAAS,EAAE;YACT,MAAM,EAAE,KAAK,CAAC,MAAM;YACpB,IAAI,EAAE,KAAK,CAAC,IAAI;YAChB,IAAI,EAAE,wBAAwB;SAC/B;KACF,CAAC;IAEF,OAAO,uBAAuB,CAAC;AACjC,CAAC"}
@@ -0,0 +1,28 @@
1
+ import type { QuestionnaireItem } from 'fhir/r4';
2
+ /**
3
+ * Get Questionnaire slider step value if its extension is present (http://hl7.org/fhir/StructureDefinition/questionnaire-sliderStepValue)
4
+ *
5
+ * @author Sean Fong
6
+ */
7
+ export declare function getSliderStepValue(qItem: QuestionnaireItem): number | null;
8
+ /**
9
+ * Get minimum value if its extension is present (http://hl7.org/fhir/StructureDefinition/minValue)
10
+ * Only supports valueInteger and valueDecimal for now
11
+ *
12
+ * @author Sean Fong
13
+ */
14
+ export declare function getMinValue(qItem: QuestionnaireItem): number | null;
15
+ /**
16
+ * Get maximum value if its extension is present (http://hl7.org/fhir/StructureDefinition/maxValue)
17
+ * Only supports valueInteger and valueDecimal for now
18
+ *
19
+ * @author Sean Fong
20
+ */
21
+ export declare function getMaxValue(qItem: QuestionnaireItem): number | null;
22
+ export declare function getSliderMarks(minValue: number, maxValue: number, minLabel: string, maxLabel: string, stepValue: number): {
23
+ value: number;
24
+ label: number;
25
+ }[] | {
26
+ value: number;
27
+ label: string;
28
+ }[];
@@ -0,0 +1,89 @@
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
+ /**
18
+ * Get Questionnaire slider step value if its extension is present (http://hl7.org/fhir/StructureDefinition/questionnaire-sliderStepValue)
19
+ *
20
+ * @author Sean Fong
21
+ */
22
+ export function getSliderStepValue(qItem) {
23
+ var _a;
24
+ const itemControl = (_a = qItem.extension) === null || _a === void 0 ? void 0 : _a.find((extension) => extension.url === 'http://hl7.org/fhir/StructureDefinition/questionnaire-sliderStepValue');
25
+ if (itemControl) {
26
+ if (itemControl.valueInteger) {
27
+ return itemControl.valueInteger;
28
+ }
29
+ }
30
+ return null;
31
+ }
32
+ /**
33
+ * Get minimum value if its extension is present (http://hl7.org/fhir/StructureDefinition/minValue)
34
+ * Only supports valueInteger and valueDecimal for now
35
+ *
36
+ * @author Sean Fong
37
+ */
38
+ export function getMinValue(qItem) {
39
+ var _a;
40
+ const itemControl = (_a = qItem.extension) === null || _a === void 0 ? void 0 : _a.find((extension) => extension.url === 'http://hl7.org/fhir/StructureDefinition/minValue');
41
+ if (itemControl) {
42
+ if (itemControl.valueInteger) {
43
+ return itemControl.valueInteger;
44
+ }
45
+ if (itemControl.valueDecimal) {
46
+ return itemControl.valueDecimal;
47
+ }
48
+ }
49
+ return null;
50
+ }
51
+ /**
52
+ * Get maximum value if its extension is present (http://hl7.org/fhir/StructureDefinition/maxValue)
53
+ * Only supports valueInteger and valueDecimal for now
54
+ *
55
+ * @author Sean Fong
56
+ */
57
+ export function getMaxValue(qItem) {
58
+ var _a;
59
+ const itemControl = (_a = qItem.extension) === null || _a === void 0 ? void 0 : _a.find((extension) => extension.url === 'http://hl7.org/fhir/StructureDefinition/maxValue');
60
+ if (itemControl) {
61
+ if (itemControl.valueInteger) {
62
+ return itemControl.valueInteger;
63
+ }
64
+ if (itemControl.valueDecimal) {
65
+ return itemControl.valueDecimal;
66
+ }
67
+ }
68
+ return null;
69
+ }
70
+ export function getSliderMarks(minValue, maxValue, minLabel, maxLabel, stepValue) {
71
+ const numOfSteps = Math.ceil((maxValue - minValue) / stepValue);
72
+ if (numOfSteps > 20) {
73
+ return [
74
+ {
75
+ value: minValue,
76
+ label: minLabel !== '' ? minLabel : minValue.toString()
77
+ },
78
+ {
79
+ value: maxValue,
80
+ label: maxLabel !== '' ? maxLabel : maxValue.toString()
81
+ }
82
+ ];
83
+ }
84
+ return Array.from({ length: numOfSteps + 1 }, (_, i) => minValue + i * stepValue).map((value) => ({
85
+ value: value,
86
+ label: value
87
+ }));
88
+ }
89
+ //# sourceMappingURL=slider.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"slider.js","sourceRoot":"","sources":["../../src/utils/slider.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAIH;;;;GAIG;AACH,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ChB,SAAiB;IAEjB,MAAM,UAAU,GAAG,IAAI,CAAC,IAAI,CAAC,CAAC,QAAQ,GAAG,QAAQ,CAAC,GAAG,SAAS,CAAC,CAAC;IAChE,IAAI,UAAU,GAAG,EAAE,EAAE;QACnB,OAAO;YACL;gBACE,KAAK,EAAE,QAAQ;gBACf,KAAK,EAAE,QAAQ,KAAK,EAAE,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,QAAQ,CAAC,QAAQ,EAAE;aACxD;YACD;gBACE,KAAK,EAAE,QAAQ;gBACf,KAAK,EAAE,QAAQ,KAAK,EAAE,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,QAAQ,CAAC,QAAQ,EAAE;aACxD;SACF,CAAC;KACH;IAED,OAAO,KAAK,CAAC,IAAI,CAAC,EAAE,MAAM,EAAE,UAAU,GAAG,CAAC,EAAE,EAAE,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,QAAQ,GAAG,CAAC,GAAG,SAAS,CAAC,CAAC,GAAG,CACnF,CAAC,KAAK,EAAE,EAAE,CAAC,CAAC;QACV,KAAK,EAAE,KAAK;QACZ,KAAK,EAAE,KAAK;KACb,CAAC,CACH,CAAC;AACJ,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@aehrc/smart-forms-renderer",
3
- "version": "0.8.1",
3
+ "version": "0.9.0",
4
4
  "description": "FHIR Structured Data Captured (SDC) rendering engine for Smart Forms",
5
5
  "main": "lib/index.js",
6
6
  "scripts": {
@@ -23,19 +23,19 @@
23
23
  },
24
24
  "homepage": "https://github.com/aehrc/smart-forms#readme",
25
25
  "dependencies": {
26
- "deep-diff": "^1.0.2",
26
+ "@aehrc/sdc-assemble": "^1.0.2",
27
27
  "@iconify/react": "^4.1.1",
28
+ "@types/fhir": "^0.0.37",
28
29
  "dayjs": "^1.11.10",
30
+ "deep-diff": "^1.0.2",
29
31
  "fhirclient": "^2.5.2",
30
- "fhirpath": "^3.6.1",
32
+ "fhirpath": "^3.7.1",
31
33
  "html-react-parser": "^4.2.0",
32
34
  "lodash.clonedeep": "^4.5.0",
33
35
  "lodash.debounce": "^4.0.8",
34
36
  "nanoid": "^5.0.1",
35
- "@types/fhir": "^0.0.37",
36
- "zustand": "^4.4.1",
37
37
  "react-markdown": "^8.0.7",
38
- "@aehrc/sdc-assemble": "^1.0.2"
38
+ "zustand": "^4.4.1"
39
39
  },
40
40
  "peerDependencies": {
41
41
  "@emotion/react": ">=11.11.0",
@@ -51,7 +51,7 @@
51
51
  "devDependencies": {
52
52
  "@babel/core": "^7.23.0",
53
53
  "@storybook/addon-essentials": "^7.4.6",
54
- "@storybook/addon-interactions": "^7.4.3",
54
+ "@storybook/addon-interactions": "^7.4.6",
55
55
  "@storybook/addon-links": "^7.4.0",
56
56
  "@storybook/addon-onboarding": "^1.0.8",
57
57
  "@storybook/addon-styling": "^1.3.7",
@@ -62,12 +62,14 @@
62
62
  "@testing-library/jest-dom": "^6.1.2",
63
63
  "@testing-library/react": "^14.0.0",
64
64
  "@testing-library/react-hooks": "^7.0.2",
65
+ "@types/deep-diff": "^1.0.4",
65
66
  "@types/jest": "^29.5.5",
66
- "@types/deep-diff": "^1.0.3",
67
+ "@types/lodash.debounce": "^4.0.7",
68
+ "@types/lodash.clonedeep": "^4.5.7",
67
69
  "@types/react": "^18.2.18",
68
70
  "@types/react-dom": "^18.2.9",
69
71
  "jest": "^29.7.0",
70
- "jest-environment-jsdom": "^29.6.4",
72
+ "jest-environment-jsdom": "^29.7.0",
71
73
  "react": "^18.2.0",
72
74
  "react-dom": "^18.2.0",
73
75
  "storybook": "^7.4.5",
@@ -32,12 +32,12 @@ import Box from '@mui/material/Box';
32
32
  import useReadOnly from '../../../hooks/useReadOnly';
33
33
 
34
34
  interface BooleanItemProps
35
- extends PropsWithQrItemChangeHandler<QuestionnaireResponseItem>,
35
+ extends PropsWithQrItemChangeHandler,
36
36
  PropsWithIsRepeatedAttribute,
37
37
  PropsWithIsTabledAttribute,
38
38
  PropsWithParentIsReadOnlyAttribute {
39
39
  qItem: QuestionnaireItem;
40
- qrItem: QuestionnaireResponseItem;
40
+ qrItem: QuestionnaireResponseItem | null;
41
41
  }
42
42
 
43
43
  function BooleanItem(props: BooleanItemProps) {