@financial-times/n-conversion-forms 27.3.0 → 27.3.3

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.
@@ -28,7 +28,7 @@ exports[`LicenceConfirmation renders if content id 1`] = `
28
28
  <a href="/content/d19dc7a6-c33b-4931-9a7e-4a74674da29a"
29
29
  class="ncf__link"
30
30
  >
31
- Start reading
31
+ Go to homepage
32
32
  </a>
33
33
  </p>
34
34
  </div>
@@ -62,7 +62,7 @@ exports[`LicenceConfirmation renders if educational licence 1`] = `
62
62
  <a href="/"
63
63
  class="ncf__link"
64
64
  >
65
- Start reading
65
+ Go to homepage
66
66
  </a>
67
67
  </p>
68
68
  </div>
@@ -97,7 +97,7 @@ exports[`LicenceConfirmation renders if is embedded 1`] = `
97
97
  class="ncf__link"
98
98
  target="_top"
99
99
  >
100
- Start reading
100
+ Go to homepage
101
101
  </a>
102
102
  </p>
103
103
  </div>
@@ -131,7 +131,7 @@ exports[`LicenceConfirmation renders if is trial 1`] = `
131
131
  <a href="/"
132
132
  class="ncf__link"
133
133
  >
134
- Start reading
134
+ Go to homepage
135
135
  </a>
136
136
  </p>
137
137
  </div>
@@ -165,7 +165,7 @@ exports[`LicenceConfirmation renders with custom duration value 1`] = `
165
165
  <a href="/"
166
166
  class="ncf__link"
167
167
  >
168
- Start reading
168
+ Go to homepage
169
169
  </a>
170
170
  </p>
171
171
  </div>
@@ -199,7 +199,7 @@ exports[`LicenceConfirmation renders with default props 1`] = `
199
199
  <a href="/"
200
200
  class="ncf__link"
201
201
  >
202
- Start reading
202
+ Go to homepage
203
203
  </a>
204
204
  </p>
205
205
  </div>
@@ -22,7 +22,6 @@ export function AcceptTerms ({
22
22
  isPrintProduct = false,
23
23
  specialTerms = null,
24
24
  isSingleTerm = false,
25
- isNewDigitalBuyFlowConsent = false,
26
25
  hideConfirmTermsAndConditions = false,
27
26
  }) {
28
27
  const divProps = {
@@ -52,15 +51,7 @@ export function AcceptTerms ({
52
51
 
53
52
  const authFirstStepTerms = (
54
53
  <>
55
- {
56
- // TODO: clean up the code in https://financialtimes.atlassian.net/browse/ACQ-1593
57
- // isNewDigitalBuyFlowConsent flag for new A/B testing of consents auth first buy flow
58
- // after the test it will be one of the conditions for the below flow
59
- }
60
- {isNewDigitalBuyFlowConsent && (
61
- <hr className=" ncf ncf__divider-horizontal" />
62
- )}
63
- {!isNewDigitalBuyFlowConsent && (
54
+ {(
64
55
  <ul className="o-typography-list ncf__accept-terms-list">
65
56
  <li>
66
57
  <span className="terms-auth-first-step">
@@ -410,6 +401,5 @@ AcceptTerms.propTypes = {
410
401
  isPrintProduct: PropTypes.bool,
411
402
  specialTerms: PropTypes.string,
412
403
  isSingleTerm: PropTypes.bool,
413
- isNewDigitalBuyFlowConsent: PropTypes.bool,
414
404
  hideConfirmTermsAndConditions: PropTypes.bool,
415
405
  };
@@ -20,8 +20,11 @@ export function DeliveryCity ({
20
20
  GBR: 'e.g. Bath',
21
21
  USA: 'e.g. Los Angeles',
22
22
  CAN: 'e.g. Montreal',
23
+ ARE: 'e.g. Dubai'
23
24
  };
24
25
 
26
+ const inputLabel = country === 'ARE'? 'Emirate or City':'City';
27
+
25
28
  return (
26
29
  <label
27
30
  id="deliveryCityField"
@@ -30,7 +33,7 @@ export function DeliveryCity ({
30
33
  htmlFor="deliveryCity"
31
34
  >
32
35
  <span className="o-forms-title">
33
- <span className="o-forms-title__main">City</span>
36
+ <span className="o-forms-title__main">{inputLabel}</span>
34
37
  </span>
35
38
  <span className={inputWrapperClassName}>
36
39
  <input
@@ -103,12 +103,18 @@ export function DeliveryInstructions ({
103
103
  'o-forms-input--textarea',
104
104
  { 'o-forms-input--invalid': hasError },
105
105
  ]);
106
-
106
+ const FTShippingZone = identifyFTShippingZone(country);
107
107
  const extraInstruction =
108
108
  country === 'GBR'
109
109
  ? ''
110
110
  : '\u000a- Special handling, e.g. place in plastic bag, 24/7 security on reception';
111
111
  const defaultPlaceholder = {
112
+ CEMEA_V1: `Enter instructions ${
113
+ maxlength && `(Max. ${maxlength} characters)`
114
+ }:\u000a- Door colour, letterbox location\u000a- Door entry codes, etc.`,
115
+ CEMEA_V2: `Enter instructions ${
116
+ maxlength && `(Max. ${maxlength} characters)`
117
+ }:\u000a- Door colour, letterbox location\u000a- Door entry codes, etc.`,
112
118
  GBR: `Enter instructions ${
113
119
  maxlength && `(Max. ${maxlength} characters)`
114
120
  }:\u000a- Door colour, letterbox location\u000a- Placement i.e. letterbox delivery${extraInstruction}`,
@@ -126,7 +132,7 @@ export function DeliveryInstructions ({
126
132
  ...(maxlength && { maxLength: maxlength }),
127
133
  ...(rows && { rows }),
128
134
  'data-trackable': 'field-deliveryInstructions',
129
- placeholder: placeholder ? placeholder : defaultPlaceholder[country],
135
+ placeholder: placeholder ? placeholder : defaultPlaceholder[FTShippingZone],
130
136
  disabled: isDisabled,
131
137
  defaultValue: value,
132
138
  };
@@ -135,7 +141,7 @@ export function DeliveryInstructions ({
135
141
  Special characters including punctuation cannot be used in the delivery instructions.
136
142
  </span>
137
143
  );
138
- const FTShippingZone = identifyFTShippingZone(country);
144
+
139
145
  return (
140
146
  <label
141
147
  id={fieldId}
@@ -55,7 +55,7 @@ export function LicenceConfirmation ({
55
55
  )}
56
56
 
57
57
  <p className="ncf__paragraph ncf__center">
58
- <a {...readingLinkProps}>Start reading</a>
58
+ <a {...readingLinkProps}>Go to homepage</a>
59
59
  </p>
60
60
  </div>
61
61
  );
@@ -56,8 +56,6 @@ function AcceptTerms(_ref) {
56
56
  specialTerms = _ref$specialTerms === void 0 ? null : _ref$specialTerms,
57
57
  _ref$isSingleTerm = _ref.isSingleTerm,
58
58
  isSingleTerm = _ref$isSingleTerm === void 0 ? false : _ref$isSingleTerm,
59
- _ref$isNewDigitalBuyF = _ref.isNewDigitalBuyFlowConsent,
60
- isNewDigitalBuyFlowConsent = _ref$isNewDigitalBuyF === void 0 ? false : _ref$isNewDigitalBuyF,
61
59
  _ref$hideConfirmTerms = _ref.hideConfirmTermsAndConditions,
62
60
  hideConfirmTermsAndConditions = _ref$hideConfirmTerms === void 0 ? false : _ref$hideConfirmTerms;
63
61
 
@@ -87,9 +85,7 @@ function AcceptTerms(_ref) {
87
85
  defaultChecked: true
88
86
  });
89
87
 
90
- var authFirstStepTerms = /*#__PURE__*/_react["default"].createElement(_react["default"].Fragment, null, isNewDigitalBuyFlowConsent && /*#__PURE__*/_react["default"].createElement("hr", {
91
- className: " ncf ncf__divider-horizontal"
92
- }), !isNewDigitalBuyFlowConsent && /*#__PURE__*/_react["default"].createElement("ul", {
88
+ var authFirstStepTerms = /*#__PURE__*/_react["default"].createElement(_react["default"].Fragment, null, /*#__PURE__*/_react["default"].createElement("ul", {
93
89
  className: "o-typography-list ncf__accept-terms-list"
94
90
  }, /*#__PURE__*/_react["default"].createElement("li", null, /*#__PURE__*/_react["default"].createElement("span", {
95
91
  className: "terms-auth-first-step"
@@ -250,6 +246,5 @@ AcceptTerms.propTypes = {
250
246
  isPrintProduct: _propTypes["default"].bool,
251
247
  specialTerms: _propTypes["default"].string,
252
248
  isSingleTerm: _propTypes["default"].bool,
253
- isNewDigitalBuyFlowConsent: _propTypes["default"].bool,
254
249
  hideConfirmTermsAndConditions: _propTypes["default"].bool
255
250
  };
@@ -30,8 +30,10 @@ function DeliveryCity(_ref) {
30
30
  var inputPlaceholder = {
31
31
  GBR: 'e.g. Bath',
32
32
  USA: 'e.g. Los Angeles',
33
- CAN: 'e.g. Montreal'
33
+ CAN: 'e.g. Montreal',
34
+ ARE: 'e.g. Dubai'
34
35
  };
36
+ var inputLabel = country === 'ARE' ? 'Emirate or City' : 'City';
35
37
  return /*#__PURE__*/_react["default"].createElement("label", {
36
38
  id: "deliveryCityField",
37
39
  className: "o-forms-field ncf__validation-error",
@@ -41,7 +43,7 @@ function DeliveryCity(_ref) {
41
43
  className: "o-forms-title"
42
44
  }, /*#__PURE__*/_react["default"].createElement("span", {
43
45
  className: "o-forms-title__main"
44
- }, "City")), /*#__PURE__*/_react["default"].createElement("span", {
46
+ }, inputLabel)), /*#__PURE__*/_react["default"].createElement("span", {
45
47
  className: inputWrapperClassName
46
48
  }, /*#__PURE__*/_react["default"].createElement("input", {
47
49
  type: "text",
@@ -85,8 +85,11 @@ function DeliveryInstructions(_ref) {
85
85
  var textAreaWrapperClassNames = (0, _classnames["default"])(['o-forms-input', 'o-forms-input--textarea', {
86
86
  'o-forms-input--invalid': hasError
87
87
  }]);
88
+ var FTShippingZone = (0, _supportedCountries.identifyFTShippingZone)(country);
88
89
  var extraInstruction = country === 'GBR' ? '' : "\n- Special handling, e.g. place in plastic bag, 24/7 security on reception";
89
90
  var defaultPlaceholder = {
91
+ CEMEA_V1: "Enter instructions ".concat(maxlength && "(Max. ".concat(maxlength, " characters)"), ":\n- Door colour, letterbox location\n- Door entry codes, etc."),
92
+ CEMEA_V2: "Enter instructions ".concat(maxlength && "(Max. ".concat(maxlength, " characters)"), ":\n- Door colour, letterbox location\n- Door entry codes, etc."),
90
93
  GBR: "Enter instructions ".concat(maxlength && "(Max. ".concat(maxlength, " characters)"), ":\n- Door colour, letterbox location\n- Placement i.e. letterbox delivery").concat(extraInstruction),
91
94
  USA: "Enter instructions ".concat(maxlength && "(Max. ".concat(maxlength, " characters)"), ":\n- Door colour, driveway signage\n- Cross street").concat(extraInstruction),
92
95
  CAN: "Enter instructions ".concat(maxlength && "(Max. ".concat(maxlength, " characters)"), ":\n- Door colour, driveway signage\n- Cross street").concat(extraInstruction)
@@ -101,7 +104,7 @@ function DeliveryInstructions(_ref) {
101
104
  rows: rows
102
105
  }), {}, {
103
106
  'data-trackable': 'field-deliveryInstructions',
104
- placeholder: placeholder ? placeholder : defaultPlaceholder[country],
107
+ placeholder: placeholder ? placeholder : defaultPlaceholder[FTShippingZone],
105
108
  disabled: isDisabled,
106
109
  defaultValue: value
107
110
  });
@@ -110,7 +113,6 @@ function DeliveryInstructions(_ref) {
110
113
  className: "o-forms-title__prompt"
111
114
  }, "Special characters including punctuation cannot be used in the delivery instructions.");
112
115
 
113
- var FTShippingZone = (0, _supportedCountries.identifyFTShippingZone)(country);
114
116
  return /*#__PURE__*/_react["default"].createElement("label", {
115
117
  id: fieldId,
116
118
  className: "o-forms-field o-forms-field--optional",
@@ -63,7 +63,7 @@ function LicenceConfirmation(_ref) {
63
63
  href: "/myft"
64
64
  }, "Go to myFT")), /*#__PURE__*/_react["default"].createElement("p", {
65
65
  className: "ncf__paragraph ncf__center"
66
- }, /*#__PURE__*/_react["default"].createElement("a", readingLinkProps, "Start reading")));
66
+ }, /*#__PURE__*/_react["default"].createElement("a", readingLinkProps, "Go to homepage")));
67
67
  }
68
68
 
69
69
  LicenceConfirmation.propTypes = {
@@ -4,7 +4,6 @@ const { printRegions } = require('./constants');
4
4
  const supportedCountriesMasterList = {
5
5
  cemeaV1: {
6
6
  AUT: 'Austria',
7
- ARE: 'United Arab Emirates',
8
7
  BEL: 'Belgium',
9
8
  BGR: 'Bulgaria',
10
9
  HRV: 'Croatia',
@@ -49,7 +48,8 @@ const supportedCountriesMasterList = {
49
48
  other: {
50
49
  GBR: 'United Kingdom',
51
50
  USA: 'United States',
52
- CAN: 'Canada'
51
+ CAN: 'Canada',
52
+ ARE: 'United Arab Emirates'
53
53
  }
54
54
  };
55
55
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@financial-times/n-conversion-forms",
3
- "version": "27.3.0",
3
+ "version": "27.3.3",
4
4
  "description": "Containing jsx components and styles for forms included on Accounts and Acqusition apps (next-signup, next-profile, next-retention, etc).",
5
5
  "main": "dist/index.js",
6
6
  "scripts": {