govuk_publishing_components 37.5.1 → 37.6.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (32) hide show
  1. checksums.yaml +4 -4
  2. data/app/assets/javascripts/govuk_publishing_components/analytics/analytics.js +10 -5
  3. data/app/assets/javascripts/govuk_publishing_components/analytics-ga4/ga4-core.js +5 -0
  4. data/app/assets/javascripts/govuk_publishing_components/analytics-ga4/ga4-scroll-tracker.js +1 -1
  5. data/app/assets/javascripts/govuk_publishing_components/components/cookie-banner.js +35 -8
  6. data/app/assets/javascripts/govuk_publishing_components/domain-config.js +73 -0
  7. data/app/assets/javascripts/govuk_publishing_components/lib/cookie-settings.js +40 -19
  8. data/app/assets/javascripts/govuk_publishing_components/lib/govspeak/youtube-link-enhancement.js +1 -1
  9. data/app/assets/javascripts/govuk_publishing_components/lib/single-consent-functions.js +59 -0
  10. data/app/assets/javascripts/govuk_publishing_components/load-analytics.js +9 -75
  11. data/app/assets/stylesheets/govuk_publishing_components/components/_contents-list.scss +1 -1
  12. data/app/assets/stylesheets/govuk_publishing_components/components/_search.scss +8 -15
  13. data/app/controllers/govuk_publishing_components/audit_controller.rb +0 -1
  14. data/app/models/govuk_publishing_components/audit_comparer.rb +0 -1
  15. data/app/views/govuk_publishing_components/components/_contents_list.html.erb +2 -0
  16. data/app/views/govuk_publishing_components/components/docs/contents_list.yml +1 -0
  17. data/config/locales/en.yml +2 -2
  18. data/lib/govuk_publishing_components/version.rb +1 -1
  19. data/node_modules/axe-core/LICENSE-3RD-PARTY.txt +66 -0
  20. data/node_modules/axe-core/README.md +4 -2
  21. data/node_modules/axe-core/axe.d.ts +21 -8
  22. data/node_modules/axe-core/axe.js +13 -11
  23. data/node_modules/axe-core/axe.min.js +3 -3
  24. data/node_modules/axe-core/package.json +3 -2
  25. data/node_modules/axe-core/sri-history.json +4 -0
  26. data/node_modules/govuk-single-consent/README.md +157 -0
  27. data/node_modules/govuk-single-consent/dist/singleconsent.cjs.js +419 -0
  28. data/node_modules/govuk-single-consent/dist/singleconsent.esm.js +417 -0
  29. data/node_modules/govuk-single-consent/dist/singleconsent.iife.js +431 -0
  30. data/node_modules/govuk-single-consent/dist/singleconsent.iife.min.js +1 -0
  31. data/node_modules/govuk-single-consent/package.json +56 -0
  32. metadata +11 -2
@@ -0,0 +1,66 @@
1
+ -----------------------------------------------------------------------------
2
+ MIT License
3
+ Applies to:
4
+ - colorjs.io; Copyright (c) 2021 Lea Verou, Chris Lilley
5
+ - core-js-pure; Copyright (c) 2014-2023 Denis Pushkarev
6
+ - css-selector-parser; Copyright (c) 2013 Dulin Marat
7
+ - doT.js; Copyright (c) 2011 Laura Doktorova
8
+ Software includes portions from jQote2 Copyright (c) 2010 aefxx,
9
+ http://aefxx.com/ licensed under the MIT license.
10
+ - emoji-regex; Copyright (c) Mathias Bynens <https://mathiasbynens.be/>
11
+ - es6-iterator; Copyright (c) 2013-2017 Mariusz Nowak (www.medikoo.com)
12
+ - es6-promise;
13
+ Copyright (c) 2014 Yehuda Katz, Tom Dale, Stefan Penner and contributors
14
+ - event-emitter; Copyright (C) 2012-2015 Mariusz Nowak (www.medikoo.com)
15
+ - is-promise; Copyright (c) 2014 Forbes Lindesay
16
+ - lru-queue; Copyright (C) 2014 Mariusz Nowak (www.medikoo.com)
17
+ - typedarray;
18
+ Copyright (c) 2010, Linden Research, Inc.
19
+ Copyright (c) 2012, Joshua Bell
20
+ - weakmap-polyfill; Copyright (c) 2015-2021 polygonplanet
21
+ -----------------------------------------------------------------------------
22
+
23
+ Permission is hereby granted, free of charge, to any person obtaining a copy
24
+ of this software and associated documentation files (the "Software"), to deal
25
+ in the Software without restriction, including without limitation the rights
26
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
27
+ copies of the Software, and to permit persons to whom the Software is
28
+ furnished to do so, subject to the following conditions:
29
+
30
+ The above copyright notice and this permission notice shall be included in
31
+ all copies or substantial portions of the Software.
32
+
33
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
34
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
35
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
36
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
37
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
38
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
39
+ THE SOFTWARE.
40
+
41
+
42
+ -----------------------------------------------------------------------------
43
+ ISC License
44
+ Applies to:
45
+ - d; Copyright (c) 2013-2019, Mariusz Nowak, @medikoo, medikoo.com
46
+ - es5-ext; Copyright (c) 2011-2022, Mariusz Nowak, @medikoo, medikoo.com
47
+ - es6-symbol; Copyright (c) 2013-2019, Mariusz Nowak, @medikoo, medikoo.com
48
+ - es6-weak-map; Copyright (c) 2013-2018, Mariusz Nowak, @medikoo, medikoo.com
49
+ - ext; Copyright (c) 2011-2022, Mariusz Nowak, @medikoo, medikoo.com
50
+ - memoizee; Copyright (c) 2012-2018, Mariusz Nowak, @medikoo, medikoo.com
51
+ - next-tick; Copyright (c) 2012-2020, Mariusz Nowak, @medikoo, medikoo.com
52
+ - timers-ext; Copyright (c) 2013-2018, Mariusz Nowak, @medikoo, medikoo.com
53
+ - type; Copyright (c) 2019, Mariusz Nowak, @medikoo, medikoo.com
54
+ -----------------------------------------------------------------------------
55
+
56
+ Permission to use, copy, modify, and/or distribute this software for any
57
+ purpose with or without fee is hereby granted, provided that the above
58
+ copyright notice and this permission notice appear in all copies.
59
+
60
+ THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
61
+ REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
62
+ AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
63
+ INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
64
+ LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
65
+ OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
66
+ PERFORMANCE OF THIS SOFTWARE.
@@ -179,6 +179,8 @@ Read the [documentation on contributing](CONTRIBUTING.md)
179
179
 
180
180
  ## Acknowledgements
181
181
 
182
- Thanks to Marat Dulin for his [css-selector-parser](https://www.npmjs.com/package/css-selector-parser) implementation which is included for shadow DOM support.
182
+ Thanks to Marat Dulin for his [css-selector-parser](https://www.npmjs.com/package/css-selector-parser) implementation which is included for shadow DOM support. Another thank you to the [Slick Parser](https://github.com/mootools/slick/blob/master/Source/Slick.Parser.js) implementers for their contribution, we have used some of their algorithms in our shadow DOM support code. Thanks to Lea Verou and Chris Lilley for their [colorjs.io](https://colorjs.io/) library which we have used for converting between color formats.
183
183
 
184
- Thanks to the [Slick Parser](https://github.com/mootools/slick/blob/master/Source/Slick.Parser.js) implementers for their contribution, we have used some of their algorithms in our shadow DOM support code.
184
+ ## Licenses
185
+
186
+ Axe-core is distributed under the [Mozilla Public License, version 2.0](LICENSE). It comes bundled with several dependencies which are distributed under their own terms. (See [LICENSE-3RD-PARTY.txt](LICENSE-3RD-PARTY.txt))
@@ -1,13 +1,12 @@
1
1
  // Type definitions for axe-core
2
2
  // Project: https://github.com/dequelabs/axe-core
3
- // Definitions by: Marcy Sutton <https://github.com/marcysutton>
4
3
 
5
4
  declare namespace axe {
6
5
  type ImpactValue = 'minor' | 'moderate' | 'serious' | 'critical' | null;
7
6
 
8
7
  type TagValue = string;
9
8
 
10
- type ReporterVersion = 'v1' | 'v2' | 'raw' | 'raw-env' | 'no-passes';
9
+ type ReporterVersion = 'v1' | 'v2' | 'raw' | 'rawEnv' | 'no-passes';
11
10
 
12
11
  type RunOnlyType = 'rule' | 'rules' | 'tag' | 'tags';
13
12
 
@@ -132,7 +131,7 @@ declare namespace axe {
132
131
  interface RunOptions {
133
132
  runOnly?: RunOnly | TagValue[] | string[] | string;
134
133
  rules?: RuleObject;
135
- reporter?: ReporterVersion;
134
+ reporter?: ReporterVersion | string;
136
135
  resultTypes?: resultGroups[];
137
136
  selectors?: boolean;
138
137
  ancestry?: boolean;
@@ -333,6 +332,14 @@ declare namespace axe {
333
332
  xpath: string[];
334
333
  ancestry: UnlabelledFrameSelector;
335
334
  }
335
+ interface DqElement extends SerialDqElement {
336
+ element: Element;
337
+ toJSON(): SerialDqElement;
338
+ mergeSpecs(
339
+ childSpec: SerialDqElement,
340
+ parentSpec: SerialDqElement
341
+ ): SerialDqElement;
342
+ }
336
343
  interface PartialRuleResult {
337
344
  id: string;
338
345
  result: 'inapplicable';
@@ -351,16 +358,21 @@ declare namespace axe {
351
358
  frameContext: FrameContextObject;
352
359
  }
353
360
 
361
+ interface RawCheckResult extends Omit<CheckResult, 'relatedNodes'> {
362
+ relatedNodes?: Array<SerialDqElement | DqElement>;
363
+ }
364
+
354
365
  interface RawNodeResult<T extends 'passed' | 'failed' | 'incomplete'> {
355
- any: CheckResult[];
356
- all: CheckResult[];
357
- none: CheckResult[];
366
+ node: SerialDqElement | DqElement;
367
+ any: RawCheckResult[];
368
+ all: RawCheckResult[];
369
+ none: RawCheckResult[];
358
370
  impact: ImpactValue | null;
359
371
  result: T;
360
372
  }
361
373
 
362
374
  interface RawResult extends Omit<Result, 'nodes'> {
363
- inapplicable: [];
375
+ inapplicable: Array<never>;
364
376
  passes: RawNodeResult<'passed'>[];
365
377
  incomplete: RawNodeResult<'incomplete'>[];
366
378
  violations: RawNodeResult<'failed'>[];
@@ -383,6 +395,7 @@ declare namespace axe {
383
395
  attr(attr: string): string | null;
384
396
  hasAttr(attr: string): boolean;
385
397
  props: { [key: string]: unknown };
398
+ boundingClientRect: DOMRect;
386
399
  }
387
400
 
388
401
  interface Utils {
@@ -396,7 +409,7 @@ declare namespace axe {
396
409
  DqElement: new (
397
410
  elm: Element,
398
411
  options?: { absolutePaths?: boolean }
399
- ) => SerialDqElement;
412
+ ) => DqElement;
400
413
  uuid: (
401
414
  options?: { random?: Uint8Array | Array<number> },
402
415
  buf?: Uint8Array | Array<number>,
@@ -1,5 +1,5 @@
1
- /*! axe v4.8.3
2
- * Copyright (c) 2015 - 2023 Deque Systems, Inc.
1
+ /*! axe v4.8.4
2
+ * Copyright (c) 2015 - 2024 Deque Systems, Inc.
3
3
  *
4
4
  * Your use of this Source Code Form is subject to the terms of the Mozilla Public
5
5
  * License, v. 2.0. If a copy of the MPL was not distributed with this
@@ -22,7 +22,7 @@
22
22
  }, _typeof(obj);
23
23
  }
24
24
  var axe = axe || {};
25
- axe.version = '4.8.3';
25
+ axe.version = '4.8.4';
26
26
  if (typeof define === 'function' && define.amd) {
27
27
  define('axe-core', [], function() {
28
28
  return axe;
@@ -6520,7 +6520,7 @@
6520
6520
  return generateSelector2(item.elm, options, item.doc);
6521
6521
  });
6522
6522
  }
6523
- var ignoredAttributes = [ 'class', 'style', 'id', 'selected', 'checked', 'disabled', 'tabindex', 'aria-checked', 'aria-selected', 'aria-invalid', 'aria-activedescendant', 'aria-busy', 'aria-disabled', 'aria-expanded', 'aria-grabbed', 'aria-pressed', 'aria-valuenow' ];
6523
+ var ignoredAttributes = [ 'class', 'style', 'id', 'selected', 'checked', 'disabled', 'tabindex', 'aria-checked', 'aria-selected', 'aria-invalid', 'aria-activedescendant', 'aria-busy', 'aria-disabled', 'aria-expanded', 'aria-grabbed', 'aria-pressed', 'aria-valuenow', 'xmlns' ];
6524
6524
  var MAXATTRIBUTELENGTH = 31;
6525
6525
  var attrCharsRegex = /([\\"])/g;
6526
6526
  var newlineChars = /(\r\n|\r|\n)/g;
@@ -17061,19 +17061,21 @@
17061
17061
  key: 'props',
17062
17062
  get: function get() {
17063
17063
  if (!this._cache.hasOwnProperty('props')) {
17064
- var _this$actualNode = this.actualNode, nodeType = _this$actualNode.nodeType, nodeName2 = _this$actualNode.nodeName, _id = _this$actualNode.id, multiple = _this$actualNode.multiple, nodeValue = _this$actualNode.nodeValue, value = _this$actualNode.value, selected = _this$actualNode.selected, checked = _this$actualNode.checked, indeterminate = _this$actualNode.indeterminate;
17064
+ var _this$actualNode = this.actualNode, nodeType = _this$actualNode.nodeType, nodeName2 = _this$actualNode.nodeName, _id = _this$actualNode.id, nodeValue = _this$actualNode.nodeValue;
17065
17065
  this._cache.props = {
17066
17066
  nodeType: nodeType,
17067
17067
  nodeName: this._isXHTML ? nodeName2 : nodeName2.toLowerCase(),
17068
17068
  id: _id,
17069
17069
  type: this._type,
17070
- multiple: multiple,
17071
- nodeValue: nodeValue,
17072
- value: value,
17073
- selected: selected,
17074
- checked: checked,
17075
- indeterminate: indeterminate
17070
+ nodeValue: nodeValue
17076
17071
  };
17072
+ if (nodeType === 1) {
17073
+ this._cache.props.multiple = this.actualNode.multiple;
17074
+ this._cache.props.value = this.actualNode.value;
17075
+ this._cache.props.selected = this.actualNode.selected;
17076
+ this._cache.props.checked = this.actualNode.checked;
17077
+ this._cache.props.indeterminate = this.actualNode.indeterminate;
17078
+ }
17077
17079
  }
17078
17080
  return this._cache.props;
17079
17081
  }