@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,73 +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 { isSpecificItemControl } from '../../../utils/itemControl';
19
- import QItemGroupTable from '../Tables/QItemGroupTable';
20
- import RepeatGroup from '../RepeatGroup/RepeatGroup';
21
- import { isRepeatItemAndNotCheckbox } from '../../../utils/qItem';
22
- import RepeatItem from '../RepeatItem/RepeatItem';
23
- import SingleItem from '../SingleItem/SingleItem';
24
- import useHidden from '../../../hooks/useHidden';
25
- import GroupItem from './GroupItem';
26
- import GridGroup from '../GridGroup/GridGroup';
27
- function GroupItemSwitcher(props) {
28
- const { qItem, qrItemOrItems, groupCardElevation, onQrItemChange, onQrRepeatGroupChange } = props;
29
- const itemIsHidden = useHidden(qItem);
30
- if (itemIsHidden) {
31
- return null;
32
- }
33
- // If there are multiple answers
34
- const hasMultipleAnswers = Array.isArray(qrItemOrItems);
35
- if (hasMultipleAnswers) {
36
- const qrItems = qrItemOrItems;
37
- // qItem should always be either a repeatGroup or a groupTable item
38
- // groupTables item have qItem.repeats = true and qItem.type = 'group' as well
39
- if (!qItem.repeats || qItem.type !== 'group') {
40
- return React.createElement(React.Fragment, null, "Something went wrong here");
41
- }
42
- if (isSpecificItemControl(qItem, 'gtable')) {
43
- return (React.createElement(QItemGroupTable, { qItem: qItem, qrItems: qrItems, groupCardElevation: groupCardElevation + 1, onQrRepeatGroupChange: onQrRepeatGroupChange }));
44
- }
45
- return (React.createElement(RepeatGroup, { qItem: qItem, qrItems: qrItems, groupCardElevation: groupCardElevation + 1, onQrRepeatGroupChange: onQrRepeatGroupChange }));
46
- }
47
- // If there is only one answer
48
- const qrItem = qrItemOrItems;
49
- const itemIsGrid = isSpecificItemControl(qItem, 'grid');
50
- if (itemIsGrid) {
51
- return (React.createElement(GridGroup, { qItem: qItem, qrItem: qrItem, groupCardElevation: groupCardElevation, onQrItemChange: onQrItemChange }));
52
- }
53
- const itemRepeatsAndIsNotCheckbox = isRepeatItemAndNotCheckbox(qItem);
54
- if (itemRepeatsAndIsNotCheckbox) {
55
- if (qItem.type === 'group') {
56
- // If qItem is RepeatGroup or a groupTable item in this decision branch,
57
- // their qrItem array should always be empty
58
- if (isSpecificItemControl(qItem, 'gtable')) {
59
- return (React.createElement(QItemGroupTable, { qItem: qItem, qrItems: [], groupCardElevation: groupCardElevation + 1, onQrRepeatGroupChange: onQrRepeatGroupChange }));
60
- }
61
- return (React.createElement(RepeatGroup, { qItem: qItem, qrItems: [], groupCardElevation: groupCardElevation + 1, onQrRepeatGroupChange: onQrRepeatGroupChange }));
62
- }
63
- return React.createElement(RepeatItem, { qItem: qItem, qrItem: qrItem, onQrItemChange: onQrItemChange });
64
- }
65
- // if qItem is not a repeating question or is a checkbox
66
- if (qItem.type === 'group') {
67
- return (React.createElement(GroupItem, { qItem: qItem, qrItem: qrItem, isRepeated: false, groupCardElevation: groupCardElevation + 1, onQrItemChange: onQrItemChange }));
68
- }
69
- // Defaults to a normal QItemSwitcher
70
- return (React.createElement(SingleItem, { qItem: qItem, qrItem: qrItem, isRepeated: false, isTabled: false, onQrItemChange: onQrItemChange }));
71
- }
72
- export default GroupItemSwitcher;
73
- //# sourceMappingURL=GroupItemSwitcher.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"GroupItemSwitcher.js","sourceRoot":"","sources":["GroupItemSwitcher.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAEH,OAAO,KAAK,MAAM,OAAO,CAAC;AAM1B,OAAO,EAAE,qBAAqB,EAAE,MAAM,4BAA4B,CAAC;AACnE,OAAO,eAAe,MAAM,2BAA2B,CAAC;AACxD,OAAO,WAAW,MAAM,4BAA4B,CAAC;AACrD,OAAO,EAAE,0BAA0B,EAAE,MAAM,sBAAsB,CAAC;AAClE,OAAO,UAAU,MAAM,0BAA0B,CAAC;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,GAC9B,CACH,CAAC;AACJ,CAAC;AAED,eAAe,iBAAiB,CAAC"}
@@ -1,25 +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 { Button } from '@mui/material';
19
- import Iconify from '../../Iconify/Iconify';
20
- function NextTabButton(props) {
21
- const { isDisabled, onNextTabClick } = props;
22
- return (React.createElement(Button, { variant: "contained", size: "small", endIcon: React.createElement(Iconify, { icon: "material-symbols:arrow-forward" }), disabled: isDisabled, color: "secondary", onClick: onNextTabClick }, "Next tab"));
23
- }
24
- export default NextTabButton;
25
- //# sourceMappingURL=NextTabButton.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"NextTabButton.js","sourceRoot":"","sources":["NextTabButton.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAEH,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,MAAM,EAAE,MAAM,eAAe,CAAC;AACvC,OAAO,OAAO,MAAM,uBAAuB,CAAC;AAO5C,SAAS,aAAa,CAAC,KAAyB;IAC9C,MAAM,EAAE,UAAU,EAAE,cAAc,EAAE,GAAG,KAAK,CAAC;IAE7C,OAAO,CACL,oBAAC,MAAM,IACL,OAAO,EAAC,WAAW,EACnB,IAAI,EAAC,OAAO,EACZ,OAAO,EAAE,oBAAC,OAAO,IAAC,IAAI,EAAC,gCAAgC,GAAG,EAC1D,QAAQ,EAAE,UAAU,EACpB,KAAK,EAAC,WAAW,EACjB,OAAO,EAAE,cAAc,eAEhB,CACV,CAAC;AACJ,CAAC;AAED,eAAe,aAAa,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, { memo } from 'react';
18
- import { Box } from '@mui/material';
19
- import { findNumOfVisibleTabs, getNextVisibleTabIndex } from '../../../utils/tabs';
20
- import useQuestionnaireStore from '../../../stores/useQuestionnaireStore';
21
- import NextTabButton from './NextTabButton';
22
- const NextTabButtonWrapper = memo(function NextTabWrapper(props) {
23
- const { currentTabIndex, tabs } = props;
24
- const enableWhenIsActivated = useQuestionnaireStore((state) => state.enableWhenIsActivated);
25
- const enableWhenItems = useQuestionnaireStore((state) => state.enableWhenItems);
26
- const enableWhenExpressions = useQuestionnaireStore((state) => state.enableWhenExpressions);
27
- const switchTab = useQuestionnaireStore((state) => state.switchTab);
28
- const tabsNotDefined = currentTabIndex === undefined || tabs === undefined;
29
- function handleNextTabClick() {
30
- if (tabsNotDefined) {
31
- return;
32
- }
33
- const nextVisibleTabIndex = getNextVisibleTabIndex({
34
- tabs,
35
- currentTabIndex,
36
- enableWhenIsActivated,
37
- enableWhenItems,
38
- enableWhenExpressions
39
- });
40
- switchTab(nextVisibleTabIndex);
41
- // Scroll to top of page
42
- window.scrollTo(0, 0);
43
- }
44
- if (tabsNotDefined) {
45
- return null;
46
- }
47
- if (currentTabIndex === Object.keys(tabs).length - 1) {
48
- return null;
49
- }
50
- const buttonIsDisabled = findNumOfVisibleTabs(tabs, enableWhenIsActivated, enableWhenItems, enableWhenExpressions) <= 1;
51
- return (React.createElement(Box, { display: "flex", flexDirection: "row-reverse", mt: 3 },
52
- React.createElement(NextTabButton, { isDisabled: buttonIsDisabled, onNextTabClick: handleNextTabClick })));
53
- });
54
- export default NextTabButtonWrapper;
55
- //# sourceMappingURL=NextTabButtonWrapper.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"NextTabButtonWrapper.js","sourceRoot":"","sources":["NextTabButtonWrapper.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAEH,OAAO,KAAK,EAAE,EAAE,IAAI,EAAE,MAAM,OAAO,CAAC;AACpC,OAAO,EAAE,GAAG,EAAE,MAAM,eAAe,CAAC;AACpC,OAAO,EAAE,oBAAoB,EAAE,sBAAsB,EAAE,MAAM,qBAAqB,CAAC;AAEnF,OAAO,qBAAqB,MAAM,uCAAuC,CAAC;AAC1E,OAAO,aAAa,MAAM,iBAAiB,CAAC;AAO5C,MAAM,oBAAoB,GAAG,IAAI,CAAC,SAAS,cAAc,CAAC,KAAgC;IACxF,MAAM,EAAE,eAAe,EAAE,IAAI,EAAE,GAAG,KAAK,CAAC;IAExC,MAAM,qBAAqB,GAAG,qBAAqB,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,CAAC,qBAAqB,CAAC,CAAC;IAC5F,MAAM,eAAe,GAAG,qBAAqB,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,CAAC,eAAe,CAAC,CAAC;IAChF,MAAM,qBAAqB,GAAG,qBAAqB,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,CAAC,qBAAqB,CAAC,CAAC;IAC5F,MAAM,SAAS,GAAG,qBAAqB,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,CAAC,SAAS,CAAC,CAAC;IAEpE,MAAM,cAAc,GAAG,eAAe,KAAK,SAAS,IAAI,IAAI,KAAK,SAAS,CAAC;IAE3E,SAAS,kBAAkB;QACzB,IAAI,cAAc,EAAE;YAClB,OAAO;SACR;QAED,MAAM,mBAAmB,GAAG,sBAAsB,CAAC;YACjD,IAAI;YACJ,eAAe;YACf,qBAAqB;YACrB,eAAe;YACf,qBAAqB;SACtB,CAAC,CAAC;QACH,SAAS,CAAC,mBAAmB,CAAC,CAAC;QAE/B,wBAAwB;QACxB,MAAM,CAAC,QAAQ,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;IACxB,CAAC;IAED,IAAI,cAAc,EAAE;QAClB,OAAO,IAAI,CAAC;KACb;IAED,IAAI,eAAe,KAAK,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,MAAM,GAAG,CAAC,EAAE;QACpD,OAAO,IAAI,CAAC;KACb;IAED,MAAM,gBAAgB,GACpB,oBAAoB,CAAC,IAAI,EAAE,qBAAqB,EAAE,eAAe,EAAE,qBAAqB,CAAC,IAAI,CAAC,CAAC;IAEjG,OAAO,CACL,oBAAC,GAAG,IAAC,OAAO,EAAC,MAAM,EAAC,aAAa,EAAC,aAAa,EAAC,EAAE,EAAE,CAAC;QACnD,oBAAC,aAAa,IAAC,UAAU,EAAE,gBAAgB,EAAE,cAAc,EAAE,kBAAkB,GAAI,CAC/E,CACP,CAAC;AACJ,CAAC,CAAC,CAAC;AAEH,eAAe,oBAAoB,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 { StandardTextField } from '../Textfield.styles';
20
- import FadingCheckIcon from '../ItemParts/FadingCheckIcon';
21
- function IntegerField(props) {
22
- const { linkId, value, feedback, displayPrompt, displayUnit, entryFormat, readOnly, calcExpUpdated, isTabled, onInputChange } = props;
23
- return (React.createElement(StandardTextField, { id: linkId, value: value.toString(), 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-integer-field" }));
28
- }
29
- export default IntegerField;
30
- //# sourceMappingURL=IntegerField.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"IntegerField.js","sourceRoot":"","sources":["IntegerField.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAEH,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,cAAc,EAAE,MAAM,eAAe,CAAC;AAC/C,OAAO,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AAExD,OAAO,eAAe,MAAM,8BAA8B,CAAC;AAc3D,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,CAAC,QAAQ,EAAE,EACvB,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,73 +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 useValidationError from '../../../hooks/useValidationError';
20
- import debounce from 'lodash.debounce';
21
- import { createEmptyQrItemWithUnit } from '../../../utils/qrItem';
22
- import { DEBOUNCE_DURATION } from '../../../utils/debounce';
23
- import { FullWidthFormComponentBox } from '../../Box.styles';
24
- import IntegerField from './IntegerField';
25
- import useIntegerCalculatedExpression from '../../../hooks/useIntegerCalculatedExpression';
26
- import { parseValidInteger } from '../../../utils/parseInputs';
27
- import ItemFieldGrid from '../ItemParts/ItemFieldGrid';
28
- function IntegerItem(props) {
29
- const { qItem, qrItem, isRepeated, isTabled, onQrItemChange } = props;
30
- // Get additional rendering extensions
31
- const { displayUnit, displayPrompt, displayInstructions, readOnly, entryFormat, regexValidation, maxLength } = useRenderingExtensions(qItem);
32
- // Init input value
33
- let valueInteger = 0;
34
- if (qrItem === null || qrItem === void 0 ? void 0 : qrItem.answer) {
35
- if (qrItem === null || qrItem === void 0 ? void 0 : qrItem.answer[0].valueInteger) {
36
- valueInteger = qrItem.answer[0].valueInteger;
37
- }
38
- if (qrItem === null || qrItem === void 0 ? void 0 : qrItem.answer[0].valueDecimal) {
39
- valueInteger = Math.round(qrItem.answer[0].valueDecimal);
40
- }
41
- }
42
- const [value, setValue] = useState(valueInteger);
43
- // Perform validation checks
44
- const feedback = useValidationError(value.toString(), regexValidation, maxLength);
45
- // Process calculated expressions
46
- const { calcExpUpdated } = useIntegerCalculatedExpression({
47
- qItem: qItem,
48
- inputValue: value,
49
- displayUnit: displayUnit,
50
- setInputValue: (newValue) => {
51
- setValue(newValue);
52
- },
53
- onQrItemChange: onQrItemChange
54
- });
55
- // Event handlers
56
- function handleInputChange(newInput) {
57
- const newValue = parseValidInteger(newInput);
58
- setValue(newValue);
59
- updateQrItemWithDebounce(newValue);
60
- }
61
- // eslint-disable-next-line react-hooks/exhaustive-deps
62
- const updateQrItemWithDebounce = useCallback(debounce((newValue) => {
63
- onQrItemChange(Object.assign(Object.assign({}, createEmptyQrItemWithUnit(qItem, displayUnit)), { answer: [{ valueInteger: newValue }] }));
64
- }, DEBOUNCE_DURATION), [onQrItemChange, qItem, displayUnit]); // Dependencies are tested, debounce is causing eslint to not recognise dependencies
65
- if (isRepeated) {
66
- return (React.createElement(IntegerField, { linkId: qItem.linkId, value: value, feedback: feedback, displayPrompt: displayPrompt, displayUnit: displayUnit, entryFormat: entryFormat, readOnly: readOnly, calcExpUpdated: calcExpUpdated, isTabled: isTabled, onInputChange: handleInputChange }));
67
- }
68
- return (React.createElement(FullWidthFormComponentBox, { "data-test": "q-item-integer-box" },
69
- React.createElement(ItemFieldGrid, { qItem: qItem, displayInstructions: displayInstructions },
70
- React.createElement(IntegerField, { linkId: qItem.linkId, value: value, feedback: feedback, displayPrompt: displayPrompt, displayUnit: displayUnit, entryFormat: entryFormat, readOnly: readOnly, calcExpUpdated: calcExpUpdated, isTabled: isTabled, onInputChange: handleInputChange }))));
71
- }
72
- export default IntegerItem;
73
- //# sourceMappingURL=IntegerItem.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"IntegerItem.js","sourceRoot":"","sources":["IntegerItem.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,kBAAkB,MAAM,mCAAmC,CAAC;AACnE,OAAO,QAAQ,MAAM,iBAAiB,CAAC;AACvC,OAAO,EAAE,yBAAyB,EAAE,MAAM,uBAAuB,CAAC;AAClE,OAAO,EAAE,iBAAiB,EAAE,MAAM,yBAAyB,CAAC;AAC5D,OAAO,EAAE,yBAAyB,EAAE,MAAM,kBAAkB,CAAC;AAC7D,OAAO,YAAY,MAAM,gBAAgB,CAAC;AAC1C,OAAO,8BAA8B,MAAM,+CAA+C,CAAC;AAC3F,OAAO,EAAE,iBAAiB,EAAE,MAAM,4BAA4B,CAAC;AAC/D,OAAO,aAAa,MAAM,4BAA4B,CAAC;AAUvD,SAAS,WAAW,CAAC,KAAuB;IAC1C,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,UAAU,EAAE,QAAQ,EAAE,cAAc,EAAE,GAAG,KAAK,CAAC;IAEtE,sCAAsC;IACtC,MAAM,EACJ,WAAW,EACX,aAAa,EACb,mBAAmB,EACnB,QAAQ,EACR,WAAW,EACX,eAAe,EACf,SAAS,EACV,GAAG,sBAAsB,CAAC,KAAK,CAAC,CAAC;IAElC,mBA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AC;AAE1E,MAAM,CAAC,MAAM,UAAU,GAAG,MAAM,CAAC,SAAS,CAAC,CAAC,GAAG,EAAE,CAAC,CAAC;IACjD,YAAY,EAAE,CAAC;CAChB,CAAC,CAAC,CAAC;AAEJ,MAAM,CAAC,MAAM,WAAW,GAAG,MAAM,CAAC,UAAU,CAAC,CAAC,GAAG,EAAE,CAAC,CAAC;IACnD,YAAY,EAAE,CAAC;CAChB,CAAC,CAAC,CAAC;AAEJ,MAAM,CAAC,MAAM,eAAe,GAAG,MAAM,CAAC,UAAU,CAAC,CAAC,GAAG,EAAE,CAAC,CAAC;IACvD,SAAS,EAAE,CAAC;CACb,CAAC,CAAC,CAAC"}
@@ -1,29 +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 useHidden from '../../../hooks/useHidden';
19
- import ItemLabelText from './ItemLabelText';
20
- const ContextDisplayItem = memo(function GroupHeadingIcon(props) {
21
- const { displayItem } = props;
22
- const itemIsHidden = useHidden(displayItem);
23
- if (itemIsHidden) {
24
- return null;
25
- }
26
- return React.createElement(ItemLabelText, { qItem: displayItem });
27
- });
28
- export default ContextDisplayItem;
29
- //# sourceMappingURL=ContextDisplayItem.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"ContextDisplayItem.js","sourceRoot":"","sources":["ContextDisplayItem.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAEH,OAAO,KAAK,EAAE,EAAE,IAAI,EAAE,MAAM,OAAO,CAAC;AAEpC,OAAO,SAAS,MAAM,0BAA0B,CAAC;AACjD,OAAO,aAAa,MAAM,iBAAiB,CAAC;AAM5C,MAAM,kBAAkB,GAAG,IAAI,CAAC,SAAS,gBAAgB,CAAC,KAA4B;IACpF,MAAM,EAAE,WAAW,EAAE,GAAG,KAAK,CAAC;IAE9B,MAAM,YAAY,GAAG,SAAS,CAAC,WAAW,CAAC,CAAC;IAC5C,IAAI,YAAY,EAAE;QAChB,OAAO,IAAI,CAAC;KACb;IAED,OAAO,oBAAC,aAAa,IAAC,KAAK,EAAE,WAAW,GAAI,CAAC;AAC/C,CAAC,CAAC,CAAC;AAEH,eAAe,kBAAkB,CAAC"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"FadingCheckIcon.js","sourceRoot":"","sources":["FadingCheckIcon.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAEH,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,IAAI,EAAE,MAAM,eAAe,CAAC;AACrC,OAAO,SAAS,MAAM,2BAA2B,CAAC;AAMlD,SAAS,eAAe,CAAC,KAA2B;IAClD,MAAM,EAAE,MAAM,EAAE,GAAG,KAAK,CAAC;IAEzB,OAAO,CACL,oBAAC,IAAI,IAAC,EAAE,EAAE,MAAM,EAAE,OAAO,EAAE,EAAE,KAAK,EAAE,GAAG,EAAE,IAAI,EAAE,GAAG,EAAE;QAClD,oBAAC,SAAS,IAAC,KAAK,EAAC,SAAS,EAAC,QAAQ,EAAC,OAAO,GAAG,CACzC,CACR,CAAC;AACJ,CAAC;AAED,eAAe,eAAe,CAAC"}
@@ -1,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 from 'react';
18
- import { Grid } from '@mui/material';
19
- import DisplayInstructions from '../DisplayItem/DisplayInstructions';
20
- import LabelWrapper from './ItemLabelWrapper';
21
- function ItemFieldGrid(props) {
22
- const { children, qItem, displayInstructions } = props;
23
- return (React.createElement(Grid, { container: true, columnSpacing: 6 },
24
- React.createElement(Grid, { item: true, xs: 5 },
25
- React.createElement(LabelWrapper, { qItem: qItem })),
26
- React.createElement(Grid, { item: true, xs: 7 },
27
- children,
28
- React.createElement(DisplayInstructions, { displayInstructions: displayInstructions }))));
29
- }
30
- export default ItemFieldGrid;
31
- //# sourceMappingURL=ItemFieldGrid.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"ItemFieldGrid.js","sourceRoot":"","sources":["ItemFieldGrid.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAGH,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,IAAI,EAAE,MAAM,eAAe,CAAC;AAErC,OAAO,mBAAmB,MAAM,oCAAoC,CAAC;AACrE,OAAO,YAAY,MAAM,oBAAoB,CAAC;AAQ9C,SAAS,aAAa,CAAC,KAAyB;IAC9C,MAAM,EAAE,QAAQ,EAAE,KAAK,EAAE,mBAAmB,EAAE,GAAG,KAAK,CAAC;IAEvD,OAAO,CACL,oBAAC,IAAI,IAAC,SAAS,QAAC,aAAa,EAAE,CAAC;QAC9B,oBAAC,IAAI,IAAC,IAAI,QAAC,EAAE,EAAE,CAAC;YACd,oBAAC,YAAY,IAAC,KAAK,EAAE,KAAK,GAAI,CACzB;QACP,oBAAC,IAAI,IAAC,IAAI,QAAC,EAAE,EAAE,CAAC;YACb,QAAQ;YACT,oBAAC,mBAAmB,IAAC,mBAAmB,EAAE,mBAAmB,GAAI,CAC5D,CACF,CACR,CAAC;AACJ,CAAC;AAED,eAAe,aAAa,CAAC"}
@@ -1,45 +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 { getMarkdownString, getXHtmlString } from '../../../utils/itemControl';
19
- import { QItemTypography } from '../Item.styles';
20
- import parse from 'html-react-parser';
21
- import { Box } from '@mui/material';
22
- import ReactMarkdown from 'react-markdown';
23
- const ItemLabelText = memo(function ItemLabelText(props) {
24
- const { qItem } = props;
25
- // parse xHTML if found
26
- const xHtmlString = getXHtmlString(qItem);
27
- if (xHtmlString) {
28
- return React.createElement(Box, null, parse(xHtmlString));
29
- }
30
- // parse xHTML if found
31
- const markdownString = getMarkdownString(qItem);
32
- if (markdownString) {
33
- return (React.createElement(Box, null,
34
- React.createElement(ReactMarkdown, null, markdownString)));
35
- }
36
- // parse regular text
37
- if (qItem.type === 'group') {
38
- return React.createElement(React.Fragment, null, qItem.text);
39
- }
40
- else {
41
- return React.createElement(QItemTypography, null, qItem.text);
42
- }
43
- });
44
- export default ItemLabelText;
45
- //# sourceMappingURL=ItemLabelText.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"ItemLabelText.js","sourceRoot":"","sources":["ItemLabelText.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAEH,OAAO,KAAK,EAAE,EAAE,IAAI,EAAE,MAAM,OAAO,CAAC;AAEpC,OAAO,EAAE,iBAAiB,EAAE,cAAc,EAAE,MAAM,4BAA4B,CAAC;AAC/E,OAAO,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAC;AACjD,OAAO,KAAK,MAAM,mBAAmB,CAAC;AACtC,OAAO,EAAE,GAAG,EAAE,MAAM,eAAe,CAAC;AACpC,OAAO,aAAa,MAAM,gBAAgB,CAAC;AAM3C,MAAM,aAAa,GAAG,IAAI,CAAC,SAAS,aAAa,CAAC,KAAyB;IACzE,MAAM,EAAE,KAAK,EAAE,GAAG,KAAK,CAAC;IAExB,uBAAuB;IACvB,MAAM,WAAW,GAAG,cAAc,CAAC,KAAK,CAAC,CAAC;IAE1C,IAAI,WAAW,EAAE;QACf,OAAO,oBAAC,GAAG,QAAE,KAAK,CAAC,WAAW,CAAC,CAAO,CAAC;KACxC;IAED,uBAAuB;IACvB,MAAM,cAAc,GAAG,iBAAiB,CAAC,KAAK,CAAC,CAAC;IAChD,IAAI,cAAc,EAAE;QAClB,OAAO,CACL,oBAAC,GAAG;YACF,oBAAC,aAAa,QAAE,cAAc,CAAiB,CAC3C,CACP,CAAC;KACH;IAED,qBAAqB;IACrB,IAAI,KAAK,CAAC,IAAI,KAAK,OAAO,EAAE;QAC1B,OAAO,0CAAG,KAAK,CAAC,IAAI,CAAI,CAAC;KAC1B;SAAM;QACL,OAAO,oBAAC,eAAe,QAAE,KAAK,CAAC,IAAI,CAAmB,CAAC;KACxD;AACH,CAAC,CAAC,CAAC;AAEH,eAAe,aAAa,CAAC"}
@@ -1,32 +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 { Box } from '@mui/material';
19
- import ContextDisplayItem from './ContextDisplayItem';
20
- import { getContextDisplays } from '../../../utils/tabs';
21
- import ItemLabelText from './ItemLabelText';
22
- function ItemLabelWrapper(props) {
23
- const { qItem } = props;
24
- const contextDisplayItems = getContextDisplays(qItem);
25
- return (React.createElement(Box, { display: "flex", alignItems: "center", justifyContent: "space-between" },
26
- React.createElement(ItemLabelText, { qItem: qItem }),
27
- React.createElement(Box, { display: "flex", columnGap: 0.5 }, contextDisplayItems.map((item) => {
28
- return React.createElement(ContextDisplayItem, { key: item.linkId, displayItem: item });
29
- }))));
30
- }
31
- export default ItemLabelWrapper;
32
- //# sourceMappingURL=ItemLabelWrapper.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"ItemLabelWrapper.js","sourceRoot":"","sources":["ItemLabelWrapper.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAEH,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,GAAG,EAAE,MAAM,eAAe,CAAC;AACpC,OAAO,kBAAkB,MAAM,sBAAsB,CAAC;AAEtD,OAAO,EAAE,kBAAkB,EAAE,MAAM,qBAAqB,CAAC;AACzD,OAAO,aAAa,MAAM,iBAAiB,CAAC;AAM5C,SAAS,gBAAgB,CAAC,KAAwB;IAChD,MAAM,EAAE,KAAK,EAAE,GAAG,KAAK,CAAC;IAExB,MAAM,mBAAmB,GAAG,kBAAkB,CAAC,KAAK,CAAC,CAAC;IAEtD,OAAO,CACL,oBAAC,GAAG,IAAC,OAAO,EAAC,MAAM,EAAC,UAAU,EAAC,QAAQ,EAAC,cAAc,EAAC,eAAe;QACpE,oBAAC,aAAa,IAAC,KAAK,EAAE,KAAK,GAAI;QAE/B,oBAAC,GAAG,IAAC,OAAO,EAAC,MAAM,EAAC,SAAS,EAAE,GAAG,IAC/B,mBAAmB,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE;YAChC,OAAO,oBAAC,kBAAkB,IAAC,GAAG,EAAE,IAAI,CAAC,MAAM,EAAE,WAAW,EAAE,IAAI,GAAI,CAAC;QACrE,CAAC,CAAC,CACE,CACF,CACP,CAAC;AACJ,CAAC;AAED,eAAe,gBAAgB,CAAC"}
@@ -1,24 +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 { Checkbox, FormControlLabel } from '@mui/material';
19
- function QItemCheckboxSingle(props) {
20
- const { value, label, readOnly, isChecked, onCheckedChange } = props;
21
- return (React.createElement(FormControlLabel, { disabled: readOnly, control: React.createElement(Checkbox, { size: "small", checked: isChecked, onChange: () => onCheckedChange(value) }), label: label, sx: { mr: 3 } }));
22
- }
23
- export default QItemCheckboxSingle;
24
- //# sourceMappingURL=QItemCheckboxSingle.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"QItemCheckboxSingle.js","sourceRoot":"","sources":["QItemCheckboxSingle.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAEH,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,QAAQ,EAAE,gBAAgB,EAAE,MAAM,eAAe,CAAC;AAU3D,SAAS,mBAAmB,CAAC,KAAY;IACvC,MAAM,EAAE,KAAK,EAAE,KAAK,EAAE,QAAQ,EAAE,SAAS,EAAE,eAAe,EAAE,GAAG,KAAK,CAAC;IAErE,OAAO,CACL,oBAAC,gBAAgB,IACf,QAAQ,EAAE,QAAQ,EAClB,OAAO,EACL,oBAAC,QAAQ,IAAC,IAAI,EAAC,OAAO,EAAC,OAAO,EAAE,SAAS,EAAE,QAAQ,EAAE,GAAG,EAAE,CAAC,eAAe,CAAC,KAAK,CAAC,GAAI,EAEvF,KAAK,EAAE,KAAK,EACZ,EAAE,EAAE,EAAE,EAAE,EAAE,CAAC,EAAE,GACb,CACH,CAAC;AACJ,CAAC;AAED,eAAe,mBAAmB,CAAC"}
@@ -1,33 +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 { Box, Checkbox, FormControlLabel } from '@mui/material';
19
- import { StandardTextField } from '../Textfield.styles';
20
- function QItemCheckboxSingleWithOpenLabel(props) {
21
- const { value, label, isChecked, onCheckedChange, onInputChange } = props;
22
- function handleCheckedChange(event) {
23
- onCheckedChange(event.target.checked);
24
- }
25
- function handleInputChange(event) {
26
- onInputChange(event.target.value);
27
- }
28
- return (React.createElement(Box, { "data-test": "q-item-checkbox-open-label-box" },
29
- React.createElement(FormControlLabel, { control: React.createElement(Checkbox, { size: "small", checked: isChecked, onChange: handleCheckedChange }), label: label + ':', sx: { mr: 3 } }),
30
- React.createElement(StandardTextField, { disabled: !isChecked, value: value, onChange: handleInputChange, fullWidth: true, isTabled: false, size: "small", "data-test": "q-item-checkbox-open-label-field" })));
31
- }
32
- export default QItemCheckboxSingleWithOpenLabel;
33
- //# sourceMappingURL=QItemCheckboxSingleWithOpenLabel.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"QItemCheckboxSingleWithOpenLabel.js","sourceRoot":"","sources":["QItemCheckboxSingleWithOpenLabel.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAGH,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,GAAG,EAAE,QAAQ,EAAE,gBAAgB,EAAE,MAAM,eAAe,CAAC;AAChE,OAAO,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AAUxD,SAAS,gCAAgC,CAAC,KAAY;IACpD,MAAM,EAAE,KAAK,EAAE,KAAK,EAAE,SAAS,EAAE,eAAe,EAAE,aAAa,EAAE,GAAG,KAAK,CAAC;IAE1E,SAAS,mBAAmB,CAAC,KAAoC;QAC/D,eAAe,CAAC,KAAK,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC;IACxC,CAAC;IAED,SAAS,iBAAiB,CAAC,KAAoC;QAC7D,aAAa,CAAC,KAAK,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;IACpC,CAAC;IAED,OAAO,CACL,oBAAC,GAAG,iBAAW,gCAAgC;QAC7C,oBAAC,gBAAgB,IACf,OAAO,EAAE,oBAAC,QAAQ,IAAC,IAAI,EAAC,OAAO,EAAC,OAAO,EAAE,SAAS,EAAE,QAAQ,EAAE,mBAAmB,GAAI,EACrF,KAAK,EAAE,KAAK,GAAG,GAAG,EAClB,EAAE,EAAE,EAAE,EAAE,EAAE,CAAC,EAAE,GACb;QACF,oBAAC,iBAAiB,IAChB,QAAQ,EAAE,CAAC,SAAS,EACpB,KAAK,EAAE,KAAK,EACZ,QAAQ,EAAE,iBAAiB,EAC3B,SAAS,QACT,QAAQ,EAAE,KAAK,EACf,IAAI,EAAC,OAAO,eACF,kCAAkC,GAC5C,CACE,CACP,CAAC;AACJ,CAAC;AAED,eAAe,gCAAgC,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 from 'react';
18
- import { Box } from '@mui/material';
19
- import { StandardTextField } from '../Textfield.styles';
20
- import QItemChoiceRadioSingle from '../QItemChoice/QItemChoiceRadioSingle';
21
- function QItemRadioButtonWithOpenLabel(props) {
22
- const { value, label, readOnly, isSelected, onInputChange } = props;
23
- function handleInputChange(event) {
24
- onInputChange(event.target.value);
25
- }
26
- return (React.createElement(Box, { "data-test": "q-item-radio-open-label-box" },
27
- React.createElement(QItemChoiceRadioSingle, { value: value !== null && value !== void 0 ? value : '', label: label + ':', readOnly: readOnly }),
28
- React.createElement(StandardTextField, { disabled: !isSelected, value: value, onChange: handleInputChange, fullWidth: true, isTabled: false, size: "small", "data-test": "q-item-radio-open-label-field" })));
29
- }
30
- export default QItemRadioButtonWithOpenLabel;
31
- //# sourceMappingURL=QItemRadioButtonWithOpenLabel.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"QItemRadioButtonWithOpenLabel.js","sourceRoot":"","sources":["QItemRadioButtonWithOpenLabel.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAGH,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,GAAG,EAAE,MAAM,eAAe,CAAC;AACpC,OAAO,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AACxD,OAAO,sBAAsB,MAAM,uCAAuC,CAAC;AAU3E,SAAS,6BAA6B,CAAC,KAAY;IACjD,MAAM,EAAE,KAAK,EAAE,KAAK,EAAE,QAAQ,EAAE,UAAU,EAAE,aAAa,EAAE,GAAG,KAAK,CAAC;IACpE,SAAS,iBAAiB,CAAC,KAAoC;QAC7D,aAAa,CAAC,KAAK,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;IACpC,CAAC;IAED,OAAO,CACL,oBAAC,GAAG,iBAAW,6BAA6B;QAC1C,oBAAC,sBAAsB,IAAC,KAAK,EAAE,KAAK,aAAL,KAAK,cAAL,KAAK,GAAI,EAAE,EAAE,KAAK,EAAE,KAAK,GAAG,GAAG,EAAE,QAAQ,EAAE,QAAQ,GAAI;QACtF,oBAAC,iBAAiB,IAChB,QAAQ,EAAE,CAAC,UAAU,EACrB,KAAK,EAAE,KAAK,EACZ,QAAQ,EAAE,iBAAiB,EAC3B,SAAS,QACT,QAAQ,EAAE,KAAK,EACf,IAAI,EAAC,OAAO,eACF,+BAA+B,GACzC,CACE,CACP,CAAC;AACJ,CAAC;AAED,eAAe,6BAA6B,CAAC"}
@@ -1,38 +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 { List, styled } from '@mui/material';
18
- import { alpha } from '@mui/material/styles';
19
- export const PrimarySelectableList = styled(List)(({ theme }) => ({
20
- '&& .Mui-selected': {
21
- color: theme.palette.primary.dark,
22
- backgroundColor: alpha(theme.palette.primary.main, 0.2),
23
- borderRadius: 30,
24
- '& .MuiTypography-root': {
25
- fontWeight: 'bold'
26
- }
27
- },
28
- '& .MuiListItemButton-root': {
29
- color: '#444746',
30
- borderRadius: 30
31
- },
32
- '& .MuiListItemButton-root:hover': {
33
- color: theme.palette.primary.dark,
34
- backgroundColor: alpha(theme.palette.primary.main, 0.09),
35
- borderRadius: 30
36
- }
37
- }));
38
- //# sourceMappingURL=Lists.styles.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"Lists.styles.js","sourceRoot":"","sources":["Lists.styles.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAEH,OAAO,EAAE,IAAI,EAAE,MAAM,EAAE,MAAM,eAAe,CAAC;AAC7C,OAAO,EAAE,KAAK,EAAE,MAAM,sBAAsB,CAAC;AAE7C,MAAM,CAAC,MAAM,qBAAqB,GAAG,MAAM,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,KAAK,EAAE,EAAE,EAAE,CAAC,CAAC;IAChE,kBAAkB,EAAE;QAClB,KAAK,EAAE,KAAK,CAAC,OAAO,CAAC,OAAO,CAAC,IAAI;QACjC,eAAe,EAAE,KAAK,CAAC,KAAK,CAAC,OAAO,CAAC,OAAO,CAAC,IAAI,EAAE,GAAG,CAAC;QACvD,YAAY,EAAE,EAAE;QAChB,uBAAuB,EAAE;YACvB,UAAU,EAAE,MAAM;SACnB;KACF;IACD,2BAA2B,EAAE;QAC3B,KAAK,EAAE,SAAS;QAChB,YAAY,EAAE,EAAE;KACjB;IACD,iCAAiC,EAAE;QACjC,KAAK,EAAE,KAAK,CAAC,OAAO,CAAC,OAAO,CAAC,IAAI;QACjC,eAAe,EAAE,KAAK,CAAC,KAAK,CAAC,OAAO,CAAC,OAAO,CAAC,IAAI,EAAE,IAAI,CAAC;QACxD,YAAY,EAAE,EAAE;KACjB;CACF,CAAC,CAAC,CAAC"}