@aehrc/smart-forms-renderer 0.8.0 → 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 (477) hide show
  1. package/lib/components/Alert.styles.d.ts +2 -7
  2. package/lib/components/Box.styles.d.ts +6 -21
  3. package/lib/components/FormComponents/BooleanItem/BooleanItem.d.ts +3 -3
  4. package/lib/components/FormComponents/BooleanItem/BooleanItem.js +5 -4
  5. package/lib/components/FormComponents/BooleanItem/BooleanItem.js.map +1 -1
  6. package/lib/components/FormComponents/ChoiceItems/ChoiceAutocompleteItem.d.ts +3 -3
  7. package/lib/components/FormComponents/ChoiceItems/ChoiceAutocompleteItem.js +6 -5
  8. package/lib/components/FormComponents/ChoiceItems/ChoiceAutocompleteItem.js.map +1 -1
  9. package/lib/components/FormComponents/ChoiceItems/ChoiceCheckboxAnswerOptionItem.d.ts +3 -3
  10. package/lib/components/FormComponents/ChoiceItems/ChoiceCheckboxAnswerOptionItem.js +15 -14
  11. package/lib/components/FormComponents/ChoiceItems/ChoiceCheckboxAnswerOptionItem.js.map +1 -1
  12. package/lib/components/FormComponents/ChoiceItems/ChoiceCheckboxAnswerValueSetItem.d.ts +3 -3
  13. package/lib/components/FormComponents/ChoiceItems/ChoiceCheckboxAnswerValueSetItem.js +15 -14
  14. package/lib/components/FormComponents/ChoiceItems/ChoiceCheckboxAnswerValueSetItem.js.map +1 -1
  15. package/lib/components/FormComponents/ChoiceItems/ChoiceItemSwitcher.d.ts +3 -3
  16. package/lib/components/FormComponents/ChoiceItems/ChoiceItemSwitcher.js +8 -8
  17. package/lib/components/FormComponents/ChoiceItems/ChoiceItemSwitcher.js.map +1 -1
  18. package/lib/components/FormComponents/ChoiceItems/ChoiceRadioAnswerOptionItem.d.ts +3 -3
  19. package/lib/components/FormComponents/ChoiceItems/ChoiceRadioAnswerOptionItem.js +6 -6
  20. package/lib/components/FormComponents/ChoiceItems/ChoiceRadioAnswerOptionItem.js.map +1 -1
  21. package/lib/components/FormComponents/ChoiceItems/ChoiceRadioAnswerValueSetItem.d.ts +3 -3
  22. package/lib/components/FormComponents/ChoiceItems/ChoiceRadioAnswerValueSetItem.js +6 -5
  23. package/lib/components/FormComponents/ChoiceItems/ChoiceRadioAnswerValueSetItem.js.map +1 -1
  24. package/lib/components/FormComponents/ChoiceItems/ChoiceSelectAnswerOptionFields.d.ts +1 -0
  25. package/lib/components/FormComponents/ChoiceItems/ChoiceSelectAnswerOptionFields.js +2 -2
  26. package/lib/components/FormComponents/ChoiceItems/ChoiceSelectAnswerOptionFields.js.map +1 -1
  27. package/lib/components/FormComponents/ChoiceItems/ChoiceSelectAnswerOptionItem.d.ts +3 -3
  28. package/lib/components/FormComponents/ChoiceItems/ChoiceSelectAnswerOptionItem.js +8 -7
  29. package/lib/components/FormComponents/ChoiceItems/ChoiceSelectAnswerOptionItem.js.map +1 -1
  30. package/lib/components/FormComponents/ChoiceItems/ChoiceSelectAnswerValueSetFields.d.ts +1 -0
  31. package/lib/components/FormComponents/ChoiceItems/ChoiceSelectAnswerValueSetFields.js +2 -2
  32. package/lib/components/FormComponents/ChoiceItems/ChoiceSelectAnswerValueSetFields.js.map +1 -1
  33. package/lib/components/FormComponents/ChoiceItems/ChoiceSelectAnswerValueSetItem.d.ts +3 -3
  34. package/lib/components/FormComponents/ChoiceItems/ChoiceSelectAnswerValueSetItem.js +8 -7
  35. package/lib/components/FormComponents/ChoiceItems/ChoiceSelectAnswerValueSetItem.js.map +1 -1
  36. package/lib/components/FormComponents/CustomDateItem/CustomDateField2.d.ts +18 -0
  37. package/lib/components/FormComponents/CustomDateItem/CustomDateField2.js +31 -0
  38. package/lib/components/FormComponents/CustomDateItem/CustomDateField2.js.map +1 -0
  39. package/lib/components/FormComponents/CustomDateItem/CustomDateItem.d.ts +9 -0
  40. package/lib/components/FormComponents/CustomDateItem/CustomDateItem.js +68 -0
  41. package/lib/components/FormComponents/CustomDateItem/CustomDateItem.js.map +1 -0
  42. package/lib/components/FormComponents/CustomDateItem/CustomDateTimeField.d.ts +9 -0
  43. package/lib/components/FormComponents/CustomDateItem/CustomDateTimeField.js +75 -0
  44. package/lib/components/FormComponents/CustomDateItem/CustomDateTimeField.js.map +1 -0
  45. package/lib/components/FormComponents/CustomDateItem/CustomDateTimePickerText2.d.ts +9 -0
  46. package/lib/components/FormComponents/CustomDateItem/CustomDateTimePickerText2.js +75 -0
  47. package/lib/components/FormComponents/CustomDateItem/CustomDateTimePickerText2.js.map +1 -0
  48. package/lib/components/FormComponents/CustomDateItem/customDateTimePicker/CustomDateField.d.ts +18 -0
  49. package/lib/components/FormComponents/CustomDateItem/customDateTimePicker/CustomDateField.js +33 -0
  50. package/lib/components/FormComponents/CustomDateItem/customDateTimePicker/CustomDateField.js.map +1 -0
  51. package/lib/components/FormComponents/CustomDateItem/customDateTimePicker/DatePicker.d.ts +11 -0
  52. package/lib/components/FormComponents/CustomDateItem/customDateTimePicker/DatePicker.js +55 -0
  53. package/lib/components/FormComponents/CustomDateItem/customDateTimePicker/DatePicker.js.map +1 -0
  54. package/lib/components/FormComponents/CustomDateItem/customDateTimePicker/DatePickerButton.d.ts +9 -0
  55. package/lib/components/FormComponents/CustomDateItem/customDateTimePicker/DatePickerButton.js +13 -0
  56. package/lib/components/FormComponents/CustomDateItem/customDateTimePicker/DatePickerButton.js.map +1 -0
  57. package/lib/components/FormComponents/CustomDateItem/customDateTimePicker/MuiDatePicker.d.ts +5 -0
  58. package/lib/components/FormComponents/CustomDateItem/customDateTimePicker/MuiDatePicker.js +20 -0
  59. package/lib/components/FormComponents/CustomDateItem/customDateTimePicker/MuiDatePicker.js.map +1 -0
  60. package/lib/components/FormComponents/CustomDateItem/customDateTimePicker/hooks/useParseDates.d.ts +5 -0
  61. package/lib/components/FormComponents/CustomDateItem/customDateTimePicker/hooks/useParseDates.js +27 -0
  62. package/lib/components/FormComponents/CustomDateItem/customDateTimePicker/hooks/useParseDates.js.map +1 -0
  63. package/lib/components/FormComponents/CustomDateItem/customDateTimePicker/index.d.ts +1 -0
  64. package/lib/components/FormComponents/CustomDateItem/customDateTimePicker/index.js +18 -0
  65. package/lib/components/FormComponents/CustomDateItem/customDateTimePicker/index.js.map +1 -0
  66. package/lib/components/FormComponents/CustomDateItem/customDateTimePicker/utils/index.d.ts +1 -0
  67. package/lib/components/FormComponents/CustomDateItem/customDateTimePicker/utils/index.js +18 -0
  68. package/lib/components/FormComponents/CustomDateItem/customDateTimePicker/utils/index.js.map +1 -0
  69. package/lib/components/FormComponents/CustomDateItem/customDateTimePicker/utils/parseDates.d.ts +9 -0
  70. package/lib/components/FormComponents/CustomDateItem/customDateTimePicker/utils/parseDates.js +121 -0
  71. package/lib/components/FormComponents/CustomDateItem/customDateTimePicker/utils/parseDates.js.map +1 -0
  72. package/lib/components/FormComponents/CustomDateItem/customDateTimePickerText.d.ts +9 -0
  73. package/lib/components/FormComponents/CustomDateItem/customDateTimePickerText.js +71 -0
  74. package/lib/components/FormComponents/CustomDateItem/customDateTimePickerText.js.map +1 -0
  75. package/lib/components/FormComponents/CustomDateItem/index.d.ts +1 -0
  76. package/lib/components/FormComponents/CustomDateItem/index.js +18 -0
  77. package/lib/components/FormComponents/CustomDateItem/index.js.map +1 -0
  78. package/lib/components/FormComponents/DateItem/DateItem.d.ts +3 -3
  79. package/lib/components/FormComponents/DateItem/DateItem.js +5 -4
  80. package/lib/components/FormComponents/DateItem/DateItem.js.map +1 -1
  81. package/lib/components/FormComponents/DateItem/DatePicker.d.ts +2 -0
  82. package/lib/components/FormComponents/DateItem/DatePicker.js +42 -0
  83. package/lib/components/FormComponents/DateItem/DatePicker.js.map +1 -0
  84. package/lib/components/FormComponents/DateItem/DatePickerField.d.ts +8 -0
  85. package/lib/components/FormComponents/DateItem/DatePickerField.js +24 -0
  86. package/lib/components/FormComponents/DateItem/DatePickerField.js.map +1 -0
  87. package/lib/components/FormComponents/DateTimeItem/DateTimeItem.d.ts +3 -3
  88. package/lib/components/FormComponents/DateTimeItem/DateTimeItem.js +5 -4
  89. package/lib/components/FormComponents/DateTimeItem/DateTimeItem.js.map +1 -1
  90. package/lib/components/FormComponents/DecimalItem/DecimalItem.d.ts +3 -3
  91. package/lib/components/FormComponents/DecimalItem/DecimalItem.js +7 -7
  92. package/lib/components/FormComponents/DecimalItem/DecimalItem.js.map +1 -1
  93. package/lib/components/FormComponents/DisplayItem/DisplayBox.d.ts +0 -0
  94. package/lib/components/FormComponents/DisplayItem/DisplayBox.js +2 -0
  95. package/lib/components/FormComponents/DisplayItem/DisplayBox.js.map +1 -0
  96. package/lib/components/FormComponents/DisplayItem/DisplayBox.styles.d.ts +4 -0
  97. package/lib/components/FormComponents/DisplayItem/DisplayBox.styles.js +35 -0
  98. package/lib/components/FormComponents/DisplayItem/DisplayBox.styles.js.map +1 -0
  99. package/lib/components/FormComponents/DisplayItem/DisplayInstructions.d.ts +3 -1
  100. package/lib/components/FormComponents/DisplayItem/DisplayInstructions.js +2 -2
  101. package/lib/components/FormComponents/DisplayItem/DisplayInstructions.js.map +1 -1
  102. package/lib/components/FormComponents/DisplayItem/DisplayInstructions.styles.d.ts +2 -7
  103. package/lib/components/FormComponents/DisplayItem/DisplayInstructions.styles.js +0 -1
  104. package/lib/components/FormComponents/DisplayItem/DisplayInstructions.styles.js.map +1 -1
  105. package/lib/components/FormComponents/DisplayItem/DisplayItem.js +2 -2
  106. package/lib/components/FormComponents/DisplayItem/DisplayItem.js.map +1 -1
  107. package/lib/components/FormComponents/GridGroup/GridGroup.d.ts +3 -3
  108. package/lib/components/FormComponents/GridGroup/GridGroup.js +16 -9
  109. package/lib/components/FormComponents/GridGroup/GridGroup.js.map +1 -1
  110. package/lib/components/FormComponents/GridGroup/GridRow.d.ts +3 -3
  111. package/lib/components/FormComponents/GridGroup/GridRow.js +4 -4
  112. package/lib/components/FormComponents/GridGroup/GridRow.js.map +1 -1
  113. package/lib/components/FormComponents/GridGroup/GridTable.d.ts +3 -2
  114. package/lib/components/FormComponents/GridGroup/GridTable.js +9 -4
  115. package/lib/components/FormComponents/GridGroup/GridTable.js.map +1 -1
  116. package/lib/components/FormComponents/GridGroup/index.d.ts +1 -0
  117. package/lib/components/FormComponents/GridGroup/index.js +18 -0
  118. package/lib/components/FormComponents/GridGroup/index.js.map +1 -0
  119. package/lib/components/FormComponents/GroupItem/GroupHeading.d.ts +1 -0
  120. package/lib/components/FormComponents/GroupItem/GroupHeading.js +6 -5
  121. package/lib/components/FormComponents/GroupItem/GroupHeading.js.map +1 -1
  122. package/lib/components/FormComponents/GroupItem/GroupItem.d.ts +3 -4
  123. package/lib/components/FormComponents/GroupItem/GroupItem.js +7 -5
  124. package/lib/components/FormComponents/GroupItem/GroupItem.js.map +1 -1
  125. package/lib/components/FormComponents/GroupItem/GroupItem.styles.d.ts +2 -6
  126. package/lib/components/FormComponents/GroupItem/GroupItemSwitcher.d.ts +3 -3
  127. package/lib/components/FormComponents/GroupItem/GroupItemSwitcher.js +11 -12
  128. package/lib/components/FormComponents/GroupItem/GroupItemSwitcher.js.map +1 -1
  129. package/lib/components/FormComponents/IntegerItem/IntegerItem.d.ts +3 -3
  130. package/lib/components/FormComponents/IntegerItem/IntegerItem.js +7 -7
  131. package/lib/components/FormComponents/IntegerItem/IntegerItem.js.map +1 -1
  132. package/lib/components/FormComponents/IntegerItem/SliderItem.d.ts +9 -0
  133. package/lib/components/FormComponents/IntegerItem/SliderItem.js +75 -0
  134. package/lib/components/FormComponents/IntegerItem/SliderItem.js.map +1 -0
  135. package/lib/components/FormComponents/Item.styles.d.ts +0 -4
  136. package/lib/components/FormComponents/Item.styles.js +0 -4
  137. package/lib/components/FormComponents/Item.styles.js.map +1 -1
  138. package/lib/components/FormComponents/ItemParts/FadingCheckIcon.js +2 -2
  139. package/lib/components/FormComponents/ItemParts/FadingCheckIcon.js.map +1 -1
  140. package/lib/components/FormComponents/ItemParts/ItemFieldGrid.d.ts +3 -2
  141. package/lib/components/FormComponents/ItemParts/ItemFieldGrid.js +3 -3
  142. package/lib/components/FormComponents/ItemParts/ItemFieldGrid.js.map +1 -1
  143. package/lib/components/FormComponents/ItemParts/ItemLabelText.d.ts +1 -0
  144. package/lib/components/FormComponents/ItemParts/ItemLabelText.js +4 -6
  145. package/lib/components/FormComponents/ItemParts/ItemLabelText.js.map +1 -1
  146. package/lib/components/FormComponents/ItemParts/ItemLabelWrapper.d.ts +1 -0
  147. package/lib/components/FormComponents/ItemParts/ItemLabelWrapper.js +2 -2
  148. package/lib/components/FormComponents/ItemParts/ItemLabelWrapper.js.map +1 -1
  149. package/lib/components/FormComponents/Lists.styles.d.ts +2 -9
  150. package/lib/components/FormComponents/OpenChoiceItems/OpenChoiceAutocompleteField.d.ts +3 -2
  151. package/lib/components/FormComponents/OpenChoiceItems/OpenChoiceAutocompleteField.js +2 -3
  152. package/lib/components/FormComponents/OpenChoiceItems/OpenChoiceAutocompleteField.js.map +1 -1
  153. package/lib/components/FormComponents/OpenChoiceItems/OpenChoiceAutocompleteItem.d.ts +3 -3
  154. package/lib/components/FormComponents/OpenChoiceItems/OpenChoiceAutocompleteItem.js +8 -7
  155. package/lib/components/FormComponents/OpenChoiceItems/OpenChoiceAutocompleteItem.js.map +1 -1
  156. package/lib/components/FormComponents/OpenChoiceItems/OpenChoiceCheckboxAnswerOptionItem.d.ts +3 -3
  157. package/lib/components/FormComponents/OpenChoiceItems/OpenChoiceCheckboxAnswerOptionItem.js +16 -15
  158. package/lib/components/FormComponents/OpenChoiceItems/OpenChoiceCheckboxAnswerOptionItem.js.map +1 -1
  159. package/lib/components/FormComponents/OpenChoiceItems/OpenChoiceItemSwitcher.d.ts +3 -3
  160. package/lib/components/FormComponents/OpenChoiceItems/OpenChoiceItemSwitcher.js +6 -6
  161. package/lib/components/FormComponents/OpenChoiceItems/OpenChoiceItemSwitcher.js.map +1 -1
  162. package/lib/components/FormComponents/OpenChoiceItems/OpenChoiceRadioAnswerOptionItem.d.ts +3 -3
  163. package/lib/components/FormComponents/OpenChoiceItems/OpenChoiceRadioAnswerOptionItem.js +7 -6
  164. package/lib/components/FormComponents/OpenChoiceItems/OpenChoiceRadioAnswerOptionItem.js.map +1 -1
  165. package/lib/components/FormComponents/OpenChoiceItems/OpenChoiceSelectAnswerOptionField.d.ts +3 -2
  166. package/lib/components/FormComponents/OpenChoiceItems/OpenChoiceSelectAnswerOptionField.js +2 -2
  167. package/lib/components/FormComponents/OpenChoiceItems/OpenChoiceSelectAnswerOptionField.js.map +1 -1
  168. package/lib/components/FormComponents/OpenChoiceItems/OpenChoiceSelectAnswerOptionItem.d.ts +3 -3
  169. package/lib/components/FormComponents/OpenChoiceItems/OpenChoiceSelectAnswerOptionItem.js +7 -6
  170. package/lib/components/FormComponents/OpenChoiceItems/OpenChoiceSelectAnswerOptionItem.js.map +1 -1
  171. package/lib/components/FormComponents/OpenChoiceItems/OpenChoiceSelectAnswerValueSetField.d.ts +3 -2
  172. package/lib/components/FormComponents/OpenChoiceItems/OpenChoiceSelectAnswerValueSetField.js +2 -2
  173. package/lib/components/FormComponents/OpenChoiceItems/OpenChoiceSelectAnswerValueSetField.js.map +1 -1
  174. package/lib/components/FormComponents/OpenChoiceItems/OpenChoiceSelectAnswerValueSetItem.d.ts +3 -3
  175. package/lib/components/FormComponents/OpenChoiceItems/OpenChoiceSelectAnswerValueSetItem.js +8 -7
  176. package/lib/components/FormComponents/OpenChoiceItems/OpenChoiceSelectAnswerValueSetItem.js.map +1 -1
  177. package/lib/components/FormComponents/RepeatGroup/AddItemButton.d.ts +1 -0
  178. package/lib/components/FormComponents/RepeatGroup/AddItemButton.js +2 -2
  179. package/lib/components/FormComponents/RepeatGroup/AddItemButton.js.map +1 -1
  180. package/lib/components/FormComponents/RepeatGroup/DeleteItemButton.d.ts +1 -0
  181. package/lib/components/FormComponents/RepeatGroup/DeleteItemButton.js +2 -2
  182. package/lib/components/FormComponents/RepeatGroup/DeleteItemButton.js.map +1 -1
  183. package/lib/components/FormComponents/RepeatGroup/RepeatGroup.d.ts +2 -2
  184. package/lib/components/FormComponents/RepeatGroup/RepeatGroup.js +20 -7
  185. package/lib/components/FormComponents/RepeatGroup/RepeatGroup.js.map +1 -1
  186. package/lib/components/FormComponents/RepeatGroup/RepeatGroupItem.d.ts +2 -2
  187. package/lib/components/FormComponents/RepeatGroup/RepeatGroupItem.js +5 -3
  188. package/lib/components/FormComponents/RepeatGroup/RepeatGroupItem.js.map +1 -1
  189. package/lib/components/FormComponents/RepeatItem/AddItemButton.d.ts +1 -0
  190. package/lib/components/FormComponents/RepeatItem/AddItemButton.js +2 -2
  191. package/lib/components/FormComponents/RepeatItem/AddItemButton.js.map +1 -1
  192. package/lib/components/FormComponents/RepeatItem/DeleteItemButton.d.ts +1 -0
  193. package/lib/components/FormComponents/RepeatItem/DeleteItemButton.js +2 -2
  194. package/lib/components/FormComponents/RepeatItem/DeleteItemButton.js.map +1 -1
  195. package/lib/components/FormComponents/RepeatItem/RepeatField.d.ts +3 -3
  196. package/lib/components/FormComponents/RepeatItem/RepeatField.js +5 -3
  197. package/lib/components/FormComponents/RepeatItem/RepeatField.js.map +1 -1
  198. package/lib/components/FormComponents/RepeatItem/RepeatItem.d.ts +4 -3
  199. package/lib/components/FormComponents/RepeatItem/RepeatItem.js +15 -5
  200. package/lib/components/FormComponents/RepeatItem/RepeatItem.js.map +1 -1
  201. package/lib/components/FormComponents/RepeatItem/RepeatItem.styles.d.ts +4 -18
  202. package/lib/components/FormComponents/RepeatItem/index.d.ts +1 -0
  203. package/lib/components/FormComponents/RepeatItem/index.js +18 -0
  204. package/lib/components/FormComponents/RepeatItem/index.js.map +1 -0
  205. package/lib/components/FormComponents/SingleItem/SingleItem.d.ts +3 -3
  206. package/lib/components/FormComponents/SingleItem/SingleItem.js +4 -2
  207. package/lib/components/FormComponents/SingleItem/SingleItem.js.map +1 -1
  208. package/lib/components/FormComponents/SingleItem/SingleItemSwitcher.d.ts +3 -3
  209. package/lib/components/FormComponents/SingleItem/SingleItemSwitcher.js +20 -15
  210. package/lib/components/FormComponents/SingleItem/SingleItemSwitcher.js.map +1 -1
  211. package/lib/components/FormComponents/SliderItem/DisplayBox.styles.d.ts +4 -0
  212. package/lib/components/FormComponents/SliderItem/DisplayBox.styles.js +35 -0
  213. package/lib/components/FormComponents/SliderItem/DisplayBox.styles.js.map +1 -0
  214. package/lib/components/FormComponents/SliderItem/Slider.styles.d.ts +6 -0
  215. package/lib/components/FormComponents/SliderItem/Slider.styles.js +33 -0
  216. package/lib/components/FormComponents/SliderItem/Slider.styles.js.map +1 -0
  217. package/lib/components/FormComponents/SliderItem/SliderDisplayValue.d.ts +8 -0
  218. package/lib/components/FormComponents/SliderItem/SliderDisplayValue.js +28 -0
  219. package/lib/components/FormComponents/SliderItem/SliderDisplayValue.js.map +1 -0
  220. package/lib/components/FormComponents/SliderItem/SliderField.d.ts +16 -0
  221. package/lib/components/FormComponents/SliderItem/SliderField.js +41 -0
  222. package/lib/components/FormComponents/SliderItem/SliderField.js.map +1 -0
  223. package/lib/components/FormComponents/SliderItem/SliderItem.d.ts +9 -0
  224. package/lib/components/FormComponents/SliderItem/SliderItem.js +56 -0
  225. package/lib/components/FormComponents/SliderItem/SliderItem.js.map +1 -0
  226. package/lib/components/FormComponents/SliderItem/SliderLabels.d.ts +7 -0
  227. package/lib/components/FormComponents/SliderItem/SliderLabels.js +32 -0
  228. package/lib/components/FormComponents/SliderItem/SliderLabels.js.map +1 -0
  229. package/lib/components/FormComponents/StringItem/StringItem.d.ts +3 -3
  230. package/lib/components/FormComponents/StringItem/StringItem.js +5 -4
  231. package/lib/components/FormComponents/StringItem/StringItem.js.map +1 -1
  232. package/lib/components/FormComponents/Tables/AddRowButton.d.ts +1 -0
  233. package/lib/components/FormComponents/Tables/AddRowButton.js +2 -2
  234. package/lib/components/FormComponents/Tables/AddRowButton.js.map +1 -1
  235. package/lib/components/FormComponents/Tables/DeleteRowButton.d.ts +1 -0
  236. package/lib/components/FormComponents/Tables/DeleteRowButton.js +2 -2
  237. package/lib/components/FormComponents/Tables/DeleteRowButton.js.map +1 -1
  238. package/lib/components/FormComponents/Tables/GroupTable.d.ts +4 -3
  239. package/lib/components/FormComponents/Tables/GroupTable.js +25 -6
  240. package/lib/components/FormComponents/Tables/GroupTable.js.map +1 -1
  241. package/lib/components/FormComponents/Tables/GroupTableRow.d.ts +3 -3
  242. package/lib/components/FormComponents/Tables/GroupTableRow.js +4 -4
  243. package/lib/components/FormComponents/Tables/GroupTableRow.js.map +1 -1
  244. package/lib/components/FormComponents/Tables/QItemGroupTable.js +5 -7
  245. package/lib/components/FormComponents/Tables/QItemGroupTable.js.map +1 -1
  246. package/lib/components/FormComponents/Tables/QItemGroupTableRow.js +2 -2
  247. package/lib/components/FormComponents/Tables/QItemGroupTableRow.js.map +1 -1
  248. package/lib/components/FormComponents/TextItem/TextItem.d.ts +3 -3
  249. package/lib/components/FormComponents/TextItem/TextItem.js +5 -4
  250. package/lib/components/FormComponents/TextItem/TextItem.js.map +1 -1
  251. package/lib/components/FormComponents/TimeItem/TimeItem.d.ts +3 -3
  252. package/lib/components/FormComponents/TimeItem/TimeItem.js +5 -4
  253. package/lib/components/FormComponents/TimeItem/TimeItem.js.map +1 -1
  254. package/lib/components/FormComponents/UrlItem/UrlItem.d.ts +3 -3
  255. package/lib/components/FormComponents/UrlItem/UrlItem.js +5 -4
  256. package/lib/components/FormComponents/UrlItem/UrlItem.js.map +1 -1
  257. package/lib/components/FormComponents/index.d.ts +3 -0
  258. package/lib/components/FormComponents/index.js +3 -0
  259. package/lib/components/FormComponents/index.js.map +1 -1
  260. package/lib/components/Lists.styles.d.ts +2 -9
  261. package/lib/components/Renderer/BaseRenderer.js +3 -5
  262. package/lib/components/Renderer/BaseRenderer.js.map +1 -1
  263. package/lib/components/Renderer/FormBodyCollapsible.d.ts +2 -2
  264. package/lib/components/Renderer/FormBodyCollapsible.js +6 -5
  265. package/lib/components/Renderer/FormBodyCollapsible.js.map +1 -1
  266. package/lib/components/Renderer/FormBodySingleCollapsibleWrapper.d.ts +2 -2
  267. package/lib/components/Renderer/FormBodySingleCollapsibleWrapper.js.map +1 -1
  268. package/lib/components/Renderer/FormBodyTabbed.d.ts +2 -2
  269. package/lib/components/Renderer/FormBodyTabbed.js +6 -5
  270. package/lib/components/Renderer/FormBodyTabbed.js.map +1 -1
  271. package/lib/components/Renderer/FormTopLevelItem.d.ts +2 -2
  272. package/lib/components/Renderer/FormTopLevelItem.js +9 -5
  273. package/lib/components/Renderer/FormTopLevelItem.js.map +1 -1
  274. package/lib/components/Tabs/FormBodySingleTab.js +1 -1
  275. package/lib/components/Tabs/FormBodySingleTab.js.map +1 -1
  276. package/lib/components/Tabs/ShowCompletedTabsSection.js +1 -1
  277. package/lib/components/Tabs/ShowCompletedTabsSection.js.map +1 -1
  278. package/lib/hooks/useDateSeparatorValidation.d.ts +2 -0
  279. package/lib/hooks/useDateSeparatorValidation.js +25 -0
  280. package/lib/hooks/useDateSeparatorValidation.js.map +1 -0
  281. package/lib/hooks/useDateValidation.d.ts +2 -0
  282. package/lib/hooks/useDateValidation.js +61 -0
  283. package/lib/hooks/useDateValidation.js.map +1 -0
  284. package/lib/hooks/useDecimalCalculatedExpression.d.ts +0 -1
  285. package/lib/hooks/useDecimalCalculatedExpression.js +3 -3
  286. package/lib/hooks/useDecimalCalculatedExpression.js.map +1 -1
  287. package/lib/hooks/useInitialiseRepeatAnswers.d.ts +1 -1
  288. package/lib/hooks/useInitialiseRepeatAnswers.js.map +1 -1
  289. package/lib/hooks/useIntegerCalculatedExpression.d.ts +0 -1
  290. package/lib/hooks/useIntegerCalculatedExpression.js +3 -3
  291. package/lib/hooks/useIntegerCalculatedExpression.js.map +1 -1
  292. package/lib/hooks/useMinimalStringCalculatedExpression.d.ts +11 -0
  293. package/lib/hooks/useMinimalStringCalculatedExpression.js +37 -0
  294. package/lib/hooks/useMinimalStringCalculatedExpression.js.map +1 -0
  295. package/lib/hooks/useReadOnly.d.ts +3 -0
  296. package/lib/hooks/useReadOnly.js +26 -0
  297. package/lib/hooks/useReadOnly.js.map +1 -0
  298. package/lib/hooks/useSliderExtensions.d.ts +10 -0
  299. package/lib/hooks/useSliderExtensions.js +37 -0
  300. package/lib/hooks/useSliderExtensions.js.map +1 -0
  301. package/lib/hooks/useTerminologyServerQuery.js +0 -1
  302. package/lib/hooks/useTerminologyServerQuery.js.map +1 -1
  303. package/lib/index.d.ts +3 -3
  304. package/lib/index.js +15 -6
  305. package/lib/index.js.map +1 -1
  306. package/lib/interfaces/calculatedExpression.interface.d.ts +1 -1
  307. package/lib/interfaces/index.d.ts +2 -0
  308. package/lib/interfaces/index.js +18 -0
  309. package/lib/interfaces/index.js.map +1 -0
  310. package/lib/interfaces/questionnaireStore.interface.d.ts +1 -0
  311. package/lib/interfaces/renderProps.interface.d.ts +7 -3
  312. package/lib/stores/useQuestionnaireStore.d.ts +1 -0
  313. package/lib/stores/useQuestionnaireStore.js +28 -12
  314. package/lib/stores/useQuestionnaireStore.js.map +1 -1
  315. package/lib/test.d.ts +4 -0
  316. package/lib/test.js +18 -0
  317. package/lib/test.js.map +1 -0
  318. package/lib/theme/customGlobalStyles.js +0 -4
  319. package/lib/theme/customGlobalStyles.js.map +1 -1
  320. package/lib/theme/overrides/Typography.d.ts +13 -0
  321. package/lib/theme/overrides/Typography.js +31 -0
  322. package/lib/theme/overrides/Typography.js.map +1 -0
  323. package/lib/theme/typography.d.ts +0 -2
  324. package/lib/theme/typography.js +3 -5
  325. package/lib/theme/typography.js.map +1 -1
  326. package/lib/utils/calculatedExpression.d.ts +17 -1
  327. package/lib/utils/calculatedExpression.js +71 -20
  328. package/lib/utils/calculatedExpression.js.map +1 -1
  329. package/lib/utils/dayjsExtend.d.ts +1 -0
  330. package/lib/utils/dayjsExtend.js +22 -0
  331. package/lib/utils/dayjsExtend.js.map +1 -0
  332. package/lib/utils/enableWhenExpression.d.ts +5 -1
  333. package/lib/utils/enableWhenExpression.js +26 -21
  334. package/lib/utils/enableWhenExpression.js.map +1 -1
  335. package/lib/utils/fhirpath.d.ts +3 -1
  336. package/lib/utils/fhirpath.js +25 -15
  337. package/lib/utils/fhirpath.js.map +1 -1
  338. package/lib/utils/index.d.ts +1 -0
  339. package/lib/utils/index.js +1 -0
  340. package/lib/utils/index.js.map +1 -1
  341. package/lib/utils/initialiseForm.d.ts +2 -0
  342. package/lib/utils/initialiseForm.js +13 -5
  343. package/lib/utils/initialiseForm.js.map +1 -1
  344. package/lib/utils/itemControl.d.ts +12 -0
  345. package/lib/utils/itemControl.js +30 -0
  346. package/lib/utils/itemControl.js.map +1 -1
  347. package/lib/utils/launchContext.d.ts +0 -0
  348. package/lib/utils/launchContext.js +2 -0
  349. package/lib/utils/launchContext.js.map +1 -0
  350. package/lib/utils/mapItem.d.ts +1 -1
  351. package/lib/utils/qrItem.d.ts +1 -7
  352. package/lib/utils/qrItem.js +1 -12
  353. package/lib/utils/qrItem.js.map +1 -1
  354. package/lib/utils/questionnaireStoreUtils/createQuestionaireModel.js +4 -2
  355. package/lib/utils/questionnaireStoreUtils/createQuestionaireModel.js.map +1 -1
  356. package/lib/utils/removeHidden.js +2 -1
  357. package/lib/utils/removeHidden.js.map +1 -1
  358. package/lib/utils/repopulateIntoResponse.js +90 -29
  359. package/lib/utils/repopulateIntoResponse.js.map +1 -1
  360. package/lib/utils/repopulateItems.d.ts +14 -1
  361. package/lib/utils/repopulateItems.js +251 -70
  362. package/lib/utils/repopulateItems.js.map +1 -1
  363. package/lib/utils/repopulateRepeatGroup.js +9 -1
  364. package/lib/utils/repopulateRepeatGroup.js.map +1 -1
  365. package/lib/utils/slider.d.ts +28 -0
  366. package/lib/utils/slider.js +89 -0
  367. package/lib/utils/slider.js.map +1 -0
  368. package/package.json +20 -18
  369. package/src/components/FormComponents/BooleanItem/BooleanItem.tsx +10 -7
  370. package/src/components/FormComponents/ChoiceItems/ChoiceAutocompleteItem.tsx +11 -8
  371. package/src/components/FormComponents/ChoiceItems/ChoiceCheckboxAnswerOptionItem.tsx +46 -35
  372. package/src/components/FormComponents/ChoiceItems/ChoiceCheckboxAnswerValueSetItem.tsx +48 -37
  373. package/src/components/FormComponents/ChoiceItems/ChoiceItemSwitcher.tsx +21 -11
  374. package/src/components/FormComponents/ChoiceItems/ChoiceRadioAnswerOptionItem.tsx +11 -10
  375. package/src/components/FormComponents/ChoiceItems/ChoiceRadioAnswerValueSetItem.tsx +12 -9
  376. package/src/components/FormComponents/ChoiceItems/ChoiceSelectAnswerOptionFields.tsx +3 -2
  377. package/src/components/FormComponents/ChoiceItems/ChoiceSelectAnswerOptionItem.tsx +16 -11
  378. package/src/components/FormComponents/ChoiceItems/ChoiceSelectAnswerValueSetFields.tsx +3 -2
  379. package/src/components/FormComponents/ChoiceItems/ChoiceSelectAnswerValueSetItem.tsx +14 -9
  380. package/src/components/FormComponents/CustomDateItem/CustomDateItem.tsx +140 -0
  381. package/src/components/FormComponents/CustomDateItem/customDateTimePicker/CustomDateField.tsx +96 -0
  382. package/src/components/FormComponents/CustomDateItem/customDateTimePicker/DatePicker.tsx +81 -0
  383. package/src/components/FormComponents/CustomDateItem/customDateTimePicker/DatePickerButton.tsx +33 -0
  384. package/src/components/FormComponents/{Typography.styles.ts → CustomDateItem/customDateTimePicker/MuiDatePicker.ts} +4 -7
  385. package/src/components/FormComponents/CustomDateItem/customDateTimePicker/index.ts +18 -0
  386. package/src/components/FormComponents/CustomDateItem/customDateTimePicker/utils/index.ts +18 -0
  387. package/src/components/FormComponents/CustomDateItem/customDateTimePicker/utils/parseDates.ts +154 -0
  388. package/src/components/FormComponents/CustomDateItem/index.ts +18 -0
  389. package/src/components/FormComponents/DateItem/DateItem.tsx +10 -8
  390. package/src/components/FormComponents/DateTimeItem/DateTimeItem.tsx +10 -8
  391. package/src/components/FormComponents/DecimalItem/DecimalItem.tsx +11 -10
  392. package/src/components/FormComponents/DisplayItem/DisplayInstructions.styles.ts +0 -1
  393. package/src/components/FormComponents/DisplayItem/DisplayInstructions.tsx +8 -3
  394. package/src/components/FormComponents/DisplayItem/DisplayItem.tsx +2 -2
  395. package/src/components/FormComponents/GridGroup/GridGroup.tsx +49 -15
  396. package/src/components/FormComponents/GridGroup/GridRow.tsx +12 -7
  397. package/src/components/FormComponents/GridGroup/GridTable.tsx +32 -8
  398. package/src/components/FormComponents/GridGroup/index.ts +18 -0
  399. package/src/components/FormComponents/GroupItem/GroupHeading.tsx +12 -6
  400. package/src/components/FormComponents/GroupItem/GroupItem.tsx +13 -8
  401. package/src/components/FormComponents/GroupItem/GroupItemSwitcher.tsx +33 -11
  402. package/src/components/FormComponents/IntegerItem/IntegerItem.tsx +11 -10
  403. package/src/components/FormComponents/Item.styles.ts +0 -5
  404. package/src/components/FormComponents/ItemParts/FadingCheckIcon.tsx +2 -2
  405. package/src/components/FormComponents/ItemParts/ItemFieldGrid.tsx +6 -5
  406. package/src/components/FormComponents/ItemParts/ItemLabelText.tsx +10 -5
  407. package/src/components/FormComponents/ItemParts/ItemLabelWrapper.tsx +3 -2
  408. package/src/components/FormComponents/OpenChoiceItems/OpenChoiceAutocompleteField.tsx +10 -4
  409. package/src/components/FormComponents/OpenChoiceItems/OpenChoiceAutocompleteItem.tsx +15 -9
  410. package/src/components/FormComponents/OpenChoiceItems/OpenChoiceCheckboxAnswerOptionItem.tsx +58 -47
  411. package/src/components/FormComponents/OpenChoiceItems/OpenChoiceItemSwitcher.tsx +15 -6
  412. package/src/components/FormComponents/OpenChoiceItems/OpenChoiceRadioAnswerOptionItem.tsx +13 -10
  413. package/src/components/FormComponents/OpenChoiceItems/OpenChoiceSelectAnswerOptionField.tsx +10 -4
  414. package/src/components/FormComponents/OpenChoiceItems/OpenChoiceSelectAnswerOptionItem.tsx +12 -7
  415. package/src/components/FormComponents/OpenChoiceItems/OpenChoiceSelectAnswerValueSetField.tsx +10 -4
  416. package/src/components/FormComponents/OpenChoiceItems/OpenChoiceSelectAnswerValueSetItem.tsx +14 -9
  417. package/src/components/FormComponents/RepeatGroup/AddItemButton.tsx +3 -2
  418. package/src/components/FormComponents/RepeatGroup/DeleteItemButton.tsx +3 -2
  419. package/src/components/FormComponents/RepeatGroup/RepeatGroup.tsx +61 -10
  420. package/src/components/FormComponents/RepeatGroup/RepeatGroupItem.tsx +23 -7
  421. package/src/components/FormComponents/RepeatItem/AddItemButton.tsx +3 -2
  422. package/src/components/FormComponents/RepeatItem/DeleteItemButton.tsx +3 -2
  423. package/src/components/FormComponents/RepeatItem/RepeatField.tsx +33 -9
  424. package/src/components/FormComponents/RepeatItem/RepeatItem.tsx +44 -7
  425. package/src/components/FormComponents/RepeatItem/index.ts +18 -0
  426. package/src/components/FormComponents/SingleItem/SingleItem.tsx +12 -6
  427. package/src/components/FormComponents/SingleItem/SingleItemSwitcher.tsx +41 -11
  428. package/src/components/FormComponents/SliderItem/Slider.styles.ts +34 -0
  429. package/src/components/FormComponents/SliderItem/SliderDisplayValue.tsx +43 -0
  430. package/src/components/FormComponents/SliderItem/SliderField.tsx +88 -0
  431. package/src/components/FormComponents/SliderItem/SliderItem.tsx +115 -0
  432. package/src/components/FormComponents/SliderItem/SliderLabels.tsx +53 -0
  433. package/src/components/FormComponents/StringItem/StringItem.tsx +9 -7
  434. package/src/components/FormComponents/Tables/AddRowButton.tsx +3 -2
  435. package/src/components/FormComponents/Tables/DeleteRowButton.tsx +3 -2
  436. package/src/components/FormComponents/Tables/GroupTable.tsx +70 -7
  437. package/src/components/FormComponents/Tables/GroupTableRow.tsx +12 -7
  438. package/src/components/FormComponents/TextItem/TextItem.tsx +9 -7
  439. package/src/components/FormComponents/TimeItem/TimeItem.tsx +10 -8
  440. package/src/components/FormComponents/UrlItem/UrlItem.tsx +9 -7
  441. package/src/components/FormComponents/index.ts +3 -0
  442. package/src/components/Renderer/BaseRenderer.tsx +5 -12
  443. package/src/components/Renderer/FormBodyCollapsible.tsx +9 -7
  444. package/src/components/Renderer/FormBodySingleCollapsibleWrapper.tsx +2 -3
  445. package/src/components/Renderer/FormBodyTabbed.tsx +9 -7
  446. package/src/components/Renderer/FormTopLevelItem.tsx +21 -13
  447. package/src/components/Tabs/FormBodySingleTab.tsx +1 -1
  448. package/src/components/Tabs/ShowCompletedTabsSection.tsx +1 -1
  449. package/src/hooks/useDateValidation.tsx +79 -0
  450. package/src/hooks/useDecimalCalculatedExpression.ts +3 -4
  451. package/src/hooks/useInitialiseRepeatAnswers.ts +1 -1
  452. package/src/hooks/useIntegerCalculatedExpression.ts +3 -4
  453. package/src/hooks/useReadOnly.ts +30 -0
  454. package/src/hooks/useSliderExtensions.ts +50 -0
  455. package/src/hooks/useTerminologyServerQuery.ts +0 -2
  456. package/src/index.ts +12 -9
  457. package/src/interfaces/calculatedExpression.interface.ts +1 -1
  458. package/src/interfaces/questionnaireStore.interface.ts +1 -0
  459. package/src/interfaces/renderProps.interface.ts +8 -3
  460. package/src/stores/useQuestionnaireStore.ts +39 -16
  461. package/src/theme/customGlobalStyles.tsx +0 -4
  462. package/src/theme/typography.ts +3 -5
  463. package/src/utils/calculatedExpression.ts +104 -35
  464. package/src/utils/dayjsExtend.ts +23 -0
  465. package/src/utils/enableWhenExpression.ts +49 -34
  466. package/src/utils/fhirpath.ts +50 -31
  467. package/src/utils/index.ts +1 -0
  468. package/src/utils/initialiseForm.ts +15 -5
  469. package/src/utils/itemControl.ts +32 -0
  470. package/src/utils/mapItem.ts +1 -1
  471. package/src/utils/qrItem.ts +1 -16
  472. package/src/utils/questionnaireStoreUtils/createQuestionaireModel.ts +4 -2
  473. package/src/utils/removeHidden.ts +2 -1
  474. package/src/utils/repopulateIntoResponse.ts +134 -43
  475. package/src/utils/repopulateItems.ts +379 -101
  476. package/src/utils/slider.ts +112 -0
  477. package/src/utils/repopulateRepeatGroup.ts +0 -68
@@ -16,22 +16,24 @@
16
16
  */
17
17
  import React, { useMemo } from 'react';
18
18
  import { getQrItemsIndex, mapQItemsIndex } from '../../../utils/mapItem';
19
- import { createQrGroup, updateQrItemsInGroup } from '../../../utils/qrItem';
19
+ import { createEmptyQrGroup, updateQrItemsInGroup } from '../../../utils/qrItem';
20
20
  import { QGroupContainerBox } from '../../Box.styles';
21
21
  import useHidden from '../../../hooks/useHidden';
22
22
  import GroupHeading from './GroupHeading';
23
23
  import { GroupCard } from './GroupItem.styles';
24
24
  import NextTabButtonWrapper from './NextTabButtonWrapper';
25
25
  import GroupItemSwitcher from './GroupItemSwitcher';
26
+ import useReadOnly from '../../../hooks/useReadOnly';
26
27
  function GroupItem(props) {
27
- const { qItem, qrItem, isRepeated, groupCardElevation, tabIsMarkedAsComplete, tabs, currentTabIndex, onQrItemChange } = props;
28
+ const { qItem, qrItem, isRepeated, groupCardElevation, tabIsMarkedAsComplete, tabs, currentTabIndex, parentIsReadOnly, onQrItemChange } = props;
28
29
  const qItemsIndexMap = useMemo(() => mapQItemsIndex(qItem), [qItem]);
30
+ const readOnly = useReadOnly(qItem, parentIsReadOnly);
29
31
  const itemIsHidden = useHidden(qItem);
30
32
  if (itemIsHidden) {
31
33
  return null;
32
34
  }
33
35
  const qItems = qItem.item;
34
- const qrGroup = qrItem && qrItem.item ? qrItem : createQrGroup(qItem);
36
+ const qrGroup = qrItem && qrItem.item ? qrItem : createEmptyQrGroup(qItem);
35
37
  const qrItems = qrGroup.item;
36
38
  // Event Handlers
37
39
  function handleQrItemChange(newQrItem) {
@@ -51,10 +53,10 @@ function GroupItem(props) {
51
53
  const qrItemsByIndex = getQrItemsIndex(qItems, qrItems, qItemsIndexMap);
52
54
  return (React.createElement(QGroupContainerBox, { cardElevation: groupCardElevation, isRepeated: isRepeated, "data-test": "q-item-group-box" },
53
55
  React.createElement(GroupCard, { elevation: groupCardElevation, isRepeated: isRepeated },
54
- React.createElement(GroupHeading, { qItem: qItem, tabIsMarkedAsComplete: tabIsMarkedAsComplete, isRepeated: isRepeated }),
56
+ React.createElement(GroupHeading, { qItem: qItem, readOnly: readOnly, tabIsMarkedAsComplete: tabIsMarkedAsComplete, isRepeated: isRepeated }),
55
57
  qItems.map((qItem, i) => {
56
58
  const qrItemOrItems = qrItemsByIndex[i];
57
- return (React.createElement(GroupItemSwitcher, { key: qItem.linkId, qItem: qItem, qrItemOrItems: qrItemOrItems, groupCardElevation: groupCardElevation, onQrItemChange: handleQrItemChange, onQrRepeatGroupChange: handleQrRepeatGroupChange }));
59
+ return (React.createElement(GroupItemSwitcher, { key: qItem.linkId, qItem: qItem, qrItemOrItems: qrItemOrItems, groupCardElevation: groupCardElevation, parentIsReadOnly: readOnly, onQrItemChange: handleQrItemChange, onQrRepeatGroupChange: handleQrRepeatGroupChange }));
58
60
  }),
59
61
  React.createElement(NextTabButtonWrapper, { currentTabIndex: currentTabIndex, tabs: tabs }))));
60
62
  }
@@ -1 +1 @@
1
- {"version":3,"file":"GroupItem.js","sourceRoot":"","sources":["../../../../src/components/FormComponents/GroupItem/GroupItem.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAEH,OAAO,KAAK,EAAE,EAAE,OAAO,EAAE,MAAM,OAAO,CAAC;AACvC,OAAO,EAAE,eAAe,EAAE,cAAc,EAAE,MAAM,wBAAwB,CAAC;AAEzE,OAAO,EAAE,aAAa,EAAE,oBAAoB,EAAE,MAAM,uBAAuB,CAAC;AAC5E,OAAO,EAAE,kBAAkB,EAAE,MAAM,kBAAkB,CAAC;AAMtD,OAAO,SAAS,MAAM,0BAA0B,CAAC;AAEjD,OAAO,YAAY,MAAM,gBAAgB,CAAC;AAC1C,OAAO,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAC;AAC/C,OAAO,oBAAoB,MAAM,wBAAwB,CAAC;AAC1D,OAAO,iBAAiB,MAAM,qBAAqB,CAAC;AAcpD,SAAS,SAAS,CAAC,KAAqB;IACtC,MAAM,EACJ,KAAK,EACL,MAAM,EACN,UAAU,EACV,kBAAkB,EAClB,qBAAqB,EACrB,IAAI,EACJ,eAAe,EACf,cAAc,EACf,GAAG,KAAK,CAAC;IAEV,MAAM,cAAc,GAAG,OAAO,CAAC,GAAG,EAAE,CAAC,cAAc,CAAC,KAAK,CAAC,EAAE,CAAC,KAAK,CAAC,CAAC,CAAC;IAErE,MAAM,YAAY,GAAG,SAAS,CAAC,KAAK,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aAAa,GAAG,cAAc,CAAC,CAAC,CAAC,CAAC;gBAExC,OAAO,CACL,oBAAC,iBAAiB,IAChB,GAAG,EAAE,KAAK,CAAC,MAAM,EACjB,KAAK,EAAE,KAAK,EACZ,aAAa,EAAE,aAAa,EAC5B,kBAAkB,EAAE,kBAAkB,EACtC,cAAc,EAAE,kBAAkB,EAClC,qBAAqB,EAAE,yBAAyB,GAChD,CACH,CAAC;YACJ,CAAC,CAAC;YAGF,oBAAC,oBAAoB,IAAC,eAAe,EAAE,eAAe,EAAE,IAAI,EAAE,IAAI,GAAI,CAC5D,CACO,CACtB,CAAC;AACJ,CAAC;AAED,eAAe,SAAS,CAAC"}
1
+ {"version":3,"file":"GroupItem.js","sourceRoot":"","sources":["../../../../src/components/FormComponents/GroupItem/GroupItem.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAEH,OAAO,KAAK,EAAE,EAAE,OAAO,EAAE,MAAM,OAAO,CAAC;AACvC,OAAO,EAAE,eAAe,EAAE,cAAc,EAAE,MAAM,wBAAwB,CAAC;AAEzE,OAAO,EAAE,kBAAkB,EAAE,oBAAoB,EAAE,MAAM,uBAAuB,CAAC;AACjF,OAAO,EAAE,kBAAkB,EAAE,MAAM,kBAAkB,CAAC;AAOtD,OAAO,SAAS,MAAM,0BAA0B,CAAC;AAEjD,OAAO,YAAY,MAAM,gBAAgB,CAAC;AAC1C,OAAO,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAC;AAC/C,OAAO,oBAAoB,MAAM,wBAAwB,CAAC;AAC1D,OAAO,iBAAiB,MAAM,qBAAqB,CAAC;AACpD,OAAO,WAAW,MAAM,4BAA4B,CAAC;AAcrD,SAAS,SAAS,CAAC,KAAqB;IACtC,MAAM,EACJ,KAAK,EACL,MAAM,EACN,UAAU,EACV,kBAAkB,EAClB,qBAAqB,EACrB,IAAI,EACJ,eAAe,EACf,gBAAgB,EAChB,cAAc,EACf,GAAG,KAAK,CAAC;IAEV,MAAM,cAAc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kB,EAAE,UAAU,EAAE,UAAU;YAC9D,oBAAC,YAAY,IACX,KAAK,EAAE,KAAK,EACZ,QAAQ,EAAE,QAAQ,EAClB,qBAAqB,EAAE,qBAAqB,EAC5C,UAAU,EAAE,UAAU,GACtB;YACD,MAAM,CAAC,GAAG,CAAC,CAAC,KAAwB,EAAE,CAAC,EAAE,EAAE;gBAC1C,MAAM,aAAa,GAAG,cAAc,CAAC,CAAC,CAAC,CAAC;gBAExC,OAAO,CACL,oBAAC,iBAAiB,IAChB,GAAG,EAAE,KAAK,CAAC,MAAM,EACjB,KAAK,EAAE,KAAK,EACZ,aAAa,EAAE,aAAa,EAC5B,kBAAkB,EAAE,kBAAkB,EACtC,gBAAgB,EAAE,QAAQ,EAC1B,cAAc,EAAE,kBAAkB,EAClC,qBAAqB,EAAE,yBAAyB,GAChD,CACH,CAAC;YACJ,CAAC,CAAC;YAGF,oBAAC,oBAAoB,IAAC,eAAe,EAAE,eAAe,EAAE,IAAI,EAAE,IAAI,GAAI,CAC5D,CACO,CACtB,CAAC;AACJ,CAAC;AAED,eAAe,SAAS,CAAC"}
@@ -1,11 +1,7 @@
1
1
  /// <reference types="react" />
2
- export declare const GroupCard: import("@emotion/styled").StyledComponent<Omit<import("@mui/material").PaperOwnProps, "classes"> & {
3
- classes?: Partial<import("@mui/material/Card").CardClasses> | undefined;
4
- raised?: boolean | undefined;
5
- sx?: import("@mui/material/styles").SxProps<import("@mui/material/styles").Theme> | undefined;
6
- } & import("@mui/material/OverridableComponent").CommonProps & Omit<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
2
+ export declare const GroupCard: import("@emotion/styled").StyledComponent<import("@mui/material/Card").CardOwnProps & import("@mui/material/OverridableComponent").CommonProps & Omit<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
7
3
  ref?: ((instance: HTMLDivElement | null) => void) | import("react").RefObject<HTMLDivElement> | null | undefined;
8
- }, "children" | "sx" | keyof import("@mui/material/OverridableComponent").CommonProps | "variant" | "elevation" | "square" | "raised"> & import("@mui/system").MUIStyledCommonProps<import("@mui/material/styles").Theme> & {
4
+ }, "style" | "className" | "children" | "sx" | "classes" | "elevation" | "variant" | "square" | "raised"> & import("@mui/system").MUIStyledCommonProps<import("@mui/material/styles").Theme> & {
9
5
  elevation: number;
10
6
  isRepeated: boolean;
11
7
  }, {}, {}>;
@@ -1,9 +1,9 @@
1
1
  import React from 'react';
2
- import type { PropsWithQrItemChangeHandler, PropsWithQrRepeatGroupChangeHandler } from '../../../interfaces/renderProps.interface';
2
+ import type { PropsWithParentIsReadOnlyAttribute, PropsWithQrItemChangeHandler, PropsWithQrRepeatGroupChangeHandler } from '../../../interfaces/renderProps.interface';
3
3
  import type { QuestionnaireItem, QuestionnaireResponseItem } from 'fhir/r4';
4
- interface GroupItemSwitcherProps extends PropsWithQrItemChangeHandler<QuestionnaireResponseItem>, PropsWithQrRepeatGroupChangeHandler {
4
+ interface GroupItemSwitcherProps extends PropsWithQrItemChangeHandler, PropsWithQrRepeatGroupChangeHandler, PropsWithParentIsReadOnlyAttribute {
5
5
  qItem: QuestionnaireItem;
6
- qrItemOrItems: QuestionnaireResponseItem | QuestionnaireResponseItem[];
6
+ qrItemOrItems: QuestionnaireResponseItem | QuestionnaireResponseItem[] | undefined;
7
7
  groupCardElevation: number;
8
8
  }
9
9
  declare function GroupItemSwitcher(props: GroupItemSwitcherProps): React.JSX.Element | null;
@@ -15,17 +15,16 @@
15
15
  * limitations under the License.
16
16
  */
17
17
  import React from 'react';
18
- import { isSpecificItemControl } from '../../../utils';
18
+ import { isRepeatItemAndNotCheckbox, isSpecificItemControl } from '../../../utils';
19
19
  import GroupTable from '../Tables/GroupTable';
20
20
  import RepeatGroup from '../RepeatGroup/RepeatGroup';
21
- import { isRepeatItemAndNotCheckbox } from '../../../utils/qItem';
22
21
  import RepeatItem from '../RepeatItem/RepeatItem';
23
22
  import SingleItem from '../SingleItem/SingleItem';
24
23
  import useHidden from '../../../hooks/useHidden';
25
24
  import GroupItem from './GroupItem';
26
25
  import GridGroup from '../GridGroup/GridGroup';
27
26
  function GroupItemSwitcher(props) {
28
- const { qItem, qrItemOrItems, groupCardElevation, onQrItemChange, onQrRepeatGroupChange } = props;
27
+ const { qItem, qrItemOrItems, groupCardElevation, parentIsReadOnly, onQrItemChange, onQrRepeatGroupChange } = props;
29
28
  const itemIsHidden = useHidden(qItem);
30
29
  if (itemIsHidden) {
31
30
  return null;
@@ -40,15 +39,15 @@ function GroupItemSwitcher(props) {
40
39
  return React.createElement(React.Fragment, null, "Something went wrong here");
41
40
  }
42
41
  if (isSpecificItemControl(qItem, 'gtable')) {
43
- return (React.createElement(GroupTable, { qItem: qItem, qrItems: qrItems, groupCardElevation: groupCardElevation + 1, onQrRepeatGroupChange: onQrRepeatGroupChange }));
42
+ return (React.createElement(GroupTable, { qItem: qItem, qrItems: qrItems, groupCardElevation: groupCardElevation + 1, parentIsReadOnly: parentIsReadOnly, onQrRepeatGroupChange: onQrRepeatGroupChange }));
44
43
  }
45
- return (React.createElement(RepeatGroup, { qItem: qItem, qrItems: qrItems, groupCardElevation: groupCardElevation + 1, onQrRepeatGroupChange: onQrRepeatGroupChange }));
44
+ return (React.createElement(RepeatGroup, { qItem: qItem, qrItems: qrItems, groupCardElevation: groupCardElevation + 1, parentIsReadOnly: parentIsReadOnly, onQrRepeatGroupChange: onQrRepeatGroupChange }));
46
45
  }
47
46
  // If there is only one answer
48
47
  const qrItem = qrItemOrItems;
49
48
  const itemIsGrid = isSpecificItemControl(qItem, 'grid');
50
49
  if (itemIsGrid) {
51
- return (React.createElement(GridGroup, { qItem: qItem, qrItem: qrItem, groupCardElevation: groupCardElevation, onQrItemChange: onQrItemChange }));
50
+ return (React.createElement(GridGroup, { qItem: qItem, qrItem: qrItem !== null && qrItem !== void 0 ? qrItem : null, groupCardElevation: groupCardElevation, parentIsReadOnly: parentIsReadOnly, onQrItemChange: onQrItemChange }));
52
51
  }
53
52
  const itemRepeatsAndIsNotCheckbox = isRepeatItemAndNotCheckbox(qItem);
54
53
  if (itemRepeatsAndIsNotCheckbox) {
@@ -56,18 +55,18 @@ function GroupItemSwitcher(props) {
56
55
  // If qItem is RepeatGroup or a groupTable item in this decision branch,
57
56
  // their qrItem array should always be empty
58
57
  if (isSpecificItemControl(qItem, 'gtable')) {
59
- return (React.createElement(GroupTable, { qItem: qItem, qrItems: [], groupCardElevation: groupCardElevation + 1, onQrRepeatGroupChange: onQrRepeatGroupChange }));
58
+ return (React.createElement(GroupTable, { qItem: qItem, qrItems: [], groupCardElevation: groupCardElevation + 1, parentIsReadOnly: parentIsReadOnly, onQrRepeatGroupChange: onQrRepeatGroupChange }));
60
59
  }
61
- return (React.createElement(RepeatGroup, { qItem: qItem, qrItems: [], groupCardElevation: groupCardElevation + 1, onQrRepeatGroupChange: onQrRepeatGroupChange }));
60
+ return (React.createElement(RepeatGroup, { qItem: qItem, qrItems: [], groupCardElevation: groupCardElevation + 1, parentIsReadOnly: parentIsReadOnly, onQrRepeatGroupChange: onQrRepeatGroupChange }));
62
61
  }
63
- return React.createElement(RepeatItem, { qItem: qItem, qrItem: qrItem, onQrItemChange: onQrItemChange });
62
+ return (React.createElement(RepeatItem, { qItem: qItem, qrItem: qrItem !== null && qrItem !== void 0 ? qrItem : null, parentIsReadOnly: parentIsReadOnly, onQrItemChange: onQrItemChange }));
64
63
  }
65
64
  // if qItem is not a repeating question or is a checkbox
66
65
  if (qItem.type === 'group') {
67
- return (React.createElement(GroupItem, { qItem: qItem, qrItem: qrItem, isRepeated: false, groupCardElevation: groupCardElevation + 1, onQrItemChange: onQrItemChange }));
66
+ return (React.createElement(GroupItem, { qItem: qItem, qrItem: qrItem !== null && qrItem !== void 0 ? qrItem : null, isRepeated: false, groupCardElevation: groupCardElevation + 1, parentIsReadOnly: parentIsReadOnly, onQrItemChange: onQrItemChange }));
68
67
  }
69
- // Defaults to a normal QItemSwitcher
70
- return (React.createElement(SingleItem, { qItem: qItem, qrItem: qrItem, isRepeated: false, isTabled: false, onQrItemChange: onQrItemChange }));
68
+ // Defaults to a single, non-group item
69
+ return (React.createElement(SingleItem, { qItem: qItem, qrItem: qrItem !== null && qrItem !== void 0 ? qrItem : null, isRepeated: false, isTabled: false, parentIsReadOnly: parentIsReadOnly, onQrItemChange: onQrItemChange }));
71
70
  }
72
71
  export default GroupItemSwitcher;
73
72
  //# sourceMappingURL=GroupItemSwitcher.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"GroupItemSwitcher.js","sourceRoot":"","sources":["../../../../src/components/FormComponents/GroupItem/GroupItemSwitcher.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAEH,OAAO,KAAK,MAAM,OAAO,CAAC;AAM1B,OAAO,EAAE,qBAAqB,EAAE,MAAM,gBAAgB,CAAC;AACvD,OAAO,UAAU,MAAM,sBAAsB,CAAC;AAC9C,OAAO,WAAW,MAAM,4BAA4B,CAAC;AACrD,OAAO,EAAE,0BAA0B,EAAE,MAAM,sBAAsB,CAAC;AAClE,OAAO,UAAU,MAAM,0BAA0B,CAAC;AAClD,OAAO,UAAU,MAAM,0BAA0B,CAAC;AAClD,OAAO,SAAS,MAAM,0BAA0B,CAAC;AACjD,OAAO,SAAS,MAAM,aAAa,CAAC;AACpC,OAAO,SAAS,MAAM,wBAAwB,CAAC;AAU/C,SAAS,iBAAiB,CAAC,KAA6B;IACtD,MAAM,EAAE,KAAK,EAAE,aAAa,EAAE,kBAAkB,EAAE,cAAc,EAAE,qBAAqB,EAAE,GAAG,KAAK,CAAC;IAElG,MAAM,YAAY,GAAG,SAAS,CAAC,KAAK,CAAC,CAAC;IACtC,IAAI,YAAY,EAAE;QAChB,OAAO,IAAI,CAAC;KACb;IAED,gCAAgC;IAChC,MAAM,kBAAkB,GAAG,KAAK,CAAC,OAAO,CAAC,aAAa,CAAC,CAAC;IACxD,IAAI,kBAAkB,EAAE;QACtB,MAAM,O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AC5C,CACH,CAAC;aACH;YAED,OAAO,CACL,oBAAC,WAAW,IACV,KAAK,EAAE,KAAK,EACZ,OAAO,EAAE,EAAE,EACX,kBAAkB,EAAE,kBAAkB,GAAG,CAAC,EAC1C,qBAAqB,EAAE,qBAAqB,GAC5C,CACH,CAAC;SACH;QAED,OAAO,oBAAC,UAAU,IAAC,KAAK,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,cAAc,EAAE,cAAc,GAAI,CAAC;KACrF;IAED,wDAAwD;IACxD,IAAI,KAAK,CAAC,IAAI,KAAK,OAAO,EAAE;QAC1B,OAAO,CACL,oBAAC,SAAS,IACR,KAAK,EAAE,KAAK,EACZ,MAAM,EAAE,MAAM,EACd,UAAU,EAAE,KAAK,EACjB,kBAAkB,EAAE,kBAAkB,GAAG,CAAC,EAC1C,cAAc,EAAE,cAAc,GAC9B,CACH,CAAC;KACH;IAED,qCAAqC;IACrC,OAAO,CACL,oBAAC,UAAU,IACT,KAAK,EAAE,KAAK,EACZ,MAAM,EAAE,MAAM,EACd,UAAU,EAAE,KAAK,EACjB,QAAQ,EAAE,KAAK,EACf,cAAc,EAAE,cAAc,GAC9B,CACH,CAAC;AACJ,CAAC;AAED,eAAe,iBAAiB,CAAC"}
1
+ {"version":3,"file":"GroupItemSwitcher.js","sourceRoot":"","sources":["../../../../src/components/FormComponents/GroupItem/GroupItemSwitcher.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAEH,OAAO,KAAK,MAAM,OAAO,CAAC;AAO1B,OAAO,EAAE,0BAA0B,EAAE,qBAAqB,EAAE,MAAM,gBAAgB,CAAC;AACnF,OAAO,UAAU,MAAM,sBAAsB,CAAC;AAC9C,OAAO,WAAW,MAAM,4BAA4B,CAAC;AACrD,OAAO,UAAU,MAAM,0BAA0B,CAAC;AAClD,OAAO,UAAU,MAAM,0BAA0B,CAAC;AAClD,OAAO,SAAS,MAAM,0BAA0B,CAAC;AACjD,OAAO,SAAS,MAAM,a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gBAAgB,EAAE,gBAAgB,EAClC,cAAc,EAAE,cAAc,GAC9B,CACH,CAAC;KACH;IAED,uCAAuC;IACvC,OAAO,CACL,oBAAC,UAAU,IACT,KAAK,EAAE,KAAK,EACZ,MAAM,EAAE,MAAM,aAAN,MAAM,cAAN,MAAM,GAAI,IAAI,EACtB,UAAU,EAAE,KAAK,EACjB,QAAQ,EAAE,KAAK,EACf,gBAAgB,EAAE,gBAAgB,EAClC,cAAc,EAAE,cAAc,GAC9B,CACH,CAAC;AACJ,CAAC;AAED,eAAe,iBAAiB,CAAC"}
@@ -1,9 +1,9 @@
1
1
  import React from 'react';
2
- import type { PropsWithIsRepeatedAttribute, PropsWithIsTabledAttribute, PropsWithQrItemChangeHandler } from '../../../interfaces/renderProps.interface';
2
+ import type { PropsWithIsRepeatedAttribute, PropsWithIsTabledAttribute, PropsWithParentIsReadOnlyAttribute, PropsWithQrItemChangeHandler } from '../../../interfaces/renderProps.interface';
3
3
  import type { QuestionnaireItem, QuestionnaireResponseItem } from 'fhir/r4';
4
- interface IntegerItemProps extends PropsWithQrItemChangeHandler<QuestionnaireResponseItem>, PropsWithIsRepeatedAttribute, PropsWithIsTabledAttribute {
4
+ interface IntegerItemProps extends PropsWithQrItemChangeHandler, PropsWithIsRepeatedAttribute, PropsWithIsTabledAttribute, PropsWithParentIsReadOnlyAttribute {
5
5
  qItem: QuestionnaireItem;
6
- qrItem: QuestionnaireResponseItem;
6
+ qrItem: QuestionnaireResponseItem | null;
7
7
  }
8
8
  declare function IntegerItem(props: IntegerItemProps): React.JSX.Element;
9
9
  export default IntegerItem;
@@ -18,7 +18,7 @@ import React, { useCallback } from 'react';
18
18
  import useRenderingExtensions from '../../../hooks/useRenderingExtensions';
19
19
  import useValidationError from '../../../hooks/useValidationError';
20
20
  import debounce from 'lodash.debounce';
21
- import { createEmptyQrItemWithUnit } from '../../../utils/qrItem';
21
+ import { createEmptyQrItem } from '../../../utils/qrItem';
22
22
  import { DEBOUNCE_DURATION } from '../../../utils/debounce';
23
23
  import { FullWidthFormComponentBox } from '../../Box.styles';
24
24
  import IntegerField from './IntegerField';
@@ -26,10 +26,11 @@ import useIntegerCalculatedExpression from '../../../hooks/useIntegerCalculatedE
26
26
  import { parseValidInteger } from '../../../utils/parseInputs';
27
27
  import ItemFieldGrid from '../ItemParts/ItemFieldGrid';
28
28
  import useNumberInput from '../../../hooks/useNumberInput';
29
+ import useReadOnly from '../../../hooks/useReadOnly';
29
30
  function IntegerItem(props) {
30
- const { qItem, qrItem, isRepeated, isTabled, onQrItemChange } = props;
31
- // Get additional rendering extensions
32
- const { displayUnit, displayPrompt, displayInstructions, readOnly, entryFormat, regexValidation, maxLength } = useRenderingExtensions(qItem);
31
+ const { qItem, qrItem, isRepeated, isTabled, parentIsReadOnly, onQrItemChange } = props;
32
+ const readOnly = useReadOnly(qItem, parentIsReadOnly);
33
+ const { displayUnit, displayPrompt, displayInstructions, entryFormat, regexValidation, maxLength } = useRenderingExtensions(qItem);
33
34
  // Init input value
34
35
  let valueInteger = 0;
35
36
  if (qrItem === null || qrItem === void 0 ? void 0 : qrItem.answer) {
@@ -47,7 +48,6 @@ function IntegerItem(props) {
47
48
  const { calcExpUpdated } = useIntegerCalculatedExpression({
48
49
  qItem: qItem,
49
50
  inputValue: value,
50
- displayUnit: displayUnit,
51
51
  setInputValue: (newValue) => {
52
52
  setValue(newValue);
53
53
  },
@@ -61,13 +61,13 @@ function IntegerItem(props) {
61
61
  }
62
62
  // eslint-disable-next-line react-hooks/exhaustive-deps
63
63
  const updateQrItemWithDebounce = useCallback(debounce((newValue) => {
64
- onQrItemChange(Object.assign(Object.assign({}, createEmptyQrItemWithUnit(qItem, displayUnit)), { answer: [{ valueInteger: newValue }] }));
64
+ onQrItemChange(Object.assign(Object.assign({}, createEmptyQrItem(qItem)), { answer: [{ valueInteger: newValue }] }));
65
65
  }, DEBOUNCE_DURATION), [onQrItemChange, qItem, displayUnit]); // Dependencies are tested, debounce is causing eslint to not recognise dependencies
66
66
  if (isRepeated) {
67
67
  return (React.createElement(IntegerField, { linkId: qItem.linkId, value: value, feedback: feedback, displayPrompt: displayPrompt, displayUnit: displayUnit, entryFormat: entryFormat, readOnly: readOnly, calcExpUpdated: calcExpUpdated, isTabled: isTabled, onInputChange: handleInputChange }));
68
68
  }
69
69
  return (React.createElement(FullWidthFormComponentBox, { "data-test": "q-item-integer-box" },
70
- React.createElement(ItemFieldGrid, { qItem: qItem, displayInstructions: displayInstructions },
70
+ React.createElement(ItemFieldGrid, { qItem: qItem, displayInstructions: displayInstructions, readOnly: readOnly },
71
71
  React.createElement(IntegerField, { linkId: qItem.linkId, value: value, feedback: feedback, displayPrompt: displayPrompt, displayUnit: displayUnit, entryFormat: entryFormat, readOnly: readOnly, calcExpUpdated: calcExpUpdated, isTabled: isTabled, onInputChange: handleInputChange }))));
72
72
  }
73
73
  export default IntegerItem;
@@ -1 +1 @@
1
- {"version":3,"file":"IntegerItem.js","sourceRoot":"","sources":["../../../../src/components/FormComponents/IntegerItem/IntegerItem.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAEH,OAAO,KAAK,EAAE,EAAE,WAAW,EAAE,MAAM,OAAO,CAAC;AAO3C,OAAO,sBAAsB,MAAM,uCAAuC,CAAC;AAC3E,OAAO,kBAAkB,MAAM,mCAAmC,CAAC;AACnE,OAAO,QAAQ,MAAM,iBAAiB,CAAC;AACvC,OAAO,EAAE,yBAAyB,EAAE,MAAM,uBAAuB,CAAC;AAClE,OAAO,EAAE,iBAAiB,EAAE,MAAM,yBAAyB,CAAC;AAC5D,OAAO,EAAE,yBAAyB,EAAE,MAAM,kBAAkB,CAAC;AAC7D,OAAO,YAAY,MAAM,gBAAgB,CAAC;AAC1C,OAAO,8BAA8B,MAAM,+CAA+C,CAAC;AAC3F,OAAO,EAAE,iBAAiB,EAAE,MAAM,4BAA4B,CAAC;AAC/D,OAAO,aAAa,MAAM,4BAA4B,CAAC;AACvD,OAAO,cAAc,MAAM,+BAA+B,C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,EAAE,QAAQ,EAAE,CAAC,IACpC,CAAC;IACL,CAAC,EAAE,iBAAiB,CAAC,EACrB,CAAC,cAAc,EAAE,KAAK,EAAE,WAAW,CAAC,CACrC,CAAC,CAAC,oFAAoF;IAEvF,IAAI,UAAU,EAAE;QACd,OAAO,CACL,oBAAC,YAAY,IACX,MAAM,EAAE,KAAK,CAAC,MAAM,EACpB,KAAK,EAAE,KAAK,EACZ,QAAQ,EAAE,QAAQ,EAClB,aAAa,EAAE,aAAa,EAC5B,WAAW,EAAE,WAAW,EACxB,WAAW,EAAE,WAAW,EACxB,QAAQ,EAAE,QAAQ,EAClB,cAAc,EAAE,cAAc,EAC9B,QAAQ,EAAE,QAAQ,EAClB,aAAa,EAAE,iBAAiB,GAChC,CACH,CAAC;KACH;IAED,OAAO,CACL,oBAAC,yBAAyB,iBAAW,oBAAoB;QACvD,oBAAC,aAAa,IAAC,KAAK,EAAE,KAAK,EAAE,mBAAmB,EAAE,mBAAmB,EAAE,QAAQ,EAAE,QAAQ;YACvF,oBAAC,YAAY,IACX,MAAM,EAAE,KAAK,CAAC,MAAM,EACpB,KAAK,EAAE,KAAK,EACZ,QAAQ,EAAE,QAAQ,EAClB,aAAa,EAAE,aAAa,EAC5B,WAAW,EAAE,WAAW,EACxB,WAAW,EAAE,WAAW,EACxB,QAAQ,EAAE,QAAQ,EAClB,cAAc,EAAE,cAAc,EAC9B,QAAQ,EAAE,QAAQ,EAClB,aAAa,EAAE,iBAAiB,GAChC,CACY,CACU,CAC7B,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 IntegerItemProps extends PropsWithQrItemChangeHandler<QuestionnaireResponseItem>, PropsWithIsRepeatedAttribute, PropsWithIsTabledAttribute, PropsWithParentIsReadOnlyAttribute {
5
+ qItem: QuestionnaireItem;
6
+ qrItem: QuestionnaireResponseItem;
7
+ }
8
+ declare function IntegerItem(props: IntegerItemProps): React.JSX.Element;
9
+ export default IntegerItem;
@@ -0,0 +1,75 @@
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, { useCallback } from 'react';
18
+ import useRenderingExtensions from '../../../hooks/useRenderingExtensions';
19
+ import useValidationError from '../../../hooks/useValidationError';
20
+ import debounce from 'lodash.debounce';
21
+ import { createEmptyQrItemWithUnit } from '../../../utils/qrItem';
22
+ import { DEBOUNCE_DURATION } from '../../../utils/debounce';
23
+ import { FullWidthFormComponentBox } from '../../Box.styles';
24
+ import IntegerField from './IntegerField';
25
+ import useIntegerCalculatedExpression from '../../../hooks/useIntegerCalculatedExpression';
26
+ import { parseValidInteger } from '../../../utils/parseInputs';
27
+ import ItemFieldGrid from '../ItemParts/ItemFieldGrid';
28
+ import useNumberInput from '../../../hooks/useNumberInput';
29
+ import useReadOnly from '../../../hooks/useReadOnly';
30
+ function IntegerItem(props) {
31
+ const { qItem, qrItem, isRepeated, isTabled, parentIsReadOnly, onQrItemChange } = props;
32
+ const readOnly = useReadOnly(qItem, parentIsReadOnly);
33
+ const { displayUnit, displayPrompt, displayInstructions, entryFormat, regexValidation, maxLength } = useRenderingExtensions(qItem);
34
+ // Init input value
35
+ let valueInteger = 0;
36
+ if (qrItem === null || qrItem === void 0 ? void 0 : qrItem.answer) {
37
+ if (qrItem === null || qrItem === void 0 ? void 0 : qrItem.answer[0].valueInteger) {
38
+ valueInteger = qrItem.answer[0].valueInteger;
39
+ }
40
+ if (qrItem === null || qrItem === void 0 ? void 0 : qrItem.answer[0].valueDecimal) {
41
+ valueInteger = Math.round(qrItem.answer[0].valueDecimal);
42
+ }
43
+ }
44
+ const [value, setValue] = useNumberInput(valueInteger);
45
+ // Perform validation checks
46
+ const feedback = useValidationError(value.toString(), regexValidation, maxLength);
47
+ // Process calculated expressions
48
+ const { calcExpUpdated } = useIntegerCalculatedExpression({
49
+ qItem: qItem,
50
+ inputValue: value,
51
+ displayUnit: displayUnit,
52
+ setInputValue: (newValue) => {
53
+ setValue(newValue);
54
+ },
55
+ onQrItemChange: onQrItemChange
56
+ });
57
+ // Event handlers
58
+ function handleInputChange(newInput) {
59
+ const newValue = parseValidInteger(newInput);
60
+ setValue(newValue);
61
+ updateQrItemWithDebounce(newValue);
62
+ }
63
+ // eslint-disable-next-line react-hooks/exhaustive-deps
64
+ const updateQrItemWithDebounce = useCallback(debounce((newValue) => {
65
+ onQrItemChange(Object.assign(Object.assign({}, createEmptyQrItemWithUnit(qItem, displayUnit)), { answer: [{ valueInteger: newValue }] }));
66
+ }, DEBOUNCE_DURATION), [onQrItemChange, qItem, displayUnit]); // Dependencies are tested, debounce is causing eslint to not recognise dependencies
67
+ if (isRepeated) {
68
+ return (React.createElement(IntegerField, { linkId: qItem.linkId, value: value, feedback: feedback, displayPrompt: displayPrompt, displayUnit: displayUnit, entryFormat: entryFormat, readOnly: readOnly, calcExpUpdated: calcExpUpdated, isTabled: isTabled, onInputChange: handleInputChange }));
69
+ }
70
+ return (React.createElement(FullWidthFormComponentBox, { "data-test": "q-item-integer-box" },
71
+ React.createElement(ItemFieldGrid, { qItem: qItem, displayInstructions: displayInstructions, readOnly: readOnly },
72
+ React.createElement(IntegerField, { linkId: qItem.linkId, value: value, feedback: feedback, displayPrompt: displayPrompt, displayUnit: displayUnit, entryFormat: entryFormat, readOnly: readOnly, calcExpUpdated: calcExpUpdated, isTabled: isTabled, onInputChange: handleInputChange }))));
73
+ }
74
+ export default IntegerItem;
75
+ //# sourceMappingURL=SliderItem.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"SliderItem.js","sourceRoot":"","sources":["../../../../src/components/FormComponents/IntegerItem/SliderItem.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAEH,OAAO,KAAK,EAAE,EAAE,WAAW,EAAE,MAAM,OAAO,CAAC;AAQ3C,OAAO,sBAAsB,MAAM,uCAAuC,CAAC;AAC3E,OAAO,kBAAkB,MAAM,mCAAmC,CAAC;AACnE,OAAO,QAAQ,MAAM,iBAAiB,CAAC;AACvC,OAAO,EAAE,yBAAyB,EAAE,MAAM,uBAAuB,CAAC;AAClE,OAAO,EAAE,iBAAiB,EAAE,MAAM,yBAAyB,CAAC;AAC5D,OAAO,EAAE,yBAAyB,EAAE,MAAM,kBAAkB,CAAC;AAC7D,OAAO,YAAY,MAAM,gBAAgB,CAAC;AAC1C,OAAO,8BAA8B,MAAM,+CAA+C,CAAC;AAC3F,OAAO,EAAE,iBAAiB,EAAE,MAAM,4BAA4B,CAAC;AAC/D,OAAO,aAAa,MAAM,4BAA4B,CAAC;AACvD,OAAO,cAAc,MAAM,+BAA+B,CAAC;AAC3D,OAAO,WAAW,MAAM,4BAA4B,CAAC;AAWrD,SAAS,WAAW,CAAC,KAAuB;IAC1C,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,EACJ,WAAW,EACX,aAAa,EACb,mBAAmB,EACnB,WAAW,EACX,eAAe,EACf,SAAS,EACV,GAAG,sB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,CAAC,CAAC,QAAgB,EAAE,EAAE;QAC5B,cAAc,iCACT,yBAAyB,CAAC,KAAK,EAAE,WAAW,CAAC,KAChD,MAAM,EAAE,CAAC,EAAE,YAAY,EAAE,QAAQ,EAAE,CAAC,IACpC,CAAC;IACL,CAAC,EAAE,iBAAiB,CAAC,EACrB,CAAC,cAAc,EAAE,KAAK,EAAE,WAAW,CAAC,CACrC,CAAC,CAAC,oFAAoF;IAEvF,IAAI,UAAU,EAAE;QACd,OAAO,CACL,oBAAC,YAAY,IACX,MAAM,EAAE,KAAK,CAAC,MAAM,EACpB,KAAK,EAAE,KAAK,EACZ,QAAQ,EAAE,QAAQ,EAClB,aAAa,EAAE,aAAa,EAC5B,WAAW,EAAE,WAAW,EACxB,WAAW,EAAE,WAAW,EACxB,QAAQ,EAAE,QAAQ,EAClB,cAAc,EAAE,cAAc,EAC9B,QAAQ,EAAE,QAAQ,EAClB,aAAa,EAAE,iBAAiB,GAChC,CACH,CAAC;KACH;IAED,OAAO,CACL,oBAAC,yBAAyB,iBAAW,oBAAoB;QACvD,oBAAC,aAAa,IAAC,KAAK,EAAE,KAAK,EAAE,mBAAmB,EAAE,mBAAmB,EAAE,QAAQ,EAAE,QAAQ;YACvF,oBAAC,YAAY,IACX,MAAM,EAAE,KAAK,CAAC,MAAM,EACpB,KAAK,EAAE,KAAK,EACZ,QAAQ,EAAE,QAAQ,EAClB,aAAa,EAAE,aAAa,EAC5B,WAAW,EAAE,WAAW,EACxB,WAAW,EAAE,WAAW,EACxB,QAAQ,EAAE,QAAQ,EAClB,cAAc,EAAE,cAAc,EAC9B,QAAQ,EAAE,QAAQ,EAClB,aAAa,EAAE,iBAAiB,GAChC,CACY,CACU,CAC7B,CAAC;AACJ,CAAC;AAED,eAAe,WAAW,CAAC"}
@@ -1,6 +1,2 @@
1
- /// <reference types="react" />
2
1
  export declare const StyledFormGroup: import("@emotion/styled").StyledComponent<import("@mui/material/FormGroup").FormGroupProps & import("@mui/system").MUIStyledCommonProps<import("@mui/material/styles").Theme>, {}, {}>;
3
2
  export declare const StyledRadioGroup: import("@emotion/styled").StyledComponent<import("@mui/material/RadioGroup").RadioGroupProps & import("@mui/system").MUIStyledCommonProps<import("@mui/material/styles").Theme>, {}, {}>;
4
- export declare const QItemTypography: import("@emotion/styled").StyledComponent<import("@mui/material/Typography").TypographyOwnProps & import("@mui/material/OverridableComponent").CommonProps & Omit<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, "ref"> & {
5
- ref?: ((instance: HTMLSpanElement | null) => void) | import("react").RefObject<HTMLSpanElement> | null | undefined;
6
- }, "display" | "border" | "borderTop" | "borderRight" | "borderBottom" | "borderLeft" | "borderColor" | "borderRadius" | "displayPrint" | "overflow" | "textOverflow" | "visibility" | "whiteSpace" | "flexBasis" | "flexDirection" | "flexWrap" | "justifyContent" | "alignItems" | "alignContent" | "order" | "flex" | "flexGrow" | "flexShrink" | "alignSelf" | "justifyItems" | "justifySelf" | "gap" | "columnGap" | "rowGap" | "gridColumn" | "gridRow" | "gridAutoFlow" | "gridAutoColumns" | "gridAutoRows" | "gridTemplateColumns" | "gridTemplateRows" | "gridTemplateAreas" | "gridArea" | "bgcolor" | "color" | "zIndex" | "position" | "top" | "right" | "bottom" | "left" | "boxShadow" | "width" | "maxWidth" | "minWidth" | "height" | "maxHeight" | "minHeight" | "boxSizing" | "m" | "mt" | "mr" | "mb" | "ml" | "mx" | "my" | "p" | "pt" | "pr" | "pb" | "pl" | "px" | "py" | "margin" | "marginTop" | "marginRight" | "marginBottom" | "marginLeft" | "marginX" | "marginY" | "padding" | "paddingTop" | "paddingRight" | "paddingBottom" | "paddingLeft" | "paddingX" | "paddingY" | "typography" | "fontFamily" | "fontSize" | "fontStyle" | "fontWeight" | "letterSpacing" | "lineHeight" | "textAlign" | "textTransform" | "style" | "className" | "children" | "sx" | "classes" | "align" | "gutterBottom" | "noWrap" | "paragraph" | "variant" | "variantMapping"> & import("@mui/system").MUIStyledCommonProps<import("@mui/material/styles").Theme>, {}, {}>;
@@ -16,7 +16,6 @@
16
16
  */
17
17
  import FormGroup from '@mui/material/FormGroup';
18
18
  import RadioGroup from '@mui/material/RadioGroup';
19
- import Typography from '@mui/material/Typography';
20
19
  import { styled } from '@mui/material/styles';
21
20
  export const StyledFormGroup = styled(FormGroup)(() => ({
22
21
  marginBottom: 4
@@ -24,7 +23,4 @@ export const StyledFormGroup = styled(FormGroup)(() => ({
24
23
  export const StyledRadioGroup = styled(RadioGroup)(() => ({
25
24
  marginBottom: 4
26
25
  }));
27
- export const QItemTypography = styled(Typography)(() => ({
28
- marginTop: 4
29
- }));
30
26
  //# sourceMappingURL=Item.styles.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"Item.styles.js","sourceRoot":"","sources":["../../../src/components/FormComponents/Item.styles.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAEH,OAAO,SAAS,MAAM,yBAAyB,CAAC;AAChD,OAAO,UAAU,MAAM,0BAA0B,CAAC;AAClD,OAAO,UAAU,MAAM,0BAA0B,CAAC;AAClD,OAAO,EAAE,MAAM,EAAE,MAAM,sBAAsB,CAAC;AAE9C,MAAM,CAAC,MAAM,eAAe,GAAG,MAAM,CAAC,SAAS,CAAC,CAAC,GAAG,EAAE,CAAC,CAAC;IACtD,YAAY,EAAE,CAAC;CAChB,CAAC,CAAC,CAAC;AAEJ,MAAM,CAAC,MAAM,gBAAgB,GAAG,MAAM,CAAC,UAAU,CAAC,CAAC,GAAG,EAAE,CAAC,CAAC;IACxD,YAAY,EAAE,CAAC;CAChB,CAAC,CAAC,CAAC;AAEJ,MAAM,CAAC,MAAM,eAAe,GAAG,MAAM,CAAC,UAAU,CAAC,CAAC,GAAG,EAAE,CAAC,CAAC;IACvD,SAAS,EAAE,CAAC;CACb,CAAC,CAAC,CAAC"}
1
+ {"version":3,"file":"Item.styles.js","sourceRoot":"","sources":["../../../src/components/FormComponents/Item.styles.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAEH,OAAO,SAAS,MAAM,yBAAyB,CAAC;AAChD,OAAO,UAAU,MAAM,0BAA0B,CAAC;AAClD,OAAO,EAAE,MAAM,EAAE,MAAM,sBAAsB,CAAC;AAE9C,MAAM,CAAC,MAAM,eAAe,GAAG,MAAM,CAAC,SAAS,CAAC,CAAC,GAAG,EAAE,CAAC,CAAC;IACtD,YAAY,EAAE,CAAC;CAChB,CAAC,CAAC,CAAC;AAEJ,MAAM,CAAC,MAAM,gBAAgB,GAAG,MAAM,CAAC,UAAU,CAAC,CAAC,GAAG,EAAE,CAAC,CAAC;IACxD,YAAY,EAAE,CAAC;CAChB,CAAC,CAAC,CAAC"}
@@ -16,11 +16,11 @@
16
16
  */
17
17
  import React from 'react';
18
18
  import Fade from '@mui/material/Fade';
19
- import CheckIcon from '@mui/icons-material/Check';
19
+ import SyncIcon from '@mui/icons-material/Sync';
20
20
  function FadingCheckIcon(props) {
21
21
  const { fadeIn } = props;
22
22
  return (React.createElement(Fade, { in: fadeIn, timeout: { enter: 100, exit: 300 } },
23
- React.createElement(CheckIcon, { color: "success", fontSize: "small" })));
23
+ React.createElement(SyncIcon, { color: "success", fontSize: "small" })));
24
24
  }
25
25
  export default FadingCheckIcon;
26
26
  //# sourceMappingURL=FadingCheckIcon.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"FadingCheckIcon.js","sourceRoot":"","sources":["../../../../src/components/FormComponents/ItemParts/FadingCheckIcon.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAEH,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,IAAI,MAAM,oBAAoB,CAAC;AACtC,OAAO,SAAS,MAAM,2BAA2B,CAAC;AAMlD,SAAS,eAAe,CAAC,KAA2B;IAClD,MAAM,EAAE,MAAM,EAAE,GAAG,KAAK,CAAC;IAEzB,OAAO,CACL,oBAAC,IAAI,IAAC,EAAE,EAAE,MAAM,EAAE,OAAO,EAAE,EAAE,KAAK,EAAE,GAAG,EAAE,IAAI,EAAE,GAAG,EAAE;QAClD,oBAAC,SAAS,IAAC,KAAK,EAAC,SAAS,EAAC,QAAQ,EAAC,OAAO,GAAG,CACzC,CACR,CAAC;AACJ,CAAC;AAED,eAAe,eAAe,CAAC"}
1
+ {"version":3,"file":"FadingCheckIcon.js","sourceRoot":"","sources":["../../../../src/components/FormComponents/ItemParts/FadingCheckIcon.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAEH,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,IAAI,MAAM,oBAAoB,CAAC;AACtC,OAAO,QAAQ,MAAM,0BAA0B,CAAC;AAMhD,SAAS,eAAe,CAAC,KAA2B;IAClD,MAAM,EAAE,MAAM,EAAE,GAAG,KAAK,CAAC;IAEzB,OAAO,CACL,oBAAC,IAAI,IAAC,EAAE,EAAE,MAAM,EAAE,OAAO,EAAE,EAAE,KAAK,EAAE,GAAG,EAAE,IAAI,EAAE,GAAG,EAAE;QAClD,oBAAC,QAAQ,IAAC,KAAK,EAAC,SAAS,EAAC,QAAQ,EAAC,OAAO,GAAG,CACxC,CACR,CAAC;AACJ,CAAC;AAED,eAAe,eAAe,CAAC"}
@@ -1,10 +1,11 @@
1
- import type { ReactNode } from 'react';
1
+ import type { ReactElement, ReactNode } from 'react';
2
2
  import React from 'react';
3
3
  import type { QuestionnaireItem } from 'fhir/r4';
4
4
  interface ItemFieldGridProps {
5
5
  children: ReactNode;
6
6
  qItem: QuestionnaireItem;
7
- displayInstructions: string;
7
+ displayInstructions: string | ReactElement;
8
+ readOnly: boolean;
8
9
  }
9
10
  declare function ItemFieldGrid(props: ItemFieldGridProps): React.JSX.Element;
10
11
  export default ItemFieldGrid;
@@ -19,13 +19,13 @@ import Grid from '@mui/material/Grid';
19
19
  import DisplayInstructions from '../DisplayItem/DisplayInstructions';
20
20
  import LabelWrapper from './ItemLabelWrapper';
21
21
  function ItemFieldGrid(props) {
22
- const { children, qItem, displayInstructions } = props;
22
+ const { children, qItem, displayInstructions, readOnly } = props;
23
23
  return (React.createElement(Grid, { container: true, columnSpacing: 6 },
24
24
  React.createElement(Grid, { item: true, xs: 5 },
25
- React.createElement(LabelWrapper, { qItem: qItem })),
25
+ React.createElement(LabelWrapper, { qItem: qItem, readOnly: readOnly })),
26
26
  React.createElement(Grid, { item: true, xs: 7 },
27
27
  children,
28
- React.createElement(DisplayInstructions, { displayInstructions: displayInstructions }))));
28
+ React.createElement(DisplayInstructions, { displayInstructions: displayInstructions, readOnly: readOnly }))));
29
29
  }
30
30
  export default ItemFieldGrid;
31
31
  //# sourceMappingURL=ItemFieldGrid.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"ItemFieldGrid.js","sourceRoot":"","sources":["../../../../src/components/FormComponents/ItemParts/ItemFieldGrid.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAGH,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,IAAI,MAAM,oBAAoB,CAAC;AAEtC,OAAO,mBAAmB,MAAM,oCAAoC,CAAC;AACrE,OAAO,YAAY,MAAM,oBAAoB,CAAC;AAQ9C,SAAS,aAAa,CAAC,KAAyB;IAC9C,MAAM,EAAE,QAAQ,EAAE,KAAK,EAAE,mBAAmB,EAAE,GAAG,KAAK,CAAC;IAEvD,OAAO,CACL,oBAAC,IAAI,IAAC,SAAS,QAAC,aAAa,EAAE,CAAC;QAC9B,oBAAC,IAAI,IAAC,IAAI,QAAC,EAAE,EAAE,CAAC;YACd,oBAAC,YAAY,IAAC,KAAK,EAAE,KAAK,GAAI,CACzB;QACP,oBAAC,IAAI,IAAC,IAAI,QAAC,EAAE,EAAE,CAAC;YACb,QAAQ;YACT,oBAAC,mBAAmB,IAAC,mBAAmB,EAAE,mBAAmB,GAAI,CAC5D,CACF,CACR,CAAC;AACJ,CAAC;AAED,eAAe,aAAa,CAAC"}
1
+ {"version":3,"file":"ItemFieldGrid.js","sourceRoot":"","sources":["../../../../src/components/FormComponents/ItemParts/ItemFieldGrid.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAGH,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,IAAI,MAAM,oBAAoB,CAAC;AAEtC,OAAO,mBAAmB,MAAM,oCAAoC,CAAC;AACrE,OAAO,YAAY,MAAM,oBAAoB,CAAC;AAS9C,SAAS,aAAa,CAAC,KAAyB;IAC9C,MAAM,EAAE,QAAQ,EAAE,KAAK,EAAE,mBAAmB,EAAE,QAAQ,EAAE,GAAG,KAAK,CAAC;IAEjE,OAAO,CACL,oBAAC,IAAI,IAAC,SAAS,QAAC,aAAa,EAAE,CAAC;QAC9B,oBAAC,IAAI,IAAC,IAAI,QAAC,EAAE,EAAE,CAAC;YACd,oBAAC,YAAY,IAAC,KAAK,EAAE,KAAK,EAAE,QAAQ,EAAE,QAAQ,GAAI,CAC7C;QACP,oBAAC,IAAI,IAAC,IAAI,QAAC,EAAE,EAAE,CAAC;YACb,QAAQ;YACT,oBAAC,mBAAmB,IAAC,mBAAmB,EAAE,mBAAmB,EAAE,QAAQ,EAAE,QAAQ,GAAI,CAChF,CACF,CACR,CAAC;AACJ,CAAC;AAED,eAAe,aAAa,CAAC"}
@@ -2,6 +2,7 @@ import React from 'react';
2
2
  import type { QuestionnaireItem } from 'fhir/r4';
3
3
  interface ItemLabelTextProps {
4
4
  qItem: QuestionnaireItem;
5
+ readOnly?: boolean;
5
6
  }
6
7
  declare const ItemLabelText: React.NamedExoticComponent<ItemLabelTextProps>;
7
8
  export default ItemLabelText;
@@ -16,12 +16,12 @@
16
16
  */
17
17
  import React, { memo } from 'react';
18
18
  import { getMarkdownString, getXHtmlString } from '../../../utils/itemControl';
19
- import { QItemTypography } from '../Item.styles';
20
19
  import parse from 'html-react-parser';
21
20
  import Box from '@mui/material/Box';
22
21
  import ReactMarkdown from 'react-markdown';
22
+ import Typography from '@mui/material/Typography';
23
23
  const ItemLabelText = memo(function ItemLabelText(props) {
24
- const { qItem } = props;
24
+ const { qItem, readOnly } = props;
25
25
  // parse xHTML if found
26
26
  const xHtmlString = getXHtmlString(qItem);
27
27
  if (xHtmlString) {
@@ -33,13 +33,11 @@ const ItemLabelText = memo(function ItemLabelText(props) {
33
33
  return (React.createElement(Box, null,
34
34
  React.createElement(ReactMarkdown, null, markdownString)));
35
35
  }
36
- // parse regular text
37
36
  if (qItem.type === 'group') {
38
37
  return React.createElement(React.Fragment, null, qItem.text);
39
38
  }
40
- else {
41
- return React.createElement(QItemTypography, null, qItem.text);
42
- }
39
+ // parse regular text
40
+ return (React.createElement(Typography, { color: readOnly ? 'text.secondary' : 'text.primary', sx: { mt: 0.5 } }, qItem.text));
43
41
  });
44
42
  export default ItemLabelText;
45
43
  //# sourceMappingURL=ItemLabelText.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"ItemLabelText.js","sourceRoot":"","sources":["../../../../src/components/FormComponents/ItemParts/ItemLabelText.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAEH,OAAO,KAAK,EAAE,EAAE,IAAI,EAAE,MAAM,OAAO,CAAC;AAEpC,OAAO,EAAE,iBAAiB,EAAE,cAAc,EAAE,MAAM,4BAA4B,CAAC;AAC/E,OAAO,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAC;AACjD,OAAO,KAAK,MAAM,mBAAmB,CAAC;AACtC,OAAO,GAAG,MAAM,mBAAmB,CAAC;AACpC,OAAO,aAAa,MAAM,gBAAgB,CAAC;AAM3C,MAAM,aAAa,GAAG,IAAI,CAAC,SAAS,aAAa,CAAC,KAAyB;IACzE,MAAM,EAAE,KAAK,EAAE,GAAG,KAAK,CAAC;IAExB,uBAAuB;IACvB,MAAM,WAAW,GAAG,cAAc,CAAC,KAAK,CAAC,CAAC;IAE1C,IAAI,WAAW,EAAE;QACf,OAAO,oBAAC,GAAG,QAAE,KAAK,CAAC,WAAW,CAAC,CAAO,CAAC;KACxC;IAED,uBAAuB;IACvB,MAAM,cAAc,GAAG,iBAAiB,CAAC,KAAK,CAAC,CAAC;IAChD,IAAI,cAAc,EAAE;QAClB,OAAO,CACL,oBAAC,GAAG;YACF,oBAAC,aAAa,QAAE,cAAc,CAAiB,CAC3C,CACP,CAAC;KACH;IAED,qBAAqB;IACrB,IAAI,KAAK,CAAC,IAAI,KAAK,OAAO,EAAE;QAC1B,OAAO,0CAAG,KAAK,CAAC,IAAI,CAAI,CAAC;KAC1B;SAAM;QACL,OAAO,oBAAC,eAAe,QAAE,KAAK,CAAC,IAAI,CAAmB,CAAC;KACxD;AACH,CAAC,CAAC,CAAC;AAEH,eAAe,aAAa,CAAC"}
1
+ {"version":3,"file":"ItemLabelText.js","sourceRoot":"","sources":["../../../../src/components/FormComponents/ItemParts/ItemLabelText.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAEH,OAAO,KAAK,EAAE,EAAE,IAAI,EAAE,MAAM,OAAO,CAAC;AAEpC,OAAO,EAAE,iBAAiB,EAAE,cAAc,EAAE,MAAM,4BAA4B,CAAC;AAC/E,OAAO,KAAK,MAAM,mBAAmB,CAAC;AACtC,OAAO,GAAG,MAAM,mBAAmB,CAAC;AACpC,OAAO,aAAa,MAAM,gBAAgB,CAAC;AAC3C,OAAO,UAAU,MAAM,0BAA0B,CAAC;AAOlD,MAAM,aAAa,GAAG,IAAI,CAAC,SAAS,aAAa,CAAC,KAAyB;IACzE,MAAM,EAAE,KAAK,EAAE,QAAQ,EAAE,GAAG,KAAK,CAAC;IAElC,uBAAuB;IACvB,MAAM,WAAW,GAAG,cAAc,CAAC,KAAK,CAAC,CAAC;IAE1C,IAAI,WAAW,EAAE;QACf,OAAO,oBAAC,GAAG,QAAE,KAAK,CAAC,WAAW,CAAC,CAAO,CAAC;KACxC;IAED,uBAAuB;IACvB,MAAM,cAAc,GAAG,iBAAiB,CAAC,KAAK,CAAC,CAAC;IAChD,IAAI,cAAc,EAAE;QAClB,OAAO,CACL,oBAAC,GAAG;YACF,oBAAC,aAAa,QAAE,cAAc,CAAiB,CAC3C,CACP,CAAC;KACH;IAED,IAAI,KAAK,CAAC,IAAI,KAAK,OAAO,EAAE;QAC1B,OAAO,0CAAG,KAAK,CAAC,IAAI,CAAI,CAAC;KAC1B;IAED,qBAAqB;IACrB,OAAO,CACL,oBAAC,UAAU,IAAC,KAAK,EAAE,QAAQ,CAAC,CAAC,CAAC,gBAAgB,CAAC,CAAC,CAAC,cAAc,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,GAAG,EAAE,IAC7E,KAAK,CAAC,IAAI,CACA,CACd,CAAC;AACJ,CAAC,CAAC,CAAC;AAEH,eAAe,aAAa,CAAC"}
@@ -2,6 +2,7 @@ import React from 'react';
2
2
  import type { QuestionnaireItem } from 'fhir/r4';
3
3
  interface LabelWrapperProps {
4
4
  qItem: QuestionnaireItem;
5
+ readOnly: boolean;
5
6
  }
6
7
  declare function ItemLabelWrapper(props: LabelWrapperProps): React.JSX.Element;
7
8
  export default ItemLabelWrapper;
@@ -20,10 +20,10 @@ import ContextDisplayItem from './ContextDisplayItem';
20
20
  import { getContextDisplays } from '../../../utils/tabs';
21
21
  import ItemLabelText from './ItemLabelText';
22
22
  function ItemLabelWrapper(props) {
23
- const { qItem } = props;
23
+ const { qItem, readOnly } = props;
24
24
  const contextDisplayItems = getContextDisplays(qItem);
25
25
  return (React.createElement(Box, { display: "flex", alignItems: "center", justifyContent: "space-between" },
26
- React.createElement(ItemLabelText, { qItem: qItem }),
26
+ React.createElement(ItemLabelText, { qItem: qItem, readOnly: readOnly }),
27
27
  React.createElement(Box, { display: "flex", columnGap: 0.5 }, contextDisplayItems.map((item) => {
28
28
  return React.createElement(ContextDisplayItem, { key: item.linkId, displayItem: item });
29
29
  }))));
@@ -1 +1 @@
1
- {"version":3,"file":"ItemLabelWrapper.js","sourceRoot":"","sources":["../../../../src/components/FormComponents/ItemParts/ItemLabelWrapper.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GA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E,GAAG,KAAK,CAAC;IAElC,MAAM,mBAAmB,GAAG,kBAAkB,CAAC,KAAK,CAAC,CAAC;IAEtD,OAAO,CACL,oBAAC,GAAG,IAAC,OAAO,EAAC,MAAM,EAAC,UAAU,EAAC,QAAQ,EAAC,cAAc,EAAC,eAAe;QACpE,oBAAC,aAAa,IAAC,KAAK,EAAE,KAAK,EAAE,QAAQ,EAAE,QAAQ,GAAI;QAEnD,oBAAC,GAAG,IAAC,OAAO,EAAC,MAAM,EAAC,SAAS,EAAE,GAAG,IAC/B,mBAAmB,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE;YAChC,OAAO,oBAAC,kBAAkB,IAAC,GAAG,EAAE,IAAI,CAAC,MAAM,EAAE,WAAW,EAAE,IAAI,GAAI,CAAC;QACrE,CAAC,CAAC,CACE,CACF,CACP,CAAC;AACJ,CAAC;AAED,eAAe,gBAAgB,CAAC"}
@@ -1,11 +1,4 @@
1
1
  /// <reference types="react" />
2
- export declare const PrimarySelectableList: import("@emotion/styled").StyledComponent<{
3
- children?: import("react").ReactNode;
4
- classes?: Partial<import("@mui/material/List").ListClasses> | undefined;
5
- dense?: boolean | undefined;
6
- disablePadding?: boolean | undefined;
7
- subheader?: import("react").ReactNode;
8
- sx?: import("@mui/material/styles").SxProps<import("@mui/material/styles").Theme> | undefined;
9
- } & import("@mui/material/OverridableComponent").CommonProps & Omit<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLUListElement>, HTMLUListElement>, "ref"> & {
2
+ export declare const PrimarySelectableList: import("@emotion/styled").StyledComponent<import("@mui/material/List").ListOwnProps & import("@mui/material/OverridableComponent").CommonProps & Omit<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLUListElement>, HTMLUListElement>, "ref"> & {
10
3
  ref?: ((instance: HTMLUListElement | null) => void) | import("react").RefObject<HTMLUListElement> | null | undefined;
11
- }, "children" | "sx" | "dense" | keyof import("@mui/material/OverridableComponent").CommonProps | "disablePadding" | "subheader"> & import("@mui/system").MUIStyledCommonProps<import("@mui/material/styles").Theme>, {}, {}>;
4
+ }, "style" | "className" | "children" | "sx" | "classes" | "dense" | "disablePadding" | "subheader"> & import("@mui/system").MUIStyledCommonProps<import("@mui/material/styles").Theme>, {}, {}>;
@@ -1,8 +1,8 @@
1
1
  import React from 'react';
2
2
  import type { Coding, QuestionnaireItem } from 'fhir/r4';
3
- import type { PropsWithIsTabledAttribute } from '../../../interfaces/renderProps.interface';
3
+ import type { PropsWithIsTabledAttribute, PropsWithParentIsReadOnlyAttribute } from '../../../interfaces/renderProps.interface';
4
4
  import type { AlertColor } from '@mui/material/Alert';
5
- interface OpenChoiceAutocompleteFieldProps extends PropsWithIsTabledAttribute {
5
+ interface OpenChoiceAutocompleteFieldProps extends PropsWithIsTabledAttribute, PropsWithParentIsReadOnlyAttribute {
6
6
  qItem: QuestionnaireItem;
7
7
  options: Coding[];
8
8
  valueAutocomplete: string | Coding;
@@ -12,6 +12,7 @@ interface OpenChoiceAutocompleteFieldProps extends PropsWithIsTabledAttribute {
12
12
  message: string;
13
13
  color: AlertColor;
14
14
  } | null;
15
+ readOnly: boolean;
15
16
  onInputChange: (newInput: string) => void;
16
17
  onValueChange: (newValue: Coding | string | null) => void;
17
18
  onUnfocus: () => void;
@@ -28,9 +28,8 @@ import DoneIcon from '@mui/icons-material/Done';
28
28
  import ErrorIcon from '@mui/icons-material/Error';
29
29
  import useRenderingExtensions from '../../../hooks/useRenderingExtensions';
30
30
  function OpenChoiceAutocompleteField(props) {
31
- const { qItem, options, valueAutocomplete, input, loading, feedback, isTabled, onInputChange, onValueChange, onUnfocus } = props;
32
- // Get additional rendering extensions
33
- const { displayUnit, displayPrompt, readOnly, entryFormat } = useRenderingExtensions(qItem);
31
+ const { qItem, options, valueAutocomplete, input, loading, feedback, readOnly, isTabled, onInputChange, onValueChange, onUnfocus } = props;
32
+ const { displayUnit, displayPrompt, entryFormat } = useRenderingExtensions(qItem);
34
33
  return (React.createElement(Box, { display: "flex" },
35
34
  React.createElement(Autocomplete, { id: qItem.id, value: valueAutocomplete, options: options, getOptionLabel: (option) => (typeof option === 'string' ? option : `${option.display}`), disabled: readOnly, loading: loading, loadingText: 'Fetching results...', clearOnEscape: true, freeSolo: true, autoHighlight: true, sx: { maxWidth: !isTabled ? 280 : 3000, minWidth: 220, flexGrow: 1 }, placeholder: entryFormat, onChange: (_, newValue) => onValueChange(newValue), filterOptions: (x) => x, renderInput: (params) => (React.createElement(StandardTextField, Object.assign({}, params, { value: input, onBlur: onUnfocus, onChange: (e) => onInputChange(e.target.value), isTabled: isTabled, label: displayPrompt, size: "small", InputProps: Object.assign(Object.assign({}, params.InputProps), { startAdornment: (React.createElement(React.Fragment, null,
36
35
  !valueAutocomplete || valueAutocomplete === '' ? (React.createElement(SearchIcon, { fontSize: "small", sx: { ml: 0.5 } })) : null,
@@ -1 +1 @@
1
- {"version":3,"file":"OpenChoiceAutocompleteField.js","sourceRoot":"","sources":["../../../../src/components/FormComponents/OpenChoiceItems/OpenChoiceAutocompleteField.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAEH,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,GAAG,MAAM,mBAAmB,CAAC;AACpC,OAAO,YAAY,MAAM,4BAA4B,CAAC;AACtD,OAAO,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AACxD,OAAO,UAAU,MAAM,4BAA4B,CAAC;AACpD,OAAO,gBAAgB,MAAM,gCAAgC,CAAC;AAC9D,OAAO,IAAI,MAAM,oBAAoB,CAAC;AACtC,OAAO,OAAO,MAAM,uBAAuB,CAAC;AAC5C,OAAO,QAAQ,MAAM,0BAA0B,CAAC;AAChD,OAAO,gBAAgB,MAAM,kCAAkC,CAAC;AAChE,OAAO,QAAQ,MAAM,0BAA0B,CAAC;AAChD,OAAO,SAAS,MAAM,2BAA2B,CAAC;AAGlD,OAAO,sBAAsB,MAAM,uCAAuC,CAAC;AAe3E,SAAS,2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BACP,MAAM,CAAC,UAAU,CAAC,YAAY;wBAC9B,WAAW,CACX,CACJ,kBAEO,uCAAuC,IACjD,CACH,GACD,CACE,CACP,CAAC;AACJ,CAAC;AAED,eAAe,2BAA2B,CAAC"}
1
+ {"version":3,"file":"OpenChoiceAutocompleteField.js","sourceRoot":"","sources":["../../../../src/components/FormComponents/OpenChoiceItems/OpenChoiceAutocompleteField.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAEH,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,GAAG,MAAM,mBAAmB,CAAC;AACpC,OAAO,YAAY,MAAM,4BAA4B,CAAC;AACtD,OAAO,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AACxD,OAAO,UAAU,MAAM,4BAA4B,CAAC;AACpD,OAAO,gBAAgB,MAAM,gCAAgC,CAAC;AAC9D,OAAO,IAAI,MAAM,oBAAoB,CAAC;AACtC,OAAO,OAAO,MAAM,uBAAuB,CAAC;AAC5C,OAAO,QAAQ,MAAM,0BAA0B,CAAC;AAChD,OAAO,gBAAgB,MAAM,kCAAkC,CAAC;AAChE,OAAO,QAAQ,MAAM,0BAA0B,CAAC;AAChD,OAAO,SAAS,MAAM,2BAA2B,CAAC;AAMlD,OAAO,sBAAsB,MAAM,uCAAuC,CAAC;AAkB3E,SAAS,2BAA2B,CAAC,KAAuC;IAC1E,MAAM,EACJ,KAAK,EACL,OAAO,EACP,iBAAiB,EACjB,KAAK,EACL,OAAO,EACP,QAAQ,EACR,QAAQ,EACR,QAAQ,EACR,aAAa,EACb,aAAa,EACb,SAAS,EACV,GAAG,KAAK,CAAC;IAEV,MAAM,EAAE,WAAW,EAAE,aAAa,EAAE,WAAW,EAAE,GAAG,sBAAsB,CAAC,KAAK,CAAC,CAAC;IAElF,OAAO,CACL,oBAAC,GAAG,IAAC,OAAO,EAAC,MAAM;QACjB,oBAAC,YAAY,IACX,EAAE,EAAE,KAAK,CAAC,EAAE,EACZ,KAA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