@financial-times/n-conversion-forms 37.2.2 → 37.3.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/.circleci/config.yml +1 -1
- package/.toolkitrc.yml +1 -1
- package/.toolkitstate/ci.json +2 -2
- package/components/payment-term.jsx +11 -1
- package/components/payment-term.stories.js +11 -0
- package/dist/payment-term.jsx +9 -0
- package/package.json +17 -17
package/.circleci/config.yml
CHANGED
package/.toolkitrc.yml
CHANGED
package/.toolkitstate/ci.json
CHANGED
|
@@ -190,6 +190,15 @@ export function PaymentTerm({
|
|
|
190
190
|
};
|
|
191
191
|
|
|
192
192
|
const createDiscount = () => {
|
|
193
|
+
// We need to display a specific text in the discount tile for H2 campaign offers.
|
|
194
|
+
// This is a TEMPORARY hack and will be removed once the campaign is over (Monday, October 28th).
|
|
195
|
+
// A ticket has been raised to deal with the clean-up: https://financialtimes.atlassian.net/browse/ACQ-2970.
|
|
196
|
+
if (option.specialOffer) {
|
|
197
|
+
return (
|
|
198
|
+
<span className="ncf__payment-term__discount">Special offer</span>
|
|
199
|
+
);
|
|
200
|
+
}
|
|
201
|
+
|
|
193
202
|
return (
|
|
194
203
|
option.discount && (
|
|
195
204
|
<span className="ncf__payment-term__discount">
|
|
@@ -245,7 +254,7 @@ export function PaymentTerm({
|
|
|
245
254
|
option.amount,
|
|
246
255
|
option.currency,
|
|
247
256
|
option.value
|
|
248
|
-
|
|
257
|
+
)
|
|
249
258
|
)}
|
|
250
259
|
{nameMap['custom'].renewsText(getTimeFromPeriod(option.value))}
|
|
251
260
|
</div>
|
|
@@ -420,6 +429,7 @@ PaymentTerm.propTypes = {
|
|
|
420
429
|
title: PropTypes.string,
|
|
421
430
|
subTitle: PropTypes.string,
|
|
422
431
|
bestOffer: PropTypes.bool,
|
|
432
|
+
specialOffer: PropTypes.bool,
|
|
423
433
|
chargeOnText: PropTypes.string,
|
|
424
434
|
fulfilmentOption: PropTypes.string,
|
|
425
435
|
})
|
|
@@ -132,6 +132,17 @@ RenewOffers.args = {
|
|
|
132
132
|
selected: false,
|
|
133
133
|
chargeOnText: 'You will be charged on May 1, 2021',
|
|
134
134
|
},
|
|
135
|
+
{
|
|
136
|
+
title: 'Annual',
|
|
137
|
+
subTitle: '(Renews annually unless cancelled)',
|
|
138
|
+
price: '€ 150.00',
|
|
139
|
+
value: 150.0,
|
|
140
|
+
isTrial: false,
|
|
141
|
+
discount: '25%',
|
|
142
|
+
specialOffer: true,
|
|
143
|
+
selected: false,
|
|
144
|
+
chargeOnText: 'You will be charged on May 1, 2021',
|
|
145
|
+
},
|
|
135
146
|
{
|
|
136
147
|
title: '12 Month Subscription',
|
|
137
148
|
price: '€ 300.00',
|
package/dist/payment-term.jsx
CHANGED
|
@@ -185,6 +185,14 @@ function PaymentTerm(_ref) {
|
|
|
185
185
|
defaultChecked: true
|
|
186
186
|
});
|
|
187
187
|
var createDiscount = function createDiscount() {
|
|
188
|
+
// We need to display a specific text in the discount tile for H2 campaign offers.
|
|
189
|
+
// This is a TEMPORARY hack and will be removed once the campaign is over (Monday, October 28th).
|
|
190
|
+
// A ticket has been raised to deal with the clean-up: https://financialtimes.atlassian.net/browse/ACQ-2970.
|
|
191
|
+
if (option.specialOffer) {
|
|
192
|
+
return /*#__PURE__*/_react["default"].createElement("span", {
|
|
193
|
+
className: "ncf__payment-term__discount"
|
|
194
|
+
}, "Special offer");
|
|
195
|
+
}
|
|
188
196
|
return option.discount && /*#__PURE__*/_react["default"].createElement("span", {
|
|
189
197
|
className: "ncf__payment-term__discount"
|
|
190
198
|
}, option.bestOffer ? 'Best offer' : "Save ".concat(option.discount, " off RRP"));
|
|
@@ -306,6 +314,7 @@ PaymentTerm.propTypes = {
|
|
|
306
314
|
title: _propTypes["default"].string,
|
|
307
315
|
subTitle: _propTypes["default"].string,
|
|
308
316
|
bestOffer: _propTypes["default"].bool,
|
|
317
|
+
specialOffer: _propTypes["default"].bool,
|
|
309
318
|
chargeOnText: _propTypes["default"].string,
|
|
310
319
|
fulfilmentOption: _propTypes["default"].string
|
|
311
320
|
})),
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@financial-times/n-conversion-forms",
|
|
3
|
-
"version": "37.
|
|
3
|
+
"version": "37.3.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": {
|
|
@@ -26,25 +26,25 @@
|
|
|
26
26
|
"homepage": "https://github.com/Financial-Times/n-conversion-forms#readme",
|
|
27
27
|
"dependencies": {
|
|
28
28
|
"@babel/runtime": "^7.23.9",
|
|
29
|
-
"@financial-times/n-pricing": "
|
|
29
|
+
"@financial-times/n-pricing": "8.0.0",
|
|
30
30
|
"classnames": "2.5.1",
|
|
31
31
|
"fetchres": "1.7.2",
|
|
32
32
|
"lodash.get": "4.4.2",
|
|
33
|
-
"n-common-static-data": "github:Financial-Times/n-common-static-data#
|
|
33
|
+
"n-common-static-data": "github:Financial-Times/n-common-static-data#v3.0.0"
|
|
34
34
|
},
|
|
35
35
|
"devDependencies": {
|
|
36
36
|
"@babel/core": "^7.23.9",
|
|
37
37
|
"@babel/plugin-transform-runtime": "^7.23.9",
|
|
38
38
|
"@babel/preset-env": "^7.23.9",
|
|
39
39
|
"@babel/preset-react": "^7.23.3",
|
|
40
|
-
"@dotcom-tool-kit/babel": "3.1
|
|
41
|
-
"@dotcom-tool-kit/component": "4.1.
|
|
42
|
-
"@dotcom-tool-kit/eslint": "3.2.
|
|
43
|
-
"@dotcom-tool-kit/frontend-app": "3.2.
|
|
44
|
-
"@dotcom-tool-kit/jest": "3.4.
|
|
45
|
-
"@dotcom-tool-kit/lint-staged-npm": "3.2.
|
|
46
|
-
"@dotcom-tool-kit/logger": "3.4.
|
|
47
|
-
"@dotcom-tool-kit/prettier": "3.2.
|
|
40
|
+
"@dotcom-tool-kit/babel": "3.2.1",
|
|
41
|
+
"@dotcom-tool-kit/component": "4.1.5",
|
|
42
|
+
"@dotcom-tool-kit/eslint": "3.2.2",
|
|
43
|
+
"@dotcom-tool-kit/frontend-app": "3.2.6",
|
|
44
|
+
"@dotcom-tool-kit/jest": "3.4.1",
|
|
45
|
+
"@dotcom-tool-kit/lint-staged-npm": "3.2.1",
|
|
46
|
+
"@dotcom-tool-kit/logger": "3.4.1",
|
|
47
|
+
"@dotcom-tool-kit/prettier": "3.2.1",
|
|
48
48
|
"@financial-times/eslint-config-next": "7.1.0",
|
|
49
49
|
"@financial-times/jest-browser-resolver": "^1.0.2",
|
|
50
50
|
"@snyk/protect": "1.1278.0",
|
|
@@ -54,7 +54,7 @@
|
|
|
54
54
|
"@storybook/react-webpack5": "^7.6.13",
|
|
55
55
|
"@sucrase/jest-plugin": "^3.0.0",
|
|
56
56
|
"check-engines": "^1.6.0",
|
|
57
|
-
"dotcom-tool-kit": "3.5.
|
|
57
|
+
"dotcom-tool-kit": "3.5.2",
|
|
58
58
|
"enzyme": "^3.11.0",
|
|
59
59
|
"enzyme-adapter-react-16": "^1.15.7",
|
|
60
60
|
"eslint-config-prettier": "^9.1.0",
|
|
@@ -81,8 +81,11 @@
|
|
|
81
81
|
"webpack-cli": "^5.1.4"
|
|
82
82
|
},
|
|
83
83
|
"engines": {
|
|
84
|
-
"node": "18.x",
|
|
85
|
-
"npm": "
|
|
84
|
+
"node": "18.x || 20.x || 22.x",
|
|
85
|
+
"npm": "8.x || 9.x || 10.x"
|
|
86
|
+
},
|
|
87
|
+
"volta": {
|
|
88
|
+
"node": "22.7.0"
|
|
86
89
|
},
|
|
87
90
|
"lint-staged": {
|
|
88
91
|
"**/*.{js,jsx,json,scss}": "dotcom-tool-kit format:staged test:staged --"
|
|
@@ -109,8 +112,5 @@
|
|
|
109
112
|
"@financial-times/o-social-follow": "^1.0.0",
|
|
110
113
|
"@financial-times/o-stepped-progress": "^4.0.2",
|
|
111
114
|
"@financial-times/o-typography": "^7.3.1"
|
|
112
|
-
},
|
|
113
|
-
"volta": {
|
|
114
|
-
"node": "18.17.0"
|
|
115
115
|
}
|
|
116
116
|
}
|