@thecb/components 10.4.0-beta.1 → 10.4.0-beta.10
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 +147 -114
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.esm.js +147 -114
- package/dist/index.esm.js.map +1 -1
- package/package.json +1 -1
- package/src/components/atoms/badge/Badge.theme.js +2 -2
- package/src/components/atoms/button-with-action/ButtonWithAction.js +1 -1
- package/src/components/atoms/button-with-action/ButtonWithAction.stories.js +27 -9
- package/src/components/atoms/button-with-action/ButtonWithAction.theme.js +9 -10
- package/src/components/atoms/placeholder/Placeholder.js +73 -86
- package/src/components/molecules/link-card/LinkCard.js +15 -4
- package/src/components/molecules/link-card/LinkCard.stories.js +40 -36
- package/src/components/molecules/link-card/LinkCard.styled.js +41 -32
- package/src/components/molecules/link-card/LinkCard.theme.js +16 -8
- package/src/components/molecules/obligation/Obligation.js +5 -4
- package/src/components/molecules/obligation/modules/AmountModule.js +13 -1
- package/src/components/molecules/obligation/modules/AmountModule.stories.js +3 -0
- package/src/components/molecules/obligation/modules/AutopayModalModule.js +18 -15
- package/src/components/molecules/obligation/modules/InactiveControlsModule.js +13 -4
- package/src/components/molecules/obligation/modules/PaymentDetailsActions.js +32 -25
- package/src/components/molecules/obligation/modules/RemoveAccountModalModule.js +10 -8
package/dist/index.esm.js
CHANGED
|
@@ -12590,22 +12590,21 @@ var WHITE$1 = WHITE,
|
|
|
12590
12590
|
MANATEE_GREY$1 = MANATEE_GREY,
|
|
12591
12591
|
MATISSE_BLUE$1 = MATISSE_BLUE,
|
|
12592
12592
|
RASPBERRY$1 = RASPBERRY,
|
|
12593
|
-
ERROR_COLOR$1 = ERROR_COLOR
|
|
12594
|
-
STORM_GREY$1 = STORM_GREY;
|
|
12593
|
+
ERROR_COLOR$1 = ERROR_COLOR;
|
|
12595
12594
|
var LINK_TEXT_DECORATION$1 = LINK_TEXT_DECORATION;
|
|
12596
12595
|
var disabledBorderColor = {
|
|
12597
|
-
primary:
|
|
12598
|
-
secondary:
|
|
12596
|
+
primary: MANATEE_GREY$1,
|
|
12597
|
+
secondary: MANATEE_GREY$1,
|
|
12599
12598
|
back: TRANSPARENT$1,
|
|
12600
|
-
smallPrimary:
|
|
12601
|
-
smallSecondary:
|
|
12599
|
+
smallPrimary: MANATEE_GREY$1,
|
|
12600
|
+
smallSecondary: MANATEE_GREY$1,
|
|
12602
12601
|
smallGhost: TRANSPARENT$1,
|
|
12603
12602
|
ghost: TRANSPARENT$1,
|
|
12604
12603
|
tertiary: TRANSPARENT$1,
|
|
12605
|
-
danger:
|
|
12606
|
-
dangerSecondary:
|
|
12607
|
-
whiteSecondary:
|
|
12608
|
-
whitePrimary:
|
|
12604
|
+
danger: MANATEE_GREY$1,
|
|
12605
|
+
dangerSecondary: MANATEE_GREY$1,
|
|
12606
|
+
whiteSecondary: MANATEE_GREY$1,
|
|
12607
|
+
whitePrimary: MANATEE_GREY$1
|
|
12609
12608
|
};
|
|
12610
12609
|
var disabledColor = {
|
|
12611
12610
|
primary: WHITE$1,
|
|
@@ -13026,7 +13025,7 @@ var ButtonWithAction = /*#__PURE__*/forwardRef(function (_ref2, ref) {
|
|
|
13026
13025
|
disabledStyles: disabledStyles,
|
|
13027
13026
|
"aria-disabled": disabled,
|
|
13028
13027
|
as: "button",
|
|
13029
|
-
onClick: isLoading || disabled ?
|
|
13028
|
+
onClick: isLoading || disabled ? noop$1 : action,
|
|
13030
13029
|
borderRadius: "2px",
|
|
13031
13030
|
theme: themeContext,
|
|
13032
13031
|
extraStyles: "margin: 0.5rem; ".concat(extraStyles),
|
|
@@ -20573,7 +20572,7 @@ var BoxWithShadow$1 = themeComponent(BoxWithShadow, "BoxWithShadow", fallbackVal
|
|
|
20573
20572
|
|
|
20574
20573
|
// import theme from "styled-theming";
|
|
20575
20574
|
var MATISSE_BLUE$2 = MATISSE_BLUE,
|
|
20576
|
-
STORM_GREY$
|
|
20575
|
+
STORM_GREY$1 = STORM_GREY;
|
|
20577
20576
|
var LINK_TEXT_DECORATION$2 = LINK_TEXT_DECORATION;
|
|
20578
20577
|
|
|
20579
20578
|
/*
|
|
@@ -20582,8 +20581,8 @@ var LINK_TEXT_DECORATION$2 = LINK_TEXT_DECORATION;
|
|
|
20582
20581
|
*/
|
|
20583
20582
|
|
|
20584
20583
|
var color$5 = "".concat(MATISSE_BLUE$2);
|
|
20585
|
-
var activeColor$2 = "".concat(STORM_GREY$
|
|
20586
|
-
var activeBreadcrumbColor = "".concat(STORM_GREY$
|
|
20584
|
+
var activeColor$2 = "".concat(STORM_GREY$1);
|
|
20585
|
+
var activeBreadcrumbColor = "".concat(STORM_GREY$1);
|
|
20587
20586
|
var fontSize$2 = "0.875rem";
|
|
20588
20587
|
var lineHeight = "1.25rem";
|
|
20589
20588
|
var fontWeight$1 = "400";
|
|
@@ -27769,9 +27768,7 @@ var PlaceholderContentWrapper = function PlaceholderContentWrapper(_ref) {
|
|
|
27769
27768
|
action = _ref.action,
|
|
27770
27769
|
destination = _ref.destination,
|
|
27771
27770
|
children = _ref.children,
|
|
27772
|
-
dataQa = _ref.dataQa
|
|
27773
|
-
_ref$disabled = _ref.disabled,
|
|
27774
|
-
disabled = _ref$disabled === void 0 ? false : _ref$disabled;
|
|
27771
|
+
dataQa = _ref.dataQa;
|
|
27775
27772
|
return isLink ? /*#__PURE__*/React.createElement(Link, {
|
|
27776
27773
|
to: destination,
|
|
27777
27774
|
"data-qa": dataQa,
|
|
@@ -27781,14 +27778,13 @@ var PlaceholderContentWrapper = function PlaceholderContentWrapper(_ref) {
|
|
|
27781
27778
|
}, /*#__PURE__*/React.createElement(Box, {
|
|
27782
27779
|
padding: "0",
|
|
27783
27780
|
minHeight: "100%",
|
|
27784
|
-
extraStyles:
|
|
27781
|
+
extraStyles: "cursor: pointer;"
|
|
27785
27782
|
}, children)) : /*#__PURE__*/React.createElement(Box, {
|
|
27786
|
-
onClick:
|
|
27783
|
+
onClick: action,
|
|
27787
27784
|
padding: "0",
|
|
27788
27785
|
minHeight: "100%",
|
|
27789
|
-
|
|
27790
|
-
|
|
27791
|
-
extraStyles: disabled ? "cursor: default;" : "cursor: pointer;"
|
|
27786
|
+
extraStyles: "cursor: pointer;",
|
|
27787
|
+
dataQa: dataQa
|
|
27792
27788
|
}, children);
|
|
27793
27789
|
};
|
|
27794
27790
|
var Placeholder = function Placeholder(_ref2) {
|
|
@@ -27802,16 +27798,12 @@ var Placeholder = function Placeholder(_ref2) {
|
|
|
27802
27798
|
variant = _ref2.variant,
|
|
27803
27799
|
largeIcon = _ref2.largeIcon,
|
|
27804
27800
|
themeValues = _ref2.themeValues,
|
|
27805
|
-
dataQa = _ref2.dataQa
|
|
27806
|
-
_ref2$disabled = _ref2.disabled,
|
|
27807
|
-
disabled = _ref2$disabled === void 0 ? false : _ref2$disabled;
|
|
27808
|
-
var tintedColor = "".concat(curriedTint$1(0.9, themeValues.color));
|
|
27801
|
+
dataQa = _ref2.dataQa;
|
|
27809
27802
|
return /*#__PURE__*/React.createElement(PlaceholderContentWrapper, {
|
|
27810
27803
|
isLink: isLink,
|
|
27811
27804
|
action: action,
|
|
27812
27805
|
destination: destination,
|
|
27813
|
-
dataQa: dataQa
|
|
27814
|
-
disabled: disabled
|
|
27806
|
+
dataQa: dataQa
|
|
27815
27807
|
}, /*#__PURE__*/React.createElement(Box, {
|
|
27816
27808
|
padding: "0",
|
|
27817
27809
|
borderRadius: "4px",
|
|
@@ -27819,14 +27811,14 @@ var Placeholder = function Placeholder(_ref2) {
|
|
|
27819
27811
|
minHeight: themeValues.height,
|
|
27820
27812
|
hiddenStyles: !visible,
|
|
27821
27813
|
extraStyles: "\n background: linear-gradient(\n to right,\n ".concat(variant === "large" ? STORM_GREY : themeValues.color, " 40%,\n rgba(255, 255, 255, 0) 0%\n ),\n linear-gradient(").concat(variant === "large" ? STORM_GREY : themeValues.color, " 40%, rgba(255, 255, 255, 0) 0%),\n linear-gradient(to right, ").concat(variant === "large" ? STORM_GREY : themeValues.color, " 40%, rgba(255, 255, 255, 0) 0%),\n linear-gradient(").concat(variant === "large" ? STORM_GREY : themeValues.color, " 40%, rgba(255, 255, 255, 0) 0%);\n background-position: top, right, bottom, left;\n background-repeat: repeat-x, repeat-y;\n background-size: 5px 1px, 1px 5px;\n display: flex;\n justify-content: center;\n align-items:center;"),
|
|
27822
|
-
hoverStyles: "background-color: ".concat(variant === "large" ? GRECIAN_GREY :
|
|
27814
|
+
hoverStyles: "background-color: ".concat(variant === "large" ? GRECIAN_GREY : curriedTint$1(0.9, themeValues.color), ";")
|
|
27823
27815
|
}, /*#__PURE__*/React.createElement(Center, {
|
|
27824
27816
|
maxWidth: "300px"
|
|
27825
27817
|
}, /*#__PURE__*/React.createElement(Box, {
|
|
27826
27818
|
padding: "0",
|
|
27827
27819
|
tabIndex: "0",
|
|
27828
27820
|
onKeyPress: function onKeyPress(e) {
|
|
27829
|
-
return e.key === "Enter" &&
|
|
27821
|
+
return e.key === "Enter" && action();
|
|
27830
27822
|
}
|
|
27831
27823
|
}, /*#__PURE__*/React.createElement(Cluster, {
|
|
27832
27824
|
justify: "center",
|
|
@@ -42648,23 +42640,31 @@ var PROPERTIES_COMMERCIAL_AUTO_ICON = "PROPERTIES_COMMERCIAL_AUTO";
|
|
|
42648
42640
|
var MISC_BILL_ICON = "MISC_SINGLE_BILL";
|
|
42649
42641
|
var iconsMap = (_iconsMap = {}, _defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_iconsMap, ACCOUNTS_GENERIC_ICON, AccountGenericIcon), ACCOUNTS_CONSTRUCTION_ICON, AccountConstructionIcon), ACCOUNTS_HEALTH_ICON, AccountMedicalIcon), ACCOUNTS_DENTAL_ICON, AccountDentalIcon), ACCOUNTS_UTILITY_ELECTRIC_ICON, AccountElectricIcon), ACCOUNTS_UTILITY_GARBAGE_ICON, AccountGarbageIcon), ACCOUNTS_UTILITY_GAS_ICON, AccountGasIcon), ACCOUNTS_UTILITY_WATER_ICON, AccountWaterIcon), PROPERTIES_PERSONAL_ICON, PropertyPersonalIcon), PROPERTIES_GARAGE_ICON, PropertyGarageIcon), _defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_iconsMap, PROPERTIES_BUSINESS_ICON, PropertyBusinessIcon), PROPERTIES_STOREFRONT_ICON, PropertyStorefrontIcon), PROPERTIES_APARTMENT_ICON, PropertyApartmentIcon), PROPERTIES_LAND_ICON, PropertyLandIcon), PROPERTIES_CAR_ICON, PropertyCarIcon), PROPERTIES_MOTORCYCLE_ICON, PropertyMotorcycleIcon), PROPERTIES_COMMERCIAL_AUTO_ICON, PropertyCommercialVehicleIcon), MISC_BILL_ICON, AccountBillIcon));
|
|
42650
42642
|
|
|
42643
|
+
var disabledBackgroundColor$1 = {
|
|
42644
|
+
primary: TRANSPARENT
|
|
42645
|
+
};
|
|
42646
|
+
var disabledBorderColor$1 = {
|
|
42647
|
+
primary: GHOST_GREY
|
|
42648
|
+
};
|
|
42649
|
+
var disabledColor$1 = {
|
|
42650
|
+
primary: MANATEE_GREY
|
|
42651
|
+
};
|
|
42651
42652
|
var activeBackgroundColor$1 = {
|
|
42652
|
-
primary:
|
|
42653
|
-
disabled: "".concat(TRANSPARENT)
|
|
42653
|
+
primary: CORNFLOWER_BLUE
|
|
42654
42654
|
};
|
|
42655
42655
|
var backgroundColor$9 = {
|
|
42656
|
-
primary:
|
|
42657
|
-
disabled: "".concat(TRANSPARENT)
|
|
42656
|
+
primary: LINK_WATER
|
|
42658
42657
|
};
|
|
42659
42658
|
var borderColor$5 = {
|
|
42660
|
-
primary:
|
|
42661
|
-
disabled: "".concat(GHOST_GREY)
|
|
42659
|
+
primary: MOON_RAKER
|
|
42662
42660
|
};
|
|
42663
42661
|
var color$b = {
|
|
42664
|
-
primary:
|
|
42665
|
-
disabled: "".concat(MANATEE_GREY)
|
|
42662
|
+
primary: ROYAL_BLUE_VIVID
|
|
42666
42663
|
};
|
|
42667
42664
|
var fallbackValues$I = {
|
|
42665
|
+
disabledBackgroundColor: disabledBackgroundColor$1,
|
|
42666
|
+
disabledBorderColor: disabledBorderColor$1,
|
|
42667
|
+
disabledColor: disabledColor$1,
|
|
42668
42668
|
activeBackgroundColor: activeBackgroundColor$1,
|
|
42669
42669
|
backgroundColor: backgroundColor$9,
|
|
42670
42670
|
borderColor: borderColor$5,
|
|
@@ -42674,35 +42674,30 @@ var fallbackValues$I = {
|
|
|
42674
42674
|
var Container = styled(Box).withConfig({
|
|
42675
42675
|
displayName: "LinkCardstyled__Container",
|
|
42676
42676
|
componentId: "sc-l5q1h2-0"
|
|
42677
|
-
})(["display:flex;flex-direction:column;align-items:flex-start;width:100%;gap:40px;flex-shrink:0;align-self:stretch;border-radius:8px;", " transition:all .2s ease-in-out
|
|
42678
|
-
var
|
|
42679
|
-
|
|
42677
|
+
})(["display:flex;flex-direction:column;align-items:flex-start;width:100%;gap:40px;flex-shrink:0;align-self:stretch;border-radius:8px;", " transition:all .2s ease-in-out;", ""], function (_ref) {
|
|
42678
|
+
var isDisabled = _ref.isDisabled,
|
|
42679
|
+
theme = _ref.theme;
|
|
42680
|
+
return "\n background-color: ".concat(isDisabled ? theme.disabledBackgroundColor : theme.backgroundColor, ";\n border: 1px solid ").concat(isDisabled ? theme.disabledBorderColor : theme.borderColor, ";\n ");
|
|
42680
42681
|
}, function (_ref2) {
|
|
42681
|
-
var
|
|
42682
|
-
|
|
42683
|
-
},
|
|
42684
|
-
var disabled = _ref3.disabled;
|
|
42685
|
-
return "\n ".concat(disabled ? "none" : "0px 0px 0px 0px rgba(41, 42, 51, 0.1),\n 0px 5px 11px 0px rgba(41, 42, 51, 0.1),\n 0px 4px 19px 0px rgba(41, 42, 51, 0.09),\n 0px 27px 26px 0px rgba(41, 42, 51, 0.05),\n 0px 56px 31px 0px rgba(41, 42, 51, 0.01),\n 0px 80px 33px 0px rgba(41, 42, 51, 0);", "\n ");
|
|
42686
|
-
}, function (_ref4) {
|
|
42687
|
-
var theme = _ref4.theme;
|
|
42688
|
-
return "border: 1px solid ".concat(theme.borderColor, ";");
|
|
42689
|
-
}, function (_ref5) {
|
|
42690
|
-
var theme = _ref5.theme;
|
|
42691
|
-
return "\n background-color: ".concat(theme.activeBackgroundColor, ";\n border: 1px solid ").concat(theme.borderColor, ";\n ;");
|
|
42682
|
+
var isDisabled = _ref2.isDisabled,
|
|
42683
|
+
theme = _ref2.theme;
|
|
42684
|
+
return isDisabled ? "\n &:hover,\n &:active {\n cursor: default;\n box-shadow: none;\n border: 1px solid ".concat(theme.disabledBorderColor, ";\n }\n ") : "\n &:hover,\n &:active {\n cursor: pointer;\n box-shadow: 0px 0px 0px 0px rgba(41, 42, 51, 0.1),\n 0px 5px 11px 0px rgba(41, 42, 51, 0.1),\n 0px 4px 19px 0px rgba(41, 42, 51, 0.09),\n 0px 27px 26px 0px rgba(41, 42, 51, 0.05),\n 0px 56px 31px 0px rgba(41, 42, 51, 0.01),\n 0px 80px 33px 0px rgba(41, 42, 51, 0);\n }\n\n &:hover:not(:active) {\n border: 1px solid ".concat(theme.borderColor, ";\n }\n\n &:active {\n background-color: ").concat(theme.activeBackgroundColor, ";\n border: 1px solid ").concat(theme.borderColor, ";\n }\n ");
|
|
42692
42685
|
});
|
|
42693
42686
|
var Title$2 = styled(Heading$1).withConfig({
|
|
42694
42687
|
displayName: "LinkCardstyled__Title",
|
|
42695
42688
|
componentId: "sc-l5q1h2-1"
|
|
42696
|
-
})(["display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2;align-self:stretch;overflow:hidden;text-overflow:ellipsis;font-size:16px;line-height:150%;background-color:transparent;font-weight:", ";", ";"], FONT_WEIGHT_SEMIBOLD, function (
|
|
42697
|
-
var
|
|
42698
|
-
|
|
42689
|
+
})(["display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2;align-self:stretch;overflow:hidden;text-overflow:ellipsis;font-size:16px;line-height:150%;background-color:transparent;font-weight:", ";", ";"], FONT_WEIGHT_SEMIBOLD, function (_ref3) {
|
|
42690
|
+
var isDisabled = _ref3.isDisabled,
|
|
42691
|
+
theme = _ref3.theme;
|
|
42692
|
+
return "color: ".concat(isDisabled ? theme.disabledColor : theme.color, ";");
|
|
42699
42693
|
});
|
|
42700
42694
|
var Subtitle = styled(Paragraph$1).withConfig({
|
|
42701
42695
|
displayName: "LinkCardstyled__Subtitle",
|
|
42702
42696
|
componentId: "sc-l5q1h2-2"
|
|
42703
|
-
})(["overflow:hidden;text-overflow:ellipsis;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2;align-self:stretch;font-size:14px;line-height:150
|
|
42704
|
-
var
|
|
42705
|
-
|
|
42697
|
+
})(["overflow:hidden;text-overflow:ellipsis;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2;align-self:stretch;font-size:14px;line-height:150%;letter-spacing:0.14px;font-weight:", ";", ";"], FONT_WEIGHT_SEMIBOLD, function (_ref4) {
|
|
42698
|
+
var isDisabled = _ref4.isDisabled,
|
|
42699
|
+
theme = _ref4.theme;
|
|
42700
|
+
return "color: ".concat(isDisabled ? theme.disabledColor : theme.color, ";");
|
|
42706
42701
|
});
|
|
42707
42702
|
var Footer = styled(Stack).withConfig({
|
|
42708
42703
|
displayName: "LinkCardstyled__Footer",
|
|
@@ -42710,8 +42705,7 @@ var Footer = styled(Stack).withConfig({
|
|
|
42710
42705
|
})(["align-items:center;width:100%;"]);
|
|
42711
42706
|
|
|
42712
42707
|
var LinkCard = function LinkCard(_ref) {
|
|
42713
|
-
var _ref$
|
|
42714
|
-
_ref$title = _ref.title,
|
|
42708
|
+
var _ref$title = _ref.title,
|
|
42715
42709
|
title = _ref$title === void 0 ? "Test Workflow" : _ref$title,
|
|
42716
42710
|
_ref$subtitle = _ref.subtitle,
|
|
42717
42711
|
subtitle = _ref$subtitle === void 0 ? "Link your benefit plan" : _ref$subtitle,
|
|
@@ -42748,7 +42742,10 @@ var LinkCard = function LinkCard(_ref) {
|
|
|
42748
42742
|
hoverStyles: extraHoverStyles,
|
|
42749
42743
|
activeStyles: extraActiveStyles,
|
|
42750
42744
|
onClick: disabled ? noop$1 : onClick,
|
|
42751
|
-
disabled: disabled
|
|
42745
|
+
"aria-disabled": disabled,
|
|
42746
|
+
isDisabled: disabled,
|
|
42747
|
+
role: "group",
|
|
42748
|
+
"aria-label": "".concat(title, ", ").concat(subtitle)
|
|
42752
42749
|
}, /*#__PURE__*/React.createElement(Stack, {
|
|
42753
42750
|
childGap: 0,
|
|
42754
42751
|
bottomItem: 3,
|
|
@@ -42763,13 +42760,15 @@ var LinkCard = function LinkCard(_ref) {
|
|
|
42763
42760
|
}, /*#__PURE__*/React.createElement(Title$2, {
|
|
42764
42761
|
variant: titleVariant,
|
|
42765
42762
|
theme: themeValues,
|
|
42766
|
-
margin: 0
|
|
42763
|
+
margin: 0,
|
|
42764
|
+
isDisabled: disabled
|
|
42767
42765
|
}, title)), /*#__PURE__*/React.createElement(Box, {
|
|
42768
42766
|
padding: "0 0 40px",
|
|
42769
42767
|
width: "100%"
|
|
42770
42768
|
}, /*#__PURE__*/React.createElement(Subtitle, {
|
|
42771
42769
|
variant: "pS",
|
|
42772
|
-
theme: themeValues
|
|
42770
|
+
theme: themeValues,
|
|
42771
|
+
isDisabled: disabled
|
|
42773
42772
|
}, subtitle)), /*#__PURE__*/React.createElement(Box, {
|
|
42774
42773
|
background: "transparent",
|
|
42775
42774
|
borderWidthOverride: "0 0 0 0",
|
|
@@ -46736,8 +46735,11 @@ var AutopayModal = function AutopayModal(_ref) {
|
|
|
46736
46735
|
description = _ref.description,
|
|
46737
46736
|
subDescription = _ref.subDescription,
|
|
46738
46737
|
allowedPaymentInstruments = _ref.allowedPaymentInstruments,
|
|
46739
|
-
_ref$
|
|
46740
|
-
|
|
46738
|
+
_ref$disableActions = _ref.disableActions,
|
|
46739
|
+
disableActions = _ref$disableActions === void 0 ? false : _ref$disableActions,
|
|
46740
|
+
_action = _ref.action,
|
|
46741
|
+
_onClick = _ref.onClick,
|
|
46742
|
+
onKeyPress = _ref.onKeyPress;
|
|
46741
46743
|
var generateMethodNeededText = function generateMethodNeededText(planText, allowedPaymentInstruments) {
|
|
46742
46744
|
var allowsCard = allowedPaymentInstruments.includes(CC_METHOD);
|
|
46743
46745
|
var allowsACH = allowedPaymentInstruments.includes(ACH_METHOD);
|
|
@@ -46766,27 +46768,27 @@ var AutopayModal = function AutopayModal(_ref) {
|
|
|
46766
46768
|
case "secondary":
|
|
46767
46769
|
{
|
|
46768
46770
|
return /*#__PURE__*/React.createElement(ButtonWithAction, {
|
|
46769
|
-
disabled: isInCustomerManagement,
|
|
46770
46771
|
text: autoPayActive ? "Turn off ".concat(shortPlan) : "Set Up ".concat(shortPlan),
|
|
46771
46772
|
variant: "secondary",
|
|
46772
46773
|
action: function action() {
|
|
46773
|
-
toggleModal(true);
|
|
46774
|
+
_action || toggleModal(true);
|
|
46774
46775
|
},
|
|
46775
46776
|
dataQa: "Turn off Autopay",
|
|
46776
|
-
extraStyles: isMobile ? "flex-grow: 1; width: 100%; margin: 0;" : "flex-grow: 1; min-width: 165px;"
|
|
46777
|
+
extraStyles: isMobile ? "flex-grow: 1; width: 100%; margin: 0;" : "flex-grow: 1; min-width: 165px;",
|
|
46778
|
+
disabled: disableActions
|
|
46777
46779
|
});
|
|
46778
46780
|
}
|
|
46779
46781
|
case "tertiary":
|
|
46780
46782
|
{
|
|
46781
46783
|
return /*#__PURE__*/React.createElement(ButtonWithAction, {
|
|
46782
|
-
disabled: isInCustomerManagement,
|
|
46783
46784
|
text: autoPayActive ? "Manage ".concat(shortPlan) : "Set Up ".concat(shortPlan),
|
|
46784
|
-
variant:
|
|
46785
|
+
variant: "tertiary",
|
|
46785
46786
|
action: function action() {
|
|
46786
|
-
|
|
46787
|
+
_action || toggleModal(true);
|
|
46787
46788
|
},
|
|
46788
46789
|
dataQa: "Manage Autopay",
|
|
46789
|
-
extraStyles: isMobile && "flex-grow: 1; width: 100%;"
|
|
46790
|
+
extraStyles: isMobile && "flex-grow: 1; width: 100%;",
|
|
46791
|
+
disabled: disableActions
|
|
46790
46792
|
});
|
|
46791
46793
|
}
|
|
46792
46794
|
case "link":
|
|
@@ -46794,7 +46796,7 @@ var AutopayModal = function AutopayModal(_ref) {
|
|
|
46794
46796
|
return /*#__PURE__*/React.createElement(Box, {
|
|
46795
46797
|
padding: "0",
|
|
46796
46798
|
onClick: function onClick() {
|
|
46797
|
-
|
|
46799
|
+
_onClick || toggleModal(true);
|
|
46798
46800
|
},
|
|
46799
46801
|
hoverStyles: hoverStyles,
|
|
46800
46802
|
activeStyles: activeStyles,
|
|
@@ -46805,9 +46807,9 @@ var AutopayModal = function AutopayModal(_ref) {
|
|
|
46805
46807
|
}, /*#__PURE__*/React.createElement(AutopayOnIcon, null), /*#__PURE__*/React.createElement(Text$1, {
|
|
46806
46808
|
variant: "pS",
|
|
46807
46809
|
onClick: function onClick() {
|
|
46808
|
-
return toggleModal(true);
|
|
46810
|
+
return _onClick || toggleModal(true);
|
|
46809
46811
|
},
|
|
46810
|
-
onKeyPress:
|
|
46812
|
+
onKeyPress: onKeyPress || function (e) {
|
|
46811
46813
|
e.key === "Enter" && toggleModal(true);
|
|
46812
46814
|
},
|
|
46813
46815
|
tabIndex: "0",
|
|
@@ -46815,16 +46817,17 @@ var AutopayModal = function AutopayModal(_ref) {
|
|
|
46815
46817
|
color: SEA_GREEN,
|
|
46816
46818
|
weight: themeValues.fontWeight,
|
|
46817
46819
|
hoverStyles: themeValues.modalLinkHoverFocus,
|
|
46818
|
-
extraStyles: "padding-left: 0.25rem;"
|
|
46820
|
+
extraStyles: "padding-left: 0.25rem;",
|
|
46821
|
+
disabled: disableActions
|
|
46819
46822
|
}, "".concat(shortPlan, " ").concat(nextAutopayDate))));
|
|
46820
46823
|
}
|
|
46821
46824
|
}
|
|
46822
46825
|
};
|
|
46823
46826
|
return /*#__PURE__*/React.createElement(Modal$1, _extends({
|
|
46824
|
-
showModal:
|
|
46827
|
+
showModal: disableActions ? noop$1 : function () {
|
|
46825
46828
|
return toggleModal(true);
|
|
46826
46829
|
},
|
|
46827
|
-
hideModal:
|
|
46830
|
+
hideModal: disableActions ? noop$1 : function () {
|
|
46828
46831
|
return toggleModal(false);
|
|
46829
46832
|
},
|
|
46830
46833
|
modalOpen: modalOpen
|
|
@@ -46844,7 +46847,9 @@ var AmountModule = function AmountModule(_ref) {
|
|
|
46844
46847
|
nextAutopayDate = _ref.nextAutopayDate,
|
|
46845
46848
|
description = _ref.description,
|
|
46846
46849
|
subDescription = _ref.subDescription,
|
|
46847
|
-
allowedPaymentInstruments = _ref.allowedPaymentInstruments
|
|
46850
|
+
allowedPaymentInstruments = _ref.allowedPaymentInstruments,
|
|
46851
|
+
_ref$disableActions = _ref.disableActions,
|
|
46852
|
+
disableActions = _ref$disableActions === void 0 ? false : _ref$disableActions;
|
|
46848
46853
|
var _useState = useState(false),
|
|
46849
46854
|
_useState2 = _slicedToArray(_useState, 2),
|
|
46850
46855
|
modalOpen = _useState2[0],
|
|
@@ -46874,7 +46879,17 @@ var AmountModule = function AmountModule(_ref) {
|
|
|
46874
46879
|
controlType: "link",
|
|
46875
46880
|
description: description,
|
|
46876
46881
|
subDescription: subDescription,
|
|
46877
|
-
allowedPaymentInstruments: allowedPaymentInstruments
|
|
46882
|
+
allowedPaymentInstruments: allowedPaymentInstruments,
|
|
46883
|
+
disableActions: disableActions,
|
|
46884
|
+
action: function action() {
|
|
46885
|
+
return disableActions ? noop$1 : toggleModal(true);
|
|
46886
|
+
},
|
|
46887
|
+
onClick: function onClick() {
|
|
46888
|
+
return disableActions ? noop$1 : toggleModal(true);
|
|
46889
|
+
},
|
|
46890
|
+
onKeyPress: disableActions ? noop$1 : function (e) {
|
|
46891
|
+
e.key === "Enter" && toggleModal(true);
|
|
46892
|
+
}
|
|
46878
46893
|
})));
|
|
46879
46894
|
};
|
|
46880
46895
|
|
|
@@ -46897,8 +46912,8 @@ var PaymentDetailsActions = function PaymentDetailsActions(_ref) {
|
|
|
46897
46912
|
description = _ref.description,
|
|
46898
46913
|
subDescription = _ref.subDescription,
|
|
46899
46914
|
allowedPaymentInstruments = _ref.allowedPaymentInstruments,
|
|
46900
|
-
_ref$
|
|
46901
|
-
|
|
46915
|
+
_ref$disableActions = _ref.disableActions,
|
|
46916
|
+
disableActions = _ref$disableActions === void 0 ? false : _ref$disableActions;
|
|
46902
46917
|
var planType = isPaymentPlan ? "Payment Plan" : "Autopay";
|
|
46903
46918
|
var _useState = useState(false),
|
|
46904
46919
|
_useState2 = _slicedToArray(_useState, 2),
|
|
@@ -46951,7 +46966,8 @@ var PaymentDetailsActions = function PaymentDetailsActions(_ref) {
|
|
|
46951
46966
|
nextAutopayDate: nextAutopayDate,
|
|
46952
46967
|
description: description,
|
|
46953
46968
|
subDescription: subDescription,
|
|
46954
|
-
allowedPaymentInstruments: allowedPaymentInstruments
|
|
46969
|
+
allowedPaymentInstruments: allowedPaymentInstruments,
|
|
46970
|
+
disableActions: disableActions
|
|
46955
46971
|
}))), /*#__PURE__*/React.createElement(Box, {
|
|
46956
46972
|
padding: isMobile ? "16px" : "0"
|
|
46957
46973
|
}, /*#__PURE__*/React.createElement(Cluster, {
|
|
@@ -46962,24 +46978,26 @@ var PaymentDetailsActions = function PaymentDetailsActions(_ref) {
|
|
|
46962
46978
|
padding: isMobile ? "0 8px 0 0" : "0",
|
|
46963
46979
|
extraStyles: isMobile && "flex-grow: 1;"
|
|
46964
46980
|
}, /*#__PURE__*/React.createElement(ButtonWithAction, {
|
|
46965
|
-
variant:
|
|
46981
|
+
variant: "tertiary",
|
|
46966
46982
|
text: config.type === "ACCOUNT" ? "Account Details" : "Property Details",
|
|
46967
|
-
action: handleDetailsClick,
|
|
46983
|
+
action: disableActions ? noop$1 : handleDetailsClick,
|
|
46968
46984
|
dataQa: "Account Details",
|
|
46969
46985
|
extraStyles: isMobile && "flex-grow: 1; width: 100%;"
|
|
46970
46986
|
})), /*#__PURE__*/React.createElement(Box, {
|
|
46971
46987
|
padding: isMobile ? "0 8px 0 0" : "0",
|
|
46972
46988
|
extraStyles: isMobile && "flex-grow: 1;"
|
|
46973
46989
|
}, autoPayAvailable && !autoPayEnabled ? /*#__PURE__*/React.createElement(ButtonWithAction, {
|
|
46974
|
-
variant:
|
|
46990
|
+
variant: "tertiary",
|
|
46975
46991
|
text: "Set Up ".concat(planType),
|
|
46976
46992
|
action: function action() {
|
|
46977
|
-
|
|
46978
|
-
|
|
46993
|
+
if (!disableActions) {
|
|
46994
|
+
setDetailedObligation(obligations, config, obligationAssocID);
|
|
46995
|
+
handleAutopayAction();
|
|
46996
|
+
}
|
|
46979
46997
|
},
|
|
46980
46998
|
dataQa: "Set Up Autopay",
|
|
46981
46999
|
extraStyles: isMobile && "flex-grow: 1; width: 100%;",
|
|
46982
|
-
disabled:
|
|
47000
|
+
disabled: disableActions
|
|
46983
47001
|
}) : /*#__PURE__*/React.createElement(AutopayModalModule, {
|
|
46984
47002
|
autoPayActive: autoPayEnabled,
|
|
46985
47003
|
autoPaySchedule: autoPaySchedule,
|
|
@@ -46996,31 +47014,38 @@ var PaymentDetailsActions = function PaymentDetailsActions(_ref) {
|
|
|
46996
47014
|
description: description,
|
|
46997
47015
|
subDescription: subDescription,
|
|
46998
47016
|
allowedPaymentInstruments: allowedPaymentInstruments,
|
|
46999
|
-
|
|
47017
|
+
disableActions: disableActions,
|
|
47018
|
+
action: disableActions ? noop$1 : toggleModal(true),
|
|
47019
|
+
onClick: disableActions ? noop$1 : toggleModal(true),
|
|
47020
|
+
onKeyPress: disableActions ? noop$1 : function (e) {
|
|
47021
|
+
e.key === "Enter" && toggleModal(true);
|
|
47022
|
+
}
|
|
47000
47023
|
})), !isMobile && /*#__PURE__*/React.createElement(Box, {
|
|
47001
47024
|
padding: "0"
|
|
47002
47025
|
}, /*#__PURE__*/React.createElement(ButtonWithAction, {
|
|
47003
47026
|
isLoading: isLoading,
|
|
47004
|
-
action:
|
|
47027
|
+
action: disableActions ? noop$1 : function () {
|
|
47005
47028
|
return handleClick(obligations);
|
|
47006
47029
|
},
|
|
47007
47030
|
text: "Pay Now",
|
|
47008
|
-
variant: isMobile ?
|
|
47031
|
+
variant: isMobile ? "smallSecondary" : "secondary",
|
|
47009
47032
|
dataQa: "Pay Now",
|
|
47010
|
-
disabled:
|
|
47033
|
+
disabled: disableActions
|
|
47011
47034
|
}))), isMobile && /*#__PURE__*/React.createElement(Box, {
|
|
47012
47035
|
padding: "8px 0 0",
|
|
47013
47036
|
width: "100%"
|
|
47014
47037
|
}, /*#__PURE__*/React.createElement(ButtonWithAction, {
|
|
47015
47038
|
isLoading: isLoading,
|
|
47016
47039
|
action: function action() {
|
|
47017
|
-
return
|
|
47040
|
+
return disableActions ? noop$1 : function () {
|
|
47041
|
+
return handleClick(obligations);
|
|
47042
|
+
};
|
|
47018
47043
|
},
|
|
47019
47044
|
text: "Pay Now",
|
|
47020
47045
|
variant: isMobile ? "smallSecondary" : "secondary",
|
|
47021
47046
|
dataQa: "Pay Now",
|
|
47022
47047
|
extraStyles: isMobile && "flex-grow: 1; width: 100%; margin: 0;",
|
|
47023
|
-
disabled:
|
|
47048
|
+
disabled: disableActions
|
|
47024
47049
|
}))));
|
|
47025
47050
|
};
|
|
47026
47051
|
|
|
@@ -47031,8 +47056,8 @@ var RemoveAccountModalModule = function RemoveAccountModalModule(_ref) {
|
|
|
47031
47056
|
removeAccount = _ref.removeAccount,
|
|
47032
47057
|
accountType = _ref.accountType,
|
|
47033
47058
|
isMobile = _ref.isMobile,
|
|
47034
|
-
_ref$
|
|
47035
|
-
|
|
47059
|
+
_ref$disableActions = _ref.disableActions,
|
|
47060
|
+
disableActions = _ref$disableActions === void 0 ? false : _ref$disableActions;
|
|
47036
47061
|
var _useState = useState(false),
|
|
47037
47062
|
_useState2 = _slicedToArray(_useState, 2),
|
|
47038
47063
|
modalIsOpen = _useState2[0],
|
|
@@ -47045,10 +47070,10 @@ var RemoveAccountModalModule = function RemoveAccountModalModule(_ref) {
|
|
|
47045
47070
|
}, "".concat(agencyName, " - ")) : "";
|
|
47046
47071
|
var identifier = accountType === "Account" && obligations.length > 1 ? "accounts" : accountType === "Property" && obligations.length > 1 ? "properties" : accountType.toLowerCase();
|
|
47047
47072
|
return /*#__PURE__*/React.createElement(Modal$1, {
|
|
47048
|
-
showModal: function
|
|
47073
|
+
showModal: disableActions ? noop : function () {
|
|
47049
47074
|
return setModalIsOpen(true);
|
|
47050
47075
|
},
|
|
47051
|
-
hideModal: function
|
|
47076
|
+
hideModal: disableActions ? noop : function () {
|
|
47052
47077
|
return setModalIsOpen(false);
|
|
47053
47078
|
},
|
|
47054
47079
|
modalOpen: modalIsOpen,
|
|
@@ -47056,8 +47081,10 @@ var RemoveAccountModalModule = function RemoveAccountModalModule(_ref) {
|
|
|
47056
47081
|
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."),
|
|
47057
47082
|
continueButtonText: "Remove",
|
|
47058
47083
|
continueAction: function continueAction() {
|
|
47059
|
-
|
|
47060
|
-
|
|
47084
|
+
if (!disableActions) {
|
|
47085
|
+
removeAccount();
|
|
47086
|
+
setModalIsOpen(false);
|
|
47087
|
+
}
|
|
47061
47088
|
},
|
|
47062
47089
|
useDangerButton: true
|
|
47063
47090
|
}, /*#__PURE__*/React.createElement(Box, {
|
|
@@ -47065,13 +47092,13 @@ var RemoveAccountModalModule = function RemoveAccountModalModule(_ref) {
|
|
|
47065
47092
|
extraStyles: "flex-grow: 1;"
|
|
47066
47093
|
}, /*#__PURE__*/React.createElement(ButtonWithAction, {
|
|
47067
47094
|
text: "Remove",
|
|
47068
|
-
variant:
|
|
47069
|
-
action:
|
|
47095
|
+
variant: "secondary",
|
|
47096
|
+
action: disableActions ? noop : function () {
|
|
47070
47097
|
return setModalIsOpen(true);
|
|
47071
47098
|
},
|
|
47072
47099
|
dataQa: "Remove Account",
|
|
47073
47100
|
extraStyles: isMobile ? "flex-grow: 1; width: 100%; margin: 0;" : "flex-grow: 1;",
|
|
47074
|
-
disabled:
|
|
47101
|
+
disabled: disableActions
|
|
47075
47102
|
})));
|
|
47076
47103
|
};
|
|
47077
47104
|
|
|
@@ -47092,8 +47119,8 @@ var InactiveControlsModule = function InactiveControlsModule(_ref) {
|
|
|
47092
47119
|
description = _ref.description,
|
|
47093
47120
|
subDescription = _ref.subDescription,
|
|
47094
47121
|
allowedPaymentInstruments = _ref.allowedPaymentInstruments,
|
|
47095
|
-
_ref$
|
|
47096
|
-
|
|
47122
|
+
_ref$disableActions = _ref.disableActions,
|
|
47123
|
+
disableActions = _ref$disableActions === void 0 ? false : _ref$disableActions;
|
|
47097
47124
|
var _useState = useState(false),
|
|
47098
47125
|
_useState2 = _slicedToArray(_useState, 2),
|
|
47099
47126
|
modalOpen = _useState2[0],
|
|
@@ -47132,16 +47159,21 @@ var InactiveControlsModule = function InactiveControlsModule(_ref) {
|
|
|
47132
47159
|
description: description,
|
|
47133
47160
|
subDescription: subDescription,
|
|
47134
47161
|
allowedPaymentInstruments: allowedPaymentInstruments,
|
|
47135
|
-
|
|
47162
|
+
disableActions: disableActions,
|
|
47163
|
+
action: disableActions ? noop$1 : toggleModal(true),
|
|
47164
|
+
onClick: disableActions ? noop$1 : toggleModal(true),
|
|
47165
|
+
onKeyPress: disableActions ? noop$1 : function (e) {
|
|
47166
|
+
e.key === "Enter" && toggleModal(true);
|
|
47167
|
+
}
|
|
47136
47168
|
})), /*#__PURE__*/React.createElement(Box, {
|
|
47137
47169
|
padding: "0",
|
|
47138
47170
|
extraStyles: "flex-grow: 1;"
|
|
47139
47171
|
}, /*#__PURE__*/React.createElement(RemoveAccountModalModule, {
|
|
47140
47172
|
agencyName: agencyName,
|
|
47141
|
-
removeAccount:
|
|
47173
|
+
removeAccount: disableActions ? noop$1 : handleRemoveAccount,
|
|
47142
47174
|
accountType: configType === "ACCOUNT" ? "Account" : "Property",
|
|
47143
47175
|
isMobile: isMobile,
|
|
47144
|
-
|
|
47176
|
+
disableActions: disableActions
|
|
47145
47177
|
}))));
|
|
47146
47178
|
};
|
|
47147
47179
|
|
|
@@ -47271,7 +47303,8 @@ var Obligation = function Obligation(_ref) {
|
|
|
47271
47303
|
nextAutopayDate: nextAutopayDate,
|
|
47272
47304
|
description: description,
|
|
47273
47305
|
subDescription: subDescription,
|
|
47274
|
-
allowedPaymentInstruments: allowedPaymentInstruments
|
|
47306
|
+
allowedPaymentInstruments: allowedPaymentInstruments,
|
|
47307
|
+
disableActions: isInCustomerManagement
|
|
47275
47308
|
}))), !isMobile && /*#__PURE__*/React.createElement(PaymentDetailsActions, {
|
|
47276
47309
|
obligations: obligations,
|
|
47277
47310
|
autoPayEnabled: autoPayEnabled,
|
|
@@ -47290,7 +47323,7 @@ var Obligation = function Obligation(_ref) {
|
|
|
47290
47323
|
description: description,
|
|
47291
47324
|
subDescription: subDescription,
|
|
47292
47325
|
allowedPaymentInstruments: allowedPaymentInstruments,
|
|
47293
|
-
|
|
47326
|
+
disableActions: isInCustomerManagement
|
|
47294
47327
|
}))), isMobile && /*#__PURE__*/React.createElement(PaymentDetailsActions, {
|
|
47295
47328
|
obligations: obligations,
|
|
47296
47329
|
autoPayEnabled: autoPayEnabled,
|
|
@@ -47309,7 +47342,7 @@ var Obligation = function Obligation(_ref) {
|
|
|
47309
47342
|
description: description,
|
|
47310
47343
|
subDescription: subDescription,
|
|
47311
47344
|
allowedPaymentInstruments: allowedPaymentInstruments,
|
|
47312
|
-
|
|
47345
|
+
disableActions: isInCustomerManagement
|
|
47313
47346
|
}));
|
|
47314
47347
|
var inactiveObligation = /*#__PURE__*/React.createElement(Box, {
|
|
47315
47348
|
padding: "0",
|
|
@@ -47366,7 +47399,7 @@ var Obligation = function Obligation(_ref) {
|
|
|
47366
47399
|
description: description,
|
|
47367
47400
|
subDescription: subDescription,
|
|
47368
47401
|
allowedPaymentInstruments: allowedPaymentInstruments,
|
|
47369
|
-
|
|
47402
|
+
disableActions: isInCustomerManagement
|
|
47370
47403
|
}))), isMobile && /*#__PURE__*/React.createElement(InactiveControlsModule, {
|
|
47371
47404
|
obligations: obligations,
|
|
47372
47405
|
autoPayEnabled: autoPayEnabled,
|
|
@@ -47384,7 +47417,7 @@ var Obligation = function Obligation(_ref) {
|
|
|
47384
47417
|
description: description,
|
|
47385
47418
|
subDescription: subDescription,
|
|
47386
47419
|
allowedPaymentInstruments: allowedPaymentInstruments,
|
|
47387
|
-
|
|
47420
|
+
disableActions: isInCustomerManagement
|
|
47388
47421
|
}))));
|
|
47389
47422
|
return inactive ? inactiveObligation : activeObligation;
|
|
47390
47423
|
};
|