@thecb/components 10.2.2 → 10.2.4-beta.0
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.cjs.js +36 -16
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.esm.js +36 -16
- package/dist/index.esm.js.map +1 -1
- package/package.json +1 -1
- package/src/components/atoms/placeholder/Placeholder.js +15 -6
- package/src/components/atoms/placeholder/Placeholder.stories.js +22 -9
- package/src/components/molecules/obligation/Obligation.js +4 -1
- package/src/components/molecules/obligation/modules/AutopayModalModule.js +4 -1
- package/src/components/molecules/obligation/modules/PaymentDetailsActions.js +5 -1
package/dist/index.esm.js
CHANGED
|
@@ -27570,20 +27570,24 @@ var PlaceholderContentWrapper = function PlaceholderContentWrapper(_ref) {
|
|
|
27570
27570
|
action = _ref.action,
|
|
27571
27571
|
destination = _ref.destination,
|
|
27572
27572
|
children = _ref.children,
|
|
27573
|
-
dataQa = _ref.dataQa
|
|
27573
|
+
dataQa = _ref.dataQa,
|
|
27574
|
+
_ref$disabled = _ref.disabled,
|
|
27575
|
+
disabled = _ref$disabled === void 0 ? false : _ref$disabled;
|
|
27574
27576
|
return isLink ? /*#__PURE__*/React.createElement(Link, {
|
|
27575
27577
|
to: destination,
|
|
27576
|
-
"data-qa": dataQa
|
|
27578
|
+
"data-qa": dataQa,
|
|
27579
|
+
disabled: disabled
|
|
27577
27580
|
}, /*#__PURE__*/React.createElement(Box, {
|
|
27578
27581
|
padding: "0",
|
|
27579
27582
|
minHeight: "100%",
|
|
27580
27583
|
extraStyles: "cursor: pointer;"
|
|
27581
27584
|
}, children)) : /*#__PURE__*/React.createElement(Box, {
|
|
27582
|
-
onClick: action,
|
|
27585
|
+
onClick: disabled ? noop : action,
|
|
27583
27586
|
padding: "0",
|
|
27584
27587
|
minHeight: "100%",
|
|
27585
|
-
|
|
27586
|
-
|
|
27588
|
+
dataQa: dataQa,
|
|
27589
|
+
"aria-disabled": disabled,
|
|
27590
|
+
extraStyles: disabled ? "cursor: default; opacity: 0.7;" : "cursor: pointer; opacity: 1;"
|
|
27587
27591
|
}, children);
|
|
27588
27592
|
};
|
|
27589
27593
|
var Placeholder = function Placeholder(_ref2) {
|
|
@@ -27597,12 +27601,15 @@ var Placeholder = function Placeholder(_ref2) {
|
|
|
27597
27601
|
variant = _ref2.variant,
|
|
27598
27602
|
largeIcon = _ref2.largeIcon,
|
|
27599
27603
|
themeValues = _ref2.themeValues,
|
|
27600
|
-
dataQa = _ref2.dataQa
|
|
27604
|
+
dataQa = _ref2.dataQa,
|
|
27605
|
+
_ref2$disabled = _ref2.disabled,
|
|
27606
|
+
disabled = _ref2$disabled === void 0 ? false : _ref2$disabled;
|
|
27601
27607
|
return /*#__PURE__*/React.createElement(PlaceholderContentWrapper, {
|
|
27602
27608
|
isLink: isLink,
|
|
27603
27609
|
action: action,
|
|
27604
27610
|
destination: destination,
|
|
27605
|
-
dataQa: dataQa
|
|
27611
|
+
dataQa: dataQa,
|
|
27612
|
+
disabled: disabled
|
|
27606
27613
|
}, /*#__PURE__*/React.createElement(Box, {
|
|
27607
27614
|
padding: "0",
|
|
27608
27615
|
borderRadius: "4px",
|
|
@@ -27617,7 +27624,7 @@ var Placeholder = function Placeholder(_ref2) {
|
|
|
27617
27624
|
padding: "0",
|
|
27618
27625
|
tabIndex: "0",
|
|
27619
27626
|
onKeyPress: function onKeyPress(e) {
|
|
27620
|
-
return e.key === "Enter" && action();
|
|
27627
|
+
return e.key === "Enter" && !disabled && action();
|
|
27621
27628
|
}
|
|
27622
27629
|
}, /*#__PURE__*/React.createElement(Cluster, {
|
|
27623
27630
|
justify: "center",
|
|
@@ -46514,7 +46521,9 @@ var AutopayModal = function AutopayModal(_ref) {
|
|
|
46514
46521
|
inactive = _ref.inactive,
|
|
46515
46522
|
description = _ref.description,
|
|
46516
46523
|
subDescription = _ref.subDescription,
|
|
46517
|
-
allowedPaymentInstruments = _ref.allowedPaymentInstruments
|
|
46524
|
+
allowedPaymentInstruments = _ref.allowedPaymentInstruments,
|
|
46525
|
+
_ref$isInCustomerMana = _ref.isInCustomerManagement,
|
|
46526
|
+
isInCustomerManagement = _ref$isInCustomerMana === void 0 ? false : _ref$isInCustomerMana;
|
|
46518
46527
|
var generateMethodNeededText = function generateMethodNeededText(planText, allowedPaymentInstruments) {
|
|
46519
46528
|
var allowsCard = allowedPaymentInstruments.includes(CC_METHOD);
|
|
46520
46529
|
var allowsACH = allowedPaymentInstruments.includes(ACH_METHOD);
|
|
@@ -46543,6 +46552,7 @@ var AutopayModal = function AutopayModal(_ref) {
|
|
|
46543
46552
|
case "secondary":
|
|
46544
46553
|
{
|
|
46545
46554
|
return /*#__PURE__*/React.createElement(ButtonWithAction, {
|
|
46555
|
+
disabled: isInCustomerManagement,
|
|
46546
46556
|
text: autoPayActive ? "Turn off ".concat(shortPlan) : "Set Up ".concat(shortPlan),
|
|
46547
46557
|
variant: "secondary",
|
|
46548
46558
|
action: function action() {
|
|
@@ -46555,6 +46565,7 @@ var AutopayModal = function AutopayModal(_ref) {
|
|
|
46555
46565
|
case "tertiary":
|
|
46556
46566
|
{
|
|
46557
46567
|
return /*#__PURE__*/React.createElement(ButtonWithAction, {
|
|
46568
|
+
disabled: isInCustomerManagement,
|
|
46558
46569
|
text: autoPayActive ? "Manage ".concat(shortPlan) : "Set Up ".concat(shortPlan),
|
|
46559
46570
|
variant: "tertiary",
|
|
46560
46571
|
action: function action() {
|
|
@@ -46671,7 +46682,9 @@ var PaymentDetailsActions = function PaymentDetailsActions(_ref) {
|
|
|
46671
46682
|
dueDate = _ref.dueDate,
|
|
46672
46683
|
description = _ref.description,
|
|
46673
46684
|
subDescription = _ref.subDescription,
|
|
46674
|
-
allowedPaymentInstruments = _ref.allowedPaymentInstruments
|
|
46685
|
+
allowedPaymentInstruments = _ref.allowedPaymentInstruments,
|
|
46686
|
+
_ref$isInCustomerMana = _ref.isInCustomerManagement,
|
|
46687
|
+
isInCustomerManagement = _ref$isInCustomerMana === void 0 ? false : _ref$isInCustomerMana;
|
|
46675
46688
|
var planType = isPaymentPlan ? "Payment Plan" : "Autopay";
|
|
46676
46689
|
var _useState = useState(false),
|
|
46677
46690
|
_useState2 = _slicedToArray(_useState, 2),
|
|
@@ -46751,7 +46764,8 @@ var PaymentDetailsActions = function PaymentDetailsActions(_ref) {
|
|
|
46751
46764
|
handleAutopayAction();
|
|
46752
46765
|
},
|
|
46753
46766
|
dataQa: "Set Up Autopay",
|
|
46754
|
-
extraStyles: isMobile && "flex-grow: 1; width: 100%;"
|
|
46767
|
+
extraStyles: isMobile && "flex-grow: 1; width: 100%;",
|
|
46768
|
+
disabled: isInCustomerManagement
|
|
46755
46769
|
}) : /*#__PURE__*/React.createElement(AutopayModalModule, {
|
|
46756
46770
|
autoPayActive: autoPayEnabled,
|
|
46757
46771
|
autoPaySchedule: autoPaySchedule,
|
|
@@ -46777,7 +46791,8 @@ var PaymentDetailsActions = function PaymentDetailsActions(_ref) {
|
|
|
46777
46791
|
},
|
|
46778
46792
|
text: "Pay Now",
|
|
46779
46793
|
variant: isMobile ? "smallSecondary" : "secondary",
|
|
46780
|
-
dataQa: "Pay Now"
|
|
46794
|
+
dataQa: "Pay Now",
|
|
46795
|
+
disabled: isInCustomerManagement
|
|
46781
46796
|
}))), isMobile && /*#__PURE__*/React.createElement(Box, {
|
|
46782
46797
|
padding: "8px 0 0",
|
|
46783
46798
|
width: "100%"
|
|
@@ -46789,7 +46804,8 @@ var PaymentDetailsActions = function PaymentDetailsActions(_ref) {
|
|
|
46789
46804
|
text: "Pay Now",
|
|
46790
46805
|
variant: isMobile ? "smallSecondary" : "secondary",
|
|
46791
46806
|
dataQa: "Pay Now",
|
|
46792
|
-
extraStyles: isMobile && "flex-grow: 1; width: 100%; margin: 0;"
|
|
46807
|
+
extraStyles: isMobile && "flex-grow: 1; width: 100%; margin: 0;",
|
|
46808
|
+
disabled: isInCustomerManagement
|
|
46793
46809
|
}))));
|
|
46794
46810
|
};
|
|
46795
46811
|
|
|
@@ -46961,7 +46977,9 @@ var Obligation = function Obligation(_ref) {
|
|
|
46961
46977
|
_ref$inactiveLookupIn = _ref.inactiveLookupInput,
|
|
46962
46978
|
inactiveLookupInput = _ref$inactiveLookupIn === void 0 ? "Account" : _ref$inactiveLookupIn,
|
|
46963
46979
|
_ref$inactiveLookupVa = _ref.inactiveLookupValue,
|
|
46964
|
-
inactiveLookupValue = _ref$inactiveLookupVa === void 0 ? "" : _ref$inactiveLookupVa
|
|
46980
|
+
inactiveLookupValue = _ref$inactiveLookupVa === void 0 ? "" : _ref$inactiveLookupVa,
|
|
46981
|
+
_ref$isInCustomerMana = _ref.isInCustomerManagement,
|
|
46982
|
+
isInCustomerManagement = _ref$isInCustomerMana === void 0 ? false : _ref$isInCustomerMana;
|
|
46965
46983
|
/*
|
|
46966
46984
|
The value of obligations is always an array. It can contain:
|
|
46967
46985
|
- A single obligation
|
|
@@ -47049,7 +47067,8 @@ var Obligation = function Obligation(_ref) {
|
|
|
47049
47067
|
obligationAssocID: obligationAssocID,
|
|
47050
47068
|
description: description,
|
|
47051
47069
|
subDescription: subDescription,
|
|
47052
|
-
allowedPaymentInstruments: allowedPaymentInstruments
|
|
47070
|
+
allowedPaymentInstruments: allowedPaymentInstruments,
|
|
47071
|
+
isInCustomerManagement: isInCustomerManagement
|
|
47053
47072
|
}))), isMobile && /*#__PURE__*/React.createElement(PaymentDetailsActions, {
|
|
47054
47073
|
obligations: obligations,
|
|
47055
47074
|
autoPayEnabled: autoPayEnabled,
|
|
@@ -47067,7 +47086,8 @@ var Obligation = function Obligation(_ref) {
|
|
|
47067
47086
|
obligationAssocID: obligationAssocID,
|
|
47068
47087
|
description: description,
|
|
47069
47088
|
subDescription: subDescription,
|
|
47070
|
-
allowedPaymentInstruments: allowedPaymentInstruments
|
|
47089
|
+
allowedPaymentInstruments: allowedPaymentInstruments,
|
|
47090
|
+
isInCustomerManagement: isInCustomerManagement
|
|
47071
47091
|
}));
|
|
47072
47092
|
var inactiveObligation = /*#__PURE__*/React.createElement(Box, {
|
|
47073
47093
|
padding: "0",
|