@govuk-pay/pay-js-commons 3.8.0 → 3.8.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (41) hide show
  1. package/.github/workflows/run-tests.yml +11 -3
  2. package/.pre-commit-config.yaml +3 -3
  3. package/.secrets.baseline +21 -22
  4. package/ci/pipeline.yml +1 -1
  5. package/images/custom/mhra-logo-wide.svg +1 -0
  6. package/images/custom/neath_port_talbet_council.png +0 -0
  7. package/images/custom/nibsc-standards-logo-2023-01.svg +1 -0
  8. package/lib/analytics/cookies/validate.js +4 -26
  9. package/lib/analytics/dist/cookies.js +724 -27
  10. package/lib/analytics/index.js +0 -1
  11. package/lib/browsered/field-validation/field-validation.js +4 -22
  12. package/lib/constants/index.js +1 -1
  13. package/lib/index.js +2 -7
  14. package/lib/logging/format.js +1 -2
  15. package/lib/logging/index.js +1 -4
  16. package/lib/logging/keys.js +66 -33
  17. package/lib/logging/request-log-format.js +0 -2
  18. package/lib/nunjucks-filters/country-iso-to-name.js +1 -2
  19. package/lib/nunjucks-filters/datetime.js +0 -3
  20. package/lib/nunjucks-filters/remove-indefinite-articles.js +1 -0
  21. package/lib/nunjucks-filters/slugify.js +0 -1
  22. package/lib/utils/countries.js +8 -10
  23. package/lib/utils/currency-formatter.js +2 -10
  24. package/lib/utils/field-validation-checks.js +6 -22
  25. package/lib/utils/is-valid-email.js +2 -3
  26. package/package.json +8 -8
  27. package/sass/custom/mhra-black.scss +61 -0
  28. package/sass/custom/neath_port_talbet_council.scss +56 -0
  29. package/.idea/codeStyles/Project.xml +0 -27
  30. package/.idea/codeStyles/codeStyleConfig.xml +0 -5
  31. package/.idea/inspectionProfiles/Project_Default.xml +0 -6
  32. package/.idea/misc.xml +0 -6
  33. package/.idea/modules.xml +0 -8
  34. package/.idea/pay-js-commons.iml +0 -9
  35. package/.idea/sonarlint/issuestore/7/0/7030d0b2f71b999ff89a343de08c414af32fc93a +0 -0
  36. package/.idea/sonarlint/issuestore/8/e/8ec9a00bfd09b3190ac6b22251dbb1aa95a0579d +0 -0
  37. package/.idea/sonarlint/issuestore/a/1/a16ffce9c4014536b0d5997f1ff408f19a8510f7 +0 -0
  38. package/.idea/sonarlint/issuestore/b/9/b990dd75f097078d3650d1f96db34389de3006f0 +0 -0
  39. package/.idea/sonarlint/issuestore/f/7/f7a87ae0426cafc2323c6c7ea540fb129c638c87 +0 -0
  40. package/.idea/sonarlint/issuestore/index.pb +0 -11
  41. package/.idea/vcs.xml +0 -6
@@ -0,0 +1,61 @@
1
+ $govuk-font-family: -apple-system, BlinkMacSystemFont, helvetica neue, helvetica, ubuntu, roboto, noto, segoe ui, arial, sans-serif; // Override font as so not to use New Transport
2
+ @import "application";
3
+
4
+ // CUSTOM BRANDING
5
+ // Use the variables below to control the style
6
+ // Make sure banner colours meet minimum colour contrast levels
7
+
8
+ $custom-banner-colour: #000000;
9
+ $custom-banner-border-colour: #ffffff;
10
+ $custom-text-colour: #ffffff;
11
+ $logo-image-height: 1em;
12
+
13
+ .custom-branding {
14
+ @if $logo-image-height != null {
15
+ .custom-branding-image {
16
+ height: $logo-image-height;
17
+ width: 100%;
18
+ padding: 30px 0px;
19
+
20
+ @media all and (-ms-high-contrast: none), (-ms-high-contrast: active) {
21
+ width: 100%;
22
+ }
23
+ }
24
+ }
25
+
26
+ .govuk-header {
27
+ background-color: $custom-banner-colour;
28
+ }
29
+
30
+ .govuk-header__link {
31
+ &:link,
32
+ &:visited {
33
+ color: $custom-text-colour;
34
+ }
35
+ }
36
+
37
+ .govuk-header__link--service-name {
38
+ display: none;
39
+ }
40
+
41
+ .govuk-header__container {
42
+ border-bottom-color: $custom-banner-border-colour;
43
+ }
44
+
45
+ @include govuk-media-query($from: tablet) {
46
+ .govuk-header__logo {
47
+ width: 90%;
48
+ }
49
+
50
+ .govuk-header__content {
51
+ width: 66%;
52
+ vertical-align: bottom;
53
+ margin-bottom: 7px;
54
+ }
55
+ }
56
+
57
+ .govuk-button {
58
+ padding: 7px 15px 6px;
59
+ padding: .368421053em .842105263em .315789474em;
60
+ }
61
+ }
@@ -0,0 +1,56 @@
1
+ $govuk-font-family: -apple-system,BlinkMacSystemFont,helvetica neue,helvetica,ubuntu,roboto,noto,segoe ui,arial,sans-serif; // Override font as so not to use New Transport
2
+ @import "application";
3
+
4
+ // CUSTOM BRANDING
5
+ // Use the variables below to control the style
6
+ // Make sure banner colours meet minimum colour contrast levels
7
+
8
+ $custom-banner-colour: #265571;
9
+ $custom-banner-border-colour: #ffffff;
10
+ $custom-text-colour: #007A7C;
11
+ $logo-image-height: 2em;
12
+
13
+ .custom-branding {
14
+ @if $logo-image-height != null {
15
+ .custom-branding-image {
16
+ max-height: $logo-image-height;
17
+ width: 100%;
18
+ }
19
+ }
20
+
21
+ .govuk-header {
22
+ background-color: $custom-banner-colour;
23
+ }
24
+
25
+ .govuk-header__logotype{
26
+ margin-top: 5px;
27
+ }
28
+
29
+ .govuk-header__link{
30
+ &:link,
31
+ &:visited {
32
+ color: $custom-text-colour;
33
+ }
34
+ }
35
+
36
+ .govuk-header__link--service-name {
37
+ display: none;
38
+ }
39
+
40
+ .govuk-header__container {
41
+ border-bottom-color: $custom-banner-border-colour;
42
+ }
43
+
44
+ @include govuk-media-query($from: tablet) {
45
+ .govuk-header__content {
46
+ width: 66%;
47
+ vertical-align: bottom;
48
+ margin-bottom: 7px;
49
+ }
50
+ }
51
+
52
+ .govuk-button {
53
+ padding: 7px 15px 6px;
54
+ padding: .368421053em .842105263em .315789474em;
55
+ }
56
+ }
@@ -1,27 +0,0 @@
1
- <component name="ProjectCodeStyleConfiguration">
2
- <code_scheme name="Project" version="173">
3
- <JSCodeStyleSettings version="0">
4
- <option name="USE_SEMICOLON_AFTER_STATEMENT" value="false" />
5
- <option name="FORCE_SEMICOLON_STYLE" value="true" />
6
- <option name="SPACE_BEFORE_GENERATOR_MULT" value="true" />
7
- <option name="USE_DOUBLE_QUOTES" value="false" />
8
- <option name="FORCE_QUOTE_STYlE" value="true" />
9
- <option name="SPACES_WITHIN_OBJECT_LITERAL_BRACES" value="true" />
10
- <option name="SPACES_WITHIN_IMPORTS" value="true" />
11
- </JSCodeStyleSettings>
12
- <codeStyleSettings language="JavaScript">
13
- <option name="KEEP_BLANK_LINES_IN_CODE" value="1" />
14
- <option name="ALIGN_MULTILINE_PARAMETERS" value="false" />
15
- <option name="ALIGN_MULTILINE_FOR" value="false" />
16
- <option name="SPACE_BEFORE_METHOD_PARENTHESES" value="true" />
17
- <option name="TERNARY_OPERATION_SIGNS_ON_NEXT_LINE" value="true" />
18
- <option name="KEEP_SIMPLE_BLOCKS_IN_ONE_LINE" value="true" />
19
- <option name="KEEP_SIMPLE_METHODS_IN_ONE_LINE" value="true" />
20
- <indentOptions>
21
- <option name="INDENT_SIZE" value="2" />
22
- <option name="CONTINUATION_INDENT_SIZE" value="2" />
23
- <option name="TAB_SIZE" value="2" />
24
- </indentOptions>
25
- </codeStyleSettings>
26
- </code_scheme>
27
- </component>
@@ -1,5 +0,0 @@
1
- <component name="ProjectCodeStyleConfiguration">
2
- <state>
3
- <option name="USE_PER_PROJECT_SETTINGS" value="true" />
4
- </state>
5
- </component>
@@ -1,6 +0,0 @@
1
- <component name="InspectionProjectProfileManager">
2
- <profile version="1.0">
3
- <option name="myName" value="Project Default" />
4
- <inspection_tool class="StandardJS" enabled="true" level="ERROR" enabled_by_default="true" />
5
- </profile>
6
- </component>
package/.idea/misc.xml DELETED
@@ -1,6 +0,0 @@
1
- <?xml version="1.0" encoding="UTF-8"?>
2
- <project version="4">
3
- <component name="ProjectRootManager">
4
- <output url="file://$PROJECT_DIR$/out" />
5
- </component>
6
- </project>
package/.idea/modules.xml DELETED
@@ -1,8 +0,0 @@
1
- <?xml version="1.0" encoding="UTF-8"?>
2
- <project version="4">
3
- <component name="ProjectModuleManager">
4
- <modules>
5
- <module fileurl="file://$PROJECT_DIR$/.idea/pay-js-commons.iml" filepath="$PROJECT_DIR$/.idea/pay-js-commons.iml" />
6
- </modules>
7
- </component>
8
- </project>
@@ -1,9 +0,0 @@
1
- <?xml version="1.0" encoding="UTF-8"?>
2
- <module type="JAVA_MODULE" version="4">
3
- <component name="NewModuleRootManager" inherit-compiler-output="true">
4
- <exclude-output />
5
- <content url="file://$MODULE_DIR$" />
6
- <orderEntry type="inheritedJdk" />
7
- <orderEntry type="sourceFolder" forTests="false" />
8
- </component>
9
- </module>
@@ -1,11 +0,0 @@
1
-
2
- 9
3
- README.md,8/e/8ec9a00bfd09b3190ac6b22251dbb1aa95a0579d
4
- _
5
- /sass/custom/north-yorkshire-county-council.scss,a/1/a16ffce9c4014536b0d5997f1ff408f19a8510f7
6
- <
7
- package.json,7/0/7030d0b2f71b999ff89a343de08c414af32fc93a
8
- ^
9
- .images/custom/scottish-government-planning.svg,b/9/b990dd75f097078d3650d1f96db34389de3006f0
10
- ]
11
- -sass/custom/scottish-government-planning.scss,f/7/f7a87ae0426cafc2323c6c7ea540fb129c638c87
package/.idea/vcs.xml DELETED
@@ -1,6 +0,0 @@
1
- <?xml version="1.0" encoding="UTF-8"?>
2
- <project version="4">
3
- <component name="VcsDirectoryMappings">
4
- <mapping directory="" vcs="Git" />
5
- </component>
6
- </project>