@financial-times/n-conversion-forms 20.3.4 → 20.4.2
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 +0 -3
- package/.github/workflows/gh-pages-deploy.yml +1 -1
- package/components/__snapshots__/delivery-address.spec.js.snap +2 -2
- package/components/__snapshots__/graduation-date.spec.js.snap +3 -3
- package/components/__snapshots__/password.spec.js.snap +5 -5
- package/components/delivery-address.jsx +4 -4
- package/components/password.jsx +1 -1
- package/dist/delivery-address.js +4 -4
- package/dist/password.js +1 -1
- package/package.json +1 -1
- package/utils/zuora.js +11 -1
package/.circleci/config.yml
CHANGED
|
@@ -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
|
-
|
|
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
|
|
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>
|
|
@@ -12,7 +12,7 @@ exports[`Password can render a disable input 1`] = `
|
|
|
12
12
|
Password
|
|
13
13
|
</span>
|
|
14
14
|
<span class="o-forms-title__prompt">
|
|
15
|
-
Use 8 or more characters
|
|
15
|
+
Use 8 or more characters. You can use letters, numbers or symbols
|
|
16
16
|
</span>
|
|
17
17
|
</label>
|
|
18
18
|
<div class="o-forms-input o-forms-input--password o-forms-input--checkbox o-forms-input--suffix">
|
|
@@ -58,7 +58,7 @@ exports[`Password can render a pattern attribute 1`] = `
|
|
|
58
58
|
Password
|
|
59
59
|
</span>
|
|
60
60
|
<span class="o-forms-title__prompt">
|
|
61
|
-
Use 8 or more characters
|
|
61
|
+
Use 8 or more characters. You can use letters, numbers or symbols
|
|
62
62
|
</span>
|
|
63
63
|
</label>
|
|
64
64
|
<div class="o-forms-input o-forms-input--password o-forms-input--checkbox o-forms-input--suffix">
|
|
@@ -104,7 +104,7 @@ exports[`Password can render as an Error 1`] = `
|
|
|
104
104
|
Password
|
|
105
105
|
</span>
|
|
106
106
|
<span class="o-forms-title__prompt">
|
|
107
|
-
Use 8 or more characters
|
|
107
|
+
Use 8 or more characters. You can use letters, numbers or symbols
|
|
108
108
|
</span>
|
|
109
109
|
</label>
|
|
110
110
|
<div class="o-forms-input o-forms-input--password o-forms-input--checkbox o-forms-input--suffix o-forms-input--invalid">
|
|
@@ -149,7 +149,7 @@ exports[`Password can render as an Unknown user 1`] = `
|
|
|
149
149
|
Password
|
|
150
150
|
</span>
|
|
151
151
|
<span class="o-forms-title__prompt">
|
|
152
|
-
Use 8 or more characters
|
|
152
|
+
Use 8 or more characters. You can use letters, numbers or symbols
|
|
153
153
|
</span>
|
|
154
154
|
</label>
|
|
155
155
|
<div class="o-forms-input o-forms-input--password o-forms-input--checkbox o-forms-input--suffix">
|
|
@@ -194,7 +194,7 @@ exports[`Password render a password input with a label where input ID and Name a
|
|
|
194
194
|
Password
|
|
195
195
|
</span>
|
|
196
196
|
<span class="o-forms-title__prompt">
|
|
197
|
-
Use 8 or more characters
|
|
197
|
+
Use 8 or more characters. You can use letters, numbers or symbols
|
|
198
198
|
</span>
|
|
199
199
|
</label>
|
|
200
200
|
<div class="o-forms-input o-forms-input--password o-forms-input--checkbox o-forms-input--suffix">
|
|
@@ -22,8 +22,8 @@ export function DeliveryAddress ({
|
|
|
22
22
|
|
|
23
23
|
const addressLine3Title = {
|
|
24
24
|
GBR: 'Address line 3',
|
|
25
|
-
USA: '
|
|
26
|
-
CAN: '
|
|
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
|
|
36
|
-
CAN: 'e.g Apt 2C / FL 10 / STE
|
|
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 = {
|
package/components/password.jsx
CHANGED
|
@@ -12,7 +12,7 @@ export function Password ({
|
|
|
12
12
|
inputName,
|
|
13
13
|
label = 'Password',
|
|
14
14
|
placeholder = 'Enter a password',
|
|
15
|
-
description = 'Use 8 or more characters
|
|
15
|
+
description = 'Use 8 or more characters. You can use letters, numbers or symbols',
|
|
16
16
|
showDescription = true,
|
|
17
17
|
hasShowPassword = true,
|
|
18
18
|
}) {
|
package/dist/delivery-address.js
CHANGED
|
@@ -38,16 +38,16 @@ function DeliveryAddress(_ref) {
|
|
|
38
38
|
}]);
|
|
39
39
|
var addressLine3Title = {
|
|
40
40
|
GBR: 'Address line 3',
|
|
41
|
-
USA: '
|
|
42
|
-
CAN: '
|
|
41
|
+
USA: 'APT/FL/STE',
|
|
42
|
+
CAN: 'APT/FL/STE'
|
|
43
43
|
};
|
|
44
44
|
var addressLine3Prompt = {
|
|
45
45
|
USA: 'Max. 6 characters. Please enter “Apartment 2C” as “Apt 2C”, “Floor 10 as FL 10”',
|
|
46
46
|
CAN: 'Max. 6 characters. Please enter “Apartment 2C” as “Apt 2C”, “Floor 10 as FL 10”'
|
|
47
47
|
};
|
|
48
48
|
var addressLine3Placeholder = {
|
|
49
|
-
USA: 'e.g Apt 2C / FL 10 / STE
|
|
50
|
-
CAN: 'e.g Apt 2C / FL 10 / STE
|
|
49
|
+
USA: 'e.g Apt 2C / FL 10 / STE 50',
|
|
50
|
+
CAN: 'e.g Apt 2C / FL 10 / STE 50'
|
|
51
51
|
};
|
|
52
52
|
var addressLine1Placeholder = {
|
|
53
53
|
GBR: 'e.g. 10 Elm Street',
|
package/dist/password.js
CHANGED
|
@@ -32,7 +32,7 @@ function Password(_ref) {
|
|
|
32
32
|
_ref$placeholder = _ref.placeholder,
|
|
33
33
|
placeholder = _ref$placeholder === void 0 ? 'Enter a password' : _ref$placeholder,
|
|
34
34
|
_ref$description = _ref.description,
|
|
35
|
-
description = _ref$description === void 0 ? 'Use 8 or more characters
|
|
35
|
+
description = _ref$description === void 0 ? 'Use 8 or more characters. You can use letters, numbers or symbols' : _ref$description,
|
|
36
36
|
_ref$showDescription = _ref.showDescription,
|
|
37
37
|
showDescription = _ref$showDescription === void 0 ? true : _ref$showDescription,
|
|
38
38
|
_ref$hasShowPassword = _ref.hasShowPassword,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@financial-times/n-conversion-forms",
|
|
3
|
-
"version": "20.
|
|
3
|
+
"version": "20.4.2",
|
|
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": {
|
package/utils/zuora.js
CHANGED
|
@@ -43,7 +43,7 @@ class Zuora {
|
|
|
43
43
|
* @param {Object} prePopulatedFields Parameters with field ids and values to be pre-populated on the form
|
|
44
44
|
* @param {Function} renderCallback A function that gets called after the form is rendered.
|
|
45
45
|
*/
|
|
46
|
-
render ({ params, prePopulatedFields = {}, renderCallback = () => {} }) {
|
|
46
|
+
render ({ params, prePopulatedFields = {}, renderCallback = () => {}, captchaCallback = () => {} }) {
|
|
47
47
|
// Using an undocumented Zuora method to attach a render callback for the iframe.
|
|
48
48
|
// This method is called once when the iframe is rendered but gets removed for subsequent renderings.
|
|
49
49
|
// In the Zuora code https://static.zuora.com/Resources/libs/hosted/1.3.1/zuora.js
|
|
@@ -71,6 +71,16 @@ class Zuora {
|
|
|
71
71
|
this.Z.sendErrorMessageToHpm(key, errorMessage);
|
|
72
72
|
}
|
|
73
73
|
);
|
|
74
|
+
|
|
75
|
+
// if we have RECAPTCHA enabled for a given app id this allows the application
|
|
76
|
+
// to hide/show the loader so it is not in the way of completing the challenge
|
|
77
|
+
// docs: https://knowledgecenter.zuora.com/Billing/Billing_and_Payments/LA_Hosted_Payment_Pages/B_Payment_Pages_2.0/Configure_Advanced_Security_Checks_for_Payment_Pages_2.0
|
|
78
|
+
/**
|
|
79
|
+
* Z.setEventHandler - Zuora 3rd party method
|
|
80
|
+
* @param {string} event name
|
|
81
|
+
* @param {Function} anonymous - expects a single argument - event
|
|
82
|
+
*/
|
|
83
|
+
this.Z.setEventHandler('onCaptchaStateChange', captchaCallback);
|
|
74
84
|
}
|
|
75
85
|
|
|
76
86
|
/**
|