@financial-times/n-conversion-forms 27.3.2 → 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.
@@ -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
  };
@@ -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}
@@ -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
  };
@@ -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",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@financial-times/n-conversion-forms",
3
- "version": "27.3.2",
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": {