@bigbinary/neeto-rules-frontend 2.5.0 → 2.5.2

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 (45) hide show
  1. package/README.md +4 -0
  2. package/dist/NeetoRules.js +3 -3
  3. package/dist/NeetoRulesForm.js +11 -7
  4. package/dist/NeetoRulesForm.js.map +1 -1
  5. package/dist/RulePreview.js +3 -3
  6. package/dist/cjs/CannedResponsesPane.js +21 -36
  7. package/dist/cjs/CannedResponsesPane.js.map +1 -1
  8. package/dist/cjs/NeetoRules.js +59 -83
  9. package/dist/cjs/NeetoRules.js.map +1 -1
  10. package/dist/cjs/NeetoRulesForm.js +401 -440
  11. package/dist/cjs/NeetoRulesForm.js.map +1 -1
  12. package/dist/cjs/RulePreview.js +41 -54
  13. package/dist/cjs/RulePreview.js.map +1 -1
  14. package/dist/cjs/constants.js +1 -3
  15. package/dist/cjs/constants.js.map +1 -1
  16. package/dist/cjs/hooks.js +1 -3
  17. package/dist/cjs/hooks.js.map +1 -1
  18. package/dist/cjs/index.js +5 -7
  19. package/dist/cjs/index.js.map +1 -1
  20. package/dist/{constants-67118957.js → constants-C0OOtVhT.js} +1 -1
  21. package/dist/{constants-67118957.js.map → constants-C0OOtVhT.js.map} +1 -1
  22. package/dist/{constants-7347bfc4.js → constants-CB5HRjxq.js} +1 -1
  23. package/dist/{constants-7347bfc4.js.map → constants-CB5HRjxq.js.map} +1 -1
  24. package/dist/constants.js +1 -1
  25. package/dist/hooks.js +1 -1
  26. package/dist/{constants-12c6ac46.js → index-9h4B7JZZ.js} +1 -1
  27. package/dist/index-9h4B7JZZ.js.map +1 -0
  28. package/dist/{constants-2f1113f8.js → index-DFwPrb81.js} +1 -1
  29. package/dist/index-DFwPrb81.js.map +1 -0
  30. package/dist/index.js +5 -5
  31. package/dist/{useCustomDataStore-51ceac06.js → useCustomDataStore-B1qHMIGJ.js} +1 -1
  32. package/dist/{useCustomDataStore-51ceac06.js.map → useCustomDataStore-B1qHMIGJ.js.map} +1 -1
  33. package/dist/{useCustomDataStore-c57f5581.js → useCustomDataStore-BEG8I__n.js} +1 -1
  34. package/dist/{useCustomDataStore-c57f5581.js.map → useCustomDataStore-BEG8I__n.js.map} +1 -1
  35. package/dist/{useUtilityStore-e4b36ba2.js → useUtilityStore-BGuo9bko.js} +1 -1
  36. package/dist/{useUtilityStore-e4b36ba2.js.map → useUtilityStore-BGuo9bko.js.map} +1 -1
  37. package/dist/{useUtilityStore-ee4f96f8.js → useUtilityStore-KjKihXb0.js} +1 -1
  38. package/dist/{useUtilityStore-ee4f96f8.js.map → useUtilityStore-KjKihXb0.js.map} +1 -1
  39. package/dist/{utils-cd8f199f.js → utils-BngEaPaz.js} +1 -1
  40. package/dist/{utils-cd8f199f.js.map → utils-BngEaPaz.js.map} +1 -1
  41. package/dist/{utils-866e8e3b.js → utils-CvS2p6ZS.js} +1 -1
  42. package/dist/{utils-866e8e3b.js.map → utils-CvS2p6ZS.js.map} +1 -1
  43. package/package.json +11 -11
  44. package/dist/constants-12c6ac46.js.map +0 -1
  45. package/dist/constants-2f1113f8.js.map +0 -1
package/README.md CHANGED
@@ -515,6 +515,10 @@ const initialProps = {
515
515
  conditionOptions: CONDITION_OPTIONS,
516
516
  value: DEFAULT_CONDITION_VALUE,
517
517
  },
518
+ execution_delay: {
519
+ value: { value: 2, unit: "minutes" },
520
+ defaultValue: { value: 2, unit: "minutes" },
521
+ type: "execution-delay",
518
522
  };
519
523
 
520
524
  <EventConditions
@@ -8,11 +8,11 @@ import Container from '@bigbinary/neeto-molecules/Container';
8
8
  import { useQuery, keepPreviousData } from '@tanstack/react-query';
9
9
  import _objectWithoutProperties from '@babel/runtime/helpers/objectWithoutProperties';
10
10
  import axios from 'axios';
11
- import { A as AUTOMATION_RULES, S as STALE_TIME } from './constants-12c6ac46.js';
11
+ import { A as AUTOMATION_RULES, S as STALE_TIME } from './index-9h4B7JZZ.js';
12
12
  import NeetoHeader from '@bigbinary/neeto-molecules/Header';
13
13
  import HelpPopover from '@bigbinary/neeto-molecules/HelpPopover';
14
14
  import Button from '@bigbinary/neetoui/Button';
15
- import { c as createRoutes } from './utils-866e8e3b.js';
15
+ import { c as createRoutes } from './utils-CvS2p6ZS.js';
16
16
  import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
17
17
  import { Draggable, DragDropContext, Droppable } from '@hello-pangea/dnd';
18
18
  import Reorder from '@bigbinary/neeto-icons/Reorder';
@@ -28,7 +28,7 @@ import TableWrapper from '@bigbinary/neeto-molecules/TableWrapper';
28
28
  import Alert from '@bigbinary/neetoui/Alert';
29
29
  import Table from '@bigbinary/neetoui/Table';
30
30
  import NoData from '@bigbinary/neetoui/NoData';
31
- import { u as useUtilityStore } from './useUtilityStore-ee4f96f8.js';
31
+ import { u as useUtilityStore } from './useUtilityStore-KjKihXb0.js';
32
32
  import _toConsumableArray from '@babel/runtime/helpers/toConsumableArray';
33
33
  import { t } from 'i18next';
34
34
  import { buildUrl } from '@bigbinary/neeto-commons-frontend/utils';
@@ -27,7 +27,7 @@ import { withT, useStateWithDependency, useDebounce } from '@bigbinary/neeto-com
27
27
  import Label from '@bigbinary/neetoui/Label';
28
28
  import Select from '@bigbinary/neetoui/Select';
29
29
  import DatePicker from '@bigbinary/neetoui/DatePicker';
30
- import { g as getSeparator } from './utils-866e8e3b.js';
30
+ import { g as getSeparator } from './utils-CvS2p6ZS.js';
31
31
  import { t as t$1 } from 'i18next';
32
32
  import FormikEditor from '@bigbinary/neeto-editor/FormikEditor';
33
33
  import MultiEmailInput from '@bigbinary/neetoui/formik/MultiEmailInput';
@@ -42,7 +42,7 @@ import Tag from '@bigbinary/neetoui/Tag';
42
42
  import { components } from 'react-select';
43
43
  import * as yup from 'yup';
44
44
  import { isEditorEmpty } from '@bigbinary/neeto-editor/utils';
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';
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-CB5HRjxq.js';
46
46
  import Eye from '@bigbinary/neeto-icons/Eye';
47
47
  import _asyncToGenerator from '@babel/runtime/helpers/asyncToGenerator';
48
48
  import _regeneratorRuntime from '@babel/runtime/regenerator';
@@ -53,7 +53,7 @@ import Radio from '@bigbinary/neetoui/formik/Radio';
53
53
  import { shallow } from 'zustand/shallow';
54
54
  import Help from '@bigbinary/neeto-icons/Help';
55
55
  import Switch from '@bigbinary/neetoui/Switch';
56
- import { u as useCustomDataStore } from './useCustomDataStore-51ceac06.js';
56
+ import { u as useCustomDataStore } from './useCustomDataStore-B1qHMIGJ.js';
57
57
  import _typeof from '@babel/runtime/helpers/typeof';
58
58
  import 'zustand';
59
59
 
@@ -3622,7 +3622,11 @@ var DEFAULT_DELAY = {
3622
3622
  function ownKeys$b(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; }
3623
3623
  function _objectSpread$b(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$b(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$b(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
3624
3624
  var AddDelay = function AddDelay(_ref) {
3625
- var name = _ref.name;
3625
+ var name = _ref.name,
3626
+ data = _ref.data;
3627
+ var _ref2 = data[name] || {},
3628
+ _ref2$defaultValue = _ref2.defaultValue,
3629
+ defaultValue = _ref2$defaultValue === void 0 ? DEFAULT_DELAY : _ref2$defaultValue;
3626
3630
  var _useField = useField("".concat(name, ".value")),
3627
3631
  _useField2 = _slicedToArray(_useField, 3),
3628
3632
  value = _useField2[0].value;
@@ -3636,11 +3640,10 @@ var AddDelay = function AddDelay(_ref) {
3636
3640
  var _useTranslation = useTranslation(),
3637
3641
  t = _useTranslation.t;
3638
3642
  var handleDisplayAddDelayForm = function handleDisplayAddDelayForm() {
3639
- var _value$value, _value$unit;
3640
3643
  setShowAddDelayButton(false);
3641
3644
  setValue({
3642
- value: (_value$value = value.value) !== null && _value$value !== void 0 ? _value$value : DEFAULT_DELAY.value,
3643
- unit: (_value$unit = value.unit) !== null && _value$unit !== void 0 ? _value$unit : DEFAULT_DELAY.unit
3645
+ value: defaultValue.value,
3646
+ unit: defaultValue.unit
3644
3647
  });
3645
3648
  };
3646
3649
  return /*#__PURE__*/jsxs(Fragment, {
@@ -4122,6 +4125,7 @@ var EventConditions = function EventConditions(_ref) {
4122
4125
  }, config))
4123
4126
  })]
4124
4127
  }), enableAddingDelay && /*#__PURE__*/jsx(AddDelay, {
4128
+ data: data,
4125
4129
  name: "execution_delay"
4126
4130
  })]
4127
4131
  });