@bigbinary/neeto-rules-frontend 2.3.0 → 2.4.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.
@@ -1,5 +1,6 @@
1
- import { _ as _defineProperty, a as _slicedToArray, b as _arrayWithHoles, c as _unsupportedIterableToArray, d as _nonIterableRest, e as _typeof$1 } from './slicedToArray-2af6bc03.js';
2
- import { _ as _objectWithoutProperties, b as _iterableToArray, a as _toConsumableArray, g as getDefaultExportFromCjs } from './toConsumableArray-1215bc07.js';
1
+ import _defineProperty from '@babel/runtime/helpers/defineProperty';
2
+ import _objectDestructuringEmpty from '@babel/runtime/helpers/objectDestructuringEmpty';
3
+ import _toConsumableArray from '@babel/runtime/helpers/toConsumableArray';
3
4
  import { useEffect, useState, useRef, forwardRef, useMemo, memo, createElement, Fragment as Fragment$1 } from 'react';
4
5
  import { useFormikContext, useField, FieldArray, ErrorMessage, Formik, Form as Form$1 } from 'formik';
5
6
  import { isNotEmpty, isPresent, renameKeys, findBy, noop, nullSafe, toLabelAndValue, removeBy } from '@bigbinary/neeto-cist';
@@ -8,6 +9,7 @@ import Delete from '@bigbinary/neeto-icons/Delete';
8
9
  import Refresh from '@bigbinary/neeto-icons/Refresh';
9
10
  import Button from '@bigbinary/neetoui/Button';
10
11
  import { useTranslation, Trans } from 'react-i18next';
12
+ import _slicedToArray from '@babel/runtime/helpers/slicedToArray';
11
13
  import classNames from 'classnames';
12
14
  import { dayjs, joinHyphenCase, hyphenize } from '@bigbinary/neeto-commons-frontend/utils';
13
15
  import Check from '@bigbinary/neeto-icons/Check';
@@ -20,10 +22,12 @@ import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
20
22
  import Pane from '@bigbinary/neetoui/Pane';
21
23
  import Textarea from '@bigbinary/neetoui/formik/Textarea';
22
24
  import ActionBlock from '@bigbinary/neetoui/formik/ActionBlock';
25
+ import _objectWithoutProperties from '@babel/runtime/helpers/objectWithoutProperties';
23
26
  import { withT, useStateWithDependency, useDebounce } from '@bigbinary/neeto-commons-frontend/react-utils';
24
27
  import Label from '@bigbinary/neetoui/Label';
25
28
  import Select from '@bigbinary/neetoui/Select';
26
29
  import DatePicker from '@bigbinary/neetoui/DatePicker';
30
+ import { g as getSeparator } from './utils-866e8e3b.js';
27
31
  import { t as t$1 } from 'i18next';
28
32
  import FormikEditor from '@bigbinary/neeto-editor/FormikEditor';
29
33
  import MultiEmailInput from '@bigbinary/neetoui/formik/MultiEmailInput';
@@ -32,6 +36,7 @@ import useHotkeys from '@bigbinary/neeto-hotkeys';
32
36
  import Close from '@bigbinary/neeto-icons/Close';
33
37
  import Checkbox from '@bigbinary/neetoui/Checkbox';
34
38
  import CreatableSelect from 'react-select/creatable';
39
+ import _toArray from '@babel/runtime/helpers/toArray';
35
40
  import { isPhoneNumberValid } from '@bigbinary/neeto-molecules/PhoneNumber';
36
41
  import Tag from '@bigbinary/neetoui/Tag';
37
42
  import { components } from 'react-select';
@@ -39,6 +44,8 @@ import * as yup from 'yup';
39
44
  import { isEditorEmpty } from '@bigbinary/neeto-editor/utils';
40
45
  import { C as CONDITION_VALUE_TYPES, V as VERB_LABELS, M as MAXIMUM_OPTION_LENGTH$3, I as INPUT_FIELD_TYPES, O as OPERATOR_LABELS, a as OPERATORS$1 } from './constants-7347bfc4.js';
41
46
  import Eye from '@bigbinary/neeto-icons/Eye';
47
+ import _asyncToGenerator from '@babel/runtime/helpers/asyncToGenerator';
48
+ import _regeneratorRuntime from '@babel/runtime/regenerator';
42
49
  import Tooltip from '@bigbinary/neetoui/Tooltip';
43
50
  import Select$1 from '@bigbinary/neetoui/formik/Select';
44
51
  import Radio from '@bigbinary/neetoui/formik/Radio';
@@ -46,12 +53,9 @@ import { shallow } from 'zustand/shallow';
46
53
  import Help from '@bigbinary/neeto-icons/Help';
47
54
  import Switch from '@bigbinary/neetoui/Switch';
48
55
  import { u as useCustomDataStore } from './useCustomDataStore-51ceac06.js';
56
+ import _typeof from '@babel/runtime/helpers/typeof';
49
57
  import 'zustand';
50
58
 
51
- function _objectDestructuringEmpty(obj) {
52
- if (obj == null) throw new TypeError("Cannot destructure " + obj);
53
- }
54
-
55
59
  var e=[],t=[];function n(n,r){if(n&&"undefined"!=typeof document){var a,s=!0===r.prepend?"prepend":"append",d=!0===r.singleTag,i="string"==typeof r.container?document.querySelector(r.container):document.getElementsByTagName("head")[0];if(d){var u=e.indexOf(i);-1===u&&(u=e.push(i)-1,t[u]={}),a=t[u]&&t[u][s]?t[u][s]:t[u][s]=c();}else a=c();65279===n.charCodeAt(0)&&(n=n.substring(1)),a.styleSheet?a.styleSheet.cssText+=n:a.appendChild(document.createTextNode(n));}function c(){var e=document.createElement("style");if(e.setAttribute("type","text/css"),r.attributes)for(var t=Object.keys(r.attributes),n=0;n<t.length;n++)e.setAttribute(t[n],r.attributes[t[n]]);var a="prepend"===s?"afterbegin":"beforeend";return i.insertAdjacentElement(a,e),e}}
56
60
 
57
61
  var css = ".neeto-filters-error-boundary{align-items:center;background-color:rgb(var(--neeto-ui-gray-100));border-radius:var(--neeto-ui-rounded-sm);display:flex;gap:16px;margin-bottom:12px;padding:8px 20px}.neeto-filters-error-boundary p{color:rgb(var(--neeto-ui-gray-800))}\n/*# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImFwcC9qYXZhc2NyaXB0L3NyYy9zdHlsZXNoZWV0cy9jb21wb25lbnRzL19lcnJvci1ib3VuZGFyeS5zY3NzIiwiYXBwL2phdmFzY3JpcHQvc3JjL3N0eWxlc2hlZXRzL21haW4uc2NzcyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSw4QkFJRSxrQkFBQSxDQUdBLDhDQUFBLENBREEsd0NBQUEsQ0FIQSxZQUFBLENBRUEsUUFBQSxDQUhBLGtCQUFBLENBREEsZ0JDT0YsQ0RDRSxnQ0FDRSxtQ0NDSiIsInNvdXJjZXNDb250ZW50IjpbIi5uZWV0by1maWx0ZXJzLWVycm9yLWJvdW5kYXJ5IHtcbiAgcGFkZGluZzogOHB4IDIwcHg7XG4gIG1hcmdpbi1ib3R0b206IDEycHg7XG4gIGRpc3BsYXk6IGZsZXg7XG4gIGFsaWduLWl0ZW1zOiBjZW50ZXI7XG4gIGdhcDogMTZweDtcbiAgYm9yZGVyLXJhZGl1czogdmFyKC0tbmVldG8tdWktcm91bmRlZC1zbSk7XG4gIGJhY2tncm91bmQtY29sb3I6IHJnYih2YXIoLS1uZWV0by11aS1ncmF5LTEwMCkpO1xuXG4gIHAge1xuICAgIGNvbG9yOiByZ2IodmFyKC0tbmVldG8tdWktZ3JheS04MDApKTtcbiAgfVxufVxuIiwiLm5lZXRvLWZpbHRlcnMtZXJyb3ItYm91bmRhcnkge1xuICBwYWRkaW5nOiA4cHggMjBweDtcbiAgbWFyZ2luLWJvdHRvbTogMTJweDtcbiAgZGlzcGxheTogZmxleDtcbiAgYWxpZ24taXRlbXM6IGNlbnRlcjtcbiAgZ2FwOiAxNnB4O1xuICBib3JkZXItcmFkaXVzOiB2YXIoLS1uZWV0by11aS1yb3VuZGVkLXNtKTtcbiAgYmFja2dyb3VuZC1jb2xvcjogcmdiKHZhcigtLW5lZXRvLXVpLWdyYXktMTAwKSk7XG59XG4ubmVldG8tZmlsdGVycy1lcnJvci1ib3VuZGFyeSBwIHtcbiAgY29sb3I6IHJnYih2YXIoLS1uZWV0by11aS1ncmF5LTgwMCkpO1xufSJdfQ== */";
@@ -120,7 +124,7 @@ var PaneFooterBlock = function PaneFooterBlock(_ref) {
120
124
  };
121
125
 
122
126
  var LongTextField = function LongTextField(_ref) {
123
- var _errors$actions, _touched$actions, _selectedField$separa;
127
+ var _errors$actions, _errors$actions$value, _touched$actions, _touched$actions$valu, _selectedField$separa;
124
128
  var name = _ref.name,
125
129
  _ref$value = _ref.value,
126
130
  value = _ref$value === void 0 ? "" : _ref$value,
@@ -140,8 +144,8 @@ var LongTextField = function LongTextField(_ref) {
140
144
  useOnButtonPressed(initialFocusRef, function () {
141
145
  return setShowPane(false);
142
146
  });
143
- 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]);
144
- var separator = (selectedField === null || selectedField === void 0 || (_selectedField$separa = selectedField.separator) === null || _selectedField$separa === void 0 ? void 0 : _selectedField$separa.toLowerCase()) || defaultSeparator;
147
+ var isValid = errors.actions && isNotNil((_errors$actions = errors.actions) === null || _errors$actions === void 0 ? void 0 : (_errors$actions$value = _errors$actions.value) === null || _errors$actions$value === void 0 ? void 0 : _errors$actions$value[index]) && isNotNil((_touched$actions = touched.actions) === null || _touched$actions === void 0 ? void 0 : (_touched$actions$valu = _touched$actions.value) === null || _touched$actions$valu === void 0 ? void 0 : _touched$actions$valu[index]);
148
+ var separator = (selectedField === null || selectedField === void 0 ? void 0 : (_selectedField$separa = selectedField.separator) === null || _selectedField$separa === void 0 ? void 0 : _selectedField$separa.toLowerCase()) || defaultSeparator;
145
149
  var label = (selectedField === null || selectedField === void 0 ? void 0 : selectedField.placeholder) || defaultLabel;
146
150
  var rows = (selectedField === null || selectedField === void 0 ? void 0 : selectedField.rows) || DEFAULT_LONG_TEXT_ROWS;
147
151
  return /*#__PURE__*/jsxs(Fragment, {
@@ -319,7 +323,7 @@ var SelectTemplateField = function SelectTemplateField(_ref) {
319
323
  var template = findBy({
320
324
  id: option.value
321
325
  }, templates);
322
- onChange === null || onChange === void 0 || onChange(template);
326
+ onChange === null || onChange === void 0 ? void 0 : onChange(template);
323
327
  };
324
328
  return /*#__PURE__*/jsx(Select, {
325
329
  isClearable: true,
@@ -338,7 +342,7 @@ var SelectTemplateField = function SelectTemplateField(_ref) {
338
342
  };
339
343
 
340
344
  var ApiFields = function ApiFields(_ref) {
341
- var _errors$actions, _touched$actions, _selectedField$separa;
345
+ var _errors$actions, _errors$actions$value, _touched$actions, _touched$actions$valu, _selectedField$separa;
342
346
  var name = _ref.name,
343
347
  selectedField = _ref.selectedField,
344
348
  index = _ref.index;
@@ -356,8 +360,8 @@ var ApiFields = function ApiFields(_ref) {
356
360
  useOnButtonPressed(initialFocusRef, function () {
357
361
  return setShowPane(false);
358
362
  });
359
- 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]);
360
- var separator = (selectedField === null || selectedField === void 0 || (_selectedField$separa = selectedField.separator) === null || _selectedField$separa === void 0 ? void 0 : _selectedField$separa.toLowerCase()) || t("neetoRules.common.as");
363
+ var isValid = errors.actions && isNotNil((_errors$actions = errors.actions) === null || _errors$actions === void 0 ? void 0 : (_errors$actions$value = _errors$actions.value) === null || _errors$actions$value === void 0 ? void 0 : _errors$actions$value[index]) && isNotNil((_touched$actions = touched.actions) === null || _touched$actions === void 0 ? void 0 : (_touched$actions$valu = _touched$actions.value) === null || _touched$actions$valu === void 0 ? void 0 : _touched$actions$valu[index]);
364
+ var separator = (selectedField === null || selectedField === void 0 ? void 0 : (_selectedField$separa = selectedField.separator) === null || _selectedField$separa === void 0 ? void 0 : _selectedField$separa.toLowerCase()) || t("neetoRules.common.as");
361
365
  var defaultLabel = (selectedField === null || selectedField === void 0 ? void 0 : selectedField.dataPlaceholder) || t("neetoRules.common.data");
362
366
  var templates = selectedField === null || selectedField === void 0 ? void 0 : selectedField.templates;
363
367
  var isTemplateSelectionEnabled = isPresent(templates);
@@ -431,7 +435,7 @@ var ApiFields = function ApiFields(_ref) {
431
435
  };
432
436
 
433
437
  var CustomAction = function CustomAction(_ref) {
434
- var _errors$actions, _touched$actions, _selectedField$separa;
438
+ var _errors$actions, _errors$actions$value, _touched$actions, _touched$actions$valu, _selectedField$separa;
435
439
  var ActionComponent = _ref.ActionComponent,
436
440
  name = _ref.name,
437
441
  action = _ref.action,
@@ -450,8 +454,8 @@ var CustomAction = function CustomAction(_ref) {
450
454
  useOnButtonPressed(initialFocusRef, function () {
451
455
  return setShowPane(false);
452
456
  });
453
- 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]);
454
- var separator = (selectedField === null || selectedField === void 0 || (_selectedField$separa = selectedField.separator) === null || _selectedField$separa === void 0 ? void 0 : _selectedField$separa.toLowerCase()) || t("neetoRules.common.as");
457
+ var isValid = errors.actions && isNotNil((_errors$actions = errors.actions) === null || _errors$actions === void 0 ? void 0 : (_errors$actions$value = _errors$actions.value) === null || _errors$actions$value === void 0 ? void 0 : _errors$actions$value[index]) && isNotNil((_touched$actions = touched.actions) === null || _touched$actions === void 0 ? void 0 : (_touched$actions$valu = _touched$actions.value) === null || _touched$actions$valu === void 0 ? void 0 : _touched$actions$valu[index]);
458
+ var separator = (selectedField === null || selectedField === void 0 ? void 0 : (_selectedField$separa = selectedField.separator) === null || _selectedField$separa === void 0 ? void 0 : _selectedField$separa.toLowerCase()) || t("neetoRules.common.as");
455
459
  var defaultLabel = selectedField === null || selectedField === void 0 ? void 0 : selectedField.placeholder;
456
460
  return /*#__PURE__*/jsxs(Fragment, {
457
461
  children: [/*#__PURE__*/jsx(Typography, {
@@ -500,7 +504,7 @@ var CustomAction = function CustomAction(_ref) {
500
504
  };
501
505
 
502
506
  var DateField$1 = function DateField(_ref) {
503
- var _actions$value$index$, _selectedField$separa, _errors$actions, _touched$actions;
507
+ var _actions$value$index$, _selectedField$separa, _errors$actions, _errors$actions$value, _touched$actions, _touched$actions$valu;
504
508
  var name = _ref.name,
505
509
  index = _ref.index,
506
510
  selectedField = _ref.selectedField;
@@ -518,8 +522,8 @@ var DateField$1 = function DateField(_ref) {
518
522
  t = _useTranslation.t;
519
523
  var valueTerm = (_actions$value$index$ = actions.value[index].metadata) === null || _actions$value$index$ === void 0 ? void 0 : _actions$value$index$.value;
520
524
  var label = valueTerm || t("neetoRules.form.selectDate");
521
- 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");
522
- 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]);
525
+ var separator = (selectedField === null || selectedField === void 0 ? void 0 : (_selectedField$separa = selectedField.separator) === null || _selectedField$separa === void 0 ? void 0 : _selectedField$separa.toLowerCase()) || t("neetoRules.common.to");
526
+ var isValid = errors.actions && isNotNil((_errors$actions = errors.actions) === null || _errors$actions === void 0 ? void 0 : (_errors$actions$value = _errors$actions.value) === null || _errors$actions$value === void 0 ? void 0 : _errors$actions$value[index]) && isNotNil((_touched$actions = touched.actions) === null || _touched$actions === void 0 ? void 0 : (_touched$actions$valu = _touched$actions.value) === null || _touched$actions$valu === void 0 ? void 0 : _touched$actions$valu[index]);
523
527
  return /*#__PURE__*/jsxs(Fragment, {
524
528
  children: [!selectedField.hideSeparator && /*#__PURE__*/jsx(Typography, {
525
529
  className: "neeto-ui-text-gray-700",
@@ -669,7 +673,7 @@ var getSlackChannelErrors = function getSlackChannelErrors(_ref2) {
669
673
  if (action !== null && action !== void 0 && (_action$metadata = action.metadata) !== null && _action$metadata !== void 0 && _action$metadata.value) {
670
674
  var selectedOption = opts.find(function (op) {
671
675
  var _action$metadata2;
672
- return (op === null || op === void 0 ? void 0 : op.value) === (action === null || action === void 0 || (_action$metadata2 = action.metadata) === null || _action$metadata2 === void 0 ? void 0 : _action$metadata2.value);
676
+ return (op === null || op === void 0 ? void 0 : op.value) === (action === null || action === void 0 ? void 0 : (_action$metadata2 = action.metadata) === null || _action$metadata2 === void 0 ? void 0 : _action$metadata2.value);
673
677
  });
674
678
  if (!selectedOption) {
675
679
  return {
@@ -686,7 +690,7 @@ var getSlackChannelErrors = function getSlackChannelErrors(_ref2) {
686
690
  var Menu$9 = Dropdown$1.Menu,
687
691
  MenuItem$9 = Dropdown$1.MenuItem;
688
692
  var DropdownField$1 = function DropdownField(_ref) {
689
- var _actions$value$index$, _actions$value$index, _errors$actions, _touched$actions, _selectedField$separa, _defaultSelectedOptio;
693
+ var _actions$value$index$, _actions$value$index, _errors$actions, _errors$actions$value, _touched$actions, _touched$actions$valu, _defaultSelectedOptio;
690
694
  var dropdownOptions = _ref.dropdownOptions,
691
695
  name = _ref.name,
692
696
  index = _ref.index,
@@ -716,8 +720,11 @@ var DropdownField$1 = function DropdownField(_ref) {
716
720
  setSearchTerm = _useState6[1];
717
721
  var defaultValue = ((_actions$value$index$ = actions.value[index].metadata) === null || _actions$value$index$ === void 0 ? void 0 : _actions$value$index$.value) || ((_actions$value$index = actions.value[index]) === null || _actions$value$index === void 0 ? void 0 : _actions$value$index.value);
718
722
  var searchedOptions = getSearchedOptions$3(dropdownOptions, searchTerm);
719
- var isValueSelected = defaultSelectedOption.label === defaultLabel && 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]);
720
- 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");
723
+ var isValueSelected = defaultSelectedOption.label === defaultLabel && errors.actions && isNotNil((_errors$actions = errors.actions) === null || _errors$actions === void 0 ? void 0 : (_errors$actions$value = _errors$actions.value) === null || _errors$actions$value === void 0 ? void 0 : _errors$actions$value[index]) && isNotNil((_touched$actions = touched.actions) === null || _touched$actions === void 0 ? void 0 : (_touched$actions$valu = _touched$actions.value) === null || _touched$actions$valu === void 0 ? void 0 : _touched$actions$valu[index]);
724
+ var separator = getSeparator({
725
+ defaultSeparator: t("neetoRules.common.to"),
726
+ selectedField: selectedField
727
+ });
721
728
  var handleClose = function handleClose() {
722
729
  setIsActive(false);
723
730
  setSearchTerm("");
@@ -760,7 +767,7 @@ var DropdownField$1 = function DropdownField(_ref) {
760
767
  className: "neeto-ui-bg-gray-100",
761
768
  customTarget: /*#__PURE__*/jsx(Button, {
762
769
  "data-cy": "action-dropdown-button",
763
- label: defaultSelectedOption === null || defaultSelectedOption === void 0 || (_defaultSelectedOptio = defaultSelectedOption.label) === null || _defaultSelectedOptio === void 0 ? void 0 : _defaultSelectedOptio.toLowerCase(),
770
+ label: defaultSelectedOption === null || defaultSelectedOption === void 0 ? void 0 : (_defaultSelectedOptio = defaultSelectedOption.label) === null || _defaultSelectedOptio === void 0 ? void 0 : _defaultSelectedOptio.toLowerCase(),
764
771
  style: "link",
765
772
  className: classNames("neeto-ui-text-gray-800 neeto-ui-font-semibold underline", {
766
773
  "neeto-ui-text-accent-800": isActive,
@@ -886,12 +893,14 @@ var EmailIdFields = function EmailIdFields(_ref) {
886
893
  };
887
894
 
888
895
  var EmailFields = function EmailFields(_ref) {
889
- var _errors$actions, _touched$actions, _selectedField$separa, _action$metadata;
896
+ var _errors$actions, _errors$actions$value, _touched$actions, _touched$actions$valu, _action$metadata;
890
897
  var _ref$isEmailIdField = _ref.isEmailIdField,
891
898
  isEmailIdField = _ref$isEmailIdField === void 0 ? false : _ref$isEmailIdField,
892
899
  name = _ref.name,
893
900
  action = _ref.action,
894
901
  selectedField = _ref.selectedField,
902
+ _ref$separatorIndex = _ref.separatorIndex,
903
+ separatorIndex = _ref$separatorIndex === void 0 ? 0 : _ref$separatorIndex,
895
904
  _ref$emails = _ref.emails,
896
905
  emails = _ref$emails === void 0 ? [] : _ref$emails,
897
906
  index = _ref.index;
@@ -910,8 +919,12 @@ var EmailFields = function EmailFields(_ref) {
910
919
  useOnButtonPressed(initialFocusRef, function () {
911
920
  return setShowPane(false);
912
921
  });
913
- 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]);
914
- var separator = (selectedField === null || selectedField === void 0 || (_selectedField$separa = selectedField.separator) === null || _selectedField$separa === void 0 ? void 0 : _selectedField$separa.toLowerCase()) || t("neetoRules.common.as");
922
+ var isValid = errors.actions && isNotNil((_errors$actions = errors.actions) === null || _errors$actions === void 0 ? void 0 : (_errors$actions$value = _errors$actions.value) === null || _errors$actions$value === void 0 ? void 0 : _errors$actions$value[index]) && isNotNil((_touched$actions = touched.actions) === null || _touched$actions === void 0 ? void 0 : (_touched$actions$valu = _touched$actions.value) === null || _touched$actions$valu === void 0 ? void 0 : _touched$actions$valu[index]);
923
+ var separator = getSeparator({
924
+ defaultSeparator: t("neetoRules.common.as"),
925
+ index: separatorIndex,
926
+ selectedField: selectedField
927
+ });
915
928
  var defaultLabel = (selectedField === null || selectedField === void 0 ? void 0 : selectedField.emailPlaceholder) || t("neetoRules.common.email");
916
929
  var templates = selectedField === null || selectedField === void 0 ? void 0 : selectedField.templates;
917
930
  var isTemplateSelectionEnabled = isPresent(templates);
@@ -1017,7 +1030,7 @@ var useCloseInputField = function useCloseInputField(ref, showInput, handler) {
1017
1030
  handler();
1018
1031
  }
1019
1032
  };
1020
- (_ref$current = ref.current) === null || _ref$current === void 0 || _ref$current.addEventListener("keydown", listener);
1033
+ (_ref$current = ref.current) === null || _ref$current === void 0 ? void 0 : _ref$current.addEventListener("keydown", listener);
1021
1034
  return function () {
1022
1035
  var _ref$current2;
1023
1036
  return (_ref$current2 = ref.current) === null || _ref$current2 === void 0 ? void 0 : _ref$current2.removeEventListener("keydown", listener);
@@ -1031,7 +1044,7 @@ var useCloseInputField = function useCloseInputField(ref, showInput, handler) {
1031
1044
  };
1032
1045
 
1033
1046
  var Input = function Input(_ref) {
1034
- var _action$metadata, _selectedField$separa, _errors$actions, _touched$actions;
1047
+ var _action$metadata, _selectedField$separa, _errors$actions, _errors$actions$value, _touched$actions, _touched$actions$valu;
1035
1048
  var name = _ref.name,
1036
1049
  index = _ref.index,
1037
1050
  selectedField = _ref.selectedField;
@@ -1052,8 +1065,8 @@ var Input = function Input(_ref) {
1052
1065
  var action = actions.value[index];
1053
1066
  var valueTerm = (_action$metadata = action.metadata) === null || _action$metadata === void 0 ? void 0 : _action$metadata.value;
1054
1067
  var label = valueTerm && isNotEmpty(valueTerm === null || valueTerm === void 0 ? void 0 : valueTerm.trim()) ? valueTerm : t("neetoRules.form.addValue");
1055
- 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");
1056
- 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]);
1068
+ var separator = (selectedField === null || selectedField === void 0 ? void 0 : (_selectedField$separa = selectedField.separator) === null || _selectedField$separa === void 0 ? void 0 : _selectedField$separa.toLowerCase()) || t("neetoRules.common.to");
1069
+ var isValid = errors.actions && isNotNil((_errors$actions = errors.actions) === null || _errors$actions === void 0 ? void 0 : (_errors$actions$value = _errors$actions.value) === null || _errors$actions$value === void 0 ? void 0 : _errors$actions$value[index]) && isNotNil((_touched$actions = touched.actions) === null || _touched$actions === void 0 ? void 0 : (_touched$actions$valu = _touched$actions.value) === null || _touched$actions$valu === void 0 ? void 0 : _touched$actions$valu[index]);
1057
1070
  useEffect(function () {
1058
1071
  setShowInput(false);
1059
1072
  }, [action.name]);
@@ -1197,7 +1210,7 @@ var InlineInput = /*#__PURE__*/forwardRef(function (props, ref) {
1197
1210
  InlineInput.displayName = "InlineInput";
1198
1211
 
1199
1212
  var ListField = function ListField(_ref) {
1200
- var _errors$actions, _touched$actions, _selectedField$separa;
1213
+ var _errors$actions, _errors$actions$value, _touched$actions, _touched$actions$valu, _selectedField$separa;
1201
1214
  var name = _ref.name,
1202
1215
  _ref$values = _ref.values,
1203
1216
  values = _ref$values === void 0 ? [] : _ref$values,
@@ -1220,8 +1233,8 @@ var ListField = function ListField(_ref) {
1220
1233
  useOnButtonPressed(initialFocusRef, function () {
1221
1234
  return setShowPane(false);
1222
1235
  });
1223
- 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]);
1224
- 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");
1236
+ var isValid = errors.actions && isNotNil((_errors$actions = errors.actions) === null || _errors$actions === void 0 ? void 0 : (_errors$actions$value = _errors$actions.value) === null || _errors$actions$value === void 0 ? void 0 : _errors$actions$value[index]) && isNotNil((_touched$actions = touched.actions) === null || _touched$actions === void 0 ? void 0 : (_touched$actions$valu = _touched$actions.value) === null || _touched$actions$valu === void 0 ? void 0 : _touched$actions$valu[index]);
1237
+ var separator = (selectedField === null || selectedField === void 0 ? void 0 : (_selectedField$separa = selectedField.separator) === null || _selectedField$separa === void 0 ? void 0 : _selectedField$separa.toLowerCase()) || t("neetoRules.common.to");
1225
1238
  return /*#__PURE__*/jsxs(Fragment, {
1226
1239
  children: [/*#__PURE__*/jsx(Typography, {
1227
1240
  className: "neeto-ui-text-gray-700",
@@ -1328,7 +1341,7 @@ var ListField = function ListField(_ref) {
1328
1341
  var Menu$8 = Dropdown$1.Menu,
1329
1342
  MenuItem$8 = Dropdown$1.MenuItem;
1330
1343
  var MultiSelect$1 = function MultiSelect(_ref) {
1331
- var _selectedField$placeh, _selectedField$separa, _errors$actions, _touched$actions;
1344
+ var _selectedField$placeh, _selectedField$separa, _errors$actions, _errors$actions$value, _touched$actions, _touched$actions$valu;
1332
1345
  var _ref$values = _ref.values,
1333
1346
  values = _ref$values === void 0 ? [] : _ref$values,
1334
1347
  _ref$dropDownOptions = _ref.dropDownOptions,
@@ -1357,10 +1370,10 @@ var MultiSelect$1 = function MultiSelect(_ref) {
1357
1370
  });
1358
1371
  }, [values, dropDownOptions]);
1359
1372
  var selectedOptions = getSelectedOptions(allOptions);
1360
- var defaultLabel = (selectedField === null || selectedField === void 0 || (_selectedField$placeh = selectedField.placeholder) === null || _selectedField$placeh === void 0 ? void 0 : _selectedField$placeh.toLowerCase()) || t("neetoRules.form.selectValues");
1373
+ var defaultLabel = (selectedField === null || selectedField === void 0 ? void 0 : (_selectedField$placeh = selectedField.placeholder) === null || _selectedField$placeh === void 0 ? void 0 : _selectedField$placeh.toLowerCase()) || t("neetoRules.form.selectValues");
1361
1374
  var searchedOptions = getSearchedOptions$3(dropDownOptions, searchTerm);
1362
- 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");
1363
- 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]);
1375
+ var separator = (selectedField === null || selectedField === void 0 ? void 0 : (_selectedField$separa = selectedField.separator) === null || _selectedField$separa === void 0 ? void 0 : _selectedField$separa.toLowerCase()) || t("neetoRules.common.to");
1376
+ var isValid = errors.actions && isNotNil((_errors$actions = errors.actions) === null || _errors$actions === void 0 ? void 0 : (_errors$actions$value = _errors$actions.value) === null || _errors$actions$value === void 0 ? void 0 : _errors$actions$value[index]) && isNotNil((_touched$actions = touched.actions) === null || _touched$actions === void 0 ? void 0 : (_touched$actions$valu = _touched$actions.value) === null || _touched$actions$valu === void 0 ? void 0 : _touched$actions$valu[index]);
1364
1377
  var handleSelectOption = function handleSelectOption(option) {
1365
1378
  var options = values.includes(option.value) ? without([option.value], values) : append(option.value, values);
1366
1379
  setFieldValue(name, options);
@@ -1461,7 +1474,7 @@ var MultiSelect$1 = function MultiSelect(_ref) {
1461
1474
  };
1462
1475
 
1463
1476
  var NoteField = function NoteField(_ref) {
1464
- var _errors$actions, _touched$actions, _selectedField$separa;
1477
+ var _errors$actions, _errors$actions$value, _touched$actions, _touched$actions$valu, _selectedField$separa;
1465
1478
  var name = _ref.name,
1466
1479
  _ref$value = _ref.value,
1467
1480
  value = _ref$value === void 0 ? "" : _ref$value,
@@ -1480,8 +1493,8 @@ var NoteField = function NoteField(_ref) {
1480
1493
  useOnButtonPressed(initialFocusRef, function () {
1481
1494
  return setShowPane(false);
1482
1495
  });
1483
- 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]);
1484
- var separator = (selectedField === null || selectedField === void 0 || (_selectedField$separa = selectedField.separator) === null || _selectedField$separa === void 0 ? void 0 : _selectedField$separa.toLowerCase()) || t("neetoRules.common.as");
1496
+ var isValid = errors.actions && isNotNil((_errors$actions = errors.actions) === null || _errors$actions === void 0 ? void 0 : (_errors$actions$value = _errors$actions.value) === null || _errors$actions$value === void 0 ? void 0 : _errors$actions$value[index]) && isNotNil((_touched$actions = touched.actions) === null || _touched$actions === void 0 ? void 0 : (_touched$actions$valu = _touched$actions.value) === null || _touched$actions$valu === void 0 ? void 0 : _touched$actions$valu[index]);
1497
+ var separator = (selectedField === null || selectedField === void 0 ? void 0 : (_selectedField$separa = selectedField.separator) === null || _selectedField$separa === void 0 ? void 0 : _selectedField$separa.toLowerCase()) || t("neetoRules.common.as");
1485
1498
  var variables = (selectedField === null || selectedField === void 0 ? void 0 : selectedField.variables) || [];
1486
1499
  var defaultLabel = (selectedField === null || selectedField === void 0 ? void 0 : selectedField.placeholder) || t("neetoRules.form.note");
1487
1500
  return /*#__PURE__*/jsxs(Fragment, {
@@ -1534,10 +1547,6 @@ var NoteField = function NoteField(_ref) {
1534
1547
  });
1535
1548
  };
1536
1549
 
1537
- function _toArray(arr) {
1538
- return _arrayWithHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableRest();
1539
- }
1540
-
1541
1550
  var removeDuplicateErrorMessages = pipe(filter(isNotNil), uniq, join(ERROR_MESSAGE_DELIMITER));
1542
1551
  var dasherize = function dasherize(input) {
1543
1552
  return hyphenize(input, "neeto-rules-input");
@@ -1791,12 +1800,14 @@ var PhoneNumberField = function PhoneNumberField(_ref) {
1791
1800
  };
1792
1801
 
1793
1802
  var SmsFields = function SmsFields(_ref) {
1794
- var _errors$actions, _touched$actions, _selectedField$separa, _action$metadata;
1803
+ var _errors$actions, _errors$actions$value, _touched$actions, _touched$actions$valu, _action$metadata;
1795
1804
  var name = _ref.name,
1796
1805
  action = _ref.action,
1797
1806
  selectedField = _ref.selectedField,
1798
1807
  _ref$phoneNumbers = _ref.phoneNumbers,
1799
1808
  phoneNumbers = _ref$phoneNumbers === void 0 ? [] : _ref$phoneNumbers,
1809
+ _ref$separatorIndex = _ref.separatorIndex,
1810
+ separatorIndex = _ref$separatorIndex === void 0 ? 0 : _ref$separatorIndex,
1800
1811
  _ref$showPhoneNumberI = _ref.showPhoneNumberInput,
1801
1812
  showPhoneNumberInput = _ref$showPhoneNumberI === void 0 ? false : _ref$showPhoneNumberI,
1802
1813
  index = _ref.index;
@@ -1815,8 +1826,12 @@ var SmsFields = function SmsFields(_ref) {
1815
1826
  useOnButtonPressed(initialFocusRef, function () {
1816
1827
  return setShowPane(false);
1817
1828
  });
1818
- 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]);
1819
- var separator = (selectedField === null || selectedField === void 0 || (_selectedField$separa = selectedField.separator) === null || _selectedField$separa === void 0 ? void 0 : _selectedField$separa.toLowerCase()) || t("neetoRules.common.as");
1829
+ var isValid = errors.actions && isNotNil((_errors$actions = errors.actions) === null || _errors$actions === void 0 ? void 0 : (_errors$actions$value = _errors$actions.value) === null || _errors$actions$value === void 0 ? void 0 : _errors$actions$value[index]) && isNotNil((_touched$actions = touched.actions) === null || _touched$actions === void 0 ? void 0 : (_touched$actions$valu = _touched$actions.value) === null || _touched$actions$valu === void 0 ? void 0 : _touched$actions$valu[index]);
1830
+ var separator = getSeparator({
1831
+ defaultSeparator: t("neetoRules.common.as"),
1832
+ index: separatorIndex,
1833
+ selectedField: selectedField
1834
+ });
1820
1835
  var defaultLabel = (selectedField === null || selectedField === void 0 ? void 0 : selectedField.smsPlaceholder) || t("neetoRules.common.sms");
1821
1836
  var templates = selectedField === null || selectedField === void 0 ? void 0 : selectedField.templates;
1822
1837
  var isTemplateSelectionEnabled = isPresent(templates);
@@ -1940,7 +1955,8 @@ var ActionSubItems = function ActionSubItems(_ref) {
1940
1955
  index: index,
1941
1956
  name: name,
1942
1957
  selectedField: selectedField,
1943
- key: name
1958
+ key: name,
1959
+ separatorIndex: 1
1944
1960
  })]
1945
1961
  });
1946
1962
  }
@@ -1978,7 +1994,8 @@ var ActionSubItems = function ActionSubItems(_ref) {
1978
1994
  index: index,
1979
1995
  name: name,
1980
1996
  selectedField: selectedField,
1981
- key: name
1997
+ key: name,
1998
+ separatorIndex: 1
1982
1999
  })]
1983
2000
  });
1984
2001
  }
@@ -2319,7 +2336,6 @@ var getValidationSchema = function getValidationSchema(data, customData) {
2319
2336
  return yup.object(schema);
2320
2337
  };
2321
2338
 
2322
- var _VALIDATION_SCHEMA;
2323
2339
  var FIELD_TYPES = {
2324
2340
  text: "text",
2325
2341
  longText: "long-text",
@@ -2331,7 +2347,7 @@ var FIELD_TYPES = {
2331
2347
  multiSelect: "multi-select"
2332
2348
  };
2333
2349
  var MAXIMUM_OPTION_LENGTH$1 = 7;
2334
- var VALIDATION_SCHEMA = (_VALIDATION_SCHEMA = {}, _defineProperty(_VALIDATION_SCHEMA, FIELD_TYPES.text, getSchemaForStrings), _defineProperty(_VALIDATION_SCHEMA, FIELD_TYPES.longText, getSchemaForStrings), _defineProperty(_VALIDATION_SCHEMA, FIELD_TYPES.dropdown, getSchemaForStrings), _defineProperty(_VALIDATION_SCHEMA, FIELD_TYPES.radio, getSchemaForStrings), _defineProperty(_VALIDATION_SCHEMA, FIELD_TYPES.events, getEventsSchema), _defineProperty(_VALIDATION_SCHEMA, FIELD_TYPES.condition, getConditionsSchema), _defineProperty(_VALIDATION_SCHEMA, FIELD_TYPES.actions, getActionsSchema), _defineProperty(_VALIDATION_SCHEMA, FIELD_TYPES.multiSelect, getSchemaForArray), _VALIDATION_SCHEMA);
2350
+ var VALIDATION_SCHEMA = _defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty({}, FIELD_TYPES.text, getSchemaForStrings), FIELD_TYPES.longText, getSchemaForStrings), FIELD_TYPES.dropdown, getSchemaForStrings), FIELD_TYPES.radio, getSchemaForStrings), FIELD_TYPES.events, getEventsSchema), FIELD_TYPES.condition, getConditionsSchema), FIELD_TYPES.actions, getActionsSchema), FIELD_TYPES.multiSelect, getSchemaForArray);
2335
2351
  var DECIMAL_NUMBER_REGEX = /^-?\d*\.?\d+$/;
2336
2352
  var NUMBER_REGEX = /^-?\d+$/;
2337
2353
  var POSITIVE_DECIMAL_NUMBER_REGEX = /^\d*\.?\d+$/;
@@ -2355,7 +2371,7 @@ var DEFAULT_INITIAL_VALUE = {
2355
2371
  var Menu$7 = Dropdown$1.Menu,
2356
2372
  MenuItem$7 = Dropdown$1.MenuItem;
2357
2373
  var ActionItem = function ActionItem(_ref) {
2358
- var _errors$actions, _touched$actions, _selectedOption$label;
2374
+ var _errors$actions, _errors$actions$value, _touched$actions, _touched$actions$valu, _selectedOption$label;
2359
2375
  var name = _ref.name,
2360
2376
  action = _ref.action,
2361
2377
  index = _ref.index,
@@ -2398,11 +2414,11 @@ var ActionItem = function ActionItem(_ref) {
2398
2414
  return getFieldDetails$1(action.name, actionOptions);
2399
2415
  }, [action, actionOptions]);
2400
2416
  var searchedOptions = getSearchedOptions$3(actionOptions, searchTerm);
2401
- var isActionSelected = (selectedOption === null || selectedOption === void 0 ? void 0 : selectedOption.label) === t("neetoRules.form.doThis") && errors.actions && touched.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]);
2417
+ var isActionSelected = (selectedOption === null || selectedOption === void 0 ? void 0 : selectedOption.label) === t("neetoRules.form.doThis") && errors.actions && touched.actions && isNotNil((_errors$actions = errors.actions) === null || _errors$actions === void 0 ? void 0 : (_errors$actions$value = _errors$actions.value) === null || _errors$actions$value === void 0 ? void 0 : _errors$actions$value[index]) && isNotNil((_touched$actions = touched.actions) === null || _touched$actions === void 0 ? void 0 : (_touched$actions$valu = _touched$actions.value) === null || _touched$actions$valu === void 0 ? void 0 : _touched$actions$valu[index]);
2402
2418
  var handleSelectOption = function handleSelectOption(option) {
2403
2419
  setFieldValue("".concat(name, ".name"), option.value);
2404
2420
  setFieldValue("".concat(name, ".metadata"), {});
2405
- onSelectAction === null || onSelectAction === void 0 || onSelectAction(name, option);
2421
+ onSelectAction === null || onSelectAction === void 0 ? void 0 : onSelectAction(name, option);
2406
2422
  setSearchTerm("");
2407
2423
  };
2408
2424
  var handleClose = function handleClose() {
@@ -2473,7 +2489,7 @@ var ActionItem = function ActionItem(_ref) {
2473
2489
  position: "bottom-start",
2474
2490
  customTarget: /*#__PURE__*/jsx(Button, {
2475
2491
  "data-cy": "action-dropdown-button",
2476
- label: selectedOption === null || selectedOption === void 0 || (_selectedOption$label = selectedOption.label) === null || _selectedOption$label === void 0 ? void 0 : _selectedOption$label.toLowerCase(),
2492
+ label: selectedOption === null || selectedOption === void 0 ? void 0 : (_selectedOption$label = selectedOption.label) === null || _selectedOption$label === void 0 ? void 0 : _selectedOption$label.toLowerCase(),
2477
2493
  style: "link",
2478
2494
  className: classNames("neeto-ui-text-gray-800 neeto-ui-font-semibold underline", {
2479
2495
  "neeto-ui-text-accent-800": isActive,
@@ -2730,7 +2746,7 @@ var DropdownField = function DropdownField(_ref) {
2730
2746
  position: "bottom-start",
2731
2747
  customTarget: /*#__PURE__*/jsx(Button, {
2732
2748
  "data-cy": "condition-".concat(fieldType, "-dropdown-button"),
2733
- label: selectedOption === null || selectedOption === void 0 || (_selectedOption$label = selectedOption.label) === null || _selectedOption$label === void 0 ? void 0 : _selectedOption$label.toLowerCase(),
2749
+ label: selectedOption === null || selectedOption === void 0 ? void 0 : (_selectedOption$label = selectedOption.label) === null || _selectedOption$label === void 0 ? void 0 : _selectedOption$label.toLowerCase(),
2734
2750
  style: "link",
2735
2751
  className: classNames("neeto-ui-text-gray-800 neeto-ui-font-semibold underline", {
2736
2752
  "neeto-ui-text-accent-800": isSelected
@@ -2786,7 +2802,7 @@ var DropdownField = function DropdownField(_ref) {
2786
2802
  var Menu$5 = Dropdown$1.Menu,
2787
2803
  MenuItem$5 = Dropdown$1.MenuItem;
2788
2804
  var Dropdown = function Dropdown(_ref) {
2789
- var _conditions$value$ind, _errors$conditions, _touched$conditions, _defaultSelectedOptio;
2805
+ var _conditions$value$ind, _errors$conditions, _errors$conditions$va, _touched$conditions, _touched$conditions$v, _defaultSelectedOptio;
2790
2806
  var name = _ref.name,
2791
2807
  options = _ref.options,
2792
2808
  index = _ref.index;
@@ -2815,7 +2831,7 @@ var Dropdown = function Dropdown(_ref) {
2815
2831
  setSearchTerm = _useState6[1];
2816
2832
  var defaultValue = (_conditions$value$ind = conditions.value[index].metadata) === null || _conditions$value$ind === void 0 ? void 0 : _conditions$value$ind.value;
2817
2833
  var searchedOptions = getSearchedOptions$2(options, searchTerm);
2818
- var isValueSelected = (defaultSelectedOption === null || defaultSelectedOption === void 0 ? void 0 : defaultSelectedOption.label) === defaultLabel && 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]);
2834
+ var isValueSelected = (defaultSelectedOption === null || defaultSelectedOption === void 0 ? void 0 : defaultSelectedOption.label) === defaultLabel && errors.conditions && isNotNil((_errors$conditions = errors.conditions) === null || _errors$conditions === void 0 ? void 0 : (_errors$conditions$va = _errors$conditions.value) === null || _errors$conditions$va === void 0 ? void 0 : _errors$conditions$va[index]) && isNotNil((_touched$conditions = touched.conditions) === null || _touched$conditions === void 0 ? void 0 : (_touched$conditions$v = _touched$conditions.value) === null || _touched$conditions$v === void 0 ? void 0 : _touched$conditions$v[index]);
2819
2835
  var handleClose = function handleClose() {
2820
2836
  setIsActive(false);
2821
2837
  setSearchTerm("");
@@ -2850,7 +2866,7 @@ var Dropdown = function Dropdown(_ref) {
2850
2866
  className: "neeto-ui-bg-gray-100",
2851
2867
  customTarget: /*#__PURE__*/jsx(Button, {
2852
2868
  "data-cy": "condition-value-dropdown-button",
2853
- label: defaultSelectedOption === null || defaultSelectedOption === void 0 || (_defaultSelectedOptio = defaultSelectedOption.label) === null || _defaultSelectedOptio === void 0 ? void 0 : _defaultSelectedOptio.toLowerCase(),
2869
+ label: defaultSelectedOption === null || defaultSelectedOption === void 0 ? void 0 : (_defaultSelectedOptio = defaultSelectedOption.label) === null || _defaultSelectedOptio === void 0 ? void 0 : _defaultSelectedOptio.toLowerCase(),
2854
2870
  style: "link",
2855
2871
  className: classNames("neeto-ui-text-gray-800 neeto-ui-font-semibold underline", {
2856
2872
  "neeto-ui-text-accent-800": isActive,
@@ -2904,7 +2920,7 @@ var Dropdown = function Dropdown(_ref) {
2904
2920
  };
2905
2921
 
2906
2922
  var InputField$1 = function InputField(_ref) {
2907
- var _condition$metadata, _errors$conditions, _touched$conditions;
2923
+ var _condition$metadata, _condition$metadata$v, _errors$conditions, _errors$conditions$va, _touched$conditions, _touched$conditions$v;
2908
2924
  var name = _ref.name,
2909
2925
  index = _ref.index,
2910
2926
  placeholder = _ref.placeholder;
@@ -2923,9 +2939,9 @@ var InputField$1 = function InputField(_ref) {
2923
2939
  return setShowInput(false);
2924
2940
  });
2925
2941
  var condition = conditions.value[index];
2926
- var valueTerm = (_condition$metadata = condition.metadata) === null || _condition$metadata === void 0 || (_condition$metadata = _condition$metadata.value) === null || _condition$metadata === void 0 ? void 0 : _condition$metadata.toString();
2942
+ var valueTerm = (_condition$metadata = condition.metadata) === null || _condition$metadata === void 0 ? void 0 : (_condition$metadata$v = _condition$metadata.value) === null || _condition$metadata$v === void 0 ? void 0 : _condition$metadata$v.toString();
2927
2943
  var label = valueTerm && valueTerm !== null && valueTerm !== void 0 && valueTerm.trim().length ? valueTerm : t("neetoRules.form.addValue");
2928
- 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]);
2944
+ var isValid = errors.conditions && isNotNil((_errors$conditions = errors.conditions) === null || _errors$conditions === void 0 ? void 0 : (_errors$conditions$va = _errors$conditions.value) === null || _errors$conditions$va === void 0 ? void 0 : _errors$conditions$va[index]) && isNotNil((_touched$conditions = touched.conditions) === null || _touched$conditions === void 0 ? void 0 : (_touched$conditions$v = _touched$conditions.value) === null || _touched$conditions$v === void 0 ? void 0 : _touched$conditions$v[index]);
2929
2945
  useEffect(function () {
2930
2946
  setShowInput(false);
2931
2947
  }, [condition.verb]);
@@ -2959,7 +2975,7 @@ var InputField$1 = function InputField(_ref) {
2959
2975
  var Menu$4 = Dropdown$1.Menu,
2960
2976
  MenuItem$4 = Dropdown$1.MenuItem;
2961
2977
  var MultiSelect = function MultiSelect(_ref) {
2962
- var _conditions$value$ind, _errors$conditions, _touched$conditions;
2978
+ var _conditions$value$ind, _conditions$value$ind2, _errors$conditions, _errors$conditions$va, _touched$conditions, _touched$conditions$v;
2963
2979
  var name = _ref.name,
2964
2980
  dropDownOptions = _ref.dropDownOptions,
2965
2981
  index = _ref.index;
@@ -2979,14 +2995,14 @@ var MultiSelect = function MultiSelect(_ref) {
2979
2995
  setSearchTerm = _useState4[1];
2980
2996
  var _useTranslation = useTranslation(),
2981
2997
  t = _useTranslation.t;
2982
- var values = (_conditions$value$ind = conditions.value[index]) === null || _conditions$value$ind === void 0 || (_conditions$value$ind = _conditions$value$ind.metadata) === null || _conditions$value$ind === void 0 ? void 0 : _conditions$value$ind.values;
2998
+ var values = (_conditions$value$ind = conditions.value[index]) === null || _conditions$value$ind === void 0 ? void 0 : (_conditions$value$ind2 = _conditions$value$ind.metadata) === null || _conditions$value$ind2 === void 0 ? void 0 : _conditions$value$ind2.values;
2983
2999
  var selectedOptions = values || [];
2984
3000
  var defaultLabel = t("neetoRules.form.selectValues");
2985
3001
  var options = dropDownOptions === null || dropDownOptions === void 0 ? void 0 : dropDownOptions.filter(function (option) {
2986
3002
  return selectedOptions === null || selectedOptions === void 0 ? void 0 : selectedOptions.includes(option.value);
2987
3003
  });
2988
3004
  var searchedOptions = getSearchedOptions$2(dropDownOptions, searchTerm);
2989
- 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]);
3005
+ var isValid = errors.conditions && isNotNil((_errors$conditions = errors.conditions) === null || _errors$conditions === void 0 ? void 0 : (_errors$conditions$va = _errors$conditions.value) === null || _errors$conditions$va === void 0 ? void 0 : _errors$conditions$va[index]) && isNotNil((_touched$conditions = touched.conditions) === null || _touched$conditions === void 0 ? void 0 : (_touched$conditions$v = _touched$conditions.value) === null || _touched$conditions$v === void 0 ? void 0 : _touched$conditions$v[index]);
2990
3006
  var handleMultiSelectOption = function handleMultiSelectOption(value) {
2991
3007
  var options = selectedOptions !== null && selectedOptions !== void 0 && selectedOptions.includes(value) ? without([value], selectedOptions) : append(value, selectedOptions);
2992
3008
  setFieldValue(name, options);
@@ -3012,7 +3028,7 @@ var MultiSelect = function MultiSelect(_ref) {
3012
3028
  children: t("neetoRules.common.or")
3013
3029
  }), /*#__PURE__*/jsx(Button, {
3014
3030
  "data-cy": "condition-value-multi-select-field",
3015
- label: option === null || option === void 0 || (_option$label = option.label) === null || _option$label === void 0 ? void 0 : _option$label.toLowerCase(),
3031
+ label: option === null || option === void 0 ? void 0 : (_option$label = option.label) === null || _option$label === void 0 ? void 0 : _option$label.toLowerCase(),
3016
3032
  style: "link",
3017
3033
  className: classNames("neeto-ui-text-gray-800 neeto-ui-font-semibold underline", {
3018
3034
  "neeto-ui-text-accent-800": activeOption === option.value
@@ -3078,7 +3094,7 @@ var _excluded$7 = ["name", "index"];
3078
3094
  function ownKeys$c(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; }
3079
3095
  function _objectSpread$c(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$c(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$c(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
3080
3096
  var MultiSelectCreate = function MultiSelectCreate(_ref) {
3081
- var _conditions$value$ind, _errors$conditions, _touched$conditions;
3097
+ var _conditions$value$ind, _conditions$value$ind2, _errors$conditions, _errors$conditions$va, _touched$conditions, _touched$conditions$v;
3082
3098
  var name = _ref.name,
3083
3099
  index = _ref.index,
3084
3100
  props = _objectWithoutProperties(_ref, _excluded$7);
@@ -3098,10 +3114,10 @@ var MultiSelectCreate = function MultiSelectCreate(_ref) {
3098
3114
  useOnButtonPressed(initialFocusRef, function () {
3099
3115
  return setShowPane(false);
3100
3116
  });
3101
- var values = (_conditions$value$ind = conditions.value[index]) === null || _conditions$value$ind === void 0 || (_conditions$value$ind = _conditions$value$ind.metadata) === null || _conditions$value$ind === void 0 ? void 0 : _conditions$value$ind.values;
3117
+ var values = (_conditions$value$ind = conditions.value[index]) === null || _conditions$value$ind === void 0 ? void 0 : (_conditions$value$ind2 = _conditions$value$ind.metadata) === null || _conditions$value$ind2 === void 0 ? void 0 : _conditions$value$ind2.values;
3102
3118
  var allOptions = getAllOptions(values);
3103
3119
  var defaultLabel = t("neetoRules.form.selectValues");
3104
- 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]);
3120
+ var isValid = errors.conditions && isNotNil((_errors$conditions = errors.conditions) === null || _errors$conditions === void 0 ? void 0 : (_errors$conditions$va = _errors$conditions.value) === null || _errors$conditions$va === void 0 ? void 0 : _errors$conditions$va[index]) && isNotNil((_touched$conditions = touched.conditions) === null || _touched$conditions === void 0 ? void 0 : (_touched$conditions$v = _touched$conditions.value) === null || _touched$conditions$v === void 0 ? void 0 : _touched$conditions$v[index]);
3105
3121
  return /*#__PURE__*/jsxs(Fragment, {
3106
3122
  children: [isEmpty(allOptions) && /*#__PURE__*/jsx(Button, {
3107
3123
  "data-cy": "condition-value-multi-select-create-button",
@@ -3172,388 +3188,8 @@ var MultiSelectCreate = function MultiSelectCreate(_ref) {
3172
3188
  });
3173
3189
  };
3174
3190
 
3175
- function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) {
3176
- try {
3177
- var info = gen[key](arg);
3178
- var value = info.value;
3179
- } catch (error) {
3180
- reject(error);
3181
- return;
3182
- }
3183
- if (info.done) {
3184
- resolve(value);
3185
- } else {
3186
- Promise.resolve(value).then(_next, _throw);
3187
- }
3188
- }
3189
- function _asyncToGenerator(fn) {
3190
- return function () {
3191
- var self = this,
3192
- args = arguments;
3193
- return new Promise(function (resolve, reject) {
3194
- var gen = fn.apply(self, args);
3195
- function _next(value) {
3196
- asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value);
3197
- }
3198
- function _throw(err) {
3199
- asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err);
3200
- }
3201
- _next(undefined);
3202
- });
3203
- };
3204
- }
3205
-
3206
- var regeneratorRuntime$1 = {exports: {}};
3207
-
3208
- var _typeof = {exports: {}};
3209
-
3210
- _typeof.exports;
3211
-
3212
- (function (module) {
3213
- function _typeof(o) {
3214
- "@babel/helpers - typeof";
3215
-
3216
- return (module.exports = _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) {
3217
- return typeof o;
3218
- } : function (o) {
3219
- return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o;
3220
- }, module.exports.__esModule = true, module.exports["default"] = module.exports), _typeof(o);
3221
- }
3222
- module.exports = _typeof, module.exports.__esModule = true, module.exports["default"] = module.exports;
3223
- } (_typeof));
3224
-
3225
- var _typeofExports = _typeof.exports;
3226
-
3227
- regeneratorRuntime$1.exports;
3228
-
3229
- (function (module) {
3230
- var _typeof = _typeofExports["default"];
3231
- function _regeneratorRuntime() {
3232
- module.exports = _regeneratorRuntime = function _regeneratorRuntime() {
3233
- return e;
3234
- }, module.exports.__esModule = true, module.exports["default"] = module.exports;
3235
- var t,
3236
- e = {},
3237
- r = Object.prototype,
3238
- n = r.hasOwnProperty,
3239
- o = Object.defineProperty || function (t, e, r) {
3240
- t[e] = r.value;
3241
- },
3242
- i = "function" == typeof Symbol ? Symbol : {},
3243
- a = i.iterator || "@@iterator",
3244
- c = i.asyncIterator || "@@asyncIterator",
3245
- u = i.toStringTag || "@@toStringTag";
3246
- function define(t, e, r) {
3247
- return Object.defineProperty(t, e, {
3248
- value: r,
3249
- enumerable: !0,
3250
- configurable: !0,
3251
- writable: !0
3252
- }), t[e];
3253
- }
3254
- try {
3255
- define({}, "");
3256
- } catch (t) {
3257
- define = function define(t, e, r) {
3258
- return t[e] = r;
3259
- };
3260
- }
3261
- function wrap(t, e, r, n) {
3262
- var i = e && e.prototype instanceof Generator ? e : Generator,
3263
- a = Object.create(i.prototype),
3264
- c = new Context(n || []);
3265
- return o(a, "_invoke", {
3266
- value: makeInvokeMethod(t, r, c)
3267
- }), a;
3268
- }
3269
- function tryCatch(t, e, r) {
3270
- try {
3271
- return {
3272
- type: "normal",
3273
- arg: t.call(e, r)
3274
- };
3275
- } catch (t) {
3276
- return {
3277
- type: "throw",
3278
- arg: t
3279
- };
3280
- }
3281
- }
3282
- e.wrap = wrap;
3283
- var h = "suspendedStart",
3284
- l = "suspendedYield",
3285
- f = "executing",
3286
- s = "completed",
3287
- y = {};
3288
- function Generator() {}
3289
- function GeneratorFunction() {}
3290
- function GeneratorFunctionPrototype() {}
3291
- var p = {};
3292
- define(p, a, function () {
3293
- return this;
3294
- });
3295
- var d = Object.getPrototypeOf,
3296
- v = d && d(d(values([])));
3297
- v && v !== r && n.call(v, a) && (p = v);
3298
- var g = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(p);
3299
- function defineIteratorMethods(t) {
3300
- ["next", "throw", "return"].forEach(function (e) {
3301
- define(t, e, function (t) {
3302
- return this._invoke(e, t);
3303
- });
3304
- });
3305
- }
3306
- function AsyncIterator(t, e) {
3307
- function invoke(r, o, i, a) {
3308
- var c = tryCatch(t[r], t, o);
3309
- if ("throw" !== c.type) {
3310
- var u = c.arg,
3311
- h = u.value;
3312
- return h && "object" == _typeof(h) && n.call(h, "__await") ? e.resolve(h.__await).then(function (t) {
3313
- invoke("next", t, i, a);
3314
- }, function (t) {
3315
- invoke("throw", t, i, a);
3316
- }) : e.resolve(h).then(function (t) {
3317
- u.value = t, i(u);
3318
- }, function (t) {
3319
- return invoke("throw", t, i, a);
3320
- });
3321
- }
3322
- a(c.arg);
3323
- }
3324
- var r;
3325
- o(this, "_invoke", {
3326
- value: function value(t, n) {
3327
- function callInvokeWithMethodAndArg() {
3328
- return new e(function (e, r) {
3329
- invoke(t, n, e, r);
3330
- });
3331
- }
3332
- return r = r ? r.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg();
3333
- }
3334
- });
3335
- }
3336
- function makeInvokeMethod(e, r, n) {
3337
- var o = h;
3338
- return function (i, a) {
3339
- if (o === f) throw new Error("Generator is already running");
3340
- if (o === s) {
3341
- if ("throw" === i) throw a;
3342
- return {
3343
- value: t,
3344
- done: !0
3345
- };
3346
- }
3347
- for (n.method = i, n.arg = a;;) {
3348
- var c = n.delegate;
3349
- if (c) {
3350
- var u = maybeInvokeDelegate(c, n);
3351
- if (u) {
3352
- if (u === y) continue;
3353
- return u;
3354
- }
3355
- }
3356
- if ("next" === n.method) n.sent = n._sent = n.arg;else if ("throw" === n.method) {
3357
- if (o === h) throw o = s, n.arg;
3358
- n.dispatchException(n.arg);
3359
- } else "return" === n.method && n.abrupt("return", n.arg);
3360
- o = f;
3361
- var p = tryCatch(e, r, n);
3362
- if ("normal" === p.type) {
3363
- if (o = n.done ? s : l, p.arg === y) continue;
3364
- return {
3365
- value: p.arg,
3366
- done: n.done
3367
- };
3368
- }
3369
- "throw" === p.type && (o = s, n.method = "throw", n.arg = p.arg);
3370
- }
3371
- };
3372
- }
3373
- function maybeInvokeDelegate(e, r) {
3374
- var n = r.method,
3375
- o = e.iterator[n];
3376
- if (o === t) return r.delegate = null, "throw" === n && e.iterator["return"] && (r.method = "return", r.arg = t, maybeInvokeDelegate(e, r), "throw" === r.method) || "return" !== n && (r.method = "throw", r.arg = new TypeError("The iterator does not provide a '" + n + "' method")), y;
3377
- var i = tryCatch(o, e.iterator, r.arg);
3378
- if ("throw" === i.type) return r.method = "throw", r.arg = i.arg, r.delegate = null, y;
3379
- var a = i.arg;
3380
- return a ? a.done ? (r[e.resultName] = a.value, r.next = e.nextLoc, "return" !== r.method && (r.method = "next", r.arg = t), r.delegate = null, y) : a : (r.method = "throw", r.arg = new TypeError("iterator result is not an object"), r.delegate = null, y);
3381
- }
3382
- function pushTryEntry(t) {
3383
- var e = {
3384
- tryLoc: t[0]
3385
- };
3386
- 1 in t && (e.catchLoc = t[1]), 2 in t && (e.finallyLoc = t[2], e.afterLoc = t[3]), this.tryEntries.push(e);
3387
- }
3388
- function resetTryEntry(t) {
3389
- var e = t.completion || {};
3390
- e.type = "normal", delete e.arg, t.completion = e;
3391
- }
3392
- function Context(t) {
3393
- this.tryEntries = [{
3394
- tryLoc: "root"
3395
- }], t.forEach(pushTryEntry, this), this.reset(!0);
3396
- }
3397
- function values(e) {
3398
- if (e || "" === e) {
3399
- var r = e[a];
3400
- if (r) return r.call(e);
3401
- if ("function" == typeof e.next) return e;
3402
- if (!isNaN(e.length)) {
3403
- var o = -1,
3404
- i = function next() {
3405
- for (; ++o < e.length;) if (n.call(e, o)) return next.value = e[o], next.done = !1, next;
3406
- return next.value = t, next.done = !0, next;
3407
- };
3408
- return i.next = i;
3409
- }
3410
- }
3411
- throw new TypeError(_typeof(e) + " is not iterable");
3412
- }
3413
- return GeneratorFunction.prototype = GeneratorFunctionPrototype, o(g, "constructor", {
3414
- value: GeneratorFunctionPrototype,
3415
- configurable: !0
3416
- }), o(GeneratorFunctionPrototype, "constructor", {
3417
- value: GeneratorFunction,
3418
- configurable: !0
3419
- }), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, u, "GeneratorFunction"), e.isGeneratorFunction = function (t) {
3420
- var e = "function" == typeof t && t.constructor;
3421
- return !!e && (e === GeneratorFunction || "GeneratorFunction" === (e.displayName || e.name));
3422
- }, e.mark = function (t) {
3423
- return Object.setPrototypeOf ? Object.setPrototypeOf(t, GeneratorFunctionPrototype) : (t.__proto__ = GeneratorFunctionPrototype, define(t, u, "GeneratorFunction")), t.prototype = Object.create(g), t;
3424
- }, e.awrap = function (t) {
3425
- return {
3426
- __await: t
3427
- };
3428
- }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, c, function () {
3429
- return this;
3430
- }), e.AsyncIterator = AsyncIterator, e.async = function (t, r, n, o, i) {
3431
- void 0 === i && (i = Promise);
3432
- var a = new AsyncIterator(wrap(t, r, n, o), i);
3433
- return e.isGeneratorFunction(r) ? a : a.next().then(function (t) {
3434
- return t.done ? t.value : a.next();
3435
- });
3436
- }, defineIteratorMethods(g), define(g, u, "Generator"), define(g, a, function () {
3437
- return this;
3438
- }), define(g, "toString", function () {
3439
- return "[object Generator]";
3440
- }), e.keys = function (t) {
3441
- var e = Object(t),
3442
- r = [];
3443
- for (var n in e) r.push(n);
3444
- return r.reverse(), function next() {
3445
- for (; r.length;) {
3446
- var t = r.pop();
3447
- if (t in e) return next.value = t, next.done = !1, next;
3448
- }
3449
- return next.done = !0, next;
3450
- };
3451
- }, e.values = values, Context.prototype = {
3452
- constructor: Context,
3453
- reset: function reset(e) {
3454
- if (this.prev = 0, this.next = 0, this.sent = this._sent = t, this.done = !1, this.delegate = null, this.method = "next", this.arg = t, this.tryEntries.forEach(resetTryEntry), !e) for (var r in this) "t" === r.charAt(0) && n.call(this, r) && !isNaN(+r.slice(1)) && (this[r] = t);
3455
- },
3456
- stop: function stop() {
3457
- this.done = !0;
3458
- var t = this.tryEntries[0].completion;
3459
- if ("throw" === t.type) throw t.arg;
3460
- return this.rval;
3461
- },
3462
- dispatchException: function dispatchException(e) {
3463
- if (this.done) throw e;
3464
- var r = this;
3465
- function handle(n, o) {
3466
- return a.type = "throw", a.arg = e, r.next = n, o && (r.method = "next", r.arg = t), !!o;
3467
- }
3468
- for (var o = this.tryEntries.length - 1; o >= 0; --o) {
3469
- var i = this.tryEntries[o],
3470
- a = i.completion;
3471
- if ("root" === i.tryLoc) return handle("end");
3472
- if (i.tryLoc <= this.prev) {
3473
- var c = n.call(i, "catchLoc"),
3474
- u = n.call(i, "finallyLoc");
3475
- if (c && u) {
3476
- if (this.prev < i.catchLoc) return handle(i.catchLoc, !0);
3477
- if (this.prev < i.finallyLoc) return handle(i.finallyLoc);
3478
- } else if (c) {
3479
- if (this.prev < i.catchLoc) return handle(i.catchLoc, !0);
3480
- } else {
3481
- if (!u) throw new Error("try statement without catch or finally");
3482
- if (this.prev < i.finallyLoc) return handle(i.finallyLoc);
3483
- }
3484
- }
3485
- }
3486
- },
3487
- abrupt: function abrupt(t, e) {
3488
- for (var r = this.tryEntries.length - 1; r >= 0; --r) {
3489
- var o = this.tryEntries[r];
3490
- if (o.tryLoc <= this.prev && n.call(o, "finallyLoc") && this.prev < o.finallyLoc) {
3491
- var i = o;
3492
- break;
3493
- }
3494
- }
3495
- i && ("break" === t || "continue" === t) && i.tryLoc <= e && e <= i.finallyLoc && (i = null);
3496
- var a = i ? i.completion : {};
3497
- return a.type = t, a.arg = e, i ? (this.method = "next", this.next = i.finallyLoc, y) : this.complete(a);
3498
- },
3499
- complete: function complete(t, e) {
3500
- if ("throw" === t.type) throw t.arg;
3501
- return "break" === t.type || "continue" === t.type ? this.next = t.arg : "return" === t.type ? (this.rval = this.arg = t.arg, this.method = "return", this.next = "end") : "normal" === t.type && e && (this.next = e), y;
3502
- },
3503
- finish: function finish(t) {
3504
- for (var e = this.tryEntries.length - 1; e >= 0; --e) {
3505
- var r = this.tryEntries[e];
3506
- if (r.finallyLoc === t) return this.complete(r.completion, r.afterLoc), resetTryEntry(r), y;
3507
- }
3508
- },
3509
- "catch": function _catch(t) {
3510
- for (var e = this.tryEntries.length - 1; e >= 0; --e) {
3511
- var r = this.tryEntries[e];
3512
- if (r.tryLoc === t) {
3513
- var n = r.completion;
3514
- if ("throw" === n.type) {
3515
- var o = n.arg;
3516
- resetTryEntry(r);
3517
- }
3518
- return o;
3519
- }
3520
- }
3521
- throw new Error("illegal catch attempt");
3522
- },
3523
- delegateYield: function delegateYield(e, r, n) {
3524
- return this.delegate = {
3525
- iterator: values(e),
3526
- resultName: r,
3527
- nextLoc: n
3528
- }, "next" === this.method && (this.arg = t), y;
3529
- }
3530
- }, e;
3531
- }
3532
- module.exports = _regeneratorRuntime, module.exports.__esModule = true, module.exports["default"] = module.exports;
3533
- } (regeneratorRuntime$1));
3534
-
3535
- var regeneratorRuntimeExports = regeneratorRuntime$1.exports;
3536
-
3537
- // TODO(Babel 8): Remove this file.
3538
-
3539
- var runtime = regeneratorRuntimeExports();
3540
- var regenerator = runtime;
3541
-
3542
- // Copied from https://github.com/facebook/regenerator/blob/main/packages/runtime/runtime.js#L736=
3543
- try {
3544
- regeneratorRuntime = runtime;
3545
- } catch (accidentalStrictMode) {
3546
- if (typeof globalThis === "object") {
3547
- globalThis.regeneratorRuntime = runtime;
3548
- } else {
3549
- Function("r", "regeneratorRuntime = r")(runtime);
3550
- }
3551
- }
3552
-
3553
- var _regeneratorRuntime = /*@__PURE__*/getDefaultExportFromCjs(regenerator);
3554
-
3555
3191
  var DateField = function DateField(_ref) {
3556
- var _conditions$value$ind, _errors$conditions, _touched$conditions;
3192
+ var _conditions$value$ind, _errors$conditions, _errors$conditions$va, _touched$conditions, _touched$conditions$v;
3557
3193
  var name = _ref.name,
3558
3194
  index = _ref.index,
3559
3195
  conditionName = _ref.conditionName;
@@ -3572,9 +3208,9 @@ var DateField = function DateField(_ref) {
3572
3208
  t = _useTranslation.t;
3573
3209
  var valueTerm = (_conditions$value$ind = conditions.value[index].metadata) === null || _conditions$value$ind === void 0 ? void 0 : _conditions$value$ind.value;
3574
3210
  var label = valueTerm || t("neetoRules.form.selectDate");
3575
- 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]);
3211
+ var isValid = errors.conditions && isNotNil((_errors$conditions = errors.conditions) === null || _errors$conditions === void 0 ? void 0 : (_errors$conditions$va = _errors$conditions.value) === null || _errors$conditions$va === void 0 ? void 0 : _errors$conditions$va[index]) && isNotNil((_touched$conditions = touched.conditions) === null || _touched$conditions === void 0 ? void 0 : (_touched$conditions$v = _touched$conditions.value) === null || _touched$conditions$v === void 0 ? void 0 : _touched$conditions$v[index]);
3576
3212
  var handleValidate = /*#__PURE__*/function () {
3577
- var _ref2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee() {
3213
+ var _ref2 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee() {
3578
3214
  return _regeneratorRuntime.wrap(function _callee$(_context) {
3579
3215
  while (1) switch (_context.prev = _context.next) {
3580
3216
  case 0:
@@ -3743,7 +3379,7 @@ var ConditionItem = function ConditionItem(_ref) {
3743
3379
  setFieldValue("".concat(name, ".verb"), fieldDetails === null || fieldDetails === void 0 ? void 0 : fieldDetails.allowMatching[0]);
3744
3380
  setFieldValue("".concat(name, ".kind"), fieldDetails === null || fieldDetails === void 0 ? void 0 : fieldDetails.kind);
3745
3381
  setFieldValue("".concat(name, ".metadata"), {});
3746
- onSelectCondition === null || onSelectCondition === void 0 || onSelectCondition(name, option);
3382
+ onSelectCondition === null || onSelectCondition === void 0 ? void 0 : onSelectCondition(name, option);
3747
3383
  };
3748
3384
  var handleVerbChange = function handleVerbChange(_ref2) {
3749
3385
  var value = _ref2.value;
@@ -3830,7 +3466,8 @@ var Conditions = function Conditions(_ref) {
3830
3466
  var _elementProps$conditi;
3831
3467
  arrayHelpers.push({
3832
3468
  field: elementProps === null || elementProps === void 0 ? void 0 : elementProps.conditionOptions[0].value,
3833
- verb: elementProps === null || elementProps === void 0 || (_elementProps$conditi = elementProps.conditionOptions[0]) === null || _elementProps$conditi === void 0 ? void 0 : _elementProps$conditi.allowMatching[0],
3469
+ kind: elementProps === null || elementProps === void 0 ? void 0 : elementProps.conditionOptions[0].kind,
3470
+ verb: elementProps === null || elementProps === void 0 ? void 0 : (_elementProps$conditi = elementProps.conditionOptions[0]) === null || _elementProps$conditi === void 0 ? void 0 : _elementProps$conditi.allowMatching[0],
3834
3471
  joinType: logicOperation,
3835
3472
  metadata: {}
3836
3473
  });
@@ -4031,7 +3668,7 @@ var Performer$1 = function Performer(_ref) {
4031
3668
  className: "neeto-ui-bg-gray-100",
4032
3669
  customTarget: /*#__PURE__*/jsx(Button, {
4033
3670
  "data-cy": "event-performer-dropdown",
4034
- label: selectedOption === null || selectedOption === void 0 || (_selectedOption$label = selectedOption.label) === null || _selectedOption$label === void 0 ? void 0 : _selectedOption$label.toLowerCase(),
3671
+ label: selectedOption === null || selectedOption === void 0 ? void 0 : (_selectedOption$label = selectedOption.label) === null || _selectedOption$label === void 0 ? void 0 : _selectedOption$label.toLowerCase(),
4035
3672
  style: "link",
4036
3673
  className: classNames(" neeto-ui-text-gray-800 neeto-ui-font-semibold underline", {
4037
3674
  "neeto-ui-text-accent-800": isSelected,
@@ -4174,7 +3811,7 @@ var Events$1 = function Events(_ref) {
4174
3811
  }, options) : [].concat(_toConsumableArray(options), [{
4175
3812
  name: option.value
4176
3813
  }]);
4177
- onSelectEvent === null || onSelectEvent === void 0 || onSelectEvent(name, options);
3814
+ onSelectEvent === null || onSelectEvent === void 0 ? void 0 : onSelectEvent(name, options);
4178
3815
  setFieldValue("".concat(name, ".value"), options);
4179
3816
  };
4180
3817
  var handleClose = function handleClose() {
@@ -4206,7 +3843,7 @@ var Events$1 = function Events(_ref) {
4206
3843
  children: t("neetoRules.common.or")
4207
3844
  }), /*#__PURE__*/jsx(Button, {
4208
3845
  "data-cy": "condition-value-multi-select-field",
4209
- label: event === null || event === void 0 || (_event$label = event.label) === null || _event$label === void 0 ? void 0 : _event$label.toLowerCase(),
3846
+ label: event === null || event === void 0 ? void 0 : (_event$label = event.label) === null || _event$label === void 0 ? void 0 : _event$label.toLowerCase(),
4210
3847
  style: "link",
4211
3848
  className: classNames("neeto-ui-text-gray-800 neeto-ui-font-semibold underline", {
4212
3849
  "neeto-ui-text-accent-800": activeOption === event.value
@@ -4297,7 +3934,8 @@ var EventConditions = function EventConditions(_ref) {
4297
3934
  var _conditionProps$condi;
4298
3935
  setFieldValue("".concat(conditionsName, ".value"), [{
4299
3936
  field: conditionProps === null || conditionProps === void 0 ? void 0 : conditionProps.conditionOptions[0].value,
4300
- verb: conditionProps === null || conditionProps === void 0 || (_conditionProps$condi = conditionProps.conditionOptions[0]) === null || _conditionProps$condi === void 0 ? void 0 : _conditionProps$condi.allowMatching[0],
3937
+ kind: conditionProps === null || conditionProps === void 0 ? void 0 : conditionProps.conditionOptions[0].kind,
3938
+ verb: conditionProps === null || conditionProps === void 0 ? void 0 : (_conditionProps$condi = conditionProps.conditionOptions[0]) === null || _conditionProps$condi === void 0 ? void 0 : _conditionProps$condi.allowMatching[0],
4301
3939
  joinType: OPERATORS.or,
4302
3940
  metadata: {}
4303
3941
  }]);
@@ -4398,7 +4036,7 @@ var EventItem = function EventItem(_ref) {
4398
4036
  var events = values[parentName].value || [];
4399
4037
  var handleEventChange = function handleEventChange(option) {
4400
4038
  setFieldValue(name, option.value);
4401
- onSelectEvent === null || onSelectEvent === void 0 || onSelectEvent(name, option);
4039
+ onSelectEvent === null || onSelectEvent === void 0 ? void 0 : onSelectEvent(name, option);
4402
4040
  setSelectedOption(option.label);
4403
4041
  };
4404
4042
  var eventOptions = useMemo(function () {
@@ -4550,7 +4188,7 @@ var Performer = function Performer(_ref) {
4550
4188
  closeOnSelect: false,
4551
4189
  customTarget: /*#__PURE__*/jsx(Button, {
4552
4190
  "data-cy": "event-performer-dropdown",
4553
- label: selectedOption === null || selectedOption === void 0 || (_selectedOption$label = selectedOption.label) === null || _selectedOption$label === void 0 ? void 0 : _selectedOption$label.toLowerCase(),
4191
+ label: selectedOption === null || selectedOption === void 0 ? void 0 : (_selectedOption$label = selectedOption.label) === null || _selectedOption$label === void 0 ? void 0 : _selectedOption$label.toLowerCase(),
4554
4192
  style: "link",
4555
4193
  className: classNames("neeto-ui-text-gray-800 neeto-ui-font-semibold underline", {
4556
4194
  "neeto-ui-text-accent-800": isSelected,
@@ -4899,97 +4537,6 @@ var TextareaField = function TextareaField(_ref) {
4899
4537
  }, componentProps));
4900
4538
  };
4901
4539
 
4902
- var propTypes = {exports: {}};
4903
-
4904
- /**
4905
- * Copyright (c) 2013-present, Facebook, Inc.
4906
- *
4907
- * This source code is licensed under the MIT license found in the
4908
- * LICENSE file in the root directory of this source tree.
4909
- */
4910
-
4911
- var ReactPropTypesSecret$1 = 'SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED';
4912
-
4913
- var ReactPropTypesSecret_1 = ReactPropTypesSecret$1;
4914
-
4915
- /**
4916
- * Copyright (c) 2013-present, Facebook, Inc.
4917
- *
4918
- * This source code is licensed under the MIT license found in the
4919
- * LICENSE file in the root directory of this source tree.
4920
- */
4921
-
4922
- var ReactPropTypesSecret = ReactPropTypesSecret_1;
4923
-
4924
- function emptyFunction() {}
4925
- function emptyFunctionWithReset() {}
4926
- emptyFunctionWithReset.resetWarningCache = emptyFunction;
4927
-
4928
- var factoryWithThrowingShims = function() {
4929
- function shim(props, propName, componentName, location, propFullName, secret) {
4930
- if (secret === ReactPropTypesSecret) {
4931
- // It is still safe when called from React.
4932
- return;
4933
- }
4934
- var err = new Error(
4935
- 'Calling PropTypes validators directly is not supported by the `prop-types` package. ' +
4936
- 'Use PropTypes.checkPropTypes() to call them. ' +
4937
- 'Read more at http://fb.me/use-check-prop-types'
4938
- );
4939
- err.name = 'Invariant Violation';
4940
- throw err;
4941
- } shim.isRequired = shim;
4942
- function getShim() {
4943
- return shim;
4944
- } // Important!
4945
- // Keep this list in sync with production version in `./factoryWithTypeCheckers.js`.
4946
- var ReactPropTypes = {
4947
- array: shim,
4948
- bigint: shim,
4949
- bool: shim,
4950
- func: shim,
4951
- number: shim,
4952
- object: shim,
4953
- string: shim,
4954
- symbol: shim,
4955
-
4956
- any: shim,
4957
- arrayOf: getShim,
4958
- element: shim,
4959
- elementType: shim,
4960
- instanceOf: getShim,
4961
- node: shim,
4962
- objectOf: getShim,
4963
- oneOf: getShim,
4964
- oneOfType: getShim,
4965
- shape: getShim,
4966
- exact: getShim,
4967
-
4968
- checkPropTypes: emptyFunctionWithReset,
4969
- resetWarningCache: emptyFunction
4970
- };
4971
-
4972
- ReactPropTypes.PropTypes = ReactPropTypes;
4973
-
4974
- return ReactPropTypes;
4975
- };
4976
-
4977
- /**
4978
- * Copyright (c) 2013-present, Facebook, Inc.
4979
- *
4980
- * This source code is licensed under the MIT license found in the
4981
- * LICENSE file in the root directory of this source tree.
4982
- */
4983
-
4984
- {
4985
- // By explicitly using `prop-types` you are opting into new production behavior.
4986
- // http://fb.me/prop-types-in-prod
4987
- propTypes.exports = factoryWithThrowingShims();
4988
- }
4989
-
4990
- var propTypesExports = propTypes.exports;
4991
- var PropTypes = /*@__PURE__*/getDefaultExportFromCjs(propTypesExports);
4992
-
4993
4540
  function ownKeys$2(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; }
4994
4541
  function _objectSpread$2(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$2(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$2(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
4995
4542
  var buildPayload = function buildPayload(data, values) {
@@ -5054,7 +4601,7 @@ var Status = function Status() {
5054
4601
  });
5055
4602
  };
5056
4603
 
5057
- var transformObjectToDotNotation = function transformObjectToDotNotation(obj) {
4604
+ var _transformObjectToDotNotation = function transformObjectToDotNotation(obj) {
5058
4605
  var prefix = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : "";
5059
4606
  var result = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : [];
5060
4607
  var errorKey = Object.keys(obj).find(function (key) {
@@ -5063,8 +4610,8 @@ var transformObjectToDotNotation = function transformObjectToDotNotation(obj) {
5063
4610
  var value = obj[errorKey];
5064
4611
  if (!value) return;
5065
4612
  var nextKey = prefix ? "".concat(prefix, ".").concat(errorKey) : errorKey;
5066
- if (_typeof$1(value) === "object") {
5067
- transformObjectToDotNotation(value, nextKey, result);
4613
+ if (_typeof(value) === "object") {
4614
+ _transformObjectToDotNotation(value, nextKey, result);
5068
4615
  } else {
5069
4616
  result.push(nextKey);
5070
4617
  }
@@ -5073,7 +4620,7 @@ var transformObjectToDotNotation = function transformObjectToDotNotation(obj) {
5073
4620
  return result;
5074
4621
  };
5075
4622
  var getErrorFieldName = function getErrorFieldName(formikErrors) {
5076
- return transformObjectToDotNotation(formikErrors)[0];
4623
+ return _transformObjectToDotNotation(formikErrors)[0];
5077
4624
  };
5078
4625
 
5079
4626
  var ScrollToErrorField = function ScrollToErrorField(_ref) {
@@ -5095,7 +4642,7 @@ var ScrollToErrorField = function ScrollToErrorField(_ref) {
5095
4642
  var errorFormElement = findBy({
5096
4643
  name: fieldErrorNames
5097
4644
  }, _toConsumableArray(formRef.current.elements));
5098
- errorFormElement === null || errorFormElement === void 0 || errorFormElement.scrollIntoView({
4645
+ errorFormElement === null || errorFormElement === void 0 ? void 0 : errorFormElement.scrollIntoView({
5099
4646
  behavior: "smooth",
5100
4647
  block: "center"
5101
4648
  });
@@ -5115,7 +4662,9 @@ var Form = function Form(_ref) {
5115
4662
  _ref$handleSubmit = _ref.handleSubmit,
5116
4663
  handleSubmit = _ref$handleSubmit === void 0 ? noop : _ref$handleSubmit,
5117
4664
  _ref$handleCancel = _ref.handleCancel,
5118
- handleCancel = _ref$handleCancel === void 0 ? noop : _ref$handleCancel;
4665
+ handleCancel = _ref$handleCancel === void 0 ? noop : _ref$handleCancel,
4666
+ _ref$showStatusSwitch = _ref.showStatusSwitch,
4667
+ showStatusSwitch = _ref$showStatusSwitch === void 0 ? true : _ref$showStatusSwitch;
5119
4668
  var formRef = useRef(null);
5120
4669
  var _useTranslation = useTranslation(),
5121
4670
  t = _useTranslation.t;
@@ -5153,7 +4702,7 @@ var Form = function Form(_ref) {
5153
4702
  data: initialValues,
5154
4703
  label: t("neetoRules.common.description"),
5155
4704
  name: "description"
5156
- }), /*#__PURE__*/jsx(Status, {}), typeof _children === "function" ? _children === null || _children === void 0 ? void 0 : _children(_objectSpread$1({
4705
+ }), showStatusSwitch && /*#__PURE__*/jsx(Status, {}), typeof _children === "function" ? _children === null || _children === void 0 ? void 0 : _children(_objectSpread$1({
5157
4706
  values: values,
5158
4707
  formattedValues: buildPayload(data, values),
5159
4708
  dirty: dirty
@@ -5174,11 +4723,6 @@ var Form = function Form(_ref) {
5174
4723
  }
5175
4724
  });
5176
4725
  };
5177
- Form.prototype = {
5178
- data: PropTypes.object,
5179
- handleSubmit: PropTypes.func,
5180
- className: PropTypes.string
5181
- };
5182
4726
 
5183
4727
  function ownKeys(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; }
5184
4728
  function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }