@bigbinary/neeto-rules-frontend 2.9.4 → 2.9.5-beta1

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.
@@ -28,7 +28,7 @@ import Info from '@bigbinary/neeto-icons/Info';
28
28
  import _asyncToGenerator from '@babel/runtime/helpers/asyncToGenerator';
29
29
  import useHotkeys from '@bigbinary/neeto-hotkeys';
30
30
  import Search from '@bigbinary/neeto-icons/Search';
31
- import { dayjs } from '@bigbinary/neeto-commons-frontend/v2/utils';
31
+ import { dayjs, hyphenize } from '@bigbinary/neeto-commons-frontend/v2/utils';
32
32
  import { D as DATE_FORMAT, b as getDateTimeValue, d as DATE_TIME_TYPES, T as TIME_FORMAT, e as DATE_TIME_FORMAT } from '../utils-a-9NZPeQ.js';
33
33
  import Up from '@bigbinary/neeto-icons/Up';
34
34
  import Down from '@bigbinary/neeto-icons/Down';
@@ -1494,6 +1494,7 @@ var ScopeRow = function ScopeRow(_ref2) {
1494
1494
  children: meeting
1495
1495
  }), singlePhoneFieldLabel && /*#__PURE__*/jsxs("span", {
1496
1496
  className: "mb-fixed",
1497
+ "data-testid": "scope-phone-field-fixed-".concat(index),
1497
1498
  children: [usingLabel, " ", singlePhoneFieldLabel]
1498
1499
  }), hasPhoneFieldChoice && /*#__PURE__*/jsxs(Fragment$1, {
1499
1500
  children: [/*#__PURE__*/jsx("span", {
@@ -2626,6 +2627,7 @@ var descriptorFor = function descriptorFor(_ref19) {
2626
2627
  value: triggerValue(option),
2627
2628
  dataTestid: option.dataTestid,
2628
2629
  category: option.category,
2630
+ infoTooltip: option.infoTooltip,
2629
2631
  disabled: isLocked,
2630
2632
  disabledTooltip: isLocked && (schema.triggers.groupDisabledTooltip || t("neetoRules.builder.panes.triggerGroupDisabled"))
2631
2633
  };
@@ -4786,20 +4788,19 @@ var OptionsPane = function OptionsPane(_ref) {
4786
4788
  var popover = option.disabledPopover || (isNodeReason ? {
4787
4789
  description: reason
4788
4790
  } : null);
4789
- if (!Icon && !isTextReason && !popover) {
4790
- return option.disabled && option.disabledTooltip ? /*#__PURE__*/jsx(Tooltip, {
4791
- content: option.disabledTooltip,
4792
- position: "top",
4793
- children: /*#__PURE__*/jsx("span", {
4794
- children: option.label
4795
- })
4796
- }) : option.label;
4797
- }
4791
+ var label = option.disabled && option.disabledTooltip && !isTextReason && !popover ? /*#__PURE__*/jsx(Tooltip, {
4792
+ content: option.disabledTooltip,
4793
+ position: "top",
4794
+ children: /*#__PURE__*/jsx("span", {
4795
+ children: option.label
4796
+ })
4797
+ }) : option.label;
4798
+ if (!Icon && !isTextReason && !popover && !option.infoTooltip) return label;
4798
4799
  return /*#__PURE__*/jsxs("span", {
4799
4800
  className: "mb-pane-option",
4800
4801
  children: [Icon && /*#__PURE__*/jsx(Icon, {
4801
4802
  size: 20
4802
- }), option.label, popover && /*#__PURE__*/jsxs(Popover, {
4803
+ }), label, popover && /*#__PURE__*/jsxs(Popover, {
4803
4804
  position: "top",
4804
4805
  trigger: /*#__PURE__*/jsx("span", {
4805
4806
  className: "mb-pane-info",
@@ -4821,6 +4822,23 @@ var OptionsPane = function OptionsPane(_ref) {
4821
4822
  size: "sm",
4822
4823
  variant: "link"
4823
4824
  }))]
4825
+ }), !popover && option.infoTooltip && /*#__PURE__*/jsx(Tooltip, {
4826
+ content: option.infoTooltip,
4827
+ position: "top",
4828
+ sideOffset: 8,
4829
+ children: /*#__PURE__*/jsx("span", {
4830
+ "aria-label": option.infoTooltip,
4831
+ className: "mb-pane-info",
4832
+ "data-testid": "".concat(option.value, "-info"),
4833
+ role: "img",
4834
+ tabIndex: 0,
4835
+ onClick: function onClick(event) {
4836
+ return event.preventDefault();
4837
+ },
4838
+ children: /*#__PURE__*/jsx(Info, {
4839
+ size: 14
4840
+ })
4841
+ })
4824
4842
  }), !popover && reason && isTextReason && (option.disabledTooltip ? /*#__PURE__*/jsx(Tooltip, {
4825
4843
  content: option.disabledTooltip,
4826
4844
  position: "top",
@@ -4879,12 +4897,13 @@ var OptionsPane = function OptionsPane(_ref) {
4879
4897
  items = _ref4[1];
4880
4898
  return /*#__PURE__*/jsxs(Fragment, {
4881
4899
  children: [renderGroupHeader(category), items.map(function (option) {
4900
+ var _option$dataTestid;
4882
4901
  return /*#__PURE__*/jsx(Checkbox, _objectSpread$3({
4883
4902
  checked: isSelected(option.value),
4884
- dataTestId: option.dataTestid,
4885
4903
  disabled: option.disabled,
4886
4904
  label: optionLabel(option),
4887
4905
  labelProps: previewHandlers(option.value, option.disabled),
4906
+ dataTestId: (_option$dataTestid = option.dataTestid) !== null && _option$dataTestid !== void 0 ? _option$dataTestid : hyphenize(option.label) || undefined,
4888
4907
  onCheckedChange: function onCheckedChange() {
4889
4908
  return handleSelect(option.value);
4890
4909
  }