hof 20.3.10-beta-gtm → 20.4.0-beta-session-timeout

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1 @@
1
+ {"parent":null,"pid":97956,"argv":["/Users/robertmccann/.nvm/versions/node/v18.12.1/bin/node","/Users/robertmccann/Projects/hof/node_modules/.bin/_mocha","test/**/*.spec.js","sandbox/test/**/*.spec.js"],"execArgv":[],"cwd":"/Users/robertmccann/Projects/hof","time":1702570177942,"ppid":97951,"coverageFilename":"/Users/robertmccann/Projects/hof/.nyc_output/9651d42a-59d8-48e6-949c-655d9fa6db21.json","externalId":"","uuid":"9651d42a-59d8-48e6-949c-655d9fa6db21","files":["/Users/robertmccann/Projects/hof/model/index.js","/Users/robertmccann/Projects/hof/components/index.js","/Users/robertmccann/Projects/hof/components/address-lookup/index.js","/Users/robertmccann/Projects/hof/components/address-lookup/default-model.js","/Users/robertmccann/Projects/hof/components/address-lookup/defaults.js","/Users/robertmccann/Projects/hof/components/clear-session/index.js","/Users/robertmccann/Projects/hof/components/combine-and-loop-fields/index.js","/Users/robertmccann/Projects/hof/components/date/index.js","/Users/robertmccann/Projects/hof/components/date/fields.js","/Users/robertmccann/Projects/hof/components/emailer/index.js","/Users/robertmccann/Projects/hof/components/emailer/email-service.js","/Users/robertmccann/Projects/hof/components/emailer/emailer.js","/Users/robertmccann/Projects/hof/components/emailer/transports/index.js","/Users/robertmccann/Projects/hof/components/emailer/transports/smtp.js","/Users/robertmccann/Projects/hof/components/emailer/transports/ses.js","/Users/robertmccann/Projects/hof/components/emailer/transports/stub.js","/Users/robertmccann/Projects/hof/components/emailer/transports/debug.js","/Users/robertmccann/Projects/hof/components/homeoffice-countries/index.js","/Users/robertmccann/Projects/hof/config/component-defaults.js","/Users/robertmccann/Projects/hof/components/notify/index.js","/Users/robertmccann/Projects/hof/components/notify/notify.js","/Users/robertmccann/Projects/hof/components/summary/index.js","/Users/robertmccann/Projects/hof/config/rate-limits.js","/Users/robertmccann/Projects/hof/middleware/rate-limiter.js","/Users/robertmccann/Projects/hof/config/hof-defaults.js","/Users/robertmccann/Projects/hof/controller/base-controller.js","/Users/robertmccann/Projects/hof/controller/formatting/index.js","/Users/robertmccann/Projects/hof/controller/validation/index.js","/Users/robertmccann/Projects/hof/controller/validation/validators.js","/Users/robertmccann/Projects/hof/controller/validation/email.js","/Users/robertmccann/Projects/hof/controller/validation-error.js","/Users/robertmccann/Projects/hof/utilities/index.js","/Users/robertmccann/Projects/hof/utilities/autofill/index.js","/Users/robertmccann/Projects/hof/utilities/autofill/inputs.js","/Users/robertmccann/Projects/hof/utilities/test-data/index.js","/Users/robertmccann/Projects/hof/utilities/countries.js","/Users/robertmccann/Projects/hof/utilities/helpers/index.js","/Users/robertmccann/Projects/hof/utilities/reqres/index.js","/Users/robertmccann/Projects/hof/config/sanitisation-rules.js","/Users/robertmccann/Projects/hof/controller/formatting/formatters.js","/Users/robertmccann/Projects/hof/controller/index.js","/Users/robertmccann/Projects/hof/controller/behaviour-session.js","/Users/robertmccann/Projects/hof/controller/behaviour-hooks.js","/Users/robertmccann/Projects/hof/controller/controller.js","/Users/robertmccann/Projects/hof/sandbox/apps/sandbox/behaviours/country-select.js","/Users/robertmccann/Projects/hof/frontend/template-mixins/mixins/index.js","/Users/robertmccann/Projects/hof/frontend/template-mixins/mixins/template-mixins.js","/Users/robertmccann/Projects/hof/frontend/template-mixins/mixins/render.js","/Users/robertmccann/Projects/hof/frontend/template-mixins/mixins/helpers.js","/Users/robertmccann/Projects/hof/index.js","/Users/robertmccann/Projects/hof/frontend/index.js","/Users/robertmccann/Projects/hof/frontend/govuk-template/index.js","/Users/robertmccann/Projects/hof/frontend/govuk-template/build/index.js","/Users/robertmccann/Projects/hof/frontend/govuk-template/build/config.js","/Users/robertmccann/Projects/hof/frontend/template-partials/index.js","/Users/robertmccann/Projects/hof/frontend/template-partials/translations/index.js","/Users/robertmccann/Projects/hof/frontend/themes/index.js","/Users/robertmccann/Projects/hof/frontend/themes/gov-uk/index.js","/Users/robertmccann/Projects/hof/frontend/toolkit/index.js","/Users/robertmccann/Projects/hof/frontend/toolkit/assets/javascript/helpers.js","/Users/robertmccann/Projects/hof/frontend/toolkit/assets/javascript/form-focus.js","/Users/robertmccann/Projects/hof/frontend/toolkit/assets/javascript/progressive-reveal.js","/Users/robertmccann/Projects/hof/frontend/toolkit/assets/javascript/validation.js","/Users/robertmccann/Projects/hof/frontend/toolkit/assets/javascript/character-count.js","/Users/robertmccann/Projects/hof/middleware/index.js","/Users/robertmccann/Projects/hof/middleware/cookies.js","/Users/robertmccann/Projects/hof/middleware/errors.js","/Users/robertmccann/Projects/hof/middleware/not-found.js","/Users/robertmccann/Projects/hof/middleware/deep-translate.js","/Users/robertmccann/Projects/hof/lib/markdown.js","/Users/robertmccann/Projects/hof/lib/router.js","/Users/robertmccann/Projects/hof/wizard/index.js","/Users/robertmccann/Projects/hof/wizard/behaviours/index.js","/Users/robertmccann/Projects/hof/wizard/behaviours/complete.js","/Users/robertmccann/Projects/hof/wizard/util/constants.js","/Users/robertmccann/Projects/hof/lib/helpers.js","/Users/robertmccann/Projects/hof/lib/health.js","/Users/robertmccann/Projects/hof/lib/serve-static.js","/Users/robertmccann/Projects/hof/lib/ga-tag.js","/Users/robertmccann/Projects/hof/lib/sessions.js","/Users/robertmccann/Projects/hof/lib/settings.js","/Users/robertmccann/Projects/hof/lib/logger.js","/Users/robertmccann/Projects/hof/build/index.js","/Users/robertmccann/Projects/hof/config/builder-defaults.js","/Users/robertmccann/Projects/hof/transpiler/index.js","/Users/robertmccann/Projects/hof/transpiler/lib/compile.js","/Users/robertmccann/Projects/hof/transpiler/lib/build.js","/Users/robertmccann/Projects/hof/transpiler/lib/expand-dirs.js","/Users/robertmccann/Projects/hof/transpiler/lib/aggregate.js","/Users/robertmccann/Projects/hof/transpiler/lib/write-files.js","/Users/robertmccann/Projects/hof/model/apis/index.js","/Users/robertmccann/Projects/hof/model/apis/html-to-pdf-converter.js","/Users/robertmccann/Projects/hof/wizard/model.js","/Users/robertmccann/Projects/hof/wizard/middleware/back-links.js","/Users/robertmccann/Projects/hof/wizard/util/helpers.js","/Users/robertmccann/Projects/hof/wizard/middleware/check-complete.js","/Users/robertmccann/Projects/hof/wizard/middleware/check-progress.js","/Users/robertmccann/Projects/hof/wizard/middleware/check-session.js","/Users/robertmccann/Projects/hof/wizard/middleware/csrf.js","/Users/robertmccann/Projects/hof/sandbox/test/_unit/example_app/sections/summary-data-sections.spec.js","/Users/robertmccann/Projects/hof/sandbox/apps/sandbox/sections/summary-data-sections.js","/Users/robertmccann/Projects/hof/sandbox/apps/sandbox/lib/staticAppealStages.js","/Users/robertmccann/Projects/hof/sandbox/apps/sandbox/fields.js","/Users/robertmccann/Projects/hof/sandbox/test/helpers/utilities.js","/Users/robertmccann/Projects/hof/sandbox/apps/sandbox/behaviours/international-number.js","/Users/robertmccann/Projects/hof/lib/encryption.js","/Users/robertmccann/Projects/hof/wizard/middleware/session.js","/Users/robertmccann/Projects/hof/wizard/middleware/session-model.js"]}
@@ -1 +1 @@
1
- {"processes":{"58a3bdf1-3c46-407a-9415-b0d0de4ee3d1":{"parent":null,"children":[]}},"files":{"/Users/chisomoguibe/Projects/hof/model/index.js":["58a3bdf1-3c46-407a-9415-b0d0de4ee3d1"],"/Users/chisomoguibe/Projects/hof/components/index.js":["58a3bdf1-3c46-407a-9415-b0d0de4ee3d1"],"/Users/chisomoguibe/Projects/hof/components/address-lookup/index.js":["58a3bdf1-3c46-407a-9415-b0d0de4ee3d1"],"/Users/chisomoguibe/Projects/hof/components/address-lookup/default-model.js":["58a3bdf1-3c46-407a-9415-b0d0de4ee3d1"],"/Users/chisomoguibe/Projects/hof/components/address-lookup/defaults.js":["58a3bdf1-3c46-407a-9415-b0d0de4ee3d1"],"/Users/chisomoguibe/Projects/hof/components/clear-session/index.js":["58a3bdf1-3c46-407a-9415-b0d0de4ee3d1"],"/Users/chisomoguibe/Projects/hof/components/combine-and-loop-fields/index.js":["58a3bdf1-3c46-407a-9415-b0d0de4ee3d1"],"/Users/chisomoguibe/Projects/hof/components/date/index.js":["58a3bdf1-3c46-407a-9415-b0d0de4ee3d1"],"/Users/chisomoguibe/Projects/hof/components/date/fields.js":["58a3bdf1-3c46-407a-9415-b0d0de4ee3d1"],"/Users/chisomoguibe/Projects/hof/components/emailer/index.js":["58a3bdf1-3c46-407a-9415-b0d0de4ee3d1"],"/Users/chisomoguibe/Projects/hof/components/emailer/email-service.js":["58a3bdf1-3c46-407a-9415-b0d0de4ee3d1"],"/Users/chisomoguibe/Projects/hof/components/emailer/emailer.js":["58a3bdf1-3c46-407a-9415-b0d0de4ee3d1"],"/Users/chisomoguibe/Projects/hof/components/emailer/transports/index.js":["58a3bdf1-3c46-407a-9415-b0d0de4ee3d1"],"/Users/chisomoguibe/Projects/hof/components/emailer/transports/smtp.js":["58a3bdf1-3c46-407a-9415-b0d0de4ee3d1"],"/Users/chisomoguibe/Projects/hof/components/emailer/transports/ses.js":["58a3bdf1-3c46-407a-9415-b0d0de4ee3d1"],"/Users/chisomoguibe/Projects/hof/components/emailer/transports/stub.js":["58a3bdf1-3c46-407a-9415-b0d0de4ee3d1"],"/Users/chisomoguibe/Projects/hof/components/emailer/transports/debug.js":["58a3bdf1-3c46-407a-9415-b0d0de4ee3d1"],"/Users/chisomoguibe/Projects/hof/components/homeoffice-countries/index.js":["58a3bdf1-3c46-407a-9415-b0d0de4ee3d1"],"/Users/chisomoguibe/Projects/hof/config/component-defaults.js":["58a3bdf1-3c46-407a-9415-b0d0de4ee3d1"],"/Users/chisomoguibe/Projects/hof/components/notify/index.js":["58a3bdf1-3c46-407a-9415-b0d0de4ee3d1"],"/Users/chisomoguibe/Projects/hof/components/notify/notify.js":["58a3bdf1-3c46-407a-9415-b0d0de4ee3d1"],"/Users/chisomoguibe/Projects/hof/components/summary/index.js":["58a3bdf1-3c46-407a-9415-b0d0de4ee3d1"],"/Users/chisomoguibe/Projects/hof/config/rate-limits.js":["58a3bdf1-3c46-407a-9415-b0d0de4ee3d1"],"/Users/chisomoguibe/Projects/hof/middleware/rate-limiter.js":["58a3bdf1-3c46-407a-9415-b0d0de4ee3d1"],"/Users/chisomoguibe/Projects/hof/config/hof-defaults.js":["58a3bdf1-3c46-407a-9415-b0d0de4ee3d1"],"/Users/chisomoguibe/Projects/hof/controller/base-controller.js":["58a3bdf1-3c46-407a-9415-b0d0de4ee3d1"],"/Users/chisomoguibe/Projects/hof/controller/formatting/index.js":["58a3bdf1-3c46-407a-9415-b0d0de4ee3d1"],"/Users/chisomoguibe/Projects/hof/controller/validation/index.js":["58a3bdf1-3c46-407a-9415-b0d0de4ee3d1"],"/Users/chisomoguibe/Projects/hof/controller/validation/validators.js":["58a3bdf1-3c46-407a-9415-b0d0de4ee3d1"],"/Users/chisomoguibe/Projects/hof/controller/validation/email.js":["58a3bdf1-3c46-407a-9415-b0d0de4ee3d1"],"/Users/chisomoguibe/Projects/hof/controller/validation-error.js":["58a3bdf1-3c46-407a-9415-b0d0de4ee3d1"],"/Users/chisomoguibe/Projects/hof/utilities/index.js":["58a3bdf1-3c46-407a-9415-b0d0de4ee3d1"],"/Users/chisomoguibe/Projects/hof/utilities/autofill/index.js":["58a3bdf1-3c46-407a-9415-b0d0de4ee3d1"],"/Users/chisomoguibe/Projects/hof/utilities/autofill/inputs.js":["58a3bdf1-3c46-407a-9415-b0d0de4ee3d1"],"/Users/chisomoguibe/Projects/hof/utilities/test-data/index.js":["58a3bdf1-3c46-407a-9415-b0d0de4ee3d1"],"/Users/chisomoguibe/Projects/hof/utilities/countries.js":["58a3bdf1-3c46-407a-9415-b0d0de4ee3d1"],"/Users/chisomoguibe/Projects/hof/utilities/helpers/index.js":["58a3bdf1-3c46-407a-9415-b0d0de4ee3d1"],"/Users/chisomoguibe/Projects/hof/utilities/reqres/index.js":["58a3bdf1-3c46-407a-9415-b0d0de4ee3d1"],"/Users/chisomoguibe/Projects/hof/config/sanitisation-rules.js":["58a3bdf1-3c46-407a-9415-b0d0de4ee3d1"],"/Users/chisomoguibe/Projects/hof/controller/formatting/formatters.js":["58a3bdf1-3c46-407a-9415-b0d0de4ee3d1"],"/Users/chisomoguibe/Projects/hof/controller/index.js":["58a3bdf1-3c46-407a-9415-b0d0de4ee3d1"],"/Users/chisomoguibe/Projects/hof/controller/behaviour-session.js":["58a3bdf1-3c46-407a-9415-b0d0de4ee3d1"],"/Users/chisomoguibe/Projects/hof/controller/behaviour-hooks.js":["58a3bdf1-3c46-407a-9415-b0d0de4ee3d1"],"/Users/chisomoguibe/Projects/hof/controller/controller.js":["58a3bdf1-3c46-407a-9415-b0d0de4ee3d1"],"/Users/chisomoguibe/Projects/hof/sandbox/apps/sandbox/behaviours/country-select.js":["58a3bdf1-3c46-407a-9415-b0d0de4ee3d1"],"/Users/chisomoguibe/Projects/hof/frontend/template-mixins/mixins/index.js":["58a3bdf1-3c46-407a-9415-b0d0de4ee3d1"],"/Users/chisomoguibe/Projects/hof/frontend/template-mixins/mixins/template-mixins.js":["58a3bdf1-3c46-407a-9415-b0d0de4ee3d1"],"/Users/chisomoguibe/Projects/hof/frontend/template-mixins/mixins/render.js":["58a3bdf1-3c46-407a-9415-b0d0de4ee3d1"],"/Users/chisomoguibe/Projects/hof/frontend/template-mixins/mixins/helpers.js":["58a3bdf1-3c46-407a-9415-b0d0de4ee3d1"],"/Users/chisomoguibe/Projects/hof/index.js":["58a3bdf1-3c46-407a-9415-b0d0de4ee3d1"],"/Users/chisomoguibe/Projects/hof/frontend/index.js":["58a3bdf1-3c46-407a-9415-b0d0de4ee3d1"],"/Users/chisomoguibe/Projects/hof/frontend/govuk-template/index.js":["58a3bdf1-3c46-407a-9415-b0d0de4ee3d1"],"/Users/chisomoguibe/Projects/hof/frontend/govuk-template/build/index.js":["58a3bdf1-3c46-407a-9415-b0d0de4ee3d1"],"/Users/chisomoguibe/Projects/hof/frontend/govuk-template/build/config.js":["58a3bdf1-3c46-407a-9415-b0d0de4ee3d1"],"/Users/chisomoguibe/Projects/hof/frontend/template-partials/index.js":["58a3bdf1-3c46-407a-9415-b0d0de4ee3d1"],"/Users/chisomoguibe/Projects/hof/frontend/template-partials/translations/index.js":["58a3bdf1-3c46-407a-9415-b0d0de4ee3d1"],"/Users/chisomoguibe/Projects/hof/frontend/themes/index.js":["58a3bdf1-3c46-407a-9415-b0d0de4ee3d1"],"/Users/chisomoguibe/Projects/hof/frontend/themes/gov-uk/index.js":["58a3bdf1-3c46-407a-9415-b0d0de4ee3d1"],"/Users/chisomoguibe/Projects/hof/frontend/toolkit/index.js":["58a3bdf1-3c46-407a-9415-b0d0de4ee3d1"],"/Users/chisomoguibe/Projects/hof/frontend/toolkit/assets/javascript/helpers.js":["58a3bdf1-3c46-407a-9415-b0d0de4ee3d1"],"/Users/chisomoguibe/Projects/hof/frontend/toolkit/assets/javascript/form-focus.js":["58a3bdf1-3c46-407a-9415-b0d0de4ee3d1"],"/Users/chisomoguibe/Projects/hof/frontend/toolkit/assets/javascript/progressive-reveal.js":["58a3bdf1-3c46-407a-9415-b0d0de4ee3d1"],"/Users/chisomoguibe/Projects/hof/frontend/toolkit/assets/javascript/validation.js":["58a3bdf1-3c46-407a-9415-b0d0de4ee3d1"],"/Users/chisomoguibe/Projects/hof/frontend/toolkit/assets/javascript/character-count.js":["58a3bdf1-3c46-407a-9415-b0d0de4ee3d1"],"/Users/chisomoguibe/Projects/hof/middleware/index.js":["58a3bdf1-3c46-407a-9415-b0d0de4ee3d1"],"/Users/chisomoguibe/Projects/hof/middleware/cookies.js":["58a3bdf1-3c46-407a-9415-b0d0de4ee3d1"],"/Users/chisomoguibe/Projects/hof/middleware/errors.js":["58a3bdf1-3c46-407a-9415-b0d0de4ee3d1"],"/Users/chisomoguibe/Projects/hof/middleware/not-found.js":["58a3bdf1-3c46-407a-9415-b0d0de4ee3d1"],"/Users/chisomoguibe/Projects/hof/middleware/deep-translate.js":["58a3bdf1-3c46-407a-9415-b0d0de4ee3d1"],"/Users/chisomoguibe/Projects/hof/lib/markdown.js":["58a3bdf1-3c46-407a-9415-b0d0de4ee3d1"],"/Users/chisomoguibe/Projects/hof/lib/router.js":["58a3bdf1-3c46-407a-9415-b0d0de4ee3d1"],"/Users/chisomoguibe/Projects/hof/wizard/index.js":["58a3bdf1-3c46-407a-9415-b0d0de4ee3d1"],"/Users/chisomoguibe/Projects/hof/wizard/behaviours/index.js":["58a3bdf1-3c46-407a-9415-b0d0de4ee3d1"],"/Users/chisomoguibe/Projects/hof/wizard/behaviours/complete.js":["58a3bdf1-3c46-407a-9415-b0d0de4ee3d1"],"/Users/chisomoguibe/Projects/hof/wizard/util/constants.js":["58a3bdf1-3c46-407a-9415-b0d0de4ee3d1"],"/Users/chisomoguibe/Projects/hof/lib/helpers.js":["58a3bdf1-3c46-407a-9415-b0d0de4ee3d1"],"/Users/chisomoguibe/Projects/hof/lib/health.js":["58a3bdf1-3c46-407a-9415-b0d0de4ee3d1"],"/Users/chisomoguibe/Projects/hof/lib/serve-static.js":["58a3bdf1-3c46-407a-9415-b0d0de4ee3d1"],"/Users/chisomoguibe/Projects/hof/lib/ga-tag.js":["58a3bdf1-3c46-407a-9415-b0d0de4ee3d1"],"/Users/chisomoguibe/Projects/hof/lib/sessions.js":["58a3bdf1-3c46-407a-9415-b0d0de4ee3d1"],"/Users/chisomoguibe/Projects/hof/lib/settings.js":["58a3bdf1-3c46-407a-9415-b0d0de4ee3d1"],"/Users/chisomoguibe/Projects/hof/lib/logger.js":["58a3bdf1-3c46-407a-9415-b0d0de4ee3d1"],"/Users/chisomoguibe/Projects/hof/build/index.js":["58a3bdf1-3c46-407a-9415-b0d0de4ee3d1"],"/Users/chisomoguibe/Projects/hof/config/builder-defaults.js":["58a3bdf1-3c46-407a-9415-b0d0de4ee3d1"],"/Users/chisomoguibe/Projects/hof/transpiler/index.js":["58a3bdf1-3c46-407a-9415-b0d0de4ee3d1"],"/Users/chisomoguibe/Projects/hof/transpiler/lib/compile.js":["58a3bdf1-3c46-407a-9415-b0d0de4ee3d1"],"/Users/chisomoguibe/Projects/hof/transpiler/lib/build.js":["58a3bdf1-3c46-407a-9415-b0d0de4ee3d1"],"/Users/chisomoguibe/Projects/hof/transpiler/lib/expand-dirs.js":["58a3bdf1-3c46-407a-9415-b0d0de4ee3d1"],"/Users/chisomoguibe/Projects/hof/transpiler/lib/aggregate.js":["58a3bdf1-3c46-407a-9415-b0d0de4ee3d1"],"/Users/chisomoguibe/Projects/hof/transpiler/lib/write-files.js":["58a3bdf1-3c46-407a-9415-b0d0de4ee3d1"],"/Users/chisomoguibe/Projects/hof/model/apis/index.js":["58a3bdf1-3c46-407a-9415-b0d0de4ee3d1"],"/Users/chisomoguibe/Projects/hof/model/apis/html-to-pdf-converter.js":["58a3bdf1-3c46-407a-9415-b0d0de4ee3d1"],"/Users/chisomoguibe/Projects/hof/wizard/model.js":["58a3bdf1-3c46-407a-9415-b0d0de4ee3d1"],"/Users/chisomoguibe/Projects/hof/wizard/middleware/back-links.js":["58a3bdf1-3c46-407a-9415-b0d0de4ee3d1"],"/Users/chisomoguibe/Projects/hof/wizard/util/helpers.js":["58a3bdf1-3c46-407a-9415-b0d0de4ee3d1"],"/Users/chisomoguibe/Projects/hof/wizard/middleware/check-complete.js":["58a3bdf1-3c46-407a-9415-b0d0de4ee3d1"],"/Users/chisomoguibe/Projects/hof/wizard/middleware/check-progress.js":["58a3bdf1-3c46-407a-9415-b0d0de4ee3d1"],"/Users/chisomoguibe/Projects/hof/wizard/middleware/check-session.js":["58a3bdf1-3c46-407a-9415-b0d0de4ee3d1"],"/Users/chisomoguibe/Projects/hof/wizard/middleware/csrf.js":["58a3bdf1-3c46-407a-9415-b0d0de4ee3d1"],"/Users/chisomoguibe/Projects/hof/sandbox/test/_unit/example_app/sections/summary-data-sections.spec.js":["58a3bdf1-3c46-407a-9415-b0d0de4ee3d1"],"/Users/chisomoguibe/Projects/hof/sandbox/apps/sandbox/sections/summary-data-sections.js":["58a3bdf1-3c46-407a-9415-b0d0de4ee3d1"],"/Users/chisomoguibe/Projects/hof/sandbox/apps/sandbox/lib/staticAppealStages.js":["58a3bdf1-3c46-407a-9415-b0d0de4ee3d1"],"/Users/chisomoguibe/Projects/hof/sandbox/apps/sandbox/fields.js":["58a3bdf1-3c46-407a-9415-b0d0de4ee3d1"],"/Users/chisomoguibe/Projects/hof/sandbox/test/helpers/utilities.js":["58a3bdf1-3c46-407a-9415-b0d0de4ee3d1"],"/Users/chisomoguibe/Projects/hof/sandbox/apps/sandbox/behaviours/international-number.js":["58a3bdf1-3c46-407a-9415-b0d0de4ee3d1"],"/Users/chisomoguibe/Projects/hof/lib/encryption.js":["58a3bdf1-3c46-407a-9415-b0d0de4ee3d1"],"/Users/chisomoguibe/Projects/hof/wizard/middleware/session.js":["58a3bdf1-3c46-407a-9415-b0d0de4ee3d1"],"/Users/chisomoguibe/Projects/hof/wizard/middleware/session-model.js":["58a3bdf1-3c46-407a-9415-b0d0de4ee3d1"]},"externalIds":{}}
1
+ {"processes":{"9651d42a-59d8-48e6-949c-655d9fa6db21":{"parent":null,"children":[]}},"files":{"/Users/robertmccann/Projects/hof/model/index.js":["9651d42a-59d8-48e6-949c-655d9fa6db21"],"/Users/robertmccann/Projects/hof/components/index.js":["9651d42a-59d8-48e6-949c-655d9fa6db21"],"/Users/robertmccann/Projects/hof/components/address-lookup/index.js":["9651d42a-59d8-48e6-949c-655d9fa6db21"],"/Users/robertmccann/Projects/hof/components/address-lookup/default-model.js":["9651d42a-59d8-48e6-949c-655d9fa6db21"],"/Users/robertmccann/Projects/hof/components/address-lookup/defaults.js":["9651d42a-59d8-48e6-949c-655d9fa6db21"],"/Users/robertmccann/Projects/hof/components/clear-session/index.js":["9651d42a-59d8-48e6-949c-655d9fa6db21"],"/Users/robertmccann/Projects/hof/components/combine-and-loop-fields/index.js":["9651d42a-59d8-48e6-949c-655d9fa6db21"],"/Users/robertmccann/Projects/hof/components/date/index.js":["9651d42a-59d8-48e6-949c-655d9fa6db21"],"/Users/robertmccann/Projects/hof/components/date/fields.js":["9651d42a-59d8-48e6-949c-655d9fa6db21"],"/Users/robertmccann/Projects/hof/components/emailer/index.js":["9651d42a-59d8-48e6-949c-655d9fa6db21"],"/Users/robertmccann/Projects/hof/components/emailer/email-service.js":["9651d42a-59d8-48e6-949c-655d9fa6db21"],"/Users/robertmccann/Projects/hof/components/emailer/emailer.js":["9651d42a-59d8-48e6-949c-655d9fa6db21"],"/Users/robertmccann/Projects/hof/components/emailer/transports/index.js":["9651d42a-59d8-48e6-949c-655d9fa6db21"],"/Users/robertmccann/Projects/hof/components/emailer/transports/smtp.js":["9651d42a-59d8-48e6-949c-655d9fa6db21"],"/Users/robertmccann/Projects/hof/components/emailer/transports/ses.js":["9651d42a-59d8-48e6-949c-655d9fa6db21"],"/Users/robertmccann/Projects/hof/components/emailer/transports/stub.js":["9651d42a-59d8-48e6-949c-655d9fa6db21"],"/Users/robertmccann/Projects/hof/components/emailer/transports/debug.js":["9651d42a-59d8-48e6-949c-655d9fa6db21"],"/Users/robertmccann/Projects/hof/components/homeoffice-countries/index.js":["9651d42a-59d8-48e6-949c-655d9fa6db21"],"/Users/robertmccann/Projects/hof/config/component-defaults.js":["9651d42a-59d8-48e6-949c-655d9fa6db21"],"/Users/robertmccann/Projects/hof/components/notify/index.js":["9651d42a-59d8-48e6-949c-655d9fa6db21"],"/Users/robertmccann/Projects/hof/components/notify/notify.js":["9651d42a-59d8-48e6-949c-655d9fa6db21"],"/Users/robertmccann/Projects/hof/components/summary/index.js":["9651d42a-59d8-48e6-949c-655d9fa6db21"],"/Users/robertmccann/Projects/hof/config/rate-limits.js":["9651d42a-59d8-48e6-949c-655d9fa6db21"],"/Users/robertmccann/Projects/hof/middleware/rate-limiter.js":["9651d42a-59d8-48e6-949c-655d9fa6db21"],"/Users/robertmccann/Projects/hof/config/hof-defaults.js":["9651d42a-59d8-48e6-949c-655d9fa6db21"],"/Users/robertmccann/Projects/hof/controller/base-controller.js":["9651d42a-59d8-48e6-949c-655d9fa6db21"],"/Users/robertmccann/Projects/hof/controller/formatting/index.js":["9651d42a-59d8-48e6-949c-655d9fa6db21"],"/Users/robertmccann/Projects/hof/controller/validation/index.js":["9651d42a-59d8-48e6-949c-655d9fa6db21"],"/Users/robertmccann/Projects/hof/controller/validation/validators.js":["9651d42a-59d8-48e6-949c-655d9fa6db21"],"/Users/robertmccann/Projects/hof/controller/validation/email.js":["9651d42a-59d8-48e6-949c-655d9fa6db21"],"/Users/robertmccann/Projects/hof/controller/validation-error.js":["9651d42a-59d8-48e6-949c-655d9fa6db21"],"/Users/robertmccann/Projects/hof/utilities/index.js":["9651d42a-59d8-48e6-949c-655d9fa6db21"],"/Users/robertmccann/Projects/hof/utilities/autofill/index.js":["9651d42a-59d8-48e6-949c-655d9fa6db21"],"/Users/robertmccann/Projects/hof/utilities/autofill/inputs.js":["9651d42a-59d8-48e6-949c-655d9fa6db21"],"/Users/robertmccann/Projects/hof/utilities/test-data/index.js":["9651d42a-59d8-48e6-949c-655d9fa6db21"],"/Users/robertmccann/Projects/hof/utilities/countries.js":["9651d42a-59d8-48e6-949c-655d9fa6db21"],"/Users/robertmccann/Projects/hof/utilities/helpers/index.js":["9651d42a-59d8-48e6-949c-655d9fa6db21"],"/Users/robertmccann/Projects/hof/utilities/reqres/index.js":["9651d42a-59d8-48e6-949c-655d9fa6db21"],"/Users/robertmccann/Projects/hof/config/sanitisation-rules.js":["9651d42a-59d8-48e6-949c-655d9fa6db21"],"/Users/robertmccann/Projects/hof/controller/formatting/formatters.js":["9651d42a-59d8-48e6-949c-655d9fa6db21"],"/Users/robertmccann/Projects/hof/controller/index.js":["9651d42a-59d8-48e6-949c-655d9fa6db21"],"/Users/robertmccann/Projects/hof/controller/behaviour-session.js":["9651d42a-59d8-48e6-949c-655d9fa6db21"],"/Users/robertmccann/Projects/hof/controller/behaviour-hooks.js":["9651d42a-59d8-48e6-949c-655d9fa6db21"],"/Users/robertmccann/Projects/hof/controller/controller.js":["9651d42a-59d8-48e6-949c-655d9fa6db21"],"/Users/robertmccann/Projects/hof/sandbox/apps/sandbox/behaviours/country-select.js":["9651d42a-59d8-48e6-949c-655d9fa6db21"],"/Users/robertmccann/Projects/hof/frontend/template-mixins/mixins/index.js":["9651d42a-59d8-48e6-949c-655d9fa6db21"],"/Users/robertmccann/Projects/hof/frontend/template-mixins/mixins/template-mixins.js":["9651d42a-59d8-48e6-949c-655d9fa6db21"],"/Users/robertmccann/Projects/hof/frontend/template-mixins/mixins/render.js":["9651d42a-59d8-48e6-949c-655d9fa6db21"],"/Users/robertmccann/Projects/hof/frontend/template-mixins/mixins/helpers.js":["9651d42a-59d8-48e6-949c-655d9fa6db21"],"/Users/robertmccann/Projects/hof/index.js":["9651d42a-59d8-48e6-949c-655d9fa6db21"],"/Users/robertmccann/Projects/hof/frontend/index.js":["9651d42a-59d8-48e6-949c-655d9fa6db21"],"/Users/robertmccann/Projects/hof/frontend/govuk-template/index.js":["9651d42a-59d8-48e6-949c-655d9fa6db21"],"/Users/robertmccann/Projects/hof/frontend/govuk-template/build/index.js":["9651d42a-59d8-48e6-949c-655d9fa6db21"],"/Users/robertmccann/Projects/hof/frontend/govuk-template/build/config.js":["9651d42a-59d8-48e6-949c-655d9fa6db21"],"/Users/robertmccann/Projects/hof/frontend/template-partials/index.js":["9651d42a-59d8-48e6-949c-655d9fa6db21"],"/Users/robertmccann/Projects/hof/frontend/template-partials/translations/index.js":["9651d42a-59d8-48e6-949c-655d9fa6db21"],"/Users/robertmccann/Projects/hof/frontend/themes/index.js":["9651d42a-59d8-48e6-949c-655d9fa6db21"],"/Users/robertmccann/Projects/hof/frontend/themes/gov-uk/index.js":["9651d42a-59d8-48e6-949c-655d9fa6db21"],"/Users/robertmccann/Projects/hof/frontend/toolkit/index.js":["9651d42a-59d8-48e6-949c-655d9fa6db21"],"/Users/robertmccann/Projects/hof/frontend/toolkit/assets/javascript/helpers.js":["9651d42a-59d8-48e6-949c-655d9fa6db21"],"/Users/robertmccann/Projects/hof/frontend/toolkit/assets/javascript/form-focus.js":["9651d42a-59d8-48e6-949c-655d9fa6db21"],"/Users/robertmccann/Projects/hof/frontend/toolkit/assets/javascript/progressive-reveal.js":["9651d42a-59d8-48e6-949c-655d9fa6db21"],"/Users/robertmccann/Projects/hof/frontend/toolkit/assets/javascript/validation.js":["9651d42a-59d8-48e6-949c-655d9fa6db21"],"/Users/robertmccann/Projects/hof/frontend/toolkit/assets/javascript/character-count.js":["9651d42a-59d8-48e6-949c-655d9fa6db21"],"/Users/robertmccann/Projects/hof/middleware/index.js":["9651d42a-59d8-48e6-949c-655d9fa6db21"],"/Users/robertmccann/Projects/hof/middleware/cookies.js":["9651d42a-59d8-48e6-949c-655d9fa6db21"],"/Users/robertmccann/Projects/hof/middleware/errors.js":["9651d42a-59d8-48e6-949c-655d9fa6db21"],"/Users/robertmccann/Projects/hof/middleware/not-found.js":["9651d42a-59d8-48e6-949c-655d9fa6db21"],"/Users/robertmccann/Projects/hof/middleware/deep-translate.js":["9651d42a-59d8-48e6-949c-655d9fa6db21"],"/Users/robertmccann/Projects/hof/lib/markdown.js":["9651d42a-59d8-48e6-949c-655d9fa6db21"],"/Users/robertmccann/Projects/hof/lib/router.js":["9651d42a-59d8-48e6-949c-655d9fa6db21"],"/Users/robertmccann/Projects/hof/wizard/index.js":["9651d42a-59d8-48e6-949c-655d9fa6db21"],"/Users/robertmccann/Projects/hof/wizard/behaviours/index.js":["9651d42a-59d8-48e6-949c-655d9fa6db21"],"/Users/robertmccann/Projects/hof/wizard/behaviours/complete.js":["9651d42a-59d8-48e6-949c-655d9fa6db21"],"/Users/robertmccann/Projects/hof/wizard/util/constants.js":["9651d42a-59d8-48e6-949c-655d9fa6db21"],"/Users/robertmccann/Projects/hof/lib/helpers.js":["9651d42a-59d8-48e6-949c-655d9fa6db21"],"/Users/robertmccann/Projects/hof/lib/health.js":["9651d42a-59d8-48e6-949c-655d9fa6db21"],"/Users/robertmccann/Projects/hof/lib/serve-static.js":["9651d42a-59d8-48e6-949c-655d9fa6db21"],"/Users/robertmccann/Projects/hof/lib/ga-tag.js":["9651d42a-59d8-48e6-949c-655d9fa6db21"],"/Users/robertmccann/Projects/hof/lib/sessions.js":["9651d42a-59d8-48e6-949c-655d9fa6db21"],"/Users/robertmccann/Projects/hof/lib/settings.js":["9651d42a-59d8-48e6-949c-655d9fa6db21"],"/Users/robertmccann/Projects/hof/lib/logger.js":["9651d42a-59d8-48e6-949c-655d9fa6db21"],"/Users/robertmccann/Projects/hof/build/index.js":["9651d42a-59d8-48e6-949c-655d9fa6db21"],"/Users/robertmccann/Projects/hof/config/builder-defaults.js":["9651d42a-59d8-48e6-949c-655d9fa6db21"],"/Users/robertmccann/Projects/hof/transpiler/index.js":["9651d42a-59d8-48e6-949c-655d9fa6db21"],"/Users/robertmccann/Projects/hof/transpiler/lib/compile.js":["9651d42a-59d8-48e6-949c-655d9fa6db21"],"/Users/robertmccann/Projects/hof/transpiler/lib/build.js":["9651d42a-59d8-48e6-949c-655d9fa6db21"],"/Users/robertmccann/Projects/hof/transpiler/lib/expand-dirs.js":["9651d42a-59d8-48e6-949c-655d9fa6db21"],"/Users/robertmccann/Projects/hof/transpiler/lib/aggregate.js":["9651d42a-59d8-48e6-949c-655d9fa6db21"],"/Users/robertmccann/Projects/hof/transpiler/lib/write-files.js":["9651d42a-59d8-48e6-949c-655d9fa6db21"],"/Users/robertmccann/Projects/hof/model/apis/index.js":["9651d42a-59d8-48e6-949c-655d9fa6db21"],"/Users/robertmccann/Projects/hof/model/apis/html-to-pdf-converter.js":["9651d42a-59d8-48e6-949c-655d9fa6db21"],"/Users/robertmccann/Projects/hof/wizard/model.js":["9651d42a-59d8-48e6-949c-655d9fa6db21"],"/Users/robertmccann/Projects/hof/wizard/middleware/back-links.js":["9651d42a-59d8-48e6-949c-655d9fa6db21"],"/Users/robertmccann/Projects/hof/wizard/util/helpers.js":["9651d42a-59d8-48e6-949c-655d9fa6db21"],"/Users/robertmccann/Projects/hof/wizard/middleware/check-complete.js":["9651d42a-59d8-48e6-949c-655d9fa6db21"],"/Users/robertmccann/Projects/hof/wizard/middleware/check-progress.js":["9651d42a-59d8-48e6-949c-655d9fa6db21"],"/Users/robertmccann/Projects/hof/wizard/middleware/check-session.js":["9651d42a-59d8-48e6-949c-655d9fa6db21"],"/Users/robertmccann/Projects/hof/wizard/middleware/csrf.js":["9651d42a-59d8-48e6-949c-655d9fa6db21"],"/Users/robertmccann/Projects/hof/sandbox/test/_unit/example_app/sections/summary-data-sections.spec.js":["9651d42a-59d8-48e6-949c-655d9fa6db21"],"/Users/robertmccann/Projects/hof/sandbox/apps/sandbox/sections/summary-data-sections.js":["9651d42a-59d8-48e6-949c-655d9fa6db21"],"/Users/robertmccann/Projects/hof/sandbox/apps/sandbox/lib/staticAppealStages.js":["9651d42a-59d8-48e6-949c-655d9fa6db21"],"/Users/robertmccann/Projects/hof/sandbox/apps/sandbox/fields.js":["9651d42a-59d8-48e6-949c-655d9fa6db21"],"/Users/robertmccann/Projects/hof/sandbox/test/helpers/utilities.js":["9651d42a-59d8-48e6-949c-655d9fa6db21"],"/Users/robertmccann/Projects/hof/sandbox/apps/sandbox/behaviours/international-number.js":["9651d42a-59d8-48e6-949c-655d9fa6db21"],"/Users/robertmccann/Projects/hof/lib/encryption.js":["9651d42a-59d8-48e6-949c-655d9fa6db21"],"/Users/robertmccann/Projects/hof/wizard/middleware/session.js":["9651d42a-59d8-48e6-949c-655d9fa6db21"],"/Users/robertmccann/Projects/hof/wizard/middleware/session-model.js":["9651d42a-59d8-48e6-949c-655d9fa6db21"]},"externalIds":{}}
@@ -1,5 +1,6 @@
1
1
  {
2
2
  "continue": "Continue",
3
+ "stay-on-page": "Stay on this page",
3
4
  "send": "Send",
4
5
  "change": "Change",
5
6
  "close": "Close",
@@ -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,26 @@
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
+ </div>
18
+ </div>
19
+ </div>
20
+ <script {{#nonce}}nonce="{{nonce}}"{{/nonce}} type="text/javascript">
21
+ console.log("onClick with Timeout")
22
+ setTimeout(function() {
23
+ openDialog('dialog1', this)
24
+ }, 5 * 1000)
25
+ </script>
26
+ </div>
@@ -0,0 +1,358 @@
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
+ };
120
+
121
+ aria.closeCurrentDialog = function () {
122
+ const currentDialog = aria.getCurrentDialog();
123
+ if (currentDialog) {
124
+ currentDialog.close();
125
+ return true;
126
+ }
127
+
128
+ return false;
129
+ };
130
+
131
+ aria.handleEscape = function (event) {
132
+ const key = event.which || event.keyCode;
133
+
134
+ if (key === aria.KeyCode.ESC && aria.closeCurrentDialog()) {
135
+ event.stopPropagation();
136
+ }
137
+ };
138
+
139
+ document.addEventListener('keyup', aria.handleEscape);
140
+
141
+ /**
142
+ * @class
143
+ * @description Dialog object providing modal focus management.
144
+ *
145
+ * Assumptions: The element serving as the dialog container is present in the
146
+ * DOM and hidden. The dialog container has role='dialog'.
147
+ * @param dialogId
148
+ * The ID of the element serving as the dialog container.
149
+ * @param focusAfterClosed
150
+ * Either the DOM node or the ID of the DOM node to focus when the
151
+ * dialog closes.
152
+ * @param focusFirst
153
+ * Optional parameter containing either the DOM node or the ID of the
154
+ * DOM node to focus when the dialog opens. If not specified, the
155
+ * first focusable element in the dialog will receive focus.
156
+ */
157
+ aria.Dialog = function (dialogId, focusAfterClosed, focusFirst) {
158
+ this.dialogNode = document.getElementById(dialogId);
159
+ if (this.dialogNode === null) {
160
+ throw new Error('No element found with id="' + dialogId + '".');
161
+ }
162
+
163
+ const validRoles = ['dialog', 'alertdialog'];
164
+ const isDialog = (this.dialogNode.getAttribute('role') || '')
165
+ .trim()
166
+ .split(/\s+/g)
167
+ .some(function (token) {
168
+ return validRoles.some(function (role) {
169
+ return token === role;
170
+ });
171
+ });
172
+ if (!isDialog) {
173
+ throw new Error(
174
+ 'Dialog() requires a DOM element with ARIA role of dialog or alertdialog.'
175
+ );
176
+ }
177
+
178
+ // Wrap in an individual backdrop element if one doesn't exist
179
+ // Native <dialog> elements use the ::backdrop pseudo-element, which
180
+ // works similarly.
181
+ const backdropClass = 'dialog-backdrop';
182
+ if (this.dialogNode.parentNode.classList.contains(backdropClass)) {
183
+ this.backdropNode = this.dialogNode.parentNode;
184
+ } else {
185
+ this.backdropNode = document.createElement('div');
186
+ this.backdropNode.className = backdropClass;
187
+ this.dialogNode.parentNode.insertBefore(
188
+ this.backdropNode,
189
+ this.dialogNode
190
+ );
191
+ this.backdropNode.appendChild(this.dialogNode);
192
+ }
193
+ this.backdropNode.classList.add('active');
194
+
195
+ // Disable scroll on the body element
196
+ document.body.classList.add(aria.Utils.dialogOpenClass);
197
+
198
+ if (typeof focusAfterClosed === 'string') {
199
+ this.focusAfterClosed = document.getElementById(focusAfterClosed);
200
+ } else if (typeof focusAfterClosed === 'object') {
201
+ this.focusAfterClosed = focusAfterClosed;
202
+ } else {
203
+ throw new Error(
204
+ 'the focusAfterClosed parameter is required for the aria.Dialog constructor.'
205
+ );
206
+ }
207
+
208
+ if (typeof focusFirst === 'string') {
209
+ this.focusFirst = document.getElementById(focusFirst);
210
+ } else if (typeof focusFirst === 'object') {
211
+ this.focusFirst = focusFirst;
212
+ } else {
213
+ this.focusFirst = null;
214
+ }
215
+
216
+ // Bracket the dialog node with two invisible, focusable nodes.
217
+ // While this dialog is open, we use these to make sure that focus never
218
+ // leaves the document even if dialogNode is the first or last node.
219
+ const preDiv = document.createElement('div');
220
+ this.preNode = this.dialogNode.parentNode.insertBefore(
221
+ preDiv,
222
+ this.dialogNode
223
+ );
224
+ this.preNode.tabIndex = 0;
225
+ const postDiv = document.createElement('div');
226
+ this.postNode = this.dialogNode.parentNode.insertBefore(
227
+ postDiv,
228
+ this.dialogNode.nextSibling
229
+ );
230
+ this.postNode.tabIndex = 0;
231
+
232
+ // If this modal is opening on top of one that is already open,
233
+ // get rid of the document focus listener of the open dialog.
234
+ if (aria.OpenDialogList.length > 0) {
235
+ aria.getCurrentDialog().removeListeners();
236
+ }
237
+
238
+ this.addListeners();
239
+ aria.OpenDialogList.push(this);
240
+ this.clearDialog();
241
+ this.dialogNode.className = 'default_dialog'; // make visible
242
+
243
+ if (this.focusFirst) {
244
+ this.focusFirst.focus();
245
+ } else {
246
+ aria.Utils.focusFirstDescendant(this.dialogNode);
247
+ }
248
+
249
+ this.lastFocus = document.activeElement;
250
+ }; // end Dialog constructor
251
+
252
+ aria.Dialog.prototype.clearDialog = function () {
253
+ Array.prototype.map.call(
254
+ this.dialogNode.querySelectorAll('input'),
255
+ function (input) {
256
+ input.value = '';
257
+ }
258
+ );
259
+ };
260
+
261
+ /**
262
+ * @description
263
+ * Hides the current top dialog,
264
+ * removes listeners of the top dialog,
265
+ * restore listeners of a parent dialog if one was open under the one that just closed,
266
+ * and sets focus on the element specified for focusAfterClosed.
267
+ */
268
+ aria.Dialog.prototype.close = function () {
269
+ aria.OpenDialogList.pop();
270
+ this.removeListeners();
271
+ aria.Utils.remove(this.preNode);
272
+ aria.Utils.remove(this.postNode);
273
+ this.dialogNode.className = 'hidden';
274
+ this.backdropNode.classList.remove('active');
275
+ this.focusAfterClosed.focus();
276
+
277
+ // If a dialog was open underneath this one, restore its listeners.
278
+ if (aria.OpenDialogList.length > 0) {
279
+ aria.getCurrentDialog().addListeners();
280
+ } else {
281
+ document.body.classList.remove(aria.Utils.dialogOpenClass);
282
+ }
283
+ }; // end close
284
+
285
+ /**
286
+ * @description
287
+ * Hides the current dialog and replaces it with another.
288
+ * @param newDialogId
289
+ * ID of the dialog that will replace the currently open top dialog.
290
+ * @param newFocusAfterClosed
291
+ * Optional ID or DOM node specifying where to place focus when the new dialog closes.
292
+ * If not specified, focus will be placed on the element specified by the dialog being replaced.
293
+ * @param newFocusFirst
294
+ * Optional ID or DOM node specifying where to place focus in the new dialog when it opens.
295
+ * If not specified, the first focusable element will receive focus.
296
+ */
297
+ aria.Dialog.prototype.replace = function (
298
+ newDialogId,
299
+ newFocusAfterClosed,
300
+ newFocusFirst
301
+ ) {
302
+ aria.OpenDialogList.pop();
303
+ this.removeListeners();
304
+ aria.Utils.remove(this.preNode);
305
+ aria.Utils.remove(this.postNode);
306
+ this.dialogNode.className = 'hidden';
307
+ this.backdropNode.classList.remove('active');
308
+
309
+ const focusAfterClosed = newFocusAfterClosed || this.focusAfterClosed;
310
+ new aria.Dialog(newDialogId, focusAfterClosed, newFocusFirst);
311
+ }; // end replace
312
+
313
+ aria.Dialog.prototype.addListeners = function () {
314
+ document.addEventListener('focus', this.trapFocus, true);
315
+ }; // end addListeners
316
+
317
+ aria.Dialog.prototype.removeListeners = function () {
318
+ document.removeEventListener('focus', this.trapFocus, true);
319
+ }; // end removeListeners
320
+
321
+ aria.Dialog.prototype.trapFocus = function (event) {
322
+ if (aria.Utils.IgnoreUtilFocusChanges) {
323
+ return;
324
+ }
325
+ const currentDialog = aria.getCurrentDialog();
326
+ if (currentDialog.dialogNode.contains(event.target)) {
327
+ currentDialog.lastFocus = event.target;
328
+ } else {
329
+ aria.Utils.focusFirstDescendant(currentDialog.dialogNode);
330
+ if (currentDialog.lastFocus === document.activeElement) {
331
+ aria.Utils.focusLastDescendant(currentDialog.dialogNode);
332
+ }
333
+ currentDialog.lastFocus = document.activeElement;
334
+ }
335
+ }; // end trapFocus
336
+
337
+ window.openDialog = function (dialogId, focusAfterClosed, focusFirst) {
338
+ new aria.Dialog(dialogId, focusAfterClosed, focusFirst);
339
+ };
340
+
341
+ window.closeDialog = function (closeButton) {
342
+ const topDialog = aria.getCurrentDialog();
343
+ if (topDialog.dialogNode.contains(closeButton)) {
344
+ topDialog.close();
345
+ }
346
+ }; // end closeDialog
347
+
348
+ window.replaceDialog = function (
349
+ newDialogId,
350
+ newFocusAfterClosed,
351
+ newFocusFirst
352
+ ) {
353
+ const topDialog = aria.getCurrentDialog();
354
+ if (topDialog.dialogNode.contains(document.activeElement)) {
355
+ topDialog.replace(newDialogId, newFocusAfterClosed, newFocusFirst);
356
+ }
357
+ }; // end replaceDialog
358
+ })();
@@ -0,0 +1,114 @@
1
+ 'use strict';
2
+ /**
3
+ * @namespace aria
4
+ */
5
+
6
+ window.aria = window.aria || {};
7
+
8
+ (function () {
9
+ // eslint-disable-next-line no-console
10
+ // console.log('TEST UTILS.js', aria);
11
+ })();
12
+
13
+ window.aria.Utils = window.aria.Utils || {};
14
+
15
+ // Polyfill src https://developer.mozilla.org/en-US/docs/Web/API/Element/matches
16
+ window.aria.Utils.matches = function (element, selector) {
17
+ if (!Element.prototype.matches) {
18
+ Element.prototype.matches =
19
+ Element.prototype.matchesSelector ||
20
+ Element.prototype.mozMatchesSelector ||
21
+ Element.prototype.msMatchesSelector ||
22
+ Element.prototype.oMatchesSelector ||
23
+ Element.prototype.webkitMatchesSelector ||
24
+ function (s) {
25
+ const matches = element.parentNode.querySelectorAll(s);
26
+ let i = matches.length;
27
+ while (--i >= 0 && matches.item(i) !== this) {
28
+ // empty
29
+ }
30
+ return i > -1;
31
+ };
32
+ }
33
+
34
+ return element.matches(selector);
35
+ };
36
+
37
+ window.aria.Utils.remove = function (item) {
38
+ if (item.remove && typeof item.remove === 'function') {
39
+ return item.remove();
40
+ }
41
+ if (
42
+ item.parentNode &&
43
+ item.parentNode.removeChild &&
44
+ typeof item.parentNode.removeChild === 'function'
45
+ ) {
46
+ return item.parentNode.removeChild(item);
47
+ }
48
+ return false;
49
+ };
50
+
51
+ window.aria.Utils.isFocusable = function (element) {
52
+ if (element.tabIndex < 0) {
53
+ return false;
54
+ }
55
+
56
+ if (element.disabled) {
57
+ return false;
58
+ }
59
+
60
+ switch (element.nodeName) {
61
+ case 'A':
62
+ return !!element.href && element.rel !== 'ignore';
63
+ case 'INPUT':
64
+ return element.type !== 'hidden';
65
+ case 'BUTTON':
66
+ case 'SELECT':
67
+ case 'TEXTAREA':
68
+ return true;
69
+ default:
70
+ return false;
71
+ }
72
+ };
73
+
74
+ window.aria.Utils.getAncestorBySelector = function (element, selector) {
75
+ if (!window.aria.Utils.matches(element, selector + ' ' + element.tagName)) {
76
+ // Element is not inside an element that matches selector
77
+ return null;
78
+ }
79
+
80
+ // Move up the DOM tree until a parent matching the selector is found
81
+ let currentNode = element;
82
+ let ancestor = null;
83
+ while (ancestor === null) {
84
+ if (window.aria.Utils.matches(currentNode.parentNode, selector)) {
85
+ ancestor = currentNode.parentNode;
86
+ } else {
87
+ currentNode = currentNode.parentNode;
88
+ }
89
+ }
90
+
91
+ return ancestor;
92
+ };
93
+
94
+ window.aria.Utils.hasClass = function (element, className) {
95
+ return new RegExp('(\\s|^)' + className + '(\\s|$)').test(element.className);
96
+ };
97
+
98
+ window.aria.Utils.addClass = function (element, className) {
99
+ if (!window.aria.Utils.hasClass(element, className)) {
100
+ element.className += ' ' + className;
101
+ }
102
+ };
103
+
104
+ window.aria.Utils.removeClass = function (element, className) {
105
+ const classRegex = new RegExp('(\\s|^)' + className + '(\\s|$)');
106
+ element.className = element.className.replace(classRegex, ' ').trim();
107
+ };
108
+
109
+ window.aria.Utils.bindMethods = function (object /* , ...methodNames */) {
110
+ const methodNames = Array.prototype.slice.call(arguments, 1);
111
+ methodNames.forEach(function (method) {
112
+ object[method] = object[method].bind(object);
113
+ });
114
+ };
@@ -11,6 +11,7 @@ var validation = toolkit.validation;
11
11
  var GOVUK = require('govuk-frontend');
12
12
  GOVUK.initAll();
13
13
  window.GOVUK = GOVUK;
14
+ var dialog = require('./dialog');
14
15
  var skipToMain = require('./skip-to-main');
15
16
  var cookie = require('./govuk-cookies');
16
17
  var cookieSettings = require('./cookieSettings');
@@ -26,6 +26,7 @@ $path: "/public/images/" !default;
26
26
  @import "cookie-settings";
27
27
  @import "check_your_answers";
28
28
  @import "pdf";
29
+ @import "session_timeout";
29
30
 
30
31
  // Modules
31
32
  @import "modules/validation";