@thecb/components 5.8.1-beta.4 → 5.8.1
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 +54 -1168
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.esm.js +54 -1168
- package/dist/index.esm.js.map +1 -1
- package/package.json +1 -1
- package/src/components/molecules/obligation/Obligation.js +10 -15
- package/src/components/molecules/obligation/modules/AmountModule.js +0 -1
- package/src/components/molecules/obligation/modules/AutopayModalModule.js +21 -43
- package/src/components/molecules/obligation/modules/InactiveControlsModule.js +2 -2
- package/src/components/molecules/obligation/modules/PaymentDetailsActions.js +1 -1
- package/src/.DS_Store +0 -0
- package/src/components/.DS_Store +0 -0
- package/src/components/molecules/.DS_Store +0 -0
- package/src/deprecated/.DS_Store +0 -0
package/package.json
CHANGED
|
@@ -25,13 +25,13 @@ const Obligation = ({
|
|
|
25
25
|
isPaymentPlan,
|
|
26
26
|
nextAutopayDate,
|
|
27
27
|
obligationAssocID,
|
|
28
|
-
|
|
28
|
+
isActive = true,
|
|
29
29
|
inactiveLookupTitle = "",
|
|
30
30
|
inactiveLookupInput = "Account",
|
|
31
31
|
inactiveLookupValue = ""
|
|
32
32
|
}) => {
|
|
33
33
|
const obligation = obligations[0];
|
|
34
|
-
const customAttributes = obligation
|
|
34
|
+
const { customAttributes } = obligation;
|
|
35
35
|
const boxShadowValue =
|
|
36
36
|
"0px 4px 4px rgba(41, 42, 51, 0.1), 0px 1px 1px 2px rgba(41, 42, 51, 0.1);";
|
|
37
37
|
const activeObligation = (
|
|
@@ -40,16 +40,11 @@ const Obligation = ({
|
|
|
40
40
|
borderRadius="4px"
|
|
41
41
|
boxShadow={boxShadowValue}
|
|
42
42
|
as="section"
|
|
43
|
-
aria-label={`${obligation
|
|
44
|
-
"account"} ${obligation?.subDescription ?? obligationAssocID}`}
|
|
43
|
+
aria-label={`${obligation.description} ${obligation.subDescription}`}
|
|
45
44
|
>
|
|
46
45
|
<Box background={WHITE}>
|
|
47
46
|
<Stack childGap="14px">
|
|
48
|
-
<Box
|
|
49
|
-
key={`${obligations?.[0].id}-top`}
|
|
50
|
-
padding="0 8px"
|
|
51
|
-
minWidth="100%"
|
|
52
|
-
>
|
|
47
|
+
<Box key={`${obligations[0].id}-top`} padding="0 8px" minWidth="100%">
|
|
53
48
|
<Cluster
|
|
54
49
|
justify="space-between"
|
|
55
50
|
align="center"
|
|
@@ -68,8 +63,8 @@ const Obligation = ({
|
|
|
68
63
|
/>
|
|
69
64
|
)}
|
|
70
65
|
<TitleModule
|
|
71
|
-
title={obligation
|
|
72
|
-
subtitle={obligation
|
|
66
|
+
title={obligation.description}
|
|
67
|
+
subtitle={obligation.subDescription}
|
|
73
68
|
titleColor={BRIGHT_GREY}
|
|
74
69
|
isMobile={isMobile}
|
|
75
70
|
/>
|
|
@@ -77,7 +72,7 @@ const Obligation = ({
|
|
|
77
72
|
</Box>
|
|
78
73
|
{!isMobile && (
|
|
79
74
|
<AmountModule
|
|
80
|
-
totalAmountDue={obligations
|
|
75
|
+
totalAmountDue={obligations.reduce(
|
|
81
76
|
(acc, curr) => acc + curr.amountDue,
|
|
82
77
|
0
|
|
83
78
|
)}
|
|
@@ -142,7 +137,7 @@ const Obligation = ({
|
|
|
142
137
|
>
|
|
143
138
|
<Box background={ATHENS_GREY}>
|
|
144
139
|
<Stack childGap="14px">
|
|
145
|
-
<Box key={`${
|
|
140
|
+
<Box key={`${obligations[0].id}-top`} padding="0 8px" minWidth="100%">
|
|
146
141
|
<Cluster
|
|
147
142
|
justify="space-between"
|
|
148
143
|
align="center"
|
|
@@ -150,7 +145,7 @@ const Obligation = ({
|
|
|
150
145
|
nowrap
|
|
151
146
|
>
|
|
152
147
|
<Box padding="0">
|
|
153
|
-
<Cluster justify="flex-start" align="center"
|
|
148
|
+
<Cluster justify="flex-start" align="center">
|
|
154
149
|
<IconModule
|
|
155
150
|
icon={config.icon}
|
|
156
151
|
iconDefault={config.iconDefault}
|
|
@@ -202,7 +197,7 @@ const Obligation = ({
|
|
|
202
197
|
</Box>
|
|
203
198
|
);
|
|
204
199
|
|
|
205
|
-
return
|
|
200
|
+
return isActive ? activeObligation : inactiveObligation;
|
|
206
201
|
};
|
|
207
202
|
|
|
208
203
|
export default Obligation;
|
|
@@ -7,7 +7,6 @@ import { Box, Cluster } from "../../../atoms/layouts";
|
|
|
7
7
|
import { SEA_GREEN } from "../../../../constants/colors";
|
|
8
8
|
import { fallbackValues } from "./AutopayModalModule.theme";
|
|
9
9
|
import { themeComponent } from "../../../../util/themeUtils";
|
|
10
|
-
import { render } from "react-dom/cjs/react-dom.production.min";
|
|
11
10
|
|
|
12
11
|
const AutopayModal = ({
|
|
13
12
|
autoPayActive,
|
|
@@ -17,7 +16,7 @@ const AutopayModal = ({
|
|
|
17
16
|
modalOpen,
|
|
18
17
|
deactivatePaymentSchedule,
|
|
19
18
|
navigateToSettings,
|
|
20
|
-
|
|
19
|
+
buttonLinkType,
|
|
21
20
|
isMobile,
|
|
22
21
|
themeValues,
|
|
23
22
|
isPaymentPlan,
|
|
@@ -63,35 +62,24 @@ const AutopayModal = ({
|
|
|
63
62
|
const defaultStyles = `
|
|
64
63
|
.autopayIcon { fill: ${themeValues.color}; text-decoration: underline; }
|
|
65
64
|
`;
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
text={autoPayActive ? `Manage ${planType}` : `Set Up ${planType}`}
|
|
85
|
-
variant="tertiary"
|
|
86
|
-
action={() => {
|
|
87
|
-
toggleModal(true);
|
|
88
|
-
}}
|
|
89
|
-
dataQa="Manage Autopay"
|
|
90
|
-
extraStyles={isMobile && `flex-grow: 1; width: 100%;`}
|
|
91
|
-
/>
|
|
92
|
-
);
|
|
93
|
-
}
|
|
94
|
-
case "link": {
|
|
65
|
+
return (
|
|
66
|
+
<Modal
|
|
67
|
+
showModal={() => toggleModal(true)}
|
|
68
|
+
hideModal={() => toggleModal(false)}
|
|
69
|
+
modalOpen={modalOpen}
|
|
70
|
+
{...modalExtraProps}
|
|
71
|
+
>
|
|
72
|
+
{buttonLinkType ? (
|
|
73
|
+
<ButtonWithAction
|
|
74
|
+
text={autoPayActive ? `Manage ${planType}` : `Set Up ${planType}`}
|
|
75
|
+
variant="tertiary"
|
|
76
|
+
action={() => {
|
|
77
|
+
toggleModal(true);
|
|
78
|
+
}}
|
|
79
|
+
dataQa="Manage Autopay"
|
|
80
|
+
extraStyles={isMobile && `flex-grow: 1; width: 100%;`}
|
|
81
|
+
/>
|
|
82
|
+
) : (
|
|
95
83
|
<Box
|
|
96
84
|
padding="0"
|
|
97
85
|
onClick={() => {
|
|
@@ -123,18 +111,8 @@ const AutopayModal = ({
|
|
|
123
111
|
{`${planType} ${nextAutopayDate}`}
|
|
124
112
|
</Text>
|
|
125
113
|
</Cluster>
|
|
126
|
-
</Box
|
|
127
|
-
}
|
|
128
|
-
}
|
|
129
|
-
};
|
|
130
|
-
return (
|
|
131
|
-
<Modal
|
|
132
|
-
showModal={() => toggleModal(true)}
|
|
133
|
-
hideModal={() => toggleModal(false)}
|
|
134
|
-
modalOpen={modalOpen}
|
|
135
|
-
{...modalExtraProps}
|
|
136
|
-
>
|
|
137
|
-
{renderAutoPayControl()}
|
|
114
|
+
</Box>
|
|
115
|
+
)}
|
|
138
116
|
</Modal>
|
|
139
117
|
);
|
|
140
118
|
};
|
|
@@ -35,18 +35,18 @@ const InactiveControlsModule = ({
|
|
|
35
35
|
modalOpen={modalOpen}
|
|
36
36
|
navigateToSettings={navigateToSettings}
|
|
37
37
|
deactivatePaymentSchedule={deactivatePaymentSchedule}
|
|
38
|
+
buttonLinkType
|
|
38
39
|
isMobile={isMobile}
|
|
39
40
|
paymentPlanSchedule={paymentPlanSchedule}
|
|
40
41
|
isPaymentPlan={isPaymentPlan}
|
|
41
42
|
nextAutopayDate={nextAutopayDate}
|
|
42
43
|
obligationAssocID={obligationAssocID}
|
|
43
|
-
controlType="secondary"
|
|
44
44
|
/>
|
|
45
45
|
</Box>
|
|
46
46
|
)}
|
|
47
47
|
<Box padding="0" extraStyles={`flex-grow: 1;`}>
|
|
48
48
|
<ButtonWithAction
|
|
49
|
-
variant="
|
|
49
|
+
variant="tertiary"
|
|
50
50
|
text="Remove"
|
|
51
51
|
action={handleRemoveAccount}
|
|
52
52
|
dataQa="Remove Account"
|
|
@@ -120,7 +120,7 @@ const PaymentDetailsActions = ({
|
|
|
120
120
|
modalOpen={modalOpen}
|
|
121
121
|
navigateToSettings={navigateToSettings}
|
|
122
122
|
deactivatePaymentSchedule={deactivatePaymentSchedule}
|
|
123
|
-
|
|
123
|
+
buttonLinkType
|
|
124
124
|
isMobile={isMobile}
|
|
125
125
|
paymentPlanSchedule={paymentPlanSchedule}
|
|
126
126
|
isPaymentPlan={isPaymentPlan}
|
package/src/.DS_Store
DELETED
|
Binary file
|
package/src/components/.DS_Store
DELETED
|
Binary file
|
|
Binary file
|
package/src/deprecated/.DS_Store
DELETED
|
Binary file
|