@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.cjs.js
CHANGED
|
@@ -27578,20 +27578,24 @@ var PlaceholderContentWrapper = function PlaceholderContentWrapper(_ref) {
|
|
|
27578
27578
|
action = _ref.action,
|
|
27579
27579
|
destination = _ref.destination,
|
|
27580
27580
|
children = _ref.children,
|
|
27581
|
-
dataQa = _ref.dataQa
|
|
27581
|
+
dataQa = _ref.dataQa,
|
|
27582
|
+
_ref$disabled = _ref.disabled,
|
|
27583
|
+
disabled = _ref$disabled === void 0 ? false : _ref$disabled;
|
|
27582
27584
|
return isLink ? /*#__PURE__*/React__default.createElement(reactRouterDom.Link, {
|
|
27583
27585
|
to: destination,
|
|
27584
|
-
"data-qa": dataQa
|
|
27586
|
+
"data-qa": dataQa,
|
|
27587
|
+
disabled: disabled
|
|
27585
27588
|
}, /*#__PURE__*/React__default.createElement(Box, {
|
|
27586
27589
|
padding: "0",
|
|
27587
27590
|
minHeight: "100%",
|
|
27588
27591
|
extraStyles: "cursor: pointer;"
|
|
27589
27592
|
}, children)) : /*#__PURE__*/React__default.createElement(Box, {
|
|
27590
|
-
onClick: action,
|
|
27593
|
+
onClick: disabled ? noop : action,
|
|
27591
27594
|
padding: "0",
|
|
27592
27595
|
minHeight: "100%",
|
|
27593
|
-
|
|
27594
|
-
|
|
27596
|
+
dataQa: dataQa,
|
|
27597
|
+
"aria-disabled": disabled,
|
|
27598
|
+
extraStyles: disabled ? "cursor: default; opacity: 0.7;" : "cursor: pointer; opacity: 1;"
|
|
27595
27599
|
}, children);
|
|
27596
27600
|
};
|
|
27597
27601
|
var Placeholder = function Placeholder(_ref2) {
|
|
@@ -27605,12 +27609,15 @@ var Placeholder = function Placeholder(_ref2) {
|
|
|
27605
27609
|
variant = _ref2.variant,
|
|
27606
27610
|
largeIcon = _ref2.largeIcon,
|
|
27607
27611
|
themeValues = _ref2.themeValues,
|
|
27608
|
-
dataQa = _ref2.dataQa
|
|
27612
|
+
dataQa = _ref2.dataQa,
|
|
27613
|
+
_ref2$disabled = _ref2.disabled,
|
|
27614
|
+
disabled = _ref2$disabled === void 0 ? false : _ref2$disabled;
|
|
27609
27615
|
return /*#__PURE__*/React__default.createElement(PlaceholderContentWrapper, {
|
|
27610
27616
|
isLink: isLink,
|
|
27611
27617
|
action: action,
|
|
27612
27618
|
destination: destination,
|
|
27613
|
-
dataQa: dataQa
|
|
27619
|
+
dataQa: dataQa,
|
|
27620
|
+
disabled: disabled
|
|
27614
27621
|
}, /*#__PURE__*/React__default.createElement(Box, {
|
|
27615
27622
|
padding: "0",
|
|
27616
27623
|
borderRadius: "4px",
|
|
@@ -27625,7 +27632,7 @@ var Placeholder = function Placeholder(_ref2) {
|
|
|
27625
27632
|
padding: "0",
|
|
27626
27633
|
tabIndex: "0",
|
|
27627
27634
|
onKeyPress: function onKeyPress(e) {
|
|
27628
|
-
return e.key === "Enter" && action();
|
|
27635
|
+
return e.key === "Enter" && !disabled && action();
|
|
27629
27636
|
}
|
|
27630
27637
|
}, /*#__PURE__*/React__default.createElement(Cluster, {
|
|
27631
27638
|
justify: "center",
|
|
@@ -46522,7 +46529,9 @@ var AutopayModal = function AutopayModal(_ref) {
|
|
|
46522
46529
|
inactive = _ref.inactive,
|
|
46523
46530
|
description = _ref.description,
|
|
46524
46531
|
subDescription = _ref.subDescription,
|
|
46525
|
-
allowedPaymentInstruments = _ref.allowedPaymentInstruments
|
|
46532
|
+
allowedPaymentInstruments = _ref.allowedPaymentInstruments,
|
|
46533
|
+
_ref$isInCustomerMana = _ref.isInCustomerManagement,
|
|
46534
|
+
isInCustomerManagement = _ref$isInCustomerMana === void 0 ? false : _ref$isInCustomerMana;
|
|
46526
46535
|
var generateMethodNeededText = function generateMethodNeededText(planText, allowedPaymentInstruments) {
|
|
46527
46536
|
var allowsCard = allowedPaymentInstruments.includes(CC_METHOD);
|
|
46528
46537
|
var allowsACH = allowedPaymentInstruments.includes(ACH_METHOD);
|
|
@@ -46551,6 +46560,7 @@ var AutopayModal = function AutopayModal(_ref) {
|
|
|
46551
46560
|
case "secondary":
|
|
46552
46561
|
{
|
|
46553
46562
|
return /*#__PURE__*/React__default.createElement(ButtonWithAction, {
|
|
46563
|
+
disabled: isInCustomerManagement,
|
|
46554
46564
|
text: autoPayActive ? "Turn off ".concat(shortPlan) : "Set Up ".concat(shortPlan),
|
|
46555
46565
|
variant: "secondary",
|
|
46556
46566
|
action: function action() {
|
|
@@ -46563,6 +46573,7 @@ var AutopayModal = function AutopayModal(_ref) {
|
|
|
46563
46573
|
case "tertiary":
|
|
46564
46574
|
{
|
|
46565
46575
|
return /*#__PURE__*/React__default.createElement(ButtonWithAction, {
|
|
46576
|
+
disabled: isInCustomerManagement,
|
|
46566
46577
|
text: autoPayActive ? "Manage ".concat(shortPlan) : "Set Up ".concat(shortPlan),
|
|
46567
46578
|
variant: "tertiary",
|
|
46568
46579
|
action: function action() {
|
|
@@ -46679,7 +46690,9 @@ var PaymentDetailsActions = function PaymentDetailsActions(_ref) {
|
|
|
46679
46690
|
dueDate = _ref.dueDate,
|
|
46680
46691
|
description = _ref.description,
|
|
46681
46692
|
subDescription = _ref.subDescription,
|
|
46682
|
-
allowedPaymentInstruments = _ref.allowedPaymentInstruments
|
|
46693
|
+
allowedPaymentInstruments = _ref.allowedPaymentInstruments,
|
|
46694
|
+
_ref$isInCustomerMana = _ref.isInCustomerManagement,
|
|
46695
|
+
isInCustomerManagement = _ref$isInCustomerMana === void 0 ? false : _ref$isInCustomerMana;
|
|
46683
46696
|
var planType = isPaymentPlan ? "Payment Plan" : "Autopay";
|
|
46684
46697
|
var _useState = React.useState(false),
|
|
46685
46698
|
_useState2 = _slicedToArray(_useState, 2),
|
|
@@ -46759,7 +46772,8 @@ var PaymentDetailsActions = function PaymentDetailsActions(_ref) {
|
|
|
46759
46772
|
handleAutopayAction();
|
|
46760
46773
|
},
|
|
46761
46774
|
dataQa: "Set Up Autopay",
|
|
46762
|
-
extraStyles: isMobile && "flex-grow: 1; width: 100%;"
|
|
46775
|
+
extraStyles: isMobile && "flex-grow: 1; width: 100%;",
|
|
46776
|
+
disabled: isInCustomerManagement
|
|
46763
46777
|
}) : /*#__PURE__*/React__default.createElement(AutopayModalModule, {
|
|
46764
46778
|
autoPayActive: autoPayEnabled,
|
|
46765
46779
|
autoPaySchedule: autoPaySchedule,
|
|
@@ -46785,7 +46799,8 @@ var PaymentDetailsActions = function PaymentDetailsActions(_ref) {
|
|
|
46785
46799
|
},
|
|
46786
46800
|
text: "Pay Now",
|
|
46787
46801
|
variant: isMobile ? "smallSecondary" : "secondary",
|
|
46788
|
-
dataQa: "Pay Now"
|
|
46802
|
+
dataQa: "Pay Now",
|
|
46803
|
+
disabled: isInCustomerManagement
|
|
46789
46804
|
}))), isMobile && /*#__PURE__*/React__default.createElement(Box, {
|
|
46790
46805
|
padding: "8px 0 0",
|
|
46791
46806
|
width: "100%"
|
|
@@ -46797,7 +46812,8 @@ var PaymentDetailsActions = function PaymentDetailsActions(_ref) {
|
|
|
46797
46812
|
text: "Pay Now",
|
|
46798
46813
|
variant: isMobile ? "smallSecondary" : "secondary",
|
|
46799
46814
|
dataQa: "Pay Now",
|
|
46800
|
-
extraStyles: isMobile && "flex-grow: 1; width: 100%; margin: 0;"
|
|
46815
|
+
extraStyles: isMobile && "flex-grow: 1; width: 100%; margin: 0;",
|
|
46816
|
+
disabled: isInCustomerManagement
|
|
46801
46817
|
}))));
|
|
46802
46818
|
};
|
|
46803
46819
|
|
|
@@ -46969,7 +46985,9 @@ var Obligation = function Obligation(_ref) {
|
|
|
46969
46985
|
_ref$inactiveLookupIn = _ref.inactiveLookupInput,
|
|
46970
46986
|
inactiveLookupInput = _ref$inactiveLookupIn === void 0 ? "Account" : _ref$inactiveLookupIn,
|
|
46971
46987
|
_ref$inactiveLookupVa = _ref.inactiveLookupValue,
|
|
46972
|
-
inactiveLookupValue = _ref$inactiveLookupVa === void 0 ? "" : _ref$inactiveLookupVa
|
|
46988
|
+
inactiveLookupValue = _ref$inactiveLookupVa === void 0 ? "" : _ref$inactiveLookupVa,
|
|
46989
|
+
_ref$isInCustomerMana = _ref.isInCustomerManagement,
|
|
46990
|
+
isInCustomerManagement = _ref$isInCustomerMana === void 0 ? false : _ref$isInCustomerMana;
|
|
46973
46991
|
/*
|
|
46974
46992
|
The value of obligations is always an array. It can contain:
|
|
46975
46993
|
- A single obligation
|
|
@@ -47057,7 +47075,8 @@ var Obligation = function Obligation(_ref) {
|
|
|
47057
47075
|
obligationAssocID: obligationAssocID,
|
|
47058
47076
|
description: description,
|
|
47059
47077
|
subDescription: subDescription,
|
|
47060
|
-
allowedPaymentInstruments: allowedPaymentInstruments
|
|
47078
|
+
allowedPaymentInstruments: allowedPaymentInstruments,
|
|
47079
|
+
isInCustomerManagement: isInCustomerManagement
|
|
47061
47080
|
}))), isMobile && /*#__PURE__*/React__default.createElement(PaymentDetailsActions, {
|
|
47062
47081
|
obligations: obligations,
|
|
47063
47082
|
autoPayEnabled: autoPayEnabled,
|
|
@@ -47075,7 +47094,8 @@ var Obligation = function Obligation(_ref) {
|
|
|
47075
47094
|
obligationAssocID: obligationAssocID,
|
|
47076
47095
|
description: description,
|
|
47077
47096
|
subDescription: subDescription,
|
|
47078
|
-
allowedPaymentInstruments: allowedPaymentInstruments
|
|
47097
|
+
allowedPaymentInstruments: allowedPaymentInstruments,
|
|
47098
|
+
isInCustomerManagement: isInCustomerManagement
|
|
47079
47099
|
}));
|
|
47080
47100
|
var inactiveObligation = /*#__PURE__*/React__default.createElement(Box, {
|
|
47081
47101
|
padding: "0",
|