From fbe0dd33b743ec9920b1fe791e4b6d6314933fb0 Mon Sep 17 00:00:00 2001 From: Romaric Pascal Date: Thu, 20 Apr 2023 14:17:12 +0100 Subject: [PATCH] Release v4.6.0 --- CHANGELOG.md | 32 +- dist/VERSION.txt | 2 +- dist/govuk-frontend-4.5.0.min.css | 4 - dist/govuk-frontend-4.5.0.min.css.map | 1 - dist/govuk-frontend-4.5.0.min.js | 2 - dist/govuk-frontend-4.5.0.min.js.map | 1 - dist/govuk-frontend-4.6.0.min.css | 3 + dist/govuk-frontend-4.6.0.min.css.map | 1 + dist/govuk-frontend-4.6.0.min.js | 2 + dist/govuk-frontend-4.6.0.min.js.map | 1 + dist/govuk-frontend-ie8-4.5.0.min.css | 2 - dist/govuk-frontend-ie8-4.5.0.min.css.map | 1 - dist/govuk-frontend-ie8-4.6.0.min.css | 2 + dist/govuk-frontend-ie8-4.6.0.min.css.map | 1 + package/govuk-esm/all.mjs | 141 +-- package/govuk-esm/all.mjs.map | 1 + package/govuk-esm/common.mjs | 8 +- package/govuk-esm/common.mjs.map | 1 + .../common/closest-attribute-value.mjs | 20 +- .../common/closest-attribute-value.mjs.map | 1 + .../common/govuk-frontend-version.mjs | 9 + .../common/govuk-frontend-version.mjs.map | 1 + package/govuk-esm/common/index.mjs | 73 +- package/govuk-esm/common/index.mjs.map | 1 + .../govuk-esm/common/normalise-dataset.mjs | 24 +- .../common/normalise-dataset.mjs.map | 1 + .../components/accordion/accordion.mjs | 530 ++++++---- .../components/accordion/accordion.mjs.map | 1 + .../govuk-esm/components/button/button.mjs | 77 +- .../components/button/button.mjs.map | 1 + .../character-count/character-count.mjs | 284 +++-- .../character-count/character-count.mjs.map | 1 + .../components/checkboxes/checkboxes.mjs | 139 ++- .../components/checkboxes/checkboxes.mjs.map | 1 + .../govuk-esm/components/details/details.mjs | 118 ++- .../components/details/details.mjs.map | 1 + .../error-summary/error-summary.mjs | 119 ++- .../error-summary/error-summary.mjs.map | 1 + .../govuk-esm/components/header/header.mjs | 94 +- .../components/header/header.mjs.map | 1 + .../notification-banner.mjs | 61 +- .../notification-banner.mjs.map | 1 + .../govuk-esm/components/radios/radios.mjs | 105 +- .../components/radios/radios.mjs.map | 1 + .../components/skip-link/skip-link.mjs | 81 +- .../components/skip-link/skip-link.mjs.map | 1 + package/govuk-esm/components/tabs/tabs.mjs | 426 +++++--- .../govuk-esm/components/tabs/tabs.mjs.map | 1 + package/govuk-esm/i18n.mjs | 125 ++- package/govuk-esm/i18n.mjs.map | 1 + .../vendor/polyfills/DOMTokenList.mjs | 8 +- .../vendor/polyfills/DOMTokenList.mjs.map | 1 + .../govuk-esm/vendor/polyfills/Date/now.mjs | 6 +- .../vendor/polyfills/Date/now.mjs.map | 1 + .../govuk-esm/vendor/polyfills/Document.mjs | 6 +- .../vendor/polyfills/Document.mjs.map | 1 + .../govuk-esm/vendor/polyfills/Element.mjs | 7 +- .../vendor/polyfills/Element.mjs.map | 1 + .../polyfills/Element/prototype/classList.mjs | 11 +- .../Element/prototype/classList.mjs.map | 1 + .../polyfills/Element/prototype/closest.mjs | 7 +- .../Element/prototype/closest.mjs.map | 1 + .../polyfills/Element/prototype/dataset.mjs | 23 +- .../Element/prototype/dataset.mjs.map | 1 + .../polyfills/Element/prototype/matches.mjs | 6 +- .../Element/prototype/matches.mjs.map | 1 + .../Element/prototype/nextElementSibling.mjs | 9 +- .../prototype/nextElementSibling.mjs.map | 1 + .../prototype/previousElementSibling.mjs | 9 +- .../prototype/previousElementSibling.mjs.map | 1 + package/govuk-esm/vendor/polyfills/Event.mjs | 11 +- .../govuk-esm/vendor/polyfills/Event.mjs.map | 1 + .../polyfills/Function/prototype/bind.mjs | 7 +- .../polyfills/Function/prototype/bind.mjs.map | 1 + .../polyfills/Object/defineProperty.mjs | 6 +- .../polyfills/Object/defineProperty.mjs.map | 1 + .../polyfills/String/prototype/trim.mjs | 8 +- .../polyfills/String/prototype/trim.mjs.map | 1 + package/govuk-esm/vendor/polyfills/Window.mjs | 6 +- .../govuk-esm/vendor/polyfills/Window.mjs.map | 1 + package/govuk-prototype-kit.config.json | 3 +- package/govuk-prototype-kit/init.js | 1 + package/govuk/all-ie8.scss | 8 + package/govuk/all.js | 996 +++++++++++++----- package/govuk/all.js.map | 2 +- package/govuk/common.js | 20 +- package/govuk/common.js.map | 2 +- .../govuk/common/closest-attribute-value.js | 18 +- .../common/closest-attribute-value.js.map | 2 +- .../govuk/common/govuk-frontend-version.js | 17 + .../common/govuk-frontend-version.js.map | 1 + package/govuk/common/index.js | 20 +- package/govuk/common/index.js.map | 2 +- package/govuk/common/normalise-dataset.js | 30 +- package/govuk/common/normalise-dataset.js.map | 2 +- .../govuk/components/accordion/_index.scss | 6 +- .../govuk/components/accordion/accordion.js | 320 ++++-- .../components/accordion/accordion.js.map | 2 +- .../govuk/components/accordion/fixtures.json | 45 +- .../components/accordion/macro-options.json | 10 +- .../govuk/components/accordion/template.njk | 1 + .../govuk/components/back-link/_index.scss | 2 +- .../govuk/components/back-link/fixtures.json | 2 +- .../components/back-link/macro-options.json | 2 +- .../govuk/components/breadcrumbs/_index.scss | 2 +- .../components/breadcrumbs/fixtures.json | 24 +- .../components/breadcrumbs/macro-options.json | 2 +- package/govuk/components/button/_index.scss | 14 +- package/govuk/components/button/button.js | 73 +- package/govuk/components/button/button.js.map | 2 +- package/govuk/components/button/fixtures.json | 12 +- .../components/button/macro-options.json | 8 +- package/govuk/components/button/template.njk | 2 +- .../character-count/character-count.js | 246 +++-- .../character-count/character-count.js.map | 2 +- .../components/character-count/fixtures.json | 48 +- .../character-count/macro-options.json | 6 +- .../govuk/components/checkboxes/_index.scss | 12 +- .../govuk/components/checkboxes/checkboxes.js | 99 +- .../components/checkboxes/checkboxes.js.map | 2 +- .../govuk/components/checkboxes/fixtures.json | 94 +- .../components/checkboxes/macro-options.json | 2 +- .../govuk/components/checkboxes/template.njk | 6 +- .../components/cookie-banner/fixtures.json | 48 +- .../cookie-banner/macro-options.json | 2 +- .../govuk/components/date-input/fixtures.json | 52 +- .../components/date-input/macro-options.json | 2 +- .../govuk/components/date-input/template.njk | 2 +- package/govuk/components/details/details.js | 52 +- .../govuk/components/details/details.js.map | 2 +- .../govuk/components/details/fixtures.json | 2 +- .../components/details/macro-options.json | 2 +- .../components/error-message/fixtures.json | 20 +- .../error-message/macro-options.json | 2 +- .../components/error-summary/error-summary.js | 94 +- .../error-summary/error-summary.js.map | 2 +- .../components/error-summary/fixtures.json | 38 +- .../error-summary/macro-options.json | 2 +- .../govuk/components/fieldset/fixtures.json | 38 +- .../components/fieldset/macro-options.json | 2 +- .../govuk/components/file-upload/_index.scss | 7 +- .../components/file-upload/fixtures.json | 28 +- .../components/file-upload/macro-options.json | 8 +- .../govuk/components/file-upload/template.njk | 3 +- package/govuk/components/footer/_index.scss | 7 - package/govuk/components/footer/fixtures.json | 48 +- .../components/footer/macro-options.json | 2 +- package/govuk/components/header/fixtures.json | 44 +- package/govuk/components/header/header.js | 60 +- package/govuk/components/header/header.js.map | 2 +- .../components/header/macro-options.json | 2 +- package/govuk/components/header/template.njk | 2 +- package/govuk/components/hint/fixtures.json | 2 +- .../govuk/components/hint/macro-options.json | 2 +- package/govuk/components/input/_index.scss | 18 +- package/govuk/components/input/fixtures.json | 95 +- .../govuk/components/input/macro-options.json | 8 +- package/govuk/components/input/template.njk | 3 +- .../govuk/components/inset-text/fixtures.json | 2 +- .../components/inset-text/macro-options.json | 2 +- package/govuk/components/label/fixtures.json | 12 +- .../govuk/components/label/macro-options.json | 2 +- .../notification-banner/fixtures.json | 2 +- .../notification-banner/macro-options.json | 2 +- .../notification-banner.js | 71 +- .../notification-banner.js.map | 2 +- .../govuk/components/pagination/fixtures.json | 32 +- .../components/pagination/macro-options.json | 2 +- package/govuk/components/panel/fixtures.json | 20 +- .../govuk/components/panel/macro-options.json | 2 +- .../components/phase-banner/fixtures.json | 2 +- .../phase-banner/macro-options.json | 2 +- package/govuk/components/radios/_index.scss | 10 +- package/govuk/components/radios/fixtures.json | 92 +- .../components/radios/macro-options.json | 2 +- package/govuk/components/radios/radios.js | 87 +- package/govuk/components/radios/radios.js.map | 2 +- package/govuk/components/radios/template.njk | 4 +- package/govuk/components/select/_index.scss | 8 +- package/govuk/components/select/fixtures.json | 39 +- .../components/select/macro-options.json | 8 +- package/govuk/components/select/template.njk | 7 +- .../govuk/components/skip-link/fixtures.json | 2 +- .../components/skip-link/macro-options.json | 2 +- .../govuk/components/skip-link/skip-link.js | 54 +- .../components/skip-link/skip-link.js.map | 2 +- .../components/summary-list/fixtures.json | 68 +- .../summary-list/macro-options.json | 2 +- package/govuk/components/table/fixtures.json | 42 +- .../govuk/components/table/macro-options.json | 2 +- package/govuk/components/tabs/fixtures.json | 30 +- .../govuk/components/tabs/macro-options.json | 2 +- package/govuk/components/tabs/tabs.js | 238 +++-- package/govuk/components/tabs/tabs.js.map | 2 +- package/govuk/components/tabs/template.njk | 2 +- package/govuk/components/tag/_index.scss | 36 +- package/govuk/components/tag/fixtures.json | 2 +- .../govuk/components/tag/macro-options.json | 2 +- package/govuk/components/textarea/_index.scss | 9 +- .../govuk/components/textarea/fixtures.json | 36 +- .../components/textarea/macro-options.json | 8 +- .../govuk/components/textarea/template.njk | 3 +- .../components/warning-text/fixtures.json | 14 +- .../warning-text/macro-options.json | 6 +- .../components/warning-text/template.njk | 2 +- package/govuk/core/_all.scss | 1 + .../govuk/core/_govuk-frontend-version.scss | 5 + package/govuk/helpers/_colour.scss | 7 +- package/govuk/helpers/_focused.scss | 2 +- package/govuk/helpers/_font-faces.scss | 2 +- package/govuk/i18n.js | 68 +- package/govuk/i18n.js.map | 2 +- package/govuk/macros/i18n.njk | 23 +- package/govuk/objects/_width-container.scss | 2 +- .../settings/_colours-organisations.scss | 4 + package/govuk/settings/_ie8.scss | 16 + package/govuk/settings/_links.scss | 6 +- package/govuk/tools/_ie8.scss | 40 +- .../govuk/vendor/polyfills/DOMTokenList.js | 3 +- .../vendor/polyfills/DOMTokenList.js.map | 2 +- package/govuk/vendor/polyfills/Date/now.js | 3 +- .../govuk/vendor/polyfills/Date/now.js.map | 2 +- package/govuk/vendor/polyfills/Document.js | 3 +- .../govuk/vendor/polyfills/Document.js.map | 2 +- package/govuk/vendor/polyfills/Element.js | 5 +- package/govuk/vendor/polyfills/Element.js.map | 2 +- .../polyfills/Element/prototype/classList.js | 13 +- .../Element/prototype/classList.js.map | 2 +- .../polyfills/Element/prototype/closest.js | 5 +- .../Element/prototype/closest.js.map | 2 +- .../polyfills/Element/prototype/dataset.js | 20 +- .../Element/prototype/dataset.js.map | 2 +- .../polyfills/Element/prototype/matches.js | 3 +- .../Element/prototype/matches.js.map | 2 +- .../Element/prototype/nextElementSibling.js | 10 +- .../prototype/nextElementSibling.js.map | 2 +- .../prototype/previousElementSibling.js | 10 +- .../prototype/previousElementSibling.js.map | 2 +- package/govuk/vendor/polyfills/Event.js | 13 +- package/govuk/vendor/polyfills/Event.js.map | 2 +- .../polyfills/Function/prototype/bind.js | 5 +- .../polyfills/Function/prototype/bind.js.map | 2 +- .../vendor/polyfills/Object/defineProperty.js | 3 +- .../polyfills/Object/defineProperty.js.map | 2 +- .../vendor/polyfills/String/prototype/trim.js | 5 +- .../polyfills/String/prototype/trim.js.map | 2 +- package/govuk/vendor/polyfills/Window.js | 3 +- package/govuk/vendor/polyfills/Window.js.map | 2 +- package/package.json | 2 +- 249 files changed, 4406 insertions(+), 2413 deletions(-) delete mode 100644 dist/govuk-frontend-4.5.0.min.css delete mode 100644 dist/govuk-frontend-4.5.0.min.css.map delete mode 100644 dist/govuk-frontend-4.5.0.min.js delete mode 100644 dist/govuk-frontend-4.5.0.min.js.map create mode 100644 dist/govuk-frontend-4.6.0.min.css create mode 100644 dist/govuk-frontend-4.6.0.min.css.map create mode 100644 dist/govuk-frontend-4.6.0.min.js create mode 100644 dist/govuk-frontend-4.6.0.min.js.map delete mode 100644 dist/govuk-frontend-ie8-4.5.0.min.css delete mode 100644 dist/govuk-frontend-ie8-4.5.0.min.css.map create mode 100644 dist/govuk-frontend-ie8-4.6.0.min.css create mode 100644 dist/govuk-frontend-ie8-4.6.0.min.css.map create mode 100644 package/govuk-esm/all.mjs.map create mode 100644 package/govuk-esm/common.mjs.map create mode 100644 package/govuk-esm/common/closest-attribute-value.mjs.map create mode 100644 package/govuk-esm/common/govuk-frontend-version.mjs create mode 100644 package/govuk-esm/common/govuk-frontend-version.mjs.map create mode 100644 package/govuk-esm/common/index.mjs.map create mode 100644 package/govuk-esm/common/normalise-dataset.mjs.map create mode 100644 package/govuk-esm/components/accordion/accordion.mjs.map create mode 100644 package/govuk-esm/components/button/button.mjs.map create mode 100644 package/govuk-esm/components/character-count/character-count.mjs.map create mode 100644 package/govuk-esm/components/checkboxes/checkboxes.mjs.map create mode 100644 package/govuk-esm/components/details/details.mjs.map create mode 100644 package/govuk-esm/components/error-summary/error-summary.mjs.map create mode 100644 package/govuk-esm/components/header/header.mjs.map create mode 100644 package/govuk-esm/components/notification-banner/notification-banner.mjs.map create mode 100644 package/govuk-esm/components/radios/radios.mjs.map create mode 100644 package/govuk-esm/components/skip-link/skip-link.mjs.map create mode 100644 package/govuk-esm/components/tabs/tabs.mjs.map create mode 100644 package/govuk-esm/i18n.mjs.map create mode 100644 package/govuk-esm/vendor/polyfills/DOMTokenList.mjs.map create mode 100644 package/govuk-esm/vendor/polyfills/Date/now.mjs.map create mode 100644 package/govuk-esm/vendor/polyfills/Document.mjs.map create mode 100644 package/govuk-esm/vendor/polyfills/Element.mjs.map create mode 100644 package/govuk-esm/vendor/polyfills/Element/prototype/classList.mjs.map create mode 100644 package/govuk-esm/vendor/polyfills/Element/prototype/closest.mjs.map create mode 100644 package/govuk-esm/vendor/polyfills/Element/prototype/dataset.mjs.map create mode 100644 package/govuk-esm/vendor/polyfills/Element/prototype/matches.mjs.map create mode 100644 package/govuk-esm/vendor/polyfills/Element/prototype/nextElementSibling.mjs.map create mode 100644 package/govuk-esm/vendor/polyfills/Element/prototype/previousElementSibling.mjs.map create mode 100644 package/govuk-esm/vendor/polyfills/Event.mjs.map create mode 100644 package/govuk-esm/vendor/polyfills/Function/prototype/bind.mjs.map create mode 100644 package/govuk-esm/vendor/polyfills/Object/defineProperty.mjs.map create mode 100644 package/govuk-esm/vendor/polyfills/String/prototype/trim.mjs.map create mode 100644 package/govuk-esm/vendor/polyfills/Window.mjs.map create mode 100644 package/govuk/common/govuk-frontend-version.js create mode 100644 package/govuk/common/govuk-frontend-version.js.map create mode 100644 package/govuk/core/_govuk-frontend-version.scss diff --git a/CHANGELOG.md b/CHANGELOG.md index 4a56cca813..e5413f02e3 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,19 +2,21 @@ ## Unreleased +## 4.6.0 (Feature release) + ### New features #### Updated the appearance of disabled form controls -The disabled state of Text Input, Textarea, Select and File Upload components has been updated to appear consistent across browsers and devices. They also now consistent with the existing disabled styles for Buttons, Checkboxes, and Radios. +We’ve updated the disabled state of Text Input, Textarea, Select and File Upload components so it is consistent across browsers and devices. They’re also now consistent with the existing disabled styles for Buttons, Checkboxes, and Radios. -Disabled form controls appear with their opacity reduced by 50% and with an alternative cursor appearance when hovered over. +Disabled form controls appear at 50% opacity and with an alternative cursor appearance when hovered over. This was added in [pull request #3187: Add disabled styles for form controls](https://github.com/alphagov/govuk-frontend/pull/3187). #### Added a top-level `disabled` parameter to form controls -The Nunjucks macros for Text Input, Textarea, Select and File Upload components have been updated to include a top-level `disabled` parameter, making it easier to enable the disabled state for these controls. +We’ve updated the Nunjucks macros for Text Input, Textarea, Select and File Upload components to include a top-level `disabled` parameter. This will make it easier to enable the disabled state for these controls. ```nunjucks {{ govukInput({ @@ -33,7 +35,7 @@ This was added in [pull request #3187: Add disabled styles for form controls](ht #### Configure whether the Accordion remembers and restores sessions -By default, when a user leaves a page, the [Accordion](https://design-system.service.gov.uk/components/accordion/) will remember the layout of expanded and collapsed sections selected by the user. If the user returns to the page, this layout will be restored and override any sections manually set as `expanded` in code. +By default, when a user leaves a page, the [Accordion](https://design-system.service.gov.uk/components/accordion/) will remember the layout of expanded and collapsed sections selected by the user. If the user returns to the page, this layout will be restored and override any sections manually set as expanded in code. You can now disable this functionality by using the `rememberExpanded` option in the `govukAccordion` Nunjucks macro. @@ -43,7 +45,7 @@ This was added in [pull request #3342: Add option to disable sessionState in Acc #### Added `id` parameter to Buttons -The [Button](https://design-system.service.gov.uk/components/button/) Nunjucks macro has been updated to include an optional `id` parameter. +We’ve updated the [Button](https://design-system.service.gov.uk/components/button/) Nunjucks macro to include an optional `id` parameter. ```nunjucks {{ govukButton({ @@ -52,7 +54,9 @@ The [Button](https://design-system.service.gov.uk/components/button/) Nunjucks m }) }} ``` -This was added in [pull request #3344: Adding optional id attribute to button component](https://github.com/alphagov/govuk-frontend/pull/3344). Thanks to [Tom Billington](https://github.com/TomBillingtonUK) for this contribution. +This was added in [pull request #3344: Adding optional ‘id’ attribute to button component](https://github.com/alphagov/govuk-frontend/pull/3344). + +Thanks to [Tom Billington](https://github.com/TomBillingtonUK) for this contribution. #### Added a modifier for text input styles that accept sequences of digits @@ -66,25 +70,27 @@ This was added in [pull request #2230: Add extra letter spacing modifier for inp #### Stop using JavaScript API properties other than the `init` method -We have deprecated all of the JavaScript properties in the API, except for the `init` method for each component. We will make all of the deprecated JavaScript properties private in v5.0. +We have deprecated all of the JavaScript properties in the API, except for the `init` method for each component. We'll make all of the deprecated JavaScript properties private in [our next main release](https://github.com/alphagov/govuk-frontend/milestone/46). Please [let us know if you're using parts of the API other than the `init` method by filling in this form](https://docs.google.com/forms/d/e/1FAIpQLSfmH2AitMeouXqB0FWC5p5e6y1TSiFCjmJ8DrVuwfmpRGCaWw/viewform?usp=sf_link). We'll use this information when prioritising future additions to the public API. This was added in [pull request #3499: Deprecate all JavaScript instance properties the except `init` method](https://github.com/alphagov/govuk-frontend/pull/3499). -#### Stop using the `govuk-button--disabled` class on buttons +#### Stop using the `.govuk-button--disabled` class on buttons + +We have deprecated the `.govuk-button--disabled` class and will remove it in the next major release. -The `govuk-button--disabled` class is deprecated and will be removed in the next major release. +If a [Button](https://design-system.service.gov.uk/components/button/) uses a `\n \n \n \n \n \n \n \n \n \n \n View cookie preferences\n \n \n \n \n \n \n \n" + "html": "" }, { "name": "accepted confirmation banner", @@ -49,7 +49,7 @@ ] }, "hidden": false, - "html": "" + "html": "" }, { "name": "rejected confirmation banner", @@ -68,7 +68,7 @@ ] }, "hidden": false, - "html": "" + "html": "" }, { "name": "client-side implementation", @@ -121,7 +121,7 @@ ] }, "hidden": false, - "html": "" + "html": "" }, { "name": "with html", @@ -152,7 +152,7 @@ ] }, "hidden": false, - "html": "" + "html": "" }, { "name": "heading html", @@ -164,7 +164,7 @@ ] }, "hidden": true, - "html": "" + "html": "" }, { "name": "heading html as text", @@ -176,7 +176,7 @@ ] }, "hidden": true, - "html": "" + "html": "" }, { "name": "html", @@ -188,7 +188,7 @@ ] }, "hidden": true, - "html": "" + "html": "" }, { "name": "classes", @@ -200,7 +200,7 @@ ] }, "hidden": true, - "html": "" + "html": "" }, { "name": "attributes", @@ -214,7 +214,7 @@ ] }, "hidden": true, - "html": "" + "html": "" }, { "name": "custom aria label", @@ -227,7 +227,7 @@ ] }, "hidden": true, - "html": "" + "html": "" }, { "name": "hidden", @@ -239,7 +239,7 @@ ] }, "hidden": true, - "html": "" + "html": "" }, { "name": "hidden false", @@ -251,7 +251,7 @@ ] }, "hidden": true, - "html": "" + "html": "" }, { "name": "default action", @@ -267,7 +267,7 @@ ] }, "hidden": true, - "html": "" + "html": "" }, { "name": "link", @@ -284,7 +284,7 @@ ] }, "hidden": true, - "html": "" + "html": "" }, { "name": "link with false button options", @@ -303,7 +303,7 @@ ] }, "hidden": true, - "html": "" + "html": "" }, { "name": "link as a button", @@ -321,7 +321,7 @@ ] }, "hidden": true, - "html": "" + "html": "" }, { "name": "type", @@ -338,7 +338,7 @@ ] }, "hidden": true, - "html": "" + "html": "" }, { "name": "button classes", @@ -355,7 +355,7 @@ ] }, "hidden": true, - "html": "" + "html": "" }, { "name": "button attributes", @@ -374,7 +374,7 @@ ] }, "hidden": true, - "html": "" + "html": "" }, { "name": "link classes", @@ -392,7 +392,7 @@ ] }, "hidden": true, - "html": "" + "html": "" }, { "name": "link attributes", @@ -412,7 +412,7 @@ ] }, "hidden": true, - "html": "" + "html": "" }, { "name": "full banner hidden", @@ -468,7 +468,7 @@ ] }, "hidden": true, - "html": "" + "html": "" } ] -} \ No newline at end of file +} diff --git a/package/govuk/components/cookie-banner/macro-options.json b/package/govuk/components/cookie-banner/macro-options.json index b85144a173..66fed29bc2 100644 --- a/package/govuk/components/cookie-banner/macro-options.json +++ b/package/govuk/components/cookie-banner/macro-options.json @@ -129,4 +129,4 @@ } ] } -] \ No newline at end of file +] diff --git a/package/govuk/components/date-input/fixtures.json b/package/govuk/components/date-input/fixtures.json index 1e6e7398ec..05fce85d04 100644 --- a/package/govuk/components/date-input/fixtures.json +++ b/package/govuk/components/date-input/fixtures.json @@ -7,7 +7,7 @@ "id": "dob" }, "hidden": false, - "html": "
\n\n
\n \n
\n
\n \n \n \n \n
\n
\n \n
\n
\n \n \n \n \n
\n
\n \n
\n
\n \n \n \n \n
\n
\n \n
\n\n
" + "html": "
\n
\n
\n
\n \n \n
\n
\n
\n
\n \n \n
\n
\n
\n
\n \n \n
\n
\n
\n
" }, { "name": "complete question", @@ -38,7 +38,7 @@ ] }, "hidden": false, - "html": "
\n
\n \n \n \n What is your date of birth?\n \n \n \n\n
\n For example, 31 3 1980\n
\n\n\n
\n \n
\n
\n \n \n \n \n
\n
\n \n
\n
\n \n \n \n \n
\n
\n \n
\n
\n \n \n \n \n
\n
\n \n
\n \n\n
\n\n\n
" + "html": "
\n
\n \n What is your date of birth?\n \n
\n For example, 31 3 1980\n
\n
\n
\n
\n \n \n
\n
\n
\n
\n \n \n
\n
\n
\n
\n \n \n
\n
\n
\n\n
\n
" }, { "name": "with errors only", @@ -68,7 +68,7 @@ ] }, "hidden": false, - "html": "
\n
\n \n \n \n What is your date of birth?\n \n \n \n\n

\n Error: Error message goes here\n

\n\n
\n \n
\n
\n \n \n \n \n
\n
\n \n
\n
\n \n \n \n \n
\n
\n \n
\n
\n \n \n \n \n
\n
\n \n
\n \n\n
\n\n\n
" + "html": "
\n
\n \n What is your date of birth?\n \n

\n Error: Error message goes here\n

\n
\n
\n
\n \n \n
\n
\n
\n
\n \n \n
\n
\n
\n
\n \n \n
\n
\n
\n\n
\n
" }, { "name": "with errors and hint", @@ -101,7 +101,7 @@ ] }, "hidden": false, - "html": "
\n
\n \n \n \n What is your date of birth?\n \n \n \n\n
\n For example, 31 3 1980\n
\n\n\n \n \n

\n Error: Error message goes here\n

\n\n
\n \n
\n
\n \n \n \n \n
\n
\n \n
\n
\n \n \n \n \n
\n
\n \n
\n
\n \n \n \n \n
\n
\n \n
\n \n\n
\n\n\n
" + "html": "
\n
\n \n What is your date of birth?\n \n
\n For example, 31 3 1980\n
\n

\n Error: Error message goes here\n

\n
\n
\n
\n \n \n
\n
\n
\n
\n \n \n
\n
\n
\n
\n \n \n
\n
\n
\n\n
\n
" }, { "name": "with error on day input", @@ -135,7 +135,7 @@ ] }, "hidden": false, - "html": "
\n
\n \n \n \n What is your date of birth?\n \n \n \n\n
\n For example, 31 3 1980\n
\n\n\n \n \n

\n Error: Error message goes here\n

\n\n
\n \n
\n
\n \n \n \n \n
\n
\n \n
\n
\n \n \n \n \n
\n
\n \n
\n
\n \n \n \n \n
\n
\n \n
\n \n\n
\n\n\n
" + "html": "
\n
\n \n What is your date of birth?\n \n
\n For example, 31 3 1980\n
\n

\n Error: Error message goes here\n

\n
\n
\n
\n \n \n
\n
\n
\n
\n \n \n
\n
\n
\n
\n \n \n
\n
\n
\n\n
\n
" }, { "name": "with error on month input", @@ -169,7 +169,7 @@ ] }, "hidden": false, - "html": "
\n
\n \n \n \n What is your date of birth?\n \n \n \n\n
\n For example, 31 3 1980\n
\n\n\n \n \n

\n Error: Error message goes here\n

\n\n
\n \n
\n
\n \n \n \n \n
\n
\n \n
\n
\n \n \n \n \n
\n
\n \n
\n
\n \n \n \n \n
\n
\n \n
\n \n\n
\n\n\n
" + "html": "
\n
\n \n What is your date of birth?\n \n
\n For example, 31 3 1980\n
\n

\n Error: Error message goes here\n

\n
\n
\n
\n \n \n
\n
\n
\n
\n \n \n
\n
\n
\n
\n \n \n
\n
\n
\n\n
\n
" }, { "name": "with error on year input", @@ -203,7 +203,7 @@ ] }, "hidden": false, - "html": "
\n
\n \n \n \n What is your date of birth?\n \n \n \n\n
\n For example, 31 3 1980\n
\n\n\n \n \n

\n Error: Error message goes here\n

\n\n
\n \n
\n
\n \n \n \n \n
\n
\n \n
\n
\n \n \n \n \n
\n
\n \n
\n
\n \n \n \n \n
\n
\n \n
\n \n\n
\n\n\n
" + "html": "
\n
\n \n What is your date of birth?\n \n
\n For example, 31 3 1980\n
\n

\n Error: Error message goes here\n

\n
\n
\n
\n \n \n
\n
\n
\n
\n \n \n
\n
\n
\n
\n \n \n
\n
\n
\n\n
\n
" }, { "name": "with default items", @@ -220,7 +220,7 @@ } }, "hidden": false, - "html": "
\n
\n \n \n \n What is your date of birth?\n \n \n \n\n
\n For example, 31 3 1980\n
\n\n\n
\n \n
\n
\n \n \n \n \n
\n
\n \n
\n
\n \n \n \n \n
\n
\n \n
\n
\n \n \n \n \n
\n
\n \n
\n \n\n
\n\n\n
" + "html": "
\n
\n \n What is your date of birth?\n \n
\n For example, 31 3 1980\n
\n
\n
\n
\n \n \n
\n
\n
\n
\n \n \n
\n
\n
\n
\n \n \n
\n
\n
\n\n
\n
" }, { "name": "with optional form-group classes", @@ -240,7 +240,7 @@ } }, "hidden": false, - "html": "
\n
\n \n \n \n What is your date of birth?\n \n \n \n\n
\n For example, 31 3 1980\n
\n\n\n
\n \n
\n
\n \n \n \n \n
\n
\n \n
\n
\n \n \n \n \n
\n
\n \n
\n
\n \n \n \n \n
\n
\n \n
\n \n\n
\n\n\n
" + "html": "
\n
\n \n What is your date of birth?\n \n
\n For example, 31 3 1980\n
\n
\n
\n
\n \n \n
\n
\n
\n
\n \n \n
\n
\n
\n
\n \n \n
\n
\n
\n\n
\n
" }, { "name": "with autocomplete values", @@ -274,7 +274,7 @@ ] }, "hidden": false, - "html": "
\n
\n \n \n \n What is your date of birth?\n \n \n \n\n
\n For example, 31 3 1980\n
\n\n\n
\n \n
\n
\n \n \n \n \n
\n
\n \n
\n
\n \n \n \n \n
\n
\n \n
\n
\n \n \n \n \n
\n
\n \n
\n \n\n
\n\n\n
" + "html": "
\n
\n \n What is your date of birth?\n \n
\n For example, 31 3 1980\n
\n
\n
\n
\n \n \n
\n
\n
\n
\n \n \n
\n
\n
\n
\n \n \n
\n
\n
\n\n
\n
" }, { "name": "with input attributes", @@ -314,7 +314,7 @@ ] }, "hidden": false, - "html": "
\n
\n \n \n \n What is your date of birth?\n \n \n \n\n
\n For example, 31 3 1980\n
\n\n\n
\n \n
\n
\n \n \n \n \n
\n
\n \n
\n
\n \n \n \n \n
\n
\n \n
\n
\n \n \n \n \n
\n
\n \n
\n \n\n
\n\n\n
" + "html": "
\n
\n \n What is your date of birth?\n \n
\n For example, 31 3 1980\n
\n
\n
\n
\n \n \n
\n
\n
\n
\n \n \n
\n
\n
\n
\n \n \n
\n
\n
\n\n
\n
" }, { "name": "classes", @@ -323,7 +323,7 @@ "classes": "app-date-input--custom-modifier" }, "hidden": true, - "html": "
\n\n
\n \n
\n
\n \n \n \n \n
\n
\n \n
\n
\n \n \n \n \n
\n
\n \n
\n
\n \n \n \n \n
\n
\n \n
\n\n
" + "html": "
\n
\n
\n
\n \n \n
\n
\n
\n
\n \n \n
\n
\n
\n
\n \n \n
\n
\n
\n
" }, { "name": "attributes", @@ -334,7 +334,7 @@ } }, "hidden": true, - "html": "
\n\n
\n \n
\n
\n \n \n \n \n
\n
\n \n
\n
\n \n \n \n \n
\n
\n \n
\n
\n \n \n \n \n
\n
\n \n
\n\n
" + "html": "
\n
\n
\n
\n \n \n
\n
\n
\n
\n \n \n
\n
\n
\n
\n \n \n
\n
\n
\n
" }, { "name": "with empty items", @@ -343,7 +343,7 @@ "items": [] }, "hidden": true, - "html": "
\n\n
\n \n
\n
\n \n \n \n \n
\n
\n \n
\n
\n \n \n \n \n
\n
\n \n
\n
\n \n \n \n \n
\n
\n \n
\n\n
" + "html": "
\n
\n
\n
\n \n \n
\n
\n
\n
\n \n \n
\n
\n
\n
\n \n \n
\n
\n
\n
" }, { "name": "custom pattern", @@ -357,7 +357,7 @@ ] }, "hidden": true, - "html": "
\n\n
\n \n
\n
\n \n \n \n \n
\n
\n \n
\n\n
" + "html": "
\n
\n
\n
\n \n \n
\n
\n
\n
" }, { "name": "custom inputmode", @@ -372,7 +372,7 @@ ] }, "hidden": true, - "html": "
\n\n
\n \n
\n
\n \n \n \n \n
\n
\n \n
\n\n
" + "html": "
\n
\n
\n
\n \n \n
\n
\n
\n
" }, { "name": "with nested name", @@ -391,7 +391,7 @@ ] }, "hidden": true, - "html": "
\n\n
\n \n
\n
\n \n \n \n \n
\n
\n \n
\n
\n \n \n \n \n
\n
\n \n
\n
\n \n \n \n \n
\n
\n \n
\n\n
" + "html": "
\n
\n
\n
\n \n \n
\n
\n
\n
\n \n \n
\n
\n
\n
\n \n \n
\n
\n
\n
" }, { "name": "with id on items", @@ -413,7 +413,7 @@ ] }, "hidden": true, - "html": "
\n\n
\n \n
\n
\n \n \n \n \n
\n
\n \n
\n
\n \n \n \n \n
\n
\n \n
\n
\n \n \n \n \n
\n
\n \n
\n\n
" + "html": "
\n
\n
\n
\n \n \n
\n
\n
\n
\n \n \n
\n
\n
\n
\n \n \n
\n
\n
\n
" }, { "name": "suffixed id", @@ -432,7 +432,7 @@ ] }, "hidden": true, - "html": "
\n\n
\n \n
\n
\n \n \n \n \n
\n
\n \n
\n
\n \n \n \n \n
\n
\n \n
\n
\n \n \n \n \n
\n
\n \n
\n\n
" + "html": "
\n
\n
\n
\n \n \n
\n
\n
\n
\n \n \n
\n
\n
\n
\n \n \n
\n
\n
\n
" }, { "name": "with values", @@ -455,7 +455,7 @@ ] }, "hidden": true, - "html": "
\n\n
\n \n
\n
\n \n \n \n \n
\n
\n \n
\n
\n \n \n \n \n
\n
\n \n
\n
\n \n \n \n \n
\n
\n \n
\n\n
" + "html": "
\n
\n
\n
\n \n \n
\n
\n
\n
\n \n \n
\n
\n
\n
\n \n \n
\n
\n
\n
" }, { "name": "with hint and describedBy", @@ -472,7 +472,7 @@ } }, "hidden": true, - "html": "
\n
\n \n \n \n What is your date of birth?\n \n \n \n\n
\n For example, 31 3 1980\n
\n\n\n
\n \n
\n
\n \n \n \n \n
\n
\n \n
\n
\n \n \n \n \n
\n
\n \n
\n
\n \n \n \n \n
\n
\n \n
\n \n\n
\n\n\n
" + "html": "
\n
\n \n What is your date of birth?\n \n
\n For example, 31 3 1980\n
\n
\n
\n
\n \n \n
\n
\n
\n
\n \n \n
\n
\n
\n
\n \n \n
\n
\n
\n\n
\n
" }, { "name": "with error and describedBy", @@ -489,7 +489,7 @@ } }, "hidden": true, - "html": "
\n
\n \n \n \n What is your date of birth?\n \n \n \n\n

\n Error: Error message goes here\n

\n\n
\n \n
\n
\n \n \n \n \n
\n
\n \n
\n
\n \n \n \n \n
\n
\n \n
\n
\n \n \n \n \n
\n
\n \n
\n \n\n
\n\n\n
" + "html": "
\n
\n \n What is your date of birth?\n \n

\n Error: Error message goes here\n

\n
\n
\n
\n \n \n
\n
\n
\n
\n \n \n
\n
\n
\n
\n \n \n
\n
\n
\n\n
\n
" }, { "name": "fieldset html", @@ -502,7 +502,7 @@ } }, "hidden": true, - "html": "
\n
\n \n \n \n What is your date of birth?\n \n \n \n\n
\n \n
\n
\n \n \n \n \n
\n
\n \n
\n
\n \n \n \n \n
\n
\n \n
\n
\n \n \n \n \n
\n
\n \n
\n \n\n
\n\n\n
" + "html": "
\n
\n \n What is your date of birth?\n \n
\n
\n
\n \n \n
\n
\n
\n
\n \n \n
\n
\n
\n
\n \n \n
\n
\n
\n\n
\n
" }, { "name": "items with classes", @@ -524,7 +524,7 @@ ] }, "hidden": true, - "html": "
\n\n
\n \n
\n
\n \n \n \n \n
\n
\n \n
\n
\n \n \n \n \n
\n
\n \n
\n
\n \n \n \n \n
\n
\n \n
\n\n
" + "html": "
\n
\n
\n
\n \n \n
\n
\n
\n
\n \n \n
\n
\n
\n
\n \n \n
\n
\n
\n
" }, { "name": "items without classes", @@ -543,7 +543,7 @@ ] }, "hidden": true, - "html": "
\n\n
\n \n
\n
\n \n \n \n \n
\n
\n \n
\n
\n \n \n \n \n
\n
\n \n
\n
\n \n \n \n \n
\n
\n \n
\n\n
" + "html": "
\n
\n
\n
\n \n \n
\n
\n
\n
\n \n \n
\n
\n
\n
\n \n \n
\n
\n
\n
" } ] -} \ No newline at end of file +} diff --git a/package/govuk/components/date-input/macro-options.json b/package/govuk/components/date-input/macro-options.json index dd835ec517..4c88ee9c16 100644 --- a/package/govuk/components/date-input/macro-options.json +++ b/package/govuk/components/date-input/macro-options.json @@ -114,4 +114,4 @@ "required": false, "description": "HTML attributes (for example data attributes) to add to the date-input container." } -] \ No newline at end of file +] diff --git a/package/govuk/components/date-input/template.njk b/package/govuk/components/date-input/template.njk index 2bca8bf079..1b81dd54dd 100644 --- a/package/govuk/components/date-input/template.njk +++ b/package/govuk/components/date-input/template.njk @@ -4,7 +4,7 @@ {% from "../input/macro.njk" import govukInput %} {#- a record of other elements that we need to associate with the input using - aria-describedby – for example hints or error messages -#} + aria-describedby – for example hints or error messages -#} {% set describedBy = params.fieldset.describedBy if params.fieldset.describedBy else "" %} {% if params.items | length %} diff --git a/package/govuk/components/details/details.js b/package/govuk/components/details/details.js index 24437d7239..a09dcf5ad3 100644 --- a/package/govuk/components/details/details.js +++ b/package/govuk/components/details/details.js @@ -19,6 +19,7 @@ * without them conflicting with each other. * https://stackoverflow.com/a/8809472 * + * @deprecated Will be made private in v5.0 * @returns {string} Unique ID */ function generateUniqueID () { @@ -34,14 +35,16 @@ } /** + * @template {Node} ElementType * @callback nodeListIterator - * @param {Element} value - The current node being iterated on + * @param {ElementType} value - The current node being iterated on * @param {number} index - The current index in the iteration - * @param {NodeListOf} nodes - NodeList from querySelectorAll() + * @param {NodeListOf} nodes - NodeList from querySelectorAll() * @returns {void} */ - (function(undefined) { + // @ts-nocheck + (function (undefined) { // Detection from https://github.com/Financial-Times/polyfill-service/blob/master/packages/polyfill-library/polyfills/Window/detect.js var detect = ('Window' in this); @@ -62,7 +65,8 @@ }) .call('object' === typeof window && window || 'object' === typeof self && self || 'object' === typeof global && global || {}); - (function(undefined) { + // @ts-nocheck + (function (undefined) { // Detection from https://github.com/Financial-Times/polyfill-service/blob/master/packages/polyfill-library/polyfills/Document/detect.js var detect = ("Document" in this); @@ -89,6 +93,8 @@ }) .call('object' === typeof window && window || 'object' === typeof self && self || 'object' === typeof global && global || {}); + // @ts-nocheck + (function(undefined) { // Detection from https://github.com/Financial-Times/polyfill-service/blob/master/packages/polyfill-library/polyfills/Element/detect.js @@ -202,7 +208,8 @@ }) .call('object' === typeof window && window || 'object' === typeof self && self || 'object' === typeof global && global || {}); - (function(undefined) { + // @ts-nocheck + (function (undefined) { // Detection from https://github.com/Financial-Times/polyfill-service/blob/master/packages/polyfill-library/polyfills/Object/defineProperty/detect.js var detect = ( @@ -289,6 +296,8 @@ }) .call('object' === typeof window && window || 'object' === typeof self && self || 'object' === typeof global && global || {}); + // @ts-nocheck + (function(undefined) { // Detection from https://github.com/Financial-Times/polyfill-service/blob/master/packages/polyfill-library/polyfills/Event/detect.js @@ -538,6 +547,8 @@ }) .call('object' === typeof window && window || 'object' === typeof self && self || 'object' === typeof global && global || {}); + // @ts-nocheck + (function(undefined) { // Detection from https://github.com/Financial-Times/polyfill-service/blob/master/packages/polyfill-library/polyfills/Function/prototype/bind/detect.js var detect = 'bind' in Function.prototype; @@ -705,32 +716,45 @@ * Details component * * @class - * @param {HTMLElement} $module - HTML element to use for details + * @param {Element} $module - HTML element to use for details */ function Details ($module) { + if (!($module instanceof HTMLElement)) { + return this + } + + /** @deprecated Will be made private in v5.0 */ this.$module = $module; + + /** @deprecated Will be made private in v5.0 */ + this.$summary = null; + + /** @deprecated Will be made private in v5.0 */ + this.$content = null; } /** * Initialise component */ Details.prototype.init = function () { + // Check that required elements are present if (!this.$module) { return } // If there is native details support, we want to avoid running code to polyfill native behaviour. - var hasNativeDetails = typeof this.$module.open === 'boolean'; + var hasNativeDetails = 'HTMLDetailsElement' in window && + this.$module instanceof HTMLDetailsElement; - if (hasNativeDetails) { - return + if (!hasNativeDetails) { + this.polyfillDetails(); } - - this.polyfillDetails(); }; /** * Polyfill component in older browsers + * + * @deprecated Will be made private in v5.0 */ Details.prototype.polyfillDetails = function () { var $module = this.$module; @@ -781,6 +805,7 @@ /** * Define a statechange function that updates aria-expanded and style.display * + * @deprecated Will be made private in v5.0 * @returns {boolean} Returns true */ Details.prototype.polyfillSetAttributes = function () { @@ -800,6 +825,7 @@ /** * Handle cross-modal click events * + * @deprecated Will be made private in v5.0 * @param {polyfillHandleInputsCallback} callback - function */ Details.prototype.polyfillHandleInputs = function (callback) { @@ -807,7 +833,7 @@ var $target = event.target; // When the key gets pressed - check if it is enter or space if (event.keyCode === KEY_ENTER || event.keyCode === KEY_SPACE) { - if ($target.nodeName.toLowerCase() === 'summary') { + if ($target instanceof HTMLElement && $target.nodeName.toLowerCase() === 'summary') { // Prevent space from scrolling the page // and enter from submitting a form event.preventDefault(); @@ -826,7 +852,7 @@ this.$summary.addEventListener('keyup', function (event) { var $target = event.target; if (event.keyCode === KEY_SPACE) { - if ($target.nodeName.toLowerCase() === 'summary') { + if ($target instanceof HTMLElement && $target.nodeName.toLowerCase() === 'summary') { event.preventDefault(); } } diff --git a/package/govuk/components/details/details.js.map b/package/govuk/components/details/details.js.map index 0278d72058..f155e5e2c3 100644 --- a/package/govuk/components/details/details.js.map +++ b/package/govuk/components/details/details.js.map @@ -1 +1 @@ -{"version":3,"file":"details.js","sources":["../../../../src/govuk/common/index.mjs","../../../../src/govuk/vendor/polyfills/Window.mjs","../../../../src/govuk/vendor/polyfills/Document.mjs","../../../../src/govuk/vendor/polyfills/Element.mjs","../../../../src/govuk/vendor/polyfills/Object/defineProperty.mjs","../../../../src/govuk/vendor/polyfills/Event.mjs","../../../../src/govuk/vendor/polyfills/Function/prototype/bind.mjs","../../../../src/govuk/components/details/details.mjs"],"sourcesContent":["/**\n * Common helpers which do not require polyfill.\n *\n * IMPORTANT: If a helper require a polyfill, please isolate it in its own module\n * so that the polyfill can be properly tree-shaken and does not burden\n * the components that do not need that helper\n *\n * @module common/index\n */\n\n/**\n * TODO: Ideally this would be a NodeList.prototype.forEach polyfill\n * This seems to fail in IE8, requires more investigation.\n * See: https://github.com/imagitama/nodelist-foreach-polyfill\n *\n * @param {NodeListOf} nodes - NodeList from querySelectorAll()\n * @param {nodeListIterator} callback - Callback function to run for each node\n * @returns {void}\n */\nexport function nodeListForEach (nodes, callback) {\n if (window.NodeList.prototype.forEach) {\n return nodes.forEach(callback)\n }\n for (var i = 0; i < nodes.length; i++) {\n callback.call(window, nodes[i], i, nodes)\n }\n}\n\n/**\n * Used to generate a unique string, allows multiple instances of the component\n * without them conflicting with each other.\n * https://stackoverflow.com/a/8809472\n *\n * @returns {string} Unique ID\n */\nexport function generateUniqueID () {\n var d = new Date().getTime()\n if (typeof window.performance !== 'undefined' && typeof window.performance.now === 'function') {\n d += window.performance.now() // use high-precision timer if available\n }\n return 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g, function (c) {\n var r = (d + Math.random() * 16) % 16 | 0\n d = Math.floor(d / 16)\n return (c === 'x' ? r : (r & 0x3 | 0x8)).toString(16)\n })\n}\n\n/**\n * Config flattening function\n *\n * Takes any number of objects, flattens them into namespaced key-value pairs,\n * (e.g. {'i18n.showSection': 'Show section'}) and combines them together, with\n * greatest priority on the LAST item passed in.\n *\n * @returns {Object} A flattened object of key-value pairs.\n */\nexport function mergeConfigs (/* configObject1, configObject2, ...configObjects */) {\n /**\n * Function to take nested objects and flatten them to a dot-separated keyed\n * object. Doing this means we don't need to do any deep/recursive merging of\n * each of our objects, nor transform our dataset from a flat list into a\n * nested object.\n *\n * @param {Object} configObject - Deeply nested object\n * @returns {Object} Flattened object with dot-separated keys\n */\n var flattenObject = function (configObject) {\n // Prepare an empty return object\n var flattenedObject = {}\n\n /**\n * Our flattening function, this is called recursively for each level of\n * depth in the object. At each level we prepend the previous level names to\n * the key using `prefix`.\n *\n * @param {Partial>} obj - Object to flatten\n * @param {string} [prefix] - Optional dot-separated prefix\n */\n var flattenLoop = function (obj, prefix) {\n // Loop through keys...\n for (var key in obj) {\n // Check to see if this is a prototypical key/value,\n // if it is, skip it.\n if (!Object.prototype.hasOwnProperty.call(obj, key)) {\n continue\n }\n var value = obj[key]\n var prefixedKey = prefix ? prefix + '.' + key : key\n if (typeof value === 'object') {\n // If the value is a nested object, recurse over that too\n flattenLoop(value, prefixedKey)\n } else {\n // Otherwise, add this value to our return object\n flattenedObject[prefixedKey] = value\n }\n }\n }\n\n // Kick off the recursive loop\n flattenLoop(configObject)\n return flattenedObject\n }\n\n // Start with an empty object as our base\n var formattedConfigObject = {}\n\n // Loop through each of the remaining passed objects and push their keys\n // one-by-one into configObject. Any duplicate keys will override the existing\n // key with the new value.\n for (var i = 0; i < arguments.length; i++) {\n var obj = flattenObject(arguments[i])\n for (var key in obj) {\n if (Object.prototype.hasOwnProperty.call(obj, key)) {\n formattedConfigObject[key] = obj[key]\n }\n }\n }\n\n return formattedConfigObject\n}\n\n/**\n * Extracts keys starting with a particular namespace from a flattened config\n * object, removing the namespace in the process.\n *\n * @param {Object} configObject - The object to extract key-value pairs from.\n * @param {string} namespace - The namespace to filter keys with.\n * @returns {Object} Flattened object with dot-separated key namespace removed\n * @throws {Error} Config object required\n * @throws {Error} Namespace string required\n */\nexport function extractConfigByNamespace (configObject, namespace) {\n // Check we have what we need\n if (!configObject || typeof configObject !== 'object') {\n throw new Error('Provide a `configObject` of type \"object\".')\n }\n if (!namespace || typeof namespace !== 'string') {\n throw new Error('Provide a `namespace` of type \"string\" to filter the `configObject` by.')\n }\n var newObject = {}\n for (var key in configObject) {\n // Split the key into parts, using . as our namespace separator\n var keyParts = key.split('.')\n // Check if the first namespace matches the configured namespace\n if (Object.prototype.hasOwnProperty.call(configObject, key) && keyParts[0] === namespace) {\n // Remove the first item (the namespace) from the parts array,\n // but only if there is more than one part (we don't want blank keys!)\n if (keyParts.length > 1) {\n keyParts.shift()\n }\n // Join the remaining parts back together\n var newKey = keyParts.join('.')\n // Add them to our new object\n newObject[newKey] = configObject[key]\n }\n }\n return newObject\n}\n\n/**\n * @callback nodeListIterator\n * @param {Element} value - The current node being iterated on\n * @param {number} index - The current index in the iteration\n * @param {NodeListOf} nodes - NodeList from querySelectorAll()\n * @returns {void}\n */\n","(function(undefined) {\n\n// Detection from https://github.com/Financial-Times/polyfill-service/blob/master/packages/polyfill-library/polyfills/Window/detect.js\nvar detect = ('Window' in this)\n\nif (detect) return\n\n// Polyfill from https://cdn.polyfill.io/v2/polyfill.js?features=Window&flags=always\nif ((typeof WorkerGlobalScope === \"undefined\") && (typeof importScripts !== \"function\")) {\n\t(function (global) {\n\t\tif (global.constructor) {\n\t\t\tglobal.Window = global.constructor;\n\t\t} else {\n\t\t\t(global.Window = global.constructor = new Function('return function Window() {}')()).prototype = this;\n\t\t}\n\t}(this));\n}\n\n})\n.call('object' === typeof window && window || 'object' === typeof self && self || 'object' === typeof global && global || {});\n","(function(undefined) {\n\n// Detection from https://github.com/Financial-Times/polyfill-service/blob/master/packages/polyfill-library/polyfills/Document/detect.js\nvar detect = (\"Document\" in this)\n\nif (detect) return\n\n// Polyfill from https://cdn.polyfill.io/v2/polyfill.js?features=Document&flags=always\nif ((typeof WorkerGlobalScope === \"undefined\") && (typeof importScripts !== \"function\")) {\n\n\tif (this.HTMLDocument) { // IE8\n\n\t\t// HTMLDocument is an extension of Document. If the browser has HTMLDocument but not Document, the former will suffice as an alias for the latter.\n\t\tthis.Document = this.HTMLDocument;\n\n\t} else {\n\n\t\t// Create an empty function to act as the missing constructor for the document object, attach the document object as its prototype. The function needs to be anonymous else it is hoisted and causes the feature detect to prematurely pass, preventing the assignments below being made.\n\t\tthis.Document = this.HTMLDocument = document.constructor = (new Function('return function Document() {}')());\n\t\tthis.Document.prototype = document;\n\t}\n}\n\n\n})\n.call('object' === typeof window && window || 'object' === typeof self && self || 'object' === typeof global && global || {});\n","import './Document.mjs'\n\n(function(undefined) {\n\n// Detection from https://github.com/Financial-Times/polyfill-service/blob/master/packages/polyfill-library/polyfills/Element/detect.js\nvar detect = ('Element' in this && 'HTMLElement' in this)\n\nif (detect) return\n\n// Polyfill from https://cdn.polyfill.io/v2/polyfill.js?features=Element&flags=always\n(function () {\n\n\t// IE8\n\tif (window.Element && !window.HTMLElement) {\n\t\twindow.HTMLElement = window.Element;\n\t\treturn;\n\t}\n\n\t// create Element constructor\n\twindow.Element = window.HTMLElement = new Function('return function Element() {}')();\n\n\t// generate sandboxed iframe\n\tvar vbody = document.appendChild(document.createElement('body'));\n\tvar frame = vbody.appendChild(document.createElement('iframe'));\n\n\t// use sandboxed iframe to replicate Element functionality\n\tvar frameDocument = frame.contentWindow.document;\n\tvar prototype = Element.prototype = frameDocument.appendChild(frameDocument.createElement('*'));\n\tvar cache = {};\n\n\t// polyfill Element.prototype on an element\n\tvar shiv = function (element, deep) {\n\t\tvar\n\t\tchildNodes = element.childNodes || [],\n\t\tindex = -1,\n\t\tkey, value, childNode;\n\n\t\tif (element.nodeType === 1 && element.constructor !== Element) {\n\t\t\telement.constructor = Element;\n\n\t\t\tfor (key in cache) {\n\t\t\t\tvalue = cache[key];\n\t\t\t\telement[key] = value;\n\t\t\t}\n\t\t}\n\n\t\twhile (childNode = deep && childNodes[++index]) {\n\t\t\tshiv(childNode, deep);\n\t\t}\n\n\t\treturn element;\n\t};\n\n\tvar elements = document.getElementsByTagName('*');\n\tvar nativeCreateElement = document.createElement;\n\tvar interval;\n\tvar loopLimit = 100;\n\n\tprototype.attachEvent('onpropertychange', function (event) {\n\t\tvar\n\t\tpropertyName = event.propertyName,\n\t\tnonValue = !cache.hasOwnProperty(propertyName),\n\t\tnewValue = prototype[propertyName],\n\t\toldValue = cache[propertyName],\n\t\tindex = -1,\n\t\telement;\n\n\t\twhile (element = elements[++index]) {\n\t\t\tif (element.nodeType === 1) {\n\t\t\t\tif (nonValue || element[propertyName] === oldValue) {\n\t\t\t\t\telement[propertyName] = newValue;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tcache[propertyName] = newValue;\n\t});\n\n\tprototype.constructor = Element;\n\n\tif (!prototype.hasAttribute) {\n\t\t// .hasAttribute\n\t\tprototype.hasAttribute = function hasAttribute(name) {\n\t\t\treturn this.getAttribute(name) !== null;\n\t\t};\n\t}\n\n\t// Apply Element prototype to the pre-existing DOM as soon as the body element appears.\n\tfunction bodyCheck() {\n\t\tif (!(loopLimit--)) clearTimeout(interval);\n\t\tif (document.body && !document.body.prototype && /(complete|interactive)/.test(document.readyState)) {\n\t\t\tshiv(document, true);\n\t\t\tif (interval && document.body.prototype) clearTimeout(interval);\n\t\t\treturn (!!document.body.prototype);\n\t\t}\n\t\treturn false;\n\t}\n\tif (!bodyCheck()) {\n\t\tdocument.onreadystatechange = bodyCheck;\n\t\tinterval = setInterval(bodyCheck, 25);\n\t}\n\n\t// Apply to any new elements created after load\n\tdocument.createElement = function createElement(nodeName) {\n\t\tvar element = nativeCreateElement(String(nodeName).toLowerCase());\n\t\treturn shiv(element);\n\t};\n\n\t// remove sandboxed iframe\n\tdocument.removeChild(vbody);\n}());\n\n})\n.call('object' === typeof window && window || 'object' === typeof self && self || 'object' === typeof global && global || {});\n","(function(undefined) {\n\n// Detection from https://github.com/Financial-Times/polyfill-service/blob/master/packages/polyfill-library/polyfills/Object/defineProperty/detect.js\nvar detect = (\n // In IE8, defineProperty could only act on DOM elements, so full support\n // for the feature requires the ability to set a property on an arbitrary object\n 'defineProperty' in Object && (function() {\n \ttry {\n \t\tvar a = {};\n \t\tObject.defineProperty(a, 'test', {value:42});\n \t\treturn true;\n \t} catch(e) {\n \t\treturn false\n \t}\n }())\n)\n\nif (detect) return\n\n// Polyfill from https://cdn.polyfill.io/v2/polyfill.js?features=Object.defineProperty&flags=always\n(function (nativeDefineProperty) {\n\n\tvar supportsAccessors = Object.prototype.hasOwnProperty('__defineGetter__');\n\tvar ERR_ACCESSORS_NOT_SUPPORTED = 'Getters & setters cannot be defined on this javascript engine';\n\tvar ERR_VALUE_ACCESSORS = 'A property cannot both have accessors and be writable or have a value';\n\n\tObject.defineProperty = function defineProperty(object, property, descriptor) {\n\n\t\t// Where native support exists, assume it\n\t\tif (nativeDefineProperty && (object === window || object === document || object === Element.prototype || object instanceof Element)) {\n\t\t\treturn nativeDefineProperty(object, property, descriptor);\n\t\t}\n\n\t\tif (object === null || !(object instanceof Object || typeof object === 'object')) {\n\t\t\tthrow new TypeError('Object.defineProperty called on non-object');\n\t\t}\n\n\t\tif (!(descriptor instanceof Object)) {\n\t\t\tthrow new TypeError('Property description must be an object');\n\t\t}\n\n\t\tvar propertyString = String(property);\n\t\tvar hasValueOrWritable = 'value' in descriptor || 'writable' in descriptor;\n\t\tvar getterType = 'get' in descriptor && typeof descriptor.get;\n\t\tvar setterType = 'set' in descriptor && typeof descriptor.set;\n\n\t\t// handle descriptor.get\n\t\tif (getterType) {\n\t\t\tif (getterType !== 'function') {\n\t\t\t\tthrow new TypeError('Getter must be a function');\n\t\t\t}\n\t\t\tif (!supportsAccessors) {\n\t\t\t\tthrow new TypeError(ERR_ACCESSORS_NOT_SUPPORTED);\n\t\t\t}\n\t\t\tif (hasValueOrWritable) {\n\t\t\t\tthrow new TypeError(ERR_VALUE_ACCESSORS);\n\t\t\t}\n\t\t\tObject.__defineGetter__.call(object, propertyString, descriptor.get);\n\t\t} else {\n\t\t\tobject[propertyString] = descriptor.value;\n\t\t}\n\n\t\t// handle descriptor.set\n\t\tif (setterType) {\n\t\t\tif (setterType !== 'function') {\n\t\t\t\tthrow new TypeError('Setter must be a function');\n\t\t\t}\n\t\t\tif (!supportsAccessors) {\n\t\t\t\tthrow new TypeError(ERR_ACCESSORS_NOT_SUPPORTED);\n\t\t\t}\n\t\t\tif (hasValueOrWritable) {\n\t\t\t\tthrow new TypeError(ERR_VALUE_ACCESSORS);\n\t\t\t}\n\t\t\tObject.__defineSetter__.call(object, propertyString, descriptor.set);\n\t\t}\n\n\t\t// OK to define value unconditionally - if a getter has been specified as well, an error would be thrown above\n\t\tif ('value' in descriptor) {\n\t\t\tobject[propertyString] = descriptor.value;\n\t\t}\n\n\t\treturn object;\n\t};\n}(Object.defineProperty));\n})\n.call('object' === typeof window && window || 'object' === typeof self && self || 'object' === typeof global && global || {});\n","import './Window.mjs'\nimport './Element.mjs'\nimport './Object/defineProperty.mjs'\n\n(function(undefined) {\n\n// Detection from https://github.com/Financial-Times/polyfill-service/blob/master/packages/polyfill-library/polyfills/Event/detect.js\nvar detect = (\n (function(global) {\n\n \tif (!('Event' in global)) return false;\n \tif (typeof global.Event === 'function') return true;\n\n \ttry {\n\n \t\t// In IE 9-11, the Event object exists but cannot be instantiated\n \t\tnew Event('click');\n \t\treturn true;\n \t} catch(e) {\n \t\treturn false;\n \t}\n }(this))\n)\n\nif (detect) return\n\n// Polyfill from https://cdn.polyfill.io/v2/polyfill.js?features=Event&flags=always\n(function () {\n\tvar unlistenableWindowEvents = {\n\t\tclick: 1,\n\t\tdblclick: 1,\n\t\tkeyup: 1,\n\t\tkeypress: 1,\n\t\tkeydown: 1,\n\t\tmousedown: 1,\n\t\tmouseup: 1,\n\t\tmousemove: 1,\n\t\tmouseover: 1,\n\t\tmouseenter: 1,\n\t\tmouseleave: 1,\n\t\tmouseout: 1,\n\t\tstorage: 1,\n\t\tstoragecommit: 1,\n\t\ttextinput: 1\n\t};\n\n\t// This polyfill depends on availability of `document` so will not run in a worker\n\t// However, we asssume there are no browsers with worker support that lack proper\n\t// support for `Event` within the worker\n\tif (typeof document === 'undefined' || typeof window === 'undefined') return;\n\n\tfunction indexOf(array, element) {\n\t\tvar\n\t\tindex = -1,\n\t\tlength = array.length;\n\n\t\twhile (++index < length) {\n\t\t\tif (index in array && array[index] === element) {\n\t\t\t\treturn index;\n\t\t\t}\n\t\t}\n\n\t\treturn -1;\n\t}\n\n\tvar existingProto = (window.Event && window.Event.prototype) || null;\n\twindow.Event = Window.prototype.Event = function Event(type, eventInitDict) {\n\t\tif (!type) {\n\t\t\tthrow new Error('Not enough arguments');\n\t\t}\n\n\t\tvar event;\n\t\t// Shortcut if browser supports createEvent\n\t\tif ('createEvent' in document) {\n\t\t\tevent = document.createEvent('Event');\n\t\t\tvar bubbles = eventInitDict && eventInitDict.bubbles !== undefined ? eventInitDict.bubbles : false;\n\t\t\tvar cancelable = eventInitDict && eventInitDict.cancelable !== undefined ? eventInitDict.cancelable : false;\n\n\t\t\tevent.initEvent(type, bubbles, cancelable);\n\n\t\t\treturn event;\n\t\t}\n\n\t\tevent = document.createEventObject();\n\n\t\tevent.type = type;\n\t\tevent.bubbles = eventInitDict && eventInitDict.bubbles !== undefined ? eventInitDict.bubbles : false;\n\t\tevent.cancelable = eventInitDict && eventInitDict.cancelable !== undefined ? eventInitDict.cancelable : false;\n\n\t\treturn event;\n\t};\n\tif (existingProto) {\n\t\tObject.defineProperty(window.Event, 'prototype', {\n\t\t\tconfigurable: false,\n\t\t\tenumerable: false,\n\t\t\twritable: true,\n\t\t\tvalue: existingProto\n\t\t});\n\t}\n\n\tif (!('createEvent' in document)) {\n\t\twindow.addEventListener = Window.prototype.addEventListener = Document.prototype.addEventListener = Element.prototype.addEventListener = function addEventListener() {\n\t\t\tvar\n\t\t\telement = this,\n\t\t\ttype = arguments[0],\n\t\t\tlistener = arguments[1];\n\n\t\t\tif (element === window && type in unlistenableWindowEvents) {\n\t\t\t\tthrow new Error('In IE8 the event: ' + type + ' is not available on the window object. Please see https://github.com/Financial-Times/polyfill-service/issues/317 for more information.');\n\t\t\t}\n\n\t\t\tif (!element._events) {\n\t\t\t\telement._events = {};\n\t\t\t}\n\n\t\t\tif (!element._events[type]) {\n\t\t\t\telement._events[type] = function (event) {\n\t\t\t\t\tvar\n\t\t\t\t\tlist = element._events[event.type].list,\n\t\t\t\t\tevents = list.slice(),\n\t\t\t\t\tindex = -1,\n\t\t\t\t\tlength = events.length,\n\t\t\t\t\teventElement;\n\n\t\t\t\t\tevent.preventDefault = function preventDefault() {\n\t\t\t\t\t\tif (event.cancelable !== false) {\n\t\t\t\t\t\t\tevent.returnValue = false;\n\t\t\t\t\t\t}\n\t\t\t\t\t};\n\n\t\t\t\t\tevent.stopPropagation = function stopPropagation() {\n\t\t\t\t\t\tevent.cancelBubble = true;\n\t\t\t\t\t};\n\n\t\t\t\t\tevent.stopImmediatePropagation = function stopImmediatePropagation() {\n\t\t\t\t\t\tevent.cancelBubble = true;\n\t\t\t\t\t\tevent.cancelImmediate = true;\n\t\t\t\t\t};\n\n\t\t\t\t\tevent.currentTarget = element;\n\t\t\t\t\tevent.relatedTarget = event.fromElement || null;\n\t\t\t\t\tevent.target = event.target || event.srcElement || element;\n\t\t\t\t\tevent.timeStamp = new Date().getTime();\n\n\t\t\t\t\tif (event.clientX) {\n\t\t\t\t\t\tevent.pageX = event.clientX + document.documentElement.scrollLeft;\n\t\t\t\t\t\tevent.pageY = event.clientY + document.documentElement.scrollTop;\n\t\t\t\t\t}\n\n\t\t\t\t\twhile (++index < length && !event.cancelImmediate) {\n\t\t\t\t\t\tif (index in events) {\n\t\t\t\t\t\t\teventElement = events[index];\n\n\t\t\t\t\t\t\tif (indexOf(list, eventElement) !== -1 && typeof eventElement === 'function') {\n\t\t\t\t\t\t\t\teventElement.call(element, event);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t};\n\n\t\t\t\telement._events[type].list = [];\n\n\t\t\t\tif (element.attachEvent) {\n\t\t\t\t\telement.attachEvent('on' + type, element._events[type]);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\telement._events[type].list.push(listener);\n\t\t};\n\n\t\twindow.removeEventListener = Window.prototype.removeEventListener = Document.prototype.removeEventListener = Element.prototype.removeEventListener = function removeEventListener() {\n\t\t\tvar\n\t\t\telement = this,\n\t\t\ttype = arguments[0],\n\t\t\tlistener = arguments[1],\n\t\t\tindex;\n\n\t\t\tif (element._events && element._events[type] && element._events[type].list) {\n\t\t\t\tindex = indexOf(element._events[type].list, listener);\n\n\t\t\t\tif (index !== -1) {\n\t\t\t\t\telement._events[type].list.splice(index, 1);\n\n\t\t\t\t\tif (!element._events[type].list.length) {\n\t\t\t\t\t\tif (element.detachEvent) {\n\t\t\t\t\t\t\telement.detachEvent('on' + type, element._events[type]);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tdelete element._events[type];\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t};\n\n\t\twindow.dispatchEvent = Window.prototype.dispatchEvent = Document.prototype.dispatchEvent = Element.prototype.dispatchEvent = function dispatchEvent(event) {\n\t\t\tif (!arguments.length) {\n\t\t\t\tthrow new Error('Not enough arguments');\n\t\t\t}\n\n\t\t\tif (!event || typeof event.type !== 'string') {\n\t\t\t\tthrow new Error('DOM Events Exception 0');\n\t\t\t}\n\n\t\t\tvar element = this, type = event.type;\n\n\t\t\ttry {\n\t\t\t\tif (!event.bubbles) {\n\t\t\t\t\tevent.cancelBubble = true;\n\n\t\t\t\t\tvar cancelBubbleEvent = function (event) {\n\t\t\t\t\t\tevent.cancelBubble = true;\n\n\t\t\t\t\t\t(element || window).detachEvent('on' + type, cancelBubbleEvent);\n\t\t\t\t\t};\n\n\t\t\t\t\tthis.attachEvent('on' + type, cancelBubbleEvent);\n\t\t\t\t}\n\n\t\t\t\tthis.fireEvent('on' + type, event);\n\t\t\t} catch (error) {\n\t\t\t\tevent.target = element;\n\n\t\t\t\tdo {\n\t\t\t\t\tevent.currentTarget = element;\n\n\t\t\t\t\tif ('_events' in element && typeof element._events[type] === 'function') {\n\t\t\t\t\t\telement._events[type].call(element, event);\n\t\t\t\t\t}\n\n\t\t\t\t\tif (typeof element['on' + type] === 'function') {\n\t\t\t\t\t\telement['on' + type].call(element, event);\n\t\t\t\t\t}\n\n\t\t\t\t\telement = element.nodeType === 9 ? element.parentWindow : element.parentNode;\n\t\t\t\t} while (element && !event.cancelBubble);\n\t\t\t}\n\n\t\t\treturn true;\n\t\t};\n\n\t\t// Add the DOMContentLoaded Event\n\t\tdocument.attachEvent('onreadystatechange', function() {\n\t\t\tif (document.readyState === 'complete') {\n\t\t\t\tdocument.dispatchEvent(new Event('DOMContentLoaded', {\n\t\t\t\t\tbubbles: true\n\t\t\t\t}));\n\t\t\t}\n\t\t});\n\t}\n}());\n\n})\n.call('object' === typeof window && window || 'object' === typeof self && self || 'object' === typeof global && global || {});\n","import '../../Object/defineProperty.mjs'\n\n(function(undefined) {\n // Detection from https://github.com/Financial-Times/polyfill-service/blob/master/packages/polyfill-library/polyfills/Function/prototype/bind/detect.js\n var detect = 'bind' in Function.prototype\n\n if (detect) return\n\n // Polyfill from https://cdn.polyfill.io/v2/polyfill.js?features=Function.prototype.bind&flags=always\n Object.defineProperty(Function.prototype, 'bind', {\n value: function bind(that) { // .length is 1\n // add necessary es5-shim utilities\n var $Array = Array;\n var $Object = Object;\n var ObjectPrototype = $Object.prototype;\n var ArrayPrototype = $Array.prototype;\n var Empty = function Empty() {};\n var to_string = ObjectPrototype.toString;\n var hasToStringTag = typeof Symbol === 'function' && typeof Symbol.toStringTag === 'symbol';\n var isCallable; /* inlined from https://npmjs.com/is-callable */ var fnToStr = Function.prototype.toString, tryFunctionObject = function tryFunctionObject(value) { try { fnToStr.call(value); return true; } catch (e) { return false; } }, fnClass = '[object Function]', genClass = '[object GeneratorFunction]'; isCallable = function isCallable(value) { if (typeof value !== 'function') { return false; } if (hasToStringTag) { return tryFunctionObject(value); } var strClass = to_string.call(value); return strClass === fnClass || strClass === genClass; };\n var array_slice = ArrayPrototype.slice;\n var array_concat = ArrayPrototype.concat;\n var array_push = ArrayPrototype.push;\n var max = Math.max;\n // /add necessary es5-shim utilities\n\n // 1. Let Target be the this value.\n var target = this;\n // 2. If IsCallable(Target) is false, throw a TypeError exception.\n if (!isCallable(target)) {\n throw new TypeError('Function.prototype.bind called on incompatible ' + target);\n }\n // 3. Let A be a new (possibly empty) internal list of all of the\n // argument values provided after thisArg (arg1, arg2 etc), in order.\n // XXX slicedArgs will stand in for \"A\" if used\n var args = array_slice.call(arguments, 1); // for normal call\n // 4. Let F be a new native ECMAScript object.\n // 11. Set the [[Prototype]] internal property of F to the standard\n // built-in Function prototype object as specified in 15.3.3.1.\n // 12. Set the [[Call]] internal property of F as described in\n // 15.3.4.5.1.\n // 13. Set the [[Construct]] internal property of F as described in\n // 15.3.4.5.2.\n // 14. Set the [[HasInstance]] internal property of F as described in\n // 15.3.4.5.3.\n var bound;\n var binder = function () {\n\n if (this instanceof bound) {\n // 15.3.4.5.2 [[Construct]]\n // When the [[Construct]] internal method of a function object,\n // F that was created using the bind function is called with a\n // list of arguments ExtraArgs, the following steps are taken:\n // 1. Let target be the value of F's [[TargetFunction]]\n // internal property.\n // 2. If target has no [[Construct]] internal method, a\n // TypeError exception is thrown.\n // 3. Let boundArgs be the value of F's [[BoundArgs]] internal\n // property.\n // 4. Let args be a new list containing the same values as the\n // list boundArgs in the same order followed by the same\n // values as the list ExtraArgs in the same order.\n // 5. Return the result of calling the [[Construct]] internal\n // method of target providing args as the arguments.\n\n var result = target.apply(\n this,\n array_concat.call(args, array_slice.call(arguments))\n );\n if ($Object(result) === result) {\n return result;\n }\n return this;\n\n } else {\n // 15.3.4.5.1 [[Call]]\n // When the [[Call]] internal method of a function object, F,\n // which was created using the bind function is called with a\n // this value and a list of arguments ExtraArgs, the following\n // steps are taken:\n // 1. Let boundArgs be the value of F's [[BoundArgs]] internal\n // property.\n // 2. Let boundThis be the value of F's [[BoundThis]] internal\n // property.\n // 3. Let target be the value of F's [[TargetFunction]] internal\n // property.\n // 4. Let args be a new list containing the same values as the\n // list boundArgs in the same order followed by the same\n // values as the list ExtraArgs in the same order.\n // 5. Return the result of calling the [[Call]] internal method\n // of target providing boundThis as the this value and\n // providing args as the arguments.\n\n // equiv: target.call(this, ...boundArgs, ...args)\n return target.apply(\n that,\n array_concat.call(args, array_slice.call(arguments))\n );\n\n }\n\n };\n\n // 15. If the [[Class]] internal property of Target is \"Function\", then\n // a. Let L be the length property of Target minus the length of A.\n // b. Set the length own property of F to either 0 or L, whichever is\n // larger.\n // 16. Else set the length own property of F to 0.\n\n var boundLength = max(0, target.length - args.length);\n\n // 17. Set the attributes of the length own property of F to the values\n // specified in 15.3.5.1.\n var boundArgs = [];\n for (var i = 0; i < boundLength; i++) {\n array_push.call(boundArgs, '$' + i);\n }\n\n // XXX Build a dynamic function with desired amount of arguments is the only\n // way to set the length property of a function.\n // In environments where Content Security Policies enabled (Chrome extensions,\n // for ex.) all use of eval or Function costructor throws an exception.\n // However in all of these environments Function.prototype.bind exists\n // and so this code will never be executed.\n bound = Function('binder', 'return function (' + boundArgs.join(',') + '){ return binder.apply(this, arguments); }')(binder);\n\n if (target.prototype) {\n Empty.prototype = target.prototype;\n bound.prototype = new Empty();\n // Clean up dangling references.\n Empty.prototype = null;\n }\n\n // TODO\n // 18. Set the [[Extensible]] internal property of F to true.\n\n // TODO\n // 19. Let thrower be the [[ThrowTypeError]] function Object (13.2.3).\n // 20. Call the [[DefineOwnProperty]] internal method of F with\n // arguments \"caller\", PropertyDescriptor {[[Get]]: thrower, [[Set]]:\n // thrower, [[Enumerable]]: false, [[Configurable]]: false}, and\n // false.\n // 21. Call the [[DefineOwnProperty]] internal method of F with\n // arguments \"arguments\", PropertyDescriptor {[[Get]]: thrower,\n // [[Set]]: thrower, [[Enumerable]]: false, [[Configurable]]: false},\n // and false.\n\n // TODO\n // NOTE Function objects created using Function.prototype.bind do not\n // have a prototype property or the [[Code]], [[FormalParameters]], and\n // [[Scope]] internal properties.\n // XXX can't delete prototype in pure-js.\n\n // 22. Return F.\n return bound;\n }\n });\n})\n.call('object' === typeof window && window || 'object' === typeof self && self || 'object' === typeof global && global || {});\n","/* eslint-disable es-x/no-function-prototype-bind -- Polyfill imported */\n\n/**\n * JavaScript 'polyfill' for HTML5's
and elements\n * and 'shim' to add accessiblity enhancements for all browsers\n *\n * http://caniuse.com/#feat=details\n */\nimport { generateUniqueID } from '../../common/index.mjs'\nimport '../../vendor/polyfills/Event.mjs' // addEventListener, event.target normalization and DOMContentLoaded\nimport '../../vendor/polyfills/Function/prototype/bind.mjs'\n\nvar KEY_ENTER = 13\nvar KEY_SPACE = 32\n\n/**\n * Details component\n *\n * @class\n * @param {HTMLElement} $module - HTML element to use for details\n */\nfunction Details ($module) {\n this.$module = $module\n}\n\n/**\n * Initialise component\n */\nDetails.prototype.init = function () {\n if (!this.$module) {\n return\n }\n\n // If there is native details support, we want to avoid running code to polyfill native behaviour.\n var hasNativeDetails = typeof this.$module.open === 'boolean'\n\n if (hasNativeDetails) {\n return\n }\n\n this.polyfillDetails()\n}\n\n/**\n * Polyfill component in older browsers\n */\nDetails.prototype.polyfillDetails = function () {\n var $module = this.$module\n\n // Save shortcuts to the inner summary and content elements\n var $summary = this.$summary = $module.getElementsByTagName('summary').item(0)\n var $content = this.$content = $module.getElementsByTagName('div').item(0)\n\n // If
doesn't have a and a
representing the content\n // it means the required HTML structure is not met so the script will stop\n if (!$summary || !$content) {\n return\n }\n\n // If the content doesn't have an ID, assign it one now\n // which we'll need for the summary's aria-controls assignment\n if (!$content.id) {\n $content.id = 'details-content-' + generateUniqueID()\n }\n\n // Add ARIA role=\"group\" to details\n $module.setAttribute('role', 'group')\n\n // Add role=button to summary\n $summary.setAttribute('role', 'button')\n\n // Add aria-controls\n $summary.setAttribute('aria-controls', $content.id)\n\n // Set tabIndex so the summary is keyboard accessible for non-native elements\n //\n // We have to use the camelcase `tabIndex` property as there is a bug in IE6/IE7 when we set the correct attribute lowercase:\n // See http://web.archive.org/web/20170120194036/http://www.saliences.com/browserBugs/tabIndex.html for more information.\n $summary.tabIndex = 0\n\n // Detect initial open state\n if (this.$module.hasAttribute('open')) {\n $summary.setAttribute('aria-expanded', 'true')\n } else {\n $summary.setAttribute('aria-expanded', 'false')\n $content.style.display = 'none'\n }\n\n // Bind an event to handle summary elements\n this.polyfillHandleInputs(this.polyfillSetAttributes.bind(this))\n}\n\n/**\n * Define a statechange function that updates aria-expanded and style.display\n *\n * @returns {boolean} Returns true\n */\nDetails.prototype.polyfillSetAttributes = function () {\n if (this.$module.hasAttribute('open')) {\n this.$module.removeAttribute('open')\n this.$summary.setAttribute('aria-expanded', 'false')\n this.$content.style.display = 'none'\n } else {\n this.$module.setAttribute('open', 'open')\n this.$summary.setAttribute('aria-expanded', 'true')\n this.$content.style.display = ''\n }\n\n return true\n}\n\n/**\n * Handle cross-modal click events\n *\n * @param {polyfillHandleInputsCallback} callback - function\n */\nDetails.prototype.polyfillHandleInputs = function (callback) {\n this.$summary.addEventListener('keypress', function (event) {\n var $target = event.target\n // When the key gets pressed - check if it is enter or space\n if (event.keyCode === KEY_ENTER || event.keyCode === KEY_SPACE) {\n if ($target.nodeName.toLowerCase() === 'summary') {\n // Prevent space from scrolling the page\n // and enter from submitting a form\n event.preventDefault()\n // Click to let the click event do all the necessary action\n if ($target.click) {\n $target.click()\n } else {\n // except Safari 5.1 and under don't support .click() here\n callback(event)\n }\n }\n }\n })\n\n // Prevent keyup to prevent clicking twice in Firefox when using space key\n this.$summary.addEventListener('keyup', function (event) {\n var $target = event.target\n if (event.keyCode === KEY_SPACE) {\n if ($target.nodeName.toLowerCase() === 'summary') {\n event.preventDefault()\n }\n }\n })\n\n this.$summary.addEventListener('click', callback)\n}\n\nexport default Details\n\n/**\n * @callback polyfillHandleInputsCallback\n * @param {UIEvent} event - Keyboard or mouse event\n * @returns {void}\n */\n"],"names":[],"mappings":";;;;;;EAAA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;AACA,AAkBA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;AACA,EAAO,SAAS,gBAAgB,IAAI;EACpC,EAAE,IAAI,CAAC,GAAG,IAAI,IAAI,EAAE,CAAC,OAAO,GA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GAAE;EAC9B,OAAO;EACP,KAAK;EACL,GAAG,EAAC;;EAEJ,EAAE,IAAI,CAAC,QAAQ,CAAC,gBAAgB,CAAC,OAAO,EAAE,QAAQ,EAAC;EACnD,EAAC;AACD,AAEA;EACA;EACA;EACA;EACA;EACA,GAAG;;;;;;;;"} \ No newline at end of file +{"version":3,"file":"details.js","sources":["../../../../src/govuk/common/index.mjs","../../../../src/govuk/vendor/polyfills/Window.mjs","../../../../src/govuk/vendor/polyfills/Document.mjs","../../../../src/govuk/vendor/polyfills/Element.mjs","../../../../src/govuk/vendor/polyfills/Object/defineProperty.mjs","../../../../src/govuk/vendor/polyfills/Event.mjs","../../../../src/govuk/vendor/polyfills/Function/prototype/bind.mjs","../../../../src/govuk/components/details/details.mjs"],"sourcesContent":["/**\n * Common helpers which do not require polyfill.\n *\n * IMPORTANT: If a helper require a polyfill, please isolate it in its own module\n * so that the polyfill can be properly tree-shaken and does not burden\n * the components that do not need that helper\n *\n * @module common/index\n */\n\n/**\n * TODO: Ideally this would be a NodeList.prototype.forEach polyfill\n * This seems to fail in IE8, requires more investigation.\n * See: https://github.com/imagitama/nodelist-foreach-polyfill\n *\n * @deprecated Will be made private in v5.0\n * @template {Node} ElementType\n * @param {NodeListOf} nodes - NodeList from querySelectorAll()\n * @param {nodeListIterator} callback - Callback function to run for each node\n * @returns {void}\n */\nexport function nodeListForEach (nodes, callback) {\n if (window.NodeList.prototype.forEach) {\n return nodes.forEach(callback)\n }\n for (var i = 0; i < nodes.length; i++) {\n callback.call(window, nodes[i], i, nodes)\n }\n}\n\n/**\n * Used to generate a unique string, allows multiple instances of the component\n * without them conflicting with each other.\n * https://stackoverflow.com/a/8809472\n *\n * @deprecated Will be made private in v5.0\n * @returns {string} Unique ID\n */\nexport function generateUniqueID () {\n var d = new Date().getTime()\n if (typeof window.performance !== 'undefined' && typeof window.performance.now === 'function') {\n d += window.performance.now() // use high-precision timer if available\n }\n return 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g, function (c) {\n var r = (d + Math.random() * 16) % 16 | 0\n d = Math.floor(d / 16)\n return (c === 'x' ? r : (r & 0x3 | 0x8)).toString(16)\n })\n}\n\n/**\n * Config flattening function\n *\n * Takes any number of objects, flattens them into namespaced key-value pairs,\n * (e.g. {'i18n.showSection': 'Show section'}) and combines them together, with\n * greatest priority on the LAST item passed in.\n *\n * @deprecated Will be made private in v5.0\n * @returns {Object} A flattened object of key-value pairs.\n */\nexport function mergeConfigs (/* configObject1, configObject2, ...configObjects */) {\n /**\n * Function to take nested objects and flatten them to a dot-separated keyed\n * object. Doing this means we don't need to do any deep/recursive merging of\n * each of our objects, nor transform our dataset from a flat list into a\n * nested object.\n *\n * @param {Object} configObject - Deeply nested object\n * @returns {Object} Flattened object with dot-separated keys\n */\n var flattenObject = function (configObject) {\n // Prepare an empty return object\n /** @type {Object} */\n var flattenedObject = {}\n\n /**\n * Our flattening function, this is called recursively for each level of\n * depth in the object. At each level we prepend the previous level names to\n * the key using `prefix`.\n *\n * @param {Partial>} obj - Object to flatten\n * @param {string} [prefix] - Optional dot-separated prefix\n */\n var flattenLoop = function (obj, prefix) {\n // Loop through keys...\n for (var key in obj) {\n // Check to see if this is a prototypical key/value,\n // if it is, skip it.\n if (!Object.prototype.hasOwnProperty.call(obj, key)) {\n continue\n }\n var value = obj[key]\n var prefixedKey = prefix ? prefix + '.' + key : key\n if (typeof value === 'object') {\n // If the value is a nested object, recurse over that too\n flattenLoop(value, prefixedKey)\n } else {\n // Otherwise, add this value to our return object\n flattenedObject[prefixedKey] = value\n }\n }\n }\n\n // Kick off the recursive loop\n flattenLoop(configObject)\n return flattenedObject\n }\n\n // Start with an empty object as our base\n /** @type {Object} */\n var formattedConfigObject = {}\n\n // Loop through each of the remaining passed objects and push their keys\n // one-by-one into configObject. Any duplicate keys will override the existing\n // key with the new value.\n for (var i = 0; i < arguments.length; i++) {\n var obj = flattenObject(arguments[i])\n for (var key in obj) {\n if (Object.prototype.hasOwnProperty.call(obj, key)) {\n formattedConfigObject[key] = obj[key]\n }\n }\n }\n\n return formattedConfigObject\n}\n\n/**\n * Extracts keys starting with a particular namespace from a flattened config\n * object, removing the namespace in the process.\n *\n * @deprecated Will be made private in v5.0\n * @param {Object} configObject - The object to extract key-value pairs from.\n * @param {string} namespace - The namespace to filter keys with.\n * @returns {Object} Flattened object with dot-separated key namespace removed\n * @throws {Error} Config object required\n * @throws {Error} Namespace string required\n */\nexport function extractConfigByNamespace (configObject, namespace) {\n // Check we have what we need\n if (!configObject || typeof configObject !== 'object') {\n throw new Error('Provide a `configObject` of type \"object\".')\n }\n\n if (!namespace || typeof namespace !== 'string') {\n throw new Error('Provide a `namespace` of type \"string\" to filter the `configObject` by.')\n }\n\n /** @type {Object} */\n var newObject = {}\n\n for (var key in configObject) {\n // Split the key into parts, using . as our namespace separator\n var keyParts = key.split('.')\n // Check if the first namespace matches the configured namespace\n if (Object.prototype.hasOwnProperty.call(configObject, key) && keyParts[0] === namespace) {\n // Remove the first item (the namespace) from the parts array,\n // but only if there is more than one part (we don't want blank keys!)\n if (keyParts.length > 1) {\n keyParts.shift()\n }\n // Join the remaining parts back together\n var newKey = keyParts.join('.')\n // Add them to our new object\n newObject[newKey] = configObject[key]\n }\n }\n return newObject\n}\n\n/**\n * @template {Node} ElementType\n * @callback nodeListIterator\n * @param {ElementType} value - The current node being iterated on\n * @param {number} index - The current index in the iteration\n * @param {NodeListOf} nodes - NodeList from querySelectorAll()\n * @returns {void}\n */\n","// @ts-nocheck\n(function (undefined) {\n\n// Detection from https://github.com/Financial-Times/polyfill-service/blob/master/packages/polyfill-library/polyfills/Window/detect.js\nvar detect = ('Window' in this)\n\nif (detect) return\n\n// Polyfill from https://cdn.polyfill.io/v2/polyfill.js?features=Window&flags=always\nif ((typeof WorkerGlobalScope === \"undefined\") && (typeof importScripts !== \"function\")) {\n\t(function (global) {\n\t\tif (global.constructor) {\n\t\t\tglobal.Window = global.constructor;\n\t\t} else {\n\t\t\t(global.Window = global.constructor = new Function('return function Window() {}')()).prototype = this;\n\t\t}\n\t}(this));\n}\n\n})\n.call('object' === typeof window && window || 'object' === typeof self && self || 'object' === typeof global && global || {});\n","// @ts-nocheck\n(function (undefined) {\n\n// Detection from https://github.com/Financial-Times/polyfill-service/blob/master/packages/polyfill-library/polyfills/Document/detect.js\nvar detect = (\"Document\" in this)\n\nif (detect) return\n\n// Polyfill from https://cdn.polyfill.io/v2/polyfill.js?features=Document&flags=always\nif ((typeof WorkerGlobalScope === \"undefined\") && (typeof importScripts !== \"function\")) {\n\n\tif (this.HTMLDocument) { // IE8\n\n\t\t// HTMLDocument is an extension of Document. If the browser has HTMLDocument but not Document, the former will suffice as an alias for the latter.\n\t\tthis.Document = this.HTMLDocument;\n\n\t} else {\n\n\t\t// Create an empty function to act as the missing constructor for the document object, attach the document object as its prototype. The function needs to be anonymous else it is hoisted and causes the feature detect to prematurely pass, preventing the assignments below being made.\n\t\tthis.Document = this.HTMLDocument = document.constructor = (new Function('return function Document() {}')());\n\t\tthis.Document.prototype = document;\n\t}\n}\n\n\n})\n.call('object' === typeof window && window || 'object' === typeof self && self || 'object' === typeof global && global || {});\n","// @ts-nocheck\nimport './Document.mjs'\n\n(function(undefined) {\n\n// Detection from https://github.com/Financial-Times/polyfill-service/blob/master/packages/polyfill-library/polyfills/Element/detect.js\nvar detect = ('Element' in this && 'HTMLElement' in this)\n\nif (detect) return\n\n// Polyfill from https://cdn.polyfill.io/v2/polyfill.js?features=Element&flags=always\n(function () {\n\n\t// IE8\n\tif (window.Element && !window.HTMLElement) {\n\t\twindow.HTMLElement = window.Element;\n\t\treturn;\n\t}\n\n\t// create Element constructor\n\twindow.Element = window.HTMLElement = new Function('return function Element() {}')();\n\n\t// generate sandboxed iframe\n\tvar vbody = document.appendChild(document.createElement('body'));\n\tvar frame = vbody.appendChild(document.createElement('iframe'));\n\n\t// use sandboxed iframe to replicate Element functionality\n\tvar frameDocument = frame.contentWindow.document;\n\tvar prototype = Element.prototype = frameDocument.appendChild(frameDocument.createElement('*'));\n\tvar cache = {};\n\n\t// polyfill Element.prototype on an element\n\tvar shiv = function (element, deep) {\n\t\tvar\n\t\tchildNodes = element.childNodes || [],\n\t\tindex = -1,\n\t\tkey, value, childNode;\n\n\t\tif (element.nodeType === 1 && element.constructor !== Element) {\n\t\t\telement.constructor = Element;\n\n\t\t\tfor (key in cache) {\n\t\t\t\tvalue = cache[key];\n\t\t\t\telement[key] = value;\n\t\t\t}\n\t\t}\n\n\t\twhile (childNode = deep && childNodes[++index]) {\n\t\t\tshiv(childNode, deep);\n\t\t}\n\n\t\treturn element;\n\t};\n\n\tvar elements = document.getElementsByTagName('*');\n\tvar nativeCreateElement = document.createElement;\n\tvar interval;\n\tvar loopLimit = 100;\n\n\tprototype.attachEvent('onpropertychange', function (event) {\n\t\tvar\n\t\tpropertyName = event.propertyName,\n\t\tnonValue = !cache.hasOwnProperty(propertyName),\n\t\tnewValue = prototype[propertyName],\n\t\toldValue = cache[propertyName],\n\t\tindex = -1,\n\t\telement;\n\n\t\twhile (element = elements[++index]) {\n\t\t\tif (element.nodeType === 1) {\n\t\t\t\tif (nonValue || element[propertyName] === oldValue) {\n\t\t\t\t\telement[propertyName] = newValue;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tcache[propertyName] = newValue;\n\t});\n\n\tprototype.constructor = Element;\n\n\tif (!prototype.hasAttribute) {\n\t\t// .hasAttribute\n\t\tprototype.hasAttribute = function hasAttribute(name) {\n\t\t\treturn this.getAttribute(name) !== null;\n\t\t};\n\t}\n\n\t// Apply Element prototype to the pre-existing DOM as soon as the body element appears.\n\tfunction bodyCheck() {\n\t\tif (!(loopLimit--)) clearTimeout(interval);\n\t\tif (document.body && !document.body.prototype && /(complete|interactive)/.test(document.readyState)) {\n\t\t\tshiv(document, true);\n\t\t\tif (interval && document.body.prototype) clearTimeout(interval);\n\t\t\treturn (!!document.body.prototype);\n\t\t}\n\t\treturn false;\n\t}\n\tif (!bodyCheck()) {\n\t\tdocument.onreadystatechange = bodyCheck;\n\t\tinterval = setInterval(bodyCheck, 25);\n\t}\n\n\t// Apply to any new elements created after load\n\tdocument.createElement = function createElement(nodeName) {\n\t\tvar element = nativeCreateElement(String(nodeName).toLowerCase());\n\t\treturn shiv(element);\n\t};\n\n\t// remove sandboxed iframe\n\tdocument.removeChild(vbody);\n}());\n\n})\n.call('object' === typeof window && window || 'object' === typeof self && self || 'object' === typeof global && global || {});\n","// @ts-nocheck\n(function (undefined) {\n\n// Detection from https://github.com/Financial-Times/polyfill-service/blob/master/packages/polyfill-library/polyfills/Object/defineProperty/detect.js\nvar detect = (\n // In IE8, defineProperty could only act on DOM elements, so full support\n // for the feature requires the ability to set a property on an arbitrary object\n 'defineProperty' in Object && (function() {\n \ttry {\n \t\tvar a = {};\n \t\tObject.defineProperty(a, 'test', {value:42});\n \t\treturn true;\n \t} catch(e) {\n \t\treturn false\n \t}\n }())\n)\n\nif (detect) return\n\n// Polyfill from https://cdn.polyfill.io/v2/polyfill.js?features=Object.defineProperty&flags=always\n(function (nativeDefineProperty) {\n\n\tvar supportsAccessors = Object.prototype.hasOwnProperty('__defineGetter__');\n\tvar ERR_ACCESSORS_NOT_SUPPORTED = 'Getters & setters cannot be defined on this javascript engine';\n\tvar ERR_VALUE_ACCESSORS = 'A property cannot both have accessors and be writable or have a value';\n\n\tObject.defineProperty = function defineProperty(object, property, descriptor) {\n\n\t\t// Where native support exists, assume it\n\t\tif (nativeDefineProperty && (object === window || object === document || object === Element.prototype || object instanceof Element)) {\n\t\t\treturn nativeDefineProperty(object, property, descriptor);\n\t\t}\n\n\t\tif (object === null || !(object instanceof Object || typeof object === 'object')) {\n\t\t\tthrow new TypeError('Object.defineProperty called on non-object');\n\t\t}\n\n\t\tif (!(descriptor instanceof Object)) {\n\t\t\tthrow new TypeError('Property description must be an object');\n\t\t}\n\n\t\tvar propertyString = String(property);\n\t\tvar hasValueOrWritable = 'value' in descriptor || 'writable' in descriptor;\n\t\tvar getterType = 'get' in descriptor && typeof descriptor.get;\n\t\tvar setterType = 'set' in descriptor && typeof descriptor.set;\n\n\t\t// handle descriptor.get\n\t\tif (getterType) {\n\t\t\tif (getterType !== 'function') {\n\t\t\t\tthrow new TypeError('Getter must be a function');\n\t\t\t}\n\t\t\tif (!supportsAccessors) {\n\t\t\t\tthrow new TypeError(ERR_ACCESSORS_NOT_SUPPORTED);\n\t\t\t}\n\t\t\tif (hasValueOrWritable) {\n\t\t\t\tthrow new TypeError(ERR_VALUE_ACCESSORS);\n\t\t\t}\n\t\t\tObject.__defineGetter__.call(object, propertyString, descriptor.get);\n\t\t} else {\n\t\t\tobject[propertyString] = descriptor.value;\n\t\t}\n\n\t\t// handle descriptor.set\n\t\tif (setterType) {\n\t\t\tif (setterType !== 'function') {\n\t\t\t\tthrow new TypeError('Setter must be a function');\n\t\t\t}\n\t\t\tif (!supportsAccessors) {\n\t\t\t\tthrow new TypeError(ERR_ACCESSORS_NOT_SUPPORTED);\n\t\t\t}\n\t\t\tif (hasValueOrWritable) {\n\t\t\t\tthrow new TypeError(ERR_VALUE_ACCESSORS);\n\t\t\t}\n\t\t\tObject.__defineSetter__.call(object, propertyString, descriptor.set);\n\t\t}\n\n\t\t// OK to define value unconditionally - if a getter has been specified as well, an error would be thrown above\n\t\tif ('value' in descriptor) {\n\t\t\tobject[propertyString] = descriptor.value;\n\t\t}\n\n\t\treturn object;\n\t};\n}(Object.defineProperty));\n})\n.call('object' === typeof window && window || 'object' === typeof self && self || 'object' === typeof global && global || {});\n","// @ts-nocheck\nimport './Window.mjs'\nimport './Element.mjs'\nimport './Object/defineProperty.mjs'\n\n(function(undefined) {\n\n// Detection from https://github.com/Financial-Times/polyfill-service/blob/master/packages/polyfill-library/polyfills/Event/detect.js\nvar detect = (\n (function(global) {\n\n \tif (!('Event' in global)) return false;\n \tif (typeof global.Event === 'function') return true;\n\n \ttry {\n\n \t\t// In IE 9-11, the Event object exists but cannot be instantiated\n \t\tnew Event('click');\n \t\treturn true;\n \t} catch(e) {\n \t\treturn false;\n \t}\n }(this))\n)\n\nif (detect) return\n\n// Polyfill from https://cdn.polyfill.io/v2/polyfill.js?features=Event&flags=always\n(function () {\n\tvar unlistenableWindowEvents = {\n\t\tclick: 1,\n\t\tdblclick: 1,\n\t\tkeyup: 1,\n\t\tkeypress: 1,\n\t\tkeydown: 1,\n\t\tmousedown: 1,\n\t\tmouseup: 1,\n\t\tmousemove: 1,\n\t\tmouseover: 1,\n\t\tmouseenter: 1,\n\t\tmouseleave: 1,\n\t\tmouseout: 1,\n\t\tstorage: 1,\n\t\tstoragecommit: 1,\n\t\ttextinput: 1\n\t};\n\n\t// This polyfill depends on availability of `document` so will not run in a worker\n\t// However, we asssume there are no browsers with worker support that lack proper\n\t// support for `Event` within the worker\n\tif (typeof document === 'undefined' || typeof window === 'undefined') return;\n\n\tfunction indexOf(array, element) {\n\t\tvar\n\t\tindex = -1,\n\t\tlength = array.length;\n\n\t\twhile (++index < length) {\n\t\t\tif (index in array && array[index] === element) {\n\t\t\t\treturn index;\n\t\t\t}\n\t\t}\n\n\t\treturn -1;\n\t}\n\n\tvar existingProto = (window.Event && window.Event.prototype) || null;\n\twindow.Event = Window.prototype.Event = function Event(type, eventInitDict) {\n\t\tif (!type) {\n\t\t\tthrow new Error('Not enough arguments');\n\t\t}\n\n\t\tvar event;\n\t\t// Shortcut if browser supports createEvent\n\t\tif ('createEvent' in document) {\n\t\t\tevent = document.createEvent('Event');\n\t\t\tvar bubbles = eventInitDict && eventInitDict.bubbles !== undefined ? eventInitDict.bubbles : false;\n\t\t\tvar cancelable = eventInitDict && eventInitDict.cancelable !== undefined ? eventInitDict.cancelable : false;\n\n\t\t\tevent.initEvent(type, bubbles, cancelable);\n\n\t\t\treturn event;\n\t\t}\n\n\t\tevent = document.createEventObject();\n\n\t\tevent.type = type;\n\t\tevent.bubbles = eventInitDict && eventInitDict.bubbles !== undefined ? eventInitDict.bubbles : false;\n\t\tevent.cancelable = eventInitDict && eventInitDict.cancelable !== undefined ? eventInitDict.cancelable : false;\n\n\t\treturn event;\n\t};\n\tif (existingProto) {\n\t\tObject.defineProperty(window.Event, 'prototype', {\n\t\t\tconfigurable: false,\n\t\t\tenumerable: false,\n\t\t\twritable: true,\n\t\t\tvalue: existingProto\n\t\t});\n\t}\n\n\tif (!('createEvent' in document)) {\n\t\twindow.addEventListener = Window.prototype.addEventListener = Document.prototype.addEventListener = Element.prototype.addEventListener = function addEventListener() {\n\t\t\tvar\n\t\t\telement = this,\n\t\t\ttype = arguments[0],\n\t\t\tlistener = arguments[1];\n\n\t\t\tif (element === window && type in unlistenableWindowEvents) {\n\t\t\t\tthrow new Error('In IE8 the event: ' + type + ' is not available on the window object. Please see https://github.com/Financial-Times/polyfill-service/issues/317 for more information.');\n\t\t\t}\n\n\t\t\tif (!element._events) {\n\t\t\t\telement._events = {};\n\t\t\t}\n\n\t\t\tif (!element._events[type]) {\n\t\t\t\telement._events[type] = function (event) {\n\t\t\t\t\tvar\n\t\t\t\t\tlist = element._events[event.type].list,\n\t\t\t\t\tevents = list.slice(),\n\t\t\t\t\tindex = -1,\n\t\t\t\t\tlength = events.length,\n\t\t\t\t\teventElement;\n\n\t\t\t\t\tevent.preventDefault = function preventDefault() {\n\t\t\t\t\t\tif (event.cancelable !== false) {\n\t\t\t\t\t\t\tevent.returnValue = false;\n\t\t\t\t\t\t}\n\t\t\t\t\t};\n\n\t\t\t\t\tevent.stopPropagation = function stopPropagation() {\n\t\t\t\t\t\tevent.cancelBubble = true;\n\t\t\t\t\t};\n\n\t\t\t\t\tevent.stopImmediatePropagation = function stopImmediatePropagation() {\n\t\t\t\t\t\tevent.cancelBubble = true;\n\t\t\t\t\t\tevent.cancelImmediate = true;\n\t\t\t\t\t};\n\n\t\t\t\t\tevent.currentTarget = element;\n\t\t\t\t\tevent.relatedTarget = event.fromElement || null;\n\t\t\t\t\tevent.target = event.target || event.srcElement || element;\n\t\t\t\t\tevent.timeStamp = new Date().getTime();\n\n\t\t\t\t\tif (event.clientX) {\n\t\t\t\t\t\tevent.pageX = event.clientX + document.documentElement.scrollLeft;\n\t\t\t\t\t\tevent.pageY = event.clientY + document.documentElement.scrollTop;\n\t\t\t\t\t}\n\n\t\t\t\t\twhile (++index < length && !event.cancelImmediate) {\n\t\t\t\t\t\tif (index in events) {\n\t\t\t\t\t\t\teventElement = events[index];\n\n\t\t\t\t\t\t\tif (indexOf(list, eventElement) !== -1 && typeof eventElement === 'function') {\n\t\t\t\t\t\t\t\teventElement.call(element, event);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t};\n\n\t\t\t\telement._events[type].list = [];\n\n\t\t\t\tif (element.attachEvent) {\n\t\t\t\t\telement.attachEvent('on' + type, element._events[type]);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\telement._events[type].list.push(listener);\n\t\t};\n\n\t\twindow.removeEventListener = Window.prototype.removeEventListener = Document.prototype.removeEventListener = Element.prototype.removeEventListener = function removeEventListener() {\n\t\t\tvar\n\t\t\telement = this,\n\t\t\ttype = arguments[0],\n\t\t\tlistener = arguments[1],\n\t\t\tindex;\n\n\t\t\tif (element._events && element._events[type] && element._events[type].list) {\n\t\t\t\tindex = indexOf(element._events[type].list, listener);\n\n\t\t\t\tif (index !== -1) {\n\t\t\t\t\telement._events[type].list.splice(index, 1);\n\n\t\t\t\t\tif (!element._events[type].list.length) {\n\t\t\t\t\t\tif (element.detachEvent) {\n\t\t\t\t\t\t\telement.detachEvent('on' + type, element._events[type]);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tdelete element._events[type];\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t};\n\n\t\twindow.dispatchEvent = Window.prototype.dispatchEvent = Document.prototype.dispatchEvent = Element.prototype.dispatchEvent = function dispatchEvent(event) {\n\t\t\tif (!arguments.length) {\n\t\t\t\tthrow new Error('Not enough arguments');\n\t\t\t}\n\n\t\t\tif (!event || typeof event.type !== 'string') {\n\t\t\t\tthrow new Error('DOM Events Exception 0');\n\t\t\t}\n\n\t\t\tvar element = this, type = event.type;\n\n\t\t\ttry {\n\t\t\t\tif (!event.bubbles) {\n\t\t\t\t\tevent.cancelBubble = true;\n\n\t\t\t\t\tvar cancelBubbleEvent = function (event) {\n\t\t\t\t\t\tevent.cancelBubble = true;\n\n\t\t\t\t\t\t(element || window).detachEvent('on' + type, cancelBubbleEvent);\n\t\t\t\t\t};\n\n\t\t\t\t\tthis.attachEvent('on' + type, cancelBubbleEvent);\n\t\t\t\t}\n\n\t\t\t\tthis.fireEvent('on' + type, event);\n\t\t\t} catch (error) {\n\t\t\t\tevent.target = element;\n\n\t\t\t\tdo {\n\t\t\t\t\tevent.currentTarget = element;\n\n\t\t\t\t\tif ('_events' in element && typeof element._events[type] === 'function') {\n\t\t\t\t\t\telement._events[type].call(element, event);\n\t\t\t\t\t}\n\n\t\t\t\t\tif (typeof element['on' + type] === 'function') {\n\t\t\t\t\t\telement['on' + type].call(element, event);\n\t\t\t\t\t}\n\n\t\t\t\t\telement = element.nodeType === 9 ? element.parentWindow : element.parentNode;\n\t\t\t\t} while (element && !event.cancelBubble);\n\t\t\t}\n\n\t\t\treturn true;\n\t\t};\n\n\t\t// Add the DOMContentLoaded Event\n\t\tdocument.attachEvent('onreadystatechange', function() {\n\t\t\tif (document.readyState === 'complete') {\n\t\t\t\tdocument.dispatchEvent(new Event('DOMContentLoaded', {\n\t\t\t\t\tbubbles: true\n\t\t\t\t}));\n\t\t\t}\n\t\t});\n\t}\n}());\n\n})\n.call('object' === typeof window && window || 'object' === typeof self && self || 'object' === typeof global && global || {});\n","// @ts-nocheck\nimport '../../Object/defineProperty.mjs'\n\n(function(undefined) {\n // Detection from https://github.com/Financial-Times/polyfill-service/blob/master/packages/polyfill-library/polyfills/Function/prototype/bind/detect.js\n var detect = 'bind' in Function.prototype\n\n if (detect) return\n\n // Polyfill from https://cdn.polyfill.io/v2/polyfill.js?features=Function.prototype.bind&flags=always\n Object.defineProperty(Function.prototype, 'bind', {\n value: function bind(that) { // .length is 1\n // add necessary es5-shim utilities\n var $Array = Array;\n var $Object = Object;\n var ObjectPrototype = $Object.prototype;\n var ArrayPrototype = $Array.prototype;\n var Empty = function Empty() {};\n var to_string = ObjectPrototype.toString;\n var hasToStringTag = typeof Symbol === 'function' && typeof Symbol.toStringTag === 'symbol';\n var isCallable; /* inlined from https://npmjs.com/is-callable */ var fnToStr = Function.prototype.toString, tryFunctionObject = function tryFunctionObject(value) { try { fnToStr.call(value); return true; } catch (e) { return false; } }, fnClass = '[object Function]', genClass = '[object GeneratorFunction]'; isCallable = function isCallable(value) { if (typeof value !== 'function') { return false; } if (hasToStringTag) { return tryFunctionObject(value); } var strClass = to_string.call(value); return strClass === fnClass || strClass === genClass; };\n var array_slice = ArrayPrototype.slice;\n var array_concat = ArrayPrototype.concat;\n var array_push = ArrayPrototype.push;\n var max = Math.max;\n // /add necessary es5-shim utilities\n\n // 1. Let Target be the this value.\n var target = this;\n // 2. If IsCallable(Target) is false, throw a TypeError exception.\n if (!isCallable(target)) {\n throw new TypeError('Function.prototype.bind called on incompatible ' + target);\n }\n // 3. Let A be a new (possibly empty) internal list of all of the\n // argument values provided after thisArg (arg1, arg2 etc), in order.\n // XXX slicedArgs will stand in for \"A\" if used\n var args = array_slice.call(arguments, 1); // for normal call\n // 4. Let F be a new native ECMAScript object.\n // 11. Set the [[Prototype]] internal property of F to the standard\n // built-in Function prototype object as specified in 15.3.3.1.\n // 12. Set the [[Call]] internal property of F as described in\n // 15.3.4.5.1.\n // 13. Set the [[Construct]] internal property of F as described in\n // 15.3.4.5.2.\n // 14. Set the [[HasInstance]] internal property of F as described in\n // 15.3.4.5.3.\n var bound;\n var binder = function () {\n\n if (this instanceof bound) {\n // 15.3.4.5.2 [[Construct]]\n // When the [[Construct]] internal method of a function object,\n // F that was created using the bind function is called with a\n // list of arguments ExtraArgs, the following steps are taken:\n // 1. Let target be the value of F's [[TargetFunction]]\n // internal property.\n // 2. If target has no [[Construct]] internal method, a\n // TypeError exception is thrown.\n // 3. Let boundArgs be the value of F's [[BoundArgs]] internal\n // property.\n // 4. Let args be a new list containing the same values as the\n // list boundArgs in the same order followed by the same\n // values as the list ExtraArgs in the same order.\n // 5. Return the result of calling the [[Construct]] internal\n // method of target providing args as the arguments.\n\n var result = target.apply(\n this,\n array_concat.call(args, array_slice.call(arguments))\n );\n if ($Object(result) === result) {\n return result;\n }\n return this;\n\n } else {\n // 15.3.4.5.1 [[Call]]\n // When the [[Call]] internal method of a function object, F,\n // which was created using the bind function is called with a\n // this value and a list of arguments ExtraArgs, the following\n // steps are taken:\n // 1. Let boundArgs be the value of F's [[BoundArgs]] internal\n // property.\n // 2. Let boundThis be the value of F's [[BoundThis]] internal\n // property.\n // 3. Let target be the value of F's [[TargetFunction]] internal\n // property.\n // 4. Let args be a new list containing the same values as the\n // list boundArgs in the same order followed by the same\n // values as the list ExtraArgs in the same order.\n // 5. Return the result of calling the [[Call]] internal method\n // of target providing boundThis as the this value and\n // providing args as the arguments.\n\n // equiv: target.call(this, ...boundArgs, ...args)\n return target.apply(\n that,\n array_concat.call(args, array_slice.call(arguments))\n );\n\n }\n\n };\n\n // 15. If the [[Class]] internal property of Target is \"Function\", then\n // a. Let L be the length property of Target minus the length of A.\n // b. Set the length own property of F to either 0 or L, whichever is\n // larger.\n // 16. Else set the length own property of F to 0.\n\n var boundLength = max(0, target.length - args.length);\n\n // 17. Set the attributes of the length own property of F to the values\n // specified in 15.3.5.1.\n var boundArgs = [];\n for (var i = 0; i < boundLength; i++) {\n array_push.call(boundArgs, '$' + i);\n }\n\n // XXX Build a dynamic function with desired amount of arguments is the only\n // way to set the length property of a function.\n // In environments where Content Security Policies enabled (Chrome extensions,\n // for ex.) all use of eval or Function costructor throws an exception.\n // However in all of these environments Function.prototype.bind exists\n // and so this code will never be executed.\n bound = Function('binder', 'return function (' + boundArgs.join(',') + '){ return binder.apply(this, arguments); }')(binder);\n\n if (target.prototype) {\n Empty.prototype = target.prototype;\n bound.prototype = new Empty();\n // Clean up dangling references.\n Empty.prototype = null;\n }\n\n // TODO\n // 18. Set the [[Extensible]] internal property of F to true.\n\n // TODO\n // 19. Let thrower be the [[ThrowTypeError]] function Object (13.2.3).\n // 20. Call the [[DefineOwnProperty]] internal method of F with\n // arguments \"caller\", PropertyDescriptor {[[Get]]: thrower, [[Set]]:\n // thrower, [[Enumerable]]: false, [[Configurable]]: false}, and\n // false.\n // 21. Call the [[DefineOwnProperty]] internal method of F with\n // arguments \"arguments\", PropertyDescriptor {[[Get]]: thrower,\n // [[Set]]: thrower, [[Enumerable]]: false, [[Configurable]]: false},\n // and false.\n\n // TODO\n // NOTE Function objects created using Function.prototype.bind do not\n // have a prototype property or the [[Code]], [[FormalParameters]], and\n // [[Scope]] internal properties.\n // XXX can't delete prototype in pure-js.\n\n // 22. Return F.\n return bound;\n }\n });\n})\n.call('object' === typeof window && window || 'object' === typeof self && self || 'object' === typeof global && global || {});\n","/* eslint-disable es-x/no-function-prototype-bind -- Polyfill imported */\n\n/**\n * JavaScript 'polyfill' for HTML5's
and elements\n * and 'shim' to add accessiblity enhancements for all browsers\n *\n * http://caniuse.com/#feat=details\n */\nimport { generateUniqueID } from '../../common/index.mjs'\nimport '../../vendor/polyfills/Event.mjs' // addEventListener, event.target normalization and DOMContentLoaded\nimport '../../vendor/polyfills/Function/prototype/bind.mjs'\n\nvar KEY_ENTER = 13\nvar KEY_SPACE = 32\n\n/**\n * Details component\n *\n * @class\n * @param {Element} $module - HTML element to use for details\n */\nfunction Details ($module) {\n if (!($module instanceof HTMLElement)) {\n return this\n }\n\n /** @deprecated Will be made private in v5.0 */\n this.$module = $module\n\n /** @deprecated Will be made private in v5.0 */\n this.$summary = null\n\n /** @deprecated Will be made private in v5.0 */\n this.$content = null\n}\n\n/**\n * Initialise component\n */\nDetails.prototype.init = function () {\n // Check that required elements are present\n if (!this.$module) {\n return\n }\n\n // If there is native details support, we want to avoid running code to polyfill native behaviour.\n var hasNativeDetails = 'HTMLDetailsElement' in window &&\n this.$module instanceof HTMLDetailsElement\n\n if (!hasNativeDetails) {\n this.polyfillDetails()\n }\n}\n\n/**\n * Polyfill component in older browsers\n *\n * @deprecated Will be made private in v5.0\n */\nDetails.prototype.polyfillDetails = function () {\n var $module = this.$module\n\n // Save shortcuts to the inner summary and content elements\n var $summary = this.$summary = $module.getElementsByTagName('summary').item(0)\n var $content = this.$content = $module.getElementsByTagName('div').item(0)\n\n // If
doesn't have a and a
representing the content\n // it means the required HTML structure is not met so the script will stop\n if (!$summary || !$content) {\n return\n }\n\n // If the content doesn't have an ID, assign it one now\n // which we'll need for the summary's aria-controls assignment\n if (!$content.id) {\n $content.id = 'details-content-' + generateUniqueID()\n }\n\n // Add ARIA role=\"group\" to details\n $module.setAttribute('role', 'group')\n\n // Add role=button to summary\n $summary.setAttribute('role', 'button')\n\n // Add aria-controls\n $summary.setAttribute('aria-controls', $content.id)\n\n // Set tabIndex so the summary is keyboard accessible for non-native elements\n //\n // We have to use the camelcase `tabIndex` property as there is a bug in IE6/IE7 when we set the correct attribute lowercase:\n // See http://web.archive.org/web/20170120194036/http://www.saliences.com/browserBugs/tabIndex.html for more information.\n $summary.tabIndex = 0\n\n // Detect initial open state\n if (this.$module.hasAttribute('open')) {\n $summary.setAttribute('aria-expanded', 'true')\n } else {\n $summary.setAttribute('aria-expanded', 'false')\n $content.style.display = 'none'\n }\n\n // Bind an event to handle summary elements\n this.polyfillHandleInputs(this.polyfillSetAttributes.bind(this))\n}\n\n/**\n * Define a statechange function that updates aria-expanded and style.display\n *\n * @deprecated Will be made private in v5.0\n * @returns {boolean} Returns true\n */\nDetails.prototype.polyfillSetAttributes = function () {\n if (this.$module.hasAttribute('open')) {\n this.$module.removeAttribute('open')\n this.$summary.setAttribute('aria-expanded', 'false')\n this.$content.style.display = 'none'\n } else {\n this.$module.setAttribute('open', 'open')\n this.$summary.setAttribute('aria-expanded', 'true')\n this.$content.style.display = ''\n }\n\n return true\n}\n\n/**\n * Handle cross-modal click events\n *\n * @deprecated Will be made private in v5.0\n * @param {polyfillHandleInputsCallback} callback - function\n */\nDetails.prototype.polyfillHandleInputs = function (callback) {\n this.$summary.addEventListener('keypress', function (event) {\n var $target = event.target\n // When the key gets pressed - check if it is enter or space\n if (event.keyCode === KEY_ENTER || event.keyCode === KEY_SPACE) {\n if ($target instanceof HTMLElement && $target.nodeName.toLowerCase() === 'summary') {\n // Prevent space from scrolling the page\n // and enter from submitting a form\n event.preventDefault()\n // Click to let the click event do all the necessary action\n if ($target.click) {\n $target.click()\n } else {\n // except Safari 5.1 and under don't support .click() here\n callback(event)\n }\n }\n }\n })\n\n // Prevent keyup to prevent clicking twice in Firefox when using space key\n this.$summary.addEventListener('keyup', function (event) {\n var $target = event.target\n if (event.keyCode === KEY_SPACE) {\n if ($target instanceof HTMLElement && $target.nodeName.toLowerCase() === 'summary') {\n event.preventDefault()\n }\n }\n })\n\n this.$summary.addEventListener('click', callback)\n}\n\nexport default Details\n\n/**\n * @callback polyfillHandleInputsCallback\n * @param {UIEvent} event - Keyboard or mouse event\n * @returns {void}\n */\n"],"names":[],"mappings":";;;;;;EAAA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;AACA,AAoBA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;AACA,EAAO,SAAS,gBAAgB,IAAI;EACpC,EAAE,IAAI,CAAC,GAAG,IAAI,IAAI,EAAE,CAAC,OAAO,GAAE;EAC9B,EAAE,IAAI,OAAO,MAAM,CAAC,WAAW,KAAK,WAAW,IAAI,OAAO,MAAM,CAAC,WAAW,CAAC,GAAG,KAAK,UAAU,EAAE;EACjG,IAAI,CAAC,IAAI,MAAM,CAAC,WAAW,CAAC,GAAG,GAAE;EACjC,GAAG;EACH,EAAE,OAAO,sCAAsC,CAAC,OAAO,CAAC,OAAO,EAAE,UAAU,CAAC,EAAE;EAC9E,IAAI,IAAI,CAAC,GAAG,CAAC,CAAC,GAAG,IAAI,CAAC,MAAM,EAAE,GAAG,EAAE,IAAI,EAAE,GA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KAAK;EACL,GAAG,EAAC;;EAEJ,EAAE,IAAI,CAAC,QAAQ,CAAC,gBAAgB,CAAC,OAAO,EAAE,QAAQ,EAAC;EACnD,EAAC;AACD,AAEA;EACA;EACA;EACA;EACA;EACA,GAAG;;;;;;;;"} \ No newline at end of file diff --git a/package/govuk/components/details/fixtures.json b/package/govuk/components/details/fixtures.json index 86a1ea3fb5..d3899f35b8 100644 --- a/package/govuk/components/details/fixtures.json +++ b/package/govuk/components/details/fixtures.json @@ -100,4 +100,4 @@ "html": "
\n \n \n Expand me\n \n \n
\n Here are some more details\n
\n
" } ] -} \ No newline at end of file +} diff --git a/package/govuk/components/details/macro-options.json b/package/govuk/components/details/macro-options.json index 8d8ede9101..a103784894 100644 --- a/package/govuk/components/details/macro-options.json +++ b/package/govuk/components/details/macro-options.json @@ -53,4 +53,4 @@ "required": false, "description": "HTML attributes (for example data attributes) to add to the `
` element." } -] \ No newline at end of file +] diff --git a/package/govuk/components/error-message/fixtures.json b/package/govuk/components/error-message/fixtures.json index 4aa31512f6..29207eaea9 100644 --- a/package/govuk/components/error-message/fixtures.json +++ b/package/govuk/components/error-message/fixtures.json @@ -7,7 +7,7 @@ "text": "Error message about full name goes here" }, "hidden": false, - "html": "

\n Error: Error message about full name goes here\n

" + "html": "

\nError: Error message about full name goes here\n

" }, { "name": "translated", @@ -16,7 +16,7 @@ "html": "Gwall: Neges gwall am yr enw llawn yn mynd yma" }, "hidden": false, - "html": "

\n Gwall: Neges gwall am yr enw llawn yn mynd yma\n

" + "html": "

\nGwall: Neges gwall am yr enw llawn yn mynd yma\n

" }, { "name": "id", @@ -25,7 +25,7 @@ "text": "This is an error message" }, "hidden": true, - "html": "

\n Error: This is an error message\n

" + "html": "

\nError: This is an error message\n

" }, { "name": "classes", @@ -34,7 +34,7 @@ "text": "This is an error message" }, "hidden": true, - "html": "

\n Error: This is an error message\n

" + "html": "

\nError: This is an error message\n

" }, { "name": "html as text", @@ -42,7 +42,7 @@ "text": "Unexpected > in body" }, "hidden": true, - "html": "

\n Error: Unexpected > in body\n

" + "html": "

\nError: Unexpected > in body\n

" }, { "name": "html", @@ -50,7 +50,7 @@ "html": "Unexpected bold text in body copy" }, "hidden": true, - "html": "

\n Error: Unexpected bold text in body copy\n

" + "html": "

\nError: Unexpected bold text in body copy\n

" }, { "name": "attributes", @@ -62,7 +62,7 @@ } }, "hidden": true, - "html": "

\n Error: This is an error message\n

" + "html": "

\nError: This is an error message\n

" }, { "name": "with visually hidden text", @@ -71,7 +71,7 @@ "visuallyHiddenText": "Gwall" }, "hidden": true, - "html": "

\n Gwall: Rhowch eich enw llawn\n

" + "html": "

\nGwall: Rhowch eich enw llawn\n

" }, { "name": "visually hidden text removed", @@ -80,7 +80,7 @@ "visuallyHiddenText": "" }, "hidden": true, - "html": "

\n There is an error on line 42\n

" + "html": "

\nThere is an error on line 42\n

" } ] -} \ No newline at end of file +} diff --git a/package/govuk/components/error-message/macro-options.json b/package/govuk/components/error-message/macro-options.json index 8596eadfa0..9959fdb781 100644 --- a/package/govuk/components/error-message/macro-options.json +++ b/package/govuk/components/error-message/macro-options.json @@ -35,4 +35,4 @@ "required": false, "description": "A visually hidden prefix used before the error message. Defaults to 'Error'." } -] \ No newline at end of file +] diff --git a/package/govuk/components/error-summary/error-summary.js b/package/govuk/components/error-summary/error-summary.js index 9b188a1570..b12df1956c 100644 --- a/package/govuk/components/error-summary/error-summary.js +++ b/package/govuk/components/error-summary/error-summary.js @@ -21,6 +21,7 @@ * (e.g. {'i18n.showSection': 'Show section'}) and combines them together, with * greatest priority on the LAST item passed in. * + * @deprecated Will be made private in v5.0 * @returns {Object} A flattened object of key-value pairs. */ function mergeConfigs (/* configObject1, configObject2, ...configObjects */) { @@ -35,6 +36,7 @@ */ var flattenObject = function (configObject) { // Prepare an empty return object + /** @type {Object} */ var flattenedObject = {}; /** @@ -71,6 +73,7 @@ }; // Start with an empty object as our base + /** @type {Object} */ var formattedConfigObject = {}; // Loop through each of the remaining passed objects and push their keys @@ -89,14 +92,16 @@ } /** + * @template {Node} ElementType * @callback nodeListIterator - * @param {Element} value - The current node being iterated on + * @param {ElementType} value - The current node being iterated on * @param {number} index - The current index in the iteration - * @param {NodeListOf} nodes - NodeList from querySelectorAll() + * @param {NodeListOf} nodes - NodeList from querySelectorAll() * @returns {void} */ - (function(undefined) { + // @ts-nocheck + (function (undefined) { // Detection from https://github.com/Financial-Times/polyfill-service/blob/master/packages/polyfill-library/polyfills/Object/defineProperty/detect.js var detect = ( @@ -183,7 +188,8 @@ }) .call('object' === typeof window && window || 'object' === typeof self && self || 'object' === typeof global && global || {}); - (function(undefined) { + // @ts-nocheck + (function (undefined) { // Detection from https://github.com/Financial-Times/polyfill-service/blob/master/packages/polyfill-library/polyfills/Document/detect.js var detect = ("Document" in this); @@ -210,6 +216,8 @@ }) .call('object' === typeof window && window || 'object' === typeof self && self || 'object' === typeof global && global || {}); + // @ts-nocheck + (function(undefined) { // Detection from https://github.com/Financial-Times/polyfill-service/blob/master/packages/polyfill-library/polyfills/Element/detect.js @@ -323,6 +331,8 @@ }) .call('object' === typeof window && window || 'object' === typeof self && self || 'object' === typeof global && global || {}); + // @ts-nocheck + (function(undefined) { // Detection from https://raw.githubusercontent.com/Financial-Times/polyfill-library/13cf7c340974d128d557580b5e2dafcd1b1192d1/polyfills/Element/prototype/dataset/detect.js @@ -343,10 +353,10 @@ var element = this; var attributes = this.attributes; var map = {}; - + for (var i = 0; i < attributes.length; i++) { var attribute = attributes[i]; - + // This regex has been edited from the original polyfill, to add // support for period (.) separators in data-* attribute names. These // are allowed in the HTML spec, but were not covered by the original @@ -354,11 +364,11 @@ if (attribute && attribute.name && (/^data-\w[.\w-]*$/).test(attribute.name)) { var name = attribute.name; var value = attribute.value; - + var propName = name.substr(5).replace(/-./g, function (prop) { return prop.charAt(1).toUpperCase(); }); - + // If this browser supports __defineGetter__ and __defineSetter__, // continue using defineProperty. If not (like IE 8 and below), we use // a hacky fallback which at least gives an object in the right format @@ -382,18 +392,19 @@ } } - + return map; } }); }).call('object' === typeof window && window || 'object' === typeof self && self || 'object' === typeof global && global || {}); - (function(undefined) { + // @ts-nocheck + (function (undefined) { // Detection from https://github.com/mdn/content/blob/cf607d68522cd35ee7670782d3ee3a361eaef2e4/files/en-us/web/javascript/reference/global_objects/string/trim/index.md#polyfill var detect = ('trim' in String.prototype); - + if (detect) return // Polyfill from https://github.com/mdn/content/blob/cf607d68522cd35ee7670782d3ee3a361eaef2e4/files/en-us/web/javascript/reference/global_objects/string/trim/index.md#polyfill @@ -416,6 +427,7 @@ * Designed to be used to convert config passed via data attributes (which are * always strings) into something sensible. * + * @deprecated Will be made private in v5.0 * @param {string} value - The value to normalise * @returns {string | boolean | number | undefined} Normalised data */ @@ -436,7 +448,7 @@ // Empty / whitespace-only strings are considered finite so we need to check // the length of the trimmed string as well - if (trimmedValue.length > 0 && isFinite(trimmedValue)) { + if (trimmedValue.length > 0 && isFinite(Number(trimmedValue))) { return Number(trimmedValue) } @@ -448,10 +460,12 @@ * * Loop over an object and normalise each value using normaliseData function * + * @deprecated Will be made private in v5.0 * @param {DOMStringMap} dataset - HTML element dataset * @returns {Object} Normalised dataset */ function normaliseDataset (dataset) { + /** @type {Object} */ var out = {}; for (var key in dataset) { @@ -461,7 +475,8 @@ return out } - (function(undefined) { + // @ts-nocheck + (function (undefined) { // Detection from https://raw.githubusercontent.com/Financial-Times/polyfill-service/1f3c09b402f65bf6e393f933a15ba63f1b86ef1f/packages/polyfill-library/polyfills/Element/prototype/matches/detect.js var detect = ( @@ -485,6 +500,8 @@ }).call('object' === typeof window && window || 'object' === typeof self && self || 'object' === typeof global && global || {}); + // @ts-nocheck + (function(undefined) { // Detection from https://raw.githubusercontent.com/Financial-Times/polyfill-service/1f3c09b402f65bf6e393f933a15ba63f1b86ef1f/packages/polyfill-library/polyfills/Element/prototype/closest/detect.js @@ -508,7 +525,8 @@ }).call('object' === typeof window && window || 'object' === typeof self && self || 'object' === typeof global && global || {}); - (function(undefined) { + // @ts-nocheck + (function (undefined) { // Detection from https://github.com/Financial-Times/polyfill-service/blob/master/packages/polyfill-library/polyfills/Window/detect.js var detect = ('Window' in this); @@ -529,6 +547,8 @@ }) .call('object' === typeof window && window || 'object' === typeof self && self || 'object' === typeof global && global || {}); + // @ts-nocheck + (function(undefined) { // Detection from https://github.com/Financial-Times/polyfill-service/blob/master/packages/polyfill-library/polyfills/Event/detect.js @@ -778,6 +798,8 @@ }) .call('object' === typeof window && window || 'object' === typeof self && self || 'object' === typeof global && global || {}); + // @ts-nocheck + (function(undefined) { // Detection from https://github.com/Financial-Times/polyfill-service/blob/master/packages/polyfill-library/polyfills/Function/prototype/bind/detect.js var detect = 'bind' in Function.prototype; @@ -944,7 +966,7 @@ * Takes focus on initialisation for accessible announcement, unless disabled in configuration. * * @class - * @param {HTMLElement} $module - HTML element to use for error summary + * @param {Element} $module - HTML element to use for error summary * @param {ErrorSummaryConfig} [config] - Error summary config */ function ErrorSummary ($module, config) { @@ -955,17 +977,23 @@ // To avoid breaking further JavaScript initialisation // we need to safeguard against this so things keep // working the same now we read the elements data attributes - if (!$module) { + if (!($module instanceof HTMLElement)) { // Little safety in case code gets ported as-is // into and ES6 class constructor, where the return value matters return this } + /** @deprecated Will be made private in v5.0 */ this.$module = $module; var defaultConfig = { disableAutoFocus: false }; + + /** + * @deprecated Will be made private in v5.0 + * @type {ErrorSummaryConfig} + */ this.config = mergeConfigs( defaultConfig, config || {}, @@ -977,17 +1005,21 @@ * Initialise component */ ErrorSummary.prototype.init = function () { - var $module = this.$module; - if (!$module) { + // Check that required elements are present + if (!this.$module) { return } + var $module = this.$module; + this.setFocus(); $module.addEventListener('click', this.handleClick.bind(this)); }; /** * Focus the error summary + * + * @deprecated Will be made private in v5.0 */ ErrorSummary.prototype.setFocus = function () { var $module = this.$module; @@ -1010,6 +1042,7 @@ /** * Click event handler * + * @deprecated Will be made private in v5.0 * @param {MouseEvent} event - Click event */ ErrorSummary.prototype.handleClick = function (event) { @@ -1034,16 +1067,21 @@ * NVDA (as tested in 2018.3.2) - without this only the field type is announced * (e.g. "Edit, has autocomplete"). * + * @deprecated Will be made private in v5.0 * @param {EventTarget} $target - Event target * @returns {boolean} True if the target was able to be focussed */ ErrorSummary.prototype.focusTarget = function ($target) { // If the element that was clicked was not a link, return early - if ($target.tagName !== 'A' || $target.href === false) { + if (!($target instanceof HTMLAnchorElement)) { return false } var inputId = this.getFragmentFromUrl($target.href); + if (!inputId) { + return false + } + var $input = document.getElementById(inputId); if (!$input) { return false @@ -1069,12 +1107,13 @@ * Extract the fragment (everything after the hash) from a URL, but not including * the hash. * + * @deprecated Will be made private in v5.0 * @param {string} url - URL - * @returns {string} Fragment from URL, without the hash + * @returns {string | undefined} Fragment from URL, without the hash */ ErrorSummary.prototype.getFragmentFromUrl = function (url) { if (url.indexOf('#') === -1) { - return false + return undefined } return url.split('#').pop() @@ -1091,9 +1130,10 @@ * - The first `