@ukhomeoffice/cop-react-form-renderer 7.3.2-alpha.5 → 8.0.0-alpha

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 (761) hide show
  1. package/README.md +106 -32
  2. package/dist/components/CheckYourAnswers/Answer.d.ts +10 -0
  3. package/dist/components/CheckYourAnswers/CheckYourAnswers.d.ts +35 -0
  4. package/dist/components/CheckYourAnswers/index.d.ts +2 -0
  5. package/dist/components/CollectionPage/CollectionPage.d.ts +24 -0
  6. package/dist/components/CollectionPage/index.d.ts +1 -0
  7. package/dist/components/CollectionSummary/BannerStrip.d.ts +9 -0
  8. package/dist/components/CollectionSummary/CollectionSummary.d.ts +53 -0
  9. package/dist/components/CollectionSummary/Confirmation.d.ts +15 -0
  10. package/dist/components/CollectionSummary/RenderListView.d.ts +42 -0
  11. package/dist/components/CollectionSummary/SummaryCard.d.ts +62 -0
  12. package/dist/components/CollectionSummary/SummaryCardButtons.d.ts +21 -0
  13. package/dist/components/CollectionSummary/SummaryCardDetails.d.ts +14 -0
  14. package/dist/components/CollectionSummary/SummaryCardValidationContext.d.ts +9 -0
  15. package/dist/components/CollectionSummary/index.d.ts +2 -0
  16. package/dist/components/FormComponent/Collection.d.ts +39 -0
  17. package/dist/components/FormComponent/Container.d.ts +26 -0
  18. package/dist/components/FormComponent/FormComponent.d.ts +39 -0
  19. package/dist/components/FormComponent/helpers/addLabel.d.ts +7 -0
  20. package/dist/components/FormComponent/helpers/getComponentDisabled.d.ts +2 -0
  21. package/dist/components/FormComponent/helpers/getComponentError.d.ts +4 -0
  22. package/dist/components/FormComponent/helpers/getComponentFieldSet.d.ts +2 -0
  23. package/dist/components/FormComponent/helpers/index.d.ts +5 -0
  24. package/dist/components/FormComponent/index.d.ts +2 -0
  25. package/dist/components/FormPage/FormPage.d.ts +36 -0
  26. package/dist/components/FormPage/index.d.ts +2 -0
  27. package/dist/components/FormRenderer/FormRenderer.d.ts +39 -0
  28. package/dist/components/FormRenderer/handlers/cyaAction.d.ts +9 -0
  29. package/dist/components/FormRenderer/handlers/getPageId.d.ts +8 -0
  30. package/dist/components/FormRenderer/handlers/index.d.ts +6 -0
  31. package/dist/components/FormRenderer/handlers/navigate.d.ts +10 -0
  32. package/dist/components/FormRenderer/handlers/submissionError.d.ts +7 -0
  33. package/dist/components/FormRenderer/helpers/canActionProceed.d.ts +12 -0
  34. package/dist/components/FormRenderer/helpers/canCYASubmit.d.ts +10 -0
  35. package/dist/components/FormRenderer/helpers/cleanHiddenNestedData.d.ts +2 -0
  36. package/dist/components/FormRenderer/helpers/clearOutUncompletedRoutes.d.ts +51 -0
  37. package/dist/components/FormRenderer/helpers/clearOutUncompletedRoutesUtils.d.ts +179 -0
  38. package/dist/components/FormRenderer/helpers/getCYA.d.ts +20 -0
  39. package/dist/components/FormRenderer/helpers/getFormState.d.ts +25 -0
  40. package/dist/components/FormRenderer/helpers/getNextPageId.d.ts +2 -0
  41. package/dist/components/FormRenderer/helpers/getPage.d.ts +9 -0
  42. package/dist/components/FormRenderer/helpers/getRelevantPages.d.ts +2 -0
  43. package/dist/components/FormRenderer/helpers/getSubmissionStatus.d.ts +2 -0
  44. package/dist/components/FormRenderer/helpers/getUpdatedSectionStates.d.ts +10 -0
  45. package/dist/components/FormRenderer/helpers/index.d.ts +29 -0
  46. package/dist/components/FormRenderer/index.d.ts +2 -0
  47. package/dist/components/FormRenderer/onCYAAction.d.ts +6 -0
  48. package/dist/components/FormRenderer/onPageAction.d.ts +2 -0
  49. package/dist/components/FormRenderer/onTaskAction.d.ts +2 -0
  50. package/dist/components/PageActions/ActionButton.d.ts +7 -0
  51. package/dist/components/PageActions/PageActions.d.ts +7 -0
  52. package/dist/components/PageActions/index.d.ts +2 -0
  53. package/dist/components/SummaryList/GroupAction.d.ts +12 -0
  54. package/dist/components/SummaryList/RowAction.d.ts +12 -0
  55. package/dist/components/SummaryList/SummaryList.d.ts +28 -0
  56. package/dist/components/SummaryList/SummaryList.stories.d.ts +10 -0
  57. package/dist/components/SummaryList/SummaryListHeadingRow.d.ts +7 -0
  58. package/dist/components/SummaryList/SummaryListHeadingRowWithAction.d.ts +16 -0
  59. package/dist/components/SummaryList/SummaryListRow.d.ts +19 -0
  60. package/dist/components/SummaryList/SummaryListTitleRow.d.ts +7 -0
  61. package/dist/components/SummaryList/helpers/getGroupActionAttributes.d.ts +17 -0
  62. package/dist/components/SummaryList/helpers/getRowActionAttributes.d.ts +17 -0
  63. package/dist/components/SummaryList/helpers/index.d.ts +2 -0
  64. package/dist/components/SummaryList/index.d.ts +2 -0
  65. package/dist/components/TaskList/Task.d.ts +12 -0
  66. package/dist/components/TaskList/TaskList.d.ts +40 -0
  67. package/dist/components/TaskList/TaskState.d.ts +6 -0
  68. package/dist/components/TaskList/index.d.ts +2 -0
  69. package/dist/components/index.d.ts +8 -0
  70. package/dist/context/HooksContext/HooksContext.d.ts +23 -0
  71. package/dist/context/HooksContext/index.d.ts +3 -0
  72. package/dist/context/ValidationContext/ValidationContext.d.ts +7 -0
  73. package/dist/context/ValidationContext/index.d.ts +3 -0
  74. package/dist/context/index.d.ts +3 -0
  75. package/dist/hooks/index.d.ts +6 -0
  76. package/dist/hooks/useAxios.d.ts +2 -0
  77. package/dist/hooks/useGetRequest.d.ts +12 -0
  78. package/dist/hooks/useHooks.d.ts +2 -0
  79. package/dist/hooks/useRefData.d.ts +7 -0
  80. package/dist/hooks/useValidation.d.ts +2 -0
  81. package/dist/index.cjs +5 -0
  82. package/dist/index.css +1 -0
  83. package/dist/index.d.ts +6 -0
  84. package/dist/index.js +6124 -81
  85. package/dist/models/CollectionLabels.d.ts +7 -0
  86. package/dist/models/ComponentTypes.d.ts +27 -0
  87. package/dist/models/EventTypes.d.ts +6 -0
  88. package/dist/models/FormPages.d.ts +6 -0
  89. package/dist/models/FormTypes.d.ts +10 -0
  90. package/dist/models/HubFormats.d.ts +5 -0
  91. package/dist/models/PageAction.d.ts +89 -0
  92. package/dist/models/TaskStates.d.ts +39 -0
  93. package/dist/models/index.d.ts +143 -0
  94. package/dist/setupTests.d.ts +14 -0
  95. package/dist/utils/CheckYourAnswers/getCYAAction.d.ts +20 -0
  96. package/dist/utils/CheckYourAnswers/getCYACollectionChangeAction.d.ts +22 -0
  97. package/dist/utils/CheckYourAnswers/getCYACollectionDeleteAction.d.ts +22 -0
  98. package/dist/utils/CheckYourAnswers/getCYARow.d.ts +26 -0
  99. package/dist/utils/CheckYourAnswers/getCYARowForGroup.d.ts +17 -0
  100. package/dist/utils/CheckYourAnswers/getCYARowsForCollection.d.ts +2 -0
  101. package/dist/utils/CheckYourAnswers/getCYARowsForCollectionPage.d.ts +23 -0
  102. package/dist/utils/CheckYourAnswers/getCYARowsForContainer.d.ts +2 -0
  103. package/dist/utils/CheckYourAnswers/getCYARowsForPage.d.ts +11 -0
  104. package/dist/utils/CheckYourAnswers/getSummaryListRowForDetails.d.ts +3 -0
  105. package/dist/utils/CheckYourAnswers/index.d.ts +5 -0
  106. package/dist/utils/CheckYourAnswers/showComponentCYA.d.ts +11 -0
  107. package/dist/utils/CollectionPage/addCollectionPageEntry.d.ts +12 -0
  108. package/dist/utils/CollectionPage/duplicateCollectionPageActiveEntry.d.ts +13 -0
  109. package/dist/utils/CollectionPage/duplicateCollectionPageEntry.d.ts +13 -0
  110. package/dist/utils/CollectionPage/getCollectionPageActiveId.d.ts +14 -0
  111. package/dist/utils/CollectionPage/getCollectionPageActiveIndex.d.ts +15 -0
  112. package/dist/utils/CollectionPage/getCollectionPageData.d.ts +15 -0
  113. package/dist/utils/CollectionPage/getErrorsForCollection.d.ts +2 -0
  114. package/dist/utils/CollectionPage/getQuickEditPage.d.ts +40 -0
  115. package/dist/utils/CollectionPage/index.d.ts +13 -0
  116. package/dist/utils/CollectionPage/mergeCollectionPages.d.ts +13 -0
  117. package/dist/utils/CollectionPage/removeCollectionPageEntry.d.ts +11 -0
  118. package/dist/utils/CollectionPage/setCollectionPageData.d.ts +16 -0
  119. package/dist/utils/Component/addShowWhen.d.ts +13 -0
  120. package/dist/utils/Component/applyToComponentTree.d.ts +15 -0
  121. package/dist/utils/Component/cleanAttributes.d.ts +14 -0
  122. package/dist/utils/Component/elevateNestedComponents.d.ts +28 -0
  123. package/dist/utils/Component/getDefaultValue.d.ts +2 -0
  124. package/dist/utils/Component/getDefaultValueFromConfig.d.ts +2 -0
  125. package/dist/utils/Component/index.d.ts +12 -0
  126. package/dist/utils/Component/isEditable.d.ts +3 -0
  127. package/dist/utils/Component/optionIsSelected.d.ts +10 -0
  128. package/dist/utils/Component/setupContainerComponentsPath.d.ts +2 -0
  129. package/dist/utils/Component/showComponent.d.ts +2 -0
  130. package/dist/utils/Condition/index.d.ts +6 -0
  131. package/dist/utils/Condition/meetsAllConditions.d.ts +8 -0
  132. package/dist/utils/Condition/meetsCondition.d.ts +14 -0
  133. package/dist/utils/Condition/meetsOneCondition.d.ts +8 -0
  134. package/dist/utils/Condition/setupConditions.d.ts +2 -0
  135. package/dist/utils/Container/getEditableComponents.d.ts +7 -0
  136. package/dist/utils/Container/index.d.ts +6 -0
  137. package/dist/utils/Container/setupNesting.d.ts +2 -0
  138. package/dist/utils/Container/showContainer.d.ts +8 -0
  139. package/dist/utils/Data/applyFormula.d.ts +2 -0
  140. package/dist/utils/Data/deleteValues.d.ts +8 -0
  141. package/dist/utils/Data/getAutocompleteSource.d.ts +2 -0
  142. package/dist/utils/Data/getDataPath.d.ts +21 -0
  143. package/dist/utils/Data/getOptions.d.ts +2 -0
  144. package/dist/utils/Data/getSourceData.d.ts +17 -0
  145. package/dist/utils/Data/index.d.ts +15 -0
  146. package/dist/utils/Data/nestInRefdataOptions.d.ts +10 -0
  147. package/dist/utils/Data/refDataToOptions.d.ts +8 -0
  148. package/dist/utils/Data/setDataItem.d.ts +2 -0
  149. package/dist/utils/Data/setupFormData.d.ts +15 -0
  150. package/dist/utils/Data/setupRefDataUrlForComponent.d.ts +2 -0
  151. package/dist/utils/FormPage/applyConditionalProperties.d.ts +8 -0
  152. package/dist/utils/FormPage/getConditionalText.d.ts +23 -0
  153. package/dist/utils/FormPage/getFormPage.d.ts +9 -0
  154. package/dist/utils/FormPage/getFormPages.d.ts +9 -0
  155. package/dist/utils/FormPage/getPageActions.d.ts +13 -0
  156. package/dist/utils/FormPage/getParagraphFromText.d.ts +11 -0
  157. package/dist/utils/FormPage/index.d.ts +10 -0
  158. package/dist/utils/FormPage/showFormPage.d.ts +8 -0
  159. package/dist/utils/FormPage/showFormPageCYA.d.ts +8 -0
  160. package/dist/utils/FormPage/useComponent.d.ts +9 -0
  161. package/dist/utils/Format/formatData.d.ts +8 -0
  162. package/dist/utils/Format/formatDataForComponent.d.ts +15 -0
  163. package/dist/utils/Format/formatDataForForm.d.ts +8 -0
  164. package/dist/utils/Format/formatDataForPage.d.ts +15 -0
  165. package/dist/utils/Format/index.d.ts +7 -0
  166. package/dist/utils/Hub/getFormHub.d.ts +15 -0
  167. package/dist/utils/Hub/index.d.ts +4 -0
  168. package/dist/utils/Meta/constants.d.ts +2 -0
  169. package/dist/utils/Meta/documents/getDocuments.d.ts +2 -0
  170. package/dist/utils/Meta/documents/index.d.ts +6 -0
  171. package/dist/utils/Meta/documents/setDocumentsForField.d.ts +2 -0
  172. package/dist/utils/Meta/index.d.ts +9 -0
  173. package/dist/utils/Operate/checkValueIsTruthy.d.ts +9 -0
  174. package/dist/utils/Operate/deleteValueInFormData.d.ts +8 -0
  175. package/dist/utils/Operate/doesContainValue.d.ts +11 -0
  176. package/dist/utils/Operate/getFirstOf.d.ts +2 -0
  177. package/dist/utils/Operate/getIndexOfMatchingValueIn.d.ts +11 -0
  178. package/dist/utils/Operate/getLength.d.ts +11 -0
  179. package/dist/utils/Operate/index.d.ts +4 -0
  180. package/dist/utils/Operate/persistValueInFormData.d.ts +9 -0
  181. package/dist/utils/Operate/runPageOperations.d.ts +19 -0
  182. package/dist/utils/Operate/setValueInFormData.d.ts +2 -0
  183. package/dist/utils/Operate/shouldRun.d.ts +9 -0
  184. package/dist/utils/Validate/additional/conditionallyPermittedChange.d.ts +14 -0
  185. package/dist/utils/Validate/additional/conditionallyRequired.d.ts +11 -0
  186. package/dist/utils/Validate/additional/index.d.ts +2 -0
  187. package/dist/utils/Validate/additional/mustBeAfter.d.ts +14 -0
  188. package/dist/utils/Validate/additional/mustBeBefore.d.ts +14 -0
  189. package/dist/utils/Validate/additional/mustBeEarlierDateTime.d.ts +15 -0
  190. package/dist/utils/Validate/additional/mustBeGreaterThan.d.ts +7 -0
  191. package/dist/utils/Validate/additional/mustBeInTheFuture.d.ts +8 -0
  192. package/dist/utils/Validate/additional/mustBeInThePast.d.ts +9 -0
  193. package/dist/utils/Validate/additional/mustBeLessThan.d.ts +7 -0
  194. package/dist/utils/Validate/additional/mustBeLongerThan.d.ts +9 -0
  195. package/dist/utils/Validate/additional/mustBeNumbersOnly.d.ts +9 -0
  196. package/dist/utils/Validate/additional/mustBeOneOf.d.ts +8 -0
  197. package/dist/utils/Validate/additional/mustBeShorterThan.d.ts +9 -0
  198. package/dist/utils/Validate/additional/mustBeUniqueInCollection.d.ts +10 -0
  199. package/dist/utils/Validate/additional/mustEnterAtLeastOne.d.ts +9 -0
  200. package/dist/utils/Validate/additional/mustHaveLessThanDecimalPlaces.d.ts +7 -0
  201. package/dist/utils/Validate/additional/mustNotContainSql.d.ts +2 -0
  202. package/dist/utils/Validate/additional/mustSelectOnlyOne.d.ts +8 -0
  203. package/dist/utils/Validate/additional/utils.d.ts +4 -0
  204. package/dist/utils/Validate/index.d.ts +42 -0
  205. package/dist/utils/Validate/validateCollection.d.ts +9 -0
  206. package/dist/utils/Validate/validateComponent.d.ts +16 -0
  207. package/dist/utils/Validate/validateContainer.d.ts +12 -0
  208. package/dist/utils/Validate/validateDate.d.ts +29 -0
  209. package/dist/utils/Validate/validateEmail.d.ts +13 -0
  210. package/dist/utils/Validate/validateMultifile.d.ts +3 -0
  211. package/dist/utils/Validate/validateOnPageLoad.d.ts +1 -0
  212. package/dist/utils/Validate/validatePage.d.ts +8 -0
  213. package/dist/utils/Validate/validateRegex.d.ts +13 -0
  214. package/dist/utils/Validate/validateRequired.d.ts +9 -0
  215. package/dist/utils/Validate/validateTextArea.d.ts +13 -0
  216. package/dist/utils/Validate/validateTime.d.ts +20 -0
  217. package/dist/utils/canOverrideFieldRequired.d.ts +9 -0
  218. package/dist/utils/index.d.ts +140 -0
  219. package/package.json +81 -170
  220. package/LICENCE.md +0 -21
  221. package/dist/components/CheckYourAnswers/Answer.js +0 -59
  222. package/dist/components/CheckYourAnswers/Answer.test.js +0 -142
  223. package/dist/components/CheckYourAnswers/CheckYourAnswers.js +0 -252
  224. package/dist/components/CheckYourAnswers/CheckYourAnswers.scss +0 -43
  225. package/dist/components/CheckYourAnswers/CheckYourAnswers.stories.mdx +0 -409
  226. package/dist/components/CheckYourAnswers/CheckYourAnswers.test.js +0 -603
  227. package/dist/components/CheckYourAnswers/index.js +0 -10
  228. package/dist/components/CollectionPage/CollectionPage.js +0 -178
  229. package/dist/components/CollectionPage/CollectionPage.test.js +0 -507
  230. package/dist/components/CollectionPage/index.js +0 -10
  231. package/dist/components/CollectionSummary/BannerStrip.js +0 -65
  232. package/dist/components/CollectionSummary/BannerStrip.scss +0 -60
  233. package/dist/components/CollectionSummary/BannerStrip.test.js +0 -167
  234. package/dist/components/CollectionSummary/CollectionSummary.js +0 -362
  235. package/dist/components/CollectionSummary/CollectionSummary.scss +0 -26
  236. package/dist/components/CollectionSummary/CollectionSummary.test.js +0 -368
  237. package/dist/components/CollectionSummary/Confirmation.js +0 -65
  238. package/dist/components/CollectionSummary/Confirmation.scss +0 -26
  239. package/dist/components/CollectionSummary/Confirmation.test.js +0 -109
  240. package/dist/components/CollectionSummary/RenderListView.js +0 -162
  241. package/dist/components/CollectionSummary/RenderListView.scss +0 -295
  242. package/dist/components/CollectionSummary/RenderListView.test.js +0 -303
  243. package/dist/components/CollectionSummary/SummaryCard.js +0 -277
  244. package/dist/components/CollectionSummary/SummaryCard.scss +0 -114
  245. package/dist/components/CollectionSummary/SummaryCard.test.js +0 -1442
  246. package/dist/components/CollectionSummary/SummaryCardButtons.js +0 -76
  247. package/dist/components/CollectionSummary/SummaryCardButtons.test.js +0 -87
  248. package/dist/components/CollectionSummary/SummaryCardDetails.js +0 -206
  249. package/dist/components/CollectionSummary/SummaryCardDetails.scss +0 -216
  250. package/dist/components/CollectionSummary/SummaryCardDetails.test.js +0 -654
  251. package/dist/components/CollectionSummary/SummaryCardValidationContext.js +0 -79
  252. package/dist/components/CollectionSummary/SummaryCardValidationContext.test.js +0 -104
  253. package/dist/components/CollectionSummary/index.js +0 -10
  254. package/dist/components/FormComponent/Collection.js +0 -234
  255. package/dist/components/FormComponent/Collection.scss +0 -24
  256. package/dist/components/FormComponent/Collection.test.js +0 -934
  257. package/dist/components/FormComponent/Container.js +0 -130
  258. package/dist/components/FormComponent/Container.scss +0 -15
  259. package/dist/components/FormComponent/Container.test.js +0 -456
  260. package/dist/components/FormComponent/FormComponent.js +0 -238
  261. package/dist/components/FormComponent/FormComponent.stories.mdx +0 -186
  262. package/dist/components/FormComponent/FormComponent.test.js +0 -436
  263. package/dist/components/FormComponent/helpers/addLabel.js +0 -25
  264. package/dist/components/FormComponent/helpers/getComponentDisabled.js +0 -15
  265. package/dist/components/FormComponent/helpers/getComponentDisabled.test.js +0 -27
  266. package/dist/components/FormComponent/helpers/getComponentError.js +0 -23
  267. package/dist/components/FormComponent/helpers/getComponentError.test.js +0 -51
  268. package/dist/components/FormComponent/helpers/getComponentFieldSet.js +0 -11
  269. package/dist/components/FormComponent/helpers/getComponentFieldSet.test.js +0 -30
  270. package/dist/components/FormComponent/helpers/index.js +0 -35
  271. package/dist/components/FormComponent/index.js +0 -10
  272. package/dist/components/FormPage/FormPage.js +0 -212
  273. package/dist/components/FormPage/FormPage.scss +0 -7
  274. package/dist/components/FormPage/FormPage.stories.mdx +0 -157
  275. package/dist/components/FormPage/FormPage.test.js +0 -454
  276. package/dist/components/FormPage/index.js +0 -10
  277. package/dist/components/FormRenderer/FormRenderer.js +0 -426
  278. package/dist/components/FormRenderer/FormRenderer.scss +0 -5
  279. package/dist/components/FormRenderer/FormRenderer.stories.mdx +0 -178
  280. package/dist/components/FormRenderer/FormRenderer.test.js +0 -799
  281. package/dist/components/FormRenderer/clear-uncompleted-routes/test-data/forms/cop-reassign-task-to-rcc.json +0 -446
  282. package/dist/components/FormRenderer/clear-uncompleted-routes/test-data/forms/form-chained-component-show-whens-containerised.json +0 -120
  283. package/dist/components/FormRenderer/clear-uncompleted-routes/test-data/forms/form-chained-component-show-whens-dependent-component-nested-block.json +0 -113
  284. package/dist/components/FormRenderer/clear-uncompleted-routes/test-data/forms/form-chained-component-show-whens-dependent-component-nested.json +0 -106
  285. package/dist/components/FormRenderer/clear-uncompleted-routes/test-data/forms/form-chained-component-show-whens-refdata.json +0 -106
  286. package/dist/components/FormRenderer/clear-uncompleted-routes/test-data/forms/form-chained-component-show-whens-target-component-nested.json +0 -99
  287. package/dist/components/FormRenderer/clear-uncompleted-routes/test-data/forms/form-chained-component-show-whens.json +0 -106
  288. package/dist/components/FormRenderer/clear-uncompleted-routes/test-data/forms/form-chained-show-whens-page-hidden.json +0 -113
  289. package/dist/components/FormRenderer/clear-uncompleted-routes/test-data/forms/form-cop-airpax.json +0 -26408
  290. package/dist/components/FormRenderer/clear-uncompleted-routes/test-data/forms/form-cop-mandec.json +0 -9405
  291. package/dist/components/FormRenderer/clear-uncompleted-routes/test-data/forms/form-hidden-collection-component-dependent-on-external-data.json +0 -158
  292. package/dist/components/FormRenderer/clear-uncompleted-routes/test-data/forms/form-hidden-collection-component.json +0 -86
  293. package/dist/components/FormRenderer/clear-uncompleted-routes/test-data/forms/form-hidden-component-referring-to-collection.json +0 -173
  294. package/dist/components/FormRenderer/clear-uncompleted-routes/test-data/forms/form-hidden-component-referring-to-hidden-collection.json +0 -202
  295. package/dist/components/FormRenderer/clear-uncompleted-routes/test-data/forms/form-hidden-component-show-when-in-component-and-page.json +0 -63
  296. package/dist/components/FormRenderer/clear-uncompleted-routes/test-data/forms/form-hidden-component-with-nested-questions-visible-elsewhere.json +0 -118
  297. package/dist/components/FormRenderer/clear-uncompleted-routes/test-data/forms/form-hidden-component-with-nested-questions.json +0 -112
  298. package/dist/components/FormRenderer/clear-uncompleted-routes/test-data/forms/form-hidden-component.json +0 -58
  299. package/dist/components/FormRenderer/clear-uncompleted-routes/test-data/forms/form-hidden-containerised-component.json +0 -97
  300. package/dist/components/FormRenderer/clear-uncompleted-routes/test-data/forms/form-hidden-embedded-collection-component.json +0 -83
  301. package/dist/components/FormRenderer/clear-uncompleted-routes/test-data/forms/form-hidden-embedded-component.json +0 -55
  302. package/dist/components/FormRenderer/clear-uncompleted-routes/test-data/forms/form-hidden-entire-collection.json +0 -114
  303. package/dist/components/FormRenderer/clear-uncompleted-routes/test-data/forms/form-hidden-multilevel-containerised-component-leaf-hidden.json +0 -106
  304. package/dist/components/FormRenderer/clear-uncompleted-routes/test-data/forms/form-hidden-multilevel-containerised-component.json +0 -106
  305. package/dist/components/FormRenderer/clear-uncompleted-routes/test-data/forms/form-hidden-options.json +0 -99
  306. package/dist/components/FormRenderer/clear-uncompleted-routes/test-data/forms/form-hidden-page-collection.json +0 -128
  307. package/dist/components/FormRenderer/clear-uncompleted-routes/test-data/forms/form-hidden-page-component-used-elsewhere.json +0 -109
  308. package/dist/components/FormRenderer/clear-uncompleted-routes/test-data/forms/form-hidden-page-same-component-reused.json +0 -62
  309. package/dist/components/FormRenderer/clear-uncompleted-routes/test-data/forms/form-hidden-page.json +0 -96
  310. package/dist/components/FormRenderer/clear-uncompleted-routes/test-data/forms/form-nested-answers-hidden-by-option-visible-elsewhere.json +0 -113
  311. package/dist/components/FormRenderer/clear-uncompleted-routes/test-data/forms/form-nested-answers-hidden-by-option.json +0 -112
  312. package/dist/components/FormRenderer/clear-uncompleted-routes/test-data/forms/form-page-nested-component.json +0 -26003
  313. package/dist/components/FormRenderer/clear-uncompleted-routes/test-data/forms/form-page-nested-radio-component.json +0 -201
  314. package/dist/components/FormRenderer/clear-uncompleted-routes/test-data/forms/form-page-same-component-reused-one-shown.json +0 -75
  315. package/dist/components/FormRenderer/clear-uncompleted-routes/test-data/forms/form-variance-breach.json +0 -4272
  316. package/dist/components/FormRenderer/clear-uncompleted-routes/test-data/input/cop-airpax-carrier.json +0 -407
  317. package/dist/components/FormRenderer/clear-uncompleted-routes/test-data/input/cop-airpax-change-what-happened-before.json +0 -300
  318. package/dist/components/FormRenderer/clear-uncompleted-routes/test-data/input/cop-airpax-remove-photos-before.json +0 -384
  319. package/dist/components/FormRenderer/clear-uncompleted-routes/test-data/input/cop-mandec-remove-business-interests-before.json +0 -140
  320. package/dist/components/FormRenderer/clear-uncompleted-routes/test-data/input/cop-mandec-remove-criminality-before.json +0 -186
  321. package/dist/components/FormRenderer/clear-uncompleted-routes/test-data/input/cop-mandec-remove-unspent-convictions-before.json +0 -143
  322. package/dist/components/FormRenderer/clear-uncompleted-routes/test-data/input/cop-variance-breach-with-upload-files.json +0 -1264
  323. package/dist/components/FormRenderer/clear-uncompleted-routes/test-data/input/data-chained-component-show-whens-containerised.json +0 -11
  324. package/dist/components/FormRenderer/clear-uncompleted-routes/test-data/input/data-chained-component-show-whens-dependent-component-nested-block.json +0 -10
  325. package/dist/components/FormRenderer/clear-uncompleted-routes/test-data/input/data-chained-component-show-whens-dependent-component-nested.json +0 -9
  326. package/dist/components/FormRenderer/clear-uncompleted-routes/test-data/input/data-chained-component-show-whens-refdata.json +0 -11
  327. package/dist/components/FormRenderer/clear-uncompleted-routes/test-data/input/data-chained-component-show-whens-target-component-nested.json +0 -9
  328. package/dist/components/FormRenderer/clear-uncompleted-routes/test-data/input/data-chained-component-show-whens.json +0 -9
  329. package/dist/components/FormRenderer/clear-uncompleted-routes/test-data/input/data-chained-show-whens-page-hidden.json +0 -9
  330. package/dist/components/FormRenderer/clear-uncompleted-routes/test-data/input/data-hidden-collection-component-dependent-on-external-data.json +0 -26
  331. package/dist/components/FormRenderer/clear-uncompleted-routes/test-data/input/data-hidden-collection-component.json +0 -15
  332. package/dist/components/FormRenderer/clear-uncompleted-routes/test-data/input/data-hidden-component-referring-to-collection.json +0 -25
  333. package/dist/components/FormRenderer/clear-uncompleted-routes/test-data/input/data-hidden-component-referring-to-hidden-collection.json +0 -26
  334. package/dist/components/FormRenderer/clear-uncompleted-routes/test-data/input/data-hidden-component-show-when-in-component-and-page.json +0 -6
  335. package/dist/components/FormRenderer/clear-uncompleted-routes/test-data/input/data-hidden-component-with-nested-questions-visible-elsewhere.json +0 -12
  336. package/dist/components/FormRenderer/clear-uncompleted-routes/test-data/input/data-hidden-component-with-nested-questions.json +0 -12
  337. package/dist/components/FormRenderer/clear-uncompleted-routes/test-data/input/data-hidden-component.json +0 -5
  338. package/dist/components/FormRenderer/clear-uncompleted-routes/test-data/input/data-hidden-containerised-component.json +0 -11
  339. package/dist/components/FormRenderer/clear-uncompleted-routes/test-data/input/data-hidden-embedded-collection-component.json +0 -15
  340. package/dist/components/FormRenderer/clear-uncompleted-routes/test-data/input/data-hidden-embedded-component.json +0 -5
  341. package/dist/components/FormRenderer/clear-uncompleted-routes/test-data/input/data-hidden-entire-collection.json +0 -20
  342. package/dist/components/FormRenderer/clear-uncompleted-routes/test-data/input/data-hidden-multilevel-containerised-component-leaf-hidden.json +0 -14
  343. package/dist/components/FormRenderer/clear-uncompleted-routes/test-data/input/data-hidden-multilevel-containerised-component.json +0 -14
  344. package/dist/components/FormRenderer/clear-uncompleted-routes/test-data/input/data-hidden-options.json +0 -10
  345. package/dist/components/FormRenderer/clear-uncompleted-routes/test-data/input/data-hidden-page-collection.json +0 -18
  346. package/dist/components/FormRenderer/clear-uncompleted-routes/test-data/input/data-hidden-page-component-used-elsewhere.json +0 -9
  347. package/dist/components/FormRenderer/clear-uncompleted-routes/test-data/input/data-hidden-page-same-component-reused.json +0 -6
  348. package/dist/components/FormRenderer/clear-uncompleted-routes/test-data/input/data-hidden-page.json +0 -9
  349. package/dist/components/FormRenderer/clear-uncompleted-routes/test-data/input/data-nested-answers-hidden-by-option-visible-elsewhere.json +0 -12
  350. package/dist/components/FormRenderer/clear-uncompleted-routes/test-data/input/data-nested-answers-hidden-by-option.json +0 -12
  351. package/dist/components/FormRenderer/clear-uncompleted-routes/test-data/input/data-page-nested-component.json +0 -63
  352. package/dist/components/FormRenderer/clear-uncompleted-routes/test-data/input/data-page-nested-radio-component.json +0 -45
  353. package/dist/components/FormRenderer/clear-uncompleted-routes/test-data/input/data-page-same-component-reused-one-shown.json +0 -8
  354. package/dist/components/FormRenderer/clear-uncompleted-routes/test-data/input/reassign-to-rcc.json +0 -72
  355. package/dist/components/FormRenderer/clear-uncompleted-routes/test-data/output/cop-airpax-change-what-happened-after.json +0 -280
  356. package/dist/components/FormRenderer/clear-uncompleted-routes/test-data/output/cop-airpax-remove-photos-after.json +0 -355
  357. package/dist/components/FormRenderer/clear-uncompleted-routes/test-data/output/cop-mandec-base-file.json +0 -80
  358. package/dist/components/FormRenderer/clear-uncompleted-routes/test-data/output/cop-mandec-remove-business-interests-after.json +0 -122
  359. package/dist/components/FormRenderer/clear-uncompleted-routes/test-data/output/cop-mandec-remove-criminality-after.json +0 -86
  360. package/dist/components/FormRenderer/clear-uncompleted-routes/test-data/output/cop-mandec-remove-unspent-convictions-after.json +0 -127
  361. package/dist/components/FormRenderer/clear-uncompleted-routes/test-data/output/data-chained-component-show-whens-containerised-removed.json +0 -11
  362. package/dist/components/FormRenderer/clear-uncompleted-routes/test-data/output/data-chained-component-show-whens-dependent-component-nested-block-removed.json +0 -7
  363. package/dist/components/FormRenderer/clear-uncompleted-routes/test-data/output/data-chained-component-show-whens-dependent-component-nested-removed.json +0 -7
  364. package/dist/components/FormRenderer/clear-uncompleted-routes/test-data/output/data-chained-component-show-whens-refdata-removed.json +0 -7
  365. package/dist/components/FormRenderer/clear-uncompleted-routes/test-data/output/data-chained-component-show-whens-removed.json +0 -7
  366. package/dist/components/FormRenderer/clear-uncompleted-routes/test-data/output/data-chained-component-show-whens-target-component-nested-removed.json +0 -6
  367. package/dist/components/FormRenderer/clear-uncompleted-routes/test-data/output/data-chained-show-whens-page-hidden-removed.json +0 -6
  368. package/dist/components/FormRenderer/clear-uncompleted-routes/test-data/output/data-hidden-collection-component-dependent-on-external-data-removed.json +0 -23
  369. package/dist/components/FormRenderer/clear-uncompleted-routes/test-data/output/data-hidden-collection-component-removed.json +0 -4
  370. package/dist/components/FormRenderer/clear-uncompleted-routes/test-data/output/data-hidden-component-referring-to-collection-removed.json +0 -21
  371. package/dist/components/FormRenderer/clear-uncompleted-routes/test-data/output/data-hidden-component-referring-to-hidden-collection-removed.json +0 -6
  372. package/dist/components/FormRenderer/clear-uncompleted-routes/test-data/output/data-hidden-component-removed.json +0 -4
  373. package/dist/components/FormRenderer/clear-uncompleted-routes/test-data/output/data-hidden-component-show-when-in-component-and-page-removed.json +0 -5
  374. package/dist/components/FormRenderer/clear-uncompleted-routes/test-data/output/data-hidden-component-with-nested-questions-removed.json +0 -10
  375. package/dist/components/FormRenderer/clear-uncompleted-routes/test-data/output/data-hidden-component-with-nested-questions-visible-elsewhere-removed.json +0 -11
  376. package/dist/components/FormRenderer/clear-uncompleted-routes/test-data/output/data-hidden-containerised-component-removed.json +0 -10
  377. package/dist/components/FormRenderer/clear-uncompleted-routes/test-data/output/data-hidden-embedded-collection-component-removed.json +0 -4
  378. package/dist/components/FormRenderer/clear-uncompleted-routes/test-data/output/data-hidden-embedded-component-removed.json +0 -4
  379. package/dist/components/FormRenderer/clear-uncompleted-routes/test-data/output/data-hidden-entire-collection-removed.json +0 -3
  380. package/dist/components/FormRenderer/clear-uncompleted-routes/test-data/output/data-hidden-multilevel-containerised-component-leaf-hidden-removed.json +0 -13
  381. package/dist/components/FormRenderer/clear-uncompleted-routes/test-data/output/data-hidden-multilevel-containerised-component-removed.json +0 -10
  382. package/dist/components/FormRenderer/clear-uncompleted-routes/test-data/output/data-hidden-options-removed.json +0 -8
  383. package/dist/components/FormRenderer/clear-uncompleted-routes/test-data/output/data-hidden-page-collection-removed.json +0 -15
  384. package/dist/components/FormRenderer/clear-uncompleted-routes/test-data/output/data-hidden-page-component-used-elsewhere-removed.json +0 -5
  385. package/dist/components/FormRenderer/clear-uncompleted-routes/test-data/output/data-hidden-page-removed.json +0 -4
  386. package/dist/components/FormRenderer/clear-uncompleted-routes/test-data/output/data-hidden-page-same-component-reused-removed.json +0 -5
  387. package/dist/components/FormRenderer/clear-uncompleted-routes/test-data/output/data-nested-answers-hidden-by-option-removed.json +0 -11
  388. package/dist/components/FormRenderer/clear-uncompleted-routes/test-data/output/data-nested-answers-hidden-by-option-visible-elsewhere-removed.json +0 -12
  389. package/dist/components/FormRenderer/clear-uncompleted-routes/test-data/output/data-page-nested-component.json +0 -63
  390. package/dist/components/FormRenderer/clear-uncompleted-routes/test-data/output/data-page-nested-radio-component-removed.json +0 -45
  391. package/dist/components/FormRenderer/clear-uncompleted-routes/test-data/output/data-page-same-component-reused-one-shown-removed.json +0 -7
  392. package/dist/components/FormRenderer/handlers/cyaAction.js +0 -23
  393. package/dist/components/FormRenderer/handlers/getPageId.js +0 -15
  394. package/dist/components/FormRenderer/handlers/getPageId.test.js +0 -35
  395. package/dist/components/FormRenderer/handlers/handlers.test.js +0 -81
  396. package/dist/components/FormRenderer/handlers/index.js +0 -17
  397. package/dist/components/FormRenderer/handlers/navigate.js +0 -25
  398. package/dist/components/FormRenderer/handlers/submissionError.js +0 -18
  399. package/dist/components/FormRenderer/helpers/canActionProceed.js +0 -27
  400. package/dist/components/FormRenderer/helpers/canActionProceed.test.js +0 -84
  401. package/dist/components/FormRenderer/helpers/canCYASubmit.js +0 -17
  402. package/dist/components/FormRenderer/helpers/canCYASubmit.test.js +0 -75
  403. package/dist/components/FormRenderer/helpers/cleanHiddenNestedData.js +0 -63
  404. package/dist/components/FormRenderer/helpers/cleanHiddenNestedData.test.js +0 -191
  405. package/dist/components/FormRenderer/helpers/clearOutUncompletedRoutes.js +0 -338
  406. package/dist/components/FormRenderer/helpers/clearOutUncompletedRoutes.test.js +0 -434
  407. package/dist/components/FormRenderer/helpers/clearOutUncompletedRoutesUtils.js +0 -399
  408. package/dist/components/FormRenderer/helpers/clearOutUncompletedRoutesUtils.test.js +0 -559
  409. package/dist/components/FormRenderer/helpers/getCYA.js +0 -42
  410. package/dist/components/FormRenderer/helpers/getCYA.test.js +0 -46
  411. package/dist/components/FormRenderer/helpers/getFormState.js +0 -25
  412. package/dist/components/FormRenderer/helpers/getFormState.test.js +0 -60
  413. package/dist/components/FormRenderer/helpers/getNextPageId.js +0 -76
  414. package/dist/components/FormRenderer/helpers/getNextPageId.test.js +0 -292
  415. package/dist/components/FormRenderer/helpers/getPage.js +0 -27
  416. package/dist/components/FormRenderer/helpers/getPage.test.js +0 -45
  417. package/dist/components/FormRenderer/helpers/getRelevantPages.js +0 -27
  418. package/dist/components/FormRenderer/helpers/getRelevantPages.test.js +0 -70
  419. package/dist/components/FormRenderer/helpers/getSubmissionStatus.js +0 -65
  420. package/dist/components/FormRenderer/helpers/getSubmissionStatus.test.js +0 -309
  421. package/dist/components/FormRenderer/helpers/getUpdatedSectionStates.js +0 -201
  422. package/dist/components/FormRenderer/helpers/getUpdatedSectionStates.test.js +0 -473
  423. package/dist/components/FormRenderer/helpers/index.js +0 -33
  424. package/dist/components/FormRenderer/index.js +0 -10
  425. package/dist/components/FormRenderer/onCYAAction.js +0 -150
  426. package/dist/components/FormRenderer/onCYAAction.test.js +0 -741
  427. package/dist/components/FormRenderer/onPageAction.js +0 -227
  428. package/dist/components/FormRenderer/onPageAction.test.js +0 -960
  429. package/dist/components/FormRenderer/onTaskAction.js +0 -47
  430. package/dist/components/FormRenderer/onTaskAction.test.js +0 -247
  431. package/dist/components/PageActions/ActionButton.js +0 -48
  432. package/dist/components/PageActions/ActionButton.test.js +0 -73
  433. package/dist/components/PageActions/PageActions.js +0 -37
  434. package/dist/components/PageActions/PageActions.stories.mdx +0 -74
  435. package/dist/components/PageActions/PageActions.test.js +0 -106
  436. package/dist/components/PageActions/index.js +0 -10
  437. package/dist/components/SummaryList/GroupAction.js +0 -50
  438. package/dist/components/SummaryList/GroupAction.test.js +0 -86
  439. package/dist/components/SummaryList/RowAction.js +0 -48
  440. package/dist/components/SummaryList/RowAction.test.js +0 -86
  441. package/dist/components/SummaryList/SummaryList.js +0 -128
  442. package/dist/components/SummaryList/SummaryList.scss +0 -79
  443. package/dist/components/SummaryList/SummaryList.stories.mdx +0 -84
  444. package/dist/components/SummaryList/SummaryList.test.js +0 -504
  445. package/dist/components/SummaryList/SummaryListHeadingRow.js +0 -39
  446. package/dist/components/SummaryList/SummaryListHeadingRowWithAction.js +0 -65
  447. package/dist/components/SummaryList/SummaryListHeadingRowWithAction.scss +0 -38
  448. package/dist/components/SummaryList/SummaryListRow.js +0 -58
  449. package/dist/components/SummaryList/SummaryListTitleRow.js +0 -32
  450. package/dist/components/SummaryList/helpers/getGroupActionAttributes.js +0 -29
  451. package/dist/components/SummaryList/helpers/getGroupActionAttributes.test.js +0 -72
  452. package/dist/components/SummaryList/helpers/getRowActionAttributes.js +0 -29
  453. package/dist/components/SummaryList/helpers/getRowActionAttributes.test.js +0 -72
  454. package/dist/components/SummaryList/helpers/index.js +0 -14
  455. package/dist/components/SummaryList/index.js +0 -10
  456. package/dist/components/TaskList/Task.js +0 -62
  457. package/dist/components/TaskList/Task.test.js +0 -176
  458. package/dist/components/TaskList/TaskList.js +0 -175
  459. package/dist/components/TaskList/TaskList.scss +0 -123
  460. package/dist/components/TaskList/TaskList.stories.mdx +0 -164
  461. package/dist/components/TaskList/TaskList.test.js +0 -535
  462. package/dist/components/TaskList/TaskState.js +0 -37
  463. package/dist/components/TaskList/TaskState.test.js +0 -95
  464. package/dist/components/TaskList/index.js +0 -10
  465. package/dist/components/index.js +0 -56
  466. package/dist/context/HooksContext/HooksContext.js +0 -122
  467. package/dist/context/HooksContext/HooksContext.test.js +0 -45
  468. package/dist/context/HooksContext/index.js +0 -16
  469. package/dist/context/ValidationContext/ValidationContext.js +0 -98
  470. package/dist/context/ValidationContext/ValidationContext.test.js +0 -107
  471. package/dist/context/ValidationContext/index.js +0 -16
  472. package/dist/context/index.js +0 -21
  473. package/dist/hooks/index.js +0 -55
  474. package/dist/hooks/useAxios.js +0 -36
  475. package/dist/hooks/useGetRequest.js +0 -89
  476. package/dist/hooks/useHooks.js +0 -15
  477. package/dist/hooks/useRefData.js +0 -62
  478. package/dist/hooks/useValidation.js +0 -15
  479. package/dist/json/actions.json +0 -17
  480. package/dist/json/actionsNoSave.json +0 -17
  481. package/dist/json/addressDetails.json +0 -149
  482. package/dist/json/areYouACivilServant.json +0 -7
  483. package/dist/json/firstForm.json +0 -94
  484. package/dist/json/grade.json +0 -108
  485. package/dist/json/group.data.json +0 -21
  486. package/dist/json/group.json +0 -402
  487. package/dist/json/groupOfRow.json +0 -137
  488. package/dist/json/groupOfRowData.json +0 -15
  489. package/dist/json/port.json +0 -346
  490. package/dist/json/saveAndContinue.json +0 -98
  491. package/dist/json/sublocation.json +0 -859
  492. package/dist/json/taskList.json +0 -265
  493. package/dist/json/team.json +0 -17351
  494. package/dist/json/terminal.json +0 -81
  495. package/dist/json/userProfile.data.json +0 -21
  496. package/dist/json/userProfile.json +0 -276
  497. package/dist/models/CollectionLabels.js +0 -15
  498. package/dist/models/ComponentTypes.js +0 -58
  499. package/dist/models/EventTypes.js +0 -16
  500. package/dist/models/FormPages.js +0 -16
  501. package/dist/models/FormTypes.js +0 -24
  502. package/dist/models/HubFormats.js +0 -14
  503. package/dist/models/PageAction.js +0 -65
  504. package/dist/models/TaskStates.js +0 -46
  505. package/dist/models/index.js +0 -77
  506. package/dist/setupTests.js +0 -54
  507. package/dist/utils/CheckYourAnswers/getCYAAction.js +0 -44
  508. package/dist/utils/CheckYourAnswers/getCYAAction.test.js +0 -120
  509. package/dist/utils/CheckYourAnswers/getCYACollectionChangeAction.js +0 -57
  510. package/dist/utils/CheckYourAnswers/getCYACollectionChangeAction.test.js +0 -162
  511. package/dist/utils/CheckYourAnswers/getCYACollectionDeleteAction.js +0 -66
  512. package/dist/utils/CheckYourAnswers/getCYACollectionDeleteAction.test.js +0 -198
  513. package/dist/utils/CheckYourAnswers/getCYARow.js +0 -58
  514. package/dist/utils/CheckYourAnswers/getCYARow.test.js +0 -373
  515. package/dist/utils/CheckYourAnswers/getCYARowForGroup.js +0 -69
  516. package/dist/utils/CheckYourAnswers/getCYARowForGroup.test.js +0 -70
  517. package/dist/utils/CheckYourAnswers/getCYARowsForCollection.js +0 -71
  518. package/dist/utils/CheckYourAnswers/getCYARowsForCollection.test.js +0 -285
  519. package/dist/utils/CheckYourAnswers/getCYARowsForCollectionPage.js +0 -237
  520. package/dist/utils/CheckYourAnswers/getCYARowsForCollectionPage.test.js +0 -844
  521. package/dist/utils/CheckYourAnswers/getCYARowsForContainer.js +0 -45
  522. package/dist/utils/CheckYourAnswers/getCYARowsForContainer.test.js +0 -535
  523. package/dist/utils/CheckYourAnswers/getCYARowsForPage.js +0 -72
  524. package/dist/utils/CheckYourAnswers/getCYARowsForPage.test.js +0 -343
  525. package/dist/utils/CheckYourAnswers/getSummaryListRowForDetails.js +0 -42
  526. package/dist/utils/CheckYourAnswers/getSummaryListRowForDetails.test.js +0 -56
  527. package/dist/utils/CheckYourAnswers/index.js +0 -15
  528. package/dist/utils/CheckYourAnswers/showComponentCYA.js +0 -53
  529. package/dist/utils/CheckYourAnswers/showComponentCYA.test.js +0 -149
  530. package/dist/utils/CollectionPage/addCollectionPageEntry.js +0 -23
  531. package/dist/utils/CollectionPage/addCollectionPageEntry.test.js +0 -17
  532. package/dist/utils/CollectionPage/duplicateCollectionPageActiveEntry.js +0 -26
  533. package/dist/utils/CollectionPage/duplicateCollectionPageActiveEntry.test.js +0 -70
  534. package/dist/utils/CollectionPage/duplicateCollectionPageEntry.js +0 -51
  535. package/dist/utils/CollectionPage/duplicateCollectionPageEntry.test.js +0 -125
  536. package/dist/utils/CollectionPage/getCollectionPageActiveId.js +0 -24
  537. package/dist/utils/CollectionPage/getCollectionPageActiveId.test.js +0 -26
  538. package/dist/utils/CollectionPage/getCollectionPageActiveIndex.js +0 -44
  539. package/dist/utils/CollectionPage/getCollectionPageActiveIndex.test.js +0 -88
  540. package/dist/utils/CollectionPage/getCollectionPageData.js +0 -53
  541. package/dist/utils/CollectionPage/getCollectionPageData.test.js +0 -103
  542. package/dist/utils/CollectionPage/getErrorsForCollection.js +0 -55
  543. package/dist/utils/CollectionPage/getErrorsForCollection.test.js +0 -154
  544. package/dist/utils/CollectionPage/getQuickEditPage.js +0 -122
  545. package/dist/utils/CollectionPage/getQuickEditPage.test.js +0 -143
  546. package/dist/utils/CollectionPage/index.js +0 -33
  547. package/dist/utils/CollectionPage/mergeCollectionPages.js +0 -128
  548. package/dist/utils/CollectionPage/mergeCollectionPages.test.js +0 -198
  549. package/dist/utils/CollectionPage/removeCollectionPageEntry.js +0 -36
  550. package/dist/utils/CollectionPage/removeCollectionPageEntry.test.js +0 -62
  551. package/dist/utils/CollectionPage/setCollectionPageData.js +0 -60
  552. package/dist/utils/CollectionPage/setCollectionPageData.test.js +0 -182
  553. package/dist/utils/Component/addShowWhen.js +0 -43
  554. package/dist/utils/Component/addShowWhen.test.js +0 -217
  555. package/dist/utils/Component/applyToComponentTree.js +0 -68
  556. package/dist/utils/Component/applyToComponentTree.test.js +0 -125
  557. package/dist/utils/Component/cleanAttributes.js +0 -42
  558. package/dist/utils/Component/cleanAttributes.test.js +0 -67
  559. package/dist/utils/Component/elevateNestedComponents.js +0 -58
  560. package/dist/utils/Component/elevateNestedComponents.test.js +0 -305
  561. package/dist/utils/Component/getComponent.js +0 -305
  562. package/dist/utils/Component/getComponentTests/getComponent.autocomplete.test.js +0 -73
  563. package/dist/utils/Component/getComponentTests/getComponent.calculation.test.js +0 -251
  564. package/dist/utils/Component/getComponentTests/getComponent.checkboxes.test.js +0 -156
  565. package/dist/utils/Component/getComponentTests/getComponent.date.test.js +0 -104
  566. package/dist/utils/Component/getComponentTests/getComponent.details.test.js +0 -56
  567. package/dist/utils/Component/getComponentTests/getComponent.email.test.js +0 -60
  568. package/dist/utils/Component/getComponentTests/getComponent.file.test.js +0 -60
  569. package/dist/utils/Component/getComponentTests/getComponent.heading.test.js +0 -31
  570. package/dist/utils/Component/getComponentTests/getComponent.html.test.js +0 -42
  571. package/dist/utils/Component/getComponentTests/getComponent.insetText.test.js +0 -29
  572. package/dist/utils/Component/getComponentTests/getComponent.list.test.js +0 -47
  573. package/dist/utils/Component/getComponentTests/getComponent.multifile.test.js +0 -66
  574. package/dist/utils/Component/getComponentTests/getComponent.nested.test.js +0 -211
  575. package/dist/utils/Component/getComponentTests/getComponent.paragraph.test.js +0 -46
  576. package/dist/utils/Component/getComponentTests/getComponent.phoneNumber.test.js +0 -60
  577. package/dist/utils/Component/getComponentTests/getComponent.radios.test.js +0 -221
  578. package/dist/utils/Component/getComponentTests/getComponent.select.test.js +0 -62
  579. package/dist/utils/Component/getComponentTests/getComponent.text.test.js +0 -60
  580. package/dist/utils/Component/getComponentTests/getComponent.textArea.test.js +0 -104
  581. package/dist/utils/Component/getComponentTests/getComponent.time.test.js +0 -80
  582. package/dist/utils/Component/getComponentTests/getComponent.unknown.test.js +0 -14
  583. package/dist/utils/Component/getComponentTests/getComponent.warningText.test.js +0 -29
  584. package/dist/utils/Component/getDefaultValue.js +0 -22
  585. package/dist/utils/Component/getDefaultValue.test.js +0 -62
  586. package/dist/utils/Component/getDefaultValueFromConfig.js +0 -106
  587. package/dist/utils/Component/getDefaultValueFromConfig.test.js +0 -141
  588. package/dist/utils/Component/index.js +0 -29
  589. package/dist/utils/Component/isEditable.js +0 -13
  590. package/dist/utils/Component/isEditable.test.js +0 -42
  591. package/dist/utils/Component/optionIsSelected.js +0 -25
  592. package/dist/utils/Component/optionIsSelected.test.js +0 -69
  593. package/dist/utils/Component/setupContainerComponentsPath.js +0 -35
  594. package/dist/utils/Component/setupContainerComponentsPath.test.js +0 -79
  595. package/dist/utils/Component/showComponent.js +0 -25
  596. package/dist/utils/Component/showComponent.test.js +0 -157
  597. package/dist/utils/Component/wrapInFormGroup.js +0 -26
  598. package/dist/utils/Condition/index.js +0 -17
  599. package/dist/utils/Condition/meetsAllConditions.js +0 -44
  600. package/dist/utils/Condition/meetsAllConditions.test.js +0 -109
  601. package/dist/utils/Condition/meetsCondition.js +0 -165
  602. package/dist/utils/Condition/meetsCondition.test.js +0 -899
  603. package/dist/utils/Condition/meetsOneCondition.js +0 -32
  604. package/dist/utils/Condition/meetsOneCondition.test.js +0 -101
  605. package/dist/utils/Condition/setupConditions.js +0 -36
  606. package/dist/utils/Condition/setupConditions.test.js +0 -34
  607. package/dist/utils/Container/getEditableComponents.js +0 -29
  608. package/dist/utils/Container/getEditableComponents.test.js +0 -134
  609. package/dist/utils/Container/index.js +0 -17
  610. package/dist/utils/Container/setupNesting.js +0 -53
  611. package/dist/utils/Container/setupNesting.test.js +0 -143
  612. package/dist/utils/Container/showContainer.js +0 -52
  613. package/dist/utils/Container/showContainer.test.js +0 -179
  614. package/dist/utils/Data/applyFormula.js +0 -90
  615. package/dist/utils/Data/applyFormula.test.js +0 -264
  616. package/dist/utils/Data/deleteValues.js +0 -19
  617. package/dist/utils/Data/deleteValues.test.js +0 -58
  618. package/dist/utils/Data/getAutocompleteSource.js +0 -87
  619. package/dist/utils/Data/getAutocompleteSource.test.js +0 -335
  620. package/dist/utils/Data/getDataPath.js +0 -66
  621. package/dist/utils/Data/getDataPath.test.js +0 -49
  622. package/dist/utils/Data/getOptions.js +0 -86
  623. package/dist/utils/Data/getOptions.test.js +0 -279
  624. package/dist/utils/Data/getSourceData.js +0 -44
  625. package/dist/utils/Data/getSourceData.test.js +0 -158
  626. package/dist/utils/Data/index.js +0 -35
  627. package/dist/utils/Data/nestInRefdataOptions.js +0 -47
  628. package/dist/utils/Data/nestInRefdataOptions.test.js +0 -237
  629. package/dist/utils/Data/refDataToOptions.js +0 -44
  630. package/dist/utils/Data/refDataToOptions.test.js +0 -197
  631. package/dist/utils/Data/setDataItem.js +0 -26
  632. package/dist/utils/Data/setDataItem.test.js +0 -136
  633. package/dist/utils/Data/setupFormData.js +0 -49
  634. package/dist/utils/Data/setupFormData.test.js +0 -215
  635. package/dist/utils/Data/setupRefDataUrlForComponent.js +0 -44
  636. package/dist/utils/Data/setupRefDataUrlForComponent.test.js +0 -150
  637. package/dist/utils/FormPage/applyConditionalProperties.js +0 -34
  638. package/dist/utils/FormPage/applyConditionalProperties.test.js +0 -61
  639. package/dist/utils/FormPage/getConditionalText.js +0 -55
  640. package/dist/utils/FormPage/getConditionalText.test.js +0 -163
  641. package/dist/utils/FormPage/getFormPage.js +0 -54
  642. package/dist/utils/FormPage/getFormPage.test.js +0 -206
  643. package/dist/utils/FormPage/getFormPages.js +0 -30
  644. package/dist/utils/FormPage/getFormPages.test.js +0 -97
  645. package/dist/utils/FormPage/getPageActions.js +0 -58
  646. package/dist/utils/FormPage/getPageActions.test.js +0 -115
  647. package/dist/utils/FormPage/getParagraphFromText.js +0 -21
  648. package/dist/utils/FormPage/getParagraphFromText.test.js +0 -28
  649. package/dist/utils/FormPage/index.js +0 -24
  650. package/dist/utils/FormPage/showFormPage.js +0 -52
  651. package/dist/utils/FormPage/showFormPage.test.js +0 -181
  652. package/dist/utils/FormPage/showFormPageCYA.js +0 -23
  653. package/dist/utils/FormPage/showFormPageCYA.test.js +0 -29
  654. package/dist/utils/FormPage/useComponent.js +0 -83
  655. package/dist/utils/FormPage/useComponent.test.js +0 -216
  656. package/dist/utils/Format/formatData.js +0 -27
  657. package/dist/utils/Format/formatData.test.js +0 -46
  658. package/dist/utils/Format/formatDataForComponent.js +0 -35
  659. package/dist/utils/Format/formatDataForComponent.test.js +0 -114
  660. package/dist/utils/Format/formatDataForForm.js +0 -27
  661. package/dist/utils/Format/formatDataForForm.test.js +0 -79
  662. package/dist/utils/Format/formatDataForPage.js +0 -31
  663. package/dist/utils/Format/formatDataForPage.test.js +0 -94
  664. package/dist/utils/Format/index.js +0 -21
  665. package/dist/utils/Hub/getFormHub.js +0 -40
  666. package/dist/utils/Hub/getFormHub.test.js +0 -105
  667. package/dist/utils/Hub/index.js +0 -15
  668. package/dist/utils/Meta/constants.js +0 -9
  669. package/dist/utils/Meta/documents/getDocuments.js +0 -15
  670. package/dist/utils/Meta/documents/getDocuments.test.js +0 -46
  671. package/dist/utils/Meta/documents/index.js +0 -19
  672. package/dist/utils/Meta/documents/setDocumentsForField.js +0 -30
  673. package/dist/utils/Meta/documents/setDocumentsForField.test.js +0 -97
  674. package/dist/utils/Meta/index.js +0 -17
  675. package/dist/utils/Operate/checkValueIsTruthy.js +0 -29
  676. package/dist/utils/Operate/checkValueIsTruthy.test.js +0 -43
  677. package/dist/utils/Operate/deleteValueInFormData.js +0 -27
  678. package/dist/utils/Operate/deleteValueInFormData.test.js +0 -61
  679. package/dist/utils/Operate/doesContainValue.js +0 -35
  680. package/dist/utils/Operate/doesContainValue.test.js +0 -76
  681. package/dist/utils/Operate/getFirstOf.js +0 -31
  682. package/dist/utils/Operate/getFirstOf.test.js +0 -87
  683. package/dist/utils/Operate/getIndexOfMatchingValueIn.js +0 -68
  684. package/dist/utils/Operate/getIndexOfMatchingValueIn.test.js +0 -158
  685. package/dist/utils/Operate/getLength.js +0 -51
  686. package/dist/utils/Operate/getLength.test.js +0 -90
  687. package/dist/utils/Operate/index.js +0 -13
  688. package/dist/utils/Operate/persistValueInFormData.js +0 -40
  689. package/dist/utils/Operate/persistValueInFormData.test.js +0 -118
  690. package/dist/utils/Operate/runPageOperations.js +0 -75
  691. package/dist/utils/Operate/runPageOperations.test.js +0 -105
  692. package/dist/utils/Operate/setValueInFormData.js +0 -22
  693. package/dist/utils/Operate/setValueInFormData.test.js +0 -45
  694. package/dist/utils/Operate/shouldRun.js +0 -57
  695. package/dist/utils/Operate/shouldRun.test.js +0 -65
  696. package/dist/utils/Validate/additional/conditionallyPermittedChange.js +0 -26
  697. package/dist/utils/Validate/additional/conditionallyPermittedChange.test.js +0 -34
  698. package/dist/utils/Validate/additional/conditionallyRequired.js +0 -24
  699. package/dist/utils/Validate/additional/conditionallyRequired.test.js +0 -74
  700. package/dist/utils/Validate/additional/index.js +0 -74
  701. package/dist/utils/Validate/additional/index.test.js +0 -130
  702. package/dist/utils/Validate/additional/mustBeAfter.js +0 -34
  703. package/dist/utils/Validate/additional/mustBeAfter.test.js +0 -109
  704. package/dist/utils/Validate/additional/mustBeBefore.js +0 -34
  705. package/dist/utils/Validate/additional/mustBeBefore.test.js +0 -77
  706. package/dist/utils/Validate/additional/mustBeEarlierDateTime.js +0 -57
  707. package/dist/utils/Validate/additional/mustBeEarlierDateTime.test.js +0 -128
  708. package/dist/utils/Validate/additional/mustBeGreaterThan.js +0 -22
  709. package/dist/utils/Validate/additional/mustBeGreaterThan.test.js +0 -57
  710. package/dist/utils/Validate/additional/mustBeInTheFuture.js +0 -33
  711. package/dist/utils/Validate/additional/mustBeInTheFuture.test.js +0 -32
  712. package/dist/utils/Validate/additional/mustBeInThePast.js +0 -36
  713. package/dist/utils/Validate/additional/mustBeInThePast.test.js +0 -32
  714. package/dist/utils/Validate/additional/mustBeLessThan.js +0 -22
  715. package/dist/utils/Validate/additional/mustBeLessThan.test.js +0 -53
  716. package/dist/utils/Validate/additional/mustBeLongerThan.js +0 -23
  717. package/dist/utils/Validate/additional/mustBeLongerThan.test.js +0 -49
  718. package/dist/utils/Validate/additional/mustBeNumbersOnly.js +0 -24
  719. package/dist/utils/Validate/additional/mustBeNumbersOnly.test.js +0 -45
  720. package/dist/utils/Validate/additional/mustBeOneOf.js +0 -22
  721. package/dist/utils/Validate/additional/mustBeOneOf.test.js +0 -37
  722. package/dist/utils/Validate/additional/mustBeShorterThan.js +0 -23
  723. package/dist/utils/Validate/additional/mustBeShorterThan.test.js +0 -49
  724. package/dist/utils/Validate/additional/mustBeUniqueInCollection.js +0 -40
  725. package/dist/utils/Validate/additional/mustBeUniqueInCollection.test.js +0 -163
  726. package/dist/utils/Validate/additional/mustEnterAtLeastOne.js +0 -26
  727. package/dist/utils/Validate/additional/mustEnterAtLeastOne.test.js +0 -37
  728. package/dist/utils/Validate/additional/mustHaveLessThanDecimalPlaces.js +0 -19
  729. package/dist/utils/Validate/additional/mustHaveLessThanDecimalPlaces.test.js +0 -37
  730. package/dist/utils/Validate/additional/mustNotContainSql.js +0 -19
  731. package/dist/utils/Validate/additional/mustNotContainSql.test.js +0 -33
  732. package/dist/utils/Validate/additional/mustSelectOnlyOne.js +0 -29
  733. package/dist/utils/Validate/additional/mustSelectOnlyOne.test.js +0 -55
  734. package/dist/utils/Validate/additional/utils.js +0 -35
  735. package/dist/utils/Validate/index.js +0 -33
  736. package/dist/utils/Validate/validateCollection.js +0 -50
  737. package/dist/utils/Validate/validateCollection.test.js +0 -134
  738. package/dist/utils/Validate/validateComponent.js +0 -126
  739. package/dist/utils/Validate/validateComponent.test.js +0 -435
  740. package/dist/utils/Validate/validateContainer.js +0 -52
  741. package/dist/utils/Validate/validateContainer.test.js +0 -115
  742. package/dist/utils/Validate/validateDate.js +0 -112
  743. package/dist/utils/Validate/validateDate.test.js +0 -133
  744. package/dist/utils/Validate/validateEmail.js +0 -45
  745. package/dist/utils/Validate/validateEmail.test.js +0 -78
  746. package/dist/utils/Validate/validateMultifile.js +0 -29
  747. package/dist/utils/Validate/validateMultifile.test.js +0 -46
  748. package/dist/utils/Validate/validateOnPageLoad.js +0 -24
  749. package/dist/utils/Validate/validateOnPageLoad.test.js +0 -89
  750. package/dist/utils/Validate/validatePage.js +0 -56
  751. package/dist/utils/Validate/validatePage.test.js +0 -795
  752. package/dist/utils/Validate/validateRegex.js +0 -41
  753. package/dist/utils/Validate/validateRegex.test.js +0 -43
  754. package/dist/utils/Validate/validateRequired.js +0 -37
  755. package/dist/utils/Validate/validateRequired.test.js +0 -64
  756. package/dist/utils/Validate/validateTextArea.js +0 -36
  757. package/dist/utils/Validate/validateTextArea.test.js +0 -71
  758. package/dist/utils/Validate/validateTime.js +0 -76
  759. package/dist/utils/Validate/validateTime.test.js +0 -116
  760. package/dist/utils/canOverrideFieldRequired.js +0 -23
  761. package/dist/utils/index.js +0 -42
@@ -0,0 +1,40 @@
1
+ /**
2
+ * Generates a new page to be used in a SumaryCard's quick edit section.
3
+ * The page is a standard form page that has all the components that are
4
+ * made available for quick editing via page config.
5
+ *
6
+ * Pages in a collection can mark any or all of their components as available
7
+ * for quick edit by using this config anywhere on the page:
8
+ *
9
+ * "summaryQuickEdit": [
10
+ * "componentId1",
11
+ * "componentId2",
12
+ * {
13
+ * "use": "componentId3",
14
+ * "show_when": {
15
+ * "field": "someField"
16
+ * "op": "=",
17
+ * "value": "someValue"
18
+ * }
19
+ * },
20
+ * {
21
+ * "use": "componentId4",
22
+ * "label": "New label for component 4"
23
+ * }
24
+ * ]
25
+ *
26
+ * Each entry in the array can be either the ID of a component on the page, or
27
+ * an object containing the ID of a component under "use" and properties to override,
28
+ * as well as as show_when to say when the component should be quick editable.
29
+ *
30
+ * NOTE: A show_when defined in the quick edit config will NOT be spread to the original
31
+ * component - it is treated as a separate test for if the component should be quick
32
+ * editable or not.
33
+ *
34
+ * @param {object} masterPage The master page for the collection.
35
+ * @param {object} formData The top-level formData object.
36
+ * @param {object} entryData The data for the current collection entry.
37
+ * @returns Page suitble for rendering in a QuickEdit
38
+ */
39
+ declare const getQuickEditPage: (masterPage: any, formData: any, entryData: any) => any;
40
+ export default getQuickEditPage;
@@ -0,0 +1,13 @@
1
+ declare const CollectionPage: {
2
+ addEntry: (collectionName: any, formData: any) => void;
3
+ duplicateActiveEntry: (collectionName: any, formData: any) => string | null;
4
+ duplicateEntry: (collectionName: any, formData: any, entryId: any, fieldsToIgnore?: never[], fieldsToAdd?: {}) => string | null;
5
+ getActiveId: (collectionName: any, formData: any) => any;
6
+ getActiveIndex: (collectionName: any, formData: any) => any;
7
+ getData: (collectionName: any, formData: any) => any;
8
+ getErrorsForCollection: (config: any, masterPage: any, formData: any, hooks: any, activeIds?: {}) => any[];
9
+ mergePages: (pages: any) => any;
10
+ removeEntry: (collectionName: any, formData: any, id: any) => any;
11
+ setData: (collectionName: any, newData: any, formData: any) => void;
12
+ };
13
+ export default CollectionPage;
@@ -0,0 +1,13 @@
1
+ /**
2
+ * Loop over an array of pages, merging any CollectionPages into a
3
+ * single master page for that collection. A master page is created
4
+ * for each unique collection.name that exists.
5
+ * These master pages contain all the pages that are needed to
6
+ * represent an item in that collection.
7
+ * The master page for each collection is positioned at the index
8
+ * of the first CollectionPage in that collection.
9
+ * @param { array } pages Array of pages in the form.
10
+ * @returns An array of the same pages, with a master page for each collection.
11
+ */
12
+ declare const mergeCollectionPages: (pages: any) => any;
13
+ export default mergeCollectionPages;
@@ -0,0 +1,11 @@
1
+ /**
2
+ * Removes an entry with a given id from a collection.
3
+ *
4
+ * @param {string} collectionName The name of the collection to delete the entry from.
5
+ * @param {object} formData The top-level formData object.
6
+ * @param {string} id The id of the entry to be deleted.
7
+ * @returns null if the target entry could not be deleted.
8
+ * The deleted entry if it was deleted successfully.
9
+ */
10
+ declare const removeCollectionPageEntry: (collectionName: any, formData: any, id: any) => any;
11
+ export default removeCollectionPageEntry;
@@ -0,0 +1,16 @@
1
+ /**
2
+ * This function sets the data for a given collection in formData.
3
+ *
4
+ * This functions handles collectionName being a dot-separated string
5
+ * by drilling down through each active entry in each parent collection.
6
+ *
7
+ * If at any point this path is broken because a collection in the chain
8
+ * doesn't exist, then the missing collection is created and an active
9
+ * entry is created.
10
+ *
11
+ * @param {string} collectionName The page's collection name. Can be dot-separated for nested collections.
12
+ * @param {Array} newData The new data to set for the collection.
13
+ * @param {Object} formData Top level formData object.
14
+ */
15
+ declare const setCollectionPageData: (collectionName: any, newData: any, formData: any) => void;
16
+ export default setCollectionPageData;
@@ -0,0 +1,13 @@
1
+ /**
2
+ * Adds a show_when to a component.
3
+ * If the component has no show_when, then an array is created
4
+ * with condition as the only entry.
5
+ * If the component has existing show_whens then condition is
6
+ * appended to the existing array.
7
+ * @param {*} component The component to add the show_when to.
8
+ * @param {*} condition The show_when condition to add.
9
+ * @returns The component with the new show_when added.
10
+ * null if component or condition are invalid.
11
+ */
12
+ declare const addShowWhen: (component: any, condition: any) => any;
13
+ export default addShowWhen;
@@ -0,0 +1,15 @@
1
+ /**
2
+ * Call a callback on a component and all of its child/nested components.
3
+ * At each stage, the value of the component is set to the returned value
4
+ * from the callback.
5
+ *
6
+ * @param {*} root The root component to call the callback on.
7
+ * @param {*} callback The callback to call. It should take a single
8
+ * component as an argument and return the new
9
+ * desired value for that component.
10
+ * @returns The result of calling callback on root.
11
+ * null if root is not valid.
12
+ * root if callback is not valid.
13
+ */
14
+ declare const applyToComponentTree: (root: any, callback: any) => any;
15
+ export default applyToComponentTree;
@@ -0,0 +1,14 @@
1
+ export declare const JSON_ONLY_PROPERTIES: string[];
2
+ /**
3
+ * This method removes and properties that are entirely specific to the JSON
4
+ * configuration and that should not be used as HTML attributes.
5
+ *
6
+ * This is in place as certain properties being used as attributes result in
7
+ * console errors.
8
+ *
9
+ * @param {object} options The options object that contains attributes and JSON configuration properties.
10
+ * @param {Array} alsoRemove An array of additional properties to remove.
11
+ * @returns A clean(er) JSON object.
12
+ */
13
+ declare const cleanAttributes: (options: any, alsoRemove?: never[]) => {};
14
+ export default cleanAttributes;
@@ -0,0 +1,28 @@
1
+ /**
2
+ * Iterates over an array of components and brings any nested
3
+ * components that should be visible into the top level array.
4
+ * The values provided in data are used to determine if any
5
+ * nested components should be visible.
6
+ *
7
+ * Given this structure in the components array:
8
+ * - Radios
9
+ * - Radio Option 1 (Not selected)
10
+ * - Nested 1
11
+ * - Nested 2
12
+ * - Radio Option 2 (Selected)
13
+ * - Nested 3
14
+ * - Text Input
15
+ *
16
+ * The result will be the following array:
17
+ * - Radios
18
+ * - Nested 3
19
+ * - Text Input
20
+ *
21
+ * @param {*} components An array of components.
22
+ * @param {*} data A chunk of form data used to determine if
23
+ * any nested components are visible or not.
24
+ * @returns A new array consisting of components interspersed
25
+ * with any visible nested components.
26
+ */
27
+ declare const elevateNestedComponents: (components: any, data: any) => any[];
28
+ export default elevateNestedComponents;
@@ -0,0 +1,2 @@
1
+ declare const getDefaultValue: (component: any, formData: any) => any;
2
+ export default getDefaultValue;
@@ -0,0 +1,2 @@
1
+ declare const getDefaultValueFromConfig: (component: any, data: any) => any;
2
+ export default getDefaultValueFromConfig;
@@ -0,0 +1,12 @@
1
+ declare const Component: {
2
+ clean: (options: any, alsoRemove?: never[]) => {};
3
+ defaultValue: (component: any, formData: any) => any;
4
+ defaultValueFromConfig: (component: any, data: any) => any;
5
+ editable: (options: any) => any;
6
+ elevateNested: (components: any, data: any) => any[];
7
+ get: any;
8
+ setupContainerPaths: (container: any) => any;
9
+ show: (component: any, data: any) => boolean;
10
+ wrap: any;
11
+ };
12
+ export default Component;
@@ -0,0 +1,3 @@
1
+ export declare const EDITABLE_TYPES: string[];
2
+ declare const isEditable: (options: any) => any;
3
+ export default isEditable;
@@ -0,0 +1,10 @@
1
+ /**
2
+ * Checks whether an option for a component has been selected.
3
+ *
4
+ * @param {object} componentValue The option's value selected for that component.
5
+ * @param {object} option The option of the component being tested.
6
+ *
7
+ * @returns A boolean of whether the option is selected.
8
+ */
9
+ declare const optionIsSelected: (componentValue: any, option: any) => boolean;
10
+ export default optionIsSelected;
@@ -0,0 +1,2 @@
1
+ declare const setupContainerComponentsPath: (container: any) => any;
2
+ export default setupContainerComponentsPath;
@@ -0,0 +1,2 @@
1
+ declare const showComponent: (component: any, data: any) => boolean;
2
+ export default showComponent;
@@ -0,0 +1,6 @@
1
+ declare const Condition: {
2
+ meetsOne: (options: any, data: any) => boolean;
3
+ meetsAll: (options: any, data: any) => boolean;
4
+ met: (condition: any, value: any, data: any) => any;
5
+ };
6
+ export default Condition;
@@ -0,0 +1,8 @@
1
+ /**
2
+ * Evaluates all condition(s) on a page, container, or component.
3
+ * @param {object} options The container to consider.
4
+ * @param {object} data The top-level form data.
5
+ * @returns Boolean true if all conditions are met; false otherwise.
6
+ */
7
+ declare const meetsAllConditions: (options: any, data: any) => boolean;
8
+ export default meetsAllConditions;
@@ -0,0 +1,14 @@
1
+ /**
2
+ * Looks at a condition object to see if the supplied value meets it.
3
+ * The condition object contains an `op` property, along with a comparator
4
+ * `value` (or `values`).
5
+ *
6
+ * The evaluation is strict - i.e., it matches the value AND the type.
7
+ *
8
+ * @param {object} condition The condition object.
9
+ * @param {*} value The value to test against the condition.
10
+ *
11
+ * @returns A boolean indicating whether the value meets the condition.
12
+ */
13
+ declare const meetsCondition: (condition: any, value: any, data: any) => any;
14
+ export default meetsCondition;
@@ -0,0 +1,8 @@
1
+ /**
2
+ * Evaluates all condition(s) on a page, container, or component.
3
+ * @param {object} options The container to consider.
4
+ * @param {object} data The top-level form data.
5
+ * @returns Boolean true if at least one conditions is met; false otherwise.
6
+ */
7
+ declare const meetsOneCondition: (options: any, data: any) => boolean;
8
+ export default meetsOneCondition;
@@ -0,0 +1,2 @@
1
+ declare const setupConditions: (options: any) => any;
2
+ export default setupConditions;
@@ -0,0 +1,7 @@
1
+ /**
2
+ * Gets all the editable components in a container.
3
+ * @param {object} container The container to consider.
4
+ * @returns An array of ONLY the editable components in a container.
5
+ */
6
+ declare const getEditableComponents: (container: any) => any;
7
+ export default getEditableComponents;
@@ -0,0 +1,6 @@
1
+ declare const Container: {
2
+ editableComponents: (container: any) => any;
3
+ setup: (container: any) => any;
4
+ show: (container: any, data: any) => any;
5
+ };
6
+ export default Container;
@@ -0,0 +1,2 @@
1
+ declare const setupNesting: (container: any) => any;
2
+ export default setupNesting;
@@ -0,0 +1,8 @@
1
+ /**
2
+ * Indicates whether or not a container should be shown.
3
+ * @param {object} container The container to consider.
4
+ * @param {object} data The top-level form data.
5
+ * @returns Boolean true if the container should be shown; false if not.
6
+ */
7
+ declare const showContainer: (container: any, data: any) => any;
8
+ export default showContainer;
@@ -0,0 +1,2 @@
1
+ declare const applyFormula: (config: any) => any;
2
+ export default applyFormula;
@@ -0,0 +1,8 @@
1
+ /**
2
+ * Find values in data not in formData
3
+ * and delete them from data.
4
+ * @param {object} data The page's data.
5
+ * @param {object} formData The page's formData.
6
+ */
7
+ declare const deleteValues: (data: any, formData: any) => void;
8
+ export default deleteValues;
@@ -0,0 +1,2 @@
1
+ declare const getAutocompleteSource: (config: any) => (query: any, renderResult: any) => void;
2
+ export default getAutocompleteSource;
@@ -0,0 +1,21 @@
1
+ /**
2
+ * Takes a path and a current path and returns an absolute path to a data element.
3
+ * Note that the path may be absolute or relative.
4
+ *
5
+ * The behaviour should mirror the way imports work.
6
+ *
7
+ * @param {string} path The path to attempt to get to, which may be absolute or relative.
8
+ * @param {string} currentPath The current absolute path.
9
+ * @returns An absolute path to a data element.
10
+ * @example
11
+ * getDataPath('./relative.path', 'this.is.the.current.path');
12
+ * // => 'this.is.the.current.relative.path'
13
+ * @example
14
+ * getDataPath('../relative.path', 'this.is.the.current.path');
15
+ * // => 'this.is.the.relative.path'
16
+ * @example
17
+ * getDataPath('../../relative.path', 'this.is.the.current.path');
18
+ * // => 'this.is.relative.path'
19
+ */
20
+ declare const getDataPath: (path: any, currentPath: any) => any;
21
+ export default getDataPath;
@@ -0,0 +1,2 @@
1
+ declare const getOptions: (config: any, callback: any) => any;
2
+ export default getOptions;
@@ -0,0 +1,17 @@
1
+ /**
2
+ * Gets the value of a field within the top-level JSON form data,
3
+ * based on a dot-separated field identifier.
4
+ *
5
+ * Example:
6
+ * getSourceData({
7
+ * 'alpha': {
8
+ * 'bravo': 'Charlie'
9
+ * }
10
+ * }, 'alpha.bravo') will return the value 'Charlie'.
11
+ *
12
+ * @param {object} data The top-level JSON form data to iterate through.
13
+ * @param {string} fieldId The dot-separated path to the field.
14
+ * @returns The value of the field specified.
15
+ */
16
+ declare const getSourceData: (data: any, fieldId: any) => any;
17
+ export default getSourceData;
@@ -0,0 +1,15 @@
1
+ declare const Data: {
2
+ applyFormula: (config: any) => any;
3
+ getAutocompleteSource: (config: any) => (query: any, renderResult: any) => void;
4
+ getDataPath: (path: any, currentPath: any) => any;
5
+ getOptions: (config: any, callback: any) => any;
6
+ getSource: (data: any, fieldId: any) => any;
7
+ refData: {
8
+ setupUrl: (component: any, data: any) => any;
9
+ toOptions: (refDataItems: any, itemStructure: any) => any[];
10
+ };
11
+ deleteValues: (data: any, formData: any) => void;
12
+ setDataItem: (data: any, fieldId: any, value: any, handleArrayIndices?: boolean) => any;
13
+ setupForm: (pages: any, components: any, baseData: any) => any;
14
+ };
15
+ export default Data;
@@ -0,0 +1,10 @@
1
+ /**
2
+ * Combines refdata options with custom options with the use of `from_refdata` in the custom option
3
+ * Allowing for nesting of components within refdata lists of checkboxes or radios
4
+ * Also allows appending custom options to refdata options list
5
+ * @param {Array} refdataOptions The list of options coming from refdata
6
+ * @param {Array} options The list of options being defined in the form
7
+ * @returns A combined list of refdata options and custom options to be rendered
8
+ */
9
+ declare const nestInRefdataOptions: (refdataOptions: any, options: any) => any;
10
+ export default nestInRefdataOptions;
@@ -0,0 +1,8 @@
1
+ /**
2
+ * Converts ref data items to options.
3
+ * @param {Array} refDataItems An array of ref data items.
4
+ * @param {Object} itemStructure The structure of the item.
5
+ * @returns An array of options.
6
+ */
7
+ declare const refDataToOptions: (refDataItems: any, itemStructure: any) => any[];
8
+ export default refDataToOptions;
@@ -0,0 +1,2 @@
1
+ declare const setDataItem: (data: any, fieldId: any, value: any, handleArrayIndices?: boolean) => any;
2
+ export default setDataItem;
@@ -0,0 +1,15 @@
1
+ /**
2
+ * This populates an object with data from a source field.
3
+ * Note that this doesn't currently support sequenced dependencies:
4
+ * 0: fieldA: source.field = fieldB
5
+ * 1: fieldB: source.field = fieldC
6
+ * 2: fieldC: 'value'
7
+ * In the above example, fieldA will not get a value as fieldB isn't
8
+ * set until after fieldA is processed.
9
+ * @param {Array} pages
10
+ * @param {Array} components
11
+ * @param {object} baseData
12
+ * @returns
13
+ */
14
+ declare const setupFormData: (pages: any, components: any, baseData: any) => any;
15
+ export default setupFormData;
@@ -0,0 +1,2 @@
1
+ declare const setupRefDataUrlForComponent: (component: any, data: any) => any;
2
+ export default setupRefDataUrlForComponent;
@@ -0,0 +1,8 @@
1
+ /**
2
+ * Apply properties to a page based on whether certain conditions are met.
3
+ * @param {object} page The page object.
4
+ * @returns A copy of the page object with any passing conditional
5
+ * properties applied.
6
+ */
7
+ declare const applyConditionalProperties: (page: any) => any;
8
+ export default applyConditionalProperties;
@@ -0,0 +1,23 @@
1
+ /**
2
+ * Gets the first options in an array of strings that passes all of it's conditions.
3
+ *
4
+ * Options is expected to be in the format:
5
+ * [
6
+ * {
7
+ * text: 'Option A',
8
+ * show_when: [ ... ]
9
+ * },
10
+ * {
11
+ * text: 'Option B',
12
+ * show_when: [ ... ]
13
+ * }
14
+ * ...
15
+ * ]
16
+ *
17
+ * @param {Array} options An array of options matching the above format.
18
+ * @param {Object} formData A formData object to use when evaluating the conditions.
19
+ * @param {String} key The key to use to find the text to use in each option, defaults to 'text'.
20
+ * @returns The first string that passes its' conditions, or null if something went wrong.
21
+ */
22
+ declare const getConditionalText: (options: any, formData: any, key?: string) => string | null;
23
+ export default getConditionalText;
@@ -0,0 +1,9 @@
1
+ /**
2
+ * Converts a page object defined in the JSON to a page object for rendering.
3
+ * @param {object} pageOptions The JSON page.
4
+ * @param {Array} formComponents The components defined at the top-level of the form.
5
+ * @param {object} formData The top-level form data, used for setting up components.
6
+ * @returns A page object for rendering.
7
+ */
8
+ declare const getFormPage: (pageOptions: any, formComponents: any, formData: any) => any;
9
+ export default getFormPage;
@@ -0,0 +1,9 @@
1
+ /**
2
+ * Converts pages objects defined in the JSON to page objects for rendering.
3
+ * @param {Array} pages The JSON pages.
4
+ * @param {Array} components The components defined at the top-level of the form.
5
+ * @param {object} formData The top-level form data, used for setting up components.
6
+ * @returns An array of page objects for rendering.
7
+ */
8
+ declare const getFormPages: (pages: any, components: any, formData: any) => any[];
9
+ export default getFormPages;
@@ -0,0 +1,13 @@
1
+ /**
2
+ * Gets an array of standardised action objects for a page.
3
+ * @param {object} page The page to get the actions for.
4
+ * @returns Standardised action objects.
5
+ * @description Standardises actions specified on a page into ones suitable for this version of the
6
+ * Form Renderer.
7
+ *
8
+ * `action.href` and `action.url` have been deprecated in favour of `action.page` but this method
9
+ * will convert both by taking the final part of the relative path:
10
+ * - `href: '/bravo'` => `page: 'bravo'`
11
+ */
12
+ declare const getPageActions: (page: any) => any;
13
+ export default getPageActions;
@@ -0,0 +1,11 @@
1
+ /**
2
+ * Converts simple text into a paragraph component.
3
+ * @param {string} content The content to render as a paragraph.
4
+ * @returns An HTML component configuration for a paragraph of the supplied tect.
5
+ */
6
+ declare const getParagraphFromText: (content: any) => {
7
+ type: string;
8
+ tagName: string;
9
+ content: any;
10
+ };
11
+ export default getParagraphFromText;
@@ -0,0 +1,10 @@
1
+ declare const FormPage: {
2
+ applyConditionalProperties: (page: any) => any;
3
+ getConditionalText: (options: any, formData: any, key?: string) => string | null;
4
+ get: (pageOptions: any, formComponents: any, formData: any) => any;
5
+ getAll: (pages: any, components: any, formData: any) => any[];
6
+ getTitle: (options: any, formData: any) => string | null;
7
+ show: (page: any, data: any) => any;
8
+ showCYA: (page: any, data: any) => any;
9
+ };
10
+ export default FormPage;
@@ -0,0 +1,8 @@
1
+ /**
2
+ * Indicates whether or not a page should be shown.
3
+ * @param {object} page The page to consider.
4
+ * @param {object} data The top-level form data.
5
+ * @returns Boolean true if the page should be shown; false if not.
6
+ */
7
+ declare const showFormPage: (page: any, data: any) => any;
8
+ export default showFormPage;
@@ -0,0 +1,8 @@
1
+ /**
2
+ * Indicates whether or not a page should be shown on the CYA screen.
3
+ * @param {object} page The page to consider.
4
+ * @param {object} data The top-level form data.
5
+ * @returns Boolean true if the page should be shown; false if not.
6
+ */
7
+ declare const showFormPageCYA: (page: any, data: any) => any;
8
+ export default showFormPageCYA;
@@ -0,0 +1,9 @@
1
+ /**
2
+ * Use an existing component from the formComponents, overriding any properties
3
+ * where appropriate.
4
+ * @param {object} toUse A configuration object that references the component to use and any overrides.
5
+ * @param {Array} formComponents An array of existing components on the form.
6
+ * @returns A component configuration object.
7
+ */
8
+ declare const useComponent: (toUse: any, formComponents: any) => any;
9
+ export default useComponent;
@@ -0,0 +1,8 @@
1
+ /**
2
+ * Formats a string according to a format configuration object.
3
+ * @param {object} format The format configuration object.
4
+ * @param {string} value The string value to be formatted.
5
+ * @returns A formatted version of the value.
6
+ */
7
+ declare const formatData: (format: any, value: any) => any;
8
+ export default formatData;
@@ -0,0 +1,15 @@
1
+ /**
2
+ * Formats the data for a given component, according to the component's format configuration.
3
+ * @param {object} component The component to format.
4
+ * @param {object} data The top-level form data.
5
+ * @param {string} eventType What type of event initiated this call.
6
+ */
7
+ declare const formatDataForComponent: (component: any, data: any, eventType: any) => void;
8
+ /**
9
+ * Formats the data for an array of components, according to each component's format configuration.
10
+ * @param {Array} components The array of components to format.
11
+ * @param {object} data The top-level form data.
12
+ * @param {string} eventType What type of event initiated this call.
13
+ */
14
+ export declare const formatDataForComponents: (components: any, data: any, eventType: any) => void;
15
+ export default formatDataForComponent;
@@ -0,0 +1,8 @@
1
+ /**
2
+ * Formats the data for all components on a form, according to each component's format configuration.
3
+ * @param {object} form The form to format the components for.
4
+ * @param {object} data The top-level form data.
5
+ * @param {string} eventType What type of event initiated this call.
6
+ */
7
+ declare const formatDataForForm: (form: any, baseData: any, eventType: any) => any;
8
+ export default formatDataForForm;
@@ -0,0 +1,15 @@
1
+ /**
2
+ * Formats the data for all components on a page, according to each component's format configuration.
3
+ * @param {object} page The page to format the components for.
4
+ * @param {object} data The top-level form data.
5
+ * @param {string} eventType What type of event initiated this call.
6
+ */
7
+ declare const formatDataForPage: (page: any, data: any, eventType: any) => void;
8
+ /**
9
+ * Formats the data for all components on a page, according to each component's format configuration.
10
+ * @param {Array} pages The pages to format the components for.
11
+ * @param {object} data The top-level form data.
12
+ * @param {string} eventType What type of event initiated this call.
13
+ */
14
+ export declare const formatDataForPages: (pages: any, data: any, eventType: any) => void;
15
+ export default formatDataForPage;
@@ -0,0 +1,7 @@
1
+ declare const Format: {
2
+ component: (component: any, data: any, eventType: any) => void;
3
+ data: (format: any, value: any) => any;
4
+ form: (form: any, baseData: any, eventType: any) => any;
5
+ page: (page: any, data: any, eventType: any) => void;
6
+ };
7
+ export default Format;
@@ -0,0 +1,15 @@
1
+ /**
2
+ * Gets a configuration object (or a string) for the hub.
3
+ *
4
+ * @param {string} type The type of the form.
5
+ * @param {object} hub The configuration direct from the JSON.
6
+ * @param {Array} components The top-level form components.
7
+ * @param {object} formData The top-level form data.
8
+ *
9
+ * @returns:
10
+ * undefined if the form type is not "hub-and-spoke", or;
11
+ * The string "CYA" if the CYA screen should be used, or;
12
+ * A page configuration object if the CYA screen should not be used and components are defined.
13
+ */
14
+ declare const getFormHub: (type: any, hub: any, components: any, formData: any) => any;
15
+ export default getFormHub;