@bigbinary/neeto-rules-frontend 2.0.4 → 2.1.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/dist/index.cjs.js CHANGED
@@ -16,13 +16,12 @@ var reactI18next = require('react-i18next');
16
16
  var jsxRuntime = require('react/jsx-runtime');
17
17
  var ReactDOM = require('react-dom');
18
18
  var Reorder = require('@bigbinary/neeto-icons/Reorder');
19
+ var PageLoader = require('@bigbinary/neeto-molecules/PageLoader');
19
20
  var Pane = require('@bigbinary/neetoui/Pane');
20
21
  var Typography = require('@bigbinary/neetoui/Typography');
21
- var Pagination = require('@bigbinary/neetoui/Pagination');
22
22
  var ramda = require('ramda');
23
23
  var reactRouterDom = require('react-router-dom');
24
24
  var shallow = require('zustand/shallow');
25
- var PageLoader = require('@bigbinary/neeto-molecules/PageLoader');
26
25
  var SubHeader = require('@bigbinary/neeto-molecules/SubHeader');
27
26
  var TableWrapper = require('@bigbinary/neeto-molecules/TableWrapper');
28
27
  var Alert = require('@bigbinary/neetoui/Alert');
@@ -97,10 +96,9 @@ var HelpPopover__default = /*#__PURE__*/_interopDefaultLegacy(HelpPopover);
97
96
  var Button__default = /*#__PURE__*/_interopDefaultLegacy(Button);
98
97
  var ReactDOM__default = /*#__PURE__*/_interopDefaultLegacy(ReactDOM);
99
98
  var Reorder__default = /*#__PURE__*/_interopDefaultLegacy(Reorder);
99
+ var PageLoader__default = /*#__PURE__*/_interopDefaultLegacy(PageLoader);
100
100
  var Pane__default = /*#__PURE__*/_interopDefaultLegacy(Pane);
101
101
  var Typography__default = /*#__PURE__*/_interopDefaultLegacy(Typography);
102
- var Pagination__default = /*#__PURE__*/_interopDefaultLegacy(Pagination);
103
- var PageLoader__default = /*#__PURE__*/_interopDefaultLegacy(PageLoader);
104
102
  var SubHeader__default = /*#__PURE__*/_interopDefaultLegacy(SubHeader);
105
103
  var TableWrapper__default = /*#__PURE__*/_interopDefaultLegacy(TableWrapper);
106
104
  var Alert__default = /*#__PURE__*/_interopDefaultLegacy(Alert);
@@ -341,6 +339,11 @@ var useReorderAutomationRules = function useReorderAutomationRules(url) {
341
339
  });
342
340
  };
343
341
 
342
+ var INITIAL_RULES_DATA = {
343
+ rules: [],
344
+ totalCount: 0
345
+ };
346
+
344
347
  var createRoutes = function createRoutes(basePath) {
345
348
  return {
346
349
  index: basePath,
@@ -398,7 +401,7 @@ var Header = function Header(_ref) {
398
401
  })
399
402
  }, headerProps));
400
403
  };
401
- var Header$1 = /*#__PURE__*/React__default["default"].memo(Header);
404
+ var Header$1 = /*#__PURE__*/React.memo(Header);
402
405
 
403
406
  function _typeof$1(o) {
404
407
  "@babel/helpers - typeof";
@@ -9467,13 +9470,21 @@ var ConnectedDroppable$1 = ConnectedDroppable;
9467
9470
 
9468
9471
  function ownKeys$r(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; }
9469
9472
  function _objectSpread$r(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$r(Object(t), !0).forEach(function (r) { _defineProperty$1(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$r(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
9470
- var reorderList = function reorderList(list, startIndex, endIndex) {
9473
+ var reorderList = function reorderList(_ref) {
9474
+ var endIndex = _ref.endIndex,
9475
+ firstDisplayOrder = _ref.firstDisplayOrder,
9476
+ list = _ref.list,
9477
+ startIndex = _ref.startIndex;
9471
9478
  var result = Array.from(list);
9472
9479
  var _result$splice = result.splice(startIndex, 1),
9473
9480
  _result$splice2 = _slicedToArray(_result$splice, 1),
9474
9481
  removed = _result$splice2[0];
9475
9482
  result.splice(endIndex, 0, removed);
9476
- return result;
9483
+ return result.map(function (item, index) {
9484
+ return _objectSpread$r(_objectSpread$r({}, item), {}, {
9485
+ displayOrder: firstDisplayOrder + index
9486
+ });
9487
+ });
9477
9488
  };
9478
9489
  var getDragItemStyle = function getDragItemStyle(isDragging, draggableStyle) {
9479
9490
  return _objectSpread$r(_objectSpread$r({}, draggableStyle), isDragging && {
@@ -9512,35 +9523,38 @@ var DraggableItem$1 = reactRouterDom.withRouter(DraggableItem);
9512
9523
  function ownKeys$p(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; }
9513
9524
  function _objectSpread$p(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$p(Object(t), !0).forEach(function (r) { _defineProperty$1(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$p(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
9514
9525
  var RulesReorder = function RulesReorder(_ref) {
9526
+ var _rules$0$displayOrder, _rules$;
9515
9527
  var isOpen = _ref.isOpen,
9516
- onClose = _ref.onClose,
9517
- rules = _ref.rules,
9518
- _ref$paginationProps = _ref.paginationProps,
9519
- paginationProps = _ref$paginationProps === void 0 ? {} : _ref$paginationProps,
9528
+ totalCount = _ref.totalCount,
9520
9529
  url = _ref.url,
9530
+ onClose = _ref.onClose,
9521
9531
  onReorderSuccess = _ref.onReorderSuccess;
9522
- var _useState = React.useState(rules),
9532
+ var _useState = React.useState([]),
9523
9533
  _useState2 = _slicedToArray(_useState, 2),
9524
- initialRules = _useState2[0],
9525
- setInitialRules = _useState2[1];
9534
+ reorderedRules = _useState2[0],
9535
+ setReorderedRules = _useState2[1];
9526
9536
  var _useTranslation = reactI18next.useTranslation(),
9527
9537
  t = _useTranslation.t;
9538
+ var _useFetchAutomationRu = useFetchAutomationRules({
9539
+ pageSize: totalCount,
9540
+ url: url
9541
+ }, {
9542
+ enabled: isOpen
9543
+ }),
9544
+ _useFetchAutomationRu2 = _useFetchAutomationRu.data,
9545
+ _useFetchAutomationRu3 = _useFetchAutomationRu2 === void 0 ? INITIAL_RULES_DATA : _useFetchAutomationRu2,
9546
+ rules = _useFetchAutomationRu3.rules,
9547
+ isLoading = _useFetchAutomationRu.isLoading;
9528
9548
  var _useReorderAutomation = useReorderAutomationRules(url),
9529
9549
  reOrder = _useReorderAutomation.mutate,
9530
9550
  isPending = _useReorderAutomation.isPending;
9531
- var handleReorderSave = function handleReorderSave(rules) {
9532
- var params = [];
9533
- rules.forEach(function (rule, index) {
9534
- params.push({
9535
- id: rule.id,
9536
- display_order: index
9537
- });
9538
- });
9539
- reOrder({
9551
+ var firstDisplayOrder = (_rules$0$displayOrder = (_rules$ = rules[0]) === null || _rules$ === void 0 ? void 0 : _rules$.displayOrder) !== null && _rules$0$displayOrder !== void 0 ? _rules$0$displayOrder : 1;
9552
+ var handleReorderSave = function handleReorderSave() {
9553
+ return reOrder({
9540
9554
  url: url,
9541
9555
  payload: {
9542
9556
  reorder: {
9543
- rules: params
9557
+ rules: reorderedRules
9544
9558
  }
9545
9559
  }
9546
9560
  }, {
@@ -9550,22 +9564,30 @@ var RulesReorder = function RulesReorder(_ref) {
9550
9564
  }
9551
9565
  });
9552
9566
  };
9553
- var onDragEnd = function onDragEnd(result) {
9554
- if (!result.destination || result.source.index === result.destination.index) {
9555
- return;
9556
- }
9557
- var originalRules = ramda.clone(initialRules);
9558
- var items = reorderList(originalRules, result.source.index, result.destination.index);
9559
- items = items.map(function (item, index) {
9560
- return _objectSpread$p(_objectSpread$p({}, item), {}, {
9561
- display_order: index
9562
- });
9567
+ var onDragEnd = function onDragEnd(_ref2) {
9568
+ var destination = _ref2.destination,
9569
+ source = _ref2.source;
9570
+ if (!destination || source.index === destination.index) return;
9571
+ var items = reorderList({
9572
+ endIndex: destination.index,
9573
+ firstDisplayOrder: firstDisplayOrder,
9574
+ list: ramda.clone(reorderedRules),
9575
+ startIndex: source.index
9563
9576
  });
9564
- setInitialRules(items);
9577
+ setReorderedRules(items);
9565
9578
  };
9566
9579
  React.useEffect(function () {
9567
- setInitialRules(rules);
9580
+ setReorderedRules(rules);
9568
9581
  }, [rules]);
9582
+ if (isLoading) {
9583
+ return /*#__PURE__*/jsxRuntime.jsx(Pane__default["default"], {
9584
+ isOpen: isOpen,
9585
+ onClose: onClose,
9586
+ children: /*#__PURE__*/jsxRuntime.jsx(Container__default["default"], {
9587
+ children: /*#__PURE__*/jsxRuntime.jsx(PageLoader__default["default"], {})
9588
+ })
9589
+ });
9590
+ }
9569
9591
  return /*#__PURE__*/jsxRuntime.jsxs(Pane__default["default"], {
9570
9592
  isOpen: isOpen,
9571
9593
  onClose: onClose,
@@ -9580,9 +9602,9 @@ var RulesReorder = function RulesReorder(_ref) {
9580
9602
  className: "mb-3",
9581
9603
  style: "body2",
9582
9604
  children: t("neetoRules.description.reorder")
9583
- }), /*#__PURE__*/jsxRuntime.jsxs("div", {
9605
+ }), /*#__PURE__*/jsxRuntime.jsx("div", {
9584
9606
  className: "flex flex-col items-center",
9585
- children: [/*#__PURE__*/jsxRuntime.jsx(DragDropContext, {
9607
+ children: /*#__PURE__*/jsxRuntime.jsx(DragDropContext, {
9586
9608
  onDragEnd: onDragEnd,
9587
9609
  children: /*#__PURE__*/jsxRuntime.jsx(ConnectedDroppable$1, {
9588
9610
  droppableId: "droppable",
@@ -9598,15 +9620,15 @@ var RulesReorder = function RulesReorder(_ref) {
9598
9620
  }), /*#__PURE__*/jsxRuntime.jsxs("div", {
9599
9621
  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",
9600
9622
  children: [/*#__PURE__*/jsxRuntime.jsx(Reorder__default["default"], {}), /*#__PURE__*/jsxRuntime.jsx("div", {
9601
- children: initialRules[rubric.source.index].name
9623
+ children: reorderedRules[rubric.source.index].name
9602
9624
  })]
9603
9625
  })]
9604
- }), "list_".concat(initialRules[rubric.source.index].id));
9626
+ }), "list_".concat(reorderedRules[rubric.source.index].id));
9605
9627
  },
9606
9628
  children: function children(provided) {
9607
9629
  return /*#__PURE__*/jsxRuntime.jsxs("div", _objectSpread$p(_objectSpread$p({}, provided.droppableProps), {}, {
9608
9630
  ref: provided.innerRef,
9609
- children: [initialRules.map(function (rule, index) {
9631
+ children: [reorderedRules.map(function (rule, index) {
9610
9632
  return /*#__PURE__*/React.createElement(DraggableItem$1, {
9611
9633
  rule: rule,
9612
9634
  key: rule.id,
@@ -9616,18 +9638,16 @@ var RulesReorder = function RulesReorder(_ref) {
9616
9638
  }));
9617
9639
  }
9618
9640
  })
9619
- }), neetoCist.isNotEmpty(paginationProps) && /*#__PURE__*/jsxRuntime.jsx(Pagination__default["default"], _objectSpread$p({}, paginationProps))]
9641
+ })
9620
9642
  })]
9621
9643
  }), /*#__PURE__*/jsxRuntime.jsxs(Pane__default["default"].Footer, {
9622
9644
  className: "flex items-center gap-x-2",
9623
9645
  children: [/*#__PURE__*/jsxRuntime.jsx(Button__default["default"], {
9624
- disabled: isPending || ramda.equals(rules, initialRules),
9646
+ disabled: isPending || ramda.equals(rules, reorderedRules),
9625
9647
  label: t("neetoRules.common.saveChange"),
9626
9648
  loading: isPending,
9627
9649
  style: "primary",
9628
- onClick: function onClick() {
9629
- return handleReorderSave(initialRules);
9630
- }
9650
+ onClick: handleReorderSave
9631
9651
  }), /*#__PURE__*/jsxRuntime.jsx(Button__default["default"], {
9632
9652
  label: t("neetoRules.buttons.cancel"),
9633
9653
  style: "text",
@@ -9716,6 +9736,7 @@ var buildActionDropdownMenuItems = function buildActionDropdownMenuItems(_ref) {
9716
9736
  key: "edit",
9717
9737
  className: "neeto-ui-btn",
9718
9738
  "data-test-id": "automation-rules-edit-link",
9739
+ "data-cy": "automation-rules-edit-link",
9719
9740
  label: i18next.t("neetoRules.button.edit"),
9720
9741
  to: utils.buildUrl(createRoutes(automationRulesPath).edit, {
9721
9742
  ruleId: rule.id
@@ -9723,6 +9744,7 @@ var buildActionDropdownMenuItems = function buildActionDropdownMenuItems(_ref) {
9723
9744
  }, {
9724
9745
  key: "clone",
9725
9746
  "data-test-id": "automation-rules-clone-link",
9747
+ "data-cy": "automation-rules-clone-link",
9726
9748
  label: i18next.t("neetoRules.button.clone"),
9727
9749
  onClick: function onClick() {
9728
9750
  return onClone(rule.id);
@@ -9733,6 +9755,7 @@ var buildActionDropdownMenuItems = function buildActionDropdownMenuItems(_ref) {
9733
9755
  }, {
9734
9756
  key: "delete",
9735
9757
  "data-test-id": "automation-rules-delete-link",
9758
+ "data-cy": "automation-rules-delete-link",
9736
9759
  label: i18next.t("neetoRules.button.delete"),
9737
9760
  onClick: function onClick() {
9738
9761
  return onDelete(rule);
@@ -9833,8 +9856,8 @@ var renderNoDataHelpText = function renderNoDataHelpText(helpDocUrl) {
9833
9856
  return /*#__PURE__*/jsxRuntime.jsx(reactI18next.Trans, {
9834
9857
  i18nKey: "neetoRules.noData.helpText",
9835
9858
  components: {
9836
- a: /*#__PURE__*/jsxRuntime.jsx(reactRouterDom.Link, {
9837
- className: "neeto-ui-text-primary-600 underline",
9859
+ a: /*#__PURE__*/jsxRuntime.jsx(Button__default["default"], {
9860
+ style: "link",
9838
9861
  target: "_blank",
9839
9862
  to: {
9840
9863
  pathname: helpDocUrl
@@ -9865,7 +9888,9 @@ var RulesTable = function RulesTable(_ref) {
9865
9888
  page = _ref.page,
9866
9889
  setPage = _ref.setPage,
9867
9890
  _ref$allowCloning = _ref.allowCloning,
9868
- allowCloning = _ref$allowCloning === void 0 ? true : _ref$allowCloning;
9891
+ allowCloning = _ref$allowCloning === void 0 ? true : _ref$allowCloning,
9892
+ _ref$hasUnfilteredRul = _ref.hasUnfilteredRules,
9893
+ hasUnfilteredRules = _ref$hasUnfilteredRul === void 0 ? true : _ref$hasUnfilteredRul;
9869
9894
  var _useQueryParams = reactUtils.useQueryParams(),
9870
9895
  _useQueryParams$searc = _useQueryParams.searchTerm,
9871
9896
  searchTerm = _useQueryParams$searc === void 0 ? "" : _useQueryParams$searc;
@@ -9936,22 +9961,8 @@ var RulesTable = function RulesTable(_ref) {
9936
9961
  if (isLoading && ramda.isEmpty(rules)) {
9937
9962
  return /*#__PURE__*/jsxRuntime.jsx(PageLoader__default["default"], {});
9938
9963
  }
9939
- if (ramda.isEmpty(rules)) {
9940
- return /*#__PURE__*/jsxRuntime.jsx("div", {
9941
- className: "flex h-full w-full items-center justify-center",
9942
- children: /*#__PURE__*/jsxRuntime.jsx(NoData__default["default"], _objectSpread$n({
9943
- title: t("neetoRules.noData.title")
9944
- }, ramda.isEmpty(searchTerm) && {
9945
- helpText: helpDocUrl ? renderNoDataHelpText(helpDocUrl) : null,
9946
- primaryButtonProps: {
9947
- label: t("neetoRules.button.addNew"),
9948
- to: createRoutes(automationRulesPath)["new"]
9949
- }
9950
- }))
9951
- });
9952
- }
9953
9964
  return /*#__PURE__*/jsxRuntime.jsxs(jsxRuntime.Fragment, {
9954
- children: [/*#__PURE__*/jsxRuntime.jsx(SubHeader__default["default"], {
9965
+ children: [hasUnfilteredRules && /*#__PURE__*/jsxRuntime.jsx(SubHeader__default["default"], {
9955
9966
  leftActionBlock: /*#__PURE__*/jsxRuntime.jsx(Typography__default["default"], {
9956
9967
  className: "mr-4 font-semibold",
9957
9968
  style: "h4",
@@ -9959,50 +9970,63 @@ var RulesTable = function RulesTable(_ref) {
9959
9970
  count: totalCount
9960
9971
  })
9961
9972
  })
9962
- }), /*#__PURE__*/jsxRuntime.jsx(TableWrapper__default["default"], {
9963
- hasPagination: totalCount > constants.DEFAULT_PAGE_SIZE,
9964
- children: /*#__PURE__*/jsxRuntime.jsx(Table__default["default"], {
9965
- columnData: columnData,
9966
- totalCount: totalCount,
9967
- fixedHeight: true,
9968
- allowClick: false,
9969
- currentPageNumber: page,
9970
- defaultPageSize: constants.DEFAULT_PAGE_SIZE,
9971
- handlePageChange: setPage,
9972
- loading: isUpdating || isCloning || isDeleting || isLoading,
9973
- rowData: rules.map(function (item) {
9974
- return _objectSpread$n({
9975
- key: item.id
9976
- }, item);
9973
+ }), neetoCist.isNotEmpty(rules) ? /*#__PURE__*/jsxRuntime.jsxs(jsxRuntime.Fragment, {
9974
+ children: [/*#__PURE__*/jsxRuntime.jsx(TableWrapper__default["default"], {
9975
+ hasPagination: totalCount > constants.DEFAULT_PAGE_SIZE,
9976
+ children: /*#__PURE__*/jsxRuntime.jsx(Table__default["default"], {
9977
+ columnData: columnData,
9978
+ totalCount: totalCount,
9979
+ fixedHeight: true,
9980
+ allowClick: false,
9981
+ currentPageNumber: page,
9982
+ defaultPageSize: constants.DEFAULT_PAGE_SIZE,
9983
+ handlePageChange: setPage,
9984
+ loading: isUpdating || isCloning || isDeleting || isLoading,
9985
+ rowData: rules.map(function (item) {
9986
+ return _objectSpread$n({
9987
+ key: item.id
9988
+ }, item);
9989
+ }),
9990
+ rowSelection: false,
9991
+ scroll: {
9992
+ x: 0
9993
+ },
9994
+ tableLayout: "fixed"
9995
+ })
9996
+ }), /*#__PURE__*/jsxRuntime.jsx(Alert__default["default"], {
9997
+ isOpen: !!selectedRule,
9998
+ isSubmitting: isDeleting,
9999
+ submitButtonLabel: t("neetoRules.button.delete"),
10000
+ title: t("neetoRules.deleteAlert.title"),
10001
+ message: /*#__PURE__*/jsxRuntime.jsx(reactI18next.Trans, {
10002
+ i18nKey: "neetoRules.deleteAlert.message",
10003
+ values: {
10004
+ name: selectedRule === null || selectedRule === void 0 ? void 0 : selectedRule.name
10005
+ }
9977
10006
  }),
9978
- rowSelection: false,
9979
- scroll: {
9980
- x: 0
10007
+ onClose: function onClose() {
10008
+ return setSelectedRule(null);
9981
10009
  },
9982
- tableLayout: "fixed"
9983
- })
9984
- }), /*#__PURE__*/jsxRuntime.jsx(Alert__default["default"], {
9985
- isOpen: !!selectedRule,
9986
- isSubmitting: isDeleting,
9987
- submitButtonLabel: t("neetoRules.button.delete"),
9988
- title: t("neetoRules.deleteAlert.title"),
9989
- message: /*#__PURE__*/jsxRuntime.jsx(reactI18next.Trans, {
9990
- i18nKey: "neetoRules.deleteAlert.message",
9991
- values: {
9992
- name: selectedRule === null || selectedRule === void 0 ? void 0 : selectedRule.name
10010
+ onSubmit: function onSubmit() {
10011
+ return deleteRule({
10012
+ id: selectedRule === null || selectedRule === void 0 ? void 0 : selectedRule.id,
10013
+ url: url
10014
+ }, {
10015
+ onSuccess: handleDeleteSuccess
10016
+ });
9993
10017
  }
9994
- }),
9995
- onClose: function onClose() {
9996
- return setSelectedRule(null);
9997
- },
9998
- onSubmit: function onSubmit() {
9999
- return deleteRule({
10000
- id: selectedRule === null || selectedRule === void 0 ? void 0 : selectedRule.id,
10001
- url: url
10002
- }, {
10003
- onSuccess: handleDeleteSuccess
10004
- });
10005
- }
10018
+ })]
10019
+ }) : /*#__PURE__*/jsxRuntime.jsx("div", {
10020
+ className: "flex h-full w-full items-center justify-center",
10021
+ children: /*#__PURE__*/jsxRuntime.jsx(NoData__default["default"], _objectSpread$n({
10022
+ title: t("neetoRules.noData.title")
10023
+ }, ramda.isEmpty(searchTerm) && {
10024
+ helpText: helpDocUrl ? renderNoDataHelpText(helpDocUrl) : null,
10025
+ primaryButtonProps: {
10026
+ label: t("neetoRules.button.addNew"),
10027
+ to: createRoutes(automationRulesPath)["new"]
10028
+ }
10029
+ }))
10006
10030
  })]
10007
10031
  });
10008
10032
  };
@@ -10045,11 +10069,9 @@ var NeetoRules = function NeetoRules(_ref) {
10045
10069
  searchTerm: searchTerm
10046
10070
  }),
10047
10071
  _useFetchAutomationRu2 = _useFetchAutomationRu.data,
10048
- _useFetchAutomationRu3 = _useFetchAutomationRu2 === void 0 ? {} : _useFetchAutomationRu2,
10049
- _useFetchAutomationRu4 = _useFetchAutomationRu3.rules,
10050
- rules = _useFetchAutomationRu4 === void 0 ? [] : _useFetchAutomationRu4,
10051
- _useFetchAutomationRu5 = _useFetchAutomationRu3.totalCount,
10052
- totalCount = _useFetchAutomationRu5 === void 0 ? 0 : _useFetchAutomationRu5,
10072
+ _useFetchAutomationRu3 = _useFetchAutomationRu2 === void 0 ? INITIAL_RULES_DATA : _useFetchAutomationRu2,
10073
+ rules = _useFetchAutomationRu3.rules,
10074
+ totalCount = _useFetchAutomationRu3.totalCount,
10053
10075
  isLoading = _useFetchAutomationRu.isLoading,
10054
10076
  isFetching = _useFetchAutomationRu.isFetching;
10055
10077
  var hasUnfilteredRules = neetoCist.isPresent(searchTerm) || totalCount > 0;
@@ -10064,6 +10086,7 @@ var NeetoRules = function NeetoRules(_ref) {
10064
10086
  setIsReorderPaneOpen: setIsReorderPaneOpen
10065
10087
  }), /*#__PURE__*/jsxRuntime.jsx(RulesTable, _objectSpread$m(_objectSpread$m({}, _objectSpread$m({
10066
10088
  automationRulesPath: automationRulesPath,
10089
+ hasUnfilteredRules: hasUnfilteredRules,
10067
10090
  helpDocUrl: helpDocUrl,
10068
10091
  page: page,
10069
10092
  rules: rules,
@@ -10077,15 +10100,9 @@ var NeetoRules = function NeetoRules(_ref) {
10077
10100
  onDeleteSuccess: deleteRule === null || deleteRule === void 0 || (_deleteRule$onSuccess = deleteRule.onSuccess) === null || _deleteRule$onSuccess === void 0 ? void 0 : _deleteRule$onSuccess.callback,
10078
10101
  onUpdateSuccess: updateRule === null || updateRule === void 0 || (_updateRule$onSuccess = updateRule.onSuccess) === null || _updateRule$onSuccess === void 0 ? void 0 : _updateRule$onSuccess.callback
10079
10102
  })), allowReordering && !isLoading && /*#__PURE__*/jsxRuntime.jsx(RulesReorder, {
10080
- rules: rules,
10103
+ totalCount: totalCount,
10081
10104
  url: url,
10082
10105
  isOpen: isReorderPaneOpen,
10083
- paginationProps: {
10084
- pageNo: page,
10085
- count: totalCount,
10086
- pageSize: constants.DEFAULT_PAGE_SIZE,
10087
- navigate: setPage
10088
- },
10089
10106
  onClose: function onClose() {
10090
10107
  return setIsReorderPaneOpen(false);
10091
10108
  },
@@ -10200,25 +10217,24 @@ var LongTextField = function LongTextField(_ref) {
10200
10217
  var rows = (selectedField === null || selectedField === void 0 ? void 0 : selectedField.rows) || DEFAULT_LONG_TEXT_ROWS;
10201
10218
  return /*#__PURE__*/jsxRuntime.jsxs(jsxRuntime.Fragment, {
10202
10219
  children: [separator && /*#__PURE__*/jsxRuntime.jsx(Typography__default["default"], {
10203
- className: "neeto-ui-text-gray-700 mt-1",
10220
+ className: "neeto-ui-text-gray-700",
10204
10221
  "data-cy": "long-text-action-separator-text",
10205
10222
  style: "h5",
10206
10223
  weight: "normal",
10207
10224
  children: separator
10208
- }), /*#__PURE__*/jsxRuntime.jsx(Typography__default["default"], {
10225
+ }), /*#__PURE__*/jsxRuntime.jsx(Button__default["default"], {
10209
10226
  "data-cy": "long-text-action-button",
10210
- style: "h5",
10211
- weight: "semibold",
10212
- className: classNames__default["default"]("hover:neeto-ui-text-primary-800 neeto-ui-text-gray-800 mt-1 cursor-pointer underline", {
10213
- "neeto-ui-text-primary-800": showPane,
10227
+ label: label.toLowerCase(),
10228
+ style: "link",
10229
+ className: classNames__default["default"]("neeto-ui-text-gray-800 neeto-ui-font-semibold underline", {
10230
+ "neeto-ui-text-accent-800": showPane,
10214
10231
  "neeto-ui-text-error-500": isValid
10215
10232
  }),
10216
10233
  onClick: function onClick() {
10217
10234
  return setShowPane(function (prevState) {
10218
10235
  return !prevState;
10219
10236
  });
10220
- },
10221
- children: label.toLowerCase()
10237
+ }
10222
10238
  }), /*#__PURE__*/jsxRuntime.jsxs(Pane__default["default"], {
10223
10239
  initialFocusRef: initialFocusRef,
10224
10240
  isOpen: showPane,
@@ -10422,25 +10438,24 @@ var ApiFields = function ApiFields(_ref) {
10422
10438
  };
10423
10439
  return /*#__PURE__*/jsxRuntime.jsxs(jsxRuntime.Fragment, {
10424
10440
  children: [/*#__PURE__*/jsxRuntime.jsx(Typography__default["default"], {
10425
- className: "neeto-ui-text-gray-700 mt-1",
10441
+ className: "neeto-ui-text-gray-700",
10426
10442
  "data-cy": "api-action-separator-text",
10427
10443
  style: "h5",
10428
10444
  weight: "normal",
10429
10445
  children: separator
10430
- }), /*#__PURE__*/jsxRuntime.jsx(Typography__default["default"], {
10446
+ }), /*#__PURE__*/jsxRuntime.jsx(Button__default["default"], {
10431
10447
  "data-cy": "api-action-button",
10432
- style: "h5",
10433
- weight: "semibold",
10434
- className: classNames__default["default"]("hover:neeto-ui-text-primary-800 neeto-ui-text-gray-800 mt-1 cursor-pointer underline", {
10435
- "neeto-ui-text-primary-800": showPane,
10448
+ label: defaultLabel.toLowerCase(),
10449
+ style: "link",
10450
+ className: classNames__default["default"]("neeto-ui-text-gray-800 neeto-ui-font-semibold underline", {
10451
+ "neeto-ui-text-accent-800": showPane,
10436
10452
  "neeto-ui-text-error-500": isValid
10437
10453
  }),
10438
10454
  onClick: function onClick() {
10439
10455
  return setShowPane(function (prevState) {
10440
10456
  return !prevState;
10441
10457
  });
10442
- },
10443
- children: defaultLabel.toLowerCase()
10458
+ }
10444
10459
  }), /*#__PURE__*/jsxRuntime.jsxs(Pane__default["default"], {
10445
10460
  initialFocusRef: initialFocusRef,
10446
10461
  isOpen: showPane,
@@ -10511,23 +10526,22 @@ var CustomAction = function CustomAction(_ref) {
10511
10526
  var defaultLabel = selectedField === null || selectedField === void 0 ? void 0 : selectedField.placeholder;
10512
10527
  return /*#__PURE__*/jsxRuntime.jsxs(jsxRuntime.Fragment, {
10513
10528
  children: [/*#__PURE__*/jsxRuntime.jsx(Typography__default["default"], {
10514
- className: "neeto-ui-text-gray-700 mt-1",
10529
+ className: "neeto-ui-text-gray-700",
10515
10530
  style: "h5",
10516
10531
  weight: "normal",
10517
10532
  children: separator
10518
- }), /*#__PURE__*/jsxRuntime.jsx(Typography__default["default"], {
10519
- style: "h5",
10520
- weight: "semibold",
10521
- className: classNames__default["default"]("hover:neeto-ui-text-primary-800 neeto-ui-text-gray-800 mt-1 cursor-pointer underline", {
10522
- "neeto-ui-text-primary-800": showPane,
10533
+ }), /*#__PURE__*/jsxRuntime.jsx(Button__default["default"], {
10534
+ label: defaultLabel.toLowerCase(),
10535
+ style: "link",
10536
+ className: classNames__default["default"]("neeto-ui-text-gray-800 neeto-ui-font-semibold underline", {
10537
+ "neeto-ui-text-accent-800": showPane,
10523
10538
  "neeto-ui-text-error-500": isValid
10524
10539
  }),
10525
10540
  onClick: function onClick() {
10526
10541
  return setShowPane(function (prevState) {
10527
10542
  return !prevState;
10528
10543
  });
10529
- },
10530
- children: defaultLabel.toLowerCase()
10544
+ }
10531
10545
  }), /*#__PURE__*/jsxRuntime.jsxs(Pane__default["default"], {
10532
10546
  initialFocusRef: initialFocusRef,
10533
10547
  isOpen: showPane,
@@ -10579,7 +10593,7 @@ var DateField$1 = function DateField(_ref) {
10579
10593
  var isValid = errors.actions && ramda.isNotNil((_errors$actions = errors.actions) === null || _errors$actions === void 0 || (_errors$actions = _errors$actions.value) === null || _errors$actions === void 0 ? void 0 : _errors$actions[index]) && ramda.isNotNil((_touched$actions = touched.actions) === null || _touched$actions === void 0 || (_touched$actions = _touched$actions.value) === null || _touched$actions === void 0 ? void 0 : _touched$actions[index]);
10580
10594
  return /*#__PURE__*/jsxRuntime.jsxs(jsxRuntime.Fragment, {
10581
10595
  children: [!selectedField.hideSeparator && /*#__PURE__*/jsxRuntime.jsx(Typography__default["default"], {
10582
- className: "neeto-ui-text-gray-700 mt-1",
10596
+ className: "neeto-ui-text-gray-700",
10583
10597
  "data-cy": "action-dropdown-seperator-text",
10584
10598
  style: "h5",
10585
10599
  weight: "normal",
@@ -10604,10 +10618,10 @@ var DateField$1 = function DateField(_ref) {
10604
10618
  });
10605
10619
  }
10606
10620
  })]
10607
- }) : /*#__PURE__*/jsxRuntime.jsx(Typography__default["default"], {
10608
- style: "h5",
10609
- weight: "semibold",
10610
- className: classNames__default["default"]("neeto-ui-text-gray-800 hover:neeto-ui-text-primary-800 mt-1 cursor-pointer underline", {
10621
+ }) : /*#__PURE__*/jsxRuntime.jsx(Button__default["default"], {
10622
+ label: label,
10623
+ style: "link",
10624
+ className: classNames__default["default"]("neeto-ui-text-gray-800 neeto-ui-font-semibold underline", {
10611
10625
  "neeto-ui-text-error-500": isValid
10612
10626
  }),
10613
10627
  onClick: function onClick() {
@@ -10615,8 +10629,7 @@ var DateField$1 = function DateField(_ref) {
10615
10629
  setShowInput(function (prevState) {
10616
10630
  return !prevState;
10617
10631
  });
10618
- },
10619
- children: label
10632
+ }
10620
10633
  })]
10621
10634
  });
10622
10635
  };
@@ -10808,7 +10821,7 @@ var DropdownField$1 = function DropdownField(_ref) {
10808
10821
  }, [defaultValue, dropdownOptions]);
10809
10822
  return /*#__PURE__*/jsxRuntime.jsxs(jsxRuntime.Fragment, {
10810
10823
  children: [!selectedField.hideSeparator && /*#__PURE__*/jsxRuntime.jsx(Typography__default["default"], {
10811
- className: "neeto-ui-text-gray-700 mt-1",
10824
+ className: "neeto-ui-text-gray-700",
10812
10825
  "data-cy": "action-dropdown-seperator-text",
10813
10826
  style: "h5",
10814
10827
  weight: "normal",
@@ -10816,12 +10829,12 @@ var DropdownField$1 = function DropdownField(_ref) {
10816
10829
  }), /*#__PURE__*/jsxRuntime.jsx(Dropdown__default["default"], {
10817
10830
  buttonStyle: "secondary",
10818
10831
  className: "neeto-ui-bg-gray-100",
10819
- customTarget: /*#__PURE__*/jsxRuntime.jsx(Typography__default["default"], {
10832
+ customTarget: /*#__PURE__*/jsxRuntime.jsx(Button__default["default"], {
10820
10833
  "data-cy": "action-dropdown-button",
10821
- style: "h5",
10822
- weight: "semibold",
10823
- className: classNames__default["default"]("hover:neeto-ui-text-primary-800 neeto-ui-text-gray-800 mt-1 cursor-pointer underline", {
10824
- "neeto-ui-text-primary-800": isActive,
10834
+ label: defaultSelectedOption === null || defaultSelectedOption === void 0 || (_defaultSelectedOptio = defaultSelectedOption.label) === null || _defaultSelectedOptio === void 0 ? void 0 : _defaultSelectedOptio.toLowerCase(),
10835
+ style: "link",
10836
+ className: classNames__default["default"]("neeto-ui-text-gray-800 neeto-ui-font-semibold underline", {
10837
+ "neeto-ui-text-accent-800": isActive,
10825
10838
  "neeto-ui-text-error-500": isValueSelected
10826
10839
  }),
10827
10840
  onClick: function onClick() {
@@ -10829,8 +10842,7 @@ var DropdownField$1 = function DropdownField(_ref) {
10829
10842
  setIsActive(function (prevState) {
10830
10843
  return !prevState;
10831
10844
  });
10832
- },
10833
- children: defaultSelectedOption === null || defaultSelectedOption === void 0 || (_defaultSelectedOptio = defaultSelectedOption.label) === null || _defaultSelectedOptio === void 0 ? void 0 : _defaultSelectedOptio.toLowerCase()
10845
+ }
10834
10846
  }),
10835
10847
  onClose: handleClose,
10836
10848
  children: /*#__PURE__*/jsxRuntime.jsxs(Menu$9, {
@@ -10995,25 +11007,24 @@ var EmailFields = function EmailFields(_ref) {
10995
11007
  };
10996
11008
  return /*#__PURE__*/jsxRuntime.jsxs(jsxRuntime.Fragment, {
10997
11009
  children: [/*#__PURE__*/jsxRuntime.jsx(Typography__default["default"], {
10998
- className: "neeto-ui-text-gray-700 mt-1",
11010
+ className: "neeto-ui-text-gray-700",
10999
11011
  "data-cy": "action-email-seperator-text",
11000
11012
  style: "h5",
11001
11013
  weight: "normal",
11002
11014
  children: separator
11003
- }), /*#__PURE__*/jsxRuntime.jsx(Typography__default["default"], {
11015
+ }), /*#__PURE__*/jsxRuntime.jsx(Button__default["default"], {
11004
11016
  "data-cy": "email-action-button",
11005
- style: "h5",
11006
- weight: "semibold",
11007
- className: classNames__default["default"]("hover:neeto-ui-text-primary-800 neeto-ui-text-gray-800 mt-1 cursor-pointer underline", {
11008
- "neeto-ui-text-primary-800": showPane,
11017
+ label: defaultLabel.toLowerCase(),
11018
+ style: "link",
11019
+ className: classNames__default["default"]("neeto-ui-text-gray-800 neeto-ui-font-semibold underline", {
11020
+ "neeto-ui-text-accent-800": showPane,
11009
11021
  "neeto-ui-text-error-500": isValid
11010
11022
  }),
11011
11023
  onClick: function onClick() {
11012
11024
  return setShowPane(function (prevState) {
11013
11025
  return !prevState;
11014
11026
  });
11015
- },
11016
- children: defaultLabel.toLowerCase()
11027
+ }
11017
11028
  }), /*#__PURE__*/jsxRuntime.jsxs(Pane__default["default"], {
11018
11029
  initialFocusRef: initialFocusRef,
11019
11030
  isOpen: showPane,
@@ -11137,18 +11148,17 @@ var Input = function Input(_ref) {
11137
11148
  });
11138
11149
  }
11139
11150
  })
11140
- }) : /*#__PURE__*/jsxRuntime.jsx(Typography__default["default"], {
11141
- style: "h5",
11142
- weight: "semibold",
11143
- className: classNames__default["default"]("neeto-ui-text-gray-800 hover:neeto-ui-text-primary-800 mt-1 cursor-pointer underline", {
11144
- "neeto-ui-text-error-500": isValid
11151
+ }) : /*#__PURE__*/jsxRuntime.jsx(Button__default["default"], {
11152
+ label: label,
11153
+ style: "link",
11154
+ className: classNames__default["default"]("neeto-ui-text-gray-800 neeto-ui-font-semibold underline", {
11155
+ "neeto-ui-text-accent-500": isValid
11145
11156
  }),
11146
11157
  onClick: function onClick() {
11147
11158
  return setShowInput(function (prevState) {
11148
11159
  return !prevState;
11149
11160
  });
11150
- },
11151
- children: label
11161
+ }
11152
11162
  })]
11153
11163
  });
11154
11164
  };
@@ -11185,7 +11195,7 @@ var SHORTCUTS = {
11185
11195
  var _excluded$a = ["value", "nullable", "className", "handleSubmit", "handleCancel"];
11186
11196
  function ownKeys$i(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; }
11187
11197
  function _objectSpread$i(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$i(Object(t), !0).forEach(function (r) { _defineProperty$1(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$i(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
11188
- var InlineInput = /*#__PURE__*/React__default["default"].forwardRef(function (props, ref) {
11198
+ var InlineInput = /*#__PURE__*/React.forwardRef(function (props, ref) {
11189
11199
  var _props$value = props.value,
11190
11200
  value = _props$value === void 0 ? "" : _props$value,
11191
11201
  _props$nullable = props.nullable,
@@ -11285,25 +11295,24 @@ var ListField = function ListField(_ref) {
11285
11295
  var separator = (selectedField === null || selectedField === void 0 || (_selectedField$separa = selectedField.separator) === null || _selectedField$separa === void 0 ? void 0 : _selectedField$separa.toLowerCase()) || t("neetoRules.common.to");
11286
11296
  return /*#__PURE__*/jsxRuntime.jsxs(jsxRuntime.Fragment, {
11287
11297
  children: [/*#__PURE__*/jsxRuntime.jsx(Typography__default["default"], {
11288
- className: "neeto-ui-text-gray-700 mt-1",
11298
+ className: "neeto-ui-text-gray-700",
11289
11299
  "data-cy": "list-action-separator-text",
11290
11300
  style: "h5",
11291
11301
  weight: "normal",
11292
11302
  children: separator
11293
- }), /*#__PURE__*/jsxRuntime.jsx(Typography__default["default"], {
11303
+ }), /*#__PURE__*/jsxRuntime.jsx(Button__default["default"], {
11294
11304
  "data-cy": "list-action-button",
11295
- style: "h5",
11296
- weight: "semibold",
11297
- className: classNames__default["default"]("hover:neeto-ui-text-primary-800 neeto-ui-text-gray-800 mt-1 cursor-pointer underline", {
11298
- "neeto-ui-text-primary-800": showPane,
11305
+ label: t("neetoRules.form.list"),
11306
+ style: "link",
11307
+ className: classNames__default["default"]("neeto-ui-text-gray-800 neeto-ui-font-semibold underline", {
11308
+ "neeto-ui-text-accent-800": showPane,
11299
11309
  "neeto-ui-text-error-500": isValid
11300
11310
  }),
11301
11311
  onClick: function onClick() {
11302
11312
  return setShowPane(function (prevState) {
11303
11313
  return !prevState;
11304
11314
  });
11305
- },
11306
- children: t("neetoRules.form.list")
11315
+ }
11307
11316
  }), /*#__PURE__*/jsxRuntime.jsxs(Pane__default["default"], {
11308
11317
  initialFocusRef: initialFocusRef,
11309
11318
  isOpen: showPane,
@@ -11350,7 +11359,7 @@ var ListField = function ListField(_ref) {
11350
11359
  className: "w-full",
11351
11360
  children: function children(message) {
11352
11361
  return /*#__PURE__*/jsxRuntime.jsx(Typography__default["default"], {
11353
- className: "neeto-ui-text-error-500 neeto-ui-text-gray-700 mt-1",
11362
+ className: "neeto-ui-text-error-500 neeto-ui-text-gray-700",
11354
11363
  "data-cy": "list-action-error-message",
11355
11364
  style: "h5",
11356
11365
  children: message
@@ -11433,7 +11442,7 @@ var MultiSelect$1 = function MultiSelect(_ref) {
11433
11442
  };
11434
11443
  return /*#__PURE__*/jsxRuntime.jsxs(jsxRuntime.Fragment, {
11435
11444
  children: [!selectedField.hideSeparator && /*#__PURE__*/jsxRuntime.jsx(Typography__default["default"], {
11436
- className: "neeto-ui-text-gray-700 mt-1",
11445
+ className: "neeto-ui-text-gray-700",
11437
11446
  "data-cy": "multi-select-action-separator-text",
11438
11447
  style: "h5",
11439
11448
  weight: "normal",
@@ -11444,12 +11453,12 @@ var MultiSelect$1 = function MultiSelect(_ref) {
11444
11453
  closeOnSelect: false,
11445
11454
  position: "top-start",
11446
11455
  customTarget: neetoCist.isNotEmpty(selectedOptions) ? /*#__PURE__*/jsxRuntime.jsx("span", {
11447
- className: "flex flex-wrap gap-y-1",
11456
+ className: "flex flex-wrap items-center gap-x-2 gap-y-1",
11448
11457
  children: selectedOptions.map(function (option, idx) {
11449
11458
  return /*#__PURE__*/jsxRuntime.jsxs("span", {
11450
- className: "flex flex-wrap",
11459
+ className: "flex flex-wrap items-center gap-x-2 gap-y-1",
11451
11460
  children: [!!idx && /*#__PURE__*/jsxRuntime.jsx(Typography__default["default"], {
11452
- className: "neeto-ui-text-gray-700 mr-1 mt-1",
11461
+ className: "neeto-ui-text-gray-700",
11453
11462
  style: "h5",
11454
11463
  weight: "normal",
11455
11464
  onClick: function onClick(e) {
@@ -11458,33 +11467,31 @@ var MultiSelect$1 = function MultiSelect(_ref) {
11458
11467
  children: t("neetoRules.common.and", {
11459
11468
  what: ""
11460
11469
  })
11461
- }), /*#__PURE__*/jsxRuntime.jsx(Typography__default["default"], {
11470
+ }), /*#__PURE__*/jsxRuntime.jsx(Button__default["default"], {
11462
11471
  "data-cy": "multi-select-action-button",
11463
- style: "h5",
11464
- weight: "semibold",
11465
- className: classNames__default["default"]("hover:neeto-ui-text-primary-800 neeto-ui-text-gray-800 mr-1 mt-1 cursor-pointer underline", {
11466
- "neeto-ui-text-primary-800": activeOption === (option === null || option === void 0 ? void 0 : option.value)
11472
+ label: option === null || option === void 0 ? void 0 : option.label.toLowerCase(),
11473
+ style: "link",
11474
+ className: classNames__default["default"]("neeto-ui-text-gray-800 neeto-ui-font-semibold underline", {
11475
+ "neeto-ui-text-accent-800": activeOption === (option === null || option === void 0 ? void 0 : option.value)
11467
11476
  }),
11468
11477
  onClick: function onClick() {
11469
11478
  setTouched(ramda.assocPath(["actions", "value", index], true, touched));
11470
11479
  setActiveOption(activeOption ? null : option === null || option === void 0 ? void 0 : option.value);
11471
- },
11472
- children: option === null || option === void 0 ? void 0 : option.label.toLowerCase()
11480
+ }
11473
11481
  })]
11474
11482
  }, idx);
11475
11483
  })
11476
- }) : /*#__PURE__*/jsxRuntime.jsx(Typography__default["default"], {
11477
- style: "h5",
11478
- weight: "semibold",
11479
- className: classNames__default["default"]("hover:neeto-ui-text-primary-800 neeto-ui-text-gray-800 mt-1 cursor-pointer underline", {
11480
- "neeto-ui-text-primary-800": activeOption === defaultLabel,
11484
+ }) : /*#__PURE__*/jsxRuntime.jsx(Button__default["default"], {
11485
+ label: defaultLabel,
11486
+ style: "link",
11487
+ className: classNames__default["default"]("neeto-ui-text-gray-800 neeto-ui-font-semibold underline", {
11488
+ "neeto-ui-text-accent-800": activeOption === defaultLabel,
11481
11489
  "neeto-ui-text-error-500": isValid
11482
11490
  }),
11483
11491
  onClick: function onClick() {
11484
11492
  setTouched(ramda.assocPath(["actions", "value", index], true, touched));
11485
11493
  setActiveOption(activeOption ? null : defaultLabel);
11486
- },
11487
- children: defaultLabel
11494
+ }
11488
11495
  }),
11489
11496
  onClose: handleClose,
11490
11497
  children: /*#__PURE__*/jsxRuntime.jsxs(Menu$8, {
@@ -11550,25 +11557,24 @@ var NoteField = function NoteField(_ref) {
11550
11557
  var defaultLabel = (selectedField === null || selectedField === void 0 ? void 0 : selectedField.placeholder) || t("neetoRules.form.note");
11551
11558
  return /*#__PURE__*/jsxRuntime.jsxs(jsxRuntime.Fragment, {
11552
11559
  children: [/*#__PURE__*/jsxRuntime.jsx(Typography__default["default"], {
11553
- className: "neeto-ui-text-gray-700 mt-1",
11560
+ className: "neeto-ui-text-gray-700",
11554
11561
  "data-cy": "note-action-separator-text",
11555
11562
  style: "h5",
11556
11563
  weight: "normal",
11557
11564
  children: separator
11558
- }), /*#__PURE__*/jsxRuntime.jsx(Typography__default["default"], {
11565
+ }), /*#__PURE__*/jsxRuntime.jsx(Button__default["default"], {
11559
11566
  "data-cy": "note-action-button",
11560
- style: "h5",
11561
- weight: "semibold",
11562
- className: classNames__default["default"]("hover:neeto-ui-text-primary-800 neeto-ui-text-gray-800 mt-1 cursor-pointer underline", {
11563
- "neeto-ui-text-primary-800": showPane,
11567
+ label: defaultLabel.toLowerCase(),
11568
+ style: "link",
11569
+ className: classNames__default["default"]("neeto-ui-text-gray-800 neeto-ui-font-semibold underline", {
11570
+ "neeto-ui-text-accent-800": showPane,
11564
11571
  "neeto-ui-text-error-500": isValid
11565
11572
  }),
11566
11573
  onClick: function onClick() {
11567
11574
  return setShowPane(function (prevState) {
11568
11575
  return !prevState;
11569
11576
  });
11570
- },
11571
- children: defaultLabel.toLowerCase()
11577
+ }
11572
11578
  }), /*#__PURE__*/jsxRuntime.jsxs(Pane__default["default"], {
11573
11579
  initialFocusRef: initialFocusRef,
11574
11580
  isOpen: showPane,
@@ -11897,25 +11903,24 @@ var SmsFields = function SmsFields(_ref) {
11897
11903
  };
11898
11904
  return /*#__PURE__*/jsxRuntime.jsxs(jsxRuntime.Fragment, {
11899
11905
  children: [/*#__PURE__*/jsxRuntime.jsx(Typography__default["default"], {
11900
- className: "neeto-ui-text-gray-700 mt-1",
11906
+ className: "neeto-ui-text-gray-700",
11901
11907
  "data-cy": "sms-action-separator-text",
11902
11908
  style: "h5",
11903
11909
  weight: "normal",
11904
11910
  children: separator
11905
- }), /*#__PURE__*/jsxRuntime.jsx(Typography__default["default"], {
11911
+ }), /*#__PURE__*/jsxRuntime.jsx(Button__default["default"], {
11906
11912
  "data-cy": "sms-action-button",
11907
- style: "h5",
11908
- weight: "semibold",
11909
- className: classNames__default["default"]("hover:neeto-ui-text-primary-800 neeto-ui-text-gray-800 mt-1 cursor-pointer underline", {
11910
- "neeto-ui-text-primary-800": showPane,
11913
+ label: defaultLabel.toLowerCase(),
11914
+ style: "link",
11915
+ className: classNames__default["default"]("neeto-ui-text-gray-800 neeto-ui-font-semibold underline", {
11916
+ "neeto-ui-text-accent-800": showPane,
11911
11917
  "neeto-ui-text-error-500": isValid
11912
11918
  }),
11913
11919
  onClick: function onClick() {
11914
11920
  return setShowPane(function (prevState) {
11915
11921
  return !prevState;
11916
11922
  });
11917
- },
11918
- children: defaultLabel.toLowerCase()
11923
+ }
11919
11924
  }), /*#__PURE__*/jsxRuntime.jsxs(Pane__default["default"], {
11920
11925
  initialFocusRef: initialFocusRef,
11921
11926
  isOpen: showPane,
@@ -12560,77 +12565,78 @@ var ActionItem = function ActionItem(_ref) {
12560
12565
  findSelectedOption();
12561
12566
  }, [selectedField]);
12562
12567
  return /*#__PURE__*/jsxRuntime.jsxs("div", {
12563
- className: "mb-1 flex max-w-2xl flex-wrap gap-x-1 gap-y-2",
12564
- children: [selectDropDownHasError && renderErrorCallout(selectDropDownErrorMessage), !isMessageToSlackAction && isDisabled && renderDisabledReason(), /*#__PURE__*/jsxRuntime.jsx(Typography__default["default"], {
12565
- className: "neeto-ui-text-gray-700 mt-1",
12566
- style: "h5",
12567
- weight: "normal",
12568
- children: label
12569
- }), /*#__PURE__*/jsxRuntime.jsx(Dropdown__default["default"], {
12570
- buttonStyle: "secondary",
12571
- className: "neeto-ui-bg-gray-100",
12572
- position: "bottom-start",
12573
- customTarget: /*#__PURE__*/jsxRuntime.jsx(Typography__default["default"], {
12574
- "data-cy": "action-dropdown-button",
12568
+ className: "flex max-w-2xl flex-wrap gap-x-1 gap-y-3",
12569
+ children: [selectDropDownHasError && renderErrorCallout(selectDropDownErrorMessage), !isMessageToSlackAction && isDisabled && renderDisabledReason(), /*#__PURE__*/jsxRuntime.jsxs("div", {
12570
+ className: "flex flex-wrap items-center gap-x-2 gap-y-3",
12571
+ children: [/*#__PURE__*/jsxRuntime.jsx(Typography__default["default"], {
12572
+ className: "neeto-ui-text-gray-700",
12575
12573
  style: "h5",
12576
- weight: "semibold",
12577
- className: classNames__default["default"]("hover:neeto-ui-text-primary-800 neeto-ui-text-gray-800 mt-1 cursor-pointer underline", {
12578
- "neeto-ui-text-primary-800": isActive,
12579
- "neeto-ui-text-error-500": isActionSelected
12580
- }),
12581
- onClick: function onClick() {
12582
- return setIsActive(function (prevState) {
12583
- return !prevState;
12584
- });
12585
- },
12586
- children: selectedOption === null || selectedOption === void 0 || (_selectedOption$label = selectedOption.label) === null || _selectedOption$label === void 0 ? void 0 : _selectedOption$label.toLowerCase()
12587
- }),
12588
- onClose: handleClose,
12589
- children: /*#__PURE__*/jsxRuntime.jsxs(Menu$7, {
12590
- className: "max-h-60 max-w-2xl p-3",
12591
- children: [actionOptions.length > MAXIMUM_OPTION_LENGTH$1 && /*#__PURE__*/jsxRuntime.jsx(Input__default["default"], {
12592
- autoFocus: true,
12593
- className: "mb-1",
12594
- "data-cy": "search-text-field",
12595
- placeholder: t("neetoRules.common.search"),
12596
- prefix: /*#__PURE__*/jsxRuntime.jsx(Search__default["default"], {}),
12597
- value: searchTerm,
12598
- onChange: function onChange(e) {
12599
- return setSearchTerm(e.target.value);
12600
- },
12601
- onClick: function onClick(e) {
12602
- return e.stopPropagation();
12574
+ weight: "normal",
12575
+ children: label
12576
+ }), /*#__PURE__*/jsxRuntime.jsx(Dropdown__default["default"], {
12577
+ buttonStyle: "secondary",
12578
+ className: "neeto-ui-bg-gray-100",
12579
+ position: "bottom-start",
12580
+ customTarget: /*#__PURE__*/jsxRuntime.jsx(Button__default["default"], {
12581
+ "data-cy": "action-dropdown-button",
12582
+ label: selectedOption === null || selectedOption === void 0 || (_selectedOption$label = selectedOption.label) === null || _selectedOption$label === void 0 ? void 0 : _selectedOption$label.toLowerCase(),
12583
+ style: "link",
12584
+ className: classNames__default["default"]("neeto-ui-text-gray-800 neeto-ui-font-semibold underline", {
12585
+ "neeto-ui-text-accent-800": isActive,
12586
+ "neeto-ui-text-error-500": isActionSelected
12587
+ }),
12588
+ onClick: function onClick() {
12589
+ return setIsActive(function (prevState) {
12590
+ return !prevState;
12591
+ });
12603
12592
  }
12604
- }), /*#__PURE__*/jsxRuntime.jsx(OptionsWrapper, {
12605
- hasScroll: actionOptions.length > MAXIMUM_OPTION_LENGTH$1,
12606
- children: searchedOptions.map(function (option, idx) {
12607
- return /*#__PURE__*/jsxRuntime.jsx(MenuItem$7.Button, {
12608
- "data-cy": "".concat(utils.joinHyphenCase(option.label), "-menu-item"),
12609
- suffix: (selectedOption === null || selectedOption === void 0 ? void 0 : selectedOption.value) === option.value && /*#__PURE__*/jsxRuntime.jsx(Check__default["default"], {
12610
- className: "neeto-ui-text-primary-800"
12611
- }),
12612
- onClick: function onClick() {
12613
- return handleSelectOption(option);
12614
- },
12615
- children: option.label
12616
- }, idx);
12617
- })
12618
- }), ramda.isEmpty(actionOptions) && /*#__PURE__*/jsxRuntime.jsx(MenuItem$7.Button, {
12619
- "data-cy": "no-options-menu-item",
12620
- children: t("neetoRules.common.noOptions")
12621
- })]
12622
- })
12623
- }), /*#__PURE__*/jsxRuntime.jsx(ActionSubItem, {
12624
- action: action,
12625
- index: index,
12626
- selectedField: selectedField,
12627
- name: "".concat(name, ".metadata"),
12628
- options: getSelectedFieldOptions()
12629
- }), neetoCist.isPresent(action === null || action === void 0 ? void 0 : action.children) && /*#__PURE__*/jsxRuntime.jsx(ActionChildren, {
12630
- action: action,
12631
- index: index,
12632
- selectedField: selectedField,
12633
- parentFieldName: name
12593
+ }),
12594
+ onClose: handleClose,
12595
+ children: /*#__PURE__*/jsxRuntime.jsxs(Menu$7, {
12596
+ className: "max-h-60 max-w-2xl p-3",
12597
+ children: [actionOptions.length > MAXIMUM_OPTION_LENGTH$1 && /*#__PURE__*/jsxRuntime.jsx(Input__default["default"], {
12598
+ autoFocus: true,
12599
+ "data-cy": "search-text-field",
12600
+ placeholder: t("neetoRules.common.search"),
12601
+ prefix: /*#__PURE__*/jsxRuntime.jsx(Search__default["default"], {}),
12602
+ value: searchTerm,
12603
+ onChange: function onChange(e) {
12604
+ return setSearchTerm(e.target.value);
12605
+ },
12606
+ onClick: function onClick(e) {
12607
+ return e.stopPropagation();
12608
+ }
12609
+ }), /*#__PURE__*/jsxRuntime.jsx(OptionsWrapper, {
12610
+ hasScroll: actionOptions.length > MAXIMUM_OPTION_LENGTH$1,
12611
+ children: searchedOptions.map(function (option, idx) {
12612
+ return /*#__PURE__*/jsxRuntime.jsx(MenuItem$7.Button, {
12613
+ "data-cy": "".concat(utils.joinHyphenCase(option.label), "-menu-item"),
12614
+ suffix: (selectedOption === null || selectedOption === void 0 ? void 0 : selectedOption.value) === option.value && /*#__PURE__*/jsxRuntime.jsx(Check__default["default"], {
12615
+ className: "neeto-ui-text-primary-800"
12616
+ }),
12617
+ onClick: function onClick() {
12618
+ return handleSelectOption(option);
12619
+ },
12620
+ children: option.label
12621
+ }, idx);
12622
+ })
12623
+ }), ramda.isEmpty(actionOptions) && /*#__PURE__*/jsxRuntime.jsx(MenuItem$7.Button, {
12624
+ "data-cy": "no-options-menu-item",
12625
+ children: t("neetoRules.common.noOptions")
12626
+ })]
12627
+ })
12628
+ }), /*#__PURE__*/jsxRuntime.jsx(ActionSubItem, {
12629
+ action: action,
12630
+ index: index,
12631
+ selectedField: selectedField,
12632
+ name: "".concat(name, ".metadata"),
12633
+ options: getSelectedFieldOptions()
12634
+ }), neetoCist.isPresent(action === null || action === void 0 ? void 0 : action.children) && /*#__PURE__*/jsxRuntime.jsx(ActionChildren, {
12635
+ action: action,
12636
+ index: index,
12637
+ selectedField: selectedField,
12638
+ parentFieldName: name
12639
+ })]
12634
12640
  })]
12635
12641
  });
12636
12642
  };
@@ -12828,26 +12834,24 @@ var DropdownField = function DropdownField(_ref) {
12828
12834
  buttonStyle: "secondary",
12829
12835
  className: "neeto-ui-bg-gray-100",
12830
12836
  position: "bottom-start",
12831
- customTarget: /*#__PURE__*/jsxRuntime.jsx(Typography__default["default"], {
12837
+ customTarget: /*#__PURE__*/jsxRuntime.jsx(Button__default["default"], {
12832
12838
  "data-cy": "condition-".concat(fieldType, "-dropdown-button"),
12833
- style: "h5",
12834
- weight: "semibold",
12835
- className: classNames__default["default"]("hover:neeto-ui-text-primary-800 neeto-ui-text-gray-800 mt-1 cursor-pointer underline", {
12836
- "neeto-ui-text-primary-800": isSelected
12839
+ label: selectedOption === null || selectedOption === void 0 || (_selectedOption$label = selectedOption.label) === null || _selectedOption$label === void 0 ? void 0 : _selectedOption$label.toLowerCase(),
12840
+ style: "link",
12841
+ className: classNames__default["default"]("neeto-ui-text-gray-800 neeto-ui-font-semibold underline", {
12842
+ "neeto-ui-text-accent-800": isSelected
12837
12843
  }),
12838
12844
  onClick: function onClick() {
12839
12845
  return setIsSelected(function (prevState) {
12840
12846
  return !prevState;
12841
12847
  });
12842
- },
12843
- children: selectedOption === null || selectedOption === void 0 || (_selectedOption$label = selectedOption.label) === null || _selectedOption$label === void 0 ? void 0 : _selectedOption$label.toLowerCase()
12848
+ }
12844
12849
  }),
12845
12850
  onClose: handleClose,
12846
12851
  children: /*#__PURE__*/jsxRuntime.jsxs(Menu$6, {
12847
12852
  className: "max-h-60 max-w-2xl p-3",
12848
12853
  children: [options.length > MAXIMUM_OPTION_LENGTH$2 && /*#__PURE__*/jsxRuntime.jsx(Input__default["default"], {
12849
12854
  autoFocus: true,
12850
- className: "mb-1",
12851
12855
  "data-cy": "search-text-field",
12852
12856
  placeholder: t("neetoRules.common.search"),
12853
12857
  prefix: /*#__PURE__*/jsxRuntime.jsx(Search__default["default"], {}),
@@ -12950,12 +12954,12 @@ var Dropdown = function Dropdown(_ref) {
12950
12954
  return /*#__PURE__*/jsxRuntime.jsx(Dropdown__default["default"], {
12951
12955
  buttonStyle: "secondary",
12952
12956
  className: "neeto-ui-bg-gray-100",
12953
- customTarget: /*#__PURE__*/jsxRuntime.jsx(Typography__default["default"], {
12957
+ customTarget: /*#__PURE__*/jsxRuntime.jsx(Button__default["default"], {
12954
12958
  "data-cy": "condition-value-dropdown-button",
12955
- style: "h5",
12956
- weight: "semibold",
12957
- className: classNames__default["default"]("hover:neeto-ui-text-primary-800 neeto-ui-text-gray-800 mt-1 cursor-pointer underline", {
12958
- "neeto-ui-text-primary-800": isActive,
12959
+ label: defaultSelectedOption === null || defaultSelectedOption === void 0 || (_defaultSelectedOptio = defaultSelectedOption.label) === null || _defaultSelectedOptio === void 0 ? void 0 : _defaultSelectedOptio.toLowerCase(),
12960
+ style: "link",
12961
+ className: classNames__default["default"]("neeto-ui-text-gray-800 neeto-ui-font-semibold underline", {
12962
+ "neeto-ui-text-accent-800": isActive,
12959
12963
  "neeto-ui-text-error-500": isValueSelected
12960
12964
  }),
12961
12965
  onClick: function onClick() {
@@ -12963,15 +12967,13 @@ var Dropdown = function Dropdown(_ref) {
12963
12967
  setIsActive(function (prevState) {
12964
12968
  return !prevState;
12965
12969
  });
12966
- },
12967
- children: defaultSelectedOption === null || defaultSelectedOption === void 0 || (_defaultSelectedOptio = defaultSelectedOption.label) === null || _defaultSelectedOptio === void 0 ? void 0 : _defaultSelectedOptio.toLowerCase()
12970
+ }
12968
12971
  }),
12969
12972
  onClose: handleClose,
12970
12973
  children: /*#__PURE__*/jsxRuntime.jsxs(Menu$5, {
12971
12974
  className: "max-h-60 max-w-2xl p-3",
12972
12975
  children: [options.length > MAXIMUM_OPTION_LENGTH$2 && /*#__PURE__*/jsxRuntime.jsx(Input__default["default"], {
12973
12976
  autoFocus: true,
12974
- className: "mb-1",
12975
12977
  "data-cy": "search-text-field",
12976
12978
  placeholder: t("neetoRules.common.search"),
12977
12979
  prefix: /*#__PURE__*/jsxRuntime.jsx(Search__default["default"], {}),
@@ -13046,18 +13048,17 @@ var InputField$1 = function InputField(_ref) {
13046
13048
  });
13047
13049
  }
13048
13050
  })
13049
- }) : /*#__PURE__*/jsxRuntime.jsx(Typography__default["default"], {
13050
- style: "h5",
13051
- weight: "semibold",
13052
- className: classNames__default["default"]("neeto-ui-text-gray-800 hover:neeto-ui-text-primary-800 mt-1 cursor-pointer underline", {
13051
+ }) : /*#__PURE__*/jsxRuntime.jsx(Button__default["default"], {
13052
+ label: label,
13053
+ style: "link",
13054
+ className: classNames__default["default"]("neeto-ui-text-gray-800 neeto-ui-font-semibold underline", {
13053
13055
  "neeto-ui-text-error-500": isValid
13054
13056
  }),
13055
13057
  onClick: function onClick() {
13056
13058
  return setShowInput(function (prevState) {
13057
13059
  return !prevState;
13058
13060
  });
13059
- },
13060
- children: label
13061
+ }
13061
13062
  });
13062
13063
  };
13063
13064
 
@@ -13106,43 +13107,41 @@ var MultiSelect = function MultiSelect(_ref) {
13106
13107
  closeOnSelect: false,
13107
13108
  position: "top-start",
13108
13109
  customTarget: neetoCist.isNotEmpty(options) ? /*#__PURE__*/jsxRuntime.jsx("span", {
13109
- className: "flex flex-wrap gap-y-1",
13110
+ className: "flex flex-wrap items-center gap-x-2 gap-y-1",
13110
13111
  children: options.map(function (option, idx) {
13111
13112
  var _option$label;
13112
- return /*#__PURE__*/jsxRuntime.jsxs(React__default["default"].Fragment, {
13113
+ return /*#__PURE__*/jsxRuntime.jsxs(React.Fragment, {
13113
13114
  children: [!!idx && /*#__PURE__*/jsxRuntime.jsx(Typography__default["default"], {
13114
- className: "neeto-ui-text-gray-700 mr-1 mt-1",
13115
+ className: "neeto-ui-text-gray-700",
13115
13116
  style: "h5",
13116
13117
  weight: "normal",
13117
13118
  children: t("neetoRules.common.or")
13118
- }), /*#__PURE__*/jsxRuntime.jsx(Typography__default["default"], {
13119
+ }), /*#__PURE__*/jsxRuntime.jsx(Button__default["default"], {
13119
13120
  "data-cy": "condition-value-multi-select-field",
13120
- style: "h5",
13121
- weight: "semibold",
13122
- className: classNames__default["default"]("hover:neeto-ui-text-primary-800 neeto-ui-text-gray-800 mr-1 mt-1 cursor-pointer underline", {
13123
- "neeto-ui-text-primary-800": activeOption === option.value
13121
+ label: option === null || option === void 0 || (_option$label = option.label) === null || _option$label === void 0 ? void 0 : _option$label.toLowerCase(),
13122
+ style: "link",
13123
+ className: classNames__default["default"]("neeto-ui-text-gray-800 neeto-ui-font-semibold underline", {
13124
+ "neeto-ui-text-accent-800": activeOption === option.value
13124
13125
  }),
13125
13126
  onClick: function onClick() {
13126
13127
  setTouched(ramda.assocPath(["conditions", "value", index], true, touched));
13127
13128
  setActiveOption(activeOption ? null : option.value);
13128
- },
13129
- children: option === null || option === void 0 || (_option$label = option.label) === null || _option$label === void 0 ? void 0 : _option$label.toLowerCase()
13129
+ }
13130
13130
  })]
13131
13131
  }, idx);
13132
13132
  })
13133
- }) : /*#__PURE__*/jsxRuntime.jsx(Typography__default["default"], {
13133
+ }) : /*#__PURE__*/jsxRuntime.jsx(Button__default["default"], {
13134
13134
  "data-cy": "condition-value-multi-select-field",
13135
- style: "h5",
13136
- weight: "semibold",
13137
- className: classNames__default["default"]("hover:neeto-ui-text-primary-800 neeto-ui-text-gray-800 mt-1 cursor-pointer underline", {
13138
- "neeto-ui-text-primary-800": activeOption === defaultLabel,
13135
+ label: defaultLabel,
13136
+ style: "link",
13137
+ className: classNames__default["default"]("neeto-ui-text-gray-800 neeto-ui-font-semibold underline", {
13138
+ "neeto-ui-text-accent-800": activeOption === defaultLabel,
13139
13139
  "neeto-ui-text-error-500": isValid
13140
13140
  }),
13141
13141
  onClick: function onClick() {
13142
13142
  setTouched(ramda.assocPath(["conditions", "value", index], true, touched));
13143
13143
  setActiveOption(activeOption ? null : defaultLabel);
13144
- },
13145
- children: defaultLabel
13144
+ }
13146
13145
  }),
13147
13146
  onClose: handleClose,
13148
13147
  children: /*#__PURE__*/jsxRuntime.jsxs(Menu$4, {
@@ -13210,11 +13209,11 @@ var MultiSelectCreate = function MultiSelectCreate(_ref) {
13210
13209
  var defaultLabel = t("neetoRules.form.selectValues");
13211
13210
  var isValid = errors.conditions && ramda.isNotNil((_errors$conditions = errors.conditions) === null || _errors$conditions === void 0 || (_errors$conditions = _errors$conditions.value) === null || _errors$conditions === void 0 ? void 0 : _errors$conditions[index]) && ramda.isNotNil((_touched$conditions = touched.conditions) === null || _touched$conditions === void 0 || (_touched$conditions = _touched$conditions.value) === null || _touched$conditions === void 0 ? void 0 : _touched$conditions[index]);
13212
13211
  return /*#__PURE__*/jsxRuntime.jsxs(jsxRuntime.Fragment, {
13213
- children: [ramda.isEmpty(allOptions) && /*#__PURE__*/jsxRuntime.jsx(Typography__default["default"], {
13212
+ children: [ramda.isEmpty(allOptions) && /*#__PURE__*/jsxRuntime.jsx(Button__default["default"], {
13214
13213
  "data-cy": "condition-value-multi-select-create-button",
13215
- style: "h5",
13216
- weight: "semibold",
13217
- className: classNames__default["default"]("hover:neeto-ui-text-primary-800 neeto-ui-text-gray-800 mt-1 cursor-pointer underline", {
13214
+ label: defaultLabel,
13215
+ style: "link",
13216
+ className: classNames__default["default"]("neeto-ui-text-gray-800 neeto-ui-font-semibold underline", {
13218
13217
  "neeto-ui-text-error-500": isValid
13219
13218
  }),
13220
13219
  onClick: function onClick() {
@@ -13222,26 +13221,24 @@ var MultiSelectCreate = function MultiSelectCreate(_ref) {
13222
13221
  setShowPane(function (prevState) {
13223
13222
  return !prevState;
13224
13223
  });
13225
- },
13226
- children: defaultLabel
13224
+ }
13227
13225
  }), allOptions.map(function (option, idx) {
13228
- return /*#__PURE__*/jsxRuntime.jsxs(React__default["default"].Fragment, {
13226
+ return /*#__PURE__*/jsxRuntime.jsxs(React.Fragment, {
13229
13227
  children: [!!idx && /*#__PURE__*/jsxRuntime.jsx(Typography__default["default"], {
13230
- className: "neeto-ui-text-gray-700 mt-1",
13228
+ className: "neeto-ui-text-gray-700",
13231
13229
  style: "h5",
13232
13230
  weight: "normal",
13233
13231
  children: t("neetoRules.common.or")
13234
- }), /*#__PURE__*/jsxRuntime.jsx(Typography__default["default"], {
13235
- className: "hover:neeto-ui-text-primary-800 neeto-ui-text-gray-800 mt-1 cursor-pointer underline",
13232
+ }), /*#__PURE__*/jsxRuntime.jsx(Button__default["default"], {
13233
+ className: "neeto-ui-text-gray-800 neeto-ui-font-semibold underline",
13236
13234
  "data-cy": "condition-value-multi-select-create-button",
13237
- style: "h5",
13238
- weight: "semibold",
13235
+ label: option.label,
13236
+ style: "link",
13239
13237
  onClick: function onClick() {
13240
13238
  return setShowPane(function (prevState) {
13241
13239
  return !prevState;
13242
13240
  });
13243
- },
13244
- children: option.label
13241
+ }
13245
13242
  })]
13246
13243
  }, idx);
13247
13244
  }), /*#__PURE__*/jsxRuntime.jsxs(Pane__default["default"], {
@@ -13733,10 +13730,10 @@ var DateField = function DateField(_ref) {
13733
13730
  });
13734
13731
  }
13735
13732
  })]
13736
- }) : /*#__PURE__*/jsxRuntime.jsx(Typography__default["default"], {
13737
- style: "h5",
13738
- weight: "semibold",
13739
- className: classNames__default["default"]("neeto-ui-text-gray-800 hover:neeto-ui-text-primary-800 mt-1 cursor-pointer underline", {
13733
+ }) : /*#__PURE__*/jsxRuntime.jsx(Button__default["default"], {
13734
+ label: label,
13735
+ style: "link",
13736
+ className: classNames__default["default"]("neeto-ui-text-gray-800 neeto-ui-font-semibold underline", {
13740
13737
  "neeto-ui-text-error-500": isValid
13741
13738
  }),
13742
13739
  onClick: function onClick() {
@@ -13744,8 +13741,7 @@ var DateField = function DateField(_ref) {
13744
13741
  setShowInput(function (prevState) {
13745
13742
  return !prevState;
13746
13743
  });
13747
- },
13748
- children: label
13744
+ }
13749
13745
  })
13750
13746
  });
13751
13747
  };
@@ -13862,14 +13858,14 @@ var ConditionItem = function ConditionItem(_ref) {
13862
13858
  };
13863
13859
  return /*#__PURE__*/jsxRuntime.jsxs(jsxRuntime.Fragment, {
13864
13860
  children: [isWithEvents && !index && /*#__PURE__*/jsxRuntime.jsx(Typography__default["default"], {
13865
- className: "neeto-ui-text-gray-700 mt-1",
13861
+ className: "neeto-ui-text-gray-700",
13866
13862
  style: "h5",
13867
13863
  weight: "normal",
13868
13864
  children: t("neetoRules.common.and", {
13869
13865
  what: ""
13870
13866
  })
13871
13867
  }), /*#__PURE__*/jsxRuntime.jsx(Typography__default["default"], {
13872
- className: "neeto-ui-text-gray-700 mt-1",
13868
+ className: "neeto-ui-text-gray-700",
13873
13869
  style: "h5",
13874
13870
  weight: "normal",
13875
13871
  children: defaultLabel
@@ -13900,15 +13896,14 @@ var LogicOperator = function LogicOperator(_ref) {
13900
13896
  var logicOperation = _ref.logicOperation,
13901
13897
  handleGroupJoinType = _ref.handleGroupJoinType;
13902
13898
  var logicOperationLabel = OPERATOR_LABELS[logicOperation];
13903
- return /*#__PURE__*/jsxRuntime.jsx(Typography__default["default"], {
13904
- className: "neeto-ui-text-gray-800 hover:neeto-ui-text-primary-800 mt-1 cursor-pointer underline",
13899
+ return /*#__PURE__*/jsxRuntime.jsx(Button__default["default"], {
13900
+ className: "neeto-ui-text-gray-800 neeto-ui-font-semibold underline",
13905
13901
  "data-cy": "logic-operator-button",
13906
- style: "h5",
13907
- weight: "semibold",
13902
+ label: logicOperationLabel,
13903
+ style: "link",
13908
13904
  onClick: function onClick() {
13909
13905
  return handleGroupJoinType(logicOperation);
13910
- },
13911
- children: logicOperationLabel
13906
+ }
13912
13907
  });
13913
13908
  };
13914
13909
 
@@ -13972,7 +13967,7 @@ var Conditions = function Conditions(_ref) {
13972
13967
  return /*#__PURE__*/jsxRuntime.jsxs("div", {
13973
13968
  className: "flex w-full justify-between",
13974
13969
  children: [/*#__PURE__*/jsxRuntime.jsxs("div", {
13975
- className: "mb-1 flex flex-wrap gap-x-2 gap-y-2",
13970
+ className: "flex flex-wrap items-center gap-x-2 gap-y-2",
13976
13971
  children: [!!index && /*#__PURE__*/jsxRuntime.jsx(LogicOperator, {
13977
13972
  handleGroupJoinType: handleGroupJoinType,
13978
13973
  logicOperation: condition.joinType
@@ -14131,29 +14126,28 @@ var Performer$1 = function Performer(_ref) {
14131
14126
  setSelectedOption(option);
14132
14127
  };
14133
14128
  return /*#__PURE__*/jsxRuntime.jsxs("div", {
14134
- className: "my-auto flex",
14129
+ className: "my-auto flex items-center gap-x-2 gap-y-3",
14135
14130
  children: [/*#__PURE__*/jsxRuntime.jsx(Typography__default["default"], {
14136
- className: "neeto-ui-text-gray-700 mr-2",
14131
+ className: "neeto-ui-text-gray-700",
14137
14132
  style: "h5",
14138
14133
  weight: "normal",
14139
14134
  children: t("neetoRules.common.by")
14140
14135
  }), /*#__PURE__*/jsxRuntime.jsx(Dropdown__default["default"], {
14141
14136
  buttonStyle: "secondary",
14142
14137
  className: "neeto-ui-bg-gray-100",
14143
- customTarget: /*#__PURE__*/jsxRuntime.jsx(Typography__default["default"], {
14138
+ customTarget: /*#__PURE__*/jsxRuntime.jsx(Button__default["default"], {
14144
14139
  "data-cy": "event-performer-dropdown",
14145
- style: "h5",
14146
- weight: "semibold",
14147
- className: classNames__default["default"]("hover:neeto-ui-text-primary-800 neeto-ui-text-gray-800 cursor-pointer underline", {
14148
- "neeto-ui-text-primary-800": isSelected,
14140
+ label: selectedOption === null || selectedOption === void 0 || (_selectedOption$label = selectedOption.label) === null || _selectedOption$label === void 0 ? void 0 : _selectedOption$label.toLowerCase(),
14141
+ style: "link",
14142
+ className: classNames__default["default"](" neeto-ui-text-gray-800 neeto-ui-font-semibold underline", {
14143
+ "neeto-ui-text-accent-800": isSelected,
14149
14144
  "neeto-ui-text-error-500": isValueSelected
14150
14145
  }),
14151
14146
  onClick: function onClick() {
14152
14147
  return setIsSelected(function (prevState) {
14153
14148
  return !prevState;
14154
14149
  });
14155
- },
14156
- children: selectedOption === null || selectedOption === void 0 || (_selectedOption$label = selectedOption.label) === null || _selectedOption$label === void 0 ? void 0 : _selectedOption$label.toLowerCase()
14150
+ }
14157
14151
  }),
14158
14152
  onClose: handleClose,
14159
14153
  children: /*#__PURE__*/jsxRuntime.jsxs(Menu$3, {
@@ -14294,7 +14288,7 @@ var Events$1 = function Events(_ref) {
14294
14288
  setSearchTerm("");
14295
14289
  };
14296
14290
  return /*#__PURE__*/jsxRuntime.jsxs("div", {
14297
- className: "my-auto flex flex-wrap gap-x-2 gap-y-3",
14291
+ className: "my-auto flex flex-wrap items-center gap-x-2 gap-y-3",
14298
14292
  children: [/*#__PURE__*/jsxRuntime.jsx(Typography__default["default"], {
14299
14293
  className: "neeto-ui-text-gray-700 my-auto",
14300
14294
  style: "h5",
@@ -14306,42 +14300,40 @@ var Events$1 = function Events(_ref) {
14306
14300
  closeOnSelect: false,
14307
14301
  position: "top-start",
14308
14302
  customTarget: neetoCist.isNotEmpty(allEvents) ? /*#__PURE__*/jsxRuntime.jsx("span", {
14309
- className: "flex flex-wrap gap-y-1",
14303
+ className: "flex flex-wrap items-center gap-x-2 gap-y-1",
14310
14304
  children: allEvents.map(function (event, idx) {
14311
14305
  var _event$label;
14312
14306
  return /*#__PURE__*/jsxRuntime.jsxs("span", {
14313
- className: "flex flex-wrap gap-y-1",
14307
+ className: "flex flex-wrap items-center gap-x-2 gap-y-1",
14314
14308
  children: [!!idx && /*#__PURE__*/jsxRuntime.jsx(Typography__default["default"], {
14315
- className: "neeto-ui-text-gray-700 mr-1",
14309
+ className: "neeto-ui-text-gray-700",
14316
14310
  style: "h5",
14317
14311
  weight: "normal",
14318
14312
  children: t("neetoRules.common.or")
14319
- }), /*#__PURE__*/jsxRuntime.jsx(Typography__default["default"], {
14313
+ }), /*#__PURE__*/jsxRuntime.jsx(Button__default["default"], {
14320
14314
  "data-cy": "condition-value-multi-select-field",
14321
- style: "h5",
14322
- weight: "semibold",
14323
- className: classNames__default["default"]("hover:neeto-ui-text-primary-800 neeto-ui-text-gray-800 mr-1 cursor-pointer underline", {
14324
- "neeto-ui-text-primary-800": activeOption === event.value
14315
+ label: event === null || event === void 0 || (_event$label = event.label) === null || _event$label === void 0 ? void 0 : _event$label.toLowerCase(),
14316
+ style: "link",
14317
+ className: classNames__default["default"]("neeto-ui-text-gray-800 neeto-ui-font-semibold underline", {
14318
+ "neeto-ui-text-accent-800": activeOption === event.value
14325
14319
  }),
14326
14320
  onClick: function onClick() {
14327
14321
  return setActiveOption(activeOption ? null : event.value);
14328
- },
14329
- children: event === null || event === void 0 || (_event$label = event.label) === null || _event$label === void 0 ? void 0 : _event$label.toLowerCase()
14322
+ }
14330
14323
  })]
14331
14324
  }, idx);
14332
14325
  })
14333
- }) : /*#__PURE__*/jsxRuntime.jsx(Typography__default["default"], {
14326
+ }) : /*#__PURE__*/jsxRuntime.jsx(Button__default["default"], {
14334
14327
  "data-cy": "condition-value-multi-select-field",
14335
- style: "h5",
14336
- weight: "semibold",
14337
- className: classNames__default["default"]("hover:neeto-ui-text-primary-800 neeto-ui-text-gray-800 cursor-pointer underline", {
14338
- "neeto-ui-text-primary-800": activeOption === defaultLabel,
14328
+ label: defaultLabel,
14329
+ style: "link",
14330
+ className: classNames__default["default"]("neeto-ui-text-gray-800 neeto-ui-font-semibold underline", {
14331
+ "neeto-ui-text-accent-800": activeOption === defaultLabel,
14339
14332
  "neeto-ui-text-error-500": !isValid
14340
14333
  }),
14341
14334
  onClick: function onClick() {
14342
14335
  return setActiveOption(activeOption ? null : defaultLabel);
14343
- },
14344
- children: defaultLabel
14336
+ }
14345
14337
  }),
14346
14338
  onClose: handleClose,
14347
14339
  children: /*#__PURE__*/jsxRuntime.jsxs(Menu$2, {
@@ -14547,20 +14539,19 @@ var EventItem = function EventItem(_ref) {
14547
14539
  buttonStyle: "secondary",
14548
14540
  className: "neeto-ui-bg-gray-100",
14549
14541
  closeOnSelect: false,
14550
- customTarget: /*#__PURE__*/jsxRuntime.jsx(Typography__default["default"], {
14542
+ customTarget: /*#__PURE__*/jsxRuntime.jsx(Button__default["default"], {
14551
14543
  "data-cy": "event-dropdown-button",
14552
- style: "h5",
14553
- weight: "semibold",
14554
- className: classNames__default["default"]("hover:neeto-ui-text-primary-800 neeto-ui-text-gray-800 cursor-pointer underline", {
14555
- "neeto-ui-text-primary-800": isActive,
14544
+ label: selectedOption.toLowerCase(),
14545
+ style: "link",
14546
+ className: classNames__default["default"]("neeto-ui-text-gray-800 neeto-ui-font-semibold underline", {
14547
+ "neeto-ui-text-accent-800": isActive,
14556
14548
  "neeto-ui-text-error-500": isValueSelected
14557
14549
  }),
14558
14550
  onClick: function onClick() {
14559
14551
  return setIsActive(function (prevState) {
14560
14552
  return !prevState;
14561
14553
  });
14562
- },
14563
- children: selectedOption.toLowerCase()
14554
+ }
14564
14555
  }),
14565
14556
  onClose: handleClose,
14566
14557
  children: /*#__PURE__*/jsxRuntime.jsxs(Menu$1, {
@@ -14663,20 +14654,19 @@ var Performer = function Performer(_ref) {
14663
14654
  buttonStyle: "secondary",
14664
14655
  className: "neeto-ui-bg-gray-100",
14665
14656
  closeOnSelect: false,
14666
- customTarget: /*#__PURE__*/jsxRuntime.jsx(Typography__default["default"], {
14657
+ customTarget: /*#__PURE__*/jsxRuntime.jsx(Button__default["default"], {
14667
14658
  "data-cy": "event-performer-dropdown",
14668
- style: "h5",
14669
- weight: "semibold",
14670
- className: classNames__default["default"]("hover:neeto-ui-text-primary-800 neeto-ui-text-gray-800 cursor-pointer underline", {
14671
- "neeto-ui-text-primary-800": isSelected,
14659
+ label: selectedOption === null || selectedOption === void 0 || (_selectedOption$label = selectedOption.label) === null || _selectedOption$label === void 0 ? void 0 : _selectedOption$label.toLowerCase(),
14660
+ style: "link",
14661
+ className: classNames__default["default"]("neeto-ui-text-gray-800 neeto-ui-font-semibold underline", {
14662
+ "neeto-ui-text-accent-800": isSelected,
14672
14663
  "neeto-ui-text-error-500": isValueSelected
14673
14664
  }),
14674
14665
  onClick: function onClick() {
14675
14666
  return setIsSelected(function (prevState) {
14676
14667
  return !prevState;
14677
14668
  });
14678
- },
14679
- children: selectedOption === null || selectedOption === void 0 || (_selectedOption$label = selectedOption.label) === null || _selectedOption$label === void 0 ? void 0 : _selectedOption$label.toLowerCase()
14669
+ }
14680
14670
  }),
14681
14671
  onClose: handleClose,
14682
14672
  children: /*#__PURE__*/jsxRuntime.jsxs(Menu, {
@@ -15352,7 +15342,7 @@ var MultiSelectValues = function MultiSelectValues(_ref) {
15352
15342
  values = _ref.values;
15353
15343
  return /*#__PURE__*/jsxRuntime.jsx(jsxRuntime.Fragment, {
15354
15344
  children: values === null || values === void 0 ? void 0 : values.map(function (value, idx) {
15355
- return /*#__PURE__*/jsxRuntime.jsxs(React__default["default"].Fragment, {
15345
+ return /*#__PURE__*/jsxRuntime.jsxs(React.Fragment, {
15356
15346
  children: [!!idx && /*#__PURE__*/jsxRuntime.jsx(Typography__default["default"], {
15357
15347
  className: "neeto-ui-text-gray-700",
15358
15348
  style: "h5",