@bigbinary/neeto-rules-frontend 2.6.2 → 2.6.3

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.
@@ -1810,19 +1810,25 @@ var channelOf = function channelOf(_ref6) {
1810
1810
  action = _ref6.action;
1811
1811
  return (action === null || action === void 0 ? void 0 : action.channel) || ((_schema$actions2 = schema.actions) === null || _schema$actions2 === void 0 || (_schema$actions2$acti = _schema$actions2.actionForName) === null || _schema$actions2$acti === void 0 || (_schema$actions2$acti = _schema$actions2$acti.call(_schema$actions2, action === null || action === void 0 ? void 0 : action.name)) === null || _schema$actions2$acti === void 0 ? void 0 : _schema$actions2$acti.channel);
1812
1812
  };
1813
- var channelMetaOf = function channelMetaOf(_ref7) {
1814
- var _schema$actions3;
1813
+ var recipientOf = function recipientOf(_ref7) {
1814
+ var _action$recipient, _schema$actions3, _schema$actions3$acti;
1815
1815
  var schema = _ref7.schema,
1816
1816
  action = _ref7.action;
1817
- return ((_schema$actions3 = schema.actions) === null || _schema$actions3 === void 0 || (_schema$actions3 = _schema$actions3.channelMeta) === null || _schema$actions3 === void 0 ? void 0 : _schema$actions3[channelOf({
1817
+ return (_action$recipient = action === null || action === void 0 ? void 0 : action.recipient) !== null && _action$recipient !== void 0 ? _action$recipient : (_schema$actions3 = schema.actions) === null || _schema$actions3 === void 0 || (_schema$actions3$acti = _schema$actions3.actionForName) === null || _schema$actions3$acti === void 0 || (_schema$actions3$acti = _schema$actions3$acti.call(_schema$actions3, action === null || action === void 0 ? void 0 : action.name)) === null || _schema$actions3$acti === void 0 ? void 0 : _schema$actions3$acti.recipient;
1818
+ };
1819
+ var channelMetaOf = function channelMetaOf(_ref8) {
1820
+ var _schema$actions4;
1821
+ var schema = _ref8.schema,
1822
+ action = _ref8.action;
1823
+ return ((_schema$actions4 = schema.actions) === null || _schema$actions4 === void 0 || (_schema$actions4 = _schema$actions4.channelMeta) === null || _schema$actions4 === void 0 ? void 0 : _schema$actions4[channelOf({
1818
1824
  schema: schema,
1819
1825
  action: action
1820
1826
  })]) || {};
1821
1827
  };
1822
- var actionHasConfig = function actionHasConfig(_ref8) {
1823
- var _schema$actions4, _schema$actions5;
1824
- var schema = _ref8.schema,
1825
- action = _ref8.action;
1828
+ var actionHasConfig = function actionHasConfig(_ref9) {
1829
+ var _schema$actions5, _schema$actions6;
1830
+ var schema = _ref9.schema,
1831
+ action = _ref9.action;
1826
1832
  var meta = channelMetaOf({
1827
1833
  schema: schema,
1828
1834
  action: action
@@ -1833,18 +1839,18 @@ var actionHasConfig = function actionHasConfig(_ref8) {
1833
1839
  name: action === null || action === void 0 ? void 0 : action.name
1834
1840
  });
1835
1841
  if (option !== null && option !== void 0 && option.component || option !== null && option !== void 0 && option.renderConfig) return true;
1836
- if ((_schema$actions4 = schema.actions) !== null && _schema$actions4 !== void 0 && _schema$actions4.hasConfig) return schema.actions.hasConfig(action);
1837
- return !!((_schema$actions5 = schema.actions) !== null && _schema$actions5 !== void 0 && _schema$actions5.renderConfig);
1842
+ if ((_schema$actions5 = schema.actions) !== null && _schema$actions5 !== void 0 && _schema$actions5.hasConfig) return schema.actions.hasConfig(action);
1843
+ return !!((_schema$actions6 = schema.actions) !== null && _schema$actions6 !== void 0 && _schema$actions6.renderConfig);
1838
1844
  };
1839
- var recipientsFor = function recipientsFor(_ref9) {
1840
- var _schema$actions6, _schema$actions7;
1841
- var schema = _ref9.schema,
1842
- action = _ref9.action;
1845
+ var recipientsFor = function recipientsFor(_ref0) {
1846
+ var _schema$actions7, _schema$actions8;
1847
+ var schema = _ref0.schema,
1848
+ action = _ref0.action;
1843
1849
  var channel = channelOf({
1844
1850
  schema: schema,
1845
1851
  action: action
1846
1852
  });
1847
- if (channel && (_schema$actions6 = schema.actions) !== null && _schema$actions6 !== void 0 && _schema$actions6.recipientsFor) {
1853
+ if (channel && (_schema$actions7 = schema.actions) !== null && _schema$actions7 !== void 0 && _schema$actions7.recipientsFor) {
1848
1854
  return schema.actions.recipientsFor(channel);
1849
1855
  }
1850
1856
  var option = findActionOption({
@@ -1852,13 +1858,13 @@ var recipientsFor = function recipientsFor(_ref9) {
1852
1858
  name: channel
1853
1859
  });
1854
1860
  if (option !== null && option !== void 0 && option.recipients) return option.recipients;
1855
- return ((_schema$actions7 = schema.actions) === null || _schema$actions7 === void 0 ? void 0 : _schema$actions7.recipients) || [];
1861
+ return ((_schema$actions8 = schema.actions) === null || _schema$actions8 === void 0 ? void 0 : _schema$actions8.recipients) || [];
1856
1862
  };
1857
- var nextTriggers = function nextTriggers(_ref0) {
1863
+ var nextTriggers = function nextTriggers(_ref1) {
1858
1864
  var _schema$triggers;
1859
- var schema = _ref0.schema,
1860
- rule = _ref0.rule,
1861
- value = _ref0.value;
1865
+ var schema = _ref1.schema,
1866
+ rule = _ref1.rule,
1867
+ value = _ref1.value;
1862
1868
  if ((_schema$triggers = schema.triggers) !== null && _schema$triggers !== void 0 && _schema$triggers.multi) {
1863
1869
  var names = ramda.pluck("name", rule.triggers);
1864
1870
  return names.includes(value) ? neetoCist.removeBy({
@@ -1871,12 +1877,12 @@ var nextTriggers = function nextTriggers(_ref0) {
1871
1877
  name: value
1872
1878
  }];
1873
1879
  };
1874
- var nextConditionAt = function nextConditionAt(_ref1) {
1880
+ var nextConditionAt = function nextConditionAt(_ref10) {
1875
1881
  var _field$allowMatching;
1876
- var schema = _ref1.schema,
1877
- rule = _ref1.rule,
1878
- index = _ref1.index,
1879
- value = _ref1.value;
1882
+ var schema = _ref10.schema,
1883
+ rule = _ref10.rule,
1884
+ index = _ref10.index,
1885
+ value = _ref10.value;
1880
1886
  var field = findField({
1881
1887
  schema: schema,
1882
1888
  value: value
@@ -1895,13 +1901,13 @@ var nextConditionAt = function nextConditionAt(_ref1) {
1895
1901
  metadata: {}
1896
1902
  });
1897
1903
  };
1898
- var nextActionAt = function nextActionAt(_ref10) {
1899
- var _schema$actions8;
1900
- var schema = _ref10.schema,
1901
- rule = _ref10.rule,
1902
- index = _ref10.index,
1903
- value = _ref10.value;
1904
- if (!((_schema$actions8 = schema.actions) !== null && _schema$actions8 !== void 0 && _schema$actions8.resolveName)) {
1904
+ var nextActionAt = function nextActionAt(_ref11) {
1905
+ var _schema$actions9;
1906
+ var schema = _ref11.schema,
1907
+ rule = _ref11.rule,
1908
+ index = _ref11.index,
1909
+ value = _ref11.value;
1910
+ if (!((_schema$actions9 = schema.actions) !== null && _schema$actions9 !== void 0 && _schema$actions9.resolveName)) {
1905
1911
  var option = findActionOption({
1906
1912
  schema: schema,
1907
1913
  name: value
@@ -1939,10 +1945,10 @@ var nextActionAt = function nextActionAt(_ref10) {
1939
1945
  var channelChanged = prevChannel !== value;
1940
1946
  var recipient = channelChanged ? undefined : prev.recipient;
1941
1947
  if (channelChanged) {
1942
- var _schema$actions9;
1948
+ var _schema$actions0;
1943
1949
  var channelRecipients =
1944
1950
  // eslint-disable-next-line security/detect-object-injection
1945
- ((_schema$actions9 = schema.actions) === null || _schema$actions9 === void 0 || (_schema$actions9 = _schema$actions9.recipientsByChannel) === null || _schema$actions9 === void 0 ? void 0 : _schema$actions9[value]) || [];
1951
+ ((_schema$actions0 = schema.actions) === null || _schema$actions0 === void 0 || (_schema$actions0 = _schema$actions0.recipientsByChannel) === null || _schema$actions0 === void 0 ? void 0 : _schema$actions0[value]) || [];
1946
1952
  if (channelRecipients.length === 1) {
1947
1953
  var _channelRecipients = _slicedToArray(channelRecipients, 1);
1948
1954
  recipient = _channelRecipients[0];
@@ -1958,12 +1964,12 @@ var nextActionAt = function nextActionAt(_ref10) {
1958
1964
  metadata: channelChanged ? {} : prev.metadata
1959
1965
  });
1960
1966
  };
1961
- var nextActionRecipientAt = function nextActionRecipientAt(_ref11) {
1962
- var _schema$actions0;
1963
- var schema = _ref11.schema,
1964
- rule = _ref11.rule,
1965
- index = _ref11.index,
1966
- value = _ref11.value;
1967
+ var nextActionRecipientAt = function nextActionRecipientAt(_ref12) {
1968
+ var _schema$actions1;
1969
+ var schema = _ref12.schema,
1970
+ rule = _ref12.rule,
1971
+ index = _ref12.index,
1972
+ value = _ref12.value;
1967
1973
  var prev = actionAt({
1968
1974
  rule: rule,
1969
1975
  index: index
@@ -1974,18 +1980,18 @@ var nextActionRecipientAt = function nextActionRecipientAt(_ref11) {
1974
1980
  });
1975
1981
  return _objectSpread$4(_objectSpread$4({}, prev), {}, {
1976
1982
  recipient: value,
1977
- name: (_schema$actions0 = schema.actions) !== null && _schema$actions0 !== void 0 && _schema$actions0.resolveName ? schema.actions.resolveName({
1983
+ name: (_schema$actions1 = schema.actions) !== null && _schema$actions1 !== void 0 && _schema$actions1.resolveName ? schema.actions.resolveName({
1978
1984
  channel: channel,
1979
1985
  recipient: value
1980
1986
  }) : value
1981
1987
  });
1982
1988
  };
1983
- var descriptorFor = function descriptorFor(_ref12) {
1989
+ var descriptorFor = function descriptorFor(_ref13) {
1984
1990
  var _schema$actor2, _schema$conditions2;
1985
- var anchor = _ref12.anchor,
1986
- schema = _ref12.schema,
1987
- rule = _ref12.rule,
1988
- index = _ref12.index;
1991
+ var anchor = _ref13.anchor,
1992
+ schema = _ref13.schema,
1993
+ rule = _ref13.rule,
1994
+ index = _ref13.index;
1989
1995
  switch (anchor) {
1990
1996
  case BUILDER_ANCHORS.TRIGGER_ADD:
1991
1997
  case BUILDER_ANCHORS.TRIGGER_REPLACE:
@@ -2095,22 +2101,22 @@ var descriptorFor = function descriptorFor(_ref12) {
2095
2101
  case BUILDER_ANCHORS.ACTION_ADD:
2096
2102
  case BUILDER_ANCHORS.ACTION_CHANNEL:
2097
2103
  {
2098
- var _schema$actions10, _schema$actions11, _channelOf;
2104
+ var _schema$actions11, _schema$actions12, _channelOf;
2099
2105
  var isSwap = anchor === BUILDER_ANCHORS.ACTION_CHANNEL;
2100
2106
  var channelMetaFor = function channelMetaFor(value) {
2101
- var _schema$actions1;
2107
+ var _schema$actions10;
2102
2108
  return (
2103
2109
  // eslint-disable-next-line security/detect-object-injection
2104
- ((_schema$actions1 = schema.actions) === null || _schema$actions1 === void 0 || (_schema$actions1 = _schema$actions1.channelMeta) === null || _schema$actions1 === void 0 ? void 0 : _schema$actions1[value]) || {}
2110
+ ((_schema$actions10 = schema.actions) === null || _schema$actions10 === void 0 || (_schema$actions10 = _schema$actions10.channelMeta) === null || _schema$actions10 === void 0 ? void 0 : _schema$actions10[value]) || {}
2105
2111
  );
2106
2112
  };
2107
2113
  var rank = function rank(value) {
2108
2114
  var idx = SWAP_CHANNEL_ORDER.indexOf(value);
2109
2115
  return idx === -1 ? SWAP_CHANNEL_ORDER.length : idx;
2110
2116
  };
2111
- var sourceOptions = isSwap ? _toConsumableArray(((_schema$actions10 = schema.actions) === null || _schema$actions10 === void 0 ? void 0 : _schema$actions10.options) || []).sort(function (optionA, optionB) {
2117
+ var sourceOptions = isSwap ? _toConsumableArray(((_schema$actions11 = schema.actions) === null || _schema$actions11 === void 0 ? void 0 : _schema$actions11.options) || []).sort(function (optionA, optionB) {
2112
2118
  return rank(optionValue(optionA)) - rank(optionValue(optionB));
2113
- }) : ((_schema$actions11 = schema.actions) === null || _schema$actions11 === void 0 ? void 0 : _schema$actions11.options) || [];
2119
+ }) : ((_schema$actions12 = schema.actions) === null || _schema$actions12 === void 0 ? void 0 : _schema$actions12.options) || [];
2114
2120
  return {
2115
2121
  title: isSwap ? i18next.t("neetoRules.builder.panes.actionSwapTitle") : i18next.t("neetoRules.builder.panes.actionAddTitle"),
2116
2122
  subtitle: isSwap ? i18next.t("neetoRules.builder.panes.actionSwapSubtitle") : i18next.t("neetoRules.builder.panes.actionAddSubtitle"),
@@ -2140,7 +2146,7 @@ var descriptorFor = function descriptorFor(_ref12) {
2140
2146
  }
2141
2147
  case BUILDER_ANCHORS.ACTION_RECIPIENT:
2142
2148
  {
2143
- var _schema$actions12;
2149
+ var _schema$actions13;
2144
2150
  var action = actionAt({
2145
2151
  rule: rule,
2146
2152
  index: index
@@ -2150,7 +2156,7 @@ var descriptorFor = function descriptorFor(_ref12) {
2150
2156
  action: action
2151
2157
  });
2152
2158
  // eslint-disable-next-line security/detect-object-injection
2153
- var meta = ((_schema$actions12 = schema.actions) === null || _schema$actions12 === void 0 || (_schema$actions12 = _schema$actions12.channelMeta) === null || _schema$actions12 === void 0 ? void 0 : _schema$actions12[channel]) || {};
2159
+ var meta = ((_schema$actions13 = schema.actions) === null || _schema$actions13 === void 0 || (_schema$actions13 = _schema$actions13.channelMeta) === null || _schema$actions13 === void 0 ? void 0 : _schema$actions13[channel]) || {};
2154
2160
  var option = findActionOption({
2155
2161
  schema: schema,
2156
2162
  name: channel
@@ -2167,7 +2173,10 @@ var descriptorFor = function descriptorFor(_ref12) {
2167
2173
  value: optionValue(recipient)
2168
2174
  };
2169
2175
  }),
2170
- selectedValues: [action.recipient]
2176
+ selectedValues: [recipientOf({
2177
+ schema: schema,
2178
+ action: action
2179
+ })]
2171
2180
  };
2172
2181
  }
2173
2182
  case BUILDER_ANCHORS.SCOPE:
@@ -2207,13 +2216,13 @@ var descriptorFor = function descriptorFor(_ref12) {
2207
2216
  };
2208
2217
  }
2209
2218
  };
2210
- var commitFor = function commitFor(_ref13) {
2211
- var anchor = _ref13.anchor,
2212
- schema = _ref13.schema,
2213
- rule = _ref13.rule,
2214
- index = _ref13.index,
2215
- value = _ref13.value,
2216
- helpers = _ref13.helpers;
2219
+ var commitFor = function commitFor(_ref14) {
2220
+ var anchor = _ref14.anchor,
2221
+ schema = _ref14.schema,
2222
+ rule = _ref14.rule,
2223
+ index = _ref14.index,
2224
+ value = _ref14.value,
2225
+ helpers = _ref14.helpers;
2217
2226
  var setTriggers = helpers.setTriggers,
2218
2227
  setPerformer = helpers.setPerformer,
2219
2228
  setConditionMode = helpers.setConditionMode,
@@ -2308,12 +2317,12 @@ var commitFor = function commitFor(_ref13) {
2308
2317
  return "close";
2309
2318
  }
2310
2319
  };
2311
- var continueTargetFor = function continueTargetFor(_ref14) {
2320
+ var continueTargetFor = function continueTargetFor(_ref15) {
2312
2321
  var _schema$actor3;
2313
- var anchor = _ref14.anchor,
2314
- schema = _ref14.schema,
2315
- rule = _ref14.rule,
2316
- index = _ref14.index;
2322
+ var anchor = _ref15.anchor,
2323
+ schema = _ref15.schema,
2324
+ rule = _ref15.rule,
2325
+ index = _ref15.index;
2317
2326
  switch (anchor) {
2318
2327
  case BUILDER_ANCHORS.TRIGGER_ADD:
2319
2328
  case BUILDER_ANCHORS.TRIGGER_REPLACE:
@@ -2386,21 +2395,21 @@ var continueTargetFor = function continueTargetFor(_ref14) {
2386
2395
  return null;
2387
2396
  }
2388
2397
  };
2389
- var replaceAt = function replaceAt(_ref15) {
2390
- var list = _ref15.list,
2391
- index = _ref15.index,
2392
- item = _ref15.item;
2398
+ var replaceAt = function replaceAt(_ref16) {
2399
+ var list = _ref16.list,
2400
+ index = _ref16.index,
2401
+ item = _ref16.item;
2393
2402
  var next = _toConsumableArray(list);
2394
2403
  // eslint-disable-next-line security/detect-object-injection
2395
2404
  next[index] = item;
2396
2405
  return next;
2397
2406
  };
2398
- var applyPreview = function applyPreview(_ref16) {
2399
- var rule = _ref16.rule,
2400
- schema = _ref16.schema,
2401
- anchor = _ref16.anchor,
2402
- index = _ref16.index,
2403
- value = _ref16.value;
2407
+ var applyPreview = function applyPreview(_ref17) {
2408
+ var rule = _ref17.rule,
2409
+ schema = _ref17.schema,
2410
+ anchor = _ref17.anchor,
2411
+ index = _ref17.index,
2412
+ value = _ref17.value;
2404
2413
  switch (anchor) {
2405
2414
  case BUILDER_ANCHORS.TRIGGER_ADD:
2406
2415
  case BUILDER_ANCHORS.TRIGGER_REPLACE:
@@ -3848,7 +3857,7 @@ var RecipientField = function RecipientField(_ref) {
3848
3857
  };
3849
3858
 
3850
3859
  var RecipientPane = function RecipientPane(_ref) {
3851
- var _schema$actions, _schema$actions$actio, _schema$actions2, _schema$actions2$rend, _schema$actions3, _schema$actions3$opti, _schema$actions4, _schema$actions4$opti, _schema$actions5, _schema$actions6, _schema$actions$rende, _schema$actions7, _schema$actions7$rend, _action$metadata, _schema$actions8;
3860
+ var _schema$actions, _schema$actions$actio, _action$recipient, _schema$actions2, _schema$actions2$acti, _schema$actions3, _schema$actions3$rend, _schema$actions4, _schema$actions4$opti, _schema$actions5, _schema$actions5$opti, _schema$actions6, _schema$actions7, _schema$actions$rende, _schema$actions8, _schema$actions8$rend, _action$metadata, _schema$actions9;
3852
3861
  var schema = _ref.schema,
3853
3862
  index$1 = _ref.index;
3854
3863
  var _useTranslation = reactI18next.useTranslation(),
@@ -3862,13 +3871,14 @@ var RecipientPane = function RecipientPane(_ref) {
3862
3871
  // eslint-disable-next-line security/detect-object-injection
3863
3872
  var action = rule.actions[index$1] || {};
3864
3873
  var channel = action.channel || ((_schema$actions = schema.actions) === null || _schema$actions === void 0 || (_schema$actions$actio = _schema$actions.actionForName) === null || _schema$actions$actio === void 0 || (_schema$actions$actio = _schema$actions$actio.call(_schema$actions, action.name)) === null || _schema$actions$actio === void 0 ? void 0 : _schema$actions$actio.channel);
3874
+ var recipient = (_action$recipient = action.recipient) !== null && _action$recipient !== void 0 ? _action$recipient : (_schema$actions2 = schema.actions) === null || _schema$actions2 === void 0 || (_schema$actions2$acti = _schema$actions2.actionForName) === null || _schema$actions2$acti === void 0 || (_schema$actions2$acti = _schema$actions2$acti.call(_schema$actions2, action.name)) === null || _schema$actions2$acti === void 0 ? void 0 : _schema$actions2$acti.recipient;
3865
3875
  var name = "".concat(fieldKeys.actions, ".value.").concat(index$1, ".metadata");
3866
- var editor = (_schema$actions2 = schema.actions) === null || _schema$actions2 === void 0 || (_schema$actions2$rend = _schema$actions2.renderRecipientEditor) === null || _schema$actions2$rend === void 0 ? void 0 : _schema$actions2$rend.call(_schema$actions2, {
3876
+ var editor = (_schema$actions3 = schema.actions) === null || _schema$actions3 === void 0 || (_schema$actions3$rend = _schema$actions3.renderRecipientEditor) === null || _schema$actions3$rend === void 0 ? void 0 : _schema$actions3$rend.call(_schema$actions3, {
3867
3877
  channel: channel,
3868
3878
  name: name,
3869
3879
  action: action
3870
3880
  });
3871
- var flatOption = ((_schema$actions3 = schema.actions) === null || _schema$actions3 === void 0 || (_schema$actions3$opti = _schema$actions3.optionForName) === null || _schema$actions3$opti === void 0 ? void 0 : _schema$actions3$opti.call(_schema$actions3, action.name)) || ((_schema$actions4 = schema.actions) === null || _schema$actions4 === void 0 || (_schema$actions4$opti = _schema$actions4.optionForChannel) === null || _schema$actions4$opti === void 0 ? void 0 : _schema$actions4$opti.call(_schema$actions4, channel));
3881
+ var flatOption = ((_schema$actions4 = schema.actions) === null || _schema$actions4 === void 0 || (_schema$actions4$opti = _schema$actions4.optionForName) === null || _schema$actions4$opti === void 0 ? void 0 : _schema$actions4$opti.call(_schema$actions4, action.name)) || ((_schema$actions5 = schema.actions) === null || _schema$actions5 === void 0 || (_schema$actions5$opti = _schema$actions5.optionForChannel) === null || _schema$actions5$opti === void 0 ? void 0 : _schema$actions5$opti.call(_schema$actions5, channel));
3872
3882
  var isSmsToNumbers = (flatOption === null || flatOption === void 0 ? void 0 : flatOption.type) === SMS_TO_NUMBERS;
3873
3883
  var recipientFieldPath = isSmsToNumbers ? "".concat(name, ".phoneNumbers") : "".concat(name, ".emails");
3874
3884
  usePaneValidation(recipientFieldPath);
@@ -3882,11 +3892,11 @@ var RecipientPane = function RecipientPane(_ref) {
3882
3892
  }, 0);
3883
3893
  // eslint-disable-next-line react-hooks/exhaustive-deps
3884
3894
  }, [!editor]);
3885
- var recipientConfig = (((_schema$actions5 = schema.actions) === null || _schema$actions5 === void 0 ? void 0 : _schema$actions5.options) || []).flatMap(function (option) {
3895
+ var recipientConfig = (((_schema$actions6 = schema.actions) === null || _schema$actions6 === void 0 ? void 0 : _schema$actions6.options) || []).flatMap(function (option) {
3886
3896
  return option.recipients || [];
3887
- }).concat(((_schema$actions6 = schema.actions) === null || _schema$actions6 === void 0 ? void 0 : _schema$actions6.recipients) || []).find(function (item) {
3897
+ }).concat(((_schema$actions7 = schema.actions) === null || _schema$actions7 === void 0 ? void 0 : _schema$actions7.recipients) || []).find(function (item) {
3888
3898
  var _item$value;
3889
- return ((_item$value = item.value) !== null && _item$value !== void 0 ? _item$value : item.id) === action.recipient;
3899
+ return ((_item$value = item.value) !== null && _item$value !== void 0 ? _item$value : item.id) === recipient;
3890
3900
  });
3891
3901
  var builtInRecipientField = recipientConfig !== null && recipientConfig !== void 0 && recipientConfig.field ? /*#__PURE__*/jsxRuntime.jsx(RecipientField, {
3892
3902
  name: name,
@@ -3894,9 +3904,9 @@ var RecipientPane = function RecipientPane(_ref) {
3894
3904
  field: recipientConfig.field,
3895
3905
  placeholder: recipientConfig.placeholder
3896
3906
  }) : null;
3897
- var recipientField = (_schema$actions$rende = (_schema$actions7 = schema.actions) === null || _schema$actions7 === void 0 || (_schema$actions7$rend = _schema$actions7.renderRecipientField) === null || _schema$actions7$rend === void 0 ? void 0 : _schema$actions7$rend.call(_schema$actions7, {
3907
+ var recipientField = (_schema$actions$rende = (_schema$actions8 = schema.actions) === null || _schema$actions8 === void 0 || (_schema$actions8$rend = _schema$actions8.renderRecipientField) === null || _schema$actions8$rend === void 0 ? void 0 : _schema$actions8$rend.call(_schema$actions8, {
3898
3908
  channel: channel,
3899
- recipient: action.recipient,
3909
+ recipient: recipient,
3900
3910
  name: name,
3901
3911
  action: action
3902
3912
  })) !== null && _schema$actions$rende !== void 0 ? _schema$actions$rende : builtInRecipientField;
@@ -3931,7 +3941,7 @@ var RecipientPane = function RecipientPane(_ref) {
3931
3941
  }
3932
3942
 
3933
3943
  // eslint-disable-next-line security/detect-object-injection
3934
- var meta = ((_schema$actions8 = schema.actions) === null || _schema$actions8 === void 0 || (_schema$actions8 = _schema$actions8.channelMeta) === null || _schema$actions8 === void 0 ? void 0 : _schema$actions8[channel]) || {};
3944
+ var meta = ((_schema$actions9 = schema.actions) === null || _schema$actions9 === void 0 || (_schema$actions9 = _schema$actions9.channelMeta) === null || _schema$actions9 === void 0 ? void 0 : _schema$actions9[channel]) || {};
3935
3945
  return /*#__PURE__*/jsxRuntime.jsxs(jsxRuntime.Fragment, {
3936
3946
  children: [/*#__PURE__*/jsxRuntime.jsx(index.Panel.Header, {
3937
3947
  children: /*#__PURE__*/jsxRuntime.jsxs("div", {