@bigbinary/neeto-rules-frontend 2.0.0 → 2.0.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/README.md +1 -1
- package/app/javascript/src/translations/en.json +1 -1
- package/dist/index.cjs.js +23 -9
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.js +23 -9
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import React__default, { useState, useRef, useEffect, useContext, useLayoutEffect as useLayoutEffect$1, createElement, useMemo as useMemo$1, forwardRef, createContext, useCallback as useCallback$1, Component, Fragment as Fragment$1, memo } from 'react';
|
|
3
|
-
import { isNotEmpty,
|
|
3
|
+
import { isNotEmpty, isPresent, removeBy, renameKeys, findBy, noop as noop$4, nullSafe, toLabelAndValue } from '@bigbinary/neeto-cist';
|
|
4
4
|
import { DEFAULT_PAGE_SIZE } from '@bigbinary/neeto-commons-frontend/constants';
|
|
5
5
|
import { useMutationWithInvalidation, useQueryParams, withImmutableActions, withT, useStateWithDependency, useDebounce } from '@bigbinary/neeto-commons-frontend/react-utils';
|
|
6
6
|
import Container from '@bigbinary/neeto-molecules/Container';
|
|
@@ -30,6 +30,7 @@ import { t as t$5 } from 'i18next';
|
|
|
30
30
|
import { buildUrl, joinHyphenCase, hyphenize } from '@bigbinary/neeto-commons-frontend/utils';
|
|
31
31
|
import MoreDropdown from '@bigbinary/neeto-molecules/MoreDropdown';
|
|
32
32
|
import Switch from '@bigbinary/neetoui/Switch';
|
|
33
|
+
import Tooltip from '@bigbinary/neetoui/Tooltip';
|
|
33
34
|
import { useFormikContext, useField, FieldArray, ErrorMessage, Formik, Form as Form$1 } from 'formik';
|
|
34
35
|
import Plus from '@bigbinary/neeto-icons/Plus';
|
|
35
36
|
import Delete from '@bigbinary/neeto-icons/Delete';
|
|
@@ -56,7 +57,6 @@ import Tag from '@bigbinary/neetoui/Tag';
|
|
|
56
57
|
import * as yup from 'yup';
|
|
57
58
|
import { isEditorEmpty } from '@bigbinary/neeto-editor/utils';
|
|
58
59
|
import Eye from '@bigbinary/neeto-icons/Eye';
|
|
59
|
-
import Tooltip from '@bigbinary/neetoui/Tooltip';
|
|
60
60
|
import Select$2 from '@bigbinary/neetoui/formik/Select';
|
|
61
61
|
import Radio from '@bigbinary/neetoui/formik/Radio';
|
|
62
62
|
import Help from '@bigbinary/neeto-icons/Help';
|
|
@@ -282,13 +282,14 @@ var Header = function Header(_ref) {
|
|
|
282
282
|
helpPopoverProps = _ref$helpPopoverProps === void 0 ? {} : _ref$helpPopoverProps,
|
|
283
283
|
setIsReorderPaneOpen = _ref.setIsReorderPaneOpen,
|
|
284
284
|
hasUnfilteredRules = _ref.hasUnfilteredRules,
|
|
285
|
-
allowReordering = _ref.allowReordering
|
|
285
|
+
allowReordering = _ref.allowReordering,
|
|
286
|
+
headerProps = _ref.headerProps;
|
|
286
287
|
var _useQueryParams = useQueryParams(),
|
|
287
288
|
_useQueryParams$searc = _useQueryParams.searchTerm,
|
|
288
289
|
searchTerm = _useQueryParams$searc === void 0 ? "" : _useQueryParams$searc;
|
|
289
290
|
var _useTranslation = useTranslation(),
|
|
290
291
|
t = _useTranslation.t;
|
|
291
|
-
return /*#__PURE__*/jsx$1(NeetoHeader, {
|
|
292
|
+
return /*#__PURE__*/jsx$1(NeetoHeader, _objectSpread$s({
|
|
292
293
|
breadcrumbs: breadcrumbs,
|
|
293
294
|
actionBlock: /*#__PURE__*/jsxs(Fragment, {
|
|
294
295
|
children: [hasUnfilteredRules && allowReordering && /*#__PURE__*/jsx$1(Button, {
|
|
@@ -319,7 +320,7 @@ var Header = function Header(_ref) {
|
|
|
319
320
|
title: t("neetoRules.common.title")
|
|
320
321
|
}, helpPopoverProps))]
|
|
321
322
|
})
|
|
322
|
-
});
|
|
323
|
+
}, headerProps));
|
|
323
324
|
};
|
|
324
325
|
var Header$1 = /*#__PURE__*/React__default.memo(Header);
|
|
325
326
|
|
|
@@ -9650,6 +9651,9 @@ var buildActionDropdownMenuItems = function buildActionDropdownMenuItems(_ref) {
|
|
|
9650
9651
|
onClick: function onClick() {
|
|
9651
9652
|
return onClone(rule.id);
|
|
9652
9653
|
}
|
|
9654
|
+
}, {
|
|
9655
|
+
key: "divider",
|
|
9656
|
+
type: "divider"
|
|
9653
9657
|
}, {
|
|
9654
9658
|
key: "delete",
|
|
9655
9659
|
"data-test-id": "automation-rules-delete-link",
|
|
@@ -9716,10 +9720,17 @@ var getColumnData = function getColumnData(_ref3) {
|
|
|
9716
9720
|
key: "description",
|
|
9717
9721
|
width: 390,
|
|
9718
9722
|
render: function render(description) {
|
|
9719
|
-
return /*#__PURE__*/jsx$1(
|
|
9720
|
-
|
|
9723
|
+
return isPresent(description) ? /*#__PURE__*/jsx$1(Tooltip, {
|
|
9724
|
+
content: description,
|
|
9725
|
+
position: "bottom",
|
|
9726
|
+
children: /*#__PURE__*/jsx$1(Typography, {
|
|
9727
|
+
className: "line-clamp-2 whitespace-pre-line",
|
|
9728
|
+
style: "body2",
|
|
9729
|
+
children: description
|
|
9730
|
+
})
|
|
9731
|
+
}) : /*#__PURE__*/jsx$1(Typography, {
|
|
9721
9732
|
style: "body2",
|
|
9722
|
-
children:
|
|
9733
|
+
children: "-"
|
|
9723
9734
|
});
|
|
9724
9735
|
}
|
|
9725
9736
|
}, {
|
|
@@ -9936,7 +9947,9 @@ var NeetoRules = function NeetoRules(_ref) {
|
|
|
9936
9947
|
deleteRule = _ref.deleteRule,
|
|
9937
9948
|
cloneRule = _ref.cloneRule,
|
|
9938
9949
|
updateRule = _ref.updateRule,
|
|
9939
|
-
reorderRules = _ref.reorderRules
|
|
9950
|
+
reorderRules = _ref.reorderRules,
|
|
9951
|
+
_ref$headerProps = _ref.headerProps,
|
|
9952
|
+
headerProps = _ref$headerProps === void 0 ? {} : _ref$headerProps;
|
|
9940
9953
|
var _useState = useState(false),
|
|
9941
9954
|
_useState2 = _slicedToArray$1(_useState, 2),
|
|
9942
9955
|
isReorderPaneOpen = _useState2[0],
|
|
@@ -9970,6 +9983,7 @@ var NeetoRules = function NeetoRules(_ref) {
|
|
|
9970
9983
|
automationRulesPath: automationRulesPath,
|
|
9971
9984
|
breadcrumbs: breadcrumbs,
|
|
9972
9985
|
hasUnfilteredRules: hasUnfilteredRules,
|
|
9986
|
+
headerProps: headerProps,
|
|
9973
9987
|
helpPopoverProps: helpPopoverProps,
|
|
9974
9988
|
setIsReorderPaneOpen: setIsReorderPaneOpen
|
|
9975
9989
|
}), /*#__PURE__*/jsx$1(RulesTable, _objectSpread$m(_objectSpread$m({}, _objectSpread$m({
|