@thecb/components 5.8.1-beta.4 → 5.8.1-beta.5

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/index.esm.js CHANGED
@@ -40698,7 +40698,7 @@ var InactiveTitleModule = function InactiveTitleModule(_ref) {
40698
40698
  };
40699
40699
 
40700
40700
  var Obligation = function Obligation(_ref) {
40701
- var _obligation$customAtt, _obligation$descripti, _obligation$subDescri;
40701
+ var _firstObligation$cust, _firstObligation$desc, _firstObligation$subD;
40702
40702
 
40703
40703
  var config = _ref.config,
40704
40704
  obligations = _ref.obligations,
@@ -40722,21 +40722,30 @@ var Obligation = function Obligation(_ref) {
40722
40722
  inactiveLookupInput = _ref$inactiveLookupIn === void 0 ? "Account" : _ref$inactiveLookupIn,
40723
40723
  _ref$inactiveLookupVa = _ref.inactiveLookupValue,
40724
40724
  inactiveLookupValue = _ref$inactiveLookupVa === void 0 ? "" : _ref$inactiveLookupVa;
40725
- var obligation = obligations[0];
40726
- var customAttributes = (_obligation$customAtt = obligation === null || obligation === void 0 ? void 0 : obligation.customAttributes) !== null && _obligation$customAtt !== void 0 ? _obligation$customAtt : {};
40725
+
40726
+ /*
40727
+ The value of obligations is always an array. It can contain:
40728
+ - A single obligation
40729
+ - A group of obligations (a "collection")
40730
+
40731
+ The top level desc/subdesc for all obligations in a collection is the same
40732
+ (Collection accounts look different in the Account Details page)
40733
+ */
40734
+ var firstObligation = obligations[0];
40735
+ var customAttributes = (_firstObligation$cust = firstObligation === null || firstObligation === void 0 ? void 0 : firstObligation.customAttributes) !== null && _firstObligation$cust !== void 0 ? _firstObligation$cust : {};
40727
40736
  var boxShadowValue = "0px 4px 4px rgba(41, 42, 51, 0.1), 0px 1px 1px 2px rgba(41, 42, 51, 0.1);";
40728
40737
  var activeObligation = /*#__PURE__*/React.createElement(Box, {
40729
40738
  padding: "0",
40730
40739
  borderRadius: "4px",
40731
40740
  boxShadow: boxShadowValue,
40732
40741
  as: "section",
40733
- "aria-label": "".concat((_obligation$descripti = obligation === null || obligation === void 0 ? void 0 : obligation.description) !== null && _obligation$descripti !== void 0 ? _obligation$descripti : "account", " ").concat((_obligation$subDescri = obligation === null || obligation === void 0 ? void 0 : obligation.subDescription) !== null && _obligation$subDescri !== void 0 ? _obligation$subDescri : obligationAssocID)
40742
+ "aria-label": "".concat((_firstObligation$desc = firstObligation === null || firstObligation === void 0 ? void 0 : firstObligation.description) !== null && _firstObligation$desc !== void 0 ? _firstObligation$desc : "account", " ").concat((_firstObligation$subD = firstObligation === null || firstObligation === void 0 ? void 0 : firstObligation.subDescription) !== null && _firstObligation$subD !== void 0 ? _firstObligation$subD : obligationAssocID)
40734
40743
  }, /*#__PURE__*/React.createElement(Box, {
40735
40744
  background: WHITE
40736
40745
  }, /*#__PURE__*/React.createElement(Stack, {
40737
40746
  childGap: "14px"
40738
40747
  }, /*#__PURE__*/React.createElement(Box, {
40739
- key: "".concat(obligations === null || obligations === void 0 ? void 0 : obligations[0].id, "-top"),
40748
+ key: "".concat(firstObligation === null || firstObligation === void 0 ? void 0 : firstObligation.id, "-top"),
40740
40749
  padding: "0 8px",
40741
40750
  minWidth: "100%"
40742
40751
  }, /*#__PURE__*/React.createElement(Cluster, {
@@ -40756,8 +40765,8 @@ var Obligation = function Obligation(_ref) {
40756
40765
  iconValue: config.iconValue,
40757
40766
  customAttributes: customAttributes
40758
40767
  }), /*#__PURE__*/React.createElement(TitleModule, {
40759
- title: obligation === null || obligation === void 0 ? void 0 : obligation.description,
40760
- subtitle: obligation === null || obligation === void 0 ? void 0 : obligation.subDescription,
40768
+ title: firstObligation === null || firstObligation === void 0 ? void 0 : firstObligation.description,
40769
+ subtitle: firstObligation === null || firstObligation === void 0 ? void 0 : firstObligation.subDescription,
40761
40770
  titleColor: BRIGHT_GREY,
40762
40771
  isMobile: isMobile
40763
40772
  }))), !isMobile && /*#__PURE__*/React.createElement(AmountModule, {