@financial-times/n-conversion-forms 25.0.0 → 25.1.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/components/__snapshots__/b2c-partnership-confirmation.spec.js.snap +1 -1
- package/components/__snapshots__/confirmation.spec.js.snap +3 -0
- package/components/accept-terms.jsx +24 -20
- package/components/accept-terms.stories.js +28 -1
- package/components/b2c-partnership-confirmation.jsx +1 -1
- package/components/confirmation.jsx +4 -2
- package/components/payment-term.jsx +1 -1
- package/dist/accept-terms.js +6 -3
- package/dist/b2c-partnership-confirmation.js +1 -1
- package/dist/confirmation.js +4 -2
- package/dist/payment-term.js +1 -1
- package/package.json +1 -1
|
@@ -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
|
|
10
|
+
Welcome to your 30 days' Premium access
|
|
11
11
|
</h1>
|
|
12
12
|
</div>
|
|
13
13
|
</div>
|
|
@@ -11,6 +11,9 @@ exports[`Confirmation renders appropriately if is B2C Partnership 1`] = `
|
|
|
11
11
|
<h1 class="ncf__header ncf__header--confirmation">
|
|
12
12
|
</h1>
|
|
13
13
|
</div>
|
|
14
|
+
<p class="ncf__paragraph">
|
|
15
|
+
We’ve sent confirmation to your email. Make sure you check your spam folder if you don’t receive it.
|
|
16
|
+
</p>
|
|
14
17
|
<p class="ncf__paragraph">
|
|
15
18
|
Here’s a summary of your subscription:
|
|
16
19
|
</p>
|
|
@@ -23,6 +23,7 @@ export function AcceptTerms ({
|
|
|
23
23
|
specialTerms = null,
|
|
24
24
|
isSingleTerm = false,
|
|
25
25
|
isNewDigitalBuyFlowConsent = false,
|
|
26
|
+
hideConfirmTermsAndConditions = false,
|
|
26
27
|
}) {
|
|
27
28
|
const divProps = {
|
|
28
29
|
id: 'acceptTermsField',
|
|
@@ -89,26 +90,28 @@ export function AcceptTerms ({
|
|
|
89
90
|
</li>
|
|
90
91
|
</ul>
|
|
91
92
|
)}
|
|
92
|
-
|
|
93
|
-
<
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
93
|
+
{!hideConfirmTermsAndConditions && (
|
|
94
|
+
<label className={labelClassName} htmlFor="termsAcceptance">
|
|
95
|
+
<input {...inputProps} />
|
|
96
|
+
<span className="o-forms-input__label terms-auth-first-step">
|
|
97
|
+
I confirm that I am {ageRestriction} years or older and agree to the
|
|
98
|
+
full{' '}
|
|
99
|
+
<a
|
|
100
|
+
className="ncf__link--external"
|
|
101
|
+
href="http://help.ft.com/help/legal-privacy/terms-conditions/"
|
|
102
|
+
target={isEmbedded ? '_top' : '_blank'}
|
|
103
|
+
rel="noopener noreferrer"
|
|
104
|
+
data-trackable="terms-and-conditions"
|
|
105
|
+
>
|
|
106
|
+
Terms & Conditions
|
|
107
|
+
</a>
|
|
108
|
+
.
|
|
109
|
+
</span>
|
|
110
|
+
<p className="o-forms-input__error">
|
|
111
|
+
Please accept our terms & conditions
|
|
112
|
+
</p>
|
|
113
|
+
</label>
|
|
114
|
+
)}
|
|
112
115
|
</>
|
|
113
116
|
);
|
|
114
117
|
|
|
@@ -408,4 +411,5 @@ AcceptTerms.propTypes = {
|
|
|
408
411
|
specialTerms: PropTypes.string,
|
|
409
412
|
isSingleTerm: PropTypes.bool,
|
|
410
413
|
isNewDigitalBuyFlowConsent: PropTypes.bool,
|
|
414
|
+
hideConfirmTermsAndConditions: PropTypes.bool,
|
|
411
415
|
};
|
|
@@ -11,8 +11,35 @@ export default {
|
|
|
11
11
|
options: ['immediate', 'endOfTerm'],
|
|
12
12
|
},
|
|
13
13
|
},
|
|
14
|
+
isAuthFirstAccount: { control: 'boolean' },
|
|
15
|
+
isAuthFirstPayment: { control: 'boolean' },
|
|
16
|
+
hasError: { control: 'boolean' },
|
|
17
|
+
isSignup: { control: 'boolean' },
|
|
18
|
+
isRegister: { control: 'boolean' },
|
|
19
|
+
isChecked: { control: 'boolean' },
|
|
20
|
+
isB2b: { control: 'boolean' },
|
|
21
|
+
isB2cPartnership: { control: 'boolean' },
|
|
22
|
+
isEmbedded: { control: 'boolean' },
|
|
23
|
+
isCorpSignup: { control: 'boolean' },
|
|
24
|
+
isTrial: { control: 'boolean' },
|
|
25
|
+
isTransition: { control: 'boolean' },
|
|
26
|
+
isPrintProduct: { control: 'boolean' },
|
|
27
|
+
isSingleTerm: { control: 'boolean' },
|
|
28
|
+
isNewDigitalBuyFlowConsent: { control: 'boolean' },
|
|
29
|
+
hideConfirmTermsAndConditions: { control: 'boolean' },
|
|
14
30
|
},
|
|
15
31
|
};
|
|
16
32
|
|
|
17
33
|
export const Basic = (args) => <AcceptTerms {...args} />;
|
|
18
|
-
Basic.
|
|
34
|
+
Basic.args = {};
|
|
35
|
+
|
|
36
|
+
export const NewBuyFlow = (args) => <AcceptTerms {...args} />;
|
|
37
|
+
NewBuyFlow.args = {
|
|
38
|
+
isAuthFirstAccount: true,
|
|
39
|
+
};
|
|
40
|
+
|
|
41
|
+
export const NewBuyFlowEmailVerification = (args) => <AcceptTerms {...args} />;
|
|
42
|
+
NewBuyFlowEmailVerification.args = {
|
|
43
|
+
isAuthFirstAccount: true,
|
|
44
|
+
hideConfirmTermsAndConditions: true,
|
|
45
|
+
};
|
|
@@ -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
|
|
22
|
+
{'Welcome to your 30 days\' Premium access'}
|
|
23
23
|
</h1>
|
|
24
24
|
}
|
|
25
25
|
</div>
|
|
@@ -20,6 +20,8 @@ export function Confirmation ({
|
|
|
20
20
|
...(isTrial && { 'data-signup-is-trial': 'true' }),
|
|
21
21
|
};
|
|
22
22
|
|
|
23
|
+
const isB2cPartnershipCopyAvailable = isB2cPartnership && b2cPartnershipCopy.length > 0;
|
|
24
|
+
|
|
23
25
|
const detailElements = details && (
|
|
24
26
|
<React.Fragment>
|
|
25
27
|
<h2 className="ncf__header2--afterline">Your billing details</h2>
|
|
@@ -64,14 +66,14 @@ export function Confirmation ({
|
|
|
64
66
|
</div>
|
|
65
67
|
|
|
66
68
|
{nextActionTop}
|
|
67
|
-
{!
|
|
69
|
+
{!isB2cPartnershipCopyAvailable && (
|
|
68
70
|
<p className="ncf__paragraph">
|
|
69
71
|
We’ve sent confirmation to {email}. Make sure you check your spam folder
|
|
70
72
|
if you don’t receive it.
|
|
71
73
|
</p>
|
|
72
74
|
)}
|
|
73
75
|
|
|
74
|
-
{
|
|
76
|
+
{isB2cPartnershipCopyAvailable ? (
|
|
75
77
|
<p className="ncf__paragraph">
|
|
76
78
|
{b2cPartnershipCopy[0]}
|
|
77
79
|
<span className="ncf__legend">{` ${email}. `}</span>
|
|
@@ -194,7 +194,7 @@ export function PaymentTerm ({
|
|
|
194
194
|
|
|
195
195
|
const createB2cDiscountCopy = () => {
|
|
196
196
|
return (
|
|
197
|
-
option.b2cPartnership && option.b2cDiscountCopy && (
|
|
197
|
+
option.name === 'annual' && option.b2cPartnership && option.b2cDiscountCopy && (
|
|
198
198
|
<span className="ncf__payment-term__discount">
|
|
199
199
|
{option.b2cDiscountCopy}
|
|
200
200
|
</span>
|
package/dist/accept-terms.js
CHANGED
|
@@ -57,7 +57,9 @@ function AcceptTerms(_ref) {
|
|
|
57
57
|
_ref$isSingleTerm = _ref.isSingleTerm,
|
|
58
58
|
isSingleTerm = _ref$isSingleTerm === void 0 ? false : _ref$isSingleTerm,
|
|
59
59
|
_ref$isNewDigitalBuyF = _ref.isNewDigitalBuyFlowConsent,
|
|
60
|
-
isNewDigitalBuyFlowConsent = _ref$isNewDigitalBuyF === void 0 ? false : _ref$isNewDigitalBuyF
|
|
60
|
+
isNewDigitalBuyFlowConsent = _ref$isNewDigitalBuyF === void 0 ? false : _ref$isNewDigitalBuyF,
|
|
61
|
+
_ref$hideConfirmTerms = _ref.hideConfirmTermsAndConditions,
|
|
62
|
+
hideConfirmTermsAndConditions = _ref$hideConfirmTerms === void 0 ? false : _ref$hideConfirmTerms;
|
|
61
63
|
|
|
62
64
|
var divProps = _objectSpread(_objectSpread({
|
|
63
65
|
id: 'acceptTermsField',
|
|
@@ -103,7 +105,7 @@ function AcceptTerms(_ref) {
|
|
|
103
105
|
target: "_blank",
|
|
104
106
|
rel: "noopener noreferrer",
|
|
105
107
|
"data-trackable": "terms-and-conditions"
|
|
106
|
-
}, "cookie"), ' ', "policies."))), /*#__PURE__*/_react["default"].createElement("label", {
|
|
108
|
+
}, "cookie"), ' ', "policies."))), !hideConfirmTermsAndConditions && /*#__PURE__*/_react["default"].createElement("label", {
|
|
107
109
|
className: labelClassName,
|
|
108
110
|
htmlFor: "termsAcceptance"
|
|
109
111
|
}, /*#__PURE__*/_react["default"].createElement("input", inputProps), /*#__PURE__*/_react["default"].createElement("span", {
|
|
@@ -248,5 +250,6 @@ AcceptTerms.propTypes = {
|
|
|
248
250
|
isPrintProduct: _propTypes["default"].bool,
|
|
249
251
|
specialTerms: _propTypes["default"].string,
|
|
250
252
|
isSingleTerm: _propTypes["default"].bool,
|
|
251
|
-
isNewDigitalBuyFlowConsent: _propTypes["default"].bool
|
|
253
|
+
isNewDigitalBuyFlowConsent: _propTypes["default"].bool,
|
|
254
|
+
hideConfirmTermsAndConditions: _propTypes["default"].bool
|
|
252
255
|
};
|
|
@@ -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
|
|
35
|
+
}, 'Welcome to your 30 days\' 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"
|
package/dist/confirmation.js
CHANGED
|
@@ -45,6 +45,8 @@ function Confirmation(_ref) {
|
|
|
45
45
|
'data-signup-is-trial': 'true'
|
|
46
46
|
});
|
|
47
47
|
|
|
48
|
+
var isB2cPartnershipCopyAvailable = isB2cPartnership && b2cPartnershipCopy.length > 0;
|
|
49
|
+
|
|
48
50
|
var detailElements = details && /*#__PURE__*/_react["default"].createElement(_react["default"].Fragment, null, /*#__PURE__*/_react["default"].createElement("h2", {
|
|
49
51
|
className: "ncf__header2--afterline"
|
|
50
52
|
}, "Your billing details"), /*#__PURE__*/_react["default"].createElement("dl", {
|
|
@@ -79,9 +81,9 @@ function Confirmation(_ref) {
|
|
|
79
81
|
className: "ncf__paragraph--reduced-padding ncf__paragraph--subscription-confirmation"
|
|
80
82
|
}, "You are now subscribed to:"), /*#__PURE__*/_react["default"].createElement("h1", {
|
|
81
83
|
className: "ncf__header ncf__header--confirmation"
|
|
82
|
-
}, offer)), nextActionTop, !
|
|
84
|
+
}, offer)), nextActionTop, !isB2cPartnershipCopyAvailable && /*#__PURE__*/_react["default"].createElement("p", {
|
|
83
85
|
className: "ncf__paragraph"
|
|
84
|
-
}, "We\u2019ve sent confirmation to ", email, ". Make sure you check your spam folder if you don\u2019t receive it."),
|
|
86
|
+
}, "We\u2019ve sent confirmation to ", email, ". Make sure you check your spam folder if you don\u2019t receive it."), isB2cPartnershipCopyAvailable ? /*#__PURE__*/_react["default"].createElement("p", {
|
|
85
87
|
className: "ncf__paragraph"
|
|
86
88
|
}, b2cPartnershipCopy[0], /*#__PURE__*/_react["default"].createElement("span", {
|
|
87
89
|
className: "ncf__legend"
|
package/dist/payment-term.js
CHANGED
|
@@ -196,7 +196,7 @@ function PaymentTerm(_ref) {
|
|
|
196
196
|
};
|
|
197
197
|
|
|
198
198
|
var createB2cDiscountCopy = function createB2cDiscountCopy() {
|
|
199
|
-
return option.b2cPartnership && option.b2cDiscountCopy && /*#__PURE__*/_react["default"].createElement("span", {
|
|
199
|
+
return option.name === 'annual' && option.b2cPartnership && option.b2cDiscountCopy && /*#__PURE__*/_react["default"].createElement("span", {
|
|
200
200
|
className: "ncf__payment-term__discount"
|
|
201
201
|
}, option.b2cDiscountCopy);
|
|
202
202
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@financial-times/n-conversion-forms",
|
|
3
|
-
"version": "25.
|
|
3
|
+
"version": "25.1.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": {
|