@financial-times/n-conversion-forms 20.3.3 → 20.3.4
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.
- package/.circleci/config.yml +7 -5
- package/.circleci/shared-helpers/helper-npm-install-peer-deps +6 -6
- package/.eslintignore +3 -0
- package/.github/workflows/gh-pages-deploy.yml +2 -1
- package/build-state/npm-shrinkwrap.json +47013 -9010
- package/components/__snapshots__/accept-terms.spec.js.snap +94 -6
- package/components/accept-terms.jsx +67 -9
- package/components/accept-terms.spec.js +12 -0
- package/components/app-banner.jsx +1 -1
- package/components/b2c-partnership-confirmation.jsx +2 -2
- package/components/b2c-partnership-payment-term.jsx +1 -1
- package/components/billing-city.jsx +1 -1
- package/components/billing-country.jsx +1 -1
- package/components/billing-postcode.jsx +1 -1
- package/components/company-name.jsx +1 -1
- package/components/confirmation.jsx +1 -1
- package/components/continue-reading.jsx +1 -1
- package/components/continue-reading.stories.js +1 -1
- package/components/country.jsx +1 -1
- package/components/customer-care.jsx +1 -1
- package/components/debug.jsx +1 -1
- package/components/decision-maker.jsx +1 -1
- package/components/decision-maker.spec.js +1 -1
- package/components/delivery-address-type.jsx +1 -1
- package/components/delivery-address.jsx +2 -2
- package/components/delivery-city.jsx +1 -1
- package/components/delivery-county.jsx +1 -1
- package/components/delivery-instructions.jsx +1 -1
- package/components/delivery-option.jsx +1 -1
- package/components/delivery-po-box.jsx +1 -1
- package/components/delivery-postcode.jsx +1 -1
- package/components/delivery-security-instructions.jsx +1 -1
- package/components/delivery-start-date.jsx +1 -1
- package/components/education-job-title.jsx +1 -1
- package/components/email.jsx +1 -1
- package/components/error-page.jsx +1 -1
- package/components/fieldset.jsx +1 -1
- package/components/first-name.jsx +1 -1
- package/components/form.jsx +1 -1
- package/components/google-sign-in.jsx +1 -1
- package/components/graduation-date.jsx +1 -1
- package/components/industry.jsx +1 -1
- package/components/job-title.jsx +1 -1
- package/components/last-name.jsx +1 -1
- package/components/licence-confirmation.jsx +1 -1
- package/components/licence-header.jsx +2 -2
- package/components/licence-sign-in.jsx +2 -2
- package/components/licence-title.jsx +2 -2
- package/components/lite-sub-confirmation.jsx +1 -1
- package/components/loader.jsx +1 -1
- package/components/message.jsx +1 -1
- package/components/organisation.jsx +1 -1
- package/components/package-change.jsx +1 -1
- package/components/password.jsx +1 -1
- package/components/payment-term.jsx +1 -1
- package/components/payment-type.jsx +2 -2
- package/components/personal-title.jsx +1 -1
- package/components/phone.jsx +1 -1
- package/components/position.jsx +1 -1
- package/components/progress-indicator.jsx +3 -3
- package/components/province.jsx +1 -1
- package/components/registration-confirmation.jsx +1 -1
- package/components/responsibility.jsx +1 -1
- package/components/section.jsx +1 -1
- package/components/state.jsx +1 -1
- package/components/submit.jsx +1 -1
- package/components/trial-banner.jsx +1 -1
- package/dist/accept-terms.js +40 -5
- package/dist/b2c-partnership-confirmation.js +1 -1
- package/dist/payment-type.js +1 -1
- package/package.json +9 -6
- package/test-jest/helpers/expect-to-render-correctly.js +1 -1
- package/utils/app-banner.js +1 -1
- package/utils/apple-pay.js +15 -15
- package/utils/billing-city.js +1 -1
- package/utils/billing-country.js +3 -3
- package/utils/billing-postcode.js +1 -1
- package/utils/company-name.js +1 -1
- package/utils/countries.js +2 -2
- package/utils/country.js +3 -3
- package/utils/delivery-address-type.js +3 -3
- package/utils/delivery-address.js +1 -1
- package/utils/delivery-instructions.js +1 -1
- package/utils/delivery-option-messages.js +11 -11
- package/utils/delivery-option-messages.spec.js +2 -2
- package/utils/delivery-option.js +5 -5
- package/utils/delivery-po-box.js +1 -1
- package/utils/delivery-postcode.js +1 -1
- package/utils/delivery-start-date.js +4 -4
- package/utils/email.js +4 -4
- package/utils/event-notifier.js +1 -1
- package/utils/form-element.js +8 -8
- package/utils/loader.js +10 -10
- package/utils/password.js +2 -2
- package/utils/payment-term.js +5 -5
- package/utils/payment-type.js +12 -12
- package/utils/postcode.js +3 -3
- package/utils/province.js +1 -1
- package/utils/salesforce.js +2 -2
- package/utils/state.js +1 -1
- package/utils/submit.js +5 -5
- package/utils/tracking.js +7 -7
- package/utils/validation.js +10 -10
- package/utils/zuora-error-map.js +5 -5
- package/utils/zuora.js +12 -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 & Conditions
|
|
53
|
+
</a>
|
|
54
|
+
.
|
|
55
|
+
</span>
|
|
56
|
+
<p class="o-forms-input__error">
|
|
57
|
+
Please accept our terms & 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 & conditions.
|
|
83
|
+
</span>
|
|
84
|
+
<p class="o-forms-input__error">
|
|
85
|
+
Please accept our terms & 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.
|
|
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.
|
|
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.
|
|
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.
|
|
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.
|
|
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.
|
|
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>
|
|
@@ -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
|
|
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 & Conditions
|
|
89
|
+
</a>
|
|
90
|
+
.
|
|
91
|
+
</span>
|
|
92
|
+
<p className="o-forms-input__error">
|
|
93
|
+
Please accept our terms & 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
|
-
|
|
159
|
-
|
|
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
|
-
|
|
239
|
-
subscription
|
|
240
|
-
|
|
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,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
|
-
{
|
|
22
|
+
{'Welcome to your three months\' Premium access'}
|
|
23
23
|
</h1>
|
|
24
24
|
}
|
|
25
25
|
</div>
|
|
@@ -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,
|
|
@@ -9,6 +9,6 @@ export default {
|
|
|
9
9
|
export const Basic = (args) => <ContinueReading {...args} />;
|
|
10
10
|
Basic.args = {
|
|
11
11
|
quote:
|
|
12
|
-
|
|
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
|
};
|
package/components/country.jsx
CHANGED
|
@@ -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,
|
package/components/debug.jsx
CHANGED
|
@@ -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(
|
|
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);
|
|
@@ -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 = '',
|
|
@@ -33,7 +33,7 @@ export function DeliveryAddress({
|
|
|
33
33
|
|
|
34
34
|
const addressLine3Placeholder = {
|
|
35
35
|
USA: 'e.g Apt 2C / FL 10 / STE 5',
|
|
36
|
-
CAN: 'e.g Apt 2C / FL 10 / STE 5'
|
|
36
|
+
CAN: 'e.g Apt 2C / FL 10 / STE 5',
|
|
37
37
|
};
|
|
38
38
|
|
|
39
39
|
const addressLine1Placeholder = {
|
|
@@ -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,
|
|
@@ -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',
|
package/components/email.jsx
CHANGED
|
@@ -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',
|
package/components/fieldset.jsx
CHANGED
|
@@ -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 FirstName({
|
|
5
|
+
export function FirstName ({
|
|
6
6
|
dataTrackable = 'field-name',
|
|
7
7
|
errorText = 'Please enter your first name',
|
|
8
8
|
fieldId = 'firstNameField',
|
package/components/form.jsx
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import PropTypes from 'prop-types';
|
|
3
3
|
|
|
4
|
-
export function Form({ children, action = '', method = 'POST' }) {
|
|
4
|
+
export function Form ({ children, action = '', method = 'POST' }) {
|
|
5
5
|
return (
|
|
6
6
|
<div className="ncf__wrapper">
|
|
7
7
|
<form className="ncf" action={action} method={method} noValidate>
|
package/components/industry.jsx
CHANGED