@bigbinary/neeto-rules-frontend 2.7.26 → 2.7.27
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 +2 -2
- package/dist/NeetoRulesForm.js +2 -2
- package/dist/cjs/NeetoRulesBuilder.js +2 -2
- package/dist/cjs/NeetoRulesForm.js +2 -2
- package/dist/cjs/index.js +2 -2
- package/dist/cjs/v2/NeetoRulesBuilder.js +168 -116
- 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-D76EZ1AZ.js → index-6HdKTEnP.js} +2 -2
- package/dist/{index-D76EZ1AZ.js.map → index-6HdKTEnP.js.map} +1 -1
- package/dist/{index-D1PW24Zw.js → index-BUcQsAbf.js} +2 -2
- package/dist/{index-D1PW24Zw.js.map → index-BUcQsAbf.js.map} +1 -1
- package/dist/{index-Br0dDuGK.js → index-DfYO62zW.js} +2 -2
- package/dist/{index-Br0dDuGK.js.map → index-DfYO62zW.js.map} +1 -1
- package/dist/{index-25TjDISc.js → index-Omo1J36W.js} +2 -2
- package/dist/{index-25TjDISc.js.map → index-Omo1J36W.js.map} +1 -1
- package/dist/index.js +2 -2
- package/dist/keyboardShortcuts-CnEwhJom.js +96 -0
- package/dist/{keyboardShortcuts-CRInJJOU.js.map → keyboardShortcuts-CnEwhJom.js.map} +1 -1
- package/dist/keyboardShortcuts-CsMwT9YF.js +92 -0
- package/dist/{keyboardShortcuts-DwgF8Mcu.js.map → keyboardShortcuts-CsMwT9YF.js.map} +1 -1
- package/dist/v2/NeetoRulesBuilder.js +189 -137
- 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 +1 -1
- package/dist/keyboardShortcuts-CRInJJOU.js +0 -96
- package/dist/keyboardShortcuts-DwgF8Mcu.js +0 -92
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import _defineProperty from '@babel/runtime/helpers/defineProperty';
|
|
2
2
|
import _objectDestructuringEmpty from '@babel/runtime/helpers/objectDestructuringEmpty';
|
|
3
|
-
import { f as flatten, S as SHORTCUTS } from '../keyboardShortcuts-
|
|
3
|
+
import { f as flatten, S as SHORTCUTS } from '../keyboardShortcuts-CsMwT9YF.js';
|
|
4
4
|
import { useShallow } from 'zustand/shallow';
|
|
5
|
-
import { useState, useRef, useEffect,
|
|
5
|
+
import { useState, useRef, useEffect, Fragment, createElement, useCallback, useMemo, isValidElement } from 'react';
|
|
6
6
|
import { Button, Select, Input, Checkbox, Typography, RadioGroup, Textarea, DatePicker, Popover, Tooltip, MultiEmailInput, Spinner } from '@bigbinary/neeto-atoms';
|
|
7
7
|
import { Input as Input$1, Select as Select$1, ActionBlock } from '@bigbinary/neeto-atoms/formik';
|
|
8
8
|
import classNames from 'classnames';
|
|
@@ -11,7 +11,7 @@ import { isNotEmpty, toLabelAndValue, removeBy, isNot, noop } from '@bigbinary/n
|
|
|
11
11
|
import Container from '@bigbinary/neeto-molecules/v2/Container';
|
|
12
12
|
import Header from '@bigbinary/neeto-molecules/v2/Header';
|
|
13
13
|
import { useTranslation } from 'react-i18next';
|
|
14
|
-
import { r as ApiFields, E as EditorAction, L as ListField, o as Panel, s as ErrorCallout, t as SmsFields, M as MIN_DELAY_VALUE, v as MAX_DELAY_VALUE, w as PhoneNumberField, l as formatData, u as usePollRuleName, T as TouchErrors, n as ScrollToErrorField, p as getValidationSchema, q as DEFAULT_INITIAL_VALUE, m as buildPayload } from '../index-
|
|
14
|
+
import { r as ApiFields, E as EditorAction, L as ListField, o as Panel, s as ErrorCallout, t as SmsFields, M as MIN_DELAY_VALUE, v as MAX_DELAY_VALUE, w as PhoneNumberField, l as formatData, u as usePollRuleName, T as TouchErrors, n as ScrollToErrorField, p as getValidationSchema, q as DEFAULT_INITIAL_VALUE, m as buildPayload } from '../index-DfYO62zW.js';
|
|
15
15
|
import { u as useCustomDataStore } from '../useCustomDataStore-CEbhXugO.js';
|
|
16
16
|
import { u as useUtilityStore } from '../useUtilityStore-BVCulMEC.js';
|
|
17
17
|
import _toConsumableArray from '@babel/runtime/helpers/toConsumableArray';
|
|
@@ -20,7 +20,8 @@ import Plus from '@bigbinary/neeto-icons/Plus';
|
|
|
20
20
|
import { isNil, isEmpty, assoc, mergeDeepRight, pluck } from 'ramda';
|
|
21
21
|
import Delete from '@bigbinary/neeto-icons/Delete';
|
|
22
22
|
import _objectWithoutProperties from '@babel/runtime/helpers/objectWithoutProperties';
|
|
23
|
-
import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
|
|
23
|
+
import { jsx, jsxs, Fragment as Fragment$1 } from 'react/jsx-runtime';
|
|
24
|
+
import _typeof from '@babel/runtime/helpers/typeof';
|
|
24
25
|
import { t } from 'i18next';
|
|
25
26
|
import * as yup from 'yup';
|
|
26
27
|
import _asyncToGenerator from '@babel/runtime/helpers/asyncToGenerator';
|
|
@@ -31,7 +32,6 @@ import { D as DATE_FORMAT } from '../utils-DeqHhpwQ.js';
|
|
|
31
32
|
import Up from '@bigbinary/neeto-icons/Up';
|
|
32
33
|
import Down from '@bigbinary/neeto-icons/Down';
|
|
33
34
|
import Info from '@bigbinary/neeto-icons/Info';
|
|
34
|
-
import '@babel/runtime/helpers/typeof';
|
|
35
35
|
import '../useAutomationRulesApi-C9I3wUZ8.js';
|
|
36
36
|
import '@tanstack/react-query';
|
|
37
37
|
import '@bigbinary/neeto-commons-frontend/react-utils';
|
|
@@ -289,6 +289,22 @@ var Token = function Token(_ref) {
|
|
|
289
289
|
}));
|
|
290
290
|
};
|
|
291
291
|
|
|
292
|
+
var Values = function Values(_ref) {
|
|
293
|
+
var _ref$values = _ref.values,
|
|
294
|
+
values = _ref$values === void 0 ? [] : _ref$values,
|
|
295
|
+
connector = _ref.connector;
|
|
296
|
+
return values.map(function (value, index) {
|
|
297
|
+
return /*#__PURE__*/jsxs(Fragment, {
|
|
298
|
+
children: [index > 0 && " ", index > 0 && connector && /*#__PURE__*/jsxs(Fragment$1, {
|
|
299
|
+
children: [/*#__PURE__*/jsx("span", {
|
|
300
|
+
className: "mb-tok-join",
|
|
301
|
+
children: connector
|
|
302
|
+
}), " "]
|
|
303
|
+
}), value]
|
|
304
|
+
}, "".concat(value, "-").concat(index));
|
|
305
|
+
});
|
|
306
|
+
};
|
|
307
|
+
|
|
292
308
|
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; }
|
|
293
309
|
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), true).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; }
|
|
294
310
|
var humanize = function humanize(value) {
|
|
@@ -381,7 +397,32 @@ var conditionNeedsValue = function conditionNeedsValue(_ref7) {
|
|
|
381
397
|
});
|
|
382
398
|
return !((field === null || field === void 0 ? void 0 : field.noValueForVerbs) || []).includes(condition === null || condition === void 0 ? void 0 : condition.verb);
|
|
383
399
|
};
|
|
384
|
-
|
|
400
|
+
|
|
401
|
+
// A multi-value token stays one clickable phrase, but its "and"/"or" is
|
|
402
|
+
// connective tissue rather than part of any value, so the canvas keeps the
|
|
403
|
+
// connector out of the token's own styling.
|
|
404
|
+
var valueParts = function valueParts(raw) {
|
|
405
|
+
if (isNil(raw) || raw === "") return null;
|
|
406
|
+
if (Array.isArray(raw)) {
|
|
407
|
+
return isEmpty(raw) ? null : {
|
|
408
|
+
values: raw.map(String)
|
|
409
|
+
};
|
|
410
|
+
}
|
|
411
|
+
if (_typeof(raw) === "object") {
|
|
412
|
+
var values = Array.isArray(raw.values) ? raw.values.map(String) : [];
|
|
413
|
+
return isEmpty(values) ? null : {
|
|
414
|
+
values: values,
|
|
415
|
+
connector: raw.connector
|
|
416
|
+
};
|
|
417
|
+
}
|
|
418
|
+
return {
|
|
419
|
+
values: [String(raw)]
|
|
420
|
+
};
|
|
421
|
+
};
|
|
422
|
+
var joinValues = function joinValues(parts) {
|
|
423
|
+
return (parts === null || parts === void 0 ? void 0 : parts.values.join(parts.connector ? " ".concat(parts.connector, " ") : " ")) || "";
|
|
424
|
+
};
|
|
425
|
+
var conditionValueParts = function conditionValueParts(_ref8) {
|
|
385
426
|
var _ref9, _meta$value;
|
|
386
427
|
var schema = _ref8.schema,
|
|
387
428
|
condition = _ref8.condition;
|
|
@@ -401,23 +442,28 @@ var conditionValueLabel = function conditionValueLabel(_ref8) {
|
|
|
401
442
|
return ((_candidate$value = candidate.value) !== null && _candidate$value !== void 0 ? _candidate$value : candidate.id) === value;
|
|
402
443
|
});
|
|
403
444
|
var label = option ? (_ref0 = (_option$label = option.label) !== null && _option$label !== void 0 ? _option$label : option.value) !== null && _ref0 !== void 0 ? _ref0 : option.id : value;
|
|
404
|
-
return isEnum ? String(label).toLowerCase() : label;
|
|
445
|
+
return isEnum ? String(label).toLowerCase() : String(label);
|
|
405
446
|
};
|
|
406
447
|
var connector = String((condition === null || condition === void 0 ? void 0 : condition.verb) || "").includes(CONDITION_VERBS.ALL_OF) ? t("neetoRules.operators.and") : t("neetoRules.operators.or");
|
|
407
|
-
return Array.isArray(raw) ?
|
|
448
|
+
return Array.isArray(raw) ? {
|
|
449
|
+
values: raw.map(labelFor),
|
|
450
|
+
connector: connector
|
|
451
|
+
} : {
|
|
452
|
+
values: [labelFor(raw)]
|
|
453
|
+
};
|
|
408
454
|
};
|
|
409
|
-
var actionOption = function actionOption(
|
|
455
|
+
var actionOption = function actionOption(_ref10) {
|
|
410
456
|
var _schema$actions;
|
|
411
|
-
var schema =
|
|
412
|
-
name =
|
|
457
|
+
var schema = _ref10.schema,
|
|
458
|
+
name = _ref10.name;
|
|
413
459
|
return ((schema === null || schema === void 0 || (_schema$actions = schema.actions) === null || _schema$actions === void 0 ? void 0 : _schema$actions.options) || []).find(function (option) {
|
|
414
460
|
return option.value === name || option.id === name;
|
|
415
461
|
});
|
|
416
462
|
};
|
|
417
|
-
var channelOption = function channelOption(
|
|
463
|
+
var channelOption = function channelOption(_ref11) {
|
|
418
464
|
var _schema$actions2;
|
|
419
|
-
var schema =
|
|
420
|
-
channel =
|
|
465
|
+
var schema = _ref11.schema,
|
|
466
|
+
channel = _ref11.channel;
|
|
421
467
|
return ((schema === null || schema === void 0 || (_schema$actions2 = schema.actions) === null || _schema$actions2 === void 0 ? void 0 : _schema$actions2.options) || []).find(function (option) {
|
|
422
468
|
var _option$value;
|
|
423
469
|
return ((_option$value = option.value) !== null && _option$value !== void 0 ? _option$value : option.id) === channel;
|
|
@@ -429,24 +475,24 @@ var channelOption = function channelOption(_ref10) {
|
|
|
429
475
|
// Its key shares the action's metadata namespace, so declaring one is how a
|
|
430
476
|
// host hands a field to the step: whoever declares it owns it, and the config
|
|
431
477
|
// pane stops validating it.
|
|
432
|
-
var actionStepsOf = function actionStepsOf(
|
|
433
|
-
var schema =
|
|
434
|
-
action =
|
|
478
|
+
var actionStepsOf = function actionStepsOf(_ref12) {
|
|
479
|
+
var schema = _ref12.schema,
|
|
480
|
+
action = _ref12.action;
|
|
435
481
|
return actionParts({
|
|
436
482
|
schema: schema,
|
|
437
483
|
action: action
|
|
438
484
|
}).steps || [];
|
|
439
485
|
};
|
|
440
|
-
var stepValueOf = function stepValueOf(
|
|
486
|
+
var stepValueOf = function stepValueOf(_ref13) {
|
|
441
487
|
var _action$metadata;
|
|
442
|
-
var action =
|
|
443
|
-
step =
|
|
488
|
+
var action = _ref13.action,
|
|
489
|
+
step = _ref13.step;
|
|
444
490
|
return action === null || action === void 0 || (_action$metadata = action.metadata) === null || _action$metadata === void 0 ? void 0 : _action$metadata[step.key];
|
|
445
491
|
};
|
|
446
|
-
var stepLabelOf = function stepLabelOf(
|
|
492
|
+
var stepLabelOf = function stepLabelOf(_ref14) {
|
|
447
493
|
var _find;
|
|
448
|
-
var action =
|
|
449
|
-
step =
|
|
494
|
+
var action = _ref14.action,
|
|
495
|
+
step = _ref14.step;
|
|
450
496
|
var value = stepValueOf({
|
|
451
497
|
action: action,
|
|
452
498
|
step: step
|
|
@@ -456,10 +502,10 @@ var stepLabelOf = function stepLabelOf(_ref13) {
|
|
|
456
502
|
return ((_option$value2 = option.value) !== null && _option$value2 !== void 0 ? _option$value2 : option.id) === value;
|
|
457
503
|
})) === null || _find === void 0 ? void 0 : _find.label) || "";
|
|
458
504
|
};
|
|
459
|
-
var actionParts = function actionParts(
|
|
460
|
-
var _actions$actionForNam, _action$recipient, _actions$channelMeta, _find2, _find3,
|
|
461
|
-
var schema =
|
|
462
|
-
action =
|
|
505
|
+
var actionParts = function actionParts(_ref15) {
|
|
506
|
+
var _actions$actionForNam, _action$recipient, _actions$channelMeta, _find2, _find3, _actions$configValueL, _channelMeta$needsRec;
|
|
507
|
+
var schema = _ref15.schema,
|
|
508
|
+
action = _ref15.action;
|
|
463
509
|
var actions = (schema === null || schema === void 0 ? void 0 : schema.actions) || {};
|
|
464
510
|
var resolved = action !== null && action !== void 0 && action.channel ? {
|
|
465
511
|
channel: action.channel,
|
|
@@ -482,6 +528,10 @@ var actionParts = function actionParts(_ref14) {
|
|
|
482
528
|
return ((_recipient$value = recipient.value) !== null && _recipient$value !== void 0 ? _recipient$value : recipient.id) === recipientValue;
|
|
483
529
|
};
|
|
484
530
|
var recipientLabel = ((_find2 = (actions.recipients || []).find(matchesRecipient)) === null || _find2 === void 0 ? void 0 : _find2.label) || ((_find3 = ((option === null || option === void 0 ? void 0 : option.recipients) || []).find(matchesRecipient)) === null || _find3 === void 0 ? void 0 : _find3.label) || recipientValue;
|
|
531
|
+
|
|
532
|
+
// A host may answer with a plain string or with { values, connector } when
|
|
533
|
+
// the value reads as a list.
|
|
534
|
+
var configValueParts = valueParts((_actions$configValueL = actions.configValueLabel) === null || _actions$configValueL === void 0 ? void 0 : _actions$configValueL.call(actions, action));
|
|
485
535
|
return {
|
|
486
536
|
option: option,
|
|
487
537
|
channel: channel,
|
|
@@ -494,7 +544,8 @@ var actionParts = function actionParts(_ref14) {
|
|
|
494
544
|
icon: channelMeta.icon || (option === null || option === void 0 ? void 0 : option.icon),
|
|
495
545
|
needsRecipient: (_channelMeta$needsRec = channelMeta.needsRecipient) !== null && _channelMeta$needsRec !== void 0 ? _channelMeta$needsRec : option === null || option === void 0 ? void 0 : option.needsRecipient,
|
|
496
546
|
separator: channelMeta.separator || (option === null || option === void 0 ? void 0 : option.separator),
|
|
497
|
-
|
|
547
|
+
configValueParts: configValueParts,
|
|
548
|
+
configValue: joinValues(configValueParts),
|
|
498
549
|
configValuePlaceholder: channelMeta.valuePlaceholder || (option === null || option === void 0 ? void 0 : option.valuePlaceholder),
|
|
499
550
|
recipient: recipientValue,
|
|
500
551
|
recipientLabel: recipientLabel,
|
|
@@ -509,13 +560,13 @@ var actionParts = function actionParts(_ref14) {
|
|
|
509
560
|
// Which condition fields a host offers can depend on the rule — a trigger may
|
|
510
561
|
// only support a subset. Lookups deliberately keep using the full list so a
|
|
511
562
|
// field already on the rule still resolves after the offer narrows.
|
|
512
|
-
var offeredConditionFields = function offeredConditionFields(
|
|
513
|
-
var
|
|
514
|
-
var schema =
|
|
515
|
-
rule =
|
|
516
|
-
return (
|
|
563
|
+
var offeredConditionFields = function offeredConditionFields(_ref16) {
|
|
564
|
+
var _ref17, _schema$conditions$fi, _schema$conditions3, _schema$conditions3$f, _schema$conditions4;
|
|
565
|
+
var schema = _ref16.schema,
|
|
566
|
+
rule = _ref16.rule;
|
|
567
|
+
return (_ref17 = (_schema$conditions$fi = schema === null || schema === void 0 || (_schema$conditions3 = schema.conditions) === null || _schema$conditions3 === void 0 || (_schema$conditions3$f = _schema$conditions3.fieldsFor) === null || _schema$conditions3$f === void 0 ? void 0 : _schema$conditions3$f.call(_schema$conditions3, {
|
|
517
568
|
rule: rule
|
|
518
|
-
})) !== null && _schema$conditions$fi !== void 0 ? _schema$conditions$fi : schema === null || schema === void 0 || (_schema$conditions4 = schema.conditions) === null || _schema$conditions4 === void 0 ? void 0 : _schema$conditions4.fields) !== null &&
|
|
569
|
+
})) !== null && _schema$conditions$fi !== void 0 ? _schema$conditions$fi : schema === null || schema === void 0 || (_schema$conditions4 = schema.conditions) === null || _schema$conditions4 === void 0 ? void 0 : _schema$conditions4.fields) !== null && _ref17 !== void 0 ? _ref17 : [];
|
|
519
570
|
};
|
|
520
571
|
var hasTrigger = function hasTrigger(rule) {
|
|
521
572
|
return !isEmpty((rule === null || rule === void 0 ? void 0 : rule.triggers) || []);
|
|
@@ -529,20 +580,20 @@ var isTriggerEnabled = function isTriggerEnabled(schema) {
|
|
|
529
580
|
var _schema$triggers2;
|
|
530
581
|
return (schema === null || schema === void 0 || (_schema$triggers2 = schema.triggers) === null || _schema$triggers2 === void 0 ? void 0 : _schema$triggers2.enabled) !== false;
|
|
531
582
|
};
|
|
532
|
-
var isTriggerSatisfied = function isTriggerSatisfied(
|
|
533
|
-
var rule = _ref17.rule,
|
|
534
|
-
schema = _ref17.schema;
|
|
535
|
-
return !isTriggerEnabled(schema) || hasTrigger(rule);
|
|
536
|
-
};
|
|
537
|
-
var hasRequiredConditions = function hasRequiredConditions(_ref18) {
|
|
538
|
-
var _schema$conditions5;
|
|
583
|
+
var isTriggerSatisfied = function isTriggerSatisfied(_ref18) {
|
|
539
584
|
var rule = _ref18.rule,
|
|
540
585
|
schema = _ref18.schema;
|
|
541
|
-
return (schema
|
|
586
|
+
return !isTriggerEnabled(schema) || hasTrigger(rule);
|
|
542
587
|
};
|
|
543
|
-
var
|
|
588
|
+
var hasRequiredConditions = function hasRequiredConditions(_ref19) {
|
|
589
|
+
var _schema$conditions5;
|
|
544
590
|
var rule = _ref19.rule,
|
|
545
591
|
schema = _ref19.schema;
|
|
592
|
+
return (schema === null || schema === void 0 || (_schema$conditions5 = schema.conditions) === null || _schema$conditions5 === void 0 ? void 0 : _schema$conditions5.allowEmpty) === false ? isNotEmpty((rule === null || rule === void 0 ? void 0 : rule.conditions) || []) : true;
|
|
593
|
+
};
|
|
594
|
+
var hasUnansweredStep = function hasUnansweredStep(_ref20) {
|
|
595
|
+
var rule = _ref20.rule,
|
|
596
|
+
schema = _ref20.schema;
|
|
546
597
|
return ((rule === null || rule === void 0 ? void 0 : rule.actions) || []).some(function (action) {
|
|
547
598
|
return actionStepsOf({
|
|
548
599
|
schema: schema,
|
|
@@ -555,9 +606,9 @@ var hasUnansweredStep = function hasUnansweredStep(_ref19) {
|
|
|
555
606
|
});
|
|
556
607
|
});
|
|
557
608
|
};
|
|
558
|
-
var isRuleComplete = function isRuleComplete(
|
|
559
|
-
var rule =
|
|
560
|
-
schema =
|
|
609
|
+
var isRuleComplete = function isRuleComplete(_ref21) {
|
|
610
|
+
var rule = _ref21.rule,
|
|
611
|
+
schema = _ref21.schema;
|
|
561
612
|
return isTriggerSatisfied({
|
|
562
613
|
rule: rule,
|
|
563
614
|
schema: schema
|
|
@@ -569,28 +620,28 @@ var isRuleComplete = function isRuleComplete(_ref20) {
|
|
|
569
620
|
schema: schema
|
|
570
621
|
});
|
|
571
622
|
};
|
|
572
|
-
var scopeOptionFor = function scopeOptionFor(
|
|
623
|
+
var scopeOptionFor = function scopeOptionFor(_ref22) {
|
|
573
624
|
var _item$value, _schema$scope;
|
|
574
|
-
var schema =
|
|
575
|
-
item =
|
|
625
|
+
var schema = _ref22.schema,
|
|
626
|
+
item = _ref22.item;
|
|
576
627
|
var value = (_item$value = item === null || item === void 0 ? void 0 : item.value) !== null && _item$value !== void 0 ? _item$value : item;
|
|
577
628
|
return ((schema === null || schema === void 0 || (_schema$scope = schema.scope) === null || _schema$scope === void 0 ? void 0 : _schema$scope.options) || []).find(function (candidate) {
|
|
578
629
|
var _candidate$value2;
|
|
579
630
|
return ((_candidate$value2 = candidate.value) !== null && _candidate$value2 !== void 0 ? _candidate$value2 : candidate.id) === value;
|
|
580
631
|
});
|
|
581
632
|
};
|
|
582
|
-
var scopePhoneFields = function scopePhoneFields(
|
|
583
|
-
var
|
|
584
|
-
var schema =
|
|
585
|
-
item =
|
|
586
|
-
return (
|
|
633
|
+
var scopePhoneFields = function scopePhoneFields(_ref23) {
|
|
634
|
+
var _ref24, _item$phoneFields, _scopeOptionFor;
|
|
635
|
+
var schema = _ref23.schema,
|
|
636
|
+
item = _ref23.item;
|
|
637
|
+
return (_ref24 = (_item$phoneFields = item === null || item === void 0 ? void 0 : item.phoneFields) !== null && _item$phoneFields !== void 0 ? _item$phoneFields : (_scopeOptionFor = scopeOptionFor({
|
|
587
638
|
schema: schema,
|
|
588
639
|
item: item
|
|
589
|
-
})) === null || _scopeOptionFor === void 0 ? void 0 : _scopeOptionFor.phoneFields) !== null &&
|
|
640
|
+
})) === null || _scopeOptionFor === void 0 ? void 0 : _scopeOptionFor.phoneFields) !== null && _ref24 !== void 0 ? _ref24 : null;
|
|
590
641
|
};
|
|
591
|
-
var effectiveScopePhoneField = function effectiveScopePhoneField(
|
|
592
|
-
var schema =
|
|
593
|
-
item =
|
|
642
|
+
var effectiveScopePhoneField = function effectiveScopePhoneField(_ref25) {
|
|
643
|
+
var schema = _ref25.schema,
|
|
644
|
+
item = _ref25.item;
|
|
594
645
|
if (item !== null && item !== void 0 && item.phoneField) return item.phoneField;
|
|
595
646
|
var phoneFields = scopePhoneFields({
|
|
596
647
|
schema: schema,
|
|
@@ -598,14 +649,14 @@ var effectiveScopePhoneField = function effectiveScopePhoneField(_ref24) {
|
|
|
598
649
|
});
|
|
599
650
|
return (phoneFields === null || phoneFields === void 0 ? void 0 : phoneFields.length) === 1 ? phoneFields[0].value : undefined;
|
|
600
651
|
};
|
|
601
|
-
var invalidScopeIndexes = function invalidScopeIndexes(
|
|
652
|
+
var invalidScopeIndexes = function invalidScopeIndexes(_ref26) {
|
|
602
653
|
var _scope$requiresPhone;
|
|
603
|
-
var rule =
|
|
604
|
-
schema =
|
|
654
|
+
var rule = _ref26.rule,
|
|
655
|
+
schema = _ref26.schema;
|
|
605
656
|
var scope = schema === null || schema === void 0 ? void 0 : schema.scope;
|
|
606
657
|
if (!(scope !== null && scope !== void 0 && scope.enabled) || !((_scope$requiresPhone = scope.requiresPhone) !== null && _scope$requiresPhone !== void 0 && _scope$requiresPhone.call(scope, (rule === null || rule === void 0 ? void 0 : rule.actions) || []))) return [];
|
|
607
658
|
return ((rule === null || rule === void 0 ? void 0 : rule.scope) || []).reduce(function (indexes, item, index) {
|
|
608
|
-
var
|
|
659
|
+
var _ref27, _item$hasPhoneField;
|
|
609
660
|
var option = scopeOptionFor({
|
|
610
661
|
schema: schema,
|
|
611
662
|
item: item
|
|
@@ -614,15 +665,15 @@ var invalidScopeIndexes = function invalidScopeIndexes(_ref25) {
|
|
|
614
665
|
schema: schema,
|
|
615
666
|
item: item
|
|
616
667
|
});
|
|
617
|
-
var hasPhoneField = (
|
|
668
|
+
var hasPhoneField = (_ref27 = (_item$hasPhoneField = item === null || item === void 0 ? void 0 : item.hasPhoneField) !== null && _item$hasPhoneField !== void 0 ? _item$hasPhoneField : option === null || option === void 0 ? void 0 : option.hasPhoneField) !== null && _ref27 !== void 0 ? _ref27 : phoneFields ? phoneFields.length > 0 : undefined;
|
|
618
669
|
if (hasPhoneField === false) indexes.push(index);
|
|
619
670
|
return indexes;
|
|
620
671
|
}, []);
|
|
621
672
|
};
|
|
622
|
-
var invalidScopePhoneFieldIndexes = function invalidScopePhoneFieldIndexes(
|
|
673
|
+
var invalidScopePhoneFieldIndexes = function invalidScopePhoneFieldIndexes(_ref28) {
|
|
623
674
|
var _scope$requiresPhone2;
|
|
624
|
-
var rule =
|
|
625
|
-
schema =
|
|
675
|
+
var rule = _ref28.rule,
|
|
676
|
+
schema = _ref28.schema;
|
|
626
677
|
var scope = schema === null || schema === void 0 ? void 0 : schema.scope;
|
|
627
678
|
if (!(scope !== null && scope !== void 0 && scope.enabled) || !((_scope$requiresPhone2 = scope.requiresPhone) !== null && _scope$requiresPhone2 !== void 0 && _scope$requiresPhone2.call(scope, (rule === null || rule === void 0 ? void 0 : rule.actions) || []))) return [];
|
|
628
679
|
return ((rule === null || rule === void 0 ? void 0 : rule.scope) || []).reduce(function (indexes, item, index) {
|
|
@@ -659,9 +710,9 @@ var minutesToParts = function minutesToParts(minutes) {
|
|
|
659
710
|
unit: "minutes"
|
|
660
711
|
};
|
|
661
712
|
};
|
|
662
|
-
var partsToMinutes = function partsToMinutes(
|
|
663
|
-
var value =
|
|
664
|
-
unit =
|
|
713
|
+
var partsToMinutes = function partsToMinutes(_ref29) {
|
|
714
|
+
var value = _ref29.value,
|
|
715
|
+
unit = _ref29.unit;
|
|
665
716
|
return (
|
|
666
717
|
// eslint-disable-next-line security/detect-object-injection
|
|
667
718
|
(Number(value) || 0) * (UNIT_MINUTES[unit] || 1)
|
|
@@ -715,11 +766,11 @@ var recipientStorageField = function recipientStorageField(field) {
|
|
|
715
766
|
// Which metadata fields the recipient pane renders, and therefore owns: no
|
|
716
767
|
// other pane may block Continue on them. Canvas and ConfigPane both ask here
|
|
717
768
|
// so the two lists cannot drift apart.
|
|
718
|
-
var recipientOwnedFields = function recipientOwnedFields(
|
|
769
|
+
var recipientOwnedFields = function recipientOwnedFields(_ref30) {
|
|
719
770
|
var _actions$actionForNam2, _action$recipient2, _actions$renderRecipi, _actions$renderRecipi2, _actions$optionForNam, _actions$optionForCha;
|
|
720
|
-
var schema =
|
|
721
|
-
action =
|
|
722
|
-
name =
|
|
771
|
+
var schema = _ref30.schema,
|
|
772
|
+
action = _ref30.action,
|
|
773
|
+
name = _ref30.name;
|
|
723
774
|
var actions = (schema === null || schema === void 0 ? void 0 : schema.actions) || {};
|
|
724
775
|
var resolved = ((_actions$actionForNam2 = actions.actionForName) === null || _actions$actionForNam2 === void 0 ? void 0 : _actions$actionForNam2.call(actions, action === null || action === void 0 ? void 0 : action.name)) || {};
|
|
725
776
|
var channel = (action === null || action === void 0 ? void 0 : action.channel) || resolved.channel;
|
|
@@ -750,10 +801,10 @@ var modeFromJoinType = function modeFromJoinType(joinType) {
|
|
|
750
801
|
};
|
|
751
802
|
|
|
752
803
|
// eslint-disable-next-line security/detect-object-injection
|
|
753
|
-
var valueAt = function valueAt(
|
|
804
|
+
var valueAt = function valueAt(_ref31) {
|
|
754
805
|
var _values$key;
|
|
755
|
-
var values =
|
|
756
|
-
key =
|
|
806
|
+
var values = _ref31.values,
|
|
807
|
+
key = _ref31.key;
|
|
757
808
|
return values === null || values === void 0 || (_values$key = values[key]) === null || _values$key === void 0 ? void 0 : _values$key.value;
|
|
758
809
|
};
|
|
759
810
|
var asArray = function asArray(maybeArray) {
|
|
@@ -776,11 +827,11 @@ var fieldKeysFromSchema = function fieldKeysFromSchema() {
|
|
|
776
827
|
};
|
|
777
828
|
var valuesToRuleModel = function valuesToRuleModel() {
|
|
778
829
|
var _valueAt, _conditions$;
|
|
779
|
-
var
|
|
780
|
-
|
|
781
|
-
values =
|
|
782
|
-
|
|
783
|
-
schema =
|
|
830
|
+
var _ref32 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
|
|
831
|
+
_ref32$values = _ref32.values,
|
|
832
|
+
values = _ref32$values === void 0 ? {} : _ref32$values,
|
|
833
|
+
_ref32$schema = _ref32.schema,
|
|
834
|
+
schema = _ref32$schema === void 0 ? {} : _ref32$schema;
|
|
784
835
|
var keys = fieldKeysFromSchema(schema);
|
|
785
836
|
var conditions = asArray(valueAt({
|
|
786
837
|
values: values,
|
|
@@ -824,42 +875,42 @@ var valuesToRuleModel = function valuesToRuleModel() {
|
|
|
824
875
|
}))
|
|
825
876
|
};
|
|
826
877
|
};
|
|
827
|
-
var setTriggers = function setTriggers(
|
|
828
|
-
var schema =
|
|
829
|
-
triggers =
|
|
878
|
+
var setTriggers = function setTriggers(_ref33) {
|
|
879
|
+
var schema = _ref33.schema,
|
|
880
|
+
triggers = _ref33.triggers;
|
|
830
881
|
return {
|
|
831
882
|
path: "".concat(fieldKeysFromSchema(schema).triggers, ".value"),
|
|
832
883
|
value: triggers
|
|
833
884
|
};
|
|
834
885
|
};
|
|
835
|
-
var setPerformer = function setPerformer(
|
|
836
|
-
var schema =
|
|
837
|
-
performer =
|
|
886
|
+
var setPerformer = function setPerformer(_ref34) {
|
|
887
|
+
var schema = _ref34.schema,
|
|
888
|
+
performer = _ref34.performer;
|
|
838
889
|
return {
|
|
839
890
|
path: "".concat(fieldKeysFromSchema(schema).performer, ".value"),
|
|
840
891
|
value: performer
|
|
841
892
|
};
|
|
842
893
|
};
|
|
843
|
-
var setActions = function setActions(
|
|
844
|
-
var schema =
|
|
845
|
-
actions =
|
|
894
|
+
var setActions = function setActions(_ref35) {
|
|
895
|
+
var schema = _ref35.schema,
|
|
896
|
+
actions = _ref35.actions;
|
|
846
897
|
return {
|
|
847
898
|
path: "".concat(fieldKeysFromSchema(schema).actions, ".value"),
|
|
848
899
|
value: actions
|
|
849
900
|
};
|
|
850
901
|
};
|
|
851
|
-
var setConditions = function setConditions(
|
|
852
|
-
var schema =
|
|
853
|
-
conditions =
|
|
902
|
+
var setConditions = function setConditions(_ref36) {
|
|
903
|
+
var schema = _ref36.schema,
|
|
904
|
+
conditions = _ref36.conditions;
|
|
854
905
|
return {
|
|
855
906
|
path: "".concat(fieldKeysFromSchema(schema).conditions, ".value"),
|
|
856
907
|
value: conditions
|
|
857
908
|
};
|
|
858
909
|
};
|
|
859
|
-
var setConditionMode = function setConditionMode(
|
|
860
|
-
var schema =
|
|
861
|
-
conditions =
|
|
862
|
-
joinType =
|
|
910
|
+
var setConditionMode = function setConditionMode(_ref37) {
|
|
911
|
+
var schema = _ref37.schema,
|
|
912
|
+
conditions = _ref37.conditions,
|
|
913
|
+
joinType = _ref37.joinType;
|
|
863
914
|
return setConditions({
|
|
864
915
|
schema: schema,
|
|
865
916
|
conditions: conditions.map(function (condition) {
|
|
@@ -867,34 +918,34 @@ var setConditionMode = function setConditionMode(_ref36) {
|
|
|
867
918
|
})
|
|
868
919
|
});
|
|
869
920
|
};
|
|
870
|
-
var setDelay = function setDelay(
|
|
871
|
-
var schema =
|
|
872
|
-
delay =
|
|
921
|
+
var setDelay = function setDelay(_ref38) {
|
|
922
|
+
var schema = _ref38.schema,
|
|
923
|
+
delay = _ref38.delay;
|
|
873
924
|
return {
|
|
874
925
|
path: "".concat(fieldKeysFromSchema(schema).delay, ".value"),
|
|
875
926
|
value: delay !== null && delay !== void 0 ? delay : {}
|
|
876
927
|
};
|
|
877
928
|
};
|
|
878
|
-
var setActive = function setActive(
|
|
879
|
-
var schema =
|
|
880
|
-
active =
|
|
929
|
+
var setActive = function setActive(_ref39) {
|
|
930
|
+
var schema = _ref39.schema,
|
|
931
|
+
active = _ref39.active;
|
|
881
932
|
return {
|
|
882
933
|
path: "".concat(fieldKeysFromSchema(schema).status, ".value"),
|
|
883
934
|
value: active ? STATUS_KEYS.ENABLED : STATUS_KEYS.DISABLED
|
|
884
935
|
};
|
|
885
936
|
};
|
|
886
|
-
var setScope = function setScope(
|
|
887
|
-
var schema =
|
|
888
|
-
scope =
|
|
937
|
+
var setScope = function setScope(_ref40) {
|
|
938
|
+
var schema = _ref40.schema,
|
|
939
|
+
scope = _ref40.scope;
|
|
889
940
|
return {
|
|
890
941
|
path: "".concat(fieldKeysFromSchema(schema).scope, ".value"),
|
|
891
942
|
value: scope
|
|
892
943
|
};
|
|
893
944
|
};
|
|
894
|
-
var removeArrayItem = function removeArrayItem(
|
|
895
|
-
var values =
|
|
896
|
-
fieldKey =
|
|
897
|
-
index =
|
|
945
|
+
var removeArrayItem = function removeArrayItem(_ref41) {
|
|
946
|
+
var values = _ref41.values,
|
|
947
|
+
fieldKey = _ref41.fieldKey,
|
|
948
|
+
index = _ref41.index;
|
|
898
949
|
var list = asArray(valueAt({
|
|
899
950
|
values: values,
|
|
900
951
|
key: fieldKey
|
|
@@ -921,9 +972,9 @@ var removeArrayItem = function removeArrayItem(_ref40) {
|
|
|
921
972
|
}
|
|
922
973
|
return result;
|
|
923
974
|
};
|
|
924
|
-
var clearArrayItems = function clearArrayItems(
|
|
925
|
-
var values =
|
|
926
|
-
fieldKey =
|
|
975
|
+
var clearArrayItems = function clearArrayItems(_ref42) {
|
|
976
|
+
var values = _ref42.values,
|
|
977
|
+
fieldKey = _ref42.fieldKey;
|
|
927
978
|
var list = asArray(valueAt({
|
|
928
979
|
values: values,
|
|
929
980
|
key: fieldKey
|
|
@@ -980,7 +1031,7 @@ var ConditionRow = function ConditionRow(_ref) {
|
|
|
980
1031
|
return ((_field$value = field.value) !== null && _field$value !== void 0 ? _field$value : field.id) === (condition === null || condition === void 0 ? void 0 : condition.field);
|
|
981
1032
|
});
|
|
982
1033
|
var operatorPlaceholder = (conditionField === null || conditionField === void 0 ? void 0 : conditionField.operatorPlaceholder) || t("neetoRules.builder.selectOperator");
|
|
983
|
-
var value =
|
|
1034
|
+
var value = conditionValueParts({
|
|
984
1035
|
schema: schema,
|
|
985
1036
|
condition: condition
|
|
986
1037
|
});
|
|
@@ -1014,7 +1065,7 @@ var ConditionRow = function ConditionRow(_ref) {
|
|
|
1014
1065
|
});
|
|
1015
1066
|
},
|
|
1016
1067
|
children: rule.conditionMode === CONDITION_MODE.OR ? t("neetoRules.operators.or") : t("neetoRules.operators.and")
|
|
1017
|
-
}), hasField ? /*#__PURE__*/jsxs(Fragment, {
|
|
1068
|
+
}), hasField ? /*#__PURE__*/jsxs(Fragment$1, {
|
|
1018
1069
|
children: [/*#__PURE__*/jsx(Token, {
|
|
1019
1070
|
active: isActive({
|
|
1020
1071
|
type: BUILDER_ANCHORS.COND_FIELD,
|
|
@@ -1069,7 +1120,7 @@ var ConditionRow = function ConditionRow(_ref) {
|
|
|
1069
1120
|
index: index
|
|
1070
1121
|
});
|
|
1071
1122
|
},
|
|
1072
|
-
children: value
|
|
1123
|
+
children: value ? /*#__PURE__*/jsx(Values, _objectSpread$a({}, value)) : t("neetoRules.form.addValue")
|
|
1073
1124
|
})]
|
|
1074
1125
|
}) : /*#__PURE__*/jsx(Token, {
|
|
1075
1126
|
active: isActive({
|
|
@@ -1407,7 +1458,7 @@ var ScopeRow = function ScopeRow(_ref2) {
|
|
|
1407
1458
|
}), singlePhoneFieldLabel && /*#__PURE__*/jsxs("span", {
|
|
1408
1459
|
className: "mb-fixed",
|
|
1409
1460
|
children: [usingLabel, " ", singlePhoneFieldLabel]
|
|
1410
|
-
}), hasPhoneFieldChoice && /*#__PURE__*/jsxs(Fragment, {
|
|
1461
|
+
}), hasPhoneFieldChoice && /*#__PURE__*/jsxs(Fragment$1, {
|
|
1411
1462
|
children: [/*#__PURE__*/jsx("span", {
|
|
1412
1463
|
className: "mb-fixed",
|
|
1413
1464
|
children: usingLabel
|
|
@@ -1498,6 +1549,7 @@ var ActionRow = function ActionRow(_ref) {
|
|
|
1498
1549
|
recipientLabel = _actionParts.recipientLabel,
|
|
1499
1550
|
separator = _actionParts.separator,
|
|
1500
1551
|
configValue = _actionParts.configValue,
|
|
1552
|
+
configValueParts = _actionParts.configValueParts,
|
|
1501
1553
|
configValuePlaceholder = _actionParts.configValuePlaceholder,
|
|
1502
1554
|
paramKind = _actionParts.paramKind,
|
|
1503
1555
|
valueNoun = _actionParts.valueNoun,
|
|
@@ -1532,11 +1584,11 @@ var ActionRow = function ActionRow(_ref) {
|
|
|
1532
1584
|
configSeparator = _ref3[1];
|
|
1533
1585
|
var isConfigured = isNotEmpty(action === null || action === void 0 ? void 0 : action.metadata);
|
|
1534
1586
|
// A host that shows no value label still needs the token to read as filled.
|
|
1535
|
-
var configState =
|
|
1587
|
+
var configState = configValueParts || isConfigured ? TOKEN_STATE.FILLED : TOKEN_STATE.MUTED;
|
|
1536
1588
|
var _useClearingHover = useClearingHover(),
|
|
1537
1589
|
clearing = _useClearingHover.clearing,
|
|
1538
1590
|
clearingHoverProps = _useClearingHover.clearingHoverProps;
|
|
1539
|
-
var configToken = configSeparator ? /*#__PURE__*/jsxs(Fragment
|
|
1591
|
+
var configToken = configSeparator ? /*#__PURE__*/jsxs(Fragment, {
|
|
1540
1592
|
children: [/*#__PURE__*/jsx("span", {
|
|
1541
1593
|
className: "mb-fixed",
|
|
1542
1594
|
children: configSeparator
|
|
@@ -1557,10 +1609,10 @@ var ActionRow = function ActionRow(_ref) {
|
|
|
1557
1609
|
index: index
|
|
1558
1610
|
});
|
|
1559
1611
|
},
|
|
1560
|
-
children:
|
|
1612
|
+
children: configValueParts ? /*#__PURE__*/jsx(Values, _objectSpread$7({}, configValueParts)) : sentencify(configValuePlaceholder) || t("neetoRules.builder.selectFallback")
|
|
1561
1613
|
})]
|
|
1562
1614
|
}, "config") : null;
|
|
1563
|
-
var recipientToken = needsRecipient ? /*#__PURE__*/jsxs(Fragment
|
|
1615
|
+
var recipientToken = needsRecipient ? /*#__PURE__*/jsxs(Fragment, {
|
|
1564
1616
|
children: [/*#__PURE__*/jsx("span", {
|
|
1565
1617
|
className: "mb-fixed",
|
|
1566
1618
|
children: recipientSeparator || t("neetoRules.common.to")
|
|
@@ -1594,7 +1646,7 @@ var ActionRow = function ActionRow(_ref) {
|
|
|
1594
1646
|
index: index,
|
|
1595
1647
|
stepKey: step.key
|
|
1596
1648
|
};
|
|
1597
|
-
return /*#__PURE__*/jsxs(Fragment
|
|
1649
|
+
return /*#__PURE__*/jsxs(Fragment, {
|
|
1598
1650
|
children: [step.separator && /*#__PURE__*/jsx("span", {
|
|
1599
1651
|
className: "mb-fixed",
|
|
1600
1652
|
children: step.separator
|
|
@@ -1632,7 +1684,7 @@ var ActionRow = function ActionRow(_ref) {
|
|
|
1632
1684
|
children: [verbLabel, MediumIcon && /*#__PURE__*/jsx(MediumIcon, {
|
|
1633
1685
|
size: 14
|
|
1634
1686
|
}), configLabel]
|
|
1635
|
-
}) : /*#__PURE__*/jsxs(Fragment, {
|
|
1687
|
+
}) : /*#__PURE__*/jsxs(Fragment$1, {
|
|
1636
1688
|
children: [/*#__PURE__*/jsx(Token, {
|
|
1637
1689
|
active: isVerbActive,
|
|
1638
1690
|
dataTestid: "action-verb-".concat(index),
|
|
@@ -1660,7 +1712,7 @@ var ActionRow = function ActionRow(_ref) {
|
|
|
1660
1712
|
index: index
|
|
1661
1713
|
});
|
|
1662
1714
|
},
|
|
1663
|
-
children:
|
|
1715
|
+
children: configValueParts ? /*#__PURE__*/jsx(Values, _objectSpread$7({}, configValueParts)) : sentencify(configValuePlaceholder) || paramPlaceholder
|
|
1664
1716
|
}) : configLabel && /*#__PURE__*/jsxs(Token, {
|
|
1665
1717
|
className: "mb-tok-medium",
|
|
1666
1718
|
dataTestid: "action-config-".concat(index),
|
|
@@ -1765,7 +1817,7 @@ var ThenBlock = function ThenBlock(_ref) {
|
|
|
1765
1817
|
})
|
|
1766
1818
|
});
|
|
1767
1819
|
}
|
|
1768
|
-
return /*#__PURE__*/jsxs(Fragment, {
|
|
1820
|
+
return /*#__PURE__*/jsxs(Fragment$1, {
|
|
1769
1821
|
children: [named.map(function (_ref3, position) {
|
|
1770
1822
|
var _action$id;
|
|
1771
1823
|
var action = _ref3.action,
|
|
@@ -1878,7 +1930,7 @@ var WhenBlock = function WhenBlock(_ref) {
|
|
|
1878
1930
|
children: t("neetoRules.common.when")
|
|
1879
1931
|
}), triggers.map(function (trigger, index) {
|
|
1880
1932
|
var _trigger$id;
|
|
1881
|
-
return /*#__PURE__*/jsxs(Fragment
|
|
1933
|
+
return /*#__PURE__*/jsxs(Fragment, {
|
|
1882
1934
|
children: [index > 0 && /*#__PURE__*/jsx("span", {
|
|
1883
1935
|
className: "mb-fixed",
|
|
1884
1936
|
children: t("neetoRules.operators.or")
|
|
@@ -1921,7 +1973,7 @@ var WhenBlock = function WhenBlock(_ref) {
|
|
|
1921
1973
|
})
|
|
1922
1974
|
})]
|
|
1923
1975
|
}, (_trigger$id = trigger.id) !== null && _trigger$id !== void 0 ? _trigger$id : index);
|
|
1924
|
-
}), isActorEnabled && /*#__PURE__*/jsxs(Fragment, {
|
|
1976
|
+
}), isActorEnabled && /*#__PURE__*/jsxs(Fragment$1, {
|
|
1925
1977
|
children: [/*#__PURE__*/jsx("span", {
|
|
1926
1978
|
className: "mb-fixed",
|
|
1927
1979
|
children: t("neetoRules.common.by")
|
|
@@ -3420,7 +3472,7 @@ var Canvas = function Canvas(_ref) {
|
|
|
3420
3472
|
});
|
|
3421
3473
|
}), renderSlot("afterConditions"), /*#__PURE__*/jsx(Connector, {
|
|
3422
3474
|
active: isTriggerSet
|
|
3423
|
-
}), isDelayEnabled && isTriggerSet && (rule.delay ? /*#__PURE__*/jsxs(Fragment
|
|
3475
|
+
}), isDelayEnabled && isTriggerSet && (rule.delay ? /*#__PURE__*/jsxs(Fragment, {
|
|
3424
3476
|
children: [/*#__PURE__*/jsx(DelayRow, {
|
|
3425
3477
|
isActive: isActive,
|
|
3426
3478
|
isInvalid: isInvalid,
|
|
@@ -3454,7 +3506,7 @@ var Canvas = function Canvas(_ref) {
|
|
|
3454
3506
|
onAddAction: handleAddAction,
|
|
3455
3507
|
onRemoveAction: handleRemoveAction,
|
|
3456
3508
|
onToken: openPane
|
|
3457
|
-
}), renderSlot("afterActions"), isScopeEnabled && /*#__PURE__*/jsxs(Fragment
|
|
3509
|
+
}), renderSlot("afterActions"), isScopeEnabled && /*#__PURE__*/jsxs(Fragment, {
|
|
3458
3510
|
children: [/*#__PURE__*/jsx(Connector, {
|
|
3459
3511
|
active: true
|
|
3460
3512
|
}), /*#__PURE__*/jsx(ScopeBlock, {
|
|
@@ -3966,7 +4018,7 @@ var ConfigPane = function ConfigPane(_ref) {
|
|
|
3966
4018
|
useHotkeys(SHORTCUTS["continue"].sequence, handleContinue, {
|
|
3967
4019
|
mode: "global"
|
|
3968
4020
|
});
|
|
3969
|
-
return /*#__PURE__*/jsxs(Fragment, {
|
|
4021
|
+
return /*#__PURE__*/jsxs(Fragment$1, {
|
|
3970
4022
|
children: [/*#__PURE__*/jsx(Panel.Header, {
|
|
3971
4023
|
children: /*#__PURE__*/jsxs("div", {
|
|
3972
4024
|
className: "flex w-full flex-col gap-y-2",
|
|
@@ -4076,7 +4128,7 @@ var DelayPane = function DelayPane(_ref) {
|
|
|
4076
4128
|
return first.focus();
|
|
4077
4129
|
}, 0);
|
|
4078
4130
|
}, []);
|
|
4079
|
-
return /*#__PURE__*/jsxs(Fragment, {
|
|
4131
|
+
return /*#__PURE__*/jsxs(Fragment$1, {
|
|
4080
4132
|
children: [/*#__PURE__*/jsx(Panel.Header, {
|
|
4081
4133
|
children: /*#__PURE__*/jsxs("div", {
|
|
4082
4134
|
className: "flex flex-col gap-y-1",
|
|
@@ -4258,7 +4310,7 @@ var LeadTimePane = function LeadTimePane(_ref) {
|
|
|
4258
4310
|
setFieldTouched(path, true, false);
|
|
4259
4311
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
4260
4312
|
}, [rule.leadTime]);
|
|
4261
|
-
return /*#__PURE__*/jsxs(Fragment, {
|
|
4313
|
+
return /*#__PURE__*/jsxs(Fragment$1, {
|
|
4262
4314
|
children: [/*#__PURE__*/jsx(Panel.Header, {
|
|
4263
4315
|
children: /*#__PURE__*/jsxs("div", {
|
|
4264
4316
|
className: "flex flex-col gap-y-1",
|
|
@@ -4321,7 +4373,7 @@ var NamePane = function NamePane(_ref) {
|
|
|
4321
4373
|
t = _useTranslation.t;
|
|
4322
4374
|
var _useRuleModel = useRuleModel(schema),
|
|
4323
4375
|
fieldKeys = _useRuleModel.fieldKeys;
|
|
4324
|
-
return /*#__PURE__*/jsxs(Fragment, {
|
|
4376
|
+
return /*#__PURE__*/jsxs(Fragment$1, {
|
|
4325
4377
|
children: [/*#__PURE__*/jsx(Panel.Header, {
|
|
4326
4378
|
children: /*#__PURE__*/jsxs("div", {
|
|
4327
4379
|
className: "flex flex-col gap-y-1",
|
|
@@ -4554,7 +4606,7 @@ var OptionsPane = function OptionsPane(_ref) {
|
|
|
4554
4606
|
var _ref3 = _slicedToArray(_ref2, 2),
|
|
4555
4607
|
category = _ref3[0],
|
|
4556
4608
|
items = _ref3[1];
|
|
4557
|
-
return /*#__PURE__*/jsxs(Fragment
|
|
4609
|
+
return /*#__PURE__*/jsxs(Fragment, {
|
|
4558
4610
|
children: [renderGroupHeader(category), items.map(function (option) {
|
|
4559
4611
|
return /*#__PURE__*/jsx(Checkbox, _objectSpread$2(_objectSpread$2({
|
|
4560
4612
|
checked: isSelected(option.value),
|
|
@@ -4596,7 +4648,7 @@ var OptionsPane = function OptionsPane(_ref) {
|
|
|
4596
4648
|
}).filter(Boolean)
|
|
4597
4649
|
});
|
|
4598
4650
|
};
|
|
4599
|
-
return /*#__PURE__*/jsxs(Fragment, {
|
|
4651
|
+
return /*#__PURE__*/jsxs(Fragment$1, {
|
|
4600
4652
|
children: [/*#__PURE__*/jsx(Panel.Header, {
|
|
4601
4653
|
children: /*#__PURE__*/jsxs("div", {
|
|
4602
4654
|
className: "flex w-full flex-col gap-y-2",
|
|
@@ -4785,7 +4837,7 @@ var RecipientPane = function RecipientPane(_ref) {
|
|
|
4785
4837
|
|
|
4786
4838
|
// eslint-disable-next-line security/detect-object-injection
|
|
4787
4839
|
var meta = ((_schema$actions9 = schema.actions) === null || _schema$actions9 === void 0 || (_schema$actions9 = _schema$actions9.channelMeta) === null || _schema$actions9 === void 0 ? void 0 : _schema$actions9[channel]) || {};
|
|
4788
|
-
return /*#__PURE__*/jsxs(Fragment, {
|
|
4840
|
+
return /*#__PURE__*/jsxs(Fragment$1, {
|
|
4789
4841
|
children: [/*#__PURE__*/jsx(Panel.Header, {
|
|
4790
4842
|
children: /*#__PURE__*/jsxs("div", {
|
|
4791
4843
|
className: "flex w-full flex-col gap-y-2",
|
|
@@ -4985,7 +5037,7 @@ var ValuePane = function ValuePane(_ref) {
|
|
|
4985
5037
|
name: base
|
|
4986
5038
|
});
|
|
4987
5039
|
};
|
|
4988
|
-
return /*#__PURE__*/jsxs(Fragment, {
|
|
5040
|
+
return /*#__PURE__*/jsxs(Fragment$1, {
|
|
4989
5041
|
children: [/*#__PURE__*/jsx(Panel.Header, {
|
|
4990
5042
|
children: /*#__PURE__*/jsxs("div", {
|
|
4991
5043
|
className: "flex w-full flex-col gap-y-2",
|