@bigbinary/neeto-rules-frontend 2.8.10 → 2.8.11
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/dist/.ready +1 -1
- package/dist/NeetoRulesBuilder.js +40 -15
- package/dist/NeetoRulesBuilder.js.map +1 -1
- package/dist/NeetoRulesForm.js +2 -2
- package/dist/cjs/NeetoRulesBuilder.js +40 -15
- 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/NeetoRulesBuilder.js +39 -14
- package/dist/cjs/v2/NeetoRulesBuilder.js.map +1 -1
- package/dist/cjs/v2/NeetoRulesForm.js +2 -2
- package/dist/cjs/v2/index.js +2 -2
- package/dist/{index-ql13coG-.js → index-HxpDd_fD.js} +2 -2
- package/dist/{index-ql13coG-.js.map → index-HxpDd_fD.js.map} +1 -1
- package/dist/{index-D-pmcUGT.js → index-YOuCSbmi.js} +2 -2
- package/dist/{index-D-pmcUGT.js.map → index-YOuCSbmi.js.map} +1 -1
- package/dist/{index-CpWEW_Rn.js → index-djZiAHat.js} +2 -2
- package/dist/{index-CpWEW_Rn.js.map → index-djZiAHat.js.map} +1 -1
- package/dist/{index-XiWPZpLF.js → index-zvsaUL1M.js} +2 -2
- package/dist/{index-XiWPZpLF.js.map → index-zvsaUL1M.js.map} +1 -1
- package/dist/index.js +2 -2
- package/dist/keyboardShortcuts-CMYWaUJh.js +96 -0
- package/dist/{keyboardShortcuts-BGpApRKG.js.map → keyboardShortcuts-CMYWaUJh.js.map} +1 -1
- package/dist/keyboardShortcuts-cmT662QR.js +92 -0
- package/dist/{keyboardShortcuts-B-6CQw6N.js.map → keyboardShortcuts-cmT662QR.js.map} +1 -1
- package/dist/v2/NeetoRulesBuilder.js +39 -14
- package/dist/v2/NeetoRulesBuilder.js.map +1 -1
- package/dist/v2/NeetoRulesForm.js +2 -2
- package/dist/v2/index.js +2 -2
- package/package.json +9 -9
- package/dist/keyboardShortcuts-B-6CQw6N.js +0 -92
- package/dist/keyboardShortcuts-BGpApRKG.js +0 -96
package/dist/NeetoRulesForm.js
CHANGED
|
@@ -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-cmT662QR.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';
|
|
@@ -15,7 +15,7 @@ import { u as useUtilityStore } from './useUtilityStore-CCUYS1mS.js';
|
|
|
15
15
|
import classNames from 'classnames';
|
|
16
16
|
import Typography from '@bigbinary/neetoui/Typography';
|
|
17
17
|
import { isNotNil, isEmpty, pluck } from 'ramda';
|
|
18
|
-
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-
|
|
18
|
+
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-YOuCSbmi.js';
|
|
19
19
|
import { a as useActiveField, u as useCustomDataStore } from './useCustomDataStore-BtKYtLVc.js';
|
|
20
20
|
import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
|
|
21
21
|
import { joinHyphenCase } from '@bigbinary/neeto-commons-frontend/utils';
|
|
@@ -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-
|
|
5
|
+
var keyboardShortcuts = require('../keyboardShortcuts-CMYWaUJh.js');
|
|
6
6
|
var shallow = require('zustand/shallow');
|
|
7
7
|
var react = require('react');
|
|
8
8
|
var classNames = require('classnames');
|
|
@@ -13,7 +13,7 @@ var Header = require('@bigbinary/neeto-molecules/Header');
|
|
|
13
13
|
var Spinner = require('@bigbinary/neetoui/Spinner');
|
|
14
14
|
var ActionBlock = require('@bigbinary/neetoui/formik/ActionBlock');
|
|
15
15
|
var reactI18next = require('react-i18next');
|
|
16
|
-
var index = require('../index-
|
|
16
|
+
var index = require('../index-HxpDd_fD.js');
|
|
17
17
|
var useCustomDataStore = require('../useCustomDataStore-DxFx8aCf.js');
|
|
18
18
|
var useUtilityStore = require('../useUtilityStore-C_U20IMX.js');
|
|
19
19
|
var _toConsumableArray = require('@babel/runtime/helpers/toConsumableArray');
|
|
@@ -4016,7 +4016,9 @@ var OptionsPane = function OptionsPane(_ref) {
|
|
|
4016
4016
|
anchor = _ref.anchor,
|
|
4017
4017
|
index$1 = _ref.index,
|
|
4018
4018
|
_ref$belowContent = _ref.belowContent,
|
|
4019
|
-
belowContent = _ref$belowContent === void 0 ? null : _ref$belowContent
|
|
4019
|
+
belowContent = _ref$belowContent === void 0 ? null : _ref$belowContent,
|
|
4020
|
+
_ref$renderOptionCont = _ref.renderOptionContent,
|
|
4021
|
+
renderOptionContent = _ref$renderOptionCont === void 0 ? null : _ref$renderOptionCont;
|
|
4020
4022
|
var _useTranslation = reactI18next.useTranslation(),
|
|
4021
4023
|
t = _useTranslation.t;
|
|
4022
4024
|
var _useFormikContext = formik.useFormikContext(),
|
|
@@ -4160,6 +4162,26 @@ var OptionsPane = function OptionsPane(_ref) {
|
|
|
4160
4162
|
children: category
|
|
4161
4163
|
});
|
|
4162
4164
|
};
|
|
4165
|
+
var renderOptionRow = function renderOptionRow(option) {
|
|
4166
|
+
var item = /*#__PURE__*/jsxRuntime.jsx(Radio.Item, _objectSpread$2(_objectSpread$2({
|
|
4167
|
+
disabled: option.disabled,
|
|
4168
|
+
label: optionLabel(option),
|
|
4169
|
+
labelProps: previewHandlers(option.value),
|
|
4170
|
+
value: option.value
|
|
4171
|
+
}, option.icon || option.disabledReason ? {
|
|
4172
|
+
dataTestid: option.value
|
|
4173
|
+
} : {}), previewHandlers(option.value)), option.value);
|
|
4174
|
+
var content = renderOptionContent === null || renderOptionContent === void 0 ? void 0 : renderOptionContent({
|
|
4175
|
+
option: option,
|
|
4176
|
+
isSelected: isSelected(option.value)
|
|
4177
|
+
});
|
|
4178
|
+
if (!content) return [item];
|
|
4179
|
+
return [item, /*#__PURE__*/jsxRuntime.jsx("div", {
|
|
4180
|
+
className: "mb-pane-option-content",
|
|
4181
|
+
"data-testid": "".concat(option.value, "-option-content"),
|
|
4182
|
+
children: content
|
|
4183
|
+
}, "".concat(option.value, "-content"))];
|
|
4184
|
+
};
|
|
4163
4185
|
var renderBody = function renderBody() {
|
|
4164
4186
|
var _selectedValues$;
|
|
4165
4187
|
if (ramda.isEmpty(filtered)) {
|
|
@@ -4207,16 +4229,7 @@ var OptionsPane = function OptionsPane(_ref) {
|
|
|
4207
4229
|
return [category ? /*#__PURE__*/jsxRuntime.jsx("div", {
|
|
4208
4230
|
className: "mb-pane-group",
|
|
4209
4231
|
children: category
|
|
4210
|
-
}, "group-".concat(category)) : null].concat(_toConsumableArray(items.
|
|
4211
|
-
return /*#__PURE__*/jsxRuntime.jsx(Radio.Item, _objectSpread$2(_objectSpread$2({
|
|
4212
|
-
disabled: option.disabled,
|
|
4213
|
-
label: optionLabel(option),
|
|
4214
|
-
labelProps: previewHandlers(option.value),
|
|
4215
|
-
value: option.value
|
|
4216
|
-
}, option.icon || option.disabledReason ? {
|
|
4217
|
-
dataTestid: option.value
|
|
4218
|
-
} : {}), previewHandlers(option.value)), option.value);
|
|
4219
|
-
})));
|
|
4232
|
+
}, "group-".concat(category)) : null].concat(_toConsumableArray(items.flatMap(renderOptionRow)));
|
|
4220
4233
|
}).filter(Boolean)
|
|
4221
4234
|
});
|
|
4222
4235
|
};
|
|
@@ -4324,7 +4337,7 @@ var RecipientField = function RecipientField(_ref) {
|
|
|
4324
4337
|
};
|
|
4325
4338
|
|
|
4326
4339
|
var RecipientPane = function RecipientPane(_ref) {
|
|
4327
|
-
var _schema$actions, _schema$actions$actio, _action$recipient, _schema$actions2, _schema$actions2$acti, _schema$actions3, _schema$actions3$rend, _schema$actions4, _schema$actions4$opti, _schema$actions5, _schema$actions5$opti, _schema$actions6, _schema$actions7, _schema$actions$rende, _schema$actions8, _schema$actions8$rend, _action$metadata, _schema$actions9;
|
|
4340
|
+
var _schema$actions, _schema$actions$actio, _action$recipient, _schema$actions2, _schema$actions2$acti, _schema$actions3, _schema$actions3$rend, _schema$actions4, _schema$actions4$opti, _schema$actions5, _schema$actions5$opti, _schema$actions6, _schema$actions7, _schema$actions$rende, _schema$actions8, _schema$actions8$rend, _action$metadata, _schema$actions9, _schema$actions0;
|
|
4328
4341
|
var schema = _ref.schema,
|
|
4329
4342
|
index$1 = _ref.index;
|
|
4330
4343
|
var _useTranslation = reactI18next.useTranslation(),
|
|
@@ -4381,6 +4394,17 @@ var RecipientPane = function RecipientPane(_ref) {
|
|
|
4381
4394
|
name: "".concat(name, ".").concat(RECIPIENT_STORAGE_FIELDS.phoneNumbers),
|
|
4382
4395
|
phoneNumbers: (_action$metadata = action.metadata) === null || _action$metadata === void 0 ? void 0 : _action$metadata.phoneNumbers
|
|
4383
4396
|
}) : null;
|
|
4397
|
+
var renderOptionContent = (_schema$actions9 = schema.actions) !== null && _schema$actions9 !== void 0 && _schema$actions9.renderRecipientOptionContent ? function (_ref2) {
|
|
4398
|
+
var option = _ref2.option,
|
|
4399
|
+
isSelected = _ref2.isSelected;
|
|
4400
|
+
return schema.actions.renderRecipientOptionContent({
|
|
4401
|
+
channel: channel,
|
|
4402
|
+
recipient: option.value,
|
|
4403
|
+
name: name,
|
|
4404
|
+
action: action,
|
|
4405
|
+
isSelected: isSelected
|
|
4406
|
+
});
|
|
4407
|
+
} : null;
|
|
4384
4408
|
var belowField = phoneField || recipientField;
|
|
4385
4409
|
var belowContent = belowField ? /*#__PURE__*/jsxRuntime.jsx("div", {
|
|
4386
4410
|
className: "mt-5",
|
|
@@ -4402,13 +4426,14 @@ var RecipientPane = function RecipientPane(_ref) {
|
|
|
4402
4426
|
return /*#__PURE__*/jsxRuntime.jsx(OptionsPane, {
|
|
4403
4427
|
belowContent: belowContent,
|
|
4404
4428
|
index: index$1,
|
|
4429
|
+
renderOptionContent: renderOptionContent,
|
|
4405
4430
|
schema: schema,
|
|
4406
4431
|
anchor: BUILDER_ANCHORS.ACTION_RECIPIENT
|
|
4407
4432
|
});
|
|
4408
4433
|
}
|
|
4409
4434
|
|
|
4410
4435
|
// eslint-disable-next-line security/detect-object-injection
|
|
4411
|
-
var meta = ((_schema$
|
|
4436
|
+
var meta = ((_schema$actions0 = schema.actions) === null || _schema$actions0 === void 0 || (_schema$actions0 = _schema$actions0.channelMeta) === null || _schema$actions0 === void 0 ? void 0 : _schema$actions0[channel]) || {};
|
|
4412
4437
|
return /*#__PURE__*/jsxRuntime.jsxs(jsxRuntime.Fragment, {
|
|
4413
4438
|
children: [/*#__PURE__*/jsxRuntime.jsx(index.Panel.Header, {
|
|
4414
4439
|
children: /*#__PURE__*/jsxRuntime.jsxs("div", {
|