@bigbinary/neeto-rules-frontend 1.1.1 → 1.1.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/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 +5 -5
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";
|
|
@@ -9474,7 +9495,7 @@ var DraggableItem = function DraggableItem(props) {
|
|
|
9474
9495
|
}), /*#__PURE__*/jsxRuntime.jsxs("div", {
|
|
9475
9496
|
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",
|
|
9476
9497
|
"data-cy": "automation-rule-reorder-container",
|
|
9477
|
-
children: [/*#__PURE__*/jsxRuntime.jsx(
|
|
9498
|
+
children: [/*#__PURE__*/jsxRuntime.jsx(Reorder__default["default"], {}), rule.name]
|
|
9478
9499
|
})]
|
|
9479
9500
|
}), "list_".concat(rule.id));
|
|
9480
9501
|
}
|
|
@@ -9570,7 +9591,7 @@ var RulesReorder = function RulesReorder(_ref) {
|
|
|
9570
9591
|
children: rubric.source.index + 1
|
|
9571
9592
|
}), /*#__PURE__*/jsxRuntime.jsxs("div", {
|
|
9572
9593
|
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",
|
|
9573
|
-
children: [/*#__PURE__*/jsxRuntime.jsx(
|
|
9594
|
+
children: [/*#__PURE__*/jsxRuntime.jsx(Reorder__default["default"], {}), /*#__PURE__*/jsxRuntime.jsx("div", {
|
|
9574
9595
|
children: initialRules[rubric.source.index].name
|
|
9575
9596
|
})]
|
|
9576
9597
|
})]
|
|
@@ -9675,8 +9696,9 @@ var buildActionDropdownMenuItems = function buildActionDropdownMenuItems(_ref) {
|
|
|
9675
9696
|
onDelete = _ref.onDelete,
|
|
9676
9697
|
_ref$moreDropdownItem = _ref.moreDropdownItems,
|
|
9677
9698
|
moreDropdownItems = _ref$moreDropdownItem === void 0 ? [] : _ref$moreDropdownItem,
|
|
9678
|
-
automationRulesPath = _ref.automationRulesPath
|
|
9679
|
-
|
|
9699
|
+
automationRulesPath = _ref.automationRulesPath,
|
|
9700
|
+
allowCloning = _ref.allowCloning;
|
|
9701
|
+
var defaultOptions = [].concat(_toConsumableArray$1(moreDropdownItems.map(function (_ref2) {
|
|
9680
9702
|
var _onClick = _ref2.onClick,
|
|
9681
9703
|
others = _objectWithoutProperties$1(_ref2, _excluded$h);
|
|
9682
9704
|
return _objectSpread$o(_objectSpread$o({}, others), {}, {
|
|
@@ -9707,6 +9729,12 @@ var buildActionDropdownMenuItems = function buildActionDropdownMenuItems(_ref) {
|
|
|
9707
9729
|
return onDelete(rule);
|
|
9708
9730
|
}
|
|
9709
9731
|
}]);
|
|
9732
|
+
if (!allowCloning) {
|
|
9733
|
+
return neetoCist.removeBy({
|
|
9734
|
+
key: "clone"
|
|
9735
|
+
}, defaultOptions);
|
|
9736
|
+
}
|
|
9737
|
+
return defaultOptions;
|
|
9710
9738
|
};
|
|
9711
9739
|
var getColumnData = function getColumnData(_ref3) {
|
|
9712
9740
|
var handleChangeStatus = _ref3.handleChangeStatus,
|
|
@@ -9819,7 +9847,9 @@ var RulesTable = function RulesTable(_ref) {
|
|
|
9819
9847
|
onCloneSuccess = _ref.onCloneSuccess,
|
|
9820
9848
|
onUpdateSuccess = _ref.onUpdateSuccess,
|
|
9821
9849
|
page = _ref.page,
|
|
9822
|
-
setPage = _ref.setPage
|
|
9850
|
+
setPage = _ref.setPage,
|
|
9851
|
+
_ref$allowCloning = _ref.allowCloning,
|
|
9852
|
+
allowCloning = _ref$allowCloning === void 0 ? true : _ref$allowCloning;
|
|
9823
9853
|
var _useQueryParams = reactUtils.useQueryParams(),
|
|
9824
9854
|
_useQueryParams$searc = _useQueryParams.searchTerm,
|
|
9825
9855
|
searchTerm = _useQueryParams$searc === void 0 ? "" : _useQueryParams$searc;
|
|
@@ -9884,7 +9914,8 @@ var RulesTable = function RulesTable(_ref) {
|
|
|
9884
9914
|
onDelete: setSelectedRule,
|
|
9885
9915
|
onPreview: onPreview,
|
|
9886
9916
|
automationRulesPath: automationRulesPath,
|
|
9887
|
-
moreDropdownItems: moreDropdownItems
|
|
9917
|
+
moreDropdownItems: moreDropdownItems,
|
|
9918
|
+
allowCloning: allowCloning
|
|
9888
9919
|
});
|
|
9889
9920
|
if (isLoading && ramda.isEmpty(rules)) {
|
|
9890
9921
|
return /*#__PURE__*/jsxRuntime.jsx(PageLoader__default["default"], {});
|
|
@@ -9963,7 +9994,7 @@ var RulesTable = function RulesTable(_ref) {
|
|
|
9963
9994
|
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; }
|
|
9964
9995
|
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; }
|
|
9965
9996
|
var NeetoRules = function NeetoRules(_ref) {
|
|
9966
|
-
var _helpPopoverProps$hel, _cloneRule$onSuccess, _deleteRule$onSuccess, _updateRule$onSuccess, _reorderRules$onSucce;
|
|
9997
|
+
var _helpPopoverProps$hel, _cloneRule$allowed, _cloneRule$onSuccess, _deleteRule$onSuccess, _updateRule$onSuccess, _reorderRules$onSucce;
|
|
9967
9998
|
var breadcrumbs = _ref.breadcrumbs,
|
|
9968
9999
|
automationRulesPath = _ref.automationRulesPath,
|
|
9969
10000
|
url = _ref.automationRulesEndpoint,
|
|
@@ -10021,6 +10052,7 @@ var NeetoRules = function NeetoRules(_ref) {
|
|
|
10021
10052
|
totalCount: totalCount,
|
|
10022
10053
|
url: url
|
|
10023
10054
|
}, rulesTableProps)), {}, {
|
|
10055
|
+
allowCloning: (_cloneRule$allowed = cloneRule === null || cloneRule === void 0 ? void 0 : cloneRule.allowed) !== null && _cloneRule$allowed !== void 0 ? _cloneRule$allowed : true,
|
|
10024
10056
|
isLoading: isLoading || isFetching,
|
|
10025
10057
|
onCloneSuccess: cloneRule === null || cloneRule === void 0 || (_cloneRule$onSuccess = cloneRule.onSuccess) === null || _cloneRule$onSuccess === void 0 ? void 0 : _cloneRule$onSuccess.callback,
|
|
10026
10058
|
onDeleteSuccess: deleteRule === null || deleteRule === void 0 || (_deleteRule$onSuccess = deleteRule.onSuccess) === null || _deleteRule$onSuccess === void 0 ? void 0 : _deleteRule$onSuccess.callback,
|
|
@@ -10281,7 +10313,7 @@ var KeyValuePairsField = reactUtils.withT(function (_ref) {
|
|
|
10281
10313
|
name: "".concat(name, ".").concat(index, ".value"),
|
|
10282
10314
|
placeholder: t("neetoRules.labels.value"),
|
|
10283
10315
|
suffix: showDeleteButton && /*#__PURE__*/jsxRuntime.jsx(Button__default["default"], {
|
|
10284
|
-
icon:
|
|
10316
|
+
icon: Delete__default["default"],
|
|
10285
10317
|
size: "small",
|
|
10286
10318
|
style: "text",
|
|
10287
10319
|
onClick: function onClick() {
|
|
@@ -10545,7 +10577,7 @@ var DateField$1 = function DateField(_ref) {
|
|
|
10545
10577
|
// eslint-disable-next-line @bigbinary/neeto/use-standard-date-time-formats
|
|
10546
10578
|
date ? dayjs__default["default"](date).format("YYYY-MM-DD") : "");
|
|
10547
10579
|
}
|
|
10548
|
-
}), /*#__PURE__*/jsxRuntime.jsx(
|
|
10580
|
+
}), /*#__PURE__*/jsxRuntime.jsx(Check__default["default"], {
|
|
10549
10581
|
className: "cursor-pointer",
|
|
10550
10582
|
onClick: function onClick() {
|
|
10551
10583
|
return setShowInput(function (prevState) {
|
|
@@ -10789,7 +10821,7 @@ var DropdownField$1 = function DropdownField(_ref) {
|
|
|
10789
10821
|
className: "mb-1",
|
|
10790
10822
|
"data-cy": "search-text-field",
|
|
10791
10823
|
placeholder: t("neetoRules.common.search"),
|
|
10792
|
-
prefix: /*#__PURE__*/jsxRuntime.jsx(
|
|
10824
|
+
prefix: /*#__PURE__*/jsxRuntime.jsx(Search__default["default"], {}),
|
|
10793
10825
|
value: searchTerm,
|
|
10794
10826
|
onChange: function onChange(e) {
|
|
10795
10827
|
return setSearchTerm(e.target.value);
|
|
@@ -10805,7 +10837,7 @@ var DropdownField$1 = function DropdownField(_ref) {
|
|
|
10805
10837
|
className: classNames__default["default"]({
|
|
10806
10838
|
"neeto-ui-bg-gray-100": defaultSelectedOption.value === option.value
|
|
10807
10839
|
}),
|
|
10808
|
-
suffix: defaultSelectedOption.value === option.value && /*#__PURE__*/jsxRuntime.jsx(
|
|
10840
|
+
suffix: defaultSelectedOption.value === option.value && /*#__PURE__*/jsxRuntime.jsx(Check__default["default"], {
|
|
10809
10841
|
className: "neeto-ui-text-primary-800"
|
|
10810
10842
|
}),
|
|
10811
10843
|
onClick: function onClick() {
|
|
@@ -11079,7 +11111,7 @@ var Input$1 = function Input(_ref) {
|
|
|
11079
11111
|
placeholder: t("neetoRules.placeholders.value"),
|
|
11080
11112
|
ref: inputRef,
|
|
11081
11113
|
size: "small",
|
|
11082
|
-
suffix: /*#__PURE__*/jsxRuntime.jsx(
|
|
11114
|
+
suffix: /*#__PURE__*/jsxRuntime.jsx(Check__default["default"], {
|
|
11083
11115
|
onClick: function onClick() {
|
|
11084
11116
|
return setShowInput(function (prevState) {
|
|
11085
11117
|
return !prevState;
|
|
@@ -11188,14 +11220,14 @@ var InlineInput = /*#__PURE__*/React__default["default"].forwardRef(function (pr
|
|
|
11188
11220
|
children: [/*#__PURE__*/jsxRuntime.jsx(Button__default["default"], {
|
|
11189
11221
|
"data-cy": "inline-input-submit-button",
|
|
11190
11222
|
disabled: !isValidValue,
|
|
11191
|
-
icon:
|
|
11223
|
+
icon: Check__default["default"],
|
|
11192
11224
|
style: "text",
|
|
11193
11225
|
tooltipProps: LIST_FIELD_TOOLTIP_PROPS.save,
|
|
11194
11226
|
onClick: onSubmit
|
|
11195
11227
|
}), /*#__PURE__*/jsxRuntime.jsx(Button__default["default"], {
|
|
11196
11228
|
ref: ref,
|
|
11197
11229
|
"data-cy": "inline-input-cancel-button",
|
|
11198
|
-
icon:
|
|
11230
|
+
icon: Close__default["default"],
|
|
11199
11231
|
style: "text",
|
|
11200
11232
|
tooltipProps: LIST_FIELD_TOOLTIP_PROPS.cancel,
|
|
11201
11233
|
onClick: handleCancel
|
|
@@ -11286,7 +11318,7 @@ var ListField = function ListField(_ref) {
|
|
|
11286
11318
|
}), /*#__PURE__*/jsxRuntime.jsx(Button__default["default"], {
|
|
11287
11319
|
className: "flex-shrink-0",
|
|
11288
11320
|
"data-cy": "list-action-delete-item-button",
|
|
11289
|
-
icon:
|
|
11321
|
+
icon: Delete__default["default"],
|
|
11290
11322
|
size: "small",
|
|
11291
11323
|
style: "text",
|
|
11292
11324
|
onClick: function onClick() {
|
|
@@ -11315,7 +11347,7 @@ var ListField = function ListField(_ref) {
|
|
|
11315
11347
|
ref: initialFocusRef
|
|
11316
11348
|
}) : /*#__PURE__*/jsxRuntime.jsx(Button__default["default"], {
|
|
11317
11349
|
"data-cy": "list-action-add-item-button",
|
|
11318
|
-
icon:
|
|
11350
|
+
icon: Plus__default["default"],
|
|
11319
11351
|
label: t("neetoRules.common.addItem"),
|
|
11320
11352
|
ref: initialFocusRef,
|
|
11321
11353
|
style: "text",
|
|
@@ -11443,7 +11475,7 @@ var MultiSelect$1 = function MultiSelect(_ref) {
|
|
|
11443
11475
|
className: "mb-1",
|
|
11444
11476
|
"data-cy": "search-text-field",
|
|
11445
11477
|
placeholder: t("neetoRules.common.search"),
|
|
11446
|
-
prefix: /*#__PURE__*/jsxRuntime.jsx(
|
|
11478
|
+
prefix: /*#__PURE__*/jsxRuntime.jsx(Search__default["default"], {}),
|
|
11447
11479
|
value: searchTerm,
|
|
11448
11480
|
onChange: function onChange(e) {
|
|
11449
11481
|
return setSearchTerm(e.target.value);
|
|
@@ -19259,7 +19291,7 @@ var STYLES = {
|
|
|
19259
19291
|
var MultiValueRemove = function MultiValueRemove(props) {
|
|
19260
19292
|
return /*#__PURE__*/jsxRuntime.jsx(components.MultiValueRemove, _objectSpread$h(_objectSpread$h({}, props), {}, {
|
|
19261
19293
|
innerProps: _objectSpread$h(_objectSpread$h({}, props.innerProps), {}, _defineProperty$2({}, "data-cy", "".concat(dasherize(props.data.label), "-remove-icon"))),
|
|
19262
|
-
children: /*#__PURE__*/jsxRuntime.jsx(
|
|
19294
|
+
children: /*#__PURE__*/jsxRuntime.jsx(Close__default["default"], {
|
|
19263
19295
|
size: 16
|
|
19264
19296
|
})
|
|
19265
19297
|
}));
|
|
@@ -19291,7 +19323,7 @@ var ValueContainer = function ValueContainer(_ref) {
|
|
|
19291
19323
|
var ClearIndicator = function ClearIndicator(props) {
|
|
19292
19324
|
return /*#__PURE__*/jsxRuntime.jsx(components.ClearIndicator, _objectSpread$h(_objectSpread$h({}, props), {}, {
|
|
19293
19325
|
innerProps: _objectSpread$h(_objectSpread$h({}, props.innerProps), {}, _defineProperty$2({}, "data-cy", "clear-all-button")),
|
|
19294
|
-
children: /*#__PURE__*/jsxRuntime.jsx(
|
|
19326
|
+
children: /*#__PURE__*/jsxRuntime.jsx(Close__default["default"], {
|
|
19295
19327
|
className: "cursor-pointer",
|
|
19296
19328
|
size: 16
|
|
19297
19329
|
})
|
|
@@ -20201,7 +20233,7 @@ var ActionItem = function ActionItem(_ref) {
|
|
|
20201
20233
|
className: "mb-1",
|
|
20202
20234
|
"data-cy": "search-text-field",
|
|
20203
20235
|
placeholder: t("neetoRules.common.search"),
|
|
20204
|
-
prefix: /*#__PURE__*/jsxRuntime.jsx(
|
|
20236
|
+
prefix: /*#__PURE__*/jsxRuntime.jsx(Search__default["default"], {}),
|
|
20205
20237
|
value: searchTerm,
|
|
20206
20238
|
onChange: function onChange(e) {
|
|
20207
20239
|
return setSearchTerm(e.target.value);
|
|
@@ -20214,7 +20246,7 @@ var ActionItem = function ActionItem(_ref) {
|
|
|
20214
20246
|
children: searchedOptions.map(function (option, idx) {
|
|
20215
20247
|
return /*#__PURE__*/jsxRuntime.jsx(MenuItem$7.Button, {
|
|
20216
20248
|
"data-cy": "".concat(utils.joinHyphenCase(option.label), "-menu-item"),
|
|
20217
|
-
suffix: (selectedOption === null || selectedOption === void 0 ? void 0 : selectedOption.value) === option.value && /*#__PURE__*/jsxRuntime.jsx(
|
|
20249
|
+
suffix: (selectedOption === null || selectedOption === void 0 ? void 0 : selectedOption.value) === option.value && /*#__PURE__*/jsxRuntime.jsx(Check__default["default"], {
|
|
20218
20250
|
className: "neeto-ui-text-primary-800"
|
|
20219
20251
|
}),
|
|
20220
20252
|
onClick: function onClick() {
|
|
@@ -20315,7 +20347,7 @@ var Actions = function Actions(_ref) {
|
|
|
20315
20347
|
className: "-mx-1 flex flex-wrap",
|
|
20316
20348
|
children: [handleSlackChannelRefresh && action.name === "message_to_slack" && /*#__PURE__*/jsxRuntime.jsx(Button__default["default"], {
|
|
20317
20349
|
"data-cy": "refresh-slack-button",
|
|
20318
|
-
icon:
|
|
20350
|
+
icon: Refresh__default["default"],
|
|
20319
20351
|
size: 24,
|
|
20320
20352
|
style: "icon",
|
|
20321
20353
|
tooltipProps: {
|
|
@@ -20327,7 +20359,7 @@ var Actions = function Actions(_ref) {
|
|
|
20327
20359
|
}
|
|
20328
20360
|
}), showButton && index === actions.length - 1 && /*#__PURE__*/jsxRuntime.jsx(Button__default["default"], {
|
|
20329
20361
|
"data-cy": "add-action-button",
|
|
20330
|
-
icon:
|
|
20362
|
+
icon: Plus__default["default"],
|
|
20331
20363
|
size: 24,
|
|
20332
20364
|
style: "icon",
|
|
20333
20365
|
tooltipProps: {
|
|
@@ -20339,7 +20371,7 @@ var Actions = function Actions(_ref) {
|
|
|
20339
20371
|
}
|
|
20340
20372
|
}), actions.length > 1 && /*#__PURE__*/jsxRuntime.jsx(Button__default["default"], {
|
|
20341
20373
|
"data-cy": "delete-action-button-".concat(index),
|
|
20342
|
-
icon:
|
|
20374
|
+
icon: Delete__default["default"],
|
|
20343
20375
|
size: 24,
|
|
20344
20376
|
style: "icon",
|
|
20345
20377
|
tooltipProps: {
|
|
@@ -20458,7 +20490,7 @@ var DropdownField = function DropdownField(_ref) {
|
|
|
20458
20490
|
className: "mb-1",
|
|
20459
20491
|
"data-cy": "search-text-field",
|
|
20460
20492
|
placeholder: t("neetoRules.common.search"),
|
|
20461
|
-
prefix: /*#__PURE__*/jsxRuntime.jsx(
|
|
20493
|
+
prefix: /*#__PURE__*/jsxRuntime.jsx(Search__default["default"], {}),
|
|
20462
20494
|
value: searchTerm,
|
|
20463
20495
|
onChange: function onChange(e) {
|
|
20464
20496
|
return setSearchTerm(e.target.value);
|
|
@@ -20474,7 +20506,7 @@ var DropdownField = function DropdownField(_ref) {
|
|
|
20474
20506
|
className: classNames__default["default"]({
|
|
20475
20507
|
"neeto-ui-bg-gray-100": selectedOption.value === option.value
|
|
20476
20508
|
}),
|
|
20477
|
-
suffix: selectedOption.value === option.value && /*#__PURE__*/jsxRuntime.jsx(
|
|
20509
|
+
suffix: selectedOption.value === option.value && /*#__PURE__*/jsxRuntime.jsx(Check__default["default"], {
|
|
20478
20510
|
className: "neeto-ui-text-primary-800",
|
|
20479
20511
|
"data-cy": "check-icon"
|
|
20480
20512
|
}),
|
|
@@ -20582,7 +20614,7 @@ var Dropdown = function Dropdown(_ref) {
|
|
|
20582
20614
|
className: "mb-1",
|
|
20583
20615
|
"data-cy": "search-text-field",
|
|
20584
20616
|
placeholder: t("neetoRules.common.search"),
|
|
20585
|
-
prefix: /*#__PURE__*/jsxRuntime.jsx(
|
|
20617
|
+
prefix: /*#__PURE__*/jsxRuntime.jsx(Search__default["default"], {}),
|
|
20586
20618
|
value: searchTerm,
|
|
20587
20619
|
onChange: function onChange(e) {
|
|
20588
20620
|
return setSearchTerm(e.target.value);
|
|
@@ -20598,7 +20630,7 @@ var Dropdown = function Dropdown(_ref) {
|
|
|
20598
20630
|
className: classNames__default["default"]({
|
|
20599
20631
|
"neeto-ui-bg-gray-100": (defaultSelectedOption === null || defaultSelectedOption === void 0 ? void 0 : defaultSelectedOption.value) === option.value
|
|
20600
20632
|
}),
|
|
20601
|
-
suffix: (defaultSelectedOption === null || defaultSelectedOption === void 0 ? void 0 : defaultSelectedOption.value) === option.value && /*#__PURE__*/jsxRuntime.jsx(
|
|
20633
|
+
suffix: (defaultSelectedOption === null || defaultSelectedOption === void 0 ? void 0 : defaultSelectedOption.value) === option.value && /*#__PURE__*/jsxRuntime.jsx(Check__default["default"], {
|
|
20602
20634
|
className: "neeto-ui-text-primary-800"
|
|
20603
20635
|
}),
|
|
20604
20636
|
onClick: function onClick() {
|
|
@@ -20646,7 +20678,7 @@ var InputField$1 = function InputField(_ref) {
|
|
|
20646
20678
|
placeholder: placeholder,
|
|
20647
20679
|
ref: inputRef,
|
|
20648
20680
|
size: "small",
|
|
20649
|
-
suffix: /*#__PURE__*/jsxRuntime.jsx(
|
|
20681
|
+
suffix: /*#__PURE__*/jsxRuntime.jsx(Check__default["default"], {
|
|
20650
20682
|
className: "cursor-pointer",
|
|
20651
20683
|
onClick: function onClick() {
|
|
20652
20684
|
return setShowInput(function (prevState) {
|
|
@@ -20760,7 +20792,7 @@ var MultiSelect = function MultiSelect(_ref) {
|
|
|
20760
20792
|
className: "mb-1",
|
|
20761
20793
|
"data-cy": "search-text-field",
|
|
20762
20794
|
placeholder: t("neetoRules.common.search"),
|
|
20763
|
-
prefix: /*#__PURE__*/jsxRuntime.jsx(
|
|
20795
|
+
prefix: /*#__PURE__*/jsxRuntime.jsx(Search__default["default"], {}),
|
|
20764
20796
|
value: searchTerm,
|
|
20765
20797
|
onChange: function onChange(e) {
|
|
20766
20798
|
return setSearchTerm(e.target.value);
|
|
@@ -21333,7 +21365,7 @@ var DateField = function DateField(_ref) {
|
|
|
21333
21365
|
name: "".concat(name, ".value"),
|
|
21334
21366
|
type: "date",
|
|
21335
21367
|
onChange: handleOnChange
|
|
21336
|
-
}), /*#__PURE__*/jsxRuntime.jsx(
|
|
21368
|
+
}), /*#__PURE__*/jsxRuntime.jsx(Check__default["default"], {
|
|
21337
21369
|
className: "cursor-pointer",
|
|
21338
21370
|
onClick: function onClick() {
|
|
21339
21371
|
return setShowInput(function (prevState) {
|
|
@@ -21598,7 +21630,7 @@ var Conditions = function Conditions(_ref) {
|
|
|
21598
21630
|
className: "flex",
|
|
21599
21631
|
children: [index === conditions.length - 1 && /*#__PURE__*/jsxRuntime.jsx(Button__default["default"], {
|
|
21600
21632
|
"data-cy": "add-condition-button",
|
|
21601
|
-
icon:
|
|
21633
|
+
icon: Plus__default["default"],
|
|
21602
21634
|
size: "small",
|
|
21603
21635
|
style: "text",
|
|
21604
21636
|
tooltipProps: {
|
|
@@ -21610,7 +21642,7 @@ var Conditions = function Conditions(_ref) {
|
|
|
21610
21642
|
}
|
|
21611
21643
|
}), (allowEmpty || index !== 0) && /*#__PURE__*/jsxRuntime.jsx(Button__default["default"], {
|
|
21612
21644
|
"data-cy": "delete-condition-button-".concat(index),
|
|
21613
|
-
icon:
|
|
21645
|
+
icon: Delete__default["default"],
|
|
21614
21646
|
size: "small",
|
|
21615
21647
|
style: "text",
|
|
21616
21648
|
tooltipProps: {
|
|
@@ -21635,7 +21667,7 @@ var Conditions = function Conditions(_ref) {
|
|
|
21635
21667
|
children: /*#__PURE__*/jsxRuntime.jsx(Button__default["default"], {
|
|
21636
21668
|
className: "mt-2",
|
|
21637
21669
|
"data-cy": "preview-callback-button",
|
|
21638
|
-
icon:
|
|
21670
|
+
icon: Eye__default["default"],
|
|
21639
21671
|
label: t("neetoRules.common.preview"),
|
|
21640
21672
|
style: "secondary",
|
|
21641
21673
|
onClick: function onClick() {
|
|
@@ -21771,7 +21803,7 @@ var Performer$1 = function Performer(_ref) {
|
|
|
21771
21803
|
className: "mb-1",
|
|
21772
21804
|
"data-cy": "search-text-field",
|
|
21773
21805
|
placeholder: t("neetoRules.common.search"),
|
|
21774
|
-
prefix: /*#__PURE__*/jsxRuntime.jsx(
|
|
21806
|
+
prefix: /*#__PURE__*/jsxRuntime.jsx(Search__default["default"], {}),
|
|
21775
21807
|
value: searchTerm,
|
|
21776
21808
|
onChange: function onChange(e) {
|
|
21777
21809
|
return setSearchTerm(e.target.value);
|
|
@@ -21788,7 +21820,7 @@ var Performer$1 = function Performer(_ref) {
|
|
|
21788
21820
|
className: classNames__default["default"]({
|
|
21789
21821
|
"neeto-ui-bg-gray-100": selectedOption.value === option.value
|
|
21790
21822
|
}),
|
|
21791
|
-
suffix: selectedOption.value === option.value && /*#__PURE__*/jsxRuntime.jsx(
|
|
21823
|
+
suffix: selectedOption.value === option.value && /*#__PURE__*/jsxRuntime.jsx(Check__default["default"], {
|
|
21792
21824
|
className: "neeto-ui-text-primary-800",
|
|
21793
21825
|
"data-cy": "check-icon"
|
|
21794
21826
|
}),
|
|
@@ -21959,7 +21991,7 @@ var Events$1 = function Events(_ref) {
|
|
|
21959
21991
|
className: "mb-1",
|
|
21960
21992
|
"data-cy": "search-text-field",
|
|
21961
21993
|
placeholder: t("neetoRules.common.search"),
|
|
21962
|
-
prefix: /*#__PURE__*/jsxRuntime.jsx(
|
|
21994
|
+
prefix: /*#__PURE__*/jsxRuntime.jsx(Search__default["default"], {}),
|
|
21963
21995
|
value: searchTerm,
|
|
21964
21996
|
onChange: function onChange(e) {
|
|
21965
21997
|
return setSearchTerm(e.target.value);
|
|
@@ -22055,7 +22087,7 @@ var EventConditions = function EventConditions(_ref) {
|
|
|
22055
22087
|
"data-cy": "add-condition-button",
|
|
22056
22088
|
"data-test-id": "automation-rules-add-events-button",
|
|
22057
22089
|
disabled: isConditionsEmpty,
|
|
22058
|
-
icon:
|
|
22090
|
+
icon: Plus__default["default"],
|
|
22059
22091
|
size: "small",
|
|
22060
22092
|
style: "text",
|
|
22061
22093
|
onClick: handleAddCondition
|
|
@@ -22177,7 +22209,7 @@ var EventItem = function EventItem(_ref) {
|
|
|
22177
22209
|
className: "mb-1",
|
|
22178
22210
|
"data-cy": "search-text-field",
|
|
22179
22211
|
placeholder: t("neetoRules.common.search"),
|
|
22180
|
-
prefix: /*#__PURE__*/jsxRuntime.jsx(
|
|
22212
|
+
prefix: /*#__PURE__*/jsxRuntime.jsx(Search__default["default"], {}),
|
|
22181
22213
|
value: searchTerm,
|
|
22182
22214
|
onChange: function onChange(e) {
|
|
22183
22215
|
return setSearchTerm(e.target.value);
|
|
@@ -22293,7 +22325,7 @@ var Performer = function Performer(_ref) {
|
|
|
22293
22325
|
className: "mb-1",
|
|
22294
22326
|
"data-cy": "search-text-field",
|
|
22295
22327
|
placeholder: t("neetoRules.common.search"),
|
|
22296
|
-
prefix: /*#__PURE__*/jsxRuntime.jsx(
|
|
22328
|
+
prefix: /*#__PURE__*/jsxRuntime.jsx(Search__default["default"], {}),
|
|
22297
22329
|
value: searchTerm,
|
|
22298
22330
|
onChange: function onChange(e) {
|
|
22299
22331
|
return setSearchTerm(e.target.value);
|
|
@@ -22306,7 +22338,7 @@ var Performer = function Performer(_ref) {
|
|
|
22306
22338
|
className: classNames__default["default"]({
|
|
22307
22339
|
"neeto-ui-bg-gray-100": selectedOption.value === option.value
|
|
22308
22340
|
}),
|
|
22309
|
-
suffix: selectedOption.value === option.value && /*#__PURE__*/jsxRuntime.jsx(
|
|
22341
|
+
suffix: selectedOption.value === option.value && /*#__PURE__*/jsxRuntime.jsx(Check__default["default"], {
|
|
22310
22342
|
className: "neeto-ui-text-primary-800",
|
|
22311
22343
|
"data-cy": "check-icon"
|
|
22312
22344
|
}),
|
|
@@ -22437,7 +22469,7 @@ var Events = function Events(_ref) {
|
|
|
22437
22469
|
children: [showAddButton && /*#__PURE__*/jsxRuntime.jsx(Button__default["default"], {
|
|
22438
22470
|
"data-cy": "add-event-button",
|
|
22439
22471
|
"data-test-id": "automation-rules-add-events-button",
|
|
22440
|
-
icon:
|
|
22472
|
+
icon: Plus__default["default"],
|
|
22441
22473
|
size: 32,
|
|
22442
22474
|
style: "icon",
|
|
22443
22475
|
tooltipProps: {
|
|
@@ -22449,7 +22481,7 @@ var Events = function Events(_ref) {
|
|
|
22449
22481
|
}
|
|
22450
22482
|
}), !showMessage && /*#__PURE__*/jsxRuntime.jsx(Button__default["default"], {
|
|
22451
22483
|
"data-cy": "delete-event-button",
|
|
22452
|
-
icon:
|
|
22484
|
+
icon: Delete__default["default"],
|
|
22453
22485
|
size: 32,
|
|
22454
22486
|
style: "icon",
|
|
22455
22487
|
tooltipProps: {
|
|
@@ -22768,7 +22800,7 @@ var Status = function Status() {
|
|
|
22768
22800
|
label: t("neetoRules.labels.active"),
|
|
22769
22801
|
labelProps: {
|
|
22770
22802
|
helpIconProps: {
|
|
22771
|
-
icon:
|
|
22803
|
+
icon: Help__default["default"],
|
|
22772
22804
|
tooltipProps: {
|
|
22773
22805
|
content: status.value === ENABLED ? t("neetoRules.tooltips.rule.active") : t("neetoRules.tooltips.rule.inactive")
|
|
22774
22806
|
}
|
|
@@ -23117,7 +23149,7 @@ var ActionsDetail = function ActionsDetail(_ref) {
|
|
|
23117
23149
|
}), actionsList.length > 4 && /*#__PURE__*/jsxRuntime.jsx("div", {
|
|
23118
23150
|
className: "mt-3 w-full",
|
|
23119
23151
|
children: /*#__PURE__*/jsxRuntime.jsx(Button__default["default"], {
|
|
23120
|
-
icon: !viewMore ?
|
|
23152
|
+
icon: !viewMore ? Down__default["default"] : Up__default["default"],
|
|
23121
23153
|
size: "small",
|
|
23122
23154
|
style: "link",
|
|
23123
23155
|
label: !viewMore ? t("neetoRules.common.viewMore") : t("neetoRules.common.viewLess"),
|
|
@@ -23232,7 +23264,7 @@ var ConditionsDetail = function ConditionsDetail(_ref) {
|
|
|
23232
23264
|
}), conditionsList.length > 3 && /*#__PURE__*/jsxRuntime.jsx("div", {
|
|
23233
23265
|
className: "mt-3 w-full",
|
|
23234
23266
|
children: /*#__PURE__*/jsxRuntime.jsx(Button__default["default"], {
|
|
23235
|
-
icon: !viewMore ?
|
|
23267
|
+
icon: !viewMore ? Down__default["default"] : Up__default["default"],
|
|
23236
23268
|
size: "small",
|
|
23237
23269
|
style: "link",
|
|
23238
23270
|
label: !viewMore ? t("neetoRules.common.viewMore") : t("neetoRules.common.viewLess"),
|