govuk_publishing_components 34.7.0 → 34.8.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (118) hide show
  1. checksums.yaml +4 -4
  2. data/app/assets/javascripts/govuk_publishing_components/analytics-ga4/ga4-event-tracker.js +3 -10
  3. data/app/assets/javascripts/govuk_publishing_components/analytics-ga4/ga4-form-tracker.js +113 -0
  4. data/app/assets/javascripts/govuk_publishing_components/analytics-ga4/ga4-link-tracker.js +2 -11
  5. data/app/assets/javascripts/govuk_publishing_components/analytics-ga4/ga4-schemas.js +15 -1
  6. data/app/assets/javascripts/govuk_publishing_components/analytics-ga4/ga4-specialist-link-tracker.js +20 -29
  7. data/app/assets/javascripts/govuk_publishing_components/analytics-ga4.js +1 -0
  8. data/app/models/govuk_publishing_components/component_doc.rb +14 -0
  9. data/app/models/govuk_publishing_components/component_wrapper_helper_options.rb +14 -0
  10. data/app/views/govuk_publishing_components/component_guide/show.html.erb +21 -6
  11. data/app/views/govuk_publishing_components/components/_action_link.html.erb +5 -2
  12. data/app/views/govuk_publishing_components/components/_breadcrumbs.html.erb +6 -2
  13. data/app/views/govuk_publishing_components/components/_details.html.erb +3 -1
  14. data/app/views/govuk_publishing_components/components/docs/action_link.yml +1 -0
  15. data/app/views/govuk_publishing_components/components/docs/breadcrumbs.yml +1 -0
  16. data/app/views/govuk_publishing_components/components/docs/details.yml +17 -0
  17. data/lib/govuk_publishing_components/presenters/component_wrapper_helper.rb +78 -0
  18. data/lib/govuk_publishing_components/presenters/related_navigation_helper.rb +0 -7
  19. data/lib/govuk_publishing_components/version.rb +1 -1
  20. data/lib/govuk_publishing_components.rb +1 -0
  21. data/node_modules/govuk-frontend/govuk/all.js +4029 -3792
  22. data/node_modules/govuk-frontend/govuk/all.js.map +1 -0
  23. data/node_modules/govuk-frontend/govuk/common/closest-attribute-value.js +52 -51
  24. data/node_modules/govuk-frontend/govuk/common/closest-attribute-value.js.map +1 -0
  25. data/node_modules/govuk-frontend/govuk/common/index.js +153 -145
  26. data/node_modules/govuk-frontend/govuk/common/index.js.map +1 -0
  27. data/node_modules/govuk-frontend/govuk/common/normalise-dataset.js +324 -321
  28. data/node_modules/govuk-frontend/govuk/common/normalise-dataset.js.map +1 -0
  29. data/node_modules/govuk-frontend/govuk/common.js +154 -146
  30. data/node_modules/govuk-frontend/govuk/common.js.map +1 -0
  31. data/node_modules/govuk-frontend/govuk/components/_all.scss +1 -1
  32. data/node_modules/govuk-frontend/govuk/components/accordion/_index.scss +23 -4
  33. data/node_modules/govuk-frontend/govuk/components/accordion/accordion.js +2059 -1654
  34. data/node_modules/govuk-frontend/govuk/components/accordion/accordion.js.map +1 -0
  35. data/node_modules/govuk-frontend/govuk/components/accordion/fixtures.json +11 -11
  36. data/node_modules/govuk-frontend/govuk/components/accordion/template.njk +1 -1
  37. data/node_modules/govuk-frontend/govuk/components/back-link/_index.scss +19 -19
  38. data/node_modules/govuk-frontend/govuk/components/breadcrumbs/_index.scss +21 -10
  39. data/node_modules/govuk-frontend/govuk/components/button/button.js +927 -917
  40. data/node_modules/govuk-frontend/govuk/components/button/button.js.map +1 -0
  41. data/node_modules/govuk-frontend/govuk/components/character-count/character-count.js +2050 -2040
  42. data/node_modules/govuk-frontend/govuk/components/character-count/character-count.js.map +1 -0
  43. data/node_modules/govuk-frontend/govuk/components/checkboxes/checkboxes.js +1155 -1147
  44. data/node_modules/govuk-frontend/govuk/components/checkboxes/checkboxes.js.map +1 -0
  45. data/node_modules/govuk-frontend/govuk/components/cookie-banner/fixtures.json +23 -23
  46. data/node_modules/govuk-frontend/govuk/components/cookie-banner/template.njk +1 -1
  47. data/node_modules/govuk-frontend/govuk/components/details/details.js +800 -799
  48. data/node_modules/govuk-frontend/govuk/components/details/details.js.map +1 -0
  49. data/node_modules/govuk-frontend/govuk/components/error-summary/error-summary.js +1058 -1045
  50. data/node_modules/govuk-frontend/govuk/components/error-summary/error-summary.js.map +1 -0
  51. data/node_modules/govuk-frontend/govuk/components/header/_index.scss +6 -0
  52. data/node_modules/govuk-frontend/govuk/components/header/header.js +646 -998
  53. data/node_modules/govuk-frontend/govuk/components/header/header.js.map +1 -0
  54. data/node_modules/govuk-frontend/govuk/components/notification-banner/notification-banner.js +760 -752
  55. data/node_modules/govuk-frontend/govuk/components/notification-banner/notification-banner.js.map +1 -0
  56. data/node_modules/govuk-frontend/govuk/components/pagination/fixtures.json +61 -0
  57. data/node_modules/govuk-frontend/govuk/components/pagination/template.njk +1 -1
  58. data/node_modules/govuk-frontend/govuk/components/phase-banner/macro-options.json +1 -1
  59. data/node_modules/govuk-frontend/govuk/components/radios/radios.js +1110 -1107
  60. data/node_modules/govuk-frontend/govuk/components/radios/radios.js.map +1 -0
  61. data/node_modules/govuk-frontend/govuk/components/skip-link/skip-link.js +1017 -1014
  62. data/node_modules/govuk-frontend/govuk/components/skip-link/skip-link.js.map +1 -0
  63. data/node_modules/govuk-frontend/govuk/components/summary-list/_index.scss +107 -0
  64. data/node_modules/govuk-frontend/govuk/components/summary-list/fixtures.json +318 -23
  65. data/node_modules/govuk-frontend/govuk/components/summary-list/macro-options.json +110 -0
  66. data/node_modules/govuk-frontend/govuk/components/summary-list/template.njk +72 -28
  67. data/node_modules/govuk-frontend/govuk/components/tabs/tabs.js +1392 -1264
  68. data/node_modules/govuk-frontend/govuk/components/tabs/tabs.js.map +1 -0
  69. data/node_modules/govuk-frontend/govuk/i18n.js +363 -364
  70. data/node_modules/govuk-frontend/govuk/i18n.js.map +1 -0
  71. data/node_modules/govuk-frontend/govuk/settings/_measurements.scss +5 -5
  72. data/node_modules/govuk-frontend/govuk/vendor/polyfills/DOMTokenList.js +242 -241
  73. data/node_modules/govuk-frontend/govuk/vendor/polyfills/DOMTokenList.js.map +1 -0
  74. data/node_modules/govuk-frontend/govuk/vendor/polyfills/Date/now.js +13 -12
  75. data/node_modules/govuk-frontend/govuk/vendor/polyfills/Date/now.js.map +1 -0
  76. data/node_modules/govuk-frontend/govuk/vendor/polyfills/Document.js +17 -16
  77. data/node_modules/govuk-frontend/govuk/vendor/polyfills/Document.js.map +1 -0
  78. data/node_modules/govuk-frontend/govuk/vendor/polyfills/Element/prototype/classList.js +547 -546
  79. data/node_modules/govuk-frontend/govuk/vendor/polyfills/Element/prototype/classList.js.map +1 -0
  80. data/node_modules/govuk-frontend/govuk/vendor/polyfills/Element/prototype/closest.js +37 -36
  81. data/node_modules/govuk-frontend/govuk/vendor/polyfills/Element/prototype/closest.js.map +1 -0
  82. data/node_modules/govuk-frontend/govuk/vendor/polyfills/Element/prototype/dataset.js +251 -250
  83. data/node_modules/govuk-frontend/govuk/vendor/polyfills/Element/prototype/dataset.js.map +1 -0
  84. data/node_modules/govuk-frontend/govuk/vendor/polyfills/Element/prototype/matches.js +21 -20
  85. data/node_modules/govuk-frontend/govuk/vendor/polyfills/Element/prototype/matches.js.map +1 -0
  86. data/node_modules/govuk-frontend/govuk/vendor/polyfills/Element/prototype/nextElementSibling.js +198 -197
  87. data/node_modules/govuk-frontend/govuk/vendor/polyfills/Element/prototype/nextElementSibling.js.map +1 -0
  88. data/node_modules/govuk-frontend/govuk/vendor/polyfills/Element/prototype/previousElementSibling.js +198 -197
  89. data/node_modules/govuk-frontend/govuk/vendor/polyfills/Element/prototype/previousElementSibling.js.map +1 -0
  90. data/node_modules/govuk-frontend/govuk/vendor/polyfills/Element.js +106 -105
  91. data/node_modules/govuk-frontend/govuk/vendor/polyfills/Element.js.map +1 -0
  92. data/node_modules/govuk-frontend/govuk/vendor/polyfills/Event.js +400 -399
  93. data/node_modules/govuk-frontend/govuk/vendor/polyfills/Event.js.map +1 -0
  94. data/node_modules/govuk-frontend/govuk/vendor/polyfills/Function/prototype/bind.js +239 -238
  95. data/node_modules/govuk-frontend/govuk/vendor/polyfills/Function/prototype/bind.js.map +1 -0
  96. data/node_modules/govuk-frontend/govuk/vendor/polyfills/Object/defineProperty.js +72 -71
  97. data/node_modules/govuk-frontend/govuk/vendor/polyfills/Object/defineProperty.js.map +1 -0
  98. data/node_modules/govuk-frontend/govuk/vendor/polyfills/String/prototype/trim.js +14 -13
  99. data/node_modules/govuk-frontend/govuk/vendor/polyfills/String/prototype/trim.js.map +1 -0
  100. data/node_modules/govuk-frontend/govuk/vendor/polyfills/Window.js +17 -16
  101. data/node_modules/govuk-frontend/govuk/vendor/polyfills/Window.js.map +1 -0
  102. data/node_modules/govuk-frontend/govuk-esm/all.mjs +2 -2
  103. data/node_modules/govuk-frontend/govuk-esm/common/index.mjs +17 -10
  104. data/node_modules/govuk-frontend/govuk-esm/common/normalise-dataset.mjs +3 -1
  105. data/node_modules/govuk-frontend/govuk-esm/components/accordion/accordion.mjs +135 -52
  106. data/node_modules/govuk-frontend/govuk-esm/components/button/button.mjs +11 -9
  107. data/node_modules/govuk-frontend/govuk-esm/components/character-count/character-count.mjs +10 -7
  108. data/node_modules/govuk-frontend/govuk-esm/components/checkboxes/checkboxes.mjs +24 -18
  109. data/node_modules/govuk-frontend/govuk-esm/components/details/details.mjs +23 -16
  110. data/node_modules/govuk-frontend/govuk-esm/components/error-summary/error-summary.mjs +15 -11
  111. data/node_modules/govuk-frontend/govuk-esm/components/header/header.mjs +3 -2
  112. data/node_modules/govuk-frontend/govuk-esm/components/notification-banner/notification-banner.mjs +3 -4
  113. data/node_modules/govuk-frontend/govuk-esm/components/radios/radios.mjs +10 -9
  114. data/node_modules/govuk-frontend/govuk-esm/components/skip-link/skip-link.mjs +5 -3
  115. data/node_modules/govuk-frontend/govuk-esm/components/tabs/tabs.mjs +165 -38
  116. data/node_modules/govuk-frontend/govuk-esm/i18n.mjs +9 -11
  117. data/node_modules/govuk-frontend/package.json +1 -1
  118. metadata +37 -2
@@ -1,70 +1,71 @@
1
1
  (function (global, factory) {
2
- typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports) :
3
- typeof define === 'function' && define.amd ? define('GOVUKFrontend', ['exports'], factory) :
4
- (factory((global.GOVUKFrontend = {})));
2
+ typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports) :
3
+ typeof define === 'function' && define.amd ? define('GOVUKFrontend', ['exports'], factory) :
4
+ (factory((global.GOVUKFrontend = {})));
5
5
  }(this, (function (exports) { 'use strict';
6
6
 
7
- (function(undefined) {
7
+ (function(undefined) {
8
8
 
9
- // Detection from https://raw.githubusercontent.com/Financial-Times/polyfill-service/1f3c09b402f65bf6e393f933a15ba63f1b86ef1f/packages/polyfill-library/polyfills/Element/prototype/matches/detect.js
10
- var detect = (
11
- 'document' in this && "matches" in document.documentElement
12
- );
9
+ // Detection from https://raw.githubusercontent.com/Financial-Times/polyfill-service/1f3c09b402f65bf6e393f933a15ba63f1b86ef1f/packages/polyfill-library/polyfills/Element/prototype/matches/detect.js
10
+ var detect = (
11
+ 'document' in this && "matches" in document.documentElement
12
+ );
13
13
 
14
- if (detect) return
14
+ if (detect) return
15
15
 
16
- // Polyfill from https://raw.githubusercontent.com/Financial-Times/polyfill-service/1f3c09b402f65bf6e393f933a15ba63f1b86ef1f/packages/polyfill-library/polyfills/Element/prototype/matches/polyfill.js
17
- Element.prototype.matches = Element.prototype.webkitMatchesSelector || Element.prototype.oMatchesSelector || Element.prototype.msMatchesSelector || Element.prototype.mozMatchesSelector || function matches(selector) {
18
- var element = this;
19
- var elements = (element.document || element.ownerDocument).querySelectorAll(selector);
20
- var index = 0;
16
+ // Polyfill from https://raw.githubusercontent.com/Financial-Times/polyfill-service/1f3c09b402f65bf6e393f933a15ba63f1b86ef1f/packages/polyfill-library/polyfills/Element/prototype/matches/polyfill.js
17
+ Element.prototype.matches = Element.prototype.webkitMatchesSelector || Element.prototype.oMatchesSelector || Element.prototype.msMatchesSelector || Element.prototype.mozMatchesSelector || function matches(selector) {
18
+ var element = this;
19
+ var elements = (element.document || element.ownerDocument).querySelectorAll(selector);
20
+ var index = 0;
21
21
 
22
- while (elements[index] && elements[index] !== element) {
23
- ++index;
24
- }
22
+ while (elements[index] && elements[index] !== element) {
23
+ ++index;
24
+ }
25
25
 
26
- return !!elements[index];
27
- };
26
+ return !!elements[index];
27
+ };
28
28
 
29
- }).call('object' === typeof window && window || 'object' === typeof self && self || 'object' === typeof global && global || {});
29
+ }).call('object' === typeof window && window || 'object' === typeof self && self || 'object' === typeof global && global || {});
30
30
 
31
- (function(undefined) {
31
+ (function(undefined) {
32
32
 
33
- // Detection from https://raw.githubusercontent.com/Financial-Times/polyfill-service/1f3c09b402f65bf6e393f933a15ba63f1b86ef1f/packages/polyfill-library/polyfills/Element/prototype/closest/detect.js
34
- var detect = (
35
- 'document' in this && "closest" in document.documentElement
36
- );
33
+ // Detection from https://raw.githubusercontent.com/Financial-Times/polyfill-service/1f3c09b402f65bf6e393f933a15ba63f1b86ef1f/packages/polyfill-library/polyfills/Element/prototype/closest/detect.js
34
+ var detect = (
35
+ 'document' in this && "closest" in document.documentElement
36
+ );
37
37
 
38
- if (detect) return
38
+ if (detect) return
39
39
 
40
- // Polyfill from https://raw.githubusercontent.com/Financial-Times/polyfill-service/1f3c09b402f65bf6e393f933a15ba63f1b86ef1f/packages/polyfill-library/polyfills/Element/prototype/closest/polyfill.js
41
- Element.prototype.closest = function closest(selector) {
42
- var node = this;
40
+ // Polyfill from https://raw.githubusercontent.com/Financial-Times/polyfill-service/1f3c09b402f65bf6e393f933a15ba63f1b86ef1f/packages/polyfill-library/polyfills/Element/prototype/closest/polyfill.js
41
+ Element.prototype.closest = function closest(selector) {
42
+ var node = this;
43
43
 
44
- while (node) {
45
- if (node.matches(selector)) return node;
46
- else node = 'SVGElement' in window && node instanceof SVGElement ? node.parentNode : node.parentElement;
47
- }
44
+ while (node) {
45
+ if (node.matches(selector)) return node;
46
+ else node = 'SVGElement' in window && node instanceof SVGElement ? node.parentNode : node.parentElement;
47
+ }
48
+
49
+ return null;
50
+ };
48
51
 
49
- return null;
50
- };
51
-
52
- }).call('object' === typeof window && window || 'object' === typeof self && self || 'object' === typeof global && global || {});
53
-
54
- /**
55
- * Returns the value of the given attribute closest to the given element (including itself)
56
- *
57
- * @param {HTMLElement} $element - The element to start walking the DOM tree up
58
- * @param {string} attributeName - The name of the attribute
59
- * @returns {string | undefined} Attribute value
60
- */
61
- function closestAttributeValue ($element, attributeName) {
62
- var closestElementWithAttribute = $element.closest('[' + attributeName + ']');
63
- if (closestElementWithAttribute) {
64
- return closestElementWithAttribute.getAttribute(attributeName)
52
+ }).call('object' === typeof window && window || 'object' === typeof self && self || 'object' === typeof global && global || {});
53
+
54
+ /**
55
+ * Returns the value of the given attribute closest to the given element (including itself)
56
+ *
57
+ * @param {HTMLElement} $element - The element to start walking the DOM tree up
58
+ * @param {string} attributeName - The name of the attribute
59
+ * @returns {string | undefined} Attribute value
60
+ */
61
+ function closestAttributeValue ($element, attributeName) {
62
+ var closestElementWithAttribute = $element.closest('[' + attributeName + ']');
63
+ if (closestElementWithAttribute) {
64
+ return closestElementWithAttribute.getAttribute(attributeName)
65
+ }
65
66
  }
66
- }
67
67
 
68
- exports.closestAttributeValue = closestAttributeValue;
68
+ exports.closestAttributeValue = closestAttributeValue;
69
69
 
70
70
  })));
71
+ //# sourceMappingURL=closest-attribute-value.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"closest-attribute-value.js","sources":["../../../src/govuk/vendor/polyfills/Element/prototype/matches.mjs","../../../src/govuk/vendor/polyfills/Element/prototype/closest.mjs","../../../src/govuk/common/closest-attribute-value.mjs"],"sourcesContent":["(function(undefined) {\n\n // Detection from https://raw.githubusercontent.com/Financial-Times/polyfill-service/1f3c09b402f65bf6e393f933a15ba63f1b86ef1f/packages/polyfill-library/polyfills/Element/prototype/matches/detect.js\n var detect = (\n 'document' in this && \"matches\" in document.documentElement\n )\n\n if (detect) return\n\n // Polyfill from https://raw.githubusercontent.com/Financial-Times/polyfill-service/1f3c09b402f65bf6e393f933a15ba63f1b86ef1f/packages/polyfill-library/polyfills/Element/prototype/matches/polyfill.js\n Element.prototype.matches = Element.prototype.webkitMatchesSelector || Element.prototype.oMatchesSelector || Element.prototype.msMatchesSelector || Element.prototype.mozMatchesSelector || function matches(selector) {\n var element = this;\n var elements = (element.document || element.ownerDocument).querySelectorAll(selector);\n var index = 0;\n\n while (elements[index] && elements[index] !== element) {\n ++index;\n }\n\n return !!elements[index];\n };\n\n}).call('object' === typeof window && window || 'object' === typeof self && self || 'object' === typeof global && global || {});\n","import './matches.mjs'\n\n(function(undefined) {\n\n // Detection from https://raw.githubusercontent.com/Financial-Times/polyfill-service/1f3c09b402f65bf6e393f933a15ba63f1b86ef1f/packages/polyfill-library/polyfills/Element/prototype/closest/detect.js\n var detect = (\n 'document' in this && \"closest\" in document.documentElement\n )\n\n if (detect) return\n\n // Polyfill from https://raw.githubusercontent.com/Financial-Times/polyfill-service/1f3c09b402f65bf6e393f933a15ba63f1b86ef1f/packages/polyfill-library/polyfills/Element/prototype/closest/polyfill.js\n Element.prototype.closest = function closest(selector) {\n var node = this;\n\n while (node) {\n if (node.matches(selector)) return node;\n else node = 'SVGElement' in window && node instanceof SVGElement ? node.parentNode : node.parentElement;\n }\n\n return null;\n };\n\n}).call('object' === typeof window && window || 'object' === typeof self && self || 'object' === typeof global && global || {});\n","import '../vendor/polyfills/Element/prototype/closest.mjs'\n\n/**\n * Returns the value of the given attribute closest to the given element (including itself)\n *\n * @param {HTMLElement} $element - The element to start walking the DOM tree up\n * @param {string} attributeName - The name of the attribute\n * @returns {string | undefined} Attribute value\n */\nexport function closestAttributeValue ($element, attributeName) {\n var closestElementWithAttribute = $element.closest('[' + attributeName + ']')\n if (closestElementWithAttribute) {\n return closestElementWithAttribute.getAttribute(attributeName)\n }\n}\n"],"names":[],"mappings":";;;;;;EAAA,CAAC,SAAS,SAAS,EAAE;;EAErB;EACA,EAAE,IAAI,MAAM;EACZ,IAAI,UAAU,IAAI,IAAI,IAAI,SAAS,IAAI,QAAQ,CAAC,eAAe;EAC/D,IAAG;;EAEH,EAAE,IAAI,MAAM,EAAE,MAAM;;EAEpB;EACA,EAAE,OAAO,CAAC,SAAS,CAAC,OAAO,GAAG,OAAO,CAAC,SAAS,CAAC,qBAAqB,IAAI,OAAO,CAAC,SAAS,CAAC,gBAAgB,IAAI,OAAO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,CAAC,aAAa,CAAC;EAC9G,KAAK;;EAEL,IAAI,OAAO,IAAI,CAAC;EAChB,GAAG,CAAC;;EAEJ,CAAC,EAAE,IAAI,CAAC,QAAQ,KAAK,OAAO,MAAM,IAAI,MAAM,IAAI,QAAQ,KAAK,OAAO,IAAI,IAAI,IAAI,IAAI,QAAQ,KAAK,OAAO,MAAM,IAAI,MAAM,IAAI,EAAE,CAAC,CAAC;;ECrBhI;EACA;EACA;EACA;EACA;EACA;EACA;AACA,EAAO,SAAS,qBAAqB,EAAE,QAAQ,EAAE,aAAa,EAAE;EAChE,EAAE,IAAI,2BAA2B,GAAG,QAAQ,CAAC,OAAO,CAAC,GAAG,GAAG,aAAa,GAAG,GAAG,EAAC;EAC/E,EAAE,IAAI,2BAA2B,EAAE;EACnC,IAAI,OAAO,2BAA2B,CAAC,YAAY,CAAC,aAAa,CAAC;EAClE,GAAG;EACH,CAAC;;;;;;;;"}
@@ -1,172 +1,180 @@
1
1
  (function (global, factory) {
2
- typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports) :
3
- typeof define === 'function' && define.amd ? define('GOVUKFrontend', ['exports'], factory) :
4
- (factory((global.GOVUKFrontend = {})));
2
+ typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports) :
3
+ typeof define === 'function' && define.amd ? define('GOVUKFrontend', ['exports'], factory) :
4
+ (factory((global.GOVUKFrontend = {})));
5
5
  }(this, (function (exports) { 'use strict';
6
6
 
7
- /**
8
- * Common helpers which do not require polyfill.
9
- *
10
- * IMPORTANT: If a helper require a polyfill, please isolate it in its own module
11
- * so that the polyfill can be properly tree-shaken and does not burden
12
- * the components that do not need that helper
13
- *
14
- * @module common/index
15
- */
7
+ /**
8
+ * Common helpers which do not require polyfill.
9
+ *
10
+ * IMPORTANT: If a helper require a polyfill, please isolate it in its own module
11
+ * so that the polyfill can be properly tree-shaken and does not burden
12
+ * the components that do not need that helper
13
+ *
14
+ * @module common/index
15
+ */
16
16
 
17
- /**
18
- * TODO: Ideally this would be a NodeList.prototype.forEach polyfill
19
- * This seems to fail in IE8, requires more investigation.
20
- * See: https://github.com/imagitama/nodelist-foreach-polyfill
21
- *
22
- * @param {NodeListOf<Element>} nodes - NodeList from querySelectorAll()
23
- * @param {nodeListIterator} callback - Callback function to run for each node
24
- * @returns {undefined}
25
- */
26
- function nodeListForEach (nodes, callback) {
27
- if (window.NodeList.prototype.forEach) {
28
- return nodes.forEach(callback)
29
- }
30
- for (var i = 0; i < nodes.length; i++) {
31
- callback.call(window, nodes[i], i, nodes);
17
+ /**
18
+ * TODO: Ideally this would be a NodeList.prototype.forEach polyfill
19
+ * This seems to fail in IE8, requires more investigation.
20
+ * See: https://github.com/imagitama/nodelist-foreach-polyfill
21
+ *
22
+ * @param {NodeListOf<Element>} nodes - NodeList from querySelectorAll()
23
+ * @param {nodeListIterator} callback - Callback function to run for each node
24
+ * @returns {void}
25
+ */
26
+ function nodeListForEach (nodes, callback) {
27
+ if (window.NodeList.prototype.forEach) {
28
+ return nodes.forEach(callback)
29
+ }
30
+ for (var i = 0; i < nodes.length; i++) {
31
+ callback.call(window, nodes[i], i, nodes);
32
+ }
32
33
  }
33
- }
34
34
 
35
- /**
36
- * Used to generate a unique string, allows multiple instances of the component
37
- * without them conflicting with each other.
38
- * https://stackoverflow.com/a/8809472
39
- *
40
- * @returns {string} Unique ID
41
- */
42
- function generateUniqueID () {
43
- var d = new Date().getTime();
44
- if (typeof window.performance !== 'undefined' && typeof window.performance.now === 'function') {
45
- d += window.performance.now(); // use high-precision timer if available
35
+ /**
36
+ * Used to generate a unique string, allows multiple instances of the component
37
+ * without them conflicting with each other.
38
+ * https://stackoverflow.com/a/8809472
39
+ *
40
+ * @returns {string} Unique ID
41
+ */
42
+ function generateUniqueID () {
43
+ var d = new Date().getTime();
44
+ if (typeof window.performance !== 'undefined' && typeof window.performance.now === 'function') {
45
+ d += window.performance.now(); // use high-precision timer if available
46
+ }
47
+ return 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g, function (c) {
48
+ var r = (d + Math.random() * 16) % 16 | 0;
49
+ d = Math.floor(d / 16);
50
+ return (c === 'x' ? r : (r & 0x3 | 0x8)).toString(16)
51
+ })
46
52
  }
47
- return 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g, function (c) {
48
- var r = (d + Math.random() * 16) % 16 | 0;
49
- d = Math.floor(d / 16);
50
- return (c === 'x' ? r : (r & 0x3 | 0x8)).toString(16)
51
- })
52
- }
53
53
 
54
- /**
55
- * Config flattening function
56
- *
57
- * Takes any number of objects, flattens them into namespaced key-value pairs,
58
- * (e.g. {'i18n.showSection': 'Show section'}) and combines them together, with
59
- * greatest priority on the LAST item passed in.
60
- *
61
- * @returns {object} A flattened object of key-value pairs.
62
- */
63
- function mergeConfigs (/* configObject1, configObject2, ...configObjects */) {
64
54
  /**
65
- * Function to take nested objects and flatten them to a dot-separated keyed
66
- * object. Doing this means we don't need to do any deep/recursive merging of
67
- * each of our objects, nor transform our dataset from a flat list into a
68
- * nested object.
55
+ * Config flattening function
56
+ *
57
+ * Takes any number of objects, flattens them into namespaced key-value pairs,
58
+ * (e.g. {'i18n.showSection': 'Show section'}) and combines them together, with
59
+ * greatest priority on the LAST item passed in.
69
60
  *
70
- * @param {object} configObject - Deeply nested object
71
- * @returns {object} Flattened object with dot-separated keys
61
+ * @returns {Object<string, unknown>} A flattened object of key-value pairs.
72
62
  */
73
- var flattenObject = function (configObject) {
74
- // Prepare an empty return object
75
- var flattenedObject = {};
63
+ function mergeConfigs (/* configObject1, configObject2, ...configObjects */) {
64
+ /**
65
+ * Function to take nested objects and flatten them to a dot-separated keyed
66
+ * object. Doing this means we don't need to do any deep/recursive merging of
67
+ * each of our objects, nor transform our dataset from a flat list into a
68
+ * nested object.
69
+ *
70
+ * @param {Object<string, unknown>} configObject - Deeply nested object
71
+ * @returns {Object<string, unknown>} Flattened object with dot-separated keys
72
+ */
73
+ var flattenObject = function (configObject) {
74
+ // Prepare an empty return object
75
+ var flattenedObject = {};
76
76
 
77
- // Our flattening function, this is called recursively for each level of
78
- // depth in the object. At each level we prepend the previous level names to
79
- // the key using `prefix`.
80
- var flattenLoop = function (obj, prefix) {
81
- // Loop through keys...
82
- for (var key in obj) {
83
- // Check to see if this is a prototypical key/value,
84
- // if it is, skip it.
85
- if (!Object.prototype.hasOwnProperty.call(obj, key)) {
86
- continue
87
- }
88
- var value = obj[key];
89
- var prefixedKey = prefix ? prefix + '.' + key : key;
90
- if (typeof value === 'object') {
91
- // If the value is a nested object, recurse over that too
92
- flattenLoop(value, prefixedKey);
93
- } else {
94
- // Otherwise, add this value to our return object
95
- flattenedObject[prefixedKey] = value;
77
+ /**
78
+ * Our flattening function, this is called recursively for each level of
79
+ * depth in the object. At each level we prepend the previous level names to
80
+ * the key using `prefix`.
81
+ *
82
+ * @param {Partial<Object<string, unknown>>} obj - Object to flatten
83
+ * @param {string} [prefix] - Optional dot-separated prefix
84
+ */
85
+ var flattenLoop = function (obj, prefix) {
86
+ // Loop through keys...
87
+ for (var key in obj) {
88
+ // Check to see if this is a prototypical key/value,
89
+ // if it is, skip it.
90
+ if (!Object.prototype.hasOwnProperty.call(obj, key)) {
91
+ continue
92
+ }
93
+ var value = obj[key];
94
+ var prefixedKey = prefix ? prefix + '.' + key : key;
95
+ if (typeof value === 'object') {
96
+ // If the value is a nested object, recurse over that too
97
+ flattenLoop(value, prefixedKey);
98
+ } else {
99
+ // Otherwise, add this value to our return object
100
+ flattenedObject[prefixedKey] = value;
101
+ }
96
102
  }
97
- }
98
- };
103
+ };
99
104
 
100
- // Kick off the recursive loop
101
- flattenLoop(configObject);
102
- return flattenedObject
103
- };
105
+ // Kick off the recursive loop
106
+ flattenLoop(configObject);
107
+ return flattenedObject
108
+ };
104
109
 
105
- // Start with an empty object as our base
106
- var formattedConfigObject = {};
110
+ // Start with an empty object as our base
111
+ var formattedConfigObject = {};
107
112
 
108
- // Loop through each of the remaining passed objects and push their keys
109
- // one-by-one into configObject. Any duplicate keys will override the existing
110
- // key with the new value.
111
- for (var i = 0; i < arguments.length; i++) {
112
- var obj = flattenObject(arguments[i]);
113
- for (var key in obj) {
114
- if (Object.prototype.hasOwnProperty.call(obj, key)) {
115
- formattedConfigObject[key] = obj[key];
113
+ // Loop through each of the remaining passed objects and push their keys
114
+ // one-by-one into configObject. Any duplicate keys will override the existing
115
+ // key with the new value.
116
+ for (var i = 0; i < arguments.length; i++) {
117
+ var obj = flattenObject(arguments[i]);
118
+ for (var key in obj) {
119
+ if (Object.prototype.hasOwnProperty.call(obj, key)) {
120
+ formattedConfigObject[key] = obj[key];
121
+ }
116
122
  }
117
123
  }
118
- }
119
-
120
- return formattedConfigObject
121
- }
122
124
 
123
- /**
124
- * Extracts keys starting with a particular namespace from a flattened config
125
- * object, removing the namespace in the process.
126
- *
127
- * @param {object} configObject - The object to extract key-value pairs from.
128
- * @param {string} namespace - The namespace to filter keys with.
129
- * @returns {object} Flattened object with dot-separated key namespace removed
130
- */
131
- function extractConfigByNamespace (configObject, namespace) {
132
- // Check we have what we need
133
- if (!configObject || typeof configObject !== 'object') {
134
- throw new Error('Provide a `configObject` of type "object".')
125
+ return formattedConfigObject
135
126
  }
136
- if (!namespace || typeof namespace !== 'string') {
137
- throw new Error('Provide a `namespace` of type "string" to filter the `configObject` by.')
138
- }
139
- var newObject = {};
140
- for (var key in configObject) {
141
- // Split the key into parts, using . as our namespace separator
142
- var keyParts = key.split('.');
143
- // Check if the first namespace matches the configured namespace
144
- if (Object.prototype.hasOwnProperty.call(configObject, key) && keyParts[0] === namespace) {
145
- // Remove the first item (the namespace) from the parts array,
146
- // but only if there is more than one part (we don't want blank keys!)
147
- if (keyParts.length > 1) {
148
- keyParts.shift();
127
+
128
+ /**
129
+ * Extracts keys starting with a particular namespace from a flattened config
130
+ * object, removing the namespace in the process.
131
+ *
132
+ * @param {Object<string, unknown>} configObject - The object to extract key-value pairs from.
133
+ * @param {string} namespace - The namespace to filter keys with.
134
+ * @returns {Object<string, unknown>} Flattened object with dot-separated key namespace removed
135
+ * @throws {Error} Config object required
136
+ * @throws {Error} Namespace string required
137
+ */
138
+ function extractConfigByNamespace (configObject, namespace) {
139
+ // Check we have what we need
140
+ if (!configObject || typeof configObject !== 'object') {
141
+ throw new Error('Provide a `configObject` of type "object".')
142
+ }
143
+ if (!namespace || typeof namespace !== 'string') {
144
+ throw new Error('Provide a `namespace` of type "string" to filter the `configObject` by.')
145
+ }
146
+ var newObject = {};
147
+ for (var key in configObject) {
148
+ // Split the key into parts, using . as our namespace separator
149
+ var keyParts = key.split('.');
150
+ // Check if the first namespace matches the configured namespace
151
+ if (Object.prototype.hasOwnProperty.call(configObject, key) && keyParts[0] === namespace) {
152
+ // Remove the first item (the namespace) from the parts array,
153
+ // but only if there is more than one part (we don't want blank keys!)
154
+ if (keyParts.length > 1) {
155
+ keyParts.shift();
156
+ }
157
+ // Join the remaining parts back together
158
+ var newKey = keyParts.join('.');
159
+ // Add them to our new object
160
+ newObject[newKey] = configObject[key];
149
161
  }
150
- // Join the remaining parts back together
151
- var newKey = keyParts.join('.');
152
- // Add them to our new object
153
- newObject[newKey] = configObject[key];
154
162
  }
163
+ return newObject
155
164
  }
156
- return newObject
157
- }
158
165
 
159
- /**
160
- * @callback nodeListIterator
161
- * @param {Element} value - The current node being iterated on
162
- * @param {number} index - The current index in the iteration
163
- * @param {NodeListOf<Element>} nodes - NodeList from querySelectorAll()
164
- * @returns {undefined}
165
- */
166
+ /**
167
+ * @callback nodeListIterator
168
+ * @param {Element} value - The current node being iterated on
169
+ * @param {number} index - The current index in the iteration
170
+ * @param {NodeListOf<Element>} nodes - NodeList from querySelectorAll()
171
+ * @returns {void}
172
+ */
166
173
 
167
- exports.nodeListForEach = nodeListForEach;
168
- exports.generateUniqueID = generateUniqueID;
169
- exports.mergeConfigs = mergeConfigs;
170
- exports.extractConfigByNamespace = extractConfigByNamespace;
174
+ exports.nodeListForEach = nodeListForEach;
175
+ exports.generateUniqueID = generateUniqueID;
176
+ exports.mergeConfigs = mergeConfigs;
177
+ exports.extractConfigByNamespace = extractConfigByNamespace;
171
178
 
172
179
  })));
180
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sources":["../../../src/govuk/common/index.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<Element>} 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<string, unknown>} 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<string, unknown>} configObject - Deeply nested object\n * @returns {Object<string, unknown>} 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<Object<string, unknown>>} 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<string, unknown>} configObject - The object to extract key-value pairs from.\n * @param {string} namespace - The namespace to filter keys with.\n * @returns {Object<string, unknown>} 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<Element>} nodes - NodeList from querySelectorAll()\n * @returns {void}\n */\n"],"names":[],"mappings":";;;;;;EAAA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;EAEA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;AACA,EAAO,SAAS,eAAe,EAAE,KAAK,EAAE,QAAQ,EAAE;EAClD,EAAE,IAAI,MAAM,CAAC,QAAQ,CAAC,SAAS,CAAC,OAAO,EAAE;EACzC,IAAI,OAAO,KAAK,CAAC,OAAO,CAAC,QAAQ,CAAC;EAClC,GAAG;EACH,EAAE,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,KAAK,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE;EACzC,IAAI,QAAQ,CAAC,IAAI,CAAC,MAAM,EAAE,KAAK,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,KAAK,EAAC;EAC7C,GAAG;EACH,CAAC;;EAED;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,WAA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