@bigbinary/neeto-rules-frontend 0.6.4 → 0.6.5

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.
package/dist/index.cjs.js CHANGED
@@ -12096,7 +12096,9 @@ var Conditions = function Conditions(_ref) {
12096
12096
  isCallback = _ref$isCallback === void 0 ? false : _ref$isCallback,
12097
12097
  previewCallback = _ref.previewCallback,
12098
12098
  _ref$isWithEvents = _ref.isWithEvents,
12099
- isWithEvents = _ref$isWithEvents === void 0 ? false : _ref$isWithEvents;
12099
+ isWithEvents = _ref$isWithEvents === void 0 ? false : _ref$isWithEvents,
12100
+ _ref$allowEmpty = _ref.allowEmpty,
12101
+ allowEmpty = _ref$allowEmpty === void 0 ? true : _ref$allowEmpty;
12100
12102
  var _useField = formik.useField(name),
12101
12103
  _useField2 = _slicedToArray$1(_useField, 3),
12102
12104
  field = _useField2[0],
@@ -12161,8 +12163,8 @@ var Conditions = function Conditions(_ref) {
12161
12163
  }, index === conditions.length - 1 && /*#__PURE__*/React__default["default"].createElement(Button__default["default"], {
12162
12164
  "data-cy": "add-condition-button",
12163
12165
  icon: neetoIcons.Plus,
12164
- size: 24,
12165
- style: "icon",
12166
+ size: "small",
12167
+ style: "text",
12166
12168
  tooltipProps: {
12167
12169
  content: t("neetoRules.form.addCondition"),
12168
12170
  position: "top"
@@ -12170,11 +12172,11 @@ var Conditions = function Conditions(_ref) {
12170
12172
  onClick: function onClick() {
12171
12173
  return handleAddCondition(arrayHelpers, condition.joinType);
12172
12174
  }
12173
- }), /*#__PURE__*/React__default["default"].createElement(Button__default["default"], {
12175
+ }), (allowEmpty || index !== 0) && /*#__PURE__*/React__default["default"].createElement(Button__default["default"], {
12174
12176
  "data-cy": "delete-condition-button-".concat(index),
12175
12177
  icon: neetoIcons.Delete,
12176
- size: 24,
12177
- style: "icon",
12178
+ size: "small",
12179
+ style: "text",
12178
12180
  tooltipProps: {
12179
12181
  content: t("neetoRules.common.delete"),
12180
12182
  position: "top"