@bigbinary/neeto-rules-frontend 2.5.44 → 2.5.46
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/NeetoRules.js +6 -10
- package/dist/NeetoRules.js.map +1 -1
- package/dist/NeetoRulesForm.js +111 -109
- package/dist/NeetoRulesForm.js.map +1 -1
- package/dist/RulePreview.js +17 -9
- package/dist/RulePreview.js.map +1 -1
- package/dist/RulesReorder.js +1 -1
- package/dist/cjs/NeetoRules.js +6 -10
- package/dist/cjs/NeetoRules.js.map +1 -1
- package/dist/cjs/NeetoRulesForm.js +111 -109
- package/dist/cjs/NeetoRulesForm.js.map +1 -1
- package/dist/cjs/RulePreview.js +17 -9
- package/dist/cjs/RulePreview.js.map +1 -1
- package/dist/cjs/RulesReorder.js +1 -1
- package/dist/cjs/index.js +2 -1
- package/dist/cjs/index.js.map +1 -1
- package/dist/{index-C0i4jsZ5.js → index-B2URQ5Q-.js} +2 -2
- package/dist/index-B2URQ5Q-.js.map +1 -0
- package/dist/{index-CQs1hVC3.js → index-D1EFD4U6.js} +2 -2
- package/dist/index-D1EFD4U6.js.map +1 -0
- package/dist/index.js +2 -1
- package/dist/index.js.map +1 -1
- package/package.json +13 -13
- package/dist/index-C0i4jsZ5.js.map +0 -1
- package/dist/index-CQs1hVC3.js.map +0 -1
|
@@ -104,7 +104,7 @@ var Body = function Body(_ref) {
|
|
|
104
104
|
var children = _ref.children,
|
|
105
105
|
className = _ref.className;
|
|
106
106
|
return /*#__PURE__*/jsxRuntime.jsx("div", {
|
|
107
|
-
"data-
|
|
107
|
+
"data-testid": "pane-body",
|
|
108
108
|
className: classNames("neeto-rules-side-panel__body grow overflow-y-auto p-6", _defineProperty({}, className, className)),
|
|
109
109
|
children: children
|
|
110
110
|
});
|
|
@@ -114,7 +114,7 @@ var Footer = function Footer(_ref) {
|
|
|
114
114
|
var children = _ref.children,
|
|
115
115
|
className = _ref.className;
|
|
116
116
|
return /*#__PURE__*/jsxRuntime.jsx("div", {
|
|
117
|
-
"data-
|
|
117
|
+
"data-testid": "pane-footer",
|
|
118
118
|
className: classNames("neeto-rules-side-panel__footer neeto-ui-border-gray-200 flex items-center justify-between border-t p-6", className),
|
|
119
119
|
children: children
|
|
120
120
|
});
|
|
@@ -132,14 +132,14 @@ var Header = function Header(_ref) {
|
|
|
132
132
|
var _useTranslation = reactI18next.useTranslation(),
|
|
133
133
|
t = _useTranslation.t;
|
|
134
134
|
return /*#__PURE__*/jsxRuntime.jsxs("div", {
|
|
135
|
-
"data-
|
|
135
|
+
"data-testid": "pane-header",
|
|
136
136
|
className: classNames("neeto-rules-side-panel__header neeto-ui-border-gray-200 flex items-start justify-between border-b p-6", _defineProperty({}, className, className)),
|
|
137
137
|
children: [/*#__PURE__*/jsxRuntime.jsx("div", {
|
|
138
138
|
className: "flex min-w-0 grow",
|
|
139
139
|
children: children
|
|
140
140
|
}), /*#__PURE__*/jsxRuntime.jsx(Button, {
|
|
141
141
|
className: "shrink-0 scale-x-[-1] rtl:rotate-180",
|
|
142
|
-
"data-
|
|
142
|
+
"data-testid": "collapse-sidebar-button",
|
|
143
143
|
icon: Collapse,
|
|
144
144
|
size: "medium",
|
|
145
145
|
style: "text",
|
|
@@ -425,11 +425,11 @@ var ActionPanel = function ActionPanel() {
|
|
|
425
425
|
children: /*#__PURE__*/jsxRuntime.jsxs("div", {
|
|
426
426
|
className: "flex flex-col space-y-2",
|
|
427
427
|
children: [/*#__PURE__*/jsxRuntime.jsxs(Typography, {
|
|
428
|
-
"data-
|
|
428
|
+
"data-testid": "action-title",
|
|
429
429
|
style: "h3",
|
|
430
430
|
children: [label, "..."]
|
|
431
431
|
}), /*#__PURE__*/jsxRuntime.jsx(Typography, {
|
|
432
|
-
"data-
|
|
432
|
+
"data-testid": "action-description",
|
|
433
433
|
style: "body2",
|
|
434
434
|
children: t("neetoRules.form.addActionDescription")
|
|
435
435
|
})]
|
|
@@ -440,7 +440,7 @@ var ActionPanel = function ActionPanel() {
|
|
|
440
440
|
}),
|
|
441
441
|
children: [(isSearchable || errorMessage) && /*#__PURE__*/jsxRuntime.jsxs(StickySidebarHeader, {
|
|
442
442
|
children: [isSearchable && /*#__PURE__*/jsxRuntime.jsx(Input$1, {
|
|
443
|
-
"data-
|
|
443
|
+
"data-testid": "search-text-field",
|
|
444
444
|
placeholder: t("neetoRules.common.search"),
|
|
445
445
|
prefix: /*#__PURE__*/jsxRuntime.jsx(Search, {}),
|
|
446
446
|
value: searchTerm,
|
|
@@ -472,12 +472,12 @@ var ActionPanel = function ActionPanel() {
|
|
|
472
472
|
})
|
|
473
473
|
}) : /*#__PURE__*/jsxRuntime.jsx("div", {
|
|
474
474
|
className: "py-1 text-sm",
|
|
475
|
-
"data-
|
|
475
|
+
"data-testid": "no-options-menu-item",
|
|
476
476
|
children: t("neetoRules.common.noOptions")
|
|
477
477
|
})]
|
|
478
478
|
}), /*#__PURE__*/jsxRuntime.jsx(Panel.Footer, {
|
|
479
479
|
children: /*#__PURE__*/jsxRuntime.jsx(Button, {
|
|
480
|
-
"data-
|
|
480
|
+
"data-testid": "continue-button",
|
|
481
481
|
onClick: handleContinue,
|
|
482
482
|
children: t("neetoRules.buttons.continue")
|
|
483
483
|
})
|
|
@@ -558,12 +558,12 @@ var Target$k = function Target(_ref) {
|
|
|
558
558
|
return /*#__PURE__*/jsxRuntime.jsxs(jsxRuntime.Fragment, {
|
|
559
559
|
children: [separator && /*#__PURE__*/jsxRuntime.jsx(Typography, {
|
|
560
560
|
className: "neeto-ui-text-gray-700",
|
|
561
|
-
"data-
|
|
561
|
+
"data-testid": "long-text-action-separator-text",
|
|
562
562
|
style: "h5",
|
|
563
563
|
weight: "normal",
|
|
564
564
|
children: separator
|
|
565
565
|
}), /*#__PURE__*/jsxRuntime.jsx(Button, {
|
|
566
|
-
"data-
|
|
566
|
+
"data-testid": "long-text-action-button",
|
|
567
567
|
label: label.toLowerCase(),
|
|
568
568
|
style: "link",
|
|
569
569
|
className: classNames("neeto-ui-text-gray-800 neeto-ui-font-semibold underline", {
|
|
@@ -798,7 +798,7 @@ var CustomHeaders = function CustomHeaders(_ref) {
|
|
|
798
798
|
children: [/*#__PURE__*/jsxRuntime.jsx(Switch, _objectSpread$t({
|
|
799
799
|
label: label,
|
|
800
800
|
onFocus: onFocus,
|
|
801
|
-
"data-
|
|
801
|
+
"data-testid": "neeto-rules-api-fields-".concat(neetoCist.hyphenate(label), "-switch"),
|
|
802
802
|
name: switchName,
|
|
803
803
|
onChange: handleChange
|
|
804
804
|
}, withHelpPopover(helpPopoverProps))), isCustomHeadersEnabled && /*#__PURE__*/jsxRuntime.jsx(KeyValuePairsField, {
|
|
@@ -911,7 +911,7 @@ var JsonEditor = function JsonEditor(_ref) {
|
|
|
911
911
|
className: "space-y-2",
|
|
912
912
|
children: [/*#__PURE__*/jsxRuntime.jsx(Label, _objectSpread$s(_objectSpread$s({
|
|
913
913
|
required: true,
|
|
914
|
-
"data-
|
|
914
|
+
"data-testid": "api-field-body"
|
|
915
915
|
}, neetoCist.isPresent(helpPopoverProps) && {
|
|
916
916
|
helpIconProps: {
|
|
917
917
|
icon: Help,
|
|
@@ -939,7 +939,7 @@ var JsonEditor = function JsonEditor(_ref) {
|
|
|
939
939
|
onMount: handleEditorDidMount
|
|
940
940
|
}), error && touched && /*#__PURE__*/jsxRuntime.jsx("div", {
|
|
941
941
|
className: "neeto-ui-input__error",
|
|
942
|
-
"data-
|
|
942
|
+
"data-testid": "json-field-input-error",
|
|
943
943
|
children: error
|
|
944
944
|
})]
|
|
945
945
|
})]
|
|
@@ -968,7 +968,7 @@ var SaveAsTemplate = function SaveAsTemplate(_ref) {
|
|
|
968
968
|
return /*#__PURE__*/jsxRuntime.jsxs("div", {
|
|
969
969
|
className: classNames(["flex flex-col space-y-4", className]),
|
|
970
970
|
children: [/*#__PURE__*/jsxRuntime.jsx(Switch, {
|
|
971
|
-
"data-
|
|
971
|
+
"data-testid": "neeto-rules-save-as-template-switch",
|
|
972
972
|
label: t("neetoRules.labels.saveAsTemplate"),
|
|
973
973
|
name: switchName,
|
|
974
974
|
onChange: handleChange
|
|
@@ -1075,12 +1075,12 @@ var Target$j = function Target(_ref) {
|
|
|
1075
1075
|
return /*#__PURE__*/jsxRuntime.jsxs(jsxRuntime.Fragment, {
|
|
1076
1076
|
children: [/*#__PURE__*/jsxRuntime.jsx(Typography, {
|
|
1077
1077
|
className: "neeto-ui-text-gray-700",
|
|
1078
|
-
"data-
|
|
1078
|
+
"data-testid": "api-action-separator-text",
|
|
1079
1079
|
style: "h5",
|
|
1080
1080
|
weight: "normal",
|
|
1081
1081
|
children: separator
|
|
1082
1082
|
}), /*#__PURE__*/jsxRuntime.jsx(Button, {
|
|
1083
|
-
"data-
|
|
1083
|
+
"data-testid": "api-action-button",
|
|
1084
1084
|
label: defaultLabel.toLowerCase(),
|
|
1085
1085
|
style: "link",
|
|
1086
1086
|
className: classNames("neeto-ui-text-gray-800 neeto-ui-font-semibold underline", {
|
|
@@ -1151,7 +1151,7 @@ var ApiFields = function ApiFields(_ref2) {
|
|
|
1151
1151
|
}), /*#__PURE__*/jsxRuntime.jsx(Input$2, {
|
|
1152
1152
|
required: true,
|
|
1153
1153
|
className: "mb-4",
|
|
1154
|
-
"data-
|
|
1154
|
+
"data-testid": "api-action-endpoint-text-field",
|
|
1155
1155
|
label: t("neetoRules.labels.endpoint"),
|
|
1156
1156
|
name: "".concat(name, ".endpoint"),
|
|
1157
1157
|
placeholder: SAMPLE_ENDPOINT,
|
|
@@ -1204,6 +1204,7 @@ var Target$i = function Target(_ref) {
|
|
|
1204
1204
|
weight: "normal",
|
|
1205
1205
|
children: separator
|
|
1206
1206
|
}), /*#__PURE__*/jsxRuntime.jsx(Button, {
|
|
1207
|
+
"data-testid": "custom-action-button-".concat(neetoCist.hyphenate(defaultLabel)),
|
|
1207
1208
|
label: defaultLabel.toLowerCase(),
|
|
1208
1209
|
style: "link",
|
|
1209
1210
|
className: classNames("neeto-ui-text-gray-800 neeto-ui-font-semibold underline", {
|
|
@@ -1260,7 +1261,7 @@ var Target$h = function Target(_ref) {
|
|
|
1260
1261
|
return /*#__PURE__*/jsxRuntime.jsxs(jsxRuntime.Fragment, {
|
|
1261
1262
|
children: [!selectedField.hideSeparator && /*#__PURE__*/jsxRuntime.jsx(Typography, {
|
|
1262
1263
|
className: "neeto-ui-text-gray-700",
|
|
1263
|
-
"data-
|
|
1264
|
+
"data-testid": "action-dropdown-seperator-text",
|
|
1264
1265
|
style: "h5",
|
|
1265
1266
|
weight: "normal",
|
|
1266
1267
|
children: separator
|
|
@@ -1381,7 +1382,7 @@ var EditorAction = function EditorAction(_ref) {
|
|
|
1381
1382
|
variables: variables,
|
|
1382
1383
|
hideSlashCommands: true,
|
|
1383
1384
|
className: "w-full",
|
|
1384
|
-
"data-
|
|
1385
|
+
"data-testid": "neeto-editor",
|
|
1385
1386
|
key: name,
|
|
1386
1387
|
ref: editorRef,
|
|
1387
1388
|
onChange: setEditorData
|
|
@@ -1427,12 +1428,12 @@ var Target$g = function Target(_ref) {
|
|
|
1427
1428
|
return /*#__PURE__*/jsxRuntime.jsxs(jsxRuntime.Fragment, {
|
|
1428
1429
|
children: [!selectedField.hideSeparator && /*#__PURE__*/jsxRuntime.jsx(Typography, {
|
|
1429
1430
|
className: "neeto-ui-text-gray-700",
|
|
1430
|
-
"data-
|
|
1431
|
+
"data-testid": "action-dropdown-seperator-text",
|
|
1431
1432
|
style: "h5",
|
|
1432
1433
|
weight: "normal",
|
|
1433
1434
|
children: separator
|
|
1434
1435
|
}), /*#__PURE__*/jsxRuntime.jsx(Button, {
|
|
1435
|
-
"data-
|
|
1436
|
+
"data-testid": "action-dropdown-button",
|
|
1436
1437
|
label: selectedOption === null || selectedOption === void 0 || (_selectedOption$label = selectedOption.label) === null || _selectedOption$label === void 0 ? void 0 : _selectedOption$label.toLowerCase(),
|
|
1437
1438
|
style: "link",
|
|
1438
1439
|
className: classNames("neeto-ui-text-gray-800 neeto-ui-font-semibold underline", {
|
|
@@ -1500,7 +1501,7 @@ var SelectField$2 = function SelectField(_ref2) {
|
|
|
1500
1501
|
onFocus: setFieldActive
|
|
1501
1502
|
})), handleSlackChannelRefresh && action.name === "message_to_slack" && /*#__PURE__*/jsxRuntime.jsx(Button, {
|
|
1502
1503
|
className: "mt-[22px]",
|
|
1503
|
-
"data-
|
|
1504
|
+
"data-testid": "refresh-slack-button",
|
|
1504
1505
|
icon: Refresh,
|
|
1505
1506
|
size: "medium",
|
|
1506
1507
|
style: "secondary",
|
|
@@ -1546,12 +1547,12 @@ var Target$f = function Target(_ref) {
|
|
|
1546
1547
|
return /*#__PURE__*/jsxRuntime.jsxs(jsxRuntime.Fragment, {
|
|
1547
1548
|
children: [/*#__PURE__*/jsxRuntime.jsx(Typography, {
|
|
1548
1549
|
className: "neeto-ui-text-gray-700",
|
|
1549
|
-
"data-
|
|
1550
|
+
"data-testid": "action-email-seperator-text",
|
|
1550
1551
|
style: "h5",
|
|
1551
1552
|
weight: "normal",
|
|
1552
1553
|
children: separator
|
|
1553
1554
|
}), /*#__PURE__*/jsxRuntime.jsx(Button, {
|
|
1554
|
-
"data-
|
|
1555
|
+
"data-testid": "email-action-button",
|
|
1555
1556
|
label: defaultLabel.toLowerCase(),
|
|
1556
1557
|
style: "link",
|
|
1557
1558
|
className: classNames("neeto-ui-text-gray-800 neeto-ui-font-semibold underline", {
|
|
@@ -1650,7 +1651,7 @@ var EmailFields = function EmailFields(_ref2) {
|
|
|
1650
1651
|
}), !selectedField.hideSubject && /*#__PURE__*/jsxRuntime.jsx(Input$2, {
|
|
1651
1652
|
required: true,
|
|
1652
1653
|
className: "mb-4",
|
|
1653
|
-
"data-
|
|
1654
|
+
"data-testid": "email-action-subject-text-field",
|
|
1654
1655
|
label: t("neetoRules.labels.subject"),
|
|
1655
1656
|
name: "".concat(name, ".subject"),
|
|
1656
1657
|
ref: isFirstFieldInForm("subject") ? initialFocusRef : null,
|
|
@@ -1698,13 +1699,13 @@ var Target$e = function Target(_ref) {
|
|
|
1698
1699
|
return /*#__PURE__*/jsxRuntime.jsxs(jsxRuntime.Fragment, {
|
|
1699
1700
|
children: [!selectedField.hideSeparator && /*#__PURE__*/jsxRuntime.jsx(Typography, {
|
|
1700
1701
|
className: "neeto-ui-text-gray-700 mt-1",
|
|
1701
|
-
"data-
|
|
1702
|
+
"data-testid": "action-dropdown-seperator-text",
|
|
1702
1703
|
style: "h5",
|
|
1703
1704
|
weight: "normal",
|
|
1704
1705
|
children: separator
|
|
1705
1706
|
}), /*#__PURE__*/jsxRuntime.jsx(Button, {
|
|
1706
1707
|
label: label,
|
|
1707
|
-
"data-
|
|
1708
|
+
"data-testid": "action-value-input-button",
|
|
1708
1709
|
style: "link",
|
|
1709
1710
|
className: classNames("neeto-ui-text-gray-800 neeto-ui-font-semibold underline", {
|
|
1710
1711
|
"neeto-ui-text-accent-800": isFieldActive,
|
|
@@ -1813,7 +1814,7 @@ var InlineInput = /*#__PURE__*/react.forwardRef(function (props, ref) {
|
|
|
1813
1814
|
autoFocus: true,
|
|
1814
1815
|
required: true,
|
|
1815
1816
|
className: "neeto-planner-inline-input",
|
|
1816
|
-
"data-
|
|
1817
|
+
"data-testid": "inline-input-field",
|
|
1817
1818
|
value: inputValue,
|
|
1818
1819
|
ref: function ref(node) {
|
|
1819
1820
|
inputFieldEscapeHotkeyRef.current = node;
|
|
@@ -1825,7 +1826,7 @@ var InlineInput = /*#__PURE__*/react.forwardRef(function (props, ref) {
|
|
|
1825
1826
|
}, otherProps), {}, {
|
|
1826
1827
|
suffix: /*#__PURE__*/jsxRuntime.jsxs(jsxRuntime.Fragment, {
|
|
1827
1828
|
children: [/*#__PURE__*/jsxRuntime.jsx(Button, {
|
|
1828
|
-
"data-
|
|
1829
|
+
"data-testid": "inline-input-submit-button",
|
|
1829
1830
|
disabled: !isValidValue,
|
|
1830
1831
|
icon: Check,
|
|
1831
1832
|
style: "text",
|
|
@@ -1833,7 +1834,7 @@ var InlineInput = /*#__PURE__*/react.forwardRef(function (props, ref) {
|
|
|
1833
1834
|
onClick: onSubmit
|
|
1834
1835
|
}), /*#__PURE__*/jsxRuntime.jsx(Button, {
|
|
1835
1836
|
ref: ref,
|
|
1836
|
-
"data-
|
|
1837
|
+
"data-testid": "inline-input-cancel-button",
|
|
1837
1838
|
icon: Close,
|
|
1838
1839
|
style: "text",
|
|
1839
1840
|
tooltipProps: LIST_FIELD_TOOLTIP_PROPS.cancel,
|
|
@@ -1869,12 +1870,12 @@ var Target$d = function Target(_ref) {
|
|
|
1869
1870
|
return /*#__PURE__*/jsxRuntime.jsxs(jsxRuntime.Fragment, {
|
|
1870
1871
|
children: [/*#__PURE__*/jsxRuntime.jsx(Typography, {
|
|
1871
1872
|
className: "neeto-ui-text-gray-700",
|
|
1872
|
-
"data-
|
|
1873
|
+
"data-testid": "list-action-separator-text",
|
|
1873
1874
|
style: "h5",
|
|
1874
1875
|
weight: "normal",
|
|
1875
1876
|
children: separator
|
|
1876
1877
|
}), /*#__PURE__*/jsxRuntime.jsx(Button, {
|
|
1877
|
-
"data-
|
|
1878
|
+
"data-testid": "list-action-button",
|
|
1878
1879
|
label: t("neetoRules.form.list"),
|
|
1879
1880
|
style: "link",
|
|
1880
1881
|
className: classNames("neeto-ui-text-gray-800 neeto-ui-font-semibold underline", {
|
|
@@ -1915,12 +1916,12 @@ var ListField = function ListField(_ref2) {
|
|
|
1915
1916
|
className: "neeto-ui-bg-white flex flex-wrap justify-between border border-dashed px-2 py-1",
|
|
1916
1917
|
children: [/*#__PURE__*/jsxRuntime.jsx(Typography, {
|
|
1917
1918
|
className: "w-4/5 overflow-x-auto",
|
|
1918
|
-
"data-
|
|
1919
|
+
"data-testid": "list-action-item-label",
|
|
1919
1920
|
style: "body2",
|
|
1920
1921
|
children: item
|
|
1921
1922
|
}), /*#__PURE__*/jsxRuntime.jsx(Button, {
|
|
1922
1923
|
className: "shrink-0",
|
|
1923
|
-
"data-
|
|
1924
|
+
"data-testid": "list-action-delete-item-button",
|
|
1924
1925
|
icon: Delete,
|
|
1925
1926
|
size: "medium",
|
|
1926
1927
|
style: "text",
|
|
@@ -1935,7 +1936,7 @@ var ListField = function ListField(_ref2) {
|
|
|
1935
1936
|
children: function children(message) {
|
|
1936
1937
|
return /*#__PURE__*/jsxRuntime.jsx(Typography, {
|
|
1937
1938
|
className: "neeto-ui-text-error-500 neeto-ui-text-gray-700",
|
|
1938
|
-
"data-
|
|
1939
|
+
"data-testid": "list-action-error-message",
|
|
1939
1940
|
style: "h5",
|
|
1940
1941
|
children: message
|
|
1941
1942
|
});
|
|
@@ -1949,7 +1950,7 @@ var ListField = function ListField(_ref2) {
|
|
|
1949
1950
|
}
|
|
1950
1951
|
}) : /*#__PURE__*/jsxRuntime.jsx(Button, {
|
|
1951
1952
|
ref: ref,
|
|
1952
|
-
"data-
|
|
1953
|
+
"data-testid": "list-action-add-item-button",
|
|
1953
1954
|
icon: Plus,
|
|
1954
1955
|
label: t("neetoRules.common.addItem"),
|
|
1955
1956
|
size: "medium",
|
|
@@ -1996,7 +1997,7 @@ var Target$c = function Target(_ref) {
|
|
|
1996
1997
|
return /*#__PURE__*/jsxRuntime.jsxs(jsxRuntime.Fragment, {
|
|
1997
1998
|
children: [!selectedField.hideSeparator && /*#__PURE__*/jsxRuntime.jsx(Typography, {
|
|
1998
1999
|
className: "neeto-ui-text-gray-700",
|
|
1999
|
-
"data-
|
|
2000
|
+
"data-testid": "multi-select-action-separator-text",
|
|
2000
2001
|
style: "h5",
|
|
2001
2002
|
weight: "normal",
|
|
2002
2003
|
children: separator
|
|
@@ -2016,7 +2017,7 @@ var Target$c = function Target(_ref) {
|
|
|
2016
2017
|
what: ""
|
|
2017
2018
|
})
|
|
2018
2019
|
}), /*#__PURE__*/jsxRuntime.jsx(Button, {
|
|
2019
|
-
"data-
|
|
2020
|
+
"data-testid": "multi-select-action-button",
|
|
2020
2021
|
label: option === null || option === void 0 ? void 0 : option.label.toLowerCase(),
|
|
2021
2022
|
style: "link",
|
|
2022
2023
|
className: classNames("neeto-ui-text-gray-800 neeto-ui-font-semibold underline", {
|
|
@@ -2125,7 +2126,7 @@ var Target$b = function Target(_ref) {
|
|
|
2125
2126
|
return /*#__PURE__*/jsxRuntime.jsxs(jsxRuntime.Fragment, {
|
|
2126
2127
|
children: [!selectedField.hideSeparator && /*#__PURE__*/jsxRuntime.jsx(Typography, {
|
|
2127
2128
|
className: "neeto-ui-text-gray-700",
|
|
2128
|
-
"data-
|
|
2129
|
+
"data-testid": "multi-select-action-separator-text",
|
|
2129
2130
|
style: "h5",
|
|
2130
2131
|
weight: "normal",
|
|
2131
2132
|
children: separator
|
|
@@ -2145,7 +2146,7 @@ var Target$b = function Target(_ref) {
|
|
|
2145
2146
|
what: ""
|
|
2146
2147
|
})
|
|
2147
2148
|
}), /*#__PURE__*/jsxRuntime.jsx(Button, {
|
|
2148
|
-
"data-
|
|
2149
|
+
"data-testid": "multi-select-action-button",
|
|
2149
2150
|
label: option === null || option === void 0 ? void 0 : option.label.toLowerCase(),
|
|
2150
2151
|
style: "link",
|
|
2151
2152
|
className: classNames("neeto-ui-text-gray-800 neeto-ui-font-semibold underline", {
|
|
@@ -2211,7 +2212,7 @@ var MultiSelectCheckbox$1 = function MultiSelectCheckbox(_ref2) {
|
|
|
2211
2212
|
return /*#__PURE__*/react.createElement(Checkbox, {
|
|
2212
2213
|
ref: ref,
|
|
2213
2214
|
checked: selectedOptions === null || selectedOptions === void 0 ? void 0 : selectedOptions.includes(option.value),
|
|
2214
|
-
"data-
|
|
2215
|
+
"data-testid": "".concat(utils.joinHyphenCase(option.label), "-checkbox"),
|
|
2215
2216
|
id: option.value,
|
|
2216
2217
|
key: option.value,
|
|
2217
2218
|
label: option.label,
|
|
@@ -2255,12 +2256,12 @@ var Target$a = function Target(_ref) {
|
|
|
2255
2256
|
return /*#__PURE__*/jsxRuntime.jsxs(jsxRuntime.Fragment, {
|
|
2256
2257
|
children: [/*#__PURE__*/jsxRuntime.jsx(Typography, {
|
|
2257
2258
|
className: "neeto-ui-text-gray-700",
|
|
2258
|
-
"data-
|
|
2259
|
+
"data-testid": "note-action-separator-text",
|
|
2259
2260
|
style: "h5",
|
|
2260
2261
|
weight: "normal",
|
|
2261
2262
|
children: separator
|
|
2262
2263
|
}), /*#__PURE__*/jsxRuntime.jsx(Button, {
|
|
2263
|
-
"data-
|
|
2264
|
+
"data-testid": "note-action-button",
|
|
2264
2265
|
label: defaultLabel.toLowerCase(),
|
|
2265
2266
|
style: "link",
|
|
2266
2267
|
className: classNames("neeto-ui-text-gray-800 neeto-ui-font-semibold underline", {
|
|
@@ -2335,12 +2336,12 @@ var Target$9 = function Target(_ref) {
|
|
|
2335
2336
|
return /*#__PURE__*/jsxRuntime.jsxs(jsxRuntime.Fragment, {
|
|
2336
2337
|
children: [!selectedField.hideSeparator && /*#__PURE__*/jsxRuntime.jsx(Typography, {
|
|
2337
2338
|
className: "neeto-ui-text-gray-700",
|
|
2338
|
-
"data-
|
|
2339
|
+
"data-testid": "action-radio-seperator-text",
|
|
2339
2340
|
style: "h5",
|
|
2340
2341
|
weight: "normal",
|
|
2341
2342
|
children: separator
|
|
2342
2343
|
}), /*#__PURE__*/jsxRuntime.jsx(Button, {
|
|
2343
|
-
"data-
|
|
2344
|
+
"data-testid": "action-radio-button",
|
|
2344
2345
|
label: selectedOption === null || selectedOption === void 0 || (_selectedOption$label = selectedOption.label) === null || _selectedOption$label === void 0 ? void 0 : _selectedOption$label.toLowerCase(),
|
|
2345
2346
|
style: "link",
|
|
2346
2347
|
className: classNames("neeto-ui-text-gray-800 neeto-ui-font-semibold underline", {
|
|
@@ -2468,7 +2469,7 @@ var STYLES = {
|
|
|
2468
2469
|
};
|
|
2469
2470
|
var MultiValueRemove = function MultiValueRemove(props) {
|
|
2470
2471
|
return /*#__PURE__*/jsxRuntime.jsx(reactSelect.components.MultiValueRemove, _objectSpread$m(_objectSpread$m({}, props), {}, {
|
|
2471
|
-
innerProps: _objectSpread$m(_objectSpread$m({}, props.innerProps), {}, _defineProperty({}, "data-
|
|
2472
|
+
innerProps: _objectSpread$m(_objectSpread$m({}, props.innerProps), {}, _defineProperty({}, "data-testid", "".concat(dasherize(props.data.label), "-remove-icon"))),
|
|
2472
2473
|
children: /*#__PURE__*/jsxRuntime.jsx(Close, {
|
|
2473
2474
|
size: 16
|
|
2474
2475
|
})
|
|
@@ -2489,7 +2490,7 @@ var ValueContainer = function ValueContainer(_ref) {
|
|
|
2489
2490
|
rest = _children.slice(1);
|
|
2490
2491
|
var shouldCollapse = !isFocused && value.length > visiblePhoneNumbersCount;
|
|
2491
2492
|
return /*#__PURE__*/jsxRuntime.jsxs(reactSelect.components.ValueContainer, _objectSpread$m(_objectSpread$m({}, props), {}, {
|
|
2492
|
-
innerProps: _objectSpread$m(_objectSpread$m({}, props.innerProps), {}, _defineProperty({}, "data-
|
|
2493
|
+
innerProps: _objectSpread$m(_objectSpread$m({}, props.innerProps), {}, _defineProperty({}, "data-testid", "multi-phone-number-input-container")),
|
|
2493
2494
|
children: [shouldCollapse ? firstChild.slice(0, visiblePhoneNumbersCount) : firstChild, shouldCollapse && /*#__PURE__*/jsxRuntime.jsx(Tag, {
|
|
2494
2495
|
style: "secondary",
|
|
2495
2496
|
label: t("neetoRules.labels.remainingItemsCount", {
|
|
@@ -2500,7 +2501,7 @@ var ValueContainer = function ValueContainer(_ref) {
|
|
|
2500
2501
|
};
|
|
2501
2502
|
var ClearIndicator = function ClearIndicator(props) {
|
|
2502
2503
|
return /*#__PURE__*/jsxRuntime.jsx(reactSelect.components.ClearIndicator, _objectSpread$m(_objectSpread$m({}, props), {}, {
|
|
2503
|
-
innerProps: _objectSpread$m(_objectSpread$m({}, props.innerProps), {}, _defineProperty({}, "data-
|
|
2504
|
+
innerProps: _objectSpread$m(_objectSpread$m({}, props.innerProps), {}, _defineProperty({}, "data-testid", "clear-all-button")),
|
|
2504
2505
|
children: /*#__PURE__*/jsxRuntime.jsx(Close, {
|
|
2505
2506
|
className: "cursor-pointer",
|
|
2506
2507
|
size: 16
|
|
@@ -2591,7 +2592,7 @@ var MultiPhoneNumberInput = /*#__PURE__*/react.forwardRef(function (_ref, ref) {
|
|
|
2591
2592
|
children: /*#__PURE__*/jsxRuntime.jsx(Label, {
|
|
2592
2593
|
required: true,
|
|
2593
2594
|
className: "neeto-ui-email-input__label",
|
|
2594
|
-
"data-
|
|
2595
|
+
"data-testid": "".concat(dasherize(label), "-input-label"),
|
|
2595
2596
|
children: label
|
|
2596
2597
|
})
|
|
2597
2598
|
}), /*#__PURE__*/jsxRuntime.jsx(CreatableSelect, _objectSpread$l({
|
|
@@ -2627,7 +2628,7 @@ var MultiPhoneNumberInput = /*#__PURE__*/react.forwardRef(function (_ref, ref) {
|
|
|
2627
2628
|
value: value
|
|
2628
2629
|
}, otherProps))), !!error && /*#__PURE__*/jsxRuntime.jsxs("p", {
|
|
2629
2630
|
className: "neeto-ui-input__error",
|
|
2630
|
-
"data-
|
|
2631
|
+
"data-testid": "".concat(dasherize(label), "-input-error"),
|
|
2631
2632
|
children: [formatErrorMessage(error), isFilterPhoneNumbersLinkVisible && /*#__PURE__*/jsxRuntime.jsxs("span", {
|
|
2632
2633
|
className: "neeto-ui-font-semibold cursor-pointer",
|
|
2633
2634
|
onClick: handleFilterPhoneNumbers,
|
|
@@ -2635,7 +2636,7 @@ var MultiPhoneNumberInput = /*#__PURE__*/react.forwardRef(function (_ref, ref) {
|
|
|
2635
2636
|
})]
|
|
2636
2637
|
}), /*#__PURE__*/jsxRuntime.jsx("p", {
|
|
2637
2638
|
className: "neeto-ui-input__help-text",
|
|
2638
|
-
"data-
|
|
2639
|
+
"data-testid": "".concat(dasherize(label), "-input-help"),
|
|
2639
2640
|
children: t("neetoRules.helpTexts.phoneNumber")
|
|
2640
2641
|
})]
|
|
2641
2642
|
});
|
|
@@ -2710,12 +2711,12 @@ var Target$8 = function Target(_ref) {
|
|
|
2710
2711
|
return /*#__PURE__*/jsxRuntime.jsxs(jsxRuntime.Fragment, {
|
|
2711
2712
|
children: [/*#__PURE__*/jsxRuntime.jsx(Typography, {
|
|
2712
2713
|
className: "neeto-ui-text-gray-700",
|
|
2713
|
-
"data-
|
|
2714
|
+
"data-testid": "sms-action-separator-text",
|
|
2714
2715
|
style: "h5",
|
|
2715
2716
|
weight: "normal",
|
|
2716
2717
|
children: separator
|
|
2717
2718
|
}), /*#__PURE__*/jsxRuntime.jsx(Button, {
|
|
2718
|
-
"data-
|
|
2719
|
+
"data-testid": "sms-action-button",
|
|
2719
2720
|
label: defaultLabel.toLowerCase(),
|
|
2720
2721
|
style: "link",
|
|
2721
2722
|
className: classNames("neeto-ui-text-gray-800 neeto-ui-font-semibold underline", {
|
|
@@ -3249,7 +3250,7 @@ var ActionSubItemPanel = function ActionSubItemPanel() {
|
|
|
3249
3250
|
className: "flex items-center space-x-2",
|
|
3250
3251
|
children: [/*#__PURE__*/jsxRuntime.jsx(Button, {
|
|
3251
3252
|
className: "shrink-0 rtl:rotate-180",
|
|
3252
|
-
"data-
|
|
3253
|
+
"data-testid": "back-button",
|
|
3253
3254
|
icon: Left,
|
|
3254
3255
|
size: "medium",
|
|
3255
3256
|
style: "text",
|
|
@@ -3267,12 +3268,12 @@ var ActionSubItemPanel = function ActionSubItemPanel() {
|
|
|
3267
3268
|
}));
|
|
3268
3269
|
}
|
|
3269
3270
|
}), /*#__PURE__*/jsxRuntime.jsx(Typography, {
|
|
3270
|
-
"data-
|
|
3271
|
+
"data-testid": "action-sub-item-title",
|
|
3271
3272
|
style: "h3",
|
|
3272
3273
|
children: header
|
|
3273
3274
|
})]
|
|
3274
3275
|
}), /*#__PURE__*/jsxRuntime.jsx(Typography, {
|
|
3275
|
-
"data-
|
|
3276
|
+
"data-testid": "action-sub-item-description",
|
|
3276
3277
|
style: "body2",
|
|
3277
3278
|
children: t("neetoRules.form.addActionSubItemDescription")
|
|
3278
3279
|
})]
|
|
@@ -3301,7 +3302,7 @@ var ActionSubItemPanel = function ActionSubItemPanel() {
|
|
|
3301
3302
|
})]
|
|
3302
3303
|
}), /*#__PURE__*/jsxRuntime.jsx(Panel.Footer, {
|
|
3303
3304
|
children: /*#__PURE__*/jsxRuntime.jsx(Button, {
|
|
3304
|
-
"data-
|
|
3305
|
+
"data-testid": "continue-button",
|
|
3305
3306
|
onClick: handleContinue,
|
|
3306
3307
|
children: t("neetoRules.buttons.continue")
|
|
3307
3308
|
})
|
|
@@ -3337,6 +3338,7 @@ var Target$7 = function Target(_ref) {
|
|
|
3337
3338
|
var isFieldInvalid = meta.touched && meta.error;
|
|
3338
3339
|
return /*#__PURE__*/jsxRuntime.jsx(Button, {
|
|
3339
3340
|
label: label,
|
|
3341
|
+
"data-testid": "condition-value-select-date-button",
|
|
3340
3342
|
style: "link",
|
|
3341
3343
|
className: classNames("neeto-ui-text-gray-800 neeto-ui-font-semibold underline", {
|
|
3342
3344
|
"neeto-ui-text-accent-800": isFieldActive,
|
|
@@ -3432,7 +3434,7 @@ var Target$6 = function Target(_ref) {
|
|
|
3432
3434
|
var label = valueTerm !== null && valueTerm !== void 0 && valueTerm.trim().length ? valueTerm : t("neetoRules.form.addValue");
|
|
3433
3435
|
return /*#__PURE__*/jsxRuntime.jsx(Button, {
|
|
3434
3436
|
label: label,
|
|
3435
|
-
"data-
|
|
3437
|
+
"data-testid": "condition-value-input-button",
|
|
3436
3438
|
style: "link",
|
|
3437
3439
|
className: classNames("neeto-ui-text-gray-800 neeto-ui-font-semibold underline", {
|
|
3438
3440
|
"neeto-ui-text-accent-800": isFieldActive,
|
|
@@ -3510,7 +3512,7 @@ var Target$5 = function Target(_ref) {
|
|
|
3510
3512
|
weight: "normal",
|
|
3511
3513
|
children: t("neetoRules.common.or")
|
|
3512
3514
|
}), /*#__PURE__*/jsxRuntime.jsx(Button, {
|
|
3513
|
-
"data-
|
|
3515
|
+
"data-testid": "condition-value-multi-select-field",
|
|
3514
3516
|
label: option === null || option === void 0 || (_option$label = option.label) === null || _option$label === void 0 ? void 0 : _option$label.toLowerCase(),
|
|
3515
3517
|
style: "link",
|
|
3516
3518
|
className: classNames("neeto-ui-text-gray-800 neeto-ui-font-semibold underline", {
|
|
@@ -3525,7 +3527,7 @@ var Target$5 = function Target(_ref) {
|
|
|
3525
3527
|
}, idx);
|
|
3526
3528
|
})
|
|
3527
3529
|
}) : /*#__PURE__*/jsxRuntime.jsx(Button, {
|
|
3528
|
-
"data-
|
|
3530
|
+
"data-testid": "condition-value-multi-select-field",
|
|
3529
3531
|
label: defaultLabel,
|
|
3530
3532
|
style: "link",
|
|
3531
3533
|
className: classNames("neeto-ui-text-gray-800 neeto-ui-font-semibold underline", {
|
|
@@ -3618,7 +3620,7 @@ var Target$4 = function Target(_ref) {
|
|
|
3618
3620
|
weight: "normal",
|
|
3619
3621
|
children: t("neetoRules.common.or")
|
|
3620
3622
|
}), /*#__PURE__*/jsxRuntime.jsx(Button, {
|
|
3621
|
-
"data-
|
|
3623
|
+
"data-testid": "condition-value-multi-select-field",
|
|
3622
3624
|
label: option === null || option === void 0 || (_option$label = option.label) === null || _option$label === void 0 ? void 0 : _option$label.toLowerCase(),
|
|
3623
3625
|
style: "link",
|
|
3624
3626
|
className: classNames("neeto-ui-text-gray-800 neeto-ui-font-semibold underline", {
|
|
@@ -3633,7 +3635,7 @@ var Target$4 = function Target(_ref) {
|
|
|
3633
3635
|
}, idx);
|
|
3634
3636
|
})
|
|
3635
3637
|
}) : /*#__PURE__*/jsxRuntime.jsx(Button, {
|
|
3636
|
-
"data-
|
|
3638
|
+
"data-testid": "condition-value-multi-select-field",
|
|
3637
3639
|
label: defaultLabel,
|
|
3638
3640
|
style: "link",
|
|
3639
3641
|
className: classNames("neeto-ui-text-gray-800 neeto-ui-font-semibold underline", {
|
|
@@ -3685,7 +3687,7 @@ var MultiSelectCheckbox = function MultiSelectCheckbox(_ref2) {
|
|
|
3685
3687
|
return /*#__PURE__*/react.createElement(Checkbox, _objectSpread$i({
|
|
3686
3688
|
ref: ref,
|
|
3687
3689
|
checked: selectedOptions === null || selectedOptions === void 0 ? void 0 : selectedOptions.includes(option.value),
|
|
3688
|
-
"data-
|
|
3690
|
+
"data-testid": "".concat(utils.joinHyphenCase(option.label), "-checkbox"),
|
|
3689
3691
|
id: option.value,
|
|
3690
3692
|
key: option.value,
|
|
3691
3693
|
label: option.label,
|
|
@@ -3773,7 +3775,7 @@ var Target$3 = function Target(_ref) {
|
|
|
3773
3775
|
weight: "normal",
|
|
3774
3776
|
children: t("neetoRules.common.or")
|
|
3775
3777
|
}), /*#__PURE__*/jsxRuntime.jsx(Button, {
|
|
3776
|
-
"data-
|
|
3778
|
+
"data-testid": "condition-value-multi-select-field",
|
|
3777
3779
|
label: option === null || option === void 0 || (_option$label = option.label) === null || _option$label === void 0 ? void 0 : _option$label.toLowerCase(),
|
|
3778
3780
|
style: "link",
|
|
3779
3781
|
className: classNames("neeto-ui-text-gray-800 neeto-ui-font-semibold underline", {
|
|
@@ -3788,7 +3790,7 @@ var Target$3 = function Target(_ref) {
|
|
|
3788
3790
|
}, idx);
|
|
3789
3791
|
})
|
|
3790
3792
|
}) : /*#__PURE__*/jsxRuntime.jsx(Button, {
|
|
3791
|
-
"data-
|
|
3793
|
+
"data-testid": "condition-value-multi-select-field",
|
|
3792
3794
|
label: defaultLabel,
|
|
3793
3795
|
style: "link",
|
|
3794
3796
|
className: classNames("neeto-ui-text-gray-800 neeto-ui-font-semibold underline", {
|
|
@@ -3832,7 +3834,7 @@ var MultiSelectCreate = function MultiSelectCreate(_ref2) {
|
|
|
3832
3834
|
isCreateable: true,
|
|
3833
3835
|
isMulti: true,
|
|
3834
3836
|
className: "mt-4 w-full",
|
|
3835
|
-
"data-
|
|
3837
|
+
"data-testid": "multi-select-create-container",
|
|
3836
3838
|
innerRef: ref,
|
|
3837
3839
|
label: t("neetoRules.labels.selectValues"),
|
|
3838
3840
|
placeholder: t("neetoRules.placeholders.multiSelect"),
|
|
@@ -3876,7 +3878,7 @@ var Target$2 = function Target(_ref) {
|
|
|
3876
3878
|
};
|
|
3877
3879
|
}, [field.value, options]);
|
|
3878
3880
|
return /*#__PURE__*/jsxRuntime.jsx(Button, _objectSpread$h({
|
|
3879
|
-
"data-
|
|
3881
|
+
"data-testid": "condition-value-dropdown-button",
|
|
3880
3882
|
label: selectedOption === null || selectedOption === void 0 || (_selectedOption$label = selectedOption.label) === null || _selectedOption$label === void 0 ? void 0 : _selectedOption$label.toLowerCase(),
|
|
3881
3883
|
style: "link",
|
|
3882
3884
|
className: classNames("neeto-ui-text-gray-800 neeto-ui-font-semibold underline", {
|
|
@@ -3935,7 +3937,7 @@ var RadioField$1 = function RadioField(_ref2) {
|
|
|
3935
3937
|
className: "w-full",
|
|
3936
3938
|
children: [isSearchable && /*#__PURE__*/jsxRuntime.jsx(StickySidebarHeader, {
|
|
3937
3939
|
children: /*#__PURE__*/jsxRuntime.jsx(Input$1, {
|
|
3938
|
-
"data-
|
|
3940
|
+
"data-testid": "search-text-field",
|
|
3939
3941
|
placeholder: t("neetoRules.common.search"),
|
|
3940
3942
|
prefix: /*#__PURE__*/jsxRuntime.jsx(Search, {}),
|
|
3941
3943
|
value: searchTerm,
|
|
@@ -3966,7 +3968,7 @@ var RadioField$1 = function RadioField(_ref2) {
|
|
|
3966
3968
|
})
|
|
3967
3969
|
})) : /*#__PURE__*/jsxRuntime.jsx("div", {
|
|
3968
3970
|
className: "py-1 text-sm",
|
|
3969
|
-
"data-
|
|
3971
|
+
"data-testid": "no-options-menu-item",
|
|
3970
3972
|
children: t("neetoRules.common.noOptions")
|
|
3971
3973
|
})]
|
|
3972
3974
|
});
|
|
@@ -3980,8 +3982,8 @@ var Target$1 = function Target(_ref) {
|
|
|
3980
3982
|
placeholder = _ref.placeholder,
|
|
3981
3983
|
_ref$onClick = _ref.onClick,
|
|
3982
3984
|
_onClick = _ref$onClick === void 0 ? neetoCist.noop : _ref$onClick,
|
|
3983
|
-
_ref$
|
|
3984
|
-
|
|
3985
|
+
_ref$dataTestid = _ref.dataTestid,
|
|
3986
|
+
dataTestid = _ref$dataTestid === void 0 ? "condition-verb-dropdown-button" : _ref$dataTestid;
|
|
3985
3987
|
var _useTranslation = reactI18next.useTranslation(),
|
|
3986
3988
|
t = _useTranslation.t;
|
|
3987
3989
|
var _useField = formik.useField(name),
|
|
@@ -4003,7 +4005,7 @@ var Target$1 = function Target(_ref) {
|
|
|
4003
4005
|
};
|
|
4004
4006
|
}, [field.value, dropdownOptions]);
|
|
4005
4007
|
return /*#__PURE__*/jsxRuntime.jsx(Button, {
|
|
4006
|
-
"data-
|
|
4008
|
+
"data-testid": dataTestid,
|
|
4007
4009
|
label: selectedOption === null || selectedOption === void 0 || (_selectedOption$label = selectedOption.label) === null || _selectedOption$label === void 0 ? void 0 : _selectedOption$label.toLowerCase(),
|
|
4008
4010
|
style: "link",
|
|
4009
4011
|
className: classNames("neeto-ui-text-gray-800 neeto-ui-font-semibold underline", {
|
|
@@ -4094,6 +4096,7 @@ var Target = function Target(_ref) {
|
|
|
4094
4096
|
var isFieldInvalid = meta.touched && meta.error;
|
|
4095
4097
|
return /*#__PURE__*/jsxRuntime.jsx(Button, {
|
|
4096
4098
|
label: label,
|
|
4099
|
+
"data-testid": "condition-value-select-time-button",
|
|
4097
4100
|
style: "link",
|
|
4098
4101
|
className: classNames("neeto-ui-text-gray-800 neeto-ui-font-semibold underline", {
|
|
4099
4102
|
"neeto-ui-text-accent-800": isFieldActive,
|
|
@@ -4214,11 +4217,11 @@ var FieldPanel = function FieldPanel() {
|
|
|
4214
4217
|
children: /*#__PURE__*/jsxRuntime.jsxs("div", {
|
|
4215
4218
|
className: "flex flex-col space-y-2",
|
|
4216
4219
|
children: [/*#__PURE__*/jsxRuntime.jsxs(Typography, {
|
|
4217
|
-
"data-
|
|
4220
|
+
"data-testid": "condition-title",
|
|
4218
4221
|
style: "h3",
|
|
4219
4222
|
children: [index ? logicalOperatorLabel : conditionLabel, "..."]
|
|
4220
4223
|
}), /*#__PURE__*/jsxRuntime.jsx(Typography, {
|
|
4221
|
-
"data-
|
|
4224
|
+
"data-testid": "condition-description",
|
|
4222
4225
|
style: "body2",
|
|
4223
4226
|
children: t("neetoRules.form.addConditionDescription")
|
|
4224
4227
|
})]
|
|
@@ -4238,7 +4241,7 @@ var FieldPanel = function FieldPanel() {
|
|
|
4238
4241
|
})
|
|
4239
4242
|
}), /*#__PURE__*/jsxRuntime.jsx(Panel.Footer, {
|
|
4240
4243
|
children: /*#__PURE__*/jsxRuntime.jsx(Button, {
|
|
4241
|
-
"data-
|
|
4244
|
+
"data-testid": "continue-button",
|
|
4242
4245
|
onClick: handleContinue,
|
|
4243
4246
|
children: t("neetoRules.buttons.continue")
|
|
4244
4247
|
})
|
|
@@ -4304,7 +4307,7 @@ var ValueField = function ValueField(_ref) {
|
|
|
4304
4307
|
if (fieldType === constants.CONDITION_VALUE_TYPES.select || fieldType === constants.CONDITION_VALUE_TYPES.dropdown) {
|
|
4305
4308
|
return isTarget ? /*#__PURE__*/jsxRuntime.jsx(SelectField$1.Target, {
|
|
4306
4309
|
onClick: onClick,
|
|
4307
|
-
|
|
4310
|
+
dataTestid: "select-value-dropdown-button",
|
|
4308
4311
|
dropdownOptions: options,
|
|
4309
4312
|
name: "".concat(name, ".value")
|
|
4310
4313
|
}) : /*#__PURE__*/jsxRuntime.jsx(SelectField$1, {
|
|
@@ -4457,12 +4460,12 @@ var VerbAndValuePanel = function VerbAndValuePanel() {
|
|
|
4457
4460
|
}));
|
|
4458
4461
|
}
|
|
4459
4462
|
}), /*#__PURE__*/jsxRuntime.jsxs(Typography, {
|
|
4460
|
-
"data-
|
|
4463
|
+
"data-testid": "condition-verb-and-value-title",
|
|
4461
4464
|
style: "h3",
|
|
4462
4465
|
children: [index ? logicalOperatorLabel : conditionLabel, " ", fieldLabel, "..."]
|
|
4463
4466
|
})]
|
|
4464
4467
|
}), /*#__PURE__*/jsxRuntime.jsx(Typography, {
|
|
4465
|
-
"data-
|
|
4468
|
+
"data-testid": "condition-verb-and-value-description",
|
|
4466
4469
|
style: "body2",
|
|
4467
4470
|
children: t("neetoRules.form.addConditionVerbAndValueDescription")
|
|
4468
4471
|
})]
|
|
@@ -4487,7 +4490,7 @@ var VerbAndValuePanel = function VerbAndValuePanel() {
|
|
|
4487
4490
|
})
|
|
4488
4491
|
}), /*#__PURE__*/jsxRuntime.jsx(Panel.Footer, {
|
|
4489
4492
|
children: /*#__PURE__*/jsxRuntime.jsx(Button, {
|
|
4490
|
-
"data-
|
|
4493
|
+
"data-testid": "continue-button",
|
|
4491
4494
|
onClick: handleContinue,
|
|
4492
4495
|
children: t("neetoRules.buttons.continue")
|
|
4493
4496
|
})
|
|
@@ -4792,11 +4795,11 @@ var EventsPanel = function EventsPanel() {
|
|
|
4792
4795
|
children: /*#__PURE__*/jsxRuntime.jsxs("div", {
|
|
4793
4796
|
className: "flex flex-col space-y-2",
|
|
4794
4797
|
children: [/*#__PURE__*/jsxRuntime.jsxs(Typography, {
|
|
4795
|
-
"data-
|
|
4798
|
+
"data-testid": "event-title",
|
|
4796
4799
|
style: "h3",
|
|
4797
4800
|
children: [t("neetoRules.common.when"), "..."]
|
|
4798
4801
|
}), /*#__PURE__*/jsxRuntime.jsx(Typography, {
|
|
4799
|
-
"data-
|
|
4802
|
+
"data-testid": "event-description",
|
|
4800
4803
|
style: "body2",
|
|
4801
4804
|
children: t("neetoRules.form.addEventDescription")
|
|
4802
4805
|
})]
|
|
@@ -4807,7 +4810,7 @@ var EventsPanel = function EventsPanel() {
|
|
|
4807
4810
|
}),
|
|
4808
4811
|
children: [isSearchable && /*#__PURE__*/jsxRuntime.jsx(StickySidebarHeader, {
|
|
4809
4812
|
children: /*#__PURE__*/jsxRuntime.jsx(Input$1, {
|
|
4810
|
-
"data-
|
|
4813
|
+
"data-testid": "search-text-field",
|
|
4811
4814
|
placeholder: t("neetoRules.common.search"),
|
|
4812
4815
|
prefix: /*#__PURE__*/jsxRuntime.jsx(Search, {}),
|
|
4813
4816
|
value: searchTerm,
|
|
@@ -4829,7 +4832,7 @@ var EventsPanel = function EventsPanel() {
|
|
|
4829
4832
|
ref: ref,
|
|
4830
4833
|
onFocus: setFieldActive
|
|
4831
4834
|
} : {}), {}, {
|
|
4832
|
-
"data-
|
|
4835
|
+
"data-testid": "".concat(utils.joinHyphenCase(option.label), "-radio"),
|
|
4833
4836
|
key: option.value,
|
|
4834
4837
|
label: option.label,
|
|
4835
4838
|
value: option.value
|
|
@@ -4840,7 +4843,7 @@ var EventsPanel = function EventsPanel() {
|
|
|
4840
4843
|
ref: ref
|
|
4841
4844
|
} : {}), {}, {
|
|
4842
4845
|
checked: eventNames === null || eventNames === void 0 ? void 0 : eventNames.includes(option.value),
|
|
4843
|
-
"data-
|
|
4846
|
+
"data-testid": "".concat(utils.joinHyphenCase(option.label), "-checkbox"),
|
|
4844
4847
|
id: option.value,
|
|
4845
4848
|
key: option.value,
|
|
4846
4849
|
label: option.label,
|
|
@@ -4851,17 +4854,17 @@ var EventsPanel = function EventsPanel() {
|
|
|
4851
4854
|
}));
|
|
4852
4855
|
}) : /*#__PURE__*/jsxRuntime.jsx("div", {
|
|
4853
4856
|
className: "py-1 text-sm",
|
|
4854
|
-
"data-
|
|
4857
|
+
"data-testid": "no-options-menu-item",
|
|
4855
4858
|
children: t("neetoRules.common.noOptions")
|
|
4856
4859
|
}), error && touched && /*#__PURE__*/jsxRuntime.jsx("div", {
|
|
4857
4860
|
className: "neeto-ui-input__error",
|
|
4858
|
-
"data-
|
|
4861
|
+
"data-testid": "event-field-input-error",
|
|
4859
4862
|
children: error
|
|
4860
4863
|
})]
|
|
4861
4864
|
})]
|
|
4862
4865
|
}), /*#__PURE__*/jsxRuntime.jsx(Panel.Footer, {
|
|
4863
4866
|
children: /*#__PURE__*/jsxRuntime.jsx(Button, {
|
|
4864
|
-
"data-
|
|
4867
|
+
"data-testid": "continue-button",
|
|
4865
4868
|
onClick: handleContinue,
|
|
4866
4869
|
children: t("neetoRules.buttons.continue")
|
|
4867
4870
|
})
|
|
@@ -4934,7 +4937,7 @@ var PerformerPanel = function PerformerPanel() {
|
|
|
4934
4937
|
className: "flex items-center space-x-2",
|
|
4935
4938
|
children: [/*#__PURE__*/jsxRuntime.jsx(Button, {
|
|
4936
4939
|
className: "shrink-0 rtl:rotate-180",
|
|
4937
|
-
"data-
|
|
4940
|
+
"data-testid": "back-button",
|
|
4938
4941
|
icon: Left,
|
|
4939
4942
|
size: "medium",
|
|
4940
4943
|
style: "text",
|
|
@@ -4951,12 +4954,12 @@ var PerformerPanel = function PerformerPanel() {
|
|
|
4951
4954
|
}));
|
|
4952
4955
|
}
|
|
4953
4956
|
}), /*#__PURE__*/jsxRuntime.jsxs(Typography, {
|
|
4954
|
-
"data-
|
|
4957
|
+
"data-testid": "performer-title",
|
|
4955
4958
|
style: "h3",
|
|
4956
4959
|
children: [t("neetoRules.form.actionTriggeredBy"), "..."]
|
|
4957
4960
|
})]
|
|
4958
4961
|
}), /*#__PURE__*/jsxRuntime.jsx(Typography, {
|
|
4959
|
-
"data-
|
|
4962
|
+
"data-testid": "performer-description",
|
|
4960
4963
|
style: "body2",
|
|
4961
4964
|
children: t("neetoRules.form.addPerformerDescription")
|
|
4962
4965
|
})]
|
|
@@ -4983,7 +4986,7 @@ var PerformerPanel = function PerformerPanel() {
|
|
|
4983
4986
|
})
|
|
4984
4987
|
}), /*#__PURE__*/jsxRuntime.jsx(Panel.Footer, {
|
|
4985
4988
|
children: /*#__PURE__*/jsxRuntime.jsx(Button, {
|
|
4986
|
-
"data-
|
|
4989
|
+
"data-testid": "continue-button",
|
|
4987
4990
|
onClick: handleContinue,
|
|
4988
4991
|
children: t("neetoRules.buttons.continue")
|
|
4989
4992
|
})
|
|
@@ -5519,7 +5522,7 @@ var ActionItem = function ActionItem(_ref) {
|
|
|
5519
5522
|
weight: "normal",
|
|
5520
5523
|
children: label
|
|
5521
5524
|
}), /*#__PURE__*/jsxRuntime.jsx(Button, {
|
|
5522
|
-
"data-
|
|
5525
|
+
"data-testid": "action-dropdown-button",
|
|
5523
5526
|
label: selectedLabel.toLowerCase(),
|
|
5524
5527
|
style: "link",
|
|
5525
5528
|
className: classNames("neeto-ui-text-gray-800 neeto-ui-font-semibold underline", {
|
|
@@ -5555,7 +5558,7 @@ var Card = function Card(_ref) {
|
|
|
5555
5558
|
return /*#__PURE__*/jsxRuntime.jsxs("div", {
|
|
5556
5559
|
children: [/*#__PURE__*/jsxRuntime.jsx(Typography, {
|
|
5557
5560
|
className: "neeto-ui-text-gray-600",
|
|
5558
|
-
"data-
|
|
5561
|
+
"data-testid": "".concat(utils.joinHyphenCase(title), "-card-title"),
|
|
5559
5562
|
style: "h4",
|
|
5560
5563
|
children: title
|
|
5561
5564
|
}), /*#__PURE__*/jsxRuntime.jsx("div", {
|
|
@@ -5642,7 +5645,7 @@ var Actions = function Actions(_ref) {
|
|
|
5642
5645
|
}), /*#__PURE__*/jsxRuntime.jsxs("div", {
|
|
5643
5646
|
className: "flex flex-wrap shrink-0 self-center",
|
|
5644
5647
|
children: [showButton && index === actions.length - 1 && /*#__PURE__*/jsxRuntime.jsx(Button, {
|
|
5645
|
-
"data-
|
|
5648
|
+
"data-testid": "add-action-button",
|
|
5646
5649
|
icon: Plus,
|
|
5647
5650
|
size: "medium",
|
|
5648
5651
|
style: "text",
|
|
@@ -5655,7 +5658,7 @@ var Actions = function Actions(_ref) {
|
|
|
5655
5658
|
setShouldOpenPanel(true);
|
|
5656
5659
|
}
|
|
5657
5660
|
}), actions.length > 1 && /*#__PURE__*/jsxRuntime.jsx(Button, {
|
|
5658
|
-
"data-
|
|
5661
|
+
"data-testid": "delete-action-button-".concat(index),
|
|
5659
5662
|
icon: Delete,
|
|
5660
5663
|
size: "medium",
|
|
5661
5664
|
style: "text",
|
|
@@ -5698,7 +5701,7 @@ var LogicalOperator = function LogicalOperator(_ref) {
|
|
|
5698
5701
|
options: logicalOperatorOptions,
|
|
5699
5702
|
value: name,
|
|
5700
5703
|
customTarget: /*#__PURE__*/jsxRuntime.jsx(Button, {
|
|
5701
|
-
"data-
|
|
5704
|
+
"data-testid": "logic-operator-button",
|
|
5702
5705
|
icon: Down,
|
|
5703
5706
|
iconSize: 16,
|
|
5704
5707
|
label: logicOperationLabel,
|
|
@@ -5960,7 +5963,7 @@ var Conditions = function Conditions(_ref) {
|
|
|
5960
5963
|
}), /*#__PURE__*/jsxRuntime.jsxs("div", {
|
|
5961
5964
|
className: "flex",
|
|
5962
5965
|
children: [index === conditions.length - 1 && /*#__PURE__*/jsxRuntime.jsx(Button, {
|
|
5963
|
-
"data-
|
|
5966
|
+
"data-testid": "add-condition-button",
|
|
5964
5967
|
icon: Plus,
|
|
5965
5968
|
size: "medium",
|
|
5966
5969
|
style: "text",
|
|
@@ -5972,7 +5975,7 @@ var Conditions = function Conditions(_ref) {
|
|
|
5972
5975
|
return handleAddCondition(arrayHelpers, condition.joinType);
|
|
5973
5976
|
}
|
|
5974
5977
|
}), (allowEmpty || index !== 0) && /*#__PURE__*/jsxRuntime.jsx(Button, {
|
|
5975
|
-
"data-
|
|
5978
|
+
"data-testid": "delete-condition-button-".concat(index),
|
|
5976
5979
|
icon: Delete,
|
|
5977
5980
|
size: "medium",
|
|
5978
5981
|
style: "text",
|
|
@@ -5988,7 +5991,7 @@ var Conditions = function Conditions(_ref) {
|
|
|
5988
5991
|
}, index);
|
|
5989
5992
|
}), ramda.isEmpty(conditions) && /*#__PURE__*/jsxRuntime.jsx(Button, {
|
|
5990
5993
|
className: "neeto-ui-text-gray-600 me-auto",
|
|
5991
|
-
"data-
|
|
5994
|
+
"data-testid": "add-condition-button",
|
|
5992
5995
|
label: t("neetoRules.form.addCondition"),
|
|
5993
5996
|
style: "text",
|
|
5994
5997
|
onClick: function onClick() {
|
|
@@ -5997,7 +6000,7 @@ var Conditions = function Conditions(_ref) {
|
|
|
5997
6000
|
}), isCallback && neetoCist.isNotEmpty(conditions) && /*#__PURE__*/jsxRuntime.jsx("div", {
|
|
5998
6001
|
children: /*#__PURE__*/jsxRuntime.jsx(Button, {
|
|
5999
6002
|
className: "mt-2",
|
|
6000
|
-
"data-
|
|
6003
|
+
"data-testid": "preview-callback-button",
|
|
6001
6004
|
icon: Eye,
|
|
6002
6005
|
label: t("neetoRules.common.preview"),
|
|
6003
6006
|
style: "secondary",
|
|
@@ -6100,7 +6103,7 @@ var AddDelay = function AddDelay(_ref) {
|
|
|
6100
6103
|
})]
|
|
6101
6104
|
}), /*#__PURE__*/jsxRuntime.jsx(Button, {
|
|
6102
6105
|
className: "shrink-0",
|
|
6103
|
-
"data-
|
|
6106
|
+
"data-testid": "delete-delay-button",
|
|
6104
6107
|
icon: Delete,
|
|
6105
6108
|
size: "medium",
|
|
6106
6109
|
style: "text",
|
|
@@ -6174,7 +6177,7 @@ var Performer = function Performer(_ref) {
|
|
|
6174
6177
|
weight: "normal",
|
|
6175
6178
|
children: t("neetoRules.common.by")
|
|
6176
6179
|
}), /*#__PURE__*/jsxRuntime.jsx(Button, {
|
|
6177
|
-
"data-
|
|
6180
|
+
"data-testid": "event-performer-dropdown",
|
|
6178
6181
|
label: selectedOption === null || selectedOption === void 0 || (_selectedOption$label = selectedOption.label) === null || _selectedOption$label === void 0 ? void 0 : _selectedOption$label.toLowerCase(),
|
|
6179
6182
|
style: "link",
|
|
6180
6183
|
className: classNames("neeto-ui-text-gray-800 neeto-ui-font-semibold underline", {
|
|
@@ -6260,7 +6263,7 @@ var Events = function Events(_ref) {
|
|
|
6260
6263
|
weight: "normal",
|
|
6261
6264
|
children: t("neetoRules.common.or")
|
|
6262
6265
|
}), /*#__PURE__*/jsxRuntime.jsx(Button, {
|
|
6263
|
-
"data-
|
|
6266
|
+
"data-testid": "condition-value-multi-select-field",
|
|
6264
6267
|
label: event === null || event === void 0 || (_event$label = event.label) === null || _event$label === void 0 ? void 0 : _event$label.toLowerCase(),
|
|
6265
6268
|
style: "link",
|
|
6266
6269
|
className: classNames("neeto-ui-text-gray-800 neeto-ui-font-semibold underline", {
|
|
@@ -6272,7 +6275,7 @@ var Events = function Events(_ref) {
|
|
|
6272
6275
|
}, idx);
|
|
6273
6276
|
})
|
|
6274
6277
|
}) : /*#__PURE__*/jsxRuntime.jsx(Button, {
|
|
6275
|
-
"data-
|
|
6278
|
+
"data-testid": "condition-value-multi-select-field",
|
|
6276
6279
|
label: defaultLabel,
|
|
6277
6280
|
style: "link",
|
|
6278
6281
|
className: classNames("neeto-ui-text-gray-800 neeto-ui-font-semibold underline", {
|
|
@@ -6358,8 +6361,7 @@ var EventConditions = function EventConditions(_ref) {
|
|
|
6358
6361
|
}), showAddButton && /*#__PURE__*/jsxRuntime.jsx(Tooltip, _objectSpread$8(_objectSpread$8({}, tooltipProps), {}, {
|
|
6359
6362
|
children: /*#__PURE__*/jsxRuntime.jsx("div", {
|
|
6360
6363
|
children: /*#__PURE__*/jsxRuntime.jsx(Button, {
|
|
6361
|
-
"data-
|
|
6362
|
-
"data-test-id": "automation-rules-add-events-button",
|
|
6364
|
+
"data-testid": "add-condition-button",
|
|
6363
6365
|
disabled: isConditionsEmpty,
|
|
6364
6366
|
icon: Plus,
|
|
6365
6367
|
size: "medium",
|
|
@@ -6467,7 +6469,7 @@ var RadioField = function RadioField(_ref) {
|
|
|
6467
6469
|
className: "my-6",
|
|
6468
6470
|
children: [/*#__PURE__*/jsxRuntime.jsx(Label, {
|
|
6469
6471
|
className: "mb-4",
|
|
6470
|
-
"data-
|
|
6472
|
+
"data-testid": "radio-field-label",
|
|
6471
6473
|
children: label || (elementProps === null || elementProps === void 0 ? void 0 : elementProps.label)
|
|
6472
6474
|
}), /*#__PURE__*/jsxRuntime.jsx(Radio, _objectSpread$5(_objectSpread$5({
|
|
6473
6475
|
name: "".concat(name, ".value")
|
|
@@ -6913,7 +6915,7 @@ var Form = function Form(_ref) {
|
|
|
6913
6915
|
onClick: handleCancel
|
|
6914
6916
|
},
|
|
6915
6917
|
submitButtonProps: {
|
|
6916
|
-
"data-
|
|
6918
|
+
"data-testid": "form-submit-button"
|
|
6917
6919
|
}
|
|
6918
6920
|
})
|
|
6919
6921
|
})]
|