@bigbinary/neeto-rules-frontend 1.2.0-beta3 → 2.0.0
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 +1 -0
- package/dist/index.cjs.js +79 -47
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.js +28 -7
- package/dist/index.js.map +1 -1
- package/package.json +8 -8
package/README.md
CHANGED
|
@@ -165,6 +165,7 @@ The `NeetoRules` component is used to add the dashboard for automation rules.
|
|
|
165
165
|
- `onSuccess`: Object for handling delete rule success callback.
|
|
166
166
|
- `callback`: Function to be called on success. (Optional)
|
|
167
167
|
9. `cloneRule`: Object that define methods for clone rule operation.
|
|
168
|
+
- `allowed`: To specify if the clone rule should be allowed, default `true`. (Boolean)
|
|
168
169
|
- `onSuccess`: Object for handling clone rule success callback.
|
|
169
170
|
- `callback`: Function to be called on success. (Optional)
|
|
170
171
|
10. `reoderRules`: Function to be called on reorder success.
|
package/dist/index.cjs.js
CHANGED
|
@@ -15,7 +15,7 @@ var Button = require('@bigbinary/neetoui/Button');
|
|
|
15
15
|
var reactI18next = require('react-i18next');
|
|
16
16
|
var jsxRuntime = require('react/jsx-runtime');
|
|
17
17
|
var ReactDOM = require('react-dom');
|
|
18
|
-
var
|
|
18
|
+
var Reorder = require('@bigbinary/neeto-icons/Reorder');
|
|
19
19
|
var Pane = require('@bigbinary/neetoui/Pane');
|
|
20
20
|
var Typography = require('@bigbinary/neetoui/Typography');
|
|
21
21
|
var Pagination = require('@bigbinary/neetoui/Pagination');
|
|
@@ -34,7 +34,12 @@ var utils = require('@bigbinary/neeto-commons-frontend/utils');
|
|
|
34
34
|
var MoreDropdown = require('@bigbinary/neeto-molecules/MoreDropdown');
|
|
35
35
|
var Switch = require('@bigbinary/neetoui/Switch');
|
|
36
36
|
var formik = require('formik');
|
|
37
|
+
var Plus = require('@bigbinary/neeto-icons/Plus');
|
|
38
|
+
var Delete = require('@bigbinary/neeto-icons/Delete');
|
|
39
|
+
var Refresh = require('@bigbinary/neeto-icons/Refresh');
|
|
37
40
|
var classNames$1 = require('classnames');
|
|
41
|
+
var Check = require('@bigbinary/neeto-icons/Check');
|
|
42
|
+
var Search = require('@bigbinary/neeto-icons/Search');
|
|
38
43
|
var Dropdown$1 = require('@bigbinary/neetoui/Dropdown');
|
|
39
44
|
var Input$2 = require('@bigbinary/neetoui/Input');
|
|
40
45
|
var Textarea = require('@bigbinary/neetoui/formik/Textarea');
|
|
@@ -47,14 +52,19 @@ var FormikEditor = require('@bigbinary/neeto-editor/FormikEditor');
|
|
|
47
52
|
var MultiEmailInput = require('@bigbinary/neetoui/formik/MultiEmailInput');
|
|
48
53
|
var Input$3 = require('@bigbinary/neetoui/formik/Input');
|
|
49
54
|
var useHotkeys = require('@bigbinary/neeto-hotkeys');
|
|
55
|
+
var Close = require('@bigbinary/neeto-icons/Close');
|
|
50
56
|
var Checkbox = require('@bigbinary/neetoui/Checkbox');
|
|
51
57
|
var PhoneNumber = require('@bigbinary/neeto-molecules/PhoneNumber');
|
|
52
58
|
var Tag = require('@bigbinary/neetoui/Tag');
|
|
53
59
|
var yup = require('yup');
|
|
54
60
|
var utils$1 = require('@bigbinary/neeto-editor/utils');
|
|
61
|
+
var Eye = require('@bigbinary/neeto-icons/Eye');
|
|
55
62
|
var Tooltip = require('@bigbinary/neetoui/Tooltip');
|
|
56
63
|
var Select$2 = require('@bigbinary/neetoui/formik/Select');
|
|
57
64
|
var Radio = require('@bigbinary/neetoui/formik/Radio');
|
|
65
|
+
var Help = require('@bigbinary/neeto-icons/Help');
|
|
66
|
+
var Down = require('@bigbinary/neeto-icons/Down');
|
|
67
|
+
var Up = require('@bigbinary/neeto-icons/Up');
|
|
58
68
|
|
|
59
69
|
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
|
60
70
|
|
|
@@ -84,6 +94,7 @@ var NeetoHeader__default = /*#__PURE__*/_interopDefaultLegacy(NeetoHeader);
|
|
|
84
94
|
var HelpPopover__default = /*#__PURE__*/_interopDefaultLegacy(HelpPopover);
|
|
85
95
|
var Button__default = /*#__PURE__*/_interopDefaultLegacy(Button);
|
|
86
96
|
var ReactDOM__default = /*#__PURE__*/_interopDefaultLegacy(ReactDOM);
|
|
97
|
+
var Reorder__default = /*#__PURE__*/_interopDefaultLegacy(Reorder);
|
|
87
98
|
var Pane__default = /*#__PURE__*/_interopDefaultLegacy(Pane);
|
|
88
99
|
var Typography__default = /*#__PURE__*/_interopDefaultLegacy(Typography);
|
|
89
100
|
var Pagination__default = /*#__PURE__*/_interopDefaultLegacy(Pagination);
|
|
@@ -95,7 +106,12 @@ var Table__default = /*#__PURE__*/_interopDefaultLegacy(Table);
|
|
|
95
106
|
var NoData__default = /*#__PURE__*/_interopDefaultLegacy(NoData);
|
|
96
107
|
var MoreDropdown__default = /*#__PURE__*/_interopDefaultLegacy(MoreDropdown);
|
|
97
108
|
var Switch__default = /*#__PURE__*/_interopDefaultLegacy(Switch);
|
|
109
|
+
var Plus__default = /*#__PURE__*/_interopDefaultLegacy(Plus);
|
|
110
|
+
var Delete__default = /*#__PURE__*/_interopDefaultLegacy(Delete);
|
|
111
|
+
var Refresh__default = /*#__PURE__*/_interopDefaultLegacy(Refresh);
|
|
98
112
|
var classNames__default = /*#__PURE__*/_interopDefaultLegacy(classNames$1);
|
|
113
|
+
var Check__default = /*#__PURE__*/_interopDefaultLegacy(Check);
|
|
114
|
+
var Search__default = /*#__PURE__*/_interopDefaultLegacy(Search);
|
|
99
115
|
var Dropdown__default = /*#__PURE__*/_interopDefaultLegacy(Dropdown$1);
|
|
100
116
|
var Input__default = /*#__PURE__*/_interopDefaultLegacy(Input$2);
|
|
101
117
|
var Textarea__default = /*#__PURE__*/_interopDefaultLegacy(Textarea);
|
|
@@ -108,12 +124,17 @@ var FormikEditor__default = /*#__PURE__*/_interopDefaultLegacy(FormikEditor);
|
|
|
108
124
|
var MultiEmailInput__default = /*#__PURE__*/_interopDefaultLegacy(MultiEmailInput);
|
|
109
125
|
var Input__default$1 = /*#__PURE__*/_interopDefaultLegacy(Input$3);
|
|
110
126
|
var useHotkeys__default = /*#__PURE__*/_interopDefaultLegacy(useHotkeys);
|
|
127
|
+
var Close__default = /*#__PURE__*/_interopDefaultLegacy(Close);
|
|
111
128
|
var Checkbox__default = /*#__PURE__*/_interopDefaultLegacy(Checkbox);
|
|
112
129
|
var Tag__default = /*#__PURE__*/_interopDefaultLegacy(Tag);
|
|
113
130
|
var yup__namespace = /*#__PURE__*/_interopNamespace(yup);
|
|
131
|
+
var Eye__default = /*#__PURE__*/_interopDefaultLegacy(Eye);
|
|
114
132
|
var Tooltip__default = /*#__PURE__*/_interopDefaultLegacy(Tooltip);
|
|
115
133
|
var Select__default$1 = /*#__PURE__*/_interopDefaultLegacy(Select$2);
|
|
116
134
|
var Radio__default = /*#__PURE__*/_interopDefaultLegacy(Radio);
|
|
135
|
+
var Help__default = /*#__PURE__*/_interopDefaultLegacy(Help);
|
|
136
|
+
var Down__default = /*#__PURE__*/_interopDefaultLegacy(Down);
|
|
137
|
+
var Up__default = /*#__PURE__*/_interopDefaultLegacy(Up);
|
|
117
138
|
|
|
118
139
|
function _typeof$3(o) {
|
|
119
140
|
"@babel/helpers - typeof";
|
|
@@ -9476,7 +9497,7 @@ var DraggableItem = function DraggableItem(props) {
|
|
|
9476
9497
|
}), /*#__PURE__*/jsxRuntime.jsxs("div", {
|
|
9477
9498
|
className: "neeto-ui-bg-white neeto-ui-border-gray-400 neeto-ui-rounded neeto-ui-shadow-xs flex w-96 items-center space-x-4 border border-solid p-3",
|
|
9478
9499
|
"data-cy": "automation-rule-reorder-container",
|
|
9479
|
-
children: [/*#__PURE__*/jsxRuntime.jsx(
|
|
9500
|
+
children: [/*#__PURE__*/jsxRuntime.jsx(Reorder__default["default"], {}), rule.name]
|
|
9480
9501
|
})]
|
|
9481
9502
|
}), "list_".concat(rule.id));
|
|
9482
9503
|
}
|
|
@@ -9572,7 +9593,7 @@ var RulesReorder = function RulesReorder(_ref) {
|
|
|
9572
9593
|
children: rubric.source.index + 1
|
|
9573
9594
|
}), /*#__PURE__*/jsxRuntime.jsxs("div", {
|
|
9574
9595
|
className: "neeto-ui-bg-white neeto-ui-border-gray-400 neeto-ui-rounded neeto-ui-shadow-xs flex w-96 items-center space-x-4 border border-solid p-3",
|
|
9575
|
-
children: [/*#__PURE__*/jsxRuntime.jsx(
|
|
9596
|
+
children: [/*#__PURE__*/jsxRuntime.jsx(Reorder__default["default"], {}), /*#__PURE__*/jsxRuntime.jsx("div", {
|
|
9576
9597
|
children: initialRules[rubric.source.index].name
|
|
9577
9598
|
})]
|
|
9578
9599
|
})]
|
|
@@ -9677,8 +9698,9 @@ var buildActionDropdownMenuItems = function buildActionDropdownMenuItems(_ref) {
|
|
|
9677
9698
|
onDelete = _ref.onDelete,
|
|
9678
9699
|
_ref$moreDropdownItem = _ref.moreDropdownItems,
|
|
9679
9700
|
moreDropdownItems = _ref$moreDropdownItem === void 0 ? [] : _ref$moreDropdownItem,
|
|
9680
|
-
automationRulesPath = _ref.automationRulesPath
|
|
9681
|
-
|
|
9701
|
+
automationRulesPath = _ref.automationRulesPath,
|
|
9702
|
+
allowCloning = _ref.allowCloning;
|
|
9703
|
+
var defaultOptions = [].concat(_toConsumableArray$1(moreDropdownItems.map(function (_ref2) {
|
|
9682
9704
|
var _onClick = _ref2.onClick,
|
|
9683
9705
|
others = _objectWithoutProperties$1(_ref2, _excluded$h);
|
|
9684
9706
|
return _objectSpread$o(_objectSpread$o({}, others), {}, {
|
|
@@ -9709,6 +9731,12 @@ var buildActionDropdownMenuItems = function buildActionDropdownMenuItems(_ref) {
|
|
|
9709
9731
|
return onDelete(rule);
|
|
9710
9732
|
}
|
|
9711
9733
|
}]);
|
|
9734
|
+
if (!allowCloning) {
|
|
9735
|
+
return neetoCist.removeBy({
|
|
9736
|
+
key: "clone"
|
|
9737
|
+
}, defaultOptions);
|
|
9738
|
+
}
|
|
9739
|
+
return defaultOptions;
|
|
9712
9740
|
};
|
|
9713
9741
|
var getColumnData = function getColumnData(_ref3) {
|
|
9714
9742
|
var handleChangeStatus = _ref3.handleChangeStatus,
|
|
@@ -9821,7 +9849,9 @@ var RulesTable = function RulesTable(_ref) {
|
|
|
9821
9849
|
onCloneSuccess = _ref.onCloneSuccess,
|
|
9822
9850
|
onUpdateSuccess = _ref.onUpdateSuccess,
|
|
9823
9851
|
page = _ref.page,
|
|
9824
|
-
setPage = _ref.setPage
|
|
9852
|
+
setPage = _ref.setPage,
|
|
9853
|
+
_ref$allowCloning = _ref.allowCloning,
|
|
9854
|
+
allowCloning = _ref$allowCloning === void 0 ? true : _ref$allowCloning;
|
|
9825
9855
|
var _useQueryParams = reactUtils.useQueryParams(),
|
|
9826
9856
|
_useQueryParams$searc = _useQueryParams.searchTerm,
|
|
9827
9857
|
searchTerm = _useQueryParams$searc === void 0 ? "" : _useQueryParams$searc;
|
|
@@ -9886,7 +9916,8 @@ var RulesTable = function RulesTable(_ref) {
|
|
|
9886
9916
|
onDelete: setSelectedRule,
|
|
9887
9917
|
onPreview: onPreview,
|
|
9888
9918
|
automationRulesPath: automationRulesPath,
|
|
9889
|
-
moreDropdownItems: moreDropdownItems
|
|
9919
|
+
moreDropdownItems: moreDropdownItems,
|
|
9920
|
+
allowCloning: allowCloning
|
|
9890
9921
|
});
|
|
9891
9922
|
if (isLoading && ramda.isEmpty(rules)) {
|
|
9892
9923
|
return /*#__PURE__*/jsxRuntime.jsx(PageLoader__default["default"], {});
|
|
@@ -9965,7 +9996,7 @@ var RulesTable = function RulesTable(_ref) {
|
|
|
9965
9996
|
function ownKeys$n(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
9966
9997
|
function _objectSpread$m(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$n(Object(t), !0).forEach(function (r) { _defineProperty$2(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$n(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
9967
9998
|
var NeetoRules = function NeetoRules(_ref) {
|
|
9968
|
-
var _helpPopoverProps$hel, _cloneRule$onSuccess, _deleteRule$onSuccess, _updateRule$onSuccess, _reorderRules$onSucce;
|
|
9999
|
+
var _helpPopoverProps$hel, _cloneRule$allowed, _cloneRule$onSuccess, _deleteRule$onSuccess, _updateRule$onSuccess, _reorderRules$onSucce;
|
|
9969
10000
|
var breadcrumbs = _ref.breadcrumbs,
|
|
9970
10001
|
automationRulesPath = _ref.automationRulesPath,
|
|
9971
10002
|
url = _ref.automationRulesEndpoint,
|
|
@@ -10023,6 +10054,7 @@ var NeetoRules = function NeetoRules(_ref) {
|
|
|
10023
10054
|
totalCount: totalCount,
|
|
10024
10055
|
url: url
|
|
10025
10056
|
}, rulesTableProps)), {}, {
|
|
10057
|
+
allowCloning: (_cloneRule$allowed = cloneRule === null || cloneRule === void 0 ? void 0 : cloneRule.allowed) !== null && _cloneRule$allowed !== void 0 ? _cloneRule$allowed : true,
|
|
10026
10058
|
isLoading: isLoading || isFetching,
|
|
10027
10059
|
onCloneSuccess: cloneRule === null || cloneRule === void 0 || (_cloneRule$onSuccess = cloneRule.onSuccess) === null || _cloneRule$onSuccess === void 0 ? void 0 : _cloneRule$onSuccess.callback,
|
|
10028
10060
|
onDeleteSuccess: deleteRule === null || deleteRule === void 0 || (_deleteRule$onSuccess = deleteRule.onSuccess) === null || _deleteRule$onSuccess === void 0 ? void 0 : _deleteRule$onSuccess.callback,
|
|
@@ -10283,7 +10315,7 @@ var KeyValuePairsField = reactUtils.withT(function (_ref) {
|
|
|
10283
10315
|
name: "".concat(name, ".").concat(index, ".value"),
|
|
10284
10316
|
placeholder: t("neetoRules.labels.value"),
|
|
10285
10317
|
suffix: showDeleteButton && /*#__PURE__*/jsxRuntime.jsx(Button__default["default"], {
|
|
10286
|
-
icon:
|
|
10318
|
+
icon: Delete__default["default"],
|
|
10287
10319
|
size: "small",
|
|
10288
10320
|
style: "text",
|
|
10289
10321
|
onClick: function onClick() {
|
|
@@ -10547,7 +10579,7 @@ var DateField$1 = function DateField(_ref) {
|
|
|
10547
10579
|
// eslint-disable-next-line @bigbinary/neeto/use-standard-date-time-formats
|
|
10548
10580
|
date ? dayjs__default["default"](date).format("YYYY-MM-DD") : "");
|
|
10549
10581
|
}
|
|
10550
|
-
}), /*#__PURE__*/jsxRuntime.jsx(
|
|
10582
|
+
}), /*#__PURE__*/jsxRuntime.jsx(Check__default["default"], {
|
|
10551
10583
|
className: "cursor-pointer",
|
|
10552
10584
|
onClick: function onClick() {
|
|
10553
10585
|
return setShowInput(function (prevState) {
|
|
@@ -10791,7 +10823,7 @@ var DropdownField$1 = function DropdownField(_ref) {
|
|
|
10791
10823
|
className: "mb-1",
|
|
10792
10824
|
"data-cy": "search-text-field",
|
|
10793
10825
|
placeholder: t("neetoRules.common.search"),
|
|
10794
|
-
prefix: /*#__PURE__*/jsxRuntime.jsx(
|
|
10826
|
+
prefix: /*#__PURE__*/jsxRuntime.jsx(Search__default["default"], {}),
|
|
10795
10827
|
value: searchTerm,
|
|
10796
10828
|
onChange: function onChange(e) {
|
|
10797
10829
|
return setSearchTerm(e.target.value);
|
|
@@ -10807,7 +10839,7 @@ var DropdownField$1 = function DropdownField(_ref) {
|
|
|
10807
10839
|
className: classNames__default["default"]({
|
|
10808
10840
|
"neeto-ui-bg-gray-100": defaultSelectedOption.value === option.value
|
|
10809
10841
|
}),
|
|
10810
|
-
suffix: defaultSelectedOption.value === option.value && /*#__PURE__*/jsxRuntime.jsx(
|
|
10842
|
+
suffix: defaultSelectedOption.value === option.value && /*#__PURE__*/jsxRuntime.jsx(Check__default["default"], {
|
|
10811
10843
|
className: "neeto-ui-text-primary-800"
|
|
10812
10844
|
}),
|
|
10813
10845
|
onClick: function onClick() {
|
|
@@ -11081,7 +11113,7 @@ var Input$1 = function Input(_ref) {
|
|
|
11081
11113
|
placeholder: t("neetoRules.placeholders.value"),
|
|
11082
11114
|
ref: inputRef,
|
|
11083
11115
|
size: "small",
|
|
11084
|
-
suffix: /*#__PURE__*/jsxRuntime.jsx(
|
|
11116
|
+
suffix: /*#__PURE__*/jsxRuntime.jsx(Check__default["default"], {
|
|
11085
11117
|
onClick: function onClick() {
|
|
11086
11118
|
return setShowInput(function (prevState) {
|
|
11087
11119
|
return !prevState;
|
|
@@ -11190,14 +11222,14 @@ var InlineInput = /*#__PURE__*/React__default["default"].forwardRef(function (pr
|
|
|
11190
11222
|
children: [/*#__PURE__*/jsxRuntime.jsx(Button__default["default"], {
|
|
11191
11223
|
"data-cy": "inline-input-submit-button",
|
|
11192
11224
|
disabled: !isValidValue,
|
|
11193
|
-
icon:
|
|
11225
|
+
icon: Check__default["default"],
|
|
11194
11226
|
style: "text",
|
|
11195
11227
|
tooltipProps: LIST_FIELD_TOOLTIP_PROPS.save,
|
|
11196
11228
|
onClick: onSubmit
|
|
11197
11229
|
}), /*#__PURE__*/jsxRuntime.jsx(Button__default["default"], {
|
|
11198
11230
|
ref: ref,
|
|
11199
11231
|
"data-cy": "inline-input-cancel-button",
|
|
11200
|
-
icon:
|
|
11232
|
+
icon: Close__default["default"],
|
|
11201
11233
|
style: "text",
|
|
11202
11234
|
tooltipProps: LIST_FIELD_TOOLTIP_PROPS.cancel,
|
|
11203
11235
|
onClick: handleCancel
|
|
@@ -11288,7 +11320,7 @@ var ListField = function ListField(_ref) {
|
|
|
11288
11320
|
}), /*#__PURE__*/jsxRuntime.jsx(Button__default["default"], {
|
|
11289
11321
|
className: "flex-shrink-0",
|
|
11290
11322
|
"data-cy": "list-action-delete-item-button",
|
|
11291
|
-
icon:
|
|
11323
|
+
icon: Delete__default["default"],
|
|
11292
11324
|
size: "small",
|
|
11293
11325
|
style: "text",
|
|
11294
11326
|
onClick: function onClick() {
|
|
@@ -11317,7 +11349,7 @@ var ListField = function ListField(_ref) {
|
|
|
11317
11349
|
ref: initialFocusRef
|
|
11318
11350
|
}) : /*#__PURE__*/jsxRuntime.jsx(Button__default["default"], {
|
|
11319
11351
|
"data-cy": "list-action-add-item-button",
|
|
11320
|
-
icon:
|
|
11352
|
+
icon: Plus__default["default"],
|
|
11321
11353
|
label: t("neetoRules.common.addItem"),
|
|
11322
11354
|
ref: initialFocusRef,
|
|
11323
11355
|
style: "text",
|
|
@@ -11445,7 +11477,7 @@ var MultiSelect$1 = function MultiSelect(_ref) {
|
|
|
11445
11477
|
className: "mb-1",
|
|
11446
11478
|
"data-cy": "search-text-field",
|
|
11447
11479
|
placeholder: t("neetoRules.common.search"),
|
|
11448
|
-
prefix: /*#__PURE__*/jsxRuntime.jsx(
|
|
11480
|
+
prefix: /*#__PURE__*/jsxRuntime.jsx(Search__default["default"], {}),
|
|
11449
11481
|
value: searchTerm,
|
|
11450
11482
|
onChange: function onChange(e) {
|
|
11451
11483
|
return setSearchTerm(e.target.value);
|
|
@@ -19261,7 +19293,7 @@ var STYLES = {
|
|
|
19261
19293
|
var MultiValueRemove = function MultiValueRemove(props) {
|
|
19262
19294
|
return /*#__PURE__*/jsxRuntime.jsx(components.MultiValueRemove, _objectSpread$h(_objectSpread$h({}, props), {}, {
|
|
19263
19295
|
innerProps: _objectSpread$h(_objectSpread$h({}, props.innerProps), {}, _defineProperty$2({}, "data-cy", "".concat(dasherize(props.data.label), "-remove-icon"))),
|
|
19264
|
-
children: /*#__PURE__*/jsxRuntime.jsx(
|
|
19296
|
+
children: /*#__PURE__*/jsxRuntime.jsx(Close__default["default"], {
|
|
19265
19297
|
size: 16
|
|
19266
19298
|
})
|
|
19267
19299
|
}));
|
|
@@ -19293,7 +19325,7 @@ var ValueContainer = function ValueContainer(_ref) {
|
|
|
19293
19325
|
var ClearIndicator = function ClearIndicator(props) {
|
|
19294
19326
|
return /*#__PURE__*/jsxRuntime.jsx(components.ClearIndicator, _objectSpread$h(_objectSpread$h({}, props), {}, {
|
|
19295
19327
|
innerProps: _objectSpread$h(_objectSpread$h({}, props.innerProps), {}, _defineProperty$2({}, "data-cy", "clear-all-button")),
|
|
19296
|
-
children: /*#__PURE__*/jsxRuntime.jsx(
|
|
19328
|
+
children: /*#__PURE__*/jsxRuntime.jsx(Close__default["default"], {
|
|
19297
19329
|
className: "cursor-pointer",
|
|
19298
19330
|
size: 16
|
|
19299
19331
|
})
|
|
@@ -20203,7 +20235,7 @@ var ActionItem = function ActionItem(_ref) {
|
|
|
20203
20235
|
className: "mb-1",
|
|
20204
20236
|
"data-cy": "search-text-field",
|
|
20205
20237
|
placeholder: t("neetoRules.common.search"),
|
|
20206
|
-
prefix: /*#__PURE__*/jsxRuntime.jsx(
|
|
20238
|
+
prefix: /*#__PURE__*/jsxRuntime.jsx(Search__default["default"], {}),
|
|
20207
20239
|
value: searchTerm,
|
|
20208
20240
|
onChange: function onChange(e) {
|
|
20209
20241
|
return setSearchTerm(e.target.value);
|
|
@@ -20216,7 +20248,7 @@ var ActionItem = function ActionItem(_ref) {
|
|
|
20216
20248
|
children: searchedOptions.map(function (option, idx) {
|
|
20217
20249
|
return /*#__PURE__*/jsxRuntime.jsx(MenuItem$7.Button, {
|
|
20218
20250
|
"data-cy": "".concat(utils.joinHyphenCase(option.label), "-menu-item"),
|
|
20219
|
-
suffix: (selectedOption === null || selectedOption === void 0 ? void 0 : selectedOption.value) === option.value && /*#__PURE__*/jsxRuntime.jsx(
|
|
20251
|
+
suffix: (selectedOption === null || selectedOption === void 0 ? void 0 : selectedOption.value) === option.value && /*#__PURE__*/jsxRuntime.jsx(Check__default["default"], {
|
|
20220
20252
|
className: "neeto-ui-text-primary-800"
|
|
20221
20253
|
}),
|
|
20222
20254
|
onClick: function onClick() {
|
|
@@ -20317,7 +20349,7 @@ var Actions = function Actions(_ref) {
|
|
|
20317
20349
|
className: "-mx-1 flex flex-wrap",
|
|
20318
20350
|
children: [handleSlackChannelRefresh && action.name === "message_to_slack" && /*#__PURE__*/jsxRuntime.jsx(Button__default["default"], {
|
|
20319
20351
|
"data-cy": "refresh-slack-button",
|
|
20320
|
-
icon:
|
|
20352
|
+
icon: Refresh__default["default"],
|
|
20321
20353
|
size: 24,
|
|
20322
20354
|
style: "icon",
|
|
20323
20355
|
tooltipProps: {
|
|
@@ -20329,7 +20361,7 @@ var Actions = function Actions(_ref) {
|
|
|
20329
20361
|
}
|
|
20330
20362
|
}), showButton && index === actions.length - 1 && /*#__PURE__*/jsxRuntime.jsx(Button__default["default"], {
|
|
20331
20363
|
"data-cy": "add-action-button",
|
|
20332
|
-
icon:
|
|
20364
|
+
icon: Plus__default["default"],
|
|
20333
20365
|
size: 24,
|
|
20334
20366
|
style: "icon",
|
|
20335
20367
|
tooltipProps: {
|
|
@@ -20341,7 +20373,7 @@ var Actions = function Actions(_ref) {
|
|
|
20341
20373
|
}
|
|
20342
20374
|
}), actions.length > 1 && /*#__PURE__*/jsxRuntime.jsx(Button__default["default"], {
|
|
20343
20375
|
"data-cy": "delete-action-button-".concat(index),
|
|
20344
|
-
icon:
|
|
20376
|
+
icon: Delete__default["default"],
|
|
20345
20377
|
size: 24,
|
|
20346
20378
|
style: "icon",
|
|
20347
20379
|
tooltipProps: {
|
|
@@ -20460,7 +20492,7 @@ var DropdownField = function DropdownField(_ref) {
|
|
|
20460
20492
|
className: "mb-1",
|
|
20461
20493
|
"data-cy": "search-text-field",
|
|
20462
20494
|
placeholder: t("neetoRules.common.search"),
|
|
20463
|
-
prefix: /*#__PURE__*/jsxRuntime.jsx(
|
|
20495
|
+
prefix: /*#__PURE__*/jsxRuntime.jsx(Search__default["default"], {}),
|
|
20464
20496
|
value: searchTerm,
|
|
20465
20497
|
onChange: function onChange(e) {
|
|
20466
20498
|
return setSearchTerm(e.target.value);
|
|
@@ -20476,7 +20508,7 @@ var DropdownField = function DropdownField(_ref) {
|
|
|
20476
20508
|
className: classNames__default["default"]({
|
|
20477
20509
|
"neeto-ui-bg-gray-100": selectedOption.value === option.value
|
|
20478
20510
|
}),
|
|
20479
|
-
suffix: selectedOption.value === option.value && /*#__PURE__*/jsxRuntime.jsx(
|
|
20511
|
+
suffix: selectedOption.value === option.value && /*#__PURE__*/jsxRuntime.jsx(Check__default["default"], {
|
|
20480
20512
|
className: "neeto-ui-text-primary-800",
|
|
20481
20513
|
"data-cy": "check-icon"
|
|
20482
20514
|
}),
|
|
@@ -20584,7 +20616,7 @@ var Dropdown = function Dropdown(_ref) {
|
|
|
20584
20616
|
className: "mb-1",
|
|
20585
20617
|
"data-cy": "search-text-field",
|
|
20586
20618
|
placeholder: t("neetoRules.common.search"),
|
|
20587
|
-
prefix: /*#__PURE__*/jsxRuntime.jsx(
|
|
20619
|
+
prefix: /*#__PURE__*/jsxRuntime.jsx(Search__default["default"], {}),
|
|
20588
20620
|
value: searchTerm,
|
|
20589
20621
|
onChange: function onChange(e) {
|
|
20590
20622
|
return setSearchTerm(e.target.value);
|
|
@@ -20600,7 +20632,7 @@ var Dropdown = function Dropdown(_ref) {
|
|
|
20600
20632
|
className: classNames__default["default"]({
|
|
20601
20633
|
"neeto-ui-bg-gray-100": (defaultSelectedOption === null || defaultSelectedOption === void 0 ? void 0 : defaultSelectedOption.value) === option.value
|
|
20602
20634
|
}),
|
|
20603
|
-
suffix: (defaultSelectedOption === null || defaultSelectedOption === void 0 ? void 0 : defaultSelectedOption.value) === option.value && /*#__PURE__*/jsxRuntime.jsx(
|
|
20635
|
+
suffix: (defaultSelectedOption === null || defaultSelectedOption === void 0 ? void 0 : defaultSelectedOption.value) === option.value && /*#__PURE__*/jsxRuntime.jsx(Check__default["default"], {
|
|
20604
20636
|
className: "neeto-ui-text-primary-800"
|
|
20605
20637
|
}),
|
|
20606
20638
|
onClick: function onClick() {
|
|
@@ -20648,7 +20680,7 @@ var InputField$1 = function InputField(_ref) {
|
|
|
20648
20680
|
placeholder: placeholder,
|
|
20649
20681
|
ref: inputRef,
|
|
20650
20682
|
size: "small",
|
|
20651
|
-
suffix: /*#__PURE__*/jsxRuntime.jsx(
|
|
20683
|
+
suffix: /*#__PURE__*/jsxRuntime.jsx(Check__default["default"], {
|
|
20652
20684
|
className: "cursor-pointer",
|
|
20653
20685
|
onClick: function onClick() {
|
|
20654
20686
|
return setShowInput(function (prevState) {
|
|
@@ -20762,7 +20794,7 @@ var MultiSelect = function MultiSelect(_ref) {
|
|
|
20762
20794
|
className: "mb-1",
|
|
20763
20795
|
"data-cy": "search-text-field",
|
|
20764
20796
|
placeholder: t("neetoRules.common.search"),
|
|
20765
|
-
prefix: /*#__PURE__*/jsxRuntime.jsx(
|
|
20797
|
+
prefix: /*#__PURE__*/jsxRuntime.jsx(Search__default["default"], {}),
|
|
20766
20798
|
value: searchTerm,
|
|
20767
20799
|
onChange: function onChange(e) {
|
|
20768
20800
|
return setSearchTerm(e.target.value);
|
|
@@ -21335,7 +21367,7 @@ var DateField = function DateField(_ref) {
|
|
|
21335
21367
|
name: "".concat(name, ".value"),
|
|
21336
21368
|
type: "date",
|
|
21337
21369
|
onChange: handleOnChange
|
|
21338
|
-
}), /*#__PURE__*/jsxRuntime.jsx(
|
|
21370
|
+
}), /*#__PURE__*/jsxRuntime.jsx(Check__default["default"], {
|
|
21339
21371
|
className: "cursor-pointer",
|
|
21340
21372
|
onClick: function onClick() {
|
|
21341
21373
|
return setShowInput(function (prevState) {
|
|
@@ -21600,7 +21632,7 @@ var Conditions = function Conditions(_ref) {
|
|
|
21600
21632
|
className: "flex",
|
|
21601
21633
|
children: [index === conditions.length - 1 && /*#__PURE__*/jsxRuntime.jsx(Button__default["default"], {
|
|
21602
21634
|
"data-cy": "add-condition-button",
|
|
21603
|
-
icon:
|
|
21635
|
+
icon: Plus__default["default"],
|
|
21604
21636
|
size: "small",
|
|
21605
21637
|
style: "text",
|
|
21606
21638
|
tooltipProps: {
|
|
@@ -21612,7 +21644,7 @@ var Conditions = function Conditions(_ref) {
|
|
|
21612
21644
|
}
|
|
21613
21645
|
}), (allowEmpty || index !== 0) && /*#__PURE__*/jsxRuntime.jsx(Button__default["default"], {
|
|
21614
21646
|
"data-cy": "delete-condition-button-".concat(index),
|
|
21615
|
-
icon:
|
|
21647
|
+
icon: Delete__default["default"],
|
|
21616
21648
|
size: "small",
|
|
21617
21649
|
style: "text",
|
|
21618
21650
|
tooltipProps: {
|
|
@@ -21637,7 +21669,7 @@ var Conditions = function Conditions(_ref) {
|
|
|
21637
21669
|
children: /*#__PURE__*/jsxRuntime.jsx(Button__default["default"], {
|
|
21638
21670
|
className: "mt-2",
|
|
21639
21671
|
"data-cy": "preview-callback-button",
|
|
21640
|
-
icon:
|
|
21672
|
+
icon: Eye__default["default"],
|
|
21641
21673
|
label: t("neetoRules.common.preview"),
|
|
21642
21674
|
style: "secondary",
|
|
21643
21675
|
onClick: function onClick() {
|
|
@@ -21773,7 +21805,7 @@ var Performer$1 = function Performer(_ref) {
|
|
|
21773
21805
|
className: "mb-1",
|
|
21774
21806
|
"data-cy": "search-text-field",
|
|
21775
21807
|
placeholder: t("neetoRules.common.search"),
|
|
21776
|
-
prefix: /*#__PURE__*/jsxRuntime.jsx(
|
|
21808
|
+
prefix: /*#__PURE__*/jsxRuntime.jsx(Search__default["default"], {}),
|
|
21777
21809
|
value: searchTerm,
|
|
21778
21810
|
onChange: function onChange(e) {
|
|
21779
21811
|
return setSearchTerm(e.target.value);
|
|
@@ -21790,7 +21822,7 @@ var Performer$1 = function Performer(_ref) {
|
|
|
21790
21822
|
className: classNames__default["default"]({
|
|
21791
21823
|
"neeto-ui-bg-gray-100": selectedOption.value === option.value
|
|
21792
21824
|
}),
|
|
21793
|
-
suffix: selectedOption.value === option.value && /*#__PURE__*/jsxRuntime.jsx(
|
|
21825
|
+
suffix: selectedOption.value === option.value && /*#__PURE__*/jsxRuntime.jsx(Check__default["default"], {
|
|
21794
21826
|
className: "neeto-ui-text-primary-800",
|
|
21795
21827
|
"data-cy": "check-icon"
|
|
21796
21828
|
}),
|
|
@@ -21961,7 +21993,7 @@ var Events$1 = function Events(_ref) {
|
|
|
21961
21993
|
className: "mb-1",
|
|
21962
21994
|
"data-cy": "search-text-field",
|
|
21963
21995
|
placeholder: t("neetoRules.common.search"),
|
|
21964
|
-
prefix: /*#__PURE__*/jsxRuntime.jsx(
|
|
21996
|
+
prefix: /*#__PURE__*/jsxRuntime.jsx(Search__default["default"], {}),
|
|
21965
21997
|
value: searchTerm,
|
|
21966
21998
|
onChange: function onChange(e) {
|
|
21967
21999
|
return setSearchTerm(e.target.value);
|
|
@@ -22057,7 +22089,7 @@ var EventConditions = function EventConditions(_ref) {
|
|
|
22057
22089
|
"data-cy": "add-condition-button",
|
|
22058
22090
|
"data-test-id": "automation-rules-add-events-button",
|
|
22059
22091
|
disabled: isConditionsEmpty,
|
|
22060
|
-
icon:
|
|
22092
|
+
icon: Plus__default["default"],
|
|
22061
22093
|
size: "small",
|
|
22062
22094
|
style: "text",
|
|
22063
22095
|
onClick: handleAddCondition
|
|
@@ -22179,7 +22211,7 @@ var EventItem = function EventItem(_ref) {
|
|
|
22179
22211
|
className: "mb-1",
|
|
22180
22212
|
"data-cy": "search-text-field",
|
|
22181
22213
|
placeholder: t("neetoRules.common.search"),
|
|
22182
|
-
prefix: /*#__PURE__*/jsxRuntime.jsx(
|
|
22214
|
+
prefix: /*#__PURE__*/jsxRuntime.jsx(Search__default["default"], {}),
|
|
22183
22215
|
value: searchTerm,
|
|
22184
22216
|
onChange: function onChange(e) {
|
|
22185
22217
|
return setSearchTerm(e.target.value);
|
|
@@ -22295,7 +22327,7 @@ var Performer = function Performer(_ref) {
|
|
|
22295
22327
|
className: "mb-1",
|
|
22296
22328
|
"data-cy": "search-text-field",
|
|
22297
22329
|
placeholder: t("neetoRules.common.search"),
|
|
22298
|
-
prefix: /*#__PURE__*/jsxRuntime.jsx(
|
|
22330
|
+
prefix: /*#__PURE__*/jsxRuntime.jsx(Search__default["default"], {}),
|
|
22299
22331
|
value: searchTerm,
|
|
22300
22332
|
onChange: function onChange(e) {
|
|
22301
22333
|
return setSearchTerm(e.target.value);
|
|
@@ -22308,7 +22340,7 @@ var Performer = function Performer(_ref) {
|
|
|
22308
22340
|
className: classNames__default["default"]({
|
|
22309
22341
|
"neeto-ui-bg-gray-100": selectedOption.value === option.value
|
|
22310
22342
|
}),
|
|
22311
|
-
suffix: selectedOption.value === option.value && /*#__PURE__*/jsxRuntime.jsx(
|
|
22343
|
+
suffix: selectedOption.value === option.value && /*#__PURE__*/jsxRuntime.jsx(Check__default["default"], {
|
|
22312
22344
|
className: "neeto-ui-text-primary-800",
|
|
22313
22345
|
"data-cy": "check-icon"
|
|
22314
22346
|
}),
|
|
@@ -22439,7 +22471,7 @@ var Events = function Events(_ref) {
|
|
|
22439
22471
|
children: [showAddButton && /*#__PURE__*/jsxRuntime.jsx(Button__default["default"], {
|
|
22440
22472
|
"data-cy": "add-event-button",
|
|
22441
22473
|
"data-test-id": "automation-rules-add-events-button",
|
|
22442
|
-
icon:
|
|
22474
|
+
icon: Plus__default["default"],
|
|
22443
22475
|
size: 32,
|
|
22444
22476
|
style: "icon",
|
|
22445
22477
|
tooltipProps: {
|
|
@@ -22451,7 +22483,7 @@ var Events = function Events(_ref) {
|
|
|
22451
22483
|
}
|
|
22452
22484
|
}), !showMessage && /*#__PURE__*/jsxRuntime.jsx(Button__default["default"], {
|
|
22453
22485
|
"data-cy": "delete-event-button",
|
|
22454
|
-
icon:
|
|
22486
|
+
icon: Delete__default["default"],
|
|
22455
22487
|
size: 32,
|
|
22456
22488
|
style: "icon",
|
|
22457
22489
|
tooltipProps: {
|
|
@@ -22770,7 +22802,7 @@ var Status = function Status() {
|
|
|
22770
22802
|
label: t("neetoRules.labels.active"),
|
|
22771
22803
|
labelProps: {
|
|
22772
22804
|
helpIconProps: {
|
|
22773
|
-
icon:
|
|
22805
|
+
icon: Help__default["default"],
|
|
22774
22806
|
tooltipProps: {
|
|
22775
22807
|
content: status.value === ENABLED ? t("neetoRules.tooltips.rule.active") : t("neetoRules.tooltips.rule.inactive")
|
|
22776
22808
|
}
|
|
@@ -23119,7 +23151,7 @@ var ActionsDetail = function ActionsDetail(_ref) {
|
|
|
23119
23151
|
}), actionsList.length > 4 && /*#__PURE__*/jsxRuntime.jsx("div", {
|
|
23120
23152
|
className: "mt-3 w-full",
|
|
23121
23153
|
children: /*#__PURE__*/jsxRuntime.jsx(Button__default["default"], {
|
|
23122
|
-
icon: !viewMore ?
|
|
23154
|
+
icon: !viewMore ? Down__default["default"] : Up__default["default"],
|
|
23123
23155
|
size: "small",
|
|
23124
23156
|
style: "link",
|
|
23125
23157
|
label: !viewMore ? t("neetoRules.common.viewMore") : t("neetoRules.common.viewLess"),
|
|
@@ -23234,7 +23266,7 @@ var ConditionsDetail = function ConditionsDetail(_ref) {
|
|
|
23234
23266
|
}), conditionsList.length > 3 && /*#__PURE__*/jsxRuntime.jsx("div", {
|
|
23235
23267
|
className: "mt-3 w-full",
|
|
23236
23268
|
children: /*#__PURE__*/jsxRuntime.jsx(Button__default["default"], {
|
|
23237
|
-
icon: !viewMore ?
|
|
23269
|
+
icon: !viewMore ? Down__default["default"] : Up__default["default"],
|
|
23238
23270
|
size: "small",
|
|
23239
23271
|
style: "link",
|
|
23240
23272
|
label: !viewMore ? t("neetoRules.common.viewMore") : t("neetoRules.common.viewLess"),
|