@bigbinary/neeto-rules-frontend 0.6.0 → 0.6.1
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 +11 -8
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.js +11 -8
- package/dist/index.js.map +1 -1
- package/package.json +11 -11
package/dist/index.cjs.js
CHANGED
|
@@ -740,7 +740,8 @@ var NeetoRules$2 = function NeetoRules(_ref) {
|
|
|
740
740
|
className: "mr-2",
|
|
741
741
|
htmlType: "submit",
|
|
742
742
|
disabled: isSubmitting || !dirty,
|
|
743
|
-
onClick: function onClick() {}
|
|
743
|
+
onClick: function onClick() {},
|
|
744
|
+
"data-cy": "form-submit-button"
|
|
744
745
|
}
|
|
745
746
|
})));
|
|
746
747
|
});
|
|
@@ -1962,7 +1963,7 @@ var EmailFields = function EmailFields(_ref) {
|
|
|
1962
1963
|
}))), /*#__PURE__*/React__default["default"].createElement(neetoui.Pane.Footer, {
|
|
1963
1964
|
className: "flex items-center space-x-2"
|
|
1964
1965
|
}, /*#__PURE__*/React__default["default"].createElement(neetoui.Button, {
|
|
1965
|
-
"data-cy": "save-changes-button",
|
|
1966
|
+
"data-cy": "email-action-save-changes-button",
|
|
1966
1967
|
label: t("neetoRules.common.saveChange"),
|
|
1967
1968
|
onClick: function onClick() {
|
|
1968
1969
|
return setShowPane(false);
|
|
@@ -11000,7 +11001,7 @@ var Actions = function Actions(_ref) {
|
|
|
11000
11001
|
return arrayHelpers.push(DEFAULT_RULE_ACTION);
|
|
11001
11002
|
}
|
|
11002
11003
|
}), actions.length > 1 && /*#__PURE__*/React__default["default"].createElement(neetoui.Button, {
|
|
11003
|
-
"data-cy": "delete-action-button",
|
|
11004
|
+
"data-cy": "delete-action-button-".concat(index),
|
|
11004
11005
|
icon: neetoIcons.Delete,
|
|
11005
11006
|
size: 24,
|
|
11006
11007
|
style: "icon",
|
|
@@ -12148,6 +12149,8 @@ var Conditions = function Conditions(_ref) {
|
|
|
12148
12149
|
setValue = _useField2[2].setValue;
|
|
12149
12150
|
var _useFormikContext = formik.useFormikContext(),
|
|
12150
12151
|
setFieldValue = _useFormikContext.setFieldValue;
|
|
12152
|
+
var _useTranslation = reactI18next.useTranslation(),
|
|
12153
|
+
t = _useTranslation.t;
|
|
12151
12154
|
var elementProps = data[name] || {};
|
|
12152
12155
|
var conditions = ((_field$value = field.value) === null || _field$value === void 0 ? void 0 : _field$value.value) || [];
|
|
12153
12156
|
var handleAddCondition = function handleAddCondition(arrayHelpers, logicOperation) {
|
|
@@ -12207,19 +12210,19 @@ var Conditions = function Conditions(_ref) {
|
|
|
12207
12210
|
size: 24,
|
|
12208
12211
|
style: "icon",
|
|
12209
12212
|
tooltipProps: {
|
|
12210
|
-
content:
|
|
12213
|
+
content: t("neetoRules.form.addCondition"),
|
|
12211
12214
|
position: "top"
|
|
12212
12215
|
},
|
|
12213
12216
|
onClick: function onClick() {
|
|
12214
12217
|
return handleAddCondition(arrayHelpers, condition.joinType);
|
|
12215
12218
|
}
|
|
12216
12219
|
}), /*#__PURE__*/React__default["default"].createElement(neetoui.Button, {
|
|
12217
|
-
"data-cy": "delete-condition-button",
|
|
12220
|
+
"data-cy": "delete-condition-button-".concat(index),
|
|
12218
12221
|
icon: neetoIcons.Delete,
|
|
12219
12222
|
size: 24,
|
|
12220
12223
|
style: "icon",
|
|
12221
12224
|
tooltipProps: {
|
|
12222
|
-
content:
|
|
12225
|
+
content: t("neetoRules.common.delete"),
|
|
12223
12226
|
position: "top"
|
|
12224
12227
|
},
|
|
12225
12228
|
onClick: function onClick() {
|
|
@@ -12229,7 +12232,7 @@ var Conditions = function Conditions(_ref) {
|
|
|
12229
12232
|
}), ramda.isEmpty(conditions) && /*#__PURE__*/React__default["default"].createElement(neetoui.Button, {
|
|
12230
12233
|
className: "neeto-ui-text-gray-600 mr-auto",
|
|
12231
12234
|
"data-cy": "add-condition-button",
|
|
12232
|
-
label:
|
|
12235
|
+
label: t("neetoRules.form.addCondition"),
|
|
12233
12236
|
style: "text",
|
|
12234
12237
|
onClick: function onClick() {
|
|
12235
12238
|
return handleAddCondition(arrayHelpers, OPERATORS$1.or);
|
|
@@ -12238,7 +12241,7 @@ var Conditions = function Conditions(_ref) {
|
|
|
12238
12241
|
className: "mt-2",
|
|
12239
12242
|
"data-cy": "preview-callback-button",
|
|
12240
12243
|
icon: neetoIcons.Eye,
|
|
12241
|
-
label:
|
|
12244
|
+
label: t("neetoRules.common.preview"),
|
|
12242
12245
|
style: "secondary",
|
|
12243
12246
|
onClick: function onClick() {
|
|
12244
12247
|
return previewCallback(conditions);
|