@bigbinary/neeto-rules-frontend 2.5.56 → 2.5.57

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.
Files changed (62) hide show
  1. package/dist/.ready +1 -1
  2. package/dist/NeetoRulesForm.js +67 -162
  3. package/dist/NeetoRulesForm.js.map +1 -1
  4. package/dist/cjs/NeetoRulesForm.js +10 -105
  5. package/dist/cjs/NeetoRulesForm.js.map +1 -1
  6. package/dist/cjs/index.js +1 -0
  7. package/dist/cjs/index.js.map +1 -1
  8. package/dist/cjs/v2/CannedResponsesPane.js +396 -0
  9. package/dist/cjs/v2/CannedResponsesPane.js.map +1 -0
  10. package/dist/cjs/v2/NeetoRules.js +486 -0
  11. package/dist/cjs/v2/NeetoRules.js.map +1 -0
  12. package/dist/cjs/v2/NeetoRulesForm.js +6818 -0
  13. package/dist/cjs/v2/NeetoRulesForm.js.map +1 -0
  14. package/dist/cjs/v2/RulePreview.js +513 -0
  15. package/dist/cjs/v2/RulePreview.js.map +1 -0
  16. package/dist/cjs/v2/RulesReorder.js +24 -0
  17. package/dist/cjs/v2/RulesReorder.js.map +1 -0
  18. package/dist/cjs/v2/constants.js +8 -0
  19. package/dist/cjs/v2/constants.js.map +1 -0
  20. package/dist/cjs/v2/hooks.js +15 -0
  21. package/dist/cjs/v2/hooks.js.map +1 -0
  22. package/dist/cjs/v2/index.js +86 -0
  23. package/dist/cjs/v2/index.js.map +1 -0
  24. package/dist/constants-CYdcft3h.js +53 -0
  25. package/dist/constants-CYdcft3h.js.map +1 -0
  26. package/dist/constants-dLBadaIU.js +60 -0
  27. package/dist/constants-dLBadaIU.js.map +1 -0
  28. package/dist/index-BBcadHIi.js +208 -0
  29. package/dist/index-BBcadHIi.js.map +1 -0
  30. package/dist/index-CSnQp41c.js +211 -0
  31. package/dist/index-CSnQp41c.js.map +1 -0
  32. package/dist/index.js +1 -0
  33. package/dist/index.js.map +1 -1
  34. package/dist/useCustomDataStore-D7hl6nev.js +74 -0
  35. package/dist/useCustomDataStore-D7hl6nev.js.map +1 -0
  36. package/dist/useCustomDataStore-DipT25Pg.js +77 -0
  37. package/dist/useCustomDataStore-DipT25Pg.js.map +1 -0
  38. package/dist/useDebouncedUpdate-6Ibug5MF.js +108 -0
  39. package/dist/useDebouncedUpdate-6Ibug5MF.js.map +1 -0
  40. package/dist/useDebouncedUpdate-BcPAGgg7.js +103 -0
  41. package/dist/useDebouncedUpdate-BcPAGgg7.js.map +1 -0
  42. package/dist/useUtilityStore-BBb39TOj.js +53 -0
  43. package/dist/useUtilityStore-BBb39TOj.js.map +1 -0
  44. package/dist/useUtilityStore-DkxAexDw.js +55 -0
  45. package/dist/useUtilityStore-DkxAexDw.js.map +1 -0
  46. package/dist/v2/CannedResponsesPane.js +394 -0
  47. package/dist/v2/CannedResponsesPane.js.map +1 -0
  48. package/dist/v2/NeetoRules.js +484 -0
  49. package/dist/v2/NeetoRules.js.map +1 -0
  50. package/dist/v2/NeetoRulesForm.js +6797 -0
  51. package/dist/v2/NeetoRulesForm.js.map +1 -0
  52. package/dist/v2/RulePreview.js +511 -0
  53. package/dist/v2/RulePreview.js.map +1 -0
  54. package/dist/v2/RulesReorder.js +18 -0
  55. package/dist/v2/RulesReorder.js.map +1 -0
  56. package/dist/v2/constants.js +2 -0
  57. package/dist/v2/constants.js.map +1 -0
  58. package/dist/v2/hooks.js +8 -0
  59. package/dist/v2/hooks.js.map +1 -0
  60. package/dist/v2/index.js +74 -0
  61. package/dist/v2/index.js.map +1 -0
  62. package/package.json +26 -14
package/dist/.ready CHANGED
@@ -1 +1 @@
1
- Built at 2026-04-30T18:56:27.456Z
1
+ Built at 2026-05-11T12:09:10.489Z
@@ -1,5 +1,6 @@
1
1
  import _defineProperty from '@babel/runtime/helpers/defineProperty';
2
2
  import _objectDestructuringEmpty from '@babel/runtime/helpers/objectDestructuringEmpty';
3
+ import { u as useOnClickOutside, S as SHORTCUTS, f as flatten, a as useDebouncedUpdate } from './useDebouncedUpdate-BcPAGgg7.js';
3
4
  import _toConsumableArray from '@babel/runtime/helpers/toConsumableArray';
4
5
  import _slicedToArray from '@babel/runtime/helpers/slicedToArray';
5
6
  import { shallow } from 'zustand/shallow';
@@ -14,7 +15,7 @@ import { u as useUtilityStore } from './useUtilityStore-BV6jVHMM.js';
14
15
  import classNames from 'classnames';
15
16
  import Typography from '@bigbinary/neetoui/Typography';
16
17
  import { toLower, identity, pluck, isEmpty, mergeDeepLeft, isNotNil, whereAny, reject, equals, unless, path, omit, useWith, split, when, is, trim, eqBy, F, values, isNil, without, append, pipe, filter, uniq, join, map, assoc, mergeLeft, includes, test } from 'ramda';
17
- import { t as t$1 } from 'i18next';
18
+ import { t } from 'i18next';
18
19
  import * as yup from 'yup';
19
20
  import Search from '@bigbinary/neeto-icons/Search';
20
21
  import Input$1 from '@bigbinary/neetoui/Input';
@@ -74,11 +75,6 @@ import '@tanstack/react-query';
74
75
  import 'axios';
75
76
  import './index-9h4B7JZZ.js';
76
77
 
77
- var e=[],t=[];function n(n,r){if(n&&"undefined"!=typeof document){var a,s=true===r.prepend?"prepend":"append",d=true===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}}
78
-
79
- var css = ".neeto-rules-main-content__container{height:100dvh!important}.neeto-rules-main-card .neeto-ui-btn.underline{text-align:start}.neeto-rules-side-panel{flex-grow:0;flex-shrink:0}.neeto-rules-side-panel--small{width:320px}.neeto-rules-side-panel--large{width:380px}@media (min-width:1024px){.neeto-rules-side-panel--small{width:380px}.neeto-rules-side-panel--large{width:480px}}.neeto-rules-json-editor__wrapper{height:35vh;padding-bottom:2rem;position:relative}.neeto-rules-json-editor__editor{height:100%}.neeto-rules-json-editor__dynamic-variables{inset-inline-end:1rem;position:absolute;top:1rem;z-index:10}[data-tippy-root]{z-index:99999!important}\n/*# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImFwcC9qYXZhc2NyaXB0L3NyYy9zdHlsZXNoZWV0cy9jb21wb25lbnRzL2xheW91dC5jc3MiLCJhcHAvamF2YXNjcmlwdC9zcmMvc3R5bGVzaGVldHMvY29tcG9uZW50cy9wYW5lLmNzcyIsImFwcC9qYXZhc2NyaXB0L3NyYy9zdHlsZXNoZWV0cy9jb21wb25lbnRzL2pzb24tZWRpdG9yLmNzcyIsImFwcC9qYXZhc2NyaXB0L3NyYy9zdHlsZXNoZWV0cy9jb21wb25lbnRzL2Ryb3Bkb3duLmNzcyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxxQ0FDRSx1QkFDRixDQUVBLCtDQUNFLGdCQUNGLENDTkEsd0JBRUUsV0FBWSxDQURaLGFBRUYsQ0FFQSwrQkFDRSxXQUNGLENBRUEsK0JBQ0UsV0FDRixDQUVBLDBCQUNFLCtCQUNFLFdBQ0YsQ0FDQSwrQkFDRSxXQUNGLENBQ0YsQ0NwQkEsa0NBRUUsV0FBWSxDQUNaLG1CQUFvQixDQUZwQixpQkFHRixDQUVBLGlDQUNFLFdBQ0YsQ0FFQSw0Q0FHRSxxQkFBc0IsQ0FGdEIsaUJBQWtCLENBQ2xCLFFBQVMsQ0FFVCxVQUNGLENDZkEsa0JBQ0UsdUJBQ0YiLCJzb3VyY2VzQ29udGVudCI6WyIubmVldG8tcnVsZXMtbWFpbi1jb250ZW50X19jb250YWluZXIge1xuICBoZWlnaHQ6IDEwMGR2aCAhaW1wb3J0YW50O1xufVxuXG4ubmVldG8tcnVsZXMtbWFpbi1jYXJkIC5uZWV0by11aS1idG4udW5kZXJsaW5lIHtcbiAgdGV4dC1hbGlnbjogc3RhcnQ7XG59XG4iLCIubmVldG8tcnVsZXMtc2lkZS1wYW5lbCB7XG4gIGZsZXgtc2hyaW5rOiAwO1xuICBmbGV4LWdyb3c6IDA7XG59XG5cbi5uZWV0by1ydWxlcy1zaWRlLXBhbmVsLS1zbWFsbCB7XG4gIHdpZHRoOiAzMjBweDtcbn1cblxuLm5lZXRvLXJ1bGVzLXNpZGUtcGFuZWwtLWxhcmdlIHtcbiAgd2lkdGg6IDM4MHB4O1xufVxuXG5AbWVkaWEgKG1pbi13aWR0aDogMTAyNHB4KSB7XG4gIC5uZWV0by1ydWxlcy1zaWRlLXBhbmVsLS1zbWFsbCB7XG4gICAgd2lkdGg6IDM4MHB4O1xuICB9XG4gIC5uZWV0by1ydWxlcy1zaWRlLXBhbmVsLS1sYXJnZSB7XG4gICAgd2lkdGg6IDQ4MHB4O1xuICB9XG59XG4iLCIubmVldG8tcnVsZXMtanNvbi1lZGl0b3JfX3dyYXBwZXIge1xuICBwb3NpdGlvbjogcmVsYXRpdmU7XG4gIGhlaWdodDogMzV2aDtcbiAgcGFkZGluZy1ib3R0b206IDJyZW07XG59XG5cbi5uZWV0by1ydWxlcy1qc29uLWVkaXRvcl9fZWRpdG9yIHtcbiAgaGVpZ2h0OiAxMDAlO1xufVxuXG4ubmVldG8tcnVsZXMtanNvbi1lZGl0b3JfX2R5bmFtaWMtdmFyaWFibGVzIHtcbiAgcG9zaXRpb246IGFic29sdXRlO1xuICB0b3A6IDFyZW07XG4gIGluc2V0LWlubGluZS1lbmQ6IDFyZW07XG4gIHotaW5kZXg6IDEwO1xufVxuIiwiW2RhdGEtdGlwcHktcm9vdF0ge1xuICB6LWluZGV4OiA5OTk5OSAhaW1wb3J0YW50O1xufVxuIl19 */";
80
- n(css,{});
81
-
82
78
  var Body = function Body(_ref) {
83
79
  var children = _ref.children,
84
80
  className = _ref.className;
@@ -206,12 +202,12 @@ var ACTION_TYPES = {
206
202
  };
207
203
  var LIST_FIELD_TOOLTIP_PROPS = {
208
204
  save: {
209
- content: t$1("neetoRules.buttons.save"),
205
+ content: t("neetoRules.buttons.save"),
210
206
  position: "top",
211
207
  delay: 300
212
208
  },
213
209
  cancel: {
214
- content: t$1("neetoRules.buttons.cancel"),
210
+ content: t("neetoRules.buttons.cancel"),
215
211
  position: "top",
216
212
  delay: 300
217
213
  }
@@ -227,7 +223,7 @@ var MAXIMUM_OPTION_LENGTH$1 = 7;
227
223
  var ACTION_INPUT_TYPES = ["text", "number", "decimal", "regex"];
228
224
  var DEFAULT_HELP_POPOVER_PROPS = {
229
225
  helpLinkProps: {
230
- label: t$1("neetoRules.labels.viewHelpArticle")
226
+ label: t("neetoRules.labels.viewHelpArticle")
231
227
  }
232
228
  };
233
229
 
@@ -315,7 +311,7 @@ var getSlackChannelErrors = function getSlackChannelErrors(_ref2) {
315
311
  return {
316
312
  error: true,
317
313
  isIntegrableError: false,
318
- message: t$1("neetoRules.validations.slack.invalidChannel")
314
+ message: t("neetoRules.validations.slack.invalidChannel")
319
315
  };
320
316
  }
321
317
  }
@@ -469,55 +465,6 @@ var ActionPanel = function ActionPanel() {
469
465
  });
470
466
  };
471
467
 
472
- function isBuffer (obj) {
473
- return obj &&
474
- obj.constructor &&
475
- (typeof obj.constructor.isBuffer === 'function') &&
476
- obj.constructor.isBuffer(obj)
477
- }
478
-
479
- function keyIdentity (key) {
480
- return key
481
- }
482
-
483
- function flatten (target, opts) {
484
- opts = opts || {};
485
-
486
- const delimiter = opts.delimiter || '.';
487
- const maxDepth = opts.maxDepth;
488
- const transformKey = opts.transformKey || keyIdentity;
489
- const output = {};
490
-
491
- function step (object, prev, currentDepth) {
492
- currentDepth = currentDepth || 1;
493
- Object.keys(object).forEach(function (key) {
494
- const value = object[key];
495
- const isarray = opts.safe && Array.isArray(value);
496
- const type = Object.prototype.toString.call(value);
497
- const isbuffer = isBuffer(value);
498
- const isobject = (
499
- type === '[object Object]' ||
500
- type === '[object Array]'
501
- );
502
-
503
- const newKey = prev
504
- ? prev + delimiter + transformKey(key)
505
- : transformKey(key);
506
-
507
- if (!isarray && !isbuffer && isobject && Object.keys(value).length &&
508
- (!opts.maxDepth || currentDepth < maxDepth)) {
509
- return step(value, newKey, currentDepth + 1)
510
- }
511
-
512
- output[newKey] = value;
513
- });
514
- }
515
-
516
- step(target);
517
-
518
- return output
519
- }
520
-
521
468
  var DEFAULT_LONG_TEXT_ROWS = 8;
522
469
 
523
470
  var Target$k = function Target(_ref) {
@@ -1723,35 +1670,6 @@ var Input = function Input(_ref2) {
1723
1670
  };
1724
1671
  Input.Target = Target$e;
1725
1672
 
1726
- var useOnClickOutside = function useOnClickOutside(ref, handler) {
1727
- useEffect(function () {
1728
- var listener = function listener(event) {
1729
- // Do nothing if clicking ref's element or descendent elements
1730
- if (!ref.current || ref.current.contains(event.target)) {
1731
- return;
1732
- }
1733
- handler(event);
1734
- };
1735
- document.addEventListener("mousedown", listener);
1736
- document.addEventListener("touchstart", listener);
1737
- return function () {
1738
- document.removeEventListener("mousedown", listener);
1739
- document.removeEventListener("touchstart", listener);
1740
- };
1741
- }, [handler]);
1742
- };
1743
-
1744
- var SHORTCUTS = {
1745
- cancel: {
1746
- sequence: "escape",
1747
- description: t$1("neetoRules.shortcuts.cancel")
1748
- },
1749
- submit: {
1750
- sequence: "enter",
1751
- description: t$1("neetoRules.shortcuts.submit")
1752
- }
1753
- };
1754
-
1755
1673
  var _excluded$c = ["value", "nullable", "className", "handleSubmit", "handleCancel"];
1756
1674
  function ownKeys$n(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; }
1757
1675
  function _objectSpread$n(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$n(Object(t), true).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$n(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
@@ -2491,9 +2409,9 @@ var ERROR_MESSAGE_DELIMITER = ". ";
2491
2409
  var DELIMITER_KEYS = ["Enter", "Tab", ",", " "];
2492
2410
  var PHONE_NUMBER_SEPARATION_REGEX = /[^\s,]+/g;
2493
2411
  var FLEXIBLE_PHONE_NUMBER_REGEX = /[0-9+, ]+/g;
2494
- var PHONE_NUMBER_VALIDATION_SCHEMA = yup.string().required(t$1("neetoRules.validations.required.entity", {
2495
- entity: t$1("neetoRules.common.phoneNumber")
2496
- })).test("testPhoneNumber", t$1("neetoRules.validations.invalidPhoneNumber"), isPhoneNumberValid);
2412
+ var PHONE_NUMBER_VALIDATION_SCHEMA = yup.string().required(t("neetoRules.validations.required.entity", {
2413
+ entity: t("neetoRules.common.phoneNumber")
2414
+ })).test("testPhoneNumber", t("neetoRules.validations.invalidPhoneNumber"), isPhoneNumberValid);
2497
2415
  var CUSTOM_STYLES = {
2498
2416
  input: assoc("overflow", "hidden"),
2499
2417
  multiValue: function multiValue(styles, _ref2) {
@@ -3718,10 +3636,10 @@ var getAllOptions = function getAllOptions(options) {
3718
3636
  };
3719
3637
  var getLogicalOperatorOptions = function getLogicalOperatorOptions(isWithEvents) {
3720
3638
  return [{
3721
- label: isWithEvents ? t$1("neetoRules.common.andWhen") : t$1("neetoRules.common.andIf"),
3639
+ label: isWithEvents ? t("neetoRules.common.andWhen") : t("neetoRules.common.andIf"),
3722
3640
  value: OPERATORS$1.and
3723
3641
  }, {
3724
- label: isWithEvents ? t$1("neetoRules.common.orWhen") : t$1("neetoRules.common.orIf"),
3642
+ label: isWithEvents ? t("neetoRules.common.orWhen") : t("neetoRules.common.orIf"),
3725
3643
  value: OPERATORS$1.or
3726
3644
  }];
3727
3645
  };
@@ -4992,7 +4910,7 @@ var getSchemaForStrings = function getSchemaForStrings(element) {
4992
4910
  is: function is() {
4993
4911
  return required;
4994
4912
  },
4995
- then: yup.string().required(t$1("neetoRules.validations.required.entity", {
4913
+ then: yup.string().required(t("neetoRules.validations.required.entity", {
4996
4914
  entity: label
4997
4915
  }))
4998
4916
  });
@@ -5007,10 +4925,10 @@ var getEventsSchema = function getEventsSchema(element) {
5007
4925
  return required;
5008
4926
  },
5009
4927
  then: yup.array().of(yup.object().shape({
5010
- name: yup.string().required(t$1("neetoRules.validations.required.entity", {
4928
+ name: yup.string().required(t("neetoRules.validations.required.entity", {
5011
4929
  entity: label
5012
4930
  }))
5013
- })).min(1, t$1("neetoRules.validations.atLeastOneValue"))
4931
+ })).min(1, t("neetoRules.validations.atLeastOneValue"))
5014
4932
  });
5015
4933
  };
5016
4934
  var getConditionsSchema = function getConditionsSchema(element) {
@@ -5023,7 +4941,7 @@ var getConditionsSchema = function getConditionsSchema(element) {
5023
4941
  return required;
5024
4942
  },
5025
4943
  then: yup.array().of(yup.object().shape({
5026
- field: yup.string().required(t$1("neetoRules.validations.required.condition")),
4944
+ field: yup.string().required(t("neetoRules.validations.required.condition")),
5027
4945
  metadata: yup.mixed().when(["field", "verb"], function (field, verb, schema) {
5028
4946
  var _selectedCondition$no;
5029
4947
  var selectedCondition = findBy({
@@ -5039,31 +4957,31 @@ var getConditionsSchema = function getConditionsSchema(element) {
5039
4957
  }
5040
4958
  if ([CONDITION_VALUE_TYPES.date, CONDITION_VALUE_TYPES.radio, CONDITION_VALUE_TYPES.dropdown, CONDITION_VALUE_TYPES.select].includes(type)) {
5041
4959
  return yup.object().shape({
5042
- value: yup.string().required(t$1("neetoRules.validations.required.value"))
4960
+ value: yup.string().required(t("neetoRules.validations.required.value"))
5043
4961
  });
5044
4962
  } else if ([CONDITION_VALUE_TYPES.text, CONDITION_VALUE_TYPES.regex].includes(type)) {
5045
4963
  return yup.object().shape({
5046
- value: yup.string().trim().test("no-blank-spaces", t$1("neetoRules.validations.noBlankSpaces"), function (value) {
4964
+ value: yup.string().trim().test("no-blank-spaces", t("neetoRules.validations.noBlankSpaces"), function (value) {
5047
4965
  return value === undefined || value.trim() !== "";
5048
- }).required(t$1("neetoRules.validations.required.value"))
4966
+ }).required(t("neetoRules.validations.required.value"))
5049
4967
  });
5050
4968
  } else if ([CONDITION_VALUE_TYPES.multiSelect, CONDITION_VALUE_TYPES.multiSelectCreate].includes(type)) {
5051
4969
  return yup.object().shape({
5052
- values: yup.array().min(1, t$1("neetoRules.validations.atLeastOneValue")).required(t$1("neetoRules.validations.atLeastOneValue"))
4970
+ values: yup.array().min(1, t("neetoRules.validations.atLeastOneValue")).required(t("neetoRules.validations.atLeastOneValue"))
5053
4971
  });
5054
4972
  } else if ([CONDITION_VALUE_TYPES.email].includes(type)) {
5055
4973
  if (["is", "is_not"].includes(verb)) {
5056
4974
  return yup.object().shape({
5057
- value: yup.string().email(t$1("neetoRules.validations.inValidEmail")).required(t$1("neetoRules.validations.required.email"))
4975
+ value: yup.string().email(t("neetoRules.validations.inValidEmail")).required(t("neetoRules.validations.required.email"))
5058
4976
  });
5059
4977
  }
5060
4978
  return yup.object().shape({
5061
- value: yup.string().trim().test("no-blank-spaces", t$1("neetoRules.validations.noBlankSpaces"), function (value) {
4979
+ value: yup.string().trim().test("no-blank-spaces", t("neetoRules.validations.noBlankSpaces"), function (value) {
5062
4980
  return value === undefined || value.trim() !== "";
5063
- }).required(t$1("neetoRules.validations.required.value"))
4981
+ }).required(t("neetoRules.validations.required.value"))
5064
4982
  });
5065
4983
  } else if ([CONDITION_VALUE_TYPES.number].includes(type)) {
5066
- var message = selectedCondition !== null && selectedCondition !== void 0 && selectedCondition.onlyPositive ? t$1("neetoRules.validations.positiveNumber") : t$1("neetoRules.validations.number");
4984
+ var message = selectedCondition !== null && selectedCondition !== void 0 && selectedCondition.onlyPositive ? t("neetoRules.validations.positiveNumber") : t("neetoRules.validations.number");
5067
4985
  var regex = selectedCondition !== null && selectedCondition !== void 0 && selectedCondition.onlyPositive ? POSITIVE_NUMBER_REGEX : NUMBER_REGEX;
5068
4986
  return yup.object({
5069
4987
  value: yup.string().test("are-all-number", message, function (value) {
@@ -5073,25 +4991,25 @@ var getConditionsSchema = function getConditionsSchema(element) {
5073
4991
  } else if ([CONDITION_VALUE_TYPES.url].includes(type)) {
5074
4992
  if (["is", "is_not"].includes(verb)) {
5075
4993
  return yup.object().shape({
5076
- value: yup.string().url(t$1("neetoRules.validations.inValidURL")).required(t$1("neetoRules.validations.required.url"))
4994
+ value: yup.string().url(t("neetoRules.validations.inValidURL")).required(t("neetoRules.validations.required.url"))
5077
4995
  });
5078
4996
  }
5079
4997
  return yup.object().shape({
5080
- value: yup.string().trim().test("no-blank-spaces", t$1("neetoRules.validations.noBlankSpaces"), function (value) {
4998
+ value: yup.string().trim().test("no-blank-spaces", t("neetoRules.validations.noBlankSpaces"), function (value) {
5081
4999
  return value === undefined || value.trim() !== "";
5082
- }).required(t$1("neetoRules.validations.required.value"))
5000
+ }).required(t("neetoRules.validations.required.value"))
5083
5001
  });
5084
5002
  } else if ([CONDITION_VALUE_TYPES.decimal].includes(type)) {
5085
- var _message = selectedCondition !== null && selectedCondition !== void 0 && selectedCondition.onlyPositive ? t$1("neetoRules.validations.positiveDecimal") : t$1("neetoRules.validations.decimal");
5003
+ var _message = selectedCondition !== null && selectedCondition !== void 0 && selectedCondition.onlyPositive ? t("neetoRules.validations.positiveDecimal") : t("neetoRules.validations.decimal");
5086
5004
  var _regex = selectedCondition !== null && selectedCondition !== void 0 && selectedCondition.onlyPositive ? POSITIVE_DECIMAL_NUMBER_REGEX : DECIMAL_NUMBER_REGEX;
5087
5005
  return yup.object({
5088
5006
  value: yup.string().test("are-all-number", _message, function (value) {
5089
5007
  return _regex.test(value);
5090
- }).required(t$1("neetoRules.validations.required.decimal"))
5008
+ }).required(t("neetoRules.validations.required.decimal"))
5091
5009
  });
5092
5010
  } else if ([CONDITION_VALUE_TYPES.textarea].includes(type)) {
5093
5011
  return yup.object({
5094
- value: yup.string().test("text", t$1("neetoRules.validations.required.text"), function (value) {
5012
+ value: yup.string().test("text", t("neetoRules.validations.required.text"), function (value) {
5095
5013
  return !isEditorEmpty(value);
5096
5014
  })
5097
5015
  });
@@ -5111,76 +5029,76 @@ var getActionsSchema = function getActionsSchema(element, customData) {
5111
5029
  return required;
5112
5030
  },
5113
5031
  then: yup.array().of(yup.object().shape({
5114
- name: yup.string().required(t$1("neetoRules.validations.required.action")),
5032
+ name: yup.string().required(t("neetoRules.validations.required.action")),
5115
5033
  metadata: yup.mixed().when("name", function (field, schema) {
5116
5034
  var selectedAction = findBy({
5117
5035
  value: field
5118
5036
  }, actionOptions);
5119
5037
  if ([ACTION_TYPES.email, ACTION_TYPES.emailToIds, ACTION_TYPES.emailTo].includes(selectedAction === null || selectedAction === void 0 ? void 0 : selectedAction.type)) {
5120
5038
  return yup.object({
5121
- subject: !selectedAction.hideSubject ? yup.string().required(t$1("neetoRules.validations.required.subject")) : schema,
5122
- emails: selectedAction.type === ACTION_TYPES.emailToIds ? yup.array().min(1, t$1("neetoRules.validations.required.emailId")).required(t$1("neetoRules.validations.required.emailId")).of(yup.string().email(t$1("neetoRules.validations.inValidEmail"))).when("test", {
5039
+ subject: !selectedAction.hideSubject ? yup.string().required(t("neetoRules.validations.required.subject")) : schema,
5040
+ emails: selectedAction.type === ACTION_TYPES.emailToIds ? yup.array().min(1, t("neetoRules.validations.required.emailId")).required(t("neetoRules.validations.required.emailId")).of(yup.string().email(t("neetoRules.validations.inValidEmail"))).when("test", {
5123
5041
  is: function is() {
5124
5042
  return selectedAction === null || selectedAction === void 0 ? void 0 : selectedAction.maxLimit;
5125
5043
  },
5126
5044
  then: function then(schema) {
5127
- return schema.max(selectedAction.maxLimit, t$1("neetoRules.validations.maximumEmails", {
5045
+ return schema.max(selectedAction.maxLimit, t("neetoRules.validations.maximumEmails", {
5128
5046
  max: selectedAction.maxLimit
5129
5047
  }));
5130
5048
  }
5131
5049
  }) : schema,
5132
- body: yup.string().test("body", t$1("neetoRules.validations.required.body"), function (value) {
5050
+ body: yup.string().test("body", t("neetoRules.validations.required.body"), function (value) {
5133
5051
  return !isEditorEmpty(value);
5134
5052
  }),
5135
- value: selectedAction.type === ACTION_TYPES.emailTo ? yup.string().required(t$1("neetoRules.validations.required.value")) : schema,
5053
+ value: selectedAction.type === ACTION_TYPES.emailTo ? yup.string().required(t("neetoRules.validations.required.value")) : schema,
5136
5054
  templateName: TEMPLATE_NAME_VALIDATION_SCHEMA
5137
5055
  });
5138
5056
  } else if ([ACTION_TYPES.sms, ACTION_TYPES.smsToNumbers, ACTION_TYPES.smsTo].includes(selectedAction === null || selectedAction === void 0 ? void 0 : selectedAction.type)) {
5139
5057
  return yup.object({
5140
- phoneNumbers: selectedAction.type === ACTION_TYPES.smsToNumbers ? yup.array().required(t$1("neetoRules.validations.required.entity", {
5141
- entity: t$1("neetoRules.common.phoneNumber")
5142
- })).of(yup.string().test("testPhoneNumber", t$1("neetoRules.validations.invalidPhoneNumber"), function (value) {
5058
+ phoneNumbers: selectedAction.type === ACTION_TYPES.smsToNumbers ? yup.array().required(t("neetoRules.validations.required.entity", {
5059
+ entity: t("neetoRules.common.phoneNumber")
5060
+ })).of(yup.string().test("testPhoneNumber", t("neetoRules.validations.invalidPhoneNumber"), function (value) {
5143
5061
  return isPhoneNumberValid(value);
5144
5062
  })).when("test", {
5145
5063
  is: function is() {
5146
5064
  return selectedAction === null || selectedAction === void 0 ? void 0 : selectedAction.maxLimit;
5147
5065
  },
5148
5066
  then: function then(schema) {
5149
- return schema.max(selectedAction.maxLimit, t$1("neetoRules.validations.maximumPhoneNumbers", {
5067
+ return schema.max(selectedAction.maxLimit, t("neetoRules.validations.maximumPhoneNumbers", {
5150
5068
  max: selectedAction.maxLimit
5151
5069
  }));
5152
5070
  }
5153
5071
  }) : schema,
5154
- body: yup.string().test("body", t$1("neetoRules.validations.required.body"), function (value) {
5072
+ body: yup.string().test("body", t("neetoRules.validations.required.body"), function (value) {
5155
5073
  return !isEditorEmpty(value);
5156
5074
  }),
5157
- value: selectedAction.type === ACTION_TYPES.smsTo ? yup.string().required(t$1("neetoRules.validations.required.value")) : schema,
5075
+ value: selectedAction.type === ACTION_TYPES.smsTo ? yup.string().required(t("neetoRules.validations.required.value")) : schema,
5158
5076
  templateName: TEMPLATE_NAME_VALIDATION_SCHEMA
5159
5077
  });
5160
5078
  } else if (ACTION_TYPES.sendToApi === (selectedAction === null || selectedAction === void 0 ? void 0 : selectedAction.type)) {
5161
5079
  return yup.object({
5162
- endpoint: yup.string().url(t$1("neetoRules.validations.invalidUrlEntity", {
5163
- entity: t$1("neetoRules.labels.endpoint")
5164
- })).required(t$1("neetoRules.validations.required.entity", {
5165
- entity: t$1("neetoRules.labels.endpoint")
5080
+ endpoint: yup.string().url(t("neetoRules.validations.invalidUrlEntity", {
5081
+ entity: t("neetoRules.labels.endpoint")
5082
+ })).required(t("neetoRules.validations.required.entity", {
5083
+ entity: t("neetoRules.labels.endpoint")
5166
5084
  })),
5167
- body: yup.string().trim().required(t$1("neetoRules.validations.required.entity", {
5168
- entity: t$1("neetoRules.labels.body")
5085
+ body: yup.string().trim().required(t("neetoRules.validations.required.entity", {
5086
+ entity: t("neetoRules.labels.body")
5169
5087
  })).test("is-valid-json-and-not-empty", function (value, context) {
5170
5088
  if (!value) return true;
5171
5089
  try {
5172
5090
  var parsedValue = JSON.parse(value);
5173
5091
  if (isNotPresent(parsedValue)) {
5174
5092
  return context.createError({
5175
- message: t$1("neetoRules.validations.required.entity", {
5176
- entity: t$1("neetoRules.labels.body")
5093
+ message: t("neetoRules.validations.required.entity", {
5094
+ entity: t("neetoRules.labels.body")
5177
5095
  })
5178
5096
  });
5179
5097
  }
5180
5098
  return true;
5181
5099
  } catch (_unused) {
5182
5100
  return context.createError({
5183
- message: t$1("neetoRules.validations.invalidJsonBody")
5101
+ message: t("neetoRules.validations.invalidJsonBody")
5184
5102
  });
5185
5103
  }
5186
5104
  }),
@@ -5188,30 +5106,30 @@ var getActionsSchema = function getActionsSchema(element, customData) {
5188
5106
  });
5189
5107
  } else if (ACTION_TYPES.multiSelect === (selectedAction === null || selectedAction === void 0 ? void 0 : selectedAction.type)) {
5190
5108
  return yup.object({
5191
- value: yup.array().min(1, t$1("neetoRules.validations.atLeastOneValue")).required(t$1("neetoRules.validations.atLeastOneValue"))
5109
+ value: yup.array().min(1, t("neetoRules.validations.atLeastOneValue")).required(t("neetoRules.validations.atLeastOneValue"))
5192
5110
  });
5193
5111
  } else if (ACTION_TYPES.list === (selectedAction === null || selectedAction === void 0 ? void 0 : selectedAction.type)) {
5194
5112
  return yup.object({
5195
- value: yup.array().min(1, t$1("neetoRules.validations.atLeastOneValue")).required(t$1("neetoRules.validations.atLeastOneValue"))
5113
+ value: yup.array().min(1, t("neetoRules.validations.atLeastOneValue")).required(t("neetoRules.validations.atLeastOneValue"))
5196
5114
  });
5197
5115
  } else if ((selectedAction === null || selectedAction === void 0 ? void 0 : selectedAction.type) === ACTION_TYPES.note || (selectedAction === null || selectedAction === void 0 ? void 0 : selectedAction.type) === ACTION_TYPES.textarea) {
5198
5116
  return yup.object({
5199
- value: yup.string().test("body", t$1("neetoRules.validations.required.body"), function (value) {
5117
+ value: yup.string().test("body", t("neetoRules.validations.required.body"), function (value) {
5200
5118
  return !isEditorEmpty(value);
5201
5119
  })
5202
5120
  });
5203
5121
  } else if ((selectedAction === null || selectedAction === void 0 ? void 0 : selectedAction.type) === ACTION_TYPES.dropdown || (selectedAction === null || selectedAction === void 0 ? void 0 : selectedAction.type) === ACTION_TYPES.date) {
5204
5122
  return yup.object({
5205
- value: yup.string().required(t$1("neetoRules.validations.required.value"))
5123
+ value: yup.string().required(t("neetoRules.validations.required.value"))
5206
5124
  });
5207
5125
  } else if ((selectedAction === null || selectedAction === void 0 ? void 0 : selectedAction.type) === ACTION_TYPES.text || (selectedAction === null || selectedAction === void 0 ? void 0 : selectedAction.type) === ACTION_TYPES.regex) {
5208
5126
  return yup.object({
5209
- value: yup.string().trim().test("no-blank-spaces", t$1("neetoRules.validations.noBlankSpaces"), function (value) {
5127
+ value: yup.string().trim().test("no-blank-spaces", t("neetoRules.validations.noBlankSpaces"), function (value) {
5210
5128
  return value === undefined || value.trim() !== "";
5211
- }).required(t$1("neetoRules.validations.required.value"))
5129
+ }).required(t("neetoRules.validations.required.value"))
5212
5130
  });
5213
5131
  } else if ((selectedAction === null || selectedAction === void 0 ? void 0 : selectedAction.type) === ACTION_TYPES.number) {
5214
- var message = selectedAction !== null && selectedAction !== void 0 && selectedAction.onlyPositive ? t$1("neetoRules.validations.positiveNumber") : t$1("neetoRules.validations.number");
5132
+ var message = selectedAction !== null && selectedAction !== void 0 && selectedAction.onlyPositive ? t("neetoRules.validations.positiveNumber") : t("neetoRules.validations.number");
5215
5133
  var regex = selectedAction !== null && selectedAction !== void 0 && selectedAction.onlyPositive ? POSITIVE_NUMBER_REGEX : NUMBER_REGEX;
5216
5134
  return yup.object({
5217
5135
  value: yup.string().test("are-all-number", message, function (value) {
@@ -5219,16 +5137,16 @@ var getActionsSchema = function getActionsSchema(element, customData) {
5219
5137
  })
5220
5138
  });
5221
5139
  } else if ((selectedAction === null || selectedAction === void 0 ? void 0 : selectedAction.type) === ACTION_TYPES.decimal) {
5222
- var _message2 = selectedAction !== null && selectedAction !== void 0 && selectedAction.onlyPositive ? t$1("neetoRules.validations.positiveDecimal") : t$1("neetoRules.validations.decimal");
5140
+ var _message2 = selectedAction !== null && selectedAction !== void 0 && selectedAction.onlyPositive ? t("neetoRules.validations.positiveDecimal") : t("neetoRules.validations.decimal");
5223
5141
  var _regex2 = selectedAction !== null && selectedAction !== void 0 && selectedAction.onlyPositive ? POSITIVE_DECIMAL_NUMBER_REGEX : DECIMAL_NUMBER_REGEX;
5224
5142
  return yup.object({
5225
5143
  value: yup.string().test("are-all-number", _message2, function (value) {
5226
5144
  return _regex2.test(value);
5227
- }).required(t$1("neetoRules.validations.required.decimal"))
5145
+ }).required(t("neetoRules.validations.required.decimal"))
5228
5146
  });
5229
5147
  } else if ((selectedAction === null || selectedAction === void 0 ? void 0 : selectedAction.type) === ACTION_TYPES.longText) {
5230
5148
  return yup.object({
5231
- value: yup.string().required(t$1("neetoRules.validations.required.body"))
5149
+ value: yup.string().required(t("neetoRules.validations.required.body"))
5232
5150
  });
5233
5151
  } else if (selectedAction !== null && selectedAction !== void 0 && selectedAction.component) {
5234
5152
  return typeof selectedAction.validation === "function" ? selectedAction.validation(customData) : selectedAction.validation;
@@ -5246,7 +5164,7 @@ var getSchemaForArray = function getSchemaForArray(element) {
5246
5164
  is: function is() {
5247
5165
  return required;
5248
5166
  },
5249
- then: yup.array().min(1, t$1("neetoRules.validations.atLeastOneValue")).required(t$1("neetoRules.validations.atLeastOneValue"))
5167
+ then: yup.array().min(1, t("neetoRules.validations.atLeastOneValue")).required(t("neetoRules.validations.atLeastOneValue"))
5250
5168
  });
5251
5169
  };
5252
5170
  var getSchemaForExecutionDelay = function getSchemaForExecutionDelay(_) {
@@ -5255,12 +5173,12 @@ var getSchemaForExecutionDelay = function getSchemaForExecutionDelay(_) {
5255
5173
  return true;
5256
5174
  }
5257
5175
  var schema = yup.object().shape({
5258
- value: yup.number().nullable().integer().typeError(t$1("neetoRules.validations.number")).min(1, t$1("neetoRules.validations.minDelay", {
5176
+ value: yup.number().nullable().integer().typeError(t("neetoRules.validations.number")).min(1, t("neetoRules.validations.minDelay", {
5259
5177
  min: 1
5260
- })).max(999, t$1("neetoRules.validations.maxDelay", {
5178
+ })).max(999, t("neetoRules.validations.maxDelay", {
5261
5179
  max: 999
5262
- })).required(t$1("neetoRules.validations.required.value")),
5263
- unit: yup.string().nullable().required(t$1("neetoRules.validations.required.value"))
5180
+ })).required(t("neetoRules.validations.required.value")),
5181
+ unit: yup.string().nullable().required(t("neetoRules.validations.required.value"))
5264
5182
  });
5265
5183
  try {
5266
5184
  schema.validateSync(value, {
@@ -5366,8 +5284,8 @@ var PANEL_TYPE_CONFIG_MAP = _defineProperty(_defineProperty(_defineProperty(_def
5366
5284
  });
5367
5285
  var TEMPLATE_NAME_VALIDATION_SCHEMA = yup.string().when("shouldSaveAsTemplate", {
5368
5286
  is: true,
5369
- then: yup.string().trim().required(t$1("neetoRules.validations.required.entity", {
5370
- entity: t$1("neetoRules.labels.templateName")
5287
+ then: yup.string().trim().required(t("neetoRules.validations.required.entity", {
5288
+ entity: t("neetoRules.labels.templateName")
5371
5289
  }))
5372
5290
  });
5373
5291
  var POLL_RETRY_COUNT = 1000;
@@ -6389,19 +6307,6 @@ var EventConditions = function EventConditions(_ref) {
6389
6307
  });
6390
6308
  };
6391
6309
 
6392
- var useDebouncedUpdate = function useDebouncedUpdate(value, setValue) {
6393
- var duration = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 200;
6394
- var _useStateWithDependen = useStateWithDependency(value),
6395
- _useStateWithDependen2 = _slicedToArray(_useStateWithDependen, 2),
6396
- text = _useStateWithDependen2[0],
6397
- setText = _useStateWithDependen2[1];
6398
- var debouncedValue = useDebounce(text, duration);
6399
- useEffect(function () {
6400
- setValue(text);
6401
- }, [debouncedValue]);
6402
- return [text, setText];
6403
- };
6404
-
6405
6310
  var _excluded$5 = ["data", "name", "label"];
6406
6311
  function ownKeys$7(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; }
6407
6312
  function _objectSpread$7(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$7(Object(t), true).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$7(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }