@aehrc/smart-forms-renderer 0.7.2 → 0.8.1

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 (356) 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 +2 -2
  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 +2 -2
  7. package/lib/components/FormComponents/ChoiceItems/ChoiceAutocompleteItem.js +6 -6
  8. package/lib/components/FormComponents/ChoiceItems/ChoiceAutocompleteItem.js.map +1 -1
  9. package/lib/components/FormComponents/ChoiceItems/ChoiceCheckboxAnswerOptionFields.d.ts +12 -0
  10. package/lib/components/FormComponents/ChoiceItems/ChoiceCheckboxAnswerOptionFields.js +39 -0
  11. package/lib/components/FormComponents/ChoiceItems/ChoiceCheckboxAnswerOptionFields.js.map +1 -0
  12. package/lib/components/FormComponents/ChoiceItems/ChoiceCheckboxAnswerOptionItem.d.ts +3 -3
  13. package/lib/components/FormComponents/ChoiceItems/ChoiceCheckboxAnswerOptionItem.js +17 -29
  14. package/lib/components/FormComponents/ChoiceItems/ChoiceCheckboxAnswerOptionItem.js.map +1 -1
  15. package/lib/components/FormComponents/ChoiceItems/ChoiceCheckboxAnswerValueSetFields.d.ts +13 -0
  16. package/lib/components/FormComponents/ChoiceItems/ChoiceCheckboxAnswerValueSetFields.js +42 -0
  17. package/lib/components/FormComponents/ChoiceItems/ChoiceCheckboxAnswerValueSetFields.js.map +1 -0
  18. package/lib/components/FormComponents/ChoiceItems/ChoiceCheckboxAnswerValueSetItem.d.ts +4 -3
  19. package/lib/components/FormComponents/ChoiceItems/ChoiceCheckboxAnswerValueSetItem.js +17 -24
  20. package/lib/components/FormComponents/ChoiceItems/ChoiceCheckboxAnswerValueSetItem.js.map +1 -1
  21. package/lib/components/FormComponents/ChoiceItems/ChoiceItemSwitcher.d.ts +3 -2
  22. package/lib/components/FormComponents/ChoiceItems/ChoiceItemSwitcher.js +8 -8
  23. package/lib/components/FormComponents/ChoiceItems/ChoiceItemSwitcher.js.map +1 -1
  24. package/lib/components/FormComponents/ChoiceItems/ChoiceRadioAnswerOptionFields.d.ts +12 -0
  25. package/lib/components/FormComponents/ChoiceItems/ChoiceRadioAnswerOptionFields.js +27 -0
  26. package/lib/components/FormComponents/ChoiceItems/ChoiceRadioAnswerOptionFields.js.map +1 -0
  27. package/lib/components/FormComponents/ChoiceItems/ChoiceRadioAnswerOptionItem.d.ts +3 -3
  28. package/lib/components/FormComponents/ChoiceItems/ChoiceRadioAnswerOptionItem.js +14 -29
  29. package/lib/components/FormComponents/ChoiceItems/ChoiceRadioAnswerOptionItem.js.map +1 -1
  30. package/lib/components/FormComponents/ChoiceItems/ChoiceRadioAnswerValueSetFields.d.ts +14 -0
  31. package/lib/components/FormComponents/ChoiceItems/ChoiceRadioAnswerValueSetFields.js +42 -0
  32. package/lib/components/FormComponents/ChoiceItems/ChoiceRadioAnswerValueSetFields.js.map +1 -0
  33. package/lib/components/FormComponents/ChoiceItems/ChoiceRadioAnswerValueSetItem.d.ts +3 -3
  34. package/lib/components/FormComponents/ChoiceItems/ChoiceRadioAnswerValueSetItem.js +14 -26
  35. package/lib/components/FormComponents/ChoiceItems/ChoiceRadioAnswerValueSetItem.js.map +1 -1
  36. package/lib/components/FormComponents/ChoiceItems/ChoiceSelectAnswerOptionFields.d.ts +11 -0
  37. package/lib/components/FormComponents/ChoiceItems/ChoiceSelectAnswerOptionFields.js +41 -0
  38. package/lib/components/FormComponents/ChoiceItems/ChoiceSelectAnswerOptionFields.js.map +1 -0
  39. package/lib/components/FormComponents/ChoiceItems/ChoiceSelectAnswerOptionItem.d.ts +2 -2
  40. package/lib/components/FormComponents/ChoiceItems/ChoiceSelectAnswerOptionItem.js +12 -27
  41. package/lib/components/FormComponents/ChoiceItems/ChoiceSelectAnswerOptionItem.js.map +1 -1
  42. package/lib/components/FormComponents/ChoiceItems/ChoiceSelectAnswerValueSetFields.d.ts +13 -0
  43. package/lib/components/FormComponents/ChoiceItems/ChoiceSelectAnswerValueSetFields.js +42 -0
  44. package/lib/components/FormComponents/ChoiceItems/ChoiceSelectAnswerValueSetFields.js.map +1 -0
  45. package/lib/components/FormComponents/ChoiceItems/ChoiceSelectAnswerValueSetItem.d.ts +2 -2
  46. package/lib/components/FormComponents/ChoiceItems/ChoiceSelectAnswerValueSetItem.js +13 -22
  47. package/lib/components/FormComponents/ChoiceItems/ChoiceSelectAnswerValueSetItem.js.map +1 -1
  48. package/lib/components/FormComponents/DateItem/DateItem.d.ts +2 -1
  49. package/lib/components/FormComponents/DateItem/DateItem.js +5 -4
  50. package/lib/components/FormComponents/DateItem/DateItem.js.map +1 -1
  51. package/lib/components/FormComponents/DateItem/DatePicker.d.ts +2 -0
  52. package/lib/components/FormComponents/DateItem/DatePicker.js +42 -0
  53. package/lib/components/FormComponents/DateItem/DatePicker.js.map +1 -0
  54. package/lib/components/FormComponents/DateItem/DatePickerField.d.ts +8 -0
  55. package/{src/components/FormComponents/Typography.styles.ts → lib/components/FormComponents/DateItem/DatePickerField.js} +8 -9
  56. package/lib/components/FormComponents/DateItem/DatePickerField.js.map +1 -0
  57. package/lib/components/FormComponents/DateTimeItem/DateTimeItem.d.ts +2 -2
  58. package/lib/components/FormComponents/DateTimeItem/DateTimeItem.js +5 -4
  59. package/lib/components/FormComponents/DateTimeItem/DateTimeItem.js.map +1 -1
  60. package/lib/components/FormComponents/DecimalItem/DecimalItem.d.ts +2 -2
  61. package/lib/components/FormComponents/DecimalItem/DecimalItem.js +5 -4
  62. package/lib/components/FormComponents/DecimalItem/DecimalItem.js.map +1 -1
  63. package/lib/components/FormComponents/DisplayItem/DisplayInstructions.d.ts +1 -0
  64. package/lib/components/FormComponents/DisplayItem/DisplayInstructions.js +2 -2
  65. package/lib/components/FormComponents/DisplayItem/DisplayInstructions.js.map +1 -1
  66. package/lib/components/FormComponents/DisplayItem/DisplayInstructions.styles.d.ts +2 -7
  67. package/lib/components/FormComponents/DisplayItem/DisplayItem.js +2 -2
  68. package/lib/components/FormComponents/DisplayItem/DisplayItem.js.map +1 -1
  69. package/lib/components/FormComponents/GridGroup/GridGroup.d.ts +2 -2
  70. package/lib/components/FormComponents/GridGroup/GridGroup.js +6 -4
  71. package/lib/components/FormComponents/GridGroup/GridGroup.js.map +1 -1
  72. package/lib/components/FormComponents/GridGroup/GridRow.d.ts +2 -1
  73. package/lib/components/FormComponents/GridGroup/GridRow.js +2 -2
  74. package/lib/components/FormComponents/GridGroup/GridRow.js.map +1 -1
  75. package/lib/components/FormComponents/GridGroup/GridTable.d.ts +2 -1
  76. package/lib/components/FormComponents/GridGroup/GridTable.js +2 -2
  77. package/lib/components/FormComponents/GridGroup/GridTable.js.map +1 -1
  78. package/lib/components/FormComponents/GroupItem/GroupHeading.d.ts +1 -0
  79. package/lib/components/FormComponents/GroupItem/GroupHeading.js +6 -5
  80. package/lib/components/FormComponents/GroupItem/GroupHeading.js.map +1 -1
  81. package/lib/components/FormComponents/GroupItem/GroupItem.d.ts +2 -3
  82. package/lib/components/FormComponents/GroupItem/GroupItem.js +5 -3
  83. package/lib/components/FormComponents/GroupItem/GroupItem.js.map +1 -1
  84. package/lib/components/FormComponents/GroupItem/GroupItem.styles.d.ts +2 -6
  85. package/lib/components/FormComponents/GroupItem/GroupItemSwitcher.d.ts +2 -2
  86. package/lib/components/FormComponents/GroupItem/GroupItemSwitcher.js +12 -12
  87. package/lib/components/FormComponents/GroupItem/GroupItemSwitcher.js.map +1 -1
  88. package/lib/components/FormComponents/IntegerItem/IntegerItem.d.ts +2 -2
  89. package/lib/components/FormComponents/IntegerItem/IntegerItem.js +5 -4
  90. package/lib/components/FormComponents/IntegerItem/IntegerItem.js.map +1 -1
  91. package/lib/components/FormComponents/Item.styles.d.ts +2 -6
  92. package/lib/components/FormComponents/Item.styles.js +2 -6
  93. package/lib/components/FormComponents/Item.styles.js.map +1 -1
  94. package/lib/components/FormComponents/ItemParts/ItemFieldGrid.d.ts +1 -0
  95. package/lib/components/FormComponents/ItemParts/ItemFieldGrid.js +3 -3
  96. package/lib/components/FormComponents/ItemParts/ItemFieldGrid.js.map +1 -1
  97. package/lib/components/FormComponents/ItemParts/ItemLabelText.d.ts +1 -0
  98. package/lib/components/FormComponents/ItemParts/ItemLabelText.js +4 -6
  99. package/lib/components/FormComponents/ItemParts/ItemLabelText.js.map +1 -1
  100. package/lib/components/FormComponents/ItemParts/ItemLabelWrapper.d.ts +1 -0
  101. package/lib/components/FormComponents/ItemParts/ItemLabelWrapper.js +2 -2
  102. package/lib/components/FormComponents/ItemParts/ItemLabelWrapper.js.map +1 -1
  103. package/lib/components/FormComponents/ItemParts/RadioAnswerOptionButtons.d.ts +8 -0
  104. package/lib/components/FormComponents/ItemParts/RadioAnswerOptionButtons.js +37 -0
  105. package/lib/components/FormComponents/ItemParts/RadioAnswerOptionButtons.js.map +1 -0
  106. package/lib/components/FormComponents/ItemParts/RadioButtons.d.ts +8 -0
  107. package/lib/components/FormComponents/ItemParts/RadioButtons.js +37 -0
  108. package/lib/components/FormComponents/ItemParts/RadioButtons.js.map +1 -0
  109. package/lib/components/FormComponents/ItemParts/RadioButtonsAnswerOption.d.ts +8 -0
  110. package/lib/components/FormComponents/ItemParts/RadioButtonsAnswerOption.js +37 -0
  111. package/lib/components/FormComponents/ItemParts/RadioButtonsAnswerOption.js.map +1 -0
  112. package/lib/components/FormComponents/Lists.styles.d.ts +2 -9
  113. package/lib/components/FormComponents/OpenChoiceItems/OpenChoiceAutocompleteField.d.ts +21 -0
  114. package/lib/components/FormComponents/OpenChoiceItems/OpenChoiceAutocompleteField.js +48 -0
  115. package/lib/components/FormComponents/OpenChoiceItems/OpenChoiceAutocompleteField.js.map +1 -0
  116. package/lib/components/FormComponents/OpenChoiceItems/OpenChoiceAutocompleteFieldEndAdornment.d.ts +0 -0
  117. package/lib/components/FormComponents/OpenChoiceItems/OpenChoiceAutocompleteFieldEndAdornment.js +2 -0
  118. package/lib/components/FormComponents/OpenChoiceItems/OpenChoiceAutocompleteFieldEndAdornment.js.map +1 -0
  119. package/lib/components/FormComponents/OpenChoiceItems/OpenChoiceAutocompleteItem.d.ts +2 -2
  120. package/lib/components/FormComponents/OpenChoiceItems/OpenChoiceAutocompleteItem.js +16 -39
  121. package/lib/components/FormComponents/OpenChoiceItems/OpenChoiceAutocompleteItem.js.map +1 -1
  122. package/lib/components/FormComponents/OpenChoiceItems/OpenChoiceCheckboxAnswerOptionFields.d.ts +17 -0
  123. package/lib/components/FormComponents/OpenChoiceItems/OpenChoiceCheckboxAnswerOptionFields.js +42 -0
  124. package/lib/components/FormComponents/OpenChoiceItems/OpenChoiceCheckboxAnswerOptionFields.js.map +1 -0
  125. package/lib/components/FormComponents/OpenChoiceItems/OpenChoiceCheckboxAnswerOptionItem.d.ts +3 -3
  126. package/lib/components/FormComponents/OpenChoiceItems/OpenChoiceCheckboxAnswerOptionItem.js +27 -39
  127. package/lib/components/FormComponents/OpenChoiceItems/OpenChoiceCheckboxAnswerOptionItem.js.map +1 -1
  128. package/lib/components/FormComponents/OpenChoiceItems/OpenChoiceItemSwitcher.d.ts +2 -2
  129. package/lib/components/FormComponents/OpenChoiceItems/OpenChoiceItemSwitcher.js +6 -6
  130. package/lib/components/FormComponents/OpenChoiceItems/OpenChoiceItemSwitcher.js.map +1 -1
  131. package/lib/components/FormComponents/OpenChoiceItems/OpenChoiceRadioAnswerOptionFields.d.ts +15 -0
  132. package/lib/components/FormComponents/OpenChoiceItems/OpenChoiceRadioAnswerOptionFields.js +29 -0
  133. package/lib/components/FormComponents/OpenChoiceItems/OpenChoiceRadioAnswerOptionFields.js.map +1 -0
  134. package/lib/components/FormComponents/OpenChoiceItems/OpenChoiceRadioAnswerOptionItem.d.ts +3 -3
  135. package/lib/components/FormComponents/OpenChoiceItems/OpenChoiceRadioAnswerOptionItem.js +10 -29
  136. package/lib/components/FormComponents/OpenChoiceItems/OpenChoiceRadioAnswerOptionItem.js.map +1 -1
  137. package/lib/components/FormComponents/OpenChoiceItems/OpenChoiceSelectAnswerOptionField.d.ts +12 -0
  138. package/lib/components/FormComponents/OpenChoiceItems/OpenChoiceSelectAnswerOptionField.js +14 -0
  139. package/lib/components/FormComponents/OpenChoiceItems/OpenChoiceSelectAnswerOptionField.js.map +1 -0
  140. package/lib/components/FormComponents/OpenChoiceItems/OpenChoiceSelectAnswerOptionFields.d.ts +0 -0
  141. package/lib/components/FormComponents/OpenChoiceItems/OpenChoiceSelectAnswerOptionFields.js +2 -0
  142. package/lib/components/FormComponents/OpenChoiceItems/OpenChoiceSelectAnswerOptionFields.js.map +1 -0
  143. package/lib/components/FormComponents/OpenChoiceItems/OpenChoiceSelectAnswerOptionItem.d.ts +2 -2
  144. package/lib/components/FormComponents/OpenChoiceItems/OpenChoiceSelectAnswerOptionItem.js +23 -27
  145. package/lib/components/FormComponents/OpenChoiceItems/OpenChoiceSelectAnswerOptionItem.js.map +1 -1
  146. package/lib/components/FormComponents/OpenChoiceItems/OpenChoiceSelectAnswerValueSetField.d.ts +13 -0
  147. package/lib/components/FormComponents/OpenChoiceItems/OpenChoiceSelectAnswerValueSetField.js +16 -0
  148. package/lib/components/FormComponents/OpenChoiceItems/OpenChoiceSelectAnswerValueSetField.js.map +1 -0
  149. package/lib/components/FormComponents/OpenChoiceItems/OpenChoiceSelectAnswerValueSetItem.d.ts +2 -2
  150. package/lib/components/FormComponents/OpenChoiceItems/OpenChoiceSelectAnswerValueSetItem.js +13 -18
  151. package/lib/components/FormComponents/OpenChoiceItems/OpenChoiceSelectAnswerValueSetItem.js.map +1 -1
  152. package/lib/components/FormComponents/RepeatGroup/AddItemButton.d.ts +1 -0
  153. package/lib/components/FormComponents/RepeatGroup/AddItemButton.js +2 -2
  154. package/lib/components/FormComponents/RepeatGroup/AddItemButton.js.map +1 -1
  155. package/lib/components/FormComponents/RepeatGroup/DeleteItemButton.d.ts +1 -0
  156. package/lib/components/FormComponents/RepeatGroup/DeleteItemButton.js +2 -2
  157. package/lib/components/FormComponents/RepeatGroup/DeleteItemButton.js.map +1 -1
  158. package/lib/components/FormComponents/RepeatGroup/RepeatGroup.d.ts +2 -2
  159. package/lib/components/FormComponents/RepeatGroup/RepeatGroup.js +8 -6
  160. package/lib/components/FormComponents/RepeatGroup/RepeatGroup.js.map +1 -1
  161. package/lib/components/FormComponents/RepeatGroup/RepeatGroupItem.d.ts +2 -2
  162. package/lib/components/FormComponents/RepeatGroup/RepeatGroupItem.js +5 -3
  163. package/lib/components/FormComponents/RepeatGroup/RepeatGroupItem.js.map +1 -1
  164. package/lib/components/FormComponents/RepeatItem/AddItemButton.d.ts +1 -0
  165. package/lib/components/FormComponents/RepeatItem/AddItemButton.js +2 -2
  166. package/lib/components/FormComponents/RepeatItem/AddItemButton.js.map +1 -1
  167. package/lib/components/FormComponents/RepeatItem/DeleteItemButton.d.ts +1 -0
  168. package/lib/components/FormComponents/RepeatItem/DeleteItemButton.js +2 -2
  169. package/lib/components/FormComponents/RepeatItem/DeleteItemButton.js.map +1 -1
  170. package/lib/components/FormComponents/RepeatItem/RepeatField.d.ts +2 -2
  171. package/lib/components/FormComponents/RepeatItem/RepeatField.js +5 -3
  172. package/lib/components/FormComponents/RepeatItem/RepeatField.js.map +1 -1
  173. package/lib/components/FormComponents/RepeatItem/RepeatItem.d.ts +2 -2
  174. package/lib/components/FormComponents/RepeatItem/RepeatItem.js +6 -5
  175. package/lib/components/FormComponents/RepeatItem/RepeatItem.js.map +1 -1
  176. package/lib/components/FormComponents/RepeatItem/RepeatItem.styles.d.ts +4 -18
  177. package/lib/components/FormComponents/SingleItem/SingleItem.d.ts +2 -2
  178. package/lib/components/FormComponents/SingleItem/SingleItem.js +4 -2
  179. package/lib/components/FormComponents/SingleItem/SingleItem.js.map +1 -1
  180. package/lib/components/FormComponents/SingleItem/SingleItemSwitcher.d.ts +2 -2
  181. package/lib/components/FormComponents/SingleItem/SingleItemSwitcher.js +12 -12
  182. package/lib/components/FormComponents/SingleItem/SingleItemSwitcher.js.map +1 -1
  183. package/lib/components/FormComponents/StringItem/StringItem.d.ts +2 -2
  184. package/lib/components/FormComponents/StringItem/StringItem.js +5 -4
  185. package/lib/components/FormComponents/StringItem/StringItem.js.map +1 -1
  186. package/lib/components/FormComponents/Tables/AddItemButton.d.ts +8 -0
  187. package/lib/components/FormComponents/Tables/AddItemButton.js +28 -0
  188. package/lib/components/FormComponents/Tables/AddItemButton.js.map +1 -0
  189. package/lib/components/FormComponents/Tables/AddRowButton.d.ts +9 -0
  190. package/lib/components/FormComponents/Tables/AddRowButton.js +28 -0
  191. package/lib/components/FormComponents/Tables/AddRowButton.js.map +1 -0
  192. package/lib/components/FormComponents/Tables/DeleteRowButton.d.ts +1 -0
  193. package/lib/components/FormComponents/Tables/DeleteRowButton.js +2 -2
  194. package/lib/components/FormComponents/Tables/DeleteRowButton.js.map +1 -1
  195. package/lib/components/FormComponents/Tables/GroupTable.d.ts +10 -0
  196. package/lib/components/FormComponents/Tables/GroupTable.js +110 -0
  197. package/lib/components/FormComponents/Tables/GroupTable.js.map +1 -0
  198. package/lib/components/FormComponents/Tables/GroupTableRow.d.ts +11 -0
  199. package/lib/components/FormComponents/Tables/GroupTableRow.js +46 -0
  200. package/lib/components/FormComponents/Tables/GroupTableRow.js.map +1 -0
  201. package/lib/components/FormComponents/Tables/QItemGroupTable.js +5 -7
  202. package/lib/components/FormComponents/Tables/QItemGroupTable.js.map +1 -1
  203. package/lib/components/FormComponents/Tables/QItemGroupTableRow.js +2 -2
  204. package/lib/components/FormComponents/Tables/QItemGroupTableRow.js.map +1 -1
  205. package/lib/components/FormComponents/Tables/index.d.ts +1 -1
  206. package/lib/components/FormComponents/Tables/index.js +1 -1
  207. package/lib/components/FormComponents/Tables/index.js.map +1 -1
  208. package/lib/components/FormComponents/TextItem/TextItem.d.ts +2 -2
  209. package/lib/components/FormComponents/TextItem/TextItem.js +5 -4
  210. package/lib/components/FormComponents/TextItem/TextItem.js.map +1 -1
  211. package/lib/components/FormComponents/TimeItem/TimeItem.d.ts +2 -2
  212. package/lib/components/FormComponents/TimeItem/TimeItem.js +5 -4
  213. package/lib/components/FormComponents/TimeItem/TimeItem.js.map +1 -1
  214. package/lib/components/FormComponents/UrlItem/UrlItem.d.ts +2 -2
  215. package/lib/components/FormComponents/UrlItem/UrlItem.js +5 -4
  216. package/lib/components/FormComponents/UrlItem/UrlItem.js.map +1 -1
  217. package/lib/components/Lists.styles.d.ts +2 -9
  218. package/lib/components/Renderer/FormBodyTabbed.js +1 -1
  219. package/lib/components/Renderer/FormBodyTabbed.js.map +1 -1
  220. package/lib/components/Renderer/FormTopLevelItem.js +7 -5
  221. package/lib/components/Renderer/FormTopLevelItem.js.map +1 -1
  222. package/lib/components/Tabs/FormBodySingleTab.js +1 -1
  223. package/lib/components/Tabs/FormBodyTabList.d.ts +1 -0
  224. package/lib/components/Tabs/FormBodyTabList.js +3 -4
  225. package/lib/components/Tabs/FormBodyTabList.js.map +1 -1
  226. package/lib/components/Tabs/FormBodyTabListWrapper.d.ts +1 -1
  227. package/lib/components/Tabs/FormBodyTabListWrapper.js +6 -13
  228. package/lib/components/Tabs/FormBodyTabListWrapper.js.map +1 -1
  229. package/lib/components/Tabs/ShowCompletedTabsSection.d.ts +7 -0
  230. package/lib/components/Tabs/ShowCompletedTabsSection.js +34 -0
  231. package/lib/components/Tabs/ShowCompletedTabsSection.js.map +1 -0
  232. package/lib/hooks/useContextDisplayItems.d.ts +6 -0
  233. package/lib/hooks/useContextDisplayItems.js +30 -0
  234. package/lib/hooks/useContextDisplayItems.js.map +1 -0
  235. package/lib/hooks/useInitialiseRenderer.js +2 -2
  236. package/lib/hooks/useInitialiseRenderer.js.map +1 -1
  237. package/lib/hooks/useInitialiseRepeatGroups.d.ts +1 -1
  238. package/lib/hooks/useMinimalStringCalculatedExpression.d.ts +11 -0
  239. package/lib/hooks/useMinimalStringCalculatedExpression.js +37 -0
  240. package/lib/hooks/useMinimalStringCalculatedExpression.js.map +1 -0
  241. package/lib/hooks/useNumberInput.d.ts +1 -1
  242. package/lib/hooks/useNumberInput.js.map +1 -1
  243. package/lib/hooks/useReadOnly.d.ts +3 -0
  244. package/lib/hooks/useReadOnly.js +26 -0
  245. package/lib/hooks/useReadOnly.js.map +1 -0
  246. package/lib/hooks/useStringInput.d.ts +1 -1
  247. package/lib/hooks/useStringInput.js.map +1 -1
  248. package/lib/hooks/useTerminologyServerQuery.js +3 -6
  249. package/lib/hooks/useTerminologyServerQuery.js.map +1 -1
  250. package/lib/index.js +2 -2
  251. package/lib/index.js.map +1 -1
  252. package/lib/interfaces/calculatedExpression.interface.d.ts +1 -1
  253. package/lib/interfaces/renderProps.interface.d.ts +6 -0
  254. package/lib/stores/useQuestionnaireResponseStore.d.ts +2 -1
  255. package/lib/stores/useQuestionnaireResponseStore.js +5 -3
  256. package/lib/stores/useQuestionnaireResponseStore.js.map +1 -1
  257. package/lib/theme/overrides/Typography.d.ts +13 -0
  258. package/lib/theme/overrides/Typography.js +31 -0
  259. package/lib/theme/overrides/Typography.js.map +1 -0
  260. package/lib/theme/typography.d.ts +0 -2
  261. package/lib/theme/typography.js +3 -5
  262. package/lib/theme/typography.js.map +1 -1
  263. package/lib/utils/calculatedExpression.d.ts +12 -0
  264. package/lib/utils/calculatedExpression.js +54 -8
  265. package/lib/utils/calculatedExpression.js.map +1 -1
  266. package/lib/utils/qrItem.d.ts +2 -3
  267. package/lib/utils/qrItem.js +2 -3
  268. package/lib/utils/qrItem.js.map +1 -1
  269. package/lib/utils/repopulateIntoResponse.d.ts +2 -2
  270. package/lib/utils/repopulateItems.js +0 -1
  271. package/lib/utils/repopulateItems.js.map +1 -1
  272. package/package.json +15 -15
  273. package/src/components/FormComponents/BooleanItem/BooleanItem.tsx +8 -5
  274. package/src/components/FormComponents/ChoiceItems/ChoiceAutocompleteItem.tsx +9 -7
  275. package/src/components/FormComponents/ChoiceItems/ChoiceCheckboxAnswerOptionFields.tsx +85 -0
  276. package/src/components/FormComponents/ChoiceItems/ChoiceCheckboxAnswerOptionItem.tsx +48 -60
  277. package/src/components/FormComponents/ChoiceItems/ChoiceCheckboxAnswerValueSetFields.tsx +79 -0
  278. package/src/components/FormComponents/ChoiceItems/ChoiceCheckboxAnswerValueSetItem.tsx +50 -52
  279. package/src/components/FormComponents/ChoiceItems/ChoiceItemSwitcher.tsx +24 -9
  280. package/src/components/FormComponents/ChoiceItems/ChoiceRadioAnswerOptionFields.tsx +48 -0
  281. package/src/components/FormComponents/ChoiceItems/ChoiceRadioAnswerOptionItem.tsx +32 -59
  282. package/src/components/FormComponents/ChoiceItems/ChoiceRadioAnswerValueSetFields.tsx +83 -0
  283. package/src/components/FormComponents/ChoiceItems/ChoiceRadioAnswerValueSetItem.tsx +37 -56
  284. package/src/components/FormComponents/ChoiceItems/ChoiceSelectAnswerOptionFields.tsx +82 -0
  285. package/src/components/FormComponents/ChoiceItems/ChoiceSelectAnswerOptionItem.tsx +30 -60
  286. package/src/components/FormComponents/ChoiceItems/ChoiceSelectAnswerValueSetFields.tsx +98 -0
  287. package/src/components/FormComponents/ChoiceItems/ChoiceSelectAnswerValueSetItem.tsx +33 -66
  288. package/src/components/FormComponents/DateItem/DateItem.tsx +8 -6
  289. package/src/components/FormComponents/DateTimeItem/DateTimeItem.tsx +8 -6
  290. package/src/components/FormComponents/DecimalItem/DecimalItem.tsx +7 -5
  291. package/src/components/FormComponents/DisplayItem/DisplayInstructions.tsx +6 -2
  292. package/src/components/FormComponents/DisplayItem/DisplayItem.tsx +2 -2
  293. package/src/components/FormComponents/GridGroup/GridGroup.tsx +13 -5
  294. package/src/components/FormComponents/GridGroup/GridRow.tsx +6 -2
  295. package/src/components/FormComponents/GridGroup/GridTable.tsx +6 -2
  296. package/src/components/FormComponents/GroupItem/GroupHeading.tsx +12 -6
  297. package/src/components/FormComponents/GroupItem/GroupItem.tsx +8 -2
  298. package/src/components/FormComponents/GroupItem/GroupItemSwitcher.tsx +31 -8
  299. package/src/components/FormComponents/IntegerItem/IntegerItem.tsx +7 -5
  300. package/src/components/FormComponents/Item.styles.ts +2 -7
  301. package/src/components/FormComponents/ItemParts/ItemFieldGrid.tsx +4 -3
  302. package/src/components/FormComponents/ItemParts/ItemLabelText.tsx +10 -5
  303. package/src/components/FormComponents/ItemParts/ItemLabelWrapper.tsx +3 -2
  304. package/src/components/FormComponents/ItemParts/RadioAnswerOptionButtons.tsx +72 -0
  305. package/src/components/FormComponents/OpenChoiceItems/OpenChoiceAutocompleteField.tsx +137 -0
  306. package/src/components/FormComponents/OpenChoiceItems/OpenChoiceAutocompleteItem.tsx +50 -99
  307. package/src/components/FormComponents/OpenChoiceItems/OpenChoiceCheckboxAnswerOptionFields.tsx +112 -0
  308. package/src/components/FormComponents/OpenChoiceItems/OpenChoiceCheckboxAnswerOptionItem.tsx +72 -80
  309. package/src/components/FormComponents/OpenChoiceItems/OpenChoiceItemSwitcher.tsx +17 -5
  310. package/src/components/FormComponents/OpenChoiceItems/OpenChoiceRadioAnswerOptionFields.tsx +72 -0
  311. package/src/components/FormComponents/OpenChoiceItems/OpenChoiceRadioAnswerOptionItem.tsx +23 -67
  312. package/src/components/FormComponents/OpenChoiceItems/OpenChoiceSelectAnswerOptionField.tsx +60 -0
  313. package/src/components/FormComponents/OpenChoiceItems/OpenChoiceSelectAnswerOptionItem.tsx +50 -69
  314. package/src/components/FormComponents/OpenChoiceItems/OpenChoiceSelectAnswerValueSetField.tsx +69 -0
  315. package/src/components/FormComponents/OpenChoiceItems/OpenChoiceSelectAnswerValueSetItem.tsx +33 -56
  316. package/src/components/FormComponents/RepeatGroup/AddItemButton.tsx +3 -2
  317. package/src/components/FormComponents/RepeatGroup/DeleteItemButton.tsx +3 -2
  318. package/src/components/FormComponents/RepeatGroup/RepeatGroup.tsx +17 -9
  319. package/src/components/FormComponents/RepeatGroup/RepeatGroupItem.tsx +13 -2
  320. package/src/components/FormComponents/RepeatItem/AddItemButton.tsx +3 -2
  321. package/src/components/FormComponents/RepeatItem/DeleteItemButton.tsx +3 -2
  322. package/src/components/FormComponents/RepeatItem/RepeatField.tsx +21 -3
  323. package/src/components/FormComponents/RepeatItem/RepeatItem.tsx +13 -6
  324. package/src/components/FormComponents/SingleItem/SingleItem.tsx +12 -3
  325. package/src/components/FormComponents/SingleItem/SingleItemSwitcher.tsx +21 -3
  326. package/src/components/FormComponents/StringItem/StringItem.tsx +7 -5
  327. package/src/components/FormComponents/Tables/AddRowButton.tsx +50 -0
  328. package/src/components/FormComponents/Tables/DeleteRowButton.tsx +3 -2
  329. package/src/components/FormComponents/Tables/{QItemGroupTable.tsx → GroupTable.tsx} +22 -22
  330. package/src/components/FormComponents/Tables/{QItemGroupTableRow.tsx → GroupTableRow.tsx} +8 -4
  331. package/src/components/FormComponents/Tables/index.ts +1 -1
  332. package/src/components/FormComponents/TextItem/TextItem.tsx +7 -5
  333. package/src/components/FormComponents/TimeItem/TimeItem.tsx +8 -6
  334. package/src/components/FormComponents/UrlItem/UrlItem.tsx +7 -5
  335. package/src/components/Renderer/FormBodyTabbed.tsx +1 -1
  336. package/src/components/Renderer/FormTopLevelItem.tsx +9 -4
  337. package/src/components/Tabs/FormBodySingleTab.tsx +1 -1
  338. package/src/components/Tabs/FormBodyTabList.tsx +5 -8
  339. package/src/components/Tabs/FormBodyTabListWrapper.tsx +15 -26
  340. package/src/components/Tabs/ShowCompletedTabsSection.tsx +52 -0
  341. package/src/hooks/useContextDisplayItems.ts +40 -0
  342. package/src/hooks/useInitialiseRenderer.ts +2 -2
  343. package/src/hooks/useInitialiseRepeatGroups.ts +1 -1
  344. package/src/hooks/useNumberInput.ts +2 -1
  345. package/src/hooks/useReadOnly.ts +30 -0
  346. package/src/hooks/useStringInput.ts +2 -1
  347. package/src/hooks/useTerminologyServerQuery.ts +3 -6
  348. package/src/index.ts +2 -2
  349. package/src/interfaces/calculatedExpression.interface.ts +1 -1
  350. package/src/interfaces/renderProps.interface.ts +8 -0
  351. package/src/stores/useQuestionnaireResponseStore.ts +5 -4
  352. package/src/theme/typography.ts +3 -5
  353. package/src/utils/calculatedExpression.ts +68 -12
  354. package/src/utils/qrItem.ts +4 -3
  355. package/src/utils/repopulateIntoResponse.ts +2 -2
  356. package/src/utils/repopulateItems.ts +0 -1
@@ -0,0 +1,42 @@
1
+ /*
2
+ * Copyright 2023 Commonwealth Scientific and Industrial Research
3
+ * Organisation (CSIRO) ABN 41 687 119 230.
4
+ *
5
+ * Licensed under the Apache License, Version 2.0 (the "License");
6
+ * you may not use this file except in compliance with the License.
7
+ * You may obtain a copy of the License at
8
+ *
9
+ * http://www.apache.org/licenses/LICENSE-2.0
10
+ *
11
+ * Unless required by applicable law or agreed to in writing, software
12
+ * distributed under the License is distributed on an "AS IS" BASIS,
13
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
+ * See the License for the specific language governing permissions and
15
+ * limitations under the License.
16
+ */
17
+ import React from 'react';
18
+ import Autocomplete from '@mui/material/Autocomplete';
19
+ import { StandardTextField } from '../Textfield.styles';
20
+ import { StyledAlert } from '../../Alert.styles';
21
+ import ErrorOutlineIcon from '@mui/icons-material/ErrorOutline';
22
+ import Typography from '@mui/material/Typography';
23
+ import useRenderingExtensions from '../../../hooks/useRenderingExtensions';
24
+ function ChoiceSelectAnswerValueSetFields(props) {
25
+ const { qItem, codings, valueCoding, serverError, readOnly, isTabled, onSelectChange } = props;
26
+ const { displayUnit, displayPrompt, entryFormat } = useRenderingExtensions(qItem);
27
+ if (codings.length > 0) {
28
+ return (React.createElement(Autocomplete, { id: qItem.id, options: codings, getOptionLabel: (option) => `${option.display}`, value: valueCoding !== null && valueCoding !== void 0 ? valueCoding : null, onChange: (_, newValue) => onSelectChange(newValue), openOnFocus: true, autoHighlight: true, sx: { maxWidth: !isTabled ? 280 : 3000, minWidth: 160, flexGrow: 1 }, size: "small", disabled: readOnly, placeholder: entryFormat, renderInput: (params) => (React.createElement(StandardTextField, Object.assign({ isTabled: isTabled, label: displayPrompt }, params, { InputProps: Object.assign(Object.assign({}, params.InputProps), { endAdornment: (React.createElement(React.Fragment, null,
29
+ params.InputProps.endAdornment,
30
+ displayUnit)) }), "data-test": "q-item-choice-dropdown-answer-value-set-field" }))) }));
31
+ }
32
+ if (serverError) {
33
+ return (React.createElement(StyledAlert, { color: "error" },
34
+ React.createElement(ErrorOutlineIcon, { color: "error", sx: { pr: 0.75 } }),
35
+ React.createElement(Typography, { variant: "subtitle2" }, "There was an error fetching options from the terminology server")));
36
+ }
37
+ return (React.createElement(StyledAlert, { color: "error" },
38
+ React.createElement(ErrorOutlineIcon, { color: "error", sx: { pr: 0.75 } }),
39
+ React.createElement(Typography, { variant: "subtitle2" }, "Unable to fetch options from the questionnaire or launch context")));
40
+ }
41
+ export default ChoiceSelectAnswerValueSetFields;
42
+ //# sourceMappingURL=ChoiceSelectAnswerValueSetFields.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ChoiceSelectAnswerValueSetFields.js","sourceRoot":"","sources":["../../../../src/components/FormComponents/ChoiceItems/ChoiceSelectAnswerValueSetFields.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAEH,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,YAAY,MAAM,4BAA4B,CAAC;AACtD,OAAO,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AACxD,OAAO,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AACjD,OAAO,gBAAgB,MAAM,kCAAkC,CAAC;AAChE,OAAO,UAAU,MAAM,0BAA0B,CAAC;AAElD,OAAO,sBAAsB,MAAM,uCAAuC,CAAC;AAY3E,SAAS,gCAAgC,CAAC,KAA4C;IACpF,MAAM,EAAE,KAAK,EAAE,OAAO,EAAE,WAAW,EAAE,WAAW,EAAE,QAAQ,EAAE,QAAQ,EAAE,cAAc,EAAE,GAAG,KAAK,CAAC;IAE/F,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ACD,CACf,CAAC;KACH;IAED,OAAO,CACL,oBAAC,WAAW,IAAC,KAAK,EAAC,OAAO;QACxB,oBAAC,gBAAgB,IAAC,KAAK,EAAC,OAAO,EAAC,EAAE,EAAE,EAAE,EAAE,EAAE,IAAI,EAAE,GAAI;QACpD,oBAAC,UAAU,IAAC,OAAO,EAAC,WAAW,uEAElB,CACD,CACf,CAAC;AACJ,CAAC;AAED,eAAe,gCAAgC,CAAC"}
@@ -1,7 +1,7 @@
1
1
  import React from 'react';
2
2
  import type { QuestionnaireItem, QuestionnaireResponseItem } from 'fhir/r4';
3
- import type { PropsWithIsRepeatedAttribute, PropsWithIsTabledAttribute, PropsWithQrItemChangeHandler } from '../../../interfaces/renderProps.interface';
4
- interface ChoiceSelectAnswerValueSetItemProps extends PropsWithQrItemChangeHandler<QuestionnaireResponseItem>, PropsWithIsRepeatedAttribute, PropsWithIsTabledAttribute {
3
+ import type { PropsWithIsRepeatedAttribute, PropsWithIsTabledAttribute, PropsWithParentIsReadOnlyAttribute, PropsWithQrItemChangeHandler } from '../../../interfaces/renderProps.interface';
4
+ interface ChoiceSelectAnswerValueSetItemProps extends PropsWithQrItemChangeHandler<QuestionnaireResponseItem>, PropsWithIsRepeatedAttribute, PropsWithIsTabledAttribute, PropsWithParentIsReadOnlyAttribute {
5
5
  qItem: QuestionnaireItem;
6
6
  qrItem: QuestionnaireResponseItem;
7
7
  }
@@ -15,28 +15,26 @@
15
15
  * limitations under the License.
16
16
  */
17
17
  import React, { useEffect, useMemo } from 'react';
18
- import Autocomplete from '@mui/material/Autocomplete';
19
18
  import Grid from '@mui/material/Grid';
20
- import Typography from '@mui/material/Typography';
21
19
  import { createEmptyQrItem } from '../../../utils/qrItem';
22
- import { StandardTextField } from '../Textfield.styles';
23
20
  import { FullWidthFormComponentBox } from '../../Box.styles';
24
21
  import useValueSetCodings from '../../../hooks/useValueSetCodings';
25
22
  import useRenderingExtensions from '../../../hooks/useRenderingExtensions';
26
- import ErrorOutlineIcon from '@mui/icons-material/ErrorOutline';
27
- import { StyledAlert } from '../../Alert.styles';
28
23
  import DisplayInstructions from '../DisplayItem/DisplayInstructions';
29
24
  import LabelWrapper from '../ItemParts/ItemLabelWrapper';
25
+ import ChoiceSelectAnswerValueSetFields from './ChoiceSelectAnswerValueSetFields';
26
+ import useReadOnly from '../../../hooks/useReadOnly';
30
27
  function ChoiceSelectAnswerValueSetItem(props) {
31
- const { qItem, qrItem, isRepeated, isTabled, onQrItemChange } = props;
28
+ var _a;
29
+ const { qItem, qrItem, isRepeated, isTabled, parentIsReadOnly, onQrItemChange } = props;
30
+ const readOnly = useReadOnly(qItem, parentIsReadOnly);
31
+ const { displayInstructions } = useRenderingExtensions(qItem);
32
32
  // Init input value
33
33
  const qrChoiceSelect = qrItem !== null && qrItem !== void 0 ? qrItem : createEmptyQrItem(qItem);
34
- let valueCoding;
34
+ let valueCoding = null;
35
35
  if (qrChoiceSelect.answer) {
36
- valueCoding = qrChoiceSelect.answer[0].valueCoding;
36
+ valueCoding = (_a = qrChoiceSelect.answer[0].valueCoding) !== null && _a !== void 0 ? _a : null;
37
37
  }
38
- // Get additional rendering extensions
39
- const { displayUnit, displayPrompt, displayInstructions, readOnly, entryFormat } = useRenderingExtensions(qItem);
40
38
  // Get codings/options from valueSet
41
39
  const { codings, serverError } = useValueSetCodings(qItem);
42
40
  valueCoding = useMemo(() => {
@@ -55,30 +53,23 @@ function ChoiceSelectAnswerValueSetItem(props) {
55
53
  // eslint-disable-next-line react-hooks/exhaustive-deps
56
54
  []);
57
55
  // Event handlers
58
- function handleChange(_, newValue) {
56
+ function handleChange(newValue) {
59
57
  if (newValue) {
60
58
  onQrItemChange(Object.assign(Object.assign({}, createEmptyQrItem(qItem)), { answer: [{ valueCoding: newValue }] }));
61
59
  return;
62
60
  }
63
61
  onQrItemChange(createEmptyQrItem(qItem));
64
62
  }
65
- const choiceSelectAnswerValueSet = codings.length > 0 ? (React.createElement(Autocomplete, { id: qItem.id, options: codings, getOptionLabel: (option) => `${option.display}`, value: valueCoding !== null && valueCoding !== void 0 ? valueCoding : null, onChange: handleChange, openOnFocus: true, autoHighlight: true, sx: { maxWidth: !isTabled ? 280 : 3000, minWidth: 160, flexGrow: 1 }, size: "small", disabled: readOnly, placeholder: entryFormat, renderInput: (params) => (React.createElement(StandardTextField, Object.assign({ isTabled: isTabled, label: displayPrompt }, params, { InputProps: Object.assign(Object.assign({}, params.InputProps), { endAdornment: (React.createElement(React.Fragment, null,
66
- params.InputProps.endAdornment,
67
- displayUnit)) }), "data-test": "q-item-choice-dropdown-answer-value-set-field" }))) })) : serverError ? (React.createElement(StyledAlert, { color: "error" },
68
- React.createElement(ErrorOutlineIcon, { color: "error", sx: { pr: 0.75 } }),
69
- React.createElement(Typography, { variant: "subtitle2" }, "There was an error fetching options from the terminology server"))) : (React.createElement(StyledAlert, { color: "error" },
70
- React.createElement(ErrorOutlineIcon, { color: "error", sx: { pr: 0.75 } }),
71
- React.createElement(Typography, { variant: "subtitle2" }, "Unable to fetch options from the questionnaire or launch context")));
72
63
  if (isRepeated) {
73
- return React.createElement(React.Fragment, null, choiceSelectAnswerValueSet);
64
+ return (React.createElement(ChoiceSelectAnswerValueSetFields, { qItem: qItem, codings: codings, valueCoding: valueCoding, serverError: serverError, readOnly: readOnly, isTabled: isTabled, onSelectChange: handleChange }));
74
65
  }
75
66
  return (React.createElement(FullWidthFormComponentBox, { "data-test": "q-item-choice-dropdown-answer-value-set-box" },
76
67
  React.createElement(Grid, { container: true, columnSpacing: 6 },
77
68
  React.createElement(Grid, { item: true, xs: 5 },
78
- React.createElement(LabelWrapper, { qItem: qItem })),
69
+ React.createElement(LabelWrapper, { qItem: qItem, readOnly: readOnly })),
79
70
  React.createElement(Grid, { item: true, xs: 7 },
80
- choiceSelectAnswerValueSet,
81
- React.createElement(DisplayInstructions, { displayInstructions: displayInstructions })))));
71
+ React.createElement(ChoiceSelectAnswerValueSetFields, { qItem: qItem, codings: codings, valueCoding: valueCoding, serverError: serverError, readOnly: readOnly, isTabled: isTabled, onSelectChange: handleChange }),
72
+ React.createElement(DisplayInstructions, { displayInstructions: displayInstructions, readOnly: readOnly })))));
82
73
  }
83
74
  export default ChoiceSelectAnswerValueSetItem;
84
75
  //# sourceMappingURL=ChoiceSelectAnswerValueSetItem.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"ChoiceSelectAnswerValueSetItem.js","sourceRoot":"","sources":["../../../../src/components/FormComponents/ChoiceItems/ChoiceSelectAnswerValueSetItem.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAGH,OAAO,KAAK,EAAE,EAAE,SAAS,EAAE,OAAO,EAAE,MAAM,OAAO,CAAC;AAClD,OAAO,YAAY,MAAM,4BAA4B,CAAC;AACtD,OAAO,IAAI,MAAM,oBAAoB,CAAC;AACtC,OAAO,UAAU,MAAM,0BAA0B,CAAC;AAGlD,OAAO,EAAE,iBAAiB,EAAE,MAAM,uBAAuB,CAAC;AAC1D,OAAO,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AACxD,OAAO,EAAE,yBAAyB,EAAE,MAAM,kBAAkB,CAAC;AAC7D,OAAO,kBAAkB,MAAM,mCAAmC,CAAC;AACnE,OAAO,sBAAsB,MAAM,uCAAuC,CAAC;AAC3E,OAAO,gBAAgB,MAAM,kCAAkC,CAAC;AAMhE,OAAO,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AACjD,OAAO,mBAAmB,MAAM,oCAAoC,CAAC;AACrE,OAAO,YAAY,MAAM,+BAA+B,CAAC;AAUzD,SAAS,8BAA8B,CAAC,KAA0C;IAChF,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,UAAU,EAAE,QAAQ,EAAE,cAAc,EAAE,GAAG,KAAK,CAAC;IAEtE,mBAAmB;IACnB,MAAM,cAAc,GAAG,MAAM,aAAN,MAAM,cAAN,MAAM,GAAI,iBAAiB,CAAC,KAAK,CAAC,CAAC;IAC1D,IAAI,WAA+B,CAAC;IACpC,IAAI,c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AAC,EAAE,EAAE,EAAE,EAAE,EAAE,IAAI,EAAE,GAAI;QACpD,oBAAC,UAAU,IAAC,OAAO,EAAC,WAAW,uEAElB,CACD,CACf,CAAC;IAEJ,IAAI,UAAU,EAAE;QACd,OAAO,0CAAG,0BAA0B,CAAI,CAAC;KAC1C;IAED,OAAO,CACL,oBAAC,yBAAyB,iBAAW,6CAA6C;QAChF,oBAAC,IAAI,IAAC,SAAS,QAAC,aAAa,EAAE,CAAC;YAC9B,oBAAC,IAAI,IAAC,IAAI,QAAC,EAAE,EAAE,CAAC;gBACd,oBAAC,YAAY,IAAC,KAAK,EAAE,KAAK,GAAI,CACzB;YACP,oBAAC,IAAI,IAAC,IAAI,QAAC,EAAE,EAAE,CAAC;gBACb,0BAA0B;gBAC3B,oBAAC,mBAAmB,IAAC,mBAAmB,EAAE,mBAAmB,GAAI,CAC5D,CACF,CACmB,CAC7B,CAAC;AACJ,CAAC;AAED,eAAe,8BAA8B,CAAC"}
1
+ {"version":3,"file":"ChoiceSelectAnswerValueSetItem.js","sourceRoot":"","sources":["../../../../src/components/FormComponents/ChoiceItems/ChoiceSelectAnswerValueSetItem.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAEH,OAAO,KAAK,EAAE,EAAE,SAAS,EAAE,OAAO,EAAE,MAAM,OAAO,CAAC;AAClD,OAAO,IAAI,MAAM,oBAAoB,CAAC;AAGtC,OAAO,EAAE,iBAAiB,EAAE,MAAM,uBAAuB,CAAC;AAC1D,OAAO,EAAE,yBAAyB,EAAE,MAAM,kBAAkB,CAAC;AAC7D,OAAO,kBAAkB,MAAM,mCAAmC,CAAC;AACnE,OAAO,sBAAsB,MAAM,uCAAuC,CAAC;AAO3E,OAAO,mBAAmB,MAAM,oCAAoC,CAAC;AACrE,OAAO,YAAY,MAAM,+BAA+B,CAAC;AACzD,OAAO,gCAAgC,MAAM,oCAAoC,CAAC;AAClF,OAAO,WAAW,MAAM,4BAA4B,CAAC;AAWrD,SAAS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 -1,7 +1,8 @@
1
1
  import React from 'react';
2
2
  import type { PropsWithIsRepeatedAttribute, PropsWithIsTabledAttribute, PropsWithQrItemChangeHandler } from '../../../interfaces/renderProps.interface';
3
+ import type { PropsWithParentIsReadOnlyAttribute } from '../../../interfaces/renderProps.interface';
3
4
  import type { QuestionnaireItem, QuestionnaireResponseItem } from 'fhir/r4';
4
- interface DateItemProps extends PropsWithQrItemChangeHandler<QuestionnaireResponseItem>, PropsWithIsRepeatedAttribute, PropsWithIsTabledAttribute {
5
+ interface DateItemProps extends PropsWithQrItemChangeHandler<QuestionnaireResponseItem>, PropsWithIsRepeatedAttribute, PropsWithIsTabledAttribute, PropsWithParentIsReadOnlyAttribute {
5
6
  qItem: QuestionnaireItem;
6
7
  qrItem: QuestionnaireResponseItem;
7
8
  }
@@ -21,10 +21,11 @@ import { FullWidthFormComponentBox } from '../../Box.styles';
21
21
  import ItemFieldGrid from '../ItemParts/ItemFieldGrid';
22
22
  import DateField from './DateField';
23
23
  import dayjs from 'dayjs';
24
+ import useReadOnly from '../../../hooks/useReadOnly';
24
25
  function DateItem(props) {
25
- const { qItem, qrItem, isRepeated, isTabled, onQrItemChange } = props;
26
- // Get additional rendering extensions
27
- const { displayPrompt, displayInstructions, readOnly, entryFormat } = useRenderingExtensions(qItem);
26
+ const { qItem, qrItem, isRepeated, isTabled, parentIsReadOnly, onQrItemChange } = props;
27
+ const readOnly = useReadOnly(qItem, parentIsReadOnly);
28
+ const { displayPrompt, displayInstructions, entryFormat } = useRenderingExtensions(qItem);
28
29
  // Init input value
29
30
  let dateString = null;
30
31
  if (qrItem === null || qrItem === void 0 ? void 0 : qrItem.answer) {
@@ -50,7 +51,7 @@ function DateItem(props) {
50
51
  return (React.createElement(DateField, { value: dateDayJs, displayPrompt: displayPrompt, entryFormat: entryFormat, readOnly: readOnly, onDateChange: handleDateChange, isTabled: isTabled }));
51
52
  }
52
53
  return (React.createElement(FullWidthFormComponentBox, { "data-test": "q-item-date-box" },
53
- React.createElement(ItemFieldGrid, { qItem: qItem, displayInstructions: displayInstructions },
54
+ React.createElement(ItemFieldGrid, { qItem: qItem, displayInstructions: displayInstructions, readOnly: readOnly },
54
55
  React.createElement(DateField, { value: dateDayJs, displayPrompt: displayPrompt, entryFormat: entryFormat, readOnly: readOnly, onDateChange: handleDateChange, isTabled: isTabled }))));
55
56
  }
56
57
  export default DateItem;
@@ -1 +1 @@
1
- {"version":3,"file":"DateItem.js","sourceRoot":"","sources":["../../../../src/components/FormComponents/DateItem/DateItem.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAEH,OAAO,KAAK,MAAM,OAAO,CAAC;AAO1B,OAAO,sBAAsB,MAAM,uCAAuC,CAAC;AAC3E,OAAO,EAAE,iBAAiB,EAAE,MAAM,uBAAuB,CAAC;AAC1D,OAAO,EAAE,yBAAyB,EAAE,MAAM,kBAAkB,CAAC;AAC7D,OAAO,aAAa,MAAM,4BAA4B,CAAC;AACvD,OAAO,SAAS,MAAM,aAAa,CAAC;AAEpC,OAAO,KAAK,MAAM,OAAO,CAAC;AAU1B,SAAS,QAAQ,CAAC,KAAoB;IACpC,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,UAAU,EAAE,QAAQ,EAAE,cAAc,EAAE,GAAG,KAAK,CAAC;IAEtE,sCAAsC;IACtC,MAAM,EAAE,aAAa,EAAE,mBAAmB,EAAE,QAAQ,EAAE,WAAW,EAAE,GACjE,sBAAsB,CAAC,KAAK,CAAC,CAAC;IAEhC,mBAAmB;IACnB,IAAI,UAAU,GAAkB,IAAI,CAAC;IAErC,IAAI,MAAM,aAAN,MAAM,uBAAN,MAAM,CAAE,MAAM,EAAE;QAClB,IAAI,MAAM,aAAN,MAAM,uBAAN,MAAM,CAAE,MAAM,CAAC,CAAC,EAAE,SAAS,EAAE;YAC/B,UAAU,GAAG,MAAM,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC;SACzC;aAAM,IAAI,MAAM,aAAN,MAAM,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AI,CAAC;IAExD,iBAAiB;IACjB,SAAS,gBAAgB,CAAC,QAAsB;QAC9C,MAAM,WAAW,GAAG,iBAAiB,CAAC,KAAK,CAAC,CAAC;QAC7C,IAAI,QAAQ,EAAE;YACZ,cAAc,iCAAM,WAAW,KAAE,MAAM,EAAE,CAAC,EAAE,SAAS,EAAE,QAAQ,CAAC,MAAM,CAAC,YAAY,CAAC,EAAE,CAAC,IAAG,CAAC;SAC5F;aAAM;YACL,cAAc,CAAC,WAAW,CAAC,CAAC;SAC7B;IACH,CAAC;IAED,IAAI,UAAU,EAAE;QACd,OAAO,CACL,oBAAC,SAAS,IACR,KAAK,EAAE,SAAS,EAChB,aAAa,EAAE,aAAa,EAC5B,WAAW,EAAE,WAAW,EACxB,QAAQ,EAAE,QAAQ,EAClB,YAAY,EAAE,gBAAgB,EAC9B,QAAQ,EAAE,QAAQ,GAClB,CACH,CAAC;KACH;IAED,OAAO,CACL,oBAAC,yBAAyB,iBAAW,iBAAiB;QACpD,oBAAC,aAAa,IAAC,KAAK,EAAE,KAAK,EAAE,mBAAmB,EAAE,mBAAmB,EAAE,QAAQ,EAAE,QAAQ;YACvF,oBAAC,SAAS,IACR,KAAK,EAAE,SAAS,EAChB,aAAa,EAAE,aAAa,EAC5B,WAAW,EAAE,WAAW,EACxB,QAAQ,EAAE,QAAQ,EAClB,YAAY,EAAE,gBAAgB,EAC9B,QAAQ,EAAE,QAAQ,GAClB,CACY,CACU,CAC7B,CAAC;AACJ,CAAC;AAED,eAAe,QAAQ,CAAC"}
@@ -0,0 +1,2 @@
1
+ import { DatePicker } from '@mui/x-date-pickers';
2
+ export default DatePicker;
@@ -0,0 +1,42 @@
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, { useState } from 'react';
18
+ import { DatePicker, LocalizationProvider } from '@mui/x-date-pickers';
19
+ import { AdapterDayjs } from '@mui/x-date-pickers/AdapterDayjs';
20
+ function DateField(props) {
21
+ const { value, displayPrompt, entryFormat, readOnly, isTabled, onDateChange } = props;
22
+ const [name, setName] = useState('');
23
+ function handleInputChange(newValue) {
24
+ setName(newValue);
25
+ }
26
+ return (React.createElement(LocalizationProvider, { dateAdapter: AdapterDayjs },
27
+ React.createElement(DatePicker, { format: entryFormat !== '' ? entryFormat : 'DD/MM/YYYY', value: value, disabled: readOnly, label: displayPrompt, sx: { maxWidth: !isTabled ? 280 : 3000, minWidth: 160 }, onChange: onDateChange, slots: { textField: DatePickerField }, slotProps: { textField: { helperText: 'Please enter a valid date' } }, "data-test": "q-item-date-field" })));
28
+ }
29
+ function DatePickerField({ value: string, onChange: }) { }
30
+ () => ;
31
+ {
32
+ // Parse the value for a valid date time
33
+ const parsedValue = new Date(value);
34
+ // Convert the parsed value to the format that is used in the DatePicker
35
+ const formattedValue = parsedValue.toLocaleDateString();
36
+ return (React.createElement(MuiTextField, { value: formattedValue, onChange: () => {
37
+ // Change the value of the DatePicker
38
+ onChange(parsedValue);
39
+ } }));
40
+ }
41
+ export default DatePicker;
42
+ //# sourceMappingURL=DatePicker.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"DatePicker.js","sourceRoot":"","sources":["../../../../src/components/FormComponents/DateItem/DatePicker.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAEH,OAAO,KAAK,EAAE,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAGxC,OAAO,EAAE,UAAU,EAAE,oBAAoB,EAA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ACxD,OAAO,CACL,oBAAC,YAAY,IACX,KAAK,EAAE,cAAc,EACrB,QAAQ,EAAE,GAAG,EAAE;YACb,qCAAqC;YACrC,QAAQ,CAAC,WAAW,CAAC,CAAC;QACxB,CAAC,GACD,CACH,CAAC;CACH;AAED,eAAe,UAAU,CAAC"}
@@ -0,0 +1,8 @@
1
+ import React from 'react';
2
+ import type { PropsWithIsTabledAttribute } from '../../../interfaces/renderProps.interface';
3
+ interface DatePickerProps extends PropsWithIsTabledAttribute {
4
+ input: string;
5
+ onInputChange: (newInput: string) => string;
6
+ }
7
+ declare function DatePickerField(props: DatePickerProps): React.JSX.Element;
8
+ export default DatePickerField;
@@ -14,12 +14,11 @@
14
14
  * See the License for the specific language governing permissions and
15
15
  * limitations under the License.
16
16
  */
17
-
18
- import { styled } from '@mui/material/styles';
19
- import Typography from '@mui/material/Typography';
20
-
21
- export const QGroupHeadingTypography = styled(Typography, {
22
- shouldForwardProp: (prop) => prop !== 'isTabHeading'
23
- })<{ isTabHeading?: boolean }>(({ isTabHeading }) => ({
24
- fontSize: isTabHeading ? 16 : 15
25
- }));
17
+ import React from 'react';
18
+ import MuiTextField from '../TextItem/MuiTextField';
19
+ function DatePickerField(props) {
20
+ const { input, onInputChange } = props;
21
+ return React.createElement(MuiTextField, { value: input, onChange: (event) => onInputChange(event.target.value) });
22
+ }
23
+ export default DatePickerField;
24
+ //# sourceMappingURL=DatePickerField.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"DatePickerField.js","sourceRoot":"","sources":["../../../../src/components/FormComponents/DateItem/DatePickerField.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAEH,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,YAAY,MAAM,0BAA0B,CAAC;AAOpD,SAAS,eAAe,CAAC,KAAsB;IAC7C,MAAM,EAAE,KAAK,EAAE,aAAa,EAAE,GAAG,KAAK,CAAC;IAEvC,OAAO,oBAAC,YAAY,IAAC,KAAK,EAAE,KAAK,EAAE,QAAQ,EAAE,CAAC,KAAK,EAAE,EAAE,CAAC,aAAa,CAAC,KAAK,CAAC,MAAM,CAAC,KAAK,CAAC,GAAI,CAAC;AAChG,CAAC;AAED,eAAe,eAAe,CAAC"}
@@ -1,7 +1,7 @@
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 DateTimeItemProps extends PropsWithQrItemChangeHandler<QuestionnaireResponseItem>, PropsWithIsRepeatedAttribute, PropsWithIsTabledAttribute {
4
+ interface DateTimeItemProps extends PropsWithQrItemChangeHandler<QuestionnaireResponseItem>, PropsWithIsRepeatedAttribute, PropsWithIsTabledAttribute, PropsWithParentIsReadOnlyAttribute {
5
5
  qItem: QuestionnaireItem;
6
6
  qrItem: QuestionnaireResponseItem;
7
7
  }
@@ -21,10 +21,11 @@ import { FullWidthFormComponentBox } from '../../Box.styles';
21
21
  import ItemFieldGrid from '../ItemParts/ItemFieldGrid';
22
22
  import DateTimeField from './DateTimeField';
23
23
  import dayjs from 'dayjs';
24
+ import useReadOnly from '../../../hooks/useReadOnly';
24
25
  function DateTimeItem(props) {
25
- const { qItem, qrItem, isRepeated, isTabled, onQrItemChange } = props;
26
- // Get additional rendering extensions
27
- const { displayPrompt, displayInstructions, readOnly, entryFormat } = useRenderingExtensions(qItem);
26
+ const { qItem, qrItem, isRepeated, isTabled, parentIsReadOnly, onQrItemChange } = props;
27
+ const readOnly = useReadOnly(qItem, parentIsReadOnly);
28
+ const { displayPrompt, displayInstructions, entryFormat } = useRenderingExtensions(qItem);
28
29
  // Init input value
29
30
  let dateTimeString = null;
30
31
  if (qrItem === null || qrItem === void 0 ? void 0 : qrItem.answer) {
@@ -50,7 +51,7 @@ function DateTimeItem(props) {
50
51
  return (React.createElement(DateTimeField, { value: dateTimeDayJs, displayPrompt: displayPrompt, entryFormat: entryFormat, readOnly: readOnly, onDateTimeChange: handleDateTimeChange, isTabled: isTabled }));
51
52
  }
52
53
  return (React.createElement(FullWidthFormComponentBox, { "data-test": "q-item-date-time-box" },
53
- React.createElement(ItemFieldGrid, { qItem: qItem, displayInstructions: displayInstructions },
54
+ React.createElement(ItemFieldGrid, { qItem: qItem, displayInstructions: displayInstructions, readOnly: readOnly },
54
55
  React.createElement(DateTimeField, { value: dateTimeDayJs, displayPrompt: displayPrompt, entryFormat: entryFormat, readOnly: readOnly, onDateTimeChange: handleDateTimeChange, isTabled: isTabled }))));
55
56
  }
56
57
  export default DateTimeItem;
@@ -1 +1 @@
1
- {"version":3,"file":"DateTimeItem.js","sourceRoot":"","sources":["../../../../src/components/FormComponents/DateTimeItem/DateTimeItem.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAEH,OAAO,KAAK,MAAM,OAAO,CAAC;AAO1B,OAAO,sBAAsB,MAAM,uCAAuC,CAAC;AAC3E,OAAO,EAAE,iBAAiB,EAAE,MAAM,uBAAuB,CAAC;AAC1D,OAAO,EAAE,yBAAyB,EAAE,MAAM,kBAAkB,CAAC;AAC7D,OAAO,aAAa,MAAM,4BAA4B,CAAC;AACvD,OAAO,aAAa,MAAM,iBAAiB,CAAC;AAE5C,OAAO,KAAK,MAAM,OAAO,CAAC;AAU1B,SAAS,YAAY,CAAC,KAAwB;IAC5C,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,UAAU,EAAE,QAAQ,EAAE,cAAc,EAAE,GAAG,KAAK,CAAC;IAEtE,sCAAsC;IACtC,MAAM,EAAE,aAAa,EAAE,mBAAmB,EAAE,QAAQ,EAAE,WAAW,EAAE,GACjE,sBAAsB,CAAC,KAAK,CAAC,CAAC;IAEhC,mBAAmB;IACnB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@ -1,7 +1,7 @@
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 DecimalItemProps extends PropsWithQrItemChangeHandler<QuestionnaireResponseItem>, PropsWithIsRepeatedAttribute, PropsWithIsTabledAttribute {
4
+ interface DecimalItemProps extends PropsWithQrItemChangeHandler<QuestionnaireResponseItem>, PropsWithIsRepeatedAttribute, PropsWithIsTabledAttribute, PropsWithParentIsReadOnlyAttribute {
5
5
  qItem: QuestionnaireItem;
6
6
  qrItem: QuestionnaireResponseItem;
7
7
  }
@@ -27,11 +27,12 @@ import { parseDecimalStringToFloat, parseDecimalStringWithPrecision } from '../.
27
27
  import { getDecimalPrecision } from '../../../utils/itemControl';
28
28
  import useDecimalCalculatedExpression from '../../../hooks/useDecimalCalculatedExpression';
29
29
  import useStringInput from '../../../hooks/useStringInput';
30
+ import useReadOnly from '../../../hooks/useReadOnly';
30
31
  function DecimalItem(props) {
31
- const { qItem, qrItem, isRepeated, isTabled, onQrItemChange } = props;
32
- // Get additional rendering extensions
32
+ const { qItem, qrItem, isRepeated, isTabled, parentIsReadOnly, onQrItemChange } = props;
33
+ const readOnly = useReadOnly(qItem, parentIsReadOnly);
33
34
  const precision = getDecimalPrecision(qItem);
34
- const { displayUnit, displayPrompt, displayInstructions, readOnly, entryFormat, regexValidation, maxLength } = useRenderingExtensions(qItem);
35
+ const { displayUnit, displayPrompt, displayInstructions, entryFormat, regexValidation, maxLength } = useRenderingExtensions(qItem);
35
36
  // Init input value
36
37
  let valueDecimal = 0.0;
37
38
  let initialInput = '0';
@@ -74,7 +75,7 @@ function DecimalItem(props) {
74
75
  return (React.createElement(DecimalField, { linkId: qItem.linkId, input: input, feedback: feedback, displayPrompt: displayPrompt, displayUnit: displayUnit, entryFormat: entryFormat, readOnly: readOnly, calcExpUpdated: calcExpUpdated, isTabled: isTabled, onInputChange: handleInputChange }));
75
76
  }
76
77
  return (React.createElement(FullWidthFormComponentBox, { "data-test": "q-item-decimal-box" },
77
- React.createElement(ItemFieldGrid, { qItem: qItem, displayInstructions: displayInstructions },
78
+ React.createElement(ItemFieldGrid, { qItem: qItem, displayInstructions: displayInstructions, readOnly: readOnly },
78
79
  React.createElement(DecimalField, { linkId: qItem.linkId, input: input, feedback: feedback, displayPrompt: displayPrompt, displayUnit: displayUnit, entryFormat: entryFormat, readOnly: readOnly, calcExpUpdated: calcExpUpdated, isTabled: isTabled, onInputChange: handleInputChange }))));
79
80
  }
80
81
  export default DecimalItem;
@@ -1 +1 @@
1
- {"version":3,"file":"DecimalItem.js","sourceRoot":"","sources":["../../../../src/components/FormComponents/DecimalItem/DecimalItem.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAEH,OAAO,KAAK,EAAE,EAAE,WAAW,EAAE,MAAM,OAAO,CAAC;AAO3C,OAAO,sBAAsB,MAAM,uCAAuC,CAAC;AAC3E,OAAO,EAAE,yBAAyB,EAAE,MAAM,kBAAkB,CAAC;AAC7D,OAAO,kBAAkB,MAAM,mCAAmC,CAAC;AACnE,OAAO,QAAQ,MAAM,iBAAiB,CAAC;AACvC,OAAO,EAAE,iBAAiB,EAAE,MAAM,yBAAyB,CAAC;AAC5D,OAAO,EAAE,yBAAyB,EAAE,MAAM,uBAAuB,CAAC;AAClE,OAAO,aAAa,MAAM,4BAA4B,CAAC;AACvD,OAAO,YAAY,MAAM,gBAAgB,CAAC;AAC1C,OAAO,EACL,yBAAyB,EACzB,+BAA+B,EAChC,MAAM,4BAA4B,CAAC;AACpC,OAAO,EAAE,mBAAmB,EAAE,MAAM,4BAA4B,CAAC;AACjE,OAAO,8BAA8B,MAAM,+CAA+C,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,iBAAiB,GAChC,CACH,CAAC;KACH;IAED,OAAO,CACL,oBAAC,yBAAyB,iBAAW,oBAAoB;QACvD,oBAAC,aAAa,IAAC,KAAK,EAAE,KAAK,EAAE,mBAAmB,EAAE,mBAAmB;YACnE,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
+ {"version":3,"file":"DecimalItem.js","sourceRoot":"","sources":["../../../../src/components/FormComponents/DecimalItem/DecimalItem.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAEH,OAAO,KAAK,EAAE,EAAE,WAAW,EAAE,MAAM,OAAO,CAAC;AAQ3C,OAAO,sBAAsB,MAAM,uCAAuC,CAAC;AAC3E,OAAO,EAAE,yBAAyB,EAAE,MAAM,kBAAkB,CAAC;AAC7D,OAAO,kBAAkB,MAAM,mCAAmC,CAAC;AACnE,OAAO,QAAQ,MAAM,iBAAiB,CAAC;AACvC,OAAO,EAAE,iBAAiB,EAAE,MAAM,yBAAyB,CAAC;AAC5D,OAAO,EAAE,yBAAyB,EAAE,MAAM,uBAAuB,CAAC;AAClE,OAAO,aAAa,MAAM,4BAA4B,CAAC;AACvD,OAAO,YAAY,MAAM,gBAAgB,CAAC;AAC1C,OAAO,EACL,yBAAyB,EACzB,+BAA+B,EAChC,MAAM,4BAA4B,CAAC;AACpC,OAAO,EAAE,mBAAmB,EAAE,MAAM,4BAA4B,CAAC;AACjE,OAAO,8BAA8B,MAAM,+CAA+C,CAAC;AAC3F,OAAO,cAAc,MAA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AClB,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,7 @@
1
1
  import React from 'react';
2
2
  interface DisplayInstructionsProps {
3
3
  displayInstructions: string;
4
+ readOnly: boolean;
4
5
  }
5
6
  declare const DisplayInstructions: React.NamedExoticComponent<DisplayInstructionsProps>;
6
7
  export default DisplayInstructions;
@@ -18,9 +18,9 @@ import React, { memo } from 'react';
18
18
  import Typography from '@mui/material/Typography';
19
19
  import { DisplayInstructionsWrapper } from './DisplayInstructions.styles';
20
20
  const DisplayInstructions = memo(function DisplayInstructions(props) {
21
- const { displayInstructions } = props;
21
+ const { displayInstructions, readOnly } = props;
22
22
  return displayInstructions ? (React.createElement(DisplayInstructionsWrapper, null,
23
- React.createElement(Typography, { variant: "caption", fontSize: 10.5 }, displayInstructions))) : null;
23
+ React.createElement(Typography, { variant: "caption", fontSize: 10.5, color: readOnly ? 'text.secondary' : 'text.primary' }, displayInstructions))) : null;
24
24
  });
25
25
  export default DisplayInstructions;
26
26
  //# sourceMappingURL=DisplayInstructions.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"DisplayInstructions.js","sourceRoot":"","sources":["../../../../src/components/FormComponents/DisplayItem/DisplayInstructions.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAEH,OAAO,KAAK,EAAE,EAAE,IAAI,EAAE,MAAM,OAAO,CAAC;AACpC,OAAO,UAAU,MAAM,0BAA0B,CAAC;AAClD,OAAO,EAAE,0BAA0B,EAAE,MAAM,8BAA8B,CAAC;AAM1E,MAAM,mBAAmB,GAAG,IAAI,CAAC,SAAS,mBAAmB,CAAC,KAA+B;IAC3F,MAAM,EAAE,mBAAmB,EAAE,GAAG,KAAK,CAAC;IAEtC,OAAO,mBAAmB,CAAC,CAAC,CAAC,CAC3B,oBAAC,0BAA0B;QACzB,oBAAC,UAAU,IAAC,OAAO,EAAC,SAAS,EAAC,QAAQ,EAAE,IAAI,IACzC,mBAAmB,CACT,CACc,CAC9B,CAAC,CAAC,CAAC,IAAI,CAAC;AACX,CAAC,CAAC,CAAC;AAEH,eAAe,mBAAmB,CAAC"}
1
+ {"version":3,"file":"DisplayInstructions.js","sourceRoot":"","sources":["../../../../src/components/FormComponents/DisplayItem/DisplayInstructions.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAEH,OAAO,KAAK,EAAE,EAAE,IAAI,EAAE,MAAM,OAAO,CAAC;AACpC,OAAO,UAAU,MAAM,0BAA0B,CAAC;AAClD,OAAO,EAAE,0BAA0B,EAAE,MAAM,8BAA8B,CAAC;AAO1E,MAAM,mBAAmB,GAAG,IAAI,CAAC,SAAS,mBAAmB,CAAC,KAA+B;IAC3F,MAAM,EAAE,mBAAmB,EAAE,QAAQ,EAAE,GAAG,KAAK,CAAC;IAEhD,OAAO,mBAAmB,CAAC,CAAC,CAAC,CAC3B,oBAAC,0BAA0B;QACzB,oBAAC,UAAU,IACT,OAAO,EAAC,SAAS,EACjB,QAAQ,EAAE,IAAI,EACd,KAAK,EAAE,QAAQ,CAAC,CAAC,CAAC,gBAAgB,CAAC,CAAC,CAAC,cAAc,IAClD,mBAAmB,CACT,CACc,CAC9B,CAAC,CAAC,CAAC,IAAI,CAAC;AACX,CAAC,CAAC,CAAC;AAEH,eAAe,mBAAmB,CAAC"}
@@ -1,9 +1,4 @@
1
1
  /// <reference types="react" />
2
- export declare const DisplayInstructionsWrapper: import("@emotion/styled").StyledComponent<import("@mui/system").SystemProps<import("@mui/material/styles").Theme> & {
3
- children?: import("react").ReactNode;
4
- component?: import("react").ElementType<any> | undefined;
5
- ref?: import("react").Ref<unknown> | undefined;
6
- sx?: import("@mui/material/styles").SxProps<import("@mui/material/styles").Theme> | undefined;
7
- } & Omit<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
2
+ export declare const DisplayInstructionsWrapper: import("@emotion/styled").StyledComponent<import("@mui/system").BoxOwnProps<import("@mui/material/styles").Theme> & Omit<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
8
3
  ref?: ((instance: HTMLDivElement | null) => void) | import("react").RefObject<HTMLDivElement> | null | undefined;
9
- }, ("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") | "ref" | "children" | "component" | "sx"> & import("@mui/system").MUIStyledCommonProps<import("@mui/material/styles").Theme>, {}, {}>;
4
+ }, keyof import("@mui/system").BoxOwnProps<import("@mui/material/styles").Theme>> & import("@mui/system").MUIStyledCommonProps<import("@mui/material/styles").Theme>, {}, {}>;
@@ -16,7 +16,7 @@
16
16
  */
17
17
  import React, { memo } from 'react';
18
18
  import { FullWidthFormComponentBox } from '../../Box.styles';
19
- import { isSpecificItemControl } from '../../../utils/itemControl';
19
+ import { isSpecificItemControl } from '../../../utils';
20
20
  import LabelWrapper from '../ItemParts/ItemLabelWrapper';
21
21
  const DisplayItem = memo(function DisplayItem(props) {
22
22
  const { qItem } = props;
@@ -25,7 +25,7 @@ const DisplayItem = memo(function DisplayItem(props) {
25
25
  return null;
26
26
  }
27
27
  return (React.createElement(FullWidthFormComponentBox, null,
28
- React.createElement(LabelWrapper, { qItem: qItem })));
28
+ React.createElement(LabelWrapper, { qItem: qItem, readOnly: false })));
29
29
  });
30
30
  export default DisplayItem;
31
31
  //# sourceMappingURL=DisplayItem.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"DisplayItem.js","sourceRoot":"","sources":["../../../../src/components/FormComponents/DisplayItem/DisplayItem.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAEH,OAAO,KAAK,EAAE,EAAE,IAAI,EAAE,MAAM,OAAO,CAAC;AAEpC,OAAO,EAAE,yBAAyB,EAAE,MAAM,kBAAkB,CAAC;AAC7D,OAAO,EAAE,qBAAqB,EAAE,MAAM,4BAA4B,CAAC;AACnE,OAAO,YAAY,MAAM,+BAA+B,CAAC;AAMzD,MAAM,WAAW,GAAG,IAAI,CAAC,SAAS,WAAW,CAAC,KAAuB;IACnE,MAAM,EAAE,KAAK,EAAE,GAAG,KAAK,CAAC;IAExB,MAAM,gBAAgB,GAAG,qBAAqB,CAAC,KAAK,EAAE,iBAAiB,CAAC,CAAC;IACzE,IAAI,gBAAgB,EAAE;QACpB,OAAO,IAAI,CAAC;KACb;IAED,OAAO,CACL,oBAAC,yBAAyB;QACxB,oBAAC,YAAY,IAAC,KAAK,EAAE,KAAK,GAAI,CACJ,CAC7B,CAAC;AACJ,CAAC,CAAC,CAAC;AAEH,eAAe,WAAW,CAAC"}
1
+ {"version":3,"file":"DisplayItem.js","sourceRoot":"","sources":["../../../../src/components/FormComponents/DisplayItem/DisplayItem.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAEH,OAAO,KAAK,EAAE,EAAE,IAAI,EAAE,MAAM,OAAO,CAAC;AAEpC,OAAO,EAAE,yBAAyB,EAAE,MAAM,kBAAkB,CAAC;AAC7D,OAAO,EAAE,qBAAqB,EAAE,MAAM,gBAAgB,CAAC;AACvD,OAAO,YAAY,MAAM,+BAA+B,CAAC;AAMzD,MAAM,WAAW,GAAG,IAAI,CAAC,SAAS,WAAW,CAAC,KAAuB;IACnE,MAAM,EAAE,KAAK,EAAE,GAAG,KAAK,CAAC;IAExB,MAAM,gBAAgB,GAAG,qBAAqB,CAAC,KAAK,EAAE,iBAAiB,CAAC,CAAC;IACzE,IAAI,gBAAgB,EAAE;QACpB,OAAO,IAAI,CAAC;KACb;IAED,OAAO,CACL,oBAAC,yBAAyB;QACxB,oBAAC,YAAY,IAAC,KAAK,EAAE,KAAK,EAAE,QAAQ,EAAE,KAAK,GAAI,CACrB,CAC7B,CAAC;AACJ,CAAC,CAAC,CAAC;AAEH,eAAe,WAAW,CAAC"}
@@ -1,7 +1,7 @@
1
1
  import React from 'react';
2
2
  import type { QuestionnaireItem, QuestionnaireResponseItem } from 'fhir/r4';
3
- import type { PropsWithQrItemChangeHandler } from '../../../interfaces/renderProps.interface';
4
- interface GridGroupProps extends PropsWithQrItemChangeHandler<QuestionnaireResponseItem> {
3
+ import type { PropsWithParentIsReadOnlyAttribute, PropsWithQrItemChangeHandler } from '../../../interfaces/renderProps.interface';
4
+ interface GridGroupProps extends PropsWithQrItemChangeHandler<QuestionnaireResponseItem>, PropsWithParentIsReadOnlyAttribute {
5
5
  qItem: QuestionnaireItem;
6
6
  qrItem: QuestionnaireResponseItem;
7
7
  groupCardElevation: number;
@@ -25,13 +25,15 @@ import Typography from '@mui/material/Typography';
25
25
  import { mapQItemsIndex } from '../../../utils/mapItem';
26
26
  import GridTable from './GridTable';
27
27
  import LabelWrapper from '../ItemParts/ItemLabelWrapper';
28
+ import useReadOnly from '../../../hooks/useReadOnly';
28
29
  function GridGroup(props) {
29
- const { qItem, qrItem, groupCardElevation, onQrItemChange } = props;
30
+ const { qItem, qrItem, groupCardElevation, parentIsReadOnly, onQrItemChange } = props;
30
31
  const qRowItems = qItem.item;
31
32
  const qrGroup = qrItem && qrItem.item ? qrItem : createQrGroup(qItem);
32
33
  const qrRowItems = qrGroup.item;
33
34
  const qItemsIndexMap = useMemo(() => mapQItemsIndex(qItem), [qItem]);
34
35
  const columnLabels = useMemo(() => { var _a, _b; return (_b = (_a = qRowItems === null || qRowItems === void 0 ? void 0 : qRowItems[0].item) === null || _a === void 0 ? void 0 : _a.map((firstItem) => { var _a; return (_a = firstItem.text) !== null && _a !== void 0 ? _a : ' '; })) !== null && _b !== void 0 ? _b : []; }, [qRowItems]);
36
+ const readOnly = useReadOnly(qItem, parentIsReadOnly);
35
37
  const itemIsHidden = useHidden(qItem);
36
38
  if (itemIsHidden) {
37
39
  return null;
@@ -51,11 +53,11 @@ function GridGroup(props) {
51
53
  }
52
54
  return (React.createElement(React.Fragment, null,
53
55
  React.createElement(QGroupContainerBox, { cardElevation: groupCardElevation, isRepeated: false, py: 3 },
54
- React.createElement(Typography, { fontSize: 13, variant: "h6" },
55
- React.createElement(LabelWrapper, { qItem: qItem })),
56
+ React.createElement(Typography, { fontSize: 13, variant: "h6", color: readOnly ? 'text.secondary' : 'text.primary' },
57
+ React.createElement(LabelWrapper, { qItem: qItem, readOnly: readOnly })),
56
58
  React.createElement(Divider, { sx: { my: 1 }, light: true }),
57
59
  React.createElement(TableContainer, { component: Paper, elevation: groupCardElevation },
58
- React.createElement(GridTable, { qItems: qRowItems, qrItems: qrRowItems, qItemsIndexMap: qItemsIndexMap, columnLabels: columnLabels, onQrItemChange: handleRowChange })))));
60
+ React.createElement(GridTable, { qItems: qRowItems, qrItems: qrRowItems, qItemsIndexMap: qItemsIndexMap, columnLabels: columnLabels, parentIsReadOnly: parentIsReadOnly, onQrItemChange: handleRowChange })))));
59
61
  }
60
62
  export default GridGroup;
61
63
  //# sourceMappingURL=GridGroup.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"GridGroup.js","sourceRoot":"","sources":["../../../../src/components/FormComponents/GridGroup/GridGroup.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAEH,OAAO,KAAK,EAAE,EAAE,OAAO,EAAE,MAAM,OAAO,CAAC;AAGvC,OAAO,EAAE,aAAa,EAAE,oBAAoB,EAAE,MAAM,uBAAuB,CAAC;AAC5E,OAAO,SAAS,MAAM,0BAA0B,CAAC;AACjD,OAAO,EAAE,kBAAkB,EAAE,MAAM,kBAAkB,CAAC;AACtD,OAAO,OAAO,MAAM,uBAAuB,CAAC;AAC5C,OAAO,KAAK,MAAM,qBAAqB,CAAC;AACxC,OAAO,cAAc,MAAM,8BAA8B,CAAC;AAC1D,OAAO,UAAU,MAAM,0BAA0B,CAAC;AAClD,OAAO,EAAE,cAAc,EAAE,MAAM,wBAAwB,CAAC;AACxD,OAAO,SAAS,MAAM,aAAa,CAAC;AACpC,OAAO,YAAY,MAAM,+BAA+B,CAAC;AAQzD,SAAS,SAAS,CAAC,KAAqB;IACtC,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,kBAAkB,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cAAc,EAAE,cAAc,CAAC,CAAC;QACtE,cAAc,CAAC,cAAc,CAAC,CAAC;IACjC,CAAC;IAED,OAAO,CACL;QACE,oBAAC,kBAAkB,IAAC,aAAa,EAAE,kBAAkB,EAAE,UAAU,EAAE,KAAK,EAAE,EAAE,EAAE,CAAC;YAC7E,oBAAC,UAAU,IAAC,QAAQ,EAAE,EAAE,EAAE,OAAO,EAAC,IAAI,EAAC,KAAK,EAAE,QAAQ,CAAC,CAAC,CAAC,gBAAgB,CAAC,CAAC,CAAC,cAAc;gBACxF,oBAAC,YAAY,IAAC,KAAK,EAAE,KAAK,EAAE,QAAQ,EAAE,QAAQ,GAAI,CACvC;YACb,oBAAC,OAAO,IAAC,EAAE,EAAE,EAAE,EAAE,EAAE,CAAC,EAAE,EAAE,KAAK,SAAG;YAEhC,oBAAC,cAAc,IAAC,SAAS,EAAE,KAAK,EAAE,SAAS,EAAE,kBAAkB;gBAC7D,oBAAC,SAAS,IACR,MAAM,EAAE,SAAS,EACjB,OAAO,EAAE,UAAU,EACnB,cAAc,EAAE,cAAc,EAC9B,YAAY,EAAE,YAAY,EAC1B,gBAAgB,EAAE,gBAAgB,EAClC,cAAc,EAAE,eAAe,GAC/B,CACa,CACE,CACpB,CACJ,CAAC;AACJ,CAAC;AAED,eAAe,SAAS,CAAC"}
@@ -1,7 +1,8 @@
1
1
  import React from 'react';
2
2
  import type { QuestionnaireItem, QuestionnaireResponseItem } from 'fhir/r4';
3
3
  import type { PropsWithQrItemChangeHandler } from '../../../interfaces/renderProps.interface';
4
- interface GridRowProps extends PropsWithQrItemChangeHandler<QuestionnaireResponseItem> {
4
+ import type { PropsWithParentIsReadOnlyAttribute } from '../../../interfaces/renderProps.interface';
5
+ interface GridRowProps extends PropsWithQrItemChangeHandler<QuestionnaireResponseItem>, PropsWithParentIsReadOnlyAttribute {
5
6
  qItem: QuestionnaireItem;
6
7
  qrItem: QuestionnaireResponseItem;
7
8
  columnLabels: string[];
@@ -22,7 +22,7 @@ import { getQrItemsIndex, mapQItemsIndex } from '../../../utils/mapItem';
22
22
  import Typography from '@mui/material/Typography';
23
23
  import useHidden from '../../../hooks/useHidden';
24
24
  function GridRow(props) {
25
- const { qItem, qrItem, columnLabels, numOfColumns, onQrItemChange } = props;
25
+ const { qItem, qrItem, columnLabels, numOfColumns, parentIsReadOnly, onQrItemChange } = props;
26
26
  const rowQItems = qItem.item;
27
27
  const row = qrItem && qrItem.item ? qrItem : createQrGroup(qItem);
28
28
  const rowQrItems = row.item;
@@ -53,7 +53,7 @@ function GridRow(props) {
53
53
  return null;
54
54
  }
55
55
  return (React.createElement(GridAnswerTableCell, { key: index, numOfColumns: numOfColumns },
56
- React.createElement(SingleItem, { qItem: cellQItem, qrItem: cellQrItem, isRepeated: true, isTabled: true, onQrItemChange: handleQrRowItemChange })));
56
+ React.createElement(SingleItem, { qItem: cellQItem, qrItem: cellQrItem, isRepeated: true, isTabled: true, parentIsReadOnly: parentIsReadOnly, onQrItemChange: handleQrRowItemChange })));
57
57
  })));
58
58
  }
59
59
  export default GridRow;
@@ -1 +1 @@
1
- {"version":3,"file":"GridRow.js","sourceRoot":"","sources":["../../../../src/components/FormComponents/GridGroup/GridRow.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAEH,OAAO,KAAK,EAAE,EAAE,OAAO,EAAE,MAAM,OAAO,CAAC;AAGvC,OAAO,EAAE,aAAa,EAAE,oBAAoB,EAAE,MAAM,uBAAuB,CAAC;AAC5E,OAAO,EAAE,mBAAmB,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAC;AAChF,OAAO,UAAU,MAAM,0BAA0B,CAAC;AAClD,OAAO,EAAE,eAAe,EAAE,cAAc,EAAE,MAAM,wBAAwB,CAAC;AACzE,OAAO,UAAU,MAAM,0BAA0B,CAAC;AAClD,OAAO,SAAS,MAAM,0BAA0B,CAAC;AASjD,SAAS,OAAO,CAAC,KAAmB;IAClC,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE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AE,gBAAgB,EAClC,cAAc,EAAE,qBAAqB,GACrC,CACkB,CACvB,CAAC;QACJ,CAAC,CAAC,CACD,CACJ,CAAC;AACJ,CAAC;AAED,eAAe,OAAO,CAAC"}
@@ -1,7 +1,8 @@
1
1
  import React from 'react';
2
2
  import type { QuestionnaireItem, QuestionnaireResponseItem } from 'fhir/r4';
3
3
  import type { PropsWithQrItemChangeHandler } from '../../../interfaces/renderProps.interface';
4
- interface GridTableProps extends PropsWithQrItemChangeHandler<QuestionnaireResponseItem> {
4
+ import type { PropsWithParentIsReadOnlyAttribute } from '../../../interfaces/renderProps.interface';
5
+ interface GridTableProps extends PropsWithQrItemChangeHandler<QuestionnaireResponseItem>, PropsWithParentIsReadOnlyAttribute {
5
6
  qItems: QuestionnaireItem[];
6
7
  qrItems: QuestionnaireResponseItem[];
7
8
  qItemsIndexMap: Record<string, number>;