@bigbinary/neeto-rules-frontend 2.9.3-beta1 → 2.9.4

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.
@@ -15,7 +15,7 @@ var reactI18next = require('react-i18next');
15
15
  var useUtilityStore = require('../../useUtilityStore-gtPhFvpI.js');
16
16
  var classNames = require('classnames');
17
17
  var ramda = require('ramda');
18
- var index = require('../../index-D7d7coUX.js');
18
+ var index = require('../../index-B_8d4J93.js');
19
19
  var useCustomDataStore = require('../../useCustomDataStore-DPmWkEhs.js');
20
20
  var jsxRuntime = require('react/jsx-runtime');
21
21
  var utils = require('@bigbinary/neeto-commons-frontend/v2/utils');
@@ -1145,10 +1145,12 @@ var RadioField = function RadioField(_ref) {
1145
1145
  }, componentProps), {}, {
1146
1146
  children: radioOptions.map(function (_ref2, index) {
1147
1147
  var label = _ref2.label,
1148
- value = _ref2.value;
1148
+ value = _ref2.value,
1149
+ dataTestid = _ref2.dataTestid;
1149
1150
  return /*#__PURE__*/react.createElement(formik$1.RadioGroup.Item, {
1150
1151
  label: label,
1151
1152
  value: value,
1153
+ dataTestId: dataTestid,
1152
1154
  key: index
1153
1155
  });
1154
1156
  })
@@ -1217,7 +1219,8 @@ var Status = function Status(_ref) {
1217
1219
  var _helpText$active, _helpText$inactive;
1218
1220
  var label = _ref.label,
1219
1221
  _ref$helpText = _ref.helpText,
1220
- helpText = _ref$helpText === void 0 ? {} : _ref$helpText;
1222
+ helpText = _ref$helpText === void 0 ? {} : _ref$helpText,
1223
+ dataTestid = _ref.dataTestid;
1221
1224
  var _useFormikContext = formik.useFormikContext(),
1222
1225
  status = _useFormikContext.values.status,
1223
1226
  setFieldValue = _useFormikContext.setFieldValue;
@@ -1229,6 +1232,7 @@ var Status = function Status(_ref) {
1229
1232
  };
1230
1233
  return /*#__PURE__*/jsxRuntime.jsx(neetoAtoms.Switch, {
1231
1234
  checked: defaultValue === ENABLED,
1235
+ dataTestId: dataTestid !== null && dataTestid !== void 0 ? dataTestid : label ? undefined : "active",
1232
1236
  label: label || t("neetoRules.labels.active"),
1233
1237
  size: "lg",
1234
1238
  labelProps: {
@@ -1264,6 +1268,7 @@ var Form = function Form(_ref) {
1264
1268
  _ref$showStatusSwitch = _ref.showStatusSwitch,
1265
1269
  showStatusSwitch = _ref$showStatusSwitch === void 0 ? true : _ref$showStatusSwitch,
1266
1270
  statusSwitchLabel = _ref.statusSwitchLabel,
1271
+ statusSwitchDataTestid = _ref.statusSwitchDataTestid,
1267
1272
  _ref$statusHelpText = _ref.statusHelpText,
1268
1273
  statusHelpText = _ref$statusHelpText === void 0 ? {} : _ref$statusHelpText,
1269
1274
  _ref$payloadKey = _ref.payloadKey,
@@ -1353,6 +1358,7 @@ var Form = function Form(_ref) {
1353
1358
  className: "flex items-center gap-x-3",
1354
1359
  children: [/*#__PURE__*/jsxRuntime.jsx(InputField, {
1355
1360
  data: initialValues,
1361
+ dataTestId: "name",
1356
1362
  label: t("neetoRules.common.name"),
1357
1363
  name: "name",
1358
1364
  placeholder: isNameGenerationDisabled ? "" : t("neetoRules.placeholders.autoGenerateName")
@@ -1377,6 +1383,7 @@ var Form = function Form(_ref) {
1377
1383
  })]
1378
1384
  })]
1379
1385
  }), showStatusSwitch && /*#__PURE__*/jsxRuntime.jsx(Status, {
1386
+ dataTestid: statusSwitchDataTestid,
1380
1387
  helpText: statusHelpText,
1381
1388
  label: statusSwitchLabel
1382
1389
  })]