@bigbinary/neeto-rules-frontend 2.7.20 → 2.7.22
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.
- package/app/javascript/src/translations/ar.json +2 -1
- package/app/javascript/src/translations/bg.json +2 -1
- package/app/javascript/src/translations/ca.json +2 -1
- package/app/javascript/src/translations/cs.json +2 -1
- package/app/javascript/src/translations/da.json +2 -1
- package/app/javascript/src/translations/de.json +2 -1
- package/app/javascript/src/translations/es-MX.json +2 -1
- package/app/javascript/src/translations/es.json +2 -1
- package/app/javascript/src/translations/et.json +2 -1
- package/app/javascript/src/translations/fi.json +2 -1
- package/app/javascript/src/translations/fil.json +2 -1
- package/app/javascript/src/translations/fr.json +2 -1
- package/app/javascript/src/translations/he.json +2 -1
- package/app/javascript/src/translations/hi.json +2 -1
- package/app/javascript/src/translations/hr.json +2 -1
- package/app/javascript/src/translations/hu.json +2 -1
- package/app/javascript/src/translations/id.json +2 -1
- package/app/javascript/src/translations/it.json +2 -1
- package/app/javascript/src/translations/ja.json +2 -1
- package/app/javascript/src/translations/ko.json +2 -1
- package/app/javascript/src/translations/nl.json +2 -1
- package/app/javascript/src/translations/pl.json +2 -1
- package/app/javascript/src/translations/pt-BR.json +2 -1
- package/app/javascript/src/translations/pt.json +2 -1
- package/app/javascript/src/translations/ro.json +2 -1
- package/app/javascript/src/translations/ru.json +2 -1
- package/app/javascript/src/translations/sk.json +2 -1
- package/app/javascript/src/translations/sl.json +2 -1
- package/app/javascript/src/translations/sv.json +2 -1
- package/app/javascript/src/translations/th.json +2 -1
- package/app/javascript/src/translations/tr.json +2 -1
- package/app/javascript/src/translations/uk.json +2 -1
- package/app/javascript/src/translations/vi.json +2 -1
- package/app/javascript/src/translations/zh-CN.json +2 -1
- package/app/javascript/src/translations/zh-TW.json +2 -1
- package/dist/.ready +1 -1
- package/dist/NeetoRulesBuilder.js +30 -2
- package/dist/NeetoRulesBuilder.js.map +1 -1
- package/dist/NeetoRulesForm.js +2 -2
- package/dist/cjs/NeetoRulesBuilder.js +30 -2
- package/dist/cjs/NeetoRulesBuilder.js.map +1 -1
- package/dist/cjs/NeetoRulesForm.js +2 -2
- package/dist/cjs/index.js +2 -2
- package/dist/cjs/v2/NeetoRules.js +1 -1
- package/dist/cjs/v2/NeetoRulesBuilder.js +407 -207
- package/dist/cjs/v2/NeetoRulesBuilder.js.map +1 -1
- package/dist/cjs/v2/NeetoRulesForm.js +10 -8
- package/dist/cjs/v2/NeetoRulesForm.js.map +1 -1
- package/dist/cjs/v2/RulePreview.js +1 -1
- package/dist/cjs/v2/hooks.js +2 -2
- package/dist/cjs/v2/index.js +4 -4
- package/dist/{index-DMCgC01M.js → index-49edM85x.js} +2 -2
- package/dist/{index-DMCgC01M.js.map → index-49edM85x.js.map} +1 -1
- package/dist/{index-D_dEe2Gg.js → index-BZYwFjcS.js} +2 -2
- package/dist/{index-D_dEe2Gg.js.map → index-BZYwFjcS.js.map} +1 -1
- package/dist/{index-BXLCiV70.js → index-CcbW7H2S.js} +67 -21
- package/dist/index-CcbW7H2S.js.map +1 -0
- package/dist/{index-hvuc6OIP.js → index-Fukq1VSN.js} +69 -18
- package/dist/index-Fukq1VSN.js.map +1 -0
- package/dist/index.js +2 -2
- package/dist/keyboardShortcuts-DtnjcivY.js +96 -0
- package/dist/{keyboardShortcuts-lX0oq49M.js.map → keyboardShortcuts-DtnjcivY.js.map} +1 -1
- package/dist/keyboardShortcuts-_OrtgF0A.js +92 -0
- package/dist/{keyboardShortcuts-DXP5YgeG.js.map → keyboardShortcuts-_OrtgF0A.js.map} +1 -1
- package/dist/{useCustomDataStore-CU3KpyD4.js → useCustomDataStore-CEbhXugO.js} +2 -2
- package/dist/{useCustomDataStore-CU3KpyD4.js.map → useCustomDataStore-CEbhXugO.js.map} +1 -1
- package/dist/{useCustomDataStore-D9k8F5g-.js → useCustomDataStore-DPmWkEhs.js} +2 -2
- package/dist/{useCustomDataStore-D9k8F5g-.js.map → useCustomDataStore-DPmWkEhs.js.map} +1 -1
- package/dist/{useUtilityStore-BBb39TOj.js → useUtilityStore-BVCulMEC.js} +9 -2
- package/dist/useUtilityStore-BVCulMEC.js.map +1 -0
- package/dist/{useUtilityStore-DkxAexDw.js → useUtilityStore-gtPhFvpI.js} +9 -2
- package/dist/useUtilityStore-gtPhFvpI.js.map +1 -0
- package/dist/v2/NeetoRules.js +1 -1
- package/dist/v2/NeetoRulesBuilder.js +388 -207
- package/dist/v2/NeetoRulesBuilder.js.map +1 -1
- package/dist/v2/NeetoRulesForm.js +10 -8
- package/dist/v2/NeetoRulesForm.js.map +1 -1
- package/dist/v2/RulePreview.js +1 -1
- package/dist/v2/hooks.js +2 -2
- package/dist/v2/index.js +4 -4
- package/package.json +7 -7
- package/dist/index-BXLCiV70.js.map +0 -1
- package/dist/index-hvuc6OIP.js.map +0 -1
- package/dist/keyboardShortcuts-DXP5YgeG.js +0 -92
- package/dist/keyboardShortcuts-lX0oq49M.js +0 -96
- package/dist/useUtilityStore-BBb39TOj.js.map +0 -1
- package/dist/useUtilityStore-DkxAexDw.js.map +0 -1
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import _defineProperty from '@babel/runtime/helpers/defineProperty';
|
|
2
2
|
import _objectDestructuringEmpty from '@babel/runtime/helpers/objectDestructuringEmpty';
|
|
3
|
-
import '../keyboardShortcuts-
|
|
3
|
+
import '../keyboardShortcuts-_OrtgF0A.js';
|
|
4
4
|
import _toConsumableArray from '@babel/runtime/helpers/toConsumableArray';
|
|
5
5
|
import _slicedToArray from '@babel/runtime/helpers/slicedToArray';
|
|
6
6
|
import { useShallow } from 'zustand/shallow';
|
|
@@ -10,11 +10,11 @@ import { useFormikContext, FieldArray, useField, Formik, Form as Form$1 } from '
|
|
|
10
10
|
import { Plus, Trash2, ChevronDown, Eye, CircleHelp, X } from 'lucide-react';
|
|
11
11
|
import { isNot, isPresent, noop, findBy, isNotEmpty } from '@bigbinary/neeto-cist';
|
|
12
12
|
import { useTranslation } from 'react-i18next';
|
|
13
|
-
import { u as useUtilityStore } from '../useUtilityStore-
|
|
13
|
+
import { u as useUtilityStore } from '../useUtilityStore-BVCulMEC.js';
|
|
14
14
|
import classNames from 'classnames';
|
|
15
15
|
import { isNotNil, isEmpty, pluck } from 'ramda';
|
|
16
|
-
import { g as getActionOptions, a as getFieldDetails, b as getSlackChannelErrors, A as ActionSubItem, F as FIELDS_WITH_OPTIONS, P as PANEL_TYPES, D as DEFAULT_RULE_ACTION,
|
|
17
|
-
import { a as useActiveField, u as useCustomDataStore } from '../useCustomDataStore-
|
|
16
|
+
import { g as getActionOptions, a as getFieldDetails, b as getSlackChannelErrors, c as getOptionsKey, d as getActionLabel, A as ActionSubItem, F as FIELDS_WITH_OPTIONS, P as PANEL_TYPES, D as DEFAULT_RULE_ACTION, e as getLogicalOperatorOptions, f as getFieldDetails$1, h as getVerbOptions, R as RadioField$1, S as SelectField$1, V as ValueField, i as DEFAULT_DELAY, j as getAllEvents, O as OPERATORS$1, k as STATUS_KEYS, l as formatData, u as usePollRuleName, T as TouchErrors, m as buildPayload, n as ScrollToErrorField, o as Panel, p as getValidationSchema, q as DEFAULT_INITIAL_VALUE } from '../index-CcbW7H2S.js';
|
|
17
|
+
import { a as useActiveField, u as useCustomDataStore } from '../useCustomDataStore-CEbhXugO.js';
|
|
18
18
|
import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
|
|
19
19
|
import { joinHyphenCase } from '@bigbinary/neeto-commons-frontend/v2/utils';
|
|
20
20
|
import { F as FIELDS_WITH_OPTIONS$1, O as OPERATORS } from '../constants-CYdcft3h.js';
|
|
@@ -120,9 +120,10 @@ var ActionItem$1 = function ActionItem(_ref) {
|
|
|
120
120
|
_ref3$disabledReason = _ref3.disabledReason,
|
|
121
121
|
disabledReason = _ref3$disabledReason === void 0 ? "" : _ref3$disabledReason;
|
|
122
122
|
var isMessageToSlackAction = (action === null || action === void 0 ? void 0 : action.name) === "message_to_slack";
|
|
123
|
+
var valueOptions = getSelectedFieldOptions();
|
|
123
124
|
var _getSlackChannelError = getSlackChannelErrors({
|
|
124
125
|
isMessageToSlackAction: isMessageToSlackAction,
|
|
125
|
-
slackChannels:
|
|
126
|
+
slackChannels: valueOptions,
|
|
126
127
|
action: action,
|
|
127
128
|
routeToSlackIntegration: routeToSlackIntegration
|
|
128
129
|
}),
|
|
@@ -137,7 +138,7 @@ var ActionItem$1 = function ActionItem(_ref) {
|
|
|
137
138
|
actionOptions: actionOptions,
|
|
138
139
|
selectedField: selectedField,
|
|
139
140
|
onSelectAction: onSelectAction,
|
|
140
|
-
valueOptions:
|
|
141
|
+
valueOptions: valueOptions,
|
|
141
142
|
errorMessage: errorMessage,
|
|
142
143
|
handleSlackChannelRefresh: handleSlackChannelRefresh,
|
|
143
144
|
isIntegrableError: isIntegrableError
|
|
@@ -168,7 +169,8 @@ var ActionItem$1 = function ActionItem(_ref) {
|
|
|
168
169
|
})
|
|
169
170
|
});
|
|
170
171
|
});
|
|
171
|
-
|
|
172
|
+
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
173
|
+
}, [selectedField === null || selectedField === void 0 ? void 0 : selectedField.value, getOptionsKey(valueOptions), selectDropDownHasError, isIntegrableError]);
|
|
172
174
|
var hasError = !!errorMessage;
|
|
173
175
|
useEffect(function () {
|
|
174
176
|
if (hasError) {
|
|
@@ -195,7 +197,7 @@ var ActionItem$1 = function ActionItem(_ref) {
|
|
|
195
197
|
children: label
|
|
196
198
|
}), /*#__PURE__*/jsx(Button, {
|
|
197
199
|
"data-testid": "action-dropdown-button",
|
|
198
|
-
label: selectedLabel
|
|
200
|
+
label: getActionLabel(selectedLabel),
|
|
199
201
|
variant: "link",
|
|
200
202
|
className: classNames("text-base text-foreground font-semibold underline", {
|
|
201
203
|
"text-primary": isFieldActive,
|