@financial-times/n-conversion-forms 45.2.0 → 45.3.1
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/.toolkitstate/ci.json +3 -3
- package/components/__snapshots__/confirmation.spec.js.snap +2 -12
- package/components/confirmation.jsx +23 -16
- package/components/confirmation.spec.js +1 -1
- package/components/confirmation.stories.js +2 -1
- package/dist/confirmation.jsx +8 -5
- package/package.json +1 -1
package/.toolkitstate/ci.json
CHANGED
|
@@ -153,7 +153,7 @@ exports[`Confirmation renders appropriately if is 'Termed' subscription term typ
|
|
|
153
153
|
<div class="ncf__icon ncf__icon--tick ncf__icon--large">
|
|
154
154
|
</div>
|
|
155
155
|
<p class="ncf__paragraph--reduced-padding ncf__paragraph--subscription-confirmation">
|
|
156
|
-
|
|
156
|
+
Your purchase is complete for:
|
|
157
157
|
</p>
|
|
158
158
|
<h1 class="ncf__header ncf__header--confirmation">
|
|
159
159
|
</h1>
|
|
@@ -162,7 +162,7 @@ exports[`Confirmation renders appropriately if is 'Termed' subscription term typ
|
|
|
162
162
|
We’ve sent confirmation to your email. Make sure you check your spam folder if you don’t receive it.
|
|
163
163
|
</p>
|
|
164
164
|
<p class="ncf__paragraph">
|
|
165
|
-
Here’s a summary of your
|
|
165
|
+
Here’s a summary of your purchase:
|
|
166
166
|
</p>
|
|
167
167
|
<div class="ncf__headed-paragraph">
|
|
168
168
|
<h3 class="ncf__header">
|
|
@@ -184,16 +184,6 @@ exports[`Confirmation renders appropriately if is 'Termed' subscription term typ
|
|
|
184
184
|
. Or contact us for additional support.
|
|
185
185
|
</p>
|
|
186
186
|
</div>
|
|
187
|
-
<p class="ncf__paragraph o3-type-body-base">
|
|
188
|
-
See our
|
|
189
|
-
<a href="http://help.ft.com/help/legal-privacy/terms-conditions/"
|
|
190
|
-
target="_top"
|
|
191
|
-
rel="noopener"
|
|
192
|
-
>
|
|
193
|
-
Terms & Conditions
|
|
194
|
-
</a>
|
|
195
|
-
for details on how to cancel.
|
|
196
|
-
</p>
|
|
197
187
|
</div>
|
|
198
188
|
`;
|
|
199
189
|
|
|
@@ -10,6 +10,7 @@ export function Confirmation({
|
|
|
10
10
|
b2cPartnershipCopy = [],
|
|
11
11
|
sendConfirmationEmail = true,
|
|
12
12
|
isEvergreenSubscriptionTermType = true,
|
|
13
|
+
isTermedSubscriptionTermType = false,
|
|
13
14
|
offer = '',
|
|
14
15
|
email = EMAIL_DEFAULT_TEXT,
|
|
15
16
|
details = null,
|
|
@@ -64,7 +65,8 @@ export function Confirmation({
|
|
|
64
65
|
<div className="ncf__center">
|
|
65
66
|
<div className="ncf__icon ncf__icon--tick ncf__icon--large"></div>
|
|
66
67
|
<p className="ncf__paragraph--reduced-padding ncf__paragraph--subscription-confirmation">
|
|
67
|
-
You are now subscribed to:
|
|
68
|
+
{isEvergreenSubscriptionTermType && 'You are now subscribed to:'}
|
|
69
|
+
{isTermedSubscriptionTermType && 'Your purchase is complete for:'}
|
|
68
70
|
</p>
|
|
69
71
|
<h1 className="ncf__header ncf__header--confirmation">{offer}</h1>
|
|
70
72
|
</div>
|
|
@@ -90,7 +92,9 @@ export function Confirmation({
|
|
|
90
92
|
{newsletterScheduleExplainer}
|
|
91
93
|
|
|
92
94
|
<p className="ncf__paragraph">
|
|
93
|
-
Here’s a summary of your {offer}
|
|
95
|
+
Here’s a summary of your {offer}{' '}
|
|
96
|
+
{isEvergreenSubscriptionTermType && 'subscription'}
|
|
97
|
+
{isTermedSubscriptionTermType && 'purchase'}:
|
|
94
98
|
</p>
|
|
95
99
|
|
|
96
100
|
{detailElements}
|
|
@@ -114,20 +118,22 @@ export function Confirmation({
|
|
|
114
118
|
for additional support.
|
|
115
119
|
</p>
|
|
116
120
|
</div>
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
121
|
+
|
|
122
|
+
{isEvergreenSubscriptionTermType && (
|
|
123
|
+
<p className="ncf__paragraph o3-type-body-base">
|
|
124
|
+
We will automatically renew your subscription using the payment method
|
|
125
|
+
provided unless you cancel before your renewal date. See our{' '}
|
|
126
|
+
<a
|
|
127
|
+
href="http://help.ft.com/help/legal-privacy/terms-conditions/"
|
|
128
|
+
target="_top"
|
|
129
|
+
rel="noopener"
|
|
130
|
+
>
|
|
131
|
+
Terms & Conditions
|
|
132
|
+
</a>{' '}
|
|
133
|
+
for details on how to cancel.
|
|
134
|
+
</p>
|
|
135
|
+
)}
|
|
136
|
+
|
|
131
137
|
{nextActionBottom}
|
|
132
138
|
</div>
|
|
133
139
|
);
|
|
@@ -139,6 +145,7 @@ Confirmation.propTypes = {
|
|
|
139
145
|
b2cPartnershipCopy: PropTypes.array,
|
|
140
146
|
sendConfirmationEmail: PropTypes.bool,
|
|
141
147
|
isEvergreenSubscriptionTermType: PropTypes.bool,
|
|
148
|
+
isTermedSubscriptionTermType: PropTypes.bool,
|
|
142
149
|
offer: PropTypes.string.isRequired,
|
|
143
150
|
email: PropTypes.string,
|
|
144
151
|
details: PropTypes.arrayOf(
|
|
@@ -41,7 +41,7 @@ describe('Confirmation', () => {
|
|
|
41
41
|
it("renders appropriately if is 'Termed' subscription term type", () => {
|
|
42
42
|
const props = {
|
|
43
43
|
isEvergreenSubscriptionTermType: false,
|
|
44
|
-
isTermedSubscriptionTermType:
|
|
44
|
+
isTermedSubscriptionTermType: true,
|
|
45
45
|
};
|
|
46
46
|
|
|
47
47
|
expect(Confirmation).toRenderCorrectly(props);
|
|
@@ -66,8 +66,9 @@ Basic.args = {
|
|
|
66
66
|
export const TermedSubscriptionTermType = (args) => <Confirmation {...args} />;
|
|
67
67
|
TermedSubscriptionTermType.args = {
|
|
68
68
|
sendConfirmationEmail: false,
|
|
69
|
+
isEvergreenSubscriptionTermType: false,
|
|
69
70
|
isTermedSubscriptionTermType: true,
|
|
70
|
-
offer: '
|
|
71
|
+
offer: 'Standard Digital',
|
|
71
72
|
details: [
|
|
72
73
|
{
|
|
73
74
|
title: 'End date',
|
package/dist/confirmation.jsx
CHANGED
|
@@ -22,6 +22,8 @@ function Confirmation(_ref) {
|
|
|
22
22
|
sendConfirmationEmail = _ref$sendConfirmation === void 0 ? true : _ref$sendConfirmation,
|
|
23
23
|
_ref$isEvergreenSubsc = _ref.isEvergreenSubscriptionTermType,
|
|
24
24
|
isEvergreenSubscriptionTermType = _ref$isEvergreenSubsc === void 0 ? true : _ref$isEvergreenSubsc,
|
|
25
|
+
_ref$isTermedSubscrip = _ref.isTermedSubscriptionTermType,
|
|
26
|
+
isTermedSubscriptionTermType = _ref$isTermedSubscrip === void 0 ? false : _ref$isTermedSubscrip,
|
|
25
27
|
_ref$offer = _ref.offer,
|
|
26
28
|
offer = _ref$offer === void 0 ? '' : _ref$offer,
|
|
27
29
|
_ref$email = _ref.email,
|
|
@@ -72,7 +74,7 @@ function Confirmation(_ref) {
|
|
|
72
74
|
className: "ncf__icon ncf__icon--tick ncf__icon--large"
|
|
73
75
|
}), /*#__PURE__*/_react["default"].createElement("p", {
|
|
74
76
|
className: "ncf__paragraph--reduced-padding ncf__paragraph--subscription-confirmation"
|
|
75
|
-
},
|
|
77
|
+
}, isEvergreenSubscriptionTermType && 'You are now subscribed to:', isTermedSubscriptionTermType && 'Your purchase is complete for:'), /*#__PURE__*/_react["default"].createElement("h1", {
|
|
76
78
|
className: "ncf__header ncf__header--confirmation"
|
|
77
79
|
}, offer)), nextActionTop, sendConfirmationEmail && !isB2cPartnershipCopyAvailable && /*#__PURE__*/_react["default"].createElement("p", {
|
|
78
80
|
className: "ncf__paragraph"
|
|
@@ -82,7 +84,7 @@ function Confirmation(_ref) {
|
|
|
82
84
|
className: "ncf__legend"
|
|
83
85
|
}, " ".concat(email, ". ")), b2cPartnershipCopy[1]) : '', newsletterScheduleExplainer, /*#__PURE__*/_react["default"].createElement("p", {
|
|
84
86
|
className: "ncf__paragraph"
|
|
85
|
-
}, "Here\u2019s a summary of your ", offer,
|
|
87
|
+
}, "Here\u2019s a summary of your ", offer, ' ', isEvergreenSubscriptionTermType && 'subscription', isTermedSubscriptionTermType && 'purchase', ":"), detailElements, directDebitMandateUrlElement, /*#__PURE__*/_react["default"].createElement("div", {
|
|
86
88
|
className: "ncf__headed-paragraph"
|
|
87
89
|
}, /*#__PURE__*/_react["default"].createElement("h3", {
|
|
88
90
|
className: "ncf__header"
|
|
@@ -95,13 +97,13 @@ function Confirmation(_ref) {
|
|
|
95
97
|
"data-trackable": "yourAccount"
|
|
96
98
|
}, "account settings"), ' ', "to view or edit your account. If you need to get in touch call us on", ' ', /*#__PURE__*/_react["default"].createElement("a", {
|
|
97
99
|
href: "tel:+442077556248"
|
|
98
|
-
}, "+44 (0) 207 755 6248"), ". Or contact us for additional support.")), /*#__PURE__*/_react["default"].createElement("p", {
|
|
100
|
+
}, "+44 (0) 207 755 6248"), ". Or contact us for additional support.")), isEvergreenSubscriptionTermType && /*#__PURE__*/_react["default"].createElement("p", {
|
|
99
101
|
className: "ncf__paragraph o3-type-body-base"
|
|
100
|
-
},
|
|
102
|
+
}, "We will automatically renew your subscription using the payment method provided unless you cancel before your renewal date. See our", ' ', /*#__PURE__*/_react["default"].createElement("a", {
|
|
101
103
|
href: "http://help.ft.com/help/legal-privacy/terms-conditions/",
|
|
102
104
|
target: "_top",
|
|
103
105
|
rel: "noopener"
|
|
104
|
-
}, "Terms & Conditions"), ' for details on how to cancel.
|
|
106
|
+
}, "Terms & Conditions"), ' ', "for details on how to cancel."), nextActionBottom);
|
|
105
107
|
}
|
|
106
108
|
Confirmation.propTypes = {
|
|
107
109
|
isTrial: _propTypes["default"].bool,
|
|
@@ -109,6 +111,7 @@ Confirmation.propTypes = {
|
|
|
109
111
|
b2cPartnershipCopy: _propTypes["default"].array,
|
|
110
112
|
sendConfirmationEmail: _propTypes["default"].bool,
|
|
111
113
|
isEvergreenSubscriptionTermType: _propTypes["default"].bool,
|
|
114
|
+
isTermedSubscriptionTermType: _propTypes["default"].bool,
|
|
112
115
|
offer: _propTypes["default"].string.isRequired,
|
|
113
116
|
email: _propTypes["default"].string,
|
|
114
117
|
details: _propTypes["default"].arrayOf(_propTypes["default"].shape({
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@financial-times/n-conversion-forms",
|
|
3
|
-
"version": "45.
|
|
3
|
+
"version": "45.3.1",
|
|
4
4
|
"description": "Containing jsx components and styles for forms included on Accounts and Acquisition apps (next-signup, next-profile, next-retention, etc).",
|
|
5
5
|
"main": "./dist/index.js",
|
|
6
6
|
"scripts": {
|