@thecb/components 5.8.1-beta.2 → 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,6 +40698,8 @@ var InactiveTitleModule = function InactiveTitleModule(_ref) {
|
|
|
40698
40698
|
};
|
|
40699
40699
|
|
|
40700
40700
|
var Obligation = function Obligation(_ref) {
|
|
40701
|
+
var _firstObligation$cust, _firstObligation$desc, _firstObligation$subD;
|
|
40702
|
+
|
|
40701
40703
|
var config = _ref.config,
|
|
40702
40704
|
obligations = _ref.obligations,
|
|
40703
40705
|
actions = _ref.actions,
|
|
@@ -40720,22 +40722,30 @@ var Obligation = function Obligation(_ref) {
|
|
|
40720
40722
|
inactiveLookupInput = _ref$inactiveLookupIn === void 0 ? "Account" : _ref$inactiveLookupIn,
|
|
40721
40723
|
_ref$inactiveLookupVa = _ref.inactiveLookupValue,
|
|
40722
40724
|
inactiveLookupValue = _ref$inactiveLookupVa === void 0 ? "" : _ref$inactiveLookupVa;
|
|
40723
|
-
|
|
40724
|
-
|
|
40725
|
-
|
|
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 : {};
|
|
40726
40736
|
var boxShadowValue = "0px 4px 4px rgba(41, 42, 51, 0.1), 0px 1px 1px 2px rgba(41, 42, 51, 0.1);";
|
|
40727
40737
|
var activeObligation = /*#__PURE__*/React.createElement(Box, {
|
|
40728
40738
|
padding: "0",
|
|
40729
40739
|
borderRadius: "4px",
|
|
40730
40740
|
boxShadow: boxShadowValue,
|
|
40731
40741
|
as: "section",
|
|
40732
|
-
"aria-label": "".concat(
|
|
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)
|
|
40733
40743
|
}, /*#__PURE__*/React.createElement(Box, {
|
|
40734
40744
|
background: WHITE
|
|
40735
40745
|
}, /*#__PURE__*/React.createElement(Stack, {
|
|
40736
40746
|
childGap: "14px"
|
|
40737
40747
|
}, /*#__PURE__*/React.createElement(Box, {
|
|
40738
|
-
key: "".concat(
|
|
40748
|
+
key: "".concat(firstObligation === null || firstObligation === void 0 ? void 0 : firstObligation.id, "-top"),
|
|
40739
40749
|
padding: "0 8px",
|
|
40740
40750
|
minWidth: "100%"
|
|
40741
40751
|
}, /*#__PURE__*/React.createElement(Cluster, {
|
|
@@ -40755,12 +40765,12 @@ var Obligation = function Obligation(_ref) {
|
|
|
40755
40765
|
iconValue: config.iconValue,
|
|
40756
40766
|
customAttributes: customAttributes
|
|
40757
40767
|
}), /*#__PURE__*/React.createElement(TitleModule, {
|
|
40758
|
-
title:
|
|
40759
|
-
subtitle:
|
|
40768
|
+
title: firstObligation === null || firstObligation === void 0 ? void 0 : firstObligation.description,
|
|
40769
|
+
subtitle: firstObligation === null || firstObligation === void 0 ? void 0 : firstObligation.subDescription,
|
|
40760
40770
|
titleColor: BRIGHT_GREY,
|
|
40761
40771
|
isMobile: isMobile
|
|
40762
40772
|
}))), !isMobile && /*#__PURE__*/React.createElement(AmountModule, {
|
|
40763
|
-
totalAmountDue: obligations.reduce(function (acc, curr) {
|
|
40773
|
+
totalAmountDue: obligations === null || obligations === void 0 ? void 0 : obligations.reduce(function (acc, curr) {
|
|
40764
40774
|
return acc + curr.amountDue;
|
|
40765
40775
|
}, 0),
|
|
40766
40776
|
autoPayEnabled: autoPayEnabled,
|
|
@@ -40811,7 +40821,7 @@ var Obligation = function Obligation(_ref) {
|
|
|
40811
40821
|
}, /*#__PURE__*/React.createElement(Stack, {
|
|
40812
40822
|
childGap: "14px"
|
|
40813
40823
|
}, /*#__PURE__*/React.createElement(Box, {
|
|
40814
|
-
key: "".concat(
|
|
40824
|
+
key: "".concat(obligationAssocID, "-top"),
|
|
40815
40825
|
padding: "0 8px",
|
|
40816
40826
|
minWidth: "100%"
|
|
40817
40827
|
}, /*#__PURE__*/React.createElement(Cluster, {
|