@financial-times/n-conversion-forms 42.0.6 → 43.0.0

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.
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "branch": "",
3
3
  "repo": "n-conversion-forms",
4
- "version": "ab550afe10283fbedef89d20c0a358ed8527e7f9",
5
- "tag": "v42.0.6",
6
- "buildNumber": "16306"
4
+ "version": "91ca2b99aec0fb048335d9f556de1ee45b7d30e5",
5
+ "tag": "v43.0.0",
6
+ "buildNumber": "16422"
7
7
  }
@@ -1,5 +1,5 @@
1
1
  {
2
2
  ".toolkitrc.yml": "XiiIocllEaT8xqKRCTpTbJ+yUyduDo5aEHARUQ3vJFfSe187Ci13PEs3bWL272GFJyNz2QgRQhdov2/+LFRKuw==",
3
- "package.json": "tyhODAtD9W4C9mgi5PC4ezgwd9ecCStednSAXkzEaHCQiaO4mT5OZMUIjUd9x2Few6hemS6o9dr0U32ZZszoIw==",
3
+ "package.json": "AVem2VugZag3rAsTMfiY0XBi4SUWv90DCtoLq4/VUNvosNy6oseqYhdIvaPFPS8GvnA9xINLEs/qxDZ5p9oI3A==",
4
4
  ".circleci/config.yml": "eph42EF3EsL7jvhiiC7D7vG3vGBAGBFVC+Ncmy4Dj4rUNzK8Rls0/cr+bEF/ttMN3J6iSL1xtCXKIJVrtZ4OSQ=="
5
5
  }
@@ -137,10 +137,10 @@ exports[`Debug renders with isTest 1`] = `
137
137
  z-index: 1000;
138
138
  opacity: 0.8;
139
139
  }
140
- .ncf__debug-button--test {
140
+ .o3-button--secondary.o3-button.ncf__debug-button--test {
141
141
  background-color: #008040;
142
142
  }
143
- .ncf__debug-button--production {
143
+ .o3-button--secondary.o3-button.ncf__debug-button--production {
144
144
  background-color: #990000;
145
145
  }
146
146
  .ncf__button--debug {
@@ -1589,10 +1589,10 @@ exports[`Debug renders with showHelpers 1`] = `
1589
1589
  z-index: 1000;
1590
1590
  opacity: 0.8;
1591
1591
  }
1592
- .ncf__debug-button--test {
1592
+ .o3-button--secondary.o3-button.ncf__debug-button--test {
1593
1593
  background-color: #008040;
1594
1594
  }
1595
- .ncf__debug-button--production {
1595
+ .o3-button--secondary.o3-button.ncf__debug-button--production {
1596
1596
  background-color: #990000;
1597
1597
  }
1598
1598
  .ncf__button--debug {
@@ -203,10 +203,10 @@ export function Debug({
203
203
  z-index: 1000;
204
204
  opacity: 0.8;
205
205
  }
206
- .ncf__debug-button--test {
206
+ .o3-button--secondary.o3-button.ncf__debug-button--test {
207
207
  background-color: #008040;
208
208
  }
209
- .ncf__debug-button--production {
209
+ .o3-button--secondary.o3-button.ncf__debug-button--production {
210
210
  background-color: #990000;
211
211
  }
212
212
  .ncf__button--debug {
package/dist/debug.jsx CHANGED
@@ -55,7 +55,7 @@ function Debug(_ref) {
55
55
  __html: "\n\tvar FORM_SELECTOR = 'form.ncf';\n\tvar INPUT_SELECTOR = FORM_SELECTOR + ' input:not([type=\"checkbox\"]):not([type=\"radio\"])';\n\tvar SELECT_SELECTOR = FORM_SELECTOR + ' select';\n\tvar CHECKBOX_SELECTOR = FORM_SELECTOR + ' input[type=\"checkbox\"]';\n\tvar RADIO_SELECTOR = FORM_SELECTOR + ' input[type=\"radio\"]';\n\t// This env var gets set in production. We use this when creating email addresses in case any\n\t// get into production so Membership know who to come to about deleting them.\n\tvar SYSTEM_CODE = document.documentElement.getAttribute('data-next-app') || 'n-conversion-forms';\n\tvar COUNTRY_CODE = window.FT && window.FT.country || 'GBR';\n\n\tvar postcodeByCountry = ".concat(JSON.stringify(_supportedPostcodeExamples.allSupportedPostcodeExamples), ";\n\n\tvar debugData = {\n\t\tbillingCity: 'London',\n\t\tbillingCountry: COUNTRY_CODE,\n\t\tbillingPostcode: postcodeByCountry[COUNTRY_CODE],\n\t\tcountry: COUNTRY_CODE,\n\t\tdeliveryAddressLine1: 'delivery test1',\n\t\tdeliveryAddressLine2: 'delivery test2',\n\t\tdeliveryAddressLine3: 'APT 2C',\n\t\tdeliveryCity: 'delivery city',\n\t\tdeliveryCounty: 'delivery county',\n\t\tdeliveryPostcode: postcodeByCountry[COUNTRY_CODE],\n\t\temail: SYSTEM_CODE + '-' + Date.now() + '@ftqa.org',\n\t\tfirstName: 'Test',\n\t\tindustry: 'DEF',\n\t\tlastName: 'Test',\n\t\tjobTitle: 'CEO',\n\t\torganisation: 'ft-org',\n\t\tpassword: 'password123',\n\t\tposition: 'AS',\n\t\tpostCode: postcodeByCountry[COUNTRY_CODE],\n\t\tprimaryTelephone: '0987654321',\n\t\tresponsibility: 'ADL',\n\t\tukVisaWorldpay: '4111111111111111',\n\t\tusAmex: '378282246310005',\n\t\tusVisaWorldpay: '4112344112344113',\n\t\tcheckoutVisa: '4242424242424242',\n\t\tcheckout3dsChallenge: 'Checkout1!',\n\t\tchaseVisa: '4011361100000010',\n\t\tverificationEmail: SYSTEM_CODE + '-' + Date.now() + '@ftqa.org',\n\t\tyearOfBirth: 1999\n\t};\n\n\tfunction logout () {\n\t\tconst options = {\n\t\t\tmode: 'no-cors',\n\t\t\tcredentials: 'include'\n\t\t};\n\t\tfetch('https://www.ft.com/logout', options).then(function () {\n\t\t\twindow.location.reload();\n\t\t});\n\t}\n\n\tfunction fillForm () {\n\t\tvar changeEvent = document.createEvent('HTMLEvents');\n\t\tchangeEvent.initEvent('change', false, true);\n\n\t\tvar inputs = document.querySelectorAll(INPUT_SELECTOR + ', ' + SELECT_SELECTOR);\n\t\tinputs.forEach(function (input) {\n\t\t\tif (!/hidden/i.test(input.type) && input.disabled === false) {\n\t\t\t\tvar value = debugData[input.name];\n\t\t\t\tinput.value = value;\n\t\t\t\tinput.dispatchEvent(changeEvent);\n\t\t\t}\n\t\t});\n\t\tvar checkboxes = document.querySelectorAll(CHECKBOX_SELECTOR + ', ' + RADIO_SELECTOR);\n\t\tcheckboxes.forEach(function (checkbox) {\n\t\t\tcheckbox.checked = true;\n\t\t\tcheckbox.dispatchEvent(changeEvent);\n\t\t});\n\t}\n\n\tfunction submitForm () {\n\t\tdocument.querySelector(FORM_SELECTOR).submit();\n\t}\n\n\tfunction copyToClipboard (name) {\n\t\tvar string = debugData[name];\n\t\tvar textarea = document.createElement('textarea');\n\t\ttextarea.value = string;\n\t\tdocument.body.appendChild(textarea);\n\t\ttextarea.select();\n\t\tdocument.execCommand('copy');\n\t\tdocument.body.removeChild(textarea);\n\t}\n\n\tfunction setTestEnvironment (state) {\n\t\tvar flags = document.cookie.match('(^|[^;]+)\\\\s*next-flags\\\\s*=\\\\s*([^;]+)').pop();\n\t\tvar flag = 'conversionSandbox%3A';\n\t\tflags = flags.replace(flag + 'on', '');\n\t\tflags = flags.replace(flag + 'off', '');\n\t\tdocument.cookie = 'next-flags=' + flags + '%2C' + flag + state + '; path=/; domain=.ft.com;';\n\t\twindow.location.reload();\n\t}\n\t\n\tfunction reloadWithSelectedCountry () {\n\t\tvar countryBox = document.getElementById(\"ncf-country\");\n\t\tvar selectedValue = countryBox.options[countryBox.selectedIndex].value;\n\t\tif (selectedValue) {\n\t\t\tconst url = new URL(window.location);\n\t\t\turl.searchParams.set(\"countryCode\", selectedValue);\n\t\t\thistory.pushState({}, \"\", url);\n\t\t\twindow.location.reload();\n\t\t}\n\t}\n\t")
56
56
  };
57
57
  var style = {
58
- __html: "\n\t.ncf__debug-panel {\n\t\tposition: absolute;\n\t\tbackground-color: #262a33;\n\t\tcolor: #ffffff;\n\t\tbottom: 0;\n\t\tleft: 0;\n\t\twidth: 100%;\n\t\tpadding: 10px;\n\t\tposition: fixed;\n\t\tz-index: 1000;\n\t\topacity: 0.8;\n\t}\n\t.ncf__debug-button--test {\n\t\tbackground-color: #008040;\n\t}\n\t.ncf__debug-button--production {\n\t\tbackground-color: #990000;\n\t}\n\t.ncf__button--debug {\n\t\tpadding: 0px 5px;\n\t}\n\t"
58
+ __html: "\n\t.ncf__debug-panel {\n\t\tposition: absolute;\n\t\tbackground-color: #262a33;\n\t\tcolor: #ffffff;\n\t\tbottom: 0;\n\t\tleft: 0;\n\t\twidth: 100%;\n\t\tpadding: 10px;\n\t\tposition: fixed;\n\t\tz-index: 1000;\n\t\topacity: 0.8;\n\t}\n\t.o3-button--secondary.o3-button.ncf__debug-button--test {\n\t\tbackground-color: #008040;\n\t}\n\t.o3-button--secondary.o3-button.ncf__debug-button--production {\n\t\tbackground-color: #990000;\n\t}\n\t.ncf__button--debug {\n\t\tpadding: 0px 5px;\n\t}\n\t"
59
59
  };
60
60
  return (isTest || showHelpers) && /*#__PURE__*/_react["default"].createElement(_react["default"].Fragment, null, /*#__PURE__*/_react["default"].createElement("div", {
61
61
  className: "ncf__debug-panel",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@financial-times/n-conversion-forms",
3
- "version": "42.0.6",
3
+ "version": "43.0.0",
4
4
  "description": "Containing jsx components and styles for forms included on Accounts and Acquisition apps (next-signup, next-profile, next-retention, etc).",
5
5
  "main": "./dist/index.js",
6
6
  "scripts": {
@@ -29,7 +29,7 @@
29
29
  "classnames": "2.5.1",
30
30
  "fetchres": "1.7.2",
31
31
  "lodash.get": "4.4.2",
32
- "n-common-static-data": "github:Financial-Times/n-common-static-data#v3.1.0"
32
+ "n-common-static-data": "https://github.com/Financial-Times/n-common-static-data.git#v3.1.0"
33
33
  },
34
34
  "devDependencies": {
35
35
  "@babel/core": "^7.23.9",