@ukhomeoffice/cop-react-form-renderer 7.3.2 → 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.
- package/README.md +106 -32
- package/dist/components/CheckYourAnswers/Answer.d.ts +10 -0
- package/dist/components/CheckYourAnswers/CheckYourAnswers.d.ts +35 -0
- package/dist/components/CheckYourAnswers/index.d.ts +2 -0
- package/dist/components/CollectionPage/CollectionPage.d.ts +24 -0
- package/dist/components/CollectionPage/index.d.ts +1 -0
- package/dist/components/CollectionSummary/BannerStrip.d.ts +9 -0
- package/dist/components/CollectionSummary/CollectionSummary.d.ts +53 -0
- package/dist/components/CollectionSummary/Confirmation.d.ts +15 -0
- package/dist/components/CollectionSummary/RenderListView.d.ts +42 -0
- package/dist/components/CollectionSummary/SummaryCard.d.ts +62 -0
- package/dist/components/CollectionSummary/SummaryCardButtons.d.ts +21 -0
- package/dist/components/CollectionSummary/SummaryCardDetails.d.ts +14 -0
- package/dist/components/CollectionSummary/SummaryCardValidationContext.d.ts +9 -0
- package/dist/components/CollectionSummary/index.d.ts +2 -0
- package/dist/components/FormComponent/Collection.d.ts +39 -0
- package/dist/components/FormComponent/Container.d.ts +26 -0
- package/dist/components/FormComponent/FormComponent.d.ts +39 -0
- package/dist/components/FormComponent/helpers/addLabel.d.ts +7 -0
- package/dist/components/FormComponent/helpers/getComponentDisabled.d.ts +2 -0
- package/dist/components/FormComponent/helpers/getComponentError.d.ts +4 -0
- package/dist/components/FormComponent/helpers/getComponentFieldSet.d.ts +2 -0
- package/dist/components/FormComponent/helpers/index.d.ts +5 -0
- package/dist/components/FormComponent/index.d.ts +2 -0
- package/dist/components/FormPage/FormPage.d.ts +36 -0
- package/dist/components/FormPage/index.d.ts +2 -0
- package/dist/components/FormRenderer/FormRenderer.d.ts +39 -0
- package/dist/components/FormRenderer/handlers/cyaAction.d.ts +9 -0
- package/dist/components/FormRenderer/handlers/getPageId.d.ts +8 -0
- package/dist/components/FormRenderer/handlers/index.d.ts +6 -0
- package/dist/components/FormRenderer/handlers/navigate.d.ts +10 -0
- package/dist/components/FormRenderer/handlers/submissionError.d.ts +7 -0
- package/dist/components/FormRenderer/helpers/canActionProceed.d.ts +12 -0
- package/dist/components/FormRenderer/helpers/canCYASubmit.d.ts +10 -0
- package/dist/components/FormRenderer/helpers/cleanHiddenNestedData.d.ts +2 -0
- package/dist/components/FormRenderer/helpers/clearOutUncompletedRoutes.d.ts +51 -0
- package/dist/components/FormRenderer/helpers/clearOutUncompletedRoutesUtils.d.ts +179 -0
- package/dist/components/FormRenderer/helpers/getCYA.d.ts +20 -0
- package/dist/components/FormRenderer/helpers/getFormState.d.ts +25 -0
- package/dist/components/FormRenderer/helpers/getNextPageId.d.ts +2 -0
- package/dist/components/FormRenderer/helpers/getPage.d.ts +9 -0
- package/dist/components/FormRenderer/helpers/getRelevantPages.d.ts +2 -0
- package/dist/components/FormRenderer/helpers/getSubmissionStatus.d.ts +2 -0
- package/dist/components/FormRenderer/helpers/getUpdatedSectionStates.d.ts +10 -0
- package/dist/components/FormRenderer/helpers/index.d.ts +29 -0
- package/dist/components/FormRenderer/index.d.ts +2 -0
- package/dist/components/FormRenderer/onCYAAction.d.ts +6 -0
- package/dist/components/FormRenderer/onPageAction.d.ts +2 -0
- package/dist/components/FormRenderer/onTaskAction.d.ts +2 -0
- package/dist/components/PageActions/ActionButton.d.ts +7 -0
- package/dist/components/PageActions/PageActions.d.ts +7 -0
- package/dist/components/PageActions/index.d.ts +2 -0
- package/dist/components/SummaryList/GroupAction.d.ts +12 -0
- package/dist/components/SummaryList/RowAction.d.ts +12 -0
- package/dist/components/SummaryList/SummaryList.d.ts +28 -0
- package/dist/components/SummaryList/SummaryList.stories.d.ts +10 -0
- package/dist/components/SummaryList/SummaryListHeadingRow.d.ts +7 -0
- package/dist/components/SummaryList/SummaryListHeadingRowWithAction.d.ts +16 -0
- package/dist/components/SummaryList/SummaryListRow.d.ts +19 -0
- package/dist/components/SummaryList/SummaryListTitleRow.d.ts +7 -0
- package/dist/components/SummaryList/helpers/getGroupActionAttributes.d.ts +17 -0
- package/dist/components/SummaryList/helpers/getRowActionAttributes.d.ts +17 -0
- package/dist/components/SummaryList/helpers/index.d.ts +2 -0
- package/dist/components/SummaryList/index.d.ts +2 -0
- package/dist/components/TaskList/Task.d.ts +12 -0
- package/dist/components/TaskList/TaskList.d.ts +40 -0
- package/dist/components/TaskList/TaskState.d.ts +6 -0
- package/dist/components/TaskList/index.d.ts +2 -0
- package/dist/components/index.d.ts +8 -0
- package/dist/context/HooksContext/HooksContext.d.ts +23 -0
- package/dist/context/HooksContext/index.d.ts +3 -0
- package/dist/context/ValidationContext/ValidationContext.d.ts +7 -0
- package/dist/context/ValidationContext/index.d.ts +3 -0
- package/dist/context/index.d.ts +3 -0
- package/dist/hooks/index.d.ts +6 -0
- package/dist/hooks/useAxios.d.ts +2 -0
- package/dist/hooks/useGetRequest.d.ts +12 -0
- package/dist/hooks/useHooks.d.ts +2 -0
- package/dist/hooks/useRefData.d.ts +7 -0
- package/dist/hooks/useValidation.d.ts +2 -0
- package/dist/index.cjs +5 -0
- package/dist/index.css +1 -0
- package/dist/index.d.ts +6 -0
- package/dist/index.js +6124 -81
- package/dist/models/CollectionLabels.d.ts +7 -0
- package/dist/models/ComponentTypes.d.ts +27 -0
- package/dist/models/EventTypes.d.ts +6 -0
- package/dist/models/FormPages.d.ts +6 -0
- package/dist/models/FormTypes.d.ts +10 -0
- package/dist/models/HubFormats.d.ts +5 -0
- package/dist/models/PageAction.d.ts +89 -0
- package/dist/models/TaskStates.d.ts +39 -0
- package/dist/models/index.d.ts +143 -0
- package/dist/setupTests.d.ts +14 -0
- package/dist/utils/CheckYourAnswers/getCYAAction.d.ts +20 -0
- package/dist/utils/CheckYourAnswers/getCYACollectionChangeAction.d.ts +22 -0
- package/dist/utils/CheckYourAnswers/getCYACollectionDeleteAction.d.ts +22 -0
- package/dist/utils/CheckYourAnswers/getCYARow.d.ts +26 -0
- package/dist/utils/CheckYourAnswers/getCYARowForGroup.d.ts +17 -0
- package/dist/utils/CheckYourAnswers/getCYARowsForCollection.d.ts +2 -0
- package/dist/utils/CheckYourAnswers/getCYARowsForCollectionPage.d.ts +23 -0
- package/dist/utils/CheckYourAnswers/getCYARowsForContainer.d.ts +2 -0
- package/dist/utils/CheckYourAnswers/getCYARowsForPage.d.ts +11 -0
- package/dist/utils/CheckYourAnswers/getSummaryListRowForDetails.d.ts +3 -0
- package/dist/utils/CheckYourAnswers/index.d.ts +5 -0
- package/dist/utils/CheckYourAnswers/showComponentCYA.d.ts +11 -0
- package/dist/utils/CollectionPage/addCollectionPageEntry.d.ts +12 -0
- package/dist/utils/CollectionPage/duplicateCollectionPageActiveEntry.d.ts +13 -0
- package/dist/utils/CollectionPage/duplicateCollectionPageEntry.d.ts +13 -0
- package/dist/utils/CollectionPage/getCollectionPageActiveId.d.ts +14 -0
- package/dist/utils/CollectionPage/getCollectionPageActiveIndex.d.ts +15 -0
- package/dist/utils/CollectionPage/getCollectionPageData.d.ts +15 -0
- package/dist/utils/CollectionPage/getErrorsForCollection.d.ts +2 -0
- package/dist/utils/CollectionPage/getQuickEditPage.d.ts +40 -0
- package/dist/utils/CollectionPage/index.d.ts +13 -0
- package/dist/utils/CollectionPage/mergeCollectionPages.d.ts +13 -0
- package/dist/utils/CollectionPage/removeCollectionPageEntry.d.ts +11 -0
- package/dist/utils/CollectionPage/setCollectionPageData.d.ts +16 -0
- package/dist/utils/Component/addShowWhen.d.ts +13 -0
- package/dist/utils/Component/applyToComponentTree.d.ts +15 -0
- package/dist/utils/Component/cleanAttributes.d.ts +14 -0
- package/dist/utils/Component/elevateNestedComponents.d.ts +28 -0
- package/dist/utils/Component/getDefaultValue.d.ts +2 -0
- package/dist/utils/Component/getDefaultValueFromConfig.d.ts +2 -0
- package/dist/utils/Component/index.d.ts +12 -0
- package/dist/utils/Component/isEditable.d.ts +3 -0
- package/dist/utils/Component/optionIsSelected.d.ts +10 -0
- package/dist/utils/Component/setupContainerComponentsPath.d.ts +2 -0
- package/dist/utils/Component/showComponent.d.ts +2 -0
- package/dist/utils/Condition/index.d.ts +6 -0
- package/dist/utils/Condition/meetsAllConditions.d.ts +8 -0
- package/dist/utils/Condition/meetsCondition.d.ts +14 -0
- package/dist/utils/Condition/meetsOneCondition.d.ts +8 -0
- package/dist/utils/Condition/setupConditions.d.ts +2 -0
- package/dist/utils/Container/getEditableComponents.d.ts +7 -0
- package/dist/utils/Container/index.d.ts +6 -0
- package/dist/utils/Container/setupNesting.d.ts +2 -0
- package/dist/utils/Container/showContainer.d.ts +8 -0
- package/dist/utils/Data/applyFormula.d.ts +2 -0
- package/dist/utils/Data/deleteValues.d.ts +8 -0
- package/dist/utils/Data/getAutocompleteSource.d.ts +2 -0
- package/dist/utils/Data/getDataPath.d.ts +21 -0
- package/dist/utils/Data/getOptions.d.ts +2 -0
- package/dist/utils/Data/getSourceData.d.ts +17 -0
- package/dist/utils/Data/index.d.ts +15 -0
- package/dist/utils/Data/nestInRefdataOptions.d.ts +10 -0
- package/dist/utils/Data/refDataToOptions.d.ts +8 -0
- package/dist/utils/Data/setDataItem.d.ts +2 -0
- package/dist/utils/Data/setupFormData.d.ts +15 -0
- package/dist/utils/Data/setupRefDataUrlForComponent.d.ts +2 -0
- package/dist/utils/FormPage/applyConditionalProperties.d.ts +8 -0
- package/dist/utils/FormPage/getConditionalText.d.ts +23 -0
- package/dist/utils/FormPage/getFormPage.d.ts +9 -0
- package/dist/utils/FormPage/getFormPages.d.ts +9 -0
- package/dist/utils/FormPage/getPageActions.d.ts +13 -0
- package/dist/utils/FormPage/getParagraphFromText.d.ts +11 -0
- package/dist/utils/FormPage/index.d.ts +10 -0
- package/dist/utils/FormPage/showFormPage.d.ts +8 -0
- package/dist/utils/FormPage/showFormPageCYA.d.ts +8 -0
- package/dist/utils/FormPage/useComponent.d.ts +9 -0
- package/dist/utils/Format/formatData.d.ts +8 -0
- package/dist/utils/Format/formatDataForComponent.d.ts +15 -0
- package/dist/utils/Format/formatDataForForm.d.ts +8 -0
- package/dist/utils/Format/formatDataForPage.d.ts +15 -0
- package/dist/utils/Format/index.d.ts +7 -0
- package/dist/utils/Hub/getFormHub.d.ts +15 -0
- package/dist/utils/Hub/index.d.ts +4 -0
- package/dist/utils/Meta/constants.d.ts +2 -0
- package/dist/utils/Meta/documents/getDocuments.d.ts +2 -0
- package/dist/utils/Meta/documents/index.d.ts +6 -0
- package/dist/utils/Meta/documents/setDocumentsForField.d.ts +2 -0
- package/dist/utils/Meta/index.d.ts +9 -0
- package/dist/utils/Operate/checkValueIsTruthy.d.ts +9 -0
- package/dist/utils/Operate/deleteValueInFormData.d.ts +8 -0
- package/dist/utils/Operate/doesContainValue.d.ts +11 -0
- package/dist/utils/Operate/getFirstOf.d.ts +2 -0
- package/dist/utils/Operate/getIndexOfMatchingValueIn.d.ts +11 -0
- package/dist/utils/Operate/getLength.d.ts +11 -0
- package/dist/utils/Operate/index.d.ts +4 -0
- package/dist/utils/Operate/persistValueInFormData.d.ts +9 -0
- package/dist/utils/Operate/runPageOperations.d.ts +19 -0
- package/dist/utils/Operate/setValueInFormData.d.ts +2 -0
- package/dist/utils/Operate/shouldRun.d.ts +9 -0
- package/dist/utils/Validate/additional/conditionallyPermittedChange.d.ts +14 -0
- package/dist/utils/Validate/additional/conditionallyRequired.d.ts +11 -0
- package/dist/utils/Validate/additional/index.d.ts +2 -0
- package/dist/utils/Validate/additional/mustBeAfter.d.ts +14 -0
- package/dist/utils/Validate/additional/mustBeBefore.d.ts +14 -0
- package/dist/utils/Validate/additional/mustBeEarlierDateTime.d.ts +15 -0
- package/dist/utils/Validate/additional/mustBeGreaterThan.d.ts +7 -0
- package/dist/utils/Validate/additional/mustBeInTheFuture.d.ts +8 -0
- package/dist/utils/Validate/additional/mustBeInThePast.d.ts +9 -0
- package/dist/utils/Validate/additional/mustBeLessThan.d.ts +7 -0
- package/dist/utils/Validate/additional/mustBeLongerThan.d.ts +9 -0
- package/dist/utils/Validate/additional/mustBeNumbersOnly.d.ts +9 -0
- package/dist/utils/Validate/additional/mustBeOneOf.d.ts +8 -0
- package/dist/utils/Validate/additional/mustBeShorterThan.d.ts +9 -0
- package/dist/utils/Validate/additional/mustBeUniqueInCollection.d.ts +10 -0
- package/dist/utils/Validate/additional/mustEnterAtLeastOne.d.ts +9 -0
- package/dist/utils/Validate/additional/mustHaveLessThanDecimalPlaces.d.ts +7 -0
- package/dist/utils/Validate/additional/mustNotContainSql.d.ts +2 -0
- package/dist/utils/Validate/additional/mustSelectOnlyOne.d.ts +8 -0
- package/dist/utils/Validate/additional/utils.d.ts +4 -0
- package/dist/utils/Validate/index.d.ts +42 -0
- package/dist/utils/Validate/validateCollection.d.ts +9 -0
- package/dist/utils/Validate/validateComponent.d.ts +16 -0
- package/dist/utils/Validate/validateContainer.d.ts +12 -0
- package/dist/utils/Validate/validateDate.d.ts +29 -0
- package/dist/utils/Validate/validateEmail.d.ts +13 -0
- package/dist/utils/Validate/validateMultifile.d.ts +3 -0
- package/dist/utils/Validate/validateOnPageLoad.d.ts +1 -0
- package/dist/utils/Validate/validatePage.d.ts +8 -0
- package/dist/utils/Validate/validateRegex.d.ts +13 -0
- package/dist/utils/Validate/validateRequired.d.ts +9 -0
- package/dist/utils/Validate/validateTextArea.d.ts +13 -0
- package/dist/utils/Validate/validateTime.d.ts +20 -0
- package/dist/utils/canOverrideFieldRequired.d.ts +9 -0
- package/dist/utils/index.d.ts +140 -0
- package/package.json +80 -167
- package/LICENCE.md +0 -21
- package/dist/components/CheckYourAnswers/Answer.js +0 -59
- package/dist/components/CheckYourAnswers/Answer.test.js +0 -142
- package/dist/components/CheckYourAnswers/CheckYourAnswers.js +0 -252
- package/dist/components/CheckYourAnswers/CheckYourAnswers.scss +0 -43
- package/dist/components/CheckYourAnswers/CheckYourAnswers.stories.mdx +0 -409
- package/dist/components/CheckYourAnswers/CheckYourAnswers.test.js +0 -603
- package/dist/components/CheckYourAnswers/index.js +0 -10
- package/dist/components/CollectionPage/CollectionPage.js +0 -178
- package/dist/components/CollectionPage/CollectionPage.test.js +0 -507
- package/dist/components/CollectionPage/index.js +0 -10
- package/dist/components/CollectionSummary/BannerStrip.js +0 -65
- package/dist/components/CollectionSummary/BannerStrip.scss +0 -60
- package/dist/components/CollectionSummary/BannerStrip.test.js +0 -167
- package/dist/components/CollectionSummary/CollectionSummary.js +0 -362
- package/dist/components/CollectionSummary/CollectionSummary.scss +0 -26
- package/dist/components/CollectionSummary/CollectionSummary.test.js +0 -368
- package/dist/components/CollectionSummary/Confirmation.js +0 -65
- package/dist/components/CollectionSummary/Confirmation.scss +0 -26
- package/dist/components/CollectionSummary/Confirmation.test.js +0 -109
- package/dist/components/CollectionSummary/RenderListView.js +0 -162
- package/dist/components/CollectionSummary/RenderListView.scss +0 -295
- package/dist/components/CollectionSummary/RenderListView.test.js +0 -303
- package/dist/components/CollectionSummary/SummaryCard.js +0 -277
- package/dist/components/CollectionSummary/SummaryCard.scss +0 -114
- package/dist/components/CollectionSummary/SummaryCard.test.js +0 -1442
- package/dist/components/CollectionSummary/SummaryCardButtons.js +0 -76
- package/dist/components/CollectionSummary/SummaryCardButtons.test.js +0 -87
- package/dist/components/CollectionSummary/SummaryCardDetails.js +0 -206
- package/dist/components/CollectionSummary/SummaryCardDetails.scss +0 -216
- package/dist/components/CollectionSummary/SummaryCardDetails.test.js +0 -654
- package/dist/components/CollectionSummary/SummaryCardValidationContext.js +0 -79
- package/dist/components/CollectionSummary/SummaryCardValidationContext.test.js +0 -104
- package/dist/components/CollectionSummary/index.js +0 -10
- package/dist/components/FormComponent/Collection.js +0 -234
- package/dist/components/FormComponent/Collection.scss +0 -24
- package/dist/components/FormComponent/Collection.test.js +0 -934
- package/dist/components/FormComponent/Container.js +0 -130
- package/dist/components/FormComponent/Container.scss +0 -15
- package/dist/components/FormComponent/Container.test.js +0 -456
- package/dist/components/FormComponent/FormComponent.js +0 -238
- package/dist/components/FormComponent/FormComponent.stories.mdx +0 -186
- package/dist/components/FormComponent/FormComponent.test.js +0 -436
- package/dist/components/FormComponent/helpers/addLabel.js +0 -25
- package/dist/components/FormComponent/helpers/getComponentDisabled.js +0 -15
- package/dist/components/FormComponent/helpers/getComponentDisabled.test.js +0 -27
- package/dist/components/FormComponent/helpers/getComponentError.js +0 -23
- package/dist/components/FormComponent/helpers/getComponentError.test.js +0 -51
- package/dist/components/FormComponent/helpers/getComponentFieldSet.js +0 -11
- package/dist/components/FormComponent/helpers/getComponentFieldSet.test.js +0 -30
- package/dist/components/FormComponent/helpers/index.js +0 -35
- package/dist/components/FormComponent/index.js +0 -10
- package/dist/components/FormPage/FormPage.js +0 -212
- package/dist/components/FormPage/FormPage.scss +0 -7
- package/dist/components/FormPage/FormPage.stories.mdx +0 -157
- package/dist/components/FormPage/FormPage.test.js +0 -454
- package/dist/components/FormPage/index.js +0 -10
- package/dist/components/FormRenderer/FormRenderer.js +0 -426
- package/dist/components/FormRenderer/FormRenderer.scss +0 -5
- package/dist/components/FormRenderer/FormRenderer.stories.mdx +0 -178
- package/dist/components/FormRenderer/FormRenderer.test.js +0 -799
- package/dist/components/FormRenderer/clear-uncompleted-routes/test-data/forms/cop-reassign-task-to-rcc.json +0 -446
- package/dist/components/FormRenderer/clear-uncompleted-routes/test-data/forms/form-chained-component-show-whens-containerised.json +0 -120
- package/dist/components/FormRenderer/clear-uncompleted-routes/test-data/forms/form-chained-component-show-whens-dependent-component-nested-block.json +0 -113
- package/dist/components/FormRenderer/clear-uncompleted-routes/test-data/forms/form-chained-component-show-whens-dependent-component-nested.json +0 -106
- package/dist/components/FormRenderer/clear-uncompleted-routes/test-data/forms/form-chained-component-show-whens-refdata.json +0 -106
- package/dist/components/FormRenderer/clear-uncompleted-routes/test-data/forms/form-chained-component-show-whens-target-component-nested.json +0 -99
- package/dist/components/FormRenderer/clear-uncompleted-routes/test-data/forms/form-chained-component-show-whens.json +0 -106
- package/dist/components/FormRenderer/clear-uncompleted-routes/test-data/forms/form-chained-show-whens-page-hidden.json +0 -113
- package/dist/components/FormRenderer/clear-uncompleted-routes/test-data/forms/form-cop-airpax.json +0 -26408
- package/dist/components/FormRenderer/clear-uncompleted-routes/test-data/forms/form-cop-mandec.json +0 -9405
- package/dist/components/FormRenderer/clear-uncompleted-routes/test-data/forms/form-hidden-collection-component-dependent-on-external-data.json +0 -158
- package/dist/components/FormRenderer/clear-uncompleted-routes/test-data/forms/form-hidden-collection-component.json +0 -86
- package/dist/components/FormRenderer/clear-uncompleted-routes/test-data/forms/form-hidden-component-referring-to-collection.json +0 -173
- package/dist/components/FormRenderer/clear-uncompleted-routes/test-data/forms/form-hidden-component-referring-to-hidden-collection.json +0 -202
- package/dist/components/FormRenderer/clear-uncompleted-routes/test-data/forms/form-hidden-component-show-when-in-component-and-page.json +0 -63
- package/dist/components/FormRenderer/clear-uncompleted-routes/test-data/forms/form-hidden-component-with-nested-questions-visible-elsewhere.json +0 -118
- package/dist/components/FormRenderer/clear-uncompleted-routes/test-data/forms/form-hidden-component-with-nested-questions.json +0 -112
- package/dist/components/FormRenderer/clear-uncompleted-routes/test-data/forms/form-hidden-component.json +0 -58
- package/dist/components/FormRenderer/clear-uncompleted-routes/test-data/forms/form-hidden-containerised-component.json +0 -97
- package/dist/components/FormRenderer/clear-uncompleted-routes/test-data/forms/form-hidden-embedded-collection-component.json +0 -83
- package/dist/components/FormRenderer/clear-uncompleted-routes/test-data/forms/form-hidden-embedded-component.json +0 -55
- package/dist/components/FormRenderer/clear-uncompleted-routes/test-data/forms/form-hidden-entire-collection.json +0 -114
- package/dist/components/FormRenderer/clear-uncompleted-routes/test-data/forms/form-hidden-multilevel-containerised-component-leaf-hidden.json +0 -106
- package/dist/components/FormRenderer/clear-uncompleted-routes/test-data/forms/form-hidden-multilevel-containerised-component.json +0 -106
- package/dist/components/FormRenderer/clear-uncompleted-routes/test-data/forms/form-hidden-options.json +0 -99
- package/dist/components/FormRenderer/clear-uncompleted-routes/test-data/forms/form-hidden-page-collection.json +0 -128
- package/dist/components/FormRenderer/clear-uncompleted-routes/test-data/forms/form-hidden-page-component-used-elsewhere.json +0 -109
- package/dist/components/FormRenderer/clear-uncompleted-routes/test-data/forms/form-hidden-page-same-component-reused.json +0 -62
- package/dist/components/FormRenderer/clear-uncompleted-routes/test-data/forms/form-hidden-page.json +0 -96
- package/dist/components/FormRenderer/clear-uncompleted-routes/test-data/forms/form-nested-answers-hidden-by-option-visible-elsewhere.json +0 -113
- package/dist/components/FormRenderer/clear-uncompleted-routes/test-data/forms/form-nested-answers-hidden-by-option.json +0 -112
- package/dist/components/FormRenderer/clear-uncompleted-routes/test-data/forms/form-page-nested-component.json +0 -26003
- package/dist/components/FormRenderer/clear-uncompleted-routes/test-data/forms/form-page-nested-radio-component.json +0 -201
- package/dist/components/FormRenderer/clear-uncompleted-routes/test-data/forms/form-page-same-component-reused-one-shown.json +0 -75
- package/dist/components/FormRenderer/clear-uncompleted-routes/test-data/forms/form-variance-breach.json +0 -4272
- package/dist/components/FormRenderer/clear-uncompleted-routes/test-data/input/cop-airpax-carrier.json +0 -407
- package/dist/components/FormRenderer/clear-uncompleted-routes/test-data/input/cop-airpax-change-what-happened-before.json +0 -300
- package/dist/components/FormRenderer/clear-uncompleted-routes/test-data/input/cop-airpax-remove-photos-before.json +0 -384
- package/dist/components/FormRenderer/clear-uncompleted-routes/test-data/input/cop-mandec-remove-business-interests-before.json +0 -140
- package/dist/components/FormRenderer/clear-uncompleted-routes/test-data/input/cop-mandec-remove-criminality-before.json +0 -186
- package/dist/components/FormRenderer/clear-uncompleted-routes/test-data/input/cop-mandec-remove-unspent-convictions-before.json +0 -143
- package/dist/components/FormRenderer/clear-uncompleted-routes/test-data/input/cop-variance-breach-with-upload-files.json +0 -1264
- package/dist/components/FormRenderer/clear-uncompleted-routes/test-data/input/data-chained-component-show-whens-containerised.json +0 -11
- package/dist/components/FormRenderer/clear-uncompleted-routes/test-data/input/data-chained-component-show-whens-dependent-component-nested-block.json +0 -10
- package/dist/components/FormRenderer/clear-uncompleted-routes/test-data/input/data-chained-component-show-whens-dependent-component-nested.json +0 -9
- package/dist/components/FormRenderer/clear-uncompleted-routes/test-data/input/data-chained-component-show-whens-refdata.json +0 -11
- package/dist/components/FormRenderer/clear-uncompleted-routes/test-data/input/data-chained-component-show-whens-target-component-nested.json +0 -9
- package/dist/components/FormRenderer/clear-uncompleted-routes/test-data/input/data-chained-component-show-whens.json +0 -9
- package/dist/components/FormRenderer/clear-uncompleted-routes/test-data/input/data-chained-show-whens-page-hidden.json +0 -9
- package/dist/components/FormRenderer/clear-uncompleted-routes/test-data/input/data-hidden-collection-component-dependent-on-external-data.json +0 -26
- package/dist/components/FormRenderer/clear-uncompleted-routes/test-data/input/data-hidden-collection-component.json +0 -15
- package/dist/components/FormRenderer/clear-uncompleted-routes/test-data/input/data-hidden-component-referring-to-collection.json +0 -25
- package/dist/components/FormRenderer/clear-uncompleted-routes/test-data/input/data-hidden-component-referring-to-hidden-collection.json +0 -26
- package/dist/components/FormRenderer/clear-uncompleted-routes/test-data/input/data-hidden-component-show-when-in-component-and-page.json +0 -6
- package/dist/components/FormRenderer/clear-uncompleted-routes/test-data/input/data-hidden-component-with-nested-questions-visible-elsewhere.json +0 -12
- package/dist/components/FormRenderer/clear-uncompleted-routes/test-data/input/data-hidden-component-with-nested-questions.json +0 -12
- package/dist/components/FormRenderer/clear-uncompleted-routes/test-data/input/data-hidden-component.json +0 -5
- package/dist/components/FormRenderer/clear-uncompleted-routes/test-data/input/data-hidden-containerised-component.json +0 -11
- package/dist/components/FormRenderer/clear-uncompleted-routes/test-data/input/data-hidden-embedded-collection-component.json +0 -15
- package/dist/components/FormRenderer/clear-uncompleted-routes/test-data/input/data-hidden-embedded-component.json +0 -5
- package/dist/components/FormRenderer/clear-uncompleted-routes/test-data/input/data-hidden-entire-collection.json +0 -20
- package/dist/components/FormRenderer/clear-uncompleted-routes/test-data/input/data-hidden-multilevel-containerised-component-leaf-hidden.json +0 -14
- package/dist/components/FormRenderer/clear-uncompleted-routes/test-data/input/data-hidden-multilevel-containerised-component.json +0 -14
- package/dist/components/FormRenderer/clear-uncompleted-routes/test-data/input/data-hidden-options.json +0 -10
- package/dist/components/FormRenderer/clear-uncompleted-routes/test-data/input/data-hidden-page-collection.json +0 -18
- package/dist/components/FormRenderer/clear-uncompleted-routes/test-data/input/data-hidden-page-component-used-elsewhere.json +0 -9
- package/dist/components/FormRenderer/clear-uncompleted-routes/test-data/input/data-hidden-page-same-component-reused.json +0 -6
- package/dist/components/FormRenderer/clear-uncompleted-routes/test-data/input/data-hidden-page.json +0 -9
- package/dist/components/FormRenderer/clear-uncompleted-routes/test-data/input/data-nested-answers-hidden-by-option-visible-elsewhere.json +0 -12
- package/dist/components/FormRenderer/clear-uncompleted-routes/test-data/input/data-nested-answers-hidden-by-option.json +0 -12
- package/dist/components/FormRenderer/clear-uncompleted-routes/test-data/input/data-page-nested-component.json +0 -63
- package/dist/components/FormRenderer/clear-uncompleted-routes/test-data/input/data-page-nested-radio-component.json +0 -45
- package/dist/components/FormRenderer/clear-uncompleted-routes/test-data/input/data-page-same-component-reused-one-shown.json +0 -8
- package/dist/components/FormRenderer/clear-uncompleted-routes/test-data/input/reassign-to-rcc.json +0 -72
- package/dist/components/FormRenderer/clear-uncompleted-routes/test-data/output/cop-airpax-change-what-happened-after.json +0 -280
- package/dist/components/FormRenderer/clear-uncompleted-routes/test-data/output/cop-airpax-remove-photos-after.json +0 -355
- package/dist/components/FormRenderer/clear-uncompleted-routes/test-data/output/cop-mandec-base-file.json +0 -80
- package/dist/components/FormRenderer/clear-uncompleted-routes/test-data/output/cop-mandec-remove-business-interests-after.json +0 -122
- package/dist/components/FormRenderer/clear-uncompleted-routes/test-data/output/cop-mandec-remove-criminality-after.json +0 -86
- package/dist/components/FormRenderer/clear-uncompleted-routes/test-data/output/cop-mandec-remove-unspent-convictions-after.json +0 -127
- package/dist/components/FormRenderer/clear-uncompleted-routes/test-data/output/data-chained-component-show-whens-containerised-removed.json +0 -11
- package/dist/components/FormRenderer/clear-uncompleted-routes/test-data/output/data-chained-component-show-whens-dependent-component-nested-block-removed.json +0 -7
- package/dist/components/FormRenderer/clear-uncompleted-routes/test-data/output/data-chained-component-show-whens-dependent-component-nested-removed.json +0 -7
- package/dist/components/FormRenderer/clear-uncompleted-routes/test-data/output/data-chained-component-show-whens-refdata-removed.json +0 -7
- package/dist/components/FormRenderer/clear-uncompleted-routes/test-data/output/data-chained-component-show-whens-removed.json +0 -7
- package/dist/components/FormRenderer/clear-uncompleted-routes/test-data/output/data-chained-component-show-whens-target-component-nested-removed.json +0 -6
- package/dist/components/FormRenderer/clear-uncompleted-routes/test-data/output/data-chained-show-whens-page-hidden-removed.json +0 -6
- package/dist/components/FormRenderer/clear-uncompleted-routes/test-data/output/data-hidden-collection-component-dependent-on-external-data-removed.json +0 -23
- package/dist/components/FormRenderer/clear-uncompleted-routes/test-data/output/data-hidden-collection-component-removed.json +0 -4
- package/dist/components/FormRenderer/clear-uncompleted-routes/test-data/output/data-hidden-component-referring-to-collection-removed.json +0 -21
- package/dist/components/FormRenderer/clear-uncompleted-routes/test-data/output/data-hidden-component-referring-to-hidden-collection-removed.json +0 -6
- package/dist/components/FormRenderer/clear-uncompleted-routes/test-data/output/data-hidden-component-removed.json +0 -4
- package/dist/components/FormRenderer/clear-uncompleted-routes/test-data/output/data-hidden-component-show-when-in-component-and-page-removed.json +0 -5
- package/dist/components/FormRenderer/clear-uncompleted-routes/test-data/output/data-hidden-component-with-nested-questions-removed.json +0 -10
- package/dist/components/FormRenderer/clear-uncompleted-routes/test-data/output/data-hidden-component-with-nested-questions-visible-elsewhere-removed.json +0 -11
- package/dist/components/FormRenderer/clear-uncompleted-routes/test-data/output/data-hidden-containerised-component-removed.json +0 -10
- package/dist/components/FormRenderer/clear-uncompleted-routes/test-data/output/data-hidden-embedded-collection-component-removed.json +0 -4
- package/dist/components/FormRenderer/clear-uncompleted-routes/test-data/output/data-hidden-embedded-component-removed.json +0 -4
- package/dist/components/FormRenderer/clear-uncompleted-routes/test-data/output/data-hidden-entire-collection-removed.json +0 -3
- package/dist/components/FormRenderer/clear-uncompleted-routes/test-data/output/data-hidden-multilevel-containerised-component-leaf-hidden-removed.json +0 -13
- package/dist/components/FormRenderer/clear-uncompleted-routes/test-data/output/data-hidden-multilevel-containerised-component-removed.json +0 -10
- package/dist/components/FormRenderer/clear-uncompleted-routes/test-data/output/data-hidden-options-removed.json +0 -8
- package/dist/components/FormRenderer/clear-uncompleted-routes/test-data/output/data-hidden-page-collection-removed.json +0 -15
- package/dist/components/FormRenderer/clear-uncompleted-routes/test-data/output/data-hidden-page-component-used-elsewhere-removed.json +0 -5
- package/dist/components/FormRenderer/clear-uncompleted-routes/test-data/output/data-hidden-page-removed.json +0 -4
- package/dist/components/FormRenderer/clear-uncompleted-routes/test-data/output/data-hidden-page-same-component-reused-removed.json +0 -5
- package/dist/components/FormRenderer/clear-uncompleted-routes/test-data/output/data-nested-answers-hidden-by-option-removed.json +0 -11
- package/dist/components/FormRenderer/clear-uncompleted-routes/test-data/output/data-nested-answers-hidden-by-option-visible-elsewhere-removed.json +0 -12
- package/dist/components/FormRenderer/clear-uncompleted-routes/test-data/output/data-page-nested-component.json +0 -63
- package/dist/components/FormRenderer/clear-uncompleted-routes/test-data/output/data-page-nested-radio-component-removed.json +0 -45
- package/dist/components/FormRenderer/clear-uncompleted-routes/test-data/output/data-page-same-component-reused-one-shown-removed.json +0 -7
- package/dist/components/FormRenderer/handlers/cyaAction.js +0 -23
- package/dist/components/FormRenderer/handlers/getPageId.js +0 -15
- package/dist/components/FormRenderer/handlers/getPageId.test.js +0 -35
- package/dist/components/FormRenderer/handlers/handlers.test.js +0 -81
- package/dist/components/FormRenderer/handlers/index.js +0 -17
- package/dist/components/FormRenderer/handlers/navigate.js +0 -25
- package/dist/components/FormRenderer/handlers/submissionError.js +0 -18
- package/dist/components/FormRenderer/helpers/canActionProceed.js +0 -27
- package/dist/components/FormRenderer/helpers/canActionProceed.test.js +0 -84
- package/dist/components/FormRenderer/helpers/canCYASubmit.js +0 -17
- package/dist/components/FormRenderer/helpers/canCYASubmit.test.js +0 -75
- package/dist/components/FormRenderer/helpers/cleanHiddenNestedData.js +0 -63
- package/dist/components/FormRenderer/helpers/cleanHiddenNestedData.test.js +0 -191
- package/dist/components/FormRenderer/helpers/clearOutUncompletedRoutes.js +0 -338
- package/dist/components/FormRenderer/helpers/clearOutUncompletedRoutes.test.js +0 -434
- package/dist/components/FormRenderer/helpers/clearOutUncompletedRoutesUtils.js +0 -399
- package/dist/components/FormRenderer/helpers/clearOutUncompletedRoutesUtils.test.js +0 -559
- package/dist/components/FormRenderer/helpers/getCYA.js +0 -42
- package/dist/components/FormRenderer/helpers/getCYA.test.js +0 -46
- package/dist/components/FormRenderer/helpers/getFormState.js +0 -25
- package/dist/components/FormRenderer/helpers/getFormState.test.js +0 -60
- package/dist/components/FormRenderer/helpers/getNextPageId.js +0 -76
- package/dist/components/FormRenderer/helpers/getNextPageId.test.js +0 -292
- package/dist/components/FormRenderer/helpers/getPage.js +0 -27
- package/dist/components/FormRenderer/helpers/getPage.test.js +0 -45
- package/dist/components/FormRenderer/helpers/getRelevantPages.js +0 -27
- package/dist/components/FormRenderer/helpers/getRelevantPages.test.js +0 -70
- package/dist/components/FormRenderer/helpers/getSubmissionStatus.js +0 -65
- package/dist/components/FormRenderer/helpers/getSubmissionStatus.test.js +0 -309
- package/dist/components/FormRenderer/helpers/getUpdatedSectionStates.js +0 -201
- package/dist/components/FormRenderer/helpers/getUpdatedSectionStates.test.js +0 -473
- package/dist/components/FormRenderer/helpers/index.js +0 -33
- package/dist/components/FormRenderer/index.js +0 -10
- package/dist/components/FormRenderer/onCYAAction.js +0 -150
- package/dist/components/FormRenderer/onCYAAction.test.js +0 -741
- package/dist/components/FormRenderer/onPageAction.js +0 -227
- package/dist/components/FormRenderer/onPageAction.test.js +0 -960
- package/dist/components/FormRenderer/onTaskAction.js +0 -47
- package/dist/components/FormRenderer/onTaskAction.test.js +0 -247
- package/dist/components/PageActions/ActionButton.js +0 -48
- package/dist/components/PageActions/ActionButton.test.js +0 -73
- package/dist/components/PageActions/PageActions.js +0 -37
- package/dist/components/PageActions/PageActions.stories.mdx +0 -74
- package/dist/components/PageActions/PageActions.test.js +0 -106
- package/dist/components/PageActions/index.js +0 -10
- package/dist/components/SummaryList/GroupAction.js +0 -50
- package/dist/components/SummaryList/GroupAction.test.js +0 -86
- package/dist/components/SummaryList/RowAction.js +0 -48
- package/dist/components/SummaryList/RowAction.test.js +0 -86
- package/dist/components/SummaryList/SummaryList.js +0 -128
- package/dist/components/SummaryList/SummaryList.scss +0 -79
- package/dist/components/SummaryList/SummaryList.stories.mdx +0 -84
- package/dist/components/SummaryList/SummaryList.test.js +0 -504
- package/dist/components/SummaryList/SummaryListHeadingRow.js +0 -39
- package/dist/components/SummaryList/SummaryListHeadingRowWithAction.js +0 -65
- package/dist/components/SummaryList/SummaryListHeadingRowWithAction.scss +0 -38
- package/dist/components/SummaryList/SummaryListRow.js +0 -58
- package/dist/components/SummaryList/SummaryListTitleRow.js +0 -32
- package/dist/components/SummaryList/helpers/getGroupActionAttributes.js +0 -29
- package/dist/components/SummaryList/helpers/getGroupActionAttributes.test.js +0 -72
- package/dist/components/SummaryList/helpers/getRowActionAttributes.js +0 -29
- package/dist/components/SummaryList/helpers/getRowActionAttributes.test.js +0 -72
- package/dist/components/SummaryList/helpers/index.js +0 -14
- package/dist/components/SummaryList/index.js +0 -10
- package/dist/components/TaskList/Task.js +0 -62
- package/dist/components/TaskList/Task.test.js +0 -176
- package/dist/components/TaskList/TaskList.js +0 -175
- package/dist/components/TaskList/TaskList.scss +0 -123
- package/dist/components/TaskList/TaskList.stories.mdx +0 -164
- package/dist/components/TaskList/TaskList.test.js +0 -535
- package/dist/components/TaskList/TaskState.js +0 -37
- package/dist/components/TaskList/TaskState.test.js +0 -95
- package/dist/components/TaskList/index.js +0 -10
- package/dist/components/index.js +0 -56
- package/dist/context/HooksContext/HooksContext.js +0 -122
- package/dist/context/HooksContext/HooksContext.test.js +0 -45
- package/dist/context/HooksContext/index.js +0 -16
- package/dist/context/ValidationContext/ValidationContext.js +0 -98
- package/dist/context/ValidationContext/ValidationContext.test.js +0 -107
- package/dist/context/ValidationContext/index.js +0 -16
- package/dist/context/index.js +0 -21
- package/dist/hooks/index.js +0 -55
- package/dist/hooks/useAxios.js +0 -36
- package/dist/hooks/useGetRequest.js +0 -89
- package/dist/hooks/useHooks.js +0 -15
- package/dist/hooks/useRefData.js +0 -62
- package/dist/hooks/useValidation.js +0 -15
- package/dist/json/actions.json +0 -17
- package/dist/json/actionsNoSave.json +0 -17
- package/dist/json/addressDetails.json +0 -149
- package/dist/json/areYouACivilServant.json +0 -7
- package/dist/json/firstForm.json +0 -94
- package/dist/json/grade.json +0 -108
- package/dist/json/group.data.json +0 -21
- package/dist/json/group.json +0 -402
- package/dist/json/groupOfRow.json +0 -137
- package/dist/json/groupOfRowData.json +0 -15
- package/dist/json/port.json +0 -346
- package/dist/json/saveAndContinue.json +0 -98
- package/dist/json/sublocation.json +0 -859
- package/dist/json/taskList.json +0 -265
- package/dist/json/team.json +0 -17351
- package/dist/json/terminal.json +0 -81
- package/dist/json/userProfile.data.json +0 -21
- package/dist/json/userProfile.json +0 -276
- package/dist/models/CollectionLabels.js +0 -15
- package/dist/models/ComponentTypes.js +0 -58
- package/dist/models/EventTypes.js +0 -16
- package/dist/models/FormPages.js +0 -16
- package/dist/models/FormTypes.js +0 -24
- package/dist/models/HubFormats.js +0 -14
- package/dist/models/PageAction.js +0 -65
- package/dist/models/TaskStates.js +0 -46
- package/dist/models/index.js +0 -77
- package/dist/setupTests.js +0 -54
- package/dist/utils/CheckYourAnswers/getCYAAction.js +0 -44
- package/dist/utils/CheckYourAnswers/getCYAAction.test.js +0 -120
- package/dist/utils/CheckYourAnswers/getCYACollectionChangeAction.js +0 -57
- package/dist/utils/CheckYourAnswers/getCYACollectionChangeAction.test.js +0 -162
- package/dist/utils/CheckYourAnswers/getCYACollectionDeleteAction.js +0 -66
- package/dist/utils/CheckYourAnswers/getCYACollectionDeleteAction.test.js +0 -198
- package/dist/utils/CheckYourAnswers/getCYARow.js +0 -58
- package/dist/utils/CheckYourAnswers/getCYARow.test.js +0 -373
- package/dist/utils/CheckYourAnswers/getCYARowForGroup.js +0 -69
- package/dist/utils/CheckYourAnswers/getCYARowForGroup.test.js +0 -70
- package/dist/utils/CheckYourAnswers/getCYARowsForCollection.js +0 -71
- package/dist/utils/CheckYourAnswers/getCYARowsForCollection.test.js +0 -285
- package/dist/utils/CheckYourAnswers/getCYARowsForCollectionPage.js +0 -237
- package/dist/utils/CheckYourAnswers/getCYARowsForCollectionPage.test.js +0 -844
- package/dist/utils/CheckYourAnswers/getCYARowsForContainer.js +0 -45
- package/dist/utils/CheckYourAnswers/getCYARowsForContainer.test.js +0 -535
- package/dist/utils/CheckYourAnswers/getCYARowsForPage.js +0 -72
- package/dist/utils/CheckYourAnswers/getCYARowsForPage.test.js +0 -343
- package/dist/utils/CheckYourAnswers/getSummaryListRowForDetails.js +0 -42
- package/dist/utils/CheckYourAnswers/getSummaryListRowForDetails.test.js +0 -56
- package/dist/utils/CheckYourAnswers/index.js +0 -15
- package/dist/utils/CheckYourAnswers/showComponentCYA.js +0 -53
- package/dist/utils/CheckYourAnswers/showComponentCYA.test.js +0 -149
- package/dist/utils/CollectionPage/addCollectionPageEntry.js +0 -23
- package/dist/utils/CollectionPage/addCollectionPageEntry.test.js +0 -17
- package/dist/utils/CollectionPage/duplicateCollectionPageActiveEntry.js +0 -26
- package/dist/utils/CollectionPage/duplicateCollectionPageActiveEntry.test.js +0 -70
- package/dist/utils/CollectionPage/duplicateCollectionPageEntry.js +0 -51
- package/dist/utils/CollectionPage/duplicateCollectionPageEntry.test.js +0 -125
- package/dist/utils/CollectionPage/getCollectionPageActiveId.js +0 -24
- package/dist/utils/CollectionPage/getCollectionPageActiveId.test.js +0 -26
- package/dist/utils/CollectionPage/getCollectionPageActiveIndex.js +0 -44
- package/dist/utils/CollectionPage/getCollectionPageActiveIndex.test.js +0 -88
- package/dist/utils/CollectionPage/getCollectionPageData.js +0 -53
- package/dist/utils/CollectionPage/getCollectionPageData.test.js +0 -103
- package/dist/utils/CollectionPage/getErrorsForCollection.js +0 -55
- package/dist/utils/CollectionPage/getErrorsForCollection.test.js +0 -154
- package/dist/utils/CollectionPage/getQuickEditPage.js +0 -122
- package/dist/utils/CollectionPage/getQuickEditPage.test.js +0 -143
- package/dist/utils/CollectionPage/index.js +0 -33
- package/dist/utils/CollectionPage/mergeCollectionPages.js +0 -128
- package/dist/utils/CollectionPage/mergeCollectionPages.test.js +0 -198
- package/dist/utils/CollectionPage/removeCollectionPageEntry.js +0 -36
- package/dist/utils/CollectionPage/removeCollectionPageEntry.test.js +0 -62
- package/dist/utils/CollectionPage/setCollectionPageData.js +0 -60
- package/dist/utils/CollectionPage/setCollectionPageData.test.js +0 -182
- package/dist/utils/Component/addShowWhen.js +0 -43
- package/dist/utils/Component/addShowWhen.test.js +0 -217
- package/dist/utils/Component/applyToComponentTree.js +0 -68
- package/dist/utils/Component/applyToComponentTree.test.js +0 -125
- package/dist/utils/Component/cleanAttributes.js +0 -42
- package/dist/utils/Component/cleanAttributes.test.js +0 -67
- package/dist/utils/Component/elevateNestedComponents.js +0 -58
- package/dist/utils/Component/elevateNestedComponents.test.js +0 -305
- package/dist/utils/Component/getComponent.js +0 -305
- package/dist/utils/Component/getComponentTests/getComponent.autocomplete.test.js +0 -73
- package/dist/utils/Component/getComponentTests/getComponent.calculation.test.js +0 -251
- package/dist/utils/Component/getComponentTests/getComponent.checkboxes.test.js +0 -156
- package/dist/utils/Component/getComponentTests/getComponent.date.test.js +0 -104
- package/dist/utils/Component/getComponentTests/getComponent.details.test.js +0 -56
- package/dist/utils/Component/getComponentTests/getComponent.email.test.js +0 -60
- package/dist/utils/Component/getComponentTests/getComponent.file.test.js +0 -60
- package/dist/utils/Component/getComponentTests/getComponent.heading.test.js +0 -31
- package/dist/utils/Component/getComponentTests/getComponent.html.test.js +0 -42
- package/dist/utils/Component/getComponentTests/getComponent.insetText.test.js +0 -29
- package/dist/utils/Component/getComponentTests/getComponent.list.test.js +0 -47
- package/dist/utils/Component/getComponentTests/getComponent.multifile.test.js +0 -66
- package/dist/utils/Component/getComponentTests/getComponent.nested.test.js +0 -211
- package/dist/utils/Component/getComponentTests/getComponent.paragraph.test.js +0 -46
- package/dist/utils/Component/getComponentTests/getComponent.phoneNumber.test.js +0 -60
- package/dist/utils/Component/getComponentTests/getComponent.radios.test.js +0 -221
- package/dist/utils/Component/getComponentTests/getComponent.select.test.js +0 -62
- package/dist/utils/Component/getComponentTests/getComponent.text.test.js +0 -60
- package/dist/utils/Component/getComponentTests/getComponent.textArea.test.js +0 -104
- package/dist/utils/Component/getComponentTests/getComponent.time.test.js +0 -80
- package/dist/utils/Component/getComponentTests/getComponent.unknown.test.js +0 -14
- package/dist/utils/Component/getComponentTests/getComponent.warningText.test.js +0 -29
- package/dist/utils/Component/getDefaultValue.js +0 -22
- package/dist/utils/Component/getDefaultValue.test.js +0 -62
- package/dist/utils/Component/getDefaultValueFromConfig.js +0 -106
- package/dist/utils/Component/getDefaultValueFromConfig.test.js +0 -141
- package/dist/utils/Component/index.js +0 -29
- package/dist/utils/Component/isEditable.js +0 -13
- package/dist/utils/Component/isEditable.test.js +0 -42
- package/dist/utils/Component/optionIsSelected.js +0 -25
- package/dist/utils/Component/optionIsSelected.test.js +0 -69
- package/dist/utils/Component/setupContainerComponentsPath.js +0 -35
- package/dist/utils/Component/setupContainerComponentsPath.test.js +0 -79
- package/dist/utils/Component/showComponent.js +0 -25
- package/dist/utils/Component/showComponent.test.js +0 -157
- package/dist/utils/Component/wrapInFormGroup.js +0 -26
- package/dist/utils/Condition/index.js +0 -17
- package/dist/utils/Condition/meetsAllConditions.js +0 -44
- package/dist/utils/Condition/meetsAllConditions.test.js +0 -109
- package/dist/utils/Condition/meetsCondition.js +0 -165
- package/dist/utils/Condition/meetsCondition.test.js +0 -899
- package/dist/utils/Condition/meetsOneCondition.js +0 -32
- package/dist/utils/Condition/meetsOneCondition.test.js +0 -101
- package/dist/utils/Condition/setupConditions.js +0 -36
- package/dist/utils/Condition/setupConditions.test.js +0 -34
- package/dist/utils/Container/getEditableComponents.js +0 -29
- package/dist/utils/Container/getEditableComponents.test.js +0 -134
- package/dist/utils/Container/index.js +0 -17
- package/dist/utils/Container/setupNesting.js +0 -53
- package/dist/utils/Container/setupNesting.test.js +0 -143
- package/dist/utils/Container/showContainer.js +0 -52
- package/dist/utils/Container/showContainer.test.js +0 -179
- package/dist/utils/Data/applyFormula.js +0 -90
- package/dist/utils/Data/applyFormula.test.js +0 -264
- package/dist/utils/Data/deleteValues.js +0 -19
- package/dist/utils/Data/deleteValues.test.js +0 -58
- package/dist/utils/Data/getAutocompleteSource.js +0 -87
- package/dist/utils/Data/getAutocompleteSource.test.js +0 -335
- package/dist/utils/Data/getDataPath.js +0 -66
- package/dist/utils/Data/getDataPath.test.js +0 -49
- package/dist/utils/Data/getOptions.js +0 -86
- package/dist/utils/Data/getOptions.test.js +0 -279
- package/dist/utils/Data/getSourceData.js +0 -44
- package/dist/utils/Data/getSourceData.test.js +0 -158
- package/dist/utils/Data/index.js +0 -35
- package/dist/utils/Data/nestInRefdataOptions.js +0 -47
- package/dist/utils/Data/nestInRefdataOptions.test.js +0 -237
- package/dist/utils/Data/refDataToOptions.js +0 -44
- package/dist/utils/Data/refDataToOptions.test.js +0 -197
- package/dist/utils/Data/setDataItem.js +0 -26
- package/dist/utils/Data/setDataItem.test.js +0 -136
- package/dist/utils/Data/setupFormData.js +0 -49
- package/dist/utils/Data/setupFormData.test.js +0 -215
- package/dist/utils/Data/setupRefDataUrlForComponent.js +0 -44
- package/dist/utils/Data/setupRefDataUrlForComponent.test.js +0 -150
- package/dist/utils/FormPage/applyConditionalProperties.js +0 -34
- package/dist/utils/FormPage/applyConditionalProperties.test.js +0 -61
- package/dist/utils/FormPage/getConditionalText.js +0 -55
- package/dist/utils/FormPage/getConditionalText.test.js +0 -163
- package/dist/utils/FormPage/getFormPage.js +0 -54
- package/dist/utils/FormPage/getFormPage.test.js +0 -206
- package/dist/utils/FormPage/getFormPages.js +0 -30
- package/dist/utils/FormPage/getFormPages.test.js +0 -97
- package/dist/utils/FormPage/getPageActions.js +0 -58
- package/dist/utils/FormPage/getPageActions.test.js +0 -115
- package/dist/utils/FormPage/getParagraphFromText.js +0 -21
- package/dist/utils/FormPage/getParagraphFromText.test.js +0 -28
- package/dist/utils/FormPage/index.js +0 -24
- package/dist/utils/FormPage/showFormPage.js +0 -52
- package/dist/utils/FormPage/showFormPage.test.js +0 -181
- package/dist/utils/FormPage/showFormPageCYA.js +0 -23
- package/dist/utils/FormPage/showFormPageCYA.test.js +0 -29
- package/dist/utils/FormPage/useComponent.js +0 -83
- package/dist/utils/FormPage/useComponent.test.js +0 -216
- package/dist/utils/Format/formatData.js +0 -27
- package/dist/utils/Format/formatData.test.js +0 -46
- package/dist/utils/Format/formatDataForComponent.js +0 -35
- package/dist/utils/Format/formatDataForComponent.test.js +0 -114
- package/dist/utils/Format/formatDataForForm.js +0 -27
- package/dist/utils/Format/formatDataForForm.test.js +0 -79
- package/dist/utils/Format/formatDataForPage.js +0 -31
- package/dist/utils/Format/formatDataForPage.test.js +0 -94
- package/dist/utils/Format/index.js +0 -21
- package/dist/utils/Hub/getFormHub.js +0 -40
- package/dist/utils/Hub/getFormHub.test.js +0 -105
- package/dist/utils/Hub/index.js +0 -15
- package/dist/utils/Meta/constants.js +0 -9
- package/dist/utils/Meta/documents/getDocuments.js +0 -15
- package/dist/utils/Meta/documents/getDocuments.test.js +0 -46
- package/dist/utils/Meta/documents/index.js +0 -19
- package/dist/utils/Meta/documents/setDocumentsForField.js +0 -30
- package/dist/utils/Meta/documents/setDocumentsForField.test.js +0 -97
- package/dist/utils/Meta/index.js +0 -17
- package/dist/utils/Operate/checkValueIsTruthy.js +0 -29
- package/dist/utils/Operate/checkValueIsTruthy.test.js +0 -43
- package/dist/utils/Operate/deleteValueInFormData.js +0 -27
- package/dist/utils/Operate/deleteValueInFormData.test.js +0 -61
- package/dist/utils/Operate/doesContainValue.js +0 -35
- package/dist/utils/Operate/doesContainValue.test.js +0 -76
- package/dist/utils/Operate/getFirstOf.js +0 -31
- package/dist/utils/Operate/getFirstOf.test.js +0 -87
- package/dist/utils/Operate/getIndexOfMatchingValueIn.js +0 -68
- package/dist/utils/Operate/getIndexOfMatchingValueIn.test.js +0 -158
- package/dist/utils/Operate/getLength.js +0 -51
- package/dist/utils/Operate/getLength.test.js +0 -90
- package/dist/utils/Operate/index.js +0 -13
- package/dist/utils/Operate/persistValueInFormData.js +0 -40
- package/dist/utils/Operate/persistValueInFormData.test.js +0 -118
- package/dist/utils/Operate/runPageOperations.js +0 -75
- package/dist/utils/Operate/runPageOperations.test.js +0 -105
- package/dist/utils/Operate/setValueInFormData.js +0 -22
- package/dist/utils/Operate/setValueInFormData.test.js +0 -45
- package/dist/utils/Operate/shouldRun.js +0 -57
- package/dist/utils/Operate/shouldRun.test.js +0 -65
- package/dist/utils/Validate/additional/conditionallyPermittedChange.js +0 -26
- package/dist/utils/Validate/additional/conditionallyPermittedChange.test.js +0 -34
- package/dist/utils/Validate/additional/conditionallyRequired.js +0 -24
- package/dist/utils/Validate/additional/conditionallyRequired.test.js +0 -74
- package/dist/utils/Validate/additional/index.js +0 -74
- package/dist/utils/Validate/additional/index.test.js +0 -130
- package/dist/utils/Validate/additional/mustBeAfter.js +0 -34
- package/dist/utils/Validate/additional/mustBeAfter.test.js +0 -109
- package/dist/utils/Validate/additional/mustBeBefore.js +0 -34
- package/dist/utils/Validate/additional/mustBeBefore.test.js +0 -77
- package/dist/utils/Validate/additional/mustBeEarlierDateTime.js +0 -57
- package/dist/utils/Validate/additional/mustBeEarlierDateTime.test.js +0 -128
- package/dist/utils/Validate/additional/mustBeGreaterThan.js +0 -22
- package/dist/utils/Validate/additional/mustBeGreaterThan.test.js +0 -57
- package/dist/utils/Validate/additional/mustBeInTheFuture.js +0 -33
- package/dist/utils/Validate/additional/mustBeInTheFuture.test.js +0 -32
- package/dist/utils/Validate/additional/mustBeInThePast.js +0 -36
- package/dist/utils/Validate/additional/mustBeInThePast.test.js +0 -32
- package/dist/utils/Validate/additional/mustBeLessThan.js +0 -22
- package/dist/utils/Validate/additional/mustBeLessThan.test.js +0 -53
- package/dist/utils/Validate/additional/mustBeLongerThan.js +0 -23
- package/dist/utils/Validate/additional/mustBeLongerThan.test.js +0 -49
- package/dist/utils/Validate/additional/mustBeNumbersOnly.js +0 -24
- package/dist/utils/Validate/additional/mustBeNumbersOnly.test.js +0 -45
- package/dist/utils/Validate/additional/mustBeOneOf.js +0 -22
- package/dist/utils/Validate/additional/mustBeOneOf.test.js +0 -37
- package/dist/utils/Validate/additional/mustBeShorterThan.js +0 -23
- package/dist/utils/Validate/additional/mustBeShorterThan.test.js +0 -49
- package/dist/utils/Validate/additional/mustBeUniqueInCollection.js +0 -40
- package/dist/utils/Validate/additional/mustBeUniqueInCollection.test.js +0 -163
- package/dist/utils/Validate/additional/mustEnterAtLeastOne.js +0 -26
- package/dist/utils/Validate/additional/mustEnterAtLeastOne.test.js +0 -37
- package/dist/utils/Validate/additional/mustHaveLessThanDecimalPlaces.js +0 -19
- package/dist/utils/Validate/additional/mustHaveLessThanDecimalPlaces.test.js +0 -37
- package/dist/utils/Validate/additional/mustNotContainSql.js +0 -19
- package/dist/utils/Validate/additional/mustNotContainSql.test.js +0 -33
- package/dist/utils/Validate/additional/mustSelectOnlyOne.js +0 -29
- package/dist/utils/Validate/additional/mustSelectOnlyOne.test.js +0 -55
- package/dist/utils/Validate/additional/utils.js +0 -35
- package/dist/utils/Validate/index.js +0 -33
- package/dist/utils/Validate/validateCollection.js +0 -50
- package/dist/utils/Validate/validateCollection.test.js +0 -134
- package/dist/utils/Validate/validateComponent.js +0 -126
- package/dist/utils/Validate/validateComponent.test.js +0 -435
- package/dist/utils/Validate/validateContainer.js +0 -52
- package/dist/utils/Validate/validateContainer.test.js +0 -115
- package/dist/utils/Validate/validateDate.js +0 -112
- package/dist/utils/Validate/validateDate.test.js +0 -133
- package/dist/utils/Validate/validateEmail.js +0 -45
- package/dist/utils/Validate/validateEmail.test.js +0 -78
- package/dist/utils/Validate/validateMultifile.js +0 -29
- package/dist/utils/Validate/validateMultifile.test.js +0 -46
- package/dist/utils/Validate/validateOnPageLoad.js +0 -24
- package/dist/utils/Validate/validateOnPageLoad.test.js +0 -89
- package/dist/utils/Validate/validatePage.js +0 -56
- package/dist/utils/Validate/validatePage.test.js +0 -795
- package/dist/utils/Validate/validateRegex.js +0 -41
- package/dist/utils/Validate/validateRegex.test.js +0 -43
- package/dist/utils/Validate/validateRequired.js +0 -37
- package/dist/utils/Validate/validateRequired.test.js +0 -64
- package/dist/utils/Validate/validateTextArea.js +0 -36
- package/dist/utils/Validate/validateTextArea.test.js +0 -71
- package/dist/utils/Validate/validateTime.js +0 -76
- package/dist/utils/Validate/validateTime.test.js +0 -116
- package/dist/utils/canOverrideFieldRequired.js +0 -23
- package/dist/utils/index.js +0 -42
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
export declare const DEFAULT_CLASS = "hods-form__page";
|
|
2
|
+
interface FormPageProps {
|
|
3
|
+
classBlock?: string;
|
|
4
|
+
classModifiers?: string | string[];
|
|
5
|
+
className?: string;
|
|
6
|
+
hashLink?: boolean;
|
|
7
|
+
onAction: Function;
|
|
8
|
+
onWrapperChange?: Function;
|
|
9
|
+
onChange?: Function;
|
|
10
|
+
onTopLevelChange?: Function;
|
|
11
|
+
page: {
|
|
12
|
+
id: string;
|
|
13
|
+
title?: string;
|
|
14
|
+
titleSize?: string;
|
|
15
|
+
components: string | object[];
|
|
16
|
+
fieldset?: boolean;
|
|
17
|
+
hideOptionalSuffix?: boolean;
|
|
18
|
+
label?: string;
|
|
19
|
+
required?: boolean;
|
|
20
|
+
actions?: object | string[];
|
|
21
|
+
formData: object;
|
|
22
|
+
customValidation?: {
|
|
23
|
+
runWhen: {
|
|
24
|
+
onLoad?: boolean;
|
|
25
|
+
};
|
|
26
|
+
message: string;
|
|
27
|
+
}[];
|
|
28
|
+
};
|
|
29
|
+
pages?: object[];
|
|
30
|
+
submitting?: boolean;
|
|
31
|
+
pageId: string;
|
|
32
|
+
}
|
|
33
|
+
/** Renders a page on a form with <Link href="https://ukhomeoffice.github.io/cop-react-components/?path=/docs/d-alert--default-story">COP React components</Link>,
|
|
34
|
+
on the basis of a <Link href="/?path=/docs/json-format-page">JSON</Link> configuration */
|
|
35
|
+
declare const FormPage: ({ page, pages, onAction, onWrapperChange, onTopLevelChange, onChange, hashLink, classBlock, classModifiers, className, submitting, pageId }: FormPageProps) => import("react/jsx-runtime").JSX.Element;
|
|
36
|
+
export default FormPage;
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { FormTypes } from '../../models';
|
|
2
|
+
export interface FormRendererProps {
|
|
3
|
+
classBlock?: string;
|
|
4
|
+
classModifiers?: string | string[];
|
|
5
|
+
className?: string;
|
|
6
|
+
components: object[];
|
|
7
|
+
cya?: {
|
|
8
|
+
actions?: (object | string)[];
|
|
9
|
+
disableTaskSwitch?: boolean;
|
|
10
|
+
};
|
|
11
|
+
data?: {
|
|
12
|
+
formStatus?: {
|
|
13
|
+
page?: object;
|
|
14
|
+
};
|
|
15
|
+
};
|
|
16
|
+
hashLink?: boolean;
|
|
17
|
+
hide_title?: boolean;
|
|
18
|
+
hooks?: object;
|
|
19
|
+
hub?: {
|
|
20
|
+
nonSequential?: boolean;
|
|
21
|
+
sections?: object[];
|
|
22
|
+
};
|
|
23
|
+
newPageId?: string;
|
|
24
|
+
noChangeAction?: boolean;
|
|
25
|
+
pages: object[];
|
|
26
|
+
summaryListClassModifiers?: string | string[];
|
|
27
|
+
title?: string;
|
|
28
|
+
titleSize?: string;
|
|
29
|
+
cleanseHiddenData?: boolean;
|
|
30
|
+
/** See <a href="/?path=/docs/json-format-form-types#formtypes">FormTypes</a>. */
|
|
31
|
+
type: typeof FormTypes[keyof typeof FormTypes];
|
|
32
|
+
viewOnly?: boolean;
|
|
33
|
+
hideBlankRows?: boolean;
|
|
34
|
+
}
|
|
35
|
+
/** Renders a form with <Link href="https://ukhomeoffice.github.io/cop-react-components/?path=/docs/d-alert--default-story">COP React components</Link>,
|
|
36
|
+
on the basis of a <Link href="/?path=/docs/json-format-form">JSON</Link> that describes which elements are required. */
|
|
37
|
+
declare const FormRenderer: ({ title, titleSize, type, cleanseHiddenData, components, pages, hub, cya, data, hashLink, hooks, classBlock, classModifiers, className, hide_title: hideTitle, summaryListClassModifiers, noChangeAction, newPageId, viewOnly, hideBlankRows }: FormRendererProps) => import("react/jsx-runtime").JSX.Element;
|
|
38
|
+
export declare const DEFAULT_CLASS = "hods-form";
|
|
39
|
+
export default FormRenderer;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Gets the pageId from the invoked CYA action and calls onChange if it is
|
|
3
|
+
* different to the currentPageId.
|
|
4
|
+
* @param {object} page The page on which the CYA action was invoked.
|
|
5
|
+
* @param {string} currentPageId The current pageId.
|
|
6
|
+
* @param {Function} onChange The handler to call if the pageId is different to the currentPageId.
|
|
7
|
+
*/
|
|
8
|
+
declare const cyaAction: (page: any, currentPageId: any, onChange: any) => void;
|
|
9
|
+
export default cyaAction;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Gets the pageId from the invoked CYA action.
|
|
3
|
+
* @param {object} action The invoked action.
|
|
4
|
+
* @param {string} pageId The id of the page on which the action was invoked.
|
|
5
|
+
* @returns A page id.
|
|
6
|
+
*/
|
|
7
|
+
declare const getPageId: (action: any, pageId: any) => any;
|
|
8
|
+
export default getPageId;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
declare const handlers: {
|
|
2
|
+
cyaAction: (page: any, currentPageId: any, onChange: any) => void;
|
|
3
|
+
navigate: (action: any, currentPageId: any, onNavigate: any, state?: undefined) => void;
|
|
4
|
+
submissionError: (errors: any, onError: any) => void;
|
|
5
|
+
};
|
|
6
|
+
export default handlers;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Gets the pageId from the invoked page action and calls onNavigate if it is
|
|
3
|
+
* different to the currentPageId.
|
|
4
|
+
* @param {object} action The invoked action.
|
|
5
|
+
* @param {string} currentPageId The current pageId.
|
|
6
|
+
* @param {Function} onNavigate The handler to call if the pageId is different to the currentPageId.
|
|
7
|
+
* @param {object|undefined} state State to pass to the handler on change
|
|
8
|
+
*/
|
|
9
|
+
declare const navigate: (action: any, currentPageId: any, onNavigate: any, state?: undefined) => void;
|
|
10
|
+
export default navigate;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Formats back-end errors and invokes an onError handler.
|
|
3
|
+
* @param {Array} errors The errors returned by the backend when submitting.
|
|
4
|
+
* @param {Function} onError The handler to call with the formatted errors.
|
|
5
|
+
*/
|
|
6
|
+
declare const submissionError: (errors: any, onError: any) => void;
|
|
7
|
+
export default submissionError;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Assesses whether the action can proceed when navigating, submitting, etc.
|
|
3
|
+
* Presently, this will validate a page when submitting and, only if the page is
|
|
4
|
+
* valid will it proceed. If it's simple navigation, it simply returns true.
|
|
5
|
+
* @param {object} action The action object we're assessing.
|
|
6
|
+
* @param {object} page The page configuration object this action relates to.
|
|
7
|
+
* @param {Function} pageValidator A function to validate the page.
|
|
8
|
+
* @param {Array} errors An array of existing errors.
|
|
9
|
+
* @returns A boolean where `true` means the action can proceed and `false` means it cannot.
|
|
10
|
+
*/
|
|
11
|
+
declare const canActionProceed: (action: any, page: any, pageValidator: any, errors: any) => boolean;
|
|
12
|
+
export default canActionProceed;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Assesses whether the CYA screen can submit.
|
|
3
|
+
* Presently, this will validate all of the form pages and, only if all pages are
|
|
4
|
+
* valid will it proceed.
|
|
5
|
+
* @param {Array} pages All of the pages contained within the form.
|
|
6
|
+
* @param {Function} pagesValidator A function to validate the page.
|
|
7
|
+
* @returns A boolean where `true` means the CYA can submit and `false` means it cannot.
|
|
8
|
+
*/
|
|
9
|
+
declare const canCYASubmit: (pages: any, pagesValidator: any) => boolean;
|
|
10
|
+
export default canCYASubmit;
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
/**
|
|
2
|
+
*
|
|
3
|
+
* The purpose of this function is to apply the show_when rules defined in the form specification to the
|
|
4
|
+
* form payload (formData), and remove any data that should not be shown according to those rules.
|
|
5
|
+
* (the reason this data exists in the payload is that users can answer a question in such a way that
|
|
6
|
+
* other questions are 'shown' to them, which are then complete. The user can then go back and change the original
|
|
7
|
+
* question to then 'hide' those questions, but the answers they gave persist in the payload. The must be cleansed
|
|
8
|
+
* before being submitted.
|
|
9
|
+
*
|
|
10
|
+
* There are 2 types of payload data that have to be treated differently by this function for it to work.
|
|
11
|
+
*
|
|
12
|
+
* 1. Data from non-repeating pages, containing components.
|
|
13
|
+
*
|
|
14
|
+
* Each data item captured will be written to the payload as a field with the name of the fieldId of the payload.
|
|
15
|
+
* In the case of components that are nested within 'container' components, the payload will reflect the nesting.
|
|
16
|
+
* There is no limit to the level of nesting in a form.
|
|
17
|
+
*
|
|
18
|
+
* To cleanse the payload for this type of data, we do the following (high level description, see method comments for detail):
|
|
19
|
+
*
|
|
20
|
+
* - build a map of all components, keyed by their payload path (required for the next step)
|
|
21
|
+
* - for all of these components that have dependencies (show_when rules), create a graph datastructure to show all components
|
|
22
|
+
* on which a component is dependent, and then all components that those components may be dependent on. There is no limit to
|
|
23
|
+
* the depth of these chained dependencies.
|
|
24
|
+
* - the reason for building a graph of these dependency chains is so we know the sequence in which we must resolve the dependencies.
|
|
25
|
+
* For any given chain of dependencies it is essential that we resolve the dependencies starting at the end of the chains, and work our way
|
|
26
|
+
* back up the chain. If not, we could be resolving a dependency based on a payload item that itself will later be deleted.
|
|
27
|
+
* Therefore, the final step is to recursively traverse the dependency graph, resolving the dependency rule for the components in
|
|
28
|
+
* the chain from the leaf back up to the parent node.
|
|
29
|
+
*
|
|
30
|
+
* 2. Page collection data
|
|
31
|
+
*
|
|
32
|
+
* A page collection is a set of one or more pages which (as a group) can be filled in as many times is required
|
|
33
|
+
* by the user. For example, in EAB, you can add as many item-seal-details to an EAB form as are required. An item-seal-detail
|
|
34
|
+
* is made up of several different pages, all grouped. The data saved will be an array representing the whole collection, with
|
|
35
|
+
* each object in the array representing a single collection entry (a single item-seal-detail in this example).
|
|
36
|
+
*
|
|
37
|
+
* Cleanse collection data has to be driven from the payload rather than the form, as there are repeated objects in an array
|
|
38
|
+
* representing the data. Each one has to be treated independently as the data to be cleansed can be different in each one.
|
|
39
|
+
*
|
|
40
|
+
* - For each collection type, iterate through each payload object and treat it like an independent payload..
|
|
41
|
+
* - For each collection payload object, iterate through the collection's pages and components, and apply all the show_when rules
|
|
42
|
+
* found at both page and component level to the payload.
|
|
43
|
+
* - Repeat for each payload object
|
|
44
|
+
* - Repeat for all collections
|
|
45
|
+
*
|
|
46
|
+
* @param {*} form
|
|
47
|
+
* @param {*} formData
|
|
48
|
+
* @returns {*} cleansed form data
|
|
49
|
+
*/
|
|
50
|
+
declare const clearOutUncompletedRoutes: (cleanseHiddenData: any, form: any, formData: any) => any;
|
|
51
|
+
export default clearOutUncompletedRoutes;
|
|
@@ -0,0 +1,179 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Add a value to a map of arrays. If the key exists, append the value to the array.
|
|
3
|
+
* If not, create the map entry with that key.
|
|
4
|
+
*
|
|
5
|
+
* @param {*} key
|
|
6
|
+
* @param {*} value
|
|
7
|
+
* @param {*} multiMap
|
|
8
|
+
*/
|
|
9
|
+
export declare const addValue: (key: any, value: any, multiMap: any) => void;
|
|
10
|
+
/**
|
|
11
|
+
* Given a path, remove a node from this path within an object.
|
|
12
|
+
*
|
|
13
|
+
* @param {Object} payload Javascript object from which the node will be deleted. Updated by the method.
|
|
14
|
+
* @param {String} path A string containing a decimal point delimited path specifying the node to delete.
|
|
15
|
+
* @return {void}, obj above updated.
|
|
16
|
+
*/
|
|
17
|
+
export declare const deleteNodeByPath: (payload: any, path: any) => void;
|
|
18
|
+
/**
|
|
19
|
+
* Return the immediate parent of a path string passed in.
|
|
20
|
+
* Useful for processing 'options' in a form, as nested fieldIds are placed in the payload at
|
|
21
|
+
* the same level in the heirarchy as the option question they relate to.
|
|
22
|
+
*
|
|
23
|
+
* @param {String} path Decimal point delimited path.
|
|
24
|
+
* @returns {String} Immediate parent of the path passed in.
|
|
25
|
+
*/
|
|
26
|
+
export declare const getImmediateParent: (path: any) => string | null;
|
|
27
|
+
/**
|
|
28
|
+
* Questions can be nested within options, eg if you answer 'yes' to a radio question, this can
|
|
29
|
+
* reveal additional nested questions.
|
|
30
|
+
* The path of the fields from these nested questions are at the same level as the original option
|
|
31
|
+
* answer, so this utility derives the nested question path from the option path.
|
|
32
|
+
*
|
|
33
|
+
* @param {String} optionPath Decimal point delimited path
|
|
34
|
+
* @param {String} nestedFieldId fieldId (dataname) of the nested question within the above option
|
|
35
|
+
* @returns {String} Fully qualified path of the nested question
|
|
36
|
+
*/
|
|
37
|
+
export declare const getNestedQuestionPath: (optionPath: any, nestedFieldId: any) => any;
|
|
38
|
+
/**
|
|
39
|
+
* Pruning a collection payload may have resulted in objects that are only left with their 'id' field, which isn't data
|
|
40
|
+
* but added by the renderer to find the activeId. If so, remove these objects entirely as they have been pruned.
|
|
41
|
+
*
|
|
42
|
+
* @param {Array} array Array of objects. Each object which has only 1 remaining field called 'id' should be removed.
|
|
43
|
+
* @return {void}, array above updated.
|
|
44
|
+
*/
|
|
45
|
+
export declare const removeObjectWithOnlySingleIdField: (array: any) => void;
|
|
46
|
+
/**
|
|
47
|
+
* Helper method to establish all the payload paths (dependencies) that an entity (page or component) is
|
|
48
|
+
* dependent on through its show_when rule.
|
|
49
|
+
*
|
|
50
|
+
* This will be used to build a graph of chained dependencies to establish in which order
|
|
51
|
+
* to resolve dependencies. The exact rule is not required at this point, just the dependencies.
|
|
52
|
+
*
|
|
53
|
+
* The form specification allows complex show_when blocks including 1...n levels of nesting, so
|
|
54
|
+
* recursively search through the show_when block looking for all 'field' data items.
|
|
55
|
+
*
|
|
56
|
+
* @param {Object} entity Entity whose show_when rule is to be searched for 'field' data items within.
|
|
57
|
+
* @returns {Set} Set of payload paths that the entity (page or component) is dependent on.
|
|
58
|
+
*/
|
|
59
|
+
export declare const getDependencies: (entity: any) => Set<unknown> | null;
|
|
60
|
+
/**
|
|
61
|
+
* Some show_when field values point to data items that are within objects provided by
|
|
62
|
+
* external calls to refdata, eg modeOfTransport.id. These won't map directly to the path
|
|
63
|
+
* keyed components in the allComponents map, so go back up levels in the path until we find
|
|
64
|
+
* the component that creates this field.
|
|
65
|
+
*
|
|
66
|
+
* This component might not be found at all, as the dependency might be on a field that is either
|
|
67
|
+
* provided by cop-ui (eg jobHolderStaffDetails.linemanagerEmail), or by the "addToFormData" function
|
|
68
|
+
* (eg epmsSubmitted). These will be leaf level in the dependency chain so component is not required.
|
|
69
|
+
*
|
|
70
|
+
* @param {String} optionPath Decimal point delimited path
|
|
71
|
+
* @param {String} nestedFieldId fieldId (dataname) of the nested question within the above option
|
|
72
|
+
* @returns {String} Fully qualified path of the nested question
|
|
73
|
+
*
|
|
74
|
+
*/
|
|
75
|
+
export declare const getDependencyObjectFromPath: (dependencyPath: any, allComponents: any) => any;
|
|
76
|
+
/**
|
|
77
|
+
*
|
|
78
|
+
* Evaluate the show_when rule to establish if the component should be shown (and the
|
|
79
|
+
* payload data should not be pruned). If there is no show_when rule, then return true.
|
|
80
|
+
*
|
|
81
|
+
* @param {*} entity A page or component that may have a show_when rule associated with it
|
|
82
|
+
* @param {*} data The payload data used to evaluate the show_when rule
|
|
83
|
+
* @returns {boolean} true if the show_when rule evaluate to true, or there is no show_when rule
|
|
84
|
+
*/
|
|
85
|
+
export declare const isShowEntity: (entity: any, data: any) => boolean;
|
|
86
|
+
/**
|
|
87
|
+
*
|
|
88
|
+
* Components can be assigned to pages in 2 ways in the form specification:
|
|
89
|
+
*
|
|
90
|
+
* 1 - They can be included in the page's components array with the 'use' field, e.g.
|
|
91
|
+
* {
|
|
92
|
+
* "use": "port"
|
|
93
|
+
* }
|
|
94
|
+
* This "use" value will normally match a component's id, but can match its fieldId
|
|
95
|
+
* NB. In this case, a show_when rule can be applied here, which will supercede any show_when in the component. e.g.
|
|
96
|
+
*
|
|
97
|
+
* {
|
|
98
|
+
* "use": "port",
|
|
99
|
+
* "show_when": ....
|
|
100
|
+
* }
|
|
101
|
+
*
|
|
102
|
+
* 2 - The entire component can be embedded as an entry in the page's component array.
|
|
103
|
+
*
|
|
104
|
+
*
|
|
105
|
+
* @param {*} componentId The id of the component to find in the form.
|
|
106
|
+
* @param {*} componentByIdMap A map of all the form's components keyed on Id, for better performance than searching the form.
|
|
107
|
+
* @param {*} componentByFieldIdMap A map of all the form's components keyed on fieldId, for better performance than searching the form.
|
|
108
|
+
* @returns {Object} A cloned component object, containing the full definition of that component.
|
|
109
|
+
*/
|
|
110
|
+
export declare const findComponentDefinitionInForm: (pageComponentDef: any, componentByIdMap: any, componentByFieldIdMap: any) => any;
|
|
111
|
+
/**
|
|
112
|
+
*
|
|
113
|
+
* When documents are added to the payload of type multifile, they are also added to a section of the payload
|
|
114
|
+
* 'meta', specifically an array 'documents'. When we remove the multifile elements, we need to remove
|
|
115
|
+
* the corresponding meta.document entries.
|
|
116
|
+
*
|
|
117
|
+
* @param {*} component The component definition being deleted that needs corresponding meta data also deleted
|
|
118
|
+
* @param {*} collectionDataObject The payload containing the file data being deleted (for which the corresponding meta needs deleting)
|
|
119
|
+
* @param {*} formData The entire payload, which will include the meta section
|
|
120
|
+
* @returns {void}, as the formData will be updated in situ
|
|
121
|
+
*/
|
|
122
|
+
export declare const deleteCorrespondingMetaInfo: (component: any, collectionDataObject: any, formData: any) => void;
|
|
123
|
+
/**
|
|
124
|
+
* After the payload has been cleansed of individual data items, empty arrays and objects may remain.
|
|
125
|
+
* Removing an array (when the payload for a collection) may leave a redundant activeId field. The active Id
|
|
126
|
+
* fields are not part of the payload data, but added by the react renderer to track which collection object
|
|
127
|
+
* is currently being worked on, so can be removed.
|
|
128
|
+
*
|
|
129
|
+
* To tidy this all up, recursively empty arrays and their associated "ActiveId" fields from a nested payload.
|
|
130
|
+
*
|
|
131
|
+
* This function traverses a given payload, which can be an array or an object, and performs the following operations:
|
|
132
|
+
* 1. If an empty array is found inside an array, it is removed using `splice`.
|
|
133
|
+
* 2. If an empty array is found inside an object:
|
|
134
|
+
* - It is removed from the object.
|
|
135
|
+
* - If there is a corresponding `<key>ActiveId` field, that field is also removed.
|
|
136
|
+
* 3. The function operates recursively to handle deeply nested structures.
|
|
137
|
+
*
|
|
138
|
+
* @param {any} payload - The input data structure, which can be an array or an object.
|
|
139
|
+
*
|
|
140
|
+
*/
|
|
141
|
+
export declare const removeEmptyArraysAndUnusedCollectionIDs: (payload: any) => void;
|
|
142
|
+
/**
|
|
143
|
+
* Helper method to go through each option calling a passed in function for any nested fields.
|
|
144
|
+
* @param {Object} component The form component representing the path being deleted
|
|
145
|
+
* @param {Function} action The action to perform on each nested question. Varies for collections and non-collections
|
|
146
|
+
* @return {void}, obj above updated.
|
|
147
|
+
*/
|
|
148
|
+
export declare const iterateOptions: (component: any, action: any) => void;
|
|
149
|
+
/**
|
|
150
|
+
* Delete a component's payload item from the overall payload.
|
|
151
|
+
* A component can be defined in >1 places in the form spec. To cater for this,
|
|
152
|
+
* if the componentsToKeep counter tells us that there is > 1 uses of this component
|
|
153
|
+
* still unaccounted for in the form then don't delete, but reduce the count by 1.
|
|
154
|
+
*
|
|
155
|
+
* When the counter reaches 1 we know all other occurences of the component have been resolved
|
|
156
|
+
* so it is safe to delete.
|
|
157
|
+
*
|
|
158
|
+
*
|
|
159
|
+
* @param {*} payload The form payload from which to delete the component data
|
|
160
|
+
* @param {*} path The payload path of the component
|
|
161
|
+
* @param {*} component The component whose data we should attempt to delete
|
|
162
|
+
* @param {*} componentsToKeep A list of all components with a count of their number of uses in the form
|
|
163
|
+
*/
|
|
164
|
+
export declare const deleteComponentData: (payload: any, path: any, component: any, componentsToKeep: any) => void;
|
|
165
|
+
/**
|
|
166
|
+
*
|
|
167
|
+
* Takes a single page collection payload object and removes the payload items specified in the componentsToPrune list
|
|
168
|
+
* as long as they don't appear in the componentsToKeep list.
|
|
169
|
+
*
|
|
170
|
+
* Additionally, if the component type is multifile, remove the corresponding data entries that will have been created
|
|
171
|
+
* in the meta section of the payload by the form renderer.
|
|
172
|
+
*
|
|
173
|
+
* @param {Set} pathsToKeep paths that we cannot delete from the collectionDataObject
|
|
174
|
+
* @param {Map} componentsToPrune paths that we should delete, as long as they are not in the pathsToKeep
|
|
175
|
+
* @param {Object} collectionDataObject the payload from which to delete the paths
|
|
176
|
+
* @param {Object} formData The form data, whose meta section may include corresponding documents entries for multifile entries
|
|
177
|
+
*/
|
|
178
|
+
export declare const pruneCollectionEntry: (pathsToKeep: any, componentsToPrune: any, collectionDataObject: any, formData: any) => void;
|
|
179
|
+
export declare const toArray: (value: any) => any[];
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Gets a configuration object for the Check your answers screen.
|
|
3
|
+
* @param {string} pageId The current page identifier.
|
|
4
|
+
* @param {object} hub The hub, if there is one.
|
|
5
|
+
* @returns A configuration object for the Check your answers screen.
|
|
6
|
+
*/
|
|
7
|
+
declare const getCYA: (pageId: any, pages: any, hub: any) => {
|
|
8
|
+
title: string;
|
|
9
|
+
hideChangeActions?: undefined;
|
|
10
|
+
hideGroupActions?: undefined;
|
|
11
|
+
} | {
|
|
12
|
+
title?: undefined;
|
|
13
|
+
hideChangeActions?: undefined;
|
|
14
|
+
hideGroupActions?: undefined;
|
|
15
|
+
} | {
|
|
16
|
+
title: any;
|
|
17
|
+
hideChangeActions: any;
|
|
18
|
+
hideGroupActions: any;
|
|
19
|
+
} | undefined;
|
|
20
|
+
export default getCYA;
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Sets up the state of the form, including the current page and the Check your answers screen.
|
|
3
|
+
* @param {string} pageId The current page identifier.
|
|
4
|
+
* @param {Array} pages All of the pages in the form.
|
|
5
|
+
* @param {object} hub The hub, if there is one.
|
|
6
|
+
* @returns The current state of the form.
|
|
7
|
+
*/
|
|
8
|
+
declare const getFormState: (pageId: any, pages: any, hub: any) => {
|
|
9
|
+
pageId: any;
|
|
10
|
+
cya: {
|
|
11
|
+
title: string;
|
|
12
|
+
hideChangeActions?: undefined;
|
|
13
|
+
hideGroupActions?: undefined;
|
|
14
|
+
} | {
|
|
15
|
+
title?: undefined;
|
|
16
|
+
hideChangeActions?: undefined;
|
|
17
|
+
hideGroupActions?: undefined;
|
|
18
|
+
} | {
|
|
19
|
+
title: any;
|
|
20
|
+
hideChangeActions: any;
|
|
21
|
+
hideGroupActions: any;
|
|
22
|
+
} | undefined;
|
|
23
|
+
page: any;
|
|
24
|
+
};
|
|
25
|
+
export default getFormState;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Gets the current page to render, which may be undefined if the current page is the "hub".
|
|
3
|
+
* @param {string} pageId The current page identifier.
|
|
4
|
+
* @param {Array} pages All of the pages in the form.
|
|
5
|
+
* @param {object} hub The hub, if there is one.
|
|
6
|
+
* @returns The current page to render.
|
|
7
|
+
*/
|
|
8
|
+
declare const getPage: (pageId: any, pages: any, hub: any) => any;
|
|
9
|
+
export default getPage;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* update task states in sections
|
|
3
|
+
* @param {object[]} sections - array of sections
|
|
4
|
+
* @param {object} taskStates - update task states
|
|
5
|
+
* @param {boolean} nonSequential - true if tasks can be performed non-sequentially
|
|
6
|
+
* @param {object} data - current form data
|
|
7
|
+
* @returns {object[]} - updated sections - note this is a clone
|
|
8
|
+
*/
|
|
9
|
+
declare const getUpdatedSectionStates: (sections: any, taskStates: any, nonSequential?: boolean, data?: null) => any;
|
|
10
|
+
export default getUpdatedSectionStates;
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
declare const helpers: {
|
|
2
|
+
canActionProceed: (action: any, page: any, pageValidator: any, errors: any) => boolean;
|
|
3
|
+
canCYASubmit: (pages: any, pagesValidator: any) => boolean;
|
|
4
|
+
cleanHiddenNestedData: (patch: any, page: any) => any;
|
|
5
|
+
getFormState: (pageId: any, pages: any, hub: any) => {
|
|
6
|
+
pageId: any;
|
|
7
|
+
cya: {
|
|
8
|
+
title: string;
|
|
9
|
+
hideChangeActions?: undefined;
|
|
10
|
+
hideGroupActions?: undefined;
|
|
11
|
+
} | {
|
|
12
|
+
title?: undefined;
|
|
13
|
+
hideChangeActions?: undefined;
|
|
14
|
+
hideGroupActions?: undefined;
|
|
15
|
+
} | {
|
|
16
|
+
title: any;
|
|
17
|
+
hideChangeActions: any;
|
|
18
|
+
hideGroupActions: any;
|
|
19
|
+
} | undefined;
|
|
20
|
+
page: any;
|
|
21
|
+
};
|
|
22
|
+
getRelevantPages: (formState: any, pages: any, currentTaskPages: any) => any;
|
|
23
|
+
getNextPageId: (formType: any, pages: any, currentPageId: any, action: any, formData: any) => any;
|
|
24
|
+
getPage: (pageId: any, pages: any, hub: any) => any;
|
|
25
|
+
getSubmissionStatus: (formType: any, pages: any, currentPageId: any, action: any, formData: any, currentTask: any, isCompleted: any, sections: any) => any;
|
|
26
|
+
getUpdatedSectionStates: (sections: any, taskStates: any, nonSequential?: boolean, data?: null) => any;
|
|
27
|
+
clearOutUncompletedRoutes: (cleanseHiddenData: any, form: any, formData: any) => any;
|
|
28
|
+
};
|
|
29
|
+
export default helpers;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
/**
|
|
2
|
+
*
|
|
3
|
+
* @param {*} action
|
|
4
|
+
*/
|
|
5
|
+
declare const onCYAAction: (setPagePoint: any, action: any, pages: any, validate: any, cleanseHiddenData: any, components: any, data: any, setData: any, type: any, pageId: any, currentTask: any, hooks: any, addErrors: any, hub: any, onPageChange: any, formState: any, submitting: any, setSubmitting: any) => void;
|
|
6
|
+
export default onCYAAction;
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
declare const onPageAction: (action: any, patch: any, patchLabel: any, hooks: any, data: any, formState: any, validate: any, onPageChange: any, type: any, cleanseHiddenData: any, pages: any, components: any, pageId: any, setPagePoint: any, currentTask: any, setData: any, hubDetails: any, setSubmitted: any, addErrors: any, submitting: any, setSubmitting: any, existingErrors: any) => void;
|
|
2
|
+
export default onPageAction;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
export declare const DEFAULT_LABEL = "Continue";
|
|
2
|
+
interface ActionButtonProps {
|
|
3
|
+
action: string | object;
|
|
4
|
+
onAction: Function;
|
|
5
|
+
}
|
|
6
|
+
declare const ActionButton: ({ action: _action, onAction, ...attrs }: ActionButtonProps) => import("react/jsx-runtime").JSX.Element | null;
|
|
7
|
+
export default ActionButton;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
interface PageActionsProps {
|
|
2
|
+
actions: object | string[];
|
|
3
|
+
onAction: Function;
|
|
4
|
+
}
|
|
5
|
+
/** Renders the buttons at the bottom of a Page */
|
|
6
|
+
declare const PageActions: ({ actions, onAction }: PageActionsProps) => import("react/jsx-runtime").JSX.Element | null;
|
|
7
|
+
export default PageActions;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
export interface GroupActionProps {
|
|
2
|
+
group: {
|
|
3
|
+
action?: {
|
|
4
|
+
label: string;
|
|
5
|
+
page?: string;
|
|
6
|
+
aria_suffix?: string;
|
|
7
|
+
onAction?: Function;
|
|
8
|
+
};
|
|
9
|
+
};
|
|
10
|
+
}
|
|
11
|
+
declare const GroupAction: ({ group }: GroupActionProps) => import("react/jsx-runtime").JSX.Element | null;
|
|
12
|
+
export default GroupAction;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
interface RowActionProps {
|
|
2
|
+
row: {
|
|
3
|
+
action?: {
|
|
4
|
+
label: string;
|
|
5
|
+
page?: string;
|
|
6
|
+
aria_suffix?: string;
|
|
7
|
+
onAction?: Function;
|
|
8
|
+
};
|
|
9
|
+
};
|
|
10
|
+
}
|
|
11
|
+
declare const RowAction: ({ row }: RowActionProps) => import("react/jsx-runtime").JSX.Element | null;
|
|
12
|
+
export default RowAction;
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
export declare const DEFAULT_CLASS = "govuk-summary-list";
|
|
3
|
+
export interface SummaryListProps {
|
|
4
|
+
classBlock?: string;
|
|
5
|
+
classModifiers?: string | string[];
|
|
6
|
+
className?: string;
|
|
7
|
+
isGroup?: boolean;
|
|
8
|
+
noChangeAction?: boolean;
|
|
9
|
+
noGroupAction?: boolean;
|
|
10
|
+
showGroupAction?: boolean;
|
|
11
|
+
rows: {
|
|
12
|
+
pageId: string;
|
|
13
|
+
fieldId: string;
|
|
14
|
+
full_path?: string;
|
|
15
|
+
key: string;
|
|
16
|
+
value?: ReactNode;
|
|
17
|
+
action?: {
|
|
18
|
+
page?: string;
|
|
19
|
+
label?: string;
|
|
20
|
+
aria_suffix?: string;
|
|
21
|
+
onAction?: Function;
|
|
22
|
+
};
|
|
23
|
+
}[];
|
|
24
|
+
}
|
|
25
|
+
/** Renders a list of key-value pairs, most commonly on the **Check your answers** screen, and optionally
|
|
26
|
+
display action links. */
|
|
27
|
+
declare const SummaryList: ({ rows, noChangeAction, noGroupAction, isGroup, classBlock, classModifiers, className, showGroupAction, ...attrs }: SummaryListProps) => import("react/jsx-runtime").JSX.Element;
|
|
28
|
+
export default SummaryList;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { StoryObj } from '@storybook/react-vite';
|
|
2
|
+
declare const meta: {
|
|
3
|
+
title: string;
|
|
4
|
+
component: ({ rows, noChangeAction, noGroupAction, isGroup, classBlock, classModifiers, className, showGroupAction, ...attrs }: import('./SummaryList').SummaryListProps) => import("react/jsx-runtime").JSX.Element;
|
|
5
|
+
tags: string[];
|
|
6
|
+
};
|
|
7
|
+
export default meta;
|
|
8
|
+
type Story = StoryObj<typeof meta>;
|
|
9
|
+
export declare const Default: Story;
|
|
10
|
+
export declare const ReadOnly: Story;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
interface SummaryListHeadingRowProps {
|
|
2
|
+
classes: Function;
|
|
3
|
+
size?: string;
|
|
4
|
+
title: string;
|
|
5
|
+
}
|
|
6
|
+
declare const SummaryListHeadingRow: ({ title, size, classes }: SummaryListHeadingRowProps) => import("react/jsx-runtime").JSX.Element;
|
|
7
|
+
export default SummaryListHeadingRow;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
interface SummaryListHeadingRowWithActionProps {
|
|
2
|
+
classes: Function;
|
|
3
|
+
row: {
|
|
4
|
+
key: string;
|
|
5
|
+
size?: string;
|
|
6
|
+
action?: {
|
|
7
|
+
page?: string;
|
|
8
|
+
label?: string;
|
|
9
|
+
aria_suffix?: string;
|
|
10
|
+
onAction?: Function;
|
|
11
|
+
};
|
|
12
|
+
};
|
|
13
|
+
noChangeAction?: boolean;
|
|
14
|
+
}
|
|
15
|
+
declare const SummaryListHeadingRowWithAction: ({ row, classes, noChangeAction }: SummaryListHeadingRowWithActionProps) => import("react/jsx-runtime").JSX.Element;
|
|
16
|
+
export default SummaryListHeadingRowWithAction;
|