hof 22.0.0-timeout-warning-beta.1 → 22.0.0-timeout-warning-beta.3
Sign up to get free protection for your applications and to get access to all the features.
- package/.nyc_output/3971586e-d34a-49de-8cd7-964103fb3317.json +1 -0
- package/.nyc_output/processinfo/{39337dba-f075-4b5c-ad46-31665a16d443.json → 3971586e-d34a-49de-8cd7-964103fb3317.json} +1 -1
- package/.nyc_output/processinfo/index.json +1 -1
- package/CHANGELOG.md +5 -0
- package/frontend/themes/gov-uk/client-js/index.js +0 -1
- package/frontend/themes/gov-uk/client-js/session-timeout-dialog.js +47 -56
- package/model/apis/axios-settings.js +21 -0
- package/model/apis/html-to-pdf-converter.js +10 -8
- package/model/index.js +102 -87
- package/package.json +4 -4
- package/sandbox/public/js/bundle.js +49 -57
- package/.nyc_output/39337dba-f075-4b5c-ad46-31665a16d443.json +0 -1
@@ -1 +1 @@
|
|
1
|
-
{"parent":null,"pid":
|
1
|
+
{"parent":null,"pid":13474,"argv":["/Users/user/.nvm/versions/node/v20.9.0/bin/node","/Users/user/Documents/HO/HOF/hof/node_modules/.bin/_mocha","test/**/*.spec.js","sandbox/test/**/*.spec.js"],"execArgv":[],"cwd":"/Users/user/Documents/HO/HOF/hof","time":1722271618026,"ppid":13467,"coverageFilename":"/Users/user/Documents/HO/HOF/hof/.nyc_output/3971586e-d34a-49de-8cd7-964103fb3317.json","externalId":"","uuid":"3971586e-d34a-49de-8cd7-964103fb3317","files":["/Users/user/Documents/HO/HOF/hof/model/index.js","/Users/user/Documents/HO/HOF/hof/model/apis/axios-settings.js","/Users/user/Documents/HO/HOF/hof/components/index.js","/Users/user/Documents/HO/HOF/hof/components/address-lookup/index.js","/Users/user/Documents/HO/HOF/hof/components/address-lookup/default-model.js","/Users/user/Documents/HO/HOF/hof/components/address-lookup/defaults.js","/Users/user/Documents/HO/HOF/hof/components/clear-session/index.js","/Users/user/Documents/HO/HOF/hof/components/combine-and-loop-fields/index.js","/Users/user/Documents/HO/HOF/hof/components/date/index.js","/Users/user/Documents/HO/HOF/hof/components/date/fields.js","/Users/user/Documents/HO/HOF/hof/components/emailer/index.js","/Users/user/Documents/HO/HOF/hof/components/emailer/email-service.js","/Users/user/Documents/HO/HOF/hof/components/emailer/emailer.js","/Users/user/Documents/HO/HOF/hof/components/emailer/transports/index.js","/Users/user/Documents/HO/HOF/hof/components/emailer/transports/smtp.js","/Users/user/Documents/HO/HOF/hof/components/emailer/transports/ses.js","/Users/user/Documents/HO/HOF/hof/components/emailer/transports/stub.js","/Users/user/Documents/HO/HOF/hof/components/emailer/transports/debug.js","/Users/user/Documents/HO/HOF/hof/components/homeoffice-countries/index.js","/Users/user/Documents/HO/HOF/hof/config/component-defaults.js","/Users/user/Documents/HO/HOF/hof/components/notify/index.js","/Users/user/Documents/HO/HOF/hof/components/notify/notify.js","/Users/user/Documents/HO/HOF/hof/components/summary/index.js","/Users/user/Documents/HO/HOF/hof/config/rate-limits.js","/Users/user/Documents/HO/HOF/hof/middleware/rate-limiter.js","/Users/user/Documents/HO/HOF/hof/config/hof-defaults.js","/Users/user/Documents/HO/HOF/hof/controller/base-controller.js","/Users/user/Documents/HO/HOF/hof/controller/formatting/index.js","/Users/user/Documents/HO/HOF/hof/controller/validation/index.js","/Users/user/Documents/HO/HOF/hof/controller/validation/validators.js","/Users/user/Documents/HO/HOF/hof/controller/validation/email.js","/Users/user/Documents/HO/HOF/hof/controller/validation-error.js","/Users/user/Documents/HO/HOF/hof/utilities/index.js","/Users/user/Documents/HO/HOF/hof/utilities/autofill/index.js","/Users/user/Documents/HO/HOF/hof/utilities/autofill/inputs.js","/Users/user/Documents/HO/HOF/hof/utilities/test-data/index.js","/Users/user/Documents/HO/HOF/hof/utilities/countries.js","/Users/user/Documents/HO/HOF/hof/utilities/helpers/index.js","/Users/user/Documents/HO/HOF/hof/utilities/reqres/index.js","/Users/user/Documents/HO/HOF/hof/config/sanitisation-rules.js","/Users/user/Documents/HO/HOF/hof/controller/formatting/formatters.js","/Users/user/Documents/HO/HOF/hof/controller/index.js","/Users/user/Documents/HO/HOF/hof/controller/behaviour-session.js","/Users/user/Documents/HO/HOF/hof/controller/behaviour-hooks.js","/Users/user/Documents/HO/HOF/hof/controller/controller.js","/Users/user/Documents/HO/HOF/hof/sandbox/apps/sandbox/behaviours/country-select.js","/Users/user/Documents/HO/HOF/hof/frontend/template-mixins/mixins/index.js","/Users/user/Documents/HO/HOF/hof/frontend/template-mixins/mixins/template-mixins.js","/Users/user/Documents/HO/HOF/hof/frontend/template-mixins/mixins/render.js","/Users/user/Documents/HO/HOF/hof/frontend/template-mixins/mixins/helpers.js","/Users/user/Documents/HO/HOF/hof/index.js","/Users/user/Documents/HO/HOF/hof/frontend/index.js","/Users/user/Documents/HO/HOF/hof/frontend/govuk-template/index.js","/Users/user/Documents/HO/HOF/hof/frontend/govuk-template/build/index.js","/Users/user/Documents/HO/HOF/hof/frontend/govuk-template/build/config.js","/Users/user/Documents/HO/HOF/hof/frontend/template-partials/index.js","/Users/user/Documents/HO/HOF/hof/frontend/template-partials/translations/index.js","/Users/user/Documents/HO/HOF/hof/frontend/themes/index.js","/Users/user/Documents/HO/HOF/hof/frontend/themes/gov-uk/index.js","/Users/user/Documents/HO/HOF/hof/frontend/toolkit/index.js","/Users/user/Documents/HO/HOF/hof/frontend/toolkit/assets/javascript/helpers.js","/Users/user/Documents/HO/HOF/hof/frontend/toolkit/assets/javascript/form-focus.js","/Users/user/Documents/HO/HOF/hof/frontend/toolkit/assets/javascript/progressive-reveal.js","/Users/user/Documents/HO/HOF/hof/frontend/toolkit/assets/javascript/validation.js","/Users/user/Documents/HO/HOF/hof/frontend/toolkit/assets/javascript/character-count.js","/Users/user/Documents/HO/HOF/hof/middleware/index.js","/Users/user/Documents/HO/HOF/hof/middleware/cookies.js","/Users/user/Documents/HO/HOF/hof/middleware/errors.js","/Users/user/Documents/HO/HOF/hof/middleware/not-found.js","/Users/user/Documents/HO/HOF/hof/middleware/deep-translate.js","/Users/user/Documents/HO/HOF/hof/lib/markdown.js","/Users/user/Documents/HO/HOF/hof/lib/router.js","/Users/user/Documents/HO/HOF/hof/wizard/index.js","/Users/user/Documents/HO/HOF/hof/wizard/behaviours/index.js","/Users/user/Documents/HO/HOF/hof/wizard/behaviours/complete.js","/Users/user/Documents/HO/HOF/hof/wizard/util/constants.js","/Users/user/Documents/HO/HOF/hof/lib/helpers.js","/Users/user/Documents/HO/HOF/hof/lib/health.js","/Users/user/Documents/HO/HOF/hof/lib/serve-static.js","/Users/user/Documents/HO/HOF/hof/lib/ga-tag.js","/Users/user/Documents/HO/HOF/hof/lib/sessions.js","/Users/user/Documents/HO/HOF/hof/lib/settings.js","/Users/user/Documents/HO/HOF/hof/lib/logger.js","/Users/user/Documents/HO/HOF/hof/build/index.js","/Users/user/Documents/HO/HOF/hof/config/builder-defaults.js","/Users/user/Documents/HO/HOF/hof/transpiler/index.js","/Users/user/Documents/HO/HOF/hof/transpiler/lib/compile.js","/Users/user/Documents/HO/HOF/hof/transpiler/lib/build.js","/Users/user/Documents/HO/HOF/hof/transpiler/lib/expand-dirs.js","/Users/user/Documents/HO/HOF/hof/transpiler/lib/aggregate.js","/Users/user/Documents/HO/HOF/hof/transpiler/lib/write-files.js","/Users/user/Documents/HO/HOF/hof/model/apis/index.js","/Users/user/Documents/HO/HOF/hof/model/apis/html-to-pdf-converter.js","/Users/user/Documents/HO/HOF/hof/wizard/model.js","/Users/user/Documents/HO/HOF/hof/wizard/middleware/back-links.js","/Users/user/Documents/HO/HOF/hof/wizard/util/helpers.js","/Users/user/Documents/HO/HOF/hof/wizard/middleware/check-complete.js","/Users/user/Documents/HO/HOF/hof/wizard/middleware/check-progress.js","/Users/user/Documents/HO/HOF/hof/wizard/middleware/check-session.js","/Users/user/Documents/HO/HOF/hof/wizard/middleware/csrf.js","/Users/user/Documents/HO/HOF/hof/sandbox/test/_unit/example_app/sections/summary-data-sections.spec.js","/Users/user/Documents/HO/HOF/hof/sandbox/apps/sandbox/sections/summary-data-sections.js","/Users/user/Documents/HO/HOF/hof/sandbox/apps/sandbox/lib/staticAppealStages.js","/Users/user/Documents/HO/HOF/hof/sandbox/apps/sandbox/fields.js","/Users/user/Documents/HO/HOF/hof/sandbox/test/helpers/utilities.js","/Users/user/Documents/HO/HOF/hof/sandbox/apps/sandbox/behaviours/international-number.js","/Users/user/Documents/HO/HOF/hof/lib/encryption.js","/Users/user/Documents/HO/HOF/hof/wizard/middleware/session.js","/Users/user/Documents/HO/HOF/hof/wizard/middleware/session-model.js"]}
|
@@ -1 +1 @@
|
|
1
|
-
{"processes":{"39337dba-f075-4b5c-ad46-31665a16d443":{"parent":null,"children":[]}},"files":{"/Users/user/Documents/HO/HOF/hof/model/index.js":["39337dba-f075-4b5c-ad46-31665a16d443"],"/Users/user/Documents/HO/HOF/hof/model/apis/axios-settings.js":["39337dba-f075-4b5c-ad46-31665a16d443"],"/Users/user/Documents/HO/HOF/hof/components/index.js":["39337dba-f075-4b5c-ad46-31665a16d443"],"/Users/user/Documents/HO/HOF/hof/components/address-lookup/index.js":["39337dba-f075-4b5c-ad46-31665a16d443"],"/Users/user/Documents/HO/HOF/hof/components/address-lookup/default-model.js":["39337dba-f075-4b5c-ad46-31665a16d443"],"/Users/user/Documents/HO/HOF/hof/components/address-lookup/defaults.js":["39337dba-f075-4b5c-ad46-31665a16d443"],"/Users/user/Documents/HO/HOF/hof/components/clear-session/index.js":["39337dba-f075-4b5c-ad46-31665a16d443"],"/Users/user/Documents/HO/HOF/hof/components/combine-and-loop-fields/index.js":["39337dba-f075-4b5c-ad46-31665a16d443"],"/Users/user/Documents/HO/HOF/hof/components/date/index.js":["39337dba-f075-4b5c-ad46-31665a16d443"],"/Users/user/Documents/HO/HOF/hof/components/date/fields.js":["39337dba-f075-4b5c-ad46-31665a16d443"],"/Users/user/Documents/HO/HOF/hof/components/emailer/index.js":["39337dba-f075-4b5c-ad46-31665a16d443"],"/Users/user/Documents/HO/HOF/hof/components/emailer/email-service.js":["39337dba-f075-4b5c-ad46-31665a16d443"],"/Users/user/Documents/HO/HOF/hof/components/emailer/emailer.js":["39337dba-f075-4b5c-ad46-31665a16d443"],"/Users/user/Documents/HO/HOF/hof/components/emailer/transports/index.js":["39337dba-f075-4b5c-ad46-31665a16d443"],"/Users/user/Documents/HO/HOF/hof/components/emailer/transports/smtp.js":["39337dba-f075-4b5c-ad46-31665a16d443"],"/Users/user/Documents/HO/HOF/hof/components/emailer/transports/ses.js":["39337dba-f075-4b5c-ad46-31665a16d443"],"/Users/user/Documents/HO/HOF/hof/components/emailer/transports/stub.js":["39337dba-f075-4b5c-ad46-31665a16d443"],"/Users/user/Documents/HO/HOF/hof/components/emailer/transports/debug.js":["39337dba-f075-4b5c-ad46-31665a16d443"],"/Users/user/Documents/HO/HOF/hof/components/homeoffice-countries/index.js":["39337dba-f075-4b5c-ad46-31665a16d443"],"/Users/user/Documents/HO/HOF/hof/config/component-defaults.js":["39337dba-f075-4b5c-ad46-31665a16d443"],"/Users/user/Documents/HO/HOF/hof/components/notify/index.js":["39337dba-f075-4b5c-ad46-31665a16d443"],"/Users/user/Documents/HO/HOF/hof/components/notify/notify.js":["39337dba-f075-4b5c-ad46-31665a16d443"],"/Users/user/Documents/HO/HOF/hof/components/summary/index.js":["39337dba-f075-4b5c-ad46-31665a16d443"],"/Users/user/Documents/HO/HOF/hof/config/rate-limits.js":["39337dba-f075-4b5c-ad46-31665a16d443"],"/Users/user/Documents/HO/HOF/hof/middleware/rate-limiter.js":["39337dba-f075-4b5c-ad46-31665a16d443"],"/Users/user/Documents/HO/HOF/hof/config/hof-defaults.js":["39337dba-f075-4b5c-ad46-31665a16d443"],"/Users/user/Documents/HO/HOF/hof/controller/base-controller.js":["39337dba-f075-4b5c-ad46-31665a16d443"],"/Users/user/Documents/HO/HOF/hof/controller/formatting/index.js":["39337dba-f075-4b5c-ad46-31665a16d443"],"/Users/user/Documents/HO/HOF/hof/controller/validation/index.js":["39337dba-f075-4b5c-ad46-31665a16d443"],"/Users/user/Documents/HO/HOF/hof/controller/validation/validators.js":["39337dba-f075-4b5c-ad46-31665a16d443"],"/Users/user/Documents/HO/HOF/hof/controller/validation/email.js":["39337dba-f075-4b5c-ad46-31665a16d443"],"/Users/user/Documents/HO/HOF/hof/controller/validation-error.js":["39337dba-f075-4b5c-ad46-31665a16d443"],"/Users/user/Documents/HO/HOF/hof/utilities/index.js":["39337dba-f075-4b5c-ad46-31665a16d443"],"/Users/user/Documents/HO/HOF/hof/utilities/autofill/index.js":["39337dba-f075-4b5c-ad46-31665a16d443"],"/Users/user/Documents/HO/HOF/hof/utilities/autofill/inputs.js":["39337dba-f075-4b5c-ad46-31665a16d443"],"/Users/user/Documents/HO/HOF/hof/utilities/test-data/index.js":["39337dba-f075-4b5c-ad46-31665a16d443"],"/Users/user/Documents/HO/HOF/hof/utilities/countries.js":["39337dba-f075-4b5c-ad46-31665a16d443"],"/Users/user/Documents/HO/HOF/hof/utilities/helpers/index.js":["39337dba-f075-4b5c-ad46-31665a16d443"],"/Users/user/Documents/HO/HOF/hof/utilities/reqres/index.js":["39337dba-f075-4b5c-ad46-31665a16d443"],"/Users/user/Documents/HO/HOF/hof/config/sanitisation-rules.js":["39337dba-f075-4b5c-ad46-31665a16d443"],"/Users/user/Documents/HO/HOF/hof/controller/formatting/formatters.js":["39337dba-f075-4b5c-ad46-31665a16d443"],"/Users/user/Documents/HO/HOF/hof/controller/index.js":["39337dba-f075-4b5c-ad46-31665a16d443"],"/Users/user/Documents/HO/HOF/hof/controller/behaviour-session.js":["39337dba-f075-4b5c-ad46-31665a16d443"],"/Users/user/Documents/HO/HOF/hof/controller/behaviour-hooks.js":["39337dba-f075-4b5c-ad46-31665a16d443"],"/Users/user/Documents/HO/HOF/hof/controller/controller.js":["39337dba-f075-4b5c-ad46-31665a16d443"],"/Users/user/Documents/HO/HOF/hof/sandbox/apps/sandbox/behaviours/country-select.js":["39337dba-f075-4b5c-ad46-31665a16d443"],"/Users/user/Documents/HO/HOF/hof/frontend/template-mixins/mixins/index.js":["39337dba-f075-4b5c-ad46-31665a16d443"],"/Users/user/Documents/HO/HOF/hof/frontend/template-mixins/mixins/template-mixins.js":["39337dba-f075-4b5c-ad46-31665a16d443"],"/Users/user/Documents/HO/HOF/hof/frontend/template-mixins/mixins/render.js":["39337dba-f075-4b5c-ad46-31665a16d443"],"/Users/user/Documents/HO/HOF/hof/frontend/template-mixins/mixins/helpers.js":["39337dba-f075-4b5c-ad46-31665a16d443"],"/Users/user/Documents/HO/HOF/hof/index.js":["39337dba-f075-4b5c-ad46-31665a16d443"],"/Users/user/Documents/HO/HOF/hof/frontend/index.js":["39337dba-f075-4b5c-ad46-31665a16d443"],"/Users/user/Documents/HO/HOF/hof/frontend/govuk-template/index.js":["39337dba-f075-4b5c-ad46-31665a16d443"],"/Users/user/Documents/HO/HOF/hof/frontend/govuk-template/build/index.js":["39337dba-f075-4b5c-ad46-31665a16d443"],"/Users/user/Documents/HO/HOF/hof/frontend/govuk-template/build/config.js":["39337dba-f075-4b5c-ad46-31665a16d443"],"/Users/user/Documents/HO/HOF/hof/frontend/template-partials/index.js":["39337dba-f075-4b5c-ad46-31665a16d443"],"/Users/user/Documents/HO/HOF/hof/frontend/template-partials/translations/index.js":["39337dba-f075-4b5c-ad46-31665a16d443"],"/Users/user/Documents/HO/HOF/hof/frontend/themes/index.js":["39337dba-f075-4b5c-ad46-31665a16d443"],"/Users/user/Documents/HO/HOF/hof/frontend/themes/gov-uk/index.js":["39337dba-f075-4b5c-ad46-31665a16d443"],"/Users/user/Documents/HO/HOF/hof/frontend/toolkit/index.js":["39337dba-f075-4b5c-ad46-31665a16d443"],"/Users/user/Documents/HO/HOF/hof/frontend/toolkit/assets/javascript/helpers.js":["39337dba-f075-4b5c-ad46-31665a16d443"],"/Users/user/Documents/HO/HOF/hof/frontend/toolkit/assets/javascript/form-focus.js":["39337dba-f075-4b5c-ad46-31665a16d443"],"/Users/user/Documents/HO/HOF/hof/frontend/toolkit/assets/javascript/progressive-reveal.js":["39337dba-f075-4b5c-ad46-31665a16d443"],"/Users/user/Documents/HO/HOF/hof/frontend/toolkit/assets/javascript/validation.js":["39337dba-f075-4b5c-ad46-31665a16d443"],"/Users/user/Documents/HO/HOF/hof/frontend/toolkit/assets/javascript/character-count.js":["39337dba-f075-4b5c-ad46-31665a16d443"],"/Users/user/Documents/HO/HOF/hof/middleware/index.js":["39337dba-f075-4b5c-ad46-31665a16d443"],"/Users/user/Documents/HO/HOF/hof/middleware/cookies.js":["39337dba-f075-4b5c-ad46-31665a16d443"],"/Users/user/Documents/HO/HOF/hof/middleware/errors.js":["39337dba-f075-4b5c-ad46-31665a16d443"],"/Users/user/Documents/HO/HOF/hof/middleware/not-found.js":["39337dba-f075-4b5c-ad46-31665a16d443"],"/Users/user/Documents/HO/HOF/hof/middleware/deep-translate.js":["39337dba-f075-4b5c-ad46-31665a16d443"],"/Users/user/Documents/HO/HOF/hof/lib/markdown.js":["39337dba-f075-4b5c-ad46-31665a16d443"],"/Users/user/Documents/HO/HOF/hof/lib/router.js":["39337dba-f075-4b5c-ad46-31665a16d443"],"/Users/user/Documents/HO/HOF/hof/wizard/index.js":["39337dba-f075-4b5c-ad46-31665a16d443"],"/Users/user/Documents/HO/HOF/hof/wizard/behaviours/index.js":["39337dba-f075-4b5c-ad46-31665a16d443"],"/Users/user/Documents/HO/HOF/hof/wizard/behaviours/complete.js":["39337dba-f075-4b5c-ad46-31665a16d443"],"/Users/user/Documents/HO/HOF/hof/wizard/util/constants.js":["39337dba-f075-4b5c-ad46-31665a16d443"],"/Users/user/Documents/HO/HOF/hof/lib/helpers.js":["39337dba-f075-4b5c-ad46-31665a16d443"],"/Users/user/Documents/HO/HOF/hof/lib/health.js":["39337dba-f075-4b5c-ad46-31665a16d443"],"/Users/user/Documents/HO/HOF/hof/lib/serve-static.js":["39337dba-f075-4b5c-ad46-31665a16d443"],"/Users/user/Documents/HO/HOF/hof/lib/ga-tag.js":["39337dba-f075-4b5c-ad46-31665a16d443"],"/Users/user/Documents/HO/HOF/hof/lib/sessions.js":["39337dba-f075-4b5c-ad46-31665a16d443"],"/Users/user/Documents/HO/HOF/hof/lib/settings.js":["39337dba-f075-4b5c-ad46-31665a16d443"],"/Users/user/Documents/HO/HOF/hof/lib/logger.js":["39337dba-f075-4b5c-ad46-31665a16d443"],"/Users/user/Documents/HO/HOF/hof/build/index.js":["39337dba-f075-4b5c-ad46-31665a16d443"],"/Users/user/Documents/HO/HOF/hof/config/builder-defaults.js":["39337dba-f075-4b5c-ad46-31665a16d443"],"/Users/user/Documents/HO/HOF/hof/transpiler/index.js":["39337dba-f075-4b5c-ad46-31665a16d443"],"/Users/user/Documents/HO/HOF/hof/transpiler/lib/compile.js":["39337dba-f075-4b5c-ad46-31665a16d443"],"/Users/user/Documents/HO/HOF/hof/transpiler/lib/build.js":["39337dba-f075-4b5c-ad46-31665a16d443"],"/Users/user/Documents/HO/HOF/hof/transpiler/lib/expand-dirs.js":["39337dba-f075-4b5c-ad46-31665a16d443"],"/Users/user/Documents/HO/HOF/hof/transpiler/lib/aggregate.js":["39337dba-f075-4b5c-ad46-31665a16d443"],"/Users/user/Documents/HO/HOF/hof/transpiler/lib/write-files.js":["39337dba-f075-4b5c-ad46-31665a16d443"],"/Users/user/Documents/HO/HOF/hof/model/apis/index.js":["39337dba-f075-4b5c-ad46-31665a16d443"],"/Users/user/Documents/HO/HOF/hof/model/apis/html-to-pdf-converter.js":["39337dba-f075-4b5c-ad46-31665a16d443"],"/Users/user/Documents/HO/HOF/hof/wizard/model.js":["39337dba-f075-4b5c-ad46-31665a16d443"],"/Users/user/Documents/HO/HOF/hof/wizard/middleware/back-links.js":["39337dba-f075-4b5c-ad46-31665a16d443"],"/Users/user/Documents/HO/HOF/hof/wizard/util/helpers.js":["39337dba-f075-4b5c-ad46-31665a16d443"],"/Users/user/Documents/HO/HOF/hof/wizard/middleware/check-complete.js":["39337dba-f075-4b5c-ad46-31665a16d443"],"/Users/user/Documents/HO/HOF/hof/wizard/middleware/check-progress.js":["39337dba-f075-4b5c-ad46-31665a16d443"],"/Users/user/Documents/HO/HOF/hof/wizard/middleware/check-session.js":["39337dba-f075-4b5c-ad46-31665a16d443"],"/Users/user/Documents/HO/HOF/hof/wizard/middleware/csrf.js":["39337dba-f075-4b5c-ad46-31665a16d443"],"/Users/user/Documents/HO/HOF/hof/sandbox/test/_unit/example_app/sections/summary-data-sections.spec.js":["39337dba-f075-4b5c-ad46-31665a16d443"],"/Users/user/Documents/HO/HOF/hof/sandbox/apps/sandbox/sections/summary-data-sections.js":["39337dba-f075-4b5c-ad46-31665a16d443"],"/Users/user/Documents/HO/HOF/hof/sandbox/apps/sandbox/lib/staticAppealStages.js":["39337dba-f075-4b5c-ad46-31665a16d443"],"/Users/user/Documents/HO/HOF/hof/sandbox/apps/sandbox/fields.js":["39337dba-f075-4b5c-ad46-31665a16d443"],"/Users/user/Documents/HO/HOF/hof/sandbox/test/helpers/utilities.js":["39337dba-f075-4b5c-ad46-31665a16d443"],"/Users/user/Documents/HO/HOF/hof/sandbox/apps/sandbox/behaviours/international-number.js":["39337dba-f075-4b5c-ad46-31665a16d443"],"/Users/user/Documents/HO/HOF/hof/lib/encryption.js":["39337dba-f075-4b5c-ad46-31665a16d443"],"/Users/user/Documents/HO/HOF/hof/wizard/middleware/session.js":["39337dba-f075-4b5c-ad46-31665a16d443"],"/Users/user/Documents/HO/HOF/hof/wizard/middleware/session-model.js":["39337dba-f075-4b5c-ad46-31665a16d443"]},"externalIds":{}}
|
1
|
+
{"processes":{"3971586e-d34a-49de-8cd7-964103fb3317":{"parent":null,"children":[]}},"files":{"/Users/user/Documents/HO/HOF/hof/model/index.js":["3971586e-d34a-49de-8cd7-964103fb3317"],"/Users/user/Documents/HO/HOF/hof/model/apis/axios-settings.js":["3971586e-d34a-49de-8cd7-964103fb3317"],"/Users/user/Documents/HO/HOF/hof/components/index.js":["3971586e-d34a-49de-8cd7-964103fb3317"],"/Users/user/Documents/HO/HOF/hof/components/address-lookup/index.js":["3971586e-d34a-49de-8cd7-964103fb3317"],"/Users/user/Documents/HO/HOF/hof/components/address-lookup/default-model.js":["3971586e-d34a-49de-8cd7-964103fb3317"],"/Users/user/Documents/HO/HOF/hof/components/address-lookup/defaults.js":["3971586e-d34a-49de-8cd7-964103fb3317"],"/Users/user/Documents/HO/HOF/hof/components/clear-session/index.js":["3971586e-d34a-49de-8cd7-964103fb3317"],"/Users/user/Documents/HO/HOF/hof/components/combine-and-loop-fields/index.js":["3971586e-d34a-49de-8cd7-964103fb3317"],"/Users/user/Documents/HO/HOF/hof/components/date/index.js":["3971586e-d34a-49de-8cd7-964103fb3317"],"/Users/user/Documents/HO/HOF/hof/components/date/fields.js":["3971586e-d34a-49de-8cd7-964103fb3317"],"/Users/user/Documents/HO/HOF/hof/components/emailer/index.js":["3971586e-d34a-49de-8cd7-964103fb3317"],"/Users/user/Documents/HO/HOF/hof/components/emailer/email-service.js":["3971586e-d34a-49de-8cd7-964103fb3317"],"/Users/user/Documents/HO/HOF/hof/components/emailer/emailer.js":["3971586e-d34a-49de-8cd7-964103fb3317"],"/Users/user/Documents/HO/HOF/hof/components/emailer/transports/index.js":["3971586e-d34a-49de-8cd7-964103fb3317"],"/Users/user/Documents/HO/HOF/hof/components/emailer/transports/smtp.js":["3971586e-d34a-49de-8cd7-964103fb3317"],"/Users/user/Documents/HO/HOF/hof/components/emailer/transports/ses.js":["3971586e-d34a-49de-8cd7-964103fb3317"],"/Users/user/Documents/HO/HOF/hof/components/emailer/transports/stub.js":["3971586e-d34a-49de-8cd7-964103fb3317"],"/Users/user/Documents/HO/HOF/hof/components/emailer/transports/debug.js":["3971586e-d34a-49de-8cd7-964103fb3317"],"/Users/user/Documents/HO/HOF/hof/components/homeoffice-countries/index.js":["3971586e-d34a-49de-8cd7-964103fb3317"],"/Users/user/Documents/HO/HOF/hof/config/component-defaults.js":["3971586e-d34a-49de-8cd7-964103fb3317"],"/Users/user/Documents/HO/HOF/hof/components/notify/index.js":["3971586e-d34a-49de-8cd7-964103fb3317"],"/Users/user/Documents/HO/HOF/hof/components/notify/notify.js":["3971586e-d34a-49de-8cd7-964103fb3317"],"/Users/user/Documents/HO/HOF/hof/components/summary/index.js":["3971586e-d34a-49de-8cd7-964103fb3317"],"/Users/user/Documents/HO/HOF/hof/config/rate-limits.js":["3971586e-d34a-49de-8cd7-964103fb3317"],"/Users/user/Documents/HO/HOF/hof/middleware/rate-limiter.js":["3971586e-d34a-49de-8cd7-964103fb3317"],"/Users/user/Documents/HO/HOF/hof/config/hof-defaults.js":["3971586e-d34a-49de-8cd7-964103fb3317"],"/Users/user/Documents/HO/HOF/hof/controller/base-controller.js":["3971586e-d34a-49de-8cd7-964103fb3317"],"/Users/user/Documents/HO/HOF/hof/controller/formatting/index.js":["3971586e-d34a-49de-8cd7-964103fb3317"],"/Users/user/Documents/HO/HOF/hof/controller/validation/index.js":["3971586e-d34a-49de-8cd7-964103fb3317"],"/Users/user/Documents/HO/HOF/hof/controller/validation/validators.js":["3971586e-d34a-49de-8cd7-964103fb3317"],"/Users/user/Documents/HO/HOF/hof/controller/validation/email.js":["3971586e-d34a-49de-8cd7-964103fb3317"],"/Users/user/Documents/HO/HOF/hof/controller/validation-error.js":["3971586e-d34a-49de-8cd7-964103fb3317"],"/Users/user/Documents/HO/HOF/hof/utilities/index.js":["3971586e-d34a-49de-8cd7-964103fb3317"],"/Users/user/Documents/HO/HOF/hof/utilities/autofill/index.js":["3971586e-d34a-49de-8cd7-964103fb3317"],"/Users/user/Documents/HO/HOF/hof/utilities/autofill/inputs.js":["3971586e-d34a-49de-8cd7-964103fb3317"],"/Users/user/Documents/HO/HOF/hof/utilities/test-data/index.js":["3971586e-d34a-49de-8cd7-964103fb3317"],"/Users/user/Documents/HO/HOF/hof/utilities/countries.js":["3971586e-d34a-49de-8cd7-964103fb3317"],"/Users/user/Documents/HO/HOF/hof/utilities/helpers/index.js":["3971586e-d34a-49de-8cd7-964103fb3317"],"/Users/user/Documents/HO/HOF/hof/utilities/reqres/index.js":["3971586e-d34a-49de-8cd7-964103fb3317"],"/Users/user/Documents/HO/HOF/hof/config/sanitisation-rules.js":["3971586e-d34a-49de-8cd7-964103fb3317"],"/Users/user/Documents/HO/HOF/hof/controller/formatting/formatters.js":["3971586e-d34a-49de-8cd7-964103fb3317"],"/Users/user/Documents/HO/HOF/hof/controller/index.js":["3971586e-d34a-49de-8cd7-964103fb3317"],"/Users/user/Documents/HO/HOF/hof/controller/behaviour-session.js":["3971586e-d34a-49de-8cd7-964103fb3317"],"/Users/user/Documents/HO/HOF/hof/controller/behaviour-hooks.js":["3971586e-d34a-49de-8cd7-964103fb3317"],"/Users/user/Documents/HO/HOF/hof/controller/controller.js":["3971586e-d34a-49de-8cd7-964103fb3317"],"/Users/user/Documents/HO/HOF/hof/sandbox/apps/sandbox/behaviours/country-select.js":["3971586e-d34a-49de-8cd7-964103fb3317"],"/Users/user/Documents/HO/HOF/hof/frontend/template-mixins/mixins/index.js":["3971586e-d34a-49de-8cd7-964103fb3317"],"/Users/user/Documents/HO/HOF/hof/frontend/template-mixins/mixins/template-mixins.js":["3971586e-d34a-49de-8cd7-964103fb3317"],"/Users/user/Documents/HO/HOF/hof/frontend/template-mixins/mixins/render.js":["3971586e-d34a-49de-8cd7-964103fb3317"],"/Users/user/Documents/HO/HOF/hof/frontend/template-mixins/mixins/helpers.js":["3971586e-d34a-49de-8cd7-964103fb3317"],"/Users/user/Documents/HO/HOF/hof/index.js":["3971586e-d34a-49de-8cd7-964103fb3317"],"/Users/user/Documents/HO/HOF/hof/frontend/index.js":["3971586e-d34a-49de-8cd7-964103fb3317"],"/Users/user/Documents/HO/HOF/hof/frontend/govuk-template/index.js":["3971586e-d34a-49de-8cd7-964103fb3317"],"/Users/user/Documents/HO/HOF/hof/frontend/govuk-template/build/index.js":["3971586e-d34a-49de-8cd7-964103fb3317"],"/Users/user/Documents/HO/HOF/hof/frontend/govuk-template/build/config.js":["3971586e-d34a-49de-8cd7-964103fb3317"],"/Users/user/Documents/HO/HOF/hof/frontend/template-partials/index.js":["3971586e-d34a-49de-8cd7-964103fb3317"],"/Users/user/Documents/HO/HOF/hof/frontend/template-partials/translations/index.js":["3971586e-d34a-49de-8cd7-964103fb3317"],"/Users/user/Documents/HO/HOF/hof/frontend/themes/index.js":["3971586e-d34a-49de-8cd7-964103fb3317"],"/Users/user/Documents/HO/HOF/hof/frontend/themes/gov-uk/index.js":["3971586e-d34a-49de-8cd7-964103fb3317"],"/Users/user/Documents/HO/HOF/hof/frontend/toolkit/index.js":["3971586e-d34a-49de-8cd7-964103fb3317"],"/Users/user/Documents/HO/HOF/hof/frontend/toolkit/assets/javascript/helpers.js":["3971586e-d34a-49de-8cd7-964103fb3317"],"/Users/user/Documents/HO/HOF/hof/frontend/toolkit/assets/javascript/form-focus.js":["3971586e-d34a-49de-8cd7-964103fb3317"],"/Users/user/Documents/HO/HOF/hof/frontend/toolkit/assets/javascript/progressive-reveal.js":["3971586e-d34a-49de-8cd7-964103fb3317"],"/Users/user/Documents/HO/HOF/hof/frontend/toolkit/assets/javascript/validation.js":["3971586e-d34a-49de-8cd7-964103fb3317"],"/Users/user/Documents/HO/HOF/hof/frontend/toolkit/assets/javascript/character-count.js":["3971586e-d34a-49de-8cd7-964103fb3317"],"/Users/user/Documents/HO/HOF/hof/middleware/index.js":["3971586e-d34a-49de-8cd7-964103fb3317"],"/Users/user/Documents/HO/HOF/hof/middleware/cookies.js":["3971586e-d34a-49de-8cd7-964103fb3317"],"/Users/user/Documents/HO/HOF/hof/middleware/errors.js":["3971586e-d34a-49de-8cd7-964103fb3317"],"/Users/user/Documents/HO/HOF/hof/middleware/not-found.js":["3971586e-d34a-49de-8cd7-964103fb3317"],"/Users/user/Documents/HO/HOF/hof/middleware/deep-translate.js":["3971586e-d34a-49de-8cd7-964103fb3317"],"/Users/user/Documents/HO/HOF/hof/lib/markdown.js":["3971586e-d34a-49de-8cd7-964103fb3317"],"/Users/user/Documents/HO/HOF/hof/lib/router.js":["3971586e-d34a-49de-8cd7-964103fb3317"],"/Users/user/Documents/HO/HOF/hof/wizard/index.js":["3971586e-d34a-49de-8cd7-964103fb3317"],"/Users/user/Documents/HO/HOF/hof/wizard/behaviours/index.js":["3971586e-d34a-49de-8cd7-964103fb3317"],"/Users/user/Documents/HO/HOF/hof/wizard/behaviours/complete.js":["3971586e-d34a-49de-8cd7-964103fb3317"],"/Users/user/Documents/HO/HOF/hof/wizard/util/constants.js":["3971586e-d34a-49de-8cd7-964103fb3317"],"/Users/user/Documents/HO/HOF/hof/lib/helpers.js":["3971586e-d34a-49de-8cd7-964103fb3317"],"/Users/user/Documents/HO/HOF/hof/lib/health.js":["3971586e-d34a-49de-8cd7-964103fb3317"],"/Users/user/Documents/HO/HOF/hof/lib/serve-static.js":["3971586e-d34a-49de-8cd7-964103fb3317"],"/Users/user/Documents/HO/HOF/hof/lib/ga-tag.js":["3971586e-d34a-49de-8cd7-964103fb3317"],"/Users/user/Documents/HO/HOF/hof/lib/sessions.js":["3971586e-d34a-49de-8cd7-964103fb3317"],"/Users/user/Documents/HO/HOF/hof/lib/settings.js":["3971586e-d34a-49de-8cd7-964103fb3317"],"/Users/user/Documents/HO/HOF/hof/lib/logger.js":["3971586e-d34a-49de-8cd7-964103fb3317"],"/Users/user/Documents/HO/HOF/hof/build/index.js":["3971586e-d34a-49de-8cd7-964103fb3317"],"/Users/user/Documents/HO/HOF/hof/config/builder-defaults.js":["3971586e-d34a-49de-8cd7-964103fb3317"],"/Users/user/Documents/HO/HOF/hof/transpiler/index.js":["3971586e-d34a-49de-8cd7-964103fb3317"],"/Users/user/Documents/HO/HOF/hof/transpiler/lib/compile.js":["3971586e-d34a-49de-8cd7-964103fb3317"],"/Users/user/Documents/HO/HOF/hof/transpiler/lib/build.js":["3971586e-d34a-49de-8cd7-964103fb3317"],"/Users/user/Documents/HO/HOF/hof/transpiler/lib/expand-dirs.js":["3971586e-d34a-49de-8cd7-964103fb3317"],"/Users/user/Documents/HO/HOF/hof/transpiler/lib/aggregate.js":["3971586e-d34a-49de-8cd7-964103fb3317"],"/Users/user/Documents/HO/HOF/hof/transpiler/lib/write-files.js":["3971586e-d34a-49de-8cd7-964103fb3317"],"/Users/user/Documents/HO/HOF/hof/model/apis/index.js":["3971586e-d34a-49de-8cd7-964103fb3317"],"/Users/user/Documents/HO/HOF/hof/model/apis/html-to-pdf-converter.js":["3971586e-d34a-49de-8cd7-964103fb3317"],"/Users/user/Documents/HO/HOF/hof/wizard/model.js":["3971586e-d34a-49de-8cd7-964103fb3317"],"/Users/user/Documents/HO/HOF/hof/wizard/middleware/back-links.js":["3971586e-d34a-49de-8cd7-964103fb3317"],"/Users/user/Documents/HO/HOF/hof/wizard/util/helpers.js":["3971586e-d34a-49de-8cd7-964103fb3317"],"/Users/user/Documents/HO/HOF/hof/wizard/middleware/check-complete.js":["3971586e-d34a-49de-8cd7-964103fb3317"],"/Users/user/Documents/HO/HOF/hof/wizard/middleware/check-progress.js":["3971586e-d34a-49de-8cd7-964103fb3317"],"/Users/user/Documents/HO/HOF/hof/wizard/middleware/check-session.js":["3971586e-d34a-49de-8cd7-964103fb3317"],"/Users/user/Documents/HO/HOF/hof/wizard/middleware/csrf.js":["3971586e-d34a-49de-8cd7-964103fb3317"],"/Users/user/Documents/HO/HOF/hof/sandbox/test/_unit/example_app/sections/summary-data-sections.spec.js":["3971586e-d34a-49de-8cd7-964103fb3317"],"/Users/user/Documents/HO/HOF/hof/sandbox/apps/sandbox/sections/summary-data-sections.js":["3971586e-d34a-49de-8cd7-964103fb3317"],"/Users/user/Documents/HO/HOF/hof/sandbox/apps/sandbox/lib/staticAppealStages.js":["3971586e-d34a-49de-8cd7-964103fb3317"],"/Users/user/Documents/HO/HOF/hof/sandbox/apps/sandbox/fields.js":["3971586e-d34a-49de-8cd7-964103fb3317"],"/Users/user/Documents/HO/HOF/hof/sandbox/test/helpers/utilities.js":["3971586e-d34a-49de-8cd7-964103fb3317"],"/Users/user/Documents/HO/HOF/hof/sandbox/apps/sandbox/behaviours/international-number.js":["3971586e-d34a-49de-8cd7-964103fb3317"],"/Users/user/Documents/HO/HOF/hof/lib/encryption.js":["3971586e-d34a-49de-8cd7-964103fb3317"],"/Users/user/Documents/HO/HOF/hof/wizard/middleware/session.js":["3971586e-d34a-49de-8cd7-964103fb3317"],"/Users/user/Documents/HO/HOF/hof/wizard/middleware/session-model.js":["3971586e-d34a-49de-8cd7-964103fb3317"]},"externalIds":{}}
|
package/CHANGELOG.md
CHANGED
@@ -1,3 +1,8 @@
|
|
1
|
+
## 2024-07-22, Version 21.0.0 (Stable), @Rhodine-orleans-lindsay
|
2
|
+
* Replaces deprecated request module with axios
|
3
|
+
- refactors the hof model and apis to use axios instead of request
|
4
|
+
* Updates patch and minor dependency versions
|
5
|
+
|
1
6
|
## 2024-04-24, Version 20.5.0 (Stable), @mislam987
|
2
7
|
* Add hint property to checkboxes to align with govuk design guidelines
|
3
8
|
|
@@ -15,7 +15,6 @@ var skipToMain = require('./skip-to-main');
|
|
15
15
|
var cookie = require('./govuk-cookies');
|
16
16
|
var cookieSettings = require('./cookieSettings');
|
17
17
|
var sessionDialog = require('./session-timeout-dialog');
|
18
|
-
GOVUK.sessionDialog.init();
|
19
18
|
|
20
19
|
toolkit.detailsSummary();
|
21
20
|
|
@@ -1,3 +1,6 @@
|
|
1
|
+
/* eslint max-len: 0 */
|
2
|
+
'use strict';
|
3
|
+
|
1
4
|
const $ = require('jquery');
|
2
5
|
|
3
6
|
// Modal dialog prototype
|
@@ -17,8 +20,8 @@ window.GOVUK.sessionDialog = {
|
|
17
20
|
$timer: $('#js-modal-dialog .timer'),
|
18
21
|
$accessibleTimer: $('#js-modal-dialog .at-timer'),
|
19
22
|
|
20
|
-
secondsSessionTimeout: parseInt($('#js-modal-dialog').data('session-timeout') || 1800),
|
21
|
-
secondsTimeoutWarning: parseInt($('#js-modal-dialog').data('session-timeout-warning') || 300),
|
23
|
+
secondsSessionTimeout: parseInt($('#js-modal-dialog').data('session-timeout'), 10 || 1800),
|
24
|
+
secondsTimeoutWarning: parseInt($('#js-modal-dialog').data('session-timeout-warning'), 10 || 300),
|
22
25
|
timeoutRedirectUrl: $('#js-modal-dialog').data('url-redirect'),
|
23
26
|
timeSessionRefreshed: new Date(),
|
24
27
|
|
@@ -26,18 +29,18 @@ window.GOVUK.sessionDialog = {
|
|
26
29
|
window.GOVUK.sessionDialog.$closeButton.on('click', function (e) {
|
27
30
|
e.preventDefault();
|
28
31
|
window.GOVUK.sessionDialog.closeDialog();
|
29
|
-
})
|
32
|
+
});
|
30
33
|
|
31
34
|
// Close modal when ESC pressed
|
32
35
|
$(document).keydown(function (e) {
|
33
36
|
if (window.GOVUK.sessionDialog.isDialogOpen() && e.keyCode === 27) {
|
34
37
|
window.GOVUK.sessionDialog.closeDialog();
|
35
38
|
}
|
36
|
-
})
|
39
|
+
});
|
37
40
|
},
|
38
41
|
|
39
42
|
isDialogOpen: function () {
|
40
|
-
return window.GOVUK.sessionDialog.el
|
43
|
+
return window.GOVUK.sessionDialog.el && window.GOVUK.sessionDialog.el.open;
|
41
44
|
},
|
42
45
|
|
43
46
|
isConfigured: function () {
|
@@ -54,6 +57,7 @@ window.GOVUK.sessionDialog = {
|
|
54
57
|
window.GOVUK.sessionDialog.saveLastFocusedEl();
|
55
58
|
window.GOVUK.sessionDialog.makePageContentInert();
|
56
59
|
window.GOVUK.sessionDialog.el.showModal();
|
60
|
+
window.GOVUK.sessionDialog.el.open = true;
|
57
61
|
}
|
58
62
|
},
|
59
63
|
|
@@ -61,6 +65,7 @@ window.GOVUK.sessionDialog = {
|
|
61
65
|
if (window.GOVUK.sessionDialog.isDialogOpen()) {
|
62
66
|
$('html, body').removeClass(window.GOVUK.sessionDialog.dialogIsOpenClass);
|
63
67
|
window.GOVUK.sessionDialog.el.close();
|
68
|
+
window.GOVUK.sessionDialog.el.open = false;
|
64
69
|
window.GOVUK.sessionDialog.setFocusOnLastFocusedEl();
|
65
70
|
window.GOVUK.sessionDialog.removeInertFromPageContent();
|
66
71
|
window.GOVUK.sessionDialog.refreshSession();
|
@@ -81,7 +86,7 @@ window.GOVUK.sessionDialog = {
|
|
81
86
|
if (window.GOVUK.sessionDialog.$lastFocusedEl) {
|
82
87
|
window.setTimeout(function () {
|
83
88
|
window.GOVUK.sessionDialog.$lastFocusedEl.focus();
|
84
|
-
}, 0)
|
89
|
+
}, 0);
|
85
90
|
}
|
86
91
|
},
|
87
92
|
|
@@ -104,51 +109,46 @@ window.GOVUK.sessionDialog = {
|
|
104
109
|
},
|
105
110
|
|
106
111
|
numberToWords: function (n) {
|
107
|
-
|
108
|
-
let
|
109
|
-
let
|
110
|
-
let
|
111
|
-
let
|
112
|
-
let
|
113
|
-
let
|
114
|
-
let
|
115
|
-
|
116
|
-
|
117
|
-
let i
|
118
|
-
let word
|
119
|
-
let words = 'and'
|
120
|
-
|
121
|
-
if (parseInt(string) === 0) {
|
112
|
+
const string = n.toString();
|
113
|
+
let start;
|
114
|
+
let end;
|
115
|
+
let chunk;
|
116
|
+
let ints;
|
117
|
+
let i;
|
118
|
+
let word;
|
119
|
+
let words = 'and';
|
120
|
+
|
121
|
+
if (parseInt(string, 10) === 0) {
|
122
122
|
return 'zero';
|
123
123
|
}
|
124
124
|
|
125
125
|
/* Array of units as words */
|
126
|
-
units = ['', 'one', 'two', 'three', 'four', 'five', 'six', 'seven', 'eight', 'nine', 'ten', 'eleven', 'twelve', 'thirteen', 'fourteen', 'fifteen', 'sixteen', 'seventeen', 'eighteen', 'nineteen'];
|
126
|
+
const units = ['', 'one', 'two', 'three', 'four', 'five', 'six', 'seven', 'eight', 'nine', 'ten', 'eleven', 'twelve', 'thirteen', 'fourteen', 'fifteen', 'sixteen', 'seventeen', 'eighteen', 'nineteen'];
|
127
127
|
|
128
128
|
/* Array of tens as words */
|
129
|
-
tens = ['', '', 'twenty', 'thirty', 'forty', 'fifty', 'sixty', 'seventy', 'eighty', 'ninety'];
|
129
|
+
const tens = ['', '', 'twenty', 'thirty', 'forty', 'fifty', 'sixty', 'seventy', 'eighty', 'ninety'];
|
130
130
|
|
131
131
|
/* Array of scales as words */
|
132
|
-
scales = ['', 'thousand', 'million', 'billion', 'trillion', 'quadrillion', 'quintillion', 'sextillion', 'septillion', 'octillion', 'nonillion', 'decillion', 'undecillion', 'duodecillion', 'tredecillion', 'quatttuor-decillion', 'quindecillion', 'sexdecillion', 'septen-decillion', 'octodecillion', 'novemdecillion', 'vigintillion', 'centillion'];
|
132
|
+
const scales = ['', 'thousand', 'million', 'billion', 'trillion', 'quadrillion', 'quintillion', 'sextillion', 'septillion', 'octillion', 'nonillion', 'decillion', 'undecillion', 'duodecillion', 'tredecillion', 'quatttuor-decillion', 'quindecillion', 'sexdecillion', 'septen-decillion', 'octodecillion', 'novemdecillion', 'vigintillion', 'centillion'];
|
133
133
|
|
134
|
-
/* Split user
|
134
|
+
/* Split user argument into 3 digit chunks from right to left */
|
135
135
|
start = string.length;
|
136
|
-
chunks = [];
|
136
|
+
const chunks = [];
|
137
137
|
while (start > 0) {
|
138
138
|
end = start;
|
139
139
|
chunks.push(string.slice((start = Math.max(0, start - 3)), end));
|
140
140
|
}
|
141
141
|
|
142
142
|
/* Check if function has enough scale words to be able to stringify the user argument */
|
143
|
-
chunksLen = chunks.length
|
143
|
+
const chunksLen = chunks.length;
|
144
144
|
if (chunksLen > scales.length) {
|
145
145
|
return '';
|
146
146
|
}
|
147
147
|
|
148
148
|
/* Stringify each integer in each chunk */
|
149
|
-
words = []
|
149
|
+
words = [];
|
150
150
|
for (i = 0; i < chunksLen; i++) {
|
151
|
-
chunk = parseInt(chunks[i]);
|
151
|
+
chunk = parseInt(chunks[i], 10);
|
152
152
|
|
153
153
|
if (chunk) {
|
154
154
|
/* Split chunk into array of individual integers */
|
@@ -160,22 +160,22 @@ window.GOVUK.sessionDialog = {
|
|
160
160
|
}
|
161
161
|
|
162
162
|
/* Add scale word if chunk is not zero and array item exists */
|
163
|
-
if ((word
|
163
|
+
if ((word === scales[i])) {
|
164
164
|
words.push(word);
|
165
165
|
}
|
166
166
|
|
167
167
|
/* Add unit word if array item exists */
|
168
|
-
if ((word
|
168
|
+
if ((word === units[ints[0]])) {
|
169
169
|
words.push(word);
|
170
170
|
}
|
171
171
|
|
172
172
|
/* Add tens word if array item exists */
|
173
|
-
if ((word
|
173
|
+
if ((word === tens[ints[1]])) {
|
174
174
|
words.push(word);
|
175
175
|
}
|
176
176
|
|
177
177
|
/* Add hundreds word if array item exists */
|
178
|
-
if ((word
|
178
|
+
if ((word === units[ints[2]])) {
|
179
179
|
words.push(word + ' hundred');
|
180
180
|
}
|
181
181
|
}
|
@@ -201,7 +201,7 @@ window.GOVUK.sessionDialog = {
|
|
201
201
|
},
|
202
202
|
|
203
203
|
pluralise: function (n, unit) {
|
204
|
-
return n
|
204
|
+
return n === 1 ? unit : unit + 's';
|
205
205
|
},
|
206
206
|
|
207
207
|
numericSpan: function (n, unit) {
|
@@ -217,7 +217,7 @@ window.GOVUK.sessionDialog = {
|
|
217
217
|
countdownAtText: function (minutes, seconds) {
|
218
218
|
const minutesText = window.GOVUK.sessionDialog.timeToWords(minutes, 'minute');
|
219
219
|
const secondsText = window.GOVUK.sessionDialog.timeToWords(seconds, 'second');
|
220
|
-
return minutes > 0 ? minutesText :
|
220
|
+
return minutes > 0 ? minutesText : secondsText;
|
221
221
|
},
|
222
222
|
|
223
223
|
startCountdown: function () {
|
@@ -236,11 +236,8 @@ window.GOVUK.sessionDialog = {
|
|
236
236
|
const timerExpired = secondsUntilSessionTimeout <= window.GOVUK.sessionDialog.secondsFinalWarning;
|
237
237
|
|
238
238
|
if (!timerExpired) {
|
239
|
-
|
240
239
|
const minutesLeft = parseInt(secondsUntilSessionTimeout / 60, 10);
|
241
240
|
const secondsLeft = parseInt(secondsUntilSessionTimeout % 60, 10);
|
242
|
-
|
243
|
-
|
244
241
|
const atMinutesText = window.GOVUK.sessionDialog.timeToWords(minutesLeft, 'minute');
|
245
242
|
const atSecondsText = window.GOVUK.sessionDialog.timeToWords(secondsLeft, 'second');
|
246
243
|
|
@@ -251,14 +248,13 @@ window.GOVUK.sessionDialog = {
|
|
251
248
|
const countdownText = window.GOVUK.sessionDialog.countdownText(minutesLeft, secondsLeft);
|
252
249
|
const text = window.GOVUK.sessionDialog.warningTextPrefix + '<strong>' + countdownText + '</strong>' + window.GOVUK.sessionDialog.warningTextSuffix;
|
253
250
|
const countdownAtText = window.GOVUK.sessionDialog.countdownAtText(atMinutesText, atSecondsText);
|
254
|
-
const atText = window.GOVUK.sessionDialog.warningTextPrefix + countdownAtText + window.GOVUK.sessionDialog.warningTextSuffix
|
251
|
+
const atText = window.GOVUK.sessionDialog.warningTextPrefix + countdownAtText + window.GOVUK.sessionDialog.warningTextSuffix + 'bgbhj ' + window.GOVUK.sessionDialog.warningText;
|
255
252
|
const extraText = '\n' + window.GOVUK.sessionDialog.warningTextExtra;
|
256
253
|
|
257
254
|
$timer.html(text + ' ' + extraText);
|
258
255
|
|
259
256
|
// Update screen reader friendly content every 20 secs
|
260
257
|
if (secondsLeft % 20 === 0) {
|
261
|
-
|
262
258
|
// Read out the extra content only once.
|
263
259
|
// Don't read out on iOS VoiceOver which stalls on the longer text
|
264
260
|
if (!timerRunOnce && !iOS) {
|
@@ -269,9 +265,9 @@ window.GOVUK.sessionDialog = {
|
|
269
265
|
}
|
270
266
|
}
|
271
267
|
|
272
|
-
window.GOVUK.sessionDialog.addTimer(countdown,20);
|
268
|
+
window.GOVUK.sessionDialog.addTimer(countdown, 20);
|
273
269
|
}
|
274
|
-
})()
|
270
|
+
})();
|
275
271
|
},
|
276
272
|
|
277
273
|
// Clears all timers
|
@@ -282,7 +278,7 @@ window.GOVUK.sessionDialog = {
|
|
282
278
|
},
|
283
279
|
|
284
280
|
refreshSession: function () {
|
285
|
-
$.get(
|
281
|
+
$.get('');
|
286
282
|
window.GOVUK.sessionDialog.timeSessionRefreshed = new Date();
|
287
283
|
window.GOVUK.sessionDialog.controller();
|
288
284
|
},
|
@@ -315,20 +311,16 @@ window.GOVUK.sessionDialog = {
|
|
315
311
|
|
316
312
|
const secondsUntilSessionTimeout = window.GOVUK.sessionDialog.secondsUntilSessionTimeout();
|
317
313
|
|
318
|
-
//timed out - redirect
|
319
314
|
if (secondsUntilSessionTimeout <= 0) {
|
315
|
+
// timed out - redirect
|
320
316
|
window.GOVUK.sessionDialog.redirect();
|
321
|
-
}
|
322
|
-
|
323
|
-
//timeout warning - show countdown and schedule redirect
|
324
|
-
else if (secondsUntilSessionTimeout <= window.GOVUK.sessionDialog.secondsTimeoutWarning) {
|
317
|
+
} else if (secondsUntilSessionTimeout <= window.GOVUK.sessionDialog.secondsTimeoutWarning) {
|
318
|
+
// timeout warning - show countdown and schedule redirect
|
325
319
|
window.GOVUK.sessionDialog.openDialog();
|
326
320
|
window.GOVUK.sessionDialog.startCountdown();
|
327
|
-
window.GOVUK.sessionDialog.addTimer(window.GOVUK.sessionDialog.controller,window.GOVUK.sessionDialog.secondsUntilSessionTimeout());
|
328
|
-
}
|
329
|
-
|
330
|
-
//wait for warning
|
331
|
-
else {
|
321
|
+
window.GOVUK.sessionDialog.addTimer(window.GOVUK.sessionDialog.controller, window.GOVUK.sessionDialog.secondsUntilSessionTimeout());
|
322
|
+
} else {
|
323
|
+
// wait for warning
|
332
324
|
window.GOVUK.sessionDialog.addTimer(window.GOVUK.sessionDialog.controller, window.GOVUK.sessionDialog.secondsUntilTimeoutWarning());
|
333
325
|
}
|
334
326
|
},
|
@@ -340,6 +332,5 @@ window.GOVUK.sessionDialog = {
|
|
340
332
|
window.GOVUK.sessionDialog.controller();
|
341
333
|
}
|
342
334
|
}
|
343
|
-
}
|
344
|
-
|
345
|
-
window.GOVUK = GOVUK;
|
335
|
+
};
|
336
|
+
window.GOVUK.sessionDialog.init();
|
@@ -0,0 +1,21 @@
|
|
1
|
+
'use strict';
|
2
|
+
const { format } = require('url'); // Destructure 'format' from 'url' module
|
3
|
+
|
4
|
+
module.exports = (settings = {}, body = null) => {
|
5
|
+
if (typeof settings !== 'object' || settings === null) {
|
6
|
+
throw new TypeError('settings must be a non-null object');
|
7
|
+
}
|
8
|
+
|
9
|
+
const {
|
10
|
+
uri,
|
11
|
+
url,
|
12
|
+
body: settingsBody,
|
13
|
+
data: settingsData,
|
14
|
+
...restSettings
|
15
|
+
} = settings;
|
16
|
+
|
17
|
+
return Object.assign({}, restSettings, {
|
18
|
+
url: uri || url || format(settings),
|
19
|
+
data: settingsBody || body || settingsData
|
20
|
+
});
|
21
|
+
};
|
@@ -9,6 +9,7 @@ module.exports = class PDFModel extends Model {
|
|
9
9
|
const settings = super.requestConfig(options);
|
10
10
|
settings.encoding = null;
|
11
11
|
settings.rejectUnauthorized = false;
|
12
|
+
settings.responseType = 'arraybuffer';
|
12
13
|
return settings;
|
13
14
|
}
|
14
15
|
|
@@ -17,17 +18,18 @@ module.exports = class PDFModel extends Model {
|
|
17
18
|
}
|
18
19
|
|
19
20
|
handleResponse(response, callback) {
|
20
|
-
if (isPdf(Buffer.from(response.
|
21
|
-
return this.parseResponse(response.
|
21
|
+
if (isPdf(Buffer.from(response.data))) {
|
22
|
+
return this.parseResponse(response.status, response.data, callback);
|
22
23
|
}
|
23
24
|
const err = new Error();
|
24
|
-
|
25
|
-
|
26
|
-
err.
|
25
|
+
|
26
|
+
if (parseInt(response.status, 10) === 400) {
|
27
|
+
err.title = response.status;
|
28
|
+
err.message = response.statusText;
|
27
29
|
} else {
|
28
|
-
err.body = response.
|
30
|
+
err.body = response.data;
|
29
31
|
}
|
30
|
-
err.status = response.
|
31
|
-
return callback(err, null, response.
|
32
|
+
err.status = response.status;
|
33
|
+
return callback(err, null, response.status);
|
32
34
|
}
|
33
35
|
};
|