@aehrc/smart-forms-renderer 0.4.0 → 0.5.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 (363) hide show
  1. package/lib/components/FormRenderer/SmartFormsRenderer.js +4 -2
  2. package/lib/components/FormRenderer/SmartFormsRenderer.js.map +1 -1
  3. package/lib/theme/Theme.d.ts +38 -0
  4. package/lib/theme/Theme.js +39 -0
  5. package/lib/theme/Theme.js.map +1 -0
  6. package/lib/theme/globalStyles.d.ts +2 -0
  7. package/lib/theme/globalStyles.js +64 -0
  8. package/lib/theme/globalStyles.js.map +1 -0
  9. package/lib/theme/overrides/Accordion.d.ts +14 -0
  10. package/{src/components/FormComponents/QItemChoice/QItemChoiceRadioSingle.js → lib/theme/overrides/Accordion.js} +15 -7
  11. package/lib/theme/overrides/Accordion.js.map +1 -0
  12. package/lib/theme/overrides/Autocomplete.d.ts +10 -0
  13. package/{src/components/FormComponents/DisplayItem/DisplayInstructions.styles.js → lib/theme/overrides/Autocomplete.js} +12 -7
  14. package/lib/theme/overrides/Autocomplete.js.map +1 -0
  15. package/lib/theme/overrides/Backdrop.d.ts +13 -0
  16. package/{src/components/FormComponents/ItemParts/FadingCheckIcon.js → lib/theme/overrides/Backdrop.js} +15 -9
  17. package/lib/theme/overrides/Backdrop.js.map +1 -0
  18. package/lib/theme/overrides/Button.d.ts +33 -0
  19. package/lib/theme/overrides/Button.js +52 -0
  20. package/lib/theme/overrides/Button.js.map +1 -0
  21. package/lib/theme/overrides/Card.d.ts +35 -0
  22. package/lib/theme/overrides/Card.js +49 -0
  23. package/lib/theme/overrides/Card.js.map +1 -0
  24. package/lib/theme/overrides/Input.d.ts +64 -0
  25. package/lib/theme/overrides/Input.js +81 -0
  26. package/lib/theme/overrides/Input.js.map +1 -0
  27. package/lib/theme/overrides/Overrides.d.ts +3 -0
  28. package/{src/components/BackToTopButton/BackToTopButton.js → lib/theme/overrides/Overrides.js} +14 -15
  29. package/lib/theme/overrides/Overrides.js.map +1 -0
  30. package/lib/theme/overrides/Paper.d.ts +12 -0
  31. package/{src/hooks/useQueryClient.js → lib/theme/overrides/Paper.js} +12 -10
  32. package/lib/theme/overrides/Paper.js.map +1 -0
  33. package/lib/theme/overrides/SpeedDial.d.ts +16 -0
  34. package/{src/hooks/useInitialiseRepeatAnswers.js → lib/theme/overrides/SpeedDial.js} +16 -18
  35. package/lib/theme/overrides/SpeedDial.js.map +1 -0
  36. package/lib/theme/overrides/Table.d.ts +11 -0
  37. package/{src/components/FormRenderer/index.js → lib/theme/overrides/Table.js} +13 -2
  38. package/lib/theme/overrides/Table.js.map +1 -0
  39. package/lib/theme/overrides/Typography.d.ts +13 -0
  40. package/lib/theme/overrides/Typography.js +31 -0
  41. package/lib/theme/overrides/Typography.js.map +1 -0
  42. package/lib/theme/palette.d.ts +28 -0
  43. package/lib/theme/palette.js +67 -0
  44. package/lib/theme/palette.js.map +1 -0
  45. package/lib/theme/shadows.d.ts +2 -0
  46. package/lib/theme/shadows.js +52 -0
  47. package/lib/theme/shadows.js.map +1 -0
  48. package/lib/theme/typography.d.ts +139 -0
  49. package/lib/theme/typography.js +80 -0
  50. package/lib/theme/typography.js.map +1 -0
  51. package/package.json +1 -1
  52. package/src/components/FormRenderer/SmartFormsRenderer.tsx +6 -3
  53. package/src/theme/Theme.tsx +107 -0
  54. package/src/theme/globalStyles.tsx +68 -0
  55. package/src/{components/FormComponents/Item.styles.js → theme/overrides/Accordion.ts} +18 -11
  56. package/src/{interfaces/answerExpression.interface.js → theme/overrides/Autocomplete.ts} +14 -2
  57. package/src/theme/overrides/Backdrop.ts +34 -0
  58. package/src/theme/overrides/Button.ts +54 -0
  59. package/src/theme/overrides/Card.ts +51 -0
  60. package/src/theme/overrides/Input.ts +83 -0
  61. package/src/theme/overrides/Overrides.ts +45 -0
  62. package/src/{interfaces/enableWhen.interface.js → theme/overrides/Paper.ts} +15 -2
  63. package/src/{hooks/useInitialiseGroupTable.js → theme/overrides/SpeedDial.ts} +17 -17
  64. package/src/{hooks/useBackToTop.js → theme/overrides/Table.ts} +14 -9
  65. package/src/{components/FormComponents/Typography.styles.js → theme/overrides/Typography.ts} +17 -7
  66. package/src/theme/palette.ts +100 -0
  67. package/src/theme/shadows.ts +54 -0
  68. package/src/theme/typography.ts +114 -0
  69. package/src/api/populate.js +0 -63
  70. package/src/api/populate.js.map +0 -1
  71. package/src/components/Alert.styles.js +0 -40
  72. package/src/components/Alert.styles.js.map +0 -1
  73. package/src/components/BackToTopButton/BackToTopButton.js.map +0 -1
  74. package/src/components/Box.styles.js +0 -30
  75. package/src/components/Box.styles.js.map +0 -1
  76. package/src/components/FormComponents/BooleanItem/BooleanField.js +0 -24
  77. package/src/components/FormComponents/BooleanItem/BooleanField.js.map +0 -1
  78. package/src/components/FormComponents/BooleanItem/BooleanItem.js +0 -49
  79. package/src/components/FormComponents/BooleanItem/BooleanItem.js.map +0 -1
  80. package/src/components/FormComponents/DateItem/DateField.js +0 -31
  81. package/src/components/FormComponents/DateItem/DateField.js.map +0 -1
  82. package/src/components/FormComponents/DateItem/DateItem.js +0 -52
  83. package/src/components/FormComponents/DateItem/DateItem.js.map +0 -1
  84. package/src/components/FormComponents/DateTimeItem/DateTimeField.js +0 -33
  85. package/src/components/FormComponents/DateTimeItem/DateTimeField.js.map +0 -1
  86. package/src/components/FormComponents/DateTimeItem/DateTimeItem.js +0 -52
  87. package/src/components/FormComponents/DateTimeItem/DateTimeItem.js.map +0 -1
  88. package/src/components/FormComponents/DecimalItem/DecimalField.js +0 -30
  89. package/src/components/FormComponents/DecimalItem/DecimalField.js.map +0 -1
  90. package/src/components/FormComponents/DecimalItem/DecimalItem.js +0 -80
  91. package/src/components/FormComponents/DecimalItem/DecimalItem.js.map +0 -1
  92. package/src/components/FormComponents/DisplayItem/DisplayInstructions.js +0 -26
  93. package/src/components/FormComponents/DisplayItem/DisplayInstructions.js.map +0 -1
  94. package/src/components/FormComponents/DisplayItem/DisplayInstructions.styles.js.map +0 -1
  95. package/src/components/FormComponents/DisplayItem/DisplayItem.js +0 -31
  96. package/src/components/FormComponents/DisplayItem/DisplayItem.js.map +0 -1
  97. package/src/components/FormComponents/GridGroup/GridGroup.js +0 -58
  98. package/src/components/FormComponents/GridGroup/GridGroup.js.map +0 -1
  99. package/src/components/FormComponents/GridGroup/GridRow.js +0 -55
  100. package/src/components/FormComponents/GridGroup/GridRow.js.map +0 -1
  101. package/src/components/FormComponents/GridGroup/GridTable.js +0 -42
  102. package/src/components/FormComponents/GridGroup/GridTable.js.map +0 -1
  103. package/src/components/FormComponents/GroupItem/GroupHeading.js +0 -39
  104. package/src/components/FormComponents/GroupItem/GroupHeading.js.map +0 -1
  105. package/src/components/FormComponents/GroupItem/GroupItem.js +0 -62
  106. package/src/components/FormComponents/GroupItem/GroupItem.js.map +0 -1
  107. package/src/components/FormComponents/GroupItem/GroupItem.styles.js +0 -27
  108. package/src/components/FormComponents/GroupItem/GroupItem.styles.js.map +0 -1
  109. package/src/components/FormComponents/GroupItem/GroupItemSwitcher.js +0 -73
  110. package/src/components/FormComponents/GroupItem/GroupItemSwitcher.js.map +0 -1
  111. package/src/components/FormComponents/GroupItem/NextTabButton.js +0 -25
  112. package/src/components/FormComponents/GroupItem/NextTabButton.js.map +0 -1
  113. package/src/components/FormComponents/GroupItem/NextTabButtonWrapper.js +0 -55
  114. package/src/components/FormComponents/GroupItem/NextTabButtonWrapper.js.map +0 -1
  115. package/src/components/FormComponents/IntegerItem/IntegerField.js +0 -30
  116. package/src/components/FormComponents/IntegerItem/IntegerField.js.map +0 -1
  117. package/src/components/FormComponents/IntegerItem/IntegerItem.js +0 -73
  118. package/src/components/FormComponents/IntegerItem/IntegerItem.js.map +0 -1
  119. package/src/components/FormComponents/Item.styles.js.map +0 -1
  120. package/src/components/FormComponents/ItemParts/ContextDisplayItem.js +0 -29
  121. package/src/components/FormComponents/ItemParts/ContextDisplayItem.js.map +0 -1
  122. package/src/components/FormComponents/ItemParts/FadingCheckIcon.js.map +0 -1
  123. package/src/components/FormComponents/ItemParts/ItemFieldGrid.js +0 -31
  124. package/src/components/FormComponents/ItemParts/ItemFieldGrid.js.map +0 -1
  125. package/src/components/FormComponents/ItemParts/ItemLabelText.js +0 -45
  126. package/src/components/FormComponents/ItemParts/ItemLabelText.js.map +0 -1
  127. package/src/components/FormComponents/ItemParts/ItemLabelWrapper.js +0 -32
  128. package/src/components/FormComponents/ItemParts/ItemLabelWrapper.js.map +0 -1
  129. package/src/components/FormComponents/ItemParts/QItemCheckboxSingle.js +0 -24
  130. package/src/components/FormComponents/ItemParts/QItemCheckboxSingle.js.map +0 -1
  131. package/src/components/FormComponents/ItemParts/QItemCheckboxSingleWithOpenLabel.js +0 -33
  132. package/src/components/FormComponents/ItemParts/QItemCheckboxSingleWithOpenLabel.js.map +0 -1
  133. package/src/components/FormComponents/ItemParts/QItemRadioButtonWithOpenLabel.js +0 -31
  134. package/src/components/FormComponents/ItemParts/QItemRadioButtonWithOpenLabel.js.map +0 -1
  135. package/src/components/FormComponents/Lists.styles.js +0 -38
  136. package/src/components/FormComponents/Lists.styles.js.map +0 -1
  137. package/src/components/FormComponents/QItemChoice/QItemChoice.js +0 -61
  138. package/src/components/FormComponents/QItemChoice/QItemChoice.js.map +0 -1
  139. package/src/components/FormComponents/QItemChoice/QItemChoiceAutocomplete.js +0 -85
  140. package/src/components/FormComponents/QItemChoice/QItemChoiceAutocomplete.js.map +0 -1
  141. package/src/components/FormComponents/QItemChoice/QItemChoiceCheckboxAnswerOption.js +0 -70
  142. package/src/components/FormComponents/QItemChoice/QItemChoiceCheckboxAnswerOption.js.map +0 -1
  143. package/src/components/FormComponents/QItemChoice/QItemChoiceCheckboxAnswerValueSet.js +0 -66
  144. package/src/components/FormComponents/QItemChoice/QItemChoiceCheckboxAnswerValueSet.js.map +0 -1
  145. package/src/components/FormComponents/QItemChoice/QItemChoiceRadioAnswerOption.js +0 -70
  146. package/src/components/FormComponents/QItemChoice/QItemChoiceRadioAnswerOption.js.map +0 -1
  147. package/src/components/FormComponents/QItemChoice/QItemChoiceRadioAnswerValueSet.js +0 -70
  148. package/src/components/FormComponents/QItemChoice/QItemChoiceRadioAnswerValueSet.js.map +0 -1
  149. package/src/components/FormComponents/QItemChoice/QItemChoiceRadioSingle.js.map +0 -1
  150. package/src/components/FormComponents/QItemChoice/QItemChoiceSelectAnswerOption.js +0 -70
  151. package/src/components/FormComponents/QItemChoice/QItemChoiceSelectAnswerOption.js.map +0 -1
  152. package/src/components/FormComponents/QItemChoice/QItemChoiceSelectAnswerValueSet.js +0 -80
  153. package/src/components/FormComponents/QItemChoice/QItemChoiceSelectAnswerValueSet.js.map +0 -1
  154. package/src/components/FormComponents/QItemOpenChoice/QItemOpenChoice.js +0 -49
  155. package/src/components/FormComponents/QItemOpenChoice/QItemOpenChoice.js.map +0 -1
  156. package/src/components/FormComponents/QItemOpenChoice/QItemOpenChoiceAutocomplete.js +0 -104
  157. package/src/components/FormComponents/QItemOpenChoice/QItemOpenChoiceAutocomplete.js.map +0 -1
  158. package/src/components/FormComponents/QItemOpenChoice/QItemOpenChoiceCheckboxAnswerOption.js +0 -105
  159. package/src/components/FormComponents/QItemOpenChoice/QItemOpenChoiceCheckboxAnswerOption.js.map +0 -1
  160. package/src/components/FormComponents/QItemOpenChoice/QItemOpenChoiceRadioAnswerOption.js +0 -116
  161. package/src/components/FormComponents/QItemOpenChoice/QItemOpenChoiceRadioAnswerOption.js.map +0 -1
  162. package/src/components/FormComponents/QItemOpenChoice/QItemOpenChoiceSelectAnswerOption.js +0 -74
  163. package/src/components/FormComponents/QItemOpenChoice/QItemOpenChoiceSelectAnswerOption.js.map +0 -1
  164. package/src/components/FormComponents/QItemOpenChoice/QItemOpenChoiceSelectAnswerValueSet.js +0 -66
  165. package/src/components/FormComponents/QItemOpenChoice/QItemOpenChoiceSelectAnswerValueSet.js.map +0 -1
  166. package/src/components/FormComponents/RepeatGroup/AddItemButton.js +0 -27
  167. package/src/components/FormComponents/RepeatGroup/AddItemButton.js.map +0 -1
  168. package/src/components/FormComponents/RepeatGroup/DeleteItemButton.js +0 -30
  169. package/src/components/FormComponents/RepeatGroup/DeleteItemButton.js.map +0 -1
  170. package/src/components/FormComponents/RepeatGroup/RepeatGroup.js +0 -81
  171. package/src/components/FormComponents/RepeatGroup/RepeatGroup.js.map +0 -1
  172. package/src/components/FormComponents/RepeatGroup/RepeatGroupItem.js +0 -30
  173. package/src/components/FormComponents/RepeatGroup/RepeatGroupItem.js.map +0 -1
  174. package/src/components/FormComponents/RepeatItem/AddItemButton.js +0 -27
  175. package/src/components/FormComponents/RepeatItem/AddItemButton.js.map +0 -1
  176. package/src/components/FormComponents/RepeatItem/DeleteItemButton.js +0 -30
  177. package/src/components/FormComponents/RepeatItem/DeleteItemButton.js.map +0 -1
  178. package/src/components/FormComponents/RepeatItem/RepeatField.js +0 -31
  179. package/src/components/FormComponents/RepeatItem/RepeatField.js.map +0 -1
  180. package/src/components/FormComponents/RepeatItem/RepeatItem.js +0 -69
  181. package/src/components/FormComponents/RepeatItem/RepeatItem.js.map +0 -1
  182. package/src/components/FormComponents/RepeatItem/RepeatItem.styles.js +0 -29
  183. package/src/components/FormComponents/RepeatItem/RepeatItem.styles.js.map +0 -1
  184. package/src/components/FormComponents/SingleItem/SingleItem.js +0 -32
  185. package/src/components/FormComponents/SingleItem/SingleItem.js.map +0 -1
  186. package/src/components/FormComponents/SingleItem/SingleItemSwitcher.js +0 -63
  187. package/src/components/FormComponents/SingleItem/SingleItemSwitcher.js.map +0 -1
  188. package/src/components/FormComponents/StringItem/StringField.js +0 -30
  189. package/src/components/FormComponents/StringItem/StringField.js.map +0 -1
  190. package/src/components/FormComponents/StringItem/StringItem.js +0 -71
  191. package/src/components/FormComponents/StringItem/StringItem.js.map +0 -1
  192. package/src/components/FormComponents/Tables/DeleteRowButton.js +0 -31
  193. package/src/components/FormComponents/Tables/DeleteRowButton.js.map +0 -1
  194. package/src/components/FormComponents/Tables/QItemGroupTable.js +0 -99
  195. package/src/components/FormComponents/Tables/QItemGroupTable.js.map +0 -1
  196. package/src/components/FormComponents/Tables/QItemGroupTableRow.js +0 -46
  197. package/src/components/FormComponents/Tables/QItemGroupTableRow.js.map +0 -1
  198. package/src/components/FormComponents/Tables/Table.styles.js +0 -46
  199. package/src/components/FormComponents/Tables/Table.styles.js.map +0 -1
  200. package/src/components/FormComponents/TextItem/TextField.js +0 -29
  201. package/src/components/FormComponents/TextItem/TextField.js.map +0 -1
  202. package/src/components/FormComponents/TextItem/TextItem.js +0 -71
  203. package/src/components/FormComponents/TextItem/TextItem.js.map +0 -1
  204. package/src/components/FormComponents/Textfield.styles.js +0 -27
  205. package/src/components/FormComponents/Textfield.styles.js.map +0 -1
  206. package/src/components/FormComponents/TimeItem/TimeField.js +0 -30
  207. package/src/components/FormComponents/TimeItem/TimeField.js.map +0 -1
  208. package/src/components/FormComponents/TimeItem/TimeItem.js +0 -52
  209. package/src/components/FormComponents/TimeItem/TimeItem.js.map +0 -1
  210. package/src/components/FormComponents/Typography.styles.js.map +0 -1
  211. package/src/components/FormComponents/UrlItem/UrlField.js +0 -25
  212. package/src/components/FormComponents/UrlItem/UrlField.js.map +0 -1
  213. package/src/components/FormComponents/UrlItem/UrlItem.js +0 -61
  214. package/src/components/FormComponents/UrlItem/UrlItem.js.map +0 -1
  215. package/src/components/FormRenderer/FormBodyCollapsible.js +0 -57
  216. package/src/components/FormRenderer/FormBodyCollapsible.js.map +0 -1
  217. package/src/components/FormRenderer/FormBodySingleCollapsible.js +0 -39
  218. package/src/components/FormRenderer/FormBodySingleCollapsible.js.map +0 -1
  219. package/src/components/FormRenderer/FormBodySingleCollapsibleWrapper.js +0 -31
  220. package/src/components/FormRenderer/FormBodySingleCollapsibleWrapper.js.map +0 -1
  221. package/src/components/FormRenderer/FormBodyTabbed.js +0 -60
  222. package/src/components/FormRenderer/FormBodyTabbed.js.map +0 -1
  223. package/src/components/FormRenderer/FormTitle.js +0 -30
  224. package/src/components/FormRenderer/FormTitle.js.map +0 -1
  225. package/src/components/FormRenderer/FormTopLevelItem.js +0 -45
  226. package/src/components/FormRenderer/FormTopLevelItem.js.map +0 -1
  227. package/src/components/FormRenderer/SmartFormsRenderer.js +0 -37
  228. package/src/components/FormRenderer/SmartFormsRenderer.js.map +0 -1
  229. package/src/components/FormRenderer/index.js.map +0 -1
  230. package/src/components/Iconify/Iconify.js +0 -26
  231. package/src/components/Iconify/Iconify.js.map +0 -1
  232. package/src/components/Lists.styles.js +0 -38
  233. package/src/components/Lists.styles.js.map +0 -1
  234. package/src/components/Tabs/CompleteTabButton.js +0 -29
  235. package/src/components/Tabs/CompleteTabButton.js.map +0 -1
  236. package/src/components/Tabs/FormBodySingleTab.js +0 -39
  237. package/src/components/Tabs/FormBodySingleTab.js.map +0 -1
  238. package/src/components/Tabs/FormBodyTabList.js +0 -52
  239. package/src/components/Tabs/FormBodyTabList.js.map +0 -1
  240. package/src/components/index.js +0 -18
  241. package/src/components/index.js.map +0 -1
  242. package/src/hooks/useBackToTop.js.map +0 -1
  243. package/src/hooks/useDebounce.js +0 -38
  244. package/src/hooks/useDebounce.js.map +0 -1
  245. package/src/hooks/useDecimalCalculatedExpression.js +0 -50
  246. package/src/hooks/useDecimalCalculatedExpression.js.map +0 -1
  247. package/src/hooks/useHidden.js +0 -35
  248. package/src/hooks/useHidden.js.map +0 -1
  249. package/src/hooks/useInitialiseGroupTable.js.map +0 -1
  250. package/src/hooks/useInitialiseRenderer.js +0 -49
  251. package/src/hooks/useInitialiseRenderer.js.map +0 -1
  252. package/src/hooks/useInitialiseRepeatAnswers.js.map +0 -1
  253. package/src/hooks/useInitialiseRepeatGroups.js +0 -36
  254. package/src/hooks/useInitialiseRepeatGroups.js.map +0 -1
  255. package/src/hooks/useIntegerCalculatedExpression.js +0 -44
  256. package/src/hooks/useIntegerCalculatedExpression.js.map +0 -1
  257. package/src/hooks/useQueryClient.js.map +0 -1
  258. package/src/hooks/useRenderingExtensions.js +0 -30
  259. package/src/hooks/useRenderingExtensions.js.map +0 -1
  260. package/src/hooks/useResponsive.js +0 -37
  261. package/src/hooks/useResponsive.js.map +0 -1
  262. package/src/hooks/useStringCalculatedExpression.js +0 -44
  263. package/src/hooks/useStringCalculatedExpression.js.map +0 -1
  264. package/src/hooks/useTerminologyServerQuery.js +0 -73
  265. package/src/hooks/useTerminologyServerQuery.js.map +0 -1
  266. package/src/hooks/useValidationError.js +0 -38
  267. package/src/hooks/useValidationError.js.map +0 -1
  268. package/src/hooks/useValueSetCodings.js +0 -125
  269. package/src/hooks/useValueSetCodings.js.map +0 -1
  270. package/src/index.js +0 -2
  271. package/src/index.js.map +0 -1
  272. package/src/interfaces/answerExpression.interface.js.map +0 -1
  273. package/src/interfaces/calculatedExpression.interface.js +0 -2
  274. package/src/interfaces/calculatedExpression.interface.js.map +0 -1
  275. package/src/interfaces/choice.enum.js +0 -41
  276. package/src/interfaces/choice.enum.js.map +0 -1
  277. package/src/interfaces/enableWhen.interface.js.map +0 -1
  278. package/src/interfaces/groupTable.interface.js +0 -18
  279. package/src/interfaces/groupTable.interface.js.map +0 -1
  280. package/src/interfaces/populate.interface.js +0 -18
  281. package/src/interfaces/populate.interface.js.map +0 -1
  282. package/src/interfaces/questionnaireStore.interface.js +0 -18
  283. package/src/interfaces/questionnaireStore.interface.js.map +0 -1
  284. package/src/interfaces/regex.interface.js +0 -18
  285. package/src/interfaces/regex.interface.js.map +0 -1
  286. package/src/interfaces/renderProps.interface.js +0 -18
  287. package/src/interfaces/renderProps.interface.js.map +0 -1
  288. package/src/interfaces/repeatGroup.interface.js +0 -18
  289. package/src/interfaces/repeatGroup.interface.js.map +0 -1
  290. package/src/interfaces/repeatItem.interface.js +0 -2
  291. package/src/interfaces/repeatItem.interface.js.map +0 -1
  292. package/src/interfaces/tab.interface.js +0 -2
  293. package/src/interfaces/tab.interface.js.map +0 -1
  294. package/src/interfaces/valueSet.interface.js +0 -18
  295. package/src/interfaces/valueSet.interface.js.map +0 -1
  296. package/src/interfaces/variables.interface.js +0 -18
  297. package/src/interfaces/variables.interface.js.map +0 -1
  298. package/src/setup-jest.js +0 -2
  299. package/src/setup-jest.js.map +0 -1
  300. package/src/stores/useConfigStore.js +0 -17
  301. package/src/stores/useConfigStore.js.map +0 -1
  302. package/src/stores/useQuestionnaireResponseStore.js +0 -39
  303. package/src/stores/useQuestionnaireResponseStore.js.map +0 -1
  304. package/src/stores/useQuestionnaireStore.js +0 -151
  305. package/src/stores/useQuestionnaireStore.js.map +0 -1
  306. package/src/stories/SmartFormsRenderer.stories.js +0 -90
  307. package/src/stories/SmartFormsRenderer.stories.js.map +0 -1
  308. package/src/utils/calculatedExpression.js +0 -180
  309. package/src/utils/calculatedExpression.js.map +0 -1
  310. package/src/utils/choice.js +0 -160
  311. package/src/utils/choice.js.map +0 -1
  312. package/src/utils/debounce.js +0 -19
  313. package/src/utils/debounce.js.map +0 -1
  314. package/src/utils/emptyResource.js +0 -25
  315. package/src/utils/emptyResource.js.map +0 -1
  316. package/src/utils/enableWhen.js +0 -228
  317. package/src/utils/enableWhen.js.map +0 -1
  318. package/src/utils/enableWhenExpression.js +0 -76
  319. package/src/utils/enableWhenExpression.js.map +0 -1
  320. package/src/utils/fhirpath.js +0 -98
  321. package/src/utils/fhirpath.js.map +0 -1
  322. package/src/utils/initialiseForm.js +0 -45
  323. package/src/utils/initialiseForm.js.map +0 -1
  324. package/src/utils/itemControl.js +0 -299
  325. package/src/utils/itemControl.js.map +0 -1
  326. package/src/utils/mapItem.js +0 -80
  327. package/src/utils/mapItem.js.map +0 -1
  328. package/src/utils/openChoice.js +0 -150
  329. package/src/utils/openChoice.js.map +0 -1
  330. package/src/utils/parseInputs.js +0 -49
  331. package/src/utils/parseInputs.js.map +0 -1
  332. package/src/utils/populate.js +0 -78
  333. package/src/utils/populate.js.map +0 -1
  334. package/src/utils/populateCallback.js +0 -40
  335. package/src/utils/populateCallback.js.map +0 -1
  336. package/src/utils/populateContexts.js +0 -76
  337. package/src/utils/populateContexts.js.map +0 -1
  338. package/src/utils/populateInputParams.js +0 -193
  339. package/src/utils/populateInputParams.js.map +0 -1
  340. package/src/utils/qItem.js +0 -73
  341. package/src/utils/qItem.js.map +0 -1
  342. package/src/utils/qrItem.js +0 -221
  343. package/src/utils/qrItem.js.map +0 -1
  344. package/src/utils/questionnaireStoreUtils/addAdditionalVariables.js +0 -47
  345. package/src/utils/questionnaireStoreUtils/addAdditionalVariables.js.map +0 -1
  346. package/src/utils/questionnaireStoreUtils/createQuestionaireModel.js +0 -79
  347. package/src/utils/questionnaireStoreUtils/createQuestionaireModel.js.map +0 -1
  348. package/src/utils/questionnaireStoreUtils/extractContainedValueSets.js +0 -59
  349. package/src/utils/questionnaireStoreUtils/extractContainedValueSets.js.map +0 -1
  350. package/src/utils/questionnaireStoreUtils/extractLaunchContext.js +0 -18
  351. package/src/utils/questionnaireStoreUtils/extractLaunchContext.js.map +0 -1
  352. package/src/utils/questionnaireStoreUtils/extractOtherExtensions.js +0 -174
  353. package/src/utils/questionnaireStoreUtils/extractOtherExtensions.js.map +0 -1
  354. package/src/utils/questionnaireStoreUtils/extractTabs.js +0 -31
  355. package/src/utils/questionnaireStoreUtils/extractTabs.js.map +0 -1
  356. package/src/utils/questionnaireStoreUtils/extractVariables.js +0 -63
  357. package/src/utils/questionnaireStoreUtils/extractVariables.js.map +0 -1
  358. package/src/utils/questionnaireStoreUtils/resolveValueSets.js +0 -58
  359. package/src/utils/questionnaireStoreUtils/resolveValueSets.js.map +0 -1
  360. package/src/utils/tabs.js +0 -190
  361. package/src/utils/tabs.js.map +0 -1
  362. package/src/utils/valueSet.js +0 -126
  363. package/src/utils/valueSet.js.map +0 -1
@@ -1,52 +0,0 @@
1
- /*
2
- * Copyright 2023 Commonwealth Scientific and Industrial Research
3
- * Organisation (CSIRO) ABN 41 687 119 230.
4
- *
5
- * Licensed under the Apache License, Version 2.0 (the "License");
6
- * you may not use this file except in compliance with the License.
7
- * You may obtain a copy of the License at
8
- *
9
- * http://www.apache.org/licenses/LICENSE-2.0
10
- *
11
- * Unless required by applicable law or agreed to in writing, software
12
- * distributed under the License is distributed on an "AS IS" BASIS,
13
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
- * See the License for the specific language governing permissions and
15
- * limitations under the License.
16
- */
17
- import React from 'react';
18
- import useRenderingExtensions from '../../../hooks/useRenderingExtensions';
19
- import { createEmptyQrItem } from '../../../utils/qrItem';
20
- import { FullWidthFormComponentBox } from '../../Box.styles';
21
- import ItemFieldGrid from '../ItemParts/ItemFieldGrid';
22
- import DateTimeField from './DateTimeField';
23
- import dayjs from 'dayjs';
24
- function DateTimeItem(props) {
25
- const { qItem, qrItem, isRepeated, isTabled, onQrItemChange } = props;
26
- // Get additional rendering extensions
27
- const { displayPrompt, displayInstructions, readOnly, entryFormat } = useRenderingExtensions(qItem);
28
- // Init input value
29
- let dateTimeString = null;
30
- if ((qrItem === null || qrItem === void 0 ? void 0 : qrItem.answer) && (qrItem === null || qrItem === void 0 ? void 0 : qrItem.answer[0].valueDateTime)) {
31
- dateTimeString = qrItem.answer[0].valueDateTime;
32
- }
33
- const dateTimeDayJs = dateTimeString ? dayjs(dateTimeString) : null;
34
- // Event handlers
35
- function handleDateTimeChange(newValue) {
36
- const emptyQrItem = createEmptyQrItem(qItem);
37
- if (newValue) {
38
- onQrItemChange(Object.assign(Object.assign({}, emptyQrItem), { answer: [{ valueDateTime: newValue.format() }] }));
39
- }
40
- else {
41
- onQrItemChange(emptyQrItem);
42
- }
43
- }
44
- if (isRepeated) {
45
- return (React.createElement(DateTimeField, { value: dateTimeDayJs, displayPrompt: displayPrompt, entryFormat: entryFormat, readOnly: readOnly, onDateTimeChange: handleDateTimeChange, isTabled: isTabled }));
46
- }
47
- return (React.createElement(FullWidthFormComponentBox, { "data-test": "q-item-date-time-box" },
48
- React.createElement(ItemFieldGrid, { qItem: qItem, displayInstructions: displayInstructions },
49
- React.createElement(DateTimeField, { value: dateTimeDayJs, displayPrompt: displayPrompt, entryFormat: entryFormat, readOnly: readOnly, onDateTimeChange: handleDateTimeChange, isTabled: isTabled }))));
50
- }
51
- export default DateTimeItem;
52
- //# sourceMappingURL=DateTimeItem.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"DateTimeItem.js","sourceRoot":"","sources":["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,IAAI,cAAc,GAAkB,IAAI,CAAC;IACzC,IAAI,CAAA,MAAM,aAAN,MAAM,uBAAN,MAAM,CAAE,MAAM,MAAI,MAAM,aAAN,MAAM,uBAAN,MAAM,CAAE,MAAM,CAAC,CAAC,EAAE,aAAa,CAAA,EAAE;QACrD,cAAc,GAAG,MAAM,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,aAAa,CAAC;KACjD;IACD,MAAM,aAAa,GAAG,cAAc,CAAC,CAAC,CAAC,KAAK,CAAC,cAAc,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC;IAEpE,iBAAiB;IACjB,SAAS,oBAAoB,CAAC,QAAsB;QAClD,MAAM,WAAW,GAAG,iBAAiB,CAAC,KAAK,CAAC,CAAC;QAC7C,IAAI,QAAQ,EAAE;YACZ,cAAc,iCAAM,WAAW,KAAE,MAAM,EAAE,CAAC,EAAE,aAAa,EAAE,QAAQ,CAAC,MAAM,EAAE,EAAE,CAAC,IAAG,CAAC;SACpF;aAAM;YACL,cAAc,CAAC,WAAW,CAAC,CAAC;SAC7B;IACH,CAAC;IAED,IAAI,UAAU,EAAE;QACd,OAAO,CACL,oBAAC,aAAa,IACZ,KAAK,EAAE,aAAa,EACpB,aAAa,EAAE,aAAa,EAC5B,WAAW,EAAE,WAAW,EACxB,QAAQ,EAAE,QAAQ,EAClB,gBAAgB,EAAE,oBAAoB,EACtC,QAAQ,EAAE,QAAQ,GAClB,CACH,CAAC;KACH;IAED,OAAO,CACL,oBAAC,yBAAyB,iBAAW,sBAAsB;QACzD,oBAAC,aAAa,IAAC,KAAK,EAAE,KAAK,EAAE,mBAAmB,EAAE,mBAAmB;YACnE,oBAAC,aAAa,IACZ,KAAK,EAAE,aAAa,EACpB,aAAa,EAAE,aAAa,EAC5B,WAAW,EAAE,WAAW,EACxB,QAAQ,EAAE,QAAQ,EAClB,gBAAgB,EAAE,oBAAoB,EACtC,QAAQ,EAAE,QAAQ,GAClB,CACY,CACU,CAC7B,CAAC;AACJ,CAAC;AAED,eAAe,YAAY,CAAC"}
@@ -1,30 +0,0 @@
1
- /*
2
- * Copyright 2023 Commonwealth Scientific and Industrial Research
3
- * Organisation (CSIRO) ABN 41 687 119 230.
4
- *
5
- * Licensed under the Apache License, Version 2.0 (the "License");
6
- * you may not use this file except in compliance with the License.
7
- * You may obtain a copy of the License at
8
- *
9
- * http://www.apache.org/licenses/LICENSE-2.0
10
- *
11
- * Unless required by applicable law or agreed to in writing, software
12
- * distributed under the License is distributed on an "AS IS" BASIS,
13
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
- * See the License for the specific language governing permissions and
15
- * limitations under the License.
16
- */
17
- import React from 'react';
18
- import { InputAdornment } from '@mui/material';
19
- import FadingCheckIcon from '../ItemParts/FadingCheckIcon';
20
- import { StandardTextField } from '../Textfield.styles';
21
- function DecimalField(props) {
22
- const { linkId, input, feedback, displayPrompt, displayUnit, entryFormat, readOnly, calcExpUpdated, isTabled, onInputChange } = props;
23
- return (React.createElement(StandardTextField, { id: linkId, value: input, error: !!feedback, onChange: (event) => onInputChange(event.target.value), disabled: readOnly, label: displayPrompt, placeholder: entryFormat, fullWidth: true, isTabled: isTabled, size: "small", inputProps: { inputMode: 'numeric', pattern: '[0-9]*' }, InputProps: {
24
- endAdornment: (React.createElement(InputAdornment, { position: 'end' },
25
- React.createElement(FadingCheckIcon, { fadeIn: calcExpUpdated }),
26
- displayUnit))
27
- }, "data-test": "q-item-decimal-field" }));
28
- }
29
- export default DecimalField;
30
- //# sourceMappingURL=DecimalField.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"DecimalField.js","sourceRoot":"","sources":["DecimalField.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAEH,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,cAAc,EAAE,MAAM,eAAe,CAAC;AAC/C,OAAO,eAAe,MAAM,8BAA8B,CAAC;AAC3D,OAAO,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AAexD,SAAS,YAAY,CAAC,KAAwB;IAC5C,MAAM,EACJ,MAAM,EACN,KAAK,EACL,QAAQ,EACR,aAAa,EACb,WAAW,EACX,WAAW,EACX,QAAQ,EACR,cAAc,EACd,QAAQ,EACR,aAAa,EACd,GAAG,KAAK,CAAC;IAEV,OAAO,CACL,oBAAC,iBAAiB,IAChB,EAAE,EAAE,MAAM,EACV,KAAK,EAAE,KAAK,EACZ,KAAK,EAAE,CAAC,CAAC,QAAQ,EACjB,QAAQ,EAAE,CAAC,KAAK,EAAE,EAAE,CAAC,aAAa,CAAC,KAAK,CAAC,MAAM,CAAC,KAAK,CAAC,EACtD,QAAQ,EAAE,QAAQ,EAClB,KAAK,EAAE,aAAa,EACpB,WAAW,EAAE,WAAW,EACxB,SAAS,QACT,QAAQ,EAAE,QAAQ,EAClB,IAAI,EAAC,OAAO,EACZ,UAAU,EAAE,EAAE,SAAS,EAAE,SAAS,EAAE,OAAO,EAAE,QAAQ,EAAE,EACvD,UAAU,EAAE;YACV,YAAY,EAAE,CACZ,oBAAC,cAAc,IAAC,QAAQ,EAAE,KAAK;gBAC7B,oBAAC,eAAe,IAAC,MAAM,EAAE,cAAc,GAAI;gBAC1C,WAAW,CACG,CAClB;SACF,eACS,sBAAsB,GAChC,CACH,CAAC;AACJ,CAAC;AAED,eAAe,YAAY,CAAC"}
@@ -1,80 +0,0 @@
1
- /*
2
- * Copyright 2023 Commonwealth Scientific and Industrial Research
3
- * Organisation (CSIRO) ABN 41 687 119 230.
4
- *
5
- * Licensed under the Apache License, Version 2.0 (the "License");
6
- * you may not use this file except in compliance with the License.
7
- * You may obtain a copy of the License at
8
- *
9
- * http://www.apache.org/licenses/LICENSE-2.0
10
- *
11
- * Unless required by applicable law or agreed to in writing, software
12
- * distributed under the License is distributed on an "AS IS" BASIS,
13
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
- * See the License for the specific language governing permissions and
15
- * limitations under the License.
16
- */
17
- import React, { useCallback, useState } from 'react';
18
- import useRenderingExtensions from '../../../hooks/useRenderingExtensions';
19
- import { FullWidthFormComponentBox } from '../../Box.styles';
20
- import useValidationError from '../../../hooks/useValidationError';
21
- import debounce from 'lodash.debounce';
22
- import { DEBOUNCE_DURATION } from '../../../utils/debounce';
23
- import { createEmptyQrItemWithUnit } from '../../../utils/qrItem';
24
- import ItemFieldGrid from '../ItemParts/ItemFieldGrid';
25
- import DecimalField from './DecimalField';
26
- import { parseDecimalStringToFloat, parseDecimalStringWithPrecision } from '../../../utils/parseInputs';
27
- import { getDecimalPrecision } from '../../../utils/itemControl';
28
- import useDecimalCalculatedExpression from '../../../hooks/useDecimalCalculatedExpression';
29
- function DecimalItem(props) {
30
- const { qItem, qrItem, isRepeated, isTabled, onQrItemChange } = props;
31
- // Get additional rendering extensions
32
- const precision = getDecimalPrecision(qItem);
33
- const { displayUnit, displayPrompt, displayInstructions, readOnly, entryFormat, regexValidation, maxLength } = useRenderingExtensions(qItem);
34
- // Init input value
35
- let valueDecimal = 0.0;
36
- let initialInput = '0';
37
- if (qrItem === null || qrItem === void 0 ? void 0 : qrItem.answer) {
38
- if (qrItem === null || qrItem === void 0 ? void 0 : qrItem.answer[0].valueDecimal) {
39
- valueDecimal = qrItem.answer[0].valueDecimal;
40
- }
41
- if (qrItem === null || qrItem === void 0 ? void 0 : qrItem.answer[0].valueInteger) {
42
- valueDecimal = qrItem.answer[0].valueInteger;
43
- }
44
- initialInput = precision ? valueDecimal.toFixed(precision) : valueDecimal.toString();
45
- }
46
- const [input, setInput] = useState(initialInput);
47
- // Perform validation checks
48
- const feedback = useValidationError(input, regexValidation, maxLength);
49
- // Process calculated expressions
50
- const { calcExpUpdated } = useDecimalCalculatedExpression({
51
- qItem: qItem,
52
- inputValue: input,
53
- displayUnit: displayUnit,
54
- precision: precision,
55
- setInputValue: (newInput) => {
56
- setInput(newInput);
57
- },
58
- onQrItemChange: onQrItemChange
59
- });
60
- // Event handlers
61
- function handleInputChange(newInput) {
62
- const parsedNewInput = parseDecimalStringWithPrecision(newInput, precision);
63
- setInput(parsedNewInput);
64
- updateQrItemWithDebounce(parsedNewInput);
65
- }
66
- // eslint-disable-next-line react-hooks/exhaustive-deps
67
- const updateQrItemWithDebounce = useCallback(debounce((parsedNewInput) => {
68
- onQrItemChange(Object.assign(Object.assign({}, createEmptyQrItemWithUnit(qItem, displayUnit)), { answer: precision
69
- ? [{ valueDecimal: parseDecimalStringToFloat(parsedNewInput, precision) }]
70
- : [{ valueDecimal: parseFloat(parsedNewInput) }] }));
71
- }, DEBOUNCE_DURATION), [onQrItemChange, qItem, displayUnit, precision]); // Dependencies are tested, debounce is causing eslint to not recognise dependencies
72
- if (isRepeated) {
73
- 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 }));
74
- }
75
- return (React.createElement(FullWidthFormComponentBox, { "data-test": "q-item-decimal-box" },
76
- React.createElement(ItemFieldGrid, { qItem: qItem, displayInstructions: displayInstructions },
77
- React.createElement(DecimalField, { linkId: qItem.linkId, input: input, feedback: feedback, displayPrompt: displayPrompt, displayUnit: displayUnit, entryFormat: entryFormat, readOnly: readOnly, calcExpUpdated: calcExpUpdated, isTabled: isTabled, onInputChange: handleInputChange }))));
78
- }
79
- export default DecimalItem;
80
- //# sourceMappingURL=DecimalItem.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"DecimalItem.js","sourceRoot":"","sources":["DecimalItem.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAEH,OAAO,KAAK,EAAE,EAAE,WAAW,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAOrD,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;AAU3F,SAAS,WAAW,CAAC,KAAuB;I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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,26 +0,0 @@
1
- /*
2
- * Copyright 2023 Commonwealth Scientific and Industrial Research
3
- * Organisation (CSIRO) ABN 41 687 119 230.
4
- *
5
- * Licensed under the Apache License, Version 2.0 (the "License");
6
- * you may not use this file except in compliance with the License.
7
- * You may obtain a copy of the License at
8
- *
9
- * http://www.apache.org/licenses/LICENSE-2.0
10
- *
11
- * Unless required by applicable law or agreed to in writing, software
12
- * distributed under the License is distributed on an "AS IS" BASIS,
13
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
- * See the License for the specific language governing permissions and
15
- * limitations under the License.
16
- */
17
- import React, { memo } from 'react';
18
- import { Typography } from '@mui/material';
19
- import { DisplayInstructionsWrapper } from './DisplayInstructions.styles';
20
- const DisplayInstructions = memo(function DisplayInstructions(props) {
21
- const { displayInstructions } = props;
22
- return displayInstructions ? (React.createElement(DisplayInstructionsWrapper, null,
23
- React.createElement(Typography, { variant: "caption", fontSize: 10.5 }, displayInstructions))) : null;
24
- });
25
- export default DisplayInstructions;
26
- //# sourceMappingURL=DisplayInstructions.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"DisplayInstructions.js","sourceRoot":"","sources":["DisplayInstructions.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAEH,OAAO,KAAK,EAAE,EAAE,IAAI,EAAE,MAAM,OAAO,CAAC;AACpC,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAC3C,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 +0,0 @@
1
- {"version":3,"file":"DisplayInstructions.styles.js","sourceRoot":"","sources":["DisplayInstructions.styles.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAEH,OAAO,EAAE,GAAG,EAAE,MAAM,EAAE,MAAM,eAAe,CAAC;AAE5C,MAAM,CAAC,MAAM,0BAA0B,GAAG,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,KAAK,EAAE,EAAE,EAAE,CAAC,CAAC;IACpE,KAAK,EAAE,KAAK,CAAC,OAAO,CAAC,IAAI,CAAC,SAAS;IACnC,aAAa,EAAE,YAAY;IAC3B,YAAY,EAAE,KAAK;CACpB,CAAC,CAAC,CAAC"}
@@ -1,31 +0,0 @@
1
- /*
2
- * Copyright 2023 Commonwealth Scientific and Industrial Research
3
- * Organisation (CSIRO) ABN 41 687 119 230.
4
- *
5
- * Licensed under the Apache License, Version 2.0 (the "License");
6
- * you may not use this file except in compliance with the License.
7
- * You may obtain a copy of the License at
8
- *
9
- * http://www.apache.org/licenses/LICENSE-2.0
10
- *
11
- * Unless required by applicable law or agreed to in writing, software
12
- * distributed under the License is distributed on an "AS IS" BASIS,
13
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
- * See the License for the specific language governing permissions and
15
- * limitations under the License.
16
- */
17
- import React, { memo } from 'react';
18
- import { FullWidthFormComponentBox } from '../../Box.styles';
19
- import { isSpecificItemControl } from '../../../utils/itemControl';
20
- import LabelWrapper from '../ItemParts/ItemLabelWrapper';
21
- const DisplayItem = memo(function DisplayItem(props) {
22
- const { qItem } = props;
23
- const isContextDisplay = isSpecificItemControl(qItem, 'context-display');
24
- if (isContextDisplay) {
25
- return null;
26
- }
27
- return (React.createElement(FullWidthFormComponentBox, null,
28
- React.createElement(LabelWrapper, { qItem: qItem })));
29
- });
30
- export default DisplayItem;
31
- //# sourceMappingURL=DisplayItem.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"DisplayItem.js","sourceRoot":"","sources":["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,58 +0,0 @@
1
- /*
2
- * Copyright 2023 Commonwealth Scientific and Industrial Research
3
- * Organisation (CSIRO) ABN 41 687 119 230.
4
- *
5
- * Licensed under the Apache License, Version 2.0 (the "License");
6
- * you may not use this file except in compliance with the License.
7
- * You may obtain a copy of the License at
8
- *
9
- * http://www.apache.org/licenses/LICENSE-2.0
10
- *
11
- * Unless required by applicable law or agreed to in writing, software
12
- * distributed under the License is distributed on an "AS IS" BASIS,
13
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
- * See the License for the specific language governing permissions and
15
- * limitations under the License.
16
- */
17
- import React, { useMemo } from 'react';
18
- import { createQrGroup, updateQrGroup } from '../../../utils/qrItem';
19
- import useHidden from '../../../hooks/useHidden';
20
- import { QGroupContainerBox } from '../../Box.styles';
21
- import { Divider, Paper, TableContainer, Typography } from '@mui/material';
22
- import { mapQItemsIndex } from '../../../utils/mapItem';
23
- import GridTable from './GridTable';
24
- import LabelWrapper from '../ItemParts/ItemLabelWrapper';
25
- function GridGroup(props) {
26
- const { qItem, qrItem, groupCardElevation, onQrItemChange } = props;
27
- const qRowItems = qItem.item;
28
- const qrGroup = qrItem && qrItem.item ? qrItem : createQrGroup(qItem);
29
- const qrRowItems = qrGroup.item;
30
- const qItemsIndexMap = useMemo(() => mapQItemsIndex(qItem), [qItem]);
31
- 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]);
32
- const itemIsHidden = useHidden(qItem);
33
- if (itemIsHidden) {
34
- return null;
35
- }
36
- if (!qRowItems || !qrRowItems) {
37
- return React.createElement(React.Fragment, null, "Unable to load group, something has gone terribly wrong.");
38
- }
39
- // Check if there are row within the grid
40
- if (qRowItems.length === 0) {
41
- return null;
42
- }
43
- // Event Handlers
44
- function handleRowChange(newQrItem) {
45
- const updatedQrGroup = Object.assign({}, qrGroup);
46
- updateQrGroup(newQrItem, null, updatedQrGroup, qItemsIndexMap);
47
- onQrItemChange(updatedQrGroup);
48
- }
49
- return (React.createElement(React.Fragment, null,
50
- React.createElement(QGroupContainerBox, { cardElevation: groupCardElevation, isRepeated: false, py: 3 },
51
- React.createElement(Typography, { fontSize: 13, variant: "h6" },
52
- React.createElement(LabelWrapper, { qItem: qItem })),
53
- React.createElement(Divider, { sx: { my: 1 }, light: true }),
54
- React.createElement(TableContainer, { component: Paper, elevation: groupCardElevation },
55
- React.createElement(GridTable, { qItems: qRowItems, qrItems: qrRowItems, qItemsIndexMap: qItemsIndexMap, columnLabels: columnLabels, onQrItemChange: handleRowChange })))));
56
- }
57
- export default GridGroup;
58
- //# sourceMappingURL=GridGroup.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"GridGroup.js","sourceRoot":"","sources":["GridGroup.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAEH,OAAO,KAAK,EAAE,EAAE,OAAO,EAAE,MAAM,OAAO,CAAC;AAGvC,OAAO,EAAE,aAAa,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAC;AACrE,OAAO,SAAS,MAAM,0BAA0B,CAAC;AACjD,OAAO,EAAE,kBAAkB,EAAE,MAAM,kBAAkB,CAAC;AACtD,OAAO,EAAE,OAAO,EAAE,KAAK,EAAE,cAAc,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAC3E,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,EAAE,cAAc,EAAE,GAAG,KAAK,CAAC;IAEpE,MAAM,SAAS,GAAG,KAAK,CAAC,IAAI,CAAC;IAC7B,MAAM,OAAO,GAAG,MAAM,IAAI,MAAM,CAAC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AY,IAAC,KAAK,EAAE,KAAK,GAAI,CACnB;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,cAAc,EAAE,eAAe,GAC/B,CACa,CACE,CACpB,CACJ,CAAC;AACJ,CAAC;AAED,eAAe,SAAS,CAAC"}
@@ -1,55 +0,0 @@
1
- /*
2
- * Copyright 2023 Commonwealth Scientific and Industrial Research
3
- * Organisation (CSIRO) ABN 41 687 119 230.
4
- *
5
- * Licensed under the Apache License, Version 2.0 (the "License");
6
- * you may not use this file except in compliance with the License.
7
- * You may obtain a copy of the License at
8
- *
9
- * http://www.apache.org/licenses/LICENSE-2.0
10
- *
11
- * Unless required by applicable law or agreed to in writing, software
12
- * distributed under the License is distributed on an "AS IS" BASIS,
13
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
- * See the License for the specific language governing permissions and
15
- * limitations under the License.
16
- */
17
- import React, { useMemo } from 'react';
18
- import { createQrGroup, updateQrGroup } from '../../../utils/qrItem';
19
- import { GridAnswerTableCell, GridTextTableCell } from '../Tables/Table.styles';
20
- import SingleItem from '../SingleItem/SingleItem';
21
- import { getQrItemsIndex, mapQItemsIndex } from '../../../utils/mapItem';
22
- import { Typography } from '@mui/material';
23
- function GridRow(props) {
24
- const { qItem, qrItem, columnLabels, numOfColumns, onQrItemChange } = props;
25
- const rowQItems = qItem.item;
26
- const row = qrItem && qrItem.item ? qrItem : createQrGroup(qItem);
27
- const rowQrItems = row.item;
28
- const qItemsIndexMap = useMemo(() => mapQItemsIndex(qItem), [qItem]);
29
- if (!rowQItems || !rowQrItems) {
30
- return null;
31
- }
32
- function handleQrRowItemChange(newQrRowItem) {
33
- const qrRow = Object.assign({}, row);
34
- updateQrGroup(newQrRowItem, null, qrRow, qItemsIndexMap);
35
- onQrItemChange(qrRow);
36
- }
37
- const qrItemsByIndex = getQrItemsIndex(rowQItems, rowQrItems, qItemsIndexMap);
38
- return (React.createElement(React.Fragment, null,
39
- React.createElement(GridTextTableCell, null,
40
- React.createElement(Typography, { fontWeight: "bold" }, qItem.text)),
41
- rowQItems.map((cellQItem, index) => {
42
- const cellQrItem = qrItemsByIndex[index];
43
- // Don't render cell if column label does not match - "sparse-ness" of grid
44
- if (columnLabels[index] !== cellQItem.text) {
45
- return null;
46
- }
47
- if (Array.isArray(cellQrItem)) {
48
- return null;
49
- }
50
- return (React.createElement(GridAnswerTableCell, { key: index, numOfColumns: numOfColumns },
51
- React.createElement(SingleItem, { qItem: cellQItem, qrItem: cellQrItem, isRepeated: true, isTabled: true, onQrItemChange: handleQrRowItemChange })));
52
- })));
53
- }
54
- export default GridRow;
55
- //# sourceMappingURL=GridRow.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"GridRow.js","sourceRoot":"","sources":["GridRow.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAEH,OAAO,KAAK,EAAE,EAAE,OAAO,EAAE,MAAM,OAAO,CAAC;AAGvC,OAAO,EAAE,aAAa,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAC;AACrE,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,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAS3C,SAAS,OAAO,CAAC,KAAmB;IAClC,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,YAAY,EAAE,YAAY,EAAE,cAAc,EAAE,GAAG,KAAK,CAAC;IAE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AAK,EAAE,SAAS,EAChB,MAAM,EAAE,UAAU,EAClB,UAAU,EAAE,IAAI,EAChB,QAAQ,EAAE,IAAI,EACd,cAAc,EAAE,qBAAqB,GACrC,CACkB,CACvB,CAAC;QACJ,CAAC,CAAC,CACD,CACJ,CAAC;AACJ,CAAC;AAED,eAAe,OAAO,CAAC"}
@@ -1,42 +0,0 @@
1
- /*
2
- * Copyright 2023 Commonwealth Scientific and Industrial Research
3
- * Organisation (CSIRO) ABN 41 687 119 230.
4
- *
5
- * Licensed under the Apache License, Version 2.0 (the "License");
6
- * you may not use this file except in compliance with the License.
7
- * You may obtain a copy of the License at
8
- *
9
- * http://www.apache.org/licenses/LICENSE-2.0
10
- *
11
- * Unless required by applicable law or agreed to in writing, software
12
- * distributed under the License is distributed on an "AS IS" BASIS,
13
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
- * See the License for the specific language governing permissions and
15
- * limitations under the License.
16
- */
17
- import React from 'react';
18
- import { Table, TableBody, TableCell, TableHead, TableRow } from '@mui/material';
19
- import { HeaderTableCell } from '../Tables/Table.styles';
20
- import GridRow from './GridRow';
21
- import { getQrItemsIndex } from '../../../utils/mapItem';
22
- function GridTable(props) {
23
- const { qItems, qrItems, qItemsIndexMap, columnLabels, onQrItemChange } = props;
24
- const qrItemsByIndex = getQrItemsIndex(qItems, qrItems, qItemsIndexMap);
25
- const numOfColumns = columnLabels.length;
26
- return (React.createElement(Table, null,
27
- React.createElement(TableHead, null,
28
- React.createElement(TableRow, null,
29
- React.createElement(HeaderTableCell, null),
30
- columnLabels.map((label) => (React.createElement(HeaderTableCell, { key: label }, label))),
31
- React.createElement(TableCell, null))),
32
- React.createElement(TableBody, null, qItems.map((qItem, index) => {
33
- const qrItem = qrItemsByIndex[index];
34
- if (Array.isArray(qrItem)) {
35
- return null;
36
- }
37
- return (React.createElement(TableRow, { key: qItem.linkId },
38
- React.createElement(GridRow, { qItem: qItem, qrItem: qrItem, columnLabels: columnLabels, numOfColumns: numOfColumns, onQrItemChange: onQrItemChange })));
39
- }))));
40
- }
41
- export default GridTable;
42
- //# sourceMappingURL=GridTable.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"GridTable.js","sourceRoot":"","sources":["GridTable.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAEH,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,KAAK,EAAE,SAAS,EAAE,SAAS,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AACjF,OAAO,EAAE,eAAe,EAAE,MAAM,wBAAwB,CAAC;AACzD,OAAO,OAAO,MAAM,WAAW,CAAC;AAEhC,OAAO,EAAE,eAAe,EAAE,MAAM,wBAAwB,CAAC;AAUzD,SAAS,SAAS,CAAC,KAAqB;IACtC,MAAM,EAAE,MAAM,EAAE,OAAO,EAAE,cAAc,EAAE,YAAY,EAAE,cAAc,EAAE,GAAG,KAAK,CAAC;IAEhF,MAAM,cAAc,GAClB,eAAe,CAAC,MAAM,EAAE,OAAO,EAAE,cAAc,CAAC,CAAC;IAEnD,MAAM,YAAY,GAAG,YAAY,CAAC,MAAM,CAAC;IAEzC,OAAO,CACL,oBAAC,KAAK;QACJ,oBAAC,SAAS;YACR,oBAAC,QAAQ;gBACP,oBAAC,eAAe,OAAG;gBAClB,YAAY,CAAC,GAAG,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,CAC3B,oBAAC,eAAe,IAAC,GAAG,EAAE,KAAK,IAAG,KAAK,CAAmB,CACvD,CAAC;gBACF,oBAAC,SAAS,OAAG,CACJ,CACD;QACZ,oBAAC,SAAS,QACP,MAAM,CAAC,GAAG,CAAC,CAAC,KAAK,EAAE,KAAK,EAAE,EAAE;YAC3B,MAAM,MAAM,GAAG,cAAc,CAAC,KAAK,CAAC,CAAC;YAErC,IAAI,KAAK,CAAC,OAAO,CAAC,MAAM,CAAC,EAAE;gBACzB,OAAO,IAAI,CAAC;aACb;YAED,OAAO,CACL,oBAAC,QAAQ,IAAC,GAAG,EAAE,KAAK,CAAC,MAAM;gBACzB,oBAAC,OAAO,IACN,KAAK,EAAE,KAAK,EACZ,MAAM,EAAE,MAAM,EACd,YAAY,EAAE,YAAY,EAC1B,YAAY,EAAE,YAAY,EAC1B,cAAc,EAAE,cAAc,GAC9B,CACO,CACZ,CAAC;QACJ,CAAC,CAAC,CACQ,CACN,CACT,CAAC;AACJ,CAAC;AAED,eAAe,SAAS,CAAC"}
@@ -1,39 +0,0 @@
1
- /*
2
- * Copyright 2023 Commonwealth Scientific and Industrial Research
3
- * Organisation (CSIRO) ABN 41 687 119 230.
4
- *
5
- * Licensed under the Apache License, Version 2.0 (the "License");
6
- * you may not use this file except in compliance with the License.
7
- * You may obtain a copy of the License at
8
- *
9
- * http://www.apache.org/licenses/LICENSE-2.0
10
- *
11
- * Unless required by applicable law or agreed to in writing, software
12
- * distributed under the License is distributed on an "AS IS" BASIS,
13
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
- * See the License for the specific language governing permissions and
15
- * limitations under the License.
16
- */
17
- import React, { memo } from 'react';
18
- import { Box, Divider } from '@mui/material';
19
- import { QGroupHeadingTypography } from '../Typography.styles';
20
- import { getContextDisplays } from '../../../utils/tabs';
21
- import ContextDisplayItem from '../ItemParts/ContextDisplayItem';
22
- import LabelText from '../ItemParts/ItemLabelText';
23
- const GroupHeading = memo(function GroupHeading(props) {
24
- const { qItem, tabIsMarkedAsComplete, isRepeated } = props;
25
- const contextDisplayItems = getContextDisplays(qItem);
26
- if (isRepeated) {
27
- return null;
28
- }
29
- return (React.createElement(React.Fragment, null,
30
- React.createElement(Box, { display: "flex", alignItems: "center", justifyContent: "space-between" },
31
- React.createElement(QGroupHeadingTypography, { variant: "h6", isTabHeading: tabIsMarkedAsComplete !== undefined },
32
- React.createElement(LabelText, { qItem: qItem })),
33
- React.createElement(Box, { display: "flex", columnGap: 0.5 }, contextDisplayItems.map((item) => {
34
- return React.createElement(ContextDisplayItem, { key: item.linkId, displayItem: item });
35
- }))),
36
- qItem.text ? React.createElement(Divider, { sx: { mt: 1, mb: 1.5 }, light: true }) : null));
37
- });
38
- export default GroupHeading;
39
- //# sourceMappingURL=GroupHeading.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"GroupHeading.js","sourceRoot":"","sources":["GroupHeading.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAEH,OAAO,KAAK,EAAE,EAAE,IAAI,EAAE,MAAM,OAAO,CAAC;AACpC,OAAO,EAAE,GAAG,EAAE,OAAO,EAAE,MAAM,eAAe,CAAC;AAC7C,OAAO,EAAE,uBAAuB,EAAE,MAAM,sBAAsB,CAAC;AAG/D,OAAO,EAAE,kBAAkB,EAAE,MAAM,qBAAqB,CAAC;AACzD,OAAO,kBAAkB,MAAM,iCAAiC,CAAC;AACjE,OAAO,SAAS,MAAM,4BAA4B,CAAC;AAOnD,MAAM,YAAY,GAAG,IAAI,CAAC,SAAS,YAAY,CAAC,KAAwB;IACtE,MAAM,EAAE,KAAK,EAAE,qBAAqB,EAAE,UAAU,EAAE,GAAG,KAAK,CAAC;IAE3D,MAAM,mBAAmB,GAAG,kBAAkB,CAAC,KAAK,CAAC,CAAC;IAEtD,IAAI,UAAU,EAAE;QACd,OAAO,IAAI,CAAC;KACb;IAED,OAAO,CACL;QACE,oBAAC,GAAG,IAAC,OAAO,EAAC,MAAM,EAAC,UAAU,EAAC,QAAQ,EAAC,cAAc,EAAC,eAAe;YACpE,oBAAC,uBAAuB,IAAC,OAAO,EAAC,IAAI,EAAC,YAAY,EAAE,qBAAqB,KAAK,SAAS;gBACrF,oBAAC,SAAS,IAAC,KAAK,EAAE,KAAK,GAAI,CACH;YAE1B,oBAAC,GAAG,IAAC,OAAO,EAAC,MAAM,EAAC,SAAS,EAAE,GAAG,IAC/B,mBAAmB,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE;gBAChC,OAAO,oBAAC,kBAAkB,IAAC,GAAG,EAAE,IAAI,CAAC,MAAM,EAAE,WAAW,EAAE,IAAI,GAAI,CAAC;YACrE,CAAC,CAAC,CACE,CACF;QACL,KAAK,CAAC,IAAI,CAAC,CAAC,CAAC,oBAAC,OAAO,IAAC,EAAE,EAAE,EAAE,EAAE,EAAE,CAAC,EAAE,EAAE,EAAE,GAAG,EAAE,EAAE,KAAK,SAAG,CAAC,CAAC,CAAC,IAAI,CAC7D,CACJ,CAAC;AACJ,CAAC,CAAC,CAAC;AAEH,eAAe,YAAY,CAAC"}
@@ -1,62 +0,0 @@
1
- /*
2
- * Copyright 2023 Commonwealth Scientific and Industrial Research
3
- * Organisation (CSIRO) ABN 41 687 119 230.
4
- *
5
- * Licensed under the Apache License, Version 2.0 (the "License");
6
- * you may not use this file except in compliance with the License.
7
- * You may obtain a copy of the License at
8
- *
9
- * http://www.apache.org/licenses/LICENSE-2.0
10
- *
11
- * Unless required by applicable law or agreed to in writing, software
12
- * distributed under the License is distributed on an "AS IS" BASIS,
13
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
- * See the License for the specific language governing permissions and
15
- * limitations under the License.
16
- */
17
- import React, { useMemo } from 'react';
18
- import { getQrItemsIndex, mapQItemsIndex } from '../../../utils/mapItem';
19
- import { createQrGroup, updateQrGroup } from '../../../utils/qrItem';
20
- import { QGroupContainerBox } from '../../Box.styles';
21
- import useHidden from '../../../hooks/useHidden';
22
- import GroupHeading from './GroupHeading';
23
- import { GroupCard } from './GroupItem.styles';
24
- import NextTabButtonWrapper from './NextTabButtonWrapper';
25
- import GroupItemSwitcher from './GroupItemSwitcher';
26
- function GroupItem(props) {
27
- const { qItem, qrItem, isRepeated, groupCardElevation, tabIsMarkedAsComplete, tabs, currentTabIndex, onQrItemChange } = props;
28
- const qItemsIndexMap = useMemo(() => mapQItemsIndex(qItem), [qItem]);
29
- const itemIsHidden = useHidden(qItem);
30
- if (itemIsHidden) {
31
- return null;
32
- }
33
- const qItems = qItem.item;
34
- const qrGroup = qrItem && qrItem.item ? qrItem : createQrGroup(qItem);
35
- const qrItems = qrGroup.item;
36
- // Event Handlers
37
- function handleQrItemChange(newQrItem) {
38
- const updatedQrGroup = Object.assign({}, qrGroup);
39
- updateQrGroup(newQrItem, null, updatedQrGroup, qItemsIndexMap);
40
- onQrItemChange(updatedQrGroup);
41
- }
42
- function handleQrRepeatGroupChange(qrRepeatGroup) {
43
- const updatedQrGroup = Object.assign({}, qrGroup);
44
- updateQrGroup(null, qrRepeatGroup, updatedQrGroup, qItemsIndexMap);
45
- onQrItemChange(updatedQrGroup);
46
- }
47
- if (!qItems || !qrItems) {
48
- return React.createElement(React.Fragment, null, "Unable to load group, something has gone terribly wrong.");
49
- }
50
- // If an item has multiple answers, it is a repeat group
51
- const qrItemsByIndex = getQrItemsIndex(qItems, qrItems, qItemsIndexMap);
52
- return (React.createElement(QGroupContainerBox, { cardElevation: groupCardElevation, isRepeated: isRepeated, "data-test": "q-item-group-box" },
53
- React.createElement(GroupCard, { elevation: groupCardElevation, isRepeated: isRepeated },
54
- React.createElement(GroupHeading, { qItem: qItem, tabIsMarkedAsComplete: tabIsMarkedAsComplete, isRepeated: isRepeated }),
55
- qItems.map((qItem, i) => {
56
- const qrItemOrItems = qrItemsByIndex[i];
57
- return (React.createElement(GroupItemSwitcher, { key: qItem.linkId, qItem: qItem, qrItemOrItems: qrItemOrItems, groupCardElevation: groupCardElevation, onQrItemChange: handleQrItemChange, onQrRepeatGroupChange: handleQrRepeatGroupChange }));
58
- }),
59
- React.createElement(NextTabButtonWrapper, { currentTabIndex: currentTabIndex, tabs: tabs }))));
60
- }
61
- export default GroupItem;
62
- //# sourceMappingURL=GroupItem.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"GroupItem.js","sourceRoot":"","sources":["GroupItem.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAEH,OAAO,KAAK,EAAE,EAAE,OAAO,EAAE,MAAM,OAAO,CAAC;AACvC,OAAO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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 { Card, styled } from '@mui/material';
18
- export const GroupCard = styled(Card, {
19
- shouldForwardProp: (prop) => prop !== 'elevation' && prop !== 'isRepeated'
20
- })(({ elevation, isRepeated }) => ({
21
- paddingTop: '20px',
22
- paddingBottom: '20px',
23
- paddingLeft: elevation === 1 ? '26px' : '24px',
24
- paddingRight: elevation === 1 ? '26px' : '24px',
25
- marginBottom: isRepeated ? 0 : '28px'
26
- }));
27
- //# sourceMappingURL=GroupItem.styles.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"GroupItem.styles.js","sourceRoot":"","sources":["GroupItem.styles.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAEH,OAAO,EAAE,IAAI,EAAE,MAAM,EAAE,MAAM,eAAe,CAAC;AAE7C,MAAM,CAAC,MAAM,SAAS,GAAG,MAAM,CAAC,IAAI,EAAE;IACpC,iBAAiB,EAAE,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,KAAK,WAAW,IAAI,IAAI,KAAK,YAAY;CAC3E,CAAC,CAA6C,CAAC,EAAE,SAAS,EAAE,UAAU,EAAE,EAAE,EAAE,CAAC,CAAC;IAC7E,UAAU,EAAE,MAAM;IAClB,aAAa,EAAE,MAAM;IACrB,WAAW,EAAE,SAAS,KAAK,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,MAAM;IAC9C,YAAY,EAAE,SAAS,KAAK,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,MAAM;IAC/C,YAAY,EAAE,UAAU,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,MAAM;CACtC,CAAC,CAAC,CAAC"}