@bigbinary/neeto-form-frontend 4.1.8 → 4.1.10

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.
@@ -24,7 +24,7 @@ var yup = require('yup');
24
24
  var i18next = require('i18next');
25
25
  var jsxRuntime = require('react/jsx-runtime');
26
26
  var _toArray = require('@babel/runtime/helpers/toArray');
27
- var constants = require('./constants-DXeRH2r2.js');
27
+ var constants = require('./constants-BSbkmQ4t.js');
28
28
  var classnames = require('classnames');
29
29
  var reactUtils = require('@bigbinary/neeto-commons-frontend/react-utils');
30
30
  var Refresh = require('@bigbinary/neeto-icons/Refresh');
@@ -932,7 +932,7 @@ var MultipleEmailInput = function MultipleEmailInput(_ref) {
932
932
  className: "flex flex-col gap-2 items-end",
933
933
  children: [/*#__PURE__*/jsxRuntime.jsx(Button, _defineProperty(_defineProperty(_defineProperty({
934
934
  label: label,
935
- "data-cy": "add-guest-button",
935
+ "data-testid": "add-guest-button",
936
936
  disabled: isReadOnly,
937
937
  icon: Plus,
938
938
  iconPosition: "left"
@@ -1002,7 +1002,7 @@ var CaptchaField = function CaptchaField(_ref) {
1002
1002
  })
1003
1003
  }), touched && error && /*#__PURE__*/jsxRuntime.jsx("p", {
1004
1004
  className: "neeto-form-engine-input__error",
1005
- "data-cy": "neeto-form-engine-captcha-error",
1005
+ "data-testid": "neeto-form-engine-captcha-error",
1006
1006
  children: error
1007
1007
  })]
1008
1008
  });
@@ -1068,7 +1068,7 @@ var MathCaptcha = function MathCaptcha(_ref) {
1068
1068
  }, [userInput]);
1069
1069
  return /*#__PURE__*/jsxRuntime.jsxs("div", {
1070
1070
  className: "neeto-form-nano-math-captcha",
1071
- "data-cy": "math-captcha",
1071
+ "data-testid": "math-captcha",
1072
1072
  ref: captchaRef,
1073
1073
  children: [/*#__PURE__*/jsxRuntime.jsx("button", {
1074
1074
  className: "neeto-form-nano-math-captcha__button",
@@ -1078,13 +1078,13 @@ var MathCaptcha = function MathCaptcha(_ref) {
1078
1078
  }), /*#__PURE__*/jsxRuntime.jsxs("div", {
1079
1079
  className: "neeto-form-nano-math-captcha__equation",
1080
1080
  children: [/*#__PURE__*/jsxRuntime.jsx("span", {
1081
- "data-cy": "first-number",
1081
+ "data-testid": "first-number",
1082
1082
  children: firstNumber
1083
1083
  }), /*#__PURE__*/jsxRuntime.jsx("span", {
1084
- "data-cy": "operator",
1084
+ "data-testid": "operator",
1085
1085
  children: operator
1086
1086
  }), /*#__PURE__*/jsxRuntime.jsx("span", {
1087
- "data-cy": "second-number",
1087
+ "data-testid": "second-number",
1088
1088
  children: secondNumber
1089
1089
  }), /*#__PURE__*/jsxRuntime.jsx("span", {
1090
1090
  children: "="
@@ -1092,7 +1092,7 @@ var MathCaptcha = function MathCaptcha(_ref) {
1092
1092
  }), /*#__PURE__*/jsxRuntime.jsx(Input, {
1093
1093
  required: true,
1094
1094
  className: "neeto-form-nano-math-captcha__input",
1095
- "data-cy": "math-captcha-input",
1095
+ "data-testid": "math-captcha-input",
1096
1096
  value: userInput,
1097
1097
  onBlur: handleBlur,
1098
1098
  onChange: utils.withEventTargetValue(setUserInput)
@@ -1177,7 +1177,7 @@ var DateField = function DateField(_ref) {
1177
1177
  className: "neeto-form-engine-input__label-wrapper",
1178
1178
  children: label && /*#__PURE__*/jsxRuntime.jsx("label", {
1179
1179
  className: "neeto-form-engine-label",
1180
- "data-cy": "".concat(neetoCist.hyphenate(label), "-input-label"),
1180
+ "data-testid": "".concat(neetoCist.hyphenate(label), "-input-label"),
1181
1181
  children: getLabel(label, isRequired)
1182
1182
  })
1183
1183
  }), /*#__PURE__*/jsxRuntime.jsx("div", {
@@ -1199,7 +1199,7 @@ var DateField = function DateField(_ref) {
1199
1199
  return /*#__PURE__*/jsxRuntime.jsx(DatePicker, _objectSpread$e(_objectSpread$e({}, _objectSpread$e(_objectSpread$e({}, field), {}, {
1200
1200
  type: type
1201
1201
  })), {}, {
1202
- "data-cy": "".concat(neetoCist.hyphenate(label), "-input-field"),
1202
+ "data-testid": "".concat(neetoCist.hyphenate(label), "-input-field"),
1203
1203
  dateFormat: "MMM D, YYYY",
1204
1204
  disabled: isReadOnly,
1205
1205
  error: meta.touched ? meta.error : "",
@@ -1306,6 +1306,7 @@ var SendCodeButton = function SendCodeButton(_ref) {
1306
1306
  return /*#__PURE__*/jsxRuntime.jsx(CheckCircle, {});
1307
1307
  }
1308
1308
  return /*#__PURE__*/jsxRuntime.jsx(Button, {
1309
+ "data-testid": "send-code-button",
1309
1310
  disabled: isDisabled,
1310
1311
  size: "small",
1311
1312
  style: "secondary",
@@ -1349,6 +1350,7 @@ var ResendVerificationCode = function ResendVerificationCode(_ref) {
1349
1350
  i18nKey: "neetoForm.emailVerification.resendCode",
1350
1351
  components: {
1351
1352
  button: /*#__PURE__*/jsxRuntime.jsx(Button, {
1353
+ "data-testid": "otp-resend-button",
1352
1354
  disabled: isResendDisabled,
1353
1355
  size: "small",
1354
1356
  style: "link",
@@ -1428,6 +1430,7 @@ var VerifyCode = function VerifyCode(_ref) {
1428
1430
  }, [code, hasError]);
1429
1431
  return /*#__PURE__*/jsxRuntime.jsxs(jsxRuntime.Fragment, {
1430
1432
  children: [/*#__PURE__*/jsxRuntime.jsx(Input, _objectSpread$c(_objectSpread$c({}, _objectSpread$c({}, field)), {}, {
1433
+ "data-testid": "otp-input-field",
1431
1434
  disabled: isVerifyingCode,
1432
1435
  error: touched ? error : "",
1433
1436
  loading: isVerifyingCode,
@@ -1757,10 +1760,10 @@ var Choices = function Choices(_ref) {
1757
1760
  var Component = isCheckBox ? Checkbox : Radio.Item;
1758
1761
  return /*#__PURE__*/jsxRuntime.jsxs("div", {
1759
1762
  className: "neeto-form-engine-choices__wrapper",
1760
- "data-cy": "".concat(neetoCist.hyphenate(label), "-select-container-wrapper"),
1763
+ "data-testid": "".concat(neetoCist.hyphenate(label), "-select-container-wrapper"),
1761
1764
  children: [/*#__PURE__*/jsxRuntime.jsx("label", {
1762
1765
  className: "neeto-form-engine-label",
1763
- "data-cy": "".concat(neetoCist.hyphenate(label), "-input-label"),
1766
+ "data-testid": "".concat(neetoCist.hyphenate(label), "-input-label"),
1764
1767
  children: label
1765
1768
  }), /*#__PURE__*/jsxRuntime.jsx(ChoiceWrapper, {
1766
1769
  className: "neeto-form-engine-choices",
@@ -1781,21 +1784,21 @@ var Choices = function Choices(_ref) {
1781
1784
  "cursor-not-allowed": disabled
1782
1785
  }),
1783
1786
  id: option.id,
1787
+ label: option.label,
1788
+ name: isCheckBox ? "".concat(name, ".").concat(index) : name,
1789
+ value: option.id,
1790
+ checked: isCheckBox ? (_value$index = value === null || value === void 0 ? void 0 : value[index]) !== null && _value$index !== void 0 ? _value$index : false : value === option.id,
1784
1791
  labelProps: {
1785
1792
  className: classnames({
1786
1793
  "cursor-not-allowed": disabled
1787
1794
  })
1788
- },
1789
- label: option.label,
1790
- name: isCheckBox ? "".concat(name, ".").concat(index) : name,
1791
- value: option.id,
1792
- checked: isCheckBox ? (_value$index = value === null || value === void 0 ? void 0 : value[index]) !== null && _value$index !== void 0 ? _value$index : false : value === option.id
1795
+ }
1793
1796
  })
1794
1797
  }, option.id);
1795
1798
  })
1796
1799
  }), !!error && typeof error === "string" && /*#__PURE__*/jsxRuntime.jsx("p", {
1797
1800
  className: "neeto-form-engine-input__error",
1798
- "data-cy": "neeto-form-engine-".concat(type, "-error"),
1801
+ "data-testid": "neeto-form-engine-".concat(type, "-error"),
1799
1802
  children: error
1800
1803
  })]
1801
1804
  });
@@ -1980,15 +1983,15 @@ var Rating = function Rating(_ref) {
1980
1983
  className: "neeto-form-engine-rating",
1981
1984
  children: [/*#__PURE__*/jsxRuntime.jsx("label", {
1982
1985
  className: "neeto-form-engine-label",
1983
- "data-cy": "rating-input-label",
1986
+ "data-testid": "rating-input-label",
1984
1987
  children: label
1985
1988
  }), /*#__PURE__*/jsxRuntime.jsx("div", {
1986
1989
  className: "neeto-form-engine-rating__row",
1987
- "data-cy": "rating-input-field",
1990
+ "data-testid": "rating-input-field",
1988
1991
  children: render()
1989
1992
  }), !!error && typeof error === "string" && /*#__PURE__*/jsxRuntime.jsx("p", {
1990
1993
  className: "neeto-form-engine-input__error",
1991
- "data-cy": "neeto-form-engine-rating-error",
1994
+ "data-testid": "neeto-form-engine-rating-error",
1992
1995
  children: error
1993
1996
  })]
1994
1997
  });
@@ -2056,7 +2059,7 @@ var RichTextEditor = function RichTextEditor(_ref) {
2056
2059
  className: "neeto-form-engine-input__label-wrapper",
2057
2060
  children: label && /*#__PURE__*/jsxRuntime.jsx("label", {
2058
2061
  className: "neeto-form-engine-label",
2059
- "data-cy": "".concat(neetoCist.hyphenate(label), "-input-label"),
2062
+ "data-testid": "".concat(neetoCist.hyphenate(label), "-input-label"),
2060
2063
  children: getLabel(label, isRequired)
2061
2064
  })
2062
2065
  }), /*#__PURE__*/jsxRuntime.jsx(formik.FastField, {
@@ -2155,12 +2158,12 @@ var StarRating = function StarRating(_ref) {
2155
2158
  className: "neeto-form-engine-input__label-wrapper",
2156
2159
  children: /*#__PURE__*/jsxRuntime.jsx("label", {
2157
2160
  className: "neeto-form-engine-label",
2158
- "data-cy": "star-rating-input-label",
2161
+ "data-testid": "star-rating-input-label",
2159
2162
  children: label
2160
2163
  })
2161
2164
  }), /*#__PURE__*/jsxRuntime.jsx("div", {
2162
2165
  className: "neeto-form-engine-star-rating__row",
2163
- "data-cy": "star-rating-input-field",
2166
+ "data-testid": "star-rating-input-field",
2164
2167
  children: constants.generateArray(minValue, maxValue).map(function (index) {
2165
2168
  return /*#__PURE__*/jsxRuntime.jsx(RatingButton$1, _objectSpread$3({
2166
2169
  label: index,
@@ -2169,7 +2172,7 @@ var StarRating = function StarRating(_ref) {
2169
2172
  })
2170
2173
  }), !!error && typeof error === "string" && /*#__PURE__*/jsxRuntime.jsx("p", {
2171
2174
  className: "neeto-form-engine-input__error",
2172
- "data-cy": "neeto-form-engine-star-rating-error",
2175
+ "data-testid": "neeto-form-engine-star-rating-error",
2173
2176
  children: error
2174
2177
  })]
2175
2178
  });
@@ -2353,4 +2356,4 @@ exports.getFieldComponent = getFieldComponent;
2353
2356
  exports.getWithExpiry = getWithExpiry;
2354
2357
  exports.mergeRefs = mergeRefs;
2355
2358
  exports.renderButtonsInOrder = renderButtonsInOrder;
2356
- //# sourceMappingURL=utils-DCfJeA1T.js.map
2359
+ //# sourceMappingURL=utils-BdTASoGp.js.map