@financial-times/n-conversion-forms 31.0.3 → 31.2.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.
- package/.toolkitrc.yml +1 -1
- package/.toolkitstate/ci.json +2 -2
- package/components/__snapshots__/confirmation.spec.js.snap +111 -0
- package/components/confirmation.jsx +5 -0
- package/components/confirmation.spec.js +15 -0
- package/components/confirmation.stories.js +8 -0
- package/dist/confirmation.jsx +6 -3
- /package/components/{index.jsx → index.js} +0 -0
- /package/dist/{index.jsx → index.js} +0 -0
package/.toolkitrc.yml
CHANGED
package/.toolkitstate/ci.json
CHANGED
|
@@ -111,6 +111,117 @@ exports[`Confirmation renders appropriately if is trial 1`] = `
|
|
|
111
111
|
</div>
|
|
112
112
|
`;
|
|
113
113
|
|
|
114
|
+
exports[`Confirmation renders appropriately if newsletterScheduleExplainer is not supplied 1`] = `
|
|
115
|
+
<div class="ncf ncf__wrapper">
|
|
116
|
+
<div class="ncf__center">
|
|
117
|
+
<div class="ncf__icon ncf__icon--tick ncf__icon--large">
|
|
118
|
+
</div>
|
|
119
|
+
<p class="ncf__paragraph--reduced-padding ncf__paragraph--subscription-confirmation">
|
|
120
|
+
You are now subscribed to:
|
|
121
|
+
</p>
|
|
122
|
+
<h1 class="ncf__header ncf__header--confirmation">
|
|
123
|
+
Offer text
|
|
124
|
+
</h1>
|
|
125
|
+
</div>
|
|
126
|
+
<p class="ncf__paragraph">
|
|
127
|
+
We’ve sent confirmation to your email. Make sure you check your spam folder if you don’t receive it.
|
|
128
|
+
</p>
|
|
129
|
+
<p class="ncf__paragraph">
|
|
130
|
+
Here’s a summary of your Offer text subscription:
|
|
131
|
+
</p>
|
|
132
|
+
<div class="ncf__headed-paragraph">
|
|
133
|
+
<h3 class="ncf__header">
|
|
134
|
+
Something not right?
|
|
135
|
+
</h3>
|
|
136
|
+
<p class="ncf__paragraph">
|
|
137
|
+
Go to your
|
|
138
|
+
<a class="ncf__link ncf__link--external"
|
|
139
|
+
href="https://www.ft.com/myaccount/personal-details"
|
|
140
|
+
target="_blank"
|
|
141
|
+
rel="noopener noreferrer"
|
|
142
|
+
data-trackable="yourAccount"
|
|
143
|
+
>
|
|
144
|
+
account settings
|
|
145
|
+
</a>
|
|
146
|
+
to view or edit your account. If you need to get in touch call us on
|
|
147
|
+
<a href="tel:+442077556248"
|
|
148
|
+
class="ncf__link ncf__link--external"
|
|
149
|
+
>
|
|
150
|
+
+44 (0) 207 755 6248
|
|
151
|
+
</a>
|
|
152
|
+
. Or contact us for additional support.
|
|
153
|
+
</p>
|
|
154
|
+
</div>
|
|
155
|
+
<p class="ncf__paragraph">
|
|
156
|
+
We will automatically renew your subscription using the payment method provided unless you cancel before your renewal date. See our
|
|
157
|
+
<a class="ncf__link ncf__link--external"
|
|
158
|
+
href="http://help.ft.com/help/legal-privacy/terms-conditions/"
|
|
159
|
+
target="_top"
|
|
160
|
+
rel="noopener"
|
|
161
|
+
>
|
|
162
|
+
Terms & Conditions
|
|
163
|
+
</a>
|
|
164
|
+
for details on how to cancel.
|
|
165
|
+
</p>
|
|
166
|
+
</div>
|
|
167
|
+
`;
|
|
168
|
+
|
|
169
|
+
exports[`Confirmation renders appropriately if newsletterScheduleExplainer is supplied 1`] = `
|
|
170
|
+
<div class="ncf ncf__wrapper">
|
|
171
|
+
<div class="ncf__center">
|
|
172
|
+
<div class="ncf__icon ncf__icon--tick ncf__icon--large">
|
|
173
|
+
</div>
|
|
174
|
+
<p class="ncf__paragraph--reduced-padding ncf__paragraph--subscription-confirmation">
|
|
175
|
+
You are now subscribed to:
|
|
176
|
+
</p>
|
|
177
|
+
<h1 class="ncf__header ncf__header--confirmation">
|
|
178
|
+
Offer text
|
|
179
|
+
</h1>
|
|
180
|
+
</div>
|
|
181
|
+
<p class="ncf__paragraph">
|
|
182
|
+
We’ve sent confirmation to your email. Make sure you check your spam folder if you don’t receive it.
|
|
183
|
+
</p>
|
|
184
|
+
You will receive your first newsletter on the next weekday to foo@bar.com
|
|
185
|
+
<p class="ncf__paragraph">
|
|
186
|
+
Here’s a summary of your Offer text subscription:
|
|
187
|
+
</p>
|
|
188
|
+
<div class="ncf__headed-paragraph">
|
|
189
|
+
<h3 class="ncf__header">
|
|
190
|
+
Something not right?
|
|
191
|
+
</h3>
|
|
192
|
+
<p class="ncf__paragraph">
|
|
193
|
+
Go to your
|
|
194
|
+
<a class="ncf__link ncf__link--external"
|
|
195
|
+
href="https://www.ft.com/myaccount/personal-details"
|
|
196
|
+
target="_blank"
|
|
197
|
+
rel="noopener noreferrer"
|
|
198
|
+
data-trackable="yourAccount"
|
|
199
|
+
>
|
|
200
|
+
account settings
|
|
201
|
+
</a>
|
|
202
|
+
to view or edit your account. If you need to get in touch call us on
|
|
203
|
+
<a href="tel:+442077556248"
|
|
204
|
+
class="ncf__link ncf__link--external"
|
|
205
|
+
>
|
|
206
|
+
+44 (0) 207 755 6248
|
|
207
|
+
</a>
|
|
208
|
+
. Or contact us for additional support.
|
|
209
|
+
</p>
|
|
210
|
+
</div>
|
|
211
|
+
<p class="ncf__paragraph">
|
|
212
|
+
We will automatically renew your subscription using the payment method provided unless you cancel before your renewal date. See our
|
|
213
|
+
<a class="ncf__link ncf__link--external"
|
|
214
|
+
href="http://help.ft.com/help/legal-privacy/terms-conditions/"
|
|
215
|
+
target="_top"
|
|
216
|
+
rel="noopener"
|
|
217
|
+
>
|
|
218
|
+
Terms & Conditions
|
|
219
|
+
</a>
|
|
220
|
+
for details on how to cancel.
|
|
221
|
+
</p>
|
|
222
|
+
</div>
|
|
223
|
+
`;
|
|
224
|
+
|
|
114
225
|
exports[`Confirmation renders appropriately if nextActionBottom is not supplied 1`] = `
|
|
115
226
|
<div class="ncf ncf__wrapper">
|
|
116
227
|
<div class="ncf__center">
|
|
@@ -14,6 +14,7 @@ export function Confirmation({
|
|
|
14
14
|
directDebitMandateUrl = null,
|
|
15
15
|
nextActionTop = null,
|
|
16
16
|
nextActionBottom = null,
|
|
17
|
+
newsletterScheduleExplainer = null,
|
|
17
18
|
}) {
|
|
18
19
|
const containerDivProps = {
|
|
19
20
|
className: 'ncf ncf__wrapper',
|
|
@@ -83,6 +84,9 @@ export function Confirmation({
|
|
|
83
84
|
) : (
|
|
84
85
|
''
|
|
85
86
|
)}
|
|
87
|
+
|
|
88
|
+
{newsletterScheduleExplainer}
|
|
89
|
+
|
|
86
90
|
<p className="ncf__paragraph">
|
|
87
91
|
Here’s a summary of your {offer} subscription:
|
|
88
92
|
</p>
|
|
@@ -146,4 +150,5 @@ Confirmation.propTypes = {
|
|
|
146
150
|
directDebitMandateUrl: PropTypes.string,
|
|
147
151
|
nextActionTop: PropTypes.node,
|
|
148
152
|
nextActionBottom: PropTypes.node,
|
|
153
|
+
newsletterScheduleExplainer: PropTypes.node,
|
|
149
154
|
};
|
|
@@ -6,6 +6,9 @@ expect.extend(expectToRenderCorrectly);
|
|
|
6
6
|
const OFFER_TEXT = 'Offer text';
|
|
7
7
|
const nextActionTop = ['i might take you to tailor your experience'];
|
|
8
8
|
const nextActionBottom = ['i might take you to the ePaper'];
|
|
9
|
+
const newsletterScheduleExplainer = [
|
|
10
|
+
'You will receive your first newsletter on the next weekday to foo@bar.com',
|
|
11
|
+
];
|
|
9
12
|
|
|
10
13
|
describe('Confirmation', () => {
|
|
11
14
|
it('renders with default props', () => {
|
|
@@ -93,4 +96,16 @@ describe('Confirmation', () => {
|
|
|
93
96
|
|
|
94
97
|
expect(Confirmation).toRenderCorrectly(props);
|
|
95
98
|
});
|
|
99
|
+
|
|
100
|
+
it('renders appropriately if newsletterScheduleExplainer is supplied', () => {
|
|
101
|
+
const props = { offer: OFFER_TEXT, newsletterScheduleExplainer };
|
|
102
|
+
|
|
103
|
+
expect(Confirmation).toRenderCorrectly(props);
|
|
104
|
+
});
|
|
105
|
+
|
|
106
|
+
it('renders appropriately if newsletterScheduleExplainer is not supplied', () => {
|
|
107
|
+
const props = { offer: OFFER_TEXT };
|
|
108
|
+
|
|
109
|
+
expect(Confirmation).toRenderCorrectly(props);
|
|
110
|
+
});
|
|
96
111
|
});
|
|
@@ -38,6 +38,13 @@ const nextActionBottom = (
|
|
|
38
38
|
</div>
|
|
39
39
|
);
|
|
40
40
|
|
|
41
|
+
const newsletterScheduleExplainer = (
|
|
42
|
+
<p className="ncf__paragraph">
|
|
43
|
+
You will receive your first newsletter on the next weekday to{' '}
|
|
44
|
+
<strong>foo@bar.com</strong>.
|
|
45
|
+
</p>
|
|
46
|
+
);
|
|
47
|
+
|
|
41
48
|
export const Basic = (args) => <Confirmation {...args} />;
|
|
42
49
|
Basic.args = {
|
|
43
50
|
offer: 'Premium Digital',
|
|
@@ -55,4 +62,5 @@ Basic.args = {
|
|
|
55
62
|
],
|
|
56
63
|
nextActionTop,
|
|
57
64
|
nextActionBottom,
|
|
65
|
+
newsletterScheduleExplainer,
|
|
58
66
|
};
|
package/dist/confirmation.jsx
CHANGED
|
@@ -29,7 +29,9 @@ function Confirmation(_ref) {
|
|
|
29
29
|
_ref$nextActionTop = _ref.nextActionTop,
|
|
30
30
|
nextActionTop = _ref$nextActionTop === void 0 ? null : _ref$nextActionTop,
|
|
31
31
|
_ref$nextActionBottom = _ref.nextActionBottom,
|
|
32
|
-
nextActionBottom = _ref$nextActionBottom === void 0 ? null : _ref$nextActionBottom
|
|
32
|
+
nextActionBottom = _ref$nextActionBottom === void 0 ? null : _ref$nextActionBottom,
|
|
33
|
+
_ref$newsletterSchedu = _ref.newsletterScheduleExplainer,
|
|
34
|
+
newsletterScheduleExplainer = _ref$newsletterSchedu === void 0 ? null : _ref$newsletterSchedu;
|
|
33
35
|
var containerDivProps = _objectSpread({
|
|
34
36
|
className: 'ncf ncf__wrapper'
|
|
35
37
|
}, isTrial && {
|
|
@@ -74,7 +76,7 @@ function Confirmation(_ref) {
|
|
|
74
76
|
className: "ncf__paragraph"
|
|
75
77
|
}, b2cPartnershipCopy[0], /*#__PURE__*/_react["default"].createElement("span", {
|
|
76
78
|
className: "ncf__legend"
|
|
77
|
-
}, " ".concat(email, ". ")), b2cPartnershipCopy[1]) : '', /*#__PURE__*/_react["default"].createElement("p", {
|
|
79
|
+
}, " ".concat(email, ". ")), b2cPartnershipCopy[1]) : '', newsletterScheduleExplainer, /*#__PURE__*/_react["default"].createElement("p", {
|
|
78
80
|
className: "ncf__paragraph"
|
|
79
81
|
}, "Here\u2019s a summary of your ", offer, " subscription:"), detailElements, directDebitMandateUrlElement, /*#__PURE__*/_react["default"].createElement("div", {
|
|
80
82
|
className: "ncf__headed-paragraph"
|
|
@@ -113,5 +115,6 @@ Confirmation.propTypes = {
|
|
|
113
115
|
})),
|
|
114
116
|
directDebitMandateUrl: _propTypes["default"].string,
|
|
115
117
|
nextActionTop: _propTypes["default"].node,
|
|
116
|
-
nextActionBottom: _propTypes["default"].node
|
|
118
|
+
nextActionBottom: _propTypes["default"].node,
|
|
119
|
+
newsletterScheduleExplainer: _propTypes["default"].node
|
|
117
120
|
};
|
|
File without changes
|
|
File without changes
|