@bigbinary/neeto-form-frontend 4.1.9 → 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,7 +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-cy": "send-code-button",
1309
+ "data-testid": "send-code-button",
1310
1310
  disabled: isDisabled,
1311
1311
  size: "small",
1312
1312
  style: "secondary",
@@ -1350,7 +1350,7 @@ var ResendVerificationCode = function ResendVerificationCode(_ref) {
1350
1350
  i18nKey: "neetoForm.emailVerification.resendCode",
1351
1351
  components: {
1352
1352
  button: /*#__PURE__*/jsxRuntime.jsx(Button, {
1353
- "data-cy": "otp-resend-button",
1353
+ "data-testid": "otp-resend-button",
1354
1354
  disabled: isResendDisabled,
1355
1355
  size: "small",
1356
1356
  style: "link",
@@ -1430,7 +1430,7 @@ var VerifyCode = function VerifyCode(_ref) {
1430
1430
  }, [code, hasError]);
1431
1431
  return /*#__PURE__*/jsxRuntime.jsxs(jsxRuntime.Fragment, {
1432
1432
  children: [/*#__PURE__*/jsxRuntime.jsx(Input, _objectSpread$c(_objectSpread$c({}, _objectSpread$c({}, field)), {}, {
1433
- "data-cy": "otp-input-field",
1433
+ "data-testid": "otp-input-field",
1434
1434
  disabled: isVerifyingCode,
1435
1435
  error: touched ? error : "",
1436
1436
  loading: isVerifyingCode,
@@ -1760,10 +1760,10 @@ var Choices = function Choices(_ref) {
1760
1760
  var Component = isCheckBox ? Checkbox : Radio.Item;
1761
1761
  return /*#__PURE__*/jsxRuntime.jsxs("div", {
1762
1762
  className: "neeto-form-engine-choices__wrapper",
1763
- "data-cy": "".concat(neetoCist.hyphenate(label), "-select-container-wrapper"),
1763
+ "data-testid": "".concat(neetoCist.hyphenate(label), "-select-container-wrapper"),
1764
1764
  children: [/*#__PURE__*/jsxRuntime.jsx("label", {
1765
1765
  className: "neeto-form-engine-label",
1766
- "data-cy": "".concat(neetoCist.hyphenate(label), "-input-label"),
1766
+ "data-testid": "".concat(neetoCist.hyphenate(label), "-input-label"),
1767
1767
  children: label
1768
1768
  }), /*#__PURE__*/jsxRuntime.jsx(ChoiceWrapper, {
1769
1769
  className: "neeto-form-engine-choices",
@@ -1784,21 +1784,21 @@ var Choices = function Choices(_ref) {
1784
1784
  "cursor-not-allowed": disabled
1785
1785
  }),
1786
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,
1787
1791
  labelProps: {
1788
1792
  className: classnames({
1789
1793
  "cursor-not-allowed": disabled
1790
1794
  })
1791
- },
1792
- label: option.label,
1793
- name: isCheckBox ? "".concat(name, ".").concat(index) : name,
1794
- value: option.id,
1795
- 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
+ }
1796
1796
  })
1797
1797
  }, option.id);
1798
1798
  })
1799
1799
  }), !!error && typeof error === "string" && /*#__PURE__*/jsxRuntime.jsx("p", {
1800
1800
  className: "neeto-form-engine-input__error",
1801
- "data-cy": "neeto-form-engine-".concat(type, "-error"),
1801
+ "data-testid": "neeto-form-engine-".concat(type, "-error"),
1802
1802
  children: error
1803
1803
  })]
1804
1804
  });
@@ -1983,15 +1983,15 @@ var Rating = function Rating(_ref) {
1983
1983
  className: "neeto-form-engine-rating",
1984
1984
  children: [/*#__PURE__*/jsxRuntime.jsx("label", {
1985
1985
  className: "neeto-form-engine-label",
1986
- "data-cy": "rating-input-label",
1986
+ "data-testid": "rating-input-label",
1987
1987
  children: label
1988
1988
  }), /*#__PURE__*/jsxRuntime.jsx("div", {
1989
1989
  className: "neeto-form-engine-rating__row",
1990
- "data-cy": "rating-input-field",
1990
+ "data-testid": "rating-input-field",
1991
1991
  children: render()
1992
1992
  }), !!error && typeof error === "string" && /*#__PURE__*/jsxRuntime.jsx("p", {
1993
1993
  className: "neeto-form-engine-input__error",
1994
- "data-cy": "neeto-form-engine-rating-error",
1994
+ "data-testid": "neeto-form-engine-rating-error",
1995
1995
  children: error
1996
1996
  })]
1997
1997
  });
@@ -2059,7 +2059,7 @@ var RichTextEditor = function RichTextEditor(_ref) {
2059
2059
  className: "neeto-form-engine-input__label-wrapper",
2060
2060
  children: label && /*#__PURE__*/jsxRuntime.jsx("label", {
2061
2061
  className: "neeto-form-engine-label",
2062
- "data-cy": "".concat(neetoCist.hyphenate(label), "-input-label"),
2062
+ "data-testid": "".concat(neetoCist.hyphenate(label), "-input-label"),
2063
2063
  children: getLabel(label, isRequired)
2064
2064
  })
2065
2065
  }), /*#__PURE__*/jsxRuntime.jsx(formik.FastField, {
@@ -2158,12 +2158,12 @@ var StarRating = function StarRating(_ref) {
2158
2158
  className: "neeto-form-engine-input__label-wrapper",
2159
2159
  children: /*#__PURE__*/jsxRuntime.jsx("label", {
2160
2160
  className: "neeto-form-engine-label",
2161
- "data-cy": "star-rating-input-label",
2161
+ "data-testid": "star-rating-input-label",
2162
2162
  children: label
2163
2163
  })
2164
2164
  }), /*#__PURE__*/jsxRuntime.jsx("div", {
2165
2165
  className: "neeto-form-engine-star-rating__row",
2166
- "data-cy": "star-rating-input-field",
2166
+ "data-testid": "star-rating-input-field",
2167
2167
  children: constants.generateArray(minValue, maxValue).map(function (index) {
2168
2168
  return /*#__PURE__*/jsxRuntime.jsx(RatingButton$1, _objectSpread$3({
2169
2169
  label: index,
@@ -2172,7 +2172,7 @@ var StarRating = function StarRating(_ref) {
2172
2172
  })
2173
2173
  }), !!error && typeof error === "string" && /*#__PURE__*/jsxRuntime.jsx("p", {
2174
2174
  className: "neeto-form-engine-input__error",
2175
- "data-cy": "neeto-form-engine-star-rating-error",
2175
+ "data-testid": "neeto-form-engine-star-rating-error",
2176
2176
  children: error
2177
2177
  })]
2178
2178
  });
@@ -2356,4 +2356,4 @@ exports.getFieldComponent = getFieldComponent;
2356
2356
  exports.getWithExpiry = getWithExpiry;
2357
2357
  exports.mergeRefs = mergeRefs;
2358
2358
  exports.renderButtonsInOrder = renderButtonsInOrder;
2359
- //# sourceMappingURL=utils-C-ermU02.js.map
2359
+ //# sourceMappingURL=utils-BdTASoGp.js.map