@bigbinary/neeto-rules-frontend 2.9.0 → 2.9.2

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.
@@ -5,15 +5,15 @@ import _toConsumableArray from '@babel/runtime/helpers/toConsumableArray';
5
5
  import _slicedToArray from '@babel/runtime/helpers/slicedToArray';
6
6
  import { useShallow } from 'zustand/shallow';
7
7
  import { memo, useMemo, useEffect, useState, createElement, useRef, Fragment as Fragment$1 } from 'react';
8
- import { Typography, Button, DropdownMenu, Tooltip, Label, Switch, Spinner } from '@bigbinary/neeto-atoms';
9
8
  import { useFormikContext, FieldArray, useField, Formik, Form as Form$1 } from 'formik';
10
9
  import { Plus, Trash2, ChevronDown, Eye, CircleHelp, X } from 'lucide-react';
10
+ import { Typography, Button, DropdownMenu, Tooltip, Label, Switch, Spinner } from '@bigbinary/neeto-atoms';
11
11
  import { isNot, isPresent, noop, findBy, isNotEmpty } from '@bigbinary/neeto-cist';
12
12
  import { useTranslation } from 'react-i18next';
13
13
  import { u as useUtilityStore } from '../useUtilityStore-BVCulMEC.js';
14
14
  import classNames from 'classnames';
15
15
  import { isNotNil, isEmpty, pluck } from 'ramda';
16
- import { g as getActionOptions, a as getFieldDetails, b as getSlackChannelErrors, c as getOptionsKey, d as getActionLabel, A as ActionSubItem, F as FIELDS_WITH_OPTIONS, P as PANEL_TYPES, D as DEFAULT_RULE_ACTION, e as getLogicalOperatorOptions, f as getFieldDetails$1, h as getVerbOptions, R as RadioField$1, S as SelectField$1, V as ValueField, i as DEFAULT_DELAY, j as getAllEvents, O as OPERATORS$1, k as STATUS_KEYS, l as formatData, u as usePollRuleName, T as TouchErrors, m as buildPayload, n as ScrollToErrorField, o as Panel, p as getValidationSchema, q as DEFAULT_INITIAL_VALUE } from '../index-zvsaUL1M.js';
16
+ import { g as getActionOptions, a as getFieldDetails, b as getSlackChannelErrors, c as getOptionsKey, d as getActionLabel, A as ActionSubItem, F as FIELDS_WITH_OPTIONS, P as PANEL_TYPES, D as DEFAULT_RULE_ACTION, e as getLogicalOperatorOptions, f as getFieldDetails$1, h as getVerbOptions, R as RadioField$1, S as SelectField$1, V as ValueField, i as DEFAULT_DELAY, j as getAllEvents, O as OPERATORS$1, k as STATUS_KEYS, l as formatData, u as usePollRuleName, T as TouchErrors, m as buildPayload, n as ScrollToErrorField, o as Panel, p as getValidationSchema, q as DEFAULT_INITIAL_VALUE } from '../index-KEm6XVbK.js';
17
17
  import { a as useActiveField, u as useCustomDataStore } from '../useCustomDataStore-CEbhXugO.js';
18
18
  import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
19
19
  import { joinHyphenCase } from '@bigbinary/neeto-commons-frontend/v2/utils';
@@ -228,11 +228,12 @@ var ActionItem = /*#__PURE__*/memo(ActionItem$1);
228
228
 
229
229
  var Card = function Card(_ref) {
230
230
  var title = _ref.title,
231
- children = _ref.children;
231
+ children = _ref.children,
232
+ dataTestid = _ref.dataTestid;
232
233
  return /*#__PURE__*/jsxs("div", {
233
234
  children: [/*#__PURE__*/jsx(Typography, {
234
235
  color: "muted",
235
- "data-testid": "".concat(joinHyphenCase(title), "-card-title"),
236
+ "data-testid": dataTestid || "".concat(joinHyphenCase(title), "-card-title"),
236
237
  variant: "h6",
237
238
  children: title
238
239
  }), /*#__PURE__*/jsx("div", {
@@ -296,6 +297,7 @@ var Actions = function Actions(_ref) {
296
297
  resetPanelState();
297
298
  };
298
299
  return /*#__PURE__*/jsx(Card, {
300
+ dataTestid: elementProps === null || elementProps === void 0 ? void 0 : elementProps.dataTestid,
299
301
  title: label || (elementProps === null || elementProps === void 0 ? void 0 : elementProps.label),
300
302
  children: /*#__PURE__*/jsx(FieldArray, {
301
303
  name: "".concat(name, ".value"),
@@ -735,6 +737,7 @@ var AddDelay = function AddDelay(_ref) {
735
737
  variant: "outline",
736
738
  onClick: handleAddDelay
737
739
  }), !showAddDelayButton && /*#__PURE__*/jsx(Card, {
740
+ dataTestid: "add-delay-card-title",
738
741
  title: t("neetoRules.common.addDelay"),
739
742
  children: /*#__PURE__*/jsxs("div", {
740
743
  className: "flex w-full items-center justify-between",
@@ -1018,6 +1021,7 @@ var EventConditions = function EventConditions(_ref) {
1018
1021
  var tooltipProps = isConditionsEmpty ? disabledAddButtonTooltips : addButtonTooltips;
1019
1022
  return /*#__PURE__*/jsxs("div", {
1020
1023
  children: [/*#__PURE__*/jsxs(Card, {
1024
+ dataTestid: elementProps === null || elementProps === void 0 ? void 0 : elementProps.dataTestid,
1021
1025
  title: label || (elementProps === null || elementProps === void 0 ? void 0 : elementProps.label),
1022
1026
  children: [/*#__PURE__*/jsxs("div", {
1023
1027
  className: "flex justify-between items-center",