@bigbinary/neeto-rules-frontend 0.4.2 → 0.4.3
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/README.md +574 -11
- package/app/javascript/src/translations/en.json +1 -0
- package/dist/index.cjs.js +12 -6
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.js +13 -7
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -11,7 +11,7 @@ import { isEditorEmpty, FormikEditor } from '@bigbinary/neeto-editor';
|
|
|
11
11
|
import { withImmutableActions, useDebounce } from '@bigbinary/neeto-commons-frontend/react-utils';
|
|
12
12
|
import { create } from 'zustand';
|
|
13
13
|
import PageLoader from '@bigbinary/neeto-molecules/PageLoader';
|
|
14
|
-
import { Typography, Button, Pane, DatePicker, Dropdown as Dropdown$1, Input as Input$1, Checkbox, Select, Label } from '@bigbinary/neetoui';
|
|
14
|
+
import { Typography, Button, Pane, DatePicker, Dropdown as Dropdown$1, Input as Input$1, Checkbox, Select, Tooltip, Label } from '@bigbinary/neetoui';
|
|
15
15
|
import { useTranslation } from 'react-i18next';
|
|
16
16
|
import { Down, Up, Check, Search, Close, Delete, Plus, Refresh, Eye } from '@bigbinary/neeto-icons';
|
|
17
17
|
import { pluck, isNil, isNotNil, assocPath, toLower, isEmpty, without, append, pipe, partition } from 'ramda';
|
|
@@ -4136,9 +4136,10 @@ var Events$1 = function Events(_ref) {
|
|
|
4136
4136
|
}));
|
|
4137
4137
|
};
|
|
4138
4138
|
|
|
4139
|
-
var _excluded$5 = ["data", "label", "name", "performerName", "conditionsName", "onSelectEvent"];
|
|
4139
|
+
var _excluded$5 = ["addButtonTooltipProps", "data", "label", "name", "performerName", "conditionsName", "onSelectEvent"];
|
|
4140
4140
|
var EventConditions = function EventConditions(_ref) {
|
|
4141
|
-
var
|
|
4141
|
+
var addButtonTooltipProps = _ref.addButtonTooltipProps,
|
|
4142
|
+
data = _ref.data,
|
|
4142
4143
|
label = _ref.label,
|
|
4143
4144
|
name = _ref.name,
|
|
4144
4145
|
performerName = _ref.performerName,
|
|
@@ -4148,6 +4149,8 @@ var EventConditions = function EventConditions(_ref) {
|
|
|
4148
4149
|
var _useFormikContext = useFormikContext(),
|
|
4149
4150
|
values = _useFormikContext.values,
|
|
4150
4151
|
setFieldValue = _useFormikContext.setFieldValue;
|
|
4152
|
+
var _useTranslation = useTranslation(),
|
|
4153
|
+
t = _useTranslation.t;
|
|
4151
4154
|
var elementProps = data[name] || {};
|
|
4152
4155
|
var conditionProps = data[conditionsName] || {};
|
|
4153
4156
|
var conditions = values[conditionsName].value || [];
|
|
@@ -4174,18 +4177,21 @@ var EventConditions = function EventConditions(_ref) {
|
|
|
4174
4177
|
name: name,
|
|
4175
4178
|
onSelectEvent: onSelectEvent,
|
|
4176
4179
|
performerName: performerName
|
|
4177
|
-
})), showAddButton && /*#__PURE__*/React.createElement(
|
|
4180
|
+
})), showAddButton && /*#__PURE__*/React.createElement(Tooltip, _extends({
|
|
4181
|
+
content: t("neetoRules.form.noTicketFields")
|
|
4182
|
+
}, addButtonTooltipProps), /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(Button, {
|
|
4178
4183
|
"data-cy": "add-condition-button",
|
|
4179
4184
|
"data-test-id": "automation-rules-add-events-button",
|
|
4185
|
+
disabled: isEmpty(conditionProps === null || conditionProps === void 0 ? void 0 : conditionProps.conditionOptions),
|
|
4180
4186
|
icon: Plus,
|
|
4181
4187
|
size: 32,
|
|
4182
|
-
style: "
|
|
4188
|
+
style: "text",
|
|
4183
4189
|
tooltipProps: {
|
|
4184
|
-
content: t
|
|
4190
|
+
content: t("neetoRules.form.addCondition"),
|
|
4185
4191
|
position: "top"
|
|
4186
4192
|
},
|
|
4187
4193
|
onClick: handleAddCondition
|
|
4188
|
-
})), !showAddButton && /*#__PURE__*/React.createElement("div", {
|
|
4194
|
+
})))), !showAddButton && /*#__PURE__*/React.createElement("div", {
|
|
4189
4195
|
className: "mt-3"
|
|
4190
4196
|
}, /*#__PURE__*/React.createElement(Conditions, _extends({
|
|
4191
4197
|
data: data,
|