Skip to content

Commit

Permalink
Release v4.5.0
Browse files Browse the repository at this point in the history
  • Loading branch information
owenatgov committed Jan 31, 2023
1 parent 86b8b25 commit 5bc602a
Show file tree
Hide file tree
Showing 109 changed files with 21,689 additions and 20,241 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# Changelog

## Unreleased

## 4.5.0 (Feature release)

### New features
Expand Down
2 changes: 1 addition & 1 deletion dist/VERSION.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
4.4.0
4.5.0
3 changes: 0 additions & 3 deletions dist/govuk-frontend-4.4.0.min.css

This file was deleted.

1 change: 0 additions & 1 deletion dist/govuk-frontend-4.4.0.min.js

This file was deleted.

4 changes: 4 additions & 0 deletions dist/govuk-frontend-4.5.0.min.css

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions dist/govuk-frontend-4.5.0.min.css.map

Large diffs are not rendered by default.

2 changes: 2 additions & 0 deletions dist/govuk-frontend-4.5.0.min.js

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions dist/govuk-frontend-4.5.0.min.js.map

Large diffs are not rendered by default.

1 change: 0 additions & 1 deletion dist/govuk-frontend-ie8-4.4.0.min.css

This file was deleted.

2 changes: 2 additions & 0 deletions dist/govuk-frontend-ie8-4.5.0.min.css

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions dist/govuk-frontend-ie8-4.5.0.min.css.map

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions package/govuk-esm/all.mjs
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
import { nodeListForEach } from './common/index.mjs'
import Accordion from './components/accordion/accordion.mjs'
import Button from './components/button/button.mjs'
import Details from './components/details/details.mjs'
import CharacterCount from './components/character-count/character-count.mjs'
import Checkboxes from './components/checkboxes/checkboxes.mjs'
import Details from './components/details/details.mjs'
import ErrorSummary from './components/error-summary/error-summary.mjs'
import NotificationBanner from './components/notification-banner/notification-banner.mjs'
import Header from './components/header/header.mjs'
import NotificationBanner from './components/notification-banner/notification-banner.mjs'
import Radios from './components/radios/radios.mjs'
import SkipLink from './components/skip-link/skip-link.mjs'
import Tabs from './components/tabs/tabs.mjs'
Expand Down
27 changes: 17 additions & 10 deletions package/govuk-esm/common/index.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
*
* @param {NodeListOf<Element>} nodes - NodeList from querySelectorAll()
* @param {nodeListIterator} callback - Callback function to run for each node
* @returns {undefined}
* @returns {void}
*/
export function nodeListForEach (nodes, callback) {
if (window.NodeList.prototype.forEach) {
Expand Down Expand Up @@ -52,7 +52,7 @@ export function generateUniqueID () {
* (e.g. {'i18n.showSection': 'Show section'}) and combines them together, with
* greatest priority on the LAST item passed in.
*
* @returns {object} A flattened object of key-value pairs.
* @returns {Object<string, unknown>} A flattened object of key-value pairs.
*/
export function mergeConfigs (/* configObject1, configObject2, ...configObjects */) {
/**
Expand All @@ -61,16 +61,21 @@ export function mergeConfigs (/* configObject1, configObject2, ...configObjects
* each of our objects, nor transform our dataset from a flat list into a
* nested object.
*
* @param {object} configObject - Deeply nested object
* @returns {object} Flattened object with dot-separated keys
* @param {Object<string, unknown>} configObject - Deeply nested object
* @returns {Object<string, unknown>} Flattened object with dot-separated keys
*/
var flattenObject = function (configObject) {
// Prepare an empty return object
var flattenedObject = {}

// Our flattening function, this is called recursively for each level of
// depth in the object. At each level we prepend the previous level names to
// the key using `prefix`.
/**
* Our flattening function, this is called recursively for each level of
* depth in the object. At each level we prepend the previous level names to
* the key using `prefix`.
*
* @param {Partial<Object<string, unknown>>} obj - Object to flatten
* @param {string} [prefix] - Optional dot-separated prefix
*/
var flattenLoop = function (obj, prefix) {
// Loop through keys...
for (var key in obj) {
Expand Down Expand Up @@ -118,9 +123,11 @@ export function mergeConfigs (/* configObject1, configObject2, ...configObjects
* Extracts keys starting with a particular namespace from a flattened config
* object, removing the namespace in the process.
*
* @param {object} configObject - The object to extract key-value pairs from.
* @param {Object<string, unknown>} configObject - The object to extract key-value pairs from.
* @param {string} namespace - The namespace to filter keys with.
* @returns {object} Flattened object with dot-separated key namespace removed
* @returns {Object<string, unknown>} Flattened object with dot-separated key namespace removed
* @throws {Error} Config object required
* @throws {Error} Namespace string required
*/
export function extractConfigByNamespace (configObject, namespace) {
// Check we have what we need
Expand Down Expand Up @@ -155,5 +162,5 @@ export function extractConfigByNamespace (configObject, namespace) {
* @param {Element} value - The current node being iterated on
* @param {number} index - The current index in the iteration
* @param {NodeListOf<Element>} nodes - NodeList from querySelectorAll()
* @returns {undefined}
* @returns {void}
*/
4 changes: 3 additions & 1 deletion package/govuk-esm/common/normalise-dataset.mjs
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
/* eslint-disable es-x/no-string-prototype-trim -- Polyfill imported */

import '../vendor/polyfills/Element/prototype/dataset.mjs'
import '../vendor/polyfills/String/prototype/trim.mjs'

Expand Down Expand Up @@ -45,7 +47,7 @@ export function normaliseString (value) {
* Loop over an object and normalise each value using normaliseData function
*
* @param {DOMStringMap} dataset - HTML element dataset
* @returns {Object<string, string | boolean | number | undefined>} Normalised dataset
* @returns {Object<string, unknown>} Normalised dataset
*/
export function normaliseDataset (dataset) {
var out = {}
Expand Down

0 comments on commit 5bc602a

Please sign in to comment.