@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.js CHANGED
@@ -1,5 +1,5 @@
1
1
  import * as React from 'react';
2
- import React__default, { useState, useRef, useEffect, useContext, useLayoutEffect as useLayoutEffect$1, createElement, useMemo as useMemo$1, forwardRef, memo } from 'react';
2
+ import React__default, { memo, useState, useRef, useEffect, useContext, useLayoutEffect as useLayoutEffect$1, createElement, forwardRef, useMemo as useMemo$1, Fragment as Fragment$1 } from 'react';
3
3
  import { isNotEmpty, isPresent, removeBy, renameKeys, findBy, noop as noop$3, 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';
@@ -13,13 +13,12 @@ import { useTranslation, Trans } from 'react-i18next';
13
13
  import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
14
14
  import ReactDOM, { unstable_batchedUpdates, flushSync } from 'react-dom';
15
15
  import Reorder from '@bigbinary/neeto-icons/Reorder';
16
+ import PageLoader from '@bigbinary/neeto-molecules/PageLoader';
16
17
  import Pane from '@bigbinary/neetoui/Pane';
17
18
  import Typography from '@bigbinary/neetoui/Typography';
18
- import Pagination from '@bigbinary/neetoui/Pagination';
19
19
  import { equals, clone as clone$1, isNotNil, isEmpty, isNil, whereAny, useWith, path, split, assocPath, toLower, without, append, pipe, filter, uniq, join, pluck, map, assoc, mergeLeft, includes, test, partition } from 'ramda';
20
- import { withRouter, Link } from 'react-router-dom';
20
+ import { withRouter } from 'react-router-dom';
21
21
  import { shallow } from 'zustand/shallow';
22
- import PageLoader from '@bigbinary/neeto-molecules/PageLoader';
23
22
  import SubHeader from '@bigbinary/neeto-molecules/SubHeader';
24
23
  import TableWrapper from '@bigbinary/neeto-molecules/TableWrapper';
25
24
  import Alert from '@bigbinary/neetoui/Alert';
@@ -267,6 +266,11 @@ var useReorderAutomationRules = function useReorderAutomationRules(url) {
267
266
  });
268
267
  };
269
268
 
269
+ var INITIAL_RULES_DATA = {
270
+ rules: [],
271
+ totalCount: 0
272
+ };
273
+
270
274
  var createRoutes = function createRoutes(basePath) {
271
275
  return {
272
276
  index: basePath,
@@ -324,7 +328,7 @@ var Header = function Header(_ref) {
324
328
  })
325
329
  }, headerProps));
326
330
  };
327
- var Header$1 = /*#__PURE__*/React__default.memo(Header);
331
+ var Header$1 = /*#__PURE__*/memo(Header);
328
332
 
329
333
  function _typeof$1(o) {
330
334
  "@babel/helpers - typeof";
@@ -9393,13 +9397,21 @@ var ConnectedDroppable$1 = ConnectedDroppable;
9393
9397
 
9394
9398
  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; }
9395
9399
  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; }
9396
- var reorderList = function reorderList(list, startIndex, endIndex) {
9400
+ var reorderList = function reorderList(_ref) {
9401
+ var endIndex = _ref.endIndex,
9402
+ firstDisplayOrder = _ref.firstDisplayOrder,
9403
+ list = _ref.list,
9404
+ startIndex = _ref.startIndex;
9397
9405
  var result = Array.from(list);
9398
9406
  var _result$splice = result.splice(startIndex, 1),
9399
9407
  _result$splice2 = _slicedToArray(_result$splice, 1),
9400
9408
  removed = _result$splice2[0];
9401
9409
  result.splice(endIndex, 0, removed);
9402
- return result;
9410
+ return result.map(function (item, index) {
9411
+ return _objectSpread$r(_objectSpread$r({}, item), {}, {
9412
+ displayOrder: firstDisplayOrder + index
9413
+ });
9414
+ });
9403
9415
  };
9404
9416
  var getDragItemStyle = function getDragItemStyle(isDragging, draggableStyle) {
9405
9417
  return _objectSpread$r(_objectSpread$r({}, draggableStyle), isDragging && {
@@ -9438,35 +9450,38 @@ var DraggableItem$1 = withRouter(DraggableItem);
9438
9450
  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; }
9439
9451
  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; }
9440
9452
  var RulesReorder = function RulesReorder(_ref) {
9453
+ var _rules$0$displayOrder, _rules$;
9441
9454
  var isOpen = _ref.isOpen,
9442
- onClose = _ref.onClose,
9443
- rules = _ref.rules,
9444
- _ref$paginationProps = _ref.paginationProps,
9445
- paginationProps = _ref$paginationProps === void 0 ? {} : _ref$paginationProps,
9455
+ totalCount = _ref.totalCount,
9446
9456
  url = _ref.url,
9457
+ onClose = _ref.onClose,
9447
9458
  onReorderSuccess = _ref.onReorderSuccess;
9448
- var _useState = useState(rules),
9459
+ var _useState = useState([]),
9449
9460
  _useState2 = _slicedToArray(_useState, 2),
9450
- initialRules = _useState2[0],
9451
- setInitialRules = _useState2[1];
9461
+ reorderedRules = _useState2[0],
9462
+ setReorderedRules = _useState2[1];
9452
9463
  var _useTranslation = useTranslation(),
9453
9464
  t = _useTranslation.t;
9465
+ var _useFetchAutomationRu = useFetchAutomationRules({
9466
+ pageSize: totalCount,
9467
+ url: url
9468
+ }, {
9469
+ enabled: isOpen
9470
+ }),
9471
+ _useFetchAutomationRu2 = _useFetchAutomationRu.data,
9472
+ _useFetchAutomationRu3 = _useFetchAutomationRu2 === void 0 ? INITIAL_RULES_DATA : _useFetchAutomationRu2,
9473
+ rules = _useFetchAutomationRu3.rules,
9474
+ isLoading = _useFetchAutomationRu.isLoading;
9454
9475
  var _useReorderAutomation = useReorderAutomationRules(url),
9455
9476
  reOrder = _useReorderAutomation.mutate,
9456
9477
  isPending = _useReorderAutomation.isPending;
9457
- var handleReorderSave = function handleReorderSave(rules) {
9458
- var params = [];
9459
- rules.forEach(function (rule, index) {
9460
- params.push({
9461
- id: rule.id,
9462
- display_order: index
9463
- });
9464
- });
9465
- reOrder({
9478
+ 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;
9479
+ var handleReorderSave = function handleReorderSave() {
9480
+ return reOrder({
9466
9481
  url: url,
9467
9482
  payload: {
9468
9483
  reorder: {
9469
- rules: params
9484
+ rules: reorderedRules
9470
9485
  }
9471
9486
  }
9472
9487
  }, {
@@ -9476,22 +9491,30 @@ var RulesReorder = function RulesReorder(_ref) {
9476
9491
  }
9477
9492
  });
9478
9493
  };
9479
- var onDragEnd = function onDragEnd(result) {
9480
- if (!result.destination || result.source.index === result.destination.index) {
9481
- return;
9482
- }
9483
- var originalRules = clone$1(initialRules);
9484
- var items = reorderList(originalRules, result.source.index, result.destination.index);
9485
- items = items.map(function (item, index) {
9486
- return _objectSpread$p(_objectSpread$p({}, item), {}, {
9487
- display_order: index
9488
- });
9494
+ var onDragEnd = function onDragEnd(_ref2) {
9495
+ var destination = _ref2.destination,
9496
+ source = _ref2.source;
9497
+ if (!destination || source.index === destination.index) return;
9498
+ var items = reorderList({
9499
+ endIndex: destination.index,
9500
+ firstDisplayOrder: firstDisplayOrder,
9501
+ list: clone$1(reorderedRules),
9502
+ startIndex: source.index
9489
9503
  });
9490
- setInitialRules(items);
9504
+ setReorderedRules(items);
9491
9505
  };
9492
9506
  useEffect(function () {
9493
- setInitialRules(rules);
9507
+ setReorderedRules(rules);
9494
9508
  }, [rules]);
9509
+ if (isLoading) {
9510
+ return /*#__PURE__*/jsx(Pane, {
9511
+ isOpen: isOpen,
9512
+ onClose: onClose,
9513
+ children: /*#__PURE__*/jsx(Container, {
9514
+ children: /*#__PURE__*/jsx(PageLoader, {})
9515
+ })
9516
+ });
9517
+ }
9495
9518
  return /*#__PURE__*/jsxs(Pane, {
9496
9519
  isOpen: isOpen,
9497
9520
  onClose: onClose,
@@ -9506,9 +9529,9 @@ var RulesReorder = function RulesReorder(_ref) {
9506
9529
  className: "mb-3",
9507
9530
  style: "body2",
9508
9531
  children: t("neetoRules.description.reorder")
9509
- }), /*#__PURE__*/jsxs("div", {
9532
+ }), /*#__PURE__*/jsx("div", {
9510
9533
  className: "flex flex-col items-center",
9511
- children: [/*#__PURE__*/jsx(DragDropContext, {
9534
+ children: /*#__PURE__*/jsx(DragDropContext, {
9512
9535
  onDragEnd: onDragEnd,
9513
9536
  children: /*#__PURE__*/jsx(ConnectedDroppable$1, {
9514
9537
  droppableId: "droppable",
@@ -9524,15 +9547,15 @@ var RulesReorder = function RulesReorder(_ref) {
9524
9547
  }), /*#__PURE__*/jsxs("div", {
9525
9548
  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",
9526
9549
  children: [/*#__PURE__*/jsx(Reorder, {}), /*#__PURE__*/jsx("div", {
9527
- children: initialRules[rubric.source.index].name
9550
+ children: reorderedRules[rubric.source.index].name
9528
9551
  })]
9529
9552
  })]
9530
- }), "list_".concat(initialRules[rubric.source.index].id));
9553
+ }), "list_".concat(reorderedRules[rubric.source.index].id));
9531
9554
  },
9532
9555
  children: function children(provided) {
9533
9556
  return /*#__PURE__*/jsxs("div", _objectSpread$p(_objectSpread$p({}, provided.droppableProps), {}, {
9534
9557
  ref: provided.innerRef,
9535
- children: [initialRules.map(function (rule, index) {
9558
+ children: [reorderedRules.map(function (rule, index) {
9536
9559
  return /*#__PURE__*/createElement(DraggableItem$1, {
9537
9560
  rule: rule,
9538
9561
  key: rule.id,
@@ -9542,18 +9565,16 @@ var RulesReorder = function RulesReorder(_ref) {
9542
9565
  }));
9543
9566
  }
9544
9567
  })
9545
- }), isNotEmpty(paginationProps) && /*#__PURE__*/jsx(Pagination, _objectSpread$p({}, paginationProps))]
9568
+ })
9546
9569
  })]
9547
9570
  }), /*#__PURE__*/jsxs(Pane.Footer, {
9548
9571
  className: "flex items-center gap-x-2",
9549
9572
  children: [/*#__PURE__*/jsx(Button, {
9550
- disabled: isPending || equals(rules, initialRules),
9573
+ disabled: isPending || equals(rules, reorderedRules),
9551
9574
  label: t("neetoRules.common.saveChange"),
9552
9575
  loading: isPending,
9553
9576
  style: "primary",
9554
- onClick: function onClick() {
9555
- return handleReorderSave(initialRules);
9556
- }
9577
+ onClick: handleReorderSave
9557
9578
  }), /*#__PURE__*/jsx(Button, {
9558
9579
  label: t("neetoRules.buttons.cancel"),
9559
9580
  style: "text",
@@ -9642,6 +9663,7 @@ var buildActionDropdownMenuItems = function buildActionDropdownMenuItems(_ref) {
9642
9663
  key: "edit",
9643
9664
  className: "neeto-ui-btn",
9644
9665
  "data-test-id": "automation-rules-edit-link",
9666
+ "data-cy": "automation-rules-edit-link",
9645
9667
  label: t$5("neetoRules.button.edit"),
9646
9668
  to: buildUrl(createRoutes(automationRulesPath).edit, {
9647
9669
  ruleId: rule.id
@@ -9649,6 +9671,7 @@ var buildActionDropdownMenuItems = function buildActionDropdownMenuItems(_ref) {
9649
9671
  }, {
9650
9672
  key: "clone",
9651
9673
  "data-test-id": "automation-rules-clone-link",
9674
+ "data-cy": "automation-rules-clone-link",
9652
9675
  label: t$5("neetoRules.button.clone"),
9653
9676
  onClick: function onClick() {
9654
9677
  return onClone(rule.id);
@@ -9659,6 +9682,7 @@ var buildActionDropdownMenuItems = function buildActionDropdownMenuItems(_ref) {
9659
9682
  }, {
9660
9683
  key: "delete",
9661
9684
  "data-test-id": "automation-rules-delete-link",
9685
+ "data-cy": "automation-rules-delete-link",
9662
9686
  label: t$5("neetoRules.button.delete"),
9663
9687
  onClick: function onClick() {
9664
9688
  return onDelete(rule);
@@ -9759,8 +9783,8 @@ var renderNoDataHelpText = function renderNoDataHelpText(helpDocUrl) {
9759
9783
  return /*#__PURE__*/jsx(Trans, {
9760
9784
  i18nKey: "neetoRules.noData.helpText",
9761
9785
  components: {
9762
- a: /*#__PURE__*/jsx(Link, {
9763
- className: "neeto-ui-text-primary-600 underline",
9786
+ a: /*#__PURE__*/jsx(Button, {
9787
+ style: "link",
9764
9788
  target: "_blank",
9765
9789
  to: {
9766
9790
  pathname: helpDocUrl
@@ -9791,7 +9815,9 @@ var RulesTable = function RulesTable(_ref) {
9791
9815
  page = _ref.page,
9792
9816
  setPage = _ref.setPage,
9793
9817
  _ref$allowCloning = _ref.allowCloning,
9794
- allowCloning = _ref$allowCloning === void 0 ? true : _ref$allowCloning;
9818
+ allowCloning = _ref$allowCloning === void 0 ? true : _ref$allowCloning,
9819
+ _ref$hasUnfilteredRul = _ref.hasUnfilteredRules,
9820
+ hasUnfilteredRules = _ref$hasUnfilteredRul === void 0 ? true : _ref$hasUnfilteredRul;
9795
9821
  var _useQueryParams = useQueryParams(),
9796
9822
  _useQueryParams$searc = _useQueryParams.searchTerm,
9797
9823
  searchTerm = _useQueryParams$searc === void 0 ? "" : _useQueryParams$searc;
@@ -9862,22 +9888,8 @@ var RulesTable = function RulesTable(_ref) {
9862
9888
  if (isLoading && isEmpty(rules)) {
9863
9889
  return /*#__PURE__*/jsx(PageLoader, {});
9864
9890
  }
9865
- if (isEmpty(rules)) {
9866
- return /*#__PURE__*/jsx("div", {
9867
- className: "flex h-full w-full items-center justify-center",
9868
- children: /*#__PURE__*/jsx(NoData, _objectSpread$n({
9869
- title: t("neetoRules.noData.title")
9870
- }, isEmpty(searchTerm) && {
9871
- helpText: helpDocUrl ? renderNoDataHelpText(helpDocUrl) : null,
9872
- primaryButtonProps: {
9873
- label: t("neetoRules.button.addNew"),
9874
- to: createRoutes(automationRulesPath)["new"]
9875
- }
9876
- }))
9877
- });
9878
- }
9879
9891
  return /*#__PURE__*/jsxs(Fragment, {
9880
- children: [/*#__PURE__*/jsx(SubHeader, {
9892
+ children: [hasUnfilteredRules && /*#__PURE__*/jsx(SubHeader, {
9881
9893
  leftActionBlock: /*#__PURE__*/jsx(Typography, {
9882
9894
  className: "mr-4 font-semibold",
9883
9895
  style: "h4",
@@ -9885,50 +9897,63 @@ var RulesTable = function RulesTable(_ref) {
9885
9897
  count: totalCount
9886
9898
  })
9887
9899
  })
9888
- }), /*#__PURE__*/jsx(TableWrapper, {
9889
- hasPagination: totalCount > DEFAULT_PAGE_SIZE,
9890
- children: /*#__PURE__*/jsx(Table, {
9891
- columnData: columnData,
9892
- totalCount: totalCount,
9893
- fixedHeight: true,
9894
- allowClick: false,
9895
- currentPageNumber: page,
9896
- defaultPageSize: DEFAULT_PAGE_SIZE,
9897
- handlePageChange: setPage,
9898
- loading: isUpdating || isCloning || isDeleting || isLoading,
9899
- rowData: rules.map(function (item) {
9900
- return _objectSpread$n({
9901
- key: item.id
9902
- }, item);
9900
+ }), isNotEmpty(rules) ? /*#__PURE__*/jsxs(Fragment, {
9901
+ children: [/*#__PURE__*/jsx(TableWrapper, {
9902
+ hasPagination: totalCount > DEFAULT_PAGE_SIZE,
9903
+ children: /*#__PURE__*/jsx(Table, {
9904
+ columnData: columnData,
9905
+ totalCount: totalCount,
9906
+ fixedHeight: true,
9907
+ allowClick: false,
9908
+ currentPageNumber: page,
9909
+ defaultPageSize: DEFAULT_PAGE_SIZE,
9910
+ handlePageChange: setPage,
9911
+ loading: isUpdating || isCloning || isDeleting || isLoading,
9912
+ rowData: rules.map(function (item) {
9913
+ return _objectSpread$n({
9914
+ key: item.id
9915
+ }, item);
9916
+ }),
9917
+ rowSelection: false,
9918
+ scroll: {
9919
+ x: 0
9920
+ },
9921
+ tableLayout: "fixed"
9922
+ })
9923
+ }), /*#__PURE__*/jsx(Alert, {
9924
+ isOpen: !!selectedRule,
9925
+ isSubmitting: isDeleting,
9926
+ submitButtonLabel: t("neetoRules.button.delete"),
9927
+ title: t("neetoRules.deleteAlert.title"),
9928
+ message: /*#__PURE__*/jsx(Trans, {
9929
+ i18nKey: "neetoRules.deleteAlert.message",
9930
+ values: {
9931
+ name: selectedRule === null || selectedRule === void 0 ? void 0 : selectedRule.name
9932
+ }
9903
9933
  }),
9904
- rowSelection: false,
9905
- scroll: {
9906
- x: 0
9934
+ onClose: function onClose() {
9935
+ return setSelectedRule(null);
9907
9936
  },
9908
- tableLayout: "fixed"
9909
- })
9910
- }), /*#__PURE__*/jsx(Alert, {
9911
- isOpen: !!selectedRule,
9912
- isSubmitting: isDeleting,
9913
- submitButtonLabel: t("neetoRules.button.delete"),
9914
- title: t("neetoRules.deleteAlert.title"),
9915
- message: /*#__PURE__*/jsx(Trans, {
9916
- i18nKey: "neetoRules.deleteAlert.message",
9917
- values: {
9918
- name: selectedRule === null || selectedRule === void 0 ? void 0 : selectedRule.name
9937
+ onSubmit: function onSubmit() {
9938
+ return deleteRule({
9939
+ id: selectedRule === null || selectedRule === void 0 ? void 0 : selectedRule.id,
9940
+ url: url
9941
+ }, {
9942
+ onSuccess: handleDeleteSuccess
9943
+ });
9919
9944
  }
9920
- }),
9921
- onClose: function onClose() {
9922
- return setSelectedRule(null);
9923
- },
9924
- onSubmit: function onSubmit() {
9925
- return deleteRule({
9926
- id: selectedRule === null || selectedRule === void 0 ? void 0 : selectedRule.id,
9927
- url: url
9928
- }, {
9929
- onSuccess: handleDeleteSuccess
9930
- });
9931
- }
9945
+ })]
9946
+ }) : /*#__PURE__*/jsx("div", {
9947
+ className: "flex h-full w-full items-center justify-center",
9948
+ children: /*#__PURE__*/jsx(NoData, _objectSpread$n({
9949
+ title: t("neetoRules.noData.title")
9950
+ }, isEmpty(searchTerm) && {
9951
+ helpText: helpDocUrl ? renderNoDataHelpText(helpDocUrl) : null,
9952
+ primaryButtonProps: {
9953
+ label: t("neetoRules.button.addNew"),
9954
+ to: createRoutes(automationRulesPath)["new"]
9955
+ }
9956
+ }))
9932
9957
  })]
9933
9958
  });
9934
9959
  };
@@ -9971,11 +9996,9 @@ var NeetoRules = function NeetoRules(_ref) {
9971
9996
  searchTerm: searchTerm
9972
9997
  }),
9973
9998
  _useFetchAutomationRu2 = _useFetchAutomationRu.data,
9974
- _useFetchAutomationRu3 = _useFetchAutomationRu2 === void 0 ? {} : _useFetchAutomationRu2,
9975
- _useFetchAutomationRu4 = _useFetchAutomationRu3.rules,
9976
- rules = _useFetchAutomationRu4 === void 0 ? [] : _useFetchAutomationRu4,
9977
- _useFetchAutomationRu5 = _useFetchAutomationRu3.totalCount,
9978
- totalCount = _useFetchAutomationRu5 === void 0 ? 0 : _useFetchAutomationRu5,
9999
+ _useFetchAutomationRu3 = _useFetchAutomationRu2 === void 0 ? INITIAL_RULES_DATA : _useFetchAutomationRu2,
10000
+ rules = _useFetchAutomationRu3.rules,
10001
+ totalCount = _useFetchAutomationRu3.totalCount,
9979
10002
  isLoading = _useFetchAutomationRu.isLoading,
9980
10003
  isFetching = _useFetchAutomationRu.isFetching;
9981
10004
  var hasUnfilteredRules = isPresent(searchTerm) || totalCount > 0;
@@ -9990,6 +10013,7 @@ var NeetoRules = function NeetoRules(_ref) {
9990
10013
  setIsReorderPaneOpen: setIsReorderPaneOpen
9991
10014
  }), /*#__PURE__*/jsx(RulesTable, _objectSpread$m(_objectSpread$m({}, _objectSpread$m({
9992
10015
  automationRulesPath: automationRulesPath,
10016
+ hasUnfilteredRules: hasUnfilteredRules,
9993
10017
  helpDocUrl: helpDocUrl,
9994
10018
  page: page,
9995
10019
  rules: rules,
@@ -10003,15 +10027,9 @@ var NeetoRules = function NeetoRules(_ref) {
10003
10027
  onDeleteSuccess: deleteRule === null || deleteRule === void 0 || (_deleteRule$onSuccess = deleteRule.onSuccess) === null || _deleteRule$onSuccess === void 0 ? void 0 : _deleteRule$onSuccess.callback,
10004
10028
  onUpdateSuccess: updateRule === null || updateRule === void 0 || (_updateRule$onSuccess = updateRule.onSuccess) === null || _updateRule$onSuccess === void 0 ? void 0 : _updateRule$onSuccess.callback
10005
10029
  })), allowReordering && !isLoading && /*#__PURE__*/jsx(RulesReorder, {
10006
- rules: rules,
10030
+ totalCount: totalCount,
10007
10031
  url: url,
10008
10032
  isOpen: isReorderPaneOpen,
10009
- paginationProps: {
10010
- pageNo: page,
10011
- count: totalCount,
10012
- pageSize: DEFAULT_PAGE_SIZE,
10013
- navigate: setPage
10014
- },
10015
10033
  onClose: function onClose() {
10016
10034
  return setIsReorderPaneOpen(false);
10017
10035
  },
@@ -10126,25 +10144,24 @@ var LongTextField = function LongTextField(_ref) {
10126
10144
  var rows = (selectedField === null || selectedField === void 0 ? void 0 : selectedField.rows) || DEFAULT_LONG_TEXT_ROWS;
10127
10145
  return /*#__PURE__*/jsxs(Fragment, {
10128
10146
  children: [separator && /*#__PURE__*/jsx(Typography, {
10129
- className: "neeto-ui-text-gray-700 mt-1",
10147
+ className: "neeto-ui-text-gray-700",
10130
10148
  "data-cy": "long-text-action-separator-text",
10131
10149
  style: "h5",
10132
10150
  weight: "normal",
10133
10151
  children: separator
10134
- }), /*#__PURE__*/jsx(Typography, {
10152
+ }), /*#__PURE__*/jsx(Button, {
10135
10153
  "data-cy": "long-text-action-button",
10136
- style: "h5",
10137
- weight: "semibold",
10138
- className: classNames("hover:neeto-ui-text-primary-800 neeto-ui-text-gray-800 mt-1 cursor-pointer underline", {
10139
- "neeto-ui-text-primary-800": showPane,
10154
+ label: label.toLowerCase(),
10155
+ style: "link",
10156
+ className: classNames("neeto-ui-text-gray-800 neeto-ui-font-semibold underline", {
10157
+ "neeto-ui-text-accent-800": showPane,
10140
10158
  "neeto-ui-text-error-500": isValid
10141
10159
  }),
10142
10160
  onClick: function onClick() {
10143
10161
  return setShowPane(function (prevState) {
10144
10162
  return !prevState;
10145
10163
  });
10146
- },
10147
- children: label.toLowerCase()
10164
+ }
10148
10165
  }), /*#__PURE__*/jsxs(Pane, {
10149
10166
  initialFocusRef: initialFocusRef,
10150
10167
  isOpen: showPane,
@@ -10348,25 +10365,24 @@ var ApiFields = function ApiFields(_ref) {
10348
10365
  };
10349
10366
  return /*#__PURE__*/jsxs(Fragment, {
10350
10367
  children: [/*#__PURE__*/jsx(Typography, {
10351
- className: "neeto-ui-text-gray-700 mt-1",
10368
+ className: "neeto-ui-text-gray-700",
10352
10369
  "data-cy": "api-action-separator-text",
10353
10370
  style: "h5",
10354
10371
  weight: "normal",
10355
10372
  children: separator
10356
- }), /*#__PURE__*/jsx(Typography, {
10373
+ }), /*#__PURE__*/jsx(Button, {
10357
10374
  "data-cy": "api-action-button",
10358
- style: "h5",
10359
- weight: "semibold",
10360
- className: classNames("hover:neeto-ui-text-primary-800 neeto-ui-text-gray-800 mt-1 cursor-pointer underline", {
10361
- "neeto-ui-text-primary-800": showPane,
10375
+ label: defaultLabel.toLowerCase(),
10376
+ style: "link",
10377
+ className: classNames("neeto-ui-text-gray-800 neeto-ui-font-semibold underline", {
10378
+ "neeto-ui-text-accent-800": showPane,
10362
10379
  "neeto-ui-text-error-500": isValid
10363
10380
  }),
10364
10381
  onClick: function onClick() {
10365
10382
  return setShowPane(function (prevState) {
10366
10383
  return !prevState;
10367
10384
  });
10368
- },
10369
- children: defaultLabel.toLowerCase()
10385
+ }
10370
10386
  }), /*#__PURE__*/jsxs(Pane, {
10371
10387
  initialFocusRef: initialFocusRef,
10372
10388
  isOpen: showPane,
@@ -10437,23 +10453,22 @@ var CustomAction = function CustomAction(_ref) {
10437
10453
  var defaultLabel = selectedField === null || selectedField === void 0 ? void 0 : selectedField.placeholder;
10438
10454
  return /*#__PURE__*/jsxs(Fragment, {
10439
10455
  children: [/*#__PURE__*/jsx(Typography, {
10440
- className: "neeto-ui-text-gray-700 mt-1",
10456
+ className: "neeto-ui-text-gray-700",
10441
10457
  style: "h5",
10442
10458
  weight: "normal",
10443
10459
  children: separator
10444
- }), /*#__PURE__*/jsx(Typography, {
10445
- style: "h5",
10446
- weight: "semibold",
10447
- className: classNames("hover:neeto-ui-text-primary-800 neeto-ui-text-gray-800 mt-1 cursor-pointer underline", {
10448
- "neeto-ui-text-primary-800": showPane,
10460
+ }), /*#__PURE__*/jsx(Button, {
10461
+ label: defaultLabel.toLowerCase(),
10462
+ style: "link",
10463
+ className: classNames("neeto-ui-text-gray-800 neeto-ui-font-semibold underline", {
10464
+ "neeto-ui-text-accent-800": showPane,
10449
10465
  "neeto-ui-text-error-500": isValid
10450
10466
  }),
10451
10467
  onClick: function onClick() {
10452
10468
  return setShowPane(function (prevState) {
10453
10469
  return !prevState;
10454
10470
  });
10455
- },
10456
- children: defaultLabel.toLowerCase()
10471
+ }
10457
10472
  }), /*#__PURE__*/jsxs(Pane, {
10458
10473
  initialFocusRef: initialFocusRef,
10459
10474
  isOpen: showPane,
@@ -10505,7 +10520,7 @@ var DateField$1 = function DateField(_ref) {
10505
10520
  var isValid = errors.actions && 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]) && 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]);
10506
10521
  return /*#__PURE__*/jsxs(Fragment, {
10507
10522
  children: [!selectedField.hideSeparator && /*#__PURE__*/jsx(Typography, {
10508
- className: "neeto-ui-text-gray-700 mt-1",
10523
+ className: "neeto-ui-text-gray-700",
10509
10524
  "data-cy": "action-dropdown-seperator-text",
10510
10525
  style: "h5",
10511
10526
  weight: "normal",
@@ -10530,10 +10545,10 @@ var DateField$1 = function DateField(_ref) {
10530
10545
  });
10531
10546
  }
10532
10547
  })]
10533
- }) : /*#__PURE__*/jsx(Typography, {
10534
- style: "h5",
10535
- weight: "semibold",
10536
- className: classNames("neeto-ui-text-gray-800 hover:neeto-ui-text-primary-800 mt-1 cursor-pointer underline", {
10548
+ }) : /*#__PURE__*/jsx(Button, {
10549
+ label: label,
10550
+ style: "link",
10551
+ className: classNames("neeto-ui-text-gray-800 neeto-ui-font-semibold underline", {
10537
10552
  "neeto-ui-text-error-500": isValid
10538
10553
  }),
10539
10554
  onClick: function onClick() {
@@ -10541,8 +10556,7 @@ var DateField$1 = function DateField(_ref) {
10541
10556
  setShowInput(function (prevState) {
10542
10557
  return !prevState;
10543
10558
  });
10544
- },
10545
- children: label
10559
+ }
10546
10560
  })]
10547
10561
  });
10548
10562
  };
@@ -10734,7 +10748,7 @@ var DropdownField$1 = function DropdownField(_ref) {
10734
10748
  }, [defaultValue, dropdownOptions]);
10735
10749
  return /*#__PURE__*/jsxs(Fragment, {
10736
10750
  children: [!selectedField.hideSeparator && /*#__PURE__*/jsx(Typography, {
10737
- className: "neeto-ui-text-gray-700 mt-1",
10751
+ className: "neeto-ui-text-gray-700",
10738
10752
  "data-cy": "action-dropdown-seperator-text",
10739
10753
  style: "h5",
10740
10754
  weight: "normal",
@@ -10742,12 +10756,12 @@ var DropdownField$1 = function DropdownField(_ref) {
10742
10756
  }), /*#__PURE__*/jsx(Dropdown$1, {
10743
10757
  buttonStyle: "secondary",
10744
10758
  className: "neeto-ui-bg-gray-100",
10745
- customTarget: /*#__PURE__*/jsx(Typography, {
10759
+ customTarget: /*#__PURE__*/jsx(Button, {
10746
10760
  "data-cy": "action-dropdown-button",
10747
- style: "h5",
10748
- weight: "semibold",
10749
- className: classNames("hover:neeto-ui-text-primary-800 neeto-ui-text-gray-800 mt-1 cursor-pointer underline", {
10750
- "neeto-ui-text-primary-800": isActive,
10761
+ label: defaultSelectedOption === null || defaultSelectedOption === void 0 || (_defaultSelectedOptio = defaultSelectedOption.label) === null || _defaultSelectedOptio === void 0 ? void 0 : _defaultSelectedOptio.toLowerCase(),
10762
+ style: "link",
10763
+ className: classNames("neeto-ui-text-gray-800 neeto-ui-font-semibold underline", {
10764
+ "neeto-ui-text-accent-800": isActive,
10751
10765
  "neeto-ui-text-error-500": isValueSelected
10752
10766
  }),
10753
10767
  onClick: function onClick() {
@@ -10755,8 +10769,7 @@ var DropdownField$1 = function DropdownField(_ref) {
10755
10769
  setIsActive(function (prevState) {
10756
10770
  return !prevState;
10757
10771
  });
10758
- },
10759
- children: defaultSelectedOption === null || defaultSelectedOption === void 0 || (_defaultSelectedOptio = defaultSelectedOption.label) === null || _defaultSelectedOptio === void 0 ? void 0 : _defaultSelectedOptio.toLowerCase()
10772
+ }
10760
10773
  }),
10761
10774
  onClose: handleClose,
10762
10775
  children: /*#__PURE__*/jsxs(Menu$9, {
@@ -10921,25 +10934,24 @@ var EmailFields = function EmailFields(_ref) {
10921
10934
  };
10922
10935
  return /*#__PURE__*/jsxs(Fragment, {
10923
10936
  children: [/*#__PURE__*/jsx(Typography, {
10924
- className: "neeto-ui-text-gray-700 mt-1",
10937
+ className: "neeto-ui-text-gray-700",
10925
10938
  "data-cy": "action-email-seperator-text",
10926
10939
  style: "h5",
10927
10940
  weight: "normal",
10928
10941
  children: separator
10929
- }), /*#__PURE__*/jsx(Typography, {
10942
+ }), /*#__PURE__*/jsx(Button, {
10930
10943
  "data-cy": "email-action-button",
10931
- style: "h5",
10932
- weight: "semibold",
10933
- className: classNames("hover:neeto-ui-text-primary-800 neeto-ui-text-gray-800 mt-1 cursor-pointer underline", {
10934
- "neeto-ui-text-primary-800": showPane,
10944
+ label: defaultLabel.toLowerCase(),
10945
+ style: "link",
10946
+ className: classNames("neeto-ui-text-gray-800 neeto-ui-font-semibold underline", {
10947
+ "neeto-ui-text-accent-800": showPane,
10935
10948
  "neeto-ui-text-error-500": isValid
10936
10949
  }),
10937
10950
  onClick: function onClick() {
10938
10951
  return setShowPane(function (prevState) {
10939
10952
  return !prevState;
10940
10953
  });
10941
- },
10942
- children: defaultLabel.toLowerCase()
10954
+ }
10943
10955
  }), /*#__PURE__*/jsxs(Pane, {
10944
10956
  initialFocusRef: initialFocusRef,
10945
10957
  isOpen: showPane,
@@ -11063,18 +11075,17 @@ var Input = function Input(_ref) {
11063
11075
  });
11064
11076
  }
11065
11077
  })
11066
- }) : /*#__PURE__*/jsx(Typography, {
11067
- style: "h5",
11068
- weight: "semibold",
11069
- className: classNames("neeto-ui-text-gray-800 hover:neeto-ui-text-primary-800 mt-1 cursor-pointer underline", {
11070
- "neeto-ui-text-error-500": isValid
11078
+ }) : /*#__PURE__*/jsx(Button, {
11079
+ label: label,
11080
+ style: "link",
11081
+ className: classNames("neeto-ui-text-gray-800 neeto-ui-font-semibold underline", {
11082
+ "neeto-ui-text-accent-500": isValid
11071
11083
  }),
11072
11084
  onClick: function onClick() {
11073
11085
  return setShowInput(function (prevState) {
11074
11086
  return !prevState;
11075
11087
  });
11076
- },
11077
- children: label
11088
+ }
11078
11089
  })]
11079
11090
  });
11080
11091
  };
@@ -11111,7 +11122,7 @@ var SHORTCUTS = {
11111
11122
  var _excluded$a = ["value", "nullable", "className", "handleSubmit", "handleCancel"];
11112
11123
  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; }
11113
11124
  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; }
11114
- var InlineInput = /*#__PURE__*/React__default.forwardRef(function (props, ref) {
11125
+ var InlineInput = /*#__PURE__*/forwardRef(function (props, ref) {
11115
11126
  var _props$value = props.value,
11116
11127
  value = _props$value === void 0 ? "" : _props$value,
11117
11128
  _props$nullable = props.nullable,
@@ -11211,25 +11222,24 @@ var ListField = function ListField(_ref) {
11211
11222
  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");
11212
11223
  return /*#__PURE__*/jsxs(Fragment, {
11213
11224
  children: [/*#__PURE__*/jsx(Typography, {
11214
- className: "neeto-ui-text-gray-700 mt-1",
11225
+ className: "neeto-ui-text-gray-700",
11215
11226
  "data-cy": "list-action-separator-text",
11216
11227
  style: "h5",
11217
11228
  weight: "normal",
11218
11229
  children: separator
11219
- }), /*#__PURE__*/jsx(Typography, {
11230
+ }), /*#__PURE__*/jsx(Button, {
11220
11231
  "data-cy": "list-action-button",
11221
- style: "h5",
11222
- weight: "semibold",
11223
- className: classNames("hover:neeto-ui-text-primary-800 neeto-ui-text-gray-800 mt-1 cursor-pointer underline", {
11224
- "neeto-ui-text-primary-800": showPane,
11232
+ label: t("neetoRules.form.list"),
11233
+ style: "link",
11234
+ className: classNames("neeto-ui-text-gray-800 neeto-ui-font-semibold underline", {
11235
+ "neeto-ui-text-accent-800": showPane,
11225
11236
  "neeto-ui-text-error-500": isValid
11226
11237
  }),
11227
11238
  onClick: function onClick() {
11228
11239
  return setShowPane(function (prevState) {
11229
11240
  return !prevState;
11230
11241
  });
11231
- },
11232
- children: t("neetoRules.form.list")
11242
+ }
11233
11243
  }), /*#__PURE__*/jsxs(Pane, {
11234
11244
  initialFocusRef: initialFocusRef,
11235
11245
  isOpen: showPane,
@@ -11276,7 +11286,7 @@ var ListField = function ListField(_ref) {
11276
11286
  className: "w-full",
11277
11287
  children: function children(message) {
11278
11288
  return /*#__PURE__*/jsx(Typography, {
11279
- className: "neeto-ui-text-error-500 neeto-ui-text-gray-700 mt-1",
11289
+ className: "neeto-ui-text-error-500 neeto-ui-text-gray-700",
11280
11290
  "data-cy": "list-action-error-message",
11281
11291
  style: "h5",
11282
11292
  children: message
@@ -11359,7 +11369,7 @@ var MultiSelect$1 = function MultiSelect(_ref) {
11359
11369
  };
11360
11370
  return /*#__PURE__*/jsxs(Fragment, {
11361
11371
  children: [!selectedField.hideSeparator && /*#__PURE__*/jsx(Typography, {
11362
- className: "neeto-ui-text-gray-700 mt-1",
11372
+ className: "neeto-ui-text-gray-700",
11363
11373
  "data-cy": "multi-select-action-separator-text",
11364
11374
  style: "h5",
11365
11375
  weight: "normal",
@@ -11370,12 +11380,12 @@ var MultiSelect$1 = function MultiSelect(_ref) {
11370
11380
  closeOnSelect: false,
11371
11381
  position: "top-start",
11372
11382
  customTarget: isNotEmpty(selectedOptions) ? /*#__PURE__*/jsx("span", {
11373
- className: "flex flex-wrap gap-y-1",
11383
+ className: "flex flex-wrap items-center gap-x-2 gap-y-1",
11374
11384
  children: selectedOptions.map(function (option, idx) {
11375
11385
  return /*#__PURE__*/jsxs("span", {
11376
- className: "flex flex-wrap",
11386
+ className: "flex flex-wrap items-center gap-x-2 gap-y-1",
11377
11387
  children: [!!idx && /*#__PURE__*/jsx(Typography, {
11378
- className: "neeto-ui-text-gray-700 mr-1 mt-1",
11388
+ className: "neeto-ui-text-gray-700",
11379
11389
  style: "h5",
11380
11390
  weight: "normal",
11381
11391
  onClick: function onClick(e) {
@@ -11384,33 +11394,31 @@ var MultiSelect$1 = function MultiSelect(_ref) {
11384
11394
  children: t("neetoRules.common.and", {
11385
11395
  what: ""
11386
11396
  })
11387
- }), /*#__PURE__*/jsx(Typography, {
11397
+ }), /*#__PURE__*/jsx(Button, {
11388
11398
  "data-cy": "multi-select-action-button",
11389
- style: "h5",
11390
- weight: "semibold",
11391
- className: classNames("hover:neeto-ui-text-primary-800 neeto-ui-text-gray-800 mr-1 mt-1 cursor-pointer underline", {
11392
- "neeto-ui-text-primary-800": activeOption === (option === null || option === void 0 ? void 0 : option.value)
11399
+ label: option === null || option === void 0 ? void 0 : option.label.toLowerCase(),
11400
+ style: "link",
11401
+ className: classNames("neeto-ui-text-gray-800 neeto-ui-font-semibold underline", {
11402
+ "neeto-ui-text-accent-800": activeOption === (option === null || option === void 0 ? void 0 : option.value)
11393
11403
  }),
11394
11404
  onClick: function onClick() {
11395
11405
  setTouched(assocPath(["actions", "value", index], true, touched));
11396
11406
  setActiveOption(activeOption ? null : option === null || option === void 0 ? void 0 : option.value);
11397
- },
11398
- children: option === null || option === void 0 ? void 0 : option.label.toLowerCase()
11407
+ }
11399
11408
  })]
11400
11409
  }, idx);
11401
11410
  })
11402
- }) : /*#__PURE__*/jsx(Typography, {
11403
- style: "h5",
11404
- weight: "semibold",
11405
- className: classNames("hover:neeto-ui-text-primary-800 neeto-ui-text-gray-800 mt-1 cursor-pointer underline", {
11406
- "neeto-ui-text-primary-800": activeOption === defaultLabel,
11411
+ }) : /*#__PURE__*/jsx(Button, {
11412
+ label: defaultLabel,
11413
+ style: "link",
11414
+ className: classNames("neeto-ui-text-gray-800 neeto-ui-font-semibold underline", {
11415
+ "neeto-ui-text-accent-800": activeOption === defaultLabel,
11407
11416
  "neeto-ui-text-error-500": isValid
11408
11417
  }),
11409
11418
  onClick: function onClick() {
11410
11419
  setTouched(assocPath(["actions", "value", index], true, touched));
11411
11420
  setActiveOption(activeOption ? null : defaultLabel);
11412
- },
11413
- children: defaultLabel
11421
+ }
11414
11422
  }),
11415
11423
  onClose: handleClose,
11416
11424
  children: /*#__PURE__*/jsxs(Menu$8, {
@@ -11476,25 +11484,24 @@ var NoteField = function NoteField(_ref) {
11476
11484
  var defaultLabel = (selectedField === null || selectedField === void 0 ? void 0 : selectedField.placeholder) || t("neetoRules.form.note");
11477
11485
  return /*#__PURE__*/jsxs(Fragment, {
11478
11486
  children: [/*#__PURE__*/jsx(Typography, {
11479
- className: "neeto-ui-text-gray-700 mt-1",
11487
+ className: "neeto-ui-text-gray-700",
11480
11488
  "data-cy": "note-action-separator-text",
11481
11489
  style: "h5",
11482
11490
  weight: "normal",
11483
11491
  children: separator
11484
- }), /*#__PURE__*/jsx(Typography, {
11492
+ }), /*#__PURE__*/jsx(Button, {
11485
11493
  "data-cy": "note-action-button",
11486
- style: "h5",
11487
- weight: "semibold",
11488
- className: classNames("hover:neeto-ui-text-primary-800 neeto-ui-text-gray-800 mt-1 cursor-pointer underline", {
11489
- "neeto-ui-text-primary-800": showPane,
11494
+ label: defaultLabel.toLowerCase(),
11495
+ style: "link",
11496
+ className: classNames("neeto-ui-text-gray-800 neeto-ui-font-semibold underline", {
11497
+ "neeto-ui-text-accent-800": showPane,
11490
11498
  "neeto-ui-text-error-500": isValid
11491
11499
  }),
11492
11500
  onClick: function onClick() {
11493
11501
  return setShowPane(function (prevState) {
11494
11502
  return !prevState;
11495
11503
  });
11496
- },
11497
- children: defaultLabel.toLowerCase()
11504
+ }
11498
11505
  }), /*#__PURE__*/jsxs(Pane, {
11499
11506
  initialFocusRef: initialFocusRef,
11500
11507
  isOpen: showPane,
@@ -11823,25 +11830,24 @@ var SmsFields = function SmsFields(_ref) {
11823
11830
  };
11824
11831
  return /*#__PURE__*/jsxs(Fragment, {
11825
11832
  children: [/*#__PURE__*/jsx(Typography, {
11826
- className: "neeto-ui-text-gray-700 mt-1",
11833
+ className: "neeto-ui-text-gray-700",
11827
11834
  "data-cy": "sms-action-separator-text",
11828
11835
  style: "h5",
11829
11836
  weight: "normal",
11830
11837
  children: separator
11831
- }), /*#__PURE__*/jsx(Typography, {
11838
+ }), /*#__PURE__*/jsx(Button, {
11832
11839
  "data-cy": "sms-action-button",
11833
- style: "h5",
11834
- weight: "semibold",
11835
- className: classNames("hover:neeto-ui-text-primary-800 neeto-ui-text-gray-800 mt-1 cursor-pointer underline", {
11836
- "neeto-ui-text-primary-800": showPane,
11840
+ label: defaultLabel.toLowerCase(),
11841
+ style: "link",
11842
+ className: classNames("neeto-ui-text-gray-800 neeto-ui-font-semibold underline", {
11843
+ "neeto-ui-text-accent-800": showPane,
11837
11844
  "neeto-ui-text-error-500": isValid
11838
11845
  }),
11839
11846
  onClick: function onClick() {
11840
11847
  return setShowPane(function (prevState) {
11841
11848
  return !prevState;
11842
11849
  });
11843
- },
11844
- children: defaultLabel.toLowerCase()
11850
+ }
11845
11851
  }), /*#__PURE__*/jsxs(Pane, {
11846
11852
  initialFocusRef: initialFocusRef,
11847
11853
  isOpen: showPane,
@@ -12486,77 +12492,78 @@ var ActionItem = function ActionItem(_ref) {
12486
12492
  findSelectedOption();
12487
12493
  }, [selectedField]);
12488
12494
  return /*#__PURE__*/jsxs("div", {
12489
- className: "mb-1 flex max-w-2xl flex-wrap gap-x-1 gap-y-2",
12490
- children: [selectDropDownHasError && renderErrorCallout(selectDropDownErrorMessage), !isMessageToSlackAction && isDisabled && renderDisabledReason(), /*#__PURE__*/jsx(Typography, {
12491
- className: "neeto-ui-text-gray-700 mt-1",
12492
- style: "h5",
12493
- weight: "normal",
12494
- children: label
12495
- }), /*#__PURE__*/jsx(Dropdown$1, {
12496
- buttonStyle: "secondary",
12497
- className: "neeto-ui-bg-gray-100",
12498
- position: "bottom-start",
12499
- customTarget: /*#__PURE__*/jsx(Typography, {
12500
- "data-cy": "action-dropdown-button",
12495
+ className: "flex max-w-2xl flex-wrap gap-x-1 gap-y-3",
12496
+ children: [selectDropDownHasError && renderErrorCallout(selectDropDownErrorMessage), !isMessageToSlackAction && isDisabled && renderDisabledReason(), /*#__PURE__*/jsxs("div", {
12497
+ className: "flex flex-wrap items-center gap-x-2 gap-y-3",
12498
+ children: [/*#__PURE__*/jsx(Typography, {
12499
+ className: "neeto-ui-text-gray-700",
12501
12500
  style: "h5",
12502
- weight: "semibold",
12503
- className: classNames("hover:neeto-ui-text-primary-800 neeto-ui-text-gray-800 mt-1 cursor-pointer underline", {
12504
- "neeto-ui-text-primary-800": isActive,
12505
- "neeto-ui-text-error-500": isActionSelected
12506
- }),
12507
- onClick: function onClick() {
12508
- return setIsActive(function (prevState) {
12509
- return !prevState;
12510
- });
12511
- },
12512
- children: selectedOption === null || selectedOption === void 0 || (_selectedOption$label = selectedOption.label) === null || _selectedOption$label === void 0 ? void 0 : _selectedOption$label.toLowerCase()
12513
- }),
12514
- onClose: handleClose,
12515
- children: /*#__PURE__*/jsxs(Menu$7, {
12516
- className: "max-h-60 max-w-2xl p-3",
12517
- children: [actionOptions.length > MAXIMUM_OPTION_LENGTH$1 && /*#__PURE__*/jsx(Input$1, {
12518
- autoFocus: true,
12519
- className: "mb-1",
12520
- "data-cy": "search-text-field",
12521
- placeholder: t("neetoRules.common.search"),
12522
- prefix: /*#__PURE__*/jsx(Search, {}),
12523
- value: searchTerm,
12524
- onChange: function onChange(e) {
12525
- return setSearchTerm(e.target.value);
12526
- },
12527
- onClick: function onClick(e) {
12528
- return e.stopPropagation();
12501
+ weight: "normal",
12502
+ children: label
12503
+ }), /*#__PURE__*/jsx(Dropdown$1, {
12504
+ buttonStyle: "secondary",
12505
+ className: "neeto-ui-bg-gray-100",
12506
+ position: "bottom-start",
12507
+ customTarget: /*#__PURE__*/jsx(Button, {
12508
+ "data-cy": "action-dropdown-button",
12509
+ label: selectedOption === null || selectedOption === void 0 || (_selectedOption$label = selectedOption.label) === null || _selectedOption$label === void 0 ? void 0 : _selectedOption$label.toLowerCase(),
12510
+ style: "link",
12511
+ className: classNames("neeto-ui-text-gray-800 neeto-ui-font-semibold underline", {
12512
+ "neeto-ui-text-accent-800": isActive,
12513
+ "neeto-ui-text-error-500": isActionSelected
12514
+ }),
12515
+ onClick: function onClick() {
12516
+ return setIsActive(function (prevState) {
12517
+ return !prevState;
12518
+ });
12529
12519
  }
12530
- }), /*#__PURE__*/jsx(OptionsWrapper, {
12531
- hasScroll: actionOptions.length > MAXIMUM_OPTION_LENGTH$1,
12532
- children: searchedOptions.map(function (option, idx) {
12533
- return /*#__PURE__*/jsx(MenuItem$7.Button, {
12534
- "data-cy": "".concat(joinHyphenCase(option.label), "-menu-item"),
12535
- suffix: (selectedOption === null || selectedOption === void 0 ? void 0 : selectedOption.value) === option.value && /*#__PURE__*/jsx(Check, {
12536
- className: "neeto-ui-text-primary-800"
12537
- }),
12538
- onClick: function onClick() {
12539
- return handleSelectOption(option);
12540
- },
12541
- children: option.label
12542
- }, idx);
12543
- })
12544
- }), isEmpty(actionOptions) && /*#__PURE__*/jsx(MenuItem$7.Button, {
12545
- "data-cy": "no-options-menu-item",
12546
- children: t("neetoRules.common.noOptions")
12547
- })]
12548
- })
12549
- }), /*#__PURE__*/jsx(ActionSubItem, {
12550
- action: action,
12551
- index: index,
12552
- selectedField: selectedField,
12553
- name: "".concat(name, ".metadata"),
12554
- options: getSelectedFieldOptions()
12555
- }), isPresent(action === null || action === void 0 ? void 0 : action.children) && /*#__PURE__*/jsx(ActionChildren, {
12556
- action: action,
12557
- index: index,
12558
- selectedField: selectedField,
12559
- parentFieldName: name
12520
+ }),
12521
+ onClose: handleClose,
12522
+ children: /*#__PURE__*/jsxs(Menu$7, {
12523
+ className: "max-h-60 max-w-2xl p-3",
12524
+ children: [actionOptions.length > MAXIMUM_OPTION_LENGTH$1 && /*#__PURE__*/jsx(Input$1, {
12525
+ autoFocus: true,
12526
+ "data-cy": "search-text-field",
12527
+ placeholder: t("neetoRules.common.search"),
12528
+ prefix: /*#__PURE__*/jsx(Search, {}),
12529
+ value: searchTerm,
12530
+ onChange: function onChange(e) {
12531
+ return setSearchTerm(e.target.value);
12532
+ },
12533
+ onClick: function onClick(e) {
12534
+ return e.stopPropagation();
12535
+ }
12536
+ }), /*#__PURE__*/jsx(OptionsWrapper, {
12537
+ hasScroll: actionOptions.length > MAXIMUM_OPTION_LENGTH$1,
12538
+ children: searchedOptions.map(function (option, idx) {
12539
+ return /*#__PURE__*/jsx(MenuItem$7.Button, {
12540
+ "data-cy": "".concat(joinHyphenCase(option.label), "-menu-item"),
12541
+ suffix: (selectedOption === null || selectedOption === void 0 ? void 0 : selectedOption.value) === option.value && /*#__PURE__*/jsx(Check, {
12542
+ className: "neeto-ui-text-primary-800"
12543
+ }),
12544
+ onClick: function onClick() {
12545
+ return handleSelectOption(option);
12546
+ },
12547
+ children: option.label
12548
+ }, idx);
12549
+ })
12550
+ }), isEmpty(actionOptions) && /*#__PURE__*/jsx(MenuItem$7.Button, {
12551
+ "data-cy": "no-options-menu-item",
12552
+ children: t("neetoRules.common.noOptions")
12553
+ })]
12554
+ })
12555
+ }), /*#__PURE__*/jsx(ActionSubItem, {
12556
+ action: action,
12557
+ index: index,
12558
+ selectedField: selectedField,
12559
+ name: "".concat(name, ".metadata"),
12560
+ options: getSelectedFieldOptions()
12561
+ }), isPresent(action === null || action === void 0 ? void 0 : action.children) && /*#__PURE__*/jsx(ActionChildren, {
12562
+ action: action,
12563
+ index: index,
12564
+ selectedField: selectedField,
12565
+ parentFieldName: name
12566
+ })]
12560
12567
  })]
12561
12568
  });
12562
12569
  };
@@ -12754,26 +12761,24 @@ var DropdownField = function DropdownField(_ref) {
12754
12761
  buttonStyle: "secondary",
12755
12762
  className: "neeto-ui-bg-gray-100",
12756
12763
  position: "bottom-start",
12757
- customTarget: /*#__PURE__*/jsx(Typography, {
12764
+ customTarget: /*#__PURE__*/jsx(Button, {
12758
12765
  "data-cy": "condition-".concat(fieldType, "-dropdown-button"),
12759
- style: "h5",
12760
- weight: "semibold",
12761
- className: classNames("hover:neeto-ui-text-primary-800 neeto-ui-text-gray-800 mt-1 cursor-pointer underline", {
12762
- "neeto-ui-text-primary-800": isSelected
12766
+ label: selectedOption === null || selectedOption === void 0 || (_selectedOption$label = selectedOption.label) === null || _selectedOption$label === void 0 ? void 0 : _selectedOption$label.toLowerCase(),
12767
+ style: "link",
12768
+ className: classNames("neeto-ui-text-gray-800 neeto-ui-font-semibold underline", {
12769
+ "neeto-ui-text-accent-800": isSelected
12763
12770
  }),
12764
12771
  onClick: function onClick() {
12765
12772
  return setIsSelected(function (prevState) {
12766
12773
  return !prevState;
12767
12774
  });
12768
- },
12769
- children: selectedOption === null || selectedOption === void 0 || (_selectedOption$label = selectedOption.label) === null || _selectedOption$label === void 0 ? void 0 : _selectedOption$label.toLowerCase()
12775
+ }
12770
12776
  }),
12771
12777
  onClose: handleClose,
12772
12778
  children: /*#__PURE__*/jsxs(Menu$6, {
12773
12779
  className: "max-h-60 max-w-2xl p-3",
12774
12780
  children: [options.length > MAXIMUM_OPTION_LENGTH$2 && /*#__PURE__*/jsx(Input$1, {
12775
12781
  autoFocus: true,
12776
- className: "mb-1",
12777
12782
  "data-cy": "search-text-field",
12778
12783
  placeholder: t("neetoRules.common.search"),
12779
12784
  prefix: /*#__PURE__*/jsx(Search, {}),
@@ -12876,12 +12881,12 @@ var Dropdown = function Dropdown(_ref) {
12876
12881
  return /*#__PURE__*/jsx(Dropdown$1, {
12877
12882
  buttonStyle: "secondary",
12878
12883
  className: "neeto-ui-bg-gray-100",
12879
- customTarget: /*#__PURE__*/jsx(Typography, {
12884
+ customTarget: /*#__PURE__*/jsx(Button, {
12880
12885
  "data-cy": "condition-value-dropdown-button",
12881
- style: "h5",
12882
- weight: "semibold",
12883
- className: classNames("hover:neeto-ui-text-primary-800 neeto-ui-text-gray-800 mt-1 cursor-pointer underline", {
12884
- "neeto-ui-text-primary-800": isActive,
12886
+ label: defaultSelectedOption === null || defaultSelectedOption === void 0 || (_defaultSelectedOptio = defaultSelectedOption.label) === null || _defaultSelectedOptio === void 0 ? void 0 : _defaultSelectedOptio.toLowerCase(),
12887
+ style: "link",
12888
+ className: classNames("neeto-ui-text-gray-800 neeto-ui-font-semibold underline", {
12889
+ "neeto-ui-text-accent-800": isActive,
12885
12890
  "neeto-ui-text-error-500": isValueSelected
12886
12891
  }),
12887
12892
  onClick: function onClick() {
@@ -12889,15 +12894,13 @@ var Dropdown = function Dropdown(_ref) {
12889
12894
  setIsActive(function (prevState) {
12890
12895
  return !prevState;
12891
12896
  });
12892
- },
12893
- children: defaultSelectedOption === null || defaultSelectedOption === void 0 || (_defaultSelectedOptio = defaultSelectedOption.label) === null || _defaultSelectedOptio === void 0 ? void 0 : _defaultSelectedOptio.toLowerCase()
12897
+ }
12894
12898
  }),
12895
12899
  onClose: handleClose,
12896
12900
  children: /*#__PURE__*/jsxs(Menu$5, {
12897
12901
  className: "max-h-60 max-w-2xl p-3",
12898
12902
  children: [options.length > MAXIMUM_OPTION_LENGTH$2 && /*#__PURE__*/jsx(Input$1, {
12899
12903
  autoFocus: true,
12900
- className: "mb-1",
12901
12904
  "data-cy": "search-text-field",
12902
12905
  placeholder: t("neetoRules.common.search"),
12903
12906
  prefix: /*#__PURE__*/jsx(Search, {}),
@@ -12972,18 +12975,17 @@ var InputField$1 = function InputField(_ref) {
12972
12975
  });
12973
12976
  }
12974
12977
  })
12975
- }) : /*#__PURE__*/jsx(Typography, {
12976
- style: "h5",
12977
- weight: "semibold",
12978
- className: classNames("neeto-ui-text-gray-800 hover:neeto-ui-text-primary-800 mt-1 cursor-pointer underline", {
12978
+ }) : /*#__PURE__*/jsx(Button, {
12979
+ label: label,
12980
+ style: "link",
12981
+ className: classNames("neeto-ui-text-gray-800 neeto-ui-font-semibold underline", {
12979
12982
  "neeto-ui-text-error-500": isValid
12980
12983
  }),
12981
12984
  onClick: function onClick() {
12982
12985
  return setShowInput(function (prevState) {
12983
12986
  return !prevState;
12984
12987
  });
12985
- },
12986
- children: label
12988
+ }
12987
12989
  });
12988
12990
  };
12989
12991
 
@@ -13032,43 +13034,41 @@ var MultiSelect = function MultiSelect(_ref) {
13032
13034
  closeOnSelect: false,
13033
13035
  position: "top-start",
13034
13036
  customTarget: isNotEmpty(options) ? /*#__PURE__*/jsx("span", {
13035
- className: "flex flex-wrap gap-y-1",
13037
+ className: "flex flex-wrap items-center gap-x-2 gap-y-1",
13036
13038
  children: options.map(function (option, idx) {
13037
13039
  var _option$label;
13038
- return /*#__PURE__*/jsxs(React__default.Fragment, {
13040
+ return /*#__PURE__*/jsxs(Fragment$1, {
13039
13041
  children: [!!idx && /*#__PURE__*/jsx(Typography, {
13040
- className: "neeto-ui-text-gray-700 mr-1 mt-1",
13042
+ className: "neeto-ui-text-gray-700",
13041
13043
  style: "h5",
13042
13044
  weight: "normal",
13043
13045
  children: t("neetoRules.common.or")
13044
- }), /*#__PURE__*/jsx(Typography, {
13046
+ }), /*#__PURE__*/jsx(Button, {
13045
13047
  "data-cy": "condition-value-multi-select-field",
13046
- style: "h5",
13047
- weight: "semibold",
13048
- className: classNames("hover:neeto-ui-text-primary-800 neeto-ui-text-gray-800 mr-1 mt-1 cursor-pointer underline", {
13049
- "neeto-ui-text-primary-800": activeOption === option.value
13048
+ label: option === null || option === void 0 || (_option$label = option.label) === null || _option$label === void 0 ? void 0 : _option$label.toLowerCase(),
13049
+ style: "link",
13050
+ className: classNames("neeto-ui-text-gray-800 neeto-ui-font-semibold underline", {
13051
+ "neeto-ui-text-accent-800": activeOption === option.value
13050
13052
  }),
13051
13053
  onClick: function onClick() {
13052
13054
  setTouched(assocPath(["conditions", "value", index], true, touched));
13053
13055
  setActiveOption(activeOption ? null : option.value);
13054
- },
13055
- children: option === null || option === void 0 || (_option$label = option.label) === null || _option$label === void 0 ? void 0 : _option$label.toLowerCase()
13056
+ }
13056
13057
  })]
13057
13058
  }, idx);
13058
13059
  })
13059
- }) : /*#__PURE__*/jsx(Typography, {
13060
+ }) : /*#__PURE__*/jsx(Button, {
13060
13061
  "data-cy": "condition-value-multi-select-field",
13061
- style: "h5",
13062
- weight: "semibold",
13063
- className: classNames("hover:neeto-ui-text-primary-800 neeto-ui-text-gray-800 mt-1 cursor-pointer underline", {
13064
- "neeto-ui-text-primary-800": activeOption === defaultLabel,
13062
+ label: defaultLabel,
13063
+ style: "link",
13064
+ className: classNames("neeto-ui-text-gray-800 neeto-ui-font-semibold underline", {
13065
+ "neeto-ui-text-accent-800": activeOption === defaultLabel,
13065
13066
  "neeto-ui-text-error-500": isValid
13066
13067
  }),
13067
13068
  onClick: function onClick() {
13068
13069
  setTouched(assocPath(["conditions", "value", index], true, touched));
13069
13070
  setActiveOption(activeOption ? null : defaultLabel);
13070
- },
13071
- children: defaultLabel
13071
+ }
13072
13072
  }),
13073
13073
  onClose: handleClose,
13074
13074
  children: /*#__PURE__*/jsxs(Menu$4, {
@@ -13136,11 +13136,11 @@ var MultiSelectCreate = function MultiSelectCreate(_ref) {
13136
13136
  var defaultLabel = t("neetoRules.form.selectValues");
13137
13137
  var isValid = errors.conditions && 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]) && 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]);
13138
13138
  return /*#__PURE__*/jsxs(Fragment, {
13139
- children: [isEmpty(allOptions) && /*#__PURE__*/jsx(Typography, {
13139
+ children: [isEmpty(allOptions) && /*#__PURE__*/jsx(Button, {
13140
13140
  "data-cy": "condition-value-multi-select-create-button",
13141
- style: "h5",
13142
- weight: "semibold",
13143
- className: classNames("hover:neeto-ui-text-primary-800 neeto-ui-text-gray-800 mt-1 cursor-pointer underline", {
13141
+ label: defaultLabel,
13142
+ style: "link",
13143
+ className: classNames("neeto-ui-text-gray-800 neeto-ui-font-semibold underline", {
13144
13144
  "neeto-ui-text-error-500": isValid
13145
13145
  }),
13146
13146
  onClick: function onClick() {
@@ -13148,26 +13148,24 @@ var MultiSelectCreate = function MultiSelectCreate(_ref) {
13148
13148
  setShowPane(function (prevState) {
13149
13149
  return !prevState;
13150
13150
  });
13151
- },
13152
- children: defaultLabel
13151
+ }
13153
13152
  }), allOptions.map(function (option, idx) {
13154
- return /*#__PURE__*/jsxs(React__default.Fragment, {
13153
+ return /*#__PURE__*/jsxs(Fragment$1, {
13155
13154
  children: [!!idx && /*#__PURE__*/jsx(Typography, {
13156
- className: "neeto-ui-text-gray-700 mt-1",
13155
+ className: "neeto-ui-text-gray-700",
13157
13156
  style: "h5",
13158
13157
  weight: "normal",
13159
13158
  children: t("neetoRules.common.or")
13160
- }), /*#__PURE__*/jsx(Typography, {
13161
- className: "hover:neeto-ui-text-primary-800 neeto-ui-text-gray-800 mt-1 cursor-pointer underline",
13159
+ }), /*#__PURE__*/jsx(Button, {
13160
+ className: "neeto-ui-text-gray-800 neeto-ui-font-semibold underline",
13162
13161
  "data-cy": "condition-value-multi-select-create-button",
13163
- style: "h5",
13164
- weight: "semibold",
13162
+ label: option.label,
13163
+ style: "link",
13165
13164
  onClick: function onClick() {
13166
13165
  return setShowPane(function (prevState) {
13167
13166
  return !prevState;
13168
13167
  });
13169
- },
13170
- children: option.label
13168
+ }
13171
13169
  })]
13172
13170
  }, idx);
13173
13171
  }), /*#__PURE__*/jsxs(Pane, {
@@ -13659,10 +13657,10 @@ var DateField = function DateField(_ref) {
13659
13657
  });
13660
13658
  }
13661
13659
  })]
13662
- }) : /*#__PURE__*/jsx(Typography, {
13663
- style: "h5",
13664
- weight: "semibold",
13665
- className: classNames("neeto-ui-text-gray-800 hover:neeto-ui-text-primary-800 mt-1 cursor-pointer underline", {
13660
+ }) : /*#__PURE__*/jsx(Button, {
13661
+ label: label,
13662
+ style: "link",
13663
+ className: classNames("neeto-ui-text-gray-800 neeto-ui-font-semibold underline", {
13666
13664
  "neeto-ui-text-error-500": isValid
13667
13665
  }),
13668
13666
  onClick: function onClick() {
@@ -13670,8 +13668,7 @@ var DateField = function DateField(_ref) {
13670
13668
  setShowInput(function (prevState) {
13671
13669
  return !prevState;
13672
13670
  });
13673
- },
13674
- children: label
13671
+ }
13675
13672
  })
13676
13673
  });
13677
13674
  };
@@ -13788,14 +13785,14 @@ var ConditionItem = function ConditionItem(_ref) {
13788
13785
  };
13789
13786
  return /*#__PURE__*/jsxs(Fragment, {
13790
13787
  children: [isWithEvents && !index && /*#__PURE__*/jsx(Typography, {
13791
- className: "neeto-ui-text-gray-700 mt-1",
13788
+ className: "neeto-ui-text-gray-700",
13792
13789
  style: "h5",
13793
13790
  weight: "normal",
13794
13791
  children: t("neetoRules.common.and", {
13795
13792
  what: ""
13796
13793
  })
13797
13794
  }), /*#__PURE__*/jsx(Typography, {
13798
- className: "neeto-ui-text-gray-700 mt-1",
13795
+ className: "neeto-ui-text-gray-700",
13799
13796
  style: "h5",
13800
13797
  weight: "normal",
13801
13798
  children: defaultLabel
@@ -13826,15 +13823,14 @@ var LogicOperator = function LogicOperator(_ref) {
13826
13823
  var logicOperation = _ref.logicOperation,
13827
13824
  handleGroupJoinType = _ref.handleGroupJoinType;
13828
13825
  var logicOperationLabel = OPERATOR_LABELS[logicOperation];
13829
- return /*#__PURE__*/jsx(Typography, {
13830
- className: "neeto-ui-text-gray-800 hover:neeto-ui-text-primary-800 mt-1 cursor-pointer underline",
13826
+ return /*#__PURE__*/jsx(Button, {
13827
+ className: "neeto-ui-text-gray-800 neeto-ui-font-semibold underline",
13831
13828
  "data-cy": "logic-operator-button",
13832
- style: "h5",
13833
- weight: "semibold",
13829
+ label: logicOperationLabel,
13830
+ style: "link",
13834
13831
  onClick: function onClick() {
13835
13832
  return handleGroupJoinType(logicOperation);
13836
- },
13837
- children: logicOperationLabel
13833
+ }
13838
13834
  });
13839
13835
  };
13840
13836
 
@@ -13898,7 +13894,7 @@ var Conditions = function Conditions(_ref) {
13898
13894
  return /*#__PURE__*/jsxs("div", {
13899
13895
  className: "flex w-full justify-between",
13900
13896
  children: [/*#__PURE__*/jsxs("div", {
13901
- className: "mb-1 flex flex-wrap gap-x-2 gap-y-2",
13897
+ className: "flex flex-wrap items-center gap-x-2 gap-y-2",
13902
13898
  children: [!!index && /*#__PURE__*/jsx(LogicOperator, {
13903
13899
  handleGroupJoinType: handleGroupJoinType,
13904
13900
  logicOperation: condition.joinType
@@ -14057,29 +14053,28 @@ var Performer$1 = function Performer(_ref) {
14057
14053
  setSelectedOption(option);
14058
14054
  };
14059
14055
  return /*#__PURE__*/jsxs("div", {
14060
- className: "my-auto flex",
14056
+ className: "my-auto flex items-center gap-x-2 gap-y-3",
14061
14057
  children: [/*#__PURE__*/jsx(Typography, {
14062
- className: "neeto-ui-text-gray-700 mr-2",
14058
+ className: "neeto-ui-text-gray-700",
14063
14059
  style: "h5",
14064
14060
  weight: "normal",
14065
14061
  children: t("neetoRules.common.by")
14066
14062
  }), /*#__PURE__*/jsx(Dropdown$1, {
14067
14063
  buttonStyle: "secondary",
14068
14064
  className: "neeto-ui-bg-gray-100",
14069
- customTarget: /*#__PURE__*/jsx(Typography, {
14065
+ customTarget: /*#__PURE__*/jsx(Button, {
14070
14066
  "data-cy": "event-performer-dropdown",
14071
- style: "h5",
14072
- weight: "semibold",
14073
- className: classNames("hover:neeto-ui-text-primary-800 neeto-ui-text-gray-800 cursor-pointer underline", {
14074
- "neeto-ui-text-primary-800": isSelected,
14067
+ label: selectedOption === null || selectedOption === void 0 || (_selectedOption$label = selectedOption.label) === null || _selectedOption$label === void 0 ? void 0 : _selectedOption$label.toLowerCase(),
14068
+ style: "link",
14069
+ className: classNames(" neeto-ui-text-gray-800 neeto-ui-font-semibold underline", {
14070
+ "neeto-ui-text-accent-800": isSelected,
14075
14071
  "neeto-ui-text-error-500": isValueSelected
14076
14072
  }),
14077
14073
  onClick: function onClick() {
14078
14074
  return setIsSelected(function (prevState) {
14079
14075
  return !prevState;
14080
14076
  });
14081
- },
14082
- children: selectedOption === null || selectedOption === void 0 || (_selectedOption$label = selectedOption.label) === null || _selectedOption$label === void 0 ? void 0 : _selectedOption$label.toLowerCase()
14077
+ }
14083
14078
  }),
14084
14079
  onClose: handleClose,
14085
14080
  children: /*#__PURE__*/jsxs(Menu$3, {
@@ -14220,7 +14215,7 @@ var Events$1 = function Events(_ref) {
14220
14215
  setSearchTerm("");
14221
14216
  };
14222
14217
  return /*#__PURE__*/jsxs("div", {
14223
- className: "my-auto flex flex-wrap gap-x-2 gap-y-3",
14218
+ className: "my-auto flex flex-wrap items-center gap-x-2 gap-y-3",
14224
14219
  children: [/*#__PURE__*/jsx(Typography, {
14225
14220
  className: "neeto-ui-text-gray-700 my-auto",
14226
14221
  style: "h5",
@@ -14232,42 +14227,40 @@ var Events$1 = function Events(_ref) {
14232
14227
  closeOnSelect: false,
14233
14228
  position: "top-start",
14234
14229
  customTarget: isNotEmpty(allEvents) ? /*#__PURE__*/jsx("span", {
14235
- className: "flex flex-wrap gap-y-1",
14230
+ className: "flex flex-wrap items-center gap-x-2 gap-y-1",
14236
14231
  children: allEvents.map(function (event, idx) {
14237
14232
  var _event$label;
14238
14233
  return /*#__PURE__*/jsxs("span", {
14239
- className: "flex flex-wrap gap-y-1",
14234
+ className: "flex flex-wrap items-center gap-x-2 gap-y-1",
14240
14235
  children: [!!idx && /*#__PURE__*/jsx(Typography, {
14241
- className: "neeto-ui-text-gray-700 mr-1",
14236
+ className: "neeto-ui-text-gray-700",
14242
14237
  style: "h5",
14243
14238
  weight: "normal",
14244
14239
  children: t("neetoRules.common.or")
14245
- }), /*#__PURE__*/jsx(Typography, {
14240
+ }), /*#__PURE__*/jsx(Button, {
14246
14241
  "data-cy": "condition-value-multi-select-field",
14247
- style: "h5",
14248
- weight: "semibold",
14249
- className: classNames("hover:neeto-ui-text-primary-800 neeto-ui-text-gray-800 mr-1 cursor-pointer underline", {
14250
- "neeto-ui-text-primary-800": activeOption === event.value
14242
+ label: event === null || event === void 0 || (_event$label = event.label) === null || _event$label === void 0 ? void 0 : _event$label.toLowerCase(),
14243
+ style: "link",
14244
+ className: classNames("neeto-ui-text-gray-800 neeto-ui-font-semibold underline", {
14245
+ "neeto-ui-text-accent-800": activeOption === event.value
14251
14246
  }),
14252
14247
  onClick: function onClick() {
14253
14248
  return setActiveOption(activeOption ? null : event.value);
14254
- },
14255
- children: event === null || event === void 0 || (_event$label = event.label) === null || _event$label === void 0 ? void 0 : _event$label.toLowerCase()
14249
+ }
14256
14250
  })]
14257
14251
  }, idx);
14258
14252
  })
14259
- }) : /*#__PURE__*/jsx(Typography, {
14253
+ }) : /*#__PURE__*/jsx(Button, {
14260
14254
  "data-cy": "condition-value-multi-select-field",
14261
- style: "h5",
14262
- weight: "semibold",
14263
- className: classNames("hover:neeto-ui-text-primary-800 neeto-ui-text-gray-800 cursor-pointer underline", {
14264
- "neeto-ui-text-primary-800": activeOption === defaultLabel,
14255
+ label: defaultLabel,
14256
+ style: "link",
14257
+ className: classNames("neeto-ui-text-gray-800 neeto-ui-font-semibold underline", {
14258
+ "neeto-ui-text-accent-800": activeOption === defaultLabel,
14265
14259
  "neeto-ui-text-error-500": !isValid
14266
14260
  }),
14267
14261
  onClick: function onClick() {
14268
14262
  return setActiveOption(activeOption ? null : defaultLabel);
14269
- },
14270
- children: defaultLabel
14263
+ }
14271
14264
  }),
14272
14265
  onClose: handleClose,
14273
14266
  children: /*#__PURE__*/jsxs(Menu$2, {
@@ -14473,20 +14466,19 @@ var EventItem = function EventItem(_ref) {
14473
14466
  buttonStyle: "secondary",
14474
14467
  className: "neeto-ui-bg-gray-100",
14475
14468
  closeOnSelect: false,
14476
- customTarget: /*#__PURE__*/jsx(Typography, {
14469
+ customTarget: /*#__PURE__*/jsx(Button, {
14477
14470
  "data-cy": "event-dropdown-button",
14478
- style: "h5",
14479
- weight: "semibold",
14480
- className: classNames("hover:neeto-ui-text-primary-800 neeto-ui-text-gray-800 cursor-pointer underline", {
14481
- "neeto-ui-text-primary-800": isActive,
14471
+ label: selectedOption.toLowerCase(),
14472
+ style: "link",
14473
+ className: classNames("neeto-ui-text-gray-800 neeto-ui-font-semibold underline", {
14474
+ "neeto-ui-text-accent-800": isActive,
14482
14475
  "neeto-ui-text-error-500": isValueSelected
14483
14476
  }),
14484
14477
  onClick: function onClick() {
14485
14478
  return setIsActive(function (prevState) {
14486
14479
  return !prevState;
14487
14480
  });
14488
- },
14489
- children: selectedOption.toLowerCase()
14481
+ }
14490
14482
  }),
14491
14483
  onClose: handleClose,
14492
14484
  children: /*#__PURE__*/jsxs(Menu$1, {
@@ -14589,20 +14581,19 @@ var Performer = function Performer(_ref) {
14589
14581
  buttonStyle: "secondary",
14590
14582
  className: "neeto-ui-bg-gray-100",
14591
14583
  closeOnSelect: false,
14592
- customTarget: /*#__PURE__*/jsx(Typography, {
14584
+ customTarget: /*#__PURE__*/jsx(Button, {
14593
14585
  "data-cy": "event-performer-dropdown",
14594
- style: "h5",
14595
- weight: "semibold",
14596
- className: classNames("hover:neeto-ui-text-primary-800 neeto-ui-text-gray-800 cursor-pointer underline", {
14597
- "neeto-ui-text-primary-800": isSelected,
14586
+ label: selectedOption === null || selectedOption === void 0 || (_selectedOption$label = selectedOption.label) === null || _selectedOption$label === void 0 ? void 0 : _selectedOption$label.toLowerCase(),
14587
+ style: "link",
14588
+ className: classNames("neeto-ui-text-gray-800 neeto-ui-font-semibold underline", {
14589
+ "neeto-ui-text-accent-800": isSelected,
14598
14590
  "neeto-ui-text-error-500": isValueSelected
14599
14591
  }),
14600
14592
  onClick: function onClick() {
14601
14593
  return setIsSelected(function (prevState) {
14602
14594
  return !prevState;
14603
14595
  });
14604
- },
14605
- children: selectedOption === null || selectedOption === void 0 || (_selectedOption$label = selectedOption.label) === null || _selectedOption$label === void 0 ? void 0 : _selectedOption$label.toLowerCase()
14596
+ }
14606
14597
  }),
14607
14598
  onClose: handleClose,
14608
14599
  children: /*#__PURE__*/jsxs(Menu, {
@@ -15278,7 +15269,7 @@ var MultiSelectValues = function MultiSelectValues(_ref) {
15278
15269
  values = _ref.values;
15279
15270
  return /*#__PURE__*/jsx(Fragment, {
15280
15271
  children: values === null || values === void 0 ? void 0 : values.map(function (value, idx) {
15281
- return /*#__PURE__*/jsxs(React__default.Fragment, {
15272
+ return /*#__PURE__*/jsxs(Fragment$1, {
15282
15273
  children: [!!idx && /*#__PURE__*/jsx(Typography, {
15283
15274
  className: "neeto-ui-text-gray-700",
15284
15275
  style: "h5",