@thecb/components 10.4.0-beta.11 → 10.4.0-beta.13
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 +35 -57
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.esm.js +35 -57
- package/dist/index.esm.js.map +1 -1
- package/package.json +1 -1
- package/src/components/molecules/obligation/modules/AmountModule.js +9 -4
- package/src/components/molecules/obligation/modules/AutopayModalModule.js +11 -12
- package/src/components/molecules/obligation/modules/InactiveControlsModule.js +1 -10
- package/src/components/molecules/obligation/modules/PaymentDetailsActions.js +4 -19
- package/src/components/molecules/obligation/modules/RemoveAccountModalModule.js +7 -9
package/dist/index.cjs.js
CHANGED
|
@@ -46745,8 +46745,8 @@ var AutopayModal = function AutopayModal(_ref) {
|
|
|
46745
46745
|
allowedPaymentInstruments = _ref.allowedPaymentInstruments,
|
|
46746
46746
|
_ref$disableActions = _ref.disableActions,
|
|
46747
46747
|
disableActions = _ref$disableActions === void 0 ? false : _ref$disableActions,
|
|
46748
|
-
|
|
46749
|
-
|
|
46748
|
+
action = _ref.action,
|
|
46749
|
+
onClick = _ref.onClick,
|
|
46750
46750
|
onKeyPress = _ref.onKeyPress;
|
|
46751
46751
|
var generateMethodNeededText = function generateMethodNeededText(planText, allowedPaymentInstruments) {
|
|
46752
46752
|
var allowsCard = allowedPaymentInstruments.includes(CC_METHOD);
|
|
@@ -46778,8 +46778,8 @@ var AutopayModal = function AutopayModal(_ref) {
|
|
|
46778
46778
|
return /*#__PURE__*/React__default.createElement(ButtonWithAction, {
|
|
46779
46779
|
text: autoPayActive ? "Turn off ".concat(shortPlan) : "Set Up ".concat(shortPlan),
|
|
46780
46780
|
variant: "secondary",
|
|
46781
|
-
action: function
|
|
46782
|
-
|
|
46781
|
+
action: action || function () {
|
|
46782
|
+
return toggleModal(true);
|
|
46783
46783
|
},
|
|
46784
46784
|
dataQa: "Turn off Autopay",
|
|
46785
46785
|
extraStyles: isMobile ? "flex-grow: 1; width: 100%; margin: 0;" : "flex-grow: 1; min-width: 165px;",
|
|
@@ -46791,8 +46791,8 @@ var AutopayModal = function AutopayModal(_ref) {
|
|
|
46791
46791
|
return /*#__PURE__*/React__default.createElement(ButtonWithAction, {
|
|
46792
46792
|
text: autoPayActive ? "Manage ".concat(shortPlan) : "Set Up ".concat(shortPlan),
|
|
46793
46793
|
variant: "tertiary",
|
|
46794
|
-
action: function
|
|
46795
|
-
|
|
46794
|
+
action: action || function () {
|
|
46795
|
+
return toggleModal(true);
|
|
46796
46796
|
},
|
|
46797
46797
|
dataQa: "Manage Autopay",
|
|
46798
46798
|
extraStyles: isMobile && "flex-grow: 1; width: 100%;",
|
|
@@ -46803,8 +46803,8 @@ var AutopayModal = function AutopayModal(_ref) {
|
|
|
46803
46803
|
{
|
|
46804
46804
|
return /*#__PURE__*/React__default.createElement(Box, {
|
|
46805
46805
|
padding: "0",
|
|
46806
|
-
onClick: function
|
|
46807
|
-
|
|
46806
|
+
onClick: onClick || function () {
|
|
46807
|
+
toggleModal(true);
|
|
46808
46808
|
},
|
|
46809
46809
|
hoverStyles: hoverStyles,
|
|
46810
46810
|
activeStyles: activeStyles,
|
|
@@ -46814,8 +46814,8 @@ var AutopayModal = function AutopayModal(_ref) {
|
|
|
46814
46814
|
align: "center"
|
|
46815
46815
|
}, /*#__PURE__*/React__default.createElement(AutopayOnIcon, null), /*#__PURE__*/React__default.createElement(Text$1, {
|
|
46816
46816
|
variant: "pS",
|
|
46817
|
-
onClick: function
|
|
46818
|
-
return
|
|
46817
|
+
onClick: onClick || function () {
|
|
46818
|
+
return toggleModal(true);
|
|
46819
46819
|
},
|
|
46820
46820
|
onKeyPress: onKeyPress || function (e) {
|
|
46821
46821
|
e.key === "Enter" && toggleModal(true);
|
|
@@ -46832,10 +46832,10 @@ var AutopayModal = function AutopayModal(_ref) {
|
|
|
46832
46832
|
}
|
|
46833
46833
|
};
|
|
46834
46834
|
return /*#__PURE__*/React__default.createElement(Modal$1, _extends({
|
|
46835
|
-
showModal:
|
|
46835
|
+
showModal: function showModal() {
|
|
46836
46836
|
return toggleModal(true);
|
|
46837
46837
|
},
|
|
46838
|
-
hideModal:
|
|
46838
|
+
hideModal: function hideModal() {
|
|
46839
46839
|
return toggleModal(false);
|
|
46840
46840
|
},
|
|
46841
46841
|
modalOpen: modalOpen
|
|
@@ -46889,11 +46889,15 @@ var AmountModule = function AmountModule(_ref) {
|
|
|
46889
46889
|
subDescription: subDescription,
|
|
46890
46890
|
allowedPaymentInstruments: allowedPaymentInstruments,
|
|
46891
46891
|
disableActions: disableActions,
|
|
46892
|
-
action: function
|
|
46893
|
-
return
|
|
46892
|
+
action: disableActions ? function () {
|
|
46893
|
+
return noop$1;
|
|
46894
|
+
} : function () {
|
|
46895
|
+
return toggleModal(true);
|
|
46894
46896
|
},
|
|
46895
|
-
onClick: function
|
|
46896
|
-
return
|
|
46897
|
+
onClick: disableActions ? function () {
|
|
46898
|
+
return noop$1;
|
|
46899
|
+
} : function () {
|
|
46900
|
+
toggleModal(true);
|
|
46897
46901
|
},
|
|
46898
46902
|
onKeyPress: disableActions ? function () {
|
|
46899
46903
|
return noop$1;
|
|
@@ -46977,7 +46981,7 @@ var PaymentDetailsActions = function PaymentDetailsActions(_ref) {
|
|
|
46977
46981
|
description: description,
|
|
46978
46982
|
subDescription: subDescription,
|
|
46979
46983
|
allowedPaymentInstruments: allowedPaymentInstruments,
|
|
46980
|
-
|
|
46984
|
+
isInCustomerManagement: disableActions
|
|
46981
46985
|
}))), /*#__PURE__*/React__default.createElement(Box, {
|
|
46982
46986
|
padding: isMobile ? "16px" : "0"
|
|
46983
46987
|
}, /*#__PURE__*/React__default.createElement(Cluster, {
|
|
@@ -46990,7 +46994,7 @@ var PaymentDetailsActions = function PaymentDetailsActions(_ref) {
|
|
|
46990
46994
|
}, /*#__PURE__*/React__default.createElement(ButtonWithAction, {
|
|
46991
46995
|
variant: "tertiary",
|
|
46992
46996
|
text: config.type === "ACCOUNT" ? "Account Details" : "Property Details",
|
|
46993
|
-
action:
|
|
46997
|
+
action: handleDetailsClick,
|
|
46994
46998
|
dataQa: "Account Details",
|
|
46995
46999
|
extraStyles: isMobile && "flex-grow: 1; width: 100%;"
|
|
46996
47000
|
})), /*#__PURE__*/React__default.createElement(Box, {
|
|
@@ -47000,10 +47004,8 @@ var PaymentDetailsActions = function PaymentDetailsActions(_ref) {
|
|
|
47000
47004
|
variant: "tertiary",
|
|
47001
47005
|
text: "Set Up ".concat(planType),
|
|
47002
47006
|
action: function action() {
|
|
47003
|
-
|
|
47004
|
-
|
|
47005
|
-
handleAutopayAction();
|
|
47006
|
-
}
|
|
47007
|
+
setDetailedObligation(obligations, config, obligationAssocID);
|
|
47008
|
+
handleAutopayAction();
|
|
47007
47009
|
},
|
|
47008
47010
|
dataQa: "Set Up Autopay",
|
|
47009
47011
|
extraStyles: isMobile && "flex-grow: 1; width: 100%;",
|
|
@@ -47024,18 +47026,7 @@ var PaymentDetailsActions = function PaymentDetailsActions(_ref) {
|
|
|
47024
47026
|
description: description,
|
|
47025
47027
|
subDescription: subDescription,
|
|
47026
47028
|
allowedPaymentInstruments: allowedPaymentInstruments,
|
|
47027
|
-
disableActions: disableActions
|
|
47028
|
-
action: function action() {
|
|
47029
|
-
return disableActions ? noop$1 : toggleModal(true);
|
|
47030
|
-
},
|
|
47031
|
-
onClick: function onClick() {
|
|
47032
|
-
return disableActions ? noop$1 : toggleModal(true);
|
|
47033
|
-
},
|
|
47034
|
-
onKeyPress: disableActions ? function () {
|
|
47035
|
-
return noop$1;
|
|
47036
|
-
} : function (e) {
|
|
47037
|
-
e.key === "Enter" && toggleModal(true);
|
|
47038
|
-
}
|
|
47029
|
+
disableActions: disableActions
|
|
47039
47030
|
})), !isMobile && /*#__PURE__*/React__default.createElement(Box, {
|
|
47040
47031
|
padding: "0"
|
|
47041
47032
|
}, /*#__PURE__*/React__default.createElement(ButtonWithAction, {
|
|
@@ -47072,8 +47063,8 @@ var RemoveAccountModalModule = function RemoveAccountModalModule(_ref) {
|
|
|
47072
47063
|
removeAccount = _ref.removeAccount,
|
|
47073
47064
|
accountType = _ref.accountType,
|
|
47074
47065
|
isMobile = _ref.isMobile,
|
|
47075
|
-
_ref$
|
|
47076
|
-
|
|
47066
|
+
_ref$isInCustomerMana = _ref.isInCustomerManagement,
|
|
47067
|
+
isInCustomerManagement = _ref$isInCustomerMana === void 0 ? false : _ref$isInCustomerMana;
|
|
47077
47068
|
var _useState = React.useState(false),
|
|
47078
47069
|
_useState2 = _slicedToArray(_useState, 2),
|
|
47079
47070
|
modalIsOpen = _useState2[0],
|
|
@@ -47086,10 +47077,10 @@ var RemoveAccountModalModule = function RemoveAccountModalModule(_ref) {
|
|
|
47086
47077
|
}, "".concat(agencyName, " - ")) : "";
|
|
47087
47078
|
var identifier = accountType === "Account" && obligations.length > 1 ? "accounts" : accountType === "Property" && obligations.length > 1 ? "properties" : accountType.toLowerCase();
|
|
47088
47079
|
return /*#__PURE__*/React__default.createElement(Modal$1, {
|
|
47089
|
-
showModal:
|
|
47080
|
+
showModal: function showModal() {
|
|
47090
47081
|
return setModalIsOpen(true);
|
|
47091
47082
|
},
|
|
47092
|
-
hideModal:
|
|
47083
|
+
hideModal: function hideModal() {
|
|
47093
47084
|
return setModalIsOpen(false);
|
|
47094
47085
|
},
|
|
47095
47086
|
modalOpen: modalIsOpen,
|
|
@@ -47097,10 +47088,8 @@ var RemoveAccountModalModule = function RemoveAccountModalModule(_ref) {
|
|
|
47097
47088
|
modalBodyText: "Are you sure you want to remove the ".concat(identifier, " ").concat(accounts, "? Any autopay scheduled against ").concat(obligations.length > 1 ? "them" : "it", " will be deactivated."),
|
|
47098
47089
|
continueButtonText: "Remove",
|
|
47099
47090
|
continueAction: function continueAction() {
|
|
47100
|
-
|
|
47101
|
-
|
|
47102
|
-
setModalIsOpen(false);
|
|
47103
|
-
}
|
|
47091
|
+
removeAccount();
|
|
47092
|
+
setModalIsOpen(false);
|
|
47104
47093
|
},
|
|
47105
47094
|
useDangerButton: true
|
|
47106
47095
|
}, /*#__PURE__*/React__default.createElement(Box, {
|
|
@@ -47109,12 +47098,12 @@ var RemoveAccountModalModule = function RemoveAccountModalModule(_ref) {
|
|
|
47109
47098
|
}, /*#__PURE__*/React__default.createElement(ButtonWithAction, {
|
|
47110
47099
|
text: "Remove",
|
|
47111
47100
|
variant: "secondary",
|
|
47112
|
-
action:
|
|
47101
|
+
action: isInCustomerManagement ? noop : function () {
|
|
47113
47102
|
return setModalIsOpen(true);
|
|
47114
47103
|
},
|
|
47115
47104
|
dataQa: "Remove Account",
|
|
47116
47105
|
extraStyles: isMobile ? "flex-grow: 1; width: 100%; margin: 0;" : "flex-grow: 1;",
|
|
47117
|
-
disabled:
|
|
47106
|
+
disabled: isInCustomerManagement
|
|
47118
47107
|
})));
|
|
47119
47108
|
};
|
|
47120
47109
|
|
|
@@ -47175,18 +47164,7 @@ var InactiveControlsModule = function InactiveControlsModule(_ref) {
|
|
|
47175
47164
|
description: description,
|
|
47176
47165
|
subDescription: subDescription,
|
|
47177
47166
|
allowedPaymentInstruments: allowedPaymentInstruments,
|
|
47178
|
-
disableActions: disableActions
|
|
47179
|
-
action: function action() {
|
|
47180
|
-
return disableActions ? noop$1 : toggleModal(true);
|
|
47181
|
-
},
|
|
47182
|
-
onClick: function onClick() {
|
|
47183
|
-
return disableActions ? noop$1 : toggleModal(true);
|
|
47184
|
-
},
|
|
47185
|
-
onKeyPress: disableActions ? function () {
|
|
47186
|
-
return noop$1;
|
|
47187
|
-
} : function (e) {
|
|
47188
|
-
e.key === "Enter" && toggleModal(true);
|
|
47189
|
-
}
|
|
47167
|
+
disableActions: disableActions
|
|
47190
47168
|
})), /*#__PURE__*/React__default.createElement(Box, {
|
|
47191
47169
|
padding: "0",
|
|
47192
47170
|
extraStyles: "flex-grow: 1;"
|
|
@@ -47195,7 +47173,7 @@ var InactiveControlsModule = function InactiveControlsModule(_ref) {
|
|
|
47195
47173
|
removeAccount: disableActions ? noop$1 : handleRemoveAccount,
|
|
47196
47174
|
accountType: configType === "ACCOUNT" ? "Account" : "Property",
|
|
47197
47175
|
isMobile: isMobile,
|
|
47198
|
-
|
|
47176
|
+
isInCustomerManagement: disableActions
|
|
47199
47177
|
}))));
|
|
47200
47178
|
};
|
|
47201
47179
|
|