@financial-times/n-conversion-forms 20.3.2 → 20.4.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.
Files changed (119) hide show
  1. package/.circleci/config.yml +7 -5
  2. package/.circleci/shared-helpers/helper-npm-install-peer-deps +6 -6
  3. package/.eslintignore +3 -0
  4. package/.github/workflows/gh-pages-deploy.yml +2 -1
  5. package/build-state/npm-shrinkwrap.json +47022 -9009
  6. package/components/__snapshots__/accept-terms.spec.js.snap +94 -6
  7. package/components/__snapshots__/delivery-address.spec.js.snap +2 -2
  8. package/components/__snapshots__/graduation-date.spec.js.snap +3 -3
  9. package/components/accept-terms.jsx +67 -9
  10. package/components/accept-terms.spec.js +12 -0
  11. package/components/app-banner.jsx +1 -1
  12. package/components/b2c-partnership-confirmation.jsx +2 -2
  13. package/components/b2c-partnership-payment-term.jsx +1 -1
  14. package/components/billing-city.jsx +1 -1
  15. package/components/billing-country.jsx +1 -1
  16. package/components/billing-postcode.jsx +1 -1
  17. package/components/company-name.jsx +1 -1
  18. package/components/confirmation.jsx +1 -1
  19. package/components/continue-reading.jsx +1 -1
  20. package/components/continue-reading.stories.js +1 -1
  21. package/components/country.jsx +1 -1
  22. package/components/customer-care.jsx +1 -1
  23. package/components/debug.jsx +1 -1
  24. package/components/decision-maker.jsx +1 -1
  25. package/components/decision-maker.spec.js +1 -1
  26. package/components/delivery-address-type.jsx +1 -1
  27. package/components/delivery-address.jsx +5 -5
  28. package/components/delivery-city.jsx +1 -1
  29. package/components/delivery-county.jsx +1 -1
  30. package/components/delivery-instructions.jsx +1 -1
  31. package/components/delivery-option.jsx +1 -1
  32. package/components/delivery-po-box.jsx +1 -1
  33. package/components/delivery-postcode.jsx +1 -1
  34. package/components/delivery-security-instructions.jsx +1 -1
  35. package/components/delivery-start-date.jsx +1 -1
  36. package/components/education-job-title.jsx +1 -1
  37. package/components/email.jsx +1 -1
  38. package/components/error-page.jsx +1 -1
  39. package/components/fieldset.jsx +1 -1
  40. package/components/first-name.jsx +1 -1
  41. package/components/form.jsx +1 -1
  42. package/components/google-sign-in.jsx +1 -1
  43. package/components/graduation-date.jsx +1 -1
  44. package/components/industry.jsx +1 -1
  45. package/components/job-title.jsx +1 -1
  46. package/components/last-name.jsx +1 -1
  47. package/components/licence-confirmation.jsx +1 -1
  48. package/components/licence-header.jsx +2 -2
  49. package/components/licence-sign-in.jsx +2 -2
  50. package/components/licence-title.jsx +2 -2
  51. package/components/lite-sub-confirmation.jsx +1 -1
  52. package/components/loader.jsx +1 -1
  53. package/components/message.jsx +1 -1
  54. package/components/organisation.jsx +1 -1
  55. package/components/package-change.jsx +1 -1
  56. package/components/password.jsx +1 -1
  57. package/components/payment-term.jsx +1 -1
  58. package/components/payment-type.jsx +2 -2
  59. package/components/personal-title.jsx +1 -1
  60. package/components/phone.jsx +1 -1
  61. package/components/position.jsx +1 -1
  62. package/components/progress-indicator.jsx +3 -3
  63. package/components/province.jsx +1 -1
  64. package/components/registration-confirmation.jsx +1 -1
  65. package/components/responsibility.jsx +1 -1
  66. package/components/section.jsx +1 -1
  67. package/components/state.jsx +1 -1
  68. package/components/submit.jsx +1 -1
  69. package/components/trial-banner.jsx +1 -1
  70. package/dist/accept-terms.js +42 -7
  71. package/dist/b2c-partnership-confirmation.js +1 -1
  72. package/dist/confirmation.js +2 -2
  73. package/dist/continue-reading.js +2 -2
  74. package/dist/decision-maker.js +2 -2
  75. package/dist/delivery-address.js +4 -4
  76. package/dist/delivery-instructions.js +2 -2
  77. package/dist/delivery-security-instructions.js +2 -2
  78. package/dist/delivery-start-date.js +2 -2
  79. package/dist/fieldset.js +2 -2
  80. package/dist/licence-confirmation.js +2 -2
  81. package/dist/loader.js +2 -2
  82. package/dist/message.spec.js +2 -2
  83. package/dist/payment-term.js +2 -2
  84. package/dist/payment-type.js +3 -3
  85. package/package.json +10 -6
  86. package/test-jest/helpers/expect-to-render-correctly.js +1 -1
  87. package/utils/app-banner.js +1 -1
  88. package/utils/apple-pay.js +15 -15
  89. package/utils/billing-city.js +1 -1
  90. package/utils/billing-country.js +3 -3
  91. package/utils/billing-postcode.js +1 -1
  92. package/utils/company-name.js +1 -1
  93. package/utils/countries.js +2 -2
  94. package/utils/country.js +3 -3
  95. package/utils/delivery-address-type.js +3 -3
  96. package/utils/delivery-address.js +1 -1
  97. package/utils/delivery-instructions.js +1 -1
  98. package/utils/delivery-option-messages.js +11 -11
  99. package/utils/delivery-option-messages.spec.js +2 -2
  100. package/utils/delivery-option.js +5 -5
  101. package/utils/delivery-po-box.js +1 -1
  102. package/utils/delivery-postcode.js +1 -1
  103. package/utils/delivery-start-date.js +4 -4
  104. package/utils/email.js +4 -4
  105. package/utils/event-notifier.js +1 -1
  106. package/utils/form-element.js +8 -8
  107. package/utils/loader.js +10 -10
  108. package/utils/password.js +2 -2
  109. package/utils/payment-term.js +5 -5
  110. package/utils/payment-type.js +12 -12
  111. package/utils/postcode.js +3 -3
  112. package/utils/province.js +1 -1
  113. package/utils/salesforce.js +2 -2
  114. package/utils/state.js +1 -1
  115. package/utils/submit.js +5 -5
  116. package/utils/tracking.js +7 -7
  117. package/utils/validation.js +10 -10
  118. package/utils/zuora-error-map.js +5 -5
  119. package/utils/zuora.js +22 -12
@@ -1,5 +1,93 @@
1
1
  // Jest Snapshot v1, https://goo.gl/fbAQLP
2
2
 
3
+ exports[`AcceptTerms renders appropriately if a isAuthFirstAccount 1`] = `
4
+ <div id="acceptTermsField"
5
+ class="o-forms-field o-layout-typography ncf__validation-error"
6
+ data-validate="required,checked"
7
+ >
8
+ <ul class="o-typography-list ncf__accept-terms-list">
9
+ <li>
10
+ <span class="terms-auth-first-step">
11
+ For more information about how we use your data, please refer to our
12
+ <a class="ncf__link--external"
13
+ href="http://help.ft.com/help/legal-privacy/terms-conditions/"
14
+ target="_blank"
15
+ rel="noopener noreferrer"
16
+ data-trackable="terms-and-conditions"
17
+ >
18
+ privacy
19
+ </a>
20
+ and 
21
+ <a class="ncf__link--external"
22
+ href="http://help.ft.com/help/legal-privacy/terms-conditions/"
23
+ target="_blank"
24
+ rel="noopener noreferrer"
25
+ data-trackable="terms-and-conditions"
26
+ >
27
+ cookie
28
+ </a>
29
+ policies.
30
+ </span>
31
+ </li>
32
+ </ul>
33
+ <label class="o-forms-input o-forms-input--checkbox"
34
+ for="termsAcceptance"
35
+ >
36
+ <input type="checkbox"
37
+ id="termsAcceptance"
38
+ name="termsAcceptance"
39
+ value="true"
40
+ data-trackable="field-terms"
41
+ aria-required="true"
42
+ required
43
+ >
44
+ <span class="o-forms-input__label terms-auth-first-step">
45
+ I confirm that I am 16 years or older and agree to the full
46
+ <a class="ncf__link--external"
47
+ href="http://help.ft.com/help/legal-privacy/terms-conditions/"
48
+ target="_blank"
49
+ rel="noopener noreferrer"
50
+ data-trackable="terms-and-conditions"
51
+ >
52
+ Terms &amp; Conditions
53
+ </a>
54
+ .
55
+ </span>
56
+ <p class="o-forms-input__error">
57
+ Please accept our terms &amp; conditions
58
+ </p>
59
+ </label>
60
+ </div>
61
+ `;
62
+
63
+ exports[`AcceptTerms renders appropriately if a isAuthFirstPayment 1`] = `
64
+ <div id="acceptTermsField"
65
+ class="o-forms-field o-layout-typography ncf__validation-error"
66
+ data-validate="required,checked"
67
+ >
68
+ <ul class="o-typography-list ncf__accept-terms-list">
69
+ </ul>
70
+ <label class="o-forms-input o-forms-input--checkbox"
71
+ for="termsAcceptance"
72
+ >
73
+ <input type="checkbox"
74
+ id="termsAcceptance"
75
+ name="termsAcceptance"
76
+ value="true"
77
+ data-trackable="field-terms"
78
+ aria-required="true"
79
+ required
80
+ >
81
+ <span class="o-forms-input__label">
82
+ I agree to the above terms &amp; conditions.
83
+ </span>
84
+ <p class="o-forms-input__error">
85
+ Please accept our terms &amp; conditions
86
+ </p>
87
+ </label>
88
+ </div>
89
+ `;
90
+
3
91
  exports[`AcceptTerms renders appropriately if a registration 1`] = `
4
92
  <div id="acceptTermsField"
5
93
  class="o-forms-field o-layout-typography ncf__validation-error"
@@ -72,7 +160,7 @@ exports[`AcceptTerms renders appropriately if a signup 1`] = `
72
160
  </li>
73
161
  <li>
74
162
  <span class="terms-signup">
75
- By placing my order, my subscription will start immediately. Cancellation notice would take effect at the end of the subscription period and previously paid amounts are non-refundable.
163
+ By placing my order, my subscription will start immediately and I am aware and agree that I will therefore lose my statutory right to cancel my subscription within 14 days of acceptance of my order. Any notice of cancellation that I provide will only take effect at the end of my subscription period and previously paid amounts are non-refundable, except in the event that there is a fault in the provision of the services.
76
164
  </span>
77
165
  </li>
78
166
  <li>
@@ -146,7 +234,7 @@ exports[`AcceptTerms renders appropriately if a signup and has special terms 1`]
146
234
  </li>
147
235
  <li>
148
236
  <span class="terms-signup">
149
- By placing my order, my subscription will start immediately. Cancellation notice would take effect at the end of the subscription period and previously paid amounts are non-refundable.
237
+ By placing my order, my subscription will start immediately and I am aware and agree that I will therefore lose my statutory right to cancel my subscription within 14 days of acceptance of my order. Any notice of cancellation that I provide will only take effect at the end of my subscription period and previously paid amounts are non-refundable, except in the event that there is a fault in the provision of the services.
150
238
  </span>
151
239
  </li>
152
240
  <li>
@@ -408,7 +496,7 @@ exports[`AcceptTerms renders appropriately if a signup not for the print product
408
496
  </li>
409
497
  <li>
410
498
  <span class="terms-signup">
411
- By placing my order, my subscription will start immediately. Cancellation notice would take effect at the end of the subscription period and previously paid amounts are non-refundable.
499
+ By placing my order, my subscription will start immediately and I am aware and agree that I will therefore lose my statutory right to cancel my subscription within 14 days of acceptance of my order. Any notice of cancellation that I provide will only take effect at the end of my subscription period and previously paid amounts are non-refundable, except in the event that there is a fault in the provision of the services.
412
500
  </span>
413
501
  </li>
414
502
  <li>
@@ -482,7 +570,7 @@ exports[`AcceptTerms renders appropriately if a signup not for the print product
482
570
  </li>
483
571
  <li>
484
572
  <span class="terms-signup">
485
- By placing my order, my subscription will start immediately. Cancellation notice would take effect at the end of the subscription period and previously paid amounts are non-refundable.
573
+ By placing my order, my subscription will start immediately and I am aware and agree that I will therefore lose my statutory right to cancel my subscription within 14 days of acceptance of my order. Any notice of cancellation that I provide will only take effect at the end of my subscription period and previously paid amounts are non-refundable, except in the event that there is a fault in the provision of the services.
486
574
  </span>
487
575
  </li>
488
576
  <li>
@@ -556,7 +644,7 @@ exports[`AcceptTerms renders appropriately if a signup not for the print product
556
644
  </li>
557
645
  <li>
558
646
  <span class="terms-signup">
559
- By placing my order, my subscription will start immediately. Cancellation notice would take effect at the end of the subscription period and previously paid amounts are non-refundable.
647
+ By placing my order, my subscription will start immediately and I am aware and agree that I will therefore lose my statutory right to cancel my subscription within 14 days of acceptance of my order. Any notice of cancellation that I provide will only take effect at the end of my subscription period and previously paid amounts are non-refundable, except in the event that there is a fault in the provision of the services.
560
648
  </span>
561
649
  </li>
562
650
  <li>
@@ -1155,7 +1243,7 @@ exports[`AcceptTerms renders appropriately if is transition with transition type
1155
1243
  </li>
1156
1244
  <li>
1157
1245
  <span class="terms-transition terms-transition--immediate">
1158
- By placing my order, my subscription will start immediately. Cancellation notice would take effect at the end of the subscription period and previously paid amounts are non-refundable.
1246
+ By placing my order, my subscription will start immediately and I am aware and agree that I will therefore lose my statutory right to cancel my subscription within 14 days of acceptance of my order. Any notice of cancellation that I provide will only take effect at the end of my subscription period and previously paid amounts are non-refundable, except in the event that there is a fault in the provision of the services.
1159
1247
  </span>
1160
1248
  </li>
1161
1249
  <li>
@@ -185,7 +185,7 @@ exports[`DeliveryAddress renders with country different than default 1`] = `
185
185
  >
186
186
  <span class="o-forms-title">
187
187
  <span class="o-forms-title__main">
188
- Apt/Floor/Suite
188
+ APT/FL/STE
189
189
  </span>
190
190
  <span class="o-forms-title__prompt">
191
191
  Max. 6 characters. Please enter “Apartment 2C” as “Apt 2C”, “Floor 10 as FL 10”
@@ -197,7 +197,7 @@ exports[`DeliveryAddress renders with country different than default 1`] = `
197
197
  name="deliveryAddressLine3"
198
198
  data-trackable="field-deliveryAddressLine3"
199
199
  autocomplete="address-line3"
200
- placeholder="e.g Apt 2c / FL 10 / STE 5"
200
+ placeholder="e.g Apt 2C / FL 10 / STE 50"
201
201
  maxlength="50"
202
202
  value
203
203
  >
@@ -71,9 +71,6 @@ exports[`GraduationDate renders with default props 1`] = `
71
71
  name="graduationDateYear"
72
72
  aria-required="false"
73
73
  >
74
- <option value="2017">
75
- 2017
76
- </option>
77
74
  <option value="2018">
78
75
  2018
79
76
  </option>
@@ -98,6 +95,9 @@ exports[`GraduationDate renders with default props 1`] = `
98
95
  <option value="2025">
99
96
  2025
100
97
  </option>
98
+ <option value="2026">
99
+ 2026
100
+ </option>
101
101
  </select>
102
102
  </span>
103
103
  </div>
@@ -4,7 +4,9 @@ import classNames from 'classnames';
4
4
 
5
5
  const DEFAULT_AGE_RESTRICTION = '16';
6
6
 
7
- export function AcceptTerms({
7
+ export function AcceptTerms ({
8
+ isAuthFirstAccount = false,
9
+ isAuthFirstPayment = false,
8
10
  hasError = false,
9
11
  isSignup = false,
10
12
  isRegister = false,
@@ -46,6 +48,54 @@ export function AcceptTerms({
46
48
  ...(isChecked && { defaultChecked: true }),
47
49
  };
48
50
 
51
+ const authFirstStepTerms = (
52
+ <>
53
+ <ul className="o-typography-list ncf__accept-terms-list">
54
+ <li>
55
+ <span className="terms-auth-first-step">
56
+ For more information about how we use your data, please refer to our <a
57
+ className="ncf__link--external"
58
+ href="http://help.ft.com/help/legal-privacy/terms-conditions/"
59
+ target='_blank'
60
+ rel="noopener noreferrer"
61
+ data-trackable="terms-and-conditions"
62
+ >
63
+ privacy
64
+ </a> and&nbsp;
65
+ <a
66
+ className="ncf__link--external"
67
+ href="http://help.ft.com/help/legal-privacy/terms-conditions/"
68
+ target='_blank'
69
+ rel="noopener noreferrer"
70
+ data-trackable="terms-and-conditions"
71
+ >
72
+ cookie
73
+ </a> policies.
74
+ </span>
75
+ </li>
76
+ </ul>
77
+ <label className={labelClassName} htmlFor="termsAcceptance">
78
+ <input {...inputProps} />
79
+ <span className="o-forms-input__label terms-auth-first-step">
80
+ I confirm that I am {ageRestriction} years or older and agree to the full {' '}
81
+ <a
82
+ className="ncf__link--external"
83
+ href="http://help.ft.com/help/legal-privacy/terms-conditions/"
84
+ target={isEmbedded ? '_top' : '_blank'}
85
+ rel="noopener noreferrer"
86
+ data-trackable="terms-and-conditions"
87
+ >
88
+ Terms &amp; Conditions
89
+ </a>
90
+ .
91
+ </span>
92
+ <p className="o-forms-input__error">
93
+ Please accept our terms &amp; conditions
94
+ </p>
95
+ </label>
96
+ </>
97
+ );
98
+
49
99
  const registerTerms = (
50
100
  <label className={labelClassName} htmlFor="termsAcceptance">
51
101
  <input {...inputProps} />
@@ -154,9 +204,12 @@ export function AcceptTerms({
154
204
  {transitionType === 'immediate' ? (
155
205
  <li>
156
206
  <span className="terms-transition terms-transition--immediate">
157
- By placing my order, my subscription will start immediately.
158
- Cancellation notice would take effect at the end of the subscription
159
- period and previously paid amounts are non-refundable.
207
+ By placing my order, my subscription will start immediately and I am
208
+ aware and agree that I will therefore lose my statutory right to cancel my
209
+ subscription within 14 days of acceptance of my order. Any notice of
210
+ cancellation that I provide will only take effect at the end of my subscription
211
+ period and previously paid amounts are non-refundable, except in the event that
212
+ there is a fault in the provision of the services.
160
213
  </span>
161
214
  </li>
162
215
  ) : (
@@ -192,6 +245,7 @@ export function AcceptTerms({
192
245
  const printSignupTermText = isTrial
193
246
  ? 'Credits for delivery suspension or delivery failure are not available during introductory offer periods.'
194
247
  : 'Credit for delivery suspensions is only available for hand-delivered subscriptions and is limited to a maximum of 24 issues per yearly subscription terms (4 issues per yearly FT Weekend subscription term).';
248
+
195
249
  const signupTerms = isSignup && (
196
250
  <>
197
251
  {isPrintProduct ? (
@@ -234,10 +288,12 @@ export function AcceptTerms({
234
288
  </li>
235
289
  <li>
236
290
  <span className="terms-signup">
237
- By placing my order, my subscription will start immediately.
238
- Cancellation notice would take effect at the end of the
239
- subscription period and previously paid amounts are
240
- non-refundable.
291
+ By placing my order, my subscription will start immediately and I am
292
+ aware and agree that I will therefore lose my statutory right to cancel
293
+ my subscription within 14 days of acceptance of my order. Any notice of
294
+ cancellation that I provide will only take effect at the end of my
295
+ subscription period and previously paid amounts are non-refundable,
296
+ except in the event that there is a fault in the provision of the services.
241
297
  </span>
242
298
  </li>
243
299
  <li>
@@ -294,10 +350,12 @@ export function AcceptTerms({
294
350
  b2cPartnershipTerms
295
351
  ) : isRegister ? (
296
352
  registerTerms
353
+ ) : isAuthFirstAccount ? (
354
+ authFirstStepTerms
297
355
  ) : (
298
356
  <>
299
357
  <ul className="o-typography-list ncf__accept-terms-list">
300
- {b2bTerms}
358
+ {!isAuthFirstPayment && b2bTerms}
301
359
  {corpSignupTerms}
302
360
  {transitionTerms}
303
361
  {signupTerms}
@@ -16,6 +16,18 @@ describe('AcceptTerms', () => {
16
16
  expect(AcceptTerms).toRenderCorrectly(props);
17
17
  });
18
18
 
19
+ it('renders appropriately if a isAuthFirstAccount', () => {
20
+ const props = { isAuthFirstAccount: true };
21
+
22
+ expect(AcceptTerms).toRenderCorrectly(props);
23
+ });
24
+
25
+ it('renders appropriately if a isAuthFirstPayment', () => {
26
+ const props = { isAuthFirstPayment: true };
27
+
28
+ expect(AcceptTerms).toRenderCorrectly(props);
29
+ });
30
+
19
31
  it('renders appropriately if a signup', () => {
20
32
  const props = { isSignup: true };
21
33
 
@@ -1,6 +1,6 @@
1
1
  import React from 'react';
2
2
 
3
- export function AppBanner() {
3
+ export function AppBanner () {
4
4
  return (
5
5
  <div id="appBanner" className="ncf ncf__app-banner">
6
6
  <div className="ncf__app-banner-inner">
@@ -1,7 +1,7 @@
1
1
  import React from 'react';
2
2
  import PropTypes from 'prop-types';
3
3
 
4
- export function B2CPartnershipConfirmation({ ctaElement = null }) {
4
+ export function B2CPartnershipConfirmation ({ ctaElement = null }) {
5
5
  const readingLinkProps = {
6
6
  href: '/',
7
7
  className: 'ncf__link',
@@ -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 three months' Premium access"}
22
+ {'Welcome to your three months\' Premium access'}
23
23
  </h1>
24
24
  }
25
25
  </div>
@@ -1,7 +1,7 @@
1
1
  import React from 'react';
2
2
  import PropTypes from 'prop-types';
3
3
 
4
- export function B2cPartnershipPaymentTerm({
4
+ export function B2cPartnershipPaymentTerm ({
5
5
  fieldId = 'paymentTermField',
6
6
  inputName = 'paymentTerm',
7
7
  options = [],
@@ -2,7 +2,7 @@ import React from 'react';
2
2
  import PropTypes from 'prop-types';
3
3
  import classNames from 'classnames';
4
4
 
5
- export function BillingCity({
5
+ export function BillingCity ({
6
6
  hasError = false,
7
7
  value = '',
8
8
  isDisabled = false,
@@ -3,7 +3,7 @@ import PropTypes from 'prop-types';
3
3
  import classNames from 'classnames';
4
4
  import { getCountries } from '../utils/countries';
5
5
 
6
- export function BillingCountry({
6
+ export function BillingCountry ({
7
7
  fieldId = 'billingCountryField',
8
8
  filterList = [],
9
9
  hasError = false,
@@ -2,7 +2,7 @@ import React from 'react';
2
2
  import PropTypes from 'prop-types';
3
3
  import classNames from 'classnames';
4
4
 
5
- export function BillingPostcode({
5
+ export function BillingPostcode ({
6
6
  postcodeReference,
7
7
  value = '',
8
8
  pattern = null,
@@ -2,7 +2,7 @@ import React from 'react';
2
2
  import PropTypes from 'prop-types';
3
3
  import classNames from 'classnames';
4
4
 
5
- export function CompanyName({
5
+ export function CompanyName ({
6
6
  fieldId = 'companyNameField',
7
7
  hasError = false,
8
8
  inputId = 'companyName',
@@ -3,7 +3,7 @@ import PropTypes from 'prop-types';
3
3
 
4
4
  const EMAIL_DEFAULT_TEXT = 'your email';
5
5
 
6
- export function Confirmation({
6
+ export function Confirmation ({
7
7
  // isTrial prop is needed for the floodlight pixel tracking.
8
8
  isTrial = false,
9
9
  isB2cPartnership = false,
@@ -1,7 +1,7 @@
1
1
  import React from 'react';
2
2
  import PropTypes from 'prop-types';
3
3
 
4
- export function ContinueReading({
4
+ export function ContinueReading ({
5
5
  link = null,
6
6
  quote = '',
7
7
  isEmbedded = false,
@@ -9,6 +9,6 @@ export default {
9
9
  export const Basic = (args) => <ContinueReading {...args} />;
10
10
  Basic.args = {
11
11
  quote:
12
- "The problem with quotes found on the internet, is that they're often not true - Abraham Lincoln",
12
+ 'The problem with quotes found on the internet, is that they\'re often not true - Abraham Lincoln',
13
13
  link: 'https://ft.com/world',
14
14
  };
@@ -3,7 +3,7 @@ import PropTypes from 'prop-types';
3
3
  import classNames from 'classnames';
4
4
  import { getCountries } from '../utils/countries';
5
5
 
6
- export function Country({
6
+ export function Country ({
7
7
  fieldId = 'countryField',
8
8
  filterList = [],
9
9
  hasError = false,
@@ -6,7 +6,7 @@ const DEFAULT_HEADER_TEXT = 'Sorry, this is not available online';
6
6
  const DEFAULT_MESSAGE_TEXT =
7
7
  'Speak now to our Customer Care team to discuss your options';
8
8
 
9
- export function CustomerCare({
9
+ export function CustomerCare ({
10
10
  header = DEFAULT_HEADER_TEXT,
11
11
  isCompact = false,
12
12
  message = DEFAULT_MESSAGE_TEXT,
@@ -1,7 +1,7 @@
1
1
  import React from 'react';
2
2
  import PropTypes from 'prop-types';
3
3
 
4
- export function Debug({ isTest = false, showHelpers = false, links = {} }) {
4
+ export function Debug ({ isTest = false, showHelpers = false, links = {} }) {
5
5
  // Strings are used rather than JSX as this component is injected into HTML
6
6
  // along with onclick handlers, styles and javascript. JSX will escape and
7
7
  // modify the HTML which we do not want. Once our applications are on JSX
@@ -2,7 +2,7 @@ import React from 'react';
2
2
  import PropTypes from 'prop-types';
3
3
  import classNames from 'classnames';
4
4
 
5
- export function DecisionMaker({ hasError = false, value = 'yes' }) {
5
+ export function DecisionMaker ({ hasError = false, value = 'yes' }) {
6
6
  const radioButtonsWrapperClassNames = classNames([
7
7
  'o-forms-input',
8
8
  'o-forms-input--radio-box',
@@ -16,7 +16,7 @@ describe('DecisionMaker', () => {
16
16
  expect(DecisionMaker).toRenderCorrectly(props);
17
17
  });
18
18
 
19
- it("renders with 'no' as default state for radio buttons", () => {
19
+ it('renders with \'no\' as default state for radio buttons', () => {
20
20
  const props = { value: 'no' };
21
21
 
22
22
  expect(DecisionMaker).toRenderCorrectly(props);
@@ -7,7 +7,7 @@ const addressTypes = [
7
7
  { id: 'pobox', label: 'P.O. Box' },
8
8
  ];
9
9
 
10
- export function DeliveryAddressType({
10
+ export function DeliveryAddressType ({
11
11
  value = 'home',
12
12
  fieldId = 'deliveryAddressTypeField',
13
13
  inputName = 'deliveryAddressType',
@@ -2,7 +2,7 @@ import React from 'react';
2
2
  import PropTypes from 'prop-types';
3
3
  import classNames from 'classnames';
4
4
 
5
- export function DeliveryAddress({
5
+ export function DeliveryAddress ({
6
6
  fieldId = 'deliveryAddressFields',
7
7
  hasError = false,
8
8
  line1 = '',
@@ -22,8 +22,8 @@ export function DeliveryAddress({
22
22
 
23
23
  const addressLine3Title = {
24
24
  GBR: 'Address line 3',
25
- USA: 'Apt/Floor/Suite',
26
- CAN: 'Apt/Floor/Suite',
25
+ USA: 'APT/FL/STE',
26
+ CAN: 'APT/FL/STE',
27
27
  };
28
28
 
29
29
  const addressLine3Prompt = {
@@ -32,8 +32,8 @@ export function DeliveryAddress({
32
32
  };
33
33
 
34
34
  const addressLine3Placeholder = {
35
- USA: 'e.g Apt 2c / FL 10 / STE 5',
36
- CAN: 'e.g Apt 2c / FL 10 / STE 5',
35
+ USA: 'e.g Apt 2C / FL 10 / STE 50',
36
+ CAN: 'e.g Apt 2C / FL 10 / STE 50',
37
37
  };
38
38
 
39
39
  const addressLine1Placeholder = {
@@ -2,7 +2,7 @@ import React from 'react';
2
2
  import PropTypes from 'prop-types';
3
3
  import classNames from 'classnames';
4
4
 
5
- export function DeliveryCity({
5
+ export function DeliveryCity ({
6
6
  hasError = false,
7
7
  value = '',
8
8
  isDisabled = false,
@@ -2,7 +2,7 @@ import React from 'react';
2
2
  import PropTypes from 'prop-types';
3
3
  import classNames from 'classnames';
4
4
 
5
- export function DeliveryCounty({
5
+ export function DeliveryCounty ({
6
6
  hasError = false,
7
7
  value = '',
8
8
  isDisabled = false,
@@ -34,7 +34,7 @@ const spanMessageByCountry = {
34
34
  ),
35
35
  };
36
36
 
37
- export function DeliveryInstructions({
37
+ export function DeliveryInstructions ({
38
38
  fieldId = 'deliveryInstructionsField',
39
39
  hasError = false,
40
40
  inputId = 'deliveryInstructions',
@@ -3,7 +3,7 @@ import PropTypes from 'prop-types';
3
3
  import classNames from 'classnames';
4
4
  import { getDeliveryOption } from '../utils/delivery-option-messages';
5
5
 
6
- export function DeliveryOption({
6
+ export function DeliveryOption ({
7
7
  fieldId = 'deliveryOptionField',
8
8
  country,
9
9
  productCode = undefined,
@@ -7,7 +7,7 @@ const message = {
7
7
  CAN: 'A P.O. Box address is only deliverable by Canada Post, and is subject to a delay of up to 3 business days. For delivery on the publication day, we recommend you enter a residential or business address.',
8
8
  };
9
9
 
10
- export function DeliveryPOBox({
10
+ export function DeliveryPOBox ({
11
11
  fieldId = 'deliveryPOBoxField',
12
12
  inputId = 'deliveryPOBox',
13
13
  hasError = false,
@@ -17,7 +17,7 @@ const placeholderLabel = {
17
17
  CAN: 'e.g. M4W 2C6',
18
18
  };
19
19
 
20
- export function DeliveryPostcode({
20
+ export function DeliveryPostcode ({
21
21
  value = '',
22
22
  country = '',
23
23
  isDisabled = false,
@@ -2,7 +2,7 @@ import React from 'react';
2
2
  import PropTypes from 'prop-types';
3
3
  import classNames from 'classnames';
4
4
 
5
- export function DeliverySecurityInstructions({
5
+ export function DeliverySecurityInstructions ({
6
6
  fieldId = 'deliverySecurityInstructionsField',
7
7
  hasError = false,
8
8
  inputId = 'deliverySecurityInstructions',
@@ -2,7 +2,7 @@ import React from 'react';
2
2
  import PropTypes from 'prop-types';
3
3
  import classNames from 'classnames';
4
4
 
5
- export function DeliveryStartDate({
5
+ export function DeliveryStartDate ({
6
6
  hasError = false,
7
7
  date = '',
8
8
  value = '',
@@ -2,7 +2,7 @@ import React from 'react';
2
2
  import PropTypes from 'prop-types';
3
3
  import classNames from 'classnames';
4
4
 
5
- export function EducationJobTitle({
5
+ export function EducationJobTitle ({
6
6
  value = '',
7
7
  isDisabled = false,
8
8
  hasError = false,
@@ -2,7 +2,7 @@ import React from 'react';
2
2
  import PropTypes from 'prop-types';
3
3
  import classNames from 'classnames';
4
4
 
5
- export function Email({
5
+ export function Email ({
6
6
  dataTrackable = 'field-email',
7
7
  description = 'Please enter an email address',
8
8
  errorText = 'This email address is not valid',
@@ -1,7 +1,7 @@
1
1
  import React from 'react';
2
2
  import PropTypes from 'prop-types';
3
3
 
4
- export function ErrorPage({
4
+ export function ErrorPage ({
5
5
  children,
6
6
  header = 'Sorry, something went wrong',
7
7
  message = 'Speak to our Customer Care team now so we can help.',
@@ -2,7 +2,7 @@ import React from 'react';
2
2
  import PropTypes from 'prop-types';
3
3
  import classNames from 'classnames';
4
4
 
5
- export function Fieldset({
5
+ export function Fieldset ({
6
6
  children = null,
7
7
  name = null,
8
8
  legend = null,