diff --git a/docs/contributing/coding-standards/js.md b/docs/contributing/coding-standards/js.md index 13b1e20c90..06931b7bdf 100644 --- a/docs/contributing/coding-standards/js.md +++ b/docs/contributing/coding-standards/js.md @@ -15,6 +15,8 @@ component ```mjs /** * Component name + * + * @preserve */ export class Example { /** diff --git a/packages/govuk-frontend/src/govuk/components/accordion/accordion.mjs b/packages/govuk-frontend/src/govuk/components/accordion/accordion.mjs index 4123160d32..378cd09a77 100644 --- a/packages/govuk-frontend/src/govuk/components/accordion/accordion.mjs +++ b/packages/govuk-frontend/src/govuk/components/accordion/accordion.mjs @@ -13,6 +13,8 @@ import { I18n } from '../../i18n.mjs' * * The state of each section is saved to the DOM via the `aria-expanded` * attribute, which also provides accessibility. + * + * @preserve */ export class Accordion { /** @private */ diff --git a/packages/govuk-frontend/src/govuk/components/button/button.mjs b/packages/govuk-frontend/src/govuk/components/button/button.mjs index b1204dbfc2..45d6b88e8c 100644 --- a/packages/govuk-frontend/src/govuk/components/button/button.mjs +++ b/packages/govuk-frontend/src/govuk/components/button/button.mjs @@ -6,6 +6,8 @@ const DEBOUNCE_TIMEOUT_IN_SECONDS = 1 /** * JavaScript enhancements for the Button component + * + * @preserve */ export class Button { /** @private */ @@ -24,7 +26,6 @@ export class Button { debounceFormSubmitTimer = null /** - * * @param {Element} $module - HTML element to use for button * @param {ButtonConfig} [config] - Button config */ diff --git a/packages/govuk-frontend/src/govuk/components/character-count/character-count.mjs b/packages/govuk-frontend/src/govuk/components/character-count/character-count.mjs index 3e4b46c4f5..f3b0e3f854 100644 --- a/packages/govuk-frontend/src/govuk/components/character-count/character-count.mjs +++ b/packages/govuk-frontend/src/govuk/components/character-count/character-count.mjs @@ -12,6 +12,8 @@ import { I18n } from '../../i18n.mjs' * * You can configure the message to only appear after a certain percentage * of the available characters/words has been entered. + * + * @preserve */ export class CharacterCount { /** @private */ diff --git a/packages/govuk-frontend/src/govuk/components/checkboxes/checkboxes.mjs b/packages/govuk-frontend/src/govuk/components/checkboxes/checkboxes.mjs index 2ceb333905..4b9210995b 100644 --- a/packages/govuk-frontend/src/govuk/components/checkboxes/checkboxes.mjs +++ b/packages/govuk-frontend/src/govuk/components/checkboxes/checkboxes.mjs @@ -1,5 +1,7 @@ /** * Checkboxes component + * + * @preserve */ export class Checkboxes { /** @private */ diff --git a/packages/govuk-frontend/src/govuk/components/error-summary/error-summary.mjs b/packages/govuk-frontend/src/govuk/components/error-summary/error-summary.mjs index db034725e7..250e1ad639 100644 --- a/packages/govuk-frontend/src/govuk/components/error-summary/error-summary.mjs +++ b/packages/govuk-frontend/src/govuk/components/error-summary/error-summary.mjs @@ -5,6 +5,8 @@ import { normaliseDataset } from '../../common/normalise-dataset.mjs' * Error summary component * * Takes focus on initialisation for accessible announcement, unless disabled in configuration. + * + * @preserve */ export class ErrorSummary { /** @private */ @@ -17,7 +19,6 @@ export class ErrorSummary { config /** - * * @param {Element} $module - HTML element to use for error summary * @param {ErrorSummaryConfig} [config] - Error summary config */ diff --git a/packages/govuk-frontend/src/govuk/components/exit-this-page/exit-this-page.mjs b/packages/govuk-frontend/src/govuk/components/exit-this-page/exit-this-page.mjs index 09e25ab51a..79771ce3d9 100644 --- a/packages/govuk-frontend/src/govuk/components/exit-this-page/exit-this-page.mjs +++ b/packages/govuk-frontend/src/govuk/components/exit-this-page/exit-this-page.mjs @@ -4,6 +4,8 @@ import { I18n } from '../../i18n.mjs' /** * Exit This Page component + * + * @preserve */ export class ExitThisPage { /** @private */ diff --git a/packages/govuk-frontend/src/govuk/components/header/header.mjs b/packages/govuk-frontend/src/govuk/components/header/header.mjs index 13d692ad48..8d667192ca 100644 --- a/packages/govuk-frontend/src/govuk/components/header/header.mjs +++ b/packages/govuk-frontend/src/govuk/components/header/header.mjs @@ -1,5 +1,7 @@ /** * Header component + * + * @preserve */ export class Header { /** @private */ diff --git a/packages/govuk-frontend/src/govuk/components/notification-banner/notification-banner.mjs b/packages/govuk-frontend/src/govuk/components/notification-banner/notification-banner.mjs index bfd1bca269..67d192fbf4 100644 --- a/packages/govuk-frontend/src/govuk/components/notification-banner/notification-banner.mjs +++ b/packages/govuk-frontend/src/govuk/components/notification-banner/notification-banner.mjs @@ -3,6 +3,8 @@ import { normaliseDataset } from '../../common/normalise-dataset.mjs' /** * Notification Banner component + * + * @preserve */ export class NotificationBanner { /** @private */ diff --git a/packages/govuk-frontend/src/govuk/components/radios/radios.mjs b/packages/govuk-frontend/src/govuk/components/radios/radios.mjs index aaccf0dced..95bbb9d417 100644 --- a/packages/govuk-frontend/src/govuk/components/radios/radios.mjs +++ b/packages/govuk-frontend/src/govuk/components/radios/radios.mjs @@ -1,5 +1,7 @@ /** * Radios component + * + * @preserve */ export class Radios { /** @private */ diff --git a/packages/govuk-frontend/src/govuk/components/skip-link/skip-link.mjs b/packages/govuk-frontend/src/govuk/components/skip-link/skip-link.mjs index 45466f757b..da3a3e3c4c 100644 --- a/packages/govuk-frontend/src/govuk/components/skip-link/skip-link.mjs +++ b/packages/govuk-frontend/src/govuk/components/skip-link/skip-link.mjs @@ -1,5 +1,7 @@ /** * Skip link component + * + * @preserve */ export class SkipLink { /** @private */ @@ -15,7 +17,6 @@ export class SkipLink { linkedElementListener = false /** - * * @param {Element} $module - HTML element to use for skip link */ constructor($module) { diff --git a/packages/govuk-frontend/src/govuk/components/tabs/tabs.mjs b/packages/govuk-frontend/src/govuk/components/tabs/tabs.mjs index 54e1295e5f..75c4b8225e 100644 --- a/packages/govuk-frontend/src/govuk/components/tabs/tabs.mjs +++ b/packages/govuk-frontend/src/govuk/components/tabs/tabs.mjs @@ -1,5 +1,7 @@ /** * Tabs component + * + * @preserve */ export class Tabs { /** @private */