hof 20.3.8-beta-gtm → 20.3.8-timeout-beta
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/.nyc_output/2194bc4f-7454-4356-80e2-e52a7dc798aa.json +1 -0
- package/.nyc_output/processinfo/{c84e394d-abf7-4aea-99aa-36427e671442.json → 2194bc4f-7454-4356-80e2-e52a7dc798aa.json} +1 -1
- package/.nyc_output/processinfo/index.json +1 -1
- package/README.md +12 -12
- package/config/hof-defaults.js +2 -8
- package/frontend/template-partials/translations/src/en/buttons.json +1 -0
- package/frontend/template-partials/translations/src/en/errors.json +4 -0
- package/frontend/template-partials/views/layout.html +2 -1
- package/frontend/template-partials/views/partials/session-timeout-warning.html +27 -0
- package/frontend/themes/gov-uk/client-js/dialog/index.js +361 -0
- package/frontend/themes/gov-uk/client-js/dialog/utils.js +114 -0
- package/frontend/themes/gov-uk/client-js/index.js +1 -0
- package/frontend/themes/gov-uk/styles/govuk.scss +1 -0
- package/frontend/themes/gov-uk/styles/modules/_dialogs.scss +113 -0
- package/frontend/toolkit/assets/stylesheets/app.scss +1 -0
- package/frontend/toolkit/assets/stylesheets/modules/_dialogs.scss +113 -0
- package/middleware/session-timeout.js +23 -0
- package/package.json +1 -1
- package/sandbox/apps/sandbox/behaviours/extend-session.js +9 -0
- package/sandbox/assets/scss/app.scss +1 -1
- package/sandbox/package.json +1 -1
- package/sandbox/public/css/app.css +109 -0
- package/sandbox/public/js/bundle.js +12347 -1149
- package/sandbox/yarn.lock +6 -1
- package/.nyc_output/c84e394d-abf7-4aea-99aa-36427e671442.json +0 -1
- package/frontend/template-partials/views/partials/warn.html +0 -7
@@ -1 +1 @@
|
|
1
|
-
{"parent":null,"pid":
|
1
|
+
{"parent":null,"pid":4328,"argv":["/Users/chisomoguibe/.nvm/versions/node/v18.17.1/bin/node","/Users/chisomoguibe/Projects/hof/node_modules/.bin/_mocha","test/**/*.spec.js","sandbox/test/**/*.spec.js"],"execArgv":[],"cwd":"/Users/chisomoguibe/Projects/hof","time":1705585541895,"ppid":4326,"coverageFilename":"/Users/chisomoguibe/Projects/hof/.nyc_output/2194bc4f-7454-4356-80e2-e52a7dc798aa.json","externalId":"","uuid":"2194bc4f-7454-4356-80e2-e52a7dc798aa","files":["/Users/chisomoguibe/Projects/hof/model/index.js","/Users/chisomoguibe/Projects/hof/components/index.js","/Users/chisomoguibe/Projects/hof/components/address-lookup/index.js","/Users/chisomoguibe/Projects/hof/components/address-lookup/default-model.js","/Users/chisomoguibe/Projects/hof/components/address-lookup/defaults.js","/Users/chisomoguibe/Projects/hof/components/clear-session/index.js","/Users/chisomoguibe/Projects/hof/components/combine-and-loop-fields/index.js","/Users/chisomoguibe/Projects/hof/components/date/index.js","/Users/chisomoguibe/Projects/hof/components/date/fields.js","/Users/chisomoguibe/Projects/hof/components/emailer/index.js","/Users/chisomoguibe/Projects/hof/components/emailer/email-service.js","/Users/chisomoguibe/Projects/hof/components/emailer/emailer.js","/Users/chisomoguibe/Projects/hof/components/emailer/transports/index.js","/Users/chisomoguibe/Projects/hof/components/emailer/transports/smtp.js","/Users/chisomoguibe/Projects/hof/components/emailer/transports/ses.js","/Users/chisomoguibe/Projects/hof/components/emailer/transports/stub.js","/Users/chisomoguibe/Projects/hof/components/emailer/transports/debug.js","/Users/chisomoguibe/Projects/hof/components/homeoffice-countries/index.js","/Users/chisomoguibe/Projects/hof/config/component-defaults.js","/Users/chisomoguibe/Projects/hof/components/notify/index.js","/Users/chisomoguibe/Projects/hof/components/notify/notify.js","/Users/chisomoguibe/Projects/hof/components/summary/index.js","/Users/chisomoguibe/Projects/hof/config/rate-limits.js","/Users/chisomoguibe/Projects/hof/middleware/rate-limiter.js","/Users/chisomoguibe/Projects/hof/config/hof-defaults.js","/Users/chisomoguibe/Projects/hof/controller/base-controller.js","/Users/chisomoguibe/Projects/hof/controller/formatting/index.js","/Users/chisomoguibe/Projects/hof/controller/validation/index.js","/Users/chisomoguibe/Projects/hof/controller/validation/validators.js","/Users/chisomoguibe/Projects/hof/controller/validation/email.js","/Users/chisomoguibe/Projects/hof/controller/validation-error.js","/Users/chisomoguibe/Projects/hof/utilities/index.js","/Users/chisomoguibe/Projects/hof/utilities/autofill/index.js","/Users/chisomoguibe/Projects/hof/utilities/autofill/inputs.js","/Users/chisomoguibe/Projects/hof/utilities/test-data/index.js","/Users/chisomoguibe/Projects/hof/utilities/countries.js","/Users/chisomoguibe/Projects/hof/utilities/helpers/index.js","/Users/chisomoguibe/Projects/hof/utilities/reqres/index.js","/Users/chisomoguibe/Projects/hof/config/sanitisation-rules.js","/Users/chisomoguibe/Projects/hof/controller/formatting/formatters.js","/Users/chisomoguibe/Projects/hof/controller/index.js","/Users/chisomoguibe/Projects/hof/controller/behaviour-session.js","/Users/chisomoguibe/Projects/hof/controller/behaviour-hooks.js","/Users/chisomoguibe/Projects/hof/controller/controller.js","/Users/chisomoguibe/Projects/hof/sandbox/apps/sandbox/behaviours/country-select.js","/Users/chisomoguibe/Projects/hof/frontend/template-mixins/mixins/index.js","/Users/chisomoguibe/Projects/hof/frontend/template-mixins/mixins/template-mixins.js","/Users/chisomoguibe/Projects/hof/frontend/template-mixins/mixins/render.js","/Users/chisomoguibe/Projects/hof/frontend/template-mixins/mixins/helpers.js","/Users/chisomoguibe/Projects/hof/index.js","/Users/chisomoguibe/Projects/hof/frontend/index.js","/Users/chisomoguibe/Projects/hof/frontend/govuk-template/index.js","/Users/chisomoguibe/Projects/hof/frontend/govuk-template/build/index.js","/Users/chisomoguibe/Projects/hof/frontend/govuk-template/build/config.js","/Users/chisomoguibe/Projects/hof/frontend/template-partials/index.js","/Users/chisomoguibe/Projects/hof/frontend/template-partials/translations/index.js","/Users/chisomoguibe/Projects/hof/frontend/themes/index.js","/Users/chisomoguibe/Projects/hof/frontend/themes/gov-uk/index.js","/Users/chisomoguibe/Projects/hof/frontend/toolkit/index.js","/Users/chisomoguibe/Projects/hof/frontend/toolkit/assets/javascript/helpers.js","/Users/chisomoguibe/Projects/hof/frontend/toolkit/assets/javascript/form-focus.js","/Users/chisomoguibe/Projects/hof/frontend/toolkit/assets/javascript/progressive-reveal.js","/Users/chisomoguibe/Projects/hof/frontend/toolkit/assets/javascript/validation.js","/Users/chisomoguibe/Projects/hof/frontend/toolkit/assets/javascript/character-count.js","/Users/chisomoguibe/Projects/hof/middleware/index.js","/Users/chisomoguibe/Projects/hof/middleware/cookies.js","/Users/chisomoguibe/Projects/hof/middleware/errors.js","/Users/chisomoguibe/Projects/hof/middleware/not-found.js","/Users/chisomoguibe/Projects/hof/middleware/deep-translate.js","/Users/chisomoguibe/Projects/hof/lib/markdown.js","/Users/chisomoguibe/Projects/hof/lib/router.js","/Users/chisomoguibe/Projects/hof/wizard/index.js","/Users/chisomoguibe/Projects/hof/wizard/behaviours/index.js","/Users/chisomoguibe/Projects/hof/wizard/behaviours/complete.js","/Users/chisomoguibe/Projects/hof/wizard/util/constants.js","/Users/chisomoguibe/Projects/hof/lib/helpers.js","/Users/chisomoguibe/Projects/hof/lib/health.js","/Users/chisomoguibe/Projects/hof/lib/serve-static.js","/Users/chisomoguibe/Projects/hof/lib/ga-tag.js","/Users/chisomoguibe/Projects/hof/lib/sessions.js","/Users/chisomoguibe/Projects/hof/lib/settings.js","/Users/chisomoguibe/Projects/hof/lib/logger.js","/Users/chisomoguibe/Projects/hof/build/index.js","/Users/chisomoguibe/Projects/hof/config/builder-defaults.js","/Users/chisomoguibe/Projects/hof/transpiler/index.js","/Users/chisomoguibe/Projects/hof/transpiler/lib/compile.js","/Users/chisomoguibe/Projects/hof/transpiler/lib/build.js","/Users/chisomoguibe/Projects/hof/transpiler/lib/expand-dirs.js","/Users/chisomoguibe/Projects/hof/transpiler/lib/aggregate.js","/Users/chisomoguibe/Projects/hof/transpiler/lib/write-files.js","/Users/chisomoguibe/Projects/hof/model/apis/index.js","/Users/chisomoguibe/Projects/hof/model/apis/html-to-pdf-converter.js","/Users/chisomoguibe/Projects/hof/wizard/model.js","/Users/chisomoguibe/Projects/hof/wizard/middleware/back-links.js","/Users/chisomoguibe/Projects/hof/wizard/util/helpers.js","/Users/chisomoguibe/Projects/hof/wizard/middleware/check-complete.js","/Users/chisomoguibe/Projects/hof/wizard/middleware/check-progress.js","/Users/chisomoguibe/Projects/hof/wizard/middleware/check-session.js","/Users/chisomoguibe/Projects/hof/wizard/middleware/csrf.js","/Users/chisomoguibe/Projects/hof/sandbox/test/_unit/example_app/sections/summary-data-sections.spec.js","/Users/chisomoguibe/Projects/hof/sandbox/apps/sandbox/sections/summary-data-sections.js","/Users/chisomoguibe/Projects/hof/sandbox/apps/sandbox/lib/staticAppealStages.js","/Users/chisomoguibe/Projects/hof/sandbox/apps/sandbox/fields.js","/Users/chisomoguibe/Projects/hof/sandbox/test/helpers/utilities.js","/Users/chisomoguibe/Projects/hof/sandbox/apps/sandbox/behaviours/international-number.js","/Users/chisomoguibe/Projects/hof/lib/encryption.js","/Users/chisomoguibe/Projects/hof/wizard/middleware/session.js","/Users/chisomoguibe/Projects/hof/wizard/middleware/session-model.js"]}
|
@@ -1 +1 @@
|
|
1
|
-
{"processes":{"c84e394d-abf7-4aea-99aa-36427e671442":{"parent":null,"children":[]}},"files":{"/Users/chisomoguibe/Projects/hof/model/index.js":["c84e394d-abf7-4aea-99aa-36427e671442"],"/Users/chisomoguibe/Projects/hof/components/index.js":["c84e394d-abf7-4aea-99aa-36427e671442"],"/Users/chisomoguibe/Projects/hof/components/address-lookup/index.js":["c84e394d-abf7-4aea-99aa-36427e671442"],"/Users/chisomoguibe/Projects/hof/components/address-lookup/default-model.js":["c84e394d-abf7-4aea-99aa-36427e671442"],"/Users/chisomoguibe/Projects/hof/components/address-lookup/defaults.js":["c84e394d-abf7-4aea-99aa-36427e671442"],"/Users/chisomoguibe/Projects/hof/components/clear-session/index.js":["c84e394d-abf7-4aea-99aa-36427e671442"],"/Users/chisomoguibe/Projects/hof/components/combine-and-loop-fields/index.js":["c84e394d-abf7-4aea-99aa-36427e671442"],"/Users/chisomoguibe/Projects/hof/components/date/index.js":["c84e394d-abf7-4aea-99aa-36427e671442"],"/Users/chisomoguibe/Projects/hof/components/date/fields.js":["c84e394d-abf7-4aea-99aa-36427e671442"],"/Users/chisomoguibe/Projects/hof/components/emailer/index.js":["c84e394d-abf7-4aea-99aa-36427e671442"],"/Users/chisomoguibe/Projects/hof/components/emailer/email-service.js":["c84e394d-abf7-4aea-99aa-36427e671442"],"/Users/chisomoguibe/Projects/hof/components/emailer/emailer.js":["c84e394d-abf7-4aea-99aa-36427e671442"],"/Users/chisomoguibe/Projects/hof/components/emailer/transports/index.js":["c84e394d-abf7-4aea-99aa-36427e671442"],"/Users/chisomoguibe/Projects/hof/components/emailer/transports/smtp.js":["c84e394d-abf7-4aea-99aa-36427e671442"],"/Users/chisomoguibe/Projects/hof/components/emailer/transports/ses.js":["c84e394d-abf7-4aea-99aa-36427e671442"],"/Users/chisomoguibe/Projects/hof/components/emailer/transports/stub.js":["c84e394d-abf7-4aea-99aa-36427e671442"],"/Users/chisomoguibe/Projects/hof/components/emailer/transports/debug.js":["c84e394d-abf7-4aea-99aa-36427e671442"],"/Users/chisomoguibe/Projects/hof/components/homeoffice-countries/index.js":["c84e394d-abf7-4aea-99aa-36427e671442"],"/Users/chisomoguibe/Projects/hof/config/component-defaults.js":["c84e394d-abf7-4aea-99aa-36427e671442"],"/Users/chisomoguibe/Projects/hof/components/notify/index.js":["c84e394d-abf7-4aea-99aa-36427e671442"],"/Users/chisomoguibe/Projects/hof/components/notify/notify.js":["c84e394d-abf7-4aea-99aa-36427e671442"],"/Users/chisomoguibe/Projects/hof/components/summary/index.js":["c84e394d-abf7-4aea-99aa-36427e671442"],"/Users/chisomoguibe/Projects/hof/config/rate-limits.js":["c84e394d-abf7-4aea-99aa-36427e671442"],"/Users/chisomoguibe/Projects/hof/middleware/rate-limiter.js":["c84e394d-abf7-4aea-99aa-36427e671442"],"/Users/chisomoguibe/Projects/hof/config/hof-defaults.js":["c84e394d-abf7-4aea-99aa-36427e671442"],"/Users/chisomoguibe/Projects/hof/controller/base-controller.js":["c84e394d-abf7-4aea-99aa-36427e671442"],"/Users/chisomoguibe/Projects/hof/controller/formatting/index.js":["c84e394d-abf7-4aea-99aa-36427e671442"],"/Users/chisomoguibe/Projects/hof/controller/validation/index.js":["c84e394d-abf7-4aea-99aa-36427e671442"],"/Users/chisomoguibe/Projects/hof/controller/validation/validators.js":["c84e394d-abf7-4aea-99aa-36427e671442"],"/Users/chisomoguibe/Projects/hof/controller/validation/email.js":["c84e394d-abf7-4aea-99aa-36427e671442"],"/Users/chisomoguibe/Projects/hof/controller/validation-error.js":["c84e394d-abf7-4aea-99aa-36427e671442"],"/Users/chisomoguibe/Projects/hof/utilities/index.js":["c84e394d-abf7-4aea-99aa-36427e671442"],"/Users/chisomoguibe/Projects/hof/utilities/autofill/index.js":["c84e394d-abf7-4aea-99aa-36427e671442"],"/Users/chisomoguibe/Projects/hof/utilities/autofill/inputs.js":["c84e394d-abf7-4aea-99aa-36427e671442"],"/Users/chisomoguibe/Projects/hof/utilities/test-data/index.js":["c84e394d-abf7-4aea-99aa-36427e671442"],"/Users/chisomoguibe/Projects/hof/utilities/countries.js":["c84e394d-abf7-4aea-99aa-36427e671442"],"/Users/chisomoguibe/Projects/hof/utilities/helpers/index.js":["c84e394d-abf7-4aea-99aa-36427e671442"],"/Users/chisomoguibe/Projects/hof/utilities/reqres/index.js":["c84e394d-abf7-4aea-99aa-36427e671442"],"/Users/chisomoguibe/Projects/hof/config/sanitisation-rules.js":["c84e394d-abf7-4aea-99aa-36427e671442"],"/Users/chisomoguibe/Projects/hof/controller/formatting/formatters.js":["c84e394d-abf7-4aea-99aa-36427e671442"],"/Users/chisomoguibe/Projects/hof/controller/index.js":["c84e394d-abf7-4aea-99aa-36427e671442"],"/Users/chisomoguibe/Projects/hof/controller/behaviour-session.js":["c84e394d-abf7-4aea-99aa-36427e671442"],"/Users/chisomoguibe/Projects/hof/controller/behaviour-hooks.js":["c84e394d-abf7-4aea-99aa-36427e671442"],"/Users/chisomoguibe/Projects/hof/controller/controller.js":["c84e394d-abf7-4aea-99aa-36427e671442"],"/Users/chisomoguibe/Projects/hof/sandbox/apps/sandbox/behaviours/country-select.js":["c84e394d-abf7-4aea-99aa-36427e671442"],"/Users/chisomoguibe/Projects/hof/frontend/template-mixins/mixins/index.js":["c84e394d-abf7-4aea-99aa-36427e671442"],"/Users/chisomoguibe/Projects/hof/frontend/template-mixins/mixins/template-mixins.js":["c84e394d-abf7-4aea-99aa-36427e671442"],"/Users/chisomoguibe/Projects/hof/frontend/template-mixins/mixins/render.js":["c84e394d-abf7-4aea-99aa-36427e671442"],"/Users/chisomoguibe/Projects/hof/frontend/template-mixins/mixins/helpers.js":["c84e394d-abf7-4aea-99aa-36427e671442"],"/Users/chisomoguibe/Projects/hof/index.js":["c84e394d-abf7-4aea-99aa-36427e671442"],"/Users/chisomoguibe/Projects/hof/frontend/index.js":["c84e394d-abf7-4aea-99aa-36427e671442"],"/Users/chisomoguibe/Projects/hof/frontend/govuk-template/index.js":["c84e394d-abf7-4aea-99aa-36427e671442"],"/Users/chisomoguibe/Projects/hof/frontend/govuk-template/build/index.js":["c84e394d-abf7-4aea-99aa-36427e671442"],"/Users/chisomoguibe/Projects/hof/frontend/govuk-template/build/config.js":["c84e394d-abf7-4aea-99aa-36427e671442"],"/Users/chisomoguibe/Projects/hof/frontend/template-partials/index.js":["c84e394d-abf7-4aea-99aa-36427e671442"],"/Users/chisomoguibe/Projects/hof/frontend/template-partials/translations/index.js":["c84e394d-abf7-4aea-99aa-36427e671442"],"/Users/chisomoguibe/Projects/hof/frontend/themes/index.js":["c84e394d-abf7-4aea-99aa-36427e671442"],"/Users/chisomoguibe/Projects/hof/frontend/themes/gov-uk/index.js":["c84e394d-abf7-4aea-99aa-36427e671442"],"/Users/chisomoguibe/Projects/hof/frontend/toolkit/index.js":["c84e394d-abf7-4aea-99aa-36427e671442"],"/Users/chisomoguibe/Projects/hof/frontend/toolkit/assets/javascript/helpers.js":["c84e394d-abf7-4aea-99aa-36427e671442"],"/Users/chisomoguibe/Projects/hof/frontend/toolkit/assets/javascript/form-focus.js":["c84e394d-abf7-4aea-99aa-36427e671442"],"/Users/chisomoguibe/Projects/hof/frontend/toolkit/assets/javascript/progressive-reveal.js":["c84e394d-abf7-4aea-99aa-36427e671442"],"/Users/chisomoguibe/Projects/hof/frontend/toolkit/assets/javascript/validation.js":["c84e394d-abf7-4aea-99aa-36427e671442"],"/Users/chisomoguibe/Projects/hof/frontend/toolkit/assets/javascript/character-count.js":["c84e394d-abf7-4aea-99aa-36427e671442"],"/Users/chisomoguibe/Projects/hof/middleware/index.js":["c84e394d-abf7-4aea-99aa-36427e671442"],"/Users/chisomoguibe/Projects/hof/middleware/cookies.js":["c84e394d-abf7-4aea-99aa-36427e671442"],"/Users/chisomoguibe/Projects/hof/middleware/errors.js":["c84e394d-abf7-4aea-99aa-36427e671442"],"/Users/chisomoguibe/Projects/hof/middleware/not-found.js":["c84e394d-abf7-4aea-99aa-36427e671442"],"/Users/chisomoguibe/Projects/hof/middleware/deep-translate.js":["c84e394d-abf7-4aea-99aa-36427e671442"],"/Users/chisomoguibe/Projects/hof/lib/markdown.js":["c84e394d-abf7-4aea-99aa-36427e671442"],"/Users/chisomoguibe/Projects/hof/lib/router.js":["c84e394d-abf7-4aea-99aa-36427e671442"],"/Users/chisomoguibe/Projects/hof/wizard/index.js":["c84e394d-abf7-4aea-99aa-36427e671442"],"/Users/chisomoguibe/Projects/hof/wizard/behaviours/index.js":["c84e394d-abf7-4aea-99aa-36427e671442"],"/Users/chisomoguibe/Projects/hof/wizard/behaviours/complete.js":["c84e394d-abf7-4aea-99aa-36427e671442"],"/Users/chisomoguibe/Projects/hof/wizard/util/constants.js":["c84e394d-abf7-4aea-99aa-36427e671442"],"/Users/chisomoguibe/Projects/hof/lib/helpers.js":["c84e394d-abf7-4aea-99aa-36427e671442"],"/Users/chisomoguibe/Projects/hof/lib/health.js":["c84e394d-abf7-4aea-99aa-36427e671442"],"/Users/chisomoguibe/Projects/hof/lib/serve-static.js":["c84e394d-abf7-4aea-99aa-36427e671442"],"/Users/chisomoguibe/Projects/hof/lib/ga-tag.js":["c84e394d-abf7-4aea-99aa-36427e671442"],"/Users/chisomoguibe/Projects/hof/lib/sessions.js":["c84e394d-abf7-4aea-99aa-36427e671442"],"/Users/chisomoguibe/Projects/hof/lib/settings.js":["c84e394d-abf7-4aea-99aa-36427e671442"],"/Users/chisomoguibe/Projects/hof/lib/logger.js":["c84e394d-abf7-4aea-99aa-36427e671442"],"/Users/chisomoguibe/Projects/hof/build/index.js":["c84e394d-abf7-4aea-99aa-36427e671442"],"/Users/chisomoguibe/Projects/hof/config/builder-defaults.js":["c84e394d-abf7-4aea-99aa-36427e671442"],"/Users/chisomoguibe/Projects/hof/transpiler/index.js":["c84e394d-abf7-4aea-99aa-36427e671442"],"/Users/chisomoguibe/Projects/hof/transpiler/lib/compile.js":["c84e394d-abf7-4aea-99aa-36427e671442"],"/Users/chisomoguibe/Projects/hof/transpiler/lib/build.js":["c84e394d-abf7-4aea-99aa-36427e671442"],"/Users/chisomoguibe/Projects/hof/transpiler/lib/expand-dirs.js":["c84e394d-abf7-4aea-99aa-36427e671442"],"/Users/chisomoguibe/Projects/hof/transpiler/lib/aggregate.js":["c84e394d-abf7-4aea-99aa-36427e671442"],"/Users/chisomoguibe/Projects/hof/transpiler/lib/write-files.js":["c84e394d-abf7-4aea-99aa-36427e671442"],"/Users/chisomoguibe/Projects/hof/model/apis/index.js":["c84e394d-abf7-4aea-99aa-36427e671442"],"/Users/chisomoguibe/Projects/hof/model/apis/html-to-pdf-converter.js":["c84e394d-abf7-4aea-99aa-36427e671442"],"/Users/chisomoguibe/Projects/hof/wizard/model.js":["c84e394d-abf7-4aea-99aa-36427e671442"],"/Users/chisomoguibe/Projects/hof/wizard/middleware/back-links.js":["c84e394d-abf7-4aea-99aa-36427e671442"],"/Users/chisomoguibe/Projects/hof/wizard/util/helpers.js":["c84e394d-abf7-4aea-99aa-36427e671442"],"/Users/chisomoguibe/Projects/hof/wizard/middleware/check-complete.js":["c84e394d-abf7-4aea-99aa-36427e671442"],"/Users/chisomoguibe/Projects/hof/wizard/middleware/check-progress.js":["c84e394d-abf7-4aea-99aa-36427e671442"],"/Users/chisomoguibe/Projects/hof/wizard/middleware/check-session.js":["c84e394d-abf7-4aea-99aa-36427e671442"],"/Users/chisomoguibe/Projects/hof/wizard/middleware/csrf.js":["c84e394d-abf7-4aea-99aa-36427e671442"],"/Users/chisomoguibe/Projects/hof/sandbox/test/_unit/example_app/sections/summary-data-sections.spec.js":["c84e394d-abf7-4aea-99aa-36427e671442"],"/Users/chisomoguibe/Projects/hof/sandbox/apps/sandbox/sections/summary-data-sections.js":["c84e394d-abf7-4aea-99aa-36427e671442"],"/Users/chisomoguibe/Projects/hof/sandbox/apps/sandbox/lib/staticAppealStages.js":["c84e394d-abf7-4aea-99aa-36427e671442"],"/Users/chisomoguibe/Projects/hof/sandbox/apps/sandbox/fields.js":["c84e394d-abf7-4aea-99aa-36427e671442"],"/Users/chisomoguibe/Projects/hof/sandbox/test/helpers/utilities.js":["c84e394d-abf7-4aea-99aa-36427e671442"],"/Users/chisomoguibe/Projects/hof/sandbox/apps/sandbox/behaviours/international-number.js":["c84e394d-abf7-4aea-99aa-36427e671442"],"/Users/chisomoguibe/Projects/hof/lib/encryption.js":["c84e394d-abf7-4aea-99aa-36427e671442"],"/Users/chisomoguibe/Projects/hof/wizard/middleware/session.js":["c84e394d-abf7-4aea-99aa-36427e671442"],"/Users/chisomoguibe/Projects/hof/wizard/middleware/session-model.js":["c84e394d-abf7-4aea-99aa-36427e671442"]},"externalIds":{}}
|
1
|
+
{"processes":{"2194bc4f-7454-4356-80e2-e52a7dc798aa":{"parent":null,"children":[]}},"files":{"/Users/chisomoguibe/Projects/hof/model/index.js":["2194bc4f-7454-4356-80e2-e52a7dc798aa"],"/Users/chisomoguibe/Projects/hof/components/index.js":["2194bc4f-7454-4356-80e2-e52a7dc798aa"],"/Users/chisomoguibe/Projects/hof/components/address-lookup/index.js":["2194bc4f-7454-4356-80e2-e52a7dc798aa"],"/Users/chisomoguibe/Projects/hof/components/address-lookup/default-model.js":["2194bc4f-7454-4356-80e2-e52a7dc798aa"],"/Users/chisomoguibe/Projects/hof/components/address-lookup/defaults.js":["2194bc4f-7454-4356-80e2-e52a7dc798aa"],"/Users/chisomoguibe/Projects/hof/components/clear-session/index.js":["2194bc4f-7454-4356-80e2-e52a7dc798aa"],"/Users/chisomoguibe/Projects/hof/components/combine-and-loop-fields/index.js":["2194bc4f-7454-4356-80e2-e52a7dc798aa"],"/Users/chisomoguibe/Projects/hof/components/date/index.js":["2194bc4f-7454-4356-80e2-e52a7dc798aa"],"/Users/chisomoguibe/Projects/hof/components/date/fields.js":["2194bc4f-7454-4356-80e2-e52a7dc798aa"],"/Users/chisomoguibe/Projects/hof/components/emailer/index.js":["2194bc4f-7454-4356-80e2-e52a7dc798aa"],"/Users/chisomoguibe/Projects/hof/components/emailer/email-service.js":["2194bc4f-7454-4356-80e2-e52a7dc798aa"],"/Users/chisomoguibe/Projects/hof/components/emailer/emailer.js":["2194bc4f-7454-4356-80e2-e52a7dc798aa"],"/Users/chisomoguibe/Projects/hof/components/emailer/transports/index.js":["2194bc4f-7454-4356-80e2-e52a7dc798aa"],"/Users/chisomoguibe/Projects/hof/components/emailer/transports/smtp.js":["2194bc4f-7454-4356-80e2-e52a7dc798aa"],"/Users/chisomoguibe/Projects/hof/components/emailer/transports/ses.js":["2194bc4f-7454-4356-80e2-e52a7dc798aa"],"/Users/chisomoguibe/Projects/hof/components/emailer/transports/stub.js":["2194bc4f-7454-4356-80e2-e52a7dc798aa"],"/Users/chisomoguibe/Projects/hof/components/emailer/transports/debug.js":["2194bc4f-7454-4356-80e2-e52a7dc798aa"],"/Users/chisomoguibe/Projects/hof/components/homeoffice-countries/index.js":["2194bc4f-7454-4356-80e2-e52a7dc798aa"],"/Users/chisomoguibe/Projects/hof/config/component-defaults.js":["2194bc4f-7454-4356-80e2-e52a7dc798aa"],"/Users/chisomoguibe/Projects/hof/components/notify/index.js":["2194bc4f-7454-4356-80e2-e52a7dc798aa"],"/Users/chisomoguibe/Projects/hof/components/notify/notify.js":["2194bc4f-7454-4356-80e2-e52a7dc798aa"],"/Users/chisomoguibe/Projects/hof/components/summary/index.js":["2194bc4f-7454-4356-80e2-e52a7dc798aa"],"/Users/chisomoguibe/Projects/hof/config/rate-limits.js":["2194bc4f-7454-4356-80e2-e52a7dc798aa"],"/Users/chisomoguibe/Projects/hof/middleware/rate-limiter.js":["2194bc4f-7454-4356-80e2-e52a7dc798aa"],"/Users/chisomoguibe/Projects/hof/config/hof-defaults.js":["2194bc4f-7454-4356-80e2-e52a7dc798aa"],"/Users/chisomoguibe/Projects/hof/controller/base-controller.js":["2194bc4f-7454-4356-80e2-e52a7dc798aa"],"/Users/chisomoguibe/Projects/hof/controller/formatting/index.js":["2194bc4f-7454-4356-80e2-e52a7dc798aa"],"/Users/chisomoguibe/Projects/hof/controller/validation/index.js":["2194bc4f-7454-4356-80e2-e52a7dc798aa"],"/Users/chisomoguibe/Projects/hof/controller/validation/validators.js":["2194bc4f-7454-4356-80e2-e52a7dc798aa"],"/Users/chisomoguibe/Projects/hof/controller/validation/email.js":["2194bc4f-7454-4356-80e2-e52a7dc798aa"],"/Users/chisomoguibe/Projects/hof/controller/validation-error.js":["2194bc4f-7454-4356-80e2-e52a7dc798aa"],"/Users/chisomoguibe/Projects/hof/utilities/index.js":["2194bc4f-7454-4356-80e2-e52a7dc798aa"],"/Users/chisomoguibe/Projects/hof/utilities/autofill/index.js":["2194bc4f-7454-4356-80e2-e52a7dc798aa"],"/Users/chisomoguibe/Projects/hof/utilities/autofill/inputs.js":["2194bc4f-7454-4356-80e2-e52a7dc798aa"],"/Users/chisomoguibe/Projects/hof/utilities/test-data/index.js":["2194bc4f-7454-4356-80e2-e52a7dc798aa"],"/Users/chisomoguibe/Projects/hof/utilities/countries.js":["2194bc4f-7454-4356-80e2-e52a7dc798aa"],"/Users/chisomoguibe/Projects/hof/utilities/helpers/index.js":["2194bc4f-7454-4356-80e2-e52a7dc798aa"],"/Users/chisomoguibe/Projects/hof/utilities/reqres/index.js":["2194bc4f-7454-4356-80e2-e52a7dc798aa"],"/Users/chisomoguibe/Projects/hof/config/sanitisation-rules.js":["2194bc4f-7454-4356-80e2-e52a7dc798aa"],"/Users/chisomoguibe/Projects/hof/controller/formatting/formatters.js":["2194bc4f-7454-4356-80e2-e52a7dc798aa"],"/Users/chisomoguibe/Projects/hof/controller/index.js":["2194bc4f-7454-4356-80e2-e52a7dc798aa"],"/Users/chisomoguibe/Projects/hof/controller/behaviour-session.js":["2194bc4f-7454-4356-80e2-e52a7dc798aa"],"/Users/chisomoguibe/Projects/hof/controller/behaviour-hooks.js":["2194bc4f-7454-4356-80e2-e52a7dc798aa"],"/Users/chisomoguibe/Projects/hof/controller/controller.js":["2194bc4f-7454-4356-80e2-e52a7dc798aa"],"/Users/chisomoguibe/Projects/hof/sandbox/apps/sandbox/behaviours/country-select.js":["2194bc4f-7454-4356-80e2-e52a7dc798aa"],"/Users/chisomoguibe/Projects/hof/frontend/template-mixins/mixins/index.js":["2194bc4f-7454-4356-80e2-e52a7dc798aa"],"/Users/chisomoguibe/Projects/hof/frontend/template-mixins/mixins/template-mixins.js":["2194bc4f-7454-4356-80e2-e52a7dc798aa"],"/Users/chisomoguibe/Projects/hof/frontend/template-mixins/mixins/render.js":["2194bc4f-7454-4356-80e2-e52a7dc798aa"],"/Users/chisomoguibe/Projects/hof/frontend/template-mixins/mixins/helpers.js":["2194bc4f-7454-4356-80e2-e52a7dc798aa"],"/Users/chisomoguibe/Projects/hof/index.js":["2194bc4f-7454-4356-80e2-e52a7dc798aa"],"/Users/chisomoguibe/Projects/hof/frontend/index.js":["2194bc4f-7454-4356-80e2-e52a7dc798aa"],"/Users/chisomoguibe/Projects/hof/frontend/govuk-template/index.js":["2194bc4f-7454-4356-80e2-e52a7dc798aa"],"/Users/chisomoguibe/Projects/hof/frontend/govuk-template/build/index.js":["2194bc4f-7454-4356-80e2-e52a7dc798aa"],"/Users/chisomoguibe/Projects/hof/frontend/govuk-template/build/config.js":["2194bc4f-7454-4356-80e2-e52a7dc798aa"],"/Users/chisomoguibe/Projects/hof/frontend/template-partials/index.js":["2194bc4f-7454-4356-80e2-e52a7dc798aa"],"/Users/chisomoguibe/Projects/hof/frontend/template-partials/translations/index.js":["2194bc4f-7454-4356-80e2-e52a7dc798aa"],"/Users/chisomoguibe/Projects/hof/frontend/themes/index.js":["2194bc4f-7454-4356-80e2-e52a7dc798aa"],"/Users/chisomoguibe/Projects/hof/frontend/themes/gov-uk/index.js":["2194bc4f-7454-4356-80e2-e52a7dc798aa"],"/Users/chisomoguibe/Projects/hof/frontend/toolkit/index.js":["2194bc4f-7454-4356-80e2-e52a7dc798aa"],"/Users/chisomoguibe/Projects/hof/frontend/toolkit/assets/javascript/helpers.js":["2194bc4f-7454-4356-80e2-e52a7dc798aa"],"/Users/chisomoguibe/Projects/hof/frontend/toolkit/assets/javascript/form-focus.js":["2194bc4f-7454-4356-80e2-e52a7dc798aa"],"/Users/chisomoguibe/Projects/hof/frontend/toolkit/assets/javascript/progressive-reveal.js":["2194bc4f-7454-4356-80e2-e52a7dc798aa"],"/Users/chisomoguibe/Projects/hof/frontend/toolkit/assets/javascript/validation.js":["2194bc4f-7454-4356-80e2-e52a7dc798aa"],"/Users/chisomoguibe/Projects/hof/frontend/toolkit/assets/javascript/character-count.js":["2194bc4f-7454-4356-80e2-e52a7dc798aa"],"/Users/chisomoguibe/Projects/hof/middleware/index.js":["2194bc4f-7454-4356-80e2-e52a7dc798aa"],"/Users/chisomoguibe/Projects/hof/middleware/cookies.js":["2194bc4f-7454-4356-80e2-e52a7dc798aa"],"/Users/chisomoguibe/Projects/hof/middleware/errors.js":["2194bc4f-7454-4356-80e2-e52a7dc798aa"],"/Users/chisomoguibe/Projects/hof/middleware/not-found.js":["2194bc4f-7454-4356-80e2-e52a7dc798aa"],"/Users/chisomoguibe/Projects/hof/middleware/deep-translate.js":["2194bc4f-7454-4356-80e2-e52a7dc798aa"],"/Users/chisomoguibe/Projects/hof/lib/markdown.js":["2194bc4f-7454-4356-80e2-e52a7dc798aa"],"/Users/chisomoguibe/Projects/hof/lib/router.js":["2194bc4f-7454-4356-80e2-e52a7dc798aa"],"/Users/chisomoguibe/Projects/hof/wizard/index.js":["2194bc4f-7454-4356-80e2-e52a7dc798aa"],"/Users/chisomoguibe/Projects/hof/wizard/behaviours/index.js":["2194bc4f-7454-4356-80e2-e52a7dc798aa"],"/Users/chisomoguibe/Projects/hof/wizard/behaviours/complete.js":["2194bc4f-7454-4356-80e2-e52a7dc798aa"],"/Users/chisomoguibe/Projects/hof/wizard/util/constants.js":["2194bc4f-7454-4356-80e2-e52a7dc798aa"],"/Users/chisomoguibe/Projects/hof/lib/helpers.js":["2194bc4f-7454-4356-80e2-e52a7dc798aa"],"/Users/chisomoguibe/Projects/hof/lib/health.js":["2194bc4f-7454-4356-80e2-e52a7dc798aa"],"/Users/chisomoguibe/Projects/hof/lib/serve-static.js":["2194bc4f-7454-4356-80e2-e52a7dc798aa"],"/Users/chisomoguibe/Projects/hof/lib/ga-tag.js":["2194bc4f-7454-4356-80e2-e52a7dc798aa"],"/Users/chisomoguibe/Projects/hof/lib/sessions.js":["2194bc4f-7454-4356-80e2-e52a7dc798aa"],"/Users/chisomoguibe/Projects/hof/lib/settings.js":["2194bc4f-7454-4356-80e2-e52a7dc798aa"],"/Users/chisomoguibe/Projects/hof/lib/logger.js":["2194bc4f-7454-4356-80e2-e52a7dc798aa"],"/Users/chisomoguibe/Projects/hof/build/index.js":["2194bc4f-7454-4356-80e2-e52a7dc798aa"],"/Users/chisomoguibe/Projects/hof/config/builder-defaults.js":["2194bc4f-7454-4356-80e2-e52a7dc798aa"],"/Users/chisomoguibe/Projects/hof/transpiler/index.js":["2194bc4f-7454-4356-80e2-e52a7dc798aa"],"/Users/chisomoguibe/Projects/hof/transpiler/lib/compile.js":["2194bc4f-7454-4356-80e2-e52a7dc798aa"],"/Users/chisomoguibe/Projects/hof/transpiler/lib/build.js":["2194bc4f-7454-4356-80e2-e52a7dc798aa"],"/Users/chisomoguibe/Projects/hof/transpiler/lib/expand-dirs.js":["2194bc4f-7454-4356-80e2-e52a7dc798aa"],"/Users/chisomoguibe/Projects/hof/transpiler/lib/aggregate.js":["2194bc4f-7454-4356-80e2-e52a7dc798aa"],"/Users/chisomoguibe/Projects/hof/transpiler/lib/write-files.js":["2194bc4f-7454-4356-80e2-e52a7dc798aa"],"/Users/chisomoguibe/Projects/hof/model/apis/index.js":["2194bc4f-7454-4356-80e2-e52a7dc798aa"],"/Users/chisomoguibe/Projects/hof/model/apis/html-to-pdf-converter.js":["2194bc4f-7454-4356-80e2-e52a7dc798aa"],"/Users/chisomoguibe/Projects/hof/wizard/model.js":["2194bc4f-7454-4356-80e2-e52a7dc798aa"],"/Users/chisomoguibe/Projects/hof/wizard/middleware/back-links.js":["2194bc4f-7454-4356-80e2-e52a7dc798aa"],"/Users/chisomoguibe/Projects/hof/wizard/util/helpers.js":["2194bc4f-7454-4356-80e2-e52a7dc798aa"],"/Users/chisomoguibe/Projects/hof/wizard/middleware/check-complete.js":["2194bc4f-7454-4356-80e2-e52a7dc798aa"],"/Users/chisomoguibe/Projects/hof/wizard/middleware/check-progress.js":["2194bc4f-7454-4356-80e2-e52a7dc798aa"],"/Users/chisomoguibe/Projects/hof/wizard/middleware/check-session.js":["2194bc4f-7454-4356-80e2-e52a7dc798aa"],"/Users/chisomoguibe/Projects/hof/wizard/middleware/csrf.js":["2194bc4f-7454-4356-80e2-e52a7dc798aa"],"/Users/chisomoguibe/Projects/hof/sandbox/test/_unit/example_app/sections/summary-data-sections.spec.js":["2194bc4f-7454-4356-80e2-e52a7dc798aa"],"/Users/chisomoguibe/Projects/hof/sandbox/apps/sandbox/sections/summary-data-sections.js":["2194bc4f-7454-4356-80e2-e52a7dc798aa"],"/Users/chisomoguibe/Projects/hof/sandbox/apps/sandbox/lib/staticAppealStages.js":["2194bc4f-7454-4356-80e2-e52a7dc798aa"],"/Users/chisomoguibe/Projects/hof/sandbox/apps/sandbox/fields.js":["2194bc4f-7454-4356-80e2-e52a7dc798aa"],"/Users/chisomoguibe/Projects/hof/sandbox/test/helpers/utilities.js":["2194bc4f-7454-4356-80e2-e52a7dc798aa"],"/Users/chisomoguibe/Projects/hof/sandbox/apps/sandbox/behaviours/international-number.js":["2194bc4f-7454-4356-80e2-e52a7dc798aa"],"/Users/chisomoguibe/Projects/hof/lib/encryption.js":["2194bc4f-7454-4356-80e2-e52a7dc798aa"],"/Users/chisomoguibe/Projects/hof/wizard/middleware/session.js":["2194bc4f-7454-4356-80e2-e52a7dc798aa"],"/Users/chisomoguibe/Projects/hof/wizard/middleware/session-model.js":["2194bc4f-7454-4356-80e2-e52a7dc798aa"]},"externalIds":{}}
|
package/README.md
CHANGED
@@ -311,7 +311,7 @@ my-application/translations/en/default.json
|
|
311
311
|
}
|
312
312
|
```
|
313
313
|
|
314
|
-
#HOF Controller
|
314
|
+
# HOF Controller
|
315
315
|
|
316
316
|
Implements a request pipeline for GET and POST of forms, with input cleaning/formatting and validation.
|
317
317
|
|
@@ -482,13 +482,13 @@ let error = new ErrorClass(this.missingDoB, {
|
|
482
482
|
});
|
483
483
|
```
|
484
484
|
|
485
|
-
##hof-behaviour-session
|
485
|
+
## hof-behaviour-session
|
486
486
|
|
487
487
|
HOF Behaviour for reading and writing to the session
|
488
488
|
|
489
|
-
##Usage
|
489
|
+
## Usage
|
490
490
|
|
491
|
-
###With [mixwith.js](https://github.com/justinfagnani/mixwith.js)
|
491
|
+
### With [mixwith.js](https://github.com/justinfagnani/mixwith.js)
|
492
492
|
|
493
493
|
```js
|
494
494
|
const mix = require('mixwith').mix;
|
@@ -502,7 +502,7 @@ class MyController extends mix(BaseController).with(Session) {
|
|
502
502
|
|
503
503
|
`MyController` now extends `hof-form-controller` and has `hof-behaviour-session` functionality mixed in.
|
504
504
|
|
505
|
-
##Functionality
|
505
|
+
## Functionality
|
506
506
|
|
507
507
|
This mixin extends `hof-form-controller` by persisting the form data to the `sessionModel` - assuming the [session-model](https://github.com/UKHomeOfficeForms/hof-form-wizard/blob/master/lib/middleware/session-model.js) middleware has been applied.
|
508
508
|
|
@@ -516,13 +516,13 @@ The following form controller methods are used:
|
|
516
516
|
- `missingPrereqHandler(req, res)` - Error handler called when a `MISSING_PREREQ` error is thrown from the [check-progress](https://github.com/UKHomeOfficeForms/hof-form-wizard/blob/master/lib/middleware/check-progress.js) middleware. This occurs if a step is visited out of sequence. This error handler causes the user to be redirected to the last completed step, or the first step if none have been completed.
|
517
517
|
- `errorHandler(err, req, res, next)` - checks if `err.code` is `MISSING_PREREQ`, if so calls `missingPrereqHandler`, if not calls `super` to hand over to parent error handler.
|
518
518
|
|
519
|
-
##
|
519
|
+
## Behaviour-hooks
|
520
520
|
|
521
521
|
HOF Behaviour enabling lifecycle hooks for extending functionality in main form pipeline.
|
522
522
|
|
523
|
-
##Usage
|
523
|
+
## Usage
|
524
524
|
|
525
|
-
###With [mixwith.js](https://github.com/justinfagnani/mixwith.js)
|
525
|
+
### With [mixwith.js](https://github.com/justinfagnani/mixwith.js)
|
526
526
|
|
527
527
|
```js
|
528
528
|
const mix = require('mixwith').mix;
|
@@ -536,25 +536,25 @@ class MyController extends mix(BaseController).with(Hooks) {
|
|
536
536
|
|
537
537
|
`MyController` now extends `hof-form-controller` and has `hof-behaviour-hooks` functionality mixed in.
|
538
538
|
|
539
|
-
##Functionality
|
539
|
+
## Functionality
|
540
540
|
|
541
541
|
The following hooks are currently supported, the methods are GET/POST pipeline methods from `hof-form-controller`:
|
542
542
|
|
543
|
-
####GET
|
543
|
+
#### GET
|
544
544
|
|
545
545
|
- `_getErrors` - `'pre-getErrors', 'post-getErrors'`
|
546
546
|
- `_getValues` - `'pre-getValues', 'post-getValues'`
|
547
547
|
- `_locals` - `'pre-locals', 'post-locals'`
|
548
548
|
- `render` - `'pre-render', 'post-render'`
|
549
549
|
|
550
|
-
####POST
|
550
|
+
#### POST
|
551
551
|
|
552
552
|
- `_process` - `'pre-process', 'post-process'`
|
553
553
|
- `_validate` - `'pre-validate', 'post-validate'`
|
554
554
|
- `saveValues` - `'pre-saveValues', 'post-saveValues'`
|
555
555
|
- `successHandler` - `'pre-successHandler', 'post-successHandler'`
|
556
556
|
|
557
|
-
###In field config
|
557
|
+
### In field config
|
558
558
|
|
559
559
|
fields.js
|
560
560
|
|
package/config/hof-defaults.js
CHANGED
@@ -26,14 +26,8 @@ const defaults = {
|
|
26
26
|
gtm: {
|
27
27
|
tagId: process.env.GTM_TAG || false,
|
28
28
|
config: {},
|
29
|
-
composePageName: function (page, convertPage
|
30
|
-
|
31
|
-
case 'ETA':
|
32
|
-
return 'ETA | Customer Contact | ' + convertPage(page);
|
33
|
-
// Add other services here...
|
34
|
-
default:
|
35
|
-
return convertPage(page);
|
36
|
-
}
|
29
|
+
composePageName: function (page, convertPage) {
|
30
|
+
return convertPage(page);
|
37
31
|
}
|
38
32
|
},
|
39
33
|
gaCrossDomainTrackingTagId: process.env.GDS_CROSS_DOMAIN_GA_TAG,
|
@@ -3,6 +3,10 @@
|
|
3
3
|
"title": "Sorry, something went wrong",
|
4
4
|
"message": "A server exception occurred. Please try again."
|
5
5
|
},
|
6
|
+
"session-warning": {
|
7
|
+
"title": "Your page will time out soon",
|
8
|
+
"message": "To protect your information, this page will time out in 5 minutes.\n\nIf that happens, your progress will not be saved."
|
9
|
+
},
|
6
10
|
"session": {
|
7
11
|
"title": "Sorry, you'll have to start again",
|
8
12
|
"message": "You haven't entered any details for 30 minutes, so we have cleared your information to keep it secure."
|
@@ -19,7 +19,7 @@
|
|
19
19
|
<span class="govuk-phase-banner__text">This is a new service – your <a href="{{feedbackUrl}}{{^feedbackUrl}}https://eforms.homeoffice.gov.uk/outreach/feedback.ofml{{/feedbackUrl}}" class="govuk-link" id="feedback-link" target="_blank">feedback</a> will help us to improve it.</span>
|
20
20
|
</p>
|
21
21
|
</div>
|
22
|
-
{{/feedbackUrl}}
|
22
|
+
{{/feedbackUrl}}
|
23
23
|
<span id="step">
|
24
24
|
{{> partials-back}} <span>{{$step}}{{/step}}</span>
|
25
25
|
</span>
|
@@ -29,6 +29,7 @@
|
|
29
29
|
</div>
|
30
30
|
</main>
|
31
31
|
{{> partials-continue}}
|
32
|
+
{{> partials-session-timeout-warning}}
|
32
33
|
<script type="text/javascript" src="{{assetPath}}/js/bundle.js"></script>
|
33
34
|
</div>
|
34
35
|
{{/main}}
|
@@ -0,0 +1,27 @@
|
|
1
|
+
<div class="govuk-warning-text">
|
2
|
+
<div id="dialog_layer" class="dialog_form">
|
3
|
+
<div role="dialog"
|
4
|
+
id="dialog1"
|
5
|
+
aria-labelledby="dialog1_label"
|
6
|
+
aria-modal="true"
|
7
|
+
class="hidden">
|
8
|
+
<h2 id="dialog1_label" class="govuk-heading-l">
|
9
|
+
Your page will time out soon
|
10
|
+
</h2>
|
11
|
+
<div class="govuk-heading-m">
|
12
|
+
<p>To protect your information, this page will time out in 5 minutes.</p>
|
13
|
+
<p>If that happens, your progress will not be saved.</p>
|
14
|
+
</div>
|
15
|
+
<div class="dialog_form_actions">
|
16
|
+
<a href="{{startLink}}" class="govuk-button" role="button">{{#t}}buttons.stay-on-page{{/t}}</a>
|
17
|
+
<a href="{{startLink}}" class="govuk-button" role="button">{{#t}}buttons.start-again{{/t}}</a>
|
18
|
+
</div>
|
19
|
+
</div>
|
20
|
+
</div>
|
21
|
+
<script {{#nonce}}nonce="{{nonce}}"{{/nonce}} type="text/javascript">
|
22
|
+
console.log("onClick with Timeout")
|
23
|
+
setTimeout(function() {
|
24
|
+
openDialog('dialog1', this)
|
25
|
+
}, 5 * 1000)
|
26
|
+
</script>
|
27
|
+
</div>
|
@@ -0,0 +1,361 @@
|
|
1
|
+
/*
|
2
|
+
* This content is licensed according to the W3C Software License at
|
3
|
+
* https://www.w3.org/Consortium/Legal/2015/copyright-software-and-document
|
4
|
+
*/
|
5
|
+
'use strict';
|
6
|
+
|
7
|
+
require('./utils');
|
8
|
+
|
9
|
+
const aria = window.aria || {};
|
10
|
+
|
11
|
+
aria.Utils = aria.Utils || {};
|
12
|
+
|
13
|
+
/**
|
14
|
+
* @description
|
15
|
+
* Key code constants
|
16
|
+
*/
|
17
|
+
aria.KeyCode = {
|
18
|
+
BACKSPACE: 8,
|
19
|
+
TAB: 9,
|
20
|
+
RETURN: 13,
|
21
|
+
SHIFT: 16,
|
22
|
+
ESC: 27,
|
23
|
+
SPACE: 32,
|
24
|
+
PAGE_UP: 33,
|
25
|
+
PAGE_DOWN: 34,
|
26
|
+
END: 35,
|
27
|
+
HOME: 36,
|
28
|
+
LEFT: 37,
|
29
|
+
UP: 38,
|
30
|
+
RIGHT: 39,
|
31
|
+
DOWN: 40,
|
32
|
+
DELETE: 46
|
33
|
+
};
|
34
|
+
|
35
|
+
(function () {
|
36
|
+
// eslint-disable-next-line no-console
|
37
|
+
console.log('TEST DIALOG.js', aria);
|
38
|
+
/*
|
39
|
+
* When util functions move focus around, set this true so the focus listener
|
40
|
+
* can ignore the events.
|
41
|
+
*/
|
42
|
+
aria.Utils.IgnoreUtilFocusChanges = false;
|
43
|
+
|
44
|
+
aria.Utils.dialogOpenClass = 'has-dialog';
|
45
|
+
|
46
|
+
/**
|
47
|
+
* @description Set focus on descendant nodes until the first focusable element is
|
48
|
+
* found.
|
49
|
+
* @param element
|
50
|
+
* DOM node for which to find the first focusable descendant.
|
51
|
+
* @returns {boolean}
|
52
|
+
* true if a focusable element is found and focus is set.
|
53
|
+
*/
|
54
|
+
aria.Utils.focusFirstDescendant = function (element) {
|
55
|
+
for (let i = 0; i < element.childNodes.length; i++) {
|
56
|
+
const child = element.childNodes[i];
|
57
|
+
if (
|
58
|
+
aria.Utils.attemptFocus(child) ||
|
59
|
+
aria.Utils.focusFirstDescendant(child)
|
60
|
+
) {
|
61
|
+
return true;
|
62
|
+
}
|
63
|
+
}
|
64
|
+
return false;
|
65
|
+
}; // end focusFirstDescendant
|
66
|
+
|
67
|
+
/**
|
68
|
+
* @description Find the last descendant node that is focusable.
|
69
|
+
* @param element
|
70
|
+
* DOM node for which to find the last focusable descendant.
|
71
|
+
* @returns {boolean}
|
72
|
+
* true if a focusable element is found and focus is set.
|
73
|
+
*/
|
74
|
+
aria.Utils.focusLastDescendant = function (element) {
|
75
|
+
for (let i = element.childNodes.length - 1; i >= 0; i--) {
|
76
|
+
const child = element.childNodes[i];
|
77
|
+
if (
|
78
|
+
aria.Utils.attemptFocus(child) ||
|
79
|
+
aria.Utils.focusLastDescendant(child)
|
80
|
+
) {
|
81
|
+
return true;
|
82
|
+
}
|
83
|
+
}
|
84
|
+
return false;
|
85
|
+
}; // end focusLastDescendant
|
86
|
+
|
87
|
+
/**
|
88
|
+
* @description Set Attempt to set focus on the current node.
|
89
|
+
* @param element
|
90
|
+
* The node to attempt to focus on.
|
91
|
+
* @returns {boolean}
|
92
|
+
* true if element is focused.
|
93
|
+
*/
|
94
|
+
aria.Utils.attemptFocus = function (element) {
|
95
|
+
if (!aria.Utils.isFocusable(element)) {
|
96
|
+
return false;
|
97
|
+
}
|
98
|
+
|
99
|
+
aria.Utils.IgnoreUtilFocusChanges = true;
|
100
|
+
try {
|
101
|
+
element.focus();
|
102
|
+
} catch (e) {
|
103
|
+
// continue regardless of error
|
104
|
+
}
|
105
|
+
aria.Utils.IgnoreUtilFocusChanges = false;
|
106
|
+
return document.activeElement === element;
|
107
|
+
}; // end attemptFocus
|
108
|
+
|
109
|
+
/* Modals can open modals. Keep track of them with this array. */
|
110
|
+
aria.OpenDialogList = aria.OpenDialogList || new Array(0);
|
111
|
+
|
112
|
+
/**
|
113
|
+
* @returns {object} the last opened dialog (the current dialog)
|
114
|
+
*/
|
115
|
+
aria.getCurrentDialog = function () {
|
116
|
+
if (aria.OpenDialogList && aria.OpenDialogList.length) {
|
117
|
+
return aria.OpenDialogList[aria.OpenDialogList.length - 1];
|
118
|
+
}
|
119
|
+
return null;
|
120
|
+
};
|
121
|
+
|
122
|
+
aria.closeCurrentDialog = function () {
|
123
|
+
const currentDialog = aria.getCurrentDialog();
|
124
|
+
if (currentDialog) {
|
125
|
+
currentDialog.close();
|
126
|
+
return true;
|
127
|
+
}
|
128
|
+
|
129
|
+
return false;
|
130
|
+
};
|
131
|
+
|
132
|
+
aria.handleEscape = function (event) {
|
133
|
+
const key = event.which || event.keyCode;
|
134
|
+
|
135
|
+
if (key === aria.KeyCode.ESC && aria.closeCurrentDialog()) {
|
136
|
+
event.stopPropagation();
|
137
|
+
}
|
138
|
+
};
|
139
|
+
|
140
|
+
document.addEventListener('keyup', aria.handleEscape);
|
141
|
+
|
142
|
+
/**
|
143
|
+
* @class
|
144
|
+
* @description Dialog object providing modal focus management.
|
145
|
+
*
|
146
|
+
* Assumptions: The element serving as the dialog container is present in the
|
147
|
+
* DOM and hidden. The dialog container has role='dialog'.
|
148
|
+
* @param dialogId
|
149
|
+
* The ID of the element serving as the dialog container.
|
150
|
+
* @param focusAfterClosed
|
151
|
+
* Either the DOM node or the ID of the DOM node to focus when the
|
152
|
+
* dialog closes.
|
153
|
+
* @param focusFirst
|
154
|
+
* Optional parameter containing either the DOM node or the ID of the
|
155
|
+
* DOM node to focus when the dialog opens. If not specified, the
|
156
|
+
* first focusable element in the dialog will receive focus.
|
157
|
+
*/
|
158
|
+
aria.Dialog = function (dialogId, focusAfterClosed, focusFirst) {
|
159
|
+
this.dialogNode = document.getElementById(dialogId);
|
160
|
+
if (this.dialogNode === null) {
|
161
|
+
throw new Error('No element found with id="' + dialogId + '".');
|
162
|
+
}
|
163
|
+
|
164
|
+
const validRoles = ['dialog', 'alertdialog'];
|
165
|
+
const isDialog = (this.dialogNode.getAttribute('role') || '')
|
166
|
+
.trim()
|
167
|
+
.split(/\s+/g)
|
168
|
+
.some(function (token) {
|
169
|
+
return validRoles.some(function (role) {
|
170
|
+
return token === role;
|
171
|
+
});
|
172
|
+
});
|
173
|
+
if (!isDialog) {
|
174
|
+
throw new Error(
|
175
|
+
'Dialog() requires a DOM element with ARIA role of dialog or alertdialog.'
|
176
|
+
);
|
177
|
+
}
|
178
|
+
|
179
|
+
// Wrap in an individual backdrop element if one doesn't exist
|
180
|
+
// Native <dialog> elements use the ::backdrop pseudo-element, which
|
181
|
+
// works similarly.
|
182
|
+
const backdropClass = 'dialog-backdrop';
|
183
|
+
if (this.dialogNode.parentNode.classList.contains(backdropClass)) {
|
184
|
+
this.backdropNode = this.dialogNode.parentNode;
|
185
|
+
} else {
|
186
|
+
this.backdropNode = document.createElement('div');
|
187
|
+
this.backdropNode.className = backdropClass;
|
188
|
+
this.dialogNode.parentNode.insertBefore(
|
189
|
+
this.backdropNode,
|
190
|
+
this.dialogNode
|
191
|
+
);
|
192
|
+
this.backdropNode.appendChild(this.dialogNode);
|
193
|
+
}
|
194
|
+
this.backdropNode.classList.add('active');
|
195
|
+
|
196
|
+
// Disable scroll on the body element
|
197
|
+
document.body.classList.add(aria.Utils.dialogOpenClass);
|
198
|
+
|
199
|
+
if (typeof focusAfterClosed === 'string') {
|
200
|
+
this.focusAfterClosed = document.getElementById(focusAfterClosed);
|
201
|
+
} else if (typeof focusAfterClosed === 'object') {
|
202
|
+
this.focusAfterClosed = focusAfterClosed;
|
203
|
+
} else {
|
204
|
+
throw new Error(
|
205
|
+
'the focusAfterClosed parameter is required for the aria.Dialog constructor.'
|
206
|
+
);
|
207
|
+
}
|
208
|
+
|
209
|
+
if (typeof focusFirst === 'string') {
|
210
|
+
this.focusFirst = document.getElementById(focusFirst);
|
211
|
+
} else if (typeof focusFirst === 'object') {
|
212
|
+
this.focusFirst = focusFirst;
|
213
|
+
} else {
|
214
|
+
this.focusFirst = null;
|
215
|
+
}
|
216
|
+
|
217
|
+
// Bracket the dialog node with two invisible, focusable nodes.
|
218
|
+
// While this dialog is open, we use these to make sure that focus never
|
219
|
+
// leaves the document even if dialogNode is the first or last node.
|
220
|
+
const preDiv = document.createElement('div');
|
221
|
+
this.preNode = this.dialogNode.parentNode.insertBefore(
|
222
|
+
preDiv,
|
223
|
+
this.dialogNode
|
224
|
+
);
|
225
|
+
this.preNode.tabIndex = 0;
|
226
|
+
const postDiv = document.createElement('div');
|
227
|
+
this.postNode = this.dialogNode.parentNode.insertBefore(
|
228
|
+
postDiv,
|
229
|
+
this.dialogNode.nextSibling
|
230
|
+
);
|
231
|
+
this.postNode.tabIndex = 0;
|
232
|
+
|
233
|
+
// If this modal is opening on top of one that is already open,
|
234
|
+
// get rid of the document focus listener of the open dialog.
|
235
|
+
if (aria.OpenDialogList.length > 0) {
|
236
|
+
aria.getCurrentDialog().removeListeners();
|
237
|
+
}
|
238
|
+
|
239
|
+
this.addListeners();
|
240
|
+
aria.OpenDialogList.push(this);
|
241
|
+
this.clearDialog();
|
242
|
+
this.dialogNode.className = 'default_dialog'; // make visible
|
243
|
+
|
244
|
+
if (this.focusFirst) {
|
245
|
+
this.focusFirst.focus();
|
246
|
+
} else {
|
247
|
+
aria.Utils.focusFirstDescendant(this.dialogNode);
|
248
|
+
}
|
249
|
+
|
250
|
+
this.lastFocus = document.activeElement;
|
251
|
+
}; // end Dialog constructor
|
252
|
+
|
253
|
+
aria.Dialog.prototype.clearDialog = function () {
|
254
|
+
Array.prototype.map.call(
|
255
|
+
this.dialogNode.querySelectorAll('input'),
|
256
|
+
function (input) {
|
257
|
+
input.value = '';
|
258
|
+
}
|
259
|
+
);
|
260
|
+
};
|
261
|
+
|
262
|
+
/**
|
263
|
+
* @description
|
264
|
+
* Hides the current top dialog,
|
265
|
+
* removes listeners of the top dialog,
|
266
|
+
* restore listeners of a parent dialog if one was open under the one that just closed,
|
267
|
+
* and sets focus on the element specified for focusAfterClosed.
|
268
|
+
*/
|
269
|
+
aria.Dialog.prototype.close = function () {
|
270
|
+
aria.OpenDialogList.pop();
|
271
|
+
this.removeListeners();
|
272
|
+
aria.Utils.remove(this.preNode);
|
273
|
+
aria.Utils.remove(this.postNode);
|
274
|
+
this.dialogNode.className = 'hidden';
|
275
|
+
this.backdropNode.classList.remove('active');
|
276
|
+
this.focusAfterClosed.focus();
|
277
|
+
|
278
|
+
// If a dialog was open underneath this one, restore its listeners.
|
279
|
+
if (aria.OpenDialogList.length > 0) {
|
280
|
+
aria.getCurrentDialog().addListeners();
|
281
|
+
} else {
|
282
|
+
document.body.classList.remove(aria.Utils.dialogOpenClass);
|
283
|
+
}
|
284
|
+
}; // end close
|
285
|
+
|
286
|
+
/**
|
287
|
+
* @description
|
288
|
+
* Hides the current dialog and replaces it with another.
|
289
|
+
* @param newDialogId
|
290
|
+
* ID of the dialog that will replace the currently open top dialog.
|
291
|
+
* @param newFocusAfterClosed
|
292
|
+
* Optional ID or DOM node specifying where to place focus when the new dialog closes.
|
293
|
+
* If not specified, focus will be placed on the element specified by the dialog being replaced.
|
294
|
+
* @param newFocusFirst
|
295
|
+
* Optional ID or DOM node specifying where to place focus in the new dialog when it opens.
|
296
|
+
* If not specified, the first focusable element will receive focus.
|
297
|
+
*/
|
298
|
+
aria.Dialog.prototype.replace = function (
|
299
|
+
newDialogId,
|
300
|
+
newFocusAfterClosed,
|
301
|
+
newFocusFirst
|
302
|
+
) {
|
303
|
+
aria.OpenDialogList.pop();
|
304
|
+
this.removeListeners();
|
305
|
+
aria.Utils.remove(this.preNode);
|
306
|
+
aria.Utils.remove(this.postNode);
|
307
|
+
this.dialogNode.className = 'hidden';
|
308
|
+
this.backdropNode.classList.remove('active');
|
309
|
+
|
310
|
+
const focusAfterClosed = newFocusAfterClosed || this.focusAfterClosed;
|
311
|
+
// eslint-disable-next-line no-new
|
312
|
+
new aria.Dialog(newDialogId, focusAfterClosed, newFocusFirst);
|
313
|
+
}; // end replace
|
314
|
+
|
315
|
+
aria.Dialog.prototype.addListeners = function () {
|
316
|
+
document.addEventListener('focus', this.trapFocus, true);
|
317
|
+
}; // end addListeners
|
318
|
+
|
319
|
+
aria.Dialog.prototype.removeListeners = function () {
|
320
|
+
document.removeEventListener('focus', this.trapFocus, true);
|
321
|
+
}; // end removeListeners
|
322
|
+
|
323
|
+
aria.Dialog.prototype.trapFocus = function (event) {
|
324
|
+
if (aria.Utils.IgnoreUtilFocusChanges) {
|
325
|
+
return;
|
326
|
+
}
|
327
|
+
const currentDialog = aria.getCurrentDialog();
|
328
|
+
if (currentDialog.dialogNode.contains(event.target)) {
|
329
|
+
currentDialog.lastFocus = event.target;
|
330
|
+
} else {
|
331
|
+
aria.Utils.focusFirstDescendant(currentDialog.dialogNode);
|
332
|
+
if (currentDialog.lastFocus === document.activeElement) {
|
333
|
+
aria.Utils.focusLastDescendant(currentDialog.dialogNode);
|
334
|
+
}
|
335
|
+
currentDialog.lastFocus = document.activeElement;
|
336
|
+
}
|
337
|
+
}; // end trapFocus
|
338
|
+
|
339
|
+
window.openDialog = function (dialogId, focusAfterClosed, focusFirst) {
|
340
|
+
// eslint-disable-next-line no-new
|
341
|
+
new aria.Dialog(dialogId, focusAfterClosed, focusFirst);
|
342
|
+
};
|
343
|
+
|
344
|
+
window.closeDialog = function (closeButton) {
|
345
|
+
const topDialog = aria.getCurrentDialog();
|
346
|
+
if (topDialog.dialogNode.contains(closeButton)) {
|
347
|
+
topDialog.close();
|
348
|
+
}
|
349
|
+
}; // end closeDialog
|
350
|
+
|
351
|
+
window.replaceDialog = function (
|
352
|
+
newDialogId,
|
353
|
+
newFocusAfterClosed,
|
354
|
+
newFocusFirst
|
355
|
+
) {
|
356
|
+
const topDialog = aria.getCurrentDialog();
|
357
|
+
if (topDialog.dialogNode.contains(document.activeElement)) {
|
358
|
+
topDialog.replace(newDialogId, newFocusAfterClosed, newFocusFirst);
|
359
|
+
}
|
360
|
+
}; // end replaceDialog
|
361
|
+
})();
|