@financial-times/n-conversion-forms 27.2.1 → 27.2.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.
@@ -7,7 +7,7 @@ exports[`B2CPartnershipConfirmation renders as default 1`] = `
7
7
  </div>
8
8
  <div class="ncf__paragraph">
9
9
  <h1 class="ncf__header ncf__header--confirmation">
10
- Welcome to your 30 days&#x27; Premium access
10
+ Welcome to your Premium access
11
11
  </h1>
12
12
  </div>
13
13
  </div>
@@ -28,7 +28,7 @@ exports[`LicenceConfirmation renders if content id 1`] = `
28
28
  <a href="/content/d19dc7a6-c33b-4931-9a7e-4a74674da29a"
29
29
  class="ncf__link"
30
30
  >
31
- Start reading
31
+ Go to homepage
32
32
  </a>
33
33
  </p>
34
34
  </div>
@@ -62,7 +62,7 @@ exports[`LicenceConfirmation renders if educational licence 1`] = `
62
62
  <a href="/"
63
63
  class="ncf__link"
64
64
  >
65
- Start reading
65
+ Go to homepage
66
66
  </a>
67
67
  </p>
68
68
  </div>
@@ -97,7 +97,7 @@ exports[`LicenceConfirmation renders if is embedded 1`] = `
97
97
  class="ncf__link"
98
98
  target="_top"
99
99
  >
100
- Start reading
100
+ Go to homepage
101
101
  </a>
102
102
  </p>
103
103
  </div>
@@ -131,7 +131,7 @@ exports[`LicenceConfirmation renders if is trial 1`] = `
131
131
  <a href="/"
132
132
  class="ncf__link"
133
133
  >
134
- Start reading
134
+ Go to homepage
135
135
  </a>
136
136
  </p>
137
137
  </div>
@@ -165,7 +165,7 @@ exports[`LicenceConfirmation renders with custom duration value 1`] = `
165
165
  <a href="/"
166
166
  class="ncf__link"
167
167
  >
168
- Start reading
168
+ Go to homepage
169
169
  </a>
170
170
  </p>
171
171
  </div>
@@ -199,7 +199,7 @@ exports[`LicenceConfirmation renders with default props 1`] = `
199
199
  <a href="/"
200
200
  class="ncf__link"
201
201
  >
202
- Start reading
202
+ Go to homepage
203
203
  </a>
204
204
  </p>
205
205
  </div>
@@ -1,19 +1,19 @@
1
1
  // Jest Snapshot v1, https://goo.gl/fbAQLP
2
2
 
3
3
  exports[`LicenceHeader renders if is isB2cPartnershipLicence 1`] = `
4
- <h1 class="ncf__header ncf__center">
4
+ <h1 class="ncf__header">
5
5
  Welcome to the Financial Times
6
6
  </h1>
7
7
  `;
8
8
 
9
9
  exports[`LicenceHeader renders if is trial 1`] = `
10
- <h1 class="ncf__header ncf__center">
10
+ <h1 class="ncf__header">
11
11
  Welcome to the Financial Times
12
12
  </h1>
13
13
  `;
14
14
 
15
15
  exports[`LicenceHeader renders if url is defined 1`] = `
16
- <h1 class="ncf__header ncf__center">
16
+ <h1 class="ncf__header">
17
17
  Join your FT.com subscription
18
18
  </h1>
19
19
  <div class="ncf__center">
@@ -31,7 +31,7 @@ exports[`LicenceHeader renders if url is defined 1`] = `
31
31
  `;
32
32
 
33
33
  exports[`LicenceHeader renders with custom display name 1`] = `
34
- <h1 class="ncf__header ncf__center">
34
+ <h1 class="ncf__header">
35
35
  <span class="ncf__light-licence-text">
36
36
  Great news!
37
37
  <span class="ncf__bold-licence-text">
@@ -60,7 +60,7 @@ exports[`LicenceHeader renders with custom display name 1`] = `
60
60
  `;
61
61
 
62
62
  exports[`LicenceHeader renders with custom welcome text (that requires escaping, e.g. ampersand) 1`] = `
63
- <h1 class="ncf__header ncf__center">
63
+ <h1 class="ncf__header">
64
64
  Join your FT.com subscription
65
65
  </h1>
66
66
  <div class="ncf__center">
@@ -74,7 +74,7 @@ exports[`LicenceHeader renders with custom welcome text (that requires escaping,
74
74
  `;
75
75
 
76
76
  exports[`LicenceHeader renders with default props 1`] = `
77
- <h1 class="ncf__header ncf__center">
77
+ <h1 class="ncf__header">
78
78
  Join your FT.com subscription
79
79
  </h1>
80
80
  <div class="ncf__center">
@@ -1,19 +1,19 @@
1
1
  // Jest Snapshot v1, https://goo.gl/fbAQLP
2
2
 
3
3
  exports[`LicenceTitle renders if is isB2cPartnershipLicence 1`] = `
4
- <h1 class="ncf__header ncf__center">
4
+ <h1 class="ncf__header">
5
5
  Welcome to the Financial Times
6
6
  </h1>
7
7
  `;
8
8
 
9
9
  exports[`LicenceTitle renders if is trial 1`] = `
10
- <h1 class="ncf__header ncf__center">
10
+ <h1 class="ncf__header">
11
11
  Welcome to the Financial Times
12
12
  </h1>
13
13
  `;
14
14
 
15
15
  exports[`LicenceTitle renders with custom display name 1`] = `
16
- <h1 class="ncf__header ncf__center">
16
+ <h1 class="ncf__header">
17
17
  <span class="ncf__light-licence-text">
18
18
  Great news!
19
19
  <span class="ncf__bold-licence-text">
@@ -29,7 +29,7 @@ exports[`LicenceTitle renders with custom display name 1`] = `
29
29
  `;
30
30
 
31
31
  exports[`LicenceTitle renders with default props 1`] = `
32
- <h1 class="ncf__header ncf__center">
32
+ <h1 class="ncf__header">
33
33
  Join your FT.com subscription
34
34
  </h1>
35
35
  `;
@@ -19,7 +19,7 @@ export function B2CPartnershipConfirmation ({ ctaElement = null }) {
19
19
  <div className="ncf__paragraph">
20
20
  {
21
21
  <h1 className="ncf__header ncf__header--confirmation">
22
- {'Welcome to your 30 days\' Premium access'}
22
+ {'Welcome to your Premium access'}
23
23
  </h1>
24
24
  }
25
25
  </div>
@@ -20,8 +20,11 @@ export function DeliveryCity ({
20
20
  GBR: 'e.g. Bath',
21
21
  USA: 'e.g. Los Angeles',
22
22
  CAN: 'e.g. Montreal',
23
+ ARE: 'e.g. Dubai'
23
24
  };
24
25
 
26
+ const inputLabel = country === 'ARE'? 'Emirate or City':'City';
27
+
25
28
  return (
26
29
  <label
27
30
  id="deliveryCityField"
@@ -30,7 +33,7 @@ export function DeliveryCity ({
30
33
  htmlFor="deliveryCity"
31
34
  >
32
35
  <span className="o-forms-title">
33
- <span className="o-forms-title__main">City</span>
36
+ <span className="o-forms-title__main">{inputLabel}</span>
34
37
  </span>
35
38
  <span className={inputWrapperClassName}>
36
39
  <input
@@ -55,7 +55,7 @@ export function LicenceConfirmation ({
55
55
  )}
56
56
 
57
57
  <p className="ncf__paragraph ncf__center">
58
- <a {...readingLinkProps}>Start reading</a>
58
+ <a {...readingLinkProps}>Go to homepage</a>
59
59
  </p>
60
60
  </div>
61
61
  );
@@ -6,6 +6,7 @@ import { LicenceTitle } from './licence-title';
6
6
  export function LicenceHeader (props) {
7
7
  const {
8
8
  displayName = '',
9
+ logoUrl = '',
9
10
  isTrial = false,
10
11
  isB2cPartnershipLicence = false,
11
12
  welcomeText = '',
@@ -17,6 +18,10 @@ export function LicenceHeader (props) {
17
18
 
18
19
  return (
19
20
  <React.Fragment>
21
+ {Boolean(logoUrl) && (
22
+ <img className="ncf__logo" alt="logo" src={logoUrl}/>
23
+ )}
24
+
20
25
  <LicenceTitle
21
26
  displayName={displayName}
22
27
  isTrial={isTrial}
@@ -34,6 +39,7 @@ export function LicenceHeader (props) {
34
39
 
35
40
  LicenceHeader.propTypes = {
36
41
  displayName: PropTypes.string,
42
+ logoUrl: PropTypes.string,
37
43
  isTrial: PropTypes.bool,
38
44
  welcomeText: PropTypes.string,
39
45
  isB2cPartnershipLicence: PropTypes.bool,
@@ -8,7 +8,7 @@ export function LicenceTitle ({
8
8
  }) {
9
9
  if (isB2cPartnershipLicence || isTrial) {
10
10
  return (
11
- <h1 className="ncf__header ncf__center">
11
+ <h1 className="ncf__header">
12
12
  {displayName || 'Welcome to the Financial Times'}
13
13
  </h1>
14
14
  );
@@ -20,13 +20,11 @@ export function LicenceTitle ({
20
20
 
21
21
  function renderB2BTitle (displayName) {
22
22
  if (!displayName) {
23
- return (
24
- <h1 className="ncf__header ncf__center">Join your FT.com subscription</h1>
25
- );
23
+ return <h1 className="ncf__header">Join your FT.com subscription</h1>;
26
24
  }
27
25
 
28
26
  return (
29
- <h1 className="ncf__header ncf__center">
27
+ <h1 className="ncf__header">
30
28
  <span className="ncf__light-licence-text">
31
29
  Great news!
32
30
  <span className="ncf__bold-licence-text"> {displayName} </span>
@@ -32,7 +32,7 @@ function B2CPartnershipConfirmation(_ref) {
32
32
  className: "ncf__paragraph"
33
33
  }, /*#__PURE__*/_react["default"].createElement("h1", {
34
34
  className: "ncf__header ncf__header--confirmation"
35
- }, 'Welcome to your 30 days\' Premium access'))), /*#__PURE__*/_react["default"].createElement("p", {
35
+ }, 'Welcome to your Premium access'))), /*#__PURE__*/_react["default"].createElement("p", {
36
36
  className: "ncf__paragraph"
37
37
  }, "Please check your email to confirm your account and set your password."), /*#__PURE__*/_react["default"].createElement("p", {
38
38
  className: "ncf__paragraph"
@@ -30,8 +30,10 @@ function DeliveryCity(_ref) {
30
30
  var inputPlaceholder = {
31
31
  GBR: 'e.g. Bath',
32
32
  USA: 'e.g. Los Angeles',
33
- CAN: 'e.g. Montreal'
33
+ CAN: 'e.g. Montreal',
34
+ ARE: 'e.g. Dubai'
34
35
  };
36
+ var inputLabel = country === 'ARE' ? 'Emirate or City' : 'City';
35
37
  return /*#__PURE__*/_react["default"].createElement("label", {
36
38
  id: "deliveryCityField",
37
39
  className: "o-forms-field ncf__validation-error",
@@ -41,7 +43,7 @@ function DeliveryCity(_ref) {
41
43
  className: "o-forms-title"
42
44
  }, /*#__PURE__*/_react["default"].createElement("span", {
43
45
  className: "o-forms-title__main"
44
- }, "City")), /*#__PURE__*/_react["default"].createElement("span", {
46
+ }, inputLabel)), /*#__PURE__*/_react["default"].createElement("span", {
45
47
  className: inputWrapperClassName
46
48
  }, /*#__PURE__*/_react["default"].createElement("input", {
47
49
  type: "text",
@@ -63,7 +63,7 @@ function LicenceConfirmation(_ref) {
63
63
  href: "/myft"
64
64
  }, "Go to myFT")), /*#__PURE__*/_react["default"].createElement("p", {
65
65
  className: "ncf__paragraph ncf__center"
66
- }, /*#__PURE__*/_react["default"].createElement("a", readingLinkProps, "Start reading")));
66
+ }, /*#__PURE__*/_react["default"].createElement("a", readingLinkProps, "Go to homepage")));
67
67
  }
68
68
 
69
69
  LicenceConfirmation.propTypes = {
@@ -18,6 +18,8 @@ var _licenceTitle = require("./licence-title");
18
18
  function LicenceHeader(props) {
19
19
  var _props$displayName = props.displayName,
20
20
  displayName = _props$displayName === void 0 ? '' : _props$displayName,
21
+ _props$logoUrl = props.logoUrl,
22
+ logoUrl = _props$logoUrl === void 0 ? '' : _props$logoUrl,
21
23
  _props$isTrial = props.isTrial,
22
24
  isTrial = _props$isTrial === void 0 ? false : _props$isTrial,
23
25
  _props$isB2cPartnersh = props.isB2cPartnershipLicence,
@@ -33,7 +35,11 @@ function LicenceHeader(props) {
33
35
  };
34
36
  }
35
37
 
36
- return /*#__PURE__*/_react["default"].createElement(_react["default"].Fragment, null, /*#__PURE__*/_react["default"].createElement(_licenceTitle.LicenceTitle, {
38
+ return /*#__PURE__*/_react["default"].createElement(_react["default"].Fragment, null, Boolean(logoUrl) && /*#__PURE__*/_react["default"].createElement("img", {
39
+ className: "ncf__logo",
40
+ alt: "logo",
41
+ src: logoUrl
42
+ }), /*#__PURE__*/_react["default"].createElement(_licenceTitle.LicenceTitle, {
37
43
  displayName: displayName,
38
44
  isTrial: isTrial,
39
45
  isB2cPartnershipLicence: isB2cPartnershipLicence
@@ -47,6 +53,7 @@ function LicenceHeader(props) {
47
53
 
48
54
  LicenceHeader.propTypes = {
49
55
  displayName: _propTypes["default"].string,
56
+ logoUrl: _propTypes["default"].string,
50
57
  isTrial: _propTypes["default"].bool,
51
58
  welcomeText: _propTypes["default"].string,
52
59
  isB2cPartnershipLicence: _propTypes["default"].bool,
@@ -21,7 +21,7 @@ function LicenceTitle(_ref) {
21
21
 
22
22
  if (isB2cPartnershipLicence || isTrial) {
23
23
  return /*#__PURE__*/_react["default"].createElement("h1", {
24
- className: "ncf__header ncf__center"
24
+ className: "ncf__header"
25
25
  }, displayName || 'Welcome to the Financial Times');
26
26
  }
27
27
 
@@ -33,12 +33,12 @@ function LicenceTitle(_ref) {
33
33
  function renderB2BTitle(displayName) {
34
34
  if (!displayName) {
35
35
  return /*#__PURE__*/_react["default"].createElement("h1", {
36
- className: "ncf__header ncf__center"
36
+ className: "ncf__header"
37
37
  }, "Join your FT.com subscription");
38
38
  }
39
39
 
40
40
  return /*#__PURE__*/_react["default"].createElement("h1", {
41
- className: "ncf__header ncf__center"
41
+ className: "ncf__header"
42
42
  }, /*#__PURE__*/_react["default"].createElement("span", {
43
43
  className: "ncf__light-licence-text"
44
44
  }, "Great news!", /*#__PURE__*/_react["default"].createElement("span", {
@@ -4,7 +4,6 @@ const { printRegions } = require('./constants');
4
4
  const supportedCountriesMasterList = {
5
5
  cemeaV1: {
6
6
  AUT: 'Austria',
7
- ARE: 'United Arab Emirates',
8
7
  BEL: 'Belgium',
9
8
  BGR: 'Bulgaria',
10
9
  HRV: 'Croatia',
@@ -49,7 +48,8 @@ const supportedCountriesMasterList = {
49
48
  other: {
50
49
  GBR: 'United Kingdom',
51
50
  USA: 'United States',
52
- CAN: 'Canada'
51
+ CAN: 'Canada',
52
+ ARE: 'United Arab Emirates'
53
53
  }
54
54
  };
55
55
 
package/main.scss CHANGED
@@ -432,6 +432,12 @@
432
432
  }
433
433
  }
434
434
 
435
+ &__logo {
436
+ display: block;
437
+ margin: 0 auto 2rem;
438
+ width: 40%;
439
+ }
440
+
435
441
  @include ncfMessage();
436
442
  @include ncfPackageChange();
437
443
  @include ncfPaymentTerm();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@financial-times/n-conversion-forms",
3
- "version": "27.2.1",
3
+ "version": "27.2.3",
4
4
  "description": "Containing jsx components and styles for forms included on Accounts and Acqusition apps (next-signup, next-profile, next-retention, etc).",
5
5
  "main": "dist/index.js",
6
6
  "scripts": {