@financial-times/n-conversion-forms 45.2.0 → 45.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.
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "branch": "",
3
3
  "repo": "n-conversion-forms",
4
- "version": "7cb3814b5ef6dccca5d29636c4cf6cf98eb37b52",
5
- "tag": "v45.2.0",
6
- "buildNumber": "18122"
4
+ "version": "83a1121b7dce87aa2750326ecac8b77d696acb9d",
5
+ "tag": "v45.3.0",
6
+ "buildNumber": "18143"
7
7
  }
@@ -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
- You are now subscribed to:
156
+ Your purchase is complete for:
157
157
  </p>
158
158
  <h1 class="ncf__header ncf__header--confirmation">
159
159
  </h1>
@@ -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 &amp; 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>
@@ -114,20 +116,22 @@ export function Confirmation({
114
116
  for additional support.
115
117
  </p>
116
118
  </div>
117
- <p className="ncf__paragraph o3-type-body-base">
118
- {isEvergreenSubscriptionTermType
119
- ? 'We will automatically renew your subscription using the payment method provided unless you cancel before your renewal date. '
120
- : ''}
121
- {'See our '}
122
- <a
123
- href="http://help.ft.com/help/legal-privacy/terms-conditions/"
124
- target="_top"
125
- rel="noopener"
126
- >
127
- Terms &amp; Conditions
128
- </a>
129
- {' for details on how to cancel.'}
130
- </p>
119
+
120
+ {isEvergreenSubscriptionTermType && (
121
+ <p className="ncf__paragraph o3-type-body-base">
122
+ We will automatically renew your subscription using the payment method
123
+ provided unless you cancel before your renewal date. See our{' '}
124
+ <a
125
+ href="http://help.ft.com/help/legal-privacy/terms-conditions/"
126
+ target="_top"
127
+ rel="noopener"
128
+ >
129
+ Terms &amp; Conditions
130
+ </a>{' '}
131
+ for details on how to cancel.
132
+ </p>
133
+ )}
134
+
131
135
  {nextActionBottom}
132
136
  </div>
133
137
  );
@@ -139,6 +143,7 @@ Confirmation.propTypes = {
139
143
  b2cPartnershipCopy: PropTypes.array,
140
144
  sendConfirmationEmail: PropTypes.bool,
141
145
  isEvergreenSubscriptionTermType: PropTypes.bool,
146
+ isTermedSubscriptionTermType: PropTypes.bool,
142
147
  offer: PropTypes.string.isRequired,
143
148
  email: PropTypes.string,
144
149
  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: false,
44
+ isTermedSubscriptionTermType: true,
45
45
  };
46
46
 
47
47
  expect(Confirmation).toRenderCorrectly(props);
@@ -66,6 +66,7 @@ Basic.args = {
66
66
  export const TermedSubscriptionTermType = (args) => <Confirmation {...args} />;
67
67
  TermedSubscriptionTermType.args = {
68
68
  sendConfirmationEmail: false,
69
+ isEvergreenTermedSubscriptionTermType: false,
69
70
  isTermedSubscriptionTermType: true,
70
71
  offer: 'Single-term subscription',
71
72
  details: [
@@ -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
- }, "You are now subscribed to:"), /*#__PURE__*/_react["default"].createElement("h1", {
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"
@@ -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
- }, isEvergreenSubscriptionTermType ? '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", {
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.'), nextActionBottom);
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.2.0",
3
+ "version": "45.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": {