@financial-times/n-conversion-forms 37.1.0 → 37.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/.toolkitstate/ci.json +2 -2
- package/components/__snapshots__/delivery-start-date.spec.js.snap +18 -60
- package/components/delivery-start-date.jsx +8 -9
- package/dist/delivery-start-date.jsx +3 -4
- package/package.json +1 -1
- package/utils/delivery-option-messages.js +1 -1
- package/utils/delivery-option-messages.spec.js +1 -1
package/.toolkitstate/ci.json
CHANGED
|
@@ -10,10 +10,10 @@ exports[`DeliveryStartDate renders with a custom date 1`] = `
|
|
|
10
10
|
<span class="o-forms-title__main"
|
|
11
11
|
id="start-date-picker-title-span"
|
|
12
12
|
>
|
|
13
|
-
|
|
13
|
+
Start date
|
|
14
14
|
</span>
|
|
15
15
|
<span class="o-forms-title__prompt">
|
|
16
|
-
|
|
16
|
+
The first print edition you will receive is: 5th November 2019
|
|
17
17
|
</span>
|
|
18
18
|
</span>
|
|
19
19
|
<span class="o-forms-input o-forms-input--text">
|
|
@@ -29,12 +29,6 @@ exports[`DeliveryStartDate renders with a custom date 1`] = `
|
|
|
29
29
|
Please select a valid start date
|
|
30
30
|
</span>
|
|
31
31
|
</span>
|
|
32
|
-
<p>
|
|
33
|
-
The first print edition you will receive is:
|
|
34
|
-
<strong class="js-start-date-text">
|
|
35
|
-
5th November 2019
|
|
36
|
-
</strong>
|
|
37
|
-
</p>
|
|
38
32
|
</label>
|
|
39
33
|
`;
|
|
40
34
|
|
|
@@ -48,10 +42,10 @@ exports[`DeliveryStartDate renders with a custom input max value 1`] = `
|
|
|
48
42
|
<span class="o-forms-title__main"
|
|
49
43
|
id="start-date-picker-title-span"
|
|
50
44
|
>
|
|
51
|
-
|
|
45
|
+
Start date
|
|
52
46
|
</span>
|
|
53
47
|
<span class="o-forms-title__prompt">
|
|
54
|
-
|
|
48
|
+
The first print edition you will receive is: 2
|
|
55
49
|
</span>
|
|
56
50
|
</span>
|
|
57
51
|
<span class="o-forms-input o-forms-input--text">
|
|
@@ -67,12 +61,6 @@ exports[`DeliveryStartDate renders with a custom input max value 1`] = `
|
|
|
67
61
|
Please select a valid start date
|
|
68
62
|
</span>
|
|
69
63
|
</span>
|
|
70
|
-
<p>
|
|
71
|
-
The first print edition you will receive is:
|
|
72
|
-
<strong class="js-start-date-text">
|
|
73
|
-
2
|
|
74
|
-
</strong>
|
|
75
|
-
</p>
|
|
76
64
|
</label>
|
|
77
65
|
`;
|
|
78
66
|
|
|
@@ -86,10 +74,10 @@ exports[`DeliveryStartDate renders with a custom input min value 1`] = `
|
|
|
86
74
|
<span class="o-forms-title__main"
|
|
87
75
|
id="start-date-picker-title-span"
|
|
88
76
|
>
|
|
89
|
-
|
|
77
|
+
Start date
|
|
90
78
|
</span>
|
|
91
79
|
<span class="o-forms-title__prompt">
|
|
92
|
-
|
|
80
|
+
The first print edition you will receive is:
|
|
93
81
|
</span>
|
|
94
82
|
</span>
|
|
95
83
|
<span class="o-forms-input o-forms-input--text">
|
|
@@ -106,11 +94,6 @@ exports[`DeliveryStartDate renders with a custom input min value 1`] = `
|
|
|
106
94
|
Please select a valid start date
|
|
107
95
|
</span>
|
|
108
96
|
</span>
|
|
109
|
-
<p>
|
|
110
|
-
The first print edition you will receive is:
|
|
111
|
-
<strong class="js-start-date-text">
|
|
112
|
-
</strong>
|
|
113
|
-
</p>
|
|
114
97
|
</label>
|
|
115
98
|
`;
|
|
116
99
|
|
|
@@ -124,10 +107,10 @@ exports[`DeliveryStartDate renders with a custom input value 1`] = `
|
|
|
124
107
|
<span class="o-forms-title__main"
|
|
125
108
|
id="start-date-picker-title-span"
|
|
126
109
|
>
|
|
127
|
-
|
|
110
|
+
Start date
|
|
128
111
|
</span>
|
|
129
112
|
<span class="o-forms-title__prompt">
|
|
130
|
-
|
|
113
|
+
The first print edition you will receive is:
|
|
131
114
|
</span>
|
|
132
115
|
</span>
|
|
133
116
|
<span class="o-forms-input o-forms-input--text">
|
|
@@ -143,11 +126,6 @@ exports[`DeliveryStartDate renders with a custom input value 1`] = `
|
|
|
143
126
|
Please select a valid start date
|
|
144
127
|
</span>
|
|
145
128
|
</span>
|
|
146
|
-
<p>
|
|
147
|
-
The first print edition you will receive is:
|
|
148
|
-
<strong class="js-start-date-text">
|
|
149
|
-
</strong>
|
|
150
|
-
</p>
|
|
151
129
|
</label>
|
|
152
130
|
`;
|
|
153
131
|
|
|
@@ -161,10 +139,10 @@ exports[`DeliveryStartDate renders with a disabled input 1`] = `
|
|
|
161
139
|
<span class="o-forms-title__main"
|
|
162
140
|
id="start-date-picker-title-span"
|
|
163
141
|
>
|
|
164
|
-
|
|
142
|
+
Start date
|
|
165
143
|
</span>
|
|
166
144
|
<span class="o-forms-title__prompt">
|
|
167
|
-
|
|
145
|
+
The first print edition you will receive is:
|
|
168
146
|
</span>
|
|
169
147
|
</span>
|
|
170
148
|
<span class="o-forms-input o-forms-input--text">
|
|
@@ -181,11 +159,6 @@ exports[`DeliveryStartDate renders with a disabled input 1`] = `
|
|
|
181
159
|
Please select a valid start date
|
|
182
160
|
</span>
|
|
183
161
|
</span>
|
|
184
|
-
<p>
|
|
185
|
-
The first print edition you will receive is:
|
|
186
|
-
<strong class="js-start-date-text">
|
|
187
|
-
</strong>
|
|
188
|
-
</p>
|
|
189
162
|
</label>
|
|
190
163
|
`;
|
|
191
164
|
|
|
@@ -199,10 +172,10 @@ exports[`DeliveryStartDate renders with an error 1`] = `
|
|
|
199
172
|
<span class="o-forms-title__main"
|
|
200
173
|
id="start-date-picker-title-span"
|
|
201
174
|
>
|
|
202
|
-
|
|
175
|
+
Start date
|
|
203
176
|
</span>
|
|
204
177
|
<span class="o-forms-title__prompt">
|
|
205
|
-
|
|
178
|
+
The first print edition you will receive is:
|
|
206
179
|
</span>
|
|
207
180
|
</span>
|
|
208
181
|
<span class="o-forms-input o-forms-input--text o-forms-input--invalid">
|
|
@@ -218,11 +191,6 @@ exports[`DeliveryStartDate renders with an error 1`] = `
|
|
|
218
191
|
Please select a valid start date
|
|
219
192
|
</span>
|
|
220
193
|
</span>
|
|
221
|
-
<p>
|
|
222
|
-
The first print edition you will receive is:
|
|
223
|
-
<strong class="js-start-date-text">
|
|
224
|
-
</strong>
|
|
225
|
-
</p>
|
|
226
194
|
</label>
|
|
227
195
|
`;
|
|
228
196
|
|
|
@@ -236,10 +204,10 @@ exports[`DeliveryStartDate renders with appropriate start message when isAddress
|
|
|
236
204
|
<span class="o-forms-title__main"
|
|
237
205
|
id="start-date-picker-title-span"
|
|
238
206
|
>
|
|
239
|
-
|
|
207
|
+
Start date
|
|
240
208
|
</span>
|
|
241
209
|
<span class="o-forms-title__prompt">
|
|
242
|
-
|
|
210
|
+
The first print edition you will receive is:
|
|
243
211
|
</span>
|
|
244
212
|
</span>
|
|
245
213
|
<span class="o-forms-input o-forms-input--text">
|
|
@@ -273,10 +241,10 @@ exports[`DeliveryStartDate renders with country different than default 1`] = `
|
|
|
273
241
|
<span class="o-forms-title__main"
|
|
274
242
|
id="start-date-picker-title-span"
|
|
275
243
|
>
|
|
276
|
-
|
|
244
|
+
Start date
|
|
277
245
|
</span>
|
|
278
246
|
<span class="o-forms-title__prompt">
|
|
279
|
-
|
|
247
|
+
The first print edition you will receive is:
|
|
280
248
|
</span>
|
|
281
249
|
</span>
|
|
282
250
|
<span class="o-forms-input o-forms-input--text">
|
|
@@ -292,11 +260,6 @@ exports[`DeliveryStartDate renders with country different than default 1`] = `
|
|
|
292
260
|
Please select a valid start date
|
|
293
261
|
</span>
|
|
294
262
|
</span>
|
|
295
|
-
<p>
|
|
296
|
-
The first print edition you will receive is:
|
|
297
|
-
<strong class="js-start-date-text">
|
|
298
|
-
</strong>
|
|
299
|
-
</p>
|
|
300
263
|
</label>
|
|
301
264
|
`;
|
|
302
265
|
|
|
@@ -310,10 +273,10 @@ exports[`DeliveryStartDate renders with default props 1`] = `
|
|
|
310
273
|
<span class="o-forms-title__main"
|
|
311
274
|
id="start-date-picker-title-span"
|
|
312
275
|
>
|
|
313
|
-
|
|
276
|
+
Start date
|
|
314
277
|
</span>
|
|
315
278
|
<span class="o-forms-title__prompt">
|
|
316
|
-
|
|
279
|
+
The first print edition you will receive is:
|
|
317
280
|
</span>
|
|
318
281
|
</span>
|
|
319
282
|
<span class="o-forms-input o-forms-input--text">
|
|
@@ -329,10 +292,5 @@ exports[`DeliveryStartDate renders with default props 1`] = `
|
|
|
329
292
|
Please select a valid start date
|
|
330
293
|
</span>
|
|
331
294
|
</span>
|
|
332
|
-
<p>
|
|
333
|
-
The first print edition you will receive is:
|
|
334
|
-
<strong class="js-start-date-text">
|
|
335
|
-
</strong>
|
|
336
|
-
</p>
|
|
337
295
|
</label>
|
|
338
296
|
`;
|
|
@@ -30,10 +30,6 @@ export function DeliveryStartDate({
|
|
|
30
30
|
defaultValue: value,
|
|
31
31
|
};
|
|
32
32
|
|
|
33
|
-
const startMessage = isAddressUpdate
|
|
34
|
-
? 'We’ll start delivering to this address from:'
|
|
35
|
-
: 'The first print edition you will receive is:';
|
|
36
|
-
|
|
37
33
|
return (
|
|
38
34
|
<label
|
|
39
35
|
id="deliveryStartDateField"
|
|
@@ -43,10 +39,10 @@ export function DeliveryStartDate({
|
|
|
43
39
|
>
|
|
44
40
|
<span className="o-forms-title">
|
|
45
41
|
<span className="o-forms-title__main" id="start-date-picker-title-span">
|
|
46
|
-
|
|
42
|
+
Start date
|
|
47
43
|
</span>
|
|
48
44
|
<span className="o-forms-title__prompt">
|
|
49
|
-
|
|
45
|
+
The first print edition you will receive is: {date}
|
|
50
46
|
</span>
|
|
51
47
|
</span>
|
|
52
48
|
|
|
@@ -57,9 +53,12 @@ export function DeliveryStartDate({
|
|
|
57
53
|
</span>
|
|
58
54
|
</span>
|
|
59
55
|
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
56
|
+
{isAddressUpdate && (
|
|
57
|
+
<p>
|
|
58
|
+
We’ll start delivering to this address from:{' '}
|
|
59
|
+
<strong className="js-start-date-text">{date}</strong>
|
|
60
|
+
</p>
|
|
61
|
+
)}
|
|
63
62
|
</label>
|
|
64
63
|
);
|
|
65
64
|
}
|
|
@@ -44,7 +44,6 @@ function DeliveryStartDate(_ref) {
|
|
|
44
44
|
disabled: isDisabled,
|
|
45
45
|
defaultValue: value
|
|
46
46
|
});
|
|
47
|
-
var startMessage = isAddressUpdate ? 'We’ll start delivering to this address from:' : 'The first print edition you will receive is:';
|
|
48
47
|
return /*#__PURE__*/_react["default"].createElement("label", {
|
|
49
48
|
id: "deliveryStartDateField",
|
|
50
49
|
className: "o-forms-field ncf__validation-error",
|
|
@@ -55,13 +54,13 @@ function DeliveryStartDate(_ref) {
|
|
|
55
54
|
}, /*#__PURE__*/_react["default"].createElement("span", {
|
|
56
55
|
className: "o-forms-title__main",
|
|
57
56
|
id: "start-date-picker-title-span"
|
|
58
|
-
}, "
|
|
57
|
+
}, "Start date"), /*#__PURE__*/_react["default"].createElement("span", {
|
|
59
58
|
className: "o-forms-title__prompt"
|
|
60
|
-
}, "
|
|
59
|
+
}, "The first print edition you will receive is: ", date)), /*#__PURE__*/_react["default"].createElement("span", {
|
|
61
60
|
className: inputWrapperClassNames
|
|
62
61
|
}, /*#__PURE__*/_react["default"].createElement("input", inputProps), /*#__PURE__*/_react["default"].createElement("span", {
|
|
63
62
|
className: "o-forms-input__error"
|
|
64
|
-
}, "Please select a valid start date")), /*#__PURE__*/_react["default"].createElement("p", null,
|
|
63
|
+
}, "Please select a valid start date")), isAddressUpdate && /*#__PURE__*/_react["default"].createElement("p", null, "We\u2019ll start delivering to this address from:", ' ', /*#__PURE__*/_react["default"].createElement("strong", {
|
|
65
64
|
className: "js-start-date-text"
|
|
66
65
|
}, date)));
|
|
67
66
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@financial-times/n-conversion-forms",
|
|
3
|
-
"version": "37.
|
|
3
|
+
"version": "37.2.0",
|
|
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": {
|
|
@@ -171,7 +171,7 @@ const deliveryOptionMessages = [
|
|
|
171
171
|
customId: 'ML',
|
|
172
172
|
flightMarket: true,
|
|
173
173
|
description:
|
|
174
|
-
'Enjoy delivery of the newspaper to your home or office address. Note this is a postal delivery - expect delivery after the day of publication. If you would prefer to read the newspaper on the day of publication, purchase an FT ePaper subscription, our digital replica of
|
|
174
|
+
'Enjoy delivery of the newspaper to your home or office address. Note this is a postal delivery - expect delivery after the day of publication. If you would prefer to read the newspaper on the day of publication, purchase an FT ePaper subscription, our digital replica of each daily edition.',
|
|
175
175
|
},
|
|
176
176
|
{
|
|
177
177
|
deliveryFrequency: [
|
|
@@ -185,7 +185,7 @@ describe('Find Custom Delivery Option', () => {
|
|
|
185
185
|
title: 'Mail Delivery',
|
|
186
186
|
customId: 'ML',
|
|
187
187
|
description:
|
|
188
|
-
'Enjoy delivery of the newspaper to your home or office address. Note this is a postal delivery - expect delivery after the day of publication. If you would prefer to read the newspaper on the day of publication, purchase an FT ePaper subscription, our digital replica of
|
|
188
|
+
'Enjoy delivery of the newspaper to your home or office address. Note this is a postal delivery - expect delivery after the day of publication. If you would prefer to read the newspaper on the day of publication, purchase an FT ePaper subscription, our digital replica of each daily edition.',
|
|
189
189
|
};
|
|
190
190
|
|
|
191
191
|
const deliveryOption = getDeliveryOption(
|