@financial-times/n-conversion-forms 44.5.0 → 44.5.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.
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "branch": "",
3
3
  "repo": "n-conversion-forms",
4
- "version": "b5701ec726caa486c364874cd38b94dc91b23a04",
5
- "tag": "v44.5.0",
6
- "buildNumber": "17440"
4
+ "version": "3d7277f162178bab7f179119d5b1ab604450e546",
5
+ "tag": "v44.5.2",
6
+ "buildNumber": "17578"
7
7
  }
@@ -9,7 +9,6 @@ exports[`PaymentTerm When using custom options renders when not using an option
9
9
  <div class="ncf__payment-term__item o-forms-input--radio-round ncf__payment-term__item--discount">
10
10
  <input type="radio"
11
11
  id="270"
12
- data-base-amount="270"
13
12
  name="paymentTerm"
14
13
  value="270"
15
14
  class="o-forms-input__radio o-forms-input__radio--right ncf__payment-term__input"
@@ -28,7 +27,7 @@ exports[`PaymentTerm When using custom options renders when not using an option
28
27
  </span>
29
28
  <div>
30
29
  <span class="ncf__payment-term__large-price">
31
- €270.00
30
+ 270.00
32
31
  </span>
33
32
  <p class="ncf__payment-term__charge-on-text">
34
33
  You will be charged on May 1, 2021
@@ -39,7 +38,6 @@ exports[`PaymentTerm When using custom options renders when not using an option
39
38
  <div class="ncf__payment-term__item o-forms-input--radio-round ncf__payment-term__item--discount">
40
39
  <input type="radio"
41
40
  id="300"
42
- data-base-amount="300"
43
41
  name="paymentTerm"
44
42
  value="300"
45
43
  class="o-forms-input__radio o-forms-input__radio--right ncf__payment-term__input"
@@ -56,7 +54,7 @@ exports[`PaymentTerm When using custom options renders when not using an option
56
54
  </span>
57
55
  <div>
58
56
  <span class="ncf__payment-term__large-price">
59
- €300.00
57
+ 300.00
60
58
  </span>
61
59
  <p class="ncf__payment-term__charge-on-text">
62
60
  You will be charged on May 1, 2021
@@ -1,7 +1,7 @@
1
1
  import React from 'react';
2
2
  import PropTypes from 'prop-types';
3
3
  import classNames from 'classnames';
4
- import { Period, Monthly, Price } from '@financial-times/n-pricing';
4
+ import { Period, Monthly } from '@financial-times/n-pricing';
5
5
 
6
6
  export function PaymentTerm({
7
7
  fieldId = 'paymentTermField',
@@ -253,10 +253,7 @@ export function PaymentTerm({
253
253
  <span
254
254
  className={largePrice ? 'ncf__payment-term__large-price' : ''}
255
255
  >
256
- {new Price({
257
- value: option.amount,
258
- symbol: option.symbol,
259
- }).getAmountFormatted()}
256
+ {option.price}
260
257
  </span>
261
258
  {option.chargeOnText && (
262
259
  <p className="ncf__payment-term__charge-on-text">
@@ -265,8 +265,6 @@ describe('PaymentTerm', () => {
265
265
  title: 'Annual',
266
266
  subTitle: '(Renews annually unless cancelled)',
267
267
  price: '€ 270.00',
268
- symbol: '€',
269
- amount: 270.0,
270
268
  value: 270.0,
271
269
  isTrial: false,
272
270
  discount: '33%',
@@ -277,8 +275,6 @@ describe('PaymentTerm', () => {
277
275
  {
278
276
  title: '12 Month Subscription',
279
277
  price: '€ 300.00',
280
- symbol: '€',
281
- amount: 300.0,
282
278
  value: 300.0,
283
279
  isTrial: false,
284
280
  discount: '10%',
@@ -204,10 +204,7 @@ function PaymentTerm(_ref) {
204
204
  className: "ncf__payment-term__description"
205
205
  }, nameMap['custom'].price(option.price), nameMap['custom'].monthlyPrice(option.monthlyPrice && option.monthlyPrice !== '0' ? Number(option.monthlyPrice) : getMonthlyPriceFromPeriod(option.amount, option.currency, option.value)), nameMap['custom'].renewsText(getTimeFromPeriod(option.value))) : /*#__PURE__*/_react["default"].createElement("div", null, /*#__PURE__*/_react["default"].createElement("span", {
206
206
  className: largePrice ? 'ncf__payment-term__large-price' : ''
207
- }, new _nPricing.Price({
208
- value: option.amount,
209
- symbol: option.symbol
210
- }).getAmountFormatted()), option.chargeOnText && /*#__PURE__*/_react["default"].createElement("p", {
207
+ }, option.price), option.chargeOnText && /*#__PURE__*/_react["default"].createElement("p", {
211
208
  className: "ncf__payment-term__charge-on-text"
212
209
  }, option.chargeOnText)));
213
210
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@financial-times/n-conversion-forms",
3
- "version": "44.5.0",
3
+ "version": "44.5.2",
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": {