@bigbinary/neeto-rules-frontend 2.5.61 → 2.5.62
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/CannedResponsesPane.js +8 -8
- package/dist/CannedResponsesPane.js.map +1 -1
- package/dist/NeetoRules.js +5 -5
- package/dist/NeetoRules.js.map +1 -1
- package/dist/NeetoRulesForm.js +78 -77
- package/dist/NeetoRulesForm.js.map +1 -1
- package/dist/RulePreview.js +3 -3
- package/dist/RulePreview.js.map +1 -1
- package/dist/cjs/CannedResponsesPane.js +8 -8
- package/dist/cjs/CannedResponsesPane.js.map +1 -1
- package/dist/cjs/NeetoRules.js +4 -4
- package/dist/cjs/NeetoRules.js.map +1 -1
- package/dist/cjs/NeetoRulesForm.js +77 -76
- package/dist/cjs/NeetoRulesForm.js.map +1 -1
- package/dist/cjs/RulePreview.js +2 -2
- package/dist/cjs/RulePreview.js.map +1 -1
- package/dist/cjs/hooks.js +1 -1
- package/dist/cjs/index.js +2 -3
- package/dist/cjs/index.js.map +1 -1
- package/dist/cjs/v2/CannedResponsesPane.js +8 -8
- package/dist/cjs/v2/CannedResponsesPane.js.map +1 -1
- package/dist/cjs/v2/NeetoRules.js +7 -9
- package/dist/cjs/v2/NeetoRules.js.map +1 -1
- package/dist/cjs/v2/NeetoRulesForm.js +309 -332
- package/dist/cjs/v2/NeetoRulesForm.js.map +1 -1
- package/dist/cjs/v2/RulePreview.js +41 -45
- package/dist/cjs/v2/RulePreview.js.map +1 -1
- package/dist/cjs/v2/RulesReorder.js +2 -2
- package/dist/cjs/v2/hooks.js +1 -1
- package/dist/cjs/v2/index.js +5 -19
- package/dist/cjs/v2/index.js.map +1 -1
- package/dist/hooks.js +1 -1
- package/dist/{index-CSnQp41c.js → index-BEAX6XxM.js} +11 -11
- package/dist/index-BEAX6XxM.js.map +1 -0
- package/dist/{index-BBcadHIi.js → index-DS9tZpYh.js} +11 -11
- package/dist/index-DS9tZpYh.js.map +1 -0
- package/dist/index.js +2 -3
- package/dist/index.js.map +1 -1
- package/dist/{useActiveField-DunVO8SS.js → useActiveField-9aCscxu8.js} +6 -6
- package/dist/useActiveField-9aCscxu8.js.map +1 -0
- package/dist/{useActiveField-D2fv_EeJ.js → useActiveField-CPw24qyf.js} +5 -5
- package/dist/useActiveField-CPw24qyf.js.map +1 -0
- package/dist/{useCustomDataStore-D7hl6nev.js → useCustomDataStore-CU3KpyD4.js} +6 -6
- package/dist/useCustomDataStore-CU3KpyD4.js.map +1 -0
- package/dist/{useCustomDataStore-DipT25Pg.js → useCustomDataStore-D9k8F5g-.js} +5 -5
- package/dist/useCustomDataStore-D9k8F5g-.js.map +1 -0
- package/dist/{useDebouncedUpdate-6Ibug5MF.js → useDebouncedUpdate-DDFcag0p.js} +2 -2
- package/dist/{useDebouncedUpdate-6Ibug5MF.js.map → useDebouncedUpdate-DDFcag0p.js.map} +1 -1
- package/dist/{useDebouncedUpdate-BcPAGgg7.js → useDebouncedUpdate-sW5WvXe0.js} +2 -2
- package/dist/{useDebouncedUpdate-BcPAGgg7.js.map → useDebouncedUpdate-sW5WvXe0.js.map} +1 -1
- package/dist/v2/CannedResponsesPane.js +8 -8
- package/dist/v2/CannedResponsesPane.js.map +1 -1
- package/dist/v2/NeetoRules.js +8 -10
- package/dist/v2/NeetoRules.js.map +1 -1
- package/dist/v2/NeetoRulesForm.js +300 -323
- package/dist/v2/NeetoRulesForm.js.map +1 -1
- package/dist/v2/RulePreview.js +42 -46
- package/dist/v2/RulePreview.js.map +1 -1
- package/dist/v2/RulesReorder.js +2 -2
- package/dist/v2/hooks.js +1 -1
- package/dist/v2/index.js +5 -19
- package/dist/v2/index.js.map +1 -1
- package/package.json +3 -3
- package/dist/index-BBcadHIi.js.map +0 -1
- package/dist/index-CSnQp41c.js.map +0 -1
- package/dist/useActiveField-D2fv_EeJ.js.map +0 -1
- package/dist/useActiveField-DunVO8SS.js.map +0 -1
- package/dist/useCustomDataStore-D7hl6nev.js.map +0 -1
- package/dist/useCustomDataStore-DipT25Pg.js.map +0 -1
|
@@ -1,15 +1,14 @@
|
|
|
1
1
|
import _defineProperty from '@babel/runtime/helpers/defineProperty';
|
|
2
2
|
import _objectDestructuringEmpty from '@babel/runtime/helpers/objectDestructuringEmpty';
|
|
3
|
-
import { u as useOnClickOutside, S as SHORTCUTS, f as flatten, a as useDebouncedUpdate } from '../useDebouncedUpdate-
|
|
3
|
+
import { u as useOnClickOutside, S as SHORTCUTS, f as flatten, a as useDebouncedUpdate } from '../useDebouncedUpdate-sW5WvXe0.js';
|
|
4
4
|
import _toConsumableArray from '@babel/runtime/helpers/toConsumableArray';
|
|
5
5
|
import _slicedToArray from '@babel/runtime/helpers/slicedToArray';
|
|
6
|
-
import {
|
|
6
|
+
import { useShallow } from 'zustand/shallow';
|
|
7
7
|
import { useState, createElement, useRef, useEffect, useCallback, forwardRef, useMemo, memo, Fragment as Fragment$1 } from 'react';
|
|
8
8
|
import { Button, Callout, Typography, Input as Input$1, Label, Select, DatePicker, Checkbox, Badge, RadioGroup as RadioGroup$1, TimePicker, DropdownMenu, Tooltip, Switch as Switch$1, Spinner } from '@bigbinary/neeto-atoms';
|
|
9
9
|
import { useFormikContext, useField, FieldArray, ErrorMessage, Formik, Form as Form$1 } from 'formik';
|
|
10
|
+
import { PanelRightClose, Search, Trash2, CircleHelp, RefreshCw, Check, X, Plus, ChevronLeft, ChevronDown, Eye } from 'lucide-react';
|
|
10
11
|
import { findBy, isNotEmpty, noop, isPresent, hyphenate, renameKeys, notEqualsDeep, nullSafe, _findBy, toLabelAndValue, removeBy, isNotPresent, isNot } from '@bigbinary/neeto-cist';
|
|
11
|
-
import Plus from '@bigbinary/neeto-icons/Plus';
|
|
12
|
-
import Delete from '@bigbinary/neeto-icons/Delete';
|
|
13
12
|
import { useTranslation, Trans } from 'react-i18next';
|
|
14
13
|
import { u as useUtilityStore } from '../useUtilityStore-BBb39TOj.js';
|
|
15
14
|
import classNames from 'classnames';
|
|
@@ -17,34 +16,24 @@ import { toLower, identity, pluck, isEmpty, mergeDeepLeft, isNotNil, whereAny, r
|
|
|
17
16
|
import { t } from 'i18next';
|
|
18
17
|
import * as yup from 'yup';
|
|
19
18
|
import { RadioGroup, Textarea, Input as Input$2, Switch, MultiEmailInput, Select as Select$1, ActionBlock } from '@bigbinary/neeto-atoms/formik';
|
|
20
|
-
import
|
|
21
|
-
import { a as useActiveField, u as useCustomDataStore } from '../useCustomDataStore-D7hl6nev.js';
|
|
19
|
+
import { a as useActiveField, u as useCustomDataStore } from '../useCustomDataStore-CU3KpyD4.js';
|
|
22
20
|
import _objectWithoutProperties from '@babel/runtime/helpers/objectWithoutProperties';
|
|
23
21
|
import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
|
|
24
|
-
import Collapse from '@bigbinary/neeto-icons/Collapse';
|
|
25
|
-
import Left from '@bigbinary/neeto-icons/Left';
|
|
26
22
|
import { withT, useStateWithDependency, useDebounce } from '@bigbinary/neeto-commons-frontend/v2/react-utils';
|
|
27
23
|
import Editor from '@monaco-editor/react';
|
|
28
|
-
import
|
|
29
|
-
import DynamicVariables from '@bigbinary/neeto-molecules/DynamicVariables';
|
|
24
|
+
import DynamicVariables from '@bigbinary/neeto-molecules/v2/DynamicVariables';
|
|
30
25
|
import { dayjs, joinHyphenCase, hyphenize } from '@bigbinary/neeto-commons-frontend/v2/utils';
|
|
31
26
|
import { g as getSeparator, d as dotPath$1, b as getDateTimeValue, D as DATE_TIME_TYPES, e as DATE_TIME_FORMAT, f as DATE_FORMAT, a as getDateTimeFormattedValue, T as TIME_FORMAT } from '../utils-CfCq6Ltz.js';
|
|
32
27
|
import FormikEditor from '@bigbinary/neeto-editor/FormikEditor';
|
|
33
|
-
import Refresh from '@bigbinary/neeto-icons/Refresh';
|
|
34
28
|
import useHotkeys from '@bigbinary/neeto-hotkeys';
|
|
35
|
-
import Check from '@bigbinary/neeto-icons/Check';
|
|
36
|
-
import Close from '@bigbinary/neeto-icons/Close';
|
|
37
29
|
import CreatableSelect from 'react-select/creatable';
|
|
38
30
|
import _toArray from '@babel/runtime/helpers/toArray';
|
|
39
|
-
import { isPhoneNumberValid } from '@bigbinary/neeto-molecules/PhoneNumber';
|
|
31
|
+
import { isPhoneNumberValid } from '@bigbinary/neeto-molecules/v2/PhoneNumber';
|
|
40
32
|
import { components } from 'react-select';
|
|
41
33
|
import { O as OPERATORS$1, V as VERB_LABELS, M as MAXIMUM_OPTION_LENGTH$2, I as INPUT_FIELD_TYPES, C as CONDITION_VALUE_TYPES, F as FIELDS_WITH_OPTIONS$1 } from '../constants-CYdcft3h.js';
|
|
42
34
|
import { globalProps } from '@bigbinary/neeto-commons-frontend/v2/initializers';
|
|
43
35
|
import _asyncToGenerator from '@babel/runtime/helpers/asyncToGenerator';
|
|
44
|
-
import _regeneratorRuntime from '@babel/runtime/regenerator';
|
|
45
36
|
import { isEditorEmpty } from '@bigbinary/neeto-editor/utils';
|
|
46
|
-
import Eye from '@bigbinary/neeto-icons/Eye';
|
|
47
|
-
import Down from '@bigbinary/neeto-icons/Down';
|
|
48
37
|
import Container from '@bigbinary/neeto-molecules/v2/Container';
|
|
49
38
|
import NeetoHeader from '@bigbinary/neeto-molecules/v2/Header';
|
|
50
39
|
import '@bigbinary/neeto-commons-frontend/react-utils';
|
|
@@ -72,7 +61,7 @@ var Footer = function Footer(_ref) {
|
|
|
72
61
|
className = _ref.className;
|
|
73
62
|
return /*#__PURE__*/jsx("div", {
|
|
74
63
|
"data-testid": "pane-footer",
|
|
75
|
-
className: classNames("neeto-rules-side-panel__footer
|
|
64
|
+
className: classNames("neeto-rules-side-panel__footer border-border flex items-center justify-between border-t p-6", className),
|
|
76
65
|
children: children
|
|
77
66
|
});
|
|
78
67
|
};
|
|
@@ -80,30 +69,27 @@ var Footer = function Footer(_ref) {
|
|
|
80
69
|
var Header = function Header(_ref) {
|
|
81
70
|
var children = _ref.children,
|
|
82
71
|
className = _ref.className;
|
|
83
|
-
var _useUtilityStore = useUtilityStore(function (store) {
|
|
72
|
+
var _useUtilityStore = useUtilityStore(useShallow(function (store) {
|
|
84
73
|
return {
|
|
85
74
|
resetPanelState: store["resetPanelState"]
|
|
86
75
|
};
|
|
87
|
-
}
|
|
76
|
+
})),
|
|
88
77
|
resetPanelState = _useUtilityStore.resetPanelState;
|
|
89
78
|
var _useTranslation = useTranslation(),
|
|
90
79
|
t = _useTranslation.t;
|
|
91
80
|
return /*#__PURE__*/jsxs("div", {
|
|
92
81
|
"data-testid": "pane-header",
|
|
93
|
-
className: classNames("neeto-rules-side-panel__header
|
|
82
|
+
className: classNames("neeto-rules-side-panel__header border-border flex items-start justify-between border-b p-6", _defineProperty({}, className, className)),
|
|
94
83
|
children: [/*#__PURE__*/jsx("div", {
|
|
95
84
|
className: "flex min-w-0 grow",
|
|
96
85
|
children: children
|
|
97
86
|
}), /*#__PURE__*/jsx(Button, {
|
|
98
87
|
className: "shrink-0 scale-x-[-1] rtl:rotate-180",
|
|
99
88
|
"data-testid": "collapse-sidebar-button",
|
|
100
|
-
icon:
|
|
89
|
+
icon: PanelRightClose,
|
|
101
90
|
size: "default",
|
|
91
|
+
title: t("neetoRules.common.collapseSidebar"),
|
|
102
92
|
variant: "ghost",
|
|
103
|
-
tooltipProps: {
|
|
104
|
-
content: t("neetoRules.common.collapseSidebar"),
|
|
105
|
-
placement: "bottom"
|
|
106
|
-
},
|
|
107
93
|
onClick: resetPanelState
|
|
108
94
|
})]
|
|
109
95
|
});
|
|
@@ -113,12 +99,12 @@ var _excluded$f = ["component"];
|
|
|
113
99
|
function ownKeys$u(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; }
|
|
114
100
|
function _objectSpread$u(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$u(Object(t), true).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$u(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
115
101
|
var Panel = function Panel() {
|
|
116
|
-
var _useUtilityStore = useUtilityStore(function (store) {
|
|
102
|
+
var _useUtilityStore = useUtilityStore(useShallow(function (store) {
|
|
117
103
|
return {
|
|
118
104
|
panelState: store["panelState"],
|
|
119
105
|
resetPanelState: store["resetPanelState"]
|
|
120
106
|
};
|
|
121
|
-
}
|
|
107
|
+
})),
|
|
122
108
|
panelState = _useUtilityStore.panelState,
|
|
123
109
|
resetPanelState = _useUtilityStore.resetPanelState;
|
|
124
110
|
var config = {
|
|
@@ -140,7 +126,7 @@ var Panel = function Panel() {
|
|
|
140
126
|
large: "neeto-rules-side-panel--large"
|
|
141
127
|
}[panelState.size] || "neeto-rules-side-panel--small";
|
|
142
128
|
return /*#__PURE__*/jsx("div", _objectSpread$u(_objectSpread$u({
|
|
143
|
-
className: classNames("neeto-rules-side-panel
|
|
129
|
+
className: classNames("neeto-rules-side-panel border-border transition-width bg-background ms-auto flex h-screen max-h-full flex-col overflow-y-auto border-s duration-300 ease-in-out", _defineProperty(_defineProperty(_defineProperty(_defineProperty({}, panelSize, isOpen), "w-0 overflow-hidden", !isOpen), "absolute", hasOverlays), "end-0", hasOverlays))
|
|
144
130
|
}, paneProps), {}, {
|
|
145
131
|
children: /*#__PURE__*/jsx(Component, _objectSpread$u(_objectSpread$u({}, data), {}, {
|
|
146
132
|
onClose: resetPanelState
|
|
@@ -154,7 +140,7 @@ Panel.Footer = Footer;
|
|
|
154
140
|
var StickySidebarHeader = function StickySidebarHeader(_ref) {
|
|
155
141
|
var children = _ref.children;
|
|
156
142
|
return /*#__PURE__*/jsx("div", {
|
|
157
|
-
className: "sticky top-0
|
|
143
|
+
className: "sticky top-0 bg-background py-6 flex flex-col gap-3",
|
|
158
144
|
children: children
|
|
159
145
|
});
|
|
160
146
|
};
|
|
@@ -313,15 +299,15 @@ var ActionPanel = function ActionPanel() {
|
|
|
313
299
|
_useState2 = _slicedToArray(_useState, 2),
|
|
314
300
|
searchTerm = _useState2[0],
|
|
315
301
|
setSearchTerm = _useState2[1];
|
|
316
|
-
var _useUtilityStore = useUtilityStore(function (store) {
|
|
302
|
+
var _useUtilityStore = useUtilityStore(useShallow(function (store) {
|
|
317
303
|
return {
|
|
318
304
|
setPanelState: store["setPanelState"],
|
|
319
305
|
resetPanelState: store["resetPanelState"]
|
|
320
306
|
};
|
|
321
|
-
}
|
|
307
|
+
})),
|
|
322
308
|
setPanelState = _useUtilityStore.setPanelState,
|
|
323
309
|
resetPanelState = _useUtilityStore.resetPanelState;
|
|
324
|
-
var _useUtilityStore2 = useUtilityStore(function (store) {
|
|
310
|
+
var _useUtilityStore2 = useUtilityStore(useShallow(function (store) {
|
|
325
311
|
var _store$panelState, _store$panelState2, _store$panelState3, _store$panelState4, _store$panelState5, _store$panelState6, _store$panelState7;
|
|
326
312
|
return {
|
|
327
313
|
index: (_store$panelState = store["panelState"]) === null || _store$panelState === void 0 || (_store$panelState = _store$panelState["data"]) === null || _store$panelState === void 0 ? void 0 : _store$panelState["index"],
|
|
@@ -332,7 +318,7 @@ var ActionPanel = function ActionPanel() {
|
|
|
332
318
|
errorMessage: (_store$panelState6 = store["panelState"]) === null || _store$panelState6 === void 0 || (_store$panelState6 = _store$panelState6["data"]) === null || _store$panelState6 === void 0 ? void 0 : _store$panelState6["errorMessage"],
|
|
333
319
|
isIntegrableError: (_store$panelState7 = store["panelState"]) === null || _store$panelState7 === void 0 || (_store$panelState7 = _store$panelState7["data"]) === null || _store$panelState7 === void 0 ? void 0 : _store$panelState7["isIntegrableError"]
|
|
334
320
|
};
|
|
335
|
-
}
|
|
321
|
+
})),
|
|
336
322
|
index = _useUtilityStore2.index,
|
|
337
323
|
name = _useUtilityStore2.name,
|
|
338
324
|
actionOptions = _useUtilityStore2.actionOptions,
|
|
@@ -387,11 +373,11 @@ var ActionPanel = function ActionPanel() {
|
|
|
387
373
|
className: "flex flex-col space-y-2",
|
|
388
374
|
children: [/*#__PURE__*/jsxs(Typography, {
|
|
389
375
|
"data-testid": "action-title",
|
|
390
|
-
variant: "
|
|
376
|
+
variant: "h5",
|
|
391
377
|
children: [label, "..."]
|
|
392
378
|
}), /*#__PURE__*/jsx(Typography, {
|
|
393
379
|
"data-testid": "action-description",
|
|
394
|
-
variant: "
|
|
380
|
+
variant: "body1",
|
|
395
381
|
children: t("neetoRules.form.addActionDescription")
|
|
396
382
|
})]
|
|
397
383
|
})
|
|
@@ -469,17 +455,16 @@ var Target$k = function Target(_ref) {
|
|
|
469
455
|
var label = (selectedField === null || selectedField === void 0 ? void 0 : selectedField.placeholder) || defaultLabel;
|
|
470
456
|
return /*#__PURE__*/jsxs(Fragment, {
|
|
471
457
|
children: [separator && /*#__PURE__*/jsx(Typography, {
|
|
472
|
-
className: "neeto-ui-text-gray-700",
|
|
473
458
|
"data-testid": "long-text-action-separator-text",
|
|
474
|
-
variant: "
|
|
459
|
+
variant: "body1",
|
|
475
460
|
children: separator
|
|
476
461
|
}), /*#__PURE__*/jsx(Button, {
|
|
477
462
|
"data-testid": "long-text-action-button",
|
|
478
463
|
label: label.toLowerCase(),
|
|
479
464
|
variant: "link",
|
|
480
|
-
className: classNames("
|
|
481
|
-
"
|
|
482
|
-
"
|
|
465
|
+
className: classNames("text-base text-foreground font-semibold underline", {
|
|
466
|
+
"text-primary": isFieldActive,
|
|
467
|
+
"text-destructive": isFieldInvalid && !isFieldActive
|
|
483
468
|
}),
|
|
484
469
|
onClick: function onClick() {
|
|
485
470
|
_onClick();
|
|
@@ -652,7 +637,7 @@ var KeyValuePairsField = withT(function (_ref) {
|
|
|
652
637
|
placeholder: t("neetoRules.labels.value"),
|
|
653
638
|
type: "text",
|
|
654
639
|
suffix: showDeleteButton && /*#__PURE__*/jsx(Button, {
|
|
655
|
-
icon:
|
|
640
|
+
icon: Trash2,
|
|
656
641
|
size: "default",
|
|
657
642
|
variant: "ghost",
|
|
658
643
|
onClick: function onClick() {
|
|
@@ -823,7 +808,7 @@ var JsonEditor = function JsonEditor(_ref) {
|
|
|
823
808
|
"data-testid": "api-field-body"
|
|
824
809
|
}, isPresent(helpPopoverProps) && {
|
|
825
810
|
helpIconProps: {
|
|
826
|
-
icon:
|
|
811
|
+
icon: CircleHelp,
|
|
827
812
|
popoverProps: buildHelpPopoverProps(helpPopoverProps)
|
|
828
813
|
}
|
|
829
814
|
}), {}, {
|
|
@@ -847,7 +832,7 @@ var JsonEditor = function JsonEditor(_ref) {
|
|
|
847
832
|
onChange: handleChange,
|
|
848
833
|
onMount: handleEditorDidMount
|
|
849
834
|
}), error && touched && /*#__PURE__*/jsx("div", {
|
|
850
|
-
className: "
|
|
835
|
+
className: "text-destructive text-xs",
|
|
851
836
|
"data-testid": "json-field-input-error",
|
|
852
837
|
children: error
|
|
853
838
|
})]
|
|
@@ -981,17 +966,16 @@ var Target$j = function Target(_ref) {
|
|
|
981
966
|
};
|
|
982
967
|
return /*#__PURE__*/jsxs(Fragment, {
|
|
983
968
|
children: [/*#__PURE__*/jsx(Typography, {
|
|
984
|
-
className: "neeto-ui-text-gray-700",
|
|
985
969
|
"data-testid": "api-action-separator-text",
|
|
986
|
-
variant: "
|
|
970
|
+
variant: "body1",
|
|
987
971
|
children: separator
|
|
988
972
|
}), /*#__PURE__*/jsx(Button, {
|
|
989
973
|
"data-testid": "api-action-button",
|
|
990
974
|
label: defaultLabel.toLowerCase(),
|
|
991
975
|
variant: "link",
|
|
992
|
-
className: classNames("
|
|
993
|
-
"
|
|
994
|
-
"
|
|
976
|
+
className: classNames("text-base text-foreground font-semibold underline", {
|
|
977
|
+
"text-primary": isFieldActive,
|
|
978
|
+
"text-destructive": isFieldInvalid && !isFieldActive
|
|
995
979
|
}),
|
|
996
980
|
onClick: handleOnClick
|
|
997
981
|
})]
|
|
@@ -1012,11 +996,11 @@ var ApiFields = function ApiFields(_ref2) {
|
|
|
1012
996
|
}),
|
|
1013
997
|
ref = _useActiveField2.ref,
|
|
1014
998
|
setFieldActive = _useActiveField2.setFieldActive;
|
|
1015
|
-
var _useUtilityStore = useUtilityStore(function (store) {
|
|
999
|
+
var _useUtilityStore = useUtilityStore(useShallow(function (store) {
|
|
1016
1000
|
return {
|
|
1017
1001
|
isSaveAsTemplateEnabled: store["isSaveAsTemplateEnabled"]
|
|
1018
1002
|
};
|
|
1019
|
-
}
|
|
1003
|
+
})),
|
|
1020
1004
|
isSaveAsTemplateEnabled = _useUtilityStore.isSaveAsTemplateEnabled;
|
|
1021
1005
|
var hasFieldChanged = useHasFieldChanged(name);
|
|
1022
1006
|
var templates = (selectedField === null || selectedField === void 0 ? void 0 : selectedField.templates) || [];
|
|
@@ -1105,16 +1089,15 @@ var Target$i = function Target(_ref) {
|
|
|
1105
1089
|
};
|
|
1106
1090
|
return /*#__PURE__*/jsxs(Fragment, {
|
|
1107
1091
|
children: [/*#__PURE__*/jsx(Typography, {
|
|
1108
|
-
|
|
1109
|
-
variant: "h5",
|
|
1092
|
+
variant: "body1",
|
|
1110
1093
|
children: separator
|
|
1111
1094
|
}), /*#__PURE__*/jsx(Button, {
|
|
1112
1095
|
"data-testid": "custom-action-button-".concat(hyphenate(defaultLabel)),
|
|
1113
1096
|
label: defaultLabel.toLowerCase(),
|
|
1114
1097
|
variant: "link",
|
|
1115
|
-
className: classNames("
|
|
1116
|
-
"
|
|
1117
|
-
"
|
|
1098
|
+
className: classNames("text-base text-foreground font-semibold underline", {
|
|
1099
|
+
"text-primary": isFieldActive,
|
|
1100
|
+
"text-destructive": isFieldInvalid && !isFieldActive
|
|
1118
1101
|
}),
|
|
1119
1102
|
onClick: handleOnClick
|
|
1120
1103
|
})]
|
|
@@ -1165,16 +1148,15 @@ var Target$h = function Target(_ref) {
|
|
|
1165
1148
|
};
|
|
1166
1149
|
return /*#__PURE__*/jsxs(Fragment, {
|
|
1167
1150
|
children: [!selectedField.hideSeparator && /*#__PURE__*/jsx(Typography, {
|
|
1168
|
-
className: "neeto-ui-text-gray-700",
|
|
1169
1151
|
"data-testid": "action-dropdown-seperator-text",
|
|
1170
|
-
variant: "
|
|
1152
|
+
variant: "body1",
|
|
1171
1153
|
children: separator
|
|
1172
1154
|
}), /*#__PURE__*/jsx(Button, {
|
|
1173
1155
|
label: label,
|
|
1174
1156
|
variant: "link",
|
|
1175
|
-
className: classNames("
|
|
1176
|
-
"
|
|
1177
|
-
"
|
|
1157
|
+
className: classNames("text-base text-foreground font-semibold underline", {
|
|
1158
|
+
"text-primary": isFieldActive,
|
|
1159
|
+
"text-destructive": isFieldInvalid && !isFieldActive
|
|
1178
1160
|
}),
|
|
1179
1161
|
onClick: handleOnClick
|
|
1180
1162
|
})]
|
|
@@ -1329,17 +1311,16 @@ var Target$g = function Target(_ref) {
|
|
|
1329
1311
|
};
|
|
1330
1312
|
return /*#__PURE__*/jsxs(Fragment, {
|
|
1331
1313
|
children: [!selectedField.hideSeparator && /*#__PURE__*/jsx(Typography, {
|
|
1332
|
-
className: "neeto-ui-text-gray-700",
|
|
1333
1314
|
"data-testid": "action-dropdown-seperator-text",
|
|
1334
|
-
variant: "
|
|
1315
|
+
variant: "body1",
|
|
1335
1316
|
children: separator
|
|
1336
1317
|
}), /*#__PURE__*/jsx(Button, {
|
|
1337
1318
|
"data-testid": "action-dropdown-button",
|
|
1338
1319
|
label: selectedOption === null || selectedOption === void 0 || (_selectedOption$label = selectedOption.label) === null || _selectedOption$label === void 0 ? void 0 : _selectedOption$label.toLowerCase(),
|
|
1339
1320
|
variant: "link",
|
|
1340
|
-
className: classNames("
|
|
1341
|
-
"
|
|
1342
|
-
"
|
|
1321
|
+
className: classNames("text-base text-foreground font-semibold underline", {
|
|
1322
|
+
"text-primary": isFieldActive,
|
|
1323
|
+
"text-destructive": isFieldInvalid && !isFieldActive
|
|
1343
1324
|
}),
|
|
1344
1325
|
onClick: handleOnClick
|
|
1345
1326
|
})]
|
|
@@ -1389,7 +1370,7 @@ var SelectField$2 = function SelectField(_ref2) {
|
|
|
1389
1370
|
})), handleSlackChannelRefresh && action.name === "message_to_slack" && /*#__PURE__*/jsx(Button, {
|
|
1390
1371
|
className: "mt-[22px]",
|
|
1391
1372
|
"data-testid": "refresh-slack-button",
|
|
1392
|
-
icon:
|
|
1373
|
+
icon: RefreshCw,
|
|
1393
1374
|
size: "default",
|
|
1394
1375
|
variant: "outline",
|
|
1395
1376
|
tooltipProps: {
|
|
@@ -1433,17 +1414,16 @@ var Target$f = function Target(_ref) {
|
|
|
1433
1414
|
};
|
|
1434
1415
|
return /*#__PURE__*/jsxs(Fragment, {
|
|
1435
1416
|
children: [/*#__PURE__*/jsx(Typography, {
|
|
1436
|
-
className: "neeto-ui-text-gray-700",
|
|
1437
1417
|
"data-testid": "action-email-seperator-text",
|
|
1438
|
-
variant: "
|
|
1418
|
+
variant: "body1",
|
|
1439
1419
|
children: separator
|
|
1440
1420
|
}), /*#__PURE__*/jsx(Button, {
|
|
1441
1421
|
"data-testid": "email-action-button",
|
|
1442
1422
|
label: defaultLabel.toLowerCase(),
|
|
1443
1423
|
variant: "link",
|
|
1444
|
-
className: classNames("
|
|
1445
|
-
"
|
|
1446
|
-
"
|
|
1424
|
+
className: classNames("text-base text-foreground font-semibold underline", {
|
|
1425
|
+
"text-primary": isFieldActive,
|
|
1426
|
+
"text-destructive": isFieldInvalid && !isFieldActive
|
|
1447
1427
|
}),
|
|
1448
1428
|
onClick: handleOnClick
|
|
1449
1429
|
})]
|
|
@@ -1475,11 +1455,11 @@ var EmailFields = function EmailFields(_ref2) {
|
|
|
1475
1455
|
}),
|
|
1476
1456
|
initialFocusRef = _useActiveField2.ref,
|
|
1477
1457
|
setFieldActive = _useActiveField2.setFieldActive;
|
|
1478
|
-
var _useUtilityStore = useUtilityStore(function (store) {
|
|
1458
|
+
var _useUtilityStore = useUtilityStore(useShallow(function (store) {
|
|
1479
1459
|
return {
|
|
1480
1460
|
isSaveAsTemplateEnabled: store["isSaveAsTemplateEnabled"]
|
|
1481
1461
|
};
|
|
1482
|
-
}
|
|
1462
|
+
})),
|
|
1483
1463
|
isSaveAsTemplateEnabled = _useUtilityStore.isSaveAsTemplateEnabled;
|
|
1484
1464
|
var hasFieldChanged = useHasFieldChanged(name);
|
|
1485
1465
|
var templates = selectedField === null || selectedField === void 0 ? void 0 : selectedField.templates;
|
|
@@ -1584,17 +1564,17 @@ var Target$e = function Target(_ref) {
|
|
|
1584
1564
|
};
|
|
1585
1565
|
return /*#__PURE__*/jsxs(Fragment, {
|
|
1586
1566
|
children: [!selectedField.hideSeparator && /*#__PURE__*/jsx(Typography, {
|
|
1587
|
-
className: "
|
|
1567
|
+
className: "mt-1",
|
|
1588
1568
|
"data-testid": "action-dropdown-seperator-text",
|
|
1589
|
-
variant: "
|
|
1569
|
+
variant: "body1",
|
|
1590
1570
|
children: separator
|
|
1591
1571
|
}), /*#__PURE__*/jsx(Button, {
|
|
1592
1572
|
label: label,
|
|
1593
1573
|
"data-testid": "action-value-input-button",
|
|
1594
1574
|
variant: "link",
|
|
1595
|
-
className: classNames("
|
|
1596
|
-
"
|
|
1597
|
-
"
|
|
1575
|
+
className: classNames("text-base text-foreground font-semibold underline", {
|
|
1576
|
+
"text-primary": isFieldActive,
|
|
1577
|
+
"text-destructive": isFieldInvalid && !isFieldActive
|
|
1598
1578
|
}),
|
|
1599
1579
|
onClick: handleOnClick
|
|
1600
1580
|
})]
|
|
@@ -1691,7 +1671,7 @@ var InlineInput = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
|
1691
1671
|
}), /*#__PURE__*/jsx(Button, {
|
|
1692
1672
|
ref: ref,
|
|
1693
1673
|
"data-testid": "inline-input-cancel-button",
|
|
1694
|
-
icon:
|
|
1674
|
+
icon: X,
|
|
1695
1675
|
tooltipProps: LIST_FIELD_TOOLTIP_PROPS.cancel,
|
|
1696
1676
|
variant: "ghost",
|
|
1697
1677
|
onClick: handleCancel
|
|
@@ -1725,17 +1705,16 @@ var Target$d = function Target(_ref) {
|
|
|
1725
1705
|
};
|
|
1726
1706
|
return /*#__PURE__*/jsxs(Fragment, {
|
|
1727
1707
|
children: [/*#__PURE__*/jsx(Typography, {
|
|
1728
|
-
className: "neeto-ui-text-gray-700",
|
|
1729
1708
|
"data-testid": "list-action-separator-text",
|
|
1730
|
-
variant: "
|
|
1709
|
+
variant: "body1",
|
|
1731
1710
|
children: separator
|
|
1732
1711
|
}), /*#__PURE__*/jsx(Button, {
|
|
1733
1712
|
"data-testid": "list-action-button",
|
|
1734
1713
|
label: t("neetoRules.form.list"),
|
|
1735
1714
|
variant: "link",
|
|
1736
|
-
className: classNames("
|
|
1737
|
-
"
|
|
1738
|
-
"
|
|
1715
|
+
className: classNames("text-base text-foreground font-semibold underline", {
|
|
1716
|
+
"text-primary": isFieldActive,
|
|
1717
|
+
"text-destructive": isFieldInvalid && !isFieldActive
|
|
1739
1718
|
}),
|
|
1740
1719
|
onClick: handleOnClick
|
|
1741
1720
|
})]
|
|
@@ -1768,16 +1747,16 @@ var ListField = function ListField(_ref2) {
|
|
|
1768
1747
|
return /*#__PURE__*/jsxs(Fragment, {
|
|
1769
1748
|
children: [values.map(function (item, index) {
|
|
1770
1749
|
return /*#__PURE__*/jsxs("div", {
|
|
1771
|
-
className: "
|
|
1750
|
+
className: "bg-background flex flex-wrap justify-between border border-dashed px-2 py-1",
|
|
1772
1751
|
children: [/*#__PURE__*/jsx(Typography, {
|
|
1773
1752
|
className: "w-4/5 overflow-x-auto",
|
|
1774
1753
|
"data-testid": "list-action-item-label",
|
|
1775
|
-
variant: "
|
|
1754
|
+
variant: "body1",
|
|
1776
1755
|
children: item
|
|
1777
1756
|
}), /*#__PURE__*/jsx(Button, {
|
|
1778
1757
|
className: "shrink-0",
|
|
1779
1758
|
"data-testid": "list-action-delete-item-button",
|
|
1780
|
-
icon:
|
|
1759
|
+
icon: Trash2,
|
|
1781
1760
|
size: "default",
|
|
1782
1761
|
variant: "ghost",
|
|
1783
1762
|
onClick: function onClick() {
|
|
@@ -1790,9 +1769,9 @@ var ListField = function ListField(_ref2) {
|
|
|
1790
1769
|
className: "w-full",
|
|
1791
1770
|
children: function children(message) {
|
|
1792
1771
|
return /*#__PURE__*/jsx(Typography, {
|
|
1793
|
-
className: "
|
|
1772
|
+
className: "text-destructive",
|
|
1794
1773
|
"data-testid": "list-action-error-message",
|
|
1795
|
-
variant: "
|
|
1774
|
+
variant: "body1",
|
|
1796
1775
|
children: message
|
|
1797
1776
|
});
|
|
1798
1777
|
}
|
|
@@ -1851,18 +1830,17 @@ var Target$c = function Target(_ref) {
|
|
|
1851
1830
|
var defaultLabel = (selectedField === null || selectedField === void 0 || (_selectedField$placeh = selectedField.placeholder) === null || _selectedField$placeh === void 0 ? void 0 : _selectedField$placeh.toLowerCase()) || t("neetoRules.form.selectValues");
|
|
1852
1831
|
return /*#__PURE__*/jsxs(Fragment, {
|
|
1853
1832
|
children: [!selectedField.hideSeparator && /*#__PURE__*/jsx(Typography, {
|
|
1854
|
-
className: "neeto-ui-text-gray-700",
|
|
1855
1833
|
"data-testid": "multi-select-action-separator-text",
|
|
1856
|
-
variant: "
|
|
1834
|
+
variant: "body1",
|
|
1857
1835
|
children: separator
|
|
1858
1836
|
}), isNotEmpty(selectedOptions) ? /*#__PURE__*/jsx("span", {
|
|
1859
1837
|
className: "flex flex-wrap items-center gap-x-2 gap-y-1",
|
|
1860
1838
|
children: selectedOptions.map(function (option, idx) {
|
|
1839
|
+
var _option$label;
|
|
1861
1840
|
return /*#__PURE__*/jsxs("span", {
|
|
1862
1841
|
className: "flex flex-wrap items-center gap-x-2 gap-y-1",
|
|
1863
1842
|
children: [!!idx && /*#__PURE__*/jsx(Typography, {
|
|
1864
|
-
|
|
1865
|
-
variant: "h5",
|
|
1843
|
+
variant: "body1",
|
|
1866
1844
|
onClick: function onClick(e) {
|
|
1867
1845
|
return e.stopPropagation();
|
|
1868
1846
|
},
|
|
@@ -1871,11 +1849,11 @@ var Target$c = function Target(_ref) {
|
|
|
1871
1849
|
})
|
|
1872
1850
|
}), /*#__PURE__*/jsx(Button, {
|
|
1873
1851
|
"data-testid": "multi-select-action-button",
|
|
1874
|
-
label: option === null || option === void 0 ? void 0 :
|
|
1852
|
+
label: option === null || option === void 0 || (_option$label = option.label) === null || _option$label === void 0 ? void 0 : _option$label.toLowerCase(),
|
|
1875
1853
|
variant: "link",
|
|
1876
|
-
className: classNames("
|
|
1877
|
-
"
|
|
1878
|
-
"
|
|
1854
|
+
className: classNames("text-base text-foreground font-semibold underline", {
|
|
1855
|
+
"text-primary": isFieldActive,
|
|
1856
|
+
"text-destructive": isFieldInvalid && !isFieldActive
|
|
1879
1857
|
}),
|
|
1880
1858
|
onClick: function onClick() {
|
|
1881
1859
|
_onClick();
|
|
@@ -1887,9 +1865,9 @@ var Target$c = function Target(_ref) {
|
|
|
1887
1865
|
}) : /*#__PURE__*/jsx(Button, {
|
|
1888
1866
|
label: defaultLabel,
|
|
1889
1867
|
variant: "link",
|
|
1890
|
-
className: classNames("
|
|
1891
|
-
"
|
|
1892
|
-
"
|
|
1868
|
+
className: classNames("text-base text-foreground font-semibold underline", {
|
|
1869
|
+
"text-primary": isFieldActive,
|
|
1870
|
+
"text-destructive": isFieldInvalid && !isFieldActive
|
|
1893
1871
|
}),
|
|
1894
1872
|
onClick: function onClick() {
|
|
1895
1873
|
_onClick();
|
|
@@ -1959,18 +1937,17 @@ var Target$b = function Target(_ref) {
|
|
|
1959
1937
|
var defaultLabel = (selectedField === null || selectedField === void 0 || (_selectedField$placeh = selectedField.placeholder) === null || _selectedField$placeh === void 0 ? void 0 : _selectedField$placeh.toLowerCase()) || t("neetoRules.form.selectValues");
|
|
1960
1938
|
return /*#__PURE__*/jsxs(Fragment, {
|
|
1961
1939
|
children: [!selectedField.hideSeparator && /*#__PURE__*/jsx(Typography, {
|
|
1962
|
-
className: "neeto-ui-text-gray-700",
|
|
1963
1940
|
"data-testid": "multi-select-action-separator-text",
|
|
1964
|
-
variant: "
|
|
1941
|
+
variant: "body1",
|
|
1965
1942
|
children: separator
|
|
1966
1943
|
}), isNotEmpty(selectedOptions) ? /*#__PURE__*/jsx("span", {
|
|
1967
1944
|
className: "flex flex-wrap items-center gap-x-2 gap-y-1",
|
|
1968
1945
|
children: selectedOptions.map(function (option, idx) {
|
|
1946
|
+
var _option$label;
|
|
1969
1947
|
return /*#__PURE__*/jsxs("span", {
|
|
1970
1948
|
className: "flex flex-wrap items-center gap-x-2 gap-y-1",
|
|
1971
1949
|
children: [!!idx && /*#__PURE__*/jsx(Typography, {
|
|
1972
|
-
|
|
1973
|
-
variant: "h5",
|
|
1950
|
+
variant: "body1",
|
|
1974
1951
|
onClick: function onClick(e) {
|
|
1975
1952
|
return e.stopPropagation();
|
|
1976
1953
|
},
|
|
@@ -1979,11 +1956,11 @@ var Target$b = function Target(_ref) {
|
|
|
1979
1956
|
})
|
|
1980
1957
|
}), /*#__PURE__*/jsx(Button, {
|
|
1981
1958
|
"data-testid": "multi-select-action-button",
|
|
1982
|
-
label: option === null || option === void 0 ? void 0 :
|
|
1959
|
+
label: option === null || option === void 0 || (_option$label = option.label) === null || _option$label === void 0 ? void 0 : _option$label.toLowerCase(),
|
|
1983
1960
|
variant: "link",
|
|
1984
|
-
className: classNames("
|
|
1985
|
-
"
|
|
1986
|
-
"
|
|
1961
|
+
className: classNames("text-base text-foreground font-semibold underline", {
|
|
1962
|
+
"text-primary": isFieldActive,
|
|
1963
|
+
"text-destructive": isFieldInvalid && !isFieldActive
|
|
1987
1964
|
}),
|
|
1988
1965
|
onClick: function onClick() {
|
|
1989
1966
|
_onClick();
|
|
@@ -1995,9 +1972,9 @@ var Target$b = function Target(_ref) {
|
|
|
1995
1972
|
}) : /*#__PURE__*/jsx(Button, {
|
|
1996
1973
|
label: defaultLabel,
|
|
1997
1974
|
variant: "link",
|
|
1998
|
-
className: classNames("
|
|
1999
|
-
"
|
|
2000
|
-
"
|
|
1975
|
+
className: classNames("text-base text-foreground font-semibold underline", {
|
|
1976
|
+
"text-primary": isFieldActive,
|
|
1977
|
+
"text-destructive": isFieldInvalid && !isFieldActive
|
|
2001
1978
|
}),
|
|
2002
1979
|
onClick: function onClick() {
|
|
2003
1980
|
_onClick();
|
|
@@ -2087,17 +2064,16 @@ var Target$a = function Target(_ref) {
|
|
|
2087
2064
|
};
|
|
2088
2065
|
return /*#__PURE__*/jsxs(Fragment, {
|
|
2089
2066
|
children: [/*#__PURE__*/jsx(Typography, {
|
|
2090
|
-
className: "neeto-ui-text-gray-700",
|
|
2091
2067
|
"data-testid": "note-action-separator-text",
|
|
2092
|
-
variant: "
|
|
2068
|
+
variant: "body1",
|
|
2093
2069
|
children: separator
|
|
2094
2070
|
}), /*#__PURE__*/jsx(Button, {
|
|
2095
2071
|
"data-testid": "note-action-button",
|
|
2096
2072
|
label: defaultLabel.toLowerCase(),
|
|
2097
2073
|
variant: "link",
|
|
2098
|
-
className: classNames("
|
|
2099
|
-
"
|
|
2100
|
-
"
|
|
2074
|
+
className: classNames("text-base text-foreground font-semibold underline", {
|
|
2075
|
+
"text-primary": isFieldActive,
|
|
2076
|
+
"text-destructive": isFieldInvalid && !isFieldActive
|
|
2101
2077
|
}),
|
|
2102
2078
|
onClick: handleOnClick
|
|
2103
2079
|
})]
|
|
@@ -2164,17 +2140,17 @@ var Target$9 = function Target(_ref) {
|
|
|
2164
2140
|
};
|
|
2165
2141
|
return /*#__PURE__*/jsxs(Fragment, {
|
|
2166
2142
|
children: [!selectedField.hideSeparator && /*#__PURE__*/jsx(Typography, {
|
|
2167
|
-
className: "neeto-ui-text-gray-700 font-normal",
|
|
2168
2143
|
"data-testid": "action-radio-seperator-text",
|
|
2169
|
-
variant: "
|
|
2144
|
+
variant: "body1",
|
|
2145
|
+
weight: "normal",
|
|
2170
2146
|
children: separator
|
|
2171
2147
|
}), /*#__PURE__*/jsx(Button, {
|
|
2172
2148
|
"data-testid": "action-radio-button",
|
|
2173
2149
|
label: selectedOption === null || selectedOption === void 0 || (_selectedOption$label = selectedOption.label) === null || _selectedOption$label === void 0 ? void 0 : _selectedOption$label.toLowerCase(),
|
|
2174
2150
|
variant: "link",
|
|
2175
|
-
className: classNames("
|
|
2176
|
-
"
|
|
2177
|
-
"
|
|
2151
|
+
className: classNames("text-base text-foreground font-semibold underline", {
|
|
2152
|
+
"text-primary": isFieldActive,
|
|
2153
|
+
"text-destructive": isFieldInvalid && !isFieldActive
|
|
2178
2154
|
}),
|
|
2179
2155
|
onClick: handleOnClick
|
|
2180
2156
|
})]
|
|
@@ -2281,22 +2257,23 @@ var formatErrorMessage = function formatErrorMessage(error) {
|
|
|
2281
2257
|
};
|
|
2282
2258
|
|
|
2283
2259
|
var _excluded$b = ["children"];
|
|
2260
|
+
function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
|
|
2284
2261
|
function ownKeys$m(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; }
|
|
2285
2262
|
function _objectSpread$m(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$m(Object(t), true).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$m(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
2286
2263
|
var STYLES = {
|
|
2287
2264
|
border: {
|
|
2288
|
-
"default": "1px solid
|
|
2289
|
-
error: "1px solid
|
|
2265
|
+
"default": "1px solid var(--border)",
|
|
2266
|
+
error: "1px solid var(--destructive) !important"
|
|
2290
2267
|
},
|
|
2291
2268
|
color: {
|
|
2292
|
-
"default": "
|
|
2293
|
-
error: "
|
|
2269
|
+
"default": "var(--foreground)",
|
|
2270
|
+
error: "var(--destructive) !important"
|
|
2294
2271
|
}
|
|
2295
2272
|
};
|
|
2296
2273
|
var MultiValueRemove = function MultiValueRemove(props) {
|
|
2297
2274
|
return /*#__PURE__*/jsx(components.MultiValueRemove, _objectSpread$m(_objectSpread$m({}, props), {}, {
|
|
2298
2275
|
innerProps: _objectSpread$m(_objectSpread$m({}, props.innerProps), {}, _defineProperty({}, "data-testid", "".concat(dasherize(props.data.label), "-remove-icon"))),
|
|
2299
|
-
children: /*#__PURE__*/jsx(
|
|
2276
|
+
children: /*#__PURE__*/jsx(X, {
|
|
2300
2277
|
size: 16
|
|
2301
2278
|
})
|
|
2302
2279
|
}));
|
|
@@ -2313,7 +2290,7 @@ var ValueContainer = function ValueContainer(_ref) {
|
|
|
2313
2290
|
var value = getValue();
|
|
2314
2291
|
var _children = _toArray(children),
|
|
2315
2292
|
firstChild = _children[0],
|
|
2316
|
-
rest = _children.slice(1);
|
|
2293
|
+
rest = _arrayLikeToArray(_children).slice(1);
|
|
2317
2294
|
var shouldCollapse = !isFocused && value.length > visiblePhoneNumbersCount;
|
|
2318
2295
|
return /*#__PURE__*/jsxs(components.ValueContainer, _objectSpread$m(_objectSpread$m({}, props), {}, {
|
|
2319
2296
|
innerProps: _objectSpread$m(_objectSpread$m({}, props.innerProps), {}, _defineProperty({}, "data-testid", "multi-phone-number-input-container")),
|
|
@@ -2328,7 +2305,7 @@ var ValueContainer = function ValueContainer(_ref) {
|
|
|
2328
2305
|
var ClearIndicator = function ClearIndicator(props) {
|
|
2329
2306
|
return /*#__PURE__*/jsx(components.ClearIndicator, _objectSpread$m(_objectSpread$m({}, props), {}, {
|
|
2330
2307
|
innerProps: _objectSpread$m(_objectSpread$m({}, props.innerProps), {}, _defineProperty({}, "data-testid", "clear-all-button")),
|
|
2331
|
-
children: /*#__PURE__*/jsx(
|
|
2308
|
+
children: /*#__PURE__*/jsx(X, {
|
|
2332
2309
|
className: "cursor-pointer",
|
|
2333
2310
|
size: 16
|
|
2334
2311
|
})
|
|
@@ -2453,15 +2430,15 @@ var MultiPhoneNumberInput = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
|
2453
2430
|
ref: ref,
|
|
2454
2431
|
value: value
|
|
2455
2432
|
}, otherProps))), !!error && /*#__PURE__*/jsxs("p", {
|
|
2456
|
-
className: "
|
|
2433
|
+
className: "text-destructive text-xs",
|
|
2457
2434
|
"data-testid": "".concat(dasherize(label), "-input-error"),
|
|
2458
2435
|
children: [formatErrorMessage(error), isFilterPhoneNumbersLinkVisible && /*#__PURE__*/jsxs("span", {
|
|
2459
|
-
className: "
|
|
2436
|
+
className: "font-semibold cursor-pointer",
|
|
2460
2437
|
onClick: handleFilterPhoneNumbers,
|
|
2461
2438
|
children: [ERROR_MESSAGE_DELIMITER, t("neetoRules.messages.removeInvalidPhoneNumbers")]
|
|
2462
2439
|
})]
|
|
2463
2440
|
}), /*#__PURE__*/jsx("p", {
|
|
2464
|
-
className: "
|
|
2441
|
+
className: "text-muted-foreground text-xs",
|
|
2465
2442
|
"data-testid": "".concat(dasherize(label), "-input-help"),
|
|
2466
2443
|
children: t("neetoRules.helpTexts.phoneNumber")
|
|
2467
2444
|
})]
|
|
@@ -2536,17 +2513,16 @@ var Target$8 = function Target(_ref) {
|
|
|
2536
2513
|
};
|
|
2537
2514
|
return /*#__PURE__*/jsxs(Fragment, {
|
|
2538
2515
|
children: [/*#__PURE__*/jsx(Typography, {
|
|
2539
|
-
className: "neeto-ui-text-gray-700",
|
|
2540
2516
|
"data-testid": "sms-action-separator-text",
|
|
2541
|
-
variant: "
|
|
2517
|
+
variant: "body1",
|
|
2542
2518
|
children: separator
|
|
2543
2519
|
}), /*#__PURE__*/jsx(Button, {
|
|
2544
2520
|
"data-testid": "sms-action-button",
|
|
2545
2521
|
label: defaultLabel.toLowerCase(),
|
|
2546
2522
|
variant: "link",
|
|
2547
|
-
className: classNames("
|
|
2548
|
-
"
|
|
2549
|
-
"
|
|
2523
|
+
className: classNames("text-base text-foreground font-semibold underline", {
|
|
2524
|
+
"text-primary": isFieldActive,
|
|
2525
|
+
"text-destructive": isFieldInvalid && !isFieldActive
|
|
2550
2526
|
}),
|
|
2551
2527
|
onClick: handleOnClick
|
|
2552
2528
|
})]
|
|
@@ -2577,11 +2553,11 @@ var SmsFields = function SmsFields(_ref2) {
|
|
|
2577
2553
|
}),
|
|
2578
2554
|
initialFocusRef = _useActiveField2.ref,
|
|
2579
2555
|
setFieldActive = _useActiveField2.setFieldActive;
|
|
2580
|
-
var _useUtilityStore = useUtilityStore(function (store) {
|
|
2556
|
+
var _useUtilityStore = useUtilityStore(useShallow(function (store) {
|
|
2581
2557
|
return {
|
|
2582
2558
|
isSaveAsTemplateEnabled: store["isSaveAsTemplateEnabled"]
|
|
2583
2559
|
};
|
|
2584
|
-
}
|
|
2560
|
+
})),
|
|
2585
2561
|
isSaveAsTemplateEnabled = _useUtilityStore.isSaveAsTemplateEnabled;
|
|
2586
2562
|
var hasFieldChanged = useHasFieldChanged(name);
|
|
2587
2563
|
var _useFormikContext = useFormikContext(),
|
|
@@ -3019,17 +2995,18 @@ var ActionSubItem$1 = function ActionSubItem(_ref) {
|
|
|
3019
2995
|
var ActionSubItem = /*#__PURE__*/memo(ActionSubItem$1);
|
|
3020
2996
|
|
|
3021
2997
|
var ActionSubItemPanel = function ActionSubItemPanel() {
|
|
2998
|
+
var _selectedField$label;
|
|
3022
2999
|
var _useTranslation = useTranslation(),
|
|
3023
3000
|
t = _useTranslation.t;
|
|
3024
|
-
var _useUtilityStore = useUtilityStore(function (store) {
|
|
3001
|
+
var _useUtilityStore = useUtilityStore(useShallow(function (store) {
|
|
3025
3002
|
return {
|
|
3026
3003
|
setPanelState: store["setPanelState"],
|
|
3027
3004
|
resetPanelState: store["resetPanelState"]
|
|
3028
3005
|
};
|
|
3029
|
-
}
|
|
3006
|
+
})),
|
|
3030
3007
|
setPanelState = _useUtilityStore.setPanelState,
|
|
3031
3008
|
resetPanelState = _useUtilityStore.resetPanelState;
|
|
3032
|
-
var _useUtilityStore2 = useUtilityStore(function (store) {
|
|
3009
|
+
var _useUtilityStore2 = useUtilityStore(useShallow(function (store) {
|
|
3033
3010
|
var _store$panelState, _store$panelState2, _store$panelState3, _store$panelState4, _store$panelState5, _store$panelState6, _store$panelState7;
|
|
3034
3011
|
return {
|
|
3035
3012
|
name: (_store$panelState = store["panelState"]) === null || _store$panelState === void 0 || (_store$panelState = _store$panelState["data"]) === null || _store$panelState === void 0 ? void 0 : _store$panelState["name"],
|
|
@@ -3040,7 +3017,7 @@ var ActionSubItemPanel = function ActionSubItemPanel() {
|
|
|
3040
3017
|
errorMessage: (_store$panelState6 = store["panelState"]) === null || _store$panelState6 === void 0 || (_store$panelState6 = _store$panelState6["data"]) === null || _store$panelState6 === void 0 ? void 0 : _store$panelState6["errorMessage"],
|
|
3041
3018
|
handleSlackChannelRefresh: (_store$panelState7 = store["panelState"]) === null || _store$panelState7 === void 0 || (_store$panelState7 = _store$panelState7["data"]) === null || _store$panelState7 === void 0 ? void 0 : _store$panelState7["handleSlackChannelRefresh"]
|
|
3042
3019
|
};
|
|
3043
|
-
}
|
|
3020
|
+
})),
|
|
3044
3021
|
name = _useUtilityStore2.name,
|
|
3045
3022
|
index = _useUtilityStore2.index,
|
|
3046
3023
|
action = _useUtilityStore2.action,
|
|
@@ -3058,7 +3035,7 @@ var ActionSubItemPanel = function ActionSubItemPanel() {
|
|
|
3058
3035
|
var andText = t("neetoRules.common.and", {
|
|
3059
3036
|
what: thenText
|
|
3060
3037
|
});
|
|
3061
|
-
var selectedFieldLabel = selectedField === null || selectedField === void 0 ? void 0 :
|
|
3038
|
+
var selectedFieldLabel = selectedField === null || selectedField === void 0 || (_selectedField$label = selectedField.label) === null || _selectedField$label === void 0 ? void 0 : _selectedField$label.toLowerCase();
|
|
3062
3039
|
var header = index ? "".concat(andText, " ").concat(selectedFieldLabel, "...") : "".concat(thenText, " ").concat(selectedFieldLabel, "...");
|
|
3063
3040
|
var ActionChildren = action.children;
|
|
3064
3041
|
var handleContinue = function handleContinue() {
|
|
@@ -3076,7 +3053,7 @@ var ActionSubItemPanel = function ActionSubItemPanel() {
|
|
|
3076
3053
|
children: [/*#__PURE__*/jsx(Button, {
|
|
3077
3054
|
className: "shrink-0 rtl:rotate-180",
|
|
3078
3055
|
"data-testid": "back-button",
|
|
3079
|
-
icon:
|
|
3056
|
+
icon: ChevronLeft,
|
|
3080
3057
|
size: "default",
|
|
3081
3058
|
variant: "ghost",
|
|
3082
3059
|
tooltipProps: {
|
|
@@ -3094,12 +3071,12 @@ var ActionSubItemPanel = function ActionSubItemPanel() {
|
|
|
3094
3071
|
}
|
|
3095
3072
|
}), /*#__PURE__*/jsx(Typography, {
|
|
3096
3073
|
"data-testid": "action-sub-item-title",
|
|
3097
|
-
variant: "
|
|
3074
|
+
variant: "h5",
|
|
3098
3075
|
children: header
|
|
3099
3076
|
})]
|
|
3100
3077
|
}), /*#__PURE__*/jsx(Typography, {
|
|
3101
3078
|
"data-testid": "action-sub-item-description",
|
|
3102
|
-
variant: "
|
|
3079
|
+
variant: "body1",
|
|
3103
3080
|
children: t("neetoRules.form.addActionSubItemDescription")
|
|
3104
3081
|
})]
|
|
3105
3082
|
})
|
|
@@ -3165,9 +3142,9 @@ var Target$7 = function Target(_ref) {
|
|
|
3165
3142
|
label: label,
|
|
3166
3143
|
"data-testid": "condition-value-select-date-button",
|
|
3167
3144
|
variant: "link",
|
|
3168
|
-
className: classNames("
|
|
3169
|
-
"
|
|
3170
|
-
"
|
|
3145
|
+
className: classNames("text-base text-foreground font-semibold underline", {
|
|
3146
|
+
"text-primary": isFieldActive,
|
|
3147
|
+
"text-destructive": isFieldInvalid && !isFieldActive
|
|
3171
3148
|
}),
|
|
3172
3149
|
onClick: function onClick() {
|
|
3173
3150
|
_onClick();
|
|
@@ -3261,9 +3238,9 @@ var Target$6 = function Target(_ref) {
|
|
|
3261
3238
|
label: label,
|
|
3262
3239
|
"data-testid": "condition-value-input-button",
|
|
3263
3240
|
variant: "link",
|
|
3264
|
-
className: classNames("
|
|
3265
|
-
"
|
|
3266
|
-
"
|
|
3241
|
+
className: classNames("text-base text-foreground font-semibold underline", {
|
|
3242
|
+
"text-primary": isFieldActive,
|
|
3243
|
+
"text-destructive": isFieldInvalid && !isFieldActive
|
|
3267
3244
|
}),
|
|
3268
3245
|
onClick: function onClick() {
|
|
3269
3246
|
_onClick();
|
|
@@ -3332,16 +3309,15 @@ var Target$5 = function Target(_ref) {
|
|
|
3332
3309
|
var _option$label;
|
|
3333
3310
|
return /*#__PURE__*/jsxs(Fragment$1, {
|
|
3334
3311
|
children: [!!idx && /*#__PURE__*/jsx(Typography, {
|
|
3335
|
-
|
|
3336
|
-
variant: "h5",
|
|
3312
|
+
variant: "body1",
|
|
3337
3313
|
children: t("neetoRules.common.or")
|
|
3338
3314
|
}), /*#__PURE__*/jsx(Button, {
|
|
3339
3315
|
"data-testid": "condition-value-multi-select-field",
|
|
3340
3316
|
label: option === null || option === void 0 || (_option$label = option.label) === null || _option$label === void 0 ? void 0 : _option$label.toLowerCase(),
|
|
3341
3317
|
variant: "link",
|
|
3342
|
-
className: classNames("
|
|
3343
|
-
"
|
|
3344
|
-
"
|
|
3318
|
+
className: classNames("text-base text-foreground font-semibold underline", {
|
|
3319
|
+
"text-primary": isFieldActive,
|
|
3320
|
+
"text-destructive": isFieldInvalid && !isFieldActive
|
|
3345
3321
|
}),
|
|
3346
3322
|
onClick: function onClick() {
|
|
3347
3323
|
_onClick();
|
|
@@ -3354,9 +3330,9 @@ var Target$5 = function Target(_ref) {
|
|
|
3354
3330
|
"data-testid": "condition-value-multi-select-field",
|
|
3355
3331
|
label: defaultLabel,
|
|
3356
3332
|
variant: "link",
|
|
3357
|
-
className: classNames("
|
|
3358
|
-
"
|
|
3359
|
-
"
|
|
3333
|
+
className: classNames("text-base text-foreground font-semibold underline", {
|
|
3334
|
+
"text-primary": isFieldActive,
|
|
3335
|
+
"text-destructive": isFieldInvalid && !isFieldActive
|
|
3360
3336
|
}),
|
|
3361
3337
|
onClick: function onClick() {
|
|
3362
3338
|
_onClick === null || _onClick === void 0 || _onClick();
|
|
@@ -3423,16 +3399,15 @@ var Target$4 = function Target(_ref) {
|
|
|
3423
3399
|
var _option$label;
|
|
3424
3400
|
return /*#__PURE__*/jsxs(Fragment$1, {
|
|
3425
3401
|
children: [!!idx && /*#__PURE__*/jsx(Typography, {
|
|
3426
|
-
|
|
3427
|
-
variant: "h5",
|
|
3402
|
+
variant: "body1",
|
|
3428
3403
|
children: t("neetoRules.common.or")
|
|
3429
3404
|
}), /*#__PURE__*/jsx(Button, {
|
|
3430
3405
|
"data-testid": "condition-value-multi-select-field",
|
|
3431
3406
|
label: option === null || option === void 0 || (_option$label = option.label) === null || _option$label === void 0 ? void 0 : _option$label.toLowerCase(),
|
|
3432
3407
|
variant: "link",
|
|
3433
|
-
className: classNames("
|
|
3434
|
-
"
|
|
3435
|
-
"
|
|
3408
|
+
className: classNames("text-base text-foreground font-semibold underline", {
|
|
3409
|
+
"text-primary": isFieldActive,
|
|
3410
|
+
"text-destructive": isFieldInvalid && !isFieldActive
|
|
3436
3411
|
}),
|
|
3437
3412
|
onClick: function onClick() {
|
|
3438
3413
|
_onClick();
|
|
@@ -3445,9 +3420,9 @@ var Target$4 = function Target(_ref) {
|
|
|
3445
3420
|
"data-testid": "condition-value-multi-select-field",
|
|
3446
3421
|
label: defaultLabel,
|
|
3447
3422
|
variant: "link",
|
|
3448
|
-
className: classNames("
|
|
3449
|
-
"
|
|
3450
|
-
"
|
|
3423
|
+
className: classNames("text-base text-foreground font-semibold underline", {
|
|
3424
|
+
"text-primary": isFieldActive,
|
|
3425
|
+
"text-destructive": isFieldInvalid && !isFieldActive
|
|
3451
3426
|
}),
|
|
3452
3427
|
onClick: function onClick() {
|
|
3453
3428
|
_onClick === null || _onClick === void 0 || _onClick();
|
|
@@ -3577,16 +3552,15 @@ var Target$3 = function Target(_ref) {
|
|
|
3577
3552
|
var _option$label;
|
|
3578
3553
|
return /*#__PURE__*/jsxs(Fragment$1, {
|
|
3579
3554
|
children: [!!idx && /*#__PURE__*/jsx(Typography, {
|
|
3580
|
-
|
|
3581
|
-
variant: "h5",
|
|
3555
|
+
variant: "body1",
|
|
3582
3556
|
children: t("neetoRules.common.or")
|
|
3583
3557
|
}), /*#__PURE__*/jsx(Button, {
|
|
3584
3558
|
"data-testid": "condition-value-multi-select-field",
|
|
3585
3559
|
label: option === null || option === void 0 || (_option$label = option.label) === null || _option$label === void 0 ? void 0 : _option$label.toLowerCase(),
|
|
3586
3560
|
variant: "link",
|
|
3587
|
-
className: classNames("
|
|
3588
|
-
"
|
|
3589
|
-
"
|
|
3561
|
+
className: classNames("text-base text-foreground font-semibold underline", {
|
|
3562
|
+
"text-primary": isFieldActive,
|
|
3563
|
+
"text-destructive": isFieldInvalid && !isFieldActive
|
|
3590
3564
|
}),
|
|
3591
3565
|
onClick: function onClick() {
|
|
3592
3566
|
_onClick();
|
|
@@ -3599,9 +3573,9 @@ var Target$3 = function Target(_ref) {
|
|
|
3599
3573
|
"data-testid": "condition-value-multi-select-field",
|
|
3600
3574
|
label: defaultLabel,
|
|
3601
3575
|
variant: "link",
|
|
3602
|
-
className: classNames("
|
|
3603
|
-
"
|
|
3604
|
-
"
|
|
3576
|
+
className: classNames("text-base text-foreground font-semibold underline", {
|
|
3577
|
+
"text-primary": isFieldActive,
|
|
3578
|
+
"text-destructive": isFieldInvalid && !isFieldActive
|
|
3605
3579
|
}),
|
|
3606
3580
|
onClick: function onClick() {
|
|
3607
3581
|
_onClick === null || _onClick === void 0 || _onClick();
|
|
@@ -3673,9 +3647,9 @@ var Target$2 = function Target(_ref) {
|
|
|
3673
3647
|
"data-testid": "condition-value-dropdown-button",
|
|
3674
3648
|
label: selectedOption === null || selectedOption === void 0 || (_selectedOption$label = selectedOption.label) === null || _selectedOption$label === void 0 ? void 0 : _selectedOption$label.toLowerCase(),
|
|
3675
3649
|
variant: "link",
|
|
3676
|
-
className: classNames("
|
|
3677
|
-
"
|
|
3678
|
-
"
|
|
3650
|
+
className: classNames("text-base text-foreground font-semibold underline", {
|
|
3651
|
+
"text-primary": isFieldActive,
|
|
3652
|
+
"text-destructive": isFieldInvalid && !isFieldActive
|
|
3679
3653
|
}),
|
|
3680
3654
|
onClick: function onClick() {
|
|
3681
3655
|
_onClick();
|
|
@@ -3799,9 +3773,9 @@ var Target$1 = function Target(_ref) {
|
|
|
3799
3773
|
"data-testid": dataTestid,
|
|
3800
3774
|
label: selectedOption === null || selectedOption === void 0 || (_selectedOption$label = selectedOption.label) === null || _selectedOption$label === void 0 ? void 0 : _selectedOption$label.toLowerCase(),
|
|
3801
3775
|
variant: "link",
|
|
3802
|
-
className: classNames("
|
|
3803
|
-
"
|
|
3804
|
-
"
|
|
3776
|
+
className: classNames("text-base text-foreground font-semibold underline", {
|
|
3777
|
+
"text-primary": isFieldActive,
|
|
3778
|
+
"text-destructive": isFieldInvalid && !isFieldActive
|
|
3805
3779
|
}),
|
|
3806
3780
|
onClick: function onClick() {
|
|
3807
3781
|
_onClick();
|
|
@@ -3876,9 +3850,9 @@ var Target = function Target(_ref) {
|
|
|
3876
3850
|
label: label,
|
|
3877
3851
|
"data-testid": "condition-value-select-time-button",
|
|
3878
3852
|
variant: "link",
|
|
3879
|
-
className: classNames("
|
|
3880
|
-
"
|
|
3881
|
-
"
|
|
3853
|
+
className: classNames("text-base text-foreground font-semibold underline", {
|
|
3854
|
+
"text-primary": isFieldActive,
|
|
3855
|
+
"text-destructive": isFieldInvalid && !isFieldActive
|
|
3882
3856
|
}),
|
|
3883
3857
|
onClick: function onClick() {
|
|
3884
3858
|
_onClick();
|
|
@@ -3949,13 +3923,13 @@ var FieldPanel = function FieldPanel() {
|
|
|
3949
3923
|
var _findBy;
|
|
3950
3924
|
var _useTranslation = useTranslation(),
|
|
3951
3925
|
t = _useTranslation.t;
|
|
3952
|
-
var _useUtilityStore = useUtilityStore(function (store) {
|
|
3926
|
+
var _useUtilityStore = useUtilityStore(useShallow(function (store) {
|
|
3953
3927
|
return {
|
|
3954
3928
|
setPanelState: store["setPanelState"]
|
|
3955
3929
|
};
|
|
3956
|
-
}
|
|
3930
|
+
})),
|
|
3957
3931
|
setPanelState = _useUtilityStore.setPanelState;
|
|
3958
|
-
var _useUtilityStore2 = useUtilityStore(function (store) {
|
|
3932
|
+
var _useUtilityStore2 = useUtilityStore(useShallow(function (store) {
|
|
3959
3933
|
var _store$panelState, _store$panelState2, _store$panelState3, _store$panelState4, _store$panelState5;
|
|
3960
3934
|
return {
|
|
3961
3935
|
index: (_store$panelState = store["panelState"]) === null || _store$panelState === void 0 || (_store$panelState = _store$panelState["data"]) === null || _store$panelState === void 0 ? void 0 : _store$panelState["index"],
|
|
@@ -3964,7 +3938,7 @@ var FieldPanel = function FieldPanel() {
|
|
|
3964
3938
|
conditionOptions: (_store$panelState4 = store["panelState"]) === null || _store$panelState4 === void 0 || (_store$panelState4 = _store$panelState4["data"]) === null || _store$panelState4 === void 0 ? void 0 : _store$panelState4["conditionOptions"],
|
|
3965
3939
|
isWithEvents: (_store$panelState5 = store["panelState"]) === null || _store$panelState5 === void 0 || (_store$panelState5 = _store$panelState5["data"]) === null || _store$panelState5 === void 0 ? void 0 : _store$panelState5["isWithEvents"]
|
|
3966
3940
|
};
|
|
3967
|
-
}
|
|
3941
|
+
})),
|
|
3968
3942
|
index = _useUtilityStore2.index,
|
|
3969
3943
|
name = _useUtilityStore2.name,
|
|
3970
3944
|
handleFieldChange = _useUtilityStore2.handleFieldChange,
|
|
@@ -3996,11 +3970,11 @@ var FieldPanel = function FieldPanel() {
|
|
|
3996
3970
|
className: "flex flex-col space-y-2",
|
|
3997
3971
|
children: [/*#__PURE__*/jsxs(Typography, {
|
|
3998
3972
|
"data-testid": "condition-title",
|
|
3999
|
-
variant: "
|
|
3973
|
+
variant: "h5",
|
|
4000
3974
|
children: [index ? logicalOperatorLabel : conditionLabel, "..."]
|
|
4001
3975
|
}), /*#__PURE__*/jsx(Typography, {
|
|
4002
3976
|
"data-testid": "condition-description",
|
|
4003
|
-
variant: "
|
|
3977
|
+
variant: "body1",
|
|
4004
3978
|
children: t("neetoRules.form.addConditionDescription")
|
|
4005
3979
|
})]
|
|
4006
3980
|
})
|
|
@@ -4152,15 +4126,15 @@ var VerbAndValuePanel = function VerbAndValuePanel() {
|
|
|
4152
4126
|
var _findBy, _findBy2;
|
|
4153
4127
|
var _useTranslation = useTranslation(),
|
|
4154
4128
|
t = _useTranslation.t;
|
|
4155
|
-
var _useUtilityStore = useUtilityStore(function (store) {
|
|
4129
|
+
var _useUtilityStore = useUtilityStore(useShallow(function (store) {
|
|
4156
4130
|
return {
|
|
4157
4131
|
setPanelState: store["setPanelState"],
|
|
4158
4132
|
resetPanelState: store["resetPanelState"]
|
|
4159
4133
|
};
|
|
4160
|
-
}
|
|
4134
|
+
})),
|
|
4161
4135
|
setPanelState = _useUtilityStore.setPanelState,
|
|
4162
4136
|
resetPanelState = _useUtilityStore.resetPanelState;
|
|
4163
|
-
var _useUtilityStore2 = useUtilityStore(function (store) {
|
|
4137
|
+
var _useUtilityStore2 = useUtilityStore(useShallow(function (store) {
|
|
4164
4138
|
var _store$panelState, _store$panelState2, _store$panelState3, _store$panelState4, _store$panelState5, _store$panelState6, _store$panelState7, _store$panelState8, _store$panelState9;
|
|
4165
4139
|
return {
|
|
4166
4140
|
index: (_store$panelState = store["panelState"]) === null || _store$panelState === void 0 || (_store$panelState = _store$panelState["data"]) === null || _store$panelState === void 0 ? void 0 : _store$panelState["index"],
|
|
@@ -4173,7 +4147,7 @@ var VerbAndValuePanel = function VerbAndValuePanel() {
|
|
|
4173
4147
|
verbOptions: (_store$panelState8 = store["panelState"]) === null || _store$panelState8 === void 0 || (_store$panelState8 = _store$panelState8["data"]) === null || _store$panelState8 === void 0 ? void 0 : _store$panelState8["verbOptions"],
|
|
4174
4148
|
isWithEvents: (_store$panelState9 = store["panelState"]) === null || _store$panelState9 === void 0 || (_store$panelState9 = _store$panelState9["data"]) === null || _store$panelState9 === void 0 ? void 0 : _store$panelState9["isWithEvents"]
|
|
4175
4149
|
};
|
|
4176
|
-
}
|
|
4150
|
+
})),
|
|
4177
4151
|
index = _useUtilityStore2.index,
|
|
4178
4152
|
name = _useUtilityStore2.name,
|
|
4179
4153
|
selectedField = _useUtilityStore2.selectedField,
|
|
@@ -4202,7 +4176,7 @@ var VerbAndValuePanel = function VerbAndValuePanel() {
|
|
|
4202
4176
|
setVerbTouched = _useField8[2].setTouched;
|
|
4203
4177
|
var fieldLabel = (_findBy = findBy({
|
|
4204
4178
|
value: field.value
|
|
4205
|
-
}, conditionOptions)) === null || _findBy === void 0 ? void 0 : _findBy.
|
|
4179
|
+
}, conditionOptions)) === null || _findBy === void 0 || (_findBy = _findBy.label) === null || _findBy === void 0 ? void 0 : _findBy.toLowerCase();
|
|
4206
4180
|
var conditionLabel = isWithEvents ? t("neetoRules.common.when") : t("neetoRules.common.if");
|
|
4207
4181
|
var logicalOperatorLabel = (_findBy2 = findBy({
|
|
4208
4182
|
value: logicalOperator.value
|
|
@@ -4222,7 +4196,7 @@ var VerbAndValuePanel = function VerbAndValuePanel() {
|
|
|
4222
4196
|
className: "flex items-center space-x-2",
|
|
4223
4197
|
children: [/*#__PURE__*/jsx(Button, {
|
|
4224
4198
|
className: "shrink-0 rtl:rotate-180",
|
|
4225
|
-
icon:
|
|
4199
|
+
icon: ChevronLeft,
|
|
4226
4200
|
size: "default",
|
|
4227
4201
|
variant: "ghost",
|
|
4228
4202
|
tooltipProps: {
|
|
@@ -4239,12 +4213,12 @@ var VerbAndValuePanel = function VerbAndValuePanel() {
|
|
|
4239
4213
|
}
|
|
4240
4214
|
}), /*#__PURE__*/jsxs(Typography, {
|
|
4241
4215
|
"data-testid": "condition-verb-and-value-title",
|
|
4242
|
-
variant: "
|
|
4216
|
+
variant: "h5",
|
|
4243
4217
|
children: [index ? logicalOperatorLabel : conditionLabel, " ", fieldLabel, "..."]
|
|
4244
4218
|
})]
|
|
4245
4219
|
}), /*#__PURE__*/jsx(Typography, {
|
|
4246
4220
|
"data-testid": "condition-verb-and-value-description",
|
|
4247
|
-
variant: "
|
|
4221
|
+
variant: "body1",
|
|
4248
4222
|
children: t("neetoRules.form.addConditionVerbAndValueDescription")
|
|
4249
4223
|
})]
|
|
4250
4224
|
})
|
|
@@ -4290,18 +4264,18 @@ function _objectSpread$g(e) { for (var r = 1; r < arguments.length; r++) { var t
|
|
|
4290
4264
|
var DelayPanel = function DelayPanel() {
|
|
4291
4265
|
var _useTranslation = useTranslation(),
|
|
4292
4266
|
t = _useTranslation.t;
|
|
4293
|
-
var _useUtilityStore = useUtilityStore(function (store) {
|
|
4267
|
+
var _useUtilityStore = useUtilityStore(useShallow(function (store) {
|
|
4294
4268
|
return {
|
|
4295
4269
|
resetPanelState: store["resetPanelState"]
|
|
4296
4270
|
};
|
|
4297
|
-
}
|
|
4271
|
+
})),
|
|
4298
4272
|
resetPanelState = _useUtilityStore.resetPanelState;
|
|
4299
|
-
var _useUtilityStore2 = useUtilityStore(function (store) {
|
|
4273
|
+
var _useUtilityStore2 = useUtilityStore(useShallow(function (store) {
|
|
4300
4274
|
var _store$panelState;
|
|
4301
4275
|
return {
|
|
4302
4276
|
name: (_store$panelState = store["panelState"]) === null || _store$panelState === void 0 || (_store$panelState = _store$panelState["data"]) === null || _store$panelState === void 0 ? void 0 : _store$panelState["name"]
|
|
4303
4277
|
};
|
|
4304
|
-
}
|
|
4278
|
+
})),
|
|
4305
4279
|
name = _useUtilityStore2.name;
|
|
4306
4280
|
var _useFormikContext = useFormikContext(),
|
|
4307
4281
|
setFieldTouched = _useFormikContext.setFieldTouched;
|
|
@@ -4327,10 +4301,10 @@ var DelayPanel = function DelayPanel() {
|
|
|
4327
4301
|
children: /*#__PURE__*/jsxs("div", {
|
|
4328
4302
|
className: "flex flex-col space-y-2",
|
|
4329
4303
|
children: [/*#__PURE__*/jsx(Typography, {
|
|
4330
|
-
variant: "
|
|
4304
|
+
variant: "h5",
|
|
4331
4305
|
children: t("neetoRules.common.addDelay")
|
|
4332
4306
|
}), /*#__PURE__*/jsx(Typography, {
|
|
4333
|
-
variant: "
|
|
4307
|
+
variant: "body1",
|
|
4334
4308
|
children: t("neetoRules.helpText.addDelay")
|
|
4335
4309
|
})]
|
|
4336
4310
|
})
|
|
@@ -4384,6 +4358,8 @@ var getSearchedOptions = function getSearchedOptions(dropdownOptions, searchTerm
|
|
|
4384
4358
|
});
|
|
4385
4359
|
};
|
|
4386
4360
|
|
|
4361
|
+
function _regenerator() { /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/babel/babel/blob/main/packages/babel-helpers/LICENSE */ var e, t, r = "function" == typeof Symbol ? Symbol : {}, n = r.iterator || "@@iterator", o = r.toStringTag || "@@toStringTag"; function i(r, n, o, i) { var c = n && n.prototype instanceof Generator ? n : Generator, u = Object.create(c.prototype); return _regeneratorDefine2(u, "_invoke", function (r, n, o) { var i, c, u, f = 0, p = o || [], y = false, G = { p: 0, n: 0, v: e, a: d, f: d.bind(e, 4), d: function d(t, r) { return i = t, c = 0, u = e, G.n = r, a; } }; function d(r, n) { for (c = r, u = n, t = 0; !y && f && !o && t < p.length; t++) { var o, i = p[t], d = G.p, l = i[2]; r > 3 ? (o = l === n) && (u = i[(c = i[4]) ? 5 : (c = 3, 3)], i[4] = i[5] = e) : i[0] <= d && ((o = r < 2 && d < i[1]) ? (c = 0, G.v = n, G.n = i[1]) : d < l && (o = r < 3 || i[0] > n || n > l) && (i[4] = r, i[5] = n, G.n = l, c = 0)); } if (o || r > 1) return a; throw y = true, n; } return function (o, p, l) { if (f > 1) throw TypeError("Generator is already running"); for (y && 1 === p && d(p, l), c = p, u = l; (t = c < 2 ? e : u) || !y;) { i || (c ? c < 3 ? (c > 1 && (G.n = -1), d(c, u)) : G.n = u : G.v = u); try { if (f = 2, i) { if (c || (o = "next"), t = i[o]) { if (!(t = t.call(i, u))) throw TypeError("iterator result is not an object"); if (!t.done) return t; u = t.value, c < 2 && (c = 0); } else 1 === c && (t = i["return"]) && t.call(i), c < 2 && (u = TypeError("The iterator does not provide a '" + o + "' method"), c = 1); i = e; } else if ((t = (y = G.n < 0) ? u : r.call(n, G)) !== a) break; } catch (t) { i = e, c = 1, u = t; } finally { f = 1; } } return { value: t, done: y }; }; }(r, o, i), true), u; } var a = {}; function Generator() {} function GeneratorFunction() {} function GeneratorFunctionPrototype() {} t = Object.getPrototypeOf; var c = [][n] ? t(t([][n]())) : (_regeneratorDefine2(t = {}, n, function () { return this; }), t), u = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(c); function f(e) { return Object.setPrototypeOf ? Object.setPrototypeOf(e, GeneratorFunctionPrototype) : (e.__proto__ = GeneratorFunctionPrototype, _regeneratorDefine2(e, o, "GeneratorFunction")), e.prototype = Object.create(u), e; } return GeneratorFunction.prototype = GeneratorFunctionPrototype, _regeneratorDefine2(u, "constructor", GeneratorFunctionPrototype), _regeneratorDefine2(GeneratorFunctionPrototype, "constructor", GeneratorFunction), GeneratorFunction.displayName = "GeneratorFunction", _regeneratorDefine2(GeneratorFunctionPrototype, o, "GeneratorFunction"), _regeneratorDefine2(u), _regeneratorDefine2(u, o, "Generator"), _regeneratorDefine2(u, n, function () { return this; }), _regeneratorDefine2(u, "toString", function () { return "[object Generator]"; }), (_regenerator = function _regenerator() { return { w: i, m: f }; })(); }
|
|
4362
|
+
function _regeneratorDefine2(e, r, n, t) { var i = Object.defineProperty; try { i({}, "", {}); } catch (e) { i = 0; } _regeneratorDefine2 = function _regeneratorDefine(e, r, n, t) { function o(r, n) { _regeneratorDefine2(e, r, function (e) { return this._invoke(r, n, e); }); } r ? i ? i(e, r, { value: n, enumerable: !t, configurable: !t, writable: !t }) : e[r] = n : (o("next", 0), o("throw", 1), o("return", 2)); }, _regeneratorDefine2(e, r, n, t); }
|
|
4387
4363
|
function ownKeys$f(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; }
|
|
4388
4364
|
function _objectSpread$f(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$f(Object(t), true).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$f(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
4389
4365
|
var EventsPanel = function EventsPanel() {
|
|
@@ -4393,15 +4369,15 @@ var EventsPanel = function EventsPanel() {
|
|
|
4393
4369
|
_useState2 = _slicedToArray(_useState, 2),
|
|
4394
4370
|
searchTerm = _useState2[0],
|
|
4395
4371
|
setSearchTerm = _useState2[1];
|
|
4396
|
-
var _useUtilityStore = useUtilityStore(function (store) {
|
|
4372
|
+
var _useUtilityStore = useUtilityStore(useShallow(function (store) {
|
|
4397
4373
|
return {
|
|
4398
4374
|
setPanelState: store["setPanelState"],
|
|
4399
4375
|
resetPanelState: store["resetPanelState"]
|
|
4400
4376
|
};
|
|
4401
|
-
}
|
|
4377
|
+
})),
|
|
4402
4378
|
setPanelState = _useUtilityStore.setPanelState,
|
|
4403
4379
|
resetPanelState = _useUtilityStore.resetPanelState;
|
|
4404
|
-
var _useUtilityStore2 = useUtilityStore(function (store) {
|
|
4380
|
+
var _useUtilityStore2 = useUtilityStore(useShallow(function (store) {
|
|
4405
4381
|
var _store$panelState, _store$panelState2, _store$panelState3, _store$panelState4, _store$panelState5, _store$panelState6, _store$panelState7;
|
|
4406
4382
|
return {
|
|
4407
4383
|
name: (_store$panelState = store["panelState"]) === null || _store$panelState === void 0 || (_store$panelState = _store$panelState["data"]) === null || _store$panelState === void 0 ? void 0 : _store$panelState["name"],
|
|
@@ -4412,7 +4388,7 @@ var EventsPanel = function EventsPanel() {
|
|
|
4412
4388
|
singleSelect: (_store$panelState6 = store["panelState"]) === null || _store$panelState6 === void 0 || (_store$panelState6 = _store$panelState6["data"]) === null || _store$panelState6 === void 0 ? void 0 : _store$panelState6["singleSelect"],
|
|
4413
4389
|
hidePerformer: (_store$panelState7 = store["panelState"]) === null || _store$panelState7 === void 0 || (_store$panelState7 = _store$panelState7["data"]) === null || _store$panelState7 === void 0 ? void 0 : _store$panelState7["hidePerformer"]
|
|
4414
4390
|
};
|
|
4415
|
-
}
|
|
4391
|
+
})),
|
|
4416
4392
|
name = _useUtilityStore2.name,
|
|
4417
4393
|
data = _useUtilityStore2.data,
|
|
4418
4394
|
performerName = _useUtilityStore2.performerName,
|
|
@@ -4443,11 +4419,11 @@ var EventsPanel = function EventsPanel() {
|
|
|
4443
4419
|
var searchedOptions = getSearchedOptions(dropdownOptions, searchTerm);
|
|
4444
4420
|
var isSearchable = dropdownOptions.length > MAXIMUM_OPTION_LENGTH;
|
|
4445
4421
|
var handleDefaultData = /*#__PURE__*/function () {
|
|
4446
|
-
var _ref = _asyncToGenerator(/*#__PURE__*/
|
|
4422
|
+
var _ref = _asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee() {
|
|
4447
4423
|
var _values$name;
|
|
4448
4424
|
var deletedEvents;
|
|
4449
|
-
return
|
|
4450
|
-
while (1) switch (_context.
|
|
4425
|
+
return _regenerator().w(function (_context) {
|
|
4426
|
+
while (1) switch (_context.n) {
|
|
4451
4427
|
case 0:
|
|
4452
4428
|
deletedEvents = ((_values$name = values[name]) === null || _values$name === void 0 ? void 0 : _values$name.deleted) || [];
|
|
4453
4429
|
events.forEach(function (event) {
|
|
@@ -4459,23 +4435,22 @@ var EventsPanel = function EventsPanel() {
|
|
|
4459
4435
|
});
|
|
4460
4436
|
setFieldValue("".concat(name, ".deleted"), deletedEvents);
|
|
4461
4437
|
if (!isMenuDisabled) {
|
|
4462
|
-
_context.
|
|
4438
|
+
_context.n = 1;
|
|
4463
4439
|
break;
|
|
4464
4440
|
}
|
|
4465
4441
|
setFieldValue("".concat(name, ".value"), []);
|
|
4466
|
-
_context.
|
|
4442
|
+
_context.n = 3;
|
|
4467
4443
|
break;
|
|
4468
|
-
case
|
|
4469
|
-
_context.
|
|
4444
|
+
case 1:
|
|
4445
|
+
_context.n = 2;
|
|
4470
4446
|
return setFieldValue("".concat(name, ".value"), [{
|
|
4471
4447
|
name: defaultData.name
|
|
4472
4448
|
}]);
|
|
4473
|
-
case
|
|
4474
|
-
_context.
|
|
4449
|
+
case 2:
|
|
4450
|
+
_context.n = 3;
|
|
4475
4451
|
return setFieldValue("".concat(performerName, ".value"), defaultData === null || defaultData === void 0 ? void 0 : defaultData.performer);
|
|
4476
|
-
case
|
|
4477
|
-
|
|
4478
|
-
return _context.stop();
|
|
4452
|
+
case 3:
|
|
4453
|
+
return _context.a(2);
|
|
4479
4454
|
}
|
|
4480
4455
|
}, _callee);
|
|
4481
4456
|
}));
|
|
@@ -4581,11 +4556,11 @@ var EventsPanel = function EventsPanel() {
|
|
|
4581
4556
|
className: "flex flex-col space-y-2",
|
|
4582
4557
|
children: [/*#__PURE__*/jsxs(Typography, {
|
|
4583
4558
|
"data-testid": "event-title",
|
|
4584
|
-
variant: "
|
|
4559
|
+
variant: "h5",
|
|
4585
4560
|
children: [t("neetoRules.common.when"), "..."]
|
|
4586
4561
|
}), /*#__PURE__*/jsx(Typography, {
|
|
4587
4562
|
"data-testid": "event-description",
|
|
4588
|
-
variant: "
|
|
4563
|
+
variant: "body1",
|
|
4589
4564
|
children: t("neetoRules.form.addEventDescription")
|
|
4590
4565
|
})]
|
|
4591
4566
|
})
|
|
@@ -4642,7 +4617,7 @@ var EventsPanel = function EventsPanel() {
|
|
|
4642
4617
|
"data-testid": "no-options-menu-item",
|
|
4643
4618
|
children: t("neetoRules.common.noOptions")
|
|
4644
4619
|
}), error && touched && /*#__PURE__*/jsx("div", {
|
|
4645
|
-
className: "
|
|
4620
|
+
className: "text-destructive text-xs",
|
|
4646
4621
|
"data-testid": "event-field-input-error",
|
|
4647
4622
|
children: error
|
|
4648
4623
|
})]
|
|
@@ -4660,22 +4635,22 @@ var EventsPanel = function EventsPanel() {
|
|
|
4660
4635
|
var PerformerPanel = function PerformerPanel() {
|
|
4661
4636
|
var _useTranslation = useTranslation(),
|
|
4662
4637
|
t = _useTranslation.t;
|
|
4663
|
-
var _useUtilityStore = useUtilityStore(function (store) {
|
|
4638
|
+
var _useUtilityStore = useUtilityStore(useShallow(function (store) {
|
|
4664
4639
|
return {
|
|
4665
4640
|
setPanelState: store["setPanelState"],
|
|
4666
4641
|
resetPanelState: store["resetPanelState"]
|
|
4667
4642
|
};
|
|
4668
|
-
}
|
|
4643
|
+
})),
|
|
4669
4644
|
setPanelState = _useUtilityStore.setPanelState,
|
|
4670
4645
|
resetPanelState = _useUtilityStore.resetPanelState;
|
|
4671
|
-
var _useUtilityStore2 = useUtilityStore(function (store) {
|
|
4646
|
+
var _useUtilityStore2 = useUtilityStore(useShallow(function (store) {
|
|
4672
4647
|
var _store$panelState, _store$panelState2, _store$panelState3;
|
|
4673
4648
|
return {
|
|
4674
4649
|
data: (_store$panelState = store["panelState"]) === null || _store$panelState === void 0 || (_store$panelState = _store$panelState["data"]) === null || _store$panelState === void 0 ? void 0 : _store$panelState["data"],
|
|
4675
4650
|
performerName: (_store$panelState2 = store["panelState"]) === null || _store$panelState2 === void 0 || (_store$panelState2 = _store$panelState2["data"]) === null || _store$panelState2 === void 0 ? void 0 : _store$panelState2["performerName"],
|
|
4676
4651
|
isMenuDisabled: (_store$panelState3 = store["panelState"]) === null || _store$panelState3 === void 0 || (_store$panelState3 = _store$panelState3["data"]) === null || _store$panelState3 === void 0 ? void 0 : _store$panelState3["isMenuDisabled"]
|
|
4677
4652
|
};
|
|
4678
|
-
}
|
|
4653
|
+
})),
|
|
4679
4654
|
data = _useUtilityStore2.data,
|
|
4680
4655
|
performerName = _useUtilityStore2.performerName,
|
|
4681
4656
|
isMenuDisabled = _useUtilityStore2.isMenuDisabled;
|
|
@@ -4722,7 +4697,7 @@ var PerformerPanel = function PerformerPanel() {
|
|
|
4722
4697
|
children: [/*#__PURE__*/jsx(Button, {
|
|
4723
4698
|
className: "shrink-0 rtl:rotate-180",
|
|
4724
4699
|
"data-testid": "back-button",
|
|
4725
|
-
icon:
|
|
4700
|
+
icon: ChevronLeft,
|
|
4726
4701
|
size: "default",
|
|
4727
4702
|
variant: "ghost",
|
|
4728
4703
|
tooltipProps: {
|
|
@@ -4739,12 +4714,12 @@ var PerformerPanel = function PerformerPanel() {
|
|
|
4739
4714
|
}
|
|
4740
4715
|
}), /*#__PURE__*/jsxs(Typography, {
|
|
4741
4716
|
"data-testid": "performer-title",
|
|
4742
|
-
variant: "
|
|
4717
|
+
variant: "h5",
|
|
4743
4718
|
children: [t("neetoRules.form.actionTriggeredBy"), "..."]
|
|
4744
4719
|
})]
|
|
4745
4720
|
}), /*#__PURE__*/jsx(Typography, {
|
|
4746
4721
|
"data-testid": "performer-description",
|
|
4747
|
-
variant: "
|
|
4722
|
+
variant: "body1",
|
|
4748
4723
|
children: t("neetoRules.form.addPerformerDescription")
|
|
4749
4724
|
})]
|
|
4750
4725
|
})
|
|
@@ -5193,20 +5168,20 @@ var ActionItem$1 = function ActionItem(_ref) {
|
|
|
5193
5168
|
var _useActiveField = useActiveField(name),
|
|
5194
5169
|
isFieldActive = _useActiveField.isFieldActive,
|
|
5195
5170
|
setFieldActive = _useActiveField.setFieldActive;
|
|
5196
|
-
var _useUtilityStore = useUtilityStore(function (store) {
|
|
5171
|
+
var _useUtilityStore = useUtilityStore(useShallow(function (store) {
|
|
5197
5172
|
return {
|
|
5198
5173
|
setPanelState: store["setPanelState"],
|
|
5199
5174
|
setErrorFields: store["setErrorFields"]
|
|
5200
5175
|
};
|
|
5201
|
-
}
|
|
5176
|
+
})),
|
|
5202
5177
|
setPanelState = _useUtilityStore.setPanelState,
|
|
5203
5178
|
setErrorFields = _useUtilityStore.setErrorFields;
|
|
5204
|
-
var _useUtilityStore2 = useUtilityStore(function (store) {
|
|
5179
|
+
var _useUtilityStore2 = useUtilityStore(useShallow(function (store) {
|
|
5205
5180
|
var _store$panelState;
|
|
5206
5181
|
return {
|
|
5207
5182
|
index: (_store$panelState = store["panelState"]) === null || _store$panelState === void 0 || (_store$panelState = _store$panelState["data"]) === null || _store$panelState === void 0 ? void 0 : _store$panelState["index"]
|
|
5208
5183
|
};
|
|
5209
|
-
}
|
|
5184
|
+
})),
|
|
5210
5185
|
panelIndex = _useUtilityStore2.index;
|
|
5211
5186
|
var ActionChildren = action.children;
|
|
5212
5187
|
var defaultLabel = t("neetoRules.form.doThis");
|
|
@@ -5312,16 +5287,15 @@ var ActionItem$1 = function ActionItem(_ref) {
|
|
|
5312
5287
|
children: /*#__PURE__*/jsxs("div", {
|
|
5313
5288
|
className: "flex flex-wrap items-center gap-x-2 gap-y-3",
|
|
5314
5289
|
children: [/*#__PURE__*/jsx(Typography, {
|
|
5315
|
-
|
|
5316
|
-
variant: "h5",
|
|
5290
|
+
variant: "body1",
|
|
5317
5291
|
children: label
|
|
5318
5292
|
}), /*#__PURE__*/jsx(Button, {
|
|
5319
5293
|
"data-testid": "action-dropdown-button",
|
|
5320
5294
|
label: selectedLabel.toLowerCase(),
|
|
5321
5295
|
variant: "link",
|
|
5322
|
-
className: classNames("
|
|
5323
|
-
"
|
|
5324
|
-
"
|
|
5296
|
+
className: classNames("text-base text-foreground font-semibold underline", {
|
|
5297
|
+
"text-primary": isFieldActive,
|
|
5298
|
+
"text-destructive": isActionSelected || !!errorMessage && isIntegrableError !== false
|
|
5325
5299
|
}),
|
|
5326
5300
|
onClick: handleOnClick
|
|
5327
5301
|
}), /*#__PURE__*/jsx(ActionSubItem, _objectSpread$d(_objectSpread$d({}, _objectSpread$d(_objectSpread$d({}, panelData), {}, {
|
|
@@ -5351,12 +5325,12 @@ var Card = function Card(_ref) {
|
|
|
5351
5325
|
children = _ref.children;
|
|
5352
5326
|
return /*#__PURE__*/jsxs("div", {
|
|
5353
5327
|
children: [/*#__PURE__*/jsx(Typography, {
|
|
5354
|
-
|
|
5328
|
+
color: "muted",
|
|
5355
5329
|
"data-testid": "".concat(joinHyphenCase(title), "-card-title"),
|
|
5356
5330
|
variant: "h4",
|
|
5357
5331
|
children: title
|
|
5358
5332
|
}), /*#__PURE__*/jsx("div", {
|
|
5359
|
-
className: "
|
|
5333
|
+
className: "bg-muted rounded-sm my-2 p-4 neeto-rules-main-card",
|
|
5360
5334
|
children: children
|
|
5361
5335
|
})]
|
|
5362
5336
|
});
|
|
@@ -5389,12 +5363,12 @@ var Actions = function Actions(_ref) {
|
|
|
5389
5363
|
_useState2 = _slicedToArray(_useState, 2),
|
|
5390
5364
|
shouldOpenPanel = _useState2[0],
|
|
5391
5365
|
setShouldOpenPanel = _useState2[1];
|
|
5392
|
-
var _useUtilityStore = useUtilityStore(function (store) {
|
|
5366
|
+
var _useUtilityStore = useUtilityStore(useShallow(function (store) {
|
|
5393
5367
|
return {
|
|
5394
5368
|
resetPanelState: store["resetPanelState"],
|
|
5395
5369
|
setIsSaveAsTemplateEnabled: store["setIsSaveAsTemplateEnabled"]
|
|
5396
5370
|
};
|
|
5397
|
-
}
|
|
5371
|
+
})),
|
|
5398
5372
|
resetPanelState = _useUtilityStore.resetPanelState,
|
|
5399
5373
|
setIsSaveAsTemplateEnabled = _useUtilityStore.setIsSaveAsTemplateEnabled;
|
|
5400
5374
|
var elementProps = data[name] || {};
|
|
@@ -5453,7 +5427,7 @@ var Actions = function Actions(_ref) {
|
|
|
5453
5427
|
}
|
|
5454
5428
|
}), actions.length > 1 && /*#__PURE__*/jsx(Button, {
|
|
5455
5429
|
"data-testid": "delete-action-button-".concat(index),
|
|
5456
|
-
icon:
|
|
5430
|
+
icon: Trash2,
|
|
5457
5431
|
size: "default",
|
|
5458
5432
|
variant: "ghost",
|
|
5459
5433
|
tooltipProps: {
|
|
@@ -5492,11 +5466,11 @@ var LogicalOperator = function LogicalOperator(_ref) {
|
|
|
5492
5466
|
return /*#__PURE__*/jsx(DropdownMenu, {
|
|
5493
5467
|
customTarget: /*#__PURE__*/jsx(Button, {
|
|
5494
5468
|
"data-testid": "logic-operator-button",
|
|
5495
|
-
icon:
|
|
5469
|
+
icon: ChevronDown,
|
|
5496
5470
|
label: logicOperationLabel,
|
|
5497
5471
|
variant: "link",
|
|
5498
|
-
className: classNames("
|
|
5499
|
-
"
|
|
5472
|
+
className: classNames("text-base text-foreground font-semibold gap-1 underline", {
|
|
5473
|
+
"text-primary": isFieldActive
|
|
5500
5474
|
}),
|
|
5501
5475
|
onClick: setFieldActive
|
|
5502
5476
|
}),
|
|
@@ -5531,18 +5505,18 @@ var ConditionItem = function ConditionItem(_ref) {
|
|
|
5531
5505
|
var _useFormikContext = useFormikContext(),
|
|
5532
5506
|
setFieldValue = _useFormikContext.setFieldValue,
|
|
5533
5507
|
setFieldTouched = _useFormikContext.setFieldTouched;
|
|
5534
|
-
var _useUtilityStore = useUtilityStore(function (store) {
|
|
5508
|
+
var _useUtilityStore = useUtilityStore(useShallow(function (store) {
|
|
5535
5509
|
return {
|
|
5536
5510
|
setPanelState: store["setPanelState"]
|
|
5537
5511
|
};
|
|
5538
|
-
}
|
|
5512
|
+
})),
|
|
5539
5513
|
setPanelState = _useUtilityStore.setPanelState;
|
|
5540
|
-
var _useUtilityStore2 = useUtilityStore(function (store) {
|
|
5514
|
+
var _useUtilityStore2 = useUtilityStore(useShallow(function (store) {
|
|
5541
5515
|
var _store$panelState;
|
|
5542
5516
|
return {
|
|
5543
5517
|
index: (_store$panelState = store["panelState"]) === null || _store$panelState === void 0 || (_store$panelState = _store$panelState["data"]) === null || _store$panelState === void 0 ? void 0 : _store$panelState["index"]
|
|
5544
5518
|
};
|
|
5545
|
-
}
|
|
5519
|
+
})),
|
|
5546
5520
|
panelIndex = _useUtilityStore2.index;
|
|
5547
5521
|
var conditionOptions = elementProps.conditionOptions;
|
|
5548
5522
|
var selectedField = getFieldDetails(condition.field, conditionOptions);
|
|
@@ -5619,14 +5593,12 @@ var ConditionItem = function ConditionItem(_ref) {
|
|
|
5619
5593
|
isWithEvents: isWithEvents,
|
|
5620
5594
|
name: "".concat(name, ".joinType")
|
|
5621
5595
|
}), isWithEvents && !index && /*#__PURE__*/jsx(Typography, {
|
|
5622
|
-
|
|
5623
|
-
variant: "h5",
|
|
5596
|
+
variant: "body1",
|
|
5624
5597
|
children: t("neetoRules.common.and", {
|
|
5625
5598
|
what: ""
|
|
5626
5599
|
})
|
|
5627
5600
|
}), !index && /*#__PURE__*/jsx(Typography, {
|
|
5628
|
-
|
|
5629
|
-
variant: "h5",
|
|
5601
|
+
variant: "body1",
|
|
5630
5602
|
children: defaultLabel
|
|
5631
5603
|
}), /*#__PURE__*/jsx(RadioField$1.Target, {
|
|
5632
5604
|
name: "".concat(name, ".field"),
|
|
@@ -5685,11 +5657,11 @@ var Conditions = function Conditions(_ref) {
|
|
|
5685
5657
|
_useState2 = _slicedToArray(_useState, 2),
|
|
5686
5658
|
shouldOpenPanel = _useState2[0],
|
|
5687
5659
|
setShouldOpenPanel = _useState2[1];
|
|
5688
|
-
var _useUtilityStore = useUtilityStore(function (store) {
|
|
5660
|
+
var _useUtilityStore = useUtilityStore(useShallow(function (store) {
|
|
5689
5661
|
return {
|
|
5690
5662
|
resetPanelState: store["resetPanelState"]
|
|
5691
5663
|
};
|
|
5692
|
-
}
|
|
5664
|
+
})),
|
|
5693
5665
|
resetPanelState = _useUtilityStore.resetPanelState;
|
|
5694
5666
|
var elementProps = data[name] || {};
|
|
5695
5667
|
var conditions = ((_field$value = field.value) === null || _field$value === void 0 ? void 0 : _field$value.value) || [];
|
|
@@ -5761,7 +5733,7 @@ var Conditions = function Conditions(_ref) {
|
|
|
5761
5733
|
}
|
|
5762
5734
|
}), (allowEmpty || index !== 0) && /*#__PURE__*/jsx(Button, {
|
|
5763
5735
|
"data-testid": "delete-condition-button-".concat(index),
|
|
5764
|
-
icon:
|
|
5736
|
+
icon: Trash2,
|
|
5765
5737
|
size: "default",
|
|
5766
5738
|
variant: "ghost",
|
|
5767
5739
|
tooltipProps: {
|
|
@@ -5775,7 +5747,7 @@ var Conditions = function Conditions(_ref) {
|
|
|
5775
5747
|
})]
|
|
5776
5748
|
}, index);
|
|
5777
5749
|
}), isEmpty(conditions) && /*#__PURE__*/jsx(Button, {
|
|
5778
|
-
className: "
|
|
5750
|
+
className: "text-muted-foreground me-auto",
|
|
5779
5751
|
"data-testid": "add-condition-button",
|
|
5780
5752
|
label: t("neetoRules.form.addCondition"),
|
|
5781
5753
|
variant: "ghost",
|
|
@@ -5805,12 +5777,12 @@ var AddDelay = function AddDelay(_ref) {
|
|
|
5805
5777
|
var _useTranslation = useTranslation(),
|
|
5806
5778
|
t = _useTranslation.t;
|
|
5807
5779
|
var addDelayButtonRef = useRef(null);
|
|
5808
|
-
var _useUtilityStore = useUtilityStore(function (store) {
|
|
5780
|
+
var _useUtilityStore = useUtilityStore(useShallow(function (store) {
|
|
5809
5781
|
return {
|
|
5810
5782
|
setPanelState: store["setPanelState"],
|
|
5811
5783
|
resetPanelState: store["resetPanelState"]
|
|
5812
5784
|
};
|
|
5813
|
-
}
|
|
5785
|
+
})),
|
|
5814
5786
|
setPanelState = _useUtilityStore.setPanelState,
|
|
5815
5787
|
resetPanelState = _useUtilityStore.resetPanelState;
|
|
5816
5788
|
var _ref2 = data[name] || {},
|
|
@@ -5850,6 +5822,7 @@ var AddDelay = function AddDelay(_ref) {
|
|
|
5850
5822
|
return /*#__PURE__*/jsxs(Fragment, {
|
|
5851
5823
|
children: [showAddDelayButton && /*#__PURE__*/jsx(Button, {
|
|
5852
5824
|
icon: Plus,
|
|
5825
|
+
iconPosition: "left",
|
|
5853
5826
|
label: t("neetoRules.common.addDelay"),
|
|
5854
5827
|
ref: addDelayButtonRef,
|
|
5855
5828
|
size: "default",
|
|
@@ -5862,14 +5835,14 @@ var AddDelay = function AddDelay(_ref) {
|
|
|
5862
5835
|
children: [/*#__PURE__*/jsxs("div", {
|
|
5863
5836
|
className: "flex items-center gap-2 flex-wrap min-w-0 grow",
|
|
5864
5837
|
children: [/*#__PURE__*/jsx(Typography, {
|
|
5865
|
-
variant: "
|
|
5838
|
+
variant: "body1",
|
|
5866
5839
|
children: t("neetoRules.form.delayExecutionBy")
|
|
5867
5840
|
}), /*#__PURE__*/jsx(Button, {
|
|
5868
5841
|
label: delayLabel,
|
|
5869
5842
|
variant: "link",
|
|
5870
|
-
className: classNames("
|
|
5871
|
-
"
|
|
5872
|
-
"
|
|
5843
|
+
className: classNames("text-base text-foreground font-semibold underline", {
|
|
5844
|
+
"text-primary": isValueFieldActive,
|
|
5845
|
+
"text-destructive": isFieldInvalid && !isValueFieldActive
|
|
5873
5846
|
}),
|
|
5874
5847
|
onClick: function onClick() {
|
|
5875
5848
|
openDelayPanel();
|
|
@@ -5878,8 +5851,8 @@ var AddDelay = function AddDelay(_ref) {
|
|
|
5878
5851
|
}), /*#__PURE__*/jsx(Button, {
|
|
5879
5852
|
label: value.unit,
|
|
5880
5853
|
variant: "link",
|
|
5881
|
-
className: classNames("
|
|
5882
|
-
"
|
|
5854
|
+
className: classNames("text-base text-foreground font-semibold underline", {
|
|
5855
|
+
"text-primary": isUnitFieldActive
|
|
5883
5856
|
}),
|
|
5884
5857
|
onClick: function onClick() {
|
|
5885
5858
|
openDelayPanel();
|
|
@@ -5889,7 +5862,7 @@ var AddDelay = function AddDelay(_ref) {
|
|
|
5889
5862
|
}), /*#__PURE__*/jsx(Button, {
|
|
5890
5863
|
className: "shrink-0",
|
|
5891
5864
|
"data-testid": "delete-delay-button",
|
|
5892
|
-
icon:
|
|
5865
|
+
icon: Trash2,
|
|
5893
5866
|
size: "default",
|
|
5894
5867
|
variant: "ghost",
|
|
5895
5868
|
tooltipProps: {
|
|
@@ -5921,11 +5894,11 @@ var Performer = function Performer(_ref) {
|
|
|
5921
5894
|
var _useFormikContext = useFormikContext(),
|
|
5922
5895
|
values = _useFormikContext.values,
|
|
5923
5896
|
errors = _useFormikContext.errors;
|
|
5924
|
-
var _useUtilityStore = useUtilityStore(function (store) {
|
|
5897
|
+
var _useUtilityStore = useUtilityStore(useShallow(function (store) {
|
|
5925
5898
|
return {
|
|
5926
5899
|
setPanelState: store["setPanelState"]
|
|
5927
5900
|
};
|
|
5928
|
-
}
|
|
5901
|
+
})),
|
|
5929
5902
|
setPanelState = _useUtilityStore.setPanelState;
|
|
5930
5903
|
var elementProps = data[performerName] || {};
|
|
5931
5904
|
var performer = values[performerName].value;
|
|
@@ -5957,16 +5930,15 @@ var Performer = function Performer(_ref) {
|
|
|
5957
5930
|
return /*#__PURE__*/jsxs("div", {
|
|
5958
5931
|
className: "my-auto flex items-center gap-x-2 gap-y-3",
|
|
5959
5932
|
children: [/*#__PURE__*/jsx(Typography, {
|
|
5960
|
-
|
|
5961
|
-
variant: "h5",
|
|
5933
|
+
variant: "body1",
|
|
5962
5934
|
children: t("neetoRules.common.by")
|
|
5963
5935
|
}), /*#__PURE__*/jsx(Button, {
|
|
5964
5936
|
"data-testid": "event-performer-dropdown",
|
|
5965
5937
|
label: selectedOption === null || selectedOption === void 0 || (_selectedOption$label = selectedOption.label) === null || _selectedOption$label === void 0 ? void 0 : _selectedOption$label.toLowerCase(),
|
|
5966
5938
|
variant: "link",
|
|
5967
|
-
className: classNames("
|
|
5968
|
-
"
|
|
5969
|
-
"
|
|
5939
|
+
className: classNames("text-base text-foreground font-semibold underline", {
|
|
5940
|
+
"text-primary": isFieldActive,
|
|
5941
|
+
"text-destructive": isValueSelected
|
|
5970
5942
|
}),
|
|
5971
5943
|
onClick: handleOnClick
|
|
5972
5944
|
})]
|
|
@@ -5990,11 +5962,11 @@ var Events = function Events(_ref) {
|
|
|
5990
5962
|
var _useFormikContext = useFormikContext(),
|
|
5991
5963
|
values = _useFormikContext.values,
|
|
5992
5964
|
errors = _useFormikContext.errors;
|
|
5993
|
-
var _useUtilityStore = useUtilityStore(function (store) {
|
|
5965
|
+
var _useUtilityStore = useUtilityStore(useShallow(function (store) {
|
|
5994
5966
|
return {
|
|
5995
5967
|
setPanelState: store["setPanelState"]
|
|
5996
5968
|
};
|
|
5997
|
-
}
|
|
5969
|
+
})),
|
|
5998
5970
|
setPanelState = _useUtilityStore.setPanelState;
|
|
5999
5971
|
var elementProps = data[name] || {};
|
|
6000
5972
|
var events = values[name].value || [];
|
|
@@ -6034,8 +6006,8 @@ var Events = function Events(_ref) {
|
|
|
6034
6006
|
return /*#__PURE__*/jsxs("div", {
|
|
6035
6007
|
className: "my-auto flex flex-wrap items-center gap-x-2 gap-y-3",
|
|
6036
6008
|
children: [/*#__PURE__*/jsx(Typography, {
|
|
6037
|
-
className: "
|
|
6038
|
-
variant: "
|
|
6009
|
+
className: "my-auto",
|
|
6010
|
+
variant: "body1",
|
|
6039
6011
|
children: t("neetoRules.common.when")
|
|
6040
6012
|
}), isNotEmpty(allEvents) ? /*#__PURE__*/jsx("span", {
|
|
6041
6013
|
className: "flex flex-wrap items-center gap-x-2 gap-y-1",
|
|
@@ -6043,16 +6015,15 @@ var Events = function Events(_ref) {
|
|
|
6043
6015
|
var _event$label;
|
|
6044
6016
|
return /*#__PURE__*/jsxs(Fragment$1, {
|
|
6045
6017
|
children: [!!idx && /*#__PURE__*/jsx(Typography, {
|
|
6046
|
-
|
|
6047
|
-
variant: "h5",
|
|
6018
|
+
variant: "body1",
|
|
6048
6019
|
children: t("neetoRules.common.or")
|
|
6049
6020
|
}), /*#__PURE__*/jsx(Button, {
|
|
6050
6021
|
"data-testid": "condition-value-multi-select-field",
|
|
6051
6022
|
label: event === null || event === void 0 || (_event$label = event.label) === null || _event$label === void 0 ? void 0 : _event$label.toLowerCase(),
|
|
6052
6023
|
variant: "link",
|
|
6053
|
-
className: classNames("
|
|
6054
|
-
"
|
|
6055
|
-
"
|
|
6024
|
+
className: classNames("text-base text-foreground font-semibold underline", {
|
|
6025
|
+
"text-primary": isFieldActive,
|
|
6026
|
+
"text-destructive": isFieldInvalid && !isFieldActive
|
|
6056
6027
|
}),
|
|
6057
6028
|
onClick: handleOnClick
|
|
6058
6029
|
})]
|
|
@@ -6062,9 +6033,9 @@ var Events = function Events(_ref) {
|
|
|
6062
6033
|
"data-testid": "condition-value-multi-select-field",
|
|
6063
6034
|
label: defaultLabel,
|
|
6064
6035
|
variant: "link",
|
|
6065
|
-
className: classNames("
|
|
6066
|
-
"
|
|
6067
|
-
"
|
|
6036
|
+
className: classNames("text-base text-foreground font-semibold underline", {
|
|
6037
|
+
"text-primary": isFieldActive,
|
|
6038
|
+
"text-destructive": isFieldInvalid && !isFieldActive
|
|
6068
6039
|
}),
|
|
6069
6040
|
onClick: handleOnClick
|
|
6070
6041
|
}), !hidePerformer && /*#__PURE__*/jsx(Performer, {
|
|
@@ -6166,9 +6137,12 @@ var EventConditions = function EventConditions(_ref) {
|
|
|
6166
6137
|
openPanel: shouldOpenConditionsPanel
|
|
6167
6138
|
}, config))
|
|
6168
6139
|
})]
|
|
6169
|
-
}), enableAddingDelay && /*#__PURE__*/jsx(
|
|
6170
|
-
|
|
6171
|
-
|
|
6140
|
+
}), enableAddingDelay && /*#__PURE__*/jsx("div", {
|
|
6141
|
+
className: "mt-6",
|
|
6142
|
+
children: /*#__PURE__*/jsx(AddDelay, {
|
|
6143
|
+
data: data,
|
|
6144
|
+
name: "execution_delay"
|
|
6145
|
+
})
|
|
6172
6146
|
})]
|
|
6173
6147
|
});
|
|
6174
6148
|
};
|
|
@@ -6420,9 +6394,10 @@ var Status = function Status() {
|
|
|
6420
6394
|
return /*#__PURE__*/jsx(Switch$1, {
|
|
6421
6395
|
checked: defaultValue === ENABLED,
|
|
6422
6396
|
label: t("neetoRules.labels.active"),
|
|
6397
|
+
size: "lg",
|
|
6423
6398
|
labelProps: {
|
|
6424
6399
|
helpIconProps: {
|
|
6425
|
-
icon:
|
|
6400
|
+
icon: CircleHelp,
|
|
6426
6401
|
tooltipProps: {
|
|
6427
6402
|
content: status.value === ENABLED ? t("neetoRules.tooltips.rule.active") : t("neetoRules.tooltips.rule.inactive")
|
|
6428
6403
|
}
|
|
@@ -6572,18 +6547,18 @@ var Form = function Form(_ref) {
|
|
|
6572
6547
|
t = _useTranslation.t;
|
|
6573
6548
|
var formikRef = useRef(null);
|
|
6574
6549
|
var formRef = useRef(null);
|
|
6575
|
-
var _useCustomDataStore = useCustomDataStore(function (store) {
|
|
6550
|
+
var _useCustomDataStore = useCustomDataStore(useShallow(function (store) {
|
|
6576
6551
|
return {
|
|
6577
6552
|
customData: store["customData"]
|
|
6578
6553
|
};
|
|
6579
|
-
}
|
|
6554
|
+
})),
|
|
6580
6555
|
customData = _useCustomDataStore.customData;
|
|
6581
|
-
var _useUtilityStore = useUtilityStore(function (store) {
|
|
6556
|
+
var _useUtilityStore = useUtilityStore(useShallow(function (store) {
|
|
6582
6557
|
return {
|
|
6583
6558
|
resetPanelState: store["resetPanelState"],
|
|
6584
6559
|
errorFields: store["errorFields"]
|
|
6585
6560
|
};
|
|
6586
|
-
}
|
|
6561
|
+
})),
|
|
6587
6562
|
resetPanelState = _useUtilityStore.resetPanelState,
|
|
6588
6563
|
errorFields = _useUtilityStore.errorFields;
|
|
6589
6564
|
var initialValues = useMemo(function () {
|
|
@@ -6648,33 +6623,35 @@ var Form = function Form(_ref) {
|
|
|
6648
6623
|
children: [/*#__PURE__*/jsxs("div", {
|
|
6649
6624
|
className: "space-y-6",
|
|
6650
6625
|
children: [/*#__PURE__*/jsxs("div", {
|
|
6651
|
-
|
|
6652
|
-
|
|
6653
|
-
|
|
6654
|
-
|
|
6655
|
-
|
|
6656
|
-
|
|
6657
|
-
|
|
6658
|
-
|
|
6659
|
-
|
|
6660
|
-
|
|
6661
|
-
|
|
6662
|
-
children: /*#__PURE__*/jsx(
|
|
6663
|
-
|
|
6626
|
+
children: [/*#__PURE__*/jsxs("div", {
|
|
6627
|
+
className: "flex items-center gap-x-3",
|
|
6628
|
+
children: [/*#__PURE__*/jsx(InputField, {
|
|
6629
|
+
data: initialValues,
|
|
6630
|
+
label: t("neetoRules.common.name"),
|
|
6631
|
+
name: "name",
|
|
6632
|
+
placeholder: isNameGenerationDisabled ? "" : t("neetoRules.placeholders.autoGenerateName")
|
|
6633
|
+
}), isGeneratingName && /*#__PURE__*/jsxs(Fragment, {
|
|
6634
|
+
children: [/*#__PURE__*/jsx(Tooltip, {
|
|
6635
|
+
content: t("neetoRules.form.aiGeneratedName"),
|
|
6636
|
+
position: "top",
|
|
6637
|
+
children: /*#__PURE__*/jsx("span", {
|
|
6638
|
+
children: /*#__PURE__*/jsx(Spinner, {
|
|
6639
|
+
size: "sm"
|
|
6640
|
+
})
|
|
6664
6641
|
})
|
|
6665
|
-
})
|
|
6666
|
-
|
|
6667
|
-
|
|
6668
|
-
|
|
6669
|
-
|
|
6670
|
-
|
|
6671
|
-
|
|
6672
|
-
|
|
6673
|
-
|
|
6674
|
-
|
|
6642
|
+
}), /*#__PURE__*/jsx(Button, {
|
|
6643
|
+
icon: X,
|
|
6644
|
+
size: "sm",
|
|
6645
|
+
variant: "ghost",
|
|
6646
|
+
tooltipProps: {
|
|
6647
|
+
content: t("neetoRules.buttons.cancelNameGeneration"),
|
|
6648
|
+
position: "top"
|
|
6649
|
+
},
|
|
6650
|
+
onClick: handleCancelNameGeneration
|
|
6651
|
+
})]
|
|
6675
6652
|
})]
|
|
6676
|
-
})]
|
|
6677
|
-
}),
|
|
6653
|
+
}), showStatusSwitch && /*#__PURE__*/jsx(Status, {})]
|
|
6654
|
+
}), typeof _children === "function" ? _children === null || _children === void 0 ? void 0 : _children(_objectSpread$1({
|
|
6678
6655
|
values: values,
|
|
6679
6656
|
formattedValues: buildPayload(data, values),
|
|
6680
6657
|
dirty: dirty
|
|
@@ -6682,7 +6659,7 @@ var Form = function Form(_ref) {
|
|
|
6682
6659
|
formRef: formRef
|
|
6683
6660
|
})]
|
|
6684
6661
|
}), /*#__PURE__*/jsx("div", {
|
|
6685
|
-
className: "
|
|
6662
|
+
className: "bg-background sticky bottom-0 py-6",
|
|
6686
6663
|
children: /*#__PURE__*/jsx(ActionBlock, {
|
|
6687
6664
|
cancelButtonProps: {
|
|
6688
6665
|
onClick: handleCancel
|