@bigbinary/neeto-rules-frontend 0.6.0 → 0.6.2
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 +12 -12
package/dist/index.js
CHANGED
|
@@ -710,7 +710,8 @@ var NeetoRules$2 = function NeetoRules(_ref) {
|
|
|
710
710
|
className: "mr-2",
|
|
711
711
|
htmlType: "submit",
|
|
712
712
|
disabled: isSubmitting || !dirty,
|
|
713
|
-
onClick: function onClick() {}
|
|
713
|
+
onClick: function onClick() {},
|
|
714
|
+
"data-cy": "form-submit-button"
|
|
714
715
|
}
|
|
715
716
|
})));
|
|
716
717
|
});
|
|
@@ -1932,7 +1933,7 @@ var EmailFields = function EmailFields(_ref) {
|
|
|
1932
1933
|
}))), /*#__PURE__*/React__default.createElement(Pane.Footer, {
|
|
1933
1934
|
className: "flex items-center space-x-2"
|
|
1934
1935
|
}, /*#__PURE__*/React__default.createElement(Button, {
|
|
1935
|
-
"data-cy": "save-changes-button",
|
|
1936
|
+
"data-cy": "email-action-save-changes-button",
|
|
1936
1937
|
label: t("neetoRules.common.saveChange"),
|
|
1937
1938
|
onClick: function onClick() {
|
|
1938
1939
|
return setShowPane(false);
|
|
@@ -10970,7 +10971,7 @@ var Actions = function Actions(_ref) {
|
|
|
10970
10971
|
return arrayHelpers.push(DEFAULT_RULE_ACTION);
|
|
10971
10972
|
}
|
|
10972
10973
|
}), actions.length > 1 && /*#__PURE__*/React__default.createElement(Button, {
|
|
10973
|
-
"data-cy": "delete-action-button",
|
|
10974
|
+
"data-cy": "delete-action-button-".concat(index),
|
|
10974
10975
|
icon: Delete,
|
|
10975
10976
|
size: 24,
|
|
10976
10977
|
style: "icon",
|
|
@@ -12118,6 +12119,8 @@ var Conditions = function Conditions(_ref) {
|
|
|
12118
12119
|
setValue = _useField2[2].setValue;
|
|
12119
12120
|
var _useFormikContext = useFormikContext(),
|
|
12120
12121
|
setFieldValue = _useFormikContext.setFieldValue;
|
|
12122
|
+
var _useTranslation = useTranslation(),
|
|
12123
|
+
t = _useTranslation.t;
|
|
12121
12124
|
var elementProps = data[name] || {};
|
|
12122
12125
|
var conditions = ((_field$value = field.value) === null || _field$value === void 0 ? void 0 : _field$value.value) || [];
|
|
12123
12126
|
var handleAddCondition = function handleAddCondition(arrayHelpers, logicOperation) {
|
|
@@ -12177,19 +12180,19 @@ var Conditions = function Conditions(_ref) {
|
|
|
12177
12180
|
size: 24,
|
|
12178
12181
|
style: "icon",
|
|
12179
12182
|
tooltipProps: {
|
|
12180
|
-
content: t
|
|
12183
|
+
content: t("neetoRules.form.addCondition"),
|
|
12181
12184
|
position: "top"
|
|
12182
12185
|
},
|
|
12183
12186
|
onClick: function onClick() {
|
|
12184
12187
|
return handleAddCondition(arrayHelpers, condition.joinType);
|
|
12185
12188
|
}
|
|
12186
12189
|
}), /*#__PURE__*/React__default.createElement(Button, {
|
|
12187
|
-
"data-cy": "delete-condition-button",
|
|
12190
|
+
"data-cy": "delete-condition-button-".concat(index),
|
|
12188
12191
|
icon: Delete,
|
|
12189
12192
|
size: 24,
|
|
12190
12193
|
style: "icon",
|
|
12191
12194
|
tooltipProps: {
|
|
12192
|
-
content: t
|
|
12195
|
+
content: t("neetoRules.common.delete"),
|
|
12193
12196
|
position: "top"
|
|
12194
12197
|
},
|
|
12195
12198
|
onClick: function onClick() {
|
|
@@ -12199,7 +12202,7 @@ var Conditions = function Conditions(_ref) {
|
|
|
12199
12202
|
}), isEmpty(conditions) && /*#__PURE__*/React__default.createElement(Button, {
|
|
12200
12203
|
className: "neeto-ui-text-gray-600 mr-auto",
|
|
12201
12204
|
"data-cy": "add-condition-button",
|
|
12202
|
-
label: t
|
|
12205
|
+
label: t("neetoRules.form.addCondition"),
|
|
12203
12206
|
style: "text",
|
|
12204
12207
|
onClick: function onClick() {
|
|
12205
12208
|
return handleAddCondition(arrayHelpers, OPERATORS$1.or);
|
|
@@ -12208,7 +12211,7 @@ var Conditions = function Conditions(_ref) {
|
|
|
12208
12211
|
className: "mt-2",
|
|
12209
12212
|
"data-cy": "preview-callback-button",
|
|
12210
12213
|
icon: Eye,
|
|
12211
|
-
label: t
|
|
12214
|
+
label: t("neetoRules.common.preview"),
|
|
12212
12215
|
style: "secondary",
|
|
12213
12216
|
onClick: function onClick() {
|
|
12214
12217
|
return previewCallback(conditions);
|