@bigbinary/neeto-rules-frontend 0.6.3 → 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
@@ -10741,6 +10741,7 @@ var ActionItem = function ActionItem(_ref) {
10741
10741
  errors = _useFormikContext.errors,
10742
10742
  touched = _useFormikContext.touched;
10743
10743
  var optionList = elementProps.actionOptions;
10744
+ var ActionChildren = action.children;
10744
10745
  var actions = values[parentName].value || [];
10745
10746
  var label = index ? t("neetoRules.common.and", {
10746
10747
  what: t("neetoRules.common.then")
@@ -10868,6 +10869,11 @@ var ActionItem = function ActionItem(_ref) {
10868
10869
  selectedField: selectedField,
10869
10870
  name: "".concat(name, ".metadata"),
10870
10871
  options: getSelectedFieldOptions()
10872
+ }), neetoCist.isPresent(action === null || action === void 0 ? void 0 : action.children) && /*#__PURE__*/React__default["default"].createElement(ActionChildren, {
10873
+ action: action,
10874
+ index: index,
10875
+ selectedField: selectedField,
10876
+ parentFieldName: name
10871
10877
  }));
10872
10878
  };
10873
10879
  var ActionItem$1 = /*#__PURE__*/React.memo(ActionItem);
@@ -12090,7 +12096,9 @@ var Conditions = function Conditions(_ref) {
12090
12096
  isCallback = _ref$isCallback === void 0 ? false : _ref$isCallback,
12091
12097
  previewCallback = _ref.previewCallback,
12092
12098
  _ref$isWithEvents = _ref.isWithEvents,
12093
- 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;
12094
12102
  var _useField = formik.useField(name),
12095
12103
  _useField2 = _slicedToArray$1(_useField, 3),
12096
12104
  field = _useField2[0],
@@ -12155,8 +12163,8 @@ var Conditions = function Conditions(_ref) {
12155
12163
  }, index === conditions.length - 1 && /*#__PURE__*/React__default["default"].createElement(Button__default["default"], {
12156
12164
  "data-cy": "add-condition-button",
12157
12165
  icon: neetoIcons.Plus,
12158
- size: 24,
12159
- style: "icon",
12166
+ size: "small",
12167
+ style: "text",
12160
12168
  tooltipProps: {
12161
12169
  content: t("neetoRules.form.addCondition"),
12162
12170
  position: "top"
@@ -12164,11 +12172,11 @@ var Conditions = function Conditions(_ref) {
12164
12172
  onClick: function onClick() {
12165
12173
  return handleAddCondition(arrayHelpers, condition.joinType);
12166
12174
  }
12167
- }), /*#__PURE__*/React__default["default"].createElement(Button__default["default"], {
12175
+ }), (allowEmpty || index !== 0) && /*#__PURE__*/React__default["default"].createElement(Button__default["default"], {
12168
12176
  "data-cy": "delete-condition-button-".concat(index),
12169
12177
  icon: neetoIcons.Delete,
12170
- size: 24,
12171
- style: "icon",
12178
+ size: "small",
12179
+ style: "text",
12172
12180
  tooltipProps: {
12173
12181
  content: t("neetoRules.common.delete"),
12174
12182
  position: "top"