@bigbinary/neeto-rules-frontend 2.3.1 → 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, g as getSeparator, b as _arrayWithHoles, d as _unsupportedIterableToArray, e as _nonIterableRest, f as _typeof$1 } from './utils-249a1c9a.js';
2
- import { _ as _objectWithoutProperties, b as _iterableToArray, a as _toConsumableArray, g as getDefaultExportFromCjs } from './toConsumableArray-ee25f277.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, _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,7 +720,7 @@ 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]);
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]);
720
724
  var separator = getSeparator({
721
725
  defaultSeparator: t("neetoRules.common.to"),
722
726
  selectedField: selectedField
@@ -763,7 +767,7 @@ var DropdownField$1 = function DropdownField(_ref) {
763
767
  className: "neeto-ui-bg-gray-100",
764
768
  customTarget: /*#__PURE__*/jsx(Button, {
765
769
  "data-cy": "action-dropdown-button",
766
- 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(),
767
771
  style: "link",
768
772
  className: classNames("neeto-ui-text-gray-800 neeto-ui-font-semibold underline", {
769
773
  "neeto-ui-text-accent-800": isActive,
@@ -889,7 +893,7 @@ var EmailIdFields = function EmailIdFields(_ref) {
889
893
  };
890
894
 
891
895
  var EmailFields = function EmailFields(_ref) {
892
- var _errors$actions, _touched$actions, _action$metadata;
896
+ var _errors$actions, _errors$actions$value, _touched$actions, _touched$actions$valu, _action$metadata;
893
897
  var _ref$isEmailIdField = _ref.isEmailIdField,
894
898
  isEmailIdField = _ref$isEmailIdField === void 0 ? false : _ref$isEmailIdField,
895
899
  name = _ref.name,
@@ -915,7 +919,7 @@ var EmailFields = function EmailFields(_ref) {
915
919
  useOnButtonPressed(initialFocusRef, function () {
916
920
  return setShowPane(false);
917
921
  });
918
- 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]);
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]);
919
923
  var separator = getSeparator({
920
924
  defaultSeparator: t("neetoRules.common.as"),
921
925
  index: separatorIndex,
@@ -1026,7 +1030,7 @@ var useCloseInputField = function useCloseInputField(ref, showInput, handler) {
1026
1030
  handler();
1027
1031
  }
1028
1032
  };
1029
- (_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);
1030
1034
  return function () {
1031
1035
  var _ref$current2;
1032
1036
  return (_ref$current2 = ref.current) === null || _ref$current2 === void 0 ? void 0 : _ref$current2.removeEventListener("keydown", listener);
@@ -1040,7 +1044,7 @@ var useCloseInputField = function useCloseInputField(ref, showInput, handler) {
1040
1044
  };
1041
1045
 
1042
1046
  var Input = function Input(_ref) {
1043
- 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;
1044
1048
  var name = _ref.name,
1045
1049
  index = _ref.index,
1046
1050
  selectedField = _ref.selectedField;
@@ -1061,8 +1065,8 @@ var Input = function Input(_ref) {
1061
1065
  var action = actions.value[index];
1062
1066
  var valueTerm = (_action$metadata = action.metadata) === null || _action$metadata === void 0 ? void 0 : _action$metadata.value;
1063
1067
  var label = valueTerm && isNotEmpty(valueTerm === null || valueTerm === void 0 ? void 0 : valueTerm.trim()) ? valueTerm : t("neetoRules.form.addValue");
1064
- 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");
1065
- 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]);
1066
1070
  useEffect(function () {
1067
1071
  setShowInput(false);
1068
1072
  }, [action.name]);
@@ -1206,7 +1210,7 @@ var InlineInput = /*#__PURE__*/forwardRef(function (props, ref) {
1206
1210
  InlineInput.displayName = "InlineInput";
1207
1211
 
1208
1212
  var ListField = function ListField(_ref) {
1209
- var _errors$actions, _touched$actions, _selectedField$separa;
1213
+ var _errors$actions, _errors$actions$value, _touched$actions, _touched$actions$valu, _selectedField$separa;
1210
1214
  var name = _ref.name,
1211
1215
  _ref$values = _ref.values,
1212
1216
  values = _ref$values === void 0 ? [] : _ref$values,
@@ -1229,8 +1233,8 @@ var ListField = function ListField(_ref) {
1229
1233
  useOnButtonPressed(initialFocusRef, function () {
1230
1234
  return setShowPane(false);
1231
1235
  });
1232
- 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]);
1233
- 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");
1234
1238
  return /*#__PURE__*/jsxs(Fragment, {
1235
1239
  children: [/*#__PURE__*/jsx(Typography, {
1236
1240
  className: "neeto-ui-text-gray-700",
@@ -1337,7 +1341,7 @@ var ListField = function ListField(_ref) {
1337
1341
  var Menu$8 = Dropdown$1.Menu,
1338
1342
  MenuItem$8 = Dropdown$1.MenuItem;
1339
1343
  var MultiSelect$1 = function MultiSelect(_ref) {
1340
- 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;
1341
1345
  var _ref$values = _ref.values,
1342
1346
  values = _ref$values === void 0 ? [] : _ref$values,
1343
1347
  _ref$dropDownOptions = _ref.dropDownOptions,
@@ -1366,10 +1370,10 @@ var MultiSelect$1 = function MultiSelect(_ref) {
1366
1370
  });
1367
1371
  }, [values, dropDownOptions]);
1368
1372
  var selectedOptions = getSelectedOptions(allOptions);
1369
- 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");
1370
1374
  var searchedOptions = getSearchedOptions$3(dropDownOptions, searchTerm);
1371
- 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");
1372
- 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]);
1373
1377
  var handleSelectOption = function handleSelectOption(option) {
1374
1378
  var options = values.includes(option.value) ? without([option.value], values) : append(option.value, values);
1375
1379
  setFieldValue(name, options);
@@ -1470,7 +1474,7 @@ var MultiSelect$1 = function MultiSelect(_ref) {
1470
1474
  };
1471
1475
 
1472
1476
  var NoteField = function NoteField(_ref) {
1473
- var _errors$actions, _touched$actions, _selectedField$separa;
1477
+ var _errors$actions, _errors$actions$value, _touched$actions, _touched$actions$valu, _selectedField$separa;
1474
1478
  var name = _ref.name,
1475
1479
  _ref$value = _ref.value,
1476
1480
  value = _ref$value === void 0 ? "" : _ref$value,
@@ -1489,8 +1493,8 @@ var NoteField = function NoteField(_ref) {
1489
1493
  useOnButtonPressed(initialFocusRef, function () {
1490
1494
  return setShowPane(false);
1491
1495
  });
1492
- 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]);
1493
- 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");
1494
1498
  var variables = (selectedField === null || selectedField === void 0 ? void 0 : selectedField.variables) || [];
1495
1499
  var defaultLabel = (selectedField === null || selectedField === void 0 ? void 0 : selectedField.placeholder) || t("neetoRules.form.note");
1496
1500
  return /*#__PURE__*/jsxs(Fragment, {
@@ -1543,10 +1547,6 @@ var NoteField = function NoteField(_ref) {
1543
1547
  });
1544
1548
  };
1545
1549
 
1546
- function _toArray(arr) {
1547
- return _arrayWithHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableRest();
1548
- }
1549
-
1550
1550
  var removeDuplicateErrorMessages = pipe(filter(isNotNil), uniq, join(ERROR_MESSAGE_DELIMITER));
1551
1551
  var dasherize = function dasherize(input) {
1552
1552
  return hyphenize(input, "neeto-rules-input");
@@ -1800,7 +1800,7 @@ var PhoneNumberField = function PhoneNumberField(_ref) {
1800
1800
  };
1801
1801
 
1802
1802
  var SmsFields = function SmsFields(_ref) {
1803
- var _errors$actions, _touched$actions, _action$metadata;
1803
+ var _errors$actions, _errors$actions$value, _touched$actions, _touched$actions$valu, _action$metadata;
1804
1804
  var name = _ref.name,
1805
1805
  action = _ref.action,
1806
1806
  selectedField = _ref.selectedField,
@@ -1826,7 +1826,7 @@ var SmsFields = function SmsFields(_ref) {
1826
1826
  useOnButtonPressed(initialFocusRef, function () {
1827
1827
  return setShowPane(false);
1828
1828
  });
1829
- 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]);
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
1830
  var separator = getSeparator({
1831
1831
  defaultSeparator: t("neetoRules.common.as"),
1832
1832
  index: separatorIndex,
@@ -2336,7 +2336,6 @@ var getValidationSchema = function getValidationSchema(data, customData) {
2336
2336
  return yup.object(schema);
2337
2337
  };
2338
2338
 
2339
- var _VALIDATION_SCHEMA;
2340
2339
  var FIELD_TYPES = {
2341
2340
  text: "text",
2342
2341
  longText: "long-text",
@@ -2348,7 +2347,7 @@ var FIELD_TYPES = {
2348
2347
  multiSelect: "multi-select"
2349
2348
  };
2350
2349
  var MAXIMUM_OPTION_LENGTH$1 = 7;
2351
- 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);
2352
2351
  var DECIMAL_NUMBER_REGEX = /^-?\d*\.?\d+$/;
2353
2352
  var NUMBER_REGEX = /^-?\d+$/;
2354
2353
  var POSITIVE_DECIMAL_NUMBER_REGEX = /^\d*\.?\d+$/;
@@ -2372,7 +2371,7 @@ var DEFAULT_INITIAL_VALUE = {
2372
2371
  var Menu$7 = Dropdown$1.Menu,
2373
2372
  MenuItem$7 = Dropdown$1.MenuItem;
2374
2373
  var ActionItem = function ActionItem(_ref) {
2375
- var _errors$actions, _touched$actions, _selectedOption$label;
2374
+ var _errors$actions, _errors$actions$value, _touched$actions, _touched$actions$valu, _selectedOption$label;
2376
2375
  var name = _ref.name,
2377
2376
  action = _ref.action,
2378
2377
  index = _ref.index,
@@ -2415,11 +2414,11 @@ var ActionItem = function ActionItem(_ref) {
2415
2414
  return getFieldDetails$1(action.name, actionOptions);
2416
2415
  }, [action, actionOptions]);
2417
2416
  var searchedOptions = getSearchedOptions$3(actionOptions, searchTerm);
2418
- 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]);
2419
2418
  var handleSelectOption = function handleSelectOption(option) {
2420
2419
  setFieldValue("".concat(name, ".name"), option.value);
2421
2420
  setFieldValue("".concat(name, ".metadata"), {});
2422
- onSelectAction === null || onSelectAction === void 0 || onSelectAction(name, option);
2421
+ onSelectAction === null || onSelectAction === void 0 ? void 0 : onSelectAction(name, option);
2423
2422
  setSearchTerm("");
2424
2423
  };
2425
2424
  var handleClose = function handleClose() {
@@ -2490,7 +2489,7 @@ var ActionItem = function ActionItem(_ref) {
2490
2489
  position: "bottom-start",
2491
2490
  customTarget: /*#__PURE__*/jsx(Button, {
2492
2491
  "data-cy": "action-dropdown-button",
2493
- 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(),
2494
2493
  style: "link",
2495
2494
  className: classNames("neeto-ui-text-gray-800 neeto-ui-font-semibold underline", {
2496
2495
  "neeto-ui-text-accent-800": isActive,
@@ -2747,7 +2746,7 @@ var DropdownField = function DropdownField(_ref) {
2747
2746
  position: "bottom-start",
2748
2747
  customTarget: /*#__PURE__*/jsx(Button, {
2749
2748
  "data-cy": "condition-".concat(fieldType, "-dropdown-button"),
2750
- 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(),
2751
2750
  style: "link",
2752
2751
  className: classNames("neeto-ui-text-gray-800 neeto-ui-font-semibold underline", {
2753
2752
  "neeto-ui-text-accent-800": isSelected
@@ -2803,7 +2802,7 @@ var DropdownField = function DropdownField(_ref) {
2803
2802
  var Menu$5 = Dropdown$1.Menu,
2804
2803
  MenuItem$5 = Dropdown$1.MenuItem;
2805
2804
  var Dropdown = function Dropdown(_ref) {
2806
- 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;
2807
2806
  var name = _ref.name,
2808
2807
  options = _ref.options,
2809
2808
  index = _ref.index;
@@ -2832,7 +2831,7 @@ var Dropdown = function Dropdown(_ref) {
2832
2831
  setSearchTerm = _useState6[1];
2833
2832
  var defaultValue = (_conditions$value$ind = conditions.value[index].metadata) === null || _conditions$value$ind === void 0 ? void 0 : _conditions$value$ind.value;
2834
2833
  var searchedOptions = getSearchedOptions$2(options, searchTerm);
2835
- 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]);
2836
2835
  var handleClose = function handleClose() {
2837
2836
  setIsActive(false);
2838
2837
  setSearchTerm("");
@@ -2867,7 +2866,7 @@ var Dropdown = function Dropdown(_ref) {
2867
2866
  className: "neeto-ui-bg-gray-100",
2868
2867
  customTarget: /*#__PURE__*/jsx(Button, {
2869
2868
  "data-cy": "condition-value-dropdown-button",
2870
- 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(),
2871
2870
  style: "link",
2872
2871
  className: classNames("neeto-ui-text-gray-800 neeto-ui-font-semibold underline", {
2873
2872
  "neeto-ui-text-accent-800": isActive,
@@ -2921,7 +2920,7 @@ var Dropdown = function Dropdown(_ref) {
2921
2920
  };
2922
2921
 
2923
2922
  var InputField$1 = function InputField(_ref) {
2924
- var _condition$metadata, _errors$conditions, _touched$conditions;
2923
+ var _condition$metadata, _condition$metadata$v, _errors$conditions, _errors$conditions$va, _touched$conditions, _touched$conditions$v;
2925
2924
  var name = _ref.name,
2926
2925
  index = _ref.index,
2927
2926
  placeholder = _ref.placeholder;
@@ -2940,9 +2939,9 @@ var InputField$1 = function InputField(_ref) {
2940
2939
  return setShowInput(false);
2941
2940
  });
2942
2941
  var condition = conditions.value[index];
2943
- 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();
2944
2943
  var label = valueTerm && valueTerm !== null && valueTerm !== void 0 && valueTerm.trim().length ? valueTerm : t("neetoRules.form.addValue");
2945
- 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]);
2946
2945
  useEffect(function () {
2947
2946
  setShowInput(false);
2948
2947
  }, [condition.verb]);
@@ -2976,7 +2975,7 @@ var InputField$1 = function InputField(_ref) {
2976
2975
  var Menu$4 = Dropdown$1.Menu,
2977
2976
  MenuItem$4 = Dropdown$1.MenuItem;
2978
2977
  var MultiSelect = function MultiSelect(_ref) {
2979
- 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;
2980
2979
  var name = _ref.name,
2981
2980
  dropDownOptions = _ref.dropDownOptions,
2982
2981
  index = _ref.index;
@@ -2996,14 +2995,14 @@ var MultiSelect = function MultiSelect(_ref) {
2996
2995
  setSearchTerm = _useState4[1];
2997
2996
  var _useTranslation = useTranslation(),
2998
2997
  t = _useTranslation.t;
2999
- 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;
3000
2999
  var selectedOptions = values || [];
3001
3000
  var defaultLabel = t("neetoRules.form.selectValues");
3002
3001
  var options = dropDownOptions === null || dropDownOptions === void 0 ? void 0 : dropDownOptions.filter(function (option) {
3003
3002
  return selectedOptions === null || selectedOptions === void 0 ? void 0 : selectedOptions.includes(option.value);
3004
3003
  });
3005
3004
  var searchedOptions = getSearchedOptions$2(dropDownOptions, searchTerm);
3006
- 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]);
3007
3006
  var handleMultiSelectOption = function handleMultiSelectOption(value) {
3008
3007
  var options = selectedOptions !== null && selectedOptions !== void 0 && selectedOptions.includes(value) ? without([value], selectedOptions) : append(value, selectedOptions);
3009
3008
  setFieldValue(name, options);
@@ -3029,7 +3028,7 @@ var MultiSelect = function MultiSelect(_ref) {
3029
3028
  children: t("neetoRules.common.or")
3030
3029
  }), /*#__PURE__*/jsx(Button, {
3031
3030
  "data-cy": "condition-value-multi-select-field",
3032
- 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(),
3033
3032
  style: "link",
3034
3033
  className: classNames("neeto-ui-text-gray-800 neeto-ui-font-semibold underline", {
3035
3034
  "neeto-ui-text-accent-800": activeOption === option.value
@@ -3095,7 +3094,7 @@ var _excluded$7 = ["name", "index"];
3095
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; }
3096
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; }
3097
3096
  var MultiSelectCreate = function MultiSelectCreate(_ref) {
3098
- 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;
3099
3098
  var name = _ref.name,
3100
3099
  index = _ref.index,
3101
3100
  props = _objectWithoutProperties(_ref, _excluded$7);
@@ -3115,10 +3114,10 @@ var MultiSelectCreate = function MultiSelectCreate(_ref) {
3115
3114
  useOnButtonPressed(initialFocusRef, function () {
3116
3115
  return setShowPane(false);
3117
3116
  });
3118
- 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;
3119
3118
  var allOptions = getAllOptions(values);
3120
3119
  var defaultLabel = t("neetoRules.form.selectValues");
3121
- 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]);
3122
3121
  return /*#__PURE__*/jsxs(Fragment, {
3123
3122
  children: [isEmpty(allOptions) && /*#__PURE__*/jsx(Button, {
3124
3123
  "data-cy": "condition-value-multi-select-create-button",
@@ -3189,388 +3188,8 @@ var MultiSelectCreate = function MultiSelectCreate(_ref) {
3189
3188
  });
3190
3189
  };
3191
3190
 
3192
- function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) {
3193
- try {
3194
- var info = gen[key](arg);
3195
- var value = info.value;
3196
- } catch (error) {
3197
- reject(error);
3198
- return;
3199
- }
3200
- if (info.done) {
3201
- resolve(value);
3202
- } else {
3203
- Promise.resolve(value).then(_next, _throw);
3204
- }
3205
- }
3206
- function _asyncToGenerator(fn) {
3207
- return function () {
3208
- var self = this,
3209
- args = arguments;
3210
- return new Promise(function (resolve, reject) {
3211
- var gen = fn.apply(self, args);
3212
- function _next(value) {
3213
- asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value);
3214
- }
3215
- function _throw(err) {
3216
- asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err);
3217
- }
3218
- _next(undefined);
3219
- });
3220
- };
3221
- }
3222
-
3223
- var regeneratorRuntime$1 = {exports: {}};
3224
-
3225
- var _typeof = {exports: {}};
3226
-
3227
- _typeof.exports;
3228
-
3229
- (function (module) {
3230
- function _typeof(o) {
3231
- "@babel/helpers - typeof";
3232
-
3233
- return (module.exports = _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) {
3234
- return typeof o;
3235
- } : function (o) {
3236
- return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o;
3237
- }, module.exports.__esModule = true, module.exports["default"] = module.exports), _typeof(o);
3238
- }
3239
- module.exports = _typeof, module.exports.__esModule = true, module.exports["default"] = module.exports;
3240
- } (_typeof));
3241
-
3242
- var _typeofExports = _typeof.exports;
3243
-
3244
- regeneratorRuntime$1.exports;
3245
-
3246
- (function (module) {
3247
- var _typeof = _typeofExports["default"];
3248
- function _regeneratorRuntime() {
3249
- module.exports = _regeneratorRuntime = function _regeneratorRuntime() {
3250
- return e;
3251
- }, module.exports.__esModule = true, module.exports["default"] = module.exports;
3252
- var t,
3253
- e = {},
3254
- r = Object.prototype,
3255
- n = r.hasOwnProperty,
3256
- o = Object.defineProperty || function (t, e, r) {
3257
- t[e] = r.value;
3258
- },
3259
- i = "function" == typeof Symbol ? Symbol : {},
3260
- a = i.iterator || "@@iterator",
3261
- c = i.asyncIterator || "@@asyncIterator",
3262
- u = i.toStringTag || "@@toStringTag";
3263
- function define(t, e, r) {
3264
- return Object.defineProperty(t, e, {
3265
- value: r,
3266
- enumerable: !0,
3267
- configurable: !0,
3268
- writable: !0
3269
- }), t[e];
3270
- }
3271
- try {
3272
- define({}, "");
3273
- } catch (t) {
3274
- define = function define(t, e, r) {
3275
- return t[e] = r;
3276
- };
3277
- }
3278
- function wrap(t, e, r, n) {
3279
- var i = e && e.prototype instanceof Generator ? e : Generator,
3280
- a = Object.create(i.prototype),
3281
- c = new Context(n || []);
3282
- return o(a, "_invoke", {
3283
- value: makeInvokeMethod(t, r, c)
3284
- }), a;
3285
- }
3286
- function tryCatch(t, e, r) {
3287
- try {
3288
- return {
3289
- type: "normal",
3290
- arg: t.call(e, r)
3291
- };
3292
- } catch (t) {
3293
- return {
3294
- type: "throw",
3295
- arg: t
3296
- };
3297
- }
3298
- }
3299
- e.wrap = wrap;
3300
- var h = "suspendedStart",
3301
- l = "suspendedYield",
3302
- f = "executing",
3303
- s = "completed",
3304
- y = {};
3305
- function Generator() {}
3306
- function GeneratorFunction() {}
3307
- function GeneratorFunctionPrototype() {}
3308
- var p = {};
3309
- define(p, a, function () {
3310
- return this;
3311
- });
3312
- var d = Object.getPrototypeOf,
3313
- v = d && d(d(values([])));
3314
- v && v !== r && n.call(v, a) && (p = v);
3315
- var g = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(p);
3316
- function defineIteratorMethods(t) {
3317
- ["next", "throw", "return"].forEach(function (e) {
3318
- define(t, e, function (t) {
3319
- return this._invoke(e, t);
3320
- });
3321
- });
3322
- }
3323
- function AsyncIterator(t, e) {
3324
- function invoke(r, o, i, a) {
3325
- var c = tryCatch(t[r], t, o);
3326
- if ("throw" !== c.type) {
3327
- var u = c.arg,
3328
- h = u.value;
3329
- return h && "object" == _typeof(h) && n.call(h, "__await") ? e.resolve(h.__await).then(function (t) {
3330
- invoke("next", t, i, a);
3331
- }, function (t) {
3332
- invoke("throw", t, i, a);
3333
- }) : e.resolve(h).then(function (t) {
3334
- u.value = t, i(u);
3335
- }, function (t) {
3336
- return invoke("throw", t, i, a);
3337
- });
3338
- }
3339
- a(c.arg);
3340
- }
3341
- var r;
3342
- o(this, "_invoke", {
3343
- value: function value(t, n) {
3344
- function callInvokeWithMethodAndArg() {
3345
- return new e(function (e, r) {
3346
- invoke(t, n, e, r);
3347
- });
3348
- }
3349
- return r = r ? r.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg();
3350
- }
3351
- });
3352
- }
3353
- function makeInvokeMethod(e, r, n) {
3354
- var o = h;
3355
- return function (i, a) {
3356
- if (o === f) throw new Error("Generator is already running");
3357
- if (o === s) {
3358
- if ("throw" === i) throw a;
3359
- return {
3360
- value: t,
3361
- done: !0
3362
- };
3363
- }
3364
- for (n.method = i, n.arg = a;;) {
3365
- var c = n.delegate;
3366
- if (c) {
3367
- var u = maybeInvokeDelegate(c, n);
3368
- if (u) {
3369
- if (u === y) continue;
3370
- return u;
3371
- }
3372
- }
3373
- if ("next" === n.method) n.sent = n._sent = n.arg;else if ("throw" === n.method) {
3374
- if (o === h) throw o = s, n.arg;
3375
- n.dispatchException(n.arg);
3376
- } else "return" === n.method && n.abrupt("return", n.arg);
3377
- o = f;
3378
- var p = tryCatch(e, r, n);
3379
- if ("normal" === p.type) {
3380
- if (o = n.done ? s : l, p.arg === y) continue;
3381
- return {
3382
- value: p.arg,
3383
- done: n.done
3384
- };
3385
- }
3386
- "throw" === p.type && (o = s, n.method = "throw", n.arg = p.arg);
3387
- }
3388
- };
3389
- }
3390
- function maybeInvokeDelegate(e, r) {
3391
- var n = r.method,
3392
- o = e.iterator[n];
3393
- 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;
3394
- var i = tryCatch(o, e.iterator, r.arg);
3395
- if ("throw" === i.type) return r.method = "throw", r.arg = i.arg, r.delegate = null, y;
3396
- var a = i.arg;
3397
- 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);
3398
- }
3399
- function pushTryEntry(t) {
3400
- var e = {
3401
- tryLoc: t[0]
3402
- };
3403
- 1 in t && (e.catchLoc = t[1]), 2 in t && (e.finallyLoc = t[2], e.afterLoc = t[3]), this.tryEntries.push(e);
3404
- }
3405
- function resetTryEntry(t) {
3406
- var e = t.completion || {};
3407
- e.type = "normal", delete e.arg, t.completion = e;
3408
- }
3409
- function Context(t) {
3410
- this.tryEntries = [{
3411
- tryLoc: "root"
3412
- }], t.forEach(pushTryEntry, this), this.reset(!0);
3413
- }
3414
- function values(e) {
3415
- if (e || "" === e) {
3416
- var r = e[a];
3417
- if (r) return r.call(e);
3418
- if ("function" == typeof e.next) return e;
3419
- if (!isNaN(e.length)) {
3420
- var o = -1,
3421
- i = function next() {
3422
- for (; ++o < e.length;) if (n.call(e, o)) return next.value = e[o], next.done = !1, next;
3423
- return next.value = t, next.done = !0, next;
3424
- };
3425
- return i.next = i;
3426
- }
3427
- }
3428
- throw new TypeError(_typeof(e) + " is not iterable");
3429
- }
3430
- return GeneratorFunction.prototype = GeneratorFunctionPrototype, o(g, "constructor", {
3431
- value: GeneratorFunctionPrototype,
3432
- configurable: !0
3433
- }), o(GeneratorFunctionPrototype, "constructor", {
3434
- value: GeneratorFunction,
3435
- configurable: !0
3436
- }), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, u, "GeneratorFunction"), e.isGeneratorFunction = function (t) {
3437
- var e = "function" == typeof t && t.constructor;
3438
- return !!e && (e === GeneratorFunction || "GeneratorFunction" === (e.displayName || e.name));
3439
- }, e.mark = function (t) {
3440
- return Object.setPrototypeOf ? Object.setPrototypeOf(t, GeneratorFunctionPrototype) : (t.__proto__ = GeneratorFunctionPrototype, define(t, u, "GeneratorFunction")), t.prototype = Object.create(g), t;
3441
- }, e.awrap = function (t) {
3442
- return {
3443
- __await: t
3444
- };
3445
- }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, c, function () {
3446
- return this;
3447
- }), e.AsyncIterator = AsyncIterator, e.async = function (t, r, n, o, i) {
3448
- void 0 === i && (i = Promise);
3449
- var a = new AsyncIterator(wrap(t, r, n, o), i);
3450
- return e.isGeneratorFunction(r) ? a : a.next().then(function (t) {
3451
- return t.done ? t.value : a.next();
3452
- });
3453
- }, defineIteratorMethods(g), define(g, u, "Generator"), define(g, a, function () {
3454
- return this;
3455
- }), define(g, "toString", function () {
3456
- return "[object Generator]";
3457
- }), e.keys = function (t) {
3458
- var e = Object(t),
3459
- r = [];
3460
- for (var n in e) r.push(n);
3461
- return r.reverse(), function next() {
3462
- for (; r.length;) {
3463
- var t = r.pop();
3464
- if (t in e) return next.value = t, next.done = !1, next;
3465
- }
3466
- return next.done = !0, next;
3467
- };
3468
- }, e.values = values, Context.prototype = {
3469
- constructor: Context,
3470
- reset: function reset(e) {
3471
- 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);
3472
- },
3473
- stop: function stop() {
3474
- this.done = !0;
3475
- var t = this.tryEntries[0].completion;
3476
- if ("throw" === t.type) throw t.arg;
3477
- return this.rval;
3478
- },
3479
- dispatchException: function dispatchException(e) {
3480
- if (this.done) throw e;
3481
- var r = this;
3482
- function handle(n, o) {
3483
- return a.type = "throw", a.arg = e, r.next = n, o && (r.method = "next", r.arg = t), !!o;
3484
- }
3485
- for (var o = this.tryEntries.length - 1; o >= 0; --o) {
3486
- var i = this.tryEntries[o],
3487
- a = i.completion;
3488
- if ("root" === i.tryLoc) return handle("end");
3489
- if (i.tryLoc <= this.prev) {
3490
- var c = n.call(i, "catchLoc"),
3491
- u = n.call(i, "finallyLoc");
3492
- if (c && u) {
3493
- if (this.prev < i.catchLoc) return handle(i.catchLoc, !0);
3494
- if (this.prev < i.finallyLoc) return handle(i.finallyLoc);
3495
- } else if (c) {
3496
- if (this.prev < i.catchLoc) return handle(i.catchLoc, !0);
3497
- } else {
3498
- if (!u) throw new Error("try statement without catch or finally");
3499
- if (this.prev < i.finallyLoc) return handle(i.finallyLoc);
3500
- }
3501
- }
3502
- }
3503
- },
3504
- abrupt: function abrupt(t, e) {
3505
- for (var r = this.tryEntries.length - 1; r >= 0; --r) {
3506
- var o = this.tryEntries[r];
3507
- if (o.tryLoc <= this.prev && n.call(o, "finallyLoc") && this.prev < o.finallyLoc) {
3508
- var i = o;
3509
- break;
3510
- }
3511
- }
3512
- i && ("break" === t || "continue" === t) && i.tryLoc <= e && e <= i.finallyLoc && (i = null);
3513
- var a = i ? i.completion : {};
3514
- return a.type = t, a.arg = e, i ? (this.method = "next", this.next = i.finallyLoc, y) : this.complete(a);
3515
- },
3516
- complete: function complete(t, e) {
3517
- if ("throw" === t.type) throw t.arg;
3518
- 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;
3519
- },
3520
- finish: function finish(t) {
3521
- for (var e = this.tryEntries.length - 1; e >= 0; --e) {
3522
- var r = this.tryEntries[e];
3523
- if (r.finallyLoc === t) return this.complete(r.completion, r.afterLoc), resetTryEntry(r), y;
3524
- }
3525
- },
3526
- "catch": function _catch(t) {
3527
- for (var e = this.tryEntries.length - 1; e >= 0; --e) {
3528
- var r = this.tryEntries[e];
3529
- if (r.tryLoc === t) {
3530
- var n = r.completion;
3531
- if ("throw" === n.type) {
3532
- var o = n.arg;
3533
- resetTryEntry(r);
3534
- }
3535
- return o;
3536
- }
3537
- }
3538
- throw new Error("illegal catch attempt");
3539
- },
3540
- delegateYield: function delegateYield(e, r, n) {
3541
- return this.delegate = {
3542
- iterator: values(e),
3543
- resultName: r,
3544
- nextLoc: n
3545
- }, "next" === this.method && (this.arg = t), y;
3546
- }
3547
- }, e;
3548
- }
3549
- module.exports = _regeneratorRuntime, module.exports.__esModule = true, module.exports["default"] = module.exports;
3550
- } (regeneratorRuntime$1));
3551
-
3552
- var regeneratorRuntimeExports = regeneratorRuntime$1.exports;
3553
-
3554
- // TODO(Babel 8): Remove this file.
3555
-
3556
- var runtime = regeneratorRuntimeExports();
3557
- var regenerator = runtime;
3558
-
3559
- // Copied from https://github.com/facebook/regenerator/blob/main/packages/runtime/runtime.js#L736=
3560
- try {
3561
- regeneratorRuntime = runtime;
3562
- } catch (accidentalStrictMode) {
3563
- if (typeof globalThis === "object") {
3564
- globalThis.regeneratorRuntime = runtime;
3565
- } else {
3566
- Function("r", "regeneratorRuntime = r")(runtime);
3567
- }
3568
- }
3569
-
3570
- var _regeneratorRuntime = /*@__PURE__*/getDefaultExportFromCjs(regenerator);
3571
-
3572
3191
  var DateField = function DateField(_ref) {
3573
- var _conditions$value$ind, _errors$conditions, _touched$conditions;
3192
+ var _conditions$value$ind, _errors$conditions, _errors$conditions$va, _touched$conditions, _touched$conditions$v;
3574
3193
  var name = _ref.name,
3575
3194
  index = _ref.index,
3576
3195
  conditionName = _ref.conditionName;
@@ -3589,9 +3208,9 @@ var DateField = function DateField(_ref) {
3589
3208
  t = _useTranslation.t;
3590
3209
  var valueTerm = (_conditions$value$ind = conditions.value[index].metadata) === null || _conditions$value$ind === void 0 ? void 0 : _conditions$value$ind.value;
3591
3210
  var label = valueTerm || t("neetoRules.form.selectDate");
3592
- 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]);
3593
3212
  var handleValidate = /*#__PURE__*/function () {
3594
- var _ref2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee() {
3213
+ var _ref2 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee() {
3595
3214
  return _regeneratorRuntime.wrap(function _callee$(_context) {
3596
3215
  while (1) switch (_context.prev = _context.next) {
3597
3216
  case 0:
@@ -3760,7 +3379,7 @@ var ConditionItem = function ConditionItem(_ref) {
3760
3379
  setFieldValue("".concat(name, ".verb"), fieldDetails === null || fieldDetails === void 0 ? void 0 : fieldDetails.allowMatching[0]);
3761
3380
  setFieldValue("".concat(name, ".kind"), fieldDetails === null || fieldDetails === void 0 ? void 0 : fieldDetails.kind);
3762
3381
  setFieldValue("".concat(name, ".metadata"), {});
3763
- onSelectCondition === null || onSelectCondition === void 0 || onSelectCondition(name, option);
3382
+ onSelectCondition === null || onSelectCondition === void 0 ? void 0 : onSelectCondition(name, option);
3764
3383
  };
3765
3384
  var handleVerbChange = function handleVerbChange(_ref2) {
3766
3385
  var value = _ref2.value;
@@ -3847,7 +3466,8 @@ var Conditions = function Conditions(_ref) {
3847
3466
  var _elementProps$conditi;
3848
3467
  arrayHelpers.push({
3849
3468
  field: elementProps === null || elementProps === void 0 ? void 0 : elementProps.conditionOptions[0].value,
3850
- 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],
3851
3471
  joinType: logicOperation,
3852
3472
  metadata: {}
3853
3473
  });
@@ -4048,7 +3668,7 @@ var Performer$1 = function Performer(_ref) {
4048
3668
  className: "neeto-ui-bg-gray-100",
4049
3669
  customTarget: /*#__PURE__*/jsx(Button, {
4050
3670
  "data-cy": "event-performer-dropdown",
4051
- 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(),
4052
3672
  style: "link",
4053
3673
  className: classNames(" neeto-ui-text-gray-800 neeto-ui-font-semibold underline", {
4054
3674
  "neeto-ui-text-accent-800": isSelected,
@@ -4191,7 +3811,7 @@ var Events$1 = function Events(_ref) {
4191
3811
  }, options) : [].concat(_toConsumableArray(options), [{
4192
3812
  name: option.value
4193
3813
  }]);
4194
- onSelectEvent === null || onSelectEvent === void 0 || onSelectEvent(name, options);
3814
+ onSelectEvent === null || onSelectEvent === void 0 ? void 0 : onSelectEvent(name, options);
4195
3815
  setFieldValue("".concat(name, ".value"), options);
4196
3816
  };
4197
3817
  var handleClose = function handleClose() {
@@ -4223,7 +3843,7 @@ var Events$1 = function Events(_ref) {
4223
3843
  children: t("neetoRules.common.or")
4224
3844
  }), /*#__PURE__*/jsx(Button, {
4225
3845
  "data-cy": "condition-value-multi-select-field",
4226
- 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(),
4227
3847
  style: "link",
4228
3848
  className: classNames("neeto-ui-text-gray-800 neeto-ui-font-semibold underline", {
4229
3849
  "neeto-ui-text-accent-800": activeOption === event.value
@@ -4314,7 +3934,8 @@ var EventConditions = function EventConditions(_ref) {
4314
3934
  var _conditionProps$condi;
4315
3935
  setFieldValue("".concat(conditionsName, ".value"), [{
4316
3936
  field: conditionProps === null || conditionProps === void 0 ? void 0 : conditionProps.conditionOptions[0].value,
4317
- 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],
4318
3939
  joinType: OPERATORS.or,
4319
3940
  metadata: {}
4320
3941
  }]);
@@ -4415,7 +4036,7 @@ var EventItem = function EventItem(_ref) {
4415
4036
  var events = values[parentName].value || [];
4416
4037
  var handleEventChange = function handleEventChange(option) {
4417
4038
  setFieldValue(name, option.value);
4418
- onSelectEvent === null || onSelectEvent === void 0 || onSelectEvent(name, option);
4039
+ onSelectEvent === null || onSelectEvent === void 0 ? void 0 : onSelectEvent(name, option);
4419
4040
  setSelectedOption(option.label);
4420
4041
  };
4421
4042
  var eventOptions = useMemo(function () {
@@ -4567,7 +4188,7 @@ var Performer = function Performer(_ref) {
4567
4188
  closeOnSelect: false,
4568
4189
  customTarget: /*#__PURE__*/jsx(Button, {
4569
4190
  "data-cy": "event-performer-dropdown",
4570
- 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(),
4571
4192
  style: "link",
4572
4193
  className: classNames("neeto-ui-text-gray-800 neeto-ui-font-semibold underline", {
4573
4194
  "neeto-ui-text-accent-800": isSelected,
@@ -4916,97 +4537,6 @@ var TextareaField = function TextareaField(_ref) {
4916
4537
  }, componentProps));
4917
4538
  };
4918
4539
 
4919
- var propTypes = {exports: {}};
4920
-
4921
- /**
4922
- * Copyright (c) 2013-present, Facebook, Inc.
4923
- *
4924
- * This source code is licensed under the MIT license found in the
4925
- * LICENSE file in the root directory of this source tree.
4926
- */
4927
-
4928
- var ReactPropTypesSecret$1 = 'SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED';
4929
-
4930
- var ReactPropTypesSecret_1 = ReactPropTypesSecret$1;
4931
-
4932
- /**
4933
- * Copyright (c) 2013-present, Facebook, Inc.
4934
- *
4935
- * This source code is licensed under the MIT license found in the
4936
- * LICENSE file in the root directory of this source tree.
4937
- */
4938
-
4939
- var ReactPropTypesSecret = ReactPropTypesSecret_1;
4940
-
4941
- function emptyFunction() {}
4942
- function emptyFunctionWithReset() {}
4943
- emptyFunctionWithReset.resetWarningCache = emptyFunction;
4944
-
4945
- var factoryWithThrowingShims = function() {
4946
- function shim(props, propName, componentName, location, propFullName, secret) {
4947
- if (secret === ReactPropTypesSecret) {
4948
- // It is still safe when called from React.
4949
- return;
4950
- }
4951
- var err = new Error(
4952
- 'Calling PropTypes validators directly is not supported by the `prop-types` package. ' +
4953
- 'Use PropTypes.checkPropTypes() to call them. ' +
4954
- 'Read more at http://fb.me/use-check-prop-types'
4955
- );
4956
- err.name = 'Invariant Violation';
4957
- throw err;
4958
- } shim.isRequired = shim;
4959
- function getShim() {
4960
- return shim;
4961
- } // Important!
4962
- // Keep this list in sync with production version in `./factoryWithTypeCheckers.js`.
4963
- var ReactPropTypes = {
4964
- array: shim,
4965
- bigint: shim,
4966
- bool: shim,
4967
- func: shim,
4968
- number: shim,
4969
- object: shim,
4970
- string: shim,
4971
- symbol: shim,
4972
-
4973
- any: shim,
4974
- arrayOf: getShim,
4975
- element: shim,
4976
- elementType: shim,
4977
- instanceOf: getShim,
4978
- node: shim,
4979
- objectOf: getShim,
4980
- oneOf: getShim,
4981
- oneOfType: getShim,
4982
- shape: getShim,
4983
- exact: getShim,
4984
-
4985
- checkPropTypes: emptyFunctionWithReset,
4986
- resetWarningCache: emptyFunction
4987
- };
4988
-
4989
- ReactPropTypes.PropTypes = ReactPropTypes;
4990
-
4991
- return ReactPropTypes;
4992
- };
4993
-
4994
- /**
4995
- * Copyright (c) 2013-present, Facebook, Inc.
4996
- *
4997
- * This source code is licensed under the MIT license found in the
4998
- * LICENSE file in the root directory of this source tree.
4999
- */
5000
-
5001
- {
5002
- // By explicitly using `prop-types` you are opting into new production behavior.
5003
- // http://fb.me/prop-types-in-prod
5004
- propTypes.exports = factoryWithThrowingShims();
5005
- }
5006
-
5007
- var propTypesExports = propTypes.exports;
5008
- var PropTypes = /*@__PURE__*/getDefaultExportFromCjs(propTypesExports);
5009
-
5010
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; }
5011
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; }
5012
4542
  var buildPayload = function buildPayload(data, values) {
@@ -5071,7 +4601,7 @@ var Status = function Status() {
5071
4601
  });
5072
4602
  };
5073
4603
 
5074
- var transformObjectToDotNotation = function transformObjectToDotNotation(obj) {
4604
+ var _transformObjectToDotNotation = function transformObjectToDotNotation(obj) {
5075
4605
  var prefix = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : "";
5076
4606
  var result = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : [];
5077
4607
  var errorKey = Object.keys(obj).find(function (key) {
@@ -5080,8 +4610,8 @@ var transformObjectToDotNotation = function transformObjectToDotNotation(obj) {
5080
4610
  var value = obj[errorKey];
5081
4611
  if (!value) return;
5082
4612
  var nextKey = prefix ? "".concat(prefix, ".").concat(errorKey) : errorKey;
5083
- if (_typeof$1(value) === "object") {
5084
- transformObjectToDotNotation(value, nextKey, result);
4613
+ if (_typeof(value) === "object") {
4614
+ _transformObjectToDotNotation(value, nextKey, result);
5085
4615
  } else {
5086
4616
  result.push(nextKey);
5087
4617
  }
@@ -5090,7 +4620,7 @@ var transformObjectToDotNotation = function transformObjectToDotNotation(obj) {
5090
4620
  return result;
5091
4621
  };
5092
4622
  var getErrorFieldName = function getErrorFieldName(formikErrors) {
5093
- return transformObjectToDotNotation(formikErrors)[0];
4623
+ return _transformObjectToDotNotation(formikErrors)[0];
5094
4624
  };
5095
4625
 
5096
4626
  var ScrollToErrorField = function ScrollToErrorField(_ref) {
@@ -5112,7 +4642,7 @@ var ScrollToErrorField = function ScrollToErrorField(_ref) {
5112
4642
  var errorFormElement = findBy({
5113
4643
  name: fieldErrorNames
5114
4644
  }, _toConsumableArray(formRef.current.elements));
5115
- errorFormElement === null || errorFormElement === void 0 || errorFormElement.scrollIntoView({
4645
+ errorFormElement === null || errorFormElement === void 0 ? void 0 : errorFormElement.scrollIntoView({
5116
4646
  behavior: "smooth",
5117
4647
  block: "center"
5118
4648
  });
@@ -5132,7 +4662,9 @@ var Form = function Form(_ref) {
5132
4662
  _ref$handleSubmit = _ref.handleSubmit,
5133
4663
  handleSubmit = _ref$handleSubmit === void 0 ? noop : _ref$handleSubmit,
5134
4664
  _ref$handleCancel = _ref.handleCancel,
5135
- 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;
5136
4668
  var formRef = useRef(null);
5137
4669
  var _useTranslation = useTranslation(),
5138
4670
  t = _useTranslation.t;
@@ -5170,7 +4702,7 @@ var Form = function Form(_ref) {
5170
4702
  data: initialValues,
5171
4703
  label: t("neetoRules.common.description"),
5172
4704
  name: "description"
5173
- }), /*#__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({
5174
4706
  values: values,
5175
4707
  formattedValues: buildPayload(data, values),
5176
4708
  dirty: dirty
@@ -5191,11 +4723,6 @@ var Form = function Form(_ref) {
5191
4723
  }
5192
4724
  });
5193
4725
  };
5194
- Form.prototype = {
5195
- data: PropTypes.object,
5196
- handleSubmit: PropTypes.func,
5197
- className: PropTypes.string
5198
- };
5199
4726
 
5200
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; }
5201
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; }