@bigbinary/neeto-rules-frontend 2.7.11 → 2.7.12

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 (33) hide show
  1. package/app/javascript/src/translations/en.json +2 -4
  2. package/dist/.ready +1 -1
  3. package/dist/NeetoRulesBuilder.js +63 -12
  4. package/dist/NeetoRulesBuilder.js.map +1 -1
  5. package/dist/NeetoRulesForm.js +2 -2
  6. package/dist/cjs/NeetoRulesBuilder.js +63 -12
  7. package/dist/cjs/NeetoRulesBuilder.js.map +1 -1
  8. package/dist/cjs/NeetoRulesForm.js +2 -2
  9. package/dist/cjs/index.js +2 -2
  10. package/dist/cjs/v2/NeetoRulesBuilder.js +2 -2
  11. package/dist/cjs/v2/NeetoRulesForm.js +2 -2
  12. package/dist/cjs/v2/index.js +2 -2
  13. package/dist/{index-DZzMQVUu.js → index-Bfe1tRHq.js} +6 -31
  14. package/dist/index-Bfe1tRHq.js.map +1 -0
  15. package/dist/{index-CqiiEJkf.js → index-C0gKo-ED.js} +6 -31
  16. package/dist/index-C0gKo-ED.js.map +1 -0
  17. package/dist/{index-CqnO-IZF.js → index-D7dZ7WdP.js} +2 -2
  18. package/dist/{index-CqnO-IZF.js.map → index-D7dZ7WdP.js.map} +1 -1
  19. package/dist/{index-DOW_ZlOp.js → index-DnM1MWRr.js} +2 -2
  20. package/dist/{index-DOW_ZlOp.js.map → index-DnM1MWRr.js.map} +1 -1
  21. package/dist/index.js +2 -2
  22. package/dist/keyboardShortcuts-DNOhEY8h.js +88 -0
  23. package/dist/{keyboardShortcuts-Ow9vI9My.js.map → keyboardShortcuts-DNOhEY8h.js.map} +1 -1
  24. package/dist/keyboardShortcuts-SAk712q8.js +92 -0
  25. package/dist/{keyboardShortcuts-5radhjgX.js.map → keyboardShortcuts-SAk712q8.js.map} +1 -1
  26. package/dist/v2/NeetoRulesBuilder.js +2 -2
  27. package/dist/v2/NeetoRulesForm.js +2 -2
  28. package/dist/v2/index.js +2 -2
  29. package/package.json +7 -7
  30. package/dist/index-CqiiEJkf.js.map +0 -1
  31. package/dist/index-DZzMQVUu.js.map +0 -1
  32. package/dist/keyboardShortcuts-5radhjgX.js +0 -92
  33. package/dist/keyboardShortcuts-Ow9vI9My.js +0 -88
@@ -2,7 +2,7 @@
2
2
 
3
3
  var _defineProperty = require('@babel/runtime/helpers/defineProperty');
4
4
  var _objectDestructuringEmpty = require('@babel/runtime/helpers/objectDestructuringEmpty');
5
- require('../keyboardShortcuts-5radhjgX.js');
5
+ require('../keyboardShortcuts-SAk712q8.js');
6
6
  var _toConsumableArray = require('@babel/runtime/helpers/toConsumableArray');
7
7
  var _slicedToArray = require('@babel/runtime/helpers/slicedToArray');
8
8
  var shallow = require('zustand/shallow');
@@ -17,7 +17,7 @@ var useUtilityStore = require('../useUtilityStore-C_U20IMX.js');
17
17
  var classNames = require('classnames');
18
18
  var Typography = require('@bigbinary/neetoui/Typography');
19
19
  var ramda = require('ramda');
20
- var index = require('../index-CqiiEJkf.js');
20
+ var index = require('../index-C0gKo-ED.js');
21
21
  var useCustomDataStore = require('../useCustomDataStore-DxFx8aCf.js');
22
22
  var jsxRuntime = require('react/jsx-runtime');
23
23
  var utils = require('@bigbinary/neeto-commons-frontend/utils');
package/dist/cjs/index.js CHANGED
@@ -54,9 +54,9 @@ require('@hello-pangea/dnd');
54
54
  require('@bigbinary/neeto-icons/Drag');
55
55
  require('react-router-dom');
56
56
  require('@babel/runtime/helpers/objectDestructuringEmpty');
57
- require('../keyboardShortcuts-5radhjgX.js');
57
+ require('../keyboardShortcuts-SAk712q8.js');
58
58
  require('classnames');
59
- require('../index-CqiiEJkf.js');
59
+ require('../index-C0gKo-ED.js');
60
60
  require('@babel/runtime/helpers/typeof');
61
61
  require('yup');
62
62
  require('@bigbinary/neeto-icons/Search');
@@ -2,7 +2,7 @@
2
2
 
3
3
  var _defineProperty = require('@babel/runtime/helpers/defineProperty');
4
4
  var _objectDestructuringEmpty = require('@babel/runtime/helpers/objectDestructuringEmpty');
5
- var keyboardShortcuts = require('../../keyboardShortcuts-5radhjgX.js');
5
+ var keyboardShortcuts = require('../../keyboardShortcuts-SAk712q8.js');
6
6
  var shallow = require('zustand/shallow');
7
7
  var react = require('react');
8
8
  var neetoAtoms = require('@bigbinary/neeto-atoms');
@@ -13,7 +13,7 @@ var neetoCist = require('@bigbinary/neeto-cist');
13
13
  var Container = require('@bigbinary/neeto-molecules/v2/Container');
14
14
  var Header = require('@bigbinary/neeto-molecules/v2/Header');
15
15
  var reactI18next = require('react-i18next');
16
- var index = require('../../index-CqnO-IZF.js');
16
+ var index = require('../../index-D7dZ7WdP.js');
17
17
  var useCustomDataStore = require('../../useCustomDataStore-D9k8F5g-.js');
18
18
  var useUtilityStore = require('../../useUtilityStore-DkxAexDw.js');
19
19
  var _toConsumableArray = require('@babel/runtime/helpers/toConsumableArray');
@@ -2,7 +2,7 @@
2
2
 
3
3
  var _defineProperty = require('@babel/runtime/helpers/defineProperty');
4
4
  var _objectDestructuringEmpty = require('@babel/runtime/helpers/objectDestructuringEmpty');
5
- require('../../keyboardShortcuts-5radhjgX.js');
5
+ require('../../keyboardShortcuts-SAk712q8.js');
6
6
  var _toConsumableArray = require('@babel/runtime/helpers/toConsumableArray');
7
7
  var _slicedToArray = require('@babel/runtime/helpers/slicedToArray');
8
8
  var shallow = require('zustand/shallow');
@@ -15,7 +15,7 @@ var reactI18next = require('react-i18next');
15
15
  var useUtilityStore = require('../../useUtilityStore-DkxAexDw.js');
16
16
  var classNames = require('classnames');
17
17
  var ramda = require('ramda');
18
- var index = require('../../index-CqnO-IZF.js');
18
+ var index = require('../../index-D7dZ7WdP.js');
19
19
  var useCustomDataStore = require('../../useCustomDataStore-D9k8F5g-.js');
20
20
  var jsxRuntime = require('react/jsx-runtime');
21
21
  var utils = require('@bigbinary/neeto-commons-frontend/v2/utils');
@@ -43,9 +43,9 @@ require('zustand');
43
43
  require('@bigbinary/neeto-commons-frontend/v2/utils');
44
44
  require('@bigbinary/neeto-molecules/v2/MoreDropdown');
45
45
  require('@babel/runtime/helpers/objectDestructuringEmpty');
46
- require('../../keyboardShortcuts-5radhjgX.js');
46
+ require('../../keyboardShortcuts-SAk712q8.js');
47
47
  require('classnames');
48
- require('../../index-CqnO-IZF.js');
48
+ require('../../index-D7dZ7WdP.js');
49
49
  require('@babel/runtime/helpers/typeof');
50
50
  require('yup');
51
51
  require('@monaco-editor/react');
@@ -6,7 +6,7 @@ import _typeof from '@babel/runtime/helpers/typeof';
6
6
  import _defineProperty from '@babel/runtime/helpers/defineProperty';
7
7
  import _slicedToArray from '@babel/runtime/helpers/slicedToArray';
8
8
  import { b as useUpdateAutomationRule, e as useFetchNameGenerationStatus } from './useAutomationRulesApi-C9I3wUZ8.js';
9
- import { u as useOnClickOutside, S as SHORTCUTS, f as flatten } from './keyboardShortcuts-Ow9vI9My.js';
9
+ import { u as useOnClickOutside, S as SHORTCUTS, f as flatten } from './keyboardShortcuts-DNOhEY8h.js';
10
10
  import { toLower, identity, pluck, isEmpty, replace, 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';
11
11
  import { t } from 'i18next';
12
12
  import * as yup from 'yup';
@@ -2714,16 +2714,6 @@ var Target$8 = function Target(_ref) {
2714
2714
  })]
2715
2715
  });
2716
2716
  };
2717
-
2718
- // Counts what the user sees in the editor, like a plain textarea would:
2719
- // every visible character including typed line breaks (<br> and paragraph
2720
- // ends), excluding only the structural newline after the final paragraph.
2721
- var plainTextLength = function plainTextLength(html) {
2722
- if (!html) return 0;
2723
- var withLineBreaks = html.replace(/<br\s*\/?>/gi, "\n").replace(/<\/p>/gi, "\n");
2724
- var doc = new DOMParser().parseFromString(withLineBreaks, HTML_MIME_TYPE);
2725
- return (doc.body.textContent || "").replace(/\n$/, "").length;
2726
- };
2727
2717
  var SmsFields = function SmsFields(_ref2) {
2728
2718
  var _action$metadata;
2729
2719
  var _ref2$showFieldSelect = _ref2.showFieldSelection,
@@ -2746,9 +2736,6 @@ var SmsFields = function SmsFields(_ref2) {
2746
2736
  _useField4 = _slicedToArray(_useField3, 1),
2747
2737
  _useField4$0$value = _useField4[0].value,
2748
2738
  phoneNumbers = _useField4$0$value === void 0 ? [] : _useField4$0$value;
2749
- var _useField5 = useField("".concat(name, ".body")),
2750
- _useField6 = _slicedToArray(_useField5, 1),
2751
- body = _useField6[0].value;
2752
2739
  var _useActiveField2 = useActiveField(name, {
2753
2740
  shouldAutoFocus: showFieldSelection ? false : shouldAutoFocus
2754
2741
  }),
@@ -2817,21 +2804,10 @@ var SmsFields = function SmsFields(_ref2) {
2817
2804
  variables: selectedField === null || selectedField === void 0 ? void 0 : selectedField.variables,
2818
2805
  editorRef: isFirstFieldInForm("body") ? mergeRefs(editorRef, initialFocusRef) : editorRef,
2819
2806
  onFocus: setFieldActive
2820
- }), /*#__PURE__*/jsxs("div", {
2821
- "aria-live": "polite",
2822
- className: "mt-1 flex items-baseline justify-between gap-x-2",
2823
- children: [/*#__PURE__*/jsx(Typography, {
2824
- className: "neeto-ui-text-gray-500",
2825
- style: "body3",
2826
- children: hint
2827
- }), /*#__PURE__*/jsx(Typography, {
2828
- className: "neeto-ui-text-gray-500 shrink-0",
2829
- "data-testid": "sms-body-character-count",
2830
- style: "body3",
2831
- children: t("neetoRules.labels.characterCount", {
2832
- count: plainTextLength(body)
2833
- })
2834
- })]
2807
+ }), hint && /*#__PURE__*/jsx(Typography, {
2808
+ className: "mt-1 neeto-ui-text-gray-500",
2809
+ style: "body3",
2810
+ children: hint
2835
2811
  }), isSaveAsTemplateVisible && /*#__PURE__*/jsx(SaveAsTemplate, {
2836
2812
  name: name,
2837
2813
  className: "mt-4"
@@ -5352,7 +5328,6 @@ var FIELD_TYPES = {
5352
5328
  multiSelect: "multi-select",
5353
5329
  executionDelay: "execution-delay"
5354
5330
  };
5355
- var HTML_MIME_TYPE = "text/html";
5356
5331
  var MIN_DELAY_VALUE = 1;
5357
5332
  var MAX_DELAY_VALUE = 999;
5358
5333
  var VALIDATION_SCHEMA = _defineProperty(_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), FIELD_TYPES.executionDelay, getSchemaForExecutionDelay);
@@ -5566,4 +5541,4 @@ var formatData = function formatData(data) {
5566
5541
  };
5567
5542
 
5568
5543
  export { ActionSubItem as A, DEFAULT_RULE_ACTION as D, EditorAction as E, FIELDS_WITH_OPTIONS as F, MIN_DELAY_VALUE as M, OPERATORS as O, PANEL_TYPES as P, RadioField as R, SelectField as S, TouchErrors as T, ValueField as V, getFieldDetails$1 as a, getSlackChannelErrors as b, getOptionsKey as c, getActionLabel as d, getLogicalOperatorOptions as e, getFieldDetails as f, getActionOptions as g, getVerbOptions as h, DEFAULT_DELAY as i, getAllEvents as j, STATUS_KEYS as k, formatData as l, buildPayload as m, ScrollToErrorField as n, Panel as o, getValidationSchema as p, DEFAULT_INITIAL_VALUE as q, ErrorCallout as r, SmsFields as s, MAX_DELAY_VALUE as t, usePollRuleName as u, PhoneNumberField as v };
5569
- //# sourceMappingURL=index-DZzMQVUu.js.map
5544
+ //# sourceMappingURL=index-Bfe1tRHq.js.map